/* =====================================================================================================================
   Mercury Commerce Support (support.mercury-commerce.com). One stylesheet, no framework, no CDN, nothing inline (the
   CSP allows only this site). Light and dark follow the visitor's system setting; every colour is a custom property.

   Design system (redesign 2026-10-13)
   - Brand: Mercury blue #01539b (the logo's wordmark) carries trust: links, icons, the primary button. The logo's
     flame #ef4623 is the one vivid accent, used with intent: the call to action, the focus ring, highlights.
     A deep navy (#071330) with an aurora of blue, violet and flame is the hero and the closing call to action.
   - Type: Inter (self-hosted variable, wwwroot/fonts, OFL) with Segoe UI / SF as the fallback. Scale: 12, 13, 14, 15,
     16, 17 (reading), 18, 20, 24, 30, 40, hero 40 to 70 (fluid). Display weights 700 to 800 with tight tracking.
   - Shape: radii 8 / 12 / 16 / 20 / 28; layered shadows tinted with the brand navy; 4px spacing grid.
   - Motion: hover lifts, focus rings, fade-in on scroll and the hero aurora; all of it off under reduced motion.
   ===================================================================================================================== */

/* ---- Inter, self-hosted (Fontsource 5.1.0, Latin, weight axis 100 to 900; licence in /fonts/OFL.txt) ---------------- */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/fonts/inter-latin-wght-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: "Inter";
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url("/fonts/inter-latin-wght-italic.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;
}

