/**
 * SAIF — main.css (v3 "console")
 * Saif Alislam · WordPress Engineering — precision-instrument design system.
 * Light-first engineering console: white/paper surfaces, ink anchors,
 * hairline separation, one gold accent, mono technical annotations.
 * Inspiration: contemporary Chinese tech product systems (see
 * RESEARCH-AND-DESIGN-DIRECTION.md) — recombined, not copied.
 *
 * 01 Tokens · 02 Fonts · 03 Reset · 04 Base type · 05 Utilities
 * 06 Layout · 07 Header/Nav · 08 Buttons · 09 Forms · 10 Footer
 */

/* ============ 01 TOKENS ============ */
:root {
        /* Light surfaces — console white */
        --paper: #FFFFFF;
        --paper-2: #F5F6F8;
        --paper-3: #EDF0F4;

        /* Ink surfaces — two dark anchors (process, footer) */
        --ink-950: #060C18;
        --ink-900: #0B1526;
        --ink-850: #0E1B33;
        --ink-800: #12233E;

        /* Foreground on light */
        --fg: #101B2E;
        --fg-muted: #4C5A70;
        --fg-faint: #6E7E96;

        /* Foreground on ink */
        --on-ink: #E9EEF6;
        --on-ink-muted: #93A2BC;
        --on-ink-faint: #6B7FA0;

        /* Hairlines */
        --line: #E3E6EB;
        --line-strong: #C9CFD8;
        --line-ink: #1C2B47;

        /* Brand accents */
        --gold: #E4C059;        /* accent on ink */
        --gold-soft: #F1D98D;
        --gold-ink: #8A6914;    /* AA accent text on light */
        --cobalt: #2E5FB8;      /* links on light */

        /* Status */
        --ok: #2E7D4F;
        --warn: #B75D0B;
        --red: #C0392B;

        /* Type */
        --font-sans: "Inter var", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        --font-mono: "JetBrains Mono var", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

        /* Fluid type scale */
        --fs-0: 0.75rem;    /* 12 mono meta */
        --fs-1: 0.8125rem;  /* 13 */
        --fs-2: 0.9375rem;  /* 15 */
        --fs-3: 1.0625rem;  /* 17 body */
        --fs-4: 1.25rem;    /* 20 */
        --fs-5: clamp(1.25rem, 2.4vw, 1.5rem);        /* 24 */
        --fs-6: clamp(1.5rem, 3vw, 1.875rem);         /* 30 */
        --fs-7: clamp(2.125rem, 4.6vw, 3.25rem);      /* hero */

        /* Space (4px base) */
        --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
        --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
        --sp-9: 96px; --sp-10: 128px;

        /* Layout */
        --max-w: 1280px;
        --content-w: 720px;
        --gutter: clamp(20px, 4vw, 44px);
        --header-h: 64px;

        /* Radius — instrument-sharp */
        --r-1: 2px;
        --r-2: 4px;
        --r-3: 8px;

        /* Motion */
        --t-fast: 140ms;
        --t-med: 240ms;
        --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============ 02 FONTS ============ */
@font-face {
        font-family: "Inter var";
        src: url("../fonts/inter-var.woff2") format("woff2");
        font-weight: 100 900;
        font-style: normal;
        font-display: swap;
}
@font-face {
        font-family: "JetBrains Mono var";
        src: url("../fonts/jbmono-var.woff2") format("woff2");
        font-weight: 100 800;
        font-style: normal;
        font-display: swap;
}

/* ============ 03 RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
        background: var(--paper);
        color: var(--fg);
        font-family: var(--font-sans);
        font-size: var(--fs-3);
        line-height: 1.65;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--gold); color: var(--ink-950); }
:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; border-radius: var(--r-1); }
.surface-ink :focus-visible, .on-ink :focus-visible { outline-color: var(--gold); }

.skip-link {
        position: absolute; left: -9999px; top: 0; z-index: 1000;
        background: var(--gold); color: var(--ink-950);
        padding: 12px 20px; font-family: var(--font-mono);
        font-size: var(--fs-1); font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ============ 04 BASE TYPE ============ */
h1, h2, h3, h4, h5, h6 {
        font-weight: 740;
        letter-spacing: -0.025em;
        line-height: 1.1;
        text-wrap: balance;
}
h1 { font-size: var(--fs-7); }
h2 { font-size: var(--fs-6); }
h3 { font-size: var(--fs-5); }
h4 { font-size: var(--fs-4); font-weight: 700; }
h5, h6 { font-size: var(--fs-3); font-weight: 680; }

p { max-width: 70ch; }
.lede { font-size: var(--fs-4); line-height: 1.55; color: var(--fg-muted); }
.surface-ink .lede, .lede--on-ink { color: var(--on-ink-muted); }

a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--fg); }
.surface-ink a { color: var(--gold); }
.surface-ink a:hover { color: var(--gold-soft); }

