/* ============================================================================
   SYN//ARCHIVE — sitewide theme layer (v2.0 experimental)
   ----------------------------------------------------------------------------
   Loads AFTER css/style.css on every page and re-skins the site:
     1. Tokens & typography        5. File-strip page headers
     2. Base element overrides     6. Cards, tiles & panels
     3. Header / navigation        7. Footer
     4. Hero (home)                8. Utilities, motion & responsive
   Old component styles (news crawl, timeline, map) keep working; this layer
   re-themes them through the CSS variables they already consume.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. TOKENS */
:root {
    /* Core surfaces */
    --ink-0: #04050c;
    --ink-1: #0b0e1c;
    --panel: rgba(13, 16, 30, 0.82);
    --panel-soft: rgba(255, 255, 255, 0.045);
    --line: rgba(151, 161, 186, 0.22);
    --line-soft: rgba(151, 161, 186, 0.12);

    /* Voice */
    --bone: #f1f3fa;
    --ash: #98a1ba;

    /* Brand neon */
    --sin: #ff3d8f;        /* primary — the city's namesake */
    --signal: #45d6ff;     /* secondary — network cyan */
    --gilt: #e9c46a;       /* gold — wealth, sin, Goldcrest */

    /* Clearance ramp (Protocol pacing: Utility → Field → Lab) */
    --clr-utility: #4fd6c4;
    --clr-field: #e9c46a;
    --clr-lab: #ff3d8f;

    /* District spectrum (true to the six districts) */
    --d-green: #3fc888;
    --d-blue: #5fa8d3;
    --d-gray: #8aa2b1;
    --d-red: #d75a60;
    --d-white: #f1f1f1;
    --d-gold: #e6c565;

    /* Type roles */
    --font-display: 'Chakra Petch', 'Orbitron', sans-serif;
    --font-body: 'Archivo', 'Poppins', Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
    --titleFont: var(--font-display);

    /* Remap the legacy palette so older components inherit the new look */
    --primary-color: var(--sin);
    --secondary-color: var(--signal);
    --bg-color: var(--ink-0);
    --text-color: var(--bone);
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-hover: rgba(255, 255, 255, 0.07);

    /* Layout */
    --head-h: 64px;
    --wrap: 1180px;
    --radius: 10px;

    /* Per-page accent (overridden by body classes below) */
    --page-accent: var(--signal);
}

/* Page accents — each archive file carries its district/section hue */
body.home-page                { --page-accent: var(--sin); }
body.history-page             { --page-accent: var(--gilt); --primary-color: var(--gilt); --secondary-color: var(--signal); }
body.geography-page           { --page-accent: var(--d-green); }
body.factions-page            { --page-accent: var(--signal); }
body.corporations-page        { --page-accent: var(--signal); }
body.gangs-page               { --page-accent: var(--sin); }
body.life-page                { --page-accent: #b16be2; }
body.races-page               { --page-accent: var(--d-white); }
body.wonders-page             { --page-accent: var(--gilt); }
body.green-district-page      { --page-accent: var(--d-green); }
body.blue-district-page       { --page-accent: var(--d-blue); }
body.gray-district-page       { --page-accent: var(--d-gray); }
body.red-district-page        { --page-accent: var(--d-red); }
body.white-district-page      { --page-accent: var(--d-white); }
body.gold-district-page       { --page-accent: var(--d-gold); }
body.traits-cybernetics-page  { --page-accent: var(--clr-lab); }
body.protocol-page            { --page-accent: var(--signal); }
body.protocol-page.grade-utility { --page-accent: var(--clr-utility); }
body.protocol-page.grade-field   { --page-accent: var(--clr-field); }
body.protocol-page.grade-lab     { --page-accent: var(--clr-lab); }

/* ----------------------------------------------------- 2. BASE OVERRIDES */
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    letter-spacing: 0.005em;
}

/* Deepen the backdrop tint for legibility over the city art */
body::after {
    background:
        linear-gradient(180deg, rgba(4, 5, 12, 0.78), rgba(4, 5, 12, 0.9) 38%, rgba(4, 5, 12, 0.96));
}

::selection { background: var(--sin); color: #14040c; }

:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 2px;
    border-radius: 2px;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.04em;
}

p { color: var(--bone); }

a { color: var(--signal); }

