:root {
  color-scheme: dark;
  --ink: #f7f3ea;
  --muted: #b6bdc7;
  --panel: #18191d;
  --panel-2: #202126;
  --line: rgba(255, 255, 255, 0.15);
  --red: #ff4d5e;
  --yellow: #ffd34d;
  --green: #4fd08b;
  --cyan: #4ecdc4;
  --pink: #ff5ea8;
  --black: #0d0e11;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255, 77, 94, 0.08) 0 1px, transparent 1px 96px),
    linear-gradient(rgba(255, 211, 77, 0.07) 0 1px, transparent 1px 96px),
    var(--black);
  color: var(--ink);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.topbar {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(13, 14, 17, 0.82);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 14px clamp(16px, 4vw, 56px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
}

.brand,
nav {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand {
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 6px;
  color: var(--black);
  padding: 5px 8px;
  transform: rotate(-2deg);
}

nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.hero {
  align-items: stretch;
  display: grid;
  gap: clamp(24px, 5vw, 64px);
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
  min-height: min(760px, calc(100vh - 65px));
  padding: clamp(34px, 6vw, 78px) clamp(16px, 5vw, 76px) 28px;
}

.hero-copy {
  align-self: center;
  max-width: 720px;
}

.eyebrow {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.bet-tag {
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: var(--black);
  display: inline-flex;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 950;
  line-height: 1.15;
  margin: 0 0 18px;
  max-width: 560px;
  padding: 10px 12px;
  transform: rotate(-1deg);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 0.88;
  margin-bottom: 22px;
  max-width: 760px;
}

h2 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 0.96;
  margin-bottom: 14px;
}

h3 {
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  line-height: 1;
  margin-bottom: 0;
}

.lede,
.section-head p {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.55;
}

.hero-actions,
.admin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0;
}

.button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  text-decoration: none;
}

.button.primary {
  background: var(--green);
  color: #07100b;
}

.button.danger {
  background: var(--red);
  color: white;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.08);
}

.round-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 10px;
  padding: 10px 12px;
}

.round-pill span:first-child {
  color: var(--yellow);
  font-weight: 950;
}

.board-preview {
  align-self: stretch;
  min-height: 420px;
}

.board-preview img {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ticker {
  background: var(--yellow);
  color: var(--black);
  display: flex;
  font-weight: 950;
  gap: 24px;
  justify-content: center;
  overflow: hidden;
  padding: 12px 16px;
  text-align: center;
}

.ticker span:first-child {
  background: var(--black);
  border-radius: 6px;
  color: var(--yellow);
  padding: 2px 8px;
}

.account-band,
.markets,
.odds-explainer,
.odds-band,
.model-lab,
.admin {
  padding: clamp(42px, 7vw, 88px) clamp(16px, 5vw, 76px);
}

.section-head {
  max-width: 880px;
}

.title-row {
  align-items: start;
  display: flex;
  gap: 12px;
}

.info-button {
  align-items: center;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--black);
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 950;
  height: 34px;
  justify-content: center;
  margin-top: 6px;
  text-decoration: none;
  width: 34px;
}

.market-grid,
.leaderboards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.market-panel,
.leaderboards article,
.admin {
  background: rgba(24, 25, 29, 0.78);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.market-panel,
.leaderboards article {
  border-left: 1px solid var(--line);
  border-radius: 8px;
  border-right: 1px solid var(--line);
  padding: 18px;
}

.panel-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.micro-bet {
  color: var(--yellow);
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.35;
  margin: 10px 0 0;
}

.status-line {
  color: var(--muted);
  min-height: 24px;
}

.account-band {
  background: #101115;
  border-bottom: 1px solid var(--line);
}

.auth-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 28px;
}

