/* MFT Q-Ball Lepton Spectrum Solver — styling (v2) */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #222;
    background: #fff;
    line-height: 1.55;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */

.site-header {
    border-bottom: 1px solid #e5e5e5;
    padding: 14px 0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-weight: 600;
    font-size: 18px;
    text-decoration: none;
    color: #111;
}

.site-nav {
    display: flex;
    gap: 24px;
}

.site-nav a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover, .site-nav a.active {
    color: #111;
    border-bottom-color: #2c5aa0;
}

/* Page content */

main {
    padding: 40px 24px 80px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #111;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 12px;
    color: #111;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 8px;
    color: #333;
}

.lede {
    color: #444;
    margin: 0 0 32px;
    max-width: 820px;
}

/* Status / loading */

.status {
    background: #f8f9fc;
    border: 1px solid #e5e5e5;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 32px;
}

.status p {
    margin: 0 0 12px;
    color: #555;
}

.progress-bar {
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #2c5aa0;
    transition: width 0.3s ease;
}

/* Solver layout */

.solver-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    margin: 24px 0;
}

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

/* Controls */

.controls {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
    background: #fafbfd;
    align-self: start;
    position: sticky;
    top: 80px;
}

@media (max-width: 800px) {
    .controls { position: static; }
}

.controls h2 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 600;
}

.control {
    margin: 14px 0;
}

.control label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 4px;
}

.hint-inline {
    color: #888;
    font-weight: 400;
    font-size: 12px;
}

.control input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 14px;
    background: #fff;
}

.control input:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.15);
}

hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 18px 0;
}

.presets {
    margin-bottom: 8px;
}

.preset-label {
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin: 0 0 6px;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.preset {
    padding: 8px 6px;
    border: 1px solid #2c5aa0;
    background: #fff;
    color: #2c5aa0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.preset:hover {
    background: #2c5aa0;
    color: #fff;
}

.preset.active {
    background: #2c5aa0;
    color: #fff;
}

.preset-description {
    font-size: 12px;
    color: #555;
    margin: 8px 0 0;
    line-height: 1.5;
}

.solve-button {
    width: 100%;
    padding: 12px;
    background: #2c5aa0;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.15s;
}

.solve-button:hover:not(:disabled) {
    background: #234a85;
}

.solve-button:disabled {
    background: #888;
    cursor: not-allowed;
}

.solve-time-note {
    font-size: 11px;
    color: #888;
    text-align: center;
    margin: 4px 0 0;
}

.silver-ratio-note {
    margin-top: 18px;
    padding: 10px 12px;
    background: #f0f4fa;
    border-left: 3px solid #2c5aa0;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
}

.silver-ratio-note p {
    margin: 0;
    color: #444;
    line-height: 1.5;
}

/* Results */

.results {
    min-width: 0;
}

.results h2 {
    margin-top: 0;
}

.results-summary {
    background: #f8f9fc;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #444;
}

.results-summary p {
    margin: 0 0 6px;
}

.results-summary p:last-child {
    margin-bottom: 0;
}

.results-summary .placeholder {
    color: #888;
    font-style: italic;
}

.results-summary .error {
    color: #c0392b;
}

.results-summary .hint, .hint {
    margin-top: 6px;
    font-size: 12px;
    color: #777;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.badge.ok {
    background: #d5f5e3;
    color: #1e7e34;
}

.badge.warn {
    background: #fdebd0;
    color: #b9770e;
}

/* Lepton triple table */

.lepton-triple-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 18px;
    font-size: 13px;
}

.lepton-triple-table th {
    text-align: left;
    padding: 8px 10px;
    background: #2c5aa0;
    color: #fff;
    font-weight: 600;
}

.lepton-triple-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #eee;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

.lepton-triple-table .lepton-row td:first-child {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
}

.lepton-triple-table .lepton-row.electron {
    background: rgba(39, 174, 96, 0.05);
}
.lepton-triple-table .lepton-row.muon {
    background: rgba(44, 90, 160, 0.05);
}
.lepton-triple-table .lepton-row.tau {
    background: rgba(192, 57, 43, 0.05);
}