code, kbd, samp { font-family: var(--font-mono); font-size: 0.875em; }
:not(pre) > code {
        background: var(--paper-2);
        border: 1px solid var(--line);
        border-radius: var(--r-1);
        padding: 0.08em 0.4em;
        white-space: nowrap;
}
pre {
        background: var(--ink-900);
        color: #C9D4E6;
        padding: var(--sp-5) var(--sp-6);
        border-radius: var(--r-2);
        border: 1px solid var(--line-ink);
        overflow-x: auto;
        line-height: 1.6;
        font-size: 0.875rem;
}
pre code { background: none; border: 0; padding: 0; color: inherit; white-space: pre; }

blockquote {
        border-left: 2px solid var(--gold-ink);
        padding: var(--sp-1) 0 var(--sp-1) var(--sp-5);
        margin: var(--sp-6) 0;
        font-size: var(--fs-4);
        line-height: 1.5;
        color: var(--fg);
}

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-7) 0; }
.surface-ink hr { border-top-color: var(--line-ink); }

table { font-size: var(--fs-2); }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th {
        font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 560;
        letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted);
        background: var(--paper-2);
}

/* ============ 05 UTILITIES ============ */
.mono-label {
        font-family: var(--font-mono);
        font-size: 0.6875rem;
        font-weight: 560;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--fg-muted);
}
.surface-ink .mono-label, .on-ink .mono-label { color: var(--on-ink-muted); }
.mono-label--gold { color: var(--gold-ink); }
.surface-ink .mono-label--gold, .on-ink .mono-label--gold { color: var(--gold); }
/* Legacy alias — plugin markup still emits --green */
.mono-label--green { color: var(--gold-ink); }
.surface-ink .mono-label--green, .on-ink .mono-label--green { color: var(--gold); }

.section-index {
        display: inline-flex; align-items: center; gap: 12px;
        font-family: var(--font-mono); font-size: 0.6875rem;
        letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-muted);
}
.section-index::before { content: ""; width: 32px; height: 1px; background: var(--gold-ink); }
.surface-ink .section-index, .on-ink .section-index { color: var(--on-ink-muted); }
.surface-ink .section-index::before, .on-ink .section-index::before { background: var(--gold); }

.container { max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(var(--content-w) + var(--gutter) * 2); }
.section { padding-block: clamp(var(--sp-7), 7vw, var(--sp-9)); }
.section--rule { border-top: 1px solid var(--line); }
.surface-ink { background: var(--ink-900); color: var(--on-ink); }
.surface-ink h1, .surface-ink h2, .surface-ink h3 { color: var(--on-ink); }
.surface-paper-2 { background: var(--paper-2); }

.section-head {
        display: flex; flex-wrap: wrap; align-items: flex-end;
        justify-content: space-between; gap: var(--sp-4) var(--sp-5);
        margin-bottom: clamp(var(--sp-5), 4vw, var(--sp-7));
}
.section-head__lede { color: var(--fg-muted); max-width: 52ch; }
.surface-ink .section-head__lede { color: var(--on-ink-muted); }

