/* Scoreboard redesign: the components of the hand-off (direction 1a), adapted to the product. Depends on tokens.css
   and base.css. Values the hand-off wrote in style="" are classes here (the security policy blocks style attributes);
   a value that comes from data (bracket rows, round tab count, contest colours) is a custom property that
   js/sb/portal.js sets through the CSSOM from data-css-vars. Bars of progress are native <progress> and <meter>.
   The confirm dialog of confirm-dialog.js and the toasts of notifications.js get the hand-off look here. */

/* ============ Page head ============ */
.page-head { background: var(--bg-sunken); border-bottom: 1px solid var(--line); padding-top: var(--sp-6); }
.page-head__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-1) var(--sp-2); margin-top: var(--sp-2); }
.page-head__title { font: 800 var(--fs-d4)/1 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.page-head__meta { color: var(--muted); font-weight: 500; padding-bottom: 6px; }
/* The separator dot between meta items. \20 keeps the space after the dot: a plain space after an escape only ends it. */
.page-head__meta > * + *::before { content: " \B7\20 "; content: " \B7\20 " / ""; }
.page-head__actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: var(--sp-1); padding-bottom: 4px; }
.page-head--plain { background: none; border: 0; padding-bottom: var(--sp-2); }
.page-head--plain .page-head__title { font-size: var(--fs-d3); }
.page-head:not(:has(.tabs)) { padding-bottom: var(--sp-5); }
@media (max-width: 760px) {
  .page-head__title, .page-head--plain .page-head__title { font-size: 1.875rem; }
  .page-head__actions { margin-left: 0; width: 100%; }
  .page-head__actions .btn { flex: 1; }
}

/* Live test P-17: the steps are centred in their row, so on a touch screen the 44px link, the separator and the current
   page name share one middle line. */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--muted); }
.crumbs li + li::before { content: "\203A"; content: "\203A" / ""; margin-right: var(--sp-2); }
.crumbs a { display: inline-flex; align-items: center; min-height: 24px; color: var(--muted); text-decoration: none; }
@media (pointer: coarse) { .crumbs a { display: inline-flex; align-items: center; min-height: var(--tap); } }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text-2); }
/* Guide walkthrough round 24 (F138): on the public portal the crumb links are underlined, so they read as links (the
   back-office top bar keeps its own crumbs). */
.shell--public .crumbs a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.shell--public .crumbs a:hover { color: var(--text); }

/* Tabs (tournament navigation, club navigation, list views) */
/* The row scrolls sideways, which clips what is drawn outside it. An 8px padding keeps the focus ring of a tab inside,
   and an equal negative margin on every side keeps the tabs where the hand-off puts them. */
.tabs { display: flex; align-items: flex-end; gap: 0; margin: calc(var(--sp-5) - var(--sp-2)) calc(var(--sp-2) * -1) calc(var(--sp-2) * -1); padding: var(--sp-2); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
/* A button at the end of the row (the "Register competitors" button, guide walkthrough F21) keeps its own look: the tab
   link rules below skip .btn, so a primary button keeps its --brand-on text on the --brand fill. */
/* A tab link is positioned, so the screen reader words in it (.sr-only, absolutely placed) stay inside the row that
   scrolls sideways; otherwise a tab out of view (the last tabs on a phone) widened the page. */
.tabs a:not(.btn) { position: relative; flex: none; display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 48px; padding: 0 var(--sp-4); color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:not(.btn):hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 700; border-bottom-color: var(--brand); }
.tabs__end { white-space: nowrap; margin-left: auto; display: flex; align-items: center; gap: var(--sp-1); padding: 0 0 6px var(--sp-4); }
.tabs--flush { margin-top: calc(var(--sp-2) * -1); }
.tabs--display a:not(.btn) { font: 800 var(--fs-xl)/1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
/* The rule runs right under the tab underlines (the bottom of the content box), not under the ring padding. */
.tabs--ruled { background: linear-gradient(var(--line), var(--line)) bottom / 100% 1px no-repeat content-box; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2); font-size: var(--fs-xs); font-weight: 700; }
.count--warn { background: var(--st-warn-bg); color: var(--st-warn-fg); }
@media (max-width: 1100px) { .tabs .tabs__end { display: none; } }
@media (max-width: 760px) {
  .tabs { margin-inline: calc(var(--page-pad) * -1); padding-inline: calc(var(--page-pad) - 8px); }
  .tabs a:not(.btn) { padding: 0 var(--sp-2); }
}

/* Segmented control (view switch inside a page) */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.seg > a, .seg > button { display: grid; place-items: center; min-height: 40px; padding: 0 var(--sp-4); border: 0; border-radius: var(--r-md); background: none; color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.seg > [aria-current="page"], .seg > [aria-current="true"], .seg > [aria-pressed="true"], .seg > [aria-selected="true"] { background: var(--surface-3); border: 1px solid var(--control-border); color: var(--text); font-weight: 700; }
.seg--block { display: grid; width: 100%; }

/* ============ Buttons ============
   The buttons that confirm-dialog.js and grid.js build carry the legacy names (button-primary, button-outline,
   text-button); inside those components they take the same look.
   Guide walkthrough F3: no button has a transparent or near-page fill, in either theme. Every non-primary button
   (default, outline, quiet) has the solid --btn-bg with the neutral border and a solid --btn-bg-hover; a quiet button keeps
   its brand text. F1: the primary hover is --brand-hover, which moves away from the text colour. F6: a delete button is
   solid red with light text and a darker red hover. A tinted fill alone is no edge (the tint is under 3:1 against the
   card), so the grid row text button has the neutral border too. ButtonStyleRuleTests checks these rules. */
.btn,
.confirm-dialog .button-outline, .confirm-dialog .button-primary,
.dt-container .button-outline, .grid-block .button-outline {
  white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1); min-height: var(--control-h); padding: 0 var(--sp-5); border: 1px solid var(--control-border); border-radius: var(--r-md); background: var(--btn-bg); color: var(--text); font-weight: 700; font-size: var(--fs-md); line-height: 1.1; text-decoration: none; text-align: center; cursor: pointer; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover, .confirm-dialog .button-outline:hover, .dt-container .button-outline:hover, .grid-block .button-outline:hover { background: var(--btn-bg-hover); color: var(--text); }
.btn--primary, .confirm-dialog .button-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.btn--primary:hover, .confirm-dialog .button-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-on); }
.btn--quiet { background: var(--btn-bg); border-color: var(--control-border); color: var(--brand-text); }
.btn--quiet:hover { background: var(--btn-bg-hover); color: var(--brand-text); }
.grid-block .text-button { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--sp-2); border: 1px solid var(--control-border); border-radius: var(--r-md); background: var(--btn-tint); color: var(--brand-text); font-weight: 700; cursor: pointer; }
.grid-block .text-button:hover { background: var(--btn-tint-hover); }
.btn--outline { background: var(--btn-bg); }
.btn--danger, .confirm-dialog .button-primary.button-danger { background: var(--danger-bg); border-color: var(--danger-bg); color: var(--danger-on); }
.btn--danger:hover, .confirm-dialog .button-primary.button-danger:hover { background: var(--danger-bg-hover); border-color: var(--danger-bg-hover); color: var(--danger-on); }
.btn--sm, .dt-container .button-outline, .grid-block .button-outline { min-height: 36px; padding: 0 var(--sp-3); font-size: var(--fs-sm); }
/* On a phone and on any touch screen a small button keeps the 44px touch target. */
@media (max-width: 760px), (pointer: coarse) {
  .btn--sm, .dt-container .button-outline, .grid-block .button-outline, .grid-block .text-button, .seg > a, .seg > button { min-height: var(--tap); }
}
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"], .grid-block .button-outline[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { pointer-events: none; color: transparent; position: relative; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-color: var(--text) transparent var(--text) transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.btn--primary.is-loading::after { border-color: var(--brand-on) transparent var(--brand-on) transparent; }
.btn--danger.is-loading::after { border-color: var(--danger-on) transparent var(--danger-on) transparent; }

/* ============ Forms ============ */
.field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.field__label { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.field__label .opt { font-weight: 500; color: var(--faint); }
.input, .select, .textarea { width: 100%; min-height: var(--control-h); padding: 0 var(--sp-3); background-color: var(--field-bg); border: 1px solid var(--control-border); border-radius: var(--r-md); color: var(--text); font-size: var(--fs-md); font-weight: 500; }
.textarea { min-height: 96px; padding: var(--sp-3); resize: vertical; }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover { border-color: var(--muted); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-color: var(--focus); }
.input[disabled], .select[disabled] { opacity: .5; cursor: not-allowed; }
.input[readonly] { background: var(--surface-2); }
.input--narrow { width: 320px; max-width: 100%; }
.error-text, .field-validation-error { display: flex; gap: 3px; font-size: var(--fs-sm); font-weight: 600; color: var(--st-bad-fg); }
.error-text::before, .field-validation-error::before { content: "!"; content: "!" / ""; display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--st-bad-fg); color: var(--bg); font-size: 12px; font-weight: 800; }
.field-validation-valid:empty { display: none; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea,
.input.input-validation-error, .select.input-validation-error, .textarea.input-validation-error, [aria-invalid="true"].input { border: 2px solid var(--st-bad-fg); }
.validation-summary-errors { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-1) var(--sp-1); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--st-bad-bg); border: 1px solid var(--line); }
.validation-summary-errors ul { margin: 0; padding-left: var(--sp-4); }
/* X-26: the field name a client summary links (form-validation.js), in the text colour of the box and underlined. */
.validation-summary-errors a[data-summary-field] { color: var(--text); font-weight: 600; }
/* X-28: the Reload link of an out-of-date form (TagHelpers/StaleFormReloadTagHelper.cs), under the message. */
.validation-summary-errors [data-stale-reload] { grid-column: 2; justify-self: start; }
.validation-summary-valid { display: none; }
/* Guide walkthrough F129 R3: the fields of a form grid align to the top, so a help line under one field does not lift
   its input above the inputs of the same row (the field heads keep one height, F16). A grid search form draws no grid of
   its own (the F33 row rule below), so its fields and the Clear and Search buttons keep their bottom alignment. */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-2); align-items: start; }
/* Guide walkthrough F131: a date and time pair (a tournament deadline): the date text field and a short 24-hour time
   field on one line. */
/* Time picker package: the date is the date box (_DateField) and the time the time box (_TimeField), each with its
   button inside the field. The date box grows; the time box keeps the width that shows "23:59" beside its button; in a
   narrow column the time box goes under the date. */
.date-time { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-1); }
.date-time > .datebox { flex: 1 1 9.5rem; min-width: 0; }
.date-time > .timebox { flex: 0 0 7.5rem; }
/* A select whose chosen option is too long for one track takes the whole row, so the option is not cut
   (Views/Shared/Grids/_SbGridSelectField.cshtml sets field--wide). */
.form-grid > .field--wide { grid-column: 1 / -1; }
.form-grid > .field--wide .select { width: auto; min-width: min(200px, 100%); max-width: 100%; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-1); }
@media (max-width: 760px) { .form-actions .btn { flex: 1; } }
/* The actions sit at the start (left) when the form is a single short field, such as one file upload. */
.form-actions--start { justify-content: flex-start; }

.check { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: var(--tap); cursor: pointer; font-weight: 500; }
.check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--brand); }