/* ---- tokens: light --------------------------------------------------------------------------------------------- */
:root {
    /* brand */
    --brand: #01539b;
    --brand-strong: #013f78;
    --brand-btn: #01539b;
    --brand-btn-hover: #013f78;
    --brand-50: #eef5ff;
    --brand-100: #dceaff;
    --brand-200: #b8d4f8;
    --accent: #ef4623;
    --accent-btn: #d23a14;
    --accent-btn-hover: #b8300f;
    --accent-ink: #b8300f;
    --accent-soft: #fff1ec;
    --accent-line: #ffc9b8;
    --amber: #ffb547;
    --navy-950: #050b1f;
    --navy-900: #071330;
    --navy-800: #0c1d45;
    --navy-700: #13296a;

    /* the four task hues */
    --hue-1: #01539b; --hue-1-soft: #e6f0fd;
    --hue-2: #5b4ee8; --hue-2-soft: #efedff;
    --hue-3: #0f766e; --hue-3-soft: #e3f6f3;
    --hue-4: #c2360f; --hue-4-soft: #fff0ea;

    /* surfaces and text */
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-2: #f0f4fa;
    --surface-3: #e7edf6;
    --ink: #0f1b2d;
    --ink-2: #334155;
    --muted: #5b6878;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --header-bg: rgba(255, 255, 255, .84);
    --banner-bg: linear-gradient(135deg, #eaf2ff 0%, #f3f0ff 48%, #fff2ec 100%);
    --tint-bg: linear-gradient(180deg, #f0f4fb 0%, #f6f8fc 100%);

    /* states */
    --ok: #0f7a45; --ok-soft: #e6f6ed;
    --warn: #8a5a00; --warn-soft: #fff5df;
    --error: #b42318; --error-soft: #fdecea;
    --mark-bg: #ffe7a3; --mark-ink: #3d2a00;

    /* illustrations (Pages/Art.cs) */
    --art-bg: #e7f0fd;
    --art-1: #01539b;
    --art-2: #ef4623;
    --art-3: #9cc3f2;
    --art-paper: #ffffff;
    --art-edge: #01539b;
    --art-line: #b9cbe3;
    --art-mark: #ffffff;

    /* shape and depth */
    --r-sm: 8px; --r: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 28px;
    --shadow-xs: 0 1px 2px rgba(12, 29, 69, .06);
    --shadow-sm: 0 1px 2px rgba(12, 29, 69, .06), 0 2px 6px rgba(12, 29, 69, .05);
    --shadow-md: 0 1px 2px rgba(12, 29, 69, .05), 0 8px 24px -6px rgba(12, 29, 69, .12);
    --shadow-lg: 0 2px 4px rgba(12, 29, 69, .05), 0 24px 48px -12px rgba(12, 29, 69, .22);
    --ring: 0 0 0 3px rgba(239, 70, 35, .42);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6878' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

    /* type */
    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Inter", "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
    --fs-12: .75rem; --fs-13: .8125rem; --fs-14: .875rem; --fs-15: .9375rem; --fs-16: 1rem; --fs-17: 1.0625rem;
    --fs-18: 1.125rem; --fs-20: 1.25rem; --fs-24: 1.5rem;
    --fs-30: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
    --fs-40: clamp(1.875rem, 1.35rem + 2vw, 2.5rem);
    --fs-hero: clamp(2.5rem, 1.45rem + 4.4vw, 4.375rem);

    --wrap: 1200px;
    --header-h: 68px;
    color-scheme: light;
}

/* ---- tokens: dark ---------------------------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    :root {
        --brand: #6aa8ff;
        --brand-strong: #9cc5ff;
        --brand-btn: #2563eb;
        --brand-btn-hover: #1d4fd0;
        --brand-50: #0f1d38;
        --brand-100: #13264a;
        --brand-200: #1f3a6b;
        --accent-ink: #ff8a66;
        --accent-soft: #2a1611;
        --accent-line: #5c2a1d;

        --hue-1: #6aa8ff; --hue-1-soft: #13264a;
        --hue-2: #a89eff; --hue-2-soft: #1f1b47;
        --hue-3: #2dd4bf; --hue-3-soft: #0d2b2a;
        --hue-4: #ff8a66; --hue-4-soft: #2e1710;

        --bg: #0a0f1c;
        --surface: #111829;
        --surface-2: #151e33;
        --surface-3: #1c2740;
        --ink: #e8edf6;
        --ink-2: #c3cddb;
        --muted: #94a3b8;
        --line: #222c42;
        --line-strong: #2f3b57;
        --header-bg: rgba(10, 15, 28, .8);
        --banner-bg: linear-gradient(135deg, #0e1b36 0%, #161838 50%, #22141a 100%);
        --tint-bg: linear-gradient(180deg, #0d1424 0%, #0a0f1c 100%);

        --ok: #5fd08f; --ok-soft: #10291c;
        --warn: #f0c060; --warn-soft: #2a2210;
        --error: #ff8a7d; --error-soft: #2e1513;
        --mark-bg: rgba(255, 181, 71, .26); --mark-ink: #ffe2b0;

        --art-bg: #16233f;
        --art-1: #3d8bf0;
        --art-3: #2f5793;
        --art-paper: #e9eef7;
        --art-edge: #3d8bf0;
        --art-line: #8ea4c6;

        --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 6px rgba(0, 0, 0, .25);
        --shadow-md: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -8px rgba(0, 0, 0, .55);
        --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 28px 56px -14px rgba(0, 0, 0, .7);
        --ring: 0 0 0 3px rgba(255, 112, 80, .55);
        --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
        color-scheme: dark;
    }
}

/* ---- base ------------------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
    margin: 0;
    font: 400 var(--fs-16)/1.6 var(--font);
    font-feature-settings: "cv11", "ss03";
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--brand-100); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; border-radius: var(--r); background: var(--brand-btn); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; color: #fff; }
.muted { color: var(--muted); }

/* ---- header ----------------------------------------------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; border-radius: var(--r-sm); }
.brand picture, .brand img { display: block; }
.brand img { width: 140px; height: auto; }
.brand-tag {
    font-size: var(--fs-12); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--brand); background: var(--brand-50); border: 1px solid var(--brand-100);
    padding: 3px 9px; border-radius: 999px;
}
.header-search { position: relative; flex: 1 1 auto; max-width: 420px; margin-left: auto; }
.header-search > svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.header-search input {
    width: 100%; height: 42px; padding: 0 40px 0 40px;
    font: inherit; font-size: var(--fs-15); color: var(--ink);
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: var(--ring); }
.header-search .kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.header-search input:focus ~ .kbd { opacity: 0; }
.site-nav { display: flex; align-items: center; gap: 6px; flex: none; }
.header-search + .site-nav { margin-left: 0; }
.site-header .bar > .brand + .site-nav { margin-left: auto; }
.nav-link { padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 600; font-size: var(--fs-15); text-decoration: none; }
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--brand); }
.icon-btn { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 999px; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---- buttons, chips, keys -------------------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px;
    font: inherit; font-weight: 650; font-size: var(--fs-15); line-height: 1.2; text-align: center;
    border: 1px solid transparent; border-radius: var(--r); cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s, box-shadow .2s, transform .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--brand-btn); color: #fff; box-shadow: 0 1px 2px rgba(1, 83, 155, .25), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover { background: var(--brand-btn-hover); color: #fff; }
.btn-accent {
    background: linear-gradient(180deg, #dc4119 0%, var(--accent-btn) 100%); color: #fff;
    box-shadow: 0 1px 2px rgba(184, 48, 15, .3), 0 6px 16px -6px rgba(239, 70, 35, .55), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-accent:hover { background: var(--accent-btn-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(184, 48, 15, .3), 0 10px 22px -8px rgba(239, 70, 35, .6); }
.btn-accent:active { transform: none; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--surface); }
.btn-ghost-dark { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn-ghost-dark:hover { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: var(--fs-14); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: var(--fs-16); border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.kbd {
    display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
    font: 600 var(--fs-12)/1 var(--mono); color: var(--muted);
    background: var(--surface); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px;
    transition: opacity .15s;
}
.pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 10px; border-radius: 999px;
    font-size: var(--fs-13); font-weight: 600; text-decoration: none;
    color: var(--brand); background: var(--surface); border: 1px solid var(--brand-100);
}
.pill:hover { border-color: var(--brand); }
.pill svg { width: 15px; height: 15px; }
.eyebrow-sm {
    display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px;
    font-size: var(--fs-13); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow-sm svg { width: 16px; height: 16px; }

/* ---- search fields ---------------------------------------------------------------------------------------------- */
.search-field { position: relative; }
.search-field > svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field input {
    width: 100%; height: 52px; padding: 0 16px 0 46px;
    font: inherit; font-size: var(--fs-16); color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px;
    transition: border-color .15s, box-shadow .15s;
}
.search-field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

.search-xl {
    position: relative; display: flex; align-items: center; gap: 10px;
    padding: 8px 8px 8px 20px; min-height: 68px;
    background: var(--surface); border: 1px solid rgba(255, 255, 255, .6); border-radius: 20px;
    box-shadow: 0 2px 4px rgba(5, 11, 31, .2), 0 24px 60px -16px rgba(5, 11, 31, .6), 0 0 0 6px rgba(255, 255, 255, .06);
    transition: box-shadow .2s, border-color .2s;
}
.search-xl:focus-within { border-color: var(--accent); box-shadow: 0 2px 4px rgba(5, 11, 31, .2), 0 24px 60px -16px rgba(5, 11, 31, .6), 0 0 0 5px rgba(239, 70, 35, .38); }
.search-xl .search-icon { width: 24px; height: 24px; flex: none; color: var(--brand); }
.search-xl input {
    flex: 1 1 auto; min-width: 0; height: 52px; padding: 0;
    font: inherit; font-size: var(--fs-18); color: var(--ink);
    background: transparent; border: 0;
}
.search-xl input::placeholder { color: var(--muted); }
.search-xl input:focus { outline: none; }
.search-xl .kbd { flex: none; }
.search-xl input:focus ~ .kbd { opacity: 0; }
.search-go { flex: none; min-height: 52px; padding: 0 24px; border-radius: 14px; font-size: var(--fs-16); }
@media (prefers-color-scheme: dark) {
    .search-xl { border-color: rgba(255, 255, 255, .14); }
}

/* ---- hero ------------------------------------------------------------------------------------------------------- */
.hero {
    position: relative; isolation: isolate;
    padding: 76px 0 132px;
    color: #fff;
    background:
        radial-gradient(900px 480px at 85% -10%, rgba(59, 99, 255, .45), transparent 65%),
        radial-gradient(700px 420px at 0% 110%, rgba(239, 70, 35, .22), transparent 60%),
        linear-gradient(180deg, var(--navy-900) 0%, #0a1a44 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-bg::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1.2px);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 20%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 80% at 50% 20%, #000 20%, transparent 75%);
}
.hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; z-index: -1;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
}
.aurora { position: absolute; inset: -20% -10% 0; pointer-events: none; filter: blur(64px) saturate(1.2); opacity: .9; }
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.aurora span:nth-child(1) { width: 44vw; height: 44vw; max-width: 620px; max-height: 620px; left: -6%; top: -8%; background: radial-gradient(circle, rgba(37, 99, 235, .85), transparent 68%); animation: drift-a 22s ease-in-out infinite alternate; }
.aurora span:nth-child(2) { width: 38vw; height: 38vw; max-width: 540px; max-height: 540px; left: 38%; top: -22%; background: radial-gradient(circle, rgba(124, 77, 255, .7), transparent 68%); animation: drift-b 26s ease-in-out infinite alternate; }
.aurora span:nth-child(3) { width: 34vw; height: 34vw; max-width: 480px; max-height: 480px; right: -4%; top: 30%; background: radial-gradient(circle, rgba(255, 90, 54, .55), transparent 68%); animation: drift-c 30s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(12%, 18%) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-16%, 22%) scale(.9); } }
@keyframes drift-c { to { transform: translate(-22%, -14%) scale(1.2); } }