/* Section opener — asymmetric: numeral rail left, title + lede right */
.sec-head {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
        gap: var(--sp-5) var(--sp-6);
        align-items: end;
        margin-bottom: clamp(var(--sp-6), 4vw, var(--sp-8));
}
.sec-head__no {
        font-family: var(--font-mono);
        font-size: clamp(2.25rem, 4vw, 3.5rem);
        font-weight: 300;
        line-height: 0.9;
        color: var(--line-strong);
        letter-spacing: -0.04em;
        font-variant-numeric: tabular-nums;
}
.surface-ink .sec-head__no { color: var(--line-ink); }
.sec-head__title h2 { margin-top: var(--sp-3); }
.sec-head__lede { color: var(--fg-muted); align-self: end; }
.surface-ink .sec-head__lede { color: var(--on-ink-muted); }
@media (max-width: 900px) {
        .sec-head { grid-template-columns: auto minmax(0, 1fr); }
        .sec-head__lede { grid-column: 2; }
}

/* Aspect media frame */
.media-frame { position: relative; overflow: hidden; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--paper-2); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.ratio-16-10 { aspect-ratio: 16 / 10; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-1-1 { aspect-ratio: 1 / 1; }

/* Descriptions panel — spec rows on hairlines (signature component) */
.spec { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--paper); }
.spec__head {
        display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
        padding: 12px 18px; border-bottom: 1px solid var(--line);
        background: var(--paper-2); border-radius: var(--r-2) var(--r-2) 0 0;
}
.spec dl { margin: 0; padding: var(--sp-2) 0; }
.spec-row {
        display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4);
        padding: 10px 18px;
}
.spec-row + .spec-row { border-top: 1px solid var(--line); }
.spec-row dt { color: var(--fg-muted); font-size: var(--fs-2); }
.spec-row dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.spec-row dd.ok { color: var(--ok); }
.spec-row dd.gold { color: var(--gold-ink); }
.surface-ink .spec { border-color: var(--line-ink); background: var(--ink-850); }
.surface-ink .spec__head { background: var(--ink-800); border-bottom-color: var(--line-ink); }
.surface-ink .spec-row + .spec-row { border-top-color: var(--line-ink); }
.surface-ink .spec-row dt { color: var(--on-ink-muted); }
.surface-ink .spec-row dd { color: var(--on-ink); }
.surface-ink .spec-row dd.ok { color: #6FCF97; }
.surface-ink .spec-row dd.gold { color: var(--gold); }

/* Chips & badges */
.chip {
        display: inline-flex; align-items: center; gap: 6px;
        font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 560;
        letter-spacing: 0.1em; text-transform: uppercase;
        color: var(--fg-muted);
        border: 1px solid var(--line-strong);
        border-radius: var(--r-1);
        padding: 4px 10px;
        background: var(--paper);
}
.chip--ok { color: var(--ok); border-color: currentColor; }
.chip--gold { color: var(--gold-ink); border-color: currentColor; }
.chip--ink { color: var(--fg); border-color: var(--fg); }
.surface-ink .chip { color: var(--on-ink-muted); border-color: var(--line-ink); background: transparent; }
.surface-ink .chip--ok { color: #6FCF97; }
.surface-ink .chip--gold { color: var(--gold); }
/* Legacy alias */
.pill {
        display: inline-flex; align-items: center; gap: 6px;
        font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 560;
        letter-spacing: 0.1em; text-transform: uppercase;
        color: var(--fg-muted); border: 1px solid var(--line-strong);
        border-radius: var(--r-1); padding: 4px 10px; background: var(--paper);
        text-decoration: none;
}
.pill--green { color: var(--ok); border-color: currentColor; }
.pill--gold { color: var(--gold-ink); border-color: currentColor; }

/* ============ 06 LAYOUT ============ */
.site-main { min-height: 55vh; }
.grid { display: grid; gap: var(--sp-5); }
.grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(var(--sp-6), 5vw, var(--sp-8)); align-items: start; }
.split--reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 920px) {
        .grid--cols-2, .grid--cols-3 { grid-template-columns: 1fr; }
        .split, .split--reverse { grid-template-columns: 1fr; }
}