/* Password show and hide: <div class="pw"><input class="input" ...><button class="password-toggle" aria-controls="id">.
   The button is Views/Account/_PasswordVisibilityToggle.cshtml (two eye icons); a text button (.pw__toggle, the hand-off
   form) works the same way. js/sb/portal.js switches the input type and aria-pressed. */
.pw { position: relative; }
.pw .input { padding-right: 56px; }
/* Guide walkthrough F3: the toggle is a button with the solid button fill and the neutral border, inset 4px in the field so
   the field's own border stays whole; on a desktop it is as tall as the field less the inset. */
.pw__toggle, .pw .password-toggle { position: absolute; top: 4px; right: 4px; bottom: 4px; display: inline-grid; place-items: center; min-width: 40px; padding: 0 var(--sp-2); border: 1px solid var(--control-border); background: var(--btn-bg); color: var(--brand-text); font-weight: 700; font-size: var(--fs-sm); cursor: pointer; border-radius: var(--r-sm); }
.pw__toggle:hover, .pw .password-toggle:hover { background: var(--btn-bg-hover); }
/* On a phone and on any touch screen the toggle is a 44px target: the whole field height (44px in the public shell) and at
   least 44px wide, joined to the end of the field. It covers the end of the field's own border, so its border takes the
   field's border in every state: the 1px neutral border at rest, the --muted colour on hover, the --focus colour while
   the field has focus, and the 2px --st-bad-fg border of an invalid field (server error class, aria-invalid or a
   .field.has-error wrapper). The rules use the markup order input then toggle inside .pw, and they come in the same
   order and weight as the field rules, so an invalid field with focus stays red like the field. A transparent border
   with an inset line was no visible edge: the fill alone was 1.32:1 against a dark card. */
@media (max-width: 760px), (pointer: coarse) {
  .pw .input { padding-right: 60px; }
  .pw__toggle, .pw .password-toggle { top: 0; right: 0; bottom: 0; min-width: var(--tap); border: 1px solid var(--control-border); border-radius: 0 var(--r-md) var(--r-md) 0; }
  .pw .input:hover + .pw__toggle, .pw .input:hover + .password-toggle { border-color: var(--muted); }
  .pw .input:focus-visible + .pw__toggle, .pw .input:focus-visible + .password-toggle { border-color: var(--focus); }
  .field.has-error .pw .pw__toggle, .field.has-error .pw .password-toggle,
  .pw .input.input-validation-error + .pw__toggle, .pw .input.input-validation-error + .password-toggle,
  .pw [aria-invalid="true"].input + .pw__toggle, .pw [aria-invalid="true"].input + .password-toggle { border: 2px solid var(--st-bad-fg); }
}
.pw .password-toggle svg { width: 20px; height: 20px; }
.password-toggle .password-eye-off, .password-toggle[aria-pressed="true"] .password-eye { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-off { display: block; }
.file { display: flex; align-items: center; gap: var(--sp-1); flex-wrap: wrap; padding: var(--sp-3); border: 1px dashed var(--control-border); border-radius: var(--r-md); background: var(--surface); }
.file input[type="file"] { min-height: var(--tap); }
.file input::file-selector-button { min-height: 40px; margin-right: var(--sp-3); padding: 0 var(--sp-4); border: 1px solid var(--control-border); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); font-weight: 700; cursor: pointer; }
/* An invalid file field (server error class or aria-invalid) frames its box in the danger colour like other invalid fields. */
.file:has(input[type="file"].input-validation-error, input[type="file"][aria-invalid="true"]) { border: 1px solid var(--st-bad-fg); box-shadow: 0 0 0 1px var(--st-bad-fg); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: var(--sp-2); font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }

/* Search panel above lists and grids: <details class="search-panel" open data-collapse-phone>. Always open on a
   desktop (the summary shows on a phone only); js/sb/portal.js closes it on a phone. */
.search-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.search-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-1); min-height: 52px; padding: 0 var(--sp-4); font-weight: 700; cursor: pointer; list-style: none; }
.search-panel > summary::-webkit-details-marker { display: none; }
.search-panel > summary::after { content: "\25BE"; content: "\25BE" / ""; color: var(--muted); }
.search-panel[open] > summary::after { content: "\25B4"; content: "\25B4" / ""; }
.search-panel__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); }
.search-panel__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.search-panel__heading { font: 800 var(--fs-xl)/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
/* A form in the panel stacks its children; a form with the shared Clear and Search block is one row instead (the F33
   rule below). A form that is itself the filter bar (the public Fights page) keeps the grid of .filter-bar: the :not()
   keeps this column rule off it (live test LAYOUT-1). */
.search-panel__body > form { margin: 0; }
.search-panel__body > form:not(.filter-bar) { display: flex; flex-direction: column; gap: var(--sp-2); }
@media (max-width: 760px) { .search-panel[open] .search-panel__body { padding-top: 0; } }
/* Guide walkthrough F33: a search form with the shared Clear and Search block (Views/Shared/Grids/_SbGridSearchActions,
   a direct child of the form) is one wrapping row, on every grid page. Its field block (.form-grid on the public and
   club pages, .filter-bar on the back-office pages) draws no grid of its own, so each field is an item of the row: it
   grows from 200px (.form-grid) or 150px (.filter-bar), as the old tracks did, and the fields share the free room. The
   buttons keep their width, sit at the right end of the last row of fields when they fit there and otherwise take
   their own line at the right. A wide select (.field--wide) and any other direct child of the form (a help or status
   line, the category chips box of the entries search) take a whole row; a screen-reader heading and hidden inputs
   take no room. Fields and buttons line up at the bottom edge of the inputs. A form that is itself the filter bar (the
   public Fights page) has no such block and keeps its grid. */
form:not(.filter-bar):has(> .grid-search-actions) { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-2); }
form:not(.filter-bar):has(> .filter-bar):has(> .grid-search-actions) { gap: var(--sp-1); }
form:not(.filter-bar):has(> .grid-search-actions) > * { flex: 1 1 100%; min-width: 0; }
form:not(.filter-bar):has(> .grid-search-actions) > :is(.form-grid, .filter-bar) { display: contents; }
form:not(.filter-bar):has(> .grid-search-actions) > .form-grid > * { flex: 1 1 200px; min-width: 0; }
form:not(.filter-bar):has(> .grid-search-actions) > .filter-bar > * { flex: 1 1 150px; min-width: 0; }
form:not(.filter-bar):has(> .grid-search-actions) > :is(.form-grid, .filter-bar) > .field--wide { flex-basis: 100%; }
form:not(.filter-bar):has(> .grid-search-actions) > .grid-search-actions { flex: 0 0 auto; margin-left: auto; }
/* Phone (public pages): every field takes the full width, the buttons their own line at the right. */
@media (max-width: 760px) {
  form:not(.filter-bar):has(> .grid-search-actions) > :is(.form-grid, .filter-bar) > * { flex-basis: 100%; }
}
.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-1); align-items: end; }
/* A one-row search (the tournament list): the field shrinks before the button wraps; on a phone it may wrap. On the
   schedule screens a date and time field takes 320px instead of the 240px below and keeps it (schedule.css, final
   round A10); fields elsewhere keep this rule. */
.filter-bar--inline { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--sp-1); margin: 0; }
.filter-bar--inline .input { flex: 1 1 240px; min-width: 0; }
@media (max-width: 760px) { .filter-bar--inline { flex-wrap: wrap; width: 100%; } }

/* Chips (phone filters, active filter summary) */
.chips { display: flex; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 3px; min-height: var(--tap); padding: 0 var(--sp-4); border: 1px solid var(--control-border); border-radius: var(--r-pill); background: var(--surface); color: var(--text); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; cursor: pointer; }
.chip[aria-pressed="true"], .chip--active { border: 2px solid var(--brand); background: var(--brand-tint-2); }
.chip--sm { min-height: 32px; }
.chip__x { color: var(--muted); font-weight: 700; }

/* ============ Status: a word, a symbol and a colour, never colour alone ============
   Tone classes give the colours and a default symbol; the symbol classes (badge--sym-*) set the symbol the central
   mapping (StateBadges) chose. Views/Shared/Sb/_StateBadge.cshtml always writes both. */
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px; border-radius: var(--r-sm); background: var(--st-neutral-bg); color: var(--st-neutral-fg); font: 700 var(--fs-xs)/1.25 var(--font-body); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.badge::before { content: "\25CB"; content: "\25CB" / ""; }
.badge--live { background: var(--st-live-bg); color: var(--st-live-fg); }
.badge--live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--st-live-dot); animation: pulse 1.6s infinite; }
.badge--open, .badge--ok { background: var(--st-ok-bg); color: var(--st-ok-fg); }
.badge--open::before, .badge--ok::before { content: "\2713"; content: "\2713" / ""; }
.badge--closed, .badge--neutral { background: var(--st-closed-bg); color: var(--st-closed-fg); }
.badge--closed::before { content: "\2298"; content: "\2298" / ""; }
.badge--done { background: var(--st-done-bg); color: var(--st-done-fg); }
.badge--done::before { content: "\25A0"; content: "\25A0" / ""; font-size: .8em; }
.badge--warn, .badge--moved { background: var(--st-warn-bg); color: var(--st-warn-fg); }
.badge--warn::before { content: "\25F7"; content: "\25F7" / ""; }
.badge--moved::before { content: "\21C4"; content: "\21C4" / ""; }
.badge--info { background: var(--st-info-bg); color: var(--st-info-fg); }
.badge--info::before { content: "\2197"; content: "\2197" / ""; }
.badge--bad { background: var(--st-bad-bg); color: var(--st-bad-fg); }
.badge--bad::before { content: "\2715"; content: "\2715" / ""; }
.badge--draw::before { content: "="; content: "=" / ""; }
.badge--sym-circle::before { content: "\25CB"; content: "\25CB" / ""; width: auto; height: auto; background: none; border-radius: 0; animation: none; font-size: 1em; }
.badge--sym-pulse::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.badge--live.badge--sym-pulse::before { background: var(--st-live-dot); }
.badge--sym-check::before { content: "\2713"; content: "\2713" / ""; }
.badge--sym-barred::before { content: "\2298"; content: "\2298" / ""; }
.badge--sym-square::before { content: "\25A0"; content: "\25A0" / ""; font-size: .8em; }
.badge--sym-clock::before { content: "\25F7"; content: "\25F7" / ""; }
.badge--sym-swap::before { content: "\21C4"; content: "\21C4" / ""; }
.badge--sym-arrow::before { content: "\2197"; content: "\2197" / ""; }
.badge--sym-cross::before { content: "\2715"; content: "\2715" / ""; }
.badge--sym-equal::before { content: "="; content: "=" / ""; }
.badge--sym-bang::before { content: "!"; content: "!" / ""; }
.badge--sym-lines::before { content: "\2261"; content: "\2261" / ""; }
.badge--lg { padding: 6px 12px; font-size: var(--fs-sm); }
/* Forced colours (Windows high contrast, backlog item 11, final round A9): the browser drops the tone backgrounds, so
   a warn or bad badge or count would read as plain text. A 1px border in the text colour keeps its shape; the symbol is
   text, so it stays drawn. Inside a link the border, the word and the symbol take the link's forced colour, like the
   link text beside them. The other families are in backoffice.css (.nb, .count--bad and more), grid.css
   (.status-chip) and draw.css (.side__out). Normal mode does not change, and the info and ok tones keep no border.
   tests/Browser/forced-colors-chips.test.cjs checks it. */
