:root {
    --bg: #0a0e14;
    --bg-card: #1f2937;
    --border: #374151;
    --border-subtle: #1a2332;
    --text: #e6edf3;
    --text-secondary: #9ca3af;
    --text-muted: #7a9ab8;
    --link: #60a5fa;
    --accent: #7ee787;
    --green: #238636;
    --green-text: #6ee7b7;
    --green-bg: #065f46;
    --red: #da3633;
    --red-text: #fca5a5;
    --red-bg: #7f1d1d;
    --amber: #d29922;
    --amber-text: #fde68a;
    --amber-bg: #713f12;
    --gray: #484f58;
    --gray-text: #9ca3af;
    --gray-bg: #374151;
    --blue: #1f6feb;
    --blue-text: #93c5fd;
    --blue-bg: #1e3a5f;
    --tag-bg: #1e3a5f;
    --tag-text: #93c5fd;
    --max-width: 960px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    --font-serif: Georgia, 'Times New Roman', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.card-link { text-decoration: none; color: inherit; }
.card-link:hover { text-decoration: none; }

.empty-state { color: var(--text-secondary); }

/* Navigation */
.site-nav { border-bottom: 1px solid var(--border-subtle); padding: 12px 24px; }
.nav-inner { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.nav-logo { font-weight: 700; font-size: 14px; color: var(--accent); font-family: var(--font-mono); text-decoration: none; }
.nav-logo:hover { text-decoration: none; opacity: 0.9; }
.nav-links { display: flex; gap: 20px; font-size: 13px; font-family: var(--font-mono); align-items: center; }
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-github { color: var(--text-muted); display: flex; align-items: center; }
.nav-github:hover { color: var(--text); }
.nav-github svg { fill: currentColor; }

/* Layout */
.content { max-width: var(--max-width); margin: 0 auto; padding: 32px 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border-subtle); padding: 24px; text-align: center; color: var(--text-muted); font-size: 12px; font-family: var(--font-mono); }
.footer-inner { max-width: var(--max-width); margin: 0 auto; }

/* Badges — all 8 verdict categories */
.badge { display: inline-block; padding: 3px 10px; border-radius: 4px; font-weight: 700; font-size: 11px; text-transform: uppercase; font-family: var(--font-mono); }
.badge-proved { background: var(--green); color: white; }
.badge-proved-qualified { background: var(--amber-bg); color: var(--amber-text); }
.badge-disproved { background: var(--red-bg); color: var(--red-text); }
.badge-disproved-qualified { background: var(--red-bg); color: var(--red-text); }
.badge-partial { background: var(--amber-bg); color: var(--amber-text); }
.badge-undetermined { background: var(--gray-bg); color: var(--gray-text); }
.badge-supported { background: var(--blue-bg); color: var(--blue-text); }
.badge-supported-qualified { background: var(--blue-bg); color: var(--blue-text); }

/* Verdict symbols — scoped to verdict-banner only */
.verdict-banner .badge-proved::before { content: "\2713 "; }
.verdict-banner .badge-proved-qualified::before { content: "\2713 "; }
.verdict-banner .badge-disproved::before { content: "\2717 "; }
.verdict-banner .badge-disproved-qualified::before { content: "\2717 "; }
.verdict-banner .badge-partial::before { content: "\25D0 "; }
.verdict-banner .badge-undetermined::before { content: "? "; }
.verdict-banner .badge-supported::before { content: "\2713 "; }
.verdict-banner .badge-supported-qualified::before { content: "\2713 "; }

/* Tags */
.tag { display: inline-block; background: var(--tag-bg); color: var(--tag-text); font-size: 11px; padding: 3px 10px; border-radius: 14px; }

/* Hero */
.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 { font-size: 28px; font-weight: 700; font-family: var(--font-mono); margin-bottom: 8px; }
.hero-subtitle { color: var(--text-muted); font-size: 13px; font-family: var(--font-mono); margin-bottom: 24px; }
.stats { display: flex; justify-content: center; gap: 48px; margin-bottom: 24px; }
.stat { text-align: center; }
.stat-value { font-size: 32px; font-weight: 700; color: var(--accent); font-family: var(--font-mono); }
.stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; font-family: var(--font-mono); margin-top: 2px; }
.cta { display: inline-block; padding: 8px 20px; background: var(--green); color: white; border-radius: 6px; font-weight: 600; font-family: var(--font-mono); font-size: 13px; }
.cta:hover { text-decoration: none; opacity: 0.9; }
.cta-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cta-secondary { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); }

/* Trust line */
.hero-trust { color: var(--text-secondary); font-size: 12px; font-family: var(--font-mono); margin-bottom: 24px; }

/* Secondary action links (not buttons) */
.cta-links { display: flex; justify-content: center; gap: 20px; margin-top: 12px; }
.cta-links a { color: var(--text-secondary); font-size: 12px; font-family: var(--font-mono); }
.cta-links a:hover { color: var(--text); }

/* GitHub stars badge */
.github-stars { display: flex; justify-content: center; margin-top: 16px; }
.github-stars img { height: 20px; }

