/* ==========================================================================
   Thirty & Five — site styles. Load tokens.css first.
   Mobile first; the hero splits into two columns from 960px.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-body)/var(--lh-body) var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-1); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--s-4); top: -60px; z-index: 10;
  background: var(--btn-bg); color: var(--btn-text); padding: var(--s-2) var(--s-4);
  font-weight: 700; border-radius: var(--r-2);
}
.skip:focus { top: var(--s-4); }

/* Type -------------------------------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display .soft { color: var(--text-soft); display: block; }
.num { font-family: var(--font-score); font-variant-numeric: tabular-nums; }
.kicker { font: 700 var(--fs-small)/1 var(--font-score); color: var(--accent-text); }
.lede { font-size: var(--fs-lede); line-height: 1.55; max-width: 30em; }
.muted { color: var(--text-muted); }
.fineprint { font-size: var(--fs-small); color: var(--text-muted); }

/* Lockup ------------------------------------------------------------------ */
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.lockup__mark { width: 34px; height: 34px; flex: none; }
.lockup__word {
  font: 800 1.5rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .01em;
}
.amp { color: var(--accent-text); margin: 0 .04em; }

/* Seven-segment digits ---------------------------------------------------- */
.seg-on { fill: var(--accent); }
.seg-lit { fill: var(--board-text); }
.seg-off { fill: var(--board-text); opacity: .07; }

/* Fields and buttons ------------------------------------------------------ */
.input {
  width: 100%; min-height: var(--field-h); padding: 0 18px;
  background: var(--surface); border: 1.5px solid var(--line-input); border-radius: var(--r-2);
  font-size: var(--fs-body);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input::placeholder { color: var(--text-muted); opacity: 1; }
.input:hover { border-color: var(--text-muted); }
.input:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 2px var(--focus); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: var(--fs-small); font-weight: 600; }
.field__error:empty { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--field-h); padding: 0 var(--s-5);
  border: 0; border-radius: var(--r-2);
  background: var(--btn-bg); color: var(--btn-text);
  font: 700 1rem/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:hover { opacity: .9; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: progress; opacity: .8; }
.btn--block { width: 100%; }
.btn--quiet { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-input); }
.btn--quiet:hover { box-shadow: inset 0 0 0 1.5px var(--text); opacity: 1; }
.btn .spinner { display: none; }
.btn[data-busy="true"] .spinner { display: inline-block; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

.alert {
  padding: var(--s-3) var(--s-4); border: 1.5px solid var(--danger); border-radius: var(--r-2);
  font-size: var(--fs-small);
}
.alert strong { color: var(--danger); }

/* Hero split -------------------------------------------------------------- */
.split { display: grid; }
.split__copy {
  padding: var(--s-5) var(--gutter) var(--s-7);
  display: flex; flex-direction: column; gap: var(--s-7);
}
.split__board {
  position: relative; overflow: hidden;
  background: var(--board); height: 470px;
}
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 760px; }
  .split__copy { padding: var(--s-7) var(--gutter) var(--s-8); justify-content: space-between; }
  .split__board { height: auto; min-height: 760px; }
}

.hero { display: flex; flex-direction: column; gap: var(--s-5); max-width: 540px; }
.hero h1 { font-size: var(--fs-hero); }
.hero__form { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
@media (min-width: 480px) {
  .hero__row { display: flex; gap: var(--s-2); }
  .hero__row .input { flex: 1 1 auto; min-width: 0; }
}
.hero__row .btn { width: 100%; margin-top: var(--s-2); }
@media (min-width: 480px) { .hero__row .btn { width: auto; margin-top: 0; } }
.hero__facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); font-size: var(--fs-small); color: var(--text-muted); }
.hero__facts .num { color: var(--accent-text); font-weight: 700; }
@media (max-width: 959px) { .hero__facts { display: none; } }

.step-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); }
.step-head h1 { font-size: var(--fs-h1); }
.step-head .num { font-size: var(--fs-small); color: var(--text-muted); white-space: nowrap; }
.step-head .num b { color: var(--text); }

/* Board: the big clock and the phone ------------------------------------- */
.board-clock {
  position: absolute; left: 50%; top: 36px; transform: translateX(-50%);
  width: min(320px, 82%);
}
@media (min-width: 960px) { .board-clock { top: 56px; width: min(560px, 88%); } }

