/* Andon website — shared styles for index.php and guide.php.
   The look follows the user guide booklet: off-white paper, Manrope in light weights,
   DM Mono for labels, thin rules and the four status colors. */

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('fonts/manrope-latin-ext-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/dm-mono-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/dm-mono-latin-ext-400-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    color-scheme: light;
    --bg:          #FCFCFB;
    --bg-alt:      #F5F5F3;
    --surface:     #FFFFFF;
    --ink:         #1A1C1E;
    --body:        #3E4247;
    --muted:       #5E6369;
    --faint:       #8A9097;
    --rule:        #E3E4E2;
    --rule-strong: #C9CCCF;
    --row-rule:    #F0F0EE;
    --on-ink:      #FCFCFB;

    --white-fill:  #FFFFFF;
    --white-ring:  #8A9097;
    --green:       #22A06B;
    --orange:      #E8862A;
    --red:         #D9453C;
    --white-rgb:   138, 144, 151;
    --green-rgb:   34, 160, 107;
    --orange-rgb:  232, 134, 42;
    --red-rgb:     217, 69, 60;

    --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'DM Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg:          #141517;
    --bg-alt:      #191A1D;
    --surface:     #1B1D20;
    --ink:         #E6E7E8;
    --body:        #C4C7CB;
    --muted:       #9A9FA6;
    --faint:       #80858C;
    --rule:        #2A2D31;
    --rule-strong: #3A3E43;
    --row-rule:    #222427;
    --on-ink:      #141517;

    --white-fill:  #2A2D31;
    --white-ring:  #9A9FA6;
    --green:       #2FB57C;
    --orange:      #F0963F;
    --red:         #E5594F;
    --white-rgb:   154, 159, 166;
    --green-rgb:   47, 181, 124;
    --orange-rgb:  240, 150, 63;
    --red-rgb:     229, 89, 79;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); }
