/* ============================================
   Blind Test VDL — Les Wizards
   Arcane laboratory — dark chrome + parchment specimens
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Figtree:wght@300..900&display=swap');

:root {
    /* Dark chrome (outside the specimens) */
    --bg: #0a0912;
    --bg-deep: #06050c;
    --bg-card: #14121f;
    --bg-card-hover: #1a1828;
    --bg-inset: #0e0c18;

    --text: #ece8f5;
    --text-dim: #9690ad;
    --text-muted: #645e7a;

    /* Parchment (inside the email specimens) */
    --paper: #f3ede0;
    --paper-warm: #ebe3d1;
    --paper-ink: #1a1710;
    --paper-ink-dim: #5a5240;
    --paper-ink-muted: #7d7460;
    --paper-border: rgba(26, 23, 16, 0.12);
    --paper-rule: rgba(26, 23, 16, 0.18);

    /* Accents */
    --accent: #c4a6ff;
    --accent-dark: #8b5cf6;
    --accent-glow: rgba(167, 139, 250, 0.35);

    --copy: #7cb7ff;
    --copy-glow: rgba(96, 165, 250, 0.25);
    --claude: #ffb547;
    --claude-glow: rgba(245, 158, 11, 0.25);

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --border-hover: rgba(255, 255, 255, 0.2);

    --success: #4ade80;
    --danger: #f87171;

    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 24px 60px rgba(0, 0, 0, 0.55), 0 4px 16px rgba(0, 0, 0, 0.4);

    --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
    --font-body: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    text-rendering: optimizeLegibility;
}

/* Atmospheric background: radial glow + subtle grain */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(139, 92, 246, 0.12), transparent 60%),
        radial-gradient(ellipse 60% 50% at 85% 100%, rgba(245, 158, 11, 0.06), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.08 0' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    mix-blend-mode: overlay;
}

body > * {
    position: relative;
    z-index: 1;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

a:hover {
    color: #e6d4ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-variation-settings: "opsz" 144, "SOFT" 50;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-top: 0;
}

::selection {
    background: var(--accent-glow);
    color: var(--text);
}

/* ============================================
   LANDING (index.php)
   ============================================ */

body.landing {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

body.landing main {
    width: 100%;
    max-width: 540px;
    animation: riseIn 0.7s var(--ease) both;
}

.card {
    background: linear-gradient(180deg, var(--bg-card), var(--bg-inset));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 48px 40px 40px;
    box-shadow: var(--shadow-lift);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.logo {
    font-size: 56px;
    text-align: center;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 16px var(--accent-glow));
}

.card h1 {
    font-size: clamp(32px, 5vw, 42px);
    text-align: center;
    margin-bottom: 14px;
    font-weight: 300;
    font-style: italic;
    letter-spacing: -0.03em;
}

.lead {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 36px;
    font-size: 15px;
    line-height: 1.65;
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
}

.rules {
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 26px;
    margin-bottom: 32px;
}

.rules h2 {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.rules ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
    list-style: none;
}

.rules li {
    margin-bottom: 8px;
    font-size: 14px;
    position: relative;
    padding-left: 16px;
}

.rules li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 9px;
    top: 6px;
}

form label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
}

input[type="text"] {
    width: 100%;
    padding: 16px 18px;
    background: var(--bg-deep);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

input[type="text"]::placeholder {
    color: var(--text-muted);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

button[type="submit"], .btn-primary {
    display: block;
    width: 100%;
    margin-top: 22px;
    padding: 16px 28px;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
    color: #0a0912;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}

button[type="submit"]:hover, .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.5);
}

button[type="submit"]:active {
    transform: translateY(0) scale(0.99);
}

.error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 10px;
    margin-bottom: 0;
}

.footnote {
    text-align: center;
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ============================================
   TOPBAR (quiz, reveal, results)
   ============================================ */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 9, 18, 0.82);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--border);
}

.topbar::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
}

.topbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.voter-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 100px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topbar-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-style: italic;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0.01em;
}

.topbar-link {
    font-size: 13px;
    color: var(--text-dim);
}

.progress-wrap {
    flex: 1;
    max-width: 380px;
    min-width: 0;
}

.progress-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--claude));
    border-radius: 100px;
    box-shadow: 0 0 12px var(--accent-glow);
    transition: width 0.6s var(--ease);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35));
    border-radius: 100px;
}

/* ============================================
   QUIZ
   ============================================ */

.quiz-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 44px 28px 100px;
}

.instructions {
    text-align: center;
    margin-bottom: 44px;
    padding: 0 16px;
    animation: riseIn 0.7s var(--ease) 0.05s both;
}

