/* ink-steel.css — MoreRight Constraint-Mode Design System
   Replaces style.css. Berserk greyscale aesthetic.
   Two classes on <html>: .mode-constraint (default) / .mode-void
   ---------------------------------------------------------------- */

/* ── VoidScene: Three.js unified container + controls ──────────────────────
   Canonical pattern for ALL Three.js scenes on the site.

   HTML:
     <div class="void-scene-wrap">          ← or use custom wrapper with same props
       <canvas id="my-canvas"></canvas>     ← position:absolute;inset:0 applied via CSS
     </div>

   JS (in your *-three.js file):
     renderer.setSize(w, h, false)          ← ALWAYS false — CSS controls display size
     // ... then wire up VoidScene for resize + cog:
     const vs = new VoidScene(renderer, camera, { wrap });
     vs.loop(() => renderer.render(scene, camera));

   Rule: NEVER call renderer.setSize(w, h) with updateStyle=true (the default).
   That overwrites canvas CSS and can expand the aspect-ratio wrapper.
   Use false every time. CSS position:absolute;inset:0 handles display sizing.
   ─────────────────────────────────────────────────────────────────────────── */

.void-scene-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 100 / 48;
    max-height: 400px;
    background: #020101;
    border-radius: 8px;
    border: 1px solid #1a0505;
}

/* Canvas fills wrapper absolutely — never in normal flow */
.void-scene-wrap canvas,
.void-scene-canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* ── Cog controls overlay (injected by void-scene.js) ─────────────────── */
.vs-controls {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    pointer-events: auto;
}
.vs-cog {
    background: rgba(0,0,0,0.55);
    border: 1px solid #2a2a2a;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.15s, border-color 0.15s;
}
.vs-cog:hover { color: #bbb; border-color: #555; }
.vs-panel {
    position: absolute;
    top: 30px;
    right: 0;
    background: rgba(8,8,8,0.96);
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    min-width: 148px;
    font-size: 0.78rem;
    white-space: nowrap;
}
.vs-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0;
    color: #888;
    cursor: pointer;
    user-select: none;
}
.vs-row:hover { color: #ccc; }
.vs-row input[type="checkbox"] { cursor: pointer; }

/* Google Fonts loaded via <link> in HTML head — no @import waterfall */

/* ── CSS Variables — Constraint Mode ─────────────────────────── */
:root {
    --bg:          #0c0908;
    --surface:     #131110;
    --surface-2:   #1a1816;
    --surface-3:   #201e1b;
    --border:      rgba(255, 220, 200, 0.12);
    --border-dim:  rgba(255, 220, 200, 0.04);
    --text:        #f5f2f0;
    --text-dim:    #a09890;
    --text-faint:  #8a8280;  /* lifted from #5a5250 — was ~2.9:1, now ~5.3:1 on --bg */
    --text-muted:  #7e7a78;  /* lifted from #6e6460 — was ~3.5:1, now ~4.7:1 on --bg */
    --kill:        #dc2626;
    --accent:      #c8976a;
    --ring:        rgba(200, 151, 106, 0.25);

    /* Semantic colors — used across page-specific CSS */
    --red:         #ff4444;
    --green:       #3ddc84;
    --orange:      #c8976a;
    --accent-dim:  #2e2925;

    /* Surface aliases for legacy CSS */
    --bg-card:     #131110;
    --bg-hover:    #1a1816;
    --font-sans:   'JetBrains Mono', 'Fira Code', monospace;

    --font-display: 'Space Grotesk', sans-serif;
    --font-prose:   'Space Grotesk', sans-serif;
    --font-body:    'JetBrains Mono', 'Fira Code', monospace;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

    /* Panel system */
    --panel-border: 1px solid var(--border);
    --panel-radius: 0px;
    --btn-radius: 0px;

    /* Shadows */
    --shadow-xs:  0 1px 2px rgba(0,0,0,0.4);
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -4px rgba(0,0,0,0.3);
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}

/* ── Base ─────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1.1;
    color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.75rem); }
h4 { font-size: 1.1rem; font-weight: 700; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border);
    transition: text-decoration-color 0.15s;
}
a:hover { text-decoration-color: var(--text-dim); }

code, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--surface-2);
    border: 1px solid var(--border);
}
code { padding: 0.15em 0.4em; border-radius: 4px; }
pre { padding: 1rem; overflow-x: auto; border-radius: var(--panel-radius); }

/* ── Layout ───────────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Nav ──────────────────────────────────────────────────────── */
#main-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(12,9,8,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 52px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--text); text-decoration: none; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-item > a,
.nav-item > span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0 1.1rem;
    height: 52px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
    cursor: pointer;
    border-left: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    white-space: nowrap;
}
.nav-item > a:hover,
.nav-item > span:hover {
    color: var(--text);
    background: rgba(255,255,255,0.04);
    border-left-color: transparent;
}

.nav-arrow { font-size: 0.6rem; opacity: 0.6; }

/* Dropdown */
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    min-width: 200px;
    z-index: 2000;
    padding: 4px;
    box-shadow: var(--shadow-lg);
}
/* Invisible bridge fills gap between trigger and menu so hover doesn't break */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}
.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: calc(var(--panel-radius) - 2px);
    white-space: nowrap;
    transition: all 0.1s ease;
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover {
    color: var(--text);
    background: var(--surface-2);
}
.nav-item:hover .nav-dropdown-menu { display: block; }
/* Tablet touch: open via JS .open class (no hover) */
.nav-item.open .nav-dropdown-menu { display: block; }

/* Arrow rotation feedback on open dropdown */
.nav-arrow { transition: transform 0.2s; }
.nav-item.open .nav-arrow { transform: rotate(180deg); }

/* Current page highlight */
.nav-active { color: var(--text) !important; }

/* Hamburger (mobile) */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;       /* enlarged touch target */
    margin: -6px;        /* compensate visual size */
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dim);
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
}

/* Hamburger → X when nav is open */
#main-nav.open .nav-hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
#main-nav.open .nav-hamburger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#main-nav.open .nav-hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-hamburger { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        z-index: 999;
        background: var(--surface);
        border-bottom: var(--panel-border);
        flex-direction: column;
        gap: 0;
        max-height: calc(100vh - 52px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #main-nav.open .nav-links { display: flex; }
    .nav-item > a,
    .nav-item > span {
        height: 48px;
        min-height: 48px;
        border-left: none;
        border-bottom: 1px solid var(--border);
        padding: 0 1.25rem;
        font-size: 0.88rem;
    }
    .nav-dropdown-menu {
        position: static;
        border: none;
        border-left: 3px solid var(--border);
        background: var(--surface-2);
    }
    .nav-dropdown-menu a {
        padding: 0.7rem 1rem 0.7rem 1.5rem;
        font-size: 0.85rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .nav-item:hover .nav-dropdown-menu { display: none; }
    .nav-item.open .nav-dropdown-menu { display: block; }
    /* wallet slot sits below nav items on mobile */
    #wallet-slot { padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border); }
}

/* ── Panel System ─────────────────────────────────────────────── */
.panel {
    border: var(--panel-border);
    background: var(--surface);
    padding: 1.5rem;
}

.panel-grid {
    display: grid;
    gap: 0;
}

.panel-grid-2 { grid-template-columns: repeat(2, 1fr); }
.panel-grid-3 { grid-template-columns: repeat(3, 1fr); }
.panel-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .panel-grid-3, .panel-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .panel-grid-2, .panel-grid-3, .panel-grid-4 { grid-template-columns: 1fr; }
}

/* Panel borders: shared border between adjacent panels */
.panel-grid > .panel + .panel { border-left: none; }
.panel-grid-3 > .panel:nth-child(3n+1) + .panel { border-left: none; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    border-radius: var(--btn-radius);
    box-shadow: var(--shadow-xs);
    transition: all 0.15s ease;
    letter-spacing: 0.02em;
}
.btn:hover {
    background: var(--surface-3);
    border-color: var(--text-faint);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}