a:hover { color: var(--muted); }
img, svg { display: block; }
code, pre, kbd { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap   { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-w { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap-w { padding: 0 20px; } .wrap { padding: 0 20px; } }

/* Labels and headings, as in the booklet */
.eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}
.eyebrow-s { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.num { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.h-display { margin: 10px 0 0; font-weight: 200; font-size: clamp(34px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.03em; }
.lead { font-weight: 300; font-size: 19px; line-height: 1.55; }
.muted { color: var(--muted); }
.pull { margin: 0; font-weight: 300; font-size: 17px; line-height: 1.5; padding-left: 16px; border-left: 1px solid var(--rule-strong); }
.link-u { text-decoration: none; border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px; font-size: 14px; }
.link-u:hover { border-bottom-color: var(--ink); color: var(--ink); }
.mono-link { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.mono-link:hover { color: var(--ink); }

/* Status dots */
.dot { display: inline-block; flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; }
.dot-white  { background: var(--white-fill); border: 1.5px solid var(--white-ring); }
.dot-green  { background: var(--green); }
.dot-orange { background: var(--orange); }
.dot-red    { background: var(--red); }
.dot-halo.dot-white  { box-shadow: 0 0 0 6px rgba(var(--white-rgb), .10); }
.dot-halo.dot-green  { box-shadow: 0 0 0 6px rgba(var(--green-rgb), .14), 0 0 0 14px rgba(var(--green-rgb), .05); }
.dot-halo.dot-orange { box-shadow: 0 0 0 6px rgba(var(--orange-rgb), .14), 0 0 0 14px rgba(var(--orange-rgb), .05); }
.dot-halo.dot-red    { box-shadow: 0 0 0 6px rgba(var(--red-rgb), .14), 0 0 0 14px rgba(var(--red-rgb), .05); }
.dot-lg { width: 14px; height: 14px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 0 20px;
    border-radius: 6px; border: 1px solid var(--rule-strong);
    background: transparent; color: var(--ink);
    font: 600 14px/1 var(--sans); text-decoration: none; cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--body); border-color: var(--body); color: var(--on-ink); }
.btn-sm { font-size: 13px; padding: 0 18px; }
.btn svg { width: 14px; height: 14px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand span { font-weight: 300; font-size: 22px; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--muted); padding: 10px 0; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active { color: var(--ink); font-weight: 600; box-shadow: inset 0 -1px 0 var(--ink); padding-bottom: 4px; }
.nav-links a.is-strong { color: var(--ink); font-weight: 600; }
.nav-tools { display: flex; align-items: center; gap: 14px; }
.lang-switch { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.lang-switch a { text-decoration: none; color: var(--faint); padding: 12px 2px; }
.lang-switch a[aria-current="true"] { color: var(--ink); }
.lang-switch span { color: var(--rule-strong); }
.theme-btn {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
}
.theme-btn:hover { border-color: var(--rule-strong); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (max-width: 760px) {
    .site-nav { gap: 6px 16px; }
    .nav-links { order: 3; width: 100%; gap: 0 20px; border-top: 1px solid var(--rule); padding-top: 4px; }
}

/* What's new bar */
.news { border-bottom: 1px solid var(--rule); background: var(--bg-alt); font-size: 13px; }
.news > summary { list-style: none; cursor: pointer; }
.news > summary::-webkit-details-marker { display: none; }
.news-row { min-height: 44px; display: flex; align-items: center; gap: 12px; }
.news-ver { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink); white-space: nowrap; }
.news-text { color: var(--body); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-more { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.news[open] .news-more .chev { display: inline-block; transform: rotate(90deg); }
.news-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 32px; padding-bottom: 18px; padding-top: 4px; border-top: 1px solid var(--rule); }
.news-body ul { margin: 6px 0 0; padding: 0; list-style: none; color: var(--body); }
.news-body li { padding: 2px 0; }

/* ── Sections ───────────────────────────────────────────────────────────── */
.sec { padding: 88px 0; }
.sec-alt { background: var(--bg-alt); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sec-top { border-top: 1px solid var(--rule); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 48px; }
.sec-head p { margin: 0; max-width: 360px; font-size: 13px; line-height: 1.7; color: var(--muted); }
@media (max-width: 640px) { .sec { padding: 64px 0; } }

/* Columns split by vertical rules; they wrap on small screens */
.cols { display: grid; gap: 32px 0; }
.cols > * { padding: 0 32px; border-left: 1px solid var(--rule); min-width: 0; }
.cols > *:first-child { padding-left: 0; border-left: 0; }
.cols > *:last-child { padding-right: 0; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 980px) {
    .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cols-4 > *:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 720px) {
    .cols-4, .cols-2 { grid-template-columns: minmax(0, 1fr); }
    .cols > * { padding: 0 0 0 0; border-left: 0; }
    .cols > * + * { border-top: 1px solid var(--rule); padding-top: 28px; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 56px; }
.hero h1 { margin: 18px 0 0; font-weight: 200; font-size: clamp(84px, 13vw, 140px); line-height: .9; letter-spacing: -0.045em; }
.hero .question { margin: 32px 0 0; max-width: 520px; font-weight: 300; font-size: clamp(21px, 2.4vw, 26px); line-height: 1.4; }
.hero .intro { margin: 16px 0 0; max-width: 480px; font-size: 15px; line-height: 1.7; color: var(--muted); }
.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-cta .guide-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; text-decoration: none; font-size: 14px; border-bottom: 1px solid var(--rule-strong); }
.hero-note { margin: 22px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--faint); }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); padding-top: 48px; } }

/* The four-states diagram from the booklet cover */
.diagram { position: relative; width: 460px; height: 440px; }
.diagram .ln { position: absolute; }
.diagram .lbl { position: absolute; font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.diagram .st { position: absolute; }
.diagram .st b { display: block; font-weight: 300; font-size: 22px; line-height: 1.1; }
.diagram .st i { display: block; font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.diagram .pt { position: absolute; border-radius: 50%; }
@media (max-width: 520px) { .diagram { transform: scale(.7); transform-origin: left top; margin-bottom: -132px; } }

/* Principles */
.principles { border-top: 1px solid var(--rule); padding-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 32px; }
.principles h3 { margin: 6px 0 0; font-weight: 300; font-size: 19px; }
.principles p { margin: 4px 0 0; font-size: 13px; line-height: 1.65; color: var(--muted); }

/* States */
.state { display: flex; flex-direction: column; gap: 14px; }
.state .dot { margin: 8px 0 0 8px; }
.state-name { font-weight: 200; font-size: 32px; letter-spacing: -0.02em; line-height: 1.15; }
.state-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.state-line { font-size: 14px; font-weight: 600; line-height: 1.45; }
.state-text { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 0; }

/* Worked example */
.example { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 48px 64px; align-items: start; }
.example p { margin: 14px 0 0; font-size: 15px; line-height: 1.75; color: var(--body); }
.tree { border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); overflow: hidden; }
.tree-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--rule); font-weight: 600; font-size: 14px; }
.tree-head .eyebrow-s { margin-left: auto; color: var(--faint); }
.tree-row { padding: 14px 18px; border-bottom: 1px solid var(--row-rule); }
.tree-row:last-child { border-bottom: 0; }
.tree-task { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tree-task .dot { width: 9px; height: 9px; }
.tree-child { margin: 10px 0 0 22px; font-size: 13px; color: var(--body); }
.props { margin: 10px 0 0 19px; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 6px 12px; font-size: 12.5px; line-height: 1.55; color: var(--body); }
.props dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding-top: 2px; }
.props dd { margin: 0; }
.tree-note { margin: 10px 0 0 22px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
@media (max-width: 480px) { .props { grid-template-columns: minmax(0, 1fr); gap: 0 0; } .props dd { margin-bottom: 8px; } }

/* Features */
.features { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 40px; }
.feature { display: block; text-decoration: none; padding: 20px 0; border-top: 1px solid var(--rule); }
.feature:hover { color: var(--ink); }
.feature:hover .feature-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.feature-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.feature-name { font-weight: 300; font-size: 19px; }
.feature-ch { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--faint); white-space: nowrap; }
.feature p { margin: 6px 0 0; font-size: 13px; line-height: 1.65; color: var(--muted); }

/* Download */
.changes { margin-top: 44px; }
.changes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.changes-box { max-height: 138px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; border-bottom: 1px solid var(--rule); }
.changes-box:focus-visible { outline-offset: -2px; }
.changes-box ol { list-style: none; margin: 0; padding: 0 12px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--body); }
.changes-box li.chg { display: grid; grid-template-columns: 64px 96px minmax(0, 1fr); gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.chg-ver { font-family: var(--mono); font-size: 11px; color: var(--faint); padding-top: 2px; }
.chg-ver.first { color: var(--ink); }
.chg-kind { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); padding-top: 3px; }
.chg-kind.k-feature { color: var(--green); }
.changes-box .all { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 2px; text-decoration: none; font-weight: 600; font-size: 13.5px; }
.changes-box .all svg { width: 14px; height: 14px; }
@media (max-width: 560px) {
    .changes-box li.chg { grid-template-columns: 56px minmax(0, 1fr); }
    .changes-box li.chg .chg-text { grid-column: 1 / -1; }
}

.platforms { margin-top: 20px; }
.platform { display: flex; flex-direction: column; gap: 12px; }
.platform-name { font-weight: 300; font-size: 28px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; }
.platform-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--faint); }
.platform-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.platform-sum { margin: 4px 0 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.platform-empty { font-size: 14px; color: var(--muted); }
.howto { border-top: 1px solid var(--rule); margin-top: 6px; }
.howto > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.howto > summary::-webkit-details-marker { display: none; }
.howto > summary .chev { color: var(--faint); transition: transform .15s; }
.howto[open] > summary .chev { transform: rotate(90deg); }
.howto-body { display: flex; flex-direction: column; gap: 16px; padding: 4px 0 8px; font-size: 13px; line-height: 1.7; color: var(--body); }
.howto-body strong { font-weight: 600; color: var(--ink); }
.step { display: grid; grid-template-columns: 26px minmax(0, 1fr); }
.step .num { padding-top: 2px; }
.step-more { margin-left: 26px; }
.cmd, .path {
    display: block; margin: 6px 0 0; padding: 10px 14px;
    background: var(--surface); border: 1px solid var(--rule); border-radius: 6px;
    font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--ink);
    white-space: pre-wrap; overflow-x: auto;
}
.cmd .c { color: var(--faint); }
.all-files { margin-top: 36px; }
.all-files > summary { list-style: none; cursor: pointer; display: inline-flex; min-height: 44px; align-items: center; }
.all-files > summary::-webkit-details-marker { display: none; }
.file-list { margin-top: 8px; border-top: 1px solid var(--rule); }
.file-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.file-row a { font-family: var(--mono); font-size: 12px; text-decoration: none; word-break: break-all; }
.file-row span { font-family: var(--mono); font-size: 11px; color: var(--faint); white-space: nowrap; }