/* ============ 07 HEADER / NAV ============ */
.topbar {
        background: var(--ink-950); color: var(--on-ink-faint);
        border-bottom: 1px solid var(--line-ink);
        font-family: var(--font-mono); font-size: 0.6875rem;
        letter-spacing: 0.1em; text-transform: uppercase;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 34px; gap: var(--sp-4); }
.topbar a { color: var(--on-ink-faint); text-decoration: none; white-space: nowrap; }
.topbar a:hover, .topbar a:focus-visible { color: var(--gold); }
.topbar__status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: none; }
.topbar__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
@media (prefers-reduced-motion: no-preference) {
        .topbar__dot { animation: pulse-dot 2.4s var(--ease-out) infinite; }
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (max-width: 560px) {
        .topbar__text { font-size: 0.625rem; }
        .topbar__inner { gap: var(--sp-3); }
}

.site-header {
        position: sticky; top: 0; z-index: 200;
        background: color-mix(in srgb, var(--paper) 94%, transparent);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--line);
        transition: box-shadow var(--t-med) var(--ease-out);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line-strong), 0 8px 24px rgb(11 21 38 / 0.06); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand__link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: none; border-radius: 50%; }
.brand__wordmark { height: 26px; width: auto; display: block; }
.brand__wordmark--reversed { height: 24px; width: auto; display: block; }

.primary-nav ul { display: flex; align-items: center; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.primary-nav li { position: relative; }
.primary-nav a {
        display: block; padding: 10px 12px;
        color: var(--fg-muted); text-decoration: none;
        font-size: 0.9375rem; font-weight: 520; line-height: 1.2;
        transition: color var(--t-fast) var(--ease-out);
}
.primary-nav a:hover { color: var(--fg); }
/* Active page — 2px gold underline (TDesign-style nav indicator) */
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .current-menu-ancestor > a,
.primary-nav .current_page_ancestor > a { color: var(--fg); }
.primary-nav .current-menu-item > a::after,
.primary-nav .current_page_item > a::after,
.primary-nav .current-menu-ancestor > a::after,
.primary-nav .current_page_ancestor > a::after {
        content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
        height: 2px; background: var(--gold);
}
.primary-nav .sub-menu {
        position: absolute; top: 100%; left: 0; z-index: 50;
        min-width: 264px; padding: var(--sp-2);
        background: var(--paper); border: 1px solid var(--line);
        border-radius: var(--r-3); box-shadow: 0 12px 32px rgb(11 21 38 / 0.10);
        list-style: none; margin: 0;
        opacity: 0; visibility: hidden; transform: translateY(6px);
        transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out), visibility 0s var(--t-fast);
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
        opacity: 1; visibility: visible; transform: translateY(0);
        transition-delay: 0s;
}
.primary-nav .sub-menu a { font-size: 0.875rem; padding: 10px 12px; border-radius: var(--r-2); color: var(--fg-muted); }
.primary-nav .sub-menu a:hover { color: var(--fg); background: var(--paper-2); }

.nav-cta { display: inline-flex; align-items: center; gap: var(--sp-3); }
.menu-toggle { display: none; }