.auth-card {
  background: rgba(24, 25, 29, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.auth-card-head {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.auth-card h4 {
  font-size: 1rem;
  margin: 0 0 12px;
}

.auth-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 8px 0 0;
}

.auth-card .auth-hint {
  color: var(--yellow);
  font-size: 0.9rem;
  font-weight: 850;
  margin: 0;
}

.account-pill {
  background: var(--yellow);
  border-radius: 8px;
  color: var(--black) !important;
  flex: 0 0 auto;
  font-weight: 950;
  padding: 8px 10px;
}

.auth-panels {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.auth-panel,
.logged-in-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.auth-panel label,
.admin-login label {
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.auth-panel input,
.admin-login input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 46px;
  min-width: 0;
  padding: 10px 12px;
}

.name-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.button.compact {
  min-height: 46px;
  padding: 10px 12px;
}

.odds-explainer {
  align-items: center;
  background: var(--yellow);
  color: var(--black);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
}

.odds-explainer .eyebrow {
  color: var(--black);
}

.odds-explainer h2 {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  margin-bottom: 0;
}

.odds-explainer p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 850;
  line-height: 1.45;
  margin: 0;
}

.show-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.show-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 66px minmax(0, 1fr);
  min-height: 142px;
  min-width: 0;
  padding: 10px;
  text-align: left;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.show-card:hover,
.show-card.selected {
  border-color: var(--yellow);
  transform: translateY(-2px);
}

.show-card.selected {
  background: #292315;
}

.poster-wrap {
  aspect-ratio: 2 / 3;
  background: #101115;
  border-radius: 6px;
  grid-row: span 2;
  overflow: hidden;
}

.poster-wrap img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.show-card.logo-poster .poster-wrap {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)),
    #101115;
  padding: 6px;
}

.show-card.logo-poster .poster-wrap img {
  object-fit: contain;
}

.show-copy strong,
.show-copy small {
  display: block;
}