/* Plugins */
.plugins { margin-top: 40px; border-top: 1px solid var(--rule); }
.plugin { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.plugin-info { flex: 999 1 420px; min-width: 0; }
.plugin-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.plugin-name b { font-weight: 300; font-size: 22px; }
.plugin-name .num { font-size: 11px; }
.plugin p { margin: 4px 0 0; font-size: 13px; line-height: 1.65; color: var(--muted); }
.plugin .req { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 6px; }

/* Changelog */
.releases { margin-top: 40px; }
.release-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.release-head b { font-weight: 300; font-size: 22px; }
.release-group { margin-top: 16px; }
.release-group ul { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.7; color: var(--body); }
.release-group li { padding: 1px 0; }
.latest-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); }
.older { margin-top: 36px; }
.older > summary { list-style: none; cursor: pointer; display: inline-flex; min-height: 44px; align-items: center; }
.older > summary::-webkit-details-marker { display: none; }
.older-list { margin-top: 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 40px; }
.older-list > div { padding: 20px 0; border-top: 1px solid var(--rule); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 32px; padding-bottom: 20px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-row a { text-decoration: none; color: var(--muted); }
.footer-row a:hover { color: var(--ink); }
.footer-note { margin: 0; padding-bottom: 44px; font-size: 13px; line-height: 1.7; color: var(--faint); }

/* ── Guide ──────────────────────────────────────────────────────────────── */
.guide { display: flex; flex-wrap: wrap; gap: 0 64px; align-items: flex-start; }
.guide-menu { order: -1; flex: 1 1 260px; max-width: 300px; padding: 40px 0 48px; display: flex; flex-direction: column; gap: 24px; }
.guide-main { flex: 999 1 560px; min-width: 0; max-width: 820px; padding: 48px 0 72px 64px; border-left: 1px solid var(--rule); }
.search label { display: block; margin-bottom: 8px; }
.search-row { display: flex; gap: 8px; }
.search input {
    flex: 1; min-width: 0; height: 44px; padding: 0 14px;
    border: 1px solid var(--rule); border-radius: 6px; background: var(--surface);
    font: 14px var(--sans); color: var(--ink);
}
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--rule-strong); outline: none; box-shadow: 0 0 0 3px rgba(var(--white-rgb), .18); }
.toc { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.toc > li > a { display: grid; grid-template-columns: 30px minmax(0, 1fr); padding: 7px 0; text-decoration: none; color: var(--body); }
.toc > li > a:hover { color: var(--ink); }
.toc > li > a .num { padding-top: 2px; }
.toc > li > a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.toc > li > a[aria-current="page"] .num { color: var(--ink); }
.toc ul { list-style: none; margin: 2px 0 8px 30px; padding: 0 0 0 14px; border-left: 1px solid var(--rule-strong); font-size: 13px; }
.toc ul a { display: block; padding: 4px 0; text-decoration: none; color: var(--muted); }
.toc ul a:hover { color: var(--ink); }
.pdf-link { display: flex; align-items: center; gap: 8px; min-height: 44px; border-top: 1px solid var(--rule); padding-top: 12px; font-size: 13px; text-decoration: none; color: var(--muted); }
.pdf-link svg { width: 14px; height: 14px; }
.menu-jump { display: none; }
@media (max-width: 900px) {
    .guide-menu { order: 2; max-width: none; flex-basis: 100%; border-top: 1px solid var(--rule); }
    .guide-main { padding: 32px 0 48px; border-left: 0; }
    .menu-jump { display: inline-flex; margin-bottom: 20px; }
}

.lang-note { margin: 0 0 28px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg-alt); font-size: 13px; color: var(--body); }