.orbit { position: absolute; width: 640px; height: 640px; right: -120px; top: -80px; opacity: .9; pointer-events: none; }
.orbit-ring { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: 1.5; }
.orbit-ring.faint { stroke: rgba(255, 255, 255, .09); stroke-dasharray: 3 9; }
.orbit-dot { fill: #ff6a45; filter: drop-shadow(0 0 8px rgba(255, 106, 69, .9)); }
.orbit-dot-static { display: none; }

.hero-inner { position: relative; text-align: center; max-width: 880px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 6px 14px 6px 10px;
    font-size: var(--fs-13); font-weight: 600; letter-spacing: .02em; color: #dfe7ff;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 0 0 rgba(62, 224, 143, .6); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(62, 224, 143, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(62, 224, 143, 0); } }
.hero h1 { color: #fff; font-size: var(--fs-hero); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; margin: 0 0 18px; text-wrap: balance; }
.hl {
    background: linear-gradient(95deg, #ff7a59 0%, #ffb547 90%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    padding-right: .04em;
}
.hero .lede { margin: 0 auto 34px; max-width: 620px; font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); line-height: 1.55; color: #c9d5f0; text-wrap: pretty; }
.hero-search { position: relative; max-width: 720px; margin: 0 auto; text-align: left; z-index: 5; }
.topics { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; margin-top: 26px; }
.topics-label { font-size: var(--fs-14); color: #aebde0; font-weight: 500; }
.topics ul { display: contents; list-style: none; padding: 0; }
.chip {
    display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px;
    font-size: var(--fs-14); font-weight: 550; color: #e6ecff; text-decoration: none;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
    transition: background .15s, border-color .15s, transform .15s;
}
.chip:hover { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); transform: translateY(-1px); }
.chip:focus-visible { outline: 2px solid #ff8a66; outline-offset: 2px; }

.hero-compact { padding: 52px 0 60px; }
.hero-compact h1 { font-size: var(--fs-40); margin-bottom: 24px; }

/* ---- search results --------------------------------------------------------------------------------------------- */
.results-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); overflow: hidden; color: var(--ink); }
.results-pop { position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 30; }
/* While the floating results are open the hero sits above the task tiles that overlap its bottom edge. */
.hero:has(.results-pop:not([hidden])) { z-index: 3; }
.results-pop .results-card { max-height: min(64vh, 560px); overflow-y: auto; box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.results-page { padding-top: 32px; padding-bottom: 80px; max-width: 880px; }
.results-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; font-size: var(--fs-14); color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.results-head strong { color: var(--ink); }
.results-list { list-style: none; padding: 6px; margin: 0; }
.result a { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 14px 16px; border-radius: var(--r); text-decoration: none; color: var(--ink); transition: background .12s; }
.result a:hover, .result a:focus-visible { background: var(--brand-50); outline: none; }
.result a:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.result .t { grid-column: 1; font-weight: 650; font-size: var(--fs-16); color: var(--ink); }
.result .s { grid-column: 2; grid-row: 1; align-self: start; font-size: var(--fs-12); font-weight: 600; color: var(--brand); background: var(--brand-50); border: 1px solid var(--brand-100); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.result .x { grid-column: 1 / -1; font-size: var(--fs-14); color: var(--muted); line-height: 1.5; }
.result mark, .prose mark { background: var(--mark-bg); color: var(--mark-ink); border-radius: 3px; padding: 0 2px; }
.results-all { display: block; padding: 13px 20px; border-top: 1px solid var(--line); font-size: var(--fs-14); font-weight: 600; text-decoration: none; background: var(--surface-2); }
.results-all:hover { background: var(--brand-50); }
.results-empty { display: flex; gap: 14px; align-items: flex-start; padding: 22px 22px; color: var(--ink-2); }
.results-empty svg { width: 24px; height: 24px; flex: none; color: var(--brand); margin-top: 1px; }
.results-empty p { margin: 0; }
.results-error svg { color: var(--warn); }
.results-loading { display: flex; align-items: center; gap: 10px; padding: 16px 20px 6px; font-size: var(--fs-14); color: var(--muted); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.results-skeleton { list-style: none; margin: 0; padding: 8px 20px 20px; }
.results-skeleton li { height: 44px; margin-top: 10px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- quick-action tiles ----------------------------------------------------------------------------------------- */
.tasks-band { position: relative; z-index: 2; margin-top: -72px; }
.tasks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.task a {
    position: relative; display: flex; flex-direction: column; height: 100%; padding: 22px 22px 20px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md);
    color: var(--ink); text-decoration: none; overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.task a::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--task-hue); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.task a:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.task a:hover::before, .task a:focus-visible::before { transform: scaleX(1); }
.task:nth-child(4n+1) { --task-hue: var(--hue-1); --task-soft: var(--hue-1-soft); }
.task:nth-child(4n+2) { --task-hue: var(--hue-2); --task-soft: var(--hue-2-soft); }
.task:nth-child(4n+3) { --task-hue: var(--hue-3); --task-soft: var(--hue-3-soft); }
.task:nth-child(4n+4) { --task-hue: var(--hue-4); --task-soft: var(--hue-4-soft); }
.task-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: var(--task-soft); color: var(--task-hue); margin-bottom: 16px; }
.task-icon svg { width: 24px; height: 24px; }
.task-label { font-family: var(--font-display); font-size: var(--fs-18); font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.task-blurb { font-size: var(--fs-14); color: var(--muted); line-height: 1.5; margin-bottom: 16px; }
.task-go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-14); font-weight: 650; color: var(--task-hue); }
.task-go svg { width: 16px; height: 16px; transition: transform .2s; }
.task a:hover .task-go svg { transform: translateX(4px); }

/* ---- sections and cards ----------------------------------------------------------------------------------------- */
.page-section { padding: 80px 0; }
.page-section + .page-section { padding-top: 0; }
.page-section-tint { padding: 72px 0 !important; background: var(--tint-bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.page-section-tint + .page-section { padding-top: 80px; }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-title h2 { font-size: var(--fs-40); font-weight: 800; letter-spacing: -.03em; margin-bottom: 10px; }
.section-title p { color: var(--muted); font-size: var(--fs-17); margin: 0; }
.section-title-left { text-align: left; margin: 0 0 22px; }
.section-title-left h2 { font-size: var(--fs-30); margin: 0; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card-art { display: flex; justify-content: center; align-items: center; height: 168px; background: linear-gradient(160deg, var(--brand-50) 0%, var(--surface) 100%); border-bottom: 1px solid var(--line); }
.card-art .art { width: 200px; height: 150px; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-art .art { transform: scale(1.06) rotate(-2deg); }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; }
.card h3 { font-size: var(--fs-20); margin: 0 0 4px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand); }
.card .meta { font-size: var(--fs-14); color: var(--muted); margin: 0 0 14px; }
.link-list { list-style: none; padding: 0; margin: 0 0 16px; }
.link-list li { border-top: 1px solid var(--line); }
.link-list a { position: relative; display: block; padding: 9px 0 9px 18px; color: var(--ink-2); font-size: var(--fs-15); text-decoration: none; line-height: 1.4; }
.link-list a::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 6px; height: 6px; border-radius: 2px; background: var(--brand-200); transform: rotate(45deg); transition: background .15s; }
.link-list a:hover { color: var(--brand); }
.link-list a:hover::before { background: var(--accent); }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-weight: 650; font-size: var(--fs-15); text-decoration: none; }
.more svg { width: 16px; height: 16px; transition: transform .2s; }
.more:hover svg { transform: translateX(4px); }

.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.popular-list { list-style: none; padding: 0; margin: 0; counter-reset: pop; display: grid; gap: 10px; }
.popular-list li { counter-increment: pop; }
.popular-list a {
    position: relative; display: grid; grid-template-columns: 40px 1fr auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
    padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
    transition: border-color .15s, box-shadow .2s, transform .2s;
}
.popular-list a::before {
    content: counter(pop, decimal-leading-zero); grid-row: 1 / 3; display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--r); font: 700 var(--fs-14)/1 var(--font-display); letter-spacing: .02em;
    color: var(--brand); background: var(--brand-50);
}
.popular-list li:first-child a::before { color: #fff; background: linear-gradient(135deg, var(--accent) 0%, #ff8a3d 100%); }
.popular-list a:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); transform: translateX(3px); }
.p-title { grid-column: 2; font-weight: 650; line-height: 1.35; }
.p-meta { grid-column: 2; font-size: var(--fs-13); color: var(--muted); }
.p-go { grid-column: 3; grid-row: 1 / 3; width: 18px; height: 18px; color: var(--muted); transition: transform .2s, color .2s; }
.popular-list a:hover .p-go { color: var(--brand); transform: translateX(3px); }

.recent-list { list-style: none; padding: 0 0 0 4px; margin: 0; position: relative; }
.recent-list::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(var(--brand-200), transparent); border-radius: 2px; }
.recent-list li { position: relative; padding-left: 30px; }
.recent-list li::before { content: ""; position: absolute; left: 0; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.recent-list li:first-child::before { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.recent-list a { display: block; padding: 10px 12px; border-radius: var(--r); text-decoration: none; color: var(--ink); }
.recent-list a:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.r-title { display: block; font-weight: 600; line-height: 1.4; }
.r-meta { display: block; font-size: var(--fs-13); color: var(--muted); margin-top: 2px; }

/* ---- closing call to action ------------------------------------------------------------------------------------- */
.cta-band {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; align-items: center; gap: 36px;
    padding: 44px 48px; border-radius: var(--r-xl); color: #fff;
    background: radial-gradient(600px 300px at 100% 0%, rgba(124, 77, 255, .45), transparent 70%),
                radial-gradient(500px 300px at 0% 100%, rgba(255, 90, 54, .35), transparent 70%),
                linear-gradient(135deg, var(--navy-800) 0%, var(--navy-900) 100%);
    box-shadow: var(--shadow-lg);
    --art-bg: rgba(255, 255, 255, .07); --art-1: #3d8bf0; --art-3: #8bb8ff; --art-paper: #ffffff; --art-edge: #8bb8ff; --art-line: #8ea4c6;
}
.cta-glow { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); }
.cta-art .art { width: 180px; height: 135px; }
.cta-copy h2 { color: #fff; font-size: var(--fs-30); font-weight: 800; letter-spacing: -.025em; margin: 0 0 8px; }
.cta-copy p { color: #c9d5f0; margin: 0; max-width: 520px; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; }

/* ---- breadcrumbs and banners ------------------------------------------------------------------------------------ */
.crumbs ol { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: var(--fs-14); color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 10px; border-right: 1.5px solid var(--line-strong); border-top: 1.5px solid var(--line-strong); transform: rotate(45deg); flex: none; }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }

.page-banner, .article-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--banner-bg); border-bottom: 1px solid var(--line); }
.banner-glow { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(1, 83, 155, .09) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 90%); mask-image: linear-gradient(90deg, transparent 20%, #000 90%); }
@media (prefers-color-scheme: dark) { .banner-glow { background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px); } }
.banner-inner { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; align-items: center; padding-top: 36px; padding-bottom: 40px; }
.page-banner h1 { font-size: var(--fs-40); font-weight: 800; letter-spacing: -.03em; margin: 0 0 10px; }
.page-banner .lede { font-size: var(--fs-18); color: var(--ink-2); max-width: 640px; margin: 0; }
.banner-meta { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: var(--fs-14); font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; }
.banner-meta svg { width: 16px; height: 16px; color: var(--brand); }
.banner-art .art { width: 240px; height: 180px; display: block; }

/* ---- a section's article list ----------------------------------------------------------------------------------- */
.section-body { padding-top: 36px; padding-bottom: 80px; }
.list-filter { position: relative; max-width: 420px; margin: 0 0 20px; }
.list-filter > svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.list-filter input { width: 100%; height: 46px; padding: 0 92px 0 42px; font: inherit; font-size: var(--fs-15); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); }
.list-filter input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.filter-count { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: var(--fs-13); color: var(--muted); }
.filter-empty { padding: 18px 20px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--ink-2); background: var(--surface); }
.article-list { list-style: none; padding: 0; margin: 0 0 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.article-list li { min-width: 0; }
.article-list a { height: 100%; }
.article-list a {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 16px; align-items: center;
    padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
    text-decoration: none; color: var(--ink); box-shadow: var(--shadow-xs);
    transition: border-color .15s, box-shadow .2s, transform .2s;
}
.article-list a:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.al-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--brand-50); color: var(--brand); align-self: start; }
.al-icon svg { width: 22px; height: 22px; }
.al-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.article-list .t { font-weight: 650; font-size: var(--fs-17); line-height: 1.35; }
.article-list a:hover .t { color: var(--brand); }
.article-list .x { font-size: var(--fs-14); color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-list .d { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--fs-13); color: var(--muted); }
.al-go { width: 20px; height: 20px; color: var(--muted); transition: transform .2s, color .2s; }
.article-list a:hover .al-go { color: var(--brand); transform: translateX(3px); }

