/* Direction: a match official's scoresheet. Quiet ink-on-paper chrome; the verdict sheet carries the detail. */
:root {
  --page: #f7f4ee;
  --card: #fdfbf7;
  --raised: #efe9df;
  --line: rgba(31, 27, 22, 0.08);
  --line-strong: rgba(31, 27, 22, 0.14);
  --text: #1f1b16;
  --text-2: #5e554a;
  --text-3: #7b7266;
  --accent: #245c8a;
  --accent-soft: rgba(36, 92, 138, 0.1);
  --holds: #1d7a46;
  --wrong: #b42318;
  --caution: #9a5b08;
  --serif: "Newsreader", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--page); }
body { margin: 0; color: var(--text); font: 400 15px/22px var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* Bar */
.bar {
  position: sticky; top: 0; z-index: 2;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 56px; padding: 0 32px;
  background: var(--page); border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: 8px; font: 500 17px/1 var(--sans); color: var(--text); text-decoration: none; }
.tabs { display: flex; gap: 4px; }
.tabs button {
  font: 500 14px/20px var(--sans); color: var(--text-2);
  height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.net { justify-self: end; font: 400 12px/16px var(--mono); color: var(--caution); }

/* Layout */
main { max-width: 1280px; margin: 0 auto; padding: 64px 32px 80px; }
h1 { font: 400 44px/48px var(--serif); letter-spacing: -0.02em; margin: 0 0 16px; text-wrap: balance; }
h2 { font: 500 15px/22px var(--sans); margin: 0 0 4px; }
.lede { color: var(--text-2); font-size: 17px; line-height: 28px; max-width: 36rem; margin: 0 0 32px; }
.page-head { margin-bottom: 32px; max-width: 44rem; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.intro { position: sticky; top: 120px; }

/* Form */
.ask label { display: block; font-size: 13px; line-height: 20px; color: var(--text-2); margin-bottom: 8px; }
.ask-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.ask input {
  font: 400 15px/22px var(--sans); color: var(--text); background: var(--card);
  height: 48px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 10px; width: 100%;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.ask input::placeholder { color: var(--text-3); }
.ask input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ask button {
  font: 500 15px/1 var(--sans); color: #fff; background: var(--text);
  height: 48px; padding: 0 20px; border: 0; border-radius: 10px; cursor: pointer;
  transition: background-color 150ms var(--ease), transform 120ms var(--ease);
}
.ask button:hover { background: #3a332b; }
.ask button:active { transform: scale(0.98); }
.ask button[disabled] { opacity: 0.6; cursor: progress; }
.hint { color: var(--text-3); font-size: 13px; line-height: 20px; margin: 12px 0 0; max-width: 36rem; }

/* The verdict sheet */
.slot-label { font: 400 12px/16px var(--mono); color: var(--text-3); margin: 0 0 8px; }
.sheet {
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 8px 24px rgba(31, 27, 22, 0.06); overflow: hidden;
  animation: rise 360ms var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.sheet-top { padding: 24px 24px 20px; border-bottom: 1px solid var(--line); }
.market-q { font: 400 15px/22px var(--sans); color: var(--text-2); margin: 0 0 12px; }
.verdict-word { font: 400 56px/56px var(--serif); letter-spacing: -0.03em; margin: 0 0 8px; }
.v-holds, .v-settled { color: var(--holds); }
.v-wrong { color: var(--wrong); }
.v-too_early, .v-contested { color: var(--caution); }
.v-quiet { color: var(--text-3); }
.note { color: var(--text-2); margin: 0; }
.meta { font: 400 12px/16px var(--mono); color: var(--text-3); margin-top: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
.meta .warn { color: var(--caution); }

/* Signature: the scoreline */
.scoreline {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 24px; border-bottom: 1px solid var(--line); background: var(--page);
}
.team { font: 500 15px/20px var(--sans); }
.team.home { text-align: right; }
.score { font: 400 40px/40px var(--serif); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.02em; white-space: nowrap; }
.score small { display: block; text-align: center; font: 400 12px/16px var(--mono); color: var(--text-3); letter-spacing: 0; margin-top: 4px; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); }
.facts div { padding: 16px 24px; border-bottom: 1px solid var(--line); }
.facts div + div { border-left: 1px solid var(--line); }
.facts div:nth-child(3n + 1) { border-left: 0; }
.facts dt { font-size: 12px; line-height: 16px; color: var(--text-3); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }

.receipts { padding: 16px 24px 20px; }
.receipts h3 { font: 400 12px/16px var(--mono); color: var(--text-3); margin: 0 0 8px; }
.receipt { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.receipt:first-of-type { border-top: 0; }
.hash { font: 400 12px/20px var(--mono); color: var(--accent); text-decoration: none; }
.hash:hover { text-decoration: underline; }
details { margin-top: 8px; font-size: 14px; color: var(--text-2); }
summary { cursor: pointer; color: var(--text-2); }
details ul { margin: 8px 0 0; padding-left: 16px; color: var(--text-3); }
.plan { padding: 0 24px 20px; color: var(--text-2); font-size: 14px; margin: 0; }
.choices { list-style: none; margin: 0; padding: 8px; }
.choices button {
  width: 100%; text-align: left; font: 400 14px/20px var(--sans); color: var(--text);
  min-height: 40px; padding: 10px 12px; background: none; border: 0; border-radius: 8px; cursor: pointer;
  transition: background-color 150ms var(--ease);
}
.choices button:hover { background: var(--raised); }
.loading { padding: 24px; color: var(--text-2); }

/* Watch */
.feed-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.feed-meta { font: 400 12px/16px var(--mono); color: var(--text-3); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--text-2); cursor: pointer; min-height: 40px; }
.toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.feed-head, .feed button {
  display: grid; grid-template-columns: 88px minmax(0, 1fr) minmax(0, 200px) 72px 104px; gap: 16px; align-items: center;
}
.feed-head { padding: 0 12px 8px; font-size: 12px; line-height: 16px; color: var(--text-3); border-bottom: 1px solid var(--line-strong); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { border-bottom: 1px solid var(--line); }
.feed button {
  width: 100%; height: 48px; padding: 0 12px; background: none; border: 0; text-align: left; cursor: pointer;
  font: inherit; color: var(--text); transition: background-color 150ms var(--ease);
}
.feed button:hover { background: var(--card); }
.cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.left { font: 400 13px/20px var(--mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
.left.closing { color: var(--caution); }
.left.closed { color: var(--text-3); }
.muted { color: var(--text-2); }
.cov { font-size: 13px; line-height: 20px; color: var(--text-3); display: inline-flex; align-items: center; gap: 8px; }
.cov.on { color: var(--text); }
.cov.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--holds); }
.empty { padding: 32px 12px; color: var(--text-2); }

/* How */
.how-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 64px; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 24px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 0 16px; }
.steps li::before { content: counter(step); font: 400 24px/24px var(--serif); color: var(--text-3); grid-row: span 2; }
.steps p { margin: 0; color: var(--text-2); max-width: 36rem; }
.limits { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; align-self: start; }
.limits ul { margin: 8px 0 0; padding-left: 16px; color: var(--text-2); }
.limits li { margin: 8px 0; }

.foot {
  max-width: 1280px; margin: 0 auto; padding: 24px 32px 40px; border-top: 1px solid var(--line);
  display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; line-height: 20px; color: var(--text-3);
}

@media (max-width: 960px) {
  .split, .how-grid { grid-template-columns: 1fr; gap: 40px; }
  .intro { position: static; }
}
@media (max-width: 640px) {
  .bar { grid-template-columns: 1fr auto; height: auto; padding: 12px 16px 0; row-gap: 8px; }
  .tabs { grid-column: 1 / -1; grid-row: 2; padding-bottom: 8px; overflow-x: auto; }
  main { padding: 40px 16px 64px; }
  h1 { font-size: 36px; line-height: 40px; }
  .lede { font-size: 16px; line-height: 24px; }
  .ask-row { grid-template-columns: 1fr; }
  .verdict-word { font-size: 44px; line-height: 44px; }
  .score { font-size: 32px; line-height: 32px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3n + 1) { border-left: 1px solid var(--line); }
  .facts div:nth-child(2n + 1) { border-left: 0; }
  .feed-head { display: none; }
  .feed button { grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; height: auto; padding: 12px; row-gap: 4px; }
  .feed .proposed, .feed .bond { display: none; }
  .feed .cov { grid-column: 2; }
  .foot { padding: 24px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