.btn:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}
.btn-primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background: #d4d4d8;
    border-color: #d4d4d8;
    color: var(--bg);
    box-shadow: var(--shadow-md);
}
.btn-ghost {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
.btn-ghost:hover {
    background: var(--surface-2);
    border-color: var(--border);
}
.btn-danger {
    border-color: rgba(220,38,38,0.4);
    color: #f87171;
    background: rgba(220,38,38,0.08);
}
.btn-danger:hover {
    background: rgba(220,38,38,0.15);
    border-color: rgba(220,38,38,0.6);
    color: #fca5a5;
}
.btn-orange {
    background: rgba(251,146,60,0.1);
    border-color: rgba(251,146,60,0.5);
    color: #fb923c;
}
.btn-orange:hover {
    background: rgba(251,146,60,0.18);
    border-color: #fb923c;
    color: #fb923c;
    box-shadow: var(--shadow-sm);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

/* ── Form elements ────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.88rem;
    border-radius: var(--btn-radius);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow-xs);
}
/* Prevent iOS auto-zoom on focus (requires 16px minimum) */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="number"],
    textarea,
    select {
        font-size: 1rem;
    }
}
input:focus, textarea:focus, select:focus {
    border-color: var(--text-faint);
    box-shadow: 0 0 0 3px var(--ring);
}
label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.form-group { margin-bottom: 1.25rem; }

/* Range input */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--border);
    border: none;
    outline: none;
    padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--text);
    cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--text);
    cursor: pointer;
    border: none;
}

/* ── Score display ────────────────────────────────────────────── */
.score-display {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text);
}
.score-display.score-danger { color: var(--kill); }

/* ── Chip / Tag ───────────────────────────────────────────────── */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--surface-2);
    color: var(--text-dim);
    cursor: default;
    transition: all 0.15s ease;
}
.chip.active {
    border-color: var(--text);
    background: var(--text);
    color: var(--bg);
}
.chip.clickable { cursor: pointer; }
.chip.clickable:hover { border-color: var(--text-dim); color: var(--text); }

/* ── Phase labels ─────────────────────────────────────────────── */
.phase-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
}

/* ── Horizontal rule ──────────────────────────────────────────── */
hr { border: none; border-top: var(--panel-border); margin: 2rem 0; }

/* ── Tabs ─────────────────────────────────────────────────────── */
.tab-bar {
    display: flex;
    border-bottom: var(--panel-border);
    overflow-x: auto;
}
.tab-btn {
    padding: 0.75rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -2px;
}
.tab-btn:hover { color: var(--text-dim); }
.tab-btn.active {
    color: var(--text);
    border-bottom-color: var(--text);
}
.tab-panel { display: none; padding: 2rem 0; }
.tab-panel.active { display: block; }

/* ── Article card ─────────────────────────────────────────────── */
.article-card {
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    padding: 1.25rem;
    display: block;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}
.article-card:hover {
    background: var(--surface-2);
    border-color: var(--text-faint);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--text);
}
.article-card-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 0.5rem;
}
.article-card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}
.article-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ── Kill / danger highlight ──────────────────────────────────── */
.danger { color: var(--kill); }
.danger-border { border-color: var(--kill) !important; }

/* ── Stat block ───────────────────────────────────────────────── */
.stat-block {
    text-align: center;
    padding: 1.5rem;
}
.stat-number {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.03em;
    line-height: 1;
    display: block;
}
.stat-label {
    font-size: 0.78rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.4rem;
    display: block;
}

/* ── Footer ───────────────────────────────────────────────────── */
#site-footer {
    border-top: 1px solid var(--border-dim);
    margin-top: 4rem;
    padding: 3rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.footer-col { font-size: 0.82rem; }
.footer-col h3 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    margin-bottom: 0.75rem;
}
.footer-col a {
    display: block;
    color: var(--text-dim);
    text-decoration: none;
    margin-bottom: 0.3rem;
    transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); }
/* Per-page void score badge — injected by nav.js from site-page-scores.js */
.footer-page-score {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border-dim);
    padding: 0.65rem 0 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.fps-label { color: var(--text-muted); }
.fps-dim   { color: var(--text-muted); letter-spacing: 0.03em; }
.fps-total { font-weight: 600; }
.fps-link  {
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border-dim);
    border-radius: 3px;
    padding: 0 0.3rem;
    font-size: 0.68rem;
    line-height: 1.6;
    margin-left: 0.15rem;
    transition: color 0.12s, border-color 0.12s;
}
.fps-link:hover { color: var(--text-dim); border-color: var(--border); }

.footer-copy {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-faint);
}

@media (max-width: 600px) {
    #site-footer { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-copy { grid-column: 1; }
}

/* ── Page wrap ────────────────────────────────────────────────── */
.page-wrap { max-width: 880px; margin: 0 auto; padding: 3rem 1.5rem; }

/* ── Nav divider ──────────────────────────────────────────────── */
.nav-divider { border-top: 1px solid var(--border); margin: 0.4rem 0; }

/* ── Utility classes ──────────────────────────────────────────── */
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.text-kill { color: var(--kill); }
.mono { font-family: var(--font-mono); }
.display { font-family: var(--font-display); font-weight: 900; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

/* ── Page hero section ────────────────────────────────────────── */
.page-hero {
    padding: 3rem 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: var(--panel-border);
}
.page-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}
.page-subtitle {
    font-size: 1rem;
    color: var(--text-dim);
    max-width: 600px;
    line-height: 1.6;
}

/* ── Progress / step indicators ──────────────────────────────── */
.step-indicators {
    display: flex;
    gap: 0;
    border: var(--panel-border);
    overflow: hidden;
}
.step-indicator {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    text-align: center;
    color: var(--text-faint);
    border-right: 1px solid var(--border);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.step-indicator:last-child { border-right: none; }
.step-indicator.active { background: var(--surface); color: var(--text); }
.step-indicator.done { background: var(--surface-2); color: var(--text-dim); }

/* ── Bar chart ────────────────────────────────────────────────── */
.bar-chart { display: flex; flex-direction: column; gap: 0.75rem; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 60px; align-items: center; gap: 0.75rem; }
.bar-label { font-size: 0.82rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.bar-fill { height: 100%; background: var(--text-dim); transition: width 0.3s; }
.bar-fill.void-high { background: var(--kill); }
.bar-fill.void-mid { background: var(--text-faint); }
.bar-value { font-size: 0.78rem; color: var(--text-faint); text-align: right; font-family: var(--font-mono); }

/* ── Accessibility ───────────────────────────────────────────── */

/* Focus-visible outlines for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* Remove outline for mouse/touch users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Screen reader only — visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip-to-content link — appears on focus */
.skip-to-content {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: var(--text);
    color: var(--bg);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--text);
    transition: top 0.15s;
}
.skip-to-content:focus {
    top: 0.5rem;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Minimum touch targets on mobile */
@media (max-width: 768px) {
    .btn, .filter-btn, .chip.clickable, .tab-btn {
        min-height: 44px;
        min-width: 44px;
    }
    /* Larger range slider thumb for touch */
    input[type="range"]::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }
    input[type="range"]::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
    /* Carousel arrows: expand to 44px touch target */
    .sc-arrow {
        width: 44px;
        height: 44px;
    }
}

/* Hero section: don't force full viewport height in landscape */
@media (max-height: 500px) and (orientation: landscape) {
    #hero-panel {
        min-height: auto;
        padding: 4rem 1rem 3rem;
    }
    .hero-content { padding: 1rem; }
    .hero-headline { margin-bottom: 0.75rem; }
    .hero-disclosure { margin-bottom: 1rem; }
}

