@import url('https://fonts.googleapis.com/css2?family=Playwrite+HR&family=Sora:wght@400;500;600&family=Hanken+Grotesk:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root {
    /* Editorial black & white — dark is the default (fontspace-inspired) */
    --bg: #0a0a0a;
    --panel: #121212;
    --panel-2: #1e1e1e;
    --border: #292929;
    --text: #f2f2f2;
    --muted: #858585;
    --accent: #fafafa;
    --accent-strong: #ffffff;
    --on-accent: #0a0a0a;
    --accent-soft: rgba(255, 255, 255, 0.08);
    --good: #4ade80;
    --warn: #fbbf24;
    --bad: #f87171;
    --radius: 0px;
    /* "Pop" = the single optional accent. Defaults to plain foreground (strict B&W). */
    --pop: var(--accent);
    --on-pop: var(--on-accent);
}

/* Accent mode: one warm gold (infinite-reader's #C9923A), opt-in via <html class="pop"> */
:root.pop { --pop: #c9923a; --on-pop: #1a1206; }
:root.light.pop { --pop: #c9923a; --on-pop: #ffffff; }

/* Light = "Classic" theme */
:root.light {
    --bg: #ffffff;
    --panel: #ffffff;
    --panel-2: #f2f2f2;
    --border: #e2e2e2;
    --text: #0f0f0f;
    --muted: #6a6a6a;
    --accent: #0f0f0f;
    --accent-strong: #000000;
    --on-accent: #fafafa;
    --accent-soft: rgba(0, 0, 0, 0.06);
    --good: #15803d;
    --warn: #b45309;
    --bad: #b91c1c;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: var(--accent); }
a:hover { color: var(--accent-strong); }

h2, h3 { font-family: "Sora", -apple-system, system-ui, sans-serif; }

main {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 20px 80px;
}

header.app-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}
header.app-header h1 {
    font-family: "Playwrite HR", cursive;
    font-size: 44px;
    font-weight: 400;
    line-height: 1;
    margin: 0;
    letter-spacing: 0;
}
header.app-header .sub {
    color: var(--muted);
    font-size: 13px;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover {
    color: var(--text);
    border-color: var(--accent);
}
.theme-toggle.icon-only {
    padding: 5px 7px;
    display: inline-flex;
    align-items: center;
}
.theme-toggle svg { width: 16px; height: 16px; display: block; }

/* Sticky admin header so the Big-screen button stays reachable while scrolling */
header.app-header.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    padding: 12px 0 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* "Big screen" / present buttons — gold-outlined, fill on hover */
.bigscreen-chip,
.bigscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--pop);
    color: var(--pop);
    background: transparent;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.bigscreen-chip {
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 10px;
}
.bigscreen-chip svg { width: 14px; height: 14px; }
.bigscreen-btn {
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 18px;
}
.bigscreen-btn svg { width: 18px; height: 18px; }
.bigscreen-chip:hover,
.bigscreen-btn:hover { background: var(--pop); color: var(--on-pop); }

/* About modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1000;
}
.modal-overlay.open { display: flex; }
.modal {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 540px;
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
    padding: 30px 30px 26px;
}
.modal h2 { font-size: 26px; font-weight: 600; margin: 0 0 16px; }
.modal h3 {
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin: 22px 0 8px;
}
.modal p { font-size: 14px; color: var(--text); margin: 0 0 10px; line-height: 1.6; }
.modal ol { color: var(--text); font-size: 14px; line-height: 1.7; padding-left: 20px; margin: 0; }
.modal ol li { margin-bottom: 6px; }
.modal a { color: var(--pop); }
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.modal-close:hover { color: var(--text); border-color: var(--pop); }
.modal-info {
    border-top: 1px solid var(--border);
    margin-top: 22px;
    padding-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--muted);
}
.modal-info .kofi { display: inline-flex; align-items: center; transition: transform 0.15s ease; }
.modal-info .kofi:hover { transform: scale(1.12); }
.modal-info .kofi svg { width: 15px; height: 15px; display: block; }

/* Settings modal — API key management */
.key-list { list-style: none; padding: 0; margin: 0 0 18px; }
.key-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
}
.key-row .key-meta { min-width: 0; }
.key-row .key-name { font-size: 14px; color: var(--text); }
.key-row .key-sub {
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 11px;
    color: var(--muted);
}
.key-row button.revoke {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    padding: 5px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    flex: none;
}
.key-row button.revoke:hover { color: var(--bad); border-color: var(--bad); }
.key-empty { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.key-reveal {
    border: 1px solid var(--pop);
    border-radius: var(--radius);
    padding: 12px;
    margin: 0 0 18px;
    display: none;
}
.key-reveal.show { display: block; }
.key-reveal .warn { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.key-reveal .val {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.key-reveal code {
    flex: 1;
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--pop);
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 10px;
    overflow-x: auto;
    white-space: nowrap;
}
.settings-connect {
    border-top: 1px solid var(--border);
    margin-top: 20px;
    padding-top: 16px;
}
.settings-connect pre {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    overflow-x: auto;
    font-size: 12px;
    margin: 8px 0 0;
}

/* Feedback modal */
.fb-types { display: flex; gap: 8px; margin: 0 0 16px; }
.fb-type {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: var(--radius);
    padding: 9px 10px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.fb-type svg { width: 15px; height: 15px; flex: none; }
.fb-type:hover { color: var(--text); }
.fb-type.selected { border-color: var(--pop); color: var(--text); }
.modal input.fb-field,
.modal textarea.fb-field {
    width: 100%;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    margin-bottom: 6px;
}
.modal input.fb-field:focus,
.modal textarea.fb-field:focus { border-color: var(--pop); }
.modal textarea.fb-field { min-height: 100px; resize: vertical; }

/* ── Nav drawer (mobile chrome) ─────────────────────────── */
/* Two-class selector so it out-specifies .theme-toggle.icon-only. */
.theme-toggle.nav-burger { display: none; }
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    z-index: 900;
}
.drawer-overlay.open { display: block; }
.drawer {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(290px, 82vw);
    background: var(--panel);
    border-left: 1px solid var(--border);
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.drawer-head .label {
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}
.drawer-close {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 15px 8px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
}
.drawer-item svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.drawer-item:active { background: var(--panel-2); }

/* ── Collapsible panel (admin share) ────────────────────── */
.panel-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}
.panel-toggle h2 { margin: 0; font-size: 18px; font-weight: 600; }
.panel-toggle .chev {
    color: var(--muted);
    transition: transform 0.15s ease;
    flex: none;
}
.panel.collapsed .panel-toggle .chev { transform: rotate(-90deg); }
.panel.collapsed .panel-body { display: none; }
.panel:not(.collapsed) .panel-toggle { margin-bottom: 16px; }

/* ── Overflow guards (all sizes) ────────────────────────── */
body { overflow-x: clip; }
.header-right { min-width: 0; }
header.app-header .sub {
    max-width: 32vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.question, .panel h2, .hero-title { overflow-wrap: break-word; }
.recent-list li { flex-wrap: wrap; row-gap: 6px; }
.code-hint { flex-wrap: wrap; }

/* ── Mobile (≤640px) ────────────────────────────────────── */
@media (max-width: 640px) {
    main { padding: 10px 14px 56px; }
    header.app-header { margin-bottom: 10px; }
    header.app-header h1 { font-size: 30px; }
    header.app-header.sticky-header { padding: 8px 0 8px; }

    /* Header chrome collapses into the drawer; burger appears. */
    .header-right > .theme-toggle:not(.nav-burger) { display: none; }
    .theme-toggle.nav-burger { display: inline-flex; }

    .panel { padding: 16px 14px; margin-bottom: 14px; }
    .section { padding: 22px 0; }
    .section > h2 { font-size: 22px; }

    /* 16px inputs prevent iOS Safari's auto-zoom on focus. */
    input[type="text"], textarea, .fb-field { font-size: 16px !important; }

    /* Hero: calmer watermark, tighter spacing. */
    .hero { padding: 4px 0 28px; }
    .hero-code { font-size: 110px; opacity: 0.05; }

    /* Admin share section stacks; QR centers below the links. */
    .share-grid { grid-template-columns: 1fr; }
    .share-grid .qr { margin: 4px auto 0; }
    .copy-row { flex-wrap: wrap; }
    .copy-row input { min-width: 0; flex: 1 1 100%; }
    .display-code-value { font-size: clamp(90px, 24vw, 160px); }

    /* Thumb-sized controls. */
    .vote-options button { padding: 16px; font-size: 17px; min-height: 52px; }
    button.primary, button.secondary, button.ghost { padding: 12px 16px; min-height: 44px; }
    .btn-row { gap: 10px; }
    .bar { height: 24px; }

    /* Modals become full-width bottom sheets. */
    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal {
        max-width: none;
        width: 100%;
        max-height: 92dvh;
        padding: 22px 18px 28px;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}
.panel h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
}
.panel .panel-sub {
    color: var(--muted);
    font-size: 13px;
    margin: -8px 0 16px;
}

label.field {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

input[type="text"], textarea {
    width: 100%;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
}
input[type="text"]:focus, textarea:focus {
    border-color: var(--accent);
}
textarea { min-height: 110px; resize: vertical; }

.option-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.option-row input { flex: 1; }
.option-row button.icon {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    width: 38px;
    border-radius: var(--radius);
    cursor: pointer;
}
.option-row button.icon:hover { color: var(--bad); border-color: var(--bad); }

button.primary, button.secondary, button.ghost {
    border-radius: var(--radius);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
}
button.primary {
    background: var(--accent);
    color: var(--on-accent);
}
button.primary:hover { background: var(--accent-strong); }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary {
    background: var(--panel-2);
    color: var(--text);
    border-color: var(--border);
}
button.secondary:hover { border-color: var(--accent); }
button.ghost {
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
}
button.ghost:hover { color: var(--text); border-color: var(--accent); }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.error {
    background: rgba(248, 113, 113, 0.1);
    color: var(--bad);
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 13px;
    margin-top: 12px;
}
.success {
    background: rgba(74, 222, 128, 0.1);
    color: var(--good);
    border: 1px solid rgba(74, 222, 128, 0.4);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 13px;
}

/* Share section */
.share-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
}
.share-grid .qr {
    background: white;
    padding: 8px;
    border-radius: var(--radius);
    width: 160px;
    height: 160px;
}
.share-grid .qr img { display: block; width: 100%; height: 100%; }
.copy-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.copy-row input { font-size: 13px; }

/* Full-screen presenter / display view — centered, large, clickable */
.display-stage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3vh 4vw;
    text-align: center;
}
.display-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(24px, 4vh, 56px);
    width: 100%;
    max-width: 1100px;
}
.display-room-name {
    font-size: clamp(24px, 3.2vw, 44px);
    color: var(--muted);
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.02em;
}
.display-code-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(8px, 1.2vh, 18px);
}
.display-code-label {
    font-size: clamp(16px, 2vw, 28px);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.3em;
}
.display-code-value {
    font-family: "Space Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-weight: 700;
    font-size: clamp(120px, 18vw, 280px);
    letter-spacing: 0.08em;
    line-height: 0.9;
    color: var(--accent);
    cursor: pointer;
    user-select: none;
    transition: opacity 0.12s ease;
}
.display-code-value:hover { opacity: 0.85; }
.display-code-value:active { opacity: 0.6; }
.display-qr {
    background: white;
    padding: clamp(12px, 1.5vw, 20px);
    border-radius: var(--radius);
    width: clamp(260px, 30vw, 420px);
    height: clamp(260px, 30vw, 420px);
}
.display-qr img { display: block; width: 100%; height: 100%; }
.display-join-url {
    font-size: clamp(22px, 2.8vw, 40px);
    color: var(--text);
    line-height: 1.2;
    margin: 0;
}
.display-join-url .host {
    font-family: "Space Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 0.2em 0.5em;
    border-radius: var(--radius);
    margin-left: 0.3em;
    color: var(--accent);
    cursor: pointer;
    user-select: none;
    transition: opacity 0.12s ease;
    display: inline-block;
}
.display-join-url .host:hover { opacity: 0.85; }
.display-join-url .host:active { opacity: 0.6; }

/* Toast that fades in when something is copied */
.copy-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    font-size: 18px;
    padding: 12px 22px;
    border-radius: var(--radius);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 9999;
}
.copy-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.display-fallback {
    color: var(--bad);
    font-size: 20px;
    text-align: center;
    padding: 60px 20px;
}

