/* firstnotlast.site front page. One dark theme (the game's own), one accent (the game's
   yellow), one radius scale: 10px controls, 18px surfaces, pills for chips. */

/* Archivo (SIL OFL 1.1, fonts/OFL.txt), self-hosted from @fontsource-variable/archivo 5.1.0. */
@font-face { font-family: "Archivo Variable"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-wdth.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo Variable"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-ext-wdth.woff2) format("woff2-variations");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;
  --bg: #071521;
  --bg-2: #0b1d2d;
  --surface: #0f2536;
  --surface-2: #143047;
  --line: rgba(160, 205, 240, 0.12);
  --line-strong: rgba(160, 205, 240, 0.22);
  --text: #eaf4fb;
  --text-2: #a9c0d3;
  --text-3: #7f99ae;
  --accent: #ffc24b;
  --accent-ink: #1a1305;
  --accent-soft: rgba(255, 194, 75, 0.14);
  --yellow-team: #ffd36b;
  --blue-team: #6cc4ff;
  --good: #74e0b8;
  --bad: #ffb08a;
  --r-control: 10px;
  --r-surface: 18px;
  --shadow: 0 24px 60px rgba(2, 10, 18, 0.55);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Archivo Variable", "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.55 var(--font);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
.ic { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; vertical-align: -0.15em; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; font-variation-settings: "wdth" 88; letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; }
.muted { color: var(--text-2); }
.small { font-size: 0.875rem; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: var(--r-control); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; }

/* Buttons: feedback on press, not on release. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  border: 1px solid transparent; border-radius: var(--r-control);
  padding: 0.7rem 1.1rem; font: 600 0.98rem/1 var(--font); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform 120ms ease-out, background-color 200ms var(--ease), border-color 200ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn .ic { width: 1.2em; height: 1.2em; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ffcd6b; }
.btn-ghost { background: rgba(10, 30, 46, 0.55); color: var(--text); border-color: var(--line-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.4); }
.btn-lg { padding: 0.95rem 1.35rem; font-size: 1.05rem; }
.btn-sm { padding: 0.5rem 0.85rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.icon-btn { display: inline-flex; background: none; border: 0; color: var(--text-2); font-size: 1.4rem; padding: 6px; border-radius: var(--r-control); cursor: pointer; }
.icon-btn:hover { color: var(--text); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }

/* Navigation: a translucent layer the page scrolls under. */
.nav { position: sticky; top: 0; z-index: 20; transition: background-color 250ms var(--ease), border-color 250ms var(--ease); border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(7, 21, 33, 0.72); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border-bottom-color: var(--line); }
.nav-in { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-variation-settings: "wdth" 88; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 22px; margin-right: auto; }
.nav-links a { text-decoration: none; color: var(--text-2); font-size: 0.95rem; font-weight: 500; transition: color 150ms; }
.nav-links a:hover, .nav-links a.current { color: var(--text); }
.nav-side { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.online-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(116, 224, 184, 0.6); }
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: pulse 2.4s ease-out infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(116, 224, 184, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(116, 224, 184, 0); } }
}
.account-menu { position: relative; }
.account-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); border-radius: 999px; padding: 6px 12px 6px 8px; font: 600 0.92rem/1 var(--font); cursor: pointer; }
.account-chip:active { transform: scale(0.97); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); transform-origin: top right; }
@media (prefers-reduced-motion: no-preference) {
  .menu { animation: pop 180ms var(--ease); }
  @keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
}
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; text-decoration: none; background: none; border: 0; color: var(--text); font: 500 0.95rem/1.2 var(--font); cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu .ic { color: var(--text-2); width: 1.2rem; height: 1.2rem; }