.lepton-ratios-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
    font-size: 13px;
    max-width: 480px;
}

.lepton-ratios-table th {
    text-align: left;
    padding: 6px 10px;
    background: #f0f4fa;
    color: #234a85;
    font-weight: 600;
}

.lepton-ratios-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

.lepton-ratios-table td:first-child {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
}

/* Color dots */

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.lepton-tag {
    display: inline-block;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: 8px;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    vertical-align: middle;
    text-transform: lowercase;
}

.stab-tag {
    display: inline-block;
    padding: 1px 6px;
    margin-left: 4px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    vertical-align: middle;
}

.stab-stable {
    background: #d5f5e3;
    color: #1e7e34;
}

.stab-metastable {
    background: #fdebd0;
    color: #b9770e;
}

.stab-unstable {
    background: #f5b7b1;
    color: #922b21;
}

.muted {
    color: #ccc;
}

/* Plots */

.plots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

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

.plot-container {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 12px;
    background: #fff;
}

.plot-container h3 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-align: center;
}

.plot-container canvas {
    width: 100%;
    height: auto;
    display: block;
}

/* Spectrum table */

.spectrum-table-wrapper {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-top: 8px;
}

.spectrum-table-wrapper::-webkit-scrollbar {
    width: 10px;
}
.spectrum-table-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
}
.spectrum-table-wrapper::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 5px;
}
.spectrum-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.spectrum-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

.spectrum-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.spectrum-table th {
    text-align: left;
    padding: 7px 10px;
    background: #f0f4fa;
    border-bottom: 2px solid #2c5aa0;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    color: #234a85;
}

.spectrum-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
}

.spectrum-table tr:hover td {
    background: #fafbfd;
}

.spectrum-table .lepton-row.electron {
    background: rgba(39, 174, 96, 0.08);
    font-weight: 600;
}
.spectrum-table .lepton-row.muon {
    background: rgba(44, 90, 160, 0.08);
    font-weight: 600;
}
.spectrum-table .lepton-row.tau {
    background: rgba(192, 57, 43, 0.08);
    font-weight: 600;
}

/* Explanatory section */

.explanatory {
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid #e5e5e5;
    max-width: 820px;
}

.explanatory p {
    color: #444;
    margin: 0 0 14px;
}

.explanatory strong {
    color: #111;
}

/* Footer */

.page-footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
    color: #888;
    font-size: 13px;
}

.page-footer a {
    color: #2c5aa0;
    text-decoration: none;
}

.page-footer a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Landing-page styles
   ═══════════════════════════════════════════════════════════════════════════ */

.hero {
    padding: 48px 0 32px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 48px;
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #111;
    letter-spacing: -0.5px;
}

.hero-tagline {
    font-size: 17px;
    color: #444;
    line-height: 1.6;
    margin: 0 0 32px;
    max-width: 760px;
}

.status-block {
    background: #f8f9fc;
    border-left: 4px solid #2c5aa0;
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
    max-width: 820px;
}

.status-label {
    font-size: 13px;
    font-weight: 600;
    color: #2c5aa0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px;
}

.status-list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.status-list li {
    margin-bottom: 4px;
}

.status-list li:last-child {
    margin-bottom: 0;
}

.status-list a {
    color: #2c5aa0;
}

/* Section spacing */

.section {
    padding: 32px 0;
    max-width: none;
}

.section h2 {
    font-size: 24px;
    margin: 0 0 16px;
}

.section h3 {
    font-size: 17px;
    margin: 28px 0 14px;
    color: #2c5aa0;
}

.section p {
    color: #444;
    margin: 0 0 14px;
    max-width: 820px;
}

/* Equation block */

.equation {
    font-family: 'Cambria Math', 'Times New Roman', serif;
    font-style: italic;
    background: #f5f5f5;
    padding: 14px 18px;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
    margin: 16px 0;
}

/* Result cards */

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin: 16px 0 24px;
}

