/* OverField — Typography-first, warm monochrome */

:root {
    --bg: #f8f7f4;
    --bg-surface: #ffffff;
    --text: #222;
    --text-secondary: #4a4a4a;
    --text-muted: #7a7a7a;
    --border: #ddd;
    --border-light: #eae8e4;
    --accent: #1a1a1a;
    --verified: #2d7a4f;
    --verified-bg: #eef6f1;
    --contested: #b35900;
    --contested-bg: #fef4e8;
    --unverified: #777;
    --unverified-bg: #f4f3f1;
    --confidence-high: #2d7a4f;
    --confidence-mid: #b35900;
    --confidence-low: #7a7a7a;
    --tag-bg: #f0eeea;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    --max-width: 700px;
}

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

html {
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-serif);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    margin-bottom: 2.5rem;
    background: var(--bg-surface);
}

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

.site-name {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
}

.site-name:hover { opacity: 0.6; }

nav a {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    letter-spacing: 0.02em;
    transition: color 0.15s;
}

nav a:hover { color: var(--text); }

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    margin-top: 5rem;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.02em;
}

.footer-tagline {
    margin-bottom: 0.3rem;
}

.footer-sub {
    font-size: 0.65rem;
    color: #aaa;
}

/* Homepage */
.page-intro {
    margin-bottom: 3rem;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 0.6rem;
    line-height: 1.25;
}

.page-subtitle {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 560px;
}

/* Investigation list */
.investigation-list {
    list-style: none;
}

.investigation-item {
    border-bottom: 1px solid var(--border-light);
    padding: 1.6rem 0;
}

.investigation-item:first-child { padding-top: 0; }
.investigation-item:last-child { border-bottom: none; }

.investigation-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.investigation-item a:hover .inv-title {
    text-decoration: underline;
    text-decoration-color: var(--text-muted);
    text-underline-offset: 3px;
}

.inv-meta {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.inv-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

.inv-summary {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Confidence badge */
.confidence-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    letter-spacing: 0.01em;
}

.confidence-high {
    color: var(--confidence-high);
    background: var(--verified-bg);
}

.confidence-mid {
    color: var(--confidence-mid);
    background: var(--contested-bg);
}

.confidence-low {
    color: var(--confidence-low);
    background: var(--unverified-bg);
}

/* Investigation detail */
.back-link {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
    transition: color 0.15s;
}

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

.inv-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.inv-header h1 {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 0.8rem;
}

.inv-header-meta {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Section labels — these organize the page */
.section-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

/* Layer sections — visual separation between the three layers */
.layer {
    margin-bottom: 3rem;
    padding-top: 1.5rem;
}

.layer-primary {
    padding: 2rem 0;
    border-top: 2px solid var(--accent);
    margin-bottom: 3.5rem;
}

/* First Approximation */
.first-approximation p {
    font-size: 1.02rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.first-approximation p strong {
    font-weight: 600;
}

.first-approximation ul {
    list-style: none;
    margin: 0.6rem 0 1.2rem 0;
    padding: 0;
}

.first-approximation ul li {
    font-size: 0.92rem;
    line-height: 1.65;
    padding: 0.35rem 0 0.35rem 1rem;
    border-left: 2px solid var(--border);
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
}

.first-approximation p strong.fa-label {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text);
}

/* Evidence section */
.evidence-summary {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1.5rem;
    padding: 0.8rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.evidence-count {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-verified { background: var(--verified); }
.dot-contested { background: var(--contested); }
.dot-unverified { background: var(--unverified); }

.evidence-group {
    margin-bottom: 1.8rem;
}

.evidence-group-title {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
    padding-bottom: 0.3rem;
}

.evidence-group-title.verified { color: var(--verified); }
.evidence-group-title.contested { color: var(--contested); }
.evidence-group-title.unverified { color: var(--unverified); }

.claim-item {
    padding: 0.5rem 0;
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.claim-item:last-child { border-bottom: none; }

.claim-source {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Collapsible claims */
.claims-collapsed .claim-item:nth-child(n+6) {
    display: none;
}

.claims-toggle {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.6rem 0;
    display: block;
    width: 100%;
    text-align: left;
    transition: color 0.15s;
}

.claims-toggle:hover { color: var(--text); }

.claims-expanded .claims-toggle .toggle-show { display: none; }
.claims-collapsed .claims-toggle .toggle-hide { display: none; }

/* Findings */
.finding-item {
    padding: 1.2rem 1.2rem;
    margin-bottom: 0.6rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.finding-item:last-child { margin-bottom: 0; }

.finding-type {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.finding-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.finding-description {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.finding-sources {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Events */
.event-item {
    padding: 0.8rem 0 0.8rem 1rem;
    border-left: 2px solid var(--verified);
    margin-bottom: 0.6rem;
}

.event-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.event-description {
    font-size: 0.88rem;
    line-height: 1.55;
}

/* Gaps */
.gap-item {
    padding: 0.7rem 0 0.7rem 1rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-left: 2px solid var(--border);
    margin-bottom: 0.6rem;
}

.gap-item:last-child { margin-bottom: 0; }

.gap-type {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.gap-why {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.2rem;
    line-height: 1.5;
}

/* Sources */
.source-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.source-tag {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    background: var(--tag-bg);
    border-radius: 3px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.source-accuracy {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
}

.source-discovered {
    border-left: 2px solid var(--accent);
}

.source-origin {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Self-grade */
.grade-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    color: var(--text-secondary);
    background: var(--tag-bg);
    letter-spacing: 0.01em;
}

.self-grade-bar {
    margin-bottom: 2.5rem;
    padding: 1.2rem 1.4rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.grade-dimensions {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.grade-dim {
    flex: 1;
    min-width: 100px;
}

.grade-dim-label {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.2rem;
}

.grade-dim-score {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 0.3rem;
}

.grade-bar {
    height: 3px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.grade-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s;
}

.grade-summary {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
    font-style: italic;
    line-height: 1.5;
}

/* Connections */
.connection-item {
    padding: 1rem 1.2rem;
    margin-bottom: 0.6rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.connection-unexpected {
    border-left: 3px solid var(--accent);
}

.connection-tag {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--tag-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    margin-right: 0.5rem;
}

.connection-type {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.connection-title {
    font-weight: 600;
    font-size: 0.92rem;
    margin: 0.3rem 0;
    line-height: 1.4;
}

.connection-description {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.connection-topics {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* Connections page */
.connections-intro {
    margin-bottom: 2rem;
}

.connections-list {
    list-style: none;
}

.connections-list .connection-item {
    margin-bottom: 1rem;
}

.connection-meta {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-top: 0.5rem;
}

/* About page */
.about-content {
    font-size: 0.95rem;
    line-height: 1.85;
}

.about-content p {
    margin-bottom: 1.4rem;
}

.about-content strong {
    font-weight: 600;
}

/* 404 */
.not-found {
    text-align: center;
    padding: 5rem 0;
}

.not-found h1 {
    font-family: var(--font-mono);
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--border);
    margin-bottom: 0.8rem;
}

.not-found p {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 600px) {
    html { font-size: 16px; }

    .container { padding: 0 1rem; }

    header { margin-bottom: 2rem; }

    .page-title { font-size: 1.5rem; }

    .inv-header h1 { font-size: 1.5rem; }

    .evidence-summary { flex-wrap: wrap; gap: 0.8rem; }

    .inv-meta { flex-wrap: wrap; gap: 0.5rem; }

    .inv-header-meta { gap: 0.6rem; }
}