/* Hero live proof demo (progressive enhancement) */
.hero-demo {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    text-align: left;
    max-width: 640px;
    margin: 0 auto 24px;
}
.hero-pipeline-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 4px;
}
.hero-pipeline-vertical .pipeline-icon {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: var(--bg-card);
    margin-bottom: 0;
}
.hero-pipeline-vertical .pipeline-icon.verdict-icon {
    border-color: var(--green);
    background: var(--green-bg);
    color: var(--accent);
}
.hero-pipeline-vertical .pipeline-arrow-down {
    text-align: center;
    color: var(--border);
    font-size: 10px;
    line-height: 1;
}
.hero-demo-proof {
    flex: 1;
}
.hero-demo-claim {
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 12px;
    border-left: 2px solid var(--border);
    padding-left: 12px;
}
.hero-demo-label {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    display: block;
    margin-bottom: 4px;
}
.hero-demo-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.hero-demo-sources {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.hero-demo-link {
    color: var(--link);
    font-size: 12px;
    font-family: var(--font-mono);
    margin-top: 8px;
    display: inline-block;
}

@media (max-width: 640px) {
    .hero-demo {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-pipeline-vertical {
        display: none;
    }
}

/* How-it-works pipeline */
.pipeline { display: flex; align-items: stretch; gap: 0; margin-bottom: 32px; max-width: 720px; margin-left: auto; margin-right: auto; }
.pipeline-step { flex: 1; text-align: center; position: relative; }
.pipeline-icon { font-size: 20px; margin-bottom: 6px; }
.pipeline-label { font-size: 11px; font-family: var(--font-mono); color: var(--text); font-weight: 700; margin-bottom: 4px; }
.pipeline-desc { font-size: 10px; font-family: var(--font-mono); color: var(--text-muted); line-height: 1.4; }
.pipeline-arrow { display: flex; align-items: center; color: var(--accent); font-size: 18px; font-family: var(--font-mono); padding: 0 4px; margin-top: -8px; }

/* Interactive pipeline accordion (enhanced state) */
.pipeline-accordion { max-width: 720px; margin: 0 auto 32px; }
.pipeline-step-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; cursor: pointer;
    border: 1px solid var(--border-subtle); border-radius: 6px;
    margin-bottom: 4px; transition: border-color 0.2s;
}
.pipeline-step-row:hover,
.pipeline-step-row:focus-visible { border-color: var(--accent); outline: none; }
.pipeline-step-row .pipeline-icon { margin-bottom: 0; min-width: 28px; text-align: center; }
.pipeline-step-row .pipeline-label { font-weight: 700; }
.pipeline-step-row .pipeline-chevron { margin-left: auto; font-family: var(--font-mono); color: var(--text-muted); transition: transform 0.2s; }
.pipeline-step-row[aria-expanded="true"] .pipeline-chevron { transform: rotate(90deg); }
.pipeline-step-content {
    overflow: hidden; max-height: 0; opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    padding: 0 14px; margin-bottom: 4px;
}
.pipeline-step-content[data-open="true"] {
    opacity: 1; padding: 12px 14px;
    /* max-height set by JS for animated expand; falls back to none */
}
.pipeline-step-content pre {
    background: var(--bg-alt); border: 1px solid var(--border-subtle);
    border-radius: 4px; padding: 10px 12px; overflow-x: auto;
    font-size: 12px; line-height: 1.5;
}
.pipeline-step-content .source-badge {
    display: inline-block; font-size: 10px; padding: 2px 6px;
    border: 1px solid var(--border); border-radius: 3px;
    font-family: var(--font-mono); color: var(--text-muted);
    margin-left: 6px;
}
.pipeline-step-content .cit-row {
    display: flex; gap: 8px; align-items: baseline;
    font-size: 12px; line-height: 1.6; margin-bottom: 4px;
}
.pipeline-step-content .cit-row .fact-id {
    font-family: var(--font-mono); color: var(--text-muted);
    min-width: 24px;
}

/* Myth-busting cards */
.myth-subtext { font-size: 12px; font-family: var(--font-mono); color: var(--text-muted); margin-bottom: 16px; }
#myth-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 24px; }
.myth-card {
    border: 1px solid var(--border-subtle); border-radius: 8px;
    padding: 16px; cursor: default;
    transition: border-color 0.3s, background-color 0.3s;
}
.myth-card-thumb { float: right; width: 64px; height: 64px; border-radius: 6px; margin: 0 0 8px 12px; object-fit: cover; }
.myth-card-claim { font-family: Georgia, 'Times New Roman', serif; font-size: 15px; line-height: 1.4; margin-bottom: 8px; color: var(--text); }
.myth-card-meta { margin-bottom: 8px; }
.myth-card-reveal-state { margin-bottom: 6px; }
.myth-card-reveal-state .badge-hidden { font-size: 10px; color: var(--text-muted); border: 1px dashed var(--border); padding: 2px 8px; border-radius: 3px; }
.myth-card-summary { font-size: 12px; font-family: var(--font-mono); color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }
.myth-card-link { font-size: 12px; font-family: var(--font-mono); color: var(--accent); }

/* Myth card — JS-enhanced hidden states */
.myth-card.myth-enhanced .myth-card-verdict-badge,
.myth-card.myth-enhanced .myth-card-summary { opacity: 0; transition: opacity 0.3s; }
.myth-card.myth-enhanced .badge-hidden { display: inline-block; }
.myth-card.myth-enhanced.myth-revealed .myth-card-verdict-badge { opacity: 1; }
.myth-card.myth-enhanced.myth-revealed .myth-card-summary { opacity: 1; }
.myth-card.myth-enhanced.myth-revealed .badge-hidden { display: none; }
.myth-card.myth-enhanced.myth-revealed { cursor: pointer; }

/* Verdict-colored borders on reveal */
.myth-card.myth-revealed[data-verdict-category="disproved"],
.myth-card.myth-revealed[data-verdict-category="disproved-qualified"] { border-color: var(--red, #e05252); background: rgba(224,82,82,0.04); }
.myth-card.myth-revealed[data-verdict-category="proved"],
.myth-card.myth-revealed[data-verdict-category="proved-qualified"] { border-color: var(--green); background: var(--green-bg); }

.myth-bottom-link { text-align: center; margin-bottom: 32px; }
.myth-bottom-link a { font-size: 12px; font-family: var(--font-mono); color: var(--accent); }

/* --- Why section --- */
.landing-why-section {
    max-width: 680px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.why-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.why-content .why-lead {
    font-size: 1.1rem;
    color: var(--text);
}

.why-pullquote {
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

/* --- Limits section --- */
.landing-limits-section {
    max-width: 820px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.limits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .limits-grid {
        grid-template-columns: 1fr;
    }
}

.limits-col h3 {
    font-size: 0.95rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.limits-good h3 {
    color: var(--green-text);
}

.limits-bad h3 {
    color: var(--red-text);
}

.limits-col ul {
    list-style: none;
    padding: 0;
}

.limits-col li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
}

.limits-good li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--green-text);
}

.limits-bad li::before {
    content: "✗";
    position: absolute;
    left: 0;
    color: var(--red-text);
}

.limits-col li strong {
    color: var(--text);
}

/* --- Outputs section --- */
.landing-outputs-section {
    max-width: 820px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.outputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .outputs-grid {
        grid-template-columns: 1fr;
    }
}

.outputs-col h3 {
    font-size: 11px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.outputs-col ul {
    list-style: none;
    padding: 0;
}

.outputs-col li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 13px;
}

.outputs-col li strong {
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px;
}

.output-symbol {
    color: var(--accent);
    margin-right: 2px;
}

/* --- Comparison section --- */
.landing-comparison-section {
    max-width: 680px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.comparison-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.comparison-content strong {
    color: var(--text);
    display: block;
    margin-bottom: 0.25rem;
}

/* Section headings */
.section-heading { font-size: 11px; font-family: var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; margin: 40px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle); }

/* Proof cards */
.proof-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; transition: border-color 0.15s; }
.proof-card:hover { border-color: var(--text-muted); }
.proof-card h3 { font-size: 14px; font-family: var(--font-serif); font-weight: 400; line-height: 1.5; margin-bottom: 8px; }
.proof-card .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.proof-card .date { color: var(--text-muted); font-size: 11px; font-family: var(--font-mono); margin-left: auto; }
.proof-card .source-line { color: var(--text-secondary); font-size: 11px; font-family: var(--font-mono); margin-top: 8px; }

/* Featured proof hidden state */
.featured-hidden { display: none; }

/* Verdict banners */
.verdict-banner { padding: 12px 16px; border-radius: 8px; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.verdict-banner.proved { background: var(--green-bg); border: 1px solid var(--green); }
.verdict-banner.proved .verdict-info { color: var(--green-text); }
.verdict-banner.disproved { background: var(--red-bg); border: 1px solid var(--red); }
.verdict-banner.disproved .verdict-info { color: var(--red-text); }
.verdict-banner.partial, .verdict-banner.proved-qualified, .verdict-banner.disproved-qualified { background: var(--amber-bg); border: 1px solid var(--amber); }
.verdict-banner.partial .verdict-info, .verdict-banner.proved-qualified .verdict-info, .verdict-banner.disproved-qualified .verdict-info { color: var(--amber-text); }
.verdict-banner.undetermined { background: var(--bg-card); border: 1px solid var(--gray); }
.verdict-banner.undetermined .verdict-info { color: var(--gray-text); }
.verdict-banner.supported, .verdict-banner.supported-qualified { background: var(--blue-bg); border: 1px solid var(--blue); }
.verdict-banner.supported .verdict-info, .verdict-banner.supported-qualified .verdict-info { color: var(--blue-text); }
.verdict-info { font-size: 12px; font-family: var(--font-mono); }

/* Trust bar */
.trust-bar { padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; font-size: 11px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 20px; }
.trust-bar a { color: var(--link); }
.trust-bar .trust-icon { color: var(--accent); margin-right: 6px; }

/* Jump links */
.jump-links { font-size: 11px; font-family: var(--font-mono); color: var(--text-muted); margin-bottom: 24px; }
.jump-links a { color: var(--link); }
.jump-links a:hover { text-decoration: underline; }

/* Verdict qualifier */
.verdict-qualifier { font-size: 11px; font-family: var(--font-mono); color: var(--text-muted); margin-top: 4px; }

/* Proof page elements */
.proof-thumbnail { float: right; width: 120px; height: 120px; border-radius: 8px; margin: 0 0 12px 16px; }
.proof-title { font-size: 18px; font-family: var(--font-serif); font-weight: 400; line-height: 1.4; margin-bottom: 8px; }
.proof-meta { margin-bottom: 28px; }
.proof-meta .date-info { color: var(--text-muted); font-size: 11px; font-family: var(--font-mono); }

/* Breadcrumb */
.breadcrumb { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: 16px; }
.breadcrumb a { color: var(--link); }

/* Proof content (markdown-rendered) */
.proof-content { font-size: 13px; line-height: 1.7; color: #c9d1d9; }
.proof-content p { margin-bottom: 10px; }
.proof-content ul { padding-left: 20px; margin-bottom: 12px; }
.proof-content table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.proof-content th, .proof-content td { padding: 6px 8px; border-bottom: 1px solid var(--border-subtle); text-align: left; font-size: 12px; }
.proof-content th { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.proof-content pre { background: var(--bg-card); padding: 12px; border-radius: 6px; overflow-x: auto; font-family: var(--font-mono); font-size: 12px; }
.proof-content code { font-family: var(--font-mono); font-size: 12px; }
.proof-content p code { background: var(--bg-card); padding: 2px 6px; border-radius: 3px; }
.proof-content a { color: var(--link); }

/* Static content (methodology, submit) — markdown-rendered headings */
.static-content { max-width: 720px; }
.static-content h1 { font-size: 22px; font-family: var(--font-mono); margin-bottom: 24px; }
.static-content h2,
.static-content .proof-content h2 { font-size: 11px; font-family: var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 32px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle); }
.static-content h3,
.static-content .proof-content h3 { font-size: 14px; font-family: var(--font-mono); color: var(--text); margin-top: 20px; margin-bottom: 8px; }
.static-content p { margin-bottom: 12px; }
.static-content ul, .static-content ol { margin-bottom: 12px; padding-left: 24px; }
.static-content li { margin-bottom: 4px; }

/* Proof content headings (proof detail body — NOT inside .static-content) */
.proof-content h2 { font-size: 11px; font-family: var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 24px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle); }
.proof-content h3 { font-size: 14px; font-family: var(--font-mono); color: var(--text); margin-top: 16px; margin-bottom: 8px; }

/* Audit trail */
.audit-section { border: 1px solid var(--border); border-radius: 6px; margin-bottom: 8px; overflow: hidden; }
.audit-header { padding: 10px 14px; background: var(--bg-card); display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 12px; font-family: var(--font-mono); color: #c9d1d9; }
.audit-header:hover { background: #1c2129; }
.audit-header .toggle { color: var(--text-muted); font-size: 12px; }
.audit-body { display: none; padding: 14px; font-size: 13px; line-height: 1.7; color: #c9d1d9; overflow-x: auto; }
.audit-body.open { display: block; }

/* Animated audit accordion (progressive enhancement).
   Uses visibility:hidden + max-height:0 instead of display:none so we can
   animate, while keeping collapsed content out of the tab order via
   inert attribute (set by JS). */
.audit-body.animated {
    display: block;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.3s ease-out, visibility 0s 0.3s, overflow 0s 0.3s;
    padding: 0 14px;
}
.audit-body.animated.open {
    padding: 14px;
    visibility: visible;
    overflow: visible;  /* let nested <details> expand the container freely —
                           overflow-x:auto would force overflow-y:auto per CSS spec,
                           creating a scroll container instead of expanding */
    transition: max-height 0.3s ease-out, visibility 0s 0s, overflow 0s 0s;
}
/* Horizontal scrolling for wide content INSIDE audit bodies only */
.audit-body pre, .audit-body table { overflow-x: auto; }

/* Citation verification summary */
.citation-summary-bar { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cs-stat { font-size: 11px; padding: 2px 8px; border-radius: 3px; font-family: var(--font-mono); white-space: nowrap; }
.cs-clean { background: var(--green-bg); color: var(--green-text); }
.cs-notice { background: var(--amber-bg); color: var(--amber-text); }
.cs-warning { background: var(--red-bg); color: var(--red-text); }
.cs-flag-count { font-size: 11px; color: var(--amber-text); font-family: var(--font-mono); white-space: nowrap; }

.cs-all-clean { color: var(--text-secondary); font-size: 13px; margin: 0; }
.cs-intro { color: var(--text-secondary); font-size: 13px; margin: 0 0 12px 0; }

.cs-flagged-item { padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
.cs-flagged-item:last-child { border-bottom: none; }
.cs-flagged-header { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.cs-flagged-id { font-family: var(--font-mono); color: var(--text-muted); font-size: 12px; min-width: 28px; }
.cs-flagged-status { font-family: var(--font-mono); font-size: 11px; padding: 1px 6px; border-radius: 3px; }
.cs-status-verified { background: var(--green-bg); color: var(--green-text); }
.cs-status-partial { background: var(--amber-bg); color: var(--amber-text); }
.cs-status-not_found { background: var(--red-bg); color: var(--red-text); }
.cs-status-fetch_failed { background: var(--red-bg); color: var(--red-text); }
.cs-flagged-source { color: var(--link); font-size: 13px; text-decoration: none; }
.cs-flagged-source:hover { text-decoration: underline; }

.cs-reasons { margin: 4px 0 0 36px; padding: 0; list-style: none; }
.cs-reasons li { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.cs-reasons li::before { content: "→ "; color: var(--amber-text); }

.cs-full-details { margin-top: 16px; border-top: 1px solid var(--border-subtle); padding-top: 12px; }
.cs-full-details summary { font-size: 12px; color: var(--text-muted); cursor: pointer; font-family: var(--font-mono); }
.cs-full-details summary:hover { color: var(--link); }
.cs-full-details .proof-content { margin-top: 8px; }

/* Downloads */
.downloads { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.download-link { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 8px 14px; font-size: 11px; font-family: var(--font-mono); color: var(--link); }
.download-link:hover { text-decoration: none; background: #1c2129; }

/* Downloads section (collapsible) */
.downloads-section { margin-top: 24px; margin-bottom: 8px; }
.downloads-section summary { cursor: pointer; font-size: 13px; font-family: var(--font-mono); color: var(--link); padding: 8px 0; }
.downloads-section summary:hover { text-decoration: underline; }
.downloads-group-label { width: 100%; font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 10px; padding: 2px 0; letter-spacing: 0.05em; text-transform: uppercase; }

/* Machine-readable format cards */
.formats-row { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.format-card { flex: 1; min-width: 180px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; text-decoration: none; color: var(--text); transition: border-color 0.15s; display: flex; flex-direction: column; gap: 4px; }
.format-card:hover { border-color: var(--accent); text-decoration: none; }
.format-icon { font-size: 18px; color: var(--accent); margin-bottom: 4px; }
.format-name { font-size: 12px; font-family: var(--font-mono); font-weight: 700; }
.format-desc { font-size: 11px; font-family: var(--font-mono); color: var(--text-muted); }

/* Fact ID tooltips */
abbr.fact-ref {
    position: relative;
    text-decoration: underline dotted var(--text-muted);
    text-underline-offset: 2px;
    cursor: help;
}
abbr.fact-ref::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    font-family: var(--font-sans);
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
abbr.fact-ref:hover::after { opacity: 1; }

/* Generator footer */
.generator-footer { font-size: 11px; font-family: var(--font-mono); color: var(--text-muted); margin-top: 16px; }
.generator-footer a { color: var(--link); }

/* References & relationships (depends_on graph) */
.rel-grid { display: flex; flex-direction: column; gap: 18px; margin-bottom: 32px; }
.rel-heading { font-size: 12px; font-family: var(--font-mono); color: var(--text); margin: 0 0 8px 0; font-weight: 400; }
.rel-heading-hint { color: var(--text-muted); font-size: 11px; font-weight: 400; }
.rel-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rel-entry { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.5; padding-left: 10px; border-left: 2px solid var(--border-subtle); }
.rel-primary { color: var(--link); text-decoration: none; line-height: 1.4; word-break: break-word; }
a.rel-primary:hover { text-decoration: underline; }
span.rel-primary { color: var(--text); }
.rel-secondary { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.rel-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 7px 1px 3px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    max-width: 100%;
    min-width: 0;
}
a.rel-pill { color: var(--link); }
a.rel-pill:hover { background: #1c2129; border-color: var(--accent); text-decoration: none; }
.rel-pill-type { display: inline-block; font-size: 9px; padding: 1px 4px; border-radius: 2px; background: var(--border); color: var(--text-muted); letter-spacing: 0.3px; flex-shrink: 0; }
.rel-pill-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rel-pill-doi .rel-pill-type { background: var(--green-bg); color: var(--green-text); }
.rel-pill-arxiv .rel-pill-type { background: var(--amber-bg); color: var(--amber-text); }
.rel-pill-swhid .rel-pill-type { background: var(--gray-bg); color: var(--gray-text); }
.rel-pill-handle .rel-pill-type { background: var(--gray-bg); color: var(--gray-text); }
.rel-pill-url .rel-pill-type { background: var(--gray-bg); color: var(--gray-text); }
.rel-pill-isbn .rel-pill-type { background: var(--gray-bg); color: var(--gray-text); }

/* Citation */
.cite-section { margin-top: 24px; margin-bottom: 8px; }
.cite-section summary { cursor: pointer; font-size: 13px; font-family: var(--font-mono); color: var(--link); padding: 8px 0; }
.cite-section summary:hover { text-decoration: underline; }
.cite-body { padding: 12px 0; }
.cite-doi { font-family: var(--font-mono); font-size: 12px; margin-bottom: 12px; color: var(--text-secondary); }
.cite-doi a { color: var(--link); }
.cite-tabs { position: relative; }
.cite-tabs input[type="radio"] { display: none; }
.cite-tabs label { display: inline-block; padding: 4px 12px; font-size: 12px; font-family: var(--font-mono); color: var(--text-secondary); cursor: pointer; border: 1px solid transparent; border-radius: 4px 4px 0 0; }
.cite-tabs input[type="radio"]:checked + label { color: var(--text); background: var(--bg-card); border-color: var(--border); border-bottom-color: var(--bg-card); }
.cite-panel { display: none; background: var(--bg-card); border: 1px solid var(--border); border-radius: 0 6px 6px 6px; padding: 12px; margin-top: -1px; }
#cite-apa:checked ~ #panel-apa,
#cite-chicago:checked ~ #panel-chicago,
#cite-bibtex:checked ~ #panel-bibtex,
#cite-ris:checked ~ #panel-ris { display: block; }
.cite-text { white-space: pre-wrap; word-break: break-word; font-size: 12px; font-family: var(--font-mono); color: var(--text); margin: 0; line-height: 1.5; }
.cite-actions { display: flex; gap: 8px; margin-top: 8px; }

/* Filters */
.filters { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-input { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; color: var(--text); font-size: 13px; font-family: var(--font-mono); flex: 1; min-width: 200px; }
.filter-select { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; color: var(--text); font-size: 13px; font-family: var(--font-mono); }

/* Enhanced catalog container (progressive enhancement) */
#proof-list-enhanced {
    position: relative;
}
/* Animated card wrapper — cards collapse/expand on filter */
.card-wrapper {
    overflow: hidden;
    opacity: 1;
    transition: max-height 0.3s ease-out, opacity 0.25s ease-out, margin-bottom 0.3s ease-out;
}
/* .card-hidden is a marker class — collapse is done via inline styles
   to avoid specificity conflicts with the inline max-height values */
.result-count {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 12px;
}

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; font-family: var(--font-mono); }
.pagination .current { background: var(--bg-card); color: var(--text); }

/* Copy button */
.copy-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); padding: 2px 8px; border-radius: 3px; cursor: pointer; font-size: 11px; font-family: var(--font-mono); margin-left: 8px; }
.copy-btn:hover { color: var(--text); }

/* Tag page heading */
.tag-heading { font-size: 22px; font-family: var(--font-mono); margin-bottom: 16px; }
.tag-count { color: var(--text-secondary); font-size: 13px; font-family: var(--font-mono); margin-bottom: 20px; }

/* Evidence table (structured from proof.json) */
.evidence-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12px; }
.evidence-table th { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border-subtle); }
.evidence-table td { padding: 8px; border-bottom: 1px solid var(--border-subtle); }
.evidence-table a { color: var(--link); }
.evidence-verified { color: var(--green-text); }
.evidence-computed { color: var(--blue-text); }
.evidence-failed { color: var(--red-text); }
.evidence-unknown { color: var(--gray-text); }

/* Share bar */
.share-bar { display: flex; gap: 10px; align-items: center; margin-top: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.share-bar-label { font-size: 11px; font-family: var(--font-mono); color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.share-btn { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-size: 11px; font-family: var(--font-mono); color: var(--link); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.share-btn:hover { background: #1c2129; text-decoration: none; }

/* Responsive — tablet */
@media (max-width: 768px) {
    .content { padding: 24px 16px; }
    .stats { gap: 24px; }
    .stat-value { font-size: 24px; }
}

/* Responsive — mobile */
@media (max-width: 640px) {
    .nav-inner { flex-direction: column; gap: 8px; }
    .nav-links { gap: 12px; font-size: 12px; }
    .hero h1 { font-size: 22px; }
    .hero-subtitle { font-size: 12px; }
    .stats { gap: 16px; }
    .stat-value { font-size: 20px; }
    .stat-label { font-size: 9px; }
    .cta-row { flex-direction: column; align-items: center; }
    .cta { width: 100%; max-width: 280px; text-align: center; }
    .cta-links { flex-direction: column; gap: 12px; align-items: center; }
    .cta-links a { padding: 8px 0; }
    .pipeline { flex-direction: column; gap: 4px; align-items: center; }
    .pipeline-step { width: 100%; max-width: 240px; display: flex; align-items: center; gap: 12px; text-align: left; }
    .pipeline-icon { margin-bottom: 0; min-width: 24px; }
    .pipeline-arrow { transform: rotate(90deg); padding: 0; font-size: 14px; }
    .filters { flex-direction: column; }
    .filter-input { min-width: unset; }
    .proof-card { padding: 12px 14px; }
    .proof-title { font-size: 16px; }
    .downloads { flex-direction: column; }
    .formats-row { flex-direction: column; }
    .proof-content table { display: block; overflow-x: auto; }
    .audit-body { overflow-x: auto; }
    #myth-container { grid-template-columns: 1fr; }
    .pipeline-step-content pre { font-size: 11px; }
}

/* ============================================================
   Pygments syntax highlighting (codehilite extension)
   Generated via: python -c "from pygments.formatters import HtmlFormatter;
   print(HtmlFormatter(style='github-dark').get_style_defs('.highlight'))"
   Background tweaked to match site --bg-card.
   ============================================================ */
.highlight {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1em;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text);
}
.highlight pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    line-height: inherit;
}
/* Auto-generated token rules below (github-dark) */
.highlight .hll { background-color: #6e7681 }
.highlight .c  { color: #8B949E; font-style: italic } /* Comment */
.highlight .err { color: #F85149 } /* Error */
.highlight .esc { color: #E6EDF3 }
.highlight .g  { color: #E6EDF3 }
.highlight .k  { color: #FF7B72 } /* Keyword */
.highlight .l  { color: #A5D6FF } /* Literal */
.highlight .n  { color: #E6EDF3 } /* Name */
.highlight .o  { color: #FF7B72; font-weight: bold } /* Operator */
.highlight .x  { color: #E6EDF3 }
.highlight .p  { color: #E6EDF3 }
.highlight .ch { color: #8B949E; font-style: italic }
.highlight .cm { color: #8B949E; font-style: italic }
.highlight .cp { color: #8B949E; font-weight: bold; font-style: italic }
.highlight .cpf { color: #8B949E; font-style: italic }
.highlight .c1 { color: #8B949E; font-style: italic }
.highlight .cs { color: #8B949E; font-weight: bold; font-style: italic }
.highlight .gd { color: #FFA198; background-color: #490202 }
.highlight .ge { color: #E6EDF3; font-style: italic }
.highlight .ges { color: #E6EDF3; font-weight: bold; font-style: italic }
.highlight .gr { color: #FFA198 }
.highlight .gh { color: #79C0FF; font-weight: bold }
.highlight .gi { color: #56D364; background-color: #0F5323 }
.highlight .go { color: #8B949E }
.highlight .gp { color: #8B949E }
.highlight .gs { color: #E6EDF3; font-weight: bold }
.highlight .gu { color: #79C0FF }
.highlight .gt { color: #FF7B72 }
.highlight .kc { color: #79C0FF }
.highlight .kd { color: #FF7B72 }
.highlight .kn { color: #FF7B72 }
.highlight .kp { color: #79C0FF }
.highlight .kr { color: #FF7B72 }
.highlight .kt { color: #FF7B72 }
.highlight .ld { color: #79C0FF }
.highlight .m  { color: #A5D6FF }
.highlight .s  { color: #A5D6FF }
.highlight .na { color: #E6EDF3 }
.highlight .nb { color: #E6EDF3 }
.highlight .nc { color: #F0883E; font-weight: bold }
.highlight .no { color: #79C0FF; font-weight: bold }
.highlight .nd { color: #D2A8FF; font-weight: bold }
.highlight .ni { color: #FFA657 }
.highlight .ne { color: #F0883E; font-weight: bold }
.highlight .nf { color: #D2A8FF; font-weight: bold }
.highlight .nl { color: #79C0FF; font-weight: bold }
.highlight .nn { color: #FF7B72 }
.highlight .nx { color: #E6EDF3 }
.highlight .py { color: #79C0FF }
.highlight .nt { color: #7EE787 }
.highlight .nv { color: #79C0FF }
.highlight .ow { color: #FF7B72; font-weight: bold }
.highlight .pm { color: #E6EDF3 }
.highlight .w  { color: #6E7681 }
.highlight .mb { color: #A5D6FF }
.highlight .mf { color: #A5D6FF }
.highlight .mh { color: #A5D6FF }
.highlight .mi { color: #A5D6FF }
.highlight .mo { color: #A5D6FF }
.highlight .sa { color: #79C0FF }
.highlight .sb { color: #A5D6FF }
.highlight .sc { color: #A5D6FF }
.highlight .dl { color: #79C0FF }
.highlight .sd { color: #A5D6FF }
.highlight .s2 { color: #A5D6FF }
.highlight .se { color: #79C0FF }
.highlight .sh { color: #79C0FF }
.highlight .si { color: #A5D6FF }
.highlight .sx { color: #A5D6FF }
.highlight .sr { color: #79C0FF }
.highlight .s1 { color: #A5D6FF }
.highlight .ss { color: #A5D6FF }
.highlight .bp { color: #E6EDF3 }
.highlight .fm { color: #D2A8FF; font-weight: bold }
.highlight .vc { color: #79C0FF }
.highlight .vg { color: #79C0FF }
.highlight .vi { color: #79C0FF }
.highlight .vm { color: #79C0FF }
.highlight .il { color: #A5D6FF }

.proof-source-section {
    margin: 2em 0;
    padding: 1em;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
}
.proof-source-section > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1em;
}
.proof-source-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: normal;
}
.proof-source-body {
    margin-top: 1em;
}
.proof-source-intro {
    margin: 0 0 1em 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.proof-source-actions {
    margin-top: 1em;
    font-size: 0.85rem;
}
.rerun-section {
    margin: 2em 0;
    padding: 1.25em 1.25em 1em;
    border: 1px solid var(--blue);
    border-radius: 8px;
    background: var(--blue-bg);
}
.rerun-section .section-heading {
    margin-top: 0;
    color: var(--blue-text);
}
.rerun-intro {
    color: var(--text);
    margin: 0 0 1em 0;
}
.rerun-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em 1.25em;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
}
.rerun-cta:hover {
    background: var(--link);
    color: var(--bg);
}
.rerun-cta-icon {
    font-size: 1.2em;
}
.rerun-cta-label {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.rerun-cta-title {
    font-size: 1rem;
}
.rerun-cta-desc {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: normal;
}
.rerun-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 1em 0 0 0;
}

/* ============================================================
   PROOF PAGE v2 — redesigned proof detail page
   New components: claim bar, scoreboard, tabs, ledger, rail
   ============================================================ */

/* Layout override — wider canvas for proof pages */
body.proof-page .content { max-width: 1320px; padding: 0 24px 60px; }

/* Verdict color utilities */
.v-proved-c      { color: var(--accent); }
.v-proved-q-c    { color: var(--amber-text); }
.v-disproved-c   { color: var(--red-text); }
.v-partial-c     { color: var(--amber-text); }
.v-supported-c   { color: var(--blue-text); }
.v-undetermined-c { color: var(--gray-text); }

/* Mode bar */
.proof-mode-bar {
    padding: 10px 0 12px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.proof-breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.proof-breadcrumb .logo-part { color: var(--accent); font-weight: 700; }
.proof-breadcrumb a { color: var(--link); }
.proof-breadcrumb .sep { color: var(--border); }
.proof-mode-spacer { flex: 1; min-width: 12px; }
.mode-toggle {
    display: flex;
    gap: 0;
    padding: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
}
.mode-btn {
    font-family: var(--font-mono);
    font-size: 10.5px;
    padding: 5px 12px;
    border-radius: 3px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.mode-btn:hover { color: var(--text); }
.mode-btn.active { background: var(--bg-card); color: var(--accent); }
.rerun-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--accent);
    color: #000;
    border-radius: 3px;
    font-weight: 500;
    font-family: var(--font-mono);
    font-size: 11px;
    text-decoration: none;
}
.rerun-btn:hover { background: #a2f0a8; text-decoration: none; color: #000; }

/* Claim bar */
.claim-bar {
    padding: 22px 24px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: #10151c;
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}
@media (max-width: 880px) { .claim-bar { grid-template-columns: 1fr; } }
.claim-text {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--text);
    line-height: 1.35;
    margin: 0;
    font-weight: 400;
}
.claim-text em { color: var(--accent); font-style: normal; }
.claim-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.cb-stamp {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 130px;
}
.cb-stamp-badge {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 2.5px;
    padding: 8px 14px;
    border-radius: 2px;
    border: 2px solid currentColor;
}
.cb-stamp-q {
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: var(--text-muted);
    text-align: right;
    max-width: 200px;
    line-height: 1.5;
}

/* Scoreboard */
.scoreboard {
    display: grid;
    grid-template-columns: repeat(var(--sb-cols, 4), 1fr);
    gap: 0;
    margin-bottom: 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
}
@media (max-width: 768px) { .scoreboard { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .scoreboard { grid-template-columns: 1fr; } }
.sb-cell {
    padding: 14px 18px;
    border-right: 1px solid var(--border-subtle);
    background: #10151c;
}
.sb-cell:last-child { border-right: none; }
.sb-cell.verdict-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(126,231,135,0.04);
}
.sb-cell.verdict-cell.disp { background: rgba(218,54,51,0.04); }
.sb-cell.verdict-cell.amb  { background: rgba(210,153,34,0.04); }
.sb-cell.verdict-cell.sup  { background: rgba(31,111,235,0.04); }
.sb-cell.verdict-cell.und  { background: rgba(72,79,88,0.04); }
.sb-l {
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: var(--text-muted);
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.sb-stamp {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 2px;
}
.sb-q-small {
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 2px;
}
.sb-n {
    font-family: var(--font-mono);
    font-size: 26px;
    color: var(--text);
    line-height: 1;
    margin-top: 4px;
}
.sb-n.ok  { color: var(--accent); }
.sb-n.warn { color: var(--amber-text); }
.sb-n.bad  { color: var(--red-text); }
.sb-n .of { color: var(--text-muted); font-size: 14px; font-weight: 400; margin-left: 2px; }
.sb-nsub {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

/* Proof share bar (upgraded) */
.proof-share-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: #10151c;
    align-items: center;
}
.proof-share-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-right: 2px;
    flex-shrink: 0;
}
.proof-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 11px;
    background: #0d1218;
    cursor: pointer;
    text-decoration: none;
}
.proof-share-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.proof-share-btn.primary { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 500; }
.proof-share-btn.primary:hover { background: #a2f0a8; color: #000; }
.proof-share-bar-meta { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.proof-share-bar-meta a { color: var(--accent); }

/* Main proof grid */
.proof-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 14px;
    align-items: start;
}
@media (max-width: 1100px) { .proof-grid { grid-template-columns: 1fr; } }

/* Proof panel */
.proof-panel {
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: #10151c;
    overflow: hidden;
    margin-bottom: 14px;
}
.proof-panel-head {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: #070a0f;
}
.proof-panel-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); flex-shrink: 0;
}
.proof-panel-body { padding: 20px 22px; }

/* Inspector / Reader mode */
body.mode-reader .inspector-only { display: none; }
body.mode-reader .reader-only    { display: block; }
.inspector-only { display: block; }
.reader-only    { display: none; }

/* Reader prose */
.reader-prose p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.75;
    margin: 0 0 14px;
}
.reader-prose h2 {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin: 28px 0 10px;
    font-weight: 400;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
}

/* Inspector split layout */
.split {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.split > * { min-width: 0; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }

/* Inspector prose (prose-pinned) */
.prose-pinned { overflow-y: auto; max-height: 680px; }
.prose-pinned p {
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.7;
    margin: 0 0 14px;
    cursor: pointer;
    padding-left: 10px;
    border-left: 2px solid transparent;
    transition: border-left-color 0.15s, background 0.15s;
    margin-left: -12px;
    border-radius: 0 3px 3px 0;
}
.prose-pinned p:hover,
.prose-pinned p.prose-hover  { background: rgba(126,231,135,0.04); border-left-color: var(--accent); }
.prose-pinned p.prose-active { background: rgba(126,231,135,0.07); border-left-color: var(--accent); }
.prose-pinned h4 {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 22px 0 8px;
    font-weight: 400;
}
.prose-pinned h4:first-child { margin-top: 0; }
.prose-pinned h2 {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 22px 0 8px;
    font-weight: 400;
}
.line-ref {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: var(--accent);
    margin-left: 6px;
    opacity: 0.55;
}
.prose-pinned p:hover .line-ref { opacity: 1; }

/* Code viewer (src-panel) */
.src-panel { position: sticky; top: 60px; }
.code {
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    background: #050709;
    margin: 0;
    max-height: 680px;
    overflow-y: auto;
}
.code .ln {
    display: grid;
    grid-template-columns: 42px 1fr;
    padding: 0 12px 0 0;
    transition: background 0.15s;
}
.code .ln:hover { background: rgba(126,231,135,0.03); cursor: pointer; }
.code .ln-n {
    color: #3b4450;
    text-align: right;
    padding-right: 12px;
    padding-left: 8px;
    padding-top: 1px;
    user-select: none;
    border-right: 1px solid var(--border-subtle);
    font-size: 10.5px;
}
.code .ln-c { padding-left: 12px; white-space: pre; }
.code .ln.hl { background: rgba(126,231,135,0.06); }
.code .ln.hl .ln-n { color: var(--accent); }
/* Python syntax colors */
.code .c  { color: #8b949e; font-style: italic; }
.code .s  { color: #a5d6ff; }
.code .k  { color: #ff7b72; }
.code .f  { color: #d2a8ff; }
.code .n  { color: #79c0ff; }
.code .code-loading { padding: 24px; color: var(--text-muted); font-size: 12px; }
.code .code-error   { color: var(--red-text); }
.code-line-range { margin-left: auto; font-size: 9.5px; color: var(--text-muted); }

/* Tabs panel */
.proof-tabs {
    display: flex;
    gap: 2px;
    padding: 10px 16px 0;
    background: #070a0f;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}
.proof-tab {
    font-family: var(--font-mono);
    font-size: 10.5px;
    padding: 6px 12px;
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    background: #0d1218;
    color: var(--text-muted);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.3px;
}
.proof-tab:hover { color: var(--text); }
.proof-tab.active { background: #10151c; color: var(--accent); }
.proof-tab .ct { color: var(--text-muted); margin-left: 4px; font-size: 9.5px; }
.proof-tab.active .ct { color: var(--text); }
.proof-tab-pane { display: none; padding: 20px 22px; min-height: 200px; }
.proof-tab-pane.active { display: block; }

/* Evidence ledger */
.ledger { display: flex; flex-direction: column; gap: 10px; }
.ledger-row {
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: #0d1218;
    display: grid;
    grid-template-columns: 40px 1fr 110px;
    gap: 14px;
    align-items: start;
}
@media (max-width: 640px) { .ledger-row { grid-template-columns: 40px 1fr; } }
.ledger-id { font-family: var(--font-mono); font-size: 11px; color: var(--accent); font-weight: 700; padding-top: 2px; }
.ledger-title { font-size: 13px; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.ledger-url { font-family: var(--font-mono); font-size: 10.5px; color: var(--link); margin-bottom: 8px; word-break: break-all; }
.ledger-quote {
    font-family: var(--font-serif);
    font-size: 12.5px;
    font-style: italic;
    color: var(--text-secondary);
    padding: 8px 10px;
    border-left: 2px solid var(--border-subtle);
    background: #050709;
    border-radius: 0 3px 3px 0;
    line-height: 1.55;
}
.ledger-status {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    font-family: var(--font-mono);
    font-size: 9.5px;
    padding-top: 2px;
}
.ledger-status .ls { padding: 3px 8px; border-radius: 2px; letter-spacing: 0.5px; white-space: nowrap; }
.ledger-status .ls.ok   { background: rgba(126,231,135,0.12); color: var(--accent); }
.ledger-status .ls.warn { background: var(--amber-bg); color: var(--amber-text); }
.ledger-status .ls.fail { background: var(--red-bg); color: var(--red-text); }
.ledger-status .ls.part { background: var(--blue-bg); color: var(--blue-text); }
.ledger-tier { color: var(--text-muted); }

/* Claim spec table */
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table th, .spec-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
    color: var(--text-secondary);
}
.spec-table th {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 400;
    width: 140px;
}
.spec-table code { font-family: var(--font-mono); color: var(--accent); font-size: 11px; background: none; padding: 0; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* Compute trace */
.trace-block {
    background: #050709;
    border-radius: 4px;
    padding: 16px 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-x: auto;
}
.trace-empty { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }

/* Adversarial challenge cards */
.challenge {
    margin-bottom: 8px;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: #0d1218;
    overflow: hidden;
}
.ch-head {
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.ch-head:hover { background: rgba(126,231,135,0.03); }
.ch-n {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    padding-top: 2px;
    min-width: 22px;
    flex-shrink: 0;
}
.ch-q { flex: 1; font-size: 13.5px; color: var(--text); line-height: 1.4; }
.ch-verdict {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 2px;
    letter-spacing: 0.8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ch-verdict.pass { background: rgba(126,231,135,0.12); color: var(--accent); }
.ch-verdict.soft { background: var(--amber-bg); color: var(--amber-text); }
.ch-verdict.fail { background: var(--red-bg); color: var(--red-text); }
.ch-toggle { color: var(--text-muted); transition: transform 0.2s; font-family: var(--font-mono); flex-shrink: 0; font-size: 13px; }
.challenge.open .ch-toggle { transform: rotate(90deg); }
.ch-body { display: none; padding: 0 16px 16px 52px; }
.challenge.open .ch-body { display: block; }
.ch-label {
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 12px 0 4px;
}
.ch-text { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.adv-intro { color: var(--text-secondary); font-size: 13px; margin: 0 0 14px; max-width: 640px; }

/* Rail */
.rail-card {
    padding: 16px 18px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: #10151c;
    margin-bottom: 12px;
}
.rail-card.sticky-rail { position: sticky; top: 12px; }

/* rail-collapsible: use <details> for mobile collapse, always open on desktop */
details.rail-collapsible { list-style: none; }
details.rail-collapsible > summary { list-style: none; }
details.rail-collapsible > summary::-webkit-details-marker { display: none; }

.rail-title {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--accent);
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom: 14px;
    font-weight: 400;
}
/* When summary is used as title, remove default cursor on large screens */
summary.rail-summary {
    cursor: default;
    display: block;
    outline: none;
}

/* Sub-claim confidence rows */
.rail-sc-list { display: flex; flex-direction: column; gap: 0; }
.rail-sc-row {
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-mono);
    cursor: pointer;
}
.rail-sc-row:last-child { border-bottom: none; }
.rail-sc-summary {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 0;
    list-style: none;
    cursor: pointer;
    outline: none;
}
.rail-sc-summary::-webkit-details-marker { display: none; }
.rail-sc-summary::marker { display: none; }
.rail-sc-row[open] .rail-sc-summary { padding-bottom: 4px; }
.rail-sc-id { color: var(--accent); font-size: 9px; min-width: 26px; flex-shrink: 0; }
.rail-sc-label { flex: 1; font-size: 9px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-sc-meter { display: flex; gap: 2px; flex-shrink: 0; }
.rail-sc-expand {
    padding: 0 0 8px 26px;
}
.rail-sc-full-label {
    font-size: 9px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 5px;
    font-family: var(--font-mono);
}
.rail-sc-reason {
    font-size: 9px;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 0.03em;
}
.rail-sc-reason-mint { color: var(--accent); }
.rail-sc-reason-red  { color: var(--red-text); }
.rail-sc-reason-amb  { color: var(--amber-text); }
.sc-cell { display: inline-block; width: 7px; height: 11px; border-radius: 1px; }
.sc-cell-off  { background: var(--border-subtle); opacity: 0.6; }
.sc-cell-fail { background: var(--red-bg); opacity: 0.7; }
.sc-cell-on.sc-cell-mint { background: var(--accent); }
.sc-cell-on.sc-cell-red  { background: var(--red-text); }
.sc-cell-on.sc-cell-amb  { background: var(--amber-text); }

.rail-src-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
}
.rail-src-row:last-child { border-bottom: none; }
.rail-src-id { color: var(--accent); min-width: 26px; font-size: 10px; }
.rail-src-host { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--text-muted); }
.rail-src-tier { font-size: 9px; color: var(--text-muted); background: #0d1218; padding: 2px 5px; border-radius: 2px; flex-shrink: 0; }
.rail-src-s { font-size: 10px; padding: 2px 6px; border-radius: 2px; flex-shrink: 0; }
.rail-src-s.ok   { background: rgba(126,231,135,0.12); color: var(--accent); }
.rail-src-s.warn { background: var(--amber-bg); color: var(--amber-text); }
.rail-src-s.fail { background: var(--red-bg); color: var(--red-text); }

/* Rail responsive: inline row at 760-1100px */
@media (max-width: 1100px) and (min-width: 761px) {
    .proof-rail-aside {
        display: flex;
        flex-direction: row;
        gap: 10px;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .proof-rail-aside .rail-card { flex: 1 1 160px; margin-bottom: 0; }
    .proof-rail-aside .sticky-rail { position: static; }
}

/* Rail responsive: collapse at <760px */
@media (max-width: 760px) {
    details.rail-collapsible {
        padding: 0;
        border-radius: 6px;
    }
    details.rail-collapsible summary.rail-summary {
        cursor: pointer;
        padding: 10px 18px;
        margin-bottom: 0;
        border-radius: 6px;
    }
    details.rail-collapsible[open] summary.rail-summary {
        border-bottom: 1px solid var(--border-subtle);
        border-radius: 6px 6px 0 0;
        margin-bottom: 0;
    }
    details.rail-collapsible > div,
    details.rail-collapsible > .rail-sc-list {
        padding: 8px 18px 12px;
    }
    details.rail-collapsible summary.rail-summary::after {
        content: ' ▸';
        float: right;
        font-size: 8px;
        opacity: 0.5;
        line-height: 1.6;
    }
    details.rail-collapsible[open] summary.rail-summary::after {
        content: ' ▾';
    }
}

/* Proof page section divider */
.proof-hr { border: none; border-top: 1px solid var(--border-subtle); margin: 36px 0 28px; }

/* ── Embed panel (badge copy-paste) ──────────────────────────────────────── */
.embed-panel { border-top: 1px solid var(--border-subtle); margin-top: 2rem; padding-top: 1rem; }
.embed-panel h2 { font-size: 1rem; }
.embed-panel pre { background: var(--bg-card); color: var(--text); padding: 0.5rem; overflow-x: auto; font-size: 0.875rem; }
.embed-panel .embed-tabs details { margin: 0.25rem 0; }
.embed-panel .embed-tabs summary { cursor: pointer; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.embed-panel .embed-preview { margin-top: 1rem; }