/* Safe area insets — notch / home indicator support */
@supports (padding: env(safe-area-inset-left)) {
    #main-nav {
        padding-left: max(1.5rem, env(safe-area-inset-left));
        padding-right: max(1.5rem, env(safe-area-inset-right));
    }
    #site-footer {
        padding-bottom: max(3rem, calc(2rem + env(safe-area-inset-bottom)));
    }
    @media (max-width: 768px) {
        .nav-links {
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

/* ── theme-clarity — Product Layer ───────────────────────────── */
/* Third visual mode: frosted glass, gentle radii, spring physics.
   Applied to product surfaces (auth modal, credits, research workspace).
   NOT a page-level mode like constraint/void — a component-level layer. */

.theme-clarity {
    --tc-bg:       #08090c;
    --tc-surface:  #0e1014;
    --tc-surface-2: #141720;
    --tc-border:   rgba(255,255,255,0.06);
    --tc-radius:   8px;
    --tc-blur:     12px;
    --tc-ease:     cubic-bezier(0.34, 1.56, 0.64, 1);
    --tc-text:     #e0e4ec;
    --tc-text-dim: #8891a4;
    --tc-accent:   #4a9eff;
    --tc-success:  #3ddc84;
}

/* Frosted glass panel */
.tc-panel {
    background: var(--tc-surface);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    backdrop-filter: blur(var(--tc-blur));
    -webkit-backdrop-filter: blur(var(--tc-blur));
}

/* Elevated card (for modals, payment paths) */
.tc-card {
    background: var(--tc-surface);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.tc-card:hover {
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
}

/* Selected state for choice cards */
.tc-card.selected {
    border-color: var(--tc-accent);
    box-shadow: 0 0 0 1px var(--tc-accent), 0 8px 32px rgba(74,158,255,0.12);
}

/* Spring animation */
@keyframes tcSpring {
    0%   { transform: scale(0.95); opacity: 0; }
    60%  { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}
.tc-spring { animation: tcSpring 0.4s var(--tc-ease) forwards; }

/* Fade-in */
@keyframes tcFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tc-fade-in { animation: tcFadeIn 0.3s ease-out forwards; }

/* Badge accent (for "10% extra" type labels) */
.tc-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 4px;
    background: rgba(74,158,255,0.12);
    color: var(--tc-accent);
    border: 1px solid rgba(74,158,255,0.2);
}
.tc-badge-success {
    background: rgba(61,220,132,0.1);
    color: var(--tc-success);
    border-color: rgba(61,220,132,0.2);
}

/* ── Void Model Card — Reusable component ────────────────────── */
/* Used in corp landing, paper pages, certification. Standardized format. */

.void-model-card {
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    max-width: 520px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.vmc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border);
    background: var(--surface-2);
}
.vmc-title {
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.vmc-status {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--text-faint);
}
.vmc-status-certified { border-color: var(--green); color: var(--green); }
.vmc-status-atrisk { border-color: var(--orange, #e67e22); color: var(--orange, #e67e22); }
.vmc-status-declined { border-color: var(--kill, #cc0000); color: var(--kill, #cc0000); }

.vmc-body { padding: 0.5rem 0; }
.vmc-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.vmc-row:last-child { border-bottom: none; }
.vmc-row-score { background: rgba(255,255,255,0.02); }
.vmc-label { color: var(--text-faint); font-size: 0.72rem; }
.vmc-value { color: var(--text-dim); text-align: right; }
.vmc-score { font-weight: 700; font-size: 0.9rem; color: var(--green); }

.vmc-dims {
    display: flex;
    gap: 0;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.vmc-dim {
    flex: 1;
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0.5rem 0.3rem 0;
    font-size: 0.72rem;
}
.vmc-dim:not(:last-child) { border-right: 1px solid rgba(255,255,255,0.04); margin-right: 0.5rem; }
.vmc-dim-label { color: var(--text-faint); }
.vmc-dim-value { color: var(--text-dim); font-weight: 700; }

.vmc-footer {
    padding: 0.5rem 1rem;
    border-top: 2px solid var(--border);
    font-size: 0.65rem;
    color: var(--text-faint);
    letter-spacing: 0.02em;
}

/* ── Homepage — Atlas Hero Redesign ─────────────────────────────── */
/* Full-viewport Atlas background with text overlay.
   Sections follow the reveal sequence from front-page-style-guide.md */

/* Hero canvas — fixed behind everything */
#atlas-hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* Void particle field — above Atlas, below content */
#void-field {
    display: none;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.mode-void #void-field { display: block; opacity: 1; }

/* Hero panel — full viewport over Atlas */
#hero-panel {
    position: relative;
    min-height: 100vh;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
#hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Stronger center darkening so text always reads against the drift field */
    background:
        radial-gradient(ellipse at 50% 0%, rgba(39,39,42,0.10) 0%, transparent 55%),
        radial-gradient(ellipse 65% 60% at center, rgba(9,9,11,0.90) 0%, rgba(9,9,11,0.55) 60%, rgba(9,9,11,0.10) 100%);
    pointer-events: none;
    z-index: -1;
}
.hero-content {
    max-width: 740px;
    padding: 2.5rem 2rem;
    position: relative;
    z-index: 1;
    /* Soft vignette behind text block for contrast at any canvas brightness */
    background: radial-gradient(ellipse at center, rgba(9,9,11,0.55) 30%, transparent 80%);
    border-radius: 12px;
}
.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.0;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #fafafa 40%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}


.hero-disclosure {
    font-size: 0.78rem;
    color: var(--text-faint);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    background: rgba(255,255,255,0.02);
    line-height: 1.6;
}
.hero-disclosure a { color: var(--text-dim); }

/* Green "good void" variant */
.hero-disclosure--good {
    border: none;
    border-left: 2px solid var(--green);
    padding-left: 0.9rem;
    margin-top: 1.25rem;
    background: rgba(61,220,132,0.03);
    border-radius: 0;
}
.hero-disclosure--good .disc-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    margin: 0 0 0.35rem;
}
.hero-disclosure--good .disc-body {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-dim);
    line-height: 1.6;
}
.hero-disclosure--good .disc-body a { color: var(--green); }

.hero-mode-toggle {
    display: inline-flex;
    align-items: center;
    margin-bottom: 2rem;
    border-radius: var(--btn-radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.hero-mode-toggle button {
    padding: 0.75rem 2rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    background: transparent;
    color: var(--text-faint);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.hero-mode-toggle button:first-child { border-right: 1px solid var(--border); }
.hero-mode-toggle button.active {
    background: var(--text);
    color: var(--bg);
}
.hero-mode-toggle button:not(.active):hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
}
.toggle-divider { display: none; }

.hero-atlas-label {
    font-size: 0.72rem;
    color: var(--text-faint);
    letter-spacing: 0.06em;
    margin-top: 0.5rem;
}

/* ── Reveal Section — "Three systems. One architecture." ──────── */
#reveal-panel {
    position: relative;
    z-index: 2;
    background: var(--bg);
    border-bottom: 1px solid var(--border-dim);
    padding: 5rem 1.5rem;
}
.reveal-title {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}
.reveal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    max-width: 960px;
    margin: 0 auto;
    border-radius: var(--panel-radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--border);
    box-shadow: var(--shadow-md);
}
.reveal-col {
    padding: 2rem 1.5rem;
    background: var(--surface);
    transition: background 0.2s ease;
}
.reveal-col:hover {
    background: var(--surface-2);
}
.reveal-col:last-child { border-right: none; }
.reveal-label {
    display: block;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    min-height: 1.5em;
    transition: opacity 0.6s ease, color 0.6s ease;
}
.reveal-col:not(.revealed) .reveal-label {
    color: var(--text-faint);
}
.reveal-col.revealed .reveal-label {
    color: var(--text);
}
.reveal-col p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 0.8rem;
    padding-left: 0;
}
.reveal-punchline {
    text-align: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-top: 3rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* ── Three Conditions — O / R / α ─────────────────────────────── */
#conditions-panel {
    position: relative;
    z-index: 2;
    background: var(--bg);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 0 1.5rem;
    margin: 3rem auto;
    max-width: 1100px;
    border-bottom: none;
}
.condition-cell {
    padding: 2rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    background: var(--surface);
    position: relative;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.condition-cell:hover {
    border-color: var(--text-faint);
    background: var(--surface-2);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.condition-cell:last-child { border-right: 1px solid var(--border); }
.condition-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-faint);
    margin-bottom: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
    display: inline-block;
}
.condition-cell h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    margin-bottom: 0.75rem;
}
.condition-cell p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}
.condition-score-label {
    font-size: 0.72rem;
    color: var(--text-faint);
    font-family: var(--font-mono);
}

/* ── Gambling Anchor — "The Empty Void" ───────────────────────── */
#anchor-panel {
    position: relative;
    z-index: 2;
    background: var(--bg);
    text-align: center;
    padding: 5rem 2rem;
    border-bottom: 1px solid var(--border-dim);
}
.anchor-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-faint);
    margin-bottom: 3rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    display: inline-block;
    background: rgba(255,255,255,0.02);
}
.anchor-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 3rem;
}
.anchor-box {
    border: 1px solid var(--border);
    padding: 1.2rem 2.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 0.1em;
    border-radius: var(--panel-radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.anchor-body {
    font-size: 1rem;
    color: var(--text-dim);
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}
.anchor-punchline {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--text);
    margin-bottom: 1.5rem;
}
.anchor-implication {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Research Findings Stats Bar ──────────────────────────────── */
#findings-bar {
    position: relative;
    z-index: 2;
    background: var(--surface);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    overflow: hidden;
    text-align: center;
    max-width: 1100px;
    margin: 3rem auto;
    box-shadow: var(--shadow-md);
}
.finding-cell {
    padding: 2.5rem 1rem;
    background: var(--surface);
    transition: background 0.2s ease;
}
.finding-cell:hover { background: var(--surface-2); }
.finding-cell:last-child { border-right: none; }
.finding-num {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    letter-spacing: -0.04em;
    display: block;
    line-height: 1;
    background: linear-gradient(180deg, var(--text) 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.finding-desc {
    font-size: 0.72rem;
    color: var(--text-faint);
    display: block;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* ── Scale Section — domain coverage ──────────────────────────── */
#scale-panel {
    position: relative;
    z-index: 2;
    background: var(--bg);
    padding: 4rem 1.5rem;
    border-bottom: 1px solid var(--border-dim);
    text-align: center;
}
.scale-domains {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
}
.domain-chip {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-faint);
    background: rgba(255,255,255,0.02);
    transition: all 0.15s ease;
}
.domain-chip:hover {
    color: var(--text-dim);
    border-color: var(--text-faint);
    background: rgba(255,255,255,0.04);
}
.scale-implication {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.3rem, 3vw, 2rem);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}
#scale-panel .stat-platforms {
    font-size: 0.82rem;
    color: var(--text-faint);
    margin-bottom: 2rem;
}
.scale-ctas {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── DAO Self-Score ───────────────────────────────────────────── */
#dao-panel {
    position: relative;
    z-index: 2;
    background: var(--bg);
    border-bottom: 1px solid var(--border-dim);
    padding: 3rem 1.5rem;
    text-align: center;
}
#dao-panel h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    margin-bottom: 2rem;
}
.dao-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto 2rem;
    box-shadow: var(--shadow-sm);
}
.dao-cell {
    padding: 1.5rem 1rem;
    text-align: center;
    background: var(--surface);
    transition: background 0.2s ease;
}
.dao-cell:hover { background: var(--surface-2); }
.dao-cell:last-child { border-right: none; }
.dao-num {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: -0.03em;
    display: block;
    line-height: 1;
}
.dao-label {
    font-size: 0.68rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-top: 0.4rem;
}
.dao-note {
    font-size: 0.78rem;
    color: var(--text-faint);
    max-width: 600px;
    margin: 0 auto;
}