@media (forced-colors: active) {
  .badge--warn, .badge--moved, .badge--bad, .count--warn { border: 1px solid CanvasText; }
  :any-link :is(.badge--warn, .badge--moved, .badge--bad, .count--warn) { border-color: currentColor; color: inherit; }
  :any-link :is(.badge--warn, .badge--moved, .badge--bad)::before { color: inherit; }
}

/* Guide walkthrough round 17, F105: medal disc style B on every page (statistics, results placings, club ranking, draw
   placings, pools, score rounds): a light fill, a strong coloured ring (an inset shadow, so the disc keeps its size) and
   the dark number in both themes. Forced colours drop the fill and the shadow, so a border in the text colour keeps the
   round shape. */
.medal { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 800 14px/1 var(--font-display); color: var(--medal-ink); }
.medal--1 { background: var(--medal-1-fill); box-shadow: inset 0 0 0 3px var(--medal-1); }
.medal--2 { background: var(--medal-2-fill); box-shadow: inset 0 0 0 3px var(--medal-2); }
.medal--3 { background: var(--medal-3-fill); box-shadow: inset 0 0 0 3px var(--medal-3); }
/* Guide walkthrough F124: place 4 and lower get a ring like 1-3, the control line colour (--line-strong) on the surface
   fill in both themes, so the disc is never taken for silver; the number keeps the text colour. */
.medal--4 { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 3px var(--line-strong); }
/* Public redesign task 6 (spec 6.1, decision C9): in the public shell every medal disc is a bigger coin (--coin-size,
   36px) in the placings strip, the statistics and the club tables. Places 1 to 3 are filled: a gold, silver or bronze
   gradient over its dark stop (so a check that cannot see gradients measures the darkest part), a soft shadow and the
   dark number of .medal. Task 8 (sweep): no ring in the medal colour, because on the coin's own gradient it stayed under
   the 3:1 line contrast (spec 6.1 names none). Place 4 and lower keep the neutral disc above in the new size.
   The medals inside a draw (pools, score rounds, the shared bronze places) keep the 28px disc, so the draw does not
   grow. Forced colours drop the gradient and the shadow, and the border below keeps the round shape. */
.shell--public .medal:not(.draw *) { width: var(--coin-size); height: var(--coin-size); font-size: 18px; }
.shell--public .medal--1:not(.draw *) { background: var(--coin-1-dark) linear-gradient(160deg, var(--coin-1-light), var(--coin-1-dark)); box-shadow: var(--coin-shadow); }
.shell--public .medal--2:not(.draw *) { background: var(--coin-2-dark) linear-gradient(160deg, var(--coin-2-light), var(--coin-2-dark)); box-shadow: var(--coin-shadow); }
.shell--public .medal--3:not(.draw *) { background: var(--coin-3-dark) linear-gradient(160deg, var(--coin-3-light), var(--coin-3-dark)); box-shadow: var(--coin-shadow); }
@media (forced-colors: active) {
  .medal { border: 2px solid CanvasText; }
}

/* Live refresh indicator (Views/Shared/Sb/_LiveStatus.cshtml): data-state = ok | loading | failed. Only the part of
   the current state shows. */
.live-status { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); color: var(--muted); font-weight: 500; }
.live-status__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--st-ok-fg); }
.live-status time { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
/* The zone of the time (live test X-14): one piece that a narrow strip moves under the time rather than splits. */
.live-status__zone { white-space: nowrap; }
.live-status__loading, .live-status__failed { display: none; }
.live-status[data-state="loading"] .live-status__dot { background: var(--muted); animation: pulse .8s infinite; }
.live-status[data-state="loading"] .live-status__ok { display: none; }
.live-status[data-state="loading"] .live-status__loading { display: inline; }
.live-status[data-state="failed"] { color: var(--st-warn-fg); }
.live-status[data-state="failed"] .live-status__dot { background: var(--st-warn-fg); }
.live-status[data-state="failed"] .live-status__ok { display: none; }
.live-status[data-state="failed"] .live-status__failed { display: inline; }
/* The strip wraps: with the "Register competitors" button, the live status and the PDF menu it is wider than a phone, and
   a part past the right edge would lose its focus ring to the viewport. */
.live-strip { position: sticky; top: var(--header-h); z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-1); padding: var(--sp-2) var(--page-pad); background: var(--bg-header); border-bottom: 1px solid var(--line); }
@media (min-width: 1101px) { .live-strip { display: none; } }
@media (max-width: 760px) { .live-strip { top: var(--header-h-phone); } }

/* The old-browser note (pre-test decision Q30) at the top of main on the public shell: shown only in a browser below the
   supported floor. The design needs color-mix(), :has() and the lh unit; a browser that has all three hides the note.
   Live test fix round 14a: the note is hidden in the markup too (the hidden attribute), and only a browser that lacks one
   of the three shows it, so a current browser never shows it, also when this stylesheet did not load. */
@supports (color: color-mix(in oklch, currentColor, transparent)) and selector(:has(a)) and (width: 1lh) {
  .browser-note { display: none; }
}
@supports not ((color: color-mix(in oklch, currentColor, transparent)) and selector(:has(a)) and (width: 1lh)) {
  .browser-note[hidden] { display: block; }
}
.browser-note { padding-block: var(--sp-4) 0; }

/* Notices */
.notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-1) var(--sp-1); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--st-neutral-bg); color: var(--text); border: 1px solid var(--line); }
.notice::before { content: "i"; content: "i" / ""; grid-row: span 2; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--st-neutral-fg); color: var(--bg); font-weight: 800; font-size: 13px; }
.validation-summary-errors::before { content: "\2715"; content: "\2715" / ""; grid-row: span 2; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--st-bad-fg); color: var(--bg); font-weight: 800; font-size: 13px; }
.notice__title { font-weight: 700; }
.notice__body { grid-column: 2; }
/* A link that stands alone (the only link of a notice body or of a fact, or marked .solo-link) is a 24px target
   (WCAG 2.5.8); a link inside a sentence keeps its line. */
.notice__body > a:only-child:not(.btn), .facts dd > a:not(.btn), .solo-link { display: inline-flex; align-items: center; min-height: 24px; max-width: 100%; overflow-wrap: anywhere; }
/* In a form field (a column) a standalone link is as wide as its words, not the whole field. */
.field > .solo-link { align-self: flex-start; }
.notice--info { background: var(--st-done-bg); }
.notice--info::before { background: var(--st-done-fg); }
.notice--warn { background: var(--st-warn-bg); }
.notice--warn::before { content: "!"; content: "!" / ""; background: var(--st-warn-fg); }
.notice--bad { background: var(--st-bad-bg); }
.notice--bad::before { content: "\2715"; content: "\2715" / ""; background: var(--st-bad-fg); }
.notice--ok { background: var(--st-ok-bg); }
.notice--ok::before { content: "\2713"; content: "\2713" / ""; background: var(--st-ok-fg); }
/* Public parts (plan past-tournaments-entries-only, decision 6): the overview notice of a tournament whose entries, draw
   or results are not shown. A panel with a left accent bar and no symbol: a note, not an alert. */
.notice--part { grid-template-columns: minmax(0, 1fr); margin-bottom: var(--sp-4); background: var(--surface); border-left: 6px solid var(--st-done-fg); }
.notice--part::before { content: none; }
.notice--part .notice__body { grid-column: 1; color: var(--text-2); }
.notice--part p { margin: 0; }

/* ============ Dialogs ============
   A native <dialog class="dialog"> opened by a button with data-dialog-open="id" (js/sb/portal.js), and the confirm
   dialog that confirm-dialog.js builds (dialog.confirm-dialog with h2.confirm-title, p.confirm-question and
   .form-actions). A danger question has the danger confirm button; its title takes the danger colour too. */
.dialog, .confirm-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-xl); background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); }
.dialog::backdrop, .confirm-dialog::backdrop { background: var(--overlay); }
.dialog form { margin: 0; }
.dialog__body { padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-1); }
.dialog__title, .confirm-dialog .confirm-title { font: 800 var(--fs-d1)/1.05 var(--font-display); text-transform: uppercase; }
.dialog__actions, .confirm-dialog .form-actions { display: flex; justify-content: flex-end; gap: var(--sp-1); padding: var(--sp-4) var(--sp-6); background: var(--surface-2); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.dialog--danger .dialog__title, .confirm-dialog:has(.button-danger) .confirm-title { color: var(--st-bad-fg); }
.confirm-dialog .confirm-title { margin: 0; padding: var(--sp-6) var(--sp-6) 0; }
.confirm-dialog .confirm-question { margin: 0; padding: var(--sp-3) var(--sp-6) var(--sp-6); color: var(--text-2); overflow-wrap: anywhere; }
/* Guide walkthrough F86 (mockup state C): the details of one question under it (data-confirm-details), for example the
   linked categories and the results a draw lock clears: a heading and a list per group. */
.confirm-dialog .confirm-details { margin: 0; padding: 0 var(--sp-6) var(--sp-6); display: flex; flex-direction: column; gap: 12px; overflow-wrap: anywhere; }
.confirm-dialog .confirm-details[hidden] { display: none; }
.confirm-dialog .confirm-details h3 { margin: 0 0 4px; font-size: var(--fs-md); }
.confirm-dialog .confirm-details ul { margin: 0; padding-left: 18px; color: var(--text-2); }
.confirm-dialog .confirm-details li { margin: 2px 0; }
@media (max-width: 760px) {
  .dialog__actions, .confirm-dialog .form-actions { flex-direction: column-reverse; }
  .dialog__actions .btn, .confirm-dialog .form-actions button { width: 100%; }
}

/* ============ Surfaces and lists ============ */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); }
.panel__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-1) var(--sp-2); margin-bottom: var(--sp-4); }
.panel__head--flush { margin-bottom: 0; }
.panel__title { font: 800 var(--fs-xl)/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-1) var(--sp-2); margin-bottom: var(--sp-3); }
.section-head > :first-child { flex: 1 1 320px; min-width: 0; }
.section-head--end { align-items: flex-end; }
.section-head--ruled { border-bottom: 1px solid var(--line); margin-bottom: 0; }
.section-head > .tabs { flex: 1 1 auto; min-width: 0; }
.section-head > .filter-bar--inline { flex: 0 1 420px; padding-bottom: var(--sp-2); }

/* Rows separated by hairline gaps: tournament list, deadlines, club lists */
/* No overflow clip, so the focus ring of a row link stays whole; the first and last rows round their own corners. */
.rows { display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); }
.rows > * { background: var(--surface); }
.rows > :first-child, .rows > :first-child > .row-link { border-top-left-radius: calc(var(--r-lg) - 1px); border-top-right-radius: calc(var(--r-lg) - 1px); }
.rows > :last-child, .rows > :last-child > .row-link { border-bottom-left-radius: calc(var(--r-lg) - 1px); border-bottom-right-radius: calc(var(--r-lg) - 1px); }
.row-link { display: block; color: var(--text); text-decoration: none; }
.row-link:hover { background: var(--surface-2); color: var(--text); }