code, pre, .mono {
    font-family: var(--font-mono);
    font-size: 0.92em;
}

hr {
    border: 0;
    height: 1px;
    margin: 34px 0;
    background: linear-gradient(90deg,
        var(--d-green), var(--d-blue), var(--d-gray),
        var(--d-red), var(--d-white), var(--d-gold));
    opacity: 0.4;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-0); }
::-webkit-scrollbar-thumb { background: #2a2f47; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3a4060; }

/* Section heading default: drop the old left border, use a marker rule */
.section h2 {
    border-left: 0;
    padding-left: 0;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    letter-spacing: 0.06em;
}
.section h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 2px;
    margin-top: 10px;
    background: linear-gradient(90deg, var(--page-accent), transparent);
}
.section > p { color: var(--ash); max-width: 70ch; }

/* ------------------------------------------------ 3. HEADER / NAVIGATION */
header.site-head {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1200;
    background: rgba(5, 7, 15, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 0;
    transition: background 0.25s ease;
}
header.site-head.is-scrolled { background: rgba(4, 5, 12, 0.94); }

/* District spectrum hairline — the sitewide divider motif */
.spectrum {
    height: 2px;
    background: linear-gradient(90deg,
        var(--d-green) 0 16.6%, var(--d-blue) 0 33.3%, var(--d-gray) 0 50%,
        var(--d-red) 0 66.6%, var(--d-white) 0 83.3%, var(--d-gold) 0 100%);
    opacity: 0.55;
}
header.site-head .spectrum { opacity: 0.45; }

header.site-head nav.site-nav {
    max-width: none;
    height: var(--head-h);
    padding: 0 clamp(16px, 2.6vw, 36px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

/* Brand — typographic sigil (replaces the old image logo block) */
.brand {
    display: flex;
    align-items: baseline;
    gap: 9px;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}
.brand-sigil {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.32rem;
    letter-spacing: 0.14em;
    color: var(--bone);
}
.brand-sigil b {
    color: var(--sin);
    font-weight: 700;
    text-shadow: 0 0 14px rgba(255, 61, 143, 0.55);
}
.brand-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.32em;
    color: var(--ash);
    border: 1px solid var(--line);
    padding: 3px 7px 2px;
    border-radius: 3px;
    transform: translateY(-2px);
}
.brand:hover .brand-tag { color: var(--signal); border-color: var(--signal); }

/* Top-level links + dropdown groups */
header.site-head .nav-links {
    display: flex;
    align-items: center;
    gap: clamp(2px, 0.6vw, 8px);
}
header.site-head .nav-links > a,
header.site-head .nav-trigger {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ash);
    background: none;
    border: 0;
    padding: 10px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}
header.site-head .nav-links > a:hover,
header.site-head .nav-trigger:hover { color: var(--bone); }
header.site-head .nav-links > a.active,
header.site-head .nav-group.active > .nav-trigger {
    color: var(--bone);
    text-shadow: 0 0 12px color-mix(in srgb, var(--page-accent) 65%, transparent);
}
header.site-head .nav-links > a.active { box-shadow: inset 0 -2px 0 var(--page-accent); }
.nav-trigger i { font-size: 0.6rem; opacity: 0.7; transition: transform 0.2s ease; }
.nav-group { position: relative; }
.nav-group.open > .nav-trigger i,
.nav-group:hover > .nav-trigger i { transform: rotate(180deg); }

.nav-drop {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 230px;
    padding: 10px 0;
    background: rgba(8, 10, 20, 0.97);
    border: 1px solid var(--line);
    border-top: 2px solid var(--page-accent);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.nav-group:hover > .nav-drop,
.nav-group:focus-within > .nav-drop,
.nav-group.open > .nav-drop {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.nav-drop a {
    display: block;
    padding: 8px 18px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ash);
    text-decoration: none;
}
.nav-drop a:hover { color: var(--bone); background: rgba(255, 255, 255, 0.05); }
.nav-drop a.active { color: var(--page-accent); }
.drop-sep {
    margin: 8px 18px 4px;
    padding-top: 8px;
    border-top: 1px solid var(--line-soft);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(152, 161, 186, 0.6);
}
.drop-sep:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.drop-sep i { margin-right: 6px; font-size: 0.55rem; }

/* Burger */
header.site-head .menu-toggle {
    display: none;
    color: var(--bone);
    font-size: 1.25rem;
    background: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    width: 42px;
    height: 38px;
    cursor: pointer;
}

/* Mobile drawer */
@media (max-width: 1100px) {
    header.site-head .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    header.site-head .nav-links {
        position: fixed;
        top: calc(var(--head-h) + 2px);
        right: 0;
        bottom: 0;
        width: min(330px, 88vw);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 14px 10px 40px;
        background: rgba(6, 8, 16, 0.98);
        border-left: 1px solid var(--line);
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        display: flex;
    }
    header.site-head .nav-links.open { transform: translateX(0); }
    header.site-head .nav-links > a,
    header.site-head .nav-trigger {
        width: 100%;
        justify-content: space-between;
        padding: 13px 14px;
        font-size: 0.92rem;
        border-bottom: 1px solid var(--line-soft);
    }
    .nav-drop {
        position: static;
        transform: none;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        display: none;
        border: 0;
        border-left: 2px solid var(--page-accent);
        border-radius: 0;
        margin: 0 0 6px 14px;
        box-shadow: none;
        background: transparent;
        padding: 4px 0;
    }
    .nav-group:hover > .nav-drop { display: none; }       /* hover never opens on touch */
    .nav-group.open > .nav-drop { display: block; }
    .nav-drop a { padding: 9px 16px; }
}

/* ----------------------------------------------------------- 4. HERO (home) */
.syn-hero {
    position: relative;
    min-height: clamp(560px, 80vh, 860px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-shrink: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--line-soft);
}
.syn-hero-media {
    position: absolute;
    inset: 0;
    background: url('../assets/hero_background_hd.webp') center 30% / cover no-repeat, var(--ink-0);
}
.syn-hero-media::before {
    /* legibility wash */
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(4, 5, 12, 0.55), rgba(4, 5, 12, 0.18) 40%, rgba(4, 5, 12, 0.92) 88%),
        radial-gradient(120% 70% at 70% 20%, transparent 40%, rgba(4, 5, 12, 0.55));
}
.syn-hero-media::after {
    /* faint scanlines — broadcast texture */
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 4px);
    mix-blend-mode: overlay;
    pointer-events: none;
}
.syn-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: calc(var(--head-h) + 44px) 22px 56px;
}
.syn-hero-mark {
    width: clamp(170px, 21vw, 300px);
    max-width: 78%;
    height: auto;
    display: block;
    margin-bottom: 22px;
    filter: drop-shadow(0 6px 30px rgba(255, 61, 143, 0.28)) drop-shadow(0 0 26px rgba(69, 214, 255, 0.18));
}
.syn-hero h1 {
    font-size: clamp(1.5rem, 3.4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: none;
    max-width: 18ch;
    line-height: 1.18;
    margin: 0 0 12px;
}
.syn-hero h1 em { font-style: normal; color: var(--sin); }
.syn-hero-dek {
    max-width: 56ch;
    color: var(--ash);
    font-size: 1.02rem;
    margin-bottom: 26px;
}
.syn-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.syn-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    color: var(--ash);
    text-transform: uppercase;
}
.syn-hero-meta b { color: var(--bone); font-weight: 600; margin-right: 7px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: #10030a;
    background: var(--sin);
    border: 1px solid var(--sin);
    border-radius: 4px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255, 61, 143, 0.35); }