.show-copy strong {
  display: -webkit-box;
  line-height: 1.12;
  max-width: 100%;
  overflow-wrap: anywhere;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.show-copy small {
  color: var(--muted);
  display: -webkit-box;
  line-height: 1.35;
  margin-top: 5px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.market-numbers {
  align-self: end;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  width: 100%;
}

.market-numbers span {
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 950;
  min-width: 0;
}

.odds {
  background: var(--yellow);
  color: var(--black);
  display: inline-flex;
  justify-content: center;
  padding: 6px 8px;
  white-space: nowrap;
}

.nudge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  display: grid;
  gap: 4px;
  overflow: hidden;
  padding: 6px 8px;
}

.nudge-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nudge-bar {
  background: rgba(255, 255, 255, 0.16);
  display: block;
  height: 4px;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.nudge-bar span {
  background: var(--yellow);
  display: block;
  height: 100%;
  padding: 0;
  width: var(--rating, 50%);
}

.rights-chip {
  background: rgba(255, 255, 255, 0.1);
  color: var(--yellow);
  display: inline-flex;
  grid-column: 1 / -1;
  justify-content: center;
  padding: 6px 8px;
  white-space: nowrap;
  width: fit-content;
}

.odds-band,
.model-lab {
  background: #101115;
}

.leaderboards ol {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.leaderboards li {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.leaderboards strong {
  overflow-wrap: anywhere;
}

.leaderboards small {
  color: var(--muted);
  grid-column: 1 / -1;
  line-height: 1.35;
}

.leaderboards span {
  color: var(--yellow);
  font-weight: 950;
}

.model-lab {
  padding: clamp(42px, 7vw, 88px) clamp(16px, 5vw, 76px);
}

.model-tabs {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
  padding: 8px;
}

.tab-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 950;
  min-height: 44px;
  padding: 10px 12px;
}

.tab-button.active {
  background: var(--yellow);
  color: var(--black);
}

.tab-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.tab-panels {
  margin-top: 18px;
}

.tab-panel[hidden] {
  display: none;
}

.results-lab {
  border-bottom: 1px solid var(--line);
}

.intel-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.intel-grid article {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.intel-grid ul,
.intel-grid ol {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 20px;
}

#historyList {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-left: 0;
}

#historyList li {
  list-style: none;
}

.intel-grid li {
  color: var(--muted);
  line-height: 1.4;
}

.intel-grid li strong {
  color: var(--ink);
}

.intel-grid li span {
  color: var(--yellow);
  display: block;
  font-size: 0.88rem;
  font-weight: 850;
  margin-top: 2px;
}

.play-pattern {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
  margin: 14px 0 0;
}

.method-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.method-grid article,
.rights-row {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.method-grid p,
.rights-head p,
.rights-row p,
.rights-row small {
  color: var(--muted);
  line-height: 1.45;
}

.rights-doc {
  margin-top: 30px;
}

.rights-head {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.rights-head p {
  margin-bottom: 0;
}

.rights-table {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 18px;
}

.rights-row {
  display: grid;
  gap: 7px;
}

.rights-row strong {
  overflow-wrap: anywhere;
}

.rights-level {
  color: var(--yellow);
  font-size: 0.86rem;
  font-weight: 950;
}

.rights-row p,
.rights-row small {
  margin: 0;
}

.student-stats {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.student-stats strong {
  color: var(--yellow);
}

.student-stats span {
  color: var(--muted);
}

.student-results {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.student-results article,
.reveal-history {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.student-results ol,
.reveal-history ol {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.student-results li,
.reveal-history li {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.student-results li strong,
.reveal-history li strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.student-results li span,
.reveal-history li span {
  color: var(--yellow);
  font-weight: 950;
}

.reveal-history {
  margin-top: 0;
}

.reveal-history p {
  color: var(--muted);
  line-height: 1.45;
  margin: 10px 0 0;
}

.reveal-history li {
  grid-template-columns: minmax(0, 1fr);
}

.reveal-history small {
  line-height: 1.35;
}

.odds-trend {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  padding: 16px;
}

.odds-trend p {
  color: var(--muted);
  line-height: 1.45;
  margin: 8px 0 0;
}

.odds-chart {
  margin-top: 16px;
}

.chart-scroll {
  overflow-x: auto;
}

.odds-chart svg {
  display: block;
  min-width: 620px;
  width: 100%;
}

.plot-bg {
  fill: rgba(255, 255, 255, 0.04);
  stroke: rgba(255, 255, 255, 0.16);
}

.grid-line {
  stroke: rgba(255, 255, 255, 0.12);
}

.trend-series {
  cursor: pointer;
  outline: none;
}

.trend-series .trend-line,
.trend-series .trend-dot {
  opacity: 0.72;
  transition:
    opacity 160ms ease,
    stroke-width 160ms ease,
    r 160ms ease;
}

.trend-series:hover .trend-line,
.trend-series:hover .trend-dot,
.trend-series:focus .trend-line,
.trend-series:focus .trend-dot,
.trend-series:focus-within .trend-line,
.trend-series:focus-within .trend-dot {
  opacity: 1;
}

.trend-series:hover .trend-line,
.trend-series:focus .trend-line,
.trend-series:focus-within .trend-line {
  stroke-width: 5;
}

.trend-series:hover .trend-dot,
.trend-series:focus .trend-dot,
.trend-series:focus-within .trend-dot {
  r: 7;
}

.axis-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chart-readout {
  background: rgba(255, 211, 77, 0.12);
  border: 1px solid rgba(255, 211, 77, 0.4);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.35;
  margin-top: 10px;
  min-height: 42px;
  padding: 10px 12px;
}

.admin-login {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 360px) auto minmax(0, 1fr);
  margin-top: 24px;
}

.admin-controls label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  min-width: min(100%, 300px);
}

.admin-controls input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 46px;
  padding: 10px 12px;
}

.admin-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  margin-top: 20px;
}

.admin-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-height: 56px;
  padding: 10px;
}

.admin-row input {
  accent-color: var(--red);
  height: 20px;
  width: 20px;
}

.admin-row.eliminated {
  opacity: 0.55;
  text-decoration: line-through;
}

@media (max-width: 980px) {
  .hero,
  .market-grid,
  .leaderboards,
  .intel-grid,
  .method-grid,
  .student-results,
  .odds-explainer,
  .auth-panels,
  .admin-login {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .board-preview {
    min-height: 340px;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
  }

  .ticker {
    align-items: center;
    flex-direction: column;
    gap: 4px;
  }

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

  #historyList {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-head .button,
  .hero-actions .button,
  .admin-controls .button,
  .auth-panel .button,
  .logged-in-panel .button,
  .admin-login .button {
    width: 100%;
  }

  .auth-card-head,
  .name-row {
    grid-template-columns: 1fr;
  }

  .auth-card-head {
    display: grid;
  }
}
