/* Runbook 29: the fixtures pages on the design kit (after ch-tokens.css and ch-ui.css): the public /t/<slug>/fixtures (dark),
   the admin Format / Groups / Fixtures / Graphics & PDFs pages, the knockout bracket (fixtures/_bracket). Replaces fixtures.css
   on those pages; fixtures.css stays for the team PDF share page (unchanged). docs/DESIGN.md. */
@font-face { font-family: "Knewave"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/knewave-v400-latin.ttf") format("truetype"); } /* the "Road to the final" brush word (OFL) */
.ch-brush { font-family: "Knewave", var(--ch-font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; }

/* The public page: filters, days, match cards */
.ch-fx { padding-bottom: var(--ch-s-4); }
.ch-fx-filters { display: grid; gap: var(--ch-s-2); margin-top: var(--ch-s-5); }
.ch-fx-day { margin-top: var(--ch-s-8); }
.ch-fx-day-h { padding-bottom: var(--ch-s-2); border-bottom: 3px solid var(--ch-accent); }
.ch-fx-matches { list-style: none; margin: var(--ch-s-3) 0 0; padding: 0; display: grid; gap: var(--ch-s-3); }
@media (min-width: 900px) { .ch-fx-matches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ch-fx-match { padding: var(--ch-s-3) var(--ch-s-4); border: 1px solid var(--ch-border); border-left: 6px solid var(--ch-accent); border-radius: var(--ch-r-card); background: var(--ch-surface); min-width: 0; }
.ch-fx-match.is-ko { border-left-color: var(--ch-gold); }
.ch-fx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 700 var(--ch-fs-14)/1.3 var(--ch-font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ch-accent); }
.ch-fx-teams { margin-top: var(--ch-s-2); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--ch-s-2); }
.ch-fx-team { display: flex; align-items: center; gap: var(--ch-s-2); min-width: 0; }
.ch-fx-team:last-child { flex-direction: row-reverse; text-align: right; }
.ch-fx-logo { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; }
.ch-fx-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ch-fx-logo .fx-mono { font: 800 var(--ch-fs-15)/1 var(--ch-font-display); letter-spacing: .02em; color: #FFFFFF; white-space: nowrap; }
.ch-fx-name { font: 700 var(--ch-fs-20)/1.15 var(--ch-font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.ch-fx-v { color: var(--ch-muted); font: 700 var(--ch-fs-16) var(--ch-font-display); }
.ch-fx-when { margin-top: var(--ch-s-2); color: var(--ch-text-2); font-size: var(--ch-fs-15); line-height: 1.4; }
.ch-fx-when strong { color: var(--ch-text); }

/* The knockout bracket: one column per round (boxes and lines, HTML/CSS) */
.bracket { display: flex; gap: 28px; overflow-x: auto; overscroll-behavior-x: contain; padding: var(--ch-s-2) 2px var(--ch-s-3); }
.bracket-round { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: min(78vw, 15rem); position: relative; }
.bracket-round + .bracket-round::before { content: ""; position: absolute; left: -28px; top: 50%; width: 28px; border-top: 3px solid var(--ch-border-3); }
.bracket-box { padding: 10px 12px; border: 2px solid var(--ch-accent); border-radius: var(--ch-r-control); background: var(--ch-surface); }
.bracket-final { background: var(--ch-gold); border-color: var(--ch-gold); color: var(--ch-navy); }
.bracket-name { font: 700 var(--ch-fs-16)/1.2 var(--ch-font-display); text-transform: uppercase; color: var(--ch-accent); }
.bracket-code { color: var(--ch-muted); font-weight: 600; }
.bracket-teams { margin-top: 4px; font: 700 var(--ch-fs-20)/1.2 var(--ch-font-display); text-transform: uppercase; }
.bracket-teams span { color: var(--ch-muted); font-weight: 600; margin: 0 4px; }
.bracket-when { margin-top: 4px; font-size: var(--ch-fs-14); color: var(--ch-text-2); }
.bracket-final .bracket-name, .bracket-final .bracket-code, .bracket-final .bracket-teams span, .bracket-final .bracket-when { color: var(--ch-navy); }
.fx-resched { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--ch-warning-bg); color: var(--ch-warning-ink); font: 700 var(--ch-fs-12)/1.4 var(--ch-font-display); letter-spacing: .08em; text-transform: uppercase; }

/* Admin: the move form in a table row, the graphics tiles, the lettering preview */
.ch-fx-move-form { display: grid; gap: 6px; padding: var(--ch-s-2) 0; min-width: 13rem; }
.ch-fx-move-form label { display: grid; gap: 2px; font-size: var(--ch-fs-14); color: var(--ch-text-2); }
.ch-fx-tiles { list-style: none; padding: 0; margin: var(--ch-s-3) 0 0; display: grid; gap: var(--ch-s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); }
.ch-fx-tile { padding: 10px; border: 1px solid var(--ch-border); border-radius: var(--ch-r-control); background: var(--ch-surface-2); min-width: 0; display: grid; gap: 6px; align-content: start; }
.ch-fx-tile img { display: block; width: 100%; height: auto; border-radius: var(--ch-r-4); }
.ch-fx-tile-empty { display: grid; place-items: center; aspect-ratio: 4 / 5; border: 1px dashed var(--ch-border-3); border-radius: var(--ch-r-4); color: var(--ch-muted); }
.ch-fx-tile-name { font-weight: 700; }
.ch-fx-tile .ch-row { gap: 6px; }
.ch-fx-chip { padding: 4px 8px; border-radius: var(--ch-r-6); background: var(--ch-warning-bg); color: var(--ch-warning-ink); font-size: var(--ch-fs-14); line-height: 1.3; }
.ch-fx-letter { height: 40px; width: auto; vertical-align: middle; background: #333 repeating-conic-gradient(#444 0 25%, #333 0 50%) 0 0 / 12px 12px; }
.ch-fx-ko-table .ch-input { min-width: 4.5rem; }
/* Runbook 30B §1: a match that has started: LIVE (red, a link to the match page), then the result and the scorecard link. */
.fx-live { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: #E11D48; color: #FFFFFF;
    font: 700 var(--ch-fs-12)/1.4 var(--ch-font-display); letter-spacing: .08em; text-decoration: none; }
.fx-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #FFFFFF; }
.ch .fx-live:hover { color: #FFFFFF; background: #BE123C; }
.fx-result { margin: 6px 0 0; font-size: var(--ch-fs-15); color: var(--ch-text-2); }
.fx-result strong { color: var(--ch-text); }