/* ── Action Strip ─────────────────────────────────────────────── */
#action-strip {
    position: relative;
    z-index: 2;
    background: var(--bg);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 3rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    border-bottom: none;
}
.action-cell {
    padding: 2rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    background: var(--surface);
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-xs);
}
.action-cell:hover {
    border-color: var(--text-faint);
    background: var(--surface-2);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.action-cell:last-child { border-right: 1px solid var(--border); }
.action-cell a {
    display: block;
    text-decoration: none;
}
.action-cell h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    transition: color 0.15s;
}
.action-cell a:hover h3 { color: var(--text); }
.action-cell p {
    font-size: 0.82rem;
    color: var(--text-faint);
}

/* ── Papers Strip ─────────────────────────────────────────────── */
#papers-strip {
    position: relative;
    z-index: 2;
    background: var(--bg);
    padding: 3rem 1.5rem;
    border-bottom: 1px solid var(--border-dim);
    max-width: 1100px;
    margin: 0 auto;
}
.papers-strip-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.papers-strip-header h2 {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-faint);
}
.papers-strip-header a {
    font-size: 0.75rem;
    color: var(--text-faint);
    text-decoration: none;
    transition: color 0.15s;
}
.papers-strip-header a:hover {
    color: var(--text-dim);
}
.papers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.paper-cell {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    background: var(--surface);
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    box-shadow: var(--shadow-xs);
}
.paper-cell:hover {
    background: var(--surface-2);
    border-color: var(--text-faint);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.paper-cell:nth-child(5n) { border-right: 1px solid var(--border); }
.paper-cell:nth-last-child(-n+5) { border-bottom: 1px solid var(--border); }
.paper-num {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-faint);
    margin-bottom: 0.35rem;
    display: block;
}
.paper-title {
    font-size: 0.8rem;
    color: var(--text);
    line-height: 1.3;
    font-weight: 700;
}
.paper-cc {
    font-size: 0.62rem;
    color: var(--text-faint);
    margin-top: 0.5rem;
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: rgba(255,255,255,0.02);
}
.paper-cell-more {
    opacity: 0.6;
    border-style: dashed;
}
.paper-cell-more:hover { opacity: 0.8; }

/* ── Score badges (used in activity feed) ─────────────────────── */
.badge-critical { background: rgba(204,0,0,0.15); color: #ff4444; border: 1px solid rgba(204,0,0,0.3); }
.badge-high     { background: rgba(255,100,0,0.12); color: #ff8833; border: 1px solid rgba(255,100,0,0.25); }
.badge-moderate { background: rgba(255,220,0,0.1); color: #ccaa00; border: 1px solid rgba(255,220,0,0.2); }

/* ── Homepage Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
    .reveal-grid { grid-template-columns: 1fr; }
    #conditions-panel { grid-template-columns: 1fr; }
    #findings-bar { grid-template-columns: repeat(2, 1fr); margin: 2rem 1rem; }
    .dao-grid { grid-template-columns: repeat(2, 1fr); }
    #action-strip { grid-template-columns: 1fr; }
    .papers-grid { grid-template-columns: repeat(2, 1fr); }
    #papers-strip { max-width: 100%; }
}
@media (max-width: 600px) {
    .hero-headline { font-size: clamp(2.2rem, 8vw, 3.5rem); }
    .hero-content { padding: 1.5rem 1.25rem; }
    .hero-sub { font-size: 0.95rem; }
    .hero-disclosure { font-size: 0.75rem; }
    .hero-mode-toggle button { padding: 0.6rem 1.2rem; font-size: 0.78rem; }
    #findings-bar { grid-template-columns: 1fr; margin: 2rem 1rem; }
    .dao-grid { grid-template-columns: 1fr; }
    .anchor-diagram { flex-direction: column; gap: 0.5rem; }
    .anchor-diagram .anchor-arrow { transform: rotate(90deg); }
    #conditions-panel { padding: 0 1rem; margin: 2rem auto; }
    #action-strip { padding: 2rem 1rem; }
    .papers-grid { grid-template-columns: 1fr; }
    /* CTAs go full-width on small screens */
    .scale-ctas { flex-direction: column; align-items: stretch; }
    .scale-ctas .btn { text-align: center; justify-content: center; }
    /* Anchor section tighter padding */
    #anchor-panel { padding: 3.5rem 1.25rem; }
    #reveal-panel { padding: 3rem 1rem; }
    #scale-panel { padding: 3rem 1rem; }
    #dao-panel { padding: 2rem 1rem; }
    #papers-strip { padding: 2rem 1rem; }
    /* Hero ticker: hide dots, let stats wrap naturally */
    .ticker-dot { display: none; }
    .hero-ticker { gap: 1rem 1.5rem; }
    .ticker-n { font-size: 1.2rem; }
    /* Hero CTA buttons stack */
    .hero-content > div[style*="display:flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .hero-content > div[style*="display:flex"] .btn {
        text-align: center;
        justify-content: center;
    }
    /* Lead form flex row stacks */
    #lead-form div[style*="display:flex"] {
        flex-direction: column !important;
    }
    #lead-form input[style*="flex:0 0 180px"] {
        flex: 1 1 auto !important;
    }
}