.result-card {
    background: #fafbfd;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 16px 18px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.result-card:hover {
    border-color: #2c5aa0;
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.08);
}

.result-headline {
    font-size: 15px;
    font-weight: 600;
    color: #234a85;
    margin-bottom: 8px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    line-height: 1.4;
}

.result-detail {
    font-size: 13px;
    color: #444;
    line-height: 1.55;
}

.result-detail strong {
    color: #1e7e34;
    font-weight: 600;
}

.result-detail em {
    color: #b9770e;
}

/* Solver cards */

.solver-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.solver-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fafbfd;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 18px 20px;
    transition: all 0.15s;
    position: relative;
}

.solver-card.live {
    cursor: pointer;
    border-color: #2c5aa0;
}

.solver-card.live:hover {
    background: #f0f4fa;
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.12);
    transform: translateY(-1px);
}

.solver-card.upcoming {
    opacity: 0.65;
    cursor: default;
}

.solver-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

.solver-card.live h3 {
    color: #2c5aa0;
}

.solver-card p {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.solver-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.solver-card.live .solver-status {
    background: #d5f5e3;
    color: #1e7e34;
}

.solver-card.upcoming .solver-status {
    background: #ecf0f1;
    color: #7f8c8d;
}

/* DOI card */

.doi-card {
    background: linear-gradient(135deg, #f0f4fa 0%, #e8eef8 100%);
    border: 1px solid #2c5aa0;
    border-radius: 6px;
    padding: 20px 24px;
    margin: 16px 0 24px;
    max-width: 600px;
}

.doi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2c5aa0;
    margin-bottom: 6px;
}

.doi-link {
    font-size: 22px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    margin-bottom: 8px;
}

.doi-link a {
    color: #234a85;
    text-decoration: none;
    font-weight: 600;
}

.doi-link a:hover {
    text-decoration: underline;
}

.doi-detail {
    font-size: 13px;
    color: #555;
}

/* Paper list */

.paper-list {
    color: #444;
    line-height: 1.7;
    margin: 12px 0;
    padding-left: 22px;
}

.paper-list li {
    margin-bottom: 6px;
}

/* Section spacing tweaks */

main {
    padding: 0 24px 80px;
}

#contact a {
    color: #2c5aa0;
    text-decoration: none;
}

#contact a:hover {
    text-decoration: underline;
}

