@font-face {
  font-family: Fight Club Display;
  src: url('/static/fonts/chakra-petch-latin-700.woff2') format('woff2');
  font-style: normal; font-weight: 700; font-display: swap;
}
@font-face {
  font-family: Fight Club Text;
  src: url('/static/fonts/inter-variable.woff2') format('woff2');
  font-style: normal; font-weight: 100 900; font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #100f13; --panel: #1b1a20; --lift: #25232b;
  --ink: #f9f7fc; --sub: #beb9c6; --line: #423e49; --rule: #746d7e;
  --violet: #d697ff; --violet-wash: #32233d; --cyan: #71def0;
  --leader-band: #2b2036; --leader-row: #221b2b; --score-flash: #433058;
  --caution: #ffce88; --error: #ffb1b1;
  --gutter: clamp(14px, 3.4vw, 56px);
  --card-pad: clamp(14px, 1.5vw, 22px);
  --display: 'Fight Club Display', system-ui, sans-serif;
  --body: 'Fight Club Text', system-ui, sans-serif;
}
:root[data-theme='light'] {
  color-scheme: light;
  --canvas: #f6f5f8; --panel: #fff; --lift: #eeedf1;
  --ink: #19151f; --sub: #58525f; --line: #d5d1db; --rule: #8b8393;
  --violet: #6f1e95; --violet-wash: #f1e7f7; --cyan: #006775;
  --leader-band: #eee1f5; --leader-row: #faf4fc; --score-flash: #edddf8;
  --caution: #884c00; --error: #9e3537;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 1rem/1.5 var(--body); }
h1, h2, h3, p { margin: 0; }
button, select, summary { font: inherit; cursor: pointer; }
a { color: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
:is(a, button, select, summary):focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.frame { width: min(100% - 2 * var(--gutter), 1536px); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 2; top: 8px; left: 8px; padding: 10px 16px; background: var(--panel); }
.mast { border-bottom: 1px solid var(--line); background: var(--canvas); }
.mast-inner, .brand, .mast-tools, .player-link, .theme-toggle, .refresh { display: flex; align-items: center; }
.mast-inner { min-height: 64px; justify-content: space-between; gap: 8px; }
.brand { min-height: 44px; min-width: 0; gap: clamp(8px, 1vw, 17px); text-decoration: none; }
.wordmark { display: block; width: clamp(90px, 9vw, 122px); height: auto; }
.light-mark, [data-theme='light'] .dark-mark { display: none; }
[data-theme='light'] .light-mark { display: block; }
.brand-divider { height: 20px; width: 1px; background: var(--line); }
.club-lockup { display: block; width: clamp(98px, 9vw, 132px); height: auto; }
[data-theme='light'] .club-lockup { filter: brightness(0); }
.mast-tools { gap: clamp(6px, 1.4vw, 20px); }
.mast-tools svg, .refresh svg, .state-symbol svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.player-link { gap: 6px; min-height: 44px; font-size: .875rem; font-weight: 600; text-decoration: none; }
.player-link:hover { text-decoration: underline; text-underline-offset: .24em; }
.player-link svg { width: 16px; }
.theme-toggle { justify-content: center; min-width: 44px; min-height: 44px; background: none; border: 0; border-radius: 5px; }
.theme-toggle:hover { background: var(--lift); }

#main { padding-block: clamp(16px, 1.8vw, 28px) clamp(40px, 6vw, 88px); }
#main:focus { outline: none; }
.broadcast { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.poster { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: clamp(208px, 18vw, 272px); padding: clamp(22px, 2.7vw, 44px); color: white; background: #0a080e; border-radius: 7px 7px 0 0; }
.poster-art { position: absolute; z-index: -3; inset: 0 0 0 auto; width: min(53%, clamp(30rem, 43vw, 40rem)); height: 100%; object-fit: cover; object-position: 55% 14%; }
.poster::before { content: ''; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, #0b090f 54%, transparent 70%); }
/* The same forward cut frames the poster and marks the leading entries. */
.poster::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, #17121e, #25192e 62%); clip-path: polygon(0 0, 57% 0, 49% 100%, 0 100%); }
.poster-type { align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.series { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: .875rem; line-height: 1.2; color: #e5d5f1; }
.bars { width: 24px; height: 11px; transform: skewX(-22deg); background: repeating-linear-gradient(90deg, #da90ff 0 5px, transparent 5px 8px); }
.poster h1 { margin: .22em 0 .13em -.035em; font: 700 clamp(3.6rem, 6.25vw, 6.7rem)/.9 var(--display); letter-spacing: -.062em; text-transform: uppercase; transform: skewX(-6deg); transform-origin: left bottom; }
.poster-deck { color: #e4dfe8; font-size: clamp(.94rem, 1.22vw, 1.1rem); text-wrap: pretty; }
.control-strip { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; align-items: center; gap: clamp(16px, 2.5vw, 40px); padding: 8px clamp(16px, 2vw, 32px); border-top: 1px solid var(--line); }
.edition-picker { display: flex; align-items: center; gap: clamp(10px, 1.5vw, 22px); min-width: 0; }
.edition-picker label { color: var(--sub); font-size: .875rem; font-weight: 550; }
.select-wrap { position: relative; width: min(100%, 22rem); min-width: 0; }
.select-wrap::after { content: ''; position: absolute; pointer-events: none; top: calc(50% - 5px); right: 15px; width: 8px; height: 8px; border: solid var(--sub); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
#board-edition { appearance: none; display: block; width: 100%; min-width: 0; min-height: 44px; border-radius: 5px; border: 1px solid var(--line); padding: 8px 36px 8px 13px; font: 600 1rem/1.35 var(--body); color: var(--ink); background: var(--canvas); text-overflow: ellipsis; }
#board-edition:hover:not(:disabled) { border-color: var(--rule); }
#board-edition:disabled { color: var(--sub); cursor: default; opacity: 1; }
.status { display: flex; align-items: center; gap: 9px; color: var(--sub); font-size: .82rem; font-weight: 600; }
.status::before { content: ''; flex: none; width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 50%; }
[data-view='released'] .status { color: var(--cyan); }
[data-view='released'] .status::before { background: currentColor; }
[data-view='frozen'] .status { color: var(--caution); }
[data-view='frozen'] .status::before { border: solid currentColor; border-width: 0 3px; border-radius: 0; }
[data-view='error'] .status { color: var(--error); }
.refresh { min-height: 44px; justify-content: center; gap: 7px; border-radius: 5px; border: 1px solid var(--line); padding: 7px 13px; background: var(--lift); font-size: .875rem; font-weight: 600; }
.refresh:hover { border-color: var(--rule); }
.refresh:active { background: var(--panel); }
.refresh svg { width: 17px; }

.desk { display: grid; grid-template-columns: minmax(0, 1fr) clamp(19rem, 30%, 29rem); gap: clamp(20px, 2.8vw, 44px); margin-top: clamp(24px, 2.75vw, 42px); }
.section-head { display: flex; align-items: center; gap: 18px; }
.section-head::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.section-head h2 { font: 700 clamp(1.65rem, 2.55vw, 2.45rem)/1.1 var(--display); letter-spacing: -.055em; }
#target-list-title { min-width: 0; overflow-wrap: anywhere; text-wrap: balance; }
.section-note { margin: 6px 0 14px; color: var(--sub); font-size: .9rem; line-height: 1.5; text-wrap: pretty; }
.score-sheet { border: 1px solid var(--line); border-top: 2px solid var(--rule); border-radius: 4px; overflow: hidden; background: var(--panel); }
#award-table { --row-fill: var(--panel); width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; font-variant-numeric: tabular-nums; }
.rank-col { width: calc(2.25rem + 2 * var(--card-pad)); }
.solves-col { width: calc(3rem + 2 * var(--card-pad)); }
.points-col { width: calc(4rem + 2 * var(--card-pad)); }
/* Give wide totals room to stay whole without making every score column wider. */
#award-table:has(.long-score) .points-col { width: calc(5.5rem + 2 * var(--card-pad)); }
#award-table :is(th, td) { padding: 11px var(--card-pad); overflow-wrap: anywhere; }
#award-table thead th { border-bottom: 1px solid var(--line); background: var(--lift); color: var(--sub); font-size: .8rem; font-weight: 650; }
#award-table .numeric { text-align: right; }
#award-table tbody tr { background: var(--row-fill); }
#award-table tbody tr + tr, #top-card:not([hidden]) + tbody > tr:first-child { border-top: 1px solid var(--line); }
#award-table tbody th[scope='row'] { font-size: .94rem; font-weight: 550; line-height: 1.35; }
#award-table :is(.rank, .points) { font: 700 clamp(1.15rem, 1.65vw, 1.55rem)/1.15 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
#award-table .long-score { font-size: .8125rem; }
#award-table .rank { color: var(--sub); }
.leader-band { --row-fill: var(--leader-band); }
.first-place { --row-fill: var(--leader-row); }
#award-table .first-place :is(.rank, .points) { color: var(--violet); }
#award-table .first-place th[scope='row'] { font-weight: 650; }
#award-table .leader-band th { padding-block: 8px; }
.leader-strip { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 16px; color: var(--sub); font-size: .8rem; font-weight: 600; }
.leader-title { display: inline-flex; align-items: center; gap: 10px; color: var(--violet); font: 700 1rem/1.15 var(--display); }
.leader-title::before { content: ''; width: 15px; height: 9px; transform: skewX(-22deg); background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 6px); }
.score-state { display: flex; align-items: center; gap: clamp(13px, 2vw, 26px); padding: clamp(18px, 2.6vw, 38px) var(--card-pad); min-height: 132px; }
.state-symbol { flex: none; display: grid; place-items: center; width: clamp(42px, 5.3vw, 72px); aspect-ratio: 1; color: var(--violet); background: var(--violet-wash); clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%); }
.state-symbol svg { width: 43%; height: auto; stroke-width: 2; }
.state-symbol path { display: none; }
.state-symbol .symbol-rows, [data-view='error'] .symbol-stop, [data-view='unavailable'] .symbol-stop,
[data-view='checking'] .symbol-checking, [data-view='frozen'] .symbol-pause { display: inline; }
:is([data-view='error'], [data-view='unavailable'], [data-view='checking'], [data-view='frozen']) .symbol-rows { display: none; }
.score-state h3 { font: 700 clamp(1.2rem, 1.7vw, 1.6rem)/1.2 var(--display); letter-spacing: -.035em; }
.score-state p, .card-state { color: var(--sub); font-size: .9rem; line-height: 1.5; }
.score-state p { max-width: 45ch; margin-top: 6px; text-wrap: pretty; }
[data-view='error'] .state-symbol { color: var(--error); background: var(--lift); }
.card-state { display: flex; align-items: center; min-height: 106px; padding: 16px var(--card-pad); border: 1px dashed var(--rule); border-radius: 4px; }
.bout { overflow-wrap: anywhere; border: 1px solid var(--line); background: var(--panel); border-radius: 4px; }
.bout + .bout { margin-top: 10px; }
.bout-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px var(--card-pad); }
.challenge { color: var(--sub); font-size: .8rem; font-weight: 550; }
.bout h3 { font: 700 clamp(1.35rem, 1.85vw, 1.8rem)/1.12 var(--display); letter-spacing: -.045em; margin-top: 3px; }
.purse { min-width: 54px; text-align: right; font-size: .78rem; color: var(--sub); line-height: 1.24; }
.purse strong { display: block; font: 700 clamp(1.45rem, 2.1vw, 2rem)/1 var(--display); color: var(--violet); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.bout-actions { border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; column-gap: 16px; padding-inline: var(--card-pad); }
.bout-actions details { flex: 1; min-width: min(100%, 7rem); }
.bout-actions summary, .bout-link { display: inline-flex; gap: 7px; align-items: center; min-height: 44px; font-size: .83rem; font-weight: 600; }
.bout-actions summary { list-style: none; }
.bout-actions summary::-webkit-details-marker { display: none; }
.bout-actions summary::before { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); margin: 0 2px 0 1px; }
.bout-actions details[open] { flex-basis: 100%; }
.bout-actions details[open] summary::before { transform: rotate(45deg); }
.bout-actions details p { white-space: pre-line; max-width: 65ch; color: var(--sub); font-size: .9rem; margin: 0 0 12px; }
.bout-actions details h4 { font-size: .85rem; margin: 6px 0; }
.bout-link { color: var(--violet); text-decoration: none; margin-left: auto; }
.bout-link::after { content: ''; width: 8px; height: 8px; border: solid currentColor; border-width: 1.6px 1.6px 0 0; transform: rotate(45deg); }
.bout-actions summary:hover, .bout-link:hover { text-decoration: underline; text-underline-offset: .22em; }
.noscript { padding: 16px; background: var(--violet-wash); color: var(--ink); }

@media (max-width: 58rem) {
  .desk { grid-template-columns: 1fr; }
  #target-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
  .bout + .bout { margin: 0; }
}
@media (max-width: 42rem) {
  .mast-inner { min-height: 58px; }
  .poster { min-height: clamp(178px, 39vw, 228px); padding: 18px; }
  .poster-art { width: 79%; object-position: 54% 21%; }
  .poster::before { background: linear-gradient(90deg, #17121e 6%, rgb(23 18 30 / 70%) 28%, transparent 65%), linear-gradient(0deg, #100b17 4%, transparent 70%); }
  .poster::after { clip-path: polygon(0 0, 29% 0, 13% 100%, 0 100%); opacity: .65; }
  .poster h1 { font-size: clamp(2.6rem, 11.8vw, 4.6rem); margin-top: .35em; }
  .series { font-size: .8rem; gap: 8px; }
  .poster-deck { font-size: .875rem; }
  .control-strip { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; gap: 9px 12px; }
  .edition-picker { display: block; }
  .edition-picker label { display: block; margin-bottom: 4px; font-size: .78rem; }
  .select-wrap { width: 100%; }
  .status { grid-column: 1 / -1; grid-row: 2; }
  .refresh { grid-column: 2; grid-row: 1; align-self: end; }
  .section-note { margin-bottom: 13px; }
  #target-list { grid-template-columns: 1fr; }
}
@media (max-width: 30rem) {
  .brand { gap: 7px; }
  .wordmark { width: 84px; }
  .player-link { font-size: .8rem; }
  .player-link svg { display: none; }
  .mast-tools { gap: 3px; }
  .rank-col { width: 2.6rem; } .solves-col { width: 3.3rem; } .points-col { width: 4.875rem; }
  #award-table :is(th, td) { padding: 10px 5px; }
  #award-table thead th { font-size: .75rem; }
  #award-table tbody th[scope='row'] { font-size: .8125rem; font-variant-numeric: normal; letter-spacing: -.015em; }
  #award-table:has(.long-score) .points-col { width: 6.25rem; }
  #award-table :is(.points, thead th:last-child, .leader-band th) { padding-right: 7px; }
  .purse strong { font-size: 1.6rem; }
}
@media (max-width: 23rem) {
  .mast-inner { gap: 4px; }
  .brand { gap: 5px; }
  .wordmark { width: 72px; }
  .club-lockup { width: 84px; }
  .player-link { font-size: .75rem; }
  .mast-tools { gap: 1px; }
  .control-strip { padding-inline: 10px; gap: 9px 10px; }
  .edition-picker { grid-column: 1 / -1; }
  .status { grid-column: 1; gap: 6px; font-size: .775rem; }
  .refresh { grid-row: 2; gap: 5px; padding-inline: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  .refresh, .theme-toggle { transition: background-color .12s, border-color .12s; }
  .score-gain { animation: score-gain 1.6s ease-out 1; }
  @keyframes score-gain {
    from { background-color: var(--score-flash); }
    to { background-color: var(--row-fill); }
  }
}
@media (prefers-reduced-motion: reduce) {
  #award-table .score-gain .points { text-decoration: underline double var(--violet); text-underline-offset: .2em; }
}
@media (forced-colors: active) {
  #board-edition { appearance: auto; }
  .select-wrap::after { display: none; }
  .status::before { border: 2px solid CanvasText; }
  .leader-title::before { background: none; border-inline: 3px solid CanvasText; }
}
@media (scripting: none) {
  .control-strip, .desk, .theme-toggle { display: none; }
}
