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