@media (max-width: 800px) {
    .hero h1 {
        font-size: 28px;
    }
    .hero-tagline {
        font-size: 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Guide page styles
   ═══════════════════════════════════════════════════════════════════════════ */

.guide-page .section {
    max-width: 880px;
}

.guide-page p,
.guide-page ul,
.guide-page ol {
    color: #333;
    line-height: 1.65;
    font-size: 15.5px;
}

.guide-page ul li,
.guide-page ol li {
    margin-bottom: 8px;
}

.guide-page h2 {
    font-size: 26px;
    margin-top: 16px;
    color: #111;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 8px;
}

.guide-page h3 {
    font-size: 18px;
    color: #234a85;
    margin-top: 26px;
    margin-bottom: 10px;
}

.guide-page h3 .step-paper {
    color: #888;
    font-weight: 400;
    font-size: 14px;
    font-style: italic;
}

/* Key claim blockquote */
.key-claim {
    margin: 18px 0;
    padding: 18px 24px;
    background: linear-gradient(135deg, #f0f4fa 0%, #e8eef8 100%);
    border-left: 4px solid #2c5aa0;
    border-radius: 0 6px 6px 0;
    font-size: 17px;
    font-weight: 500;
    color: #234a85;
    line-height: 1.5;
    font-style: italic;
}

/* Callout box (for conceptual traps and other highlights) */
.callout {
    margin: 18px 0;
    padding: 14px 20px;
    border-radius: 0 6px 6px 0;
}

.callout-warn {
    background: #fff8dc;
    border-left: 4px solid #d4a017;
}

.callout p {
    margin: 0;
    font-size: 14.5px;
    color: #444;
}

/* Equation display blocks (math centered, padded) */
.equation-display {
    margin: 16px 0;
    padding: 14px 18px;
    background: #f7f9fc;
    border: 1px solid #e0e6ee;
    border-radius: 4px;
    text-align: center;
    overflow-x: auto;
    font-size: 16px;
}

/* Forced-moves list and downstream list */
.forced-moves,
.downstream-list,
.not-list,
.ai-list,
.param-list {
    background: #fafbfd;
    border-left: 3px solid #c8d3e8;
    padding: 12px 20px 12px 36px;
    border-radius: 0 4px 4px 0;
    margin: 14px 0;
}

.forced-moves li,
.downstream-list li,
.not-list li,
.ai-list li,
.param-list li {
    margin-bottom: 10px;
}

.forced-moves li:last-child,
.downstream-list li:last-child,
.not-list li:last-child,
.ai-list li:last-child {
    margin-bottom: 0;
}

/* Chain table */
.chain-wrapper {
    overflow-x: auto;
    margin: 16px 0 24px;
    border: 1px solid #e0e6ee;
    border-radius: 6px;
}

.chain-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.chain-table thead {
    background: #2c5aa0;
    color: white;
}

.chain-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chain-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #e8edf4;
    color: #333;
    line-height: 1.4;
}

.chain-table tr:last-child td {
    border-bottom: none;
}

.chain-table tr:nth-child(even) {
    background: #fafbfd;
}

.chain-table tr:hover {
    background: #f0f4fa;
}

.chain-table td:first-child {
    font-weight: 600;
    color: #2c5aa0;
    text-align: center;
    width: 40px;
}

.chain-table td:nth-child(4) {
    color: #555;
    font-size: 13px;
}

/* Where to next grid */
.next-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin: 16px 0;
}

.next-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fafbfd;
    border: 1px solid #e0e6ee;
    border-radius: 6px;
    padding: 16px 18px;
    transition: all 0.15s;
}

.next-card:hover {
    border-color: #2c5aa0;
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.12);
    transform: translateY(-1px);
    background: #f0f4fa;
}

.next-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #2c5aa0;
}

.next-card p {
    font-size: 13.5px;
    color: #555;
    margin: 0 0 8px;
    line-height: 1.5;
}

.next-card .next-papers {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Topic-page-specific styles (foundations, particles, gravity, quantum)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Paper-number tag in section headings */
.paper-tag {
    display: inline-block;
    margin-left: 12px;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #2c5aa0;
    background: #e8eef8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* Paper figure with caption */
.paper-figure {
    margin: 20px 0;
    padding: 0;
    text-align: center;
}

.paper-figure img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid #e0e6ee;
    border-radius: 4px;
    background: white;
    display: block;
}

.paper-figure figcaption {
    margin-top: 10px;
    padding: 0 4px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    text-align: left;
    font-style: italic;
}

.paper-figure figcaption strong {
    color: #234a85;
    font-style: normal;
}

/* Paper / script link strip */
.paper-link {
    margin-top: 16px;
    padding: 10px 14px;
    background: #f7f9fc;
    border-left: 3px solid #2c5aa0;
    border-radius: 0 4px 4px 0;
    font-size: 13.5px;
    color: #555;
}

.paper-link a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
}

.paper-link a:hover {
    text-decoration: underline;
}

/* Power-of-δ row separator in silver ratio table */
.chain-table tr td.power-row,
.chain-table tr td[colspan] {
    background: #e8eef8;
    color: #234a85;
    font-weight: 700;
    text-align: left;
    padding: 7px 14px;
    font-size: 13px;
    letter-spacing: 0.3px;
}

/* Info callout (vs. warn) */
.callout-info {
    background: #f0f4fa;
    border-left: 4px solid #2c5aa0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Results dashboard cards
   ═══════════════════════════════════════════════════════════════════════════ */

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.result-card {
    background: white;
    border: 1px solid #d6dde6;
    border-left: 4px solid #2c5aa0;
    border-radius: 4px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
}

.result-card.theorem {
    border-left-color: #386641;
}

.result-card.derived {
    border-left-color: #6a4c93;
}

.result-card.cross-check {
    border-left-color: #bc6c25;
}

.result-card .result-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #888;
    margin-bottom: 4px;
}