.phone {
  position: absolute; left: 50%; top: 150px; transform: translateX(-50%);
  width: 270px; height: 560px; padding: 9px; border-radius: 42px;
  background: var(--t5-ink-700);
  box-shadow: 0 40px 80px rgba(0,0,0,.55), inset 0 0 0 1px #3a3f48;
}
@media (min-width: 960px) { .phone { top: 300px; width: 300px; height: 620px; padding: 10px; border-radius: 46px; } }
.phone__screen {
  height: 100%; border-radius: 33px; background: #fff; overflow: hidden; color: var(--t5-ink-900);
  font-family: var(--font-body);
}
@media (min-width: 960px) { .phone__screen { border-radius: 36px; } }
.pm-mast { background: var(--t5-ink-900); padding: 28px 14px 10px; display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--t5-lamp-500); }
.pm-word { font: 800 16px/1 var(--font-display); text-transform: uppercase; color: #f2f1ec; display: flex; align-items: center; gap: 5px; }
.pm-word .amp { color: var(--t5-lamp-500); }
.pm-badge { font: 700 8px/1 var(--font-score); color: var(--t5-lamp-500); background: #000; padding: 3px 4px; border-radius: 3px; }
.pm-date { font: 700 7.5px/1 var(--font-score); color: var(--t5-ink-300); }
.pm-body { padding: 14px; }
.pm-k { font: 700 9px/1 var(--font-score); color: var(--t5-lamp-800); }
.pm-h { font: 800 20px/1 var(--font-display); text-transform: uppercase; margin: 4px 0 8px; }
.pm-row { display: grid; grid-template-columns: 16px 32px minmax(0, 1fr); gap: 4px; padding: 8px 0; border-top: 1px solid #dddcd4; font-size: 12px; line-height: 1.35; }
.pm-row:first-of-type { border-top: 1.5px solid var(--t5-ink-900); }
.pm-row .n { font: 700 12px/1.2 var(--font-score); }
.pm-tag { font: 700 7.5px/1 var(--font-score); padding: 3px; border: 1px solid #5a5e66; color: #5a5e66; border-radius: 3px; text-align: center; align-self: start; }
.pm-jump { margin-top: 8px; display: inline-flex; gap: 6px; background: var(--t5-ink-900); color: #fff; border-radius: 5px; padding: 7px 9px; font-size: 10.5px; font-weight: 700; }
.pm-jump span { color: var(--t5-lamp-500); font-family: var(--font-score); }
.pm-card { border: 1.5px solid var(--t5-ink-900); border-radius: 8px; overflow: hidden; margin-top: 10px; }
.pm-card__name { padding: 9px 11px 7px; font: 800 16px/1 var(--font-display); text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.pm-card__strip { background: var(--t5-ink-900); padding: 8px 11px; display: grid; gap: 6px; }
.pm-card__strip i, .pm-card__body i { display: block; height: 6px; border-radius: 3px; background: #3a3f48; }
.pm-card__body { padding: 10px 11px; display: grid; gap: 6px; }
.pm-card__body i { background: #e6e5df; }
.pm-empty { margin-top: 12px; padding: 24px 12px; border: 1.5px dashed #c9c8c0; border-radius: 8px; text-align: center; font-size: 12px; color: #5a5e66; }
.board-note { position: absolute; right: 16px; top: 12px; font-size: 11px; color: var(--text-soft); }
@media (min-width: 960px) { .board-note { top: auto; bottom: 12px; } }

/* Team picker ------------------------------------------------------------- */
.picker { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.tray { display: flex; flex-wrap: wrap; gap: var(--s-2); min-height: 36px; align-items: center; }
.tray__empty { font-size: var(--fs-small); color: var(--text-muted); }
.pick {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 6px 0 14px;
  background: var(--chip-bg); color: var(--chip-text);
  border: 0; border-radius: 999px; cursor: pointer; font-size: var(--fs-small); font-weight: 600;
}
.pick__league { font: 700 10px/1 var(--font-score); opacity: .65; }
.pick__x { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; opacity: .7; }
.pick:hover .pick__x { background: rgba(255,255,255,.18); opacity: 1; }

.search { position: relative; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.search .input { padding-left: 44px; }

.leagues { display: flex; gap: var(--s-5); border-bottom: 1px solid var(--line); }
.league {
  min-height: var(--tap); padding: 0 2px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  font: 800 1.25rem/1 var(--font-display); letter-spacing: .04em; color: var(--text-muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.league__n { font: 600 10px/1 var(--font-score); }
.league:hover { color: var(--text); }
.league[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--accent); }

.results {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2);
  max-height: 248px; overflow-y: auto; overscroll-behavior: contain; padding: 2px;
}
@media (min-width: 600px) { .results { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.results__note { grid-column: 1 / -1; font-size: var(--fs-small); color: var(--text-muted); padding: var(--s-3) 0; }
.team {
  position: relative; text-align: left; cursor: pointer; min-width: 0;
  min-height: 52px; padding: 7px 34px 7px 12px;
  border: 1.5px solid var(--line); border-radius: var(--r-2); background: var(--surface);
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  transition: border-color var(--dur) var(--ease);
}
.team:hover { border-color: var(--text-muted); }
.team__name { font-weight: 600; font-size: .9375rem; line-height: 1.15; overflow-wrap: anywhere; }
.team__meta { font-size: 12px; color: var(--text-muted); line-height: 1.2; }
.team__tick {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-input);
  display: grid; place-items: center;
}
.team__tick svg { width: 12px; height: 12px; opacity: 0; }
.team[aria-pressed="true"] { border-color: var(--line-strong); background: var(--surface-2); }
.team[aria-pressed="true"] .team__tick { background: var(--accent); border-color: var(--line-strong); color: var(--on-accent); }
.team[aria-pressed="true"] .team__tick svg { opacity: 1; }
.team.is-top { box-shadow: 0 0 0 1px var(--text-muted); }
.picker__hint { font-size: 12px; color: var(--text-muted); }

/* Below the fold ---------------------------------------------------------- */
.section { border-top: 1px solid var(--line); }
.section__in { max-width: var(--page-max); margin: 0 auto; padding: var(--s-8) var(--gutter); display: grid; gap: var(--s-7) var(--s-8); }
@media (min-width: 760px) {
  .section__in--two { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: var(--s-9); }
  .section__in--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.speed { display: flex; flex-direction: column; gap: var(--s-3); }
.speed h2 { font-size: var(--fs-h2); }
.speed p { color: var(--text-muted); }
.fact h3 { font-size: var(--fs-body); }
.fact p { margin-top: 4px; color: var(--text-muted); font-size: .9375rem; }

.site-foot { border-top: 1px solid var(--line); font-size: 13px; color: var(--text-muted); }
.site-foot__in { max-width: var(--page-max); margin: 0 auto; padding: var(--s-6) var(--gutter) var(--s-7); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-7); }
.site-foot nav { display: flex; gap: var(--s-5); }
.site-foot a { color: var(--text); }

/* Small pages (confirm / teams / unsubscribe) ---------------------------- */
.mini { min-height: 100vh; display: flex; flex-direction: column; }
.mini__head { padding: var(--s-5) var(--gutter); }
.mini main { flex: 1; padding: var(--s-6) var(--gutter) var(--s-8); }
.mini .narrow { max-width: 540px; }
.mini h1 { font-size: var(--fs-h1); }
.mini .lede { margin-top: var(--s-3); color: var(--text-muted); font-size: var(--fs-body); }
.mini .actions { margin-top: var(--s-6); display: grid; gap: var(--s-3); }
.mini .picker { margin-top: var(--s-6); }
.state__clock { width: 84px; margin-bottom: var(--s-5); }
.state__clock rect { fill: var(--accent-text); }
.badge {
  display: inline-flex; align-items: center; margin-bottom: var(--s-4);
  font: 700 11px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 10px; border-radius: 999px;
}
.badge--ok { background: var(--accent); color: var(--on-accent); }
.badge--bad { box-shadow: inset 0 0 0 1.5px var(--danger); color: var(--danger); }
.divider { display: flex; align-items: center; gap: var(--s-3); color: var(--text-muted); font-size: var(--fs-small); }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.skeleton { display: grid; gap: var(--s-2); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--s-6); }
.skeleton span { height: 52px; border-radius: var(--r-2); background: var(--surface-2); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

.savebar {
  position: sticky; bottom: 0; z-index: 5; display: grid; gap: var(--s-3);
  margin-top: var(--s-6); padding: var(--s-3) 0 calc(var(--s-3) + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
}
.toast {
  padding: var(--s-3) var(--s-4); border-radius: var(--r-2);
  background: var(--board); color: var(--board-text); font-size: var(--fs-small);
}
.toast b { color: var(--accent); }

/* Privacy policy */
.prose h3 { font-size: 1.125rem; margin: 2rem 0 .5rem; }
.prose p, .prose ul { margin: 0 0 .75rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .375rem; }
.prose a { color: var(--text); text-decoration: underline; }
.prose .fine { color: var(--text-muted); font-size: .875rem; }
