:root {
  --bg: #f8f4ed;
  --bg-deep: #eadfce;
  --ink: #131b1f;
  --muted: #5e6d74;
  --panel: rgba(255, 252, 247, 0.92);
  --panel-strong: rgba(255, 252, 247, 0.98);
  --line: rgba(19, 27, 31, 0.11);
  --line-strong: rgba(19, 27, 31, 0.18);
  --accent: #d76d2a;
  --accent-dark: #924216;
  --accent-soft: rgba(215, 109, 42, 0.12);
  --navy: #131b1f;
  --navy-soft: rgba(19, 27, 31, 0.9);
  --green: #0f766e;
  --shadow: 0 18px 48px rgba(19, 27, 31, 0.1);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(215, 109, 42, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(19, 27, 31, 0.08), transparent 24%),
    linear-gradient(180deg, #fcf9f4 0%, var(--bg) 52%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(19, 27, 31, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 27, 31, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 76%);
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.topbar,
.hero,
.panel {
  backdrop-filter: blur(12px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 15px 20px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup small {
  color: var(--muted);
  font-size: 0.82rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ink) 0%, #2e4048 100%);
  color: #fff9f4;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-links a,
.text-link {
  color: var(--accent-dark);
  text-underline-offset: 2px;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
}

.hero {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  gap: 28px;
  padding: 32px;
  border-radius: calc(var(--radius) + 2px);
  margin-bottom: 24px;
}

.hero-copy {
  display: grid;
  gap: 18px;
  align-content: start;
}

.hero-copy h1,
.section-heading h2,
.sim-console-head h2,
.article-hero h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  letter-spacing: -0.03em;
}

.hero-copy h1,
.article-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.96;
}

.hero-copy h1 {
  max-width: 10ch;
}

.article-hero h1 {
  max-width: 13ch;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.inline-emoji {
  display: inline-block;
  font-size: 1.05em;
  line-height: 1;
  vertical-align: -0.08em;
}

.hero-text,
.section-note,
.status-note,
.highlight-card p,
.source-card p,
.market-card p,
.article-section p,
.note-card p {
  color: var(--muted);
}

.hero-text,
.article-section p {
  max-width: 60ch;
  margin: 0;
  line-height: 1.68;
  font-size: 1.02rem;
}

.pill-row,
.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}

.hero-copy .pill-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

a.metric-pill:hover {
  transform: translateY(-1px);
}

.button-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, var(--ink) 0%, #2d3f47 100%);
  color: #fffaf5;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
  box-shadow: 0 10px 24px rgba(19, 27, 31, 0.16);
}

.button-link:hover,
button:hover {
  transform: translateY(-1px);
}

.button-link.secondary {
  background: rgba(19, 27, 31, 0.05);
  color: var(--ink);
  box-shadow: none;
}

button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.hero-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(19, 27, 31, 0.96), rgba(19, 27, 31, 0.9));
  color: #fff8f3;
}

.hero-panel .eyebrow {
  color: #c9def7;
}

.hero-panel .status-note {
  color: rgba(255, 248, 243, 0.82);
}

.shot-clock {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 248, 243, 0.055);
  border: 1px solid rgba(255, 248, 243, 0.08);
}

.shot-clock-copy h2 {
  margin: 0 0 6px;
  font-family: "Fraunces", serif;
  font-size: 1.7rem;
  color: #fff8f3;
}

.shot-clock-ring {
  --shot-clock-angle: 360deg;
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(19, 27, 31, 0.95) 0 57%, transparent 58%),
    conic-gradient(#f3ab69 0 var(--shot-clock-angle), rgba(255, 248, 243, 0.11) var(--shot-clock-angle) 360deg);
  display: grid;
  place-items: center;
}

.shot-clock-ring-inner {
  display: grid;
  place-items: center;
  gap: 3px;
  width: 64px;
  text-align: center;
}

.shot-clock-ring-inner strong {
  color: #fff8f3;
  font-size: 1rem;
}

.hero-stat-grid,
.article-stat-grid,
.sim-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-stat,
.article-stat,
.sim-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
}

.hero-stat,
.sim-card {
  background: rgba(255, 248, 243, 0.055);
  border: 1px solid rgba(255, 248, 243, 0.08);
}

.article-stat {
  background: rgba(19, 27, 31, 0.04);
  border: 1px solid var(--line);
}

.hero-stat strong,
.article-stat strong,
.sim-card strong {
  font-size: 1.08rem;
}