/* Mobile nav panel */
@media (max-width: 920px) {
        .menu-toggle {
                display: inline-flex; align-items: center; gap: 8px;
                font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
                letter-spacing: 0.12em; text-transform: uppercase;
                color: var(--fg); border: 1px solid var(--line-strong);
                border-radius: var(--r-2); padding: 9px 14px;
                background: var(--paper);
        }
        .menu-toggle:hover { border-color: var(--fg); }
        .primary-nav {
                display: none;
                position: absolute; top: 100%; left: 0; right: 0;
                background: var(--paper);
                border-bottom: 1px solid var(--line);
                box-shadow: 0 24px 48px rgb(11 21 38 / 0.10);
        }
        .primary-nav.is-open { display: block; }
        .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: var(--sp-2) var(--gutter) var(--sp-4); }
        .primary-nav li { border-top: 1px solid var(--line); }
        .primary-nav li:first-child { border-top: 0; }
        .primary-nav a { display: flex; align-items: baseline; gap: 14px; padding: 15px 2px; font-size: 1.0625rem; color: var(--fg); }
        .primary-nav a:hover { background: transparent; }
        .primary-nav .current-menu-item > a::after,
        .primary-nav .current_page_item > a::after,
        .primary-nav .current-menu-ancestor > a::after,
        .primary-nav .current_page_ancestor > a::after { display: none; }
        .primary-nav .current-menu-item > a,
        .primary-nav .current_page_item > a { box-shadow: inset 3px 0 0 var(--gold); padding-left: 12px; }
        .primary-nav .sub-menu {
                position: static; opacity: 1; visibility: visible; transform: none;
                border: 0; box-shadow: none; padding: 0 0 6px 28px; min-width: 0;
                background: transparent;
        }
}
html.nav-open { overflow: hidden; }

/* ============ 08 BUTTONS ============ */
.btn {
        display: inline-flex; align-items: center; justify-content: center; gap: 10px;
        padding: 12px 24px; border: 1px solid transparent; border-radius: var(--r-2);
        font-size: 0.9375rem; font-weight: 620; letter-spacing: -0.01em;
        text-decoration: none; white-space: nowrap;
        transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
/* Primary — flat brand gold, no gradient */
.btn--primary { background: var(--gold); color: var(--ink-950); }
.btn--primary:hover { background: var(--gold-soft); color: var(--ink-950); }
/* Ink — filled console action */
.btn--ink { background: var(--ink-900); color: var(--on-ink); }
.btn--ink:hover { background: var(--ink-800); color: var(--on-ink); }
.btn--ghost { border-color: var(--line-strong); color: var(--fg); background: transparent; }
.btn--ghost:hover { border-color: var(--fg); }
.surface-ink .btn--ghost, .on-ink .btn--ghost { border-color: var(--line-ink); color: var(--on-ink); }
.surface-ink .btn--ghost:hover, .on-ink .btn--ghost:hover { border-color: var(--gold); color: var(--gold-soft); }
/* Legacy alias — plugin markup emits btn--green */
.btn--green { background: var(--gold); color: var(--ink-950); }
.btn--green:hover { background: var(--gold-soft); color: var(--ink-950); }
.btn--small { padding: 9px 16px; font-size: 0.875rem; }
.btn--block { width: 100%; }

.text-link {
        display: inline-flex; align-items: center; gap: 8px;
        font-weight: 580; font-size: 0.9375rem; color: var(--cobalt); text-decoration: none;
}
.text-link::after { content: "\2192"; transition: transform var(--t-fast) var(--ease-out); }
.text-link:hover { color: var(--fg); }
.text-link:hover::after { transform: translateX(4px); }
.surface-ink .text-link, .on-ink .text-link { color: var(--gold); }
.surface-ink .text-link:hover, .on-ink .text-link:hover { color: var(--gold-soft); }

/* ============ 09 FORMS ============ */
.field { margin-bottom: var(--sp-5); }
.field label { display: block; font-weight: 620; font-size: 0.9375rem; margin-bottom: 6px; }
.field .req { color: var(--gold-ink); font-weight: 700; }
.field .opt-mark { color: var(--fg-faint); font-weight: 480; font-size: 0.8125rem; }
.field .hint { font-size: 0.8125rem; color: var(--fg-muted); margin-top: 6px; }
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], select, textarea {
        width: 100%; background: var(--paper);
        border: 1px solid var(--line-strong); border-radius: var(--r-2);
        padding: 12px 14px; font-size: 1rem; line-height: 1.5;
        transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.surface-ink input[type="text"], .surface-ink input[type="email"], .surface-ink input[type="password"],
.surface-ink select, .surface-ink textarea {
        background: var(--ink-850); border-color: var(--line-ink); color: var(--on-ink);
}
textarea { min-height: 140px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--fg-faint); }
input:focus, select:focus, textarea:focus {
        outline: none; border-color: var(--gold-ink);
        box-shadow: 0 0 0 3px rgb(228 192 89 / 0.28);
}
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: var(--red); }
.field__error { color: var(--red); font-size: 0.8125rem; margin-top: 6px; }
/* Legacy alias */
.field--error input, .field--error textarea, .field--error select { border-color: var(--red); }