.empty-state { text-align: center; padding: 48px 24px; margin-bottom: 40px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty-state .art { width: 180px; height: 135px; }
.empty-state h2 { font-size: var(--fs-24); }
.empty-state p { color: var(--muted); }

.help-band {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center;
    padding: 26px 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.help-band-icon, .af-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); }
.help-band-icon svg, .af-icon svg { width: 26px; height: 26px; }
.help-band h2 { font-size: var(--fs-20); margin: 0 0 2px; }
.help-band p { color: var(--muted); margin: 0; }
.help-band .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- article ---------------------------------------------------------------------------------------------------- */
.read-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand) 0%, #7c4dff 50%, var(--accent) 100%); transform: scaleX(0); transform-origin: left; }
.article-hero .wrap { padding-top: 32px; padding-bottom: 34px; }
.article-hero h1 { font-size: var(--fs-40); font-weight: 800; letter-spacing: -.03em; max-width: 900px; margin: 0 0 16px; text-wrap: balance; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: var(--fs-14); color: var(--muted); }
.meta-item { display: inline-flex; align-items: center; gap: 6px; }
.meta-item svg { width: 16px; height: 16px; color: var(--brand); }
.meta-item time { text-decoration: underline dotted var(--line-strong); text-underline-offset: .25em; cursor: help; }

