@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --bg: #f4f6f2;
  --bg-soft: #eef2ec;
  --surface: #ffffff;
  --ink: #14201a;
  --ink-2: #2c3d34;
  --muted: #5c6f64;
  --line: #d5ddd6;
  --line-strong: #b8c4bb;
  --turf: #1f6b45;
  --turf-deep: #174f34;
  --flood: #c9891a;
  --flood-soft: rgba(201, 137, 26, 0.12);
  --live: #d64545;
  --ok: #1f8a5b;
  --radius: 12px;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1120px;
  --ease: 200ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 55% at 50% -20%, rgba(31, 107, 69, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(201, 137, 26, 0.07), transparent 50%),
    var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--turf); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--turf-deep); }
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--turf);
  outline-offset: 3px;
}
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }

.wrap {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 8px;
}
.brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--turf); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}
.btn-primary {
  background: var(--turf);
  color: #fff;
}
.btn-primary:hover {
  background: var(--turf-deep);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(31, 107, 69, 0.15);
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--turf);
  color: var(--turf-deep);
}
.btn-block { width: 100%; }

.hero-shell {
  padding-bottom: 64px;
  border-bottom: 1px solid var(--line);
}
.hero {
  padding: 48px 0 0;
  max-width: 640px;
}
.hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 72px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero .lead {
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--muted);
  max-width: 34em;
  line-height: 1.55;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.board {
  margin-top: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(20, 32, 26, 0.08);
  animation: board-in 700ms ease both;
}
.board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--live);
  font-weight: 500;
}
.live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(214, 69, 69, 0.5);
  animation: pulse 1.6s ease infinite;
}
.board-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 28px 24px 20px;
  text-align: center;
}
.board-team {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.board-team:first-child { text-align: right; }
.board-team:last-child { text-align: left; }
.board-nums {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 72px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--turf);
  line-height: 1;
}
.board-meta {
  padding: 0 24px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.board-api {
  margin: 0;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #f0f4ef;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
  overflow-x: auto;
}
.board-api .accent { color: var(--turf-deep); font-weight: 500; }
.board-api .muted { color: var(--muted); }

.section { padding: 72px 0; }
.section-alt {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}
.section h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--ink);
}
.section .sub {
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 16px;
  max-width: 38em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
  box-shadow: 0 8px 24px rgba(20, 32, 26, 0.04);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.feature-card:hover {
  border-color: #c5d6cb;
  box-shadow: 0 12px 28px rgba(20, 32, 26, 0.07);
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(31, 107, 69, 0.1);
  color: var(--turf);
  margin-bottom: 14px;
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-body);
  letter-spacing: 0;
  text-transform: none;
}
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.hub-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 26px;
  box-shadow: 0 8px 24px rgba(20, 32, 26, 0.04);
}
.hub-card.featured {
  border-color: rgba(31, 107, 69, 0.35);
  box-shadow: 0 0 0 1px rgba(31, 107, 69, 0.08), 0 12px 28px rgba(31, 107, 69, 0.08);
}
.hub-card.linkish {
  display: block;
  color: inherit;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.hub-card.linkish:hover {
  border-color: var(--turf);
  color: inherit;
}
.hub-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--turf);
  margin-bottom: 10px;
}
.hub-card h2, .hub-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.hub-card > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.hub-list {
  margin: 0 0 20px;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 14px;
}
.hub-list li { margin: 6px 0; }
.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 900px) {
  .feature-grid, .hub-grid { grid-template-columns: 1fr; }
}

.panel {
  margin: 0;
  background: #1a2620;
  color: #d7e2db;
  border: 1px solid #2a3a31;
  border-radius: var(--radius);
  padding: 22px 24px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  box-shadow: 0 12px 32px rgba(20, 32, 26, 0.1);
}
.panel .muted { color: #8fa398; }
.panel .accent { color: #f0c15a; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.price-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20, 32, 26, 0.04);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.price-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 28px rgba(20, 32, 26, 0.08);
}
.price-card.featured {
  border-color: var(--turf);
  box-shadow: 0 0 0 1px rgba(31, 107, 69, 0.2), 0 16px 36px rgba(31, 107, 69, 0.1);
}
.price-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.price, .price-free {
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--ink);
}
.price span, .price-free span {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.list {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}
.list li {
  margin: 8px 0;
  padding-left: 16px;
  position: relative;
}
.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--turf);
  opacity: 0.75;
}
.price-card .btn { margin-top: auto; }
.note { margin-top: 20px; color: var(--muted); font-size: 13px; }

.docs-narrow { max-width: 820px; }

.code-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.code-tab {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
}
.code-tab.is-active {
  background: var(--turf);
  border-color: var(--turf);
  color: #fff;
}
.code-pane { display: none; }
.code-pane.is-active { display: block; }

.docs-callout {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--ink-2);
}
.docs-callout strong {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--turf-deep);
}

.docs-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  align-items: start;
}
.docs-toc { position: sticky; top: 24px; font-size: 13px; }
.docs-toc .toc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.docs-toc a { display: block; color: var(--muted); padding: 5px 0; }
.docs-toc a:hover { color: var(--turf); }

.endpoint {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(20, 32, 26, 0.04);
}
.endpoint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.method {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--turf);
  border-radius: 4px;
  padding: 3px 8px;
}
.endpoint-path {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
}
.endpoint-desc {
  flex: 1 1 100%;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.endpoint-body { padding: 18px; }
.endpoint-body h4 {
  margin: 18px 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.endpoint-body h4:first-child { margin-top: 0; }

.api-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.api-table th,
.api-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
  color: var(--ink-2);
}
.api-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-soft);
}
.api-table tr:last-child td { border-bottom: 0; }
.api-table code, .field-table td:first-child {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--turf-deep);
}
.field-table td:first-child { white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--bg-soft);
}

.cta-band { text-align: center; max-width: 560px; margin-inline: auto; }
.cta-band .sub { margin-inline: auto; }

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  color: var(--muted);
  font-size: 13px;
}
.footer .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--turf); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.step h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.hero-league-hint {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.text-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--turf);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:hover { color: var(--turf-deep); }

.board-league-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--turf);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.board-league-btn:hover { color: var(--turf-deep); }

.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 26, 0.45);
}
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(20, 32, 26, 0.18);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 8px;
}
.modal-head h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.modal-close {
  border: 0;
  background: var(--bg-soft);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-2);
  cursor: pointer;
}
.modal-close:hover { background: var(--line); }
.modal-sub {
  margin: 0;
  padding: 0 20px 14px;
  font-size: 13px;
  color: var(--muted);
}
.league-table-wrap {
  overflow: auto;
  padding: 0 12px 16px;
  flex: 1;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(214, 69, 69, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(214, 69, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(214, 69, 69, 0); }
}
@keyframes board-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .pricing-grid, .grid-3 { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 6px; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
  }
  .docs-toc .toc-label { width: 100%; }
  .nav-links { gap: 10px; font-size: 13px; }
  .hero { padding-top: 32px; }
  .section { padding: 52px 0; }
}