/* ============ 10 FOOTER ============ */
.site-footer { background: var(--ink-950); color: var(--on-ink); border-top: 1px solid var(--line-ink); }
.site-footer a { color: var(--on-ink-muted); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--gold); }
.footer__top {
        display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        gap: clamp(var(--sp-6), 5vw, var(--sp-8));
        padding-block: clamp(var(--sp-7), 6vw, var(--sp-9)) var(--sp-7);
}
.footer__brand p { color: var(--on-ink-muted); font-size: var(--fs-2); max-width: 44ch; margin-top: var(--sp-4); }
.footer__meta { margin-top: var(--sp-5); display: grid; gap: 0; border-top: 1px solid var(--line-ink); max-width: 420px; }
.footer__meta-row {
        display: flex; justify-content: space-between; gap: var(--sp-4);
        padding: 9px 0; border-bottom: 1px solid var(--line-ink);
        font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase;
        color: var(--on-ink-faint);
}
.footer__meta-row dd { margin: 0; color: var(--on-ink-muted); }
.footer__meta-row dt, .footer__meta-row dd { display: block; }
.footer__action {
        border: 1px solid var(--line-ink); border-radius: var(--r-3);
        padding: clamp(var(--sp-5), 3vw, var(--sp-6));
        background: var(--ink-900);
}
.footer__action h3 { margin-bottom: var(--sp-2); }
.footer__action p { color: var(--on-ink-muted); font-size: var(--fs-2); }
.footer__action .btn-row { margin-top: var(--sp-5); }

.footer__nav {
        display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--sp-6);
        padding-block: var(--sp-7);
        border-top: 1px solid var(--line-ink);
}
.footer__col h4 {
        font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 560;
        letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-ink-faint);
        margin-bottom: var(--sp-4);
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__col a { font-size: var(--fs-2); }

.footer__bottom {
        border-top: 1px solid var(--line-ink); padding-block: var(--sp-5);
        display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; justify-content: space-between;
        font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; color: var(--on-ink-faint);
}
.footer__bottom a { color: var(--on-ink-faint); }
.footer__bottom a:hover { color: var(--gold); }
@media (max-width: 920px) {
        .footer__top { grid-template-columns: 1fr; }
        .footer__nav { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
        .footer__nav { grid-template-columns: 1fr; }
}

/* ============ 11 ACCESSIBILITY & UTILITIES ============ */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }
.result-list { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: grid; gap: 8px; }
.result-list li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-2); color: var(--fg-muted); }
.result-list li:not(:has(svg))::before { content: "\2713"; color: var(--gold-ink); font-weight: 700; flex: 0 0 auto; }
.result-list li svg { color: var(--gold-ink); flex: none; margin-top: 4px; }
.surface-ink .result-list li { color: var(--on-ink-muted); }
.surface-ink .result-list li svg { color: var(--gold); }

.icon { flex: none; }

/* Reveal-on-scroll (JS adds .is-in; base state only when JS present) */
html.js .reveal { opacity: 0; transform: translateY(8px); transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out); }
html.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
        html { scroll-behavior: auto; }
        html.js .reveal { opacity: 1; transform: none; transition: none; }
        .topbar__dot { animation: none; }
        *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