.label,
.readout-label {
  color: rgba(255, 248, 243, 0.76);
  font-size: 0.82rem;
}

.article-stat .readout-label {
  color: var(--muted);
}

.sim-console {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 248, 243, 0.05);
  border: 1px solid rgba(255, 248, 243, 0.08);
}

.sim-console-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.sim-console-head h2 {
  font-size: 1.4rem;
  color: #fff9f4;
}

.sim-console .eyebrow {
  color: #b9d6f5;
}

.sim-phase {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(118, 165, 212, 0.18);
  color: #d9ecff;
  font-size: 0.8rem;
  font-weight: 700;
}

.sim-track-shell {
  padding-top: 4px;
}

.sim-ticker {
  margin: 0;
  min-height: 1.6em;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 248, 243, 0.06);
  border: 1px solid rgba(255, 248, 243, 0.08);
  color: #eef6ff;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.sim-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 248, 243, 0.12), rgba(255, 248, 243, 0.06)),
    repeating-linear-gradient(90deg, rgba(255, 248, 243, 0.08), rgba(255, 248, 243, 0.08) 18px, transparent 18px, transparent 32px);
}

.sim-track-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #76a5d4 0%, #c7e0ff 100%);
  transition: width 180ms ease;
}

.sim-track-ball {
  position: absolute;
  top: 50%;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, #ecf5ff 0%, #8fb8e1 58%, #4f7ca8 100%);
  border: 2px solid rgba(255, 247, 239, 0.55);
  box-shadow: 0 0 0 4px rgba(118, 165, 212, 0.14);
  transform: translate(-50%, -50%);
  transition: left 180ms ease;
}

.sim-console.is-running .sim-track-ball {
  animation: bounce 0.9s ease-in-out infinite;
}

.sim-console.is-running .sim-ticker {
  box-shadow: inset 0 0 0 1px rgba(118, 165, 212, 0.18);
}

.sim-console.is-leader-flip .sim-ticker,
.sim-console.is-finish-pulse .sim-ticker {
  animation: tickerPulse 520ms ease;
}

.hero-actions {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(118, 165, 212, 0.12), rgba(255, 248, 243, 0.05));
  border: 1px solid rgba(118, 165, 212, 0.18);
}

.hero-actions #rerun-button {
  width: 100%;
  min-height: 58px;
  font-size: 1rem;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 34px rgba(118, 165, 212, 0.22);
}

.hero-actions #rerun-button:not(:disabled) {
  box-shadow:
    0 16px 34px rgba(118, 165, 212, 0.22),
    0 0 0 4px rgba(118, 165, 212, 0.12);
}

.hero-actions #rerun-button:disabled {
  background: linear-gradient(180deg, rgba(255, 248, 243, 0.18), rgba(255, 248, 243, 0.1));
  color: rgba(255, 248, 243, 0.74);
  border: 1px solid rgba(255, 248, 243, 0.16);
  box-shadow: none;
}

.action-note {
  margin: 0;
  color: rgba(255, 248, 243, 0.82);
  font-size: 0.92rem;
  line-height: 1.5;
}

.status-note {
  margin: 0;
  line-height: 1.55;
}

main,
.article-main {
  display: grid;
  gap: 24px;
}

.panel {
  border-radius: var(--radius);
  padding: 28px;
}

.panel-wide {
  padding: 30px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
}

.highlight-grid,
.market-list,
.source-grid,
.step-grid,
.cta-grid {
  display: grid;
  gap: 16px;
}

.highlight-rows {
  display: grid;
  gap: 18px;
}

.highlight-lane {
  display: grid;
  gap: 14px;
}

.highlight-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.highlight-lane-head h3 {
  margin: 0;
  font-size: 1rem;
}

.highlight-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.highlight-card,
.region-card,
.market-card,
.source-card,
.note-card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.highlight-card,
.market-card,
.source-card,
.note-card {
  padding: 18px;
}

.highlight-card {
  min-height: 176px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.highlight-card h3,
.region-card h3,
.market-card h3,
.source-card h3,
.note-card h3 {
  margin: 0;
  font-size: 1rem;
}

.region-card {
  padding: 20px;
}

.bracket-board {
  overflow: hidden;
  padding-bottom: 8px;
}

.bracket-toolbar {
  display: grid;
  gap: 14px;
  margin: -6px 0 18px;
}

.bracket-toolbar-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.mode-switch {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
}

.mode-chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(19, 27, 31, 0.04);
  color: var(--ink);
  box-shadow: none;
  white-space: nowrap;
}