.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--sp-1) var(--sp-2); margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.facts--tiles { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.facts--tiles > div { flex: 1 1 160px; padding: var(--sp-3) var(--sp-4); background: var(--surface); }
.facts--tiles dt { font: 700 var(--fs-xs)/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.facts--tiles dd { margin: 4px 0 0; font-weight: 700; font-size: var(--fs-lg); }

.empty { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); padding: var(--sp-10) var(--sp-6); text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty__title { font: 800 var(--fs-xl)/1 var(--font-display); text-transform: uppercase; color: var(--text); }
.skeleton { display: block; height: 1em; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }

/* Progress: a native <progress class="progress"> (done of total) or <meter>, so no width needs a style attribute. */
.progress { display: block; width: 100%; height: 4px; border: 0; border-radius: 2px; background: var(--surface-3); color: var(--text); overflow: hidden; appearance: none; }
.progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 2px; }
.progress::-webkit-progress-value { background: var(--text); border-radius: 2px; }
.progress::-moz-progress-bar { background: var(--text); border-radius: 2px; }
.progress--done::-webkit-progress-value { background: var(--st-ok-fg); }
.progress--done::-moz-progress-bar { background: var(--st-ok-fg); }
meter.progress::-webkit-meter-bar { background: var(--surface-3); border: 0; border-radius: 2px; }
meter.progress::-webkit-meter-optimum-value { background: var(--text); }
meter.progress::-moz-meter-bar { background: var(--text); }

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.table caption { padding: var(--sp-3) var(--sp-4); text-align: left; }
.table th { padding: var(--cell-py) var(--cell-px); background: var(--surface-2); color: var(--muted); font: 700 var(--fs-xs)/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; text-align: left; white-space: nowrap; }
.table td { padding: var(--cell-py) var(--cell-px); border-top: 1px solid var(--line); vertical-align: middle; }
/* Guide walkthrough F165 (Marko, 2026-10-25): the hover marks the whole row, its row header too (the club, competitor or
   category cell of the statistics and ranking tables). Its weight beats .ranking-table th[scope="row"] and
   .draw .table th[scope="row"], which clear the header's fill; a group head (scope="rowgroup") keeps its own look. */
.table tbody tr:hover td, .table tbody tr:hover th[scope="row"] { background: var(--brand-tint-2); }
.table .num, .table td.r, .table th.r { text-align: right; }
.table th[aria-sort] button { all: unset; display: inline-flex; gap: 3px; cursor: pointer; }
.table th[aria-sort] button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.table th[aria-sort] button::after { content: "\2195"; content: "\2195" / ""; color: var(--faint); }
.table th[aria-sort="ascending"] button::after { content: "\25B2"; content: "\25B2" / ""; color: var(--text); }
.table th[aria-sort="descending"] button::after { content: "\25BC"; content: "\25BC" / ""; color: var(--text); }
.table tr.is-mine td { background: var(--brand-tint-2); }
.grid-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-1); padding: var(--sp-3) 0; color: var(--muted); font-size: var(--fs-sm); }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); }
/* Only the pager's own links and spans: the arrows hold an aria-hidden glyph and an sr-only word. */
.pager > a, .pager > span { display: inline-grid; place-items: center; min-width: var(--tap); height: var(--tap); padding: 0 var(--sp-3); border-radius: var(--r-md); color: var(--text); text-decoration: none; font-weight: 600; }
.pager > a:hover { background: var(--surface-2); }
.pager [aria-current="page"] { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--control-border); font-weight: 800; }
.pager [aria-disabled="true"] { color: var(--faint); pointer-events: none; }
.page-size { display: inline-flex; align-items: center; gap: var(--sp-1); }
.page-size .select { width: auto; min-height: 40px; }
/* Stacked table on phones: add .table--stack and data-label="..." on every td */
@media (max-width: 760px) {
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); }
  .table--stack td { display: flex; justify-content: space-between; gap: var(--sp-2); padding: 4px 0; border: 0; }
  .table--stack td::before { content: attr(data-label); color: var(--muted); font-size: var(--fs-sm); }
  .table--stack td[data-label=""]::before { content: none; }
  .table--stack td.primary { font-weight: 700; font-size: var(--fs-lg); }
}

/* Documents table (Views/Shared/Sb/_DocumentsTable.cshtml) */
.documents td.documents__title { font-weight: 600; overflow-wrap: anywhere; }
.documents td.documents__action { text-align: right; white-space: nowrap; }
/* A panel whose content is a table: the table runs to the panel edges under the panel head. */
.panel--table { padding: 0; }
.panel--table > .panel__head { padding: var(--sp-5) var(--sp-5) 0; }
.panel--table .table-wrap { border: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); background: transparent; }

/* Rich text: the cleaned tournament description (spec 5, section 9). The palette and size classes are the ones the
   description editor writes; the colours are tokens with a light and a dark value. A long word or address wraps, so a
   phone page never scrolls sideways. */
.rich-text { max-width: 70ch; overflow-wrap: anywhere; }
.rich-text > :first-child { margin-top: 0; }
.rich-text p, .rich-text ul, .rich-text ol { margin: 0 0 var(--sp-3); }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text img { height: auto; }
.rich-text .ql-color-red { color: var(--palette-red); }
.rich-text .ql-color-orange { color: var(--palette-orange); }
.rich-text .ql-color-amber { color: var(--palette-amber); }
.rich-text .ql-color-green { color: var(--palette-green); }
.rich-text .ql-color-teal { color: var(--palette-teal); }
.rich-text .ql-color-blue { color: var(--palette-blue); }
.rich-text .ql-color-indigo { color: var(--palette-indigo); }
.rich-text .ql-color-purple { color: var(--palette-purple); }
.rich-text .ql-color-pink { color: var(--palette-pink); }
.rich-text .ql-color-slate { color: var(--palette-slate); }
.rich-text .ql-size-small { font-size: var(--fs-sm); }
.rich-text .ql-size-large { font-size: var(--fs-lg); }
.rich-text .ql-size-huge { font-size: var(--fs-xl); }

/* ============ Tournament overview (Views/Tournaments/PublicDetail.cshtml) ============ */
/* Guide walkthrough F21, layout A. On a wide screen two columns: the main column (2/3) with the key facts, "About the
   tournament" and the rich text sections, and the side column (1/3) with the poster and the documents. Without a side
   column (.has-side is missing) the main column takes the full width. On a phone one column in the order facts, poster,
   the other sections, documents: both columns give their parts to the page grid (display: contents) and each part takes
   its place with order. The cover is always the whole picture (never object-fit: cover). */
.tournament-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.tournament-overview__main, .tournament-overview__side { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); align-content: start; min-width: 0; }
.tournament-cover { margin: 0; }
.tournament-cover img { display: block; width: auto; height: auto; max-width: 100%; max-height: 640px; border-radius: var(--r-lg); }
/* The "Details" link of the entry fee tile stands alone in its tile: a 24px target, and 44px with a touch pointer, as
   every standalone link of the public portal (the .facts rule does not reach the tiles list). */
.tournament-facts .facts--tiles dd > a:not(.btn) { display: inline-flex; align-items: center; min-height: 24px; max-width: 100%; overflow-wrap: anywhere; font-size: var(--fs-md); }
@media (pointer: coarse) { .tournament-facts .facts--tiles dd > a:not(.btn) { min-height: var(--tap); } }
@media (min-width: 1101px) {
  .tournament-overview.has-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .tournament-overview__main, .tournament-overview__side { display: contents; }
  .tournament-overview .tournament-facts { order: 1; }
  .tournament-overview .tournament-cover { order: 2; }
  .tournament-overview .tournament-about, .tournament-overview .tournament-section { order: 3; }
  .tournament-overview .tournament-documents { order: 4; }
}
/* Guide walkthrough F21: the switch between the categories and the fights of the Draw tab. */
.draw-switch { justify-self: start; }
.draw-switch-row { padding-top: var(--sp-4); }
/* Guide walkthrough F103 (round-17/f103-mockups, third mockup): the Schedule tab (Views/Tournaments/PublicTimetable.cshtml
   and js/sb/timetable.js). A warning box in the warn status pair (at least 4.5:1 in both themes); the day choice and the
   category search; per day panel its blocks (a heading bar in the level 1 tint) and breaks (a dashed line); inside a
   block the areas in two columns (one column up to 760px), each with its heading, the bracket note in the warn colour and
   a table of its categories. The first fight number sits in a muted box like the number of a draw fight. A search match
   is marked in the warn tint with a line under it. Up to 760px the day panel and the cells are tighter and the column
   heads and the fight counts may wrap, so the table always fits its area at 320px (nothing is cut off). */
