/* OverField Bets — scoreboard-driven, confidence-bar-forward.
   Dark, bold, Inter font. Built for the bets product. */

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* === Design Tokens === */
:root {
    --bg: #08080d;
    --bg-raised: #0e0e14;
    --bg-card: rgba(255, 255, 255, 0.025);
    --bg-card-hover: rgba(255, 255, 255, 0.045);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.14);

    --text: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-bright: #fafafa;

    --accent: #60a5fa;
    --green: #4ade80;
    --green-dim: rgba(74, 222, 128, 0.12);
    --amber: #fbbf24;
    --amber-dim: rgba(251, 191, 36, 0.12);
    --red: #f87171;
    --red-dim: rgba(248, 113, 113, 0.12);

    --radius: 12px;
    --radius-sm: 8px;
    --max-width: 900px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.2s ease;
}

/* === Base === */
html { font-size: 17px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.02) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }

/* === Header === */
.site-header { padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-name { color: var(--text-bright); font-weight: 700; font-size: 1.2rem; text-decoration: none; letter-spacing: -0.02em; }
.site-nav { display: flex; gap: 1.5rem; }
.nav-link { color: var(--text-muted); font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: color var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--text); text-decoration: none; }

/* === Footer === */
.site-footer { margin-top: auto; padding: 2rem 0; border-top: 1px solid var(--border); }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; }
.footer-left { display: flex; gap: 1.5rem; align-items: center; }
.footer-name { color: var(--text-muted); font-weight: 600; font-size: 0.85rem; text-decoration: none; }
.footer-link { color: var(--text-muted); font-size: 0.8rem; text-decoration: none; }
.footer-link:hover { color: var(--text); }

/* === Hero === */
.hero { text-align: center; padding: 3rem 0 2rem; }
.hero-stats { margin-bottom: 0.5rem; }
.stat-big { font-size: 4rem; font-weight: 700; color: var(--text-bright); letter-spacing: -0.03em; line-height: 1; }
.stat-label { font-size: 1rem; color: var(--text-muted); margin-top: 0.25rem; }
.hero-details { display: flex; justify-content: center; gap: 1.5rem; color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.75rem; }
.hero-tagline { color: var(--text-muted); font-size: 0.95rem; margin-top: 1rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* === Sections === */
.section { margin-top: 2.5rem; }
.section-title { font-size: 1rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.page-title { font-size: 1.8rem; font-weight: 700; color: var(--text-bright); margin-top: 2rem; margin-bottom: 0.5rem; }
.page-subtitle { color: var(--text-muted); margin-bottom: 2rem; }

/* === Bet Cards === */
.bet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

.bet-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}
.bet-card:hover { background: var(--bg-card-hover); border-color: var(--border-hover); text-decoration: none; }

.bet-card-header { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; flex-wrap: wrap; }
.bet-headline { font-size: 1.05rem; font-weight: 600; color: var(--text-bright); line-height: 1.35; margin-bottom: 0.75rem; }
.bet-card-footer { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem; }

/* === Tags === */
.domain-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(96, 165, 250, 0.12);
    color: var(--accent);
}
.difficulty-tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.difficulty-tag.consensus { background: var(--green-dim); color: var(--green); }
.difficulty-tag.standard { background: var(--amber-dim); color: var(--amber); }
.difficulty-tag.contrarian { background: var(--red-dim); color: var(--red); }
.horizon-tag { font-size: 0.7rem; color: var(--text-muted); }
.deadline { font-size: 0.8rem; color: var(--text-muted); margin-left: auto; }

/* === Confidence Bars === */
.confidence-bar-wrap {
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    height: 28px;
    overflow: hidden;
    position: relative;
}
.confidence-bar-wrap.large { height: 36px; margin-top: 1rem; }

.confidence-bar {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #000;
    min-width: 3rem;
    transition: width 0.5s ease;
}

/* === Outcome Badges === */
.outcome-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}
.outcome-badge.correct { background: var(--green-dim); color: var(--green); }
.outcome-badge.wrong { background: var(--red-dim); color: var(--red); }
.outcome-badge.voided { background: rgba(255,255,255,0.08); color: var(--text-muted); }

/* === Resolutions === */
.resolution-list { display: flex; flex-direction: column; gap: 0.5rem; }
.resolution-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}
.resolution-card:hover { background: var(--bg-card-hover); text-decoration: none; }
.resolution-headline { font-weight: 500; flex: 1; }
.resolution-confidence { color: var(--text-muted); font-size: 0.85rem; }
.resolution-meta { color: var(--text-muted); font-size: 0.85rem; }

/* === Ticker === */
.ticker { display: flex; flex-direction: column; gap: 0.4rem; }
.ticker-item { font-size: 0.85rem; color: var(--text-secondary); padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.shift-delta.up { color: var(--green); }
.shift-delta.down { color: var(--red); }

/* === Bet Detail === */
.bet-header { margin-top: 2rem; }
.bet-meta-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.75rem; }
.bet-title { font-size: 1.8rem; font-weight: 700; color: var(--text-bright); line-height: 1.25; }
.bet-prose { color: var(--text); line-height: 1.7; font-size: 1rem; }
.bet-prose.counter { border-left: 3px solid var(--red); padding-left: 1rem; color: var(--text-secondary); }
.bet-prose.criteria { border-left: 3px solid var(--green); padding-left: 1rem; }
.bet-prose.origin { color: var(--text-muted); font-style: italic; }