.mode-chip:hover {
  transform: translateY(-1px);
}

.mode-chip.is-active {
  background: linear-gradient(135deg, var(--ink) 0%, #2d3f47 100%);
  color: #fffaf5;
  border-color: rgba(19, 27, 31, 0.1);
}

.mode-chip-easter-egg {
  flex: 0 0 280px;
  max-width: 280px;
  white-space: normal;
  text-align: left;
  line-height: 1.2;
  background: linear-gradient(135deg, rgba(243, 171, 105, 0.26), rgba(255, 248, 243, 0.94));
  border-color: rgba(243, 171, 105, 0.42);
}

.mode-chip-easter-egg:hover {
  background: linear-gradient(135deg, rgba(243, 171, 105, 0.38), rgba(255, 248, 243, 0.98));
}

.bracket-rarity {
  margin: 0;
  max-width: 68ch;
}

.bracket-download-button {
  white-space: nowrap;
}

.easter-egg-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(19, 27, 31, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.easter-egg-overlay.is-visible {
  opacity: 1;
}

.easter-egg-frame {
  width: min(92vw, 760px);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(19, 27, 31, 0.34);
  border: 1px solid rgba(255, 248, 243, 0.42);
  background: #111;
}

.easter-egg-frame img {
  display: block;
  width: 100%;
  height: auto;
}

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

.bracket-single-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.76fr) minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  align-items: stretch;
}

.bracket-side {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.bracket-center-column {
  display: flex;
  align-items: center;
  min-width: 0;
}

.bracket-region,
.bracket-center-card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 248, 243, 0.92), rgba(255, 248, 243, 0.84)),
    var(--panel-strong);
  padding: 14px;
  box-shadow: 0 18px 32px rgba(19, 27, 31, 0.05);
  min-width: 0;
}

.bracket-region-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.bracket-center-card {
  width: 100%;
  display: grid;
  gap: 18px;
  background: linear-gradient(180deg, rgba(255, 248, 243, 0.96), rgba(243, 171, 105, 0.09));
}

.bracket-center-head {
  margin-bottom: 0;
}

.bracket-center-grid {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) minmax(128px, 1fr);
  gap: 12px;
  align-items: start;
}

.bracket-champion-callout {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(215, 109, 42, 0.1);
  border: 1px solid rgba(243, 171, 105, 0.22);
}

.bracket-champion-callout .readout-label {
  color: var(--muted);
}

.bracket-champion-callout strong {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  color: var(--ink);
}

.bracket-round {
  min-width: 0;
}