.timetable-warning { padding: var(--sp-3) var(--sp-4); border: 1px solid var(--st-warn-fg); border-left-width: 6px; border-radius: var(--r-md); background: var(--st-warn-bg); color: var(--st-warn-fg); font-size: var(--fs-md); overflow-wrap: anywhere; }
.timetable-warning strong { font-weight: 800; }
.timetable-picker { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); }
.timetable-picker__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); }
.timetable-picker__label { min-width: 90px; color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.seg.timetable-days { display: inline-flex; flex-wrap: wrap; max-width: 100%; }
.seg.timetable-days > a { white-space: normal; text-align: center; }
.timetable-search { flex: 1 1 280px; width: auto; min-width: 0; }
.timetable-found { color: var(--text-2); font-weight: 700; }
.timetable-nomatch { margin: 0; color: var(--muted); text-align: center; }
.timetable-periods { display: flex; flex-direction: column; gap: var(--sp-2); }
.timetable-break { margin: 0; padding: var(--sp-2) var(--sp-3); border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); color: var(--muted); font-size: var(--fs-sm); }
.timetable-block { border: 1px solid var(--line); border-radius: var(--r-lg); }
.timetable-block__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); margin: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--tree-lv1-bg); box-shadow: inset 4px 0 0 var(--tree-lv1-bar); font: 600 var(--fs-md)/1.3 var(--font-body); }
.timetable-block__name { font: 800 var(--fs-lg)/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.timetable-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.timetable-area { min-width: 0; border-top: 1px solid var(--line); }
.timetable-area:nth-child(-n+2) { border-top: 0; }
.timetable-area:nth-child(2n) { border-left: 1px solid var(--line); }
.timetable-area__head { margin: 0; padding: var(--sp-2) var(--sp-3) var(--sp-1); border-bottom: 2px solid var(--text); font: 800 var(--fs-md)/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.timetable-area__approx { display: inline; color: var(--st-warn-fg); font: 600 var(--fs-sm)/1.3 var(--font-body); text-transform: none; letter-spacing: 0; }
.timetable-area__none { margin: 0; padding: var(--sp-2) var(--sp-3); }
.timetable { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.timetable th { padding: var(--sp-1) var(--sp-3); background: var(--surface-2); color: var(--muted); font: 700 var(--fs-xs)/1.2 var(--font-body); letter-spacing: .04em; text-transform: uppercase; text-align: left; white-space: nowrap; }
.timetable td { padding: var(--sp-1) var(--sp-3); border-top: 1px solid var(--line); vertical-align: baseline; }
.timetable th.r, .timetable td.r { text-align: right; }
.timetable__start, .timetable__number, .timetable__fights { width: 1%; white-space: nowrap; }
.timetable__name { overflow-wrap: anywhere; }
.timetable__fights { color: var(--muted); }
.timetable-fno { display: inline-grid; place-items: center; min-width: 2.2em; height: 19px; padding: 0 var(--sp-1); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface-3); color: var(--text); font: 800 var(--fs-xs)/1 var(--font-body); font-variant-numeric: tabular-nums; }
.timetable-hit { background: var(--st-warn-bg); color: var(--text); box-shadow: inset 0 -2px 0 var(--st-warn-fg); border-radius: 2px; }
/* Forced colours drop the tints and the inset line: the warning box keeps its own border and its words, and a search
   match is drawn in the system mark colours with a solid underline (forced-colors-chips.test.cjs names both). */
@media (forced-colors: active) {
  .timetable-warning { border-color: CanvasText; }
  .timetable-hit { forced-color-adjust: none; background: Mark; color: MarkText; text-decoration: underline 2px; }
}
@media (max-width: 760px) {
  .timetable-picker__label { min-width: 0; width: 100%; }
  .timetable-areas { grid-template-columns: minmax(0, 1fr); }
  .timetable-area:nth-child(2) { border-top: 1px solid var(--line); }
  .timetable-area:nth-child(2n) { border-left: 0; }
  .panel.timetable-day { padding: var(--sp-3); }
  .timetable th { white-space: normal; letter-spacing: 0; overflow-wrap: anywhere; }
  .timetable th, .timetable td { padding-left: var(--sp-1); padding-right: var(--sp-1); }
  .timetable__fights { white-space: normal; }
}

/* ============ Tournament list ============ */
.month { margin-top: var(--sp-8); }
.month__head { display: flex; align-items: baseline; gap: var(--sp-1); margin-bottom: var(--sp-3); }
.month__name { font: 800 var(--fs-d2)/1 var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.t-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 180px 250px 200px; gap: var(--sp-3); align-items: center; padding: var(--sp-4) var(--sp-6); }
.t-row__date { display: flex; flex-direction: column; line-height: 1; }
.t-row__day { font: 700 2.625rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.t-row__wd { margin-top: 4px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
/* A tournament of several days: the first and last day ("24-25") in a smaller size, so both fit the date column. */
.t-row__date--range .t-row__day { font-size: 2rem; }
.t-row__date--range .t-row__wd { line-height: 1.2; white-space: nowrap; }
/* A range across two months ("31.03-01.04"): smaller again; on a phone it may break after the hyphen. */
.t-row__date--months .t-row__day { font-size: 1.375rem; }
.t-row__main { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.t-row__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.t-row__name { display: block; font-size: var(--fs-xl); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.t-row__place, .t-row__dates { display: block; color: var(--muted); margin-top: 4px; }
/* The poster is a button that enlarges it (js/sb/poster-zoom.js). It sits above the row link (z-index 1, like the tab
   links), so a click on it never opens the tournament. On hover or keyboard focus a dark veil with a magnifier fades in
   over the thumbnail (.t-row__lens) and the hover adds a brand outline. */
.t-row__cover { position: relative; z-index: 1; display: block; flex: none; width: 72px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; cursor: zoom-in; outline: 2px solid transparent; outline-offset: 3px; transition: outline-color var(--dur) var(--ease); }
.t-row__cover img { width: 100%; height: auto; border-radius: var(--r-sm); }
.t-row__cover:hover { outline-color: var(--brand-line); }
.t-row__cover:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; transition: none; }
.t-row__lens { position: absolute; inset: 0; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--poster-lens-veil); color: var(--poster-lens-ink); opacity: 0; transition: opacity var(--dur) var(--ease); }
.t-row__lens svg { width: 26px; height: 26px; }
.t-row__cover:hover .t-row__lens, .t-row__cover:focus-visible .t-row__lens { opacity: 1; }
.t-row__stats, .t-row__deadline { color: var(--muted); line-height: 1.4; }
.t-row__stats b, .t-row__deadline b { color: var(--text); }
.t-row__state { justify-self: end; }
/* Guide walkthrough F160 (option C): a completed row. The name is the row's link and covers the row (no link inside a
   link); the size and the three tab links take the place of the entry deadline and the state badge. The upcoming row
   (t-row--upcoming) works the same way, with its own columns (the deadline and the badge): the poster button needs a row
   that is no link as a whole. */
.t-row--done, .t-row--upcoming { position: relative; border-radius: inherit; }
.t-row--done { grid-template-columns: 120px minmax(0, 1fr) 180px 220px auto; }
.t-row--done:has(.t-row__link:hover), .t-row--upcoming:has(.t-row__link:hover) { background: var(--surface-2); }
.t-row__link { min-height: 24px; color: var(--text); text-decoration: none; }
.t-row__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.t-row__link:hover { color: var(--text); text-decoration: underline; }
.t-row__size { color: var(--muted); line-height: 1.4; }
.t-row__size b { color: var(--text); }
.t-row__links { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
/* The enlarged poster of the list (js/sb/poster-zoom.js): one native dialog, full window, a dark backdrop. The picture
   grows from its thumbnail (the script animates it); a click anywhere in the dialog, Esc or the round button closes it. */
.poster-zoom { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; }
.poster-zoom::backdrop { background: var(--poster-backdrop); }
.poster-zoom[open] { display: grid; place-items: center; }
.poster-zoom__figure { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); margin: 0; padding: var(--sp-6); }
.poster-zoom__img { display: block; width: auto; height: auto; max-width: min(92vw, 820px); max-height: calc(100vh - 140px); border-radius: var(--r-md); box-shadow: var(--poster-shadow); cursor: zoom-out; transform-origin: top left; }
.poster-zoom__caption { color: var(--poster-caption-ink); text-align: center; }
.poster-zoom__name { display: block; font: 700 var(--fs-d1)/var(--lh-tight) var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.poster-zoom__place { color: var(--poster-caption-muted); font-size: var(--fs-sm); }
.poster-zoom__close { position: fixed; top: var(--sp-4); right: var(--sp-4); display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border: 1px solid var(--poster-close-border); border-radius: var(--r-pill); background: var(--poster-close-bg); color: var(--poster-close-ink); cursor: pointer; }
.poster-zoom__close:hover { background: var(--poster-close-bg-hover); }
.poster-zoom__close svg { width: 20px; height: 20px; }
.poster-zoom.is-shown::backdrop { animation: poster-zoom-veil 220ms var(--ease); }
@keyframes poster-zoom-veil { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .t-row__cover, .t-row__lens { transition: none; }
  .poster-zoom.is-shown::backdrop { animation: none; }
}
@media (max-width: 1100px) {
  .t-row { grid-template-columns: 100px minmax(0, 1fr) 220px; }
  .t-row__stats { display: none; }
  .t-row__state { grid-column: 3; }
  .t-row__deadline { grid-column: 2; }
  .t-row--done { grid-template-columns: 100px minmax(0, 1fr) auto; }
  .t-row--done .t-row__size { grid-column: 2; }
  .t-row--done .t-row__links { grid-column: 3; grid-row: 1 / span 2; }
  /* Public parts: a size cell left empty (Draws not shown) takes no row here. */
  .t-row--done .t-row__size:empty { display: none; }
}
@media (max-width: 760px) {
  .t-row { grid-template-columns: 60px minmax(0, 1fr); gap: var(--sp-1) var(--sp-1); padding: var(--sp-4); align-items: start; }
  .t-row__date { grid-row: span 4; }
  .t-row__day { font-size: 1.875rem; }
  .t-row__date--range .t-row__day { font-size: 1.25rem; }
  .t-row__date--range .t-row__wd { font-size: var(--fs-xs); letter-spacing: 0; }
  .t-row__date--months .t-row__day { font-size: 1.125rem; }
  .t-row__name { font-size: var(--fs-lg); }
  .t-row__main { gap: var(--sp-3); }
  .t-row__cover { width: 48px; }
  .t-row__stats { display: block; font-size: var(--fs-sm); }
  /* Public parts: a count cell left empty (Entries not shown) takes no row on a phone. */
  .t-row__stats:empty { display: none; }
  .t-row__deadline { grid-column: 2; font-size: var(--fs-sm); }
  .t-row__state { grid-column: 2; justify-self: start; margin-top: var(--sp-1); }
  .t-row--done { grid-template-columns: 60px minmax(0, 1fr); }
  .t-row--done .t-row__size { grid-column: 2; font-size: var(--fs-sm); }
  .t-row--done .t-row__links { grid-column: 2; grid-row: auto; justify-content: flex-start; margin-top: var(--sp-1); }
  /* Touch targets of 44 px on a phone. */
  .t-row__links .btn { min-height: 44px; }
  .month__name { font-size: var(--fs-d1); }
}

/* ============ Schedule periods ============ */
.periods { display: flex; gap: var(--sp-1); flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.period { flex: 1 1 200px; padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.period__name { font-weight: 700; }
.period__time { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.period[aria-current="true"] { border-color: var(--brand); background: var(--brand-tint-2); }
.period__now { color: var(--brand-text); }
.period.is-done .period__name::after { content: " \2713"; content: " \2713" / ""; color: var(--muted); }

/* ============ Fights (schedule rows, cards on a phone) ============
   Guide walkthrough round 31 (Marko, 2026-10-26, mockup round-31/mockups/f174.html Prijedlog + Rezultat A + Pobjednik 3,
   phone P2 + Kartica K2):
   - F174 B: the legend of the list (.fights-legend) is at body size in the text colour with 12px dots; the shared .legend
     of the draw keeps its size.
   - F174 C: the wide row has the columns number 110px, area 76px, block 180px, category 1 part, competitors 2 parts and
     result 118px; number and area are centred, block and category left, the table text at body size. A fight with two
     sides is a duel (.fight__sides--duel): the upper colour left, a small "vs", the lower colour right aligned, each side
     its name and club on two lines that wrap. The winner side has the green fill, a thin green frame and the crown
     (F177, region "Winner crown and draw icon"); the loser is faded. The result chip shows the short win type name.
   - On a phone (760px and below) each fight is a card 18px apart with a stronger frame, a shadow, a darker head and a 4px
     brand bar on top; the two sides stay side by side (about 150px each at 390px) and their names wrap.
   - F178: the category name is text; the draw icon link after it (.draw-icon-link, 24px, 44px on touch) opens the draw. */
.fight-list { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.fight-list__head, .fight { display: grid; grid-template-columns: 110px 76px 180px minmax(0, 1fr) minmax(0, 2fr) 118px; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-5); }
.fight-list__head { background: var(--surface-2); color: var(--muted); font: 700 var(--fs-xs)/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.fight-list__head > :nth-child(-n+2) { text-align: center; }
.fight { border-top: 1px solid var(--line); color: var(--text); }
.fight.is-mine { background: var(--brand-tint-2); }
.fight.is-live { box-shadow: inset 4px 0 0 var(--st-live-dot); }
.fight__area { color: var(--text); text-align: center; font: 700 1.375rem/1 var(--font-display); }
.fight__cat { min-width: 0; color: var(--text-2); font-size: var(--fs-md); line-height: 1.3; overflow-wrap: anywhere; }
.fight__cat .draw-icon-link { margin-left: 2px; }
.fight__time { font-weight: 600; font-variant-numeric: tabular-nums; }
.fight__sides { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fight__result { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.fight__note { font-size: var(--fs-sm); color: var(--st-warn-fg); font-weight: 600; }
.fight__note::before { content: "\21C4 "; content: "\21C4 " / ""; }
.fight__when { display: none; }
.side { display: flex; align-items: center; gap: var(--sp-1); min-width: 0; border-radius: var(--r-sm); }
/* The ring (3:1) keeps a white contest colour visible in light and a near-black one in dark, as .result-swatch did. */
.side__dot { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--contest-a); box-shadow: 0 0 0 1px var(--control-border); }
.side--b .side__dot, .side__dot--b { background: var(--contest-b); }
.side__name { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.side__club { font-size: var(--fs-sm); color: var(--muted); }
.side.is-mine .side__club { color: var(--brand-text); font-weight: 600; }
.side--win .side__name { font-weight: 700; }
.side--win .side__name::after { content: " \2713"; content: " \2713" / ""; color: var(--win); }
.side--lose .side__name { color: var(--faint); }
.side--tbd .side__name { color: var(--muted); font-style: italic; }
.side.is-hl { outline: 2px solid var(--brand); outline-offset: 2px; background: var(--brand-tint); }
[data-competitor] { cursor: pointer; }
/* The duel of the list (F174 C, Pobjednik 3). The second side mirrors the first: its dot at the right edge, its text right
   aligned and its crown next to "vs". A score or an out-of-draw mark takes a line of its own under the name. */
.fight__sides--duel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: var(--sp-2); }
.fight__vs { align-self: center; color: var(--muted); font: 700 var(--fs-sm)/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.fight__sides--duel > .side { align-items: flex-start; flex-wrap: wrap; gap: 2px var(--sp-1); padding: 6px 10px; border: 1px solid transparent; border-radius: var(--r-sm); }
.fight__sides--duel > .side ~ .side { flex-direction: row-reverse; text-align: right; }
.fight__sides--duel .side__dot { margin-top: .35em; }
.fight__sides--duel .side__text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.fight__sides--duel .side__name { font-weight: 600; }
.fight__sides--duel .side__club { overflow-wrap: anywhere; }
.fight__sides--duel > .side > :is(.side__score, .side__mark) { order: 1; flex-basis: 100%; margin-left: 0; padding-inline-start: calc(10px + var(--sp-1)); }
.fight__sides--duel > .side ~ .side > :is(.side__score, .side__mark) { padding-inline: 0 calc(10px + var(--sp-1)); }
.fight__sides--duel > .side > .side__crown { margin-left: 0; }
/* The thin green frame of the winner side is 75% of --win-line (the mockup had 45%): a side is a focus target, so its
   frame needs 3:1 against the row or card behind it, also on my fight's brand tint (3.3:1 or more in both themes). */
.fight__sides--duel > .side--win { background: var(--win-bg); border-color: color-mix(in srgb, var(--win-line) 75%, transparent); }
.fight__sides--duel > .side--win .side__name { color: var(--text); font-weight: 700; }
.fight__sides--duel > .side--win.is-mine { background: linear-gradient(var(--win-bg), var(--win-bg)), var(--brand-tint-2); }
.fight__sides--duel > .side--lose .side__name { color: var(--muted); font-weight: 500; }
@media (forced-colors: active) {
  .fight__sides--duel > .side--win { border-color: CanvasText; }
}
/* The legend of the list (F174 B), with the crown of the winner (F177). */
.fights-legend { align-items: center; gap: var(--sp-1) var(--sp-5); color: var(--text); font-size: var(--fs-md); }
.fights-legend > span { display: inline-flex; align-items: center; }
.fights-legend .side__dot { width: 12px; height: 12px; }
@media (max-width: 1100px) {
  .fight-list__head { display: none; }
  /* X-21 (live test fix round 14a): the category sits above the competitors, so the tab order (number, category,
     competitors) is the reading order. */
  .fight { grid-template-columns: 100px minmax(0, 1fr) 118px; grid-template-areas: "id meta result" "id sides result"; }
  .fight__id { grid-area: id; }
  .fight__area, .fight__time { display: none; }
  .fight__cat { grid-area: meta; }
  .fight__sides { grid-area: sides; }
  .fight__result { grid-area: result; }
}
@media (max-width: 760px) {
  /* Kartica K2: 18px between the cards, a stronger frame with a shadow, a darker head and a brand bar on top. My fight
     draws its whole frame, the bar too, in --brand-line: a state line keeps 3:1 against the page and the card for every
     brand, also one too dark for the dark theme. */
  .fight-list { border: 0; background: none; display: flex; flex-direction: column; gap: 18px; }
  .fight { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id result" "meta meta" "sides sides"; gap: 0; padding: 0; border: 1px solid var(--line-strong); border-top: 4px solid var(--brand); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1), var(--shadow-card); }
  .fight.is-mine { background: var(--surface); border-color: var(--brand-line); }
  .fight.is-live { border-color: var(--st-live-dot); border-top-color: var(--brand); box-shadow: var(--shadow-1), var(--shadow-card); }
  .fight.is-mine.is-live { border-top-color: var(--brand-line); }
  /* The line under the card head is the top line of the category row: the number in the head is a link, and a link
     draws no hairline of its own (accessibility sweep, edge contrast). */
  .fight__id { padding: var(--sp-2) var(--sp-3); background: var(--surface-3); display: flex; align-items: baseline; gap: var(--sp-1); }
  .fight__id .fight__when { display: inline; color: var(--text-2); font: 600 var(--fs-sm)/1.2 var(--font-body); }
  .fight__result { padding: var(--sp-2) var(--sp-3); background: var(--surface-3); align-items: flex-end; }
  .fight__result .fight__note { display: none; }
  .fight__sides { gap: 0; }
  .fight__sides .side { min-height: 52px; padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line); border-radius: 0; }
  .fight__sides .side.is-mine { background: var(--brand-tint-2); }
  .fight__sides .side__dot { width: 12px; height: 12px; }
  .fight__sides .side__text { display: flex; flex-direction: column; }
  .fight__sides .side__name { font-size: var(--fs-lg); }
  .fight__cat { display: block; padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line-strong); }
}

/* The Fights page (task T3, Views/Publication/Fights.cshtml): what the product shows beyond the hand-off row - the date
   and the block under the time, a seed, a side's labelled score, a dropout crossed out with its mark, a score rounds
   slot, notes that wrap, and the result dialog. The state and the notes are two parts of the result: on a phone the
   state stays in the card's top bar and the notes get a row of their own (the hand-off hid them there). */
.fight__id { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 1px var(--sp-1); min-height: 24px; color: var(--text); text-decoration: none; }
.fight__id:hover .fight__label { text-decoration: underline; }
.fight__label { white-space: nowrap; }
/* The time column of a wide row also shows the date and the block (F174 C: the block at body size). At 1100px and below
   the column is hidden (above), and the number link's .fight__when carries all of them. On a wide row the number and its
   time stand centred in their column, the time under the number. */
@media (min-width: 1101px) {
  .fight__time { display: flex; flex-direction: column; gap: 1px; }
  .fight__id { justify-self: center; flex-direction: column; align-items: center; text-align: center; }
  .fight__id .fight__label { font-size: 1.5rem; }
  .fight__id .fight__start { margin-left: 0; padding-left: 0; border-left: 0; }
}
.fight__date { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.fight__block { color: var(--text-2); font-size: var(--fs-md); font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.fight__slot { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; margin: 0; }
.fight__state .badge, .fight-dialog__state .badge { white-space: normal; text-align: left; }
.fight__notes { display: flex; flex-direction: column; gap: 1px; }
.side__seed { flex: none; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2); font-size: var(--fs-xs); font-weight: 700; }
.side__score { flex: none; margin-left: auto; color: var(--text-2); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.side__mark { flex: none; color: var(--st-warn-fg); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.side--out .side__name { text-decoration: line-through; }
/* A side with a tab stop is a 24px target and keeps the house focus ring, also while it is highlighted (focusing a side
   highlights its competitor, and .is-hl draws its own outline). */
.fight__sides .side[tabindex] { min-height: 24px; }
.side.is-hl:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.fight-dialog__sides { display: flex; flex-direction: column; gap: var(--sp-1); }
.fight-dialog .fight__note { margin: 0; }
/* The team detail rows of a public fight dialog (Views/Shared/Sb/_FightBouts.cshtml): one block per bout or performance. */
.fight-bouts { display: flex; flex-direction: column; gap: var(--sp-1); }
.fight-bouts .eyebrow, .fight-bouts__title, .fight-bouts__type { margin: 0; }
.fight-bouts__list { display: flex; flex-direction: column; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.fight-bouts__item { display: flex; flex-direction: column; gap: var(--sp-1); padding-top: var(--sp-2); border-top: 1px solid var(--line); }
.fight-bouts__title { font-weight: 600; }
.filter-bar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); }
@media (min-width: 1280px) { .filter-bar--fights { grid-template-columns: 150px 150px minmax(0, 1fr) 220px 140px 110px auto; } }
@media (min-width: 761px) and (max-width: 1100px) {
  .fight__id { flex-direction: column; align-items: flex-start; }
  .fight__id .fight__when { display: block; color: var(--muted); font: 600 var(--fs-sm)/1.2 var(--font-body); }
}
@media (pointer: coarse) { .fight__id { min-height: var(--tap); } }
/* The list and the phone cards do not clip their content, so a focus ring is never cut; the corner parts round
   themselves instead. */
.fight-list { overflow: visible; }
.fight-list__head { border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0; }
.fight:last-child { border-radius: 0 0 calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px); }
@media (max-width: 1100px) { .fight-list > .fight:nth-child(2) { border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0; } }
@media (max-width: 760px) {
  /* X-21 (live test fix round 14a): the category line comes right under the top bar, before the competitors, so the tab
     order (number, category, competitors) is the reading order. The last part of the card rounds its bottom corners. */
  .fight { overflow: visible; grid-template-areas: "id state" "meta meta" "sides sides" "notes notes"; }
  .fight-list > .fight:nth-child(2), .fight:last-child { border-radius: var(--r-lg); }
  .fight__cat { border-radius: 0; }
  .fight:not(:has(.fight__notes)) .fight__sides, .fight:not(:has(.fight__notes)) .fight__sides > :last-child, .fight__notes { border-bottom-left-radius: calc(var(--r-lg) - 1px); border-bottom-right-radius: calc(var(--r-lg) - 1px); }
  /* The lines between the stacked sides of a performance slot are the 1px gaps of their box: a side is focusable, so it
     draws no hairline of its own. */
  .fight__sides { gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
  .fight__sides .side, .fight__sides .fight__slot { border-top: 0; background: var(--surface); }
  .fight__sides .side.is-mine { background: linear-gradient(var(--brand-tint-2), var(--brand-tint-2)) var(--surface); }
  .fight__result { display: contents; }
  .fight__state { grid-area: state; display: flex; align-items: center; justify-content: flex-end; padding: var(--sp-2) var(--sp-3); background: var(--surface-3); }
  .fight__notes { grid-area: notes; padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line); }
  .fight__result .fight__note { display: block; }
  .fight__id { min-height: var(--tap); align-items: center; }
  .fight__sides .fight__slot { padding: var(--sp-2) var(--sp-3) 0; }
  /* Phone P2: the duel keeps its two sides next to each other inside the card, each about 150px wide at 390px. The two
     corner radii above do not reach the duel, whose sides are rounded boxes inside its padding. */
  .fight__sides--duel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; padding: var(--sp-2); background: var(--surface); }
  .fight__sides--duel > .side { min-height: 0; padding: 6px 8px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; }
  .fight:not(:has(.fight__notes)) .fight__sides--duel > :last-child { border-radius: var(--r-sm); }
  .fight__sides--duel > .side.is-mine { background: var(--brand-tint-2); }
  .fight__sides--duel > .side--win { background: var(--win-bg); border-color: color-mix(in srgb, var(--win-line) 75%, transparent); }
  .fight__sides--duel > .side--win.is-mine { background: linear-gradient(var(--win-bg), var(--win-bg)), var(--brand-tint-2); }
  .fight__sides--duel .side__name { font-size: var(--fs-md); }
  .fight__sides--duel .side__club { font-size: var(--fs-sm); }
  .fight__vs { font-size: var(--fs-xs); }
}

/* The PDF menu of a tournament head with its form (Views/Shared/Sb/_DrawPdfMenu.cshtml): the panel scrolls when the
   category list is long. On a wide screen the tab row lets the open panel hang below it (its sideways scroll is only
   needed on narrow screens, where the menu moves to the phone strip). */
.pdf-menu__panel { min-width: 280px; max-height: min(70vh, 560px); overflow: auto; }
.pdf-menu__form { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-2); }
@media (min-width: 1101px) { .tabs:has(> .tabs__end .menu) { overflow: visible; } }

/* ============ Bracket ============
   .bracket[data-css-vars="--rows:N"]: N is the number of matches in the first round. */
.legend { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); color: var(--muted); font-size: var(--fs-sm); }
.legend .side__dot { margin-right: 6px; vertical-align: middle; }
.legend__solid::before { content: ""; display: inline-block; width: 22px; border-top: 2px solid var(--connector-strong); vertical-align: middle; margin-right: 6px; }
.legend__dashed::before { content: ""; display: inline-block; width: 22px; border-top: 2px dashed var(--connector-strong); vertical-align: middle; margin-right: 6px; }

.bracket-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-sunken); padding: var(--sp-5); }
.bracket { --match-w: 270px; --match-h: 142px; --gap: 40px; --rows: 4; display: flex; gap: var(--gap); min-width: max-content; }
.round { display: flex; flex-direction: column; width: var(--match-w); }
.round__title { height: 30px; }
.round__body { display: flex; flex-direction: column; height: calc(var(--rows) * (var(--match-h) + 18px)); }
.pair { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
.round:not(:last-child) .pair::after { content: ""; position: absolute; top: 25%; bottom: 25%; right: calc(var(--gap) / -2); width: calc(var(--gap) / 2); border: 2px solid var(--connector-strong); border-left: 0; }
.round:not(:last-child) .pair::before { content: ""; position: absolute; top: 50%; right: calc(var(--gap) * -1); width: calc(var(--gap) / 2); border-top: 2px solid var(--connector-strong); }
.round:not(:last-child) .pair--single::after { top: 50%; bottom: auto; border-bottom: 0; border-right: 0; }
.round--final .round__body { position: relative; }
.round--final .bronze { position: absolute; left: 0; right: 0; bottom: 0; }
.bronze .eyebrow { margin-bottom: 8px; }
/* Live test P-59: the two shared third places right under the final card (the final sits in the middle of its column).
   A bracket of 4 has a short column, so its box keeps room below for them. On a phone they follow the final. */
.round--final .bronze--shared { top: calc(50% + var(--match-h) / 2 + var(--sp-4)); bottom: auto; }
.bracket.rows-2:has(.bronze--shared) { padding-bottom: 48px; }
.shared-bronze { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-1); }
.shared-bronze__place { display: flex; align-items: center; gap: var(--sp-1); min-width: 0; }
.shared-bronze__text { display: grid; min-width: 0; }
.shared-bronze__text .side__name, .shared-bronze__text .side__club { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.match { height: var(--match-h); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; color: var(--text); text-decoration: none; }
.match:hover { border-color: var(--line-strong); color: var(--text); }
.match__head a { color: inherit; text-decoration: none; }
.match__head a:hover { text-decoration: underline; }
.match__head { display: flex; justify-content: space-between; align-items: center; height: 28px; padding: 0 10px; background: var(--surface-2); font: 700 14px/1 var(--font-display); letter-spacing: .03em; }
.match__head time { color: var(--muted); font: 600 var(--fs-sm)/1 var(--font-body); }
.match .side { height: 44px; padding: 0 10px; border-top: 1px solid var(--line); border-radius: 0; }
.match .side__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.match .side__name, .match .side__club { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match .side__club { font-size: var(--fs-xs); }
.match .side.is-mine { background: var(--brand-tint-2); }
.match--live { border-color: var(--st-live-dot); }
.match--bronze { border-style: dashed; border-color: var(--connector-strong); }
.match__label { position: absolute; transform: translateY(-22px); font: 700 var(--fs-xs)/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* .round-tabs[data-round-tabs="boxId"]: the server sets --n to the number of rounds (data-css-vars). Live test P-77: a tab
   is never narrower than its words, so a row of many rounds (the 10 losers rounds of a 64 double elimination) scrolls
   inside itself and the page never scrolls sideways; js/sb/portal.js keeps the current tab in view. The row's 6px padding
   holds the focus ring of a tab (3px wide, 3px out), which the scrolling row would otherwise cut. */
.round-tabs { display: none; }
.next-hint { display: none; }
@media (max-width: 760px) {
  .bracket-box { margin-inline: calc(var(--page-pad) * -1); padding: 0; border: 0; border-radius: 0; background: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .bracket { --gap: 0px; gap: 0; }
  .round { width: 100vw; padding: 0 var(--page-pad); scroll-snap-align: start; }
  .round__title { display: none; }
  .round__body { height: auto; gap: var(--sp-1); }
  .pair { flex: none; gap: var(--sp-1); padding-right: 22px; }
  .round:not(:last-child) .pair::after { right: 4px; width: 14px; }
  .round:not(:last-child) .pair::before { display: none; }
  .round--final .bronze { position: static; margin-top: var(--sp-8); }
  .match { height: auto; }
  .match .side { min-height: 48px; }
  .round-tabs { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(max-content, 1fr)); gap: 1px; padding: 6px; scroll-padding-inline: 6px; margin-bottom: var(--sp-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); position: sticky; top: 92px; z-index: 5; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .round-tabs a { display: grid; place-items: center; min-width: var(--tap); min-height: var(--tap); padding-inline: var(--sp-2); border-radius: var(--r-md); color: var(--muted); font-weight: 600; text-decoration: none; font-size: var(--fs-sm); white-space: nowrap; }
  .round-tabs a[aria-current="true"] { background: var(--surface-3); color: var(--text); font-weight: 700; }
  .next-hint { display: block; margin: 0 0 var(--sp-4); padding: var(--sp-2) var(--sp-3); background: var(--surface-2); border-radius: var(--r-md); font-size: var(--fs-sm); color: var(--text-2); }
}

/* Group (round robin) table */
.rr td.rr__self { background: var(--surface-3); }
.rr td.rr__cell { text-align: center; font-weight: 700; width: 56px; }
.rr .rr__w { color: var(--st-ok-fg); }
.rr .rr__l { color: var(--faint); }
.rr .rr__d { color: var(--st-warn-fg); }
/* Live test P-71: the roster members of a team in a score round table, under the team name. */
.score-round__members { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }

/* ============ Club workspace ============ */
.deadline { display: grid; grid-template-columns: 130px minmax(0, 1fr) 110px auto; gap: var(--sp-2); align-items: center; padding: var(--sp-4) var(--sp-5); }
.deadline__left { font: 700 1.625rem/1 var(--font-display); }
.deadline__left small { display: block; margin-top: 4px; font: 500 var(--fs-xs)/1.2 var(--font-body); color: var(--muted); }
.deadline.is-urgent .deadline__left { color: var(--st-warn-fg); }
.deadline.is-closed .deadline__left { color: var(--faint); }
.deadline__name { display: block; font-weight: 600; font-size: var(--fs-lg); }
.deadline__count b { font: 700 1.375rem/1 var(--font-display); color: var(--text); }
@media (max-width: 760px) {
  .deadline { grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-1) var(--sp-1); padding: var(--sp-4); }
  .deadline__main { grid-column: 1 / -1; }
  .deadline .btn { grid-column: 1 / -1; margin-top: var(--sp-2); }
}
.todo { display: flex; flex-direction: column; gap: 3px; padding: var(--sp-4); }
.todo__title { font-weight: 600; font-size: var(--fs-lg); }
.todo__foot { display: flex; justify-content: space-between; gap: var(--sp-1); color: var(--muted); font-size: var(--fs-sm); }

/* Steps (entries) */
/* The steps wrap to a second line when a narrow column has no room for all of them (the three Croatian entry steps in a
   club entry builder at 375px), so the page never scrolls sideways. */
.steps { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: 0 0 var(--sp-4); padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: var(--sp-1); color: var(--muted); font-weight: 600; font-size: var(--fs-sm); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); font-weight: 700; }
.steps li[aria-current="step"] { color: var(--text); }
.steps li[aria-current="step"]::before { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.steps li.is-done::before { content: "\2713"; content: "\2713" / ""; background: var(--st-ok-bg); color: var(--st-ok-fg); border-color: transparent; }
.steps li + li::after { order: -1; content: ""; width: 24px; border-top: 1px solid var(--line-strong); }
/* A step that is a link back (club register step 2, the club merge wizard) is a target of at least 24px, and of the tap size on a touch screen, as the breadcrumbs. */
.steps li > a { display: inline-flex; align-items: center; min-height: 24px; }
@media (pointer: coarse) { .steps li > a { min-height: var(--tap); } }

.roster { display: flex; flex-direction: column; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.roster li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: var(--sp-1); align-items: center; }
.roster__n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md); background: var(--surface-3); font: 800 16px/1 var(--font-display); }

/* Auth pages */
.auth { display: grid; place-items: start center; padding: var(--sp-12) var(--page-pad); }
.auth__card { width: min(460px, 100%); padding: var(--sp-8); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); display: flex; flex-direction: column; gap: var(--sp-2); }
.auth__links { display: flex; flex-direction: column; gap: var(--sp-1); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.auth__links a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
/* Task T7: the heading block, the form and the note of the card (Views/Account). The card is the same in every portal;
   in the back-office shell the eye button of a password keeps the height of the dense input. */
.auth__head { display: flex; flex-direction: column; gap: var(--sp-1); }
.auth__form { display: flex; flex-direction: column; gap: var(--sp-2); }
.auth__form > .check { align-self: flex-start; }
/* A long Croatian action ("Pošalji poruku za obnovu lozinke") wraps on a 360px phone instead of widening the page. */
.auth .btn--block { white-space: normal; }
.auth__links .help { margin-top: var(--sp-2); }
@media (max-width: 760px) {
  .auth { padding: var(--sp-6) var(--page-pad); }
  .auth__card { padding: var(--sp-5); border: 0; background: none; }
}

/* Club access help, package P1: the "I am not a robot" check (Views/Shared/_HumanCheck.cshtml, the ALTCHA widget of
   vendor/altcha, which stays unchanged). The widget's own stylesheet is read after this one, so the portal look comes
   from its custom properties (set on the wrapper) and from selectors one class stronger than the widget's. The box and
   the tick box have the 3:1 edge of every control (--control-border), the box and its text follow the portal fill and
   text, the label row is as tall as a .check row (the label is part of the click target) and the focus ring is the
   house ring. */
.human-check {
  --altcha-color-base: var(--field-bg);
  --altcha-color-base-content: var(--text);
  --altcha-border-color: var(--control-border);
  --altcha-checkbox-border-color: var(--control-border);
}
.human-check .altcha-checkbox-wrap { min-height: var(--tap); }
.human-check .altcha-checkbox-wrap > label { align-self: stretch; flex: 1 1 auto; align-items: center; cursor: pointer; font-weight: 500; }
.human-check .altcha-checkbox input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* Contact form (Marko, 2026-10-25): the automatic mode of the check (.human-check--auto). The widget stays in the form,
   so its answer is posted, but it is not drawn; the quiet line says what the check does. The shield pulses while the
   check runs (not with reduced motion) and gets its tick when it is done. */
.human-check--auto altcha-widget { display: none; }
.auto-check { display: flex; align-items: center; gap: var(--sp-2); min-height: 28px; color: var(--muted); font-size: var(--fs-sm); }
.auto-check[hidden] { display: none; }
.auto-check__icon { flex: 0 0 auto; width: 18px; height: 18px; }
.auto-check__icon path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.auto-check__tick { opacity: 0; transition: opacity .25s; }
.auto-check[data-state="running"] { color: var(--text-2); }
.auto-check[data-state="running"] .auto-check__icon { animation: auto-check-pulse 1s ease-in-out infinite; }
.auto-check[data-state="done"] { color: var(--st-ok-fg); }
.auto-check[data-state="done"] .auto-check__tick { opacity: 1; }
.auto-check[data-state="error"] { color: var(--st-bad-fg); font-weight: 600; }
@keyframes auto-check-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .auto-check[data-state="running"] .auto-check__icon { animation: none; }
  .auto-check__tick { transition: none; }
}
/* The contact page (Views/Contact): a wider card than the sign-in pages, name and email side by side (one column on a
   phone), the message counter on the label row, the trap field off screen, and the privacy line. */
.auth__card.contact { width: min(560px, 100%); }
.contact__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
@media (max-width: 560px) { .contact__pair { grid-template-columns: 1fr; } }
.contact__pair > .field { min-width: 0; }
.contact__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.contact__count { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.contact__count--near { color: var(--st-bad-fg); font-weight: 600; }
.contact__trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.contact__privacy { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
/* Status pages (Views/Shared/StatusPage, ActionError, RequestDecided and Home/Error; task T11): one centred column
   with the large code (hidden from screen readers), the title, a line of help or a notice, and the actions. The code
   is large text, so --muted keeps it above 3:1 in both themes. */
.status-page { display: grid; place-items: center; min-height: 60vh; padding: var(--sp-12) var(--page-pad); text-align: center; }
.status-page__body { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); width: min(560px, 100%); }
.status-page__code { margin: 0; font: 800 7rem/1 var(--font-display); color: var(--muted); }
.status-page__title { margin: 0; font: 800 var(--fs-d3)/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.status-page__text { margin: 0; color: var(--muted); }
/* The form errors of the action error page: the danger box of .validation-summary-errors above, full width. */
.status-page__notice, .status-page__summary { width: 100%; text-align: start; }
.status-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-1); padding-top: var(--sp-2); }
@media (max-width: 760px) {
  .status-page { min-height: 0; padding-block: var(--sp-10); }
  .status-page__code { font-size: 4.5rem; }
  .status-page__title { font-size: 1.875rem; }
}

/* The club name suggestions of the club lookup box (Shared/Sb/_ClubLookup.cshtml, js/sb/club-lookup.js) and of the
   "Add membership" dialog (js/sb/user-detail.js): in the page or dialog flow, because a modal that scrolls would cut a
   floating list. Every option keeps the tap height; the option chosen with the arrow keys has the brand tint. Here and
   not in backoffice.css, because the public member page ("Send to another club", guide walkthrough F132) uses the box. */
.club-combo__list { display: flex; flex-direction: column; gap: 1px; max-height: 240px; overflow-y: auto; padding: var(--sp-1); border: 1px solid var(--control-border); border-radius: var(--r-md); background: var(--surface); }
.club-combo__option { display: flex; align-items: center; min-height: var(--tap); padding: 0 var(--sp-3); border-radius: var(--r-sm); cursor: pointer; overflow-wrap: anywhere; }
.club-combo__option:hover, .club-combo__option[aria-selected="true"] { background: var(--brand-tint); }
.club-combo__option[aria-selected="true"] { font-weight: 700; }

/* ============ Public redesign (spec 4): translucent surfaces over the photo of the public shell ============
   In the public shell only (the back office keeps the solid tokens), these surfaces let the photo (base.css) show
   through: the tournament head and the live strip under it, panels and table panels, the search panel, table wraps, the
   rows of a list (the rows carry the colour, see the row separator below), the bracket box, the pager with its count and
   the site footer; draw-tabs.css adds the draw card and the placings strip. :where() keeps the shell out of the weight, so a page rule of
   the same surface (.panel--table .table-wrap, the plain page head, a phone bracket box) still wins. A surface inside
   another one has no colour of its own when it had the same colour before (a table wrap in a panel).
   Stay solid: menus, dialogs, toasts and the poster zoom, notices and the check strip, selected chips and tabs, the
   bracket fight box (.match, C3) and the table header cells (also when they stick).
   The blur (spec 4.2) is drawn once per group: on a ::before layer behind the outermost surface of a group, never on a
   surface inside another one. A layer and not the surface itself, so the surface never becomes the box of a fixed part
   inside it (the phone sheet of a date picker, a selection bar) or a new layer over a menu of the part before it. */
:where(.shell--public) .page-head { background: var(--bg-sunken-glass); }
:where(.shell--public) .page-head--plain { background: none; }
:where(.shell--public) .live-strip { background: var(--surface-glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
:where(.shell--public) :is(.panel, .search-panel, .table-wrap) { background: var(--surface-glass); }
:where(.shell--public) :is(.panel, .search-panel, .rows) .table-wrap { background: transparent; }
/* The row separator: the solid list shows its own colour in the 1px gap between the rows; over the photo the list is
   clear, so every row has a clear 1px top border instead of the gap and the separator is a fill in it (the same image on
   every row, shown from the second row on). It stays a fill, as in the solid list, never a line of the row itself: a
   chosen row (the current club) has no line of its own, and the hover fill of a link in a row never covers it. The rows
   of the club waiting page are separate cards with no separator. */
:where(.shell--public) .rows { gap: 0; background: transparent; }
:where(.shell--public) .rows > * { border-top: 1px solid transparent; background-color: var(--surface-glass); background-image: linear-gradient(var(--line), var(--line)); background-origin: border-box; background-position: top; background-repeat: no-repeat; background-size: 100% 0; }
:where(.shell--public) .rows > * + * { background-size: 100% 1px; }
:where(.shell--public) .club-waiting .rows > * { background-image: none; }
/* The bracket box (the bracket panel, C3). Inside a draw card (draw-tabs.css, the blur group of the card) it only carries
   its translucent colour. Alone (the single draw page) it is a group of its own: it scrolls sideways, so a layer inside
   it would scroll away with the bracket, and it takes the blur itself, as the header does (nothing fixed lives inside a
   bracket). On a phone the box has no fill and so no blur. */
:where(.shell--public) .bracket-box { background: var(--bg-sunken-glass); }
:where(.shell--public) .bracket-box:not(:is(.page-head, .panel, .search-panel, .rows, .dcard) *) { -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
@media (max-width: 760px) {
  :where(.shell--public) .bracket-box { background: none; }
  :where(.shell--public) .bracket-box:not(:is(.page-head, .panel, .search-panel, .rows, .dcard) *) { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* Decision 2026-10-25 (spec 4.1): with the light fade of the mockup no text stands straight on the photo. The pager and
   the count beside it get a small rounded translucent surface each (not inside a panel, where the panel is the surface;
   an empty count draws nothing); shell.css gives the site footer one across the page. A count beside a heading (the
   draw count of the Draw tab, the count of a month and of the live group on the list) gets the same small surface; the
   large headings pass on their own (3:1). Over the light glass the disabled arrows of the pager take the muted colour,
   as the faint one stays under 4.5:1 there. */
:where(.shell--public) :is(.pager, .grid-foot > span:not(:empty)):not(:is(.page-head, .panel, .search-panel, .rows, .dcard) *) { padding: 6px 12px; border-radius: 10px; background: var(--surface-glass); }
:where(.shell--public) :is(.section-head, .month__head) > span.muted:not(:is(.page-head, .panel, .search-panel, .rows, .dcard) *) { padding: 2px 10px; border-radius: 10px; background: var(--surface-glass); }
:where(.shell--public) .pager [aria-disabled="true"] { color: var(--muted); }
/* The groups of spec 4.2: the outermost surface carries the one blur on its ::before layer. The draw card is the group of
   its bracket box and placings strip. */
:where(.shell--public :is(.page-head, .panel, .search-panel, .rows, .placings-strip, .dcard, .pager, .grid-foot > span:not(:empty), :is(.section-head, .month__head) > span.muted, .site-footer):not(.page-head--plain):not(:is(.page-head, .panel, .search-panel, .rows, .placings-strip, .dcard) *)) { position: relative; }
:where(.shell--public :is(.page-head, .panel, .search-panel, .rows, .placings-strip, .dcard, .pager, .grid-foot > span:not(:empty), :is(.section-head, .month__head) > span.muted, .site-footer):not(.page-head--plain):not(:is(.page-head, .panel, .search-panel, .rows, .placings-strip, .dcard) *))::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }

/* Print (PDF export uses the server; this keeps browser print usable) */
@media print { .tabs, .live-status, .live-strip, .filter-bar, .search-panel, .chips, .btn { display: none !important; } }

/* ============ Winner crown and draw icon (guide walkthrough round 31: F177, F178, F179) ============
   The crown (Views/Shared/Sb/_WinnerCrown.cshtml, Marko 2026-10-27, mockup round-31/mockups/f177.html V4 + Z5, bare
   green, no disc) is the one winner sign of every side that shows a winner: 19px in the win colour, never shrinking,
   at the right edge of its side. A winner side that holds the crown shows no check after its name (the check rule of
   the Fights region stays for any side without a crown). In the legend it stands before its word. In forced colours
   it takes the text colour. In a team bout row (Views/Shared/Sb/_FightBouts.cshtml) the score already stands at the right
   edge (margin-left: auto) and the crown follows it with no second auto margin; the loser row of a decided bout keeps a
   crown-wide empty slot after its score, so the two scores of a bout end in one column (F177 fix round 2). The draw icon
   (Views/Shared/Sb/_DrawIcon.cshtml) is 16px; a link that holds only the icon (draw-icon-link) is a 24px target with a
   mouse and 44px on a touch screen. */
.side__crown { flex: none; width: 19px; height: 19px; color: var(--win); }
.side .side__crown { margin-left: auto; }
.side .side__score ~ .side__crown { margin-left: 0; }
.fight-bouts .side--lose:has(> .side__score)::after { content: ""; flex: none; width: 19px; }
.side--win:has(.side__crown) .side__name::after { content: none; }
.legend .side__crown { margin-right: 6px; vertical-align: middle; }
.draw-icon { flex: none; width: 16px; height: 16px; }
.draw-icon-link { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; color: var(--brand-text); vertical-align: middle; }
.draw-icon-link:hover { color: var(--text); }
@media (pointer: coarse) {
  .draw-icon-link { min-width: var(--tap); min-height: var(--tap); }
}
@media (forced-colors: active) {
  .side__crown { color: CanvasText; }
  .draw-icon-link { color: LinkText; }
}
/* End region: winner crown and draw icon. */