@media (max-width: 420px) {
    .hero-headline { font-size: clamp(1.9rem, 9vw, 2.8rem); }
    .hero-content { padding: 1.25rem 1rem; }
    .reveal-col { padding: 1.5rem 1rem; }
    .condition-cell { padding: 1.5rem 1rem; }
    .anchor-box { padding: 0.9rem 1.5rem; font-size: 1.2rem; }
    .ticker-n { font-size: 1rem; }
    .hero-ticker { gap: 0.75rem 1rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   KILLS TEASER — Homepage teaser section
   ═══════════════════════════════════════════════════════════════════ */
#kills-teaser {
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-dim);
    background: var(--surface);
}
.kills-teaser-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-faint);
    margin-bottom: 2rem;
}
.kills-preview {
    max-width: 600px;
    margin: 0 auto 2rem;
}
.kills-preview p {
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-dim);
    margin: 0.75rem 0;
    padding: 0.5rem 1rem;
    border-left: 2px solid var(--border);
    text-align: left;
    transition: all 0.2s ease;
}
.kills-preview p:hover {
    border-left-color: var(--text-faint);
    color: var(--text);
    background: rgba(255,255,255,0.02);
}

/* ═══════════════════════════════════════════════════════════════════
   SHOWCASE CAROUSEL — Auto-swiping stat/achievement cards
   ═══════════════════════════════════════════════════════════════════ */
#showcase-carousel {
    position: relative;
    background: var(--surface);
    border-bottom: 1px solid var(--border-dim);
    overflow: hidden;
    padding: 3.5rem 0 3rem;
}

.sc-label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-faint);
    text-align: center;
    margin-bottom: 1.5rem;
}

.sc-viewport {
    overflow: hidden;
    width: 100%;
    cursor: grab;
    user-select: none;
}
.sc-viewport:active { cursor: grabbing; }

.sc-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Each visible slot is ~420px wide with padding */
.sc-card {
    flex: 0 0 420px;
    margin: 0 0.5rem;
    padding: 2.5rem 2rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s ease, background 0.2s ease;
}

.sc-card.sc-visible {
    opacity: 1;
    transform: translateY(0);
}

.sc-card:hover {
    border-color: var(--text-faint);
    background: var(--surface-3);
}

.sc-badge {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    display: inline-block;
    width: fit-content;
}

.sc-badge.badge-kill   { color: #cc3333; border-color: rgba(204,51,51,0.3); }
.sc-badge.badge-math   { color: #8855cc; border-color: rgba(136,85,204,0.3); }
.sc-badge.badge-scale  { color: #4488aa; border-color: rgba(68,136,170,0.3); }
.sc-badge.badge-status { color: #448844; border-color: rgba(68,136,68,0.3); }

.sc-stat {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text);
}

.sc-card[data-badge-type="kill"]   .sc-stat { color: #cc3333; }
.sc-card[data-badge-type="math"]   .sc-stat { color: #9966dd; }

.sc-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.sc-desc {
    font-family: var(--font-body);
    font-size: 0.80rem;
    color: var(--text-faint);
    line-height: 1.6;
    margin: 0;
}

/* Navigation arrows */
.sc-arrows {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.sc-arrow {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-dim);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.15s ease;
    user-select: none;
}

.sc-arrow:hover {
    border-color: var(--text-faint);
    color: var(--text);
    background: var(--surface-3);
}

/* Dot indicators */
.sc-dots {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-top: 1rem;
}

.sc-dot {
    /* 44×44 actual element — satisfies Lighthouse touch target audit */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
}
/* Visual dot rendered as pseudo-element */
.sc-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    /* Composited-only transitions — no layout/paint */
    transition: transform 0.2s ease, background-color 0.2s ease;
    transform-origin: left center;
}

.sc-dot.active::after {
    background: var(--text-faint);
    transform: scaleX(3);
}

/* Mobile */
@media (max-width: 600px) {
    .sc-card { flex: 0 0 min(320px, calc(100vw - 3rem)); padding: 1.8rem 1.5rem; }
    .sc-stat { font-size: clamp(2.2rem, 9vw, 3.2rem); }
}
@media (max-width: 360px) {
    .sc-card { flex: 0 0 calc(100vw - 2rem); padding: 1.5rem 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   ACHIEVEMENTS PAGE — Kill cards with progressive reveal
   ═══════════════════════════════════════════════════════════════════ */
.achievements-hero {
    padding: 4rem 2rem 2.5rem;
    text-align: center;
    border-bottom: 2px solid var(--border);
}
.achievements-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}
.achievements-sub {
    font-size: 0.88rem;
    color: var(--text-faint);
    max-width: 480px;
    margin: 0 auto 1rem;
    line-height: 1.5;
}
.achievements-count {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-faint);
    letter-spacing: 0.05em;
}

/* ── Kill card ─────────────────────────────────────────────────── */
.kill-card {
    position: relative;
    padding: 3.5rem 2rem;
    border-bottom: 2px solid var(--border);
    max-width: 720px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.kill-card.kill-visible {
    opacity: 1;
    transform: translateY(0);
}

.kill-number {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.kill-desc {
    margin-bottom: 2rem;
}
.kill-setup {
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}
.kill-observation {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-faint);
}

/* ── Kill reveal (hidden until JS adds .revealed) ────────────── */
.kill-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    border-top: 2px solid var(--border);
    padding-top: 1.5rem;
}
.kill-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.kill-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}
.kill-punchline {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-faint);
    margin-bottom: 0.75rem;
}
.kill-paper-link {
    font-size: 0.78rem;
    color: var(--text-faint);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}
.kill-paper-link:hover {
    color: var(--text);
}

/* ── Scoreboard ────────────────────────────────────────────────── */
.achievements-scoreboard {
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 2px solid var(--border);
}
.scoreboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 2px solid var(--border);
    max-width: 720px;
    margin: 0 auto 2rem;
}
.scoreboard-cell {
    padding: 1.5rem 1rem;
    border-right: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.scoreboard-cell:last-child { border-right: none; }
.scoreboard-num {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 800;
}
.scoreboard-label {
    font-size: 0.72rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.scoreboard-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Home page extracted inline styles ────────────────────────── */
.papers-strip-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.papers-strip-header h2 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-faint);
}
.papers-strip-header a {
    font-size: 0.78rem;
    color: var(--text-faint);
}
.paper-cell-more { opacity: 0.6; }
.nav-ask { color: var(--green); }

/* ── Achievements responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .kill-card { padding: 2.5rem 1.5rem; }
    .scoreboard-grid { grid-template-columns: repeat(2, 1fr); }
    .scoreboard-cell:nth-child(2) { border-right: none; }
    .scoreboard-cell:nth-child(-n+2) { border-bottom: 2px solid var(--border); }
}
@media (max-width: 480px) {
    .kill-card { padding: 2rem 1rem; }
    .kill-name { font-size: 1.15rem; }
    .scoreboard-grid { grid-template-columns: 1fr; }
    .scoreboard-cell { border-right: none; border-bottom: 2px solid var(--border); }
    .scoreboard-cell:last-child { border-bottom: none; }
}

/* ── theme-clarity — Product Layer ────────────────────────────────
   Applied to Research Workspace, Atlas, and Void Index.
   Not a demonstration. Beautiful AND functional.
   rule: product pages → theme-clarity. research/papers → mode-constraint.
   ─────────────────────────────────────────────────────────────── */
.theme-clarity {
    --tc-bg:          #08090c;
    --tc-surface:     #0e1014;
    --tc-surface-2:   #13151a;
    --tc-border:      rgba(255,255,255,0.06);
    --tc-border-soft: rgba(255,255,255,0.03);
    --tc-radius:      8px;
    --tc-blur:        12px;
    --tc-ease-spring: cubic-bezier(0.34,1.56,0.64,1);
    --tc-ease-out:    cubic-bezier(0.22,1,0.36,1);

    /* Text */
    --tc-text:        #f0f0f2;
    --tc-text-dim:    #8a8a9a;
    --tc-text-faint:  #44445a;

    /* Score colors (same palette as void-network.js scoreColor()) */
    --tc-score-low:     #3ddc84;
    --tc-score-mid:     #ffdd33;
    --tc-score-high:    #ffaa33;
    --tc-score-crit:    #ff4444;
    --tc-vortex:        #ff3366;

    /* Panel system */
    --tc-panel-bg:     rgba(14,16,20,0.85);
    --tc-panel-border: 1px solid var(--tc-border);

    /* Inspector tint (set via JS: style.setProperty('--tc-tint', color)) */
    --tc-tint:         rgba(255,255,255,0.04);
}

/* Frosted glass panels */
.tc-panel {
    background: var(--tc-panel-bg);
    border: var(--tc-panel-border);
    border-radius: var(--tc-radius);
    backdrop-filter: blur(var(--tc-blur));
    -webkit-backdrop-filter: blur(var(--tc-blur));
}

/* ── Research Workspace Layout ─────────────────────────────────── */
.ws-topbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--tc-surface);
    border-bottom: 1px solid var(--tc-border);
}
.ws-name {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--tc-text);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    outline: none;
    min-width: 0;
}
.ws-name:focus {
    background: var(--tc-surface-2);
    border-radius: 4px;
    padding: 0 0.4rem;
}
.ws-topbar-actions {
    display: flex;
    gap: 0.4rem;
}
.ws-topbar-actions button {
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    background: var(--tc-surface-2);
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    color: var(--tc-text-dim);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.ws-topbar-actions button:hover {
    color: var(--tc-text);
    border-color: rgba(255,255,255,0.15);
}

/* 3-column workspace grid */
.ws-grid {
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    height: calc(100vh - 52px - 40px - 36px); /* nav + topbar + chat handle */
    gap: 0;
    overflow: hidden;
}

/* Sidebar */
.ws-sidebar {
    overflow-y: auto;
    background: var(--tc-surface);
    border-right: 1px solid var(--tc-border);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.ws-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tc-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.25rem;
}
.ws-sidebar-header button {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--tc-surface-2);
    border: 1px solid var(--tc-border);
    color: var(--tc-text-dim);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.ws-sidebar-header button:hover { background: rgba(255,255,255,0.1); }

/* Research tree items */
.ws-tree-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.4rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--tc-text-dim);
    transition: background 0.12s, color 0.12s;
}
.ws-tree-item:hover { background: var(--tc-tint); color: var(--tc-text); }
.ws-tree-item.selected { background: rgba(255,255,255,0.07); color: var(--tc-text); }
.ws-tree-score {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
}