/* Code-as-fallback hint inside the share panel */
.code-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 12px;
}
.code-hint .label {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.code-hint .code {
    font-family: "Space Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--accent);
    line-height: 1;
}
.code-hint .where {
    color: var(--muted);
    font-size: 13px;
    margin-left: auto;
}

/* Join-by-code input */
.code-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.code-input {
    flex: 1;
    font-size: 36px;
    letter-spacing: 0.25em;
    text-align: center;
    text-transform: uppercase;
    font-family: "Space Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    color: var(--accent);
    outline: none;
}
.code-input:focus { border-color: var(--accent); }

/* Results */
.question {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px;
}
.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 24px;
}
.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
}
.status-pill.open { background: rgba(74, 222, 128, 0.15); color: var(--good); }
.status-pill.closed { background: rgba(248, 113, 113, 0.15); color: var(--bad); }

.result-row {
    margin-bottom: 14px;
}
.result-row .label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}
.result-row .label .pct {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.bar {
    height: 28px;
    background: var(--panel-2);
    border-radius: var(--radius);
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: var(--muted);
    transition: width 0.4s ease;
    min-width: 0;
}
.result-row.winner .bar-fill { background: var(--accent); }

/* Vote screen */
.vote-options { display: flex; flex-direction: column; gap: 10px; }
.vote-options button {
    text-align: left;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}
.vote-options button:hover:not(:disabled) {
    border-color: var(--accent);
    transform: translateY(-1px);
}
.vote-options button.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.vote-options button:disabled { opacity: 0.6; cursor: not-allowed; }

/* Recent polls list */
.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 14px;
}
.recent-list li .q { color: var(--text); flex: 1; margin-right: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list li a { font-size: 13px; }

/* ── Home / landing: editorial layout (hero + numbered hairline sections) ── */
.kicker {
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
    margin: 0 0 14px;
}
.kicker .num { color: var(--pop); font-weight: 700; }

.hero {
    position: relative;
    overflow: hidden;
    padding: 8px 0 40px;
}
.hero > .kicker,
.hero-title,
.hero-tagline { position: relative; z-index: 1; }
.hero-title {
    font-family: "Sora", -apple-system, system-ui, sans-serif;
    font-weight: 600;
    font-size: clamp(34px, 6.2vw, 62px);
    line-height: 1.02;
    letter-spacing: -0.025em;
    margin: 0 0 18px;
    max-width: 16ch;
}
.hero-tagline {
    font-style: italic;
    color: var(--muted);
    font-size: clamp(15px, 2.2vw, 19px);
    line-height: 1.5;
    margin: 0;
    max-width: 46ch;
}
.hero-code {
    position: absolute;
    top: 50%;
    right: -0.04em;
    transform: translateY(-46%);
    z-index: 0;
    font-family: "Space Mono", ui-monospace, monospace;
    font-weight: 700;
    font-size: clamp(140px, 24vw, 300px);
    letter-spacing: 0.05em;
    line-height: 1;
    color: var(--pop);
    opacity: 0.13;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.section {
    border-top: 1px solid var(--border);
    padding: 30px 0;
}
main.home .section:last-child { border-bottom: 1px solid var(--border); }
.section > h2 {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 8px;
}
.section .panel-sub { margin: 0 0 18px; }

/* Site footer — copyright + attribution + Ko-fi heart */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 44px;
    padding: 22px 0 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.03em;
    color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .kofi { display: inline-flex; align-items: center; transition: transform 0.15s ease; }
.site-footer .kofi:hover { transform: scale(1.12); }
.site-footer .kofi svg { width: 15px; height: 15px; display: block; }

/* Landing CTA picks up the optional accent.
   Needs to out-specify `button.primary` (0,1,1), hence the chained selector. */
button.primary.cta-pop {
    background: var(--pop);
    color: var(--on-pop);
    border-color: var(--pop);
}
button.primary.cta-pop:hover { background: var(--pop); border-color: var(--pop); filter: brightness(1.12); }

/* Spread the accent across the landing so the A/B is unmistakable.
   In strict B&W these all resolve to plain foreground and nothing changes. */
main.home a { color: var(--pop); }
main.home .code-input { color: var(--pop); }
main.home input[type="text"]:focus,
main.home textarea:focus,
main.home .code-input:focus { border-color: var(--pop); }