/* Flags */
.flag-slot { display: inline-flex; flex: none; }
.flag { width: 21px; height: 14px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.flag-lg .flag { width: 42px; height: 28px; border-radius: 4px; }
.flag-none { display: inline-block; box-shadow: none; background: var(--surface-2); }

/* Hero */
.hero { position: relative; min-height: min(88dvh, 820px); margin-top: -64px; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0 0 0 32%; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 0%; }
.hero-scrim { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, var(--bg) 0%, var(--bg) 32%, rgba(7, 21, 33, 0.7) 42%, rgba(7, 21, 33, 0.1) 62%, rgba(7, 21, 33, 0) 100%),
  linear-gradient(180deg, rgba(7, 21, 33, 0.6) 0%, rgba(7, 21, 33, 0) 22%, rgba(7, 21, 33, 0) 70%, var(--bg) 100%); }
.hero-in { padding-top: 120px; padding-bottom: 96px; }
.hero-copy { max-width: 580px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-variation-settings: "wdth" 80; letter-spacing: -0.03em; line-height: 0.98; }
.hero-sub { margin-top: 22px; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #cfe0ec; max-width: 34ch; line-height: 1.5; }
.hero-ctas { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 900ms var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 80ms; }
  .hero-copy > :nth-child(3) { animation-delay: 160ms; }
  .hero-art img { animation: settle 1600ms var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes settle { from { transform: scale(1.06); } }
}

/* Signed-in card: pulled up over the hero's fade. */
.you { position: relative; z-index: 2; margin-top: -56px; margin-bottom: 24px; }
.you-card { background: linear-gradient(180deg, rgba(20, 48, 71, 0.92), rgba(15, 37, 54, 0.96)); border: 1px solid var(--line-strong); border-radius: var(--r-surface); padding: 22px 24px; box-shadow: var(--shadow); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.you-head { display: flex; align-items: center; gap: 16px; }
.you-head > div { flex: 1; min-width: 0; }
.you-head h2 { font-size: 1.6rem; overflow-wrap: anywhere; }
.you-head .muted { margin-top: 4px; }
.you-stats { margin: 20px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; }
.you-stats div { background: var(--surface); padding: 14px 16px; }
.you-stats dt { font-size: 0.8rem; color: var(--text-3); }
.you-stats dd { margin: 4px 0 0; font-size: 1.35rem; font-weight: 700; font-variation-settings: "wdth" 88; font-variant-numeric: tabular-nums; }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: #ffe2a3; font-size: 0.95rem; }

/* Racing now */
.live { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; padding-top: 88px; padding-bottom: 96px; align-items: start; }
.live-side { position: sticky; top: 96px; }
.live-numbers { margin-top: 28px; display: grid; gap: 18px; }
.big-stat { display: flex; align-items: baseline; gap: 12px; }
.big-stat b { font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 700; font-variation-settings: "wdth" 76; letter-spacing: -0.04em; line-height: 0.9; font-variant-numeric: tabular-nums; }
.big-stat span { color: var(--text-2); font-size: 1.05rem; }
.stat-line { color: var(--text-2); display: flex; gap: 8px; align-items: center; }
.stat-line .ic { color: var(--text-3); width: 1.25rem; height: 1.25rem; }
.daily { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.daily h3 { display: flex; align-items: center; gap: 8px; }
.daily h3 .ic { color: var(--accent); }
.daily p { margin-top: 8px; color: var(--text-2); }
.daily .daily-now { color: var(--good); font-weight: 600; }
.live-races { display: grid; gap: 14px; }
.race { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 18px 20px; }
@media (prefers-reduced-motion: no-preference) {
  .race.enter { animation: rise 500ms var(--ease) both; }
}
.race-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.race-top h3 { margin-right: auto; }
.race-state { font-size: 0.875rem; color: var(--text-2); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.race-state.racing { color: var(--good); }
.race-meta { margin-top: 2px; font-size: 0.875rem; color: var(--text-3); }
.teams { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.teams.solo { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.team { display: grid; gap: 6px; align-content: start; }
.team-name { font-size: 0.8rem; font-weight: 600; }
.team-1 .team-name { color: var(--yellow-team); }
.team-2 .team-name { color: var(--blue-team); }
.sailor { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; min-width: 0; }
.sailor span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sailor.me span { color: var(--accent); font-weight: 600; }
.sailor .done { margin-left: auto; color: var(--text-3); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.empty { border: 1px dashed var(--line-strong); border-radius: var(--r-surface); padding: 32px 28px; display: grid; gap: 10px; justify-items: start; }
.empty > .ic { width: 2rem; height: 2rem; color: var(--text-3); }
.empty p { color: var(--text-2); max-width: 46ch; }
.empty .btn { margin-top: 8px; }

/* Leaderboard */
.board { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 18%, var(--bg-2) 82%, var(--bg) 100%); padding: 96px 0; }
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.tabs { display: inline-flex; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.tabs button { background: none; border: 0; color: var(--text-2); font: 600 0.92rem/1 var(--font); padding: 10px 16px; border-radius: 999px; cursor: pointer; transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.board-note { margin-top: 12px; min-height: 1.5em; }
.podium { margin-top: 28px; display: grid; grid-template-columns: 1fr 1.18fr 1fr; gap: 14px; align-items: end; }
.pod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 20px; display: grid; gap: 10px; min-width: 0; }
.pod-1 { order: 2; padding-top: 30px; background: linear-gradient(180deg, rgba(255, 194, 75, 0.16), var(--surface) 70%); border-color: rgba(255, 194, 75, 0.35); }
.pod-2 { order: 1; }
.pod-3 { order: 3; }
.pod-place { font-size: 0.85rem; font-weight: 600; color: var(--text-3); }
.pod-1 .pod-place { color: var(--accent); }
.pod-name { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 700; font-variation-settings: "wdth" 88; min-width: 0; }
.pod-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-score { font-size: 2.2rem; font-weight: 700; font-variation-settings: "wdth" 76; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.pod-score small { font-size: 0.9rem; font-weight: 500; color: var(--text-2); letter-spacing: 0; margin-left: 6px; font-variation-settings: "wdth" 100; }
.pod-meta { color: var(--text-2); font-size: 0.9rem; }
.tier { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); width: max-content; }
.tier-bronze { background: rgba(205, 140, 70, 0.16); color: #e9b07a; }
.tier-silver { background: rgba(192, 206, 220, 0.14); color: #d2dee9; }
.tier-gold { background: rgba(255, 194, 75, 0.16); color: #ffd36b; }
.tier-copper { background: rgba(184, 115, 51, 0.16); color: #e0a070; }
.rows { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--line); }
.row-pos { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.row-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 500; }
.row-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.row-extra { color: var(--text-3); font-size: 0.85rem; font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: right; }
.row.me, .pod.me { box-shadow: inset 3px 0 0 var(--accent); background: var(--accent-soft); }
.row.me { border-radius: 8px; }
.board-more { margin-top: 22px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.my-line { margin-top: 18px; }

/* Daily Racing: tonight's table, or last night's winners */
.night { padding-top: 24px; padding-bottom: 96px; }
.night-grid { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.night-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 22px 24px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.night-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.night-top h3 { display: inline-flex; align-items: center; gap: 8px; }
.night-top h3 .ic { color: var(--accent); }
.night-when { font-size: 0.85rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.night-blurb { font-size: 0.95rem; }
.night-empty { color: var(--text-3); padding: 18px 0 6px; }
.night-win { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(255, 194, 75, 0.35); background: linear-gradient(180deg, rgba(255, 194, 75, 0.16), rgba(255, 194, 75, 0.04)); }
.night-win > .ic { width: 2rem; height: 2rem; color: var(--accent); }
.night-win.me { box-shadow: inset 3px 0 0 var(--accent); }
.night-name { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 700; font-variation-settings: "wdth" 88; min-width: 0; overflow-wrap: anywhere; }
.night-tally { color: var(--text-2); font-size: 0.92rem; }
.night-rows { margin-top: 0; grid-template-columns: 1fr; }
.night-rows .row:last-child { border-bottom: 0; }
.night-more { margin-top: -2px; }
.how { padding-top: 0; }
.how-times { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; color: var(--text-2); font-size: 0.95rem; }
.how-times li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 16px 18px; }
.how-times time { display: block; color: var(--accent); font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.how-list { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; color: var(--text-2); font-size: 0.95rem; }
.how-week { margin-top: 18px; font-size: 0.95rem; }

/* Get the game */
.download { padding-top: 104px; padding-bottom: 104px; }
.section-sub { margin-top: 12px; color: var(--text-2); max-width: 52ch; font-size: 1.05rem; }
.bento { margin-top: 36px; display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); text-decoration: none; overflow: hidden; transition: border-color 220ms var(--ease), transform 220ms var(--ease); }
.tile:hover { border-color: var(--line-strong); }
.tile:active { transform: scale(0.99); }
.tile p { color: var(--text-2); font-size: 0.95rem; }
.tile-icon, .tile-icons .ic { width: 1.9rem; height: 1.9rem; color: var(--text); }
.tile-icon, .tile-icons { margin-bottom: 8px; }
.tile-icons { display: flex; gap: 8px; }
.tile-go { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.95rem; color: var(--accent); }
.tile-go .ic { transition: transform 220ms var(--ease); }
.tile:hover .tile-go .ic { transform: translateX(3px); }
.tile-browser { grid-row: 1 / span 2; padding: 0; min-height: 420px; justify-content: flex-end; }
.tile-browser picture, .tile-browser img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-browser picture::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 21, 33, 0) 30%, rgba(7, 21, 33, 0.92) 78%); }
.tile-browser .tile-body { position: relative; padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.tile-browser h3 { font-size: 1.6rem; }
.tile-browser p { color: #cfe0ec; }
.tile-wide { grid-column: span 2; }
.tile.suggested { border-color: rgba(255, 194, 75, 0.55); }

/* Community */
.community { position: relative; overflow: hidden; isolation: isolate; padding: 120px 0; }
.community-art { position: absolute; inset: 0; z-index: -2; }
.community-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.community::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(270deg, rgba(7, 21, 33, 0.95) 0%, rgba(7, 21, 33, 0.82) 42%, rgba(7, 21, 33, 0.25) 100%),
  linear-gradient(180deg, var(--bg) 0%, rgba(7, 21, 33, 0) 25%, rgba(7, 21, 33, 0) 75%, var(--bg) 100%); }
.community-in { display: flex; justify-content: flex-end; }
.community-copy { max-width: 520px; }
.community-copy p { margin-top: 16px; color: #cfe0ec; font-size: 1.1rem; max-width: 42ch; }
.community-ctas { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

/* What the game is. Written in the page, so crawlers that skip JavaScript can quote it. */
.about { padding: 96px 0 104px; }
.about-grid { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px 64px; align-items: start; }
.about-copy { display: grid; gap: 16px; color: var(--text-2); font-size: 1.05rem; }
.about-copy a, .faq a { color: var(--accent); }
.faq { border-top: 1px solid var(--line); }
.faq article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.faq h3 { font-size: 1.05rem; font-variation-settings: "wdth" 96; }
.faq p { margin-top: 8px; color: var(--text-2); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot nav a { color: var(--text-2); text-decoration: none; font-size: 0.95rem; }
.foot nav a:hover { color: var(--text); }

/* Sign-in sheet: rises from the bottom on phones, centred on computers. */
.sheet { width: min(440px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--r-surface); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.sheet::backdrop { background: rgba(2, 10, 18, 0.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-in 320ms var(--ease); }
  .sheet[open]::backdrop { animation: fade 240ms ease-out; }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
  @keyframes fade { from { opacity: 0; } }
}
.sheet h2 { font-size: 1.6rem; }
.sheet .muted { margin-top: 8px; }
.sheet-x-form { position: absolute; top: 12px; right: 12px; margin: 0; }
.field { margin-top: 18px; display: grid; gap: 7px; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.field input { width: 100%; padding: 12px 14px; border-radius: var(--r-control); border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 400 1rem/1.3 var(--font); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 194, 75, 0.22); }
.form-error { margin-top: 14px; color: var(--bad); font-size: 0.95rem; }
.form-ok { margin-top: 14px; color: var(--good); font-size: 0.95rem; }
#signin-form .btn-block, #reset-form .btn-block { margin-top: 22px; }
.sheet-foot { margin-top: 18px; display: grid; gap: 10px; justify-items: start; }
.sheet-foot a { color: var(--accent); }

/* Loading placeholders, shaped like what replaces them. */
.skeleton { border-radius: var(--r-surface); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: shimmer 1.6s linear infinite; }
  @keyframes shimmer { to { background-position: -200% 0; } }
}
.skel-num { height: 72px; width: 60%; border-radius: 12px; }
.skel-card { height: 148px; }
.skel-podium { height: 170px; }

/* Pages inside the site (Competitions): the same nav and footer as the front page. */
.page-head { padding-top: 56px; padding-bottom: 8px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-variation-settings: "wdth" 80; letter-spacing: -0.03em; line-height: 1; }
.page-head .section-sub { margin-top: 14px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--text-2); text-decoration: none; font-size: 0.95rem; }
.back:hover { color: var(--text); }
.back .ic { transform: rotate(180deg); }
.page-body { padding-top: 32px; padding-bottom: 96px; display: grid; gap: 14px; }
.page-body > h2 { font-size: 1.5rem; margin-top: 28px; }
.page-body > h3 { margin-top: 12px; color: var(--text-2); font-size: 1rem; }
.page-body .notice { margin-top: 0; }
.err { color: var(--bad); }
.comp-card { display: grid; gap: 8px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); text-decoration: none; transition: border-color 220ms var(--ease), transform 220ms var(--ease); }
.comp-card:hover { border-color: var(--line-strong); }
.comp-card:active { transform: scale(0.99); }
.comp-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.comp-top h3 { margin-right: auto; font-size: 1.35rem; }
.comp-sub { color: var(--text-2); font-size: 0.95rem; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.badge.live { background: rgba(116, 224, 184, 0.14); color: var(--good); }
.badge.gold { background: rgba(255, 194, 75, 0.16); color: #ffd36b; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 6px 8px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.table-wrap th, .table-wrap td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap th { color: var(--text-3); font-weight: 600; font-size: 0.8rem; }
.table-wrap .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap tr.first td { color: #ffd36b; font-weight: 600; }
.tie { display: block; color: var(--text-3); font-size: 0.8rem; font-weight: 400; }
.fine { color: var(--text-3); font-size: 0.875rem; max-width: 70ch; }
.soon { margin-top: 8px; padding: 36px 32px; border: 1px solid rgba(255, 194, 75, 0.3); border-radius: var(--r-surface); background: linear-gradient(180deg, rgba(255, 194, 75, 0.12), var(--surface) 70%); display: grid; gap: 14px; justify-items: start; }
.soon > .ic { width: 2.4rem; height: 2.4rem; color: var(--accent); }
.soon h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.soon p { color: var(--text-2); max-width: 54ch; font-size: 1.05rem; }
.soon-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* Tablet */
@media (max-width: 960px) {
  .nav-links a:not(.keep) { display: none; }
  .hero { min-height: auto; align-items: flex-end; }
  .hero-art { left: 0; }
  .hero-art img { object-position: 60% 10%; }
  .hero-scrim { background: linear-gradient(180deg, rgba(7, 21, 33, 0.4) 0%, rgba(7, 21, 33, 0.15) 28%, rgba(7, 21, 33, 0.86) 60%, var(--bg) 100%); }
  .hero-in { padding-top: 340px; padding-bottom: 72px; }
  .live { grid-template-columns: 1fr; gap: 32px; padding-top: 72px; }
  .about { padding: 72px 0 80px; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .live-side { position: static; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-browser { grid-column: 1 / -1; grid-row: auto; min-height: 340px; }
  .rows { grid-template-columns: 1fr; }
  .night-grid { grid-template-columns: 1fr; }
  .how-times { grid-template-columns: 1fr 1fr; }
  .you-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Phone */
@media (max-width: 640px) {
  .wrap, .nav-in { padding: 0 16px; }
  .nav-in { gap: 12px; }
  .brand span { display: none; }
  .online-pill { display: none; }
  .nav-links a { font-size: 0.9rem; }
  .page-head { padding-top: 40px; }
  .soon { padding: 28px 22px; }
  .soon-ctas .btn { flex: 1 1 100%; }
  .night-card { padding: 20px; }
  .table-wrap table { font-size: 0.88rem; }
  .table-wrap th, .table-wrap td { padding: 10px 6px; }
  .hero-in { padding-top: 300px; padding-bottom: 56px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .you { margin-top: -24px; }
  .you-head { flex-wrap: wrap; }
  .you-head .btn { width: 100%; }
  .you-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .podium { grid-template-columns: 1fr; }
  .pod-1, .pod-2, .pod-3 { order: 0; }
  .pod-1 { padding-top: 20px; }
  .row { grid-template-columns: 2rem minmax(0, 1fr) auto; }
  .row-extra { display: none; }
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; }
  .teams { grid-template-columns: 1fr; }
  .community { padding: 88px 0; }
  .community::before { background: linear-gradient(180deg, var(--bg) 0%, rgba(7, 21, 33, 0.7) 30%, rgba(7, 21, 33, 0.92) 70%, var(--bg) 100%); }
  .community-ctas .btn { flex: 1 1 100%; }
  .sheet { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: var(--r-surface) var(--r-surface) 0 0; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-transparency: reduce) {
  .nav.scrolled, .btn-ghost, .you-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav.scrolled { background: var(--bg); }
  .btn-ghost { background: var(--surface); }
}

/* Competitions: applying, the knockout bracket. */
.comp-tag { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; font-size: 0.78rem; color: var(--text-3); }
.panel { display: grid; gap: 14px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); }
.panel h2, .panel h3 { font-size: 1.25rem; }
.panel p { color: var(--text-2); }
.panel.apply { border-color: rgba(255, 194, 75, 0.35); background: linear-gradient(180deg, rgba(255, 194, 75, 0.09), var(--surface) 65%); }
.panel .act, .act { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.panel .field { margin-top: 0; }
.crew { display: grid; gap: 8px; }
.crew-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-control); }
.crew-row .grow { flex: 1; font-weight: 600; }
.crew-row .dim { color: var(--text-3); font-weight: 400; font-size: 0.85rem; }
.friends { display: flex; flex-wrap: wrap; gap: 8px; }
.friend { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 600 0.9rem var(--font); cursor: pointer; }
.friend[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.friend:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm.danger { color: var(--bad); }
.form-note { color: var(--text-3); font-size: 0.88rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--line-strong); padding: 12px 18px; border-radius: var(--r-control); box-shadow: var(--shadow); z-index: 50; max-width: calc(100vw - 32px); }
.toast.bad { border-color: var(--bad); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); font: 600 0.92rem var(--font); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.br { display: flex; align-items: stretch; overflow-x: auto; padding: 6px 2px 14px; min-height: 120px; scroll-snap-type: x proximity; }
.br-col { display: flex; flex-direction: column; flex: 0 0 min(250px, 74vw); scroll-snap-align: start; }
.br-title { font-weight: 700; font-size: 0.95rem; padding: 0 14px 10px 0; display: flex; align-items: baseline; gap: 8px; }
.br-title small { color: var(--text-3); font-weight: 500; font-size: 0.78rem; }
.br-body { flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
.br-pair { position: relative; flex: 1; display: flex; flex-direction: column; }
.br-pair::after { content: ""; position: absolute; right: 0; top: 25%; bottom: 25%; border-right: 2px solid var(--line-strong); }
.br-slot { flex: 1; display: flex; align-items: center; padding: 7px 0; }
.br-tie { position: relative; width: calc(100% - 14px); margin-right: 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.br-col:not(.final) .br-tie::after { content: ""; position: absolute; right: -15px; top: 50%; width: 14px; border-top: 2px solid var(--line-strong); }
.br-col:not(.first) .br-tie { margin-left: 14px; width: calc(100% - 28px); }
.br-col:not(.first) .br-tie::before { content: ""; position: absolute; left: -15px; top: 50%; width: 14px; border-top: 2px solid var(--line-strong); }
.br-tie.live { border-color: var(--good); box-shadow: 0 0 0 3px rgba(116, 224, 184, 0.14); }
.br-head { display: flex; justify-content: space-between; padding: 5px 12px; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); }
.br-live { color: var(--good); font-weight: 700; }
.br-team { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 9px 12px; }
.br-team + .br-team { border-top: 1px solid var(--line); }
.br-seed { color: var(--text-3); font-size: 0.78rem; text-align: center; font-variant-numeric: tabular-nums; }
.br-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.br-wins { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 14px; text-align: right; }
.br-team.win { background: rgba(116, 224, 184, 0.1); }
.br-team.win .br-name { color: var(--good); }
.br-team.lost { color: var(--text-3); }
.br-team.lost .br-name { font-weight: 450; }
.br-team.empty .br-name { color: var(--text-3); font-style: italic; font-weight: 400; }
.br-team.mine { box-shadow: inset 3px 0 0 var(--accent); }
.br-dots { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
.br-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-strong); }
.br-dot.done { background: var(--text-2); border-color: var(--text-2); }
.br-dot.live { background: var(--good); border-color: var(--good); }
.br-dot.void { opacity: 0.4; }
.br-first { margin-left: auto; font-size: 0.74rem; color: var(--text-3); }
.br-pick { display: grid; gap: 12px; padding: 18px 20px; border: 1px solid var(--accent); border-radius: var(--r-surface); background: var(--accent-soft); }
.br-pick h3 { font-size: 1.15rem; }
.br-seeds { display: flex; flex-wrap: wrap; gap: 6px; }
.br-chip { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; }
.br-chip b { color: var(--text-3); margin-right: 3px; }
.br-chip.taken { opacity: 0.45; text-decoration: line-through; }
.br-chip.now { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); opacity: 1; text-decoration: none; }
.br-chip.now b { color: inherit; }
.colour-dots { display: inline-flex; gap: 6px; align-items: center; }
.colour-dots i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.colour-dots .y { background: var(--yellow-team); }
.colour-dots .b { background: var(--blue-team); }

.h2h { border-collapse: separate; border-spacing: 3px; font-size: 0.88rem; }
.h2h th, .h2h td { border: 0; padding: 0; }
.h2h-col { height: 120px; vertical-align: bottom; font-weight: 600; color: var(--text-2); width: 34px; }
.h2h-col span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; max-height: 112px; overflow: hidden; text-overflow: ellipsis; padding-bottom: 4px; }
.h2h-row { text-align: left; padding: 0 12px 0 4px; white-space: nowrap; font-weight: 600; }
.h2h-place { display: inline-block; min-width: 1.6em; color: var(--text-3); font-variant-numeric: tabular-nums; }
.h2h td { width: 34px; height: 34px; text-align: center; border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.h2h-self { background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 4px, transparent 4px, transparent 8px); }
.h2h-none { color: var(--text-3); background: var(--bg); }
.h2h-win { background: rgba(116, 224, 184, 0.16); color: var(--good); }
.h2h-loss { background: rgba(255, 176, 138, 0.12); color: var(--bad); }
.h2h-level { background: var(--surface-2); color: var(--text-2); }
.table-wrap table.h2h { width: auto; }

.comp-banner { display: grid; gap: 10px; margin-top: 26px; max-width: 640px; position: relative; z-index: 2; }
.comp-banner[hidden] { display: none; }
.comp-promo { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--line-strong); border-radius: var(--r-surface); background: var(--surface); text-decoration: none; color: var(--text); transition: border-color 220ms var(--ease), transform 220ms var(--ease); }
.comp-promo.open { border-color: rgba(255, 194, 75, 0.45); background: linear-gradient(90deg, rgba(255, 194, 75, 0.14), var(--surface) 70%); }
.comp-promo:hover { border-color: var(--accent); }
.comp-promo:active { transform: scale(0.99); }
.comp-promo > .ic { width: 1.8rem; height: 1.8rem; flex: none; color: var(--accent); }
.comp-promo-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.comp-promo-text b { font-size: 1.05rem; }
.comp-promo-text span { color: var(--text-2); font-size: 0.92rem; }
@media (max-width: 600px) { .comp-promo { flex-wrap: wrap; } .comp-promo .btn { flex: 1 1 100%; justify-content: center; } }