/* Canvas */
.ws-canvas {
    position: relative;
    overflow: hidden;
    background: #06060c;
}
.ws-canvas-toolbar {
    position: absolute;
    top: 8px; left: 8px;
    display: flex;
    gap: 4px;
    z-index: 10;
}
.ws-view-btn {
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-family: var(--font-display);
    font-weight: 700;
    background: rgba(14,16,20,0.85);
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    color: var(--tc-text-dim);
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: color 0.15s, border-color 0.15s;
}
.ws-view-btn.active, .ws-view-btn:hover {
    color: var(--tc-text);
    border-color: rgba(255,255,255,0.2);
}
.ws-node-count {
    font-size: 0.68rem;
    color: var(--tc-text-faint);
    padding: 0.2rem 0.5rem;
    align-self: center;
    font-family: var(--font-mono);
}

/* Empty canvas state */
.ws-canvas-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--tc-text-faint);
    pointer-events: none;
}
.ws-canvas-empty h3 {
    font-size: 1.1rem;
    color: var(--tc-text-dim);
    font-weight: 500;
}
.ws-canvas-empty p { font-size: 0.8rem; text-align: center; max-width: 240px; }

/* Inspector */
.ws-inspector {
    overflow-y: auto;
    background: var(--tc-surface);
    border-left: 1px solid var(--tc-border);
    padding: 0.75rem;
    transition: background 0.4s ease;
}
.ws-inspector-empty {
    color: var(--tc-text-faint);
    font-size: 0.8rem;
    text-align: center;
    padding: 2rem 1rem;
}
.insp-section { margin-bottom: 1rem; }
.insp-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tc-text-faint);
    margin-bottom: 0.4rem;
}
.insp-score-big {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    transition: color 0.3s ease;
}
.insp-phase-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-mono);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--tc-border);
    margin-top: 0.3rem;
}
.insp-phase-badge.vortex, .insp-phase-badge.fisher { background: rgba(139,26,26,0.2); border-color: rgba(139,26,26,0.4); color: #8b1a1a; }
.insp-phase-badge.crystal, .insp-phase-badge.d3 { background: rgba(231,76,60,0.15); border-color: rgba(231,76,60,0.3); color: #e74c3c; }
.insp-phase-badge.fluid, .insp-phase-badge.drifting { background: rgba(230,126,34,0.15); border-color: rgba(230,126,34,0.3); color: #e67e22; }
.insp-phase-badge.gas, .insp-phase-badge.contested { background: rgba(255,170,51,0.15); border-color: rgba(255,170,51,0.3); color: #ffaa33; }
.insp-phase-badge.stable { background: rgba(61,220,132,0.1); border-color: rgba(61,220,132,0.2); color: #3ddc84; }
.insp-phase-badge.coherent { background: rgba(61,220,132,0.15); border-color: rgba(61,220,132,0.3); color: #3ddc84; }
.insp-phase-badge.constraint { background: rgba(0,212,255,0.1); border-color: rgba(0,212,255,0.2); color: #00d4ff; }

/* Score sliders */
.score-slider-row {
    display: grid;
    grid-template-columns: 60px 1fr 24px;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.score-slider-label { font-size: 0.72rem; color: var(--tc-text-dim); }
.score-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--tc-surface-2);
    outline: none;
    cursor: pointer;
}
.score-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--tc-text);
    cursor: pointer;
    transition: transform 0.15s var(--tc-ease-spring);
}
.score-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }
.score-slider-val {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--tc-text-dim);
    text-align: right;
}

/* Modifier checkboxes */
.mod-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.75rem;
    color: var(--tc-text-dim);
    cursor: pointer;
}
.mod-row input[type=checkbox] { cursor: pointer; }

/* Inspector action buttons */
.insp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.insp-btn {
    flex: 1;
    min-width: 80px;
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
    background: var(--tc-surface-2);
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    color: var(--tc-text-dim);
    cursor: pointer;
    text-align: center;
    transition: color 0.15s, border-color 0.15s;
}
.insp-btn:hover { color: var(--tc-text); border-color: rgba(255,255,255,0.15); }
.insp-btn.primary {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: var(--tc-text);
}

/* Evidence pins */
.evidence-pin {
    padding: 0.4rem 0.5rem;
    background: var(--tc-surface-2);
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    font-size: 0.73rem;
    color: var(--tc-text-dim);
    margin-bottom: 0.3rem;
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
}
.evidence-pin-dim {
    font-weight: 700;
    color: var(--tc-text);
    font-size: 0.65rem;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Council panel */
.council-panel {
    background: var(--tc-surface-2);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    padding: 0.6rem;
    margin-top: 0.5rem;
}
.council-advisor {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--tc-border-soft);
    font-size: 0.75rem;
}
.council-advisor:last-child { border-bottom: none; }
.council-advisor-name {
    font-weight: 700;
    font-size: 0.68rem;
    margin-bottom: 0.2rem;
}
.council-advisor.methodology .council-advisor-name { color: #6b8fff; }
.council-advisor.systems .council-advisor-name { color: #b06bff; }
.council-advisor.impact .council-advisor-name { color: #ffaa33; }

/* ── Chat Drawer ──────────────────────────────────────────────── */
.ws-chat-drawer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--tc-surface);
    border-top: 1px solid var(--tc-border);
    z-index: 200;
    transition: height 0.3s var(--tc-ease-out);
}
.ws-chat-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.75rem;
    height: 36px;
    cursor: pointer;
    user-select: none;
    font-size: 0.78rem;
    color: var(--tc-text-dim);
    border-bottom: 1px solid var(--tc-border-soft);
}
.ws-chat-handle:hover { color: var(--tc-text); }
.ws-chat-toggle { font-size: 0.7rem; transition: transform 0.3s; }
.ws-chat-drawer.open .ws-chat-toggle { transform: rotate(180deg); }

.ws-chat-body {
    height: 0;
    overflow: hidden;
    transition: height 0.3s var(--tc-ease-out);
    display: flex;
    flex-direction: column;
}
.ws-chat-drawer.open .ws-chat-body {
    height: 280px;
}
.ws-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.ws-msg {
    max-width: 100%;
    padding: 0.4rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
    line-height: 1.5;
}
.ws-msg-user { background: rgba(255,255,255,0.05); color: var(--tc-text); }
.ws-msg-assistant { color: var(--tc-text-dim); }
.ws-msg-system { color: var(--tc-text-faint); font-size: 0.72rem; font-style: italic; }
.ws-msg-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tc-text-faint);
    margin-bottom: 0.15rem;
}
.ws-chat-input-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--tc-border-soft);
}
.ws-chat-input {
    flex: 1;
    background: var(--tc-surface-2);
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    color: var(--tc-text);
    font-family: var(--font-body);
    font-size: 0.82rem;
    padding: 0.35rem 0.6rem;
    resize: none;
    outline: none;
}
.ws-chat-input:focus { border-color: rgba(255,255,255,0.15); }
.ws-chat-send {
    padding: 0.35rem 0.8rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    color: var(--tc-text);
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.15s;
}
.ws-chat-send:hover { background: rgba(255,255,255,0.12); }
.ws-chat-meta {
    padding: 0.25rem 0.75rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--tc-text-faint);
    font-family: var(--font-mono);
}