.instructions h2 {
    font-size: clamp(28px, 4.5vw, 42px);
    font-weight: 300;
    font-style: italic;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
    background: linear-gradient(180deg, var(--text) 30%, var(--text-dim));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.instructions p {
    color: var(--text-dim);
    max-width: 62ch;
    margin: 0 auto;
    font-size: 14.5px;
    line-height: 1.7;
}

.instructions strong {
    color: var(--text);
    font-weight: 600;
}

.pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 36px;
}

.email-card {
    background: var(--paper);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s var(--ease);
    overflow: hidden;
    position: relative;
    animation: riseIn 0.7s var(--ease) both;
}

.email-card[data-version="A"] { animation-delay: 0.1s; }
.email-card[data-version="B"] { animation-delay: 0.18s; }

.email-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.email-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
    border-color: var(--border-hover);
}

.email-header {
    padding: 22px 28px 18px;
    background: linear-gradient(180deg, #14121f, #100e1a);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding: 5px 11px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-version="A"] .badge {
    background: rgba(124, 183, 255, 0.12);
    color: var(--copy);
    border-color: rgba(124, 183, 255, 0.3);
    box-shadow: 0 0 12px var(--copy-glow);
}

[data-version="B"] .badge {
    background: rgba(255, 181, 71, 0.12);
    color: var(--claude);
    border-color: rgba(255, 181, 71, 0.3);
    box-shadow: 0 0 12px var(--claude-glow);
}

.email-subject {
    margin: 0;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.35;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* Parchment reading area */
.email-body {
    padding: 28px 32px;
    flex: 1;
    max-height: min(60vh, 620px);
    overflow-y: auto;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.75;
    color: var(--paper-ink);
    background: var(--paper);
    background-image:
        radial-gradient(ellipse 100% 100% at 50% 0%, rgba(255, 255, 255, 0.4), transparent 70%),
        radial-gradient(ellipse 80% 60% at 100% 100%, rgba(26, 23, 16, 0.04), transparent 70%);
    scrollbar-width: thin;
    scrollbar-color: var(--paper-rule) transparent;
}

.email-body::-webkit-scrollbar {
    width: 10px;
}

.email-body::-webkit-scrollbar-track {
    background: transparent;
}

.email-body::-webkit-scrollbar-thumb {
    background: var(--paper-rule);
    border-radius: 10px;
    border: 2px solid var(--paper);
}

.email-body::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 23, 16, 0.3);
}

.email-body h1,
.email-body h2,
.email-body h3 {
    font-family: var(--font-display);
    color: var(--paper-ink);
    letter-spacing: -0.015em;
}

.email-body h1 {
    font-size: 22px;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 18px;
    line-height: 1.2;
}

.email-body h2 {
    font-size: 18px;
    font-weight: 500;
    margin-top: 26px;
    margin-bottom: 12px;
}

.email-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 22px;
    margin-bottom: 10px;
}

.email-body p {
    margin: 0 0 16px;
}

.email-body strong {
    color: var(--paper-ink);
    font-weight: 700;
}

.email-body em {
    color: var(--paper-ink-dim);
    font-style: italic;
}

.email-body ul, .email-body ol {
    padding-left: 22px;
    margin: 12px 0 18px;
}

.email-body li {
    margin-bottom: 8px;
}

.email-body a {
    color: #6b4fbb;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.15s var(--ease);
}

.email-body a:hover {
    color: #4a2f9e;
}

.email-body hr {
    border: none;
    border-top: 1px solid var(--paper-rule);
    margin: 22px 0;
}

.email-body blockquote {
    margin: 16px 0;
    padding: 8px 0 8px 20px;
    border-left: 3px solid var(--paper-rule);
    color: var(--paper-ink-dim);
    font-style: italic;
}

.choose-btn {
    display: block;
    width: 100%;
    margin: 0;
    padding: 18px 22px;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s var(--ease), transform 0.1s var(--ease);
    text-transform: uppercase;
}

.choose-a {
    background: linear-gradient(180deg, rgba(124, 183, 255, 0.1), rgba(124, 183, 255, 0.18));
    color: var(--copy);
}

.choose-a:hover {
    background: linear-gradient(180deg, rgba(124, 183, 255, 0.18), rgba(124, 183, 255, 0.28));
    box-shadow: inset 0 0 30px var(--copy-glow);
}

.choose-b {
    background: linear-gradient(180deg, rgba(255, 181, 71, 0.1), rgba(255, 181, 71, 0.18));
    color: var(--claude);
}

.choose-b:hover {
    background: linear-gradient(180deg, rgba(255, 181, 71, 0.18), rgba(255, 181, 71, 0.28));
    box-shadow: inset 0 0 30px var(--claude-glow);
}