.result-card.theorem .result-label { color: #386641; }
.result-card.derived .result-label { color: #6a4c93; }
.result-card.cross-check .result-label { color: #bc6c25; }

.result-card .result-title {
    font-size: 15px;
    font-weight: 600;
    color: #234a85;
    margin: 0 0 6px;
    line-height: 1.3;
}

.result-card .result-formula {
    font-size: 13.5px;
    color: #444;
    margin: 0 0 10px;
    line-height: 1.4;
    font-style: italic;
}

.result-card .result-numbers {
    border-top: 1px solid #eaecef;
    padding-top: 8px;
    margin-top: auto;
    font-size: 12.5px;
    color: #555;
    line-height: 1.6;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
}

.result-card .result-numbers strong {
    color: #234a85;
    font-weight: 600;
}

.result-card .result-error {
    margin-top: 6px;
    padding: 3px 8px;
    background: #f0f4fa;
    border-radius: 3px;
    font-size: 12.5px;
    font-weight: 600;
    color: #234a85;
    align-self: flex-start;
}

.result-card.theorem .result-error {
    background: #e8f0e9;
    color: #386641;
}

.result-card.derived .result-error {
    background: #efe8f4;
    color: #6a4c93;
}

.result-card.cross-check .result-error {
    background: #f7ebd9;
    color: #8a4f1b;
}

.result-card .result-paper {
    margin-top: 8px;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Section heading inside results page */
.results-section-header {
    margin-top: 32px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e0e6ee;
    color: #234a85;
    font-size: 18px;
    font-weight: 600;
}

.results-section-header:first-child {
    margin-top: 0;
}

.results-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 14px 0 24px;
    font-size: 12.5px;
    color: #555;
}

.results-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.results-legend .legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 2px;
}

.legend-swatch.measurement { background: #2c5aa0; }
.legend-swatch.theorem { background: #386641; }
.legend-swatch.derived { background: #6a4c93; }
.legend-swatch.cross-check { background: #bc6c25; }

/* Falsifiability cards */
.falsif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.falsif-card {
    background: #fff8f0;
    border: 1px solid #f0d9b5;
    border-left: 4px solid #c46411;
    border-radius: 4px;
    padding: 14px 16px;
}

.falsif-card h4 {
    margin: 0 0 6px;
    color: #8a4f1b;
    font-size: 14.5px;
}

.falsif-card .falsif-criterion {
    font-size: 13px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 6px;
}

.falsif-card .falsif-status {
    font-size: 11.5px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Papers index
   ═══════════════════════════════════════════════════════════════════════════ */

.paper-row {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e8ecf0;
}

.paper-row:last-child {
    border-bottom: none;
}

.paper-id {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 22px;
    font-weight: 700;
    color: #2c5aa0;
    line-height: 1;
}

.paper-id .paper-version {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #888;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.paper-content h3 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #234a85;
    line-height: 1.3;
}

.paper-content .paper-summary {
    font-size: 13.5px;
    color: #444;
    line-height: 1.55;
    margin: 0 0 8px;
}

.paper-content .paper-keyresult {
    font-size: 12.5px;
    color: #555;
    margin: 0 0 8px;
    padding: 6px 10px;
    background: #f7f9fc;
    border-left: 3px solid #2c5aa0;
    border-radius: 0 3px 3px 0;
}

.paper-content .paper-keyresult strong {
    color: #234a85;
}

.paper-content .paper-actions {
    font-size: 13px;
    color: #666;
}

.paper-content .paper-actions a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
    margin-right: 12px;
}

.paper-content .paper-actions a:hover {
    text-decoration: underline;
}

.paper-content .paper-actions .topic-link {
    color: #6a4c93;
}

@media (max-width: 600px) {
    .paper-row {
        grid-template-columns: 50px 1fr;
        gap: 12px;
        padding: 14px 0;
    }
    .paper-id {
        font-size: 18px;
    }
}