.btn i { font-size: 0.8em; }
.btn.btn-ghost {
    background: rgba(8, 10, 20, 0.5);
    color: var(--bone);
    border-color: var(--line);
}
.btn.btn-ghost:hover { border-color: var(--signal); color: var(--signal); box-shadow: 0 10px 28px rgba(69, 214, 255, 0.18); }
.btn.btn-accent { background: var(--page-accent); border-color: var(--page-accent); box-shadow: none; }

/* ----------------------------------------------- 5. FILE-STRIP PAGE HEADERS */
.file-strip {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: calc(var(--head-h) + clamp(36px, 7vh, 72px)) 22px 26px;
}
.file-eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--ash);
    margin-bottom: 14px;
}
.file-eyebrow .sep { color: var(--page-accent); }
.file-eyebrow .file-no { color: var(--page-accent); }
.file-title {
    font-size: clamp(2rem, 5.6vw, 3.6rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.04;
    margin: 0 0 14px;
    text-transform: uppercase;
}
.file-title .ghost { color: transparent; -webkit-text-stroke: 1px rgba(151, 161, 186, 0.55); }
.file-dek {
    max-width: 64ch;
    color: var(--ash);
    font-size: 1.02rem;
    margin-bottom: 20px;
}
.file-strip .spectrum { margin-top: 8px; opacity: 0.35; }

/* Clearance meter — the Protocol's pacing signature */
.clearance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.26em;
    color: var(--page-accent);
}
.clearance .cells { display: inline-flex; gap: 4px; }
.clearance .cells i {
    width: 14px;
    height: 8px;
    background: rgba(151, 161, 186, 0.22);
    transform: skewX(-18deg);
}
.clearance .cells i.on {
    background: var(--page-accent);
    box-shadow: 0 0 10px color-mix(in srgb, var(--page-accent) 70%, transparent);
}

