:root {
  --ink: #0f172a;
  --muted: #5a677a;
  --line: #d6deea;
  --paper: rgba(255, 255, 255, 0.8);
  --brand: #0f4fd8;
  --accent: #129f9b;
  --amber: #ba8b3a;
  --bg: #f4f7fb;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #e9eef7 0%, var(--bg) 36%, #f5f8fb 100%);
  font-family: "IBM Plex Sans", sans-serif;
}

h1,
h2,
h3,
h4 {
  font-family: "Outfit", sans-serif;
  letter-spacing: -0.015em;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(65px);
  opacity: 0.42;
  pointer-events: none;
}

.ambient-a {
  width: 420px;
  height: 420px;
  background: #bed3ff;
  left: -120px;
  top: -100px;
}

.ambient-b {
  width: 380px;
  height: 380px;
  background: #b8f2e7;
  right: -130px;
  top: 60px;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 1.2rem 0;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
}

.brand {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-gh {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-weight: 600;
  color: var(--ink) !important;
  transition: border-color 0.2s;
}

.nav-gh:hover { border-color: var(--brand); }

.hero {
  padding: 3.2rem 0 2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.75rem;
  color: var(--brand);
  font-weight: 700;
  margin: 0 0 0.45rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.7rem);
  line-height: 1.06;
  max-width: 900px;
}

.hero-copy {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 750px;
  font-size: 1.04rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(130deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 79, 216, 0.24);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.hero-stats {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.hero-stats article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  padding: 0.75rem;
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.stat-value {
  margin: 0.35rem 0 0;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
}

.cards-grid {
  margin: 1.2rem auto 3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  padding: 1rem;
}

.glass-card h3 {
  font-size: 1.05rem;
}

.glass-card p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.section-head {
  margin-bottom: 0.85rem;
}

.section-head h2 {
  font-size: clamp(1.45rem, 4vw, 2.15rem);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 2.8rem;
}

.flow-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  padding: 0.85rem;
}

.flow-grid span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e6efff;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.8rem;
}

.flow-grid h4 {
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.flow-grid p {
  color: var(--muted);
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.outputs {
  margin-bottom: 2.6rem;
}

.outputs-grid,
.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
  padding: 1rem;
}

.panel h3 {
  font-size: 1.02rem;
}

.odds-list {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.odds-list li {
  display: flex;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
}

.team {
  font-weight: 600;
}

.prob {
  color: var(--brand);
  font-weight: 700;
}

.meta-list {
  margin: 0.8rem 0 0;
  display: grid;
  gap: 0.5rem;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.35rem;
}

.meta-list dt {
  color: var(--muted);
}

.meta-list dd {
  margin: 0;
  font-weight: 600;
}

pre {
  margin: 0.75rem 0 0;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #d0dae9;
  background: #f4f8ff;
  padding: 0.85rem;
}

code {
  font-family: "JetBrains Mono", "IBM Plex Mono", monospace;
  font-size: 0.83rem;
  color: #1e2a42;
}

/* ── Section copy ──────────────────────────────────────────── */
.section-copy {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.6;
  max-width: 760px;
}

/* ── Model cards ───────────────────────────────────────────── */
.model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 2.8rem;
}

.model-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.model-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.model-badge.survival   { background: #e6efff; color: var(--brand); }
.model-badge.matchup    { background: #e6fff8; color: #0d7a6a; }
.model-badge.simulation { background: #fff4e6; color: #9a4e0d; }
.model-badge.series-len { background: #f5e6ff; color: #6b21a8; }
.model-badge.schedule   { background: #e6f4ff; color: #0369a1; }

.model-card h3 {
  font-size: 1rem;
  margin: 0;
}

.model-role {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.45;
}

.model-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.model-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.kpi-value {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.1;
}

.kpi-label {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.3;
}

.model-rationale {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  flex: 1;
}

.model-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.model-features span {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.18rem 0.48rem;
  font-size: 0.73rem;
  color: var(--ink);
  font-weight: 500;
}

/* ── Validation bar (LOYO accuracy) ────────────────────────── */
.loyo-bar-wrap {
  margin-top: 0.25rem;
}

.loyo-bar-track {
  background: var(--line);
  border-radius: 4px;
  height: 5px;
  overflow: hidden;
  margin-top: 0.2rem;
}

.loyo-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.site-footer {
  margin-top: 2.6rem;
  padding: 1.1rem 0 1.8rem;
}

.footer-wrap {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
}

@media (max-width: 980px) {
  .hero-stats,
  .cards-grid,
  .outputs-grid,
  .code-grid {
    grid-template-columns: 1fr 1fr;
  }

  .flow-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .model-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-wrap {
    border-radius: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 0.7rem;
  }

  .hero {
    padding-top: 2.1rem;
  }

  .hero-stats,
  .cards-grid,
  .outputs-grid,
  .code-grid,
  .flow-grid,
  .model-grid {
    grid-template-columns: 1fr;
  }

  .footer-wrap {
    flex-direction: column;
    gap: 0.4rem;
  }
}
