/* Manuals section (/manuals/): hub cards and the manual reader.
   Loaded after /styles.css and /calendar/event.css (shared header, footer, ev-* layout).
   All manual content classes use the mn- prefix, figure classes inside SVG use mf-. */

.mn-main { max-width: 920px; }

/* === Hero === */
.mn-hero { margin-bottom: 28px; }
.mn-aud {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-accent);
    line-height: 1.6;
    margin-bottom: 18px;
}
.mn-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}
.mn-facts li {
    background: var(--bg-card);
    border: 1px solid rgba(164, 48, 63, 0.12);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.mn-facts b {
    display: block;
    font-size: 26px;
    line-height: 1.1;
    color: var(--accent-hot);
    letter-spacing: 0;
}
.mn-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.mn-actions .ev-cta { margin-top: 0; }
.mn-btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 100px;
    border: 1.5px solid rgba(164, 48, 63, 0.3);
    color: var(--accent-rose);
    font-weight: 700;
    text-decoration: none;
    background: var(--bg-card);
}
.mn-btn-ghost:hover { border-color: var(--accent-rose); }
.mn-disclaimer {
    background: #fff;
    border: 1px solid rgba(164, 48, 63, 0.15);
    border-left: 5px solid var(--accent-hot);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* === Table of contents === */
.mn-toc {
    background: var(--bg-card);
    border: 1px solid rgba(164, 48, 63, 0.12);
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 36px;
}
.mn-toc h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.mn-toc > ol { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 28px; }
.mn-toc > ol > li { break-inside: avoid; margin-bottom: 12px; }
.mn-toc > ol > li > a { font-weight: 800; color: var(--text-accent); text-decoration: none; line-height: 1.4; }
.mn-toc ol ol { list-style: none; padding: 0 0 0 12px; margin: 4px 0 0; }
.mn-toc ol ol li { font-size: 14px; line-height: 1.45; margin-bottom: 2px; }
.mn-toc ol ol a { color: var(--text-secondary); text-decoration: none; font-weight: 600; }
.mn-toc a:hover { color: var(--accent-rose); text-decoration: underline; }

/* === Manual content (from the print edition) === */
.manual {
    --wine: #800020; --rose: #a4303f; --accent: #912338; --deep: #6b2737; --fuchsia: #722f37;
    --ink: #2d1a1e; --ink2: #5c3a44; --muted: #8c6b74;
    --line: rgba(145, 35, 56, .13); --line2: rgba(145, 35, 56, .22);
    --grad: linear-gradient(135deg, #a4303f 0%, #800020 45%, #912338 72%, #6b2737 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    overflow-wrap: break-word;
}
.manual p { margin: 0 0 10px; }
.manual b, .manual strong { font-weight: 700; color: var(--deep); }
.manual i, .manual em { color: var(--ink2); }
.manual ul, .manual ol { margin: 0 0 12px; padding-left: 22px; }
.manual li { margin-bottom: 5px; }
.manual li::marker { color: var(--rose); }
.manual a { color: var(--accent-rose); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.manual h2.mn-sec {
    margin: 48px 0 18px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 90px;
}
.manual h2.mn-sec:first-child { margin-top: 0; }
.mn-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--fuchsia);
    background: rgba(114, 47, 55, .07);
    border: 1.2px solid rgba(114, 47, 55, .2);
    border-radius: 100px;
    padding: 3px 12px;
    margin-bottom: 10px;
}
.mn-h { display: block; font-size: 28px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
.manual h3 {
    font-size: 21px;
    font-weight: 800;
    color: var(--deep);
    margin: 30px 0 12px;
    padding-left: 14px;
    position: relative;
    scroll-margin-top: 90px;
}
.manual h3::before {
    content: '';
    position: absolute;
    left: 0; top: 4px; bottom: 4px;
    width: 5px;
    border-radius: 100px;
    background: var(--grad);
}
.manual h4 { font-size: 17px; font-weight: 800; color: var(--rose); margin: 20px 0 8px; }
.manual h5 { font-size: 16px; font-weight: 700; color: var(--ink2); margin: 16px 0 6px; }

/* tables scroll inside their own container */
.mn-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 12px 0 18px;
    border: 1px solid #ecdade;
    border-radius: 14px;
    background: #fff;
}
.mn-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mn-table.mn-wide table { min-width: 560px; }
.mn-table.mn-xwide table { min-width: 720px; }
.mn-table th {
    background: var(--bg-primary);
    color: var(--deep);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 9px 12px;
    text-align: left;
    vertical-align: bottom;
    border-bottom: 1.5px solid var(--line2);
}
.mn-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    line-height: 1.5;
}
.mn-table tr:last-child td { border-bottom: none; }
.mn-table tr:nth-child(even) td { background: #fdfafb; }
.mn-table td:first-child { color: var(--deep); font-weight: 600; }
.mn-table tr th + td { font-weight: 400; }
.mn-table table.mn-plain td:first-child { font-weight: 400; color: inherit; }
.mn-table a { word-break: break-word; }

/* callouts */
.mn-box {
    position: relative;
    background: #fff;
    border: 1px solid #ecdade;
    border-radius: 14px;
    padding: 14px 16px 14px 20px;
    margin: 14px 0;
    overflow: hidden;
}
.mn-box::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--grad); }
.mn-box.mn-warn { background: linear-gradient(160deg, #fff, #fdf3f5); }
.mn-box.mn-warn::before { background: linear-gradient(180deg, #800020, #6b2737); }
.mn-box.mn-key { background: linear-gradient(160deg, #fff, #fffbf2); }
.mn-box.mn-key::before { background: linear-gradient(180deg, #f5a623, #e08a10); }
.mn-box > :last-child { margin-bottom: 0; }
.mn-box .mn-t {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--rose);
    margin-bottom: 6px;
}
.mn-box.mn-warn .mn-t { color: var(--wine); }
.mn-box.mn-key .mn-t { color: #a06d00; }
.mn-box .mn-table { margin-bottom: 0; }

/* instrument cards */
.mn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 18px; }
.mn-grid:has(.mn-third) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mn-card {
    margin: 0;
    background: #fff;
    border: 1px solid #ecdade;
    border-radius: 14px;
    overflow: hidden;
}
.mn-card.mn-full { grid-column: 1 / -1; }
.mn-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 170px;
    object-fit: contain;
    background: #faf4f5;
    padding: 6px;
    border-bottom: 1px solid #efe1e4;
}
.mn-card.mn-full img { height: 300px; }
.mn-cap { padding: 10px 12px 12px; }
.mn-nm { font-size: 15px; font-weight: 800; color: var(--accent); line-height: 1.3; }
.mn-lat { font-style: italic; font-size: 13px; color: var(--muted); margin-top: 2px; }
.mn-ds { font-size: 14px; color: var(--ink2); margin-top: 6px; line-height: 1.5; }

/* schemes: keep text legible, scroll horizontally on narrow screens */
.mn-fig {
    margin: 18px 0;
    background: #fff;
    border: 1px solid #ecdade;
    border-radius: 14px;
    padding: 12px 10px 12px;
    text-align: center;
}
.mn-fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mn-fig svg { display: block; width: 100%; min-width: 540px; height: auto; margin: 0 auto; }
.mn-fig svg[width="480"] { max-width: 640px; }
.mn-fig figcaption, .manual figcaption {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
    margin-top: 8px;
    padding: 0 10px;
}
.mn-fig svg text { font-family: Arial, Helvetica, 'Liberation Sans', Arimo, sans-serif; fill: #2d1a1e; }
.mn-fig svg .mf-ttl { font-size: 9px; font-weight: 700; fill: #6b2737; }
.mn-fig svg .mf-t { font-size: 9.5px; font-weight: 700; fill: #6b2737; }
.mn-fig svg .mf-s { font-size: 8.2px; fill: #5c3a44; }
.mn-fig svg .mf-cap { font-size: 7.2px; fill: #5c3a44; }
.mn-fig svg .mf-lbl { font-size: 9px; fill: #2d1a1e; }
.mn-fig svg .mf-num { font-size: 8.5px; fill: #8c6b74; }
.mn-fig svg .mf-tis { fill: #fbe6e0; stroke: #c9a49a; stroke-width: 1; }
.mn-fig svg .mf-th { stroke: #6b2737; stroke-width: 1.8; fill: none; stroke-linecap: round; }
.mn-fig svg .mf-th2 { stroke: #a4303f; stroke-width: 1.8; fill: none; stroke-linecap: round; }
.mn-fig svg .mf-ln { stroke: #a11; stroke-width: 3.2; fill: none; stroke-linecap: round; }
.mn-fig svg .mf-ut { fill: #f6d9d9; stroke: #b5828c; stroke-width: 1.3; }
.mn-fig svg .mf-cut { stroke: #a11; stroke-width: 3; fill: none; stroke-linecap: round; }

.mn-small { font-size: 14px; color: var(--ink2); }

/* steps, checklists, questions */
.manual .mn-steps { counter-reset: st; list-style: none; padding-left: 0; }
.mn-steps > li { counter-increment: st; position: relative; padding-left: 34px; margin-bottom: 9px; }
.mn-steps > li::before {
    content: counter(st);
    position: absolute; left: 0; top: 2px;
    width: 23px; height: 23px;
    border-radius: 100px;
    background: rgba(164, 48, 63, .09);
    border: 1.3px solid rgba(164, 48, 63, .25);
    color: var(--deep);
    text-align: center;
    font-weight: 800;
    font-size: 12px;
    line-height: 21px;
}
.manual .mn-chk { list-style: none; padding-left: 0; }
.mn-chk li { padding-left: 26px; position: relative; margin-bottom: 6px; }
.mn-chk li::before {
    content: '';
    position: absolute; left: 1px; top: 5px;
    width: 13px; height: 13px;
    border-radius: 4px;
    border: 1.6px solid var(--rose);
    background: #fff;
}
.mn-q { font-weight: 800; color: var(--deep); margin: 16px 0 4px; }
.mn-ans { color: var(--ink2); font-size: 15px; padding-left: 14px; border-left: 3px solid rgba(164, 48, 63, .28); margin-bottom: 12px; }

.mn-end { margin-top: 48px; }

/* === Hub page: manual cards === */
.mn-list { display: grid; gap: 16px; margin-top: 8px; }
.mn-item {
    background: var(--bg-card);
    border: 1px solid rgba(164, 48, 63, 0.12);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 2px 10px rgba(128, 0, 32, 0.04);
}
.mn-item-title { font-size: 21px; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.mn-item-title a { color: var(--text-primary); text-decoration: none; }
.mn-item-title a:hover { color: var(--accent-rose); }
.mn-item-desc { font-size: 16px; font-weight: 500; line-height: 1.6; color: var(--text-secondary); margin-bottom: 12px; }
.mn-meta { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; }
.mn-meta li {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-accent);
    background: rgba(164, 48, 63, 0.06);
    border-radius: 100px;
    padding: 4px 12px;
}

@media (max-width: 900px) {
    .mn-h { font-size: 24px; }
    .manual h3 { font-size: 19px; }
}

@media (max-width: 640px) {
    .mn-facts { grid-template-columns: repeat(2, 1fr); }
    .mn-toc { padding: 16px; }
    .mn-toc > ol { columns: 1; }
    .mn-grid, .mn-grid:has(.mn-third) { grid-template-columns: minmax(0, 1fr); }
    .mn-card img, .mn-card.mn-full img { height: auto; aspect-ratio: 4 / 3; }
    .mn-item { padding: 18px; }
    .manual { font-size: 15px; }
}