/* --------------------------------------------- 6. CARDS, TILES & PANELS */
.section { padding: clamp(44px, 7vh, 72px) 22px; max-width: var(--wrap); }

.card, .wafer {
    background: var(--panel-soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.card:hover, .wafer:hover {
    transform: translateY(-4px);
    background: var(--card-hover);
    border-color: color-mix(in srgb, var(--page-accent) 55%, var(--line));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}
.card h3, .wafer h3 { letter-spacing: 0.05em; }
.card i, .wafer i { color: var(--page-accent); text-shadow: 0 0 16px color-mix(in srgb, var(--page-accent) 50%, transparent); }

/* Corner-bracketed panel */
.panel {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: clamp(18px, 3vw, 28px);
}
.panel::before, .panel::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--page-accent);
    opacity: 0.85;
    pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* Archive file tiles (home + hub grids) */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 16px;
    margin-top: 26px;
}
.tile {
    --tile-accent: var(--page-accent);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 158px;
    padding: 18px 18px 16px;
    background: var(--panel-soft);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    text-decoration: none;
    color: var(--bone);
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.tile::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--tile-accent);
    opacity: 0.65;
    transition: opacity 0.18s ease;
}
.tile:hover { transform: translateY(-4px); background: var(--card-hover); border-color: color-mix(in srgb, var(--tile-accent) 50%, var(--line)); }
.tile:hover::before { opacity: 1; }
.tile-no {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.3em;
    color: var(--ash);
}
.tile-no b { color: var(--tile-accent); font-weight: 600; }
.tile h3 {
    font-size: 1.06rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin: 0;
}
.tile p { font-size: 0.88rem; color: var(--ash); margin: 0; flex: 1; }
.tile .tile-cta {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--tile-accent);
}
.tile .tile-cta i { font-size: 0.62rem; margin-left: 6px; transition: transform 0.18s ease; }
.tile:hover .tile-cta i { transform: translateX(4px); }

/* Sidebar refinements */
.sidebar { border-radius: 8px; }
.sidebar h3 { letter-spacing: 0.1em; font-size: 1rem; }
.sidebar ul li a { font-family: var(--font-body); font-weight: 500; }
.sidebar ul li a.active { color: var(--page-accent); }

/* ------------------------------------------------------------- 7. FOOTER */
footer.site-foot {
    margin-top: auto;
    background: rgba(4, 5, 12, 0.92);
    border-top: 0;
    padding: 0;
    text-align: left;
    color: var(--ash);
    font-size: 0.9rem;
}
.site-foot .foot-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 44px 22px 30px;
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(140px, 1fr));
    gap: 30px;
}
.site-foot .foot-brand .brand { margin-bottom: 14px; }
.site-foot .foot-brand p { color: var(--ash); font-size: 0.85rem; max-width: 38ch; }
.site-foot h4 {
    font-size: 0.72rem;
    letter-spacing: 0.26em;
    color: var(--bone);
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-weight: 600;
}
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot ul li { margin-bottom: 8px; }
.site-foot ul a { color: var(--ash); text-decoration: none; font-size: 0.88rem; }
.site-foot ul a:hover { color: var(--bone); }
.site-foot .foot-legal {
    border-top: 1px solid var(--line-soft);
    padding: 16px 22px 22px;
    max-width: var(--wrap);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 24px;
    font-size: 0.78rem;
    color: rgba(152, 161, 186, 0.75);
}
.site-foot .foot-legal .build {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* ---------------------------------------- 8. UTILITIES, MOTION, RESPONSIVE */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--page-accent);
    margin-bottom: 10px;
    display: block;
}
.muted { color: var(--ash); }
.tnum { font-variant-numeric: tabular-nums; }