.choose-btn:active {
    transform: scale(0.995);
}

.indifferent-wrap {
    text-align: center;
    margin-top: 20px;
    animation: riseIn 0.7s var(--ease) 0.25s both;
}

.indifferent-btn {
    padding: 12px 28px;
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-dim);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
    letter-spacing: 0.01em;
}

.indifferent-btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: var(--bg-card);
}

/* ============================================
   REVEAL
   ============================================ */

.reveal-main {
    max-width: 920px;
    margin: 0 auto;
    padding: 52px 28px 100px;
}

.reveal-hero {
    text-align: center;
    margin-bottom: 40px;
    animation: riseIn 0.7s var(--ease) both;
}

.reveal-hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 300;
    font-style: italic;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.reveal-hero .lead {
    color: var(--text-dim);
    font-size: 16px;
    max-width: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 36px;
    animation: riseIn 0.7s var(--ease) 0.1s both;
}

.stat-card {
    background: linear-gradient(180deg, var(--bg-card), var(--bg-inset));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    opacity: 0.8;
}

.stat-copywriter::before { background: linear-gradient(90deg, transparent, var(--copy), transparent); }
.stat-claude::before { background: linear-gradient(90deg, transparent, var(--claude), transparent); }
.stat-neutral::before { background: linear-gradient(90deg, transparent, var(--text-muted), transparent); }

.stat-number {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 300;
    font-variation-settings: "opsz" 144;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.04em;
}

.stat-copywriter .stat-number { color: var(--copy); }
.stat-claude .stat-number { color: var(--claude); }
.stat-neutral .stat-number { color: var(--text-dim); }

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-percent {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.verdict {
    text-align: center;
    font-family: var(--font-display);
    font-size: 19px;
    font-style: italic;
    font-weight: 400;
    color: var(--text);
    padding: 26px 28px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-inset));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    margin-bottom: 48px;
    line-height: 1.45;
    animation: riseIn 0.7s var(--ease) 0.18s both;
}

.reveal-main h2 {
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 22px;
    color: var(--text);
}

.reveal-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reveal-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    transition: border-color 0.2s var(--ease);
}

.reveal-item:hover {
    border-color: var(--border-hover);
}