.bracket-round h4 {
  margin: 0 0 10px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.bracket-match-list {
  display: grid;
  gap: 8px;
}

.round-round32 .bracket-match-list {
  padding-top: 18px;
  gap: 24px;
}

.round-sweet16 .bracket-match-list {
  padding-top: 42px;
  gap: 72px;
}

.round-elite8 .bracket-match-list {
  padding-top: 116px;
}

.round-final4 .bracket-match-list {
  padding-top: 38px;
  gap: 86px;
}

.round-championship .bracket-match-list {
  padding-top: 120px;
}

.bracket-matchup {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(19, 27, 31, 0.03);
  position: relative;
  min-width: 0;
}

.bracket-matchup.is-locked {
  border-color: rgba(15, 118, 110, 0.22);
  background: rgba(15, 118, 110, 0.06);
}

.bracket-team-lines {
  display: grid;
  gap: 6px;
}

.bracket-team-line {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 6px;
  align-items: center;
  padding: 6px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  min-width: 0;
}

.bracket-team-line span {
  font-size: 0.74rem;
  color: var(--muted);
}

.bracket-team-line strong {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bracket-team-line.is-winner {
  background: rgba(215, 109, 42, 0.12);
  color: var(--ink);
}

.bracket-matchup-meta {
  font-size: 0.72rem;
  color: var(--accent-dark);
}

.bracket-matchup-meta .chaos-tag {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(243, 171, 105, 0.18);
  color: var(--accent-dark);
  font-weight: 700;
}

.two-up {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 24px;
}

.table-shell {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

thead th {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

tbody tr:hover {
  background: rgba(19, 27, 31, 0.03);
}

.team-cell {
  display: grid;
  gap: 3px;
}

.team-cell small {
  color: var(--muted);
}

.market-list,
.warning-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.market-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.market-lead-card {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(243, 171, 105, 0.28);
  background: linear-gradient(135deg, rgba(243, 171, 105, 0.14) 0%, rgba(255, 248, 243, 0.8) 100%);
}

.market-lead-card h3 {
  margin: 0;
  font-size: 1rem;
}

.market-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 100%;
}

.market-card .delta.positive {
  color: var(--green);
}

.market-card .delta.negative {
  color: var(--accent-dark);
}

.source-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.source-card {
  display: grid;
  gap: 10px;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.source-card:hover {
  transform: translateY(-2px);
  border-color: rgba(215, 109, 42, 0.25);
  box-shadow: 0 16px 30px rgba(19, 27, 31, 0.08);
}

.source-url {
  color: var(--accent-dark);
  font-size: 0.82rem;
  word-break: break-word;
}

.warning-list {
  display: grid;
  gap: 10px;
}

.warning-list li {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(19, 27, 31, 0.05);
  color: var(--muted);
}

.cta-grid {
  grid-template-columns: 1.2fr auto;
  align-items: center;
}

.cta-actions {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.cta-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
  font-size: 1.02rem;
}

.article-hero {
  margin-bottom: 24px;
}

.article-section p {
  margin: 0 0 14px;
}

.article-section p:last-child {
  margin-bottom: 0;
}

.formula-card {
  margin: 16px 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(19, 27, 31, 0.05);
  border: 1px solid var(--line);
  overflow-x: auto;
}

.formula-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.96rem;
  color: var(--ink);
}

.step-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 16px 0;
}

.coin-flip-demo {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 248, 243, 0.58);
}

.coin-flip-demo button {
  justify-self: start;
}

.coin-flip-demo .section-note {
  margin: 0;
}

.note-card p {
  margin: 8px 0 0;
  line-height: 1.55;
}

.warnings-panel[hidden],
#market-panel[hidden] {
  display: none;
}

@keyframes bounce {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, -62%);
  }
}

@keyframes tickerPulse {
  0% {
    transform: scale(0.99);
    background: rgba(118, 165, 212, 0.12);
  }
  50% {
    transform: scale(1.01);
    background: rgba(118, 165, 212, 0.2);
  }
  100% {
    transform: scale(1);
    background: rgba(255, 248, 243, 0.06);
  }
}

@media (max-width: 1080px) {
  .hero,
  .cta-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy .pill-row {
    grid-template-columns: 1fr;
  }

  .mode-switch {
    flex-wrap: wrap;
  }

  .bracket-toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .bracket-board {
    overflow-x: auto;
  }

  .bracket-single-page {
    min-width: 1180px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 20px, 1280px);
    padding-top: 18px;
  }

  .topbar,
  .hero,
  .panel,
  .panel-wide {
    padding: 20px;
  }

  .topbar,
  .section-heading,
  .sim-console-head {
    flex-direction: column;
    align-items: start;
  }

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

  .shot-clock {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .article-hero h1 {
    max-width: none;
  }

  .hero-stat-grid,
  .article-stat-grid,
  .sim-grid {
    grid-template-columns: 1fr;
  }

  .mode-switch {
    width: 100%;
  }

  .mode-chip {
    flex: 1 1 180px;
  }

  .mode-chip-easter-egg {
    max-width: none;
  }

  .bracket-download-button {
    width: 100%;
  }

  table {
    min-width: 620px;
  }

  .bracket-board {
    overflow: visible;
  }

  .bracket-single-page {
    grid-template-columns: 1fr;
    min-width: 0;
    gap: 16px;
  }

  .bracket-center-column {
    order: 3;
  }

  .bracket-side-right {
    order: 2;
  }

  .bracket-region-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 12px;
  }

  .bracket-region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .bracket-region-grid--right > .round-round64 {
    order: 1;
  }

  .bracket-region-grid--right > .round-round32 {
    order: 2;
  }

  .bracket-region-grid--right > .round-sweet16 {
    order: 3;
  }

  .bracket-region-grid--right > .round-elite8 {
    order: 4;
  }

  .bracket-center-grid {
    grid-template-columns: 1fr;
  }

  .round-round32 .bracket-match-list,
  .round-sweet16 .bracket-match-list,
  .round-elite8 .bracket-match-list,
  .round-final4 .bracket-match-list,
  .round-championship .bracket-match-list {
    padding-top: 0;
    gap: 8px;
  }

  .market-list {
    grid-template-columns: 1fr;
  }
}