/* One-time decode-in for file titles */
@keyframes fileDecode {
    0% { opacity: 0; transform: translateY(10px); filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.file-title { animation: fileDecode 0.5s ease-out both; }
.file-dek { animation: fileDecode 0.5s 0.08s ease-out both; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

@media (max-width: 880px) {
    .site-foot .foot-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    :root { --head-h: 58px; }
    .brand-tag { display: none; }
    .site-foot .foot-inner { grid-template-columns: 1fr; gap: 22px; }
    .syn-hero-actions .btn { width: 100%; justify-content: center; }
    .file-strip { padding-top: calc(var(--head-h) + 34px); }
}

/* CSS-drawn hamburger so the toggle never depends on icon-font load */
header.site-head .menu-toggle i {
    display: block; width: 18px; height: 2px; font-size: 0;
    background: var(--bone);
    box-shadow: 0 -6px 0 var(--bone), 0 6px 0 var(--bone);
}

/* 2.0-EXP nav restructure: new top-level section pages */
body.socials-page   { --page-accent: var(--signal); }
body.codex-page     { --page-accent: var(--gilt); }
body.mechanics-page { --page-accent: var(--signal); }
body.account-page   { --page-accent: var(--sin); }

/* 2.0-EXP home/header refresh: centered tabs + Log In/Register cluster */
@media (min-width: 1101px) {
    header.site-head .nav-links { flex: 1 1 auto; justify-content: center; }
}
.nav-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    visibility: hidden;
}
.nav-auth.is-ready { visibility: visible; }
.nav-auth a,
.nav-auth button {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}
.nav-auth button {
    cursor: pointer;
}
.auth-login { color: var(--ash); padding: 8px 4px; transition: color 0.2s ease; }
.auth-login:hover { color: var(--bone); }
.auth-reg {
    color: var(--ink-0);
    background: var(--sin);
    padding: 9px 16px;
    border-radius: 999px;
    font-weight: 700;
    transition: filter 0.2s ease, box-shadow 0.2s ease;
}
.auth-reg:hover { filter: brightness(1.08); box-shadow: 0 0 18px rgba(255, 61, 143, 0.45); }
.auth-profile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--bone);
    padding: 5px 8px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, background 0.2s ease;
}
.auth-profile:hover {
    border-color: color-mix(in srgb, var(--page-accent) 65%, var(--line));
    background: rgba(255, 255, 255, 0.07);
}
.auth-avatar {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sin), var(--signal));
    color: var(--ink-0);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: 0 0 18px rgba(255, 61, 143, 0.25);
}
.auth-profile-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}
.auth-welcome {
    color: var(--ash);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    line-height: 1;
}
.auth-name {
    max-width: 14ch;
    overflow: hidden;
    color: var(--bone);
    font-size: 0.72rem;
    line-height: 1.15;
    text-overflow: ellipsis;
}
.auth-logout {
    color: var(--ash);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 13px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.auth-logout:hover {
    color: var(--bone);
    border-color: var(--sin);
    background: rgba(255, 61, 143, 0.1);
}
.auth-mobile-link { display: none; }
header.site-head .nav-links > .auth-mobile-link { display: none; }
@media (max-width: 1100px) { header.site-head .nav-auth { display: none; } }
@media (max-width: 1100px) {
    header.site-head .nav-links > .auth-mobile-link {
        display: inline-flex;
        color: var(--bone);
    }
    header.site-head .nav-links > .auth-mobile-register {
        color: var(--sin);
    }
    header.site-head .nav-links > button.auth-mobile-link {
        background: none;
        border: 0;
        border-bottom: 1px solid var(--line-soft);
        font-family: var(--font-display);
        font-weight: 500;
        font-size: 0.92rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        cursor: pointer;
        text-align: left;
    }
    header.site-head .nav-links > .auth-mobile-logout {
        color: var(--sin);
    }
}