.reveal-pos {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.reveal-subjects {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.sub-copy, .sub-claude {
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}

.sub-title {
    flex: 1;
}

.tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 4px 10px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.tag-copywriter {
    background: rgba(124, 183, 255, 0.12);
    color: var(--copy);
    border: 1px solid rgba(124, 183, 255, 0.25);
}

.tag-claude {
    background: rgba(255, 181, 71, 0.12);
    color: var(--claude);
    border: 1px solid rgba(255, 181, 71, 0.25);
}

.tag-neutral {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.reveal-choice {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    background: var(--bg-deep);
}

.reveal-choice strong {
    color: inherit;
    font-weight: 700;
}

.reveal-choice.picked-copywriter {
    background: rgba(124, 183, 255, 0.08);
    color: var(--copy);
    border: 1px solid rgba(124, 183, 255, 0.2);
}

.reveal-choice.picked-claude {
    background: rgba(255, 181, 71, 0.08);
    color: var(--claude);
    border: 1px solid rgba(255, 181, 71, 0.2);
}

.reveal-choice.picked-neutral {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.reveal-footer {
    margin-top: 48px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.btn-secondary {
    display: inline-block;
    padding: 13px 26px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 100px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.02em;
    transition: border-color 0.2s var(--ease), transform 0.15s var(--ease), background 0.2s var(--ease);
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    padding: 13px 18px;
    transition: color 0.2s var(--ease);
}

.btn-link:hover {
    color: var(--text-dim);
}

/* ============================================
   RESULTS DASHBOARD
   ============================================ */

.results-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 52px 28px 100px;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state h1 {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 300;
    font-style: italic;
    margin-bottom: 14px;
}

.empty-state p {
    color: var(--text-dim);
    margin-bottom: 28px;
}

.empty-state .btn-primary {
    display: inline-block;
    width: auto;
    padding: 15px 34px;
    text-decoration: none;
}

.global-stats {
    margin-bottom: 56px;
}

.global-stats h1 {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 300;
    font-style: italic;
    margin-bottom: 6px;
    letter-spacing: -0.025em;
}

.subtitle {
    color: var(--text-dim);
    margin-bottom: 28px;
    font-size: 14px;
}

.per-email, .voters-matrix {
    margin-bottom: 56px;
}

.per-email h2, .voters-matrix h2 {
    font-size: 22px;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 20px;
}

.table-wrap, .matrix-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-card);
    -webkit-overflow-scrolling: touch;
}

.results-table, .matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.results-table th, .matrix-table th {
    background: var(--bg-inset);
    padding: 14px 16px;
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.results-table td, .matrix-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.results-table tr:last-child td, .matrix-table tr:last-child td {
    border-bottom: none;
}

.results-table tbody tr, .matrix-table tbody tr {
    transition: background 0.15s var(--ease);
}

.results-table tbody tr:hover, .matrix-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.subjects-cell {
    max-width: 500px;
}

.subject-line {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.subject-line:last-child {
    margin-bottom: 0;
}

td.num {
    text-align: center;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.winner-cell {
    text-align: center;
    font-weight: 700;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 15px;
}

.winner-copy { color: var(--copy); }
.winner-claude { color: var(--claude); }
.winner-tie { color: var(--text-dim); }

.matrix-table .cell {
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    min-width: 42px;
    font-variant-numeric: tabular-nums;
}

.cell-copy {
    background: rgba(124, 183, 255, 0.1);
    color: var(--copy);
}

.cell-claude {
    background: rgba(255, 181, 71, 0.1);
    color: var(--claude);
}

.cell-neutral {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
}

.cell-empty {
    color: var(--text-muted);
}

.voter-name {
    font-weight: 700;
    color: var(--text);
}

.voter-status {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.legend {
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.02em;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@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;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet: stack the email pair */
@media (max-width: 960px) {
    .pair {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .topbar-inner {
        padding: 14px 20px;
    }

    .quiz-main {
        padding: 32px 20px 80px;
    }

    .reveal-main, .results-main {
        padding: 40px 20px 80px;
    }

    .email-body {
        max-height: 54vh;
    }
}

/* Mobile: tighter spacing, smaller type, better tap targets */
@media (max-width: 640px) {
    body.landing {
        padding: 16px;
    }

    .card {
        padding: 36px 24px 32px;
        border-radius: var(--radius);
    }

    .logo {
        font-size: 48px;
    }

    .rules {
        padding: 18px 20px;
    }

    .topbar-inner {
        padding: 12px 16px;
        gap: 12px;
    }

    .voter-badge {
        font-size: 12px;
        padding: 6px 11px;
    }

    .progress-wrap {
        max-width: 160px;
    }

    .progress-label {
        font-size: 10px;
    }

    .quiz-main {
        padding: 24px 14px 64px;
    }

    .instructions {
        margin-bottom: 28px;
        padding: 0 4px;
    }

    .instructions h2 {
        font-size: 26px;
    }

    .instructions p {
        font-size: 14px;
    }

    .pair {
        gap: 20px;
        margin-bottom: 24px;
    }

    .email-header {
        padding: 18px 20px 14px;
    }

    .email-subject {
        font-size: 16px;
    }

    .email-body {
        padding: 22px 22px;
        max-height: 50vh;
        font-size: 14.5px;
        line-height: 1.7;
    }

    .email-body h1 { font-size: 19px; }
    .email-body h2 { font-size: 16px; }
    .email-body h3 { font-size: 15px; }

    .choose-btn {
        padding: 16px 18px;
        font-size: 13.5px;
    }

    .reveal-main, .results-main {
        padding: 32px 14px 64px;
    }

    .reveal-hero {
        margin-bottom: 28px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 28px;
    }

    .stat-card {
        padding: 22px 20px;
    }

    .stat-number {
        font-size: 52px;
    }

    .verdict {
        font-size: 16px;
        padding: 20px 22px;
        margin-bottom: 36px;
    }

    .reveal-item {
        padding: 16px 18px;
    }

    .sub-copy, .sub-claude {
        font-size: 13px;
        gap: 10px;
    }

    .reveal-footer {
        margin-top: 36px;
        flex-direction: column;
        gap: 10px;
    }

    .btn-secondary, .btn-link {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .results-table, .matrix-table {
        font-size: 13px;
    }

    .results-table th, .matrix-table th {
        padding: 11px 12px;
    }

    .results-table td, .matrix-table td {
        padding: 12px;
    }
}

/* Extra small: squeeze the topbar */
@media (max-width: 420px) {
    .topbar-inner {
        padding: 11px 12px;
        gap: 10px;
    }

    .voter-badge {
        font-size: 11px;
        padding: 5px 10px;
    }

    .progress-wrap {
        max-width: 130px;
    }

    .instructions h2 {
        font-size: 23px;
    }

    .email-body {
        padding: 20px 18px;
    }

    .email-header {
        padding: 16px 18px 12px;
    }
}