/* Tool card within drawer */
.ws-tool-card {
    background: var(--tc-surface-2);
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    font-size: 0.75rem;
    overflow: hidden;
    margin: 0.2rem 0;
}
.ws-tool-card-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    color: var(--tc-text-dim);
}
.ws-tool-card-header:hover { background: var(--tc-tint); }
.ws-tool-name { font-family: var(--font-mono); font-size: 0.7rem; }
.ws-tool-status { margin-left: auto; font-size: 0.68rem; color: var(--tc-text-faint); }
.ws-tool-add-btn {
    margin-left: 0.4rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    background: rgba(61,220,132,0.1);
    border: 1px solid rgba(61,220,132,0.25);
    border-radius: 3px;
    color: #3ddc84;
    cursor: pointer;
    white-space: nowrap;
}
.ws-tool-add-btn:hover { background: rgba(61,220,132,0.18); }

/* Mobile */
@media (max-width: 768px) {
    .ws-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }
    .ws-sidebar, .ws-inspector { display: none; }
    .ws-chat-drawer.open .ws-chat-body { height: 240px; }
}

/* ── CSP-safe utility classes (replaces inline style= in JS-generated HTML) ── */
.text-faint    { color: var(--text-faint); }
.text-dim      { color: var(--text-dim); }
.text-kill     { color: var(--kill); }
.text-red      { color: var(--red); }
.text-green    { color: var(--green); }
.text-accent   { color: #bb86fc; }
.text-mono     { font-family: var(--font-mono); }
.text-sm       { font-size: 0.82rem; }
.text-xs       { font-size: 0.75rem; }
.text-085      { font-size: 0.85rem; }
.text-bold     { font-weight: 700; }
.mt-025        { margin-top: 0.25rem; }
.mt-050        { margin-top: 0.5rem; }
.mt-075        { margin-top: 0.75rem; }

/* ── Version update banner ───────────────────────────────────────────────── */
#version-update-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface-2, #1a1816);
    border: 1px solid var(--border, rgba(255,220,200,0.07));
    border-left: 3px solid var(--accent, #c8976a);
    color: var(--text, #f5f2f0);
    padding: 14px 18px;
    border-radius: 6px;
    z-index: 99999;
    font-family: var(--font-mono, monospace);
    font-size: 13px;
    max-width: 300px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.7);
    animation: version-banner-in 0.3s ease-out;
}
@keyframes version-banner-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
#version-update-banner .vub-title {
    margin-bottom: 4px;
    color: var(--accent, #c8976a);
    font-weight: bold;
    letter-spacing: 0.02em;
}
#version-update-banner .vub-refreshing { color: var(--accent, #c8976a); }
#version-update-banner button {
    background: none;
    border: 1px solid var(--text-faint, #8a8280);
    color: var(--text-dim, #a09890);
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    margin-top: 10px;
    margin-right: 6px;
    transition: border-color 0.2s, color 0.2s;
}
#version-update-banner button:hover {
    border-color: var(--accent, #c8976a);
    color: var(--text, #f5f2f0);
}
#version-update-banner .vub-refresh-btn {
    border-color: var(--accent, #c8976a);
    color: var(--accent, #c8976a);
}

/* ═══════════════════════════════════════════════════════════════════
   CHAPTER / STORY SCROLL — Homepage 5-chapter layout
   ═══════════════════════════════════════════════════════════════════ */

.chapter {
    position: relative;
    z-index: 2;
    padding: 6rem 0;
    border-top: 1px solid var(--border);
    background: var(--bg);
    /* Scroll-reveal start state — JS adds ch-in-view */
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.chapter.ch-in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Alternate surface tone for even chapters */
.chapter.ch-alt {
    background: var(--surface);
}

.ch-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.ch-num {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

.ch-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.ch-subtitle {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 620px;
    margin-bottom: 3rem;
}

/* Two-column alternating feature blocks */
.ch-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    margin-bottom: 3rem;
}

.ch-feature {
    padding: 2rem;
    border-right: 1px solid var(--border);
}
.ch-feature:nth-child(2n) { border-right: none; }
.ch-feature + .ch-feature { border-top: 1px solid var(--border); }
.ch-feature:nth-child(2) { border-top: none; }

.ch-feature-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 0.75rem;
    display: block;
}

.ch-stat-big {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}

.ch-feature p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Three-column track grid */
.ch-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    margin-bottom: 3rem;
}

.ch-track {
    padding: 2rem;
    border-right: 1px solid var(--border);
}
.ch-track:last-child { border-right: none; }

.ch-track-num {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 0.75rem;
}

.ch-track h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.ch-track p {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.ch-track-status {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--border);
    color: var(--text-faint);
}
.ch-track-status.live {
    border-color: var(--green);
    color: var(--green);
}

/* Convergence cards */
.ch-convergences {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    margin-bottom: 3rem;
}

.ch-conv {
    padding: 1.5rem;
    border-right: 1px solid var(--border);
}
.ch-conv:last-child { border-right: none; }

.ch-conv-n {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}

.ch-conv-stat {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    display: block;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.ch-conv-domain {
    font-size: 0.72rem;
    color: var(--text-faint);
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ch-conv p {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* CTA strip */
.ch-ctas {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Hero ticker row */
.hero-ticker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.ticker-stat { text-align: center; }
.ticker-n {
    display: block;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1.2;
}
.ticker-n--green { color: #00ff88; }
.ticker-l {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
}
.ticker-dot {
    color: var(--text-faint);
    font-size: 0.6rem;
    user-select: none;
}

/* Deadline strip */
.ch-deadline {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(220,38,38,0.3);
    background: rgba(220,38,38,0.05);
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.ch-deadline-date {
    font-size: 1rem;
    font-weight: 900;
    color: var(--kill);
    white-space: nowrap;
}

.ch-deadline-text {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.5;
    flex: 1;
}

/* Chapter papers strip */
.ch-papers {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    margin-bottom: 3rem;
}

.ch-paper {
    padding: 1.25rem;
    border-right: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
    display: block;
}
.ch-paper:last-child { border-right: none; }
.ch-paper:hover { background: var(--surface); text-decoration: none; color: var(--text); }

.ch-paper-num {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 0.35rem;
}

.ch-paper-title {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.ch-paper-cc {
    font-size: 0.62rem;
    color: var(--text-faint);
}

/* Self-score grid */
.ch-self-score {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.ch-score-cell {
    padding: 1.5rem 1rem;
    text-align: center;
    border-right: 1px solid var(--border);
}
.ch-score-cell:last-child { border-right: none; }

.ch-score-n {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.ch-score-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* Domain chips strip */
.ch-domains {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.ch-domain-chip {
    padding: 0.3rem 0.8rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    color: var(--text-faint);
    background: var(--surface);
    cursor: default;
}

/* Top platforms row */
.ch-platforms {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    min-height: 80px;
}

.ch-platform-card {
    padding: 1rem;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}
.ch-platform-card:last-child { border-right: none; }
.ch-platform-card:hover { background: var(--surface); text-decoration: none; color: var(--text); }

.ch-platform-name {
    font-size: 0.78rem;
    font-weight: 700;
}
.ch-platform-score {
    font-size: 0.72rem;
    color: var(--kill);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 1024px) {
    .ch-convergences { grid-template-columns: repeat(3, 1fr); }
    .ch-convergences .ch-conv:nth-child(3) { border-right: none; }
    .ch-convergences .ch-conv:nth-child(4),
    .ch-convergences .ch-conv:nth-child(5) { border-top: 1px solid var(--border); }
    .ch-papers { grid-template-columns: repeat(3, 1fr); }
    .ch-papers .ch-paper:nth-child(3n) { border-right: none; }
    .ch-platforms { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .chapter { padding: 4rem 0; }
    .ch-grid-2 { grid-template-columns: 1fr; }
    .ch-feature { border-right: none; }
    .ch-grid-3 { grid-template-columns: 1fr; }
    .ch-track { border-right: none; border-bottom: 1px solid var(--border); }
    .ch-track:last-child { border-bottom: none; }
    .ch-convergences { grid-template-columns: 1fr; }
    .ch-conv { border-right: none; border-bottom: 1px solid var(--border); }
    .ch-conv:last-child { border-bottom: none; }
    .ch-self-score { grid-template-columns: repeat(2, 1fr); }
    .ch-score-cell:nth-child(2) { border-right: none; }
    .ch-score-cell:nth-child(3),
    .ch-score-cell:nth-child(4) { border-top: 1px solid var(--border); }
    .ch-papers { grid-template-columns: repeat(2, 1fr); }
    .ch-platforms { grid-template-columns: repeat(2, 1fr); }
    /* Deadline bar stacks vertically */
    .ch-deadline { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 1rem 1.25rem; }
    .ch-deadline .btn { width: 100%; text-align: center; justify-content: center; }
    /* CTAs go full-width */
    .ch-ctas { flex-direction: column; }
    .ch-ctas .btn { text-align: center; justify-content: center; }
}

@media (max-width: 480px) {
    .ch-self-score { grid-template-columns: 1fr; }
    .ch-score-cell { border-right: none; border-bottom: 1px solid var(--border); }
    .ch-papers { grid-template-columns: 1fr; }
    .ch-platforms { grid-template-columns: 1fr; }
}

/* ── Command Palette (cmd-palette.js) ──────────────────────────────────────
   Opened via ⌘K / Ctrl+K or the nav search button.
   Three layers: pages → papers/platforms → semantic knowledge search.
   BREADCRUMB: when nav is eventually flattened (wikipedia-style), the
   PAGES array in cmd-palette.js becomes the authoritative site map.
   ─────────────────────────────────────────────────────────────────── */

.cp-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(4rem, 12vh, 7rem);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
}
.cp-overlay.cp-open {
    opacity: 1;
    pointer-events: all;
}

.cp-box {
    width: 100%;
    max-width: 600px;
    margin: 0 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    transform: translateY(-6px);
    transition: transform 0.12s ease;
}
.cp-overlay.cp-open .cp-box {
    transform: translateY(0);
}

/* Header row */
.cp-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}
.cp-search-icon {
    color: var(--text-dim);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
#cmd-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    padding: 0;
    line-height: 1.4;
}
#cmd-input::placeholder { color: var(--text-muted); }
.cp-esc-key {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    flex-shrink: 0;
}

/* Results list */
.cp-results {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.cp-results::-webkit-scrollbar { width: 4px; }
.cp-results::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Group headers */
.cp-group {
    padding: 0.55rem 1rem 0.2rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    pointer-events: none;
}

/* Result items */
.cp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    cursor: pointer;
    gap: 0.75rem;
    transition: background 0.07s;
}
.cp-item:hover,
.cp-item.cp-active {
    background: var(--bg-hover);
}
.cp-item-label {
    color: var(--text);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.cp-item-meta {
    color: var(--text-muted);
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Empty / tip / loading */
.cp-empty, .cp-tip {
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
}
.cp-tip {
    border-top: 1px solid var(--border-dim);
    margin-top: 0.3rem;
    padding-top: 0.65rem;
}

/* Footer */
.cp-footer {
    display: flex;
    gap: 1.25rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-dim);
    font-size: 0.68rem;
    color: var(--text-muted);
}
.cp-footer kbd {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-right: 0.2rem;
}

/* Nav App portal CTA */
.nav-app-cta {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.2s;
    margin-left: 0.25rem;
}
.nav-app-cta:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--accent);
    color: var(--accent);
}
.nav-enter-world {
    color: #a78bfa;
    border-color: rgba(167,139,250,0.4);
    letter-spacing: 0.08em;
}
.nav-enter-world:hover {
    background: rgba(167,139,250,0.1);
    border-color: #a78bfa;
    color: #c4b5fd;
    box-shadow: 0 0 16px rgba(167,139,250,0.1);
}
@media (max-width: 768px) {
    .nav-app-cta { margin: 0.25rem 0.75rem; }
}

/* Nav search trigger button */
.nav-search-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-family: inherit;
    padding: 0.3rem 0.65rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    line-height: 1;
}
.nav-search-btn:hover {
    color: var(--text-dim);
    border-color: rgba(255, 220, 200, 0.18);
}
.nav-search-btn .ns-icon {
    display: flex;
    align-items: center;
}
.nav-search-btn kbd {
    font-size: 0.66rem;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.1rem 0.3rem;
    font-family: inherit;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .nav-search-btn .ns-label,
    .nav-search-btn kbd { display: none; }
    .nav-search-btn {
        padding: 0.3rem 0.45rem;
        border-color: transparent;
    }
    .nav-search-btn:hover { border-color: var(--border); }
    .cp-box { margin: 0 0.5rem; }
    .cp-footer { display: none; }
}
