@font-face {
  font-family: Chakra;
  src: url("/assets/fonts/ChakraPetch-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: Arial, sans-serif;
  background: #0b0d11;
  color: #eee;
  --green: #b7ff39;
  --muted: #a2a9b3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main,
footer {
  max-width: 1400px;
  margin: auto;
  padding: 24px 40px;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid #30343b;
  font-size: 12px;
  letter-spacing: 2px;
}
a {
  color: var(--green);
  text-decoration: none;
}
header a {
  font-weight: 900;
}
header span:last-child {
  color: var(--green);
}
h1,
h2,
h3 {
  font-family: "Chakra Petch", Chakra, Arial, sans-serif;
}
h1 {
  font-size: clamp(48px, 7vw, 96px);
  letter-spacing: -4px;
  line-height: 1;
  margin: 14px 0;
}
h1 em {
  font-style: normal;
  color: var(--green);
}
p {
  line-height: 1.6;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
  font-weight: bold;
}
.intro {
  padding: 12px 0 28px;
}
.intro > p {
  color: var(--muted);
}
.status {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
}
.status strong {
  color: var(--green);
}
.arena {
  display: grid;
  grid-template-columns: minmax(280px, 620px) minmax(250px, 1fr);
  gap: 60px;
  border-top: 1px solid #343943;
  padding-top: 28px;
}
.player {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-weight: 700;
}
.player span + span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
}
#board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  aspect-ratio: 1;
  border: 1px solid #535e4c;
}
.square {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #bbc6a7;
  font-family: "Segoe UI Symbol", serif;
  font-size: clamp(26px, 4.6vw, 61px);
  line-height: 1;
  color: #080b09;
  text-shadow: 0 1px 1px #fff5;
}
.square.dark {
  background: #596a50;
}
.square.white-piece {
  color: #fff;
  text-shadow:
    0 2px 2px #000,
    1px 0 #000,
    -1px 0 #000;
}
.square.last {
  box-shadow: inset 0 0 0 4px var(--green);
}
.square small {
  position: absolute;
  left: 3px;
  bottom: 3px;
  font: 10px Arial;
  color: #14230f;
}
aside h2 {
  font-size: 34px;
  margin: 12px 0;
  line-height: 1.15;
}
.decision {
  border-left: 3px solid var(--green);
  padding: 8px 20px;
  margin: 25px 0;
  background: #14191c;
}
.decision h3 {
  font-size: 36px;
  margin: 10px 0;
}
.decision p {
  margin: 0;
  color: var(--muted);
}
.counts {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.counts strong {
  font-size: 30px;
  display: block;
}
.counts span,
.muted {
  font-size: 12px;
  color: var(--muted);
}
#moves {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}
#moves li {
  padding: 6px 8px;
  background: #1a2024;
  font-size: 13px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  border-bottom: 1px solid #343943;
}
.section-title p {
  color: var(--muted);
  font-size: 13px;
}
#bracket {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0 40px;
}
.round h3 {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
}
.match {
  display: block;
  width: 100%;
  text-align: left;
  background: #171c20;
  border: 1px solid #343943;
  color: #ddd;
  padding: 13px;
  margin: 10px 0;
  border-radius: 3px;
  font: 12px Arial;
  cursor: pointer;
}
.match:disabled {
  cursor: default;
  opacity: 0.7;
}
.match.live {
  border-color: var(--green);
}
.match.selected {
  background: #253022;
}
.match span {
  display: block;
  padding: 4px 0;
}
.match .winner {
  color: var(--green);
  font-weight: 700;
}
.match small {
  display: block;
  color: var(--muted);
  margin-top: 7px;
  font-size: 10px;
}
button#follow {
  background: var(--green);
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: bold;
}
details {
  border-top: 1px solid #343943;
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}
summary {
  cursor: pointer;
  color: #eee;
  font-weight: bold;
}
#roster {
  columns: 2;
  line-height: 2;
}
code {
  overflow-wrap: anywhere;
}
footer {
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 40px;
}
#game-link {
  display: block;
  margin-top: 12px;
}
#game-link[hidden] {
  display: none;
}
@media (max-width: 850px) {
  header,
  main,
  footer {
    padding: 18px;
  }
  header span:nth-child(2) {
    display: none;
  }
  .arena {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .stage {
    max-width: 620px;
    width: 100%;
    margin: auto;
  }
  .square {
    font-size: clamp(26px, 8vw, 60px);
  }
  #bracket {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  h1 {
    letter-spacing: -2px;
  }
  .status {
    gap: 14px;
    flex-wrap: wrap;
  }
  #roster {
    columns: 1;
  }
}
/* Broadcast view: a compact arena and a continuous, connected knockout draw. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
header,
main,
footer {
  max-width: 1480px;
}
.intro {
  padding: 8px 0 18px;
}
h1 {
  font-size: clamp(44px, 6vw, 76px);
}
.intro > p:not(.eyebrow) {
  margin: 8px 0;
}
.view-nav {
  display: flex;
  gap: 32px;
  border-top: 1px solid #30343b;
  padding: 18px 0;
  font:
    700 12px "Chakra Petch",
    Arial;
  letter-spacing: 1px;
}
.view-nav a {
  color: #eee;
}
.view-nav span {
  color: var(--green);
  margin-left: 14px;
}
.arena {
  grid-template-columns: minmax(280px, 540px) minmax(250px, 1fr);
  gap: 56px;
  padding-top: 12px;
}
.stage {
  min-width: 0;
}
.player {
  font-size: 14px;
  padding: 10px 0 2px;
}
.board-wrap {
  position: relative;
  padding-left: 24px;
}
.eval-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: #22282b;
  border: 1px solid #69706b;
  overflow: hidden;
}
.eval-rail:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #b7ff3977;
}
.eval-rail[data-available="false"] {
  opacity: 0.35;
}
.eval-rail #eval-fill {
  position: absolute;
  bottom: 0;
  background: #f1f2df;
  width: 100%;
  height: 50%;
  transition: height 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.capture-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  color: var(--muted);
}
.captured-pieces {
  font:
    22px "Segoe UI Symbol",
    serif;
  letter-spacing: -3px;
  color: #9ba79c;
  line-height: 1.1;
}
.captured-pieces.white-piece {
  color: #eee;
}
.material {
  font:
    700 13px "Chakra Petch",
    Arial;
  color: var(--green);
  letter-spacing: 0;
}
.eval-readout {
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #30343b;
  padding: 10px 0;
  margin-top: 4px;
}
.eval-readout strong {
  font:
    700 19px "Chakra Petch",
    Arial;
  white-space: nowrap;
}
.eval-readout span {
  font-size: 11px;
  color: var(--muted);
}
.square {
  font-size: clamp(26px, 4vw, 53px);
}
aside h2 {
  font-size: clamp(24px, 2.8vw, 38px);
}
.section-title {
  margin-top: 64px;
  align-items: end;
  padding-bottom: 16px;
}
.section-title h2 {
  font-size: clamp(28px, 4vw, 46px);
  margin: 0;
  letter-spacing: -1px;
}
.section-title h2 span {
  color: var(--green);
}
.section-title p {
  margin: 6px 0;
}
.bracket-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  font-size: 11px;
  color: var(--muted);
}
.bracket-toolbar > span {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.bracket-toolbar i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}
.legend-line {
  display: inline-block;
  width: 22px;
  border-top: 1px solid var(--green);
  margin-left: 12px;
}
.bracket-toolbar nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.bracket-toolbar button {
  border: 1px solid #343943;
  background: transparent;
  color: #ccc;
  padding: 9px 12px;
  cursor: pointer;
  font:
    11px "Chakra Petch",
    Arial;
}
.bracket-toolbar button:hover {
  color: var(--green);
  border-color: var(--green);
}
.bracket-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-bottom: 1px solid #30343b;
  scrollbar-color: #526247 #13181b;
  scrollbar-width: thin;
  padding-bottom: 16px;
}
#bracket {
  display: block;
  position: relative;
  width: 1100px;
  min-width: 1100px;
  height: 990px;
  margin: 0 auto;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 259px,
    #ffffff04 260px,
    transparent 261px,
    transparent 280px
  );
}
#bracket-lines {
  position: absolute;
  inset: 0;
  width: 1100px;
  height: 990px;
  pointer-events: none;
  overflow: visible;
}
#bracket-lines path {
  fill: none;
  stroke: #394346;
  stroke-width: 1.5;
}
#bracket-lines path.advanced {
  stroke: var(--green);
  stroke-opacity: 0.65;
}
.round-heading {
  position: absolute;
  top: 8px;
  width: 240px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.round-heading small {
  font:
    700 26px "Chakra Petch",
    Arial;
  color: #47524e;
}
.round-heading h3 {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.match {
  position: absolute;
  width: 240px;
  height: 88px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid #343e40;
  border-radius: 0;
  background: #12181b;
  transition:
    background 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
}
.match:disabled {
  opacity: 1;
}
.match:not(:disabled):hover,
.match:focus-visible {
  background: #202c22;
  border-color: var(--green);
  box-shadow: 0 0 0 2px #b7ff3922;
}
.match.live {
  border-left: 3px solid var(--green);
}
.match.live > small {
  color: var(--green);
}
.match.selected {
  background: #202b20;
  box-shadow: inset 0 0 0 1px #b7ff3988;
}
.match > small {
  font:
    9px "Chakra Petch",
    Arial;
  letter-spacing: 1px;
  margin: 0 0 4px;
}
.match .entrant {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
  font-size: 11px;
}
.entrant > span {
  padding: 0;
  flex: 1;
  white-space: nowrap;
}
.entrant i {
  font-size: 10px;
  color: #8b9995;
  font-style: normal;
}
.entrant b {
  font:
    700 13px "Chakra Petch",
    Arial;
}
.entrant.eliminated {
  color: #788482;
}
.match .winner {
  color: var(--green);
}
.champion {
  position: absolute;
  left: 840px;
  top: 200px;
  width: 240px;
  text-align: center;
}
.champion .crown {
  display: block;
  font:
    70px "Segoe UI Symbol",
    serif;
  color: var(--green);
  line-height: 1.1;
}
.champion small {
  display: block;
  letter-spacing: 3px;
  font-size: 10px;
  margin: 15px 0;
}
.champion strong {
  font:
    700 26px "Chakra Petch",
    Arial;
}
.champion p,
.bracket-help {
  font-size: 12px;
  color: var(--muted);
}
.bracket-help {
  margin: 16px 0 32px;
}
a:focus-visible,
button:focus-visible,
.bracket-scroll:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}
#follow {
  position: sticky;
  top: 10px;
  z-index: 2;
}
#connection {
  font-size: 10px;
}
.arena {
  animation: arena-in 0.45s ease-out;
}
@keyframes arena-in {
  from {
    opacity: 0.5;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 850px) {
  .arena {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .stage {
    max-width: 540px;
  }
  .square {
    font-size: clamp(25px, 8vw, 58px);
  }
  .intro .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .section-title {
    display: block;
    margin-top: 40px;
  }
  .bracket-toolbar {
    display: block;
  }
  .bracket-toolbar nav {
    margin-top: 16px;
  }
  .view-nav {
    gap: 24px;
    font-size: 11px;
  }
  .counts {
    max-width: 540px;
  }
  .eval-readout {
    align-items: baseline;
  }
  .eval-readout span {
    font-size: 10px;
  }
  #bracket {
    margin: 0;
  }
  .player {
    font-size: 12px;
  }
  header {
    gap: 12px;
  }
  header a {
    white-space: nowrap;
  }
  h1 {
    letter-spacing: -2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
/* Finishing pass: clearer notation and a stable spectator toolbar. */
:root {
  --line: #303a3c;
}
html {
  scroll-padding-top: 94px;
}
body {
  font-variant-numeric: tabular-nums;
}
header {
  padding-top: 20px;
  padding-bottom: 20px;
}
.intro {
  padding-bottom: 0;
}
.intro > p:not(.eyebrow) {
  max-width: 760px;
  font-size: 14px;
}
.status {
  font-size: 13px;
  min-height: 24px;
}
#status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c7cfca;
  font-size: 11px;
  letter-spacing: 0.7px;
}
#status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
#status[data-state="running"],
#status[data-state="complete"] {
  color: var(--green);
}
#completion {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 20px;
  border: 0;
  appearance: none;
  background: var(--line);
  color: var(--green);
}
#completion::-webkit-progress-bar {
  background: var(--line);
}
#completion::-webkit-progress-value {
  background: var(--green);
  transition: width 0.4s ease;
}
#completion::-moz-progress-bar {
  background: var(--green);
}
.view-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  align-items: center;
  min-height: 58px;
  padding: 10px 0;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  background: #0b0d11f5;
  backdrop-filter: blur(14px);
}
.view-nav a {
  padding: 10px 0;
  transition: color 0.15s;
}
.view-nav a:hover {
  color: var(--green);
}
button#follow {
  position: static;
  margin-left: auto;
  min-height: 36px;
  color: #10160b;
  font:
    700 11px "Chakra Petch",
    Arial;
  letter-spacing: 0.5px;
}
.arena {
  border-top: 0;
  padding-top: 24px;
  align-items: start;
}
.player,
.capture-strip {
  padding-left: 24px;
}
.player {
  gap: 12px;
  align-items: baseline;
}
.player span:first-child {
  line-height: 1.4;
}
.capture-strip {
  min-height: 30px;
}
.square small {
  font: 600 10px Arial;
  text-shadow: none;
  color: #35432f;
}
.square.dark small {
  color: #d9e3cc;
}
.square .rank-label {
  top: 4px;
  left: 4px;
  bottom: auto;
}
.square .file-label {
  bottom: 3px;
  right: 4px;
  left: auto;
}
.square.last {
  box-shadow: inset 0 0 0 3px var(--green);
}
.eval-readout {
  margin-top: 8px;
  gap: 10px;
}
.eval-readout .eval-label {
  font-size: 9px;
  letter-spacing: 1px;
}
.material-summary {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
#game-link {
  font-size: 12px;
  display: inline-block;
  padding: 10px 0;
  margin-top: 5px;
}
.watch-state {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--green);
  margin: 10px 0 22px;
}
aside h2 {
  max-width: 650px;
  line-height: 1.2;
  text-wrap: balance;
}
#position {
  color: #c3cdc5;
  font-size: 13px;
}
.decision {
  padding: 16px 20px;
  margin: 24px 0;
}
.decision h3 {
  font-size: 40px;
  margin: 6px 0 12px;
}
.decision p {
  font-size: 13px;
  line-height: 1.6;
}
.counts {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.counts strong {
  font:
    700 28px "Chakra Petch",
    Arial;
}
.counts span {
  font-size: 11px;
}
.muted {
  line-height: 1.65;
  font-size: 11px;
}
.moves-heading {
  display: flex;
  justify-content: space-between;
  margin: 22px 0 10px;
  font-size: 10px;
  letter-spacing: 1px;
}
.moves-heading span {
  font-weight: 400;
  font-size: 9px;
}
#moves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
  margin: 0;
}
#moves .move-pair {
  display: grid;
  grid-template-columns: 32px 1fr 1fr;
  gap: 6px;
  background: transparent;
  padding: 8px 0;
  border-bottom: 1px solid #ffffff09;
  font-size: 12px;
}
.move-number {
  color: #85938c;
}
.move-pair .latest {
  color: var(--green);
  font-weight: 700;
}
#moves .empty-moves {
  grid-column: 1/-1;
  color: var(--muted);
  background: transparent;
  padding-left: 0;
}
.section-title {
  margin-top: 54px;
}
.section-title h2 {
  font-size: clamp(28px, 3.4vw, 42px);
}
.match .entrant {
  font-size: 12px;
}
.entrant.eliminated {
  color: #929e98;
}
.round-heading small {
  color: #77857d;
}
.bracket-toolbar button {
  min-height: 38px;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.match {
  border-radius: 3px;
}
.champion p {
  line-height: 1.6;
}
summary {
  padding: 6px 0;
}
details > p {
  max-width: 960px;
}
footer {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 11px;
}
@media (max-width: 850px) {
  .view-nav {
    gap: 20px;
    flex-wrap: wrap;
    padding: 8px 0;
  }
  .arena {
    padding-top: 14px;
    gap: 20px;
  }
  aside {
    width: 100%;
    max-width: 540px;
    margin: auto;
  }
  .watch-state {
    margin-top: 0;
    margin-bottom: 14px;
  }
  .section-title {
    margin-top: 40px;
  }
  .bracket-toolbar nav {
    gap: 6px;
  }
  .bracket-toolbar button {
    padding: 8px 10px;
    min-height: 40px;
  }
  #connection {
    font-size: 9px;
    letter-spacing: 1px;
  }
}
@media (max-width: 420px) {
  .view-nav {
    column-gap: 18px;
    row-gap: 0;
  }
  .view-nav span {
    margin-left: 6px;
  }
  button#follow {
    width: 100%;
    margin: 4px 0 6px;
  }
  .eval-readout {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .eval-readout #eval-source {
    flex: 1;
    min-width: 165px;
  }
  .capture-strip {
    gap: 7px;
  }
  .captured-pieces {
    font-size: 20px;
  }
  #moves {
    gap: 0 12px;
  }
  #moves .move-pair {
    grid-template-columns: 26px 1fr 1fr;
    font-size: 11px;
  }
}