/* === Vote === */
.vote-section { margin-top: 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.vote-btn {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.vote-btn:hover { border-color: var(--border-hover); }
.vote-btn.agree:hover { background: var(--green-dim); border-color: var(--green); }
.vote-btn.disagree:hover { background: var(--red-dim); border-color: var(--red); }
.vote-counts { color: var(--text-muted); font-size: 0.85rem; }
.vote-result { display: flex; border-radius: var(--radius-sm); overflow: hidden; height: 28px; font-size: 0.8rem; font-weight: 500; }
.agree-bar { background: var(--green-dim); color: var(--green); display: flex; align-items: center; padding: 0 0.5rem; }
.disagree-bar { background: var(--red-dim); color: var(--red); display: flex; align-items: center; justify-content: flex-end; padding: 0 0.5rem; }

/* === Evidence === */
.evidence-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.evidence-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.evidence-panel h3 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.evidence-panel.for h3 { color: var(--green); }
.evidence-panel.against h3 { color: var(--red); }
.evidence-item { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.evidence-item:last-child { border-bottom: none; }
.evidence-summary { display: block; font-size: 0.9rem; color: var(--text); line-height: 1.5; }
.evidence-meta { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.empty { color: var(--text-muted); font-size: 0.85rem; font-style: italic; }

/* === Confidence Timeline === */
.confidence-timeline { display: flex; flex-direction: column; gap: 0.5rem; }
.timeline-entry { display: grid; grid-template-columns: 70px 120px 1fr; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.timeline-date { color: var(--text-muted); }
.timeline-change { color: var(--text-secondary); font-weight: 500; }
.timeline-reason { color: var(--text); }

/* === Lessons === */
.lessons-list { display: flex; flex-direction: column; gap: 1rem; }
.lesson-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.lesson-card p { margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--text-secondary); }
.lesson-card strong { color: var(--text); }
.lesson-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.lesson-header a { font-weight: 600; }
.lesson-rule { font-weight: 600; color: var(--amber) !important; margin-top: 0.75rem !important; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.lesson-section .lesson-card { border-color: var(--red); border-left-width: 3px; }

/* === Scoreboard === */
.scoreboard-hero { display: flex; justify-content: center; gap: 3rem; padding: 2rem 0; flex-wrap: wrap; }
.score-stat { text-align: center; }
.score-big { font-size: 2rem; font-weight: 700; color: var(--text-bright); }
.score-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.streak-row { display: flex; gap: 2rem; color: var(--text-secondary); font-size: 0.9rem; }

.domain-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.domain-table th { text-align: left; color: var(--text-muted); font-weight: 500; padding: 0.5rem; border-bottom: 1px solid var(--border); }
.domain-table td { padding: 0.5rem; border-bottom: 1px solid var(--border); color: var(--text-secondary); }

/* === About === */
.about-content { max-width: 660px; }
.about-content p { margin-bottom: 1rem; color: var(--text-secondary); line-height: 1.7; }
.about-content h2 { color: var(--text-bright); font-size: 1.2rem; margin-top: 2rem; margin-bottom: 0.75rem; }

/* === Legal / Prose Pages === */
.page-content { max-width: 660px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
.page-header { margin-top: 2rem; margin-bottom: 2rem; }
.page-header h1 { font-size: 1.8rem; font-weight: 700; color: var(--text-bright); }
.page-date { color: var(--text-muted); font-size: 0.85rem; }
.page-body p { margin-bottom: 1rem; color: var(--text-secondary); line-height: 1.7; }
.page-body h2 { color: var(--text-bright); font-size: 1.15rem; font-weight: 600; margin-top: 2rem; margin-bottom: 0.75rem; }
.page-body ul { margin-bottom: 1rem; padding-left: 1.5rem; color: var(--text-secondary); line-height: 1.7; }
.page-body li { margin-bottom: 0.4rem; }
.page-body a { color: var(--accent); }
.page-body strong { color: var(--text); }

/* === 404 === */
.not-found { text-align: center; padding: 4rem 0; }
.not-found h1 { font-size: 4rem; color: var(--text-muted); }
.not-found p { color: var(--text-secondary); margin-top: 1rem; }

/* === Utilities === */
.empty-state { color: var(--text-muted); font-size: 0.95rem; padding: 2rem 0; }
.see-all { display: inline-block; margin-top: 1rem; color: var(--accent); font-size: 0.9rem; }

/* === Responsive === */
@media (max-width: 640px) {
    .site-header .container { flex-wrap: wrap; gap: 0.5rem; }
    .site-nav { gap: 0.6rem; width: 100%; }
    .nav-link { font-size: 0.78rem; }
    .hero-details { flex-direction: column; gap: 0.25rem; }
    .stat-big { font-size: 3rem; }
    .bet-grid { grid-template-columns: 1fr; }
    .evidence-panels { grid-template-columns: 1fr; }
    .timeline-entry { grid-template-columns: 1fr; gap: 0.25rem; }
    .scoreboard-hero { gap: 1.5rem; }
}