.layout-article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; padding-top: 40px; }
.layout-article.has-toc, .layout-article { grid-template-columns: minmax(0, 1fr) 280px; }
.article-main { min-width: 0; max-width: 780px; }
.article-aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: grid; gap: 18px; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding: 2px; }

.toc { padding: 18px 14px 18px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.toc h2, .side-card h2 { font-size: var(--fs-12); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { position: relative; display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: var(--fs-14); line-height: 1.4; color: var(--ink-2); text-decoration: none; transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--brand); }
.toc a.on { color: var(--brand); font-weight: 650; border-left-color: var(--accent); }
.toc-mobile { display: none; margin: 0 0 28px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.toc-mobile summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-weight: 650; cursor: pointer; list-style: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary svg { width: 18px; height: 18px; color: var(--brand); }
.toc-mobile summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.toc-mobile[open] summary::after { transform: rotate(-135deg); }
.toc-mobile ol { margin: 0; padding: 0 16px 14px 36px; }
.toc-mobile li { padding: 4px 0; }
.toc-mobile a { text-decoration: none; }

.side-card { padding: 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.side-card p { font-size: var(--fs-14); color: var(--ink-2); margin: 0 0 14px; }
.side-contact { background: linear-gradient(160deg, var(--accent-soft) 0%, var(--surface) 70%); border-color: var(--accent-line); }

/* the article body */
.prose { font-size: var(--fs-17); line-height: 1.75; color: var(--ink-2); overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2 { position: relative; font-size: var(--fs-24); font-weight: 750; margin: 2.2em 0 .7em; padding-top: 16px; color: var(--ink); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2::before { content: ""; position: absolute; left: 0; top: 0; width: 32px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.prose h3 { font-size: var(--fs-20); font-weight: 700; margin: 1.8em 0 .6em; color: var(--ink); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h4, .prose h5, .prose h6 { font-size: var(--fs-17); margin: 1.6em 0 .5em; color: var(--ink); }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose .table-wrap { margin: 0 0 1.15em; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin: .4em 0; padding-left: .25em; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose li > p { margin: 0 0 .6em; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { font-weight: 550; text-decoration-color: var(--brand-200); text-decoration-thickness: 2px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose a.external::after { content: "\2197"; display: inline-block; margin-left: 2px; font-size: .8em; text-decoration: none; }
.prose img { display: block; max-width: 100%; height: auto; margin: 16px 0; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow-md); background: #fff; }
.prose img.zoomable { cursor: zoom-in; transition: transform .2s, box-shadow .2s; }
.prose img.zoomable:hover { box-shadow: var(--shadow-lg); }
.prose img.zoomable:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.prose code { font-family: var(--mono); font-size: .88em; padding: .12em .4em; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.prose pre { padding: 16px 18px; border-radius: var(--r); background: var(--navy-900); color: #e6ecff; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose blockquote { padding: 14px 20px; border-left: 4px solid var(--brand); border-radius: 0 var(--r) var(--r) 0; background: var(--brand-50); color: var(--ink-2); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.5em 0; }
.prose p.callout {
    position: relative; padding: 16px 20px 16px 56px; border-radius: var(--r-md);
    background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--ink);
    font-size: var(--fs-16); line-height: 1.65;
}
.prose p.callout::before {
    content: "!"; position: absolute; left: 18px; top: 17px; width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font: 800 14px/1 var(--font-display); color: #fff; background: var(--accent-btn);
}
.prose p.callout em { font-style: normal; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); line-height: 1.5; }
.prose th, .prose td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); color: var(--ink); font-size: var(--fs-13); font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.prose tr:last-child td { border-bottom: 0; }

.lightbox { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1400px); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(5, 11, 31, .82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox figure { margin: 0; }
.lightbox img { display: block; max-width: min(96vw, 1400px); max-height: 86vh; width: auto; height: auto; border-radius: var(--r-md); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); background: #fff; cursor: zoom-out; }
.lightbox figcaption { margin-top: 10px; color: #e6ecff; font-size: var(--fs-14); text-align: center; }
.lightbox-close { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(5, 11, 31, .6); color: #fff; cursor: pointer; }
.lightbox-close:hover { background: rgba(5, 11, 31, .9); }
.lightbox-close svg { width: 20px; height: 20px; }
.lightbox[open] { animation: zoom-in .22s cubic-bezier(.2, .7, .2, 1); }
@keyframes zoom-in { from { opacity: 0; transform: scale(.96); } }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 48px 0 0; }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .2s; }
.pn:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); }
.pn-next { text-align: right; grid-column: 2; }
.pn-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-13); font-weight: 600; color: var(--muted); }
.pn-next .pn-label { justify-content: flex-end; }
.pn-label svg { width: 15px; height: 15px; }
.pn-title { font-weight: 650; line-height: 1.35; }
.pn:hover .pn-title { color: var(--brand); }

.article-foot {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center;
    margin: 28px 0 0; padding: 24px; border-radius: var(--r-lg);
    background: linear-gradient(135deg, var(--brand-50) 0%, var(--surface) 55%, var(--accent-soft) 100%); border: 1px solid var(--line);
}
.af-copy h2 { font-size: var(--fs-20); margin: 0 0 2px; }
.af-copy p { margin: 0; color: var(--ink-2); font-size: var(--fs-15); }

.related { padding: 64px 0 88px; }
.related h2 { font-size: var(--fs-24); margin: 0 0 20px; }
.related-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.related-grid a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.related-grid a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }
.rg-section { font-size: var(--fs-12); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.rg-title { font-weight: 650; line-height: 1.4; }
.rg-meta { margin-top: auto; display: inline-flex; align-items: center; justify-content: space-between; font-size: var(--fs-13); color: var(--muted); }
.rg-meta svg { width: 16px; height: 16px; color: var(--brand); transition: transform .2s; }
.related-grid a:hover .rg-meta svg { transform: translateX(4px); }

/* ---- the request form ------------------------------------------------------------------------------------------- */
.layout-form { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding-top: 36px; padding-bottom: 88px; }
.form-card { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.form-context { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; margin: 0 0 24px; border-radius: var(--r); background: var(--brand-50); border: 1px solid var(--brand-100); font-size: var(--fs-15); color: var(--ink-2); }
.form-context svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 1px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field { min-width: 0; }
.field label { display: flex; align-items: baseline; gap: 8px; margin: 0 0 7px; font-size: var(--fs-14); font-weight: 650; color: var(--ink); }
.field .opt { font-size: var(--fs-12); font-weight: 500; color: var(--muted); background: var(--surface-2); padding: 1px 8px; border-radius: 999px; }
.field .hint { margin-top: 6px; font-size: var(--fs-13); color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
    width: 100%; min-height: 48px; padding: 11px 14px;
    font: inherit; font-size: var(--fs-16); color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
    box-shadow: inset 0 1px 2px rgba(12, 29, 69, .04);
    transition: border-color .15s, box-shadow .15s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field textarea { min-height: 200px; resize: vertical; line-height: 1.6; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 42px; background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.field.invalid input, .field.invalid select, .field.invalid textarea, .field.invalid .drop { border-color: var(--error); background-color: var(--error-soft); }
.field .err { display: none; margin-top: 6px; font-size: var(--fs-13); font-weight: 600; color: var(--error); }
.field.invalid .err { display: flex; gap: 6px; }
.field.invalid .err::before { content: "!"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; background: var(--error); color: var(--surface); font-size: 11px; font-weight: 800; }
.counter { margin-left: auto; font-size: var(--fs-12); font-weight: 500; color: var(--muted); }
.drop {
    position: relative; display: block; text-align: center;
    padding: 24px 20px; border: 2px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface-2);
    color: var(--ink-2); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-50); }
.drop:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.drop svg { display: block; width: 30px; height: 30px; color: var(--brand); margin: 0 auto 8px; }
.drop strong { color: var(--ink); }
.drop .pick { color: var(--brand); font-weight: 650; text-decoration: underline; text-underline-offset: .2em; }
.drop small { display: block; margin: 6px auto 0; font-size: var(--fs-13); color: var(--muted); max-width: 460px; }
.drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.files { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.files:empty { display: none; }
.files li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-14); }
.files svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.files .n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 550; }
.files .z { color: var(--muted); font-size: var(--fs-13); flex: none; }
.files button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.files button:hover { background: var(--error-soft); color: var(--error); }
.files button svg { color: inherit; width: 16px; height: 16px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-actions p { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-14); color: var(--muted); }
.form-actions p svg { width: 18px; height: 18px; flex: none; }

.notice { display: flex; gap: 14px; padding: 16px 18px; margin: 0 0 20px; border-radius: var(--r-md); border: 1px solid; }
.notice:focus { outline: none; }
.notice:focus-visible { box-shadow: var(--ring); }
.notice > svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.notice strong { display: block; color: var(--ink); margin-bottom: 2px; }
.notice p { margin: 0; color: var(--ink-2); font-size: var(--fs-15); }
.notice p + p { margin-top: 10px; }
.notice ul { margin: 6px 0 0; padding-left: 1.2em; font-size: var(--fs-15); }
.notice a { font-weight: 600; }
.notice .notice-actions { margin-top: 14px; }
.notice-info { background: var(--brand-50); border-color: var(--brand-100); }
.notice-info > svg { color: var(--brand); }
.notice-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice-warn > svg { color: var(--warn); }
.notice-error { background: var(--error-soft); border-color: color-mix(in srgb, var(--error) 35%, transparent); }
.notice-error > svg, .notice-error a { color: var(--error); }

.form-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 18px; }
.side-steps { background: linear-gradient(170deg, var(--brand-50) 0%, var(--surface) 60%); border-color: var(--brand-100); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding: 0 0 20px 46px; font-size: var(--fs-14); color: var(--ink-2); line-height: 1.5; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font: 700 var(--fs-14)/1 var(--font-display);
    color: #fff; background: var(--brand-btn); box-shadow: 0 0 0 4px var(--brand-100);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 36px; bottom: 4px; width: 2px; background: var(--brand-100); border-radius: 2px; }
.steps strong { display: block; color: var(--ink); font-size: var(--fs-15); margin-bottom: 2px; }
.side-card ul.plain { list-style: none; padding: 0; margin: 0; font-size: var(--fs-14); color: var(--ink-2); }
.side-card ul.plain li { position: relative; padding: 6px 0 6px 18px; }
.side-card ul.plain li::before { content: ""; position: absolute; left: 2px; top: 1em; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.side-card ul.plain a { font-weight: 600; overflow-wrap: anywhere; }

/* ---- centred pages: received, moved, not found, error ----------------------------------------------------------- */
.center-card {
    position: relative; max-width: 660px; margin: 56px auto 88px; padding: 44px 40px 40px; text-align: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
.center-card::before { content: ""; position: absolute; left: 32px; right: 32px; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--brand), #7c4dff, var(--accent)); }
.center-art .art { width: 200px; height: 150px; }
.center-card h1 { font-size: var(--fs-30); font-weight: 800; letter-spacing: -.025em; margin: 6px 0 12px; }
.center-card > p { color: var(--ink-2); max-width: 520px; margin-left: auto; margin-right: auto; }
.center-card .actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.center-card .search-field { max-width: 460px; margin: 22px auto 0; text-align: left; }
.center-card .fine { margin: 22px 0 0; font-size: var(--fs-14); color: var(--muted); }
.ref { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-14); color: var(--ink-2); }
.ref strong { font-family: var(--mono); letter-spacing: .06em; color: var(--ink); }
.ticket-badge { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 6px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-ink); font-size: var(--fs-14); font-weight: 600; }
.ticket-badge svg { width: 18px; height: 18px; }
.ticket-badge strong { font-family: var(--mono); font-size: var(--fs-15); letter-spacing: .02em; }
.suggest { margin: 28px auto 0; max-width: 460px; text-align: left; }
.suggest h2 { font-size: var(--fs-12); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.suggest ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.suggest li { border-bottom: 1px solid var(--line); }
.suggest a { display: block; padding: 10px 2px; text-decoration: none; font-weight: 550; }
.suggest a:hover { text-decoration: underline; }

.celebrate { overflow: hidden; }
.success-mark { width: 92px; height: 92px; margin: 8px auto 10px; border-radius: 50%; background: var(--ok-soft); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px color-mix(in srgb, var(--ok-soft) 50%, transparent); }
.success-mark svg { width: 64px; height: 64px; }
.sm-ring { fill: none; stroke: var(--ok); stroke-width: 3; stroke-dasharray: 183; stroke-dashoffset: 0; }
.sm-check { fill: none; stroke: var(--ok); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 0; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: 120px; left: 50%; width: 8px; height: 14px; border-radius: 2px; opacity: 0; }
.confetti i:nth-child(3n+1) { background: var(--accent); }
.confetti i:nth-child(3n+2) { background: var(--brand); }
.confetti i:nth-child(3n+3) { background: var(--amber); width: 9px; height: 9px; border-radius: 50%; }
.mini-steps { list-style: none; padding: 0; margin: 26px auto 18px; display: flex; justify-content: center; gap: 8px; max-width: 520px; }
.mini-steps li { flex: 1 1 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: var(--fs-13); color: var(--muted); font-weight: 550; }
.mini-steps li:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 22px); right: calc(-50% + 18px); height: 2px; background: var(--line); }
.ms-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 2px solid var(--line); }
.ms-done { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.ms-done svg { width: 16px; height: 16px; stroke-width: 3; }

/* ---- footer ----------------------------------------------------------------------------------------------------- */
.site-footer { margin-top: auto; background: var(--surface); border-top: 1px solid var(--line); font-size: var(--fs-14); color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-top: 52px; padding-bottom: 36px; }
.footer-logo { display: inline-block; margin-bottom: 14px; }
.footer-logo img { width: 132px; display: block; }
.footer-brand p { max-width: 320px; margin: 0 0 14px; color: var(--ink-2); }
.footer-mail { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.footer-mail svg { width: 18px; height: 18px; flex: none; }
.footer-col h2 { font-size: var(--fs-12); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 6px 0 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--brand); text-decoration: underline; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 24px; border-top: 1px solid var(--line); font-size: var(--fs-13); }

/* ---- illustrations (Pages/Art.cs) ------------------------------------------------------------------------------- */
.art { display: inline-block; overflow: visible; }
.art .a-bg { fill: var(--art-bg); }
.art .a-1 { fill: var(--art-1); }
.art .a-2 { fill: var(--art-2); }
.art .a-3 { fill: var(--art-3); }
.art .a-paper { fill: var(--art-paper); }
.art .a-edge { stroke: var(--art-edge); stroke-width: 2.5; stroke-linejoin: round; }
.art .a-line { fill: none; stroke: var(--art-line); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.art .a-line-brand { stroke: var(--art-1); }
.art .a-route { fill: none; stroke: var(--art-2); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 8; }
.art .a-wave { fill: none; stroke: var(--art-2); stroke-width: 4; stroke-linecap: round; }
.art .a-mark { fill: none; stroke: var(--art-mark); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.art .a-mark-ink { stroke: var(--art-1); stroke-width: 3; }

/* ---- motion ----------------------------------------------------------------------------------------------------- */
.reveal-wait { opacity: 0; transform: translateY(16px); }
.reveal-wait.reveal-in { opacity: 1; transform: none; transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal-d1.reveal-in { transition-delay: 60ms; }
.reveal-d2.reveal-in { transition-delay: 120ms; }
.reveal-d3.reveal-in { transition-delay: 180ms; }
.hero-inner > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-inner > :nth-child(2) { animation-delay: 60ms; }
.hero-inner > :nth-child(3) { animation-delay: 120ms; }
.hero-inner > :nth-child(4) { animation-delay: 180ms; }
.hero-inner > :nth-child(5) { animation-delay: 240ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.success-mark { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.sm-ring { animation: draw 0.7s ease-out both; }
.sm-check { animation: draw-check .45s .45s ease-out both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: 183; } }
@keyframes draw-check { from { stroke-dashoffset: 40; } }
.confetti i { animation: burst 1.3s .25s cubic-bezier(.15, .7, .3, 1) forwards; }
.confetti i:nth-child(1) { --dx: -190px; --dy: -80px; --r: 260deg; }
.confetti i:nth-child(2) { --dx: -150px; --dy: 40px; --r: -200deg; }
.confetti i:nth-child(3) { --dx: -110px; --dy: -110px; --r: 320deg; }
.confetti i:nth-child(4) { --dx: -70px; --dy: 70px; --r: -280deg; }
.confetti i:nth-child(5) { --dx: -40px; --dy: -120px; --r: 180deg; }
.confetti i:nth-child(6) { --dx: 30px; --dy: -130px; --r: -240deg; }
.confetti i:nth-child(7) { --dx: 60px; --dy: 80px; --r: 300deg; }
.confetti i:nth-child(8) { --dx: 100px; --dy: -100px; --r: -320deg; }
.confetti i:nth-child(9) { --dx: 140px; --dy: 50px; --r: 220deg; }
.confetti i:nth-child(10) { --dx: 180px; --dy: -60px; --r: -180deg; }
.confetti i:nth-child(11) { --dx: 210px; --dy: 20px; --r: 280deg; }
.confetti i:nth-child(12) { --dx: -220px; --dy: 10px; --r: -300deg; }
@keyframes burst {
    0% { opacity: 1; transform: translate(-50%, 0) rotate(0); }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(var(--dy) + 90px)) rotate(var(--r)); }
}

/* ---- responsive ------------------------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .layout-article, .layout-article.has-toc { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .article-main { max-width: 780px; margin: 0 auto; width: 100%; }
    .article-aside { position: static; max-height: none; overflow: visible; max-width: 780px; margin: 32px auto 0; width: 100%; }
    .article-aside .toc { display: none; }
    .toc-mobile { display: block; }
    .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .orbit { right: -260px; opacity: .6; }
}
@media (max-width: 980px) {
    .tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: minmax(0, 1fr); gap: 48px; }
    .article-list { grid-template-columns: minmax(0, 1fr); }
    .cta-band { grid-template-columns: minmax(0, 1fr) auto; padding: 36px; }
    .cta-art { display: none; }
    .layout-form { grid-template-columns: minmax(0, 1fr); }
    .form-aside { position: static; grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    :root { --header-h: 60px; }
    .wrap { padding-left: 16px; padding-right: 16px; }
    .brand img { width: 118px; }
    .brand-tag { display: none; }
    .header-search { display: none; }
    .nav-link { display: none; }
    .icon-btn { display: inline-flex; }
    .site-nav { margin-left: auto; }
    .hero { padding: 48px 0 108px; }
    .hero-compact { padding: 36px 0 40px; }
    .hero-compact h1 { margin-bottom: 18px; }
    .hero .lede { margin-bottom: 26px; }
    .orbit { width: 460px; height: 460px; right: -240px; top: -40px; opacity: .45; }
    .search-xl { min-height: 60px; padding: 6px 6px 6px 16px; border-radius: 16px; }
    .search-xl input { font-size: var(--fs-16); height: 48px; }
    .search-xl .kbd { display: none; }
    .search-go { min-height: 48px; padding: 0 16px; }
    .topics-label { width: 100%; }
    .tasks-band { margin-top: -64px; }
    .cards { grid-template-columns: minmax(0, 1fr); }
    .card-art { height: 140px; }
    .page-section { padding: 56px 0; }
    .page-section-tint { padding: 48px 0 !important; }
    .page-section-tint + .page-section { padding-top: 56px; }
    .section-title { margin-bottom: 28px; }
    .cta-band { grid-template-columns: minmax(0, 1fr); padding: 28px 22px; gap: 22px; border-radius: var(--r-lg); }
    .cta-actions { flex-direction: column; }
    .cta-actions .btn { width: 100%; }
    .banner-inner { grid-template-columns: minmax(0, 1fr); padding-top: 24px; padding-bottom: 28px; }
    .banner-art { display: none; }
    .crumbs [aria-current] { max-width: 22ch; }
    .article-hero .wrap { padding-top: 22px; padding-bottom: 26px; }
    .layout-article { padding-top: 28px; }
    .prose { font-size: var(--fs-16); line-height: 1.72; }
    .prose h2 { font-size: var(--fs-20); }
    .prose h3 { font-size: var(--fs-18); }
    .prose p.callout { padding: 14px 16px 14px 48px; }
    .prose p.callout::before { left: 14px; top: 15px; }
    .prev-next { grid-template-columns: minmax(0, 1fr); }
    .pn-next { grid-column: 1; }
    .article-foot, .help-band { grid-template-columns: minmax(0, 1fr); text-align: left; padding: 22px; }
    .article-foot .btn, .help-band .actions .btn { width: 100%; }
    .help-band .actions { flex-direction: column; }
    .related { padding: 48px 0 64px; }
    .related-grid { grid-template-columns: minmax(0, 1fr); }
    .form-card { padding: 22px 18px; border-radius: var(--r-md); }
    .form-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .form-actions { flex-direction: column-reverse; align-items: stretch; }
    .form-actions .btn { width: 100%; }
    .form-aside { grid-template-columns: minmax(0, 1fr); }
    .layout-form { padding-top: 24px; padding-bottom: 56px; }
    .center-card { margin: 28px auto 56px; padding: 32px 20px 28px; border-radius: var(--r-lg); }
    .center-card .actions { flex-direction: column; }
    .center-card .actions .btn { width: 100%; white-space: normal; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 40px; }
    .results-page { padding-top: 22px; }
    .result a { grid-template-columns: minmax(0, 1fr); }
    .result .s { grid-column: 1; grid-row: auto; justify-self: start; }
    .article-list a { grid-template-columns: minmax(0, 1fr) 18px; padding: 16px; gap: 12px; }
    .al-icon { display: none; }
    .list-filter { max-width: none; }
}
@media (max-width: 480px) {
    .tasks { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .task a { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 14px; padding: 16px; }
    .task-icon { grid-row: 1 / 4; margin: 0; }
    .task-blurb { margin-bottom: 8px; }
    .search-go { display: none; }
    .btn-sm { padding: 0 12px; }
    .mini-steps li { font-size: var(--fs-12); }
}
@media (max-width: 380px) {
    .brand img { width: 104px; }
    .site-nav .btn-sm { padding: 0 10px; font-size: var(--fs-13); }
}

/* ---- reduced motion: everything still, nothing hidden ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .aurora span { animation: none !important; }
    .orbit-dot-moving { display: none; }
    .orbit-dot-static { display: inline; }
    .confetti { display: none; }
    .reveal-wait { opacity: 1; transform: none; }
    .task a:hover, .card:hover, .related-grid a:hover, .article-list a:hover, .popular-list a:hover, .btn-accent:hover, .chip:hover { transform: none; }
}

/* ---- print: the article, plainly -------------------------------------------------------------------------------- */
@media print {
    .site-header, .site-footer, .article-aside, .toc-mobile, .article-foot, .prev-next, .related, .read-progress, .skip, .crumbs, .banner-glow { display: none !important; }
    body { background: #fff; color: #000; }
    .article-hero, .page-banner { background: none; border: 0; }
    .layout-article { display: block; padding: 0; }
    .prose { color: #000; font-size: 11pt; }
    .prose img { box-shadow: none; max-width: 80%; }
    .prose a.external::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