/* Rendered markdown */
.md h1 { margin: 10px 0 0; font-weight: 200; font-size: clamp(36px, 5vw, 52px); line-height: 1.04; letter-spacing: -0.03em; }
.md > .lead-p { margin-top: 20px; font-weight: 300; font-size: 19px; line-height: 1.55; color: var(--ink); }
.md h2 { margin: 48px 0 0; font-weight: 300; font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; display: flex; align-items: center; gap: 14px; scroll-margin-top: 24px; }
.md h3 { margin: 32px 0 0; font-weight: 600; font-size: 16px; scroll-margin-top: 24px; }
.md h2 .dot, .md h3 .dot { width: 12px; height: 12px; }
.md h2 .dot-halo.dot-green, .md h2 .dot-halo.dot-orange, .md h2 .dot-halo.dot-red { box-shadow: 0 0 0 6px rgba(var(--white-rgb), .12); }
.md h2 .dot-halo.dot-green { box-shadow: 0 0 0 6px rgba(var(--green-rgb), .14); }
.md h2 .dot-halo.dot-orange { box-shadow: 0 0 0 6px rgba(var(--orange-rgb), .14); }
.md h2 .dot-halo.dot-red { box-shadow: 0 0 0 6px rgba(var(--red-rgb), .14); }
.md p { margin: 14px 0 0; font-size: 15px; line-height: 1.8; color: var(--body); }
.md strong { font-weight: 600; color: var(--ink); }
.md em { font-style: italic; }
.md a { text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.md a:hover { text-decoration-color: var(--ink); color: var(--ink); }
.md code { font-size: .88em; padding: 1px 5px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); color: var(--ink); }
.md pre { margin: 16px 0 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; overflow-x: auto; }
.md pre code { padding: 0; border: 0; background: none; font-size: 12.5px; line-height: 1.6; }
.md ul, .md ol { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.75; color: var(--body); }
.md ul > li { display: flex; gap: 14px; }
.md ul > li::before { content: ''; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--rule-strong); margin-top: 11px; }
.md ol { counter-reset: md; }
.md ol > li { display: grid; grid-template-columns: 30px minmax(0, 1fr); counter-increment: md; }
.md ol > li::before { content: counter(md, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--faint); padding-top: 3px; }
.md blockquote { margin: 20px 0 0; padding: 2px 0 2px 18px; border-left: 1px solid var(--rule-strong); }
.md blockquote p { margin: 0; }
.md blockquote p + p { margin-top: 8px; }
.md .table { margin-top: 24px; overflow-x: auto; border-top: 1px solid var(--ink); }
.md table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.md th { padding: 12px 16px 12px 0; text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 400; color: var(--muted); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.md td { padding: 11px 16px 11px 0; border-bottom: 1px solid var(--rule); color: var(--body); vertical-align: top; }
.md td:last-child, .md th:last-child { padding-right: 0; }
.md td .dot { width: 9px; height: 9px; margin-right: 8px; vertical-align: 1px; }
.md td code { white-space: nowrap; }
.md .cjk { font-weight: 400; }

.chapter-nav { margin-top: 64px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border-top: 1px solid var(--rule); padding-top: 20px; }
.chapter-nav a { text-decoration: none; display: flex; flex-direction: column; gap: 4px; min-height: 44px; }
.chapter-nav a.next { align-items: flex-end; text-align: right; grid-column: 2; }
.chapter-nav .eyebrow-s { color: var(--faint); }
.chapter-nav b { font-weight: 300; font-size: 18px; }
.chapter-nav a:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.md .results { display: block; list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.md .results li { display: block; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.md .results li::before { content: none; }
.md .results a { text-decoration: none; }
.results a { text-decoration: none; font-weight: 300; font-size: 19px; }
.results .where { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
.results p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.results mark { background: rgba(var(--orange-rgb), .22); color: var(--ink); border-radius: 2px; padding: 0 1px; }

@media print {
    .site-header, .news, .guide-menu, .site-footer, .chapter-nav, .menu-jump { display: none !important; }
    .guide-main { border: 0; padding: 0; max-width: none; }
    body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Inline stroke icons default to text size */
svg[class^="i-"] { width: 14px; height: 14px; flex-shrink: 0; }
.theme-btn svg[class^="i-"] { width: 16px; height: 16px; }
