/* Hallmark · shape: Index-First · genre: editorial · theme: custom (design.md) · job: attend · idea: "Every event on one dated list, every category on its own scoreboard, every result book one click away." · vibe: "arena-dark, poster-loud, scoreboard-exact"
 * paper: oklch(98.5% 0.004 91.4) · accent: oklch(43.3% 0.178 29.2) · display: Barlow Condensed 800 · body: Inter · hero: poster, the lead story's photograph full-bleed with the head low-left; the live centre while a championship runs · nav: slab, a red bar on a yellow rule · footer: mast, the logo large over the offices · imagery: photographs, AWF's own · signature: the results desk, medals set like a scoreboard
 * axes: warm-paper/condensed-caps/red-yellow · posture: full palette · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V3 · weakest: V, these templates reuse the house event rows and medal table on purpose; the calendar leads with a live day counter and the results with weight-class plates so they do not echo the homepage desk; the results archives set each year as a giant numeral beside its books, and the entry desk is the page's one red band with the form framed on paper */
/* Hallmark · dismissed 58 · calendar rows, sixteen scoreboards and the result-book archive are records read like a fixture list, not prose */

/* ---------- Shared on these templates ---------- */
.cal-filter__input:focus-visible + .cal-filter__chip,
.hub-tab:focus-visible,
.rc-tab:focus-visible,
.hub-panel:focus-visible,
.rc-panel:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

/* ---------- Calendar ---------- */
.cal-head { padding-block: var(--space-3xl) var(--space-xl); }
.cal-head__inner { display: grid; gap: var(--space-lg); }
.cal-head__lead { color: var(--color-ink-2); }

/* On now, pinned above the list */
.cal-now { padding-block: var(--space-2xl); }
.cal-now__list { display: grid; gap: var(--space-xl); margin: 0; padding: 0; list-style: none; }
.cal-now__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-2xl); }
.cal-now__item + .cal-now__item { padding-top: var(--space-xl); border-top: 1px solid var(--color-arena-3); }
.cal-now__main { display: grid; justify-items: start; gap: var(--space-md); min-width: 0; }
.cal-now__name { max-width: 20ch; }
.cal-now__name a { color: inherit; text-decoration: none; }
.cal-now__name a:hover { text-decoration: underline; text-decoration-color: var(--color-mark); text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.cal-now__name a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
.cal-now__name a:active { color: var(--color-mark); }
.cal-now__meta { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); color: var(--color-on-arena-2); font-size: var(--text-lead); }
.cal-now__place { color: var(--color-on-arena); font-weight: 600; }
.cal-now__actions { padding-top: var(--space-xs); }
.cal-now__clock { display: grid; justify-items: end; margin: 0; text-align: right; line-height: 1; }
.cal-now__word, .cal-now__of { font: 800 var(--text-2xl)/1 var(--font-display); text-transform: uppercase; }
.cal-now__word { color: var(--color-on-arena-2); }
.cal-now__day { font: 800 var(--text-numeral)/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--color-yellow); }

/* Filters and key */
.cal-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-lg) var(--space-2xl); padding-block: var(--space-2xl) var(--space-xl); }
.cal-filter { min-width: 0; margin: 0; padding: 0; border: 0; }
.cal-filter__legend { margin-bottom: var(--space-xs); padding: 0; font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.cal-filter__chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.cal-filter__input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.cal-filter__chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-md); border: 1px solid var(--color-ink-2); border-radius: var(--radius-pill); font: 600 var(--text-sm)/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: transform var(--dur-micro) var(--ease-out); }
.cal-filter__chip:hover { border-color: var(--color-ink); background: var(--color-paper-2); }
.cal-filter__chip:active { transform: translateY(1px); }
.cal-filter__input:checked + .cal-filter__chip { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-paper); }
.cal-filter__input:disabled + .cal-filter__chip { opacity: 0.55; cursor: not-allowed; }
html:not(.js) .cal-filter { display: none; }
.cal-key { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-xl); margin-left: auto; }
.cal-count { font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-legend { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); margin: 0; }
.cal-legend div { display: flex; align-items: center; gap: var(--space-xs); }
.cal-legend dt { display: flex; }
.cal-legend dd { margin: 0; font-size: var(--text-sm); color: var(--color-ink-2); }

/* The list: sections, then months, then rows */
.cal-list { padding-bottom: var(--section-gap-s); }
.cal-section + .cal-section { margin-top: var(--section-gap-s); }
.cal-section__title { margin-bottom: var(--space-xl); }
.cal-month { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 10fr); gap: var(--space-2xl); border-top: 2px solid var(--color-ink); }
/* The month stays beside its rows just under the header, which stays on screen; its own 24px of padding keeps the
   name 24px below the yellow rule. */
.cal-month__title { position: sticky; top: calc(var(--masthead-top) + var(--masthead-h)); align-self: start; display: grid; gap: var(--space-3xs); padding-top: var(--space-lg); max-width: none; }
.cal-month__name { display: block; font: 800 var(--text-3xl)/1 var(--font-display); text-transform: uppercase; }
.cal-month__year { display: block; font: 600 var(--text-md)/1.3 var(--font-body); font-variant-numeric: tabular-nums; color: var(--color-ink-2); }
.cal-month__events { border-top: 0; }
.cal-month__events .event:last-child { border-bottom: 0; }
.cal-row__name { margin: 0; min-width: 0; font: 600 var(--text-title)/1.25 var(--font-body); overflow-wrap: break-word; }
.cal-row__action { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; white-space: nowrap; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em; transition: transform var(--dur-micro) var(--ease-out); }
.cal-row__action:hover { text-decoration-color: var(--color-mark); }
.cal-row__action:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.cal-row__action:active { transform: translateY(1px); }
.cal-month:not(:has(.cal-row:not([hidden]))) { display: none; }
.cal-empty { display: none; padding-block: var(--space-xl); border-top: 2px solid var(--color-ink); color: var(--color-ink-2); }
.cal-section:not(:has(.cal-row:not([hidden]))) .cal-empty { display: block; }

/* ---------- Event hub ---------- */
.hub-head { padding-block: var(--space-3xl) var(--space-2xl); }
.hub-head__inner { display: grid; gap: var(--space-2xl); }
.hub-head__inner--clock { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.hub-head__main { display: grid; justify-items: start; gap: var(--space-lg); min-width: 0; }
.hub-head__state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); color: var(--color-on-arena-2); }
.hub-head__title { max-width: 16ch; }
.hub-head__title--long { font-size: var(--text-display-s); max-width: 24ch; }
.hub-facts { display: flex; flex-wrap: wrap; gap: var(--space-lg) var(--space-2xl); width: 100%; margin: 0; padding-top: var(--space-lg); border-top: 1px solid var(--color-arena-3); }
.hub-facts__item { display: grid; gap: var(--space-2xs); }
.hub-facts dt { font-size: var(--text-sm); color: var(--color-on-arena-2); }
.hub-facts dd { margin: 0; font-size: var(--text-lg); font-weight: 600; }
.hub-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-xl); }
.hub-clock { display: grid; justify-items: end; margin: 0; text-align: right; line-height: 1; }
.hub-clock__num { font: 800 var(--text-numeral)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.hub-clock__word { font: 800 var(--text-2xl)/1 var(--font-display); text-transform: uppercase; }
.hub-clock--live .hub-clock__num { color: var(--color-yellow); }
.hub-clock__note { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-on-arena-2); }

.hub-body { padding-block: var(--space-2xl) var(--section-gap-s); }
/* Tab groups, panels, scoreboards and years carry no scroll-margin of their own: the page's scroll-padding-top
   (base.css) and swup's offset already land them 24px under the header, and a margin would add to both. */
.hub-body.arena { border-top: 1px solid var(--color-arena-3); }
.hub-tabs__list { display: flex; gap: var(--space-xl); margin-bottom: var(--space-2xl); border-bottom: 1px solid var(--color-rule); overflow-x: auto; }
.hub-tab { min-height: 52px; padding: 0; border: 0; border-bottom: 3px solid transparent; background: transparent; color: inherit; font: 600 var(--text-lg)/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: transform var(--dur-micro) var(--ease-out); }
.hub-tab:hover { border-bottom-color: var(--color-muted); }
.hub-tab:active { transform: translateY(1px); }
.hub-tab[aria-selected="true"] { border-bottom-color: var(--color-red); }
.arena .hub-tab[aria-selected="true"] { border-bottom-color: var(--color-yellow); }
html:not(.js) .hub-tabs__list { display: none; }
html:not(.js) .hub-tabs [role="tabpanel"][hidden], html:not(.js) .rc-switch [role="tabpanel"][hidden] { display: block !important; }
html:not(.js) .hub-panel + .hub-panel { margin-top: var(--section-gap-s); }
.hub-panel__title { margin-bottom: var(--space-xl); }
.js .hub-panel__title--tabbed { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hub-note { margin-top: var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.hub-note a { color: inherit; font-weight: 600; }
.hub-note a:hover { text-decoration-color: var(--color-mark); text-decoration-thickness: 2px; }
.hub-note a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.hub-note a:active { color: var(--color-mark); }

/* Overview: the event's own description */
.hub-prose { display: grid; gap: var(--space-md); max-width: var(--measure); }
.hub-prose > * { margin: 0; }
.hub-prose p:empty { display: none; }
.hub-prose h2 { margin-top: var(--space-lg); font-size: var(--text-2xl); max-width: 30ch; text-wrap: balance; }
.hub-prose h3 { margin-top: var(--space-lg); font-size: var(--text-lg); }
.hub-prose ul, .hub-prose ol { display: grid; gap: var(--space-xs); padding-left: var(--space-lg); }
.hub-prose a { font-weight: 600; }
.hub-prose a:hover { text-decoration-color: var(--color-mark); text-decoration-thickness: 2px; }
.hub-prose a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.hub-prose a:active { color: var(--color-mark); }

/* Results: a plate index, then one scoreboard per category */
.hub-index { display: grid; gap: var(--space-sm); margin-bottom: var(--space-md); }
.hub-index__row { display: grid; grid-template-columns: 5rem minmax(0, 1fr); align-items: center; gap: var(--space-md); }
.hub-index__group { font-weight: 600; color: var(--color-muted); }
.hub-index__list { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: 0; padding: 0; list-style: none; }
.hub-index__link, .hub-index__wait { display: inline-flex; align-items: center; justify-content: center; min-width: 4.5rem; min-height: 44px; padding: 0 var(--space-sm); border: 1px solid var(--color-rule); color: inherit; font: 800 var(--text-lg)/1 var(--font-display); text-decoration: none; white-space: nowrap; transition: transform var(--dur-micro) var(--ease-out); }
.hub-index__link:hover { border-color: var(--color-yellow); background: var(--color-arena-2); }
.hub-index__link:active { transform: translateY(1px); }
.hub-index__link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.hub-index__wait { border-style: dashed; color: var(--color-muted); }
.hub-boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3xl) var(--space-2xl); margin-top: var(--space-2xl); }
.hub-books { display: grid; max-width: 44rem; margin: 0; padding: 0; list-style: none; border-top: 2px solid currentColor; }
.hub-books li { border-bottom: 1px solid var(--color-rule); }
.hub-books--lead { margin-bottom: var(--space-2xl); }
.hub-books__link { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: 64px; padding-block: var(--space-sm); color: inherit; font: 600 var(--text-xl)/1.2 var(--font-body); text-decoration: none; transition: transform var(--dur-micro) var(--ease-out); }
.hub-books__link:hover { text-decoration: underline; text-decoration-color: var(--color-mark); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.hub-books__link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.hub-books__link:active { transform: translateY(1px); }
.hub-books__type, .result-books__type, .file-type { display: inline-block; text-decoration: none; padding: 0 var(--space-2xs); border: 1px solid currentColor; font: 600 var(--text-xs)/1.6 var(--font-body); white-space: nowrap; }
.hub-books__meta { display: inline-flex; align-items: center; gap: var(--space-sm); font: 400 var(--text-sm)/1 var(--font-body); white-space: nowrap; }
.hub-books__size, .result-books__size { font-size: var(--text-sm); font-weight: 400; font-variant-numeric: tabular-nums; color: var(--color-muted); }
.hub-medals { display: grid; gap: var(--space-md); max-width: 60rem; }
.hub-medals .hub-note { margin-top: 0; }

/* Schedule: the days of the competition */
.hub-schedule { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xl) var(--space-xl); }
.hub-day { display: grid; align-content: start; gap: var(--space-sm); min-width: 0; }
.hub-day__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.hub-day__title { max-width: none; font: 800 var(--text-xl)/1.05 var(--font-display); text-transform: uppercase; }
.hub-day--today .sessions { border-top-color: var(--color-yellow); }

/* Schedule kept on the event itself (no results feed), on paper */
.hub-body--paper .sessions { border-top-color: var(--color-ink); }
.hub-body--paper .session { border-bottom-color: var(--color-rule); }
.hub-body--paper .session__group, .hub-body--paper .session__status { color: var(--color-ink-2); }

/* Overview: named officials, and an earlier plan for the same edition */
.hub-officials { margin-top: var(--space-2xl); max-width: 64rem; }
.hub-officials__title, .hub-files__group, .hub-galleries__title { max-width: none; font: 800 var(--text-2xl)/1.05 var(--font-display); text-transform: uppercase; }
.hub-officials__note { margin-top: var(--space-xs); color: var(--color-muted); }
.hub-officials__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); column-gap: var(--space-xl); margin: var(--space-lg) 0 var(--space-md); padding: 0; list-style: none; border-top: 2px solid currentColor; }
.hub-officials__person { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); min-height: 56px; border-bottom: 1px solid var(--color-rule); }
.hub-officials__name { font-weight: 600; }
.hub-officials__noc { font: 800 var(--text-lg)/1 var(--font-display); text-decoration: none; }
.hub-earlier { display: grid; gap: var(--space-md); max-width: var(--measure); margin-top: var(--space-2xl); padding: var(--space-lg); border: 1px solid var(--color-rule); background: var(--color-paper-2); }
.arena .hub-earlier { background: var(--color-arena-2); }
.hub-earlier__title { max-width: none; }
.hub-earlier .hub-files { border-top-width: 1px; }

/* Documents and links: one row each, the kind and size at the end */
.hub-files { display: grid; max-width: 56rem; margin: 0; padding: 0; list-style: none; border-top: 2px solid currentColor; }
.hub-files__group { margin: var(--space-2xl) 0 var(--space-md); }
.hub-files__item { border-bottom: 1px solid var(--color-rule); }
.hub-files__link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-xl); row-gap: var(--space-3xs); min-height: 64px; padding-block: var(--space-sm); color: inherit; text-decoration: none; transition: transform var(--dur-micro) var(--ease-out); }
.hub-files__label { grid-column: 1; font: 600 var(--text-lg)/1.3 var(--font-body); overflow-wrap: anywhere; }
.hub-files__note { grid-column: 1; font-size: var(--text-sm); color: var(--color-muted); }
.hub-files__meta { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: var(--space-sm); font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--color-muted); white-space: nowrap; }
.hub-files__link:hover .hub-files__label { text-decoration: underline; text-decoration-color: var(--color-mark); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.hub-files__link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.hub-files__link:active { transform: translateY(1px); }
.hub-files--compact .hub-files__link { min-height: 52px; }
.hub-files--compact .hub-files__label { font-size: var(--text-md); }

/* Photos: a grid of the event's photographs; each opens larger (events.js) or as its file without script */
.hub-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: var(--space-md); margin: 0; padding: 0; list-style: none; }
.hub-photos__link { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--color-paper-3); transition: transform var(--dur-micro) var(--ease-out); }
.hub-photos__img { width: 100%; height: 100%; object-fit: cover; }
.hub-photos__link::after { content: ""; position: absolute; inset: 0; border: 4px solid var(--color-red); opacity: 0; transition: opacity var(--dur-short) var(--ease-out); pointer-events: none; }
.arena .hub-photos__link::after { border-color: var(--color-yellow); }
.hub-photos__link:hover::after { opacity: 1; }
.hub-photos__link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.hub-photos__link:active { transform: translateY(1px); }
.hub-galleries { margin-top: var(--space-2xl); }
.hub-galleries__title { margin-bottom: var(--space-lg); }
.hub-galleries__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl); }

/* The photo viewer: a modal dialog over the arena, previous and next, Escape or Close to leave */
.hub-lightbox { position: fixed; inset: 0; overflow: auto; overscroll-behavior: contain; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: var(--space-md) var(--gutter); border: 0; background: var(--color-arena); color: var(--color-on-arena); --color-focus: var(--color-yellow); }
.hub-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--space-md); animation: hub-viewer-in var(--dur-short) var(--ease-out); }
.hub-lightbox::backdrop { background: var(--color-arena); }
.hub-lightbox__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); }
.hub-lightbox__count { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--color-on-arena-2); }
.hub-lightbox__figure { display: grid; place-items: center; min-height: 0; margin: 0; }
.hub-lightbox__img { width: auto; max-width: 100%; height: auto; max-height: calc(100dvh - 11rem); object-fit: contain; }
.hub-lightbox__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; padding: 0 var(--space-lg); border: 1px solid var(--color-on-arena-2); border-radius: var(--radius-input); background: transparent; color: var(--color-on-arena); font: 600 var(--text-md)/1 var(--font-body); cursor: pointer; transition: transform var(--dur-micro) var(--ease-out); }
.hub-lightbox__btn:hover { border-color: var(--color-yellow); }
.hub-lightbox__btn:active { transform: translateY(1px); }
.hub-lightbox__btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
@keyframes hub-viewer-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hub-news, .hub-next { padding-block: var(--section-gap-s); }
.hub-news__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl); }

/* ---------- Scoreboard: one category ---------- */
.scoreboard { display: grid; align-content: start; gap: var(--space-md); min-width: 0; }
.scoreboard__head { display: grid; gap: var(--space-2xs); }
.scoreboard__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2xs) var(--space-sm); max-width: none; margin: 0; }
.scoreboard__group { display: block; font: 600 var(--text-lg)/1.2 var(--font-body); color: var(--color-muted); }
.scoreboard__weight { display: block; font: 800 var(--text-section)/1 var(--font-display); text-transform: uppercase; }
.scoreboard__when, .scoreboard__wait { font-size: var(--text-sm); color: var(--color-muted); }
.scores { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.scores th, .scores td { padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--color-rule); text-align: left; vertical-align: middle; }
.scores thead th { border-bottom-width: 2px; font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); white-space: nowrap; }
.scores tbody th { font-weight: 600; }
.scores__rank { width: 3.75rem; }
.scores__box { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-bottom: 3px solid transparent; background: var(--color-arena-2); color: var(--color-on-arena); font: 800 var(--text-xl)/1 var(--font-display); }
.scores__row--gold .scores__box { border-bottom-color: var(--color-gold); }
.scores__row--silver .scores__box { border-bottom-color: var(--color-silver); }
.scores__row--bronze .scores__box { border-bottom-color: var(--color-bronze); }
.scores__name { display: block; line-height: 1.3; }
.scores__from { display: none; }
.scores__nation { white-space: nowrap; }
.scores__nation-in { display: inline-flex; align-items: center; gap: var(--space-xs); }
.scores__noc { font: 800 var(--text-lg)/1 var(--font-display); text-decoration: none; }
.scores__country { display: none; font-size: var(--text-sm); color: var(--color-muted); }
.scores__total { width: 6rem; text-align: right; white-space: nowrap; }
td.scores__total { font: 800 var(--text-2xl)/1 var(--font-display); }
.scores__irm { font: 600 var(--text-sm)/1 var(--font-body); color: var(--color-muted); text-decoration: none; }
.scores__medal { width: 7rem; font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }

/* ---------- Results centre ---------- */
.rc-head { padding-block: var(--space-3xl); }
.rc-head__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: var(--space-2xl); }
.rc-head__inner--solo { grid-template-columns: minmax(0, 1fr); }
.rc-head__intro { display: grid; justify-items: start; gap: var(--space-lg); }
.rc-head__state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); color: var(--color-on-arena-2); }
.rc-head__source { font-size: var(--text-sm); color: var(--color-on-arena-2); max-width: 44ch; }
.rc-head__source a { color: var(--color-on-arena); font-weight: 600; }
.rc-head__source a:hover { text-decoration-color: var(--color-mark); text-decoration-thickness: 2px; }
.rc-head__source a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.rc-head__source a:active { color: var(--color-mark); }
.rc-head__links { display: flex; flex-wrap: wrap; gap: var(--space-md) var(--space-xl); }
.rc-head__subtitle { margin-bottom: var(--space-lg); }
.rc-head__medals { min-width: 0; }

.rc-cats { padding-block: var(--space-3xl) var(--section-gap-s); border-top: 1px solid var(--color-arena-3); }
.rc-cats__title { margin-bottom: var(--space-xl); }
.rc-switch { display: grid; gap: var(--space-2xl); }
.rc-switch__index { display: grid; gap: var(--space-sm); }
.rc-switch__row { display: grid; grid-template-columns: 5rem minmax(0, 1fr); align-items: center; gap: var(--space-md); }
.rc-switch__group { font-weight: 600; color: var(--color-on-arena-2); }
.rc-switch__tabs { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--space-xs); }
.rc-tab { display: inline-flex; align-items: baseline; justify-content: center; gap: var(--space-3xs); min-height: 64px; padding: var(--space-md) var(--space-xs) 0; border: 1px solid var(--color-arena-3); background: var(--color-arena-2); color: var(--color-on-arena); font: 800 var(--text-2xl)/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; transition: transform var(--dur-micro) var(--ease-out); }
.rc-tab__unit { font: 600 var(--text-sm)/1 var(--font-body); color: var(--color-on-arena-2); }
.rc-tab:hover { border-color: var(--color-on-arena-2); }
.rc-tab:active { transform: translateY(1px); }
/* The open category is a yellow plate: selected text on it swaps to an ink highlight with yellow text (tokens.css). */
.rc-tab[aria-selected="true"] { border-color: var(--color-yellow); background: var(--color-yellow); color: var(--color-arena); --color-selection: var(--color-ink); --color-on-selection: var(--color-yellow); }
.rc-tab[aria-selected="true"] .rc-tab__unit { color: var(--color-arena); }
.rc-tab--waiting { border-style: dashed; background: transparent; color: var(--color-on-arena-2); }
html:not(.js) .rc-switch__index { display: none; }
html:not(.js) .rc-panel + .rc-panel { margin-top: var(--space-3xl); }
.rc-panel .scoreboard__weight { font-size: var(--text-display-s); }
.rc-panel .scores__country { display: inline; }

.rc-gn { padding-block: var(--section-gap-s); }
.rc-gn__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; gap: var(--space-2xl); }
.rc-gn__book { display: grid; justify-items: start; gap: var(--space-md); }
.rc-gn__when { font: 800 var(--text-3xl)/1.02 var(--font-display); text-transform: uppercase; max-width: 12ch; }
.rc-gn__place { font-size: var(--text-lead); color: var(--color-ink-2); }
.rc-gn__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); padding-block: var(--space-xs); }
.rc-gn__type { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.rc-gn__news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl); }
.rc-gn__news .story__title { font-size: var(--text-lg); }

.rc-books { padding-block: var(--section-gap-s); }
.rc-books__head { display: grid; gap: var(--space-md); margin-bottom: var(--space-2xl); }

/* The two archive pages, led from the books band */
.rc-archives { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); margin-bottom: var(--space-2xl); }
.rc-archive { display: grid; align-content: space-between; gap: var(--space-xl); min-height: 12rem; padding: var(--space-lg); border: 1px solid var(--color-ink); background: var(--color-paper); color: var(--color-ink); text-decoration: none; transition: transform var(--dur-micro) var(--ease-out); }
.rc-archive__title { max-width: 16ch; font: 800 var(--text-3xl)/1 var(--font-display); text-transform: uppercase; text-wrap: balance; }
.rc-archive__line { color: var(--color-ink-2); }
.rc-archive:hover { border-color: var(--color-mark); }
.rc-archive:hover .rc-archive__title { text-decoration: underline; text-decoration-color: var(--color-mark); text-decoration-thickness: 3px; text-underline-offset: 0.12em; }
.rc-archive:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.rc-archive:active { transform: translateY(1px); }

.result-books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: var(--space-2xl) var(--space-xl); }
.result-books__series { display: grid; gap: var(--space-xs); min-width: 0; }
.result-books__title { max-width: none; padding-bottom: var(--space-sm); border-bottom: 2px solid var(--color-ink); font: 800 var(--text-2xl)/1.05 var(--font-display); text-transform: uppercase; }
.result-books__list { margin: 0; padding: 0; list-style: none; }
.result-books__item { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: var(--space-2xs) var(--space-md); padding-block: var(--space-md); border-bottom: 1px solid var(--color-rule); }
.result-books__year { grid-row: span 2; font: 800 var(--text-3xl)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.result-books__place { font-weight: 600; }
.result-books__files { display: flex; flex-wrap: wrap; gap: 0 var(--space-lg); }
.result-books__link { display: inline-block; padding-block: var(--space-xs); color: var(--color-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: transform var(--dur-micro) var(--ease-out); }
.result-books__link:hover { text-decoration-color: var(--color-mark); text-decoration-thickness: 2px; }
.result-books__link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.result-books__link:active { transform: translateY(1px); }
.result-books__type { margin-left: var(--space-2xs); color: var(--color-ink-2); }

/* ---------- Entries ---------- */
.entry-head { padding-block: var(--space-3xl) var(--space-2xl); }
.entry-head__inner { display: grid; gap: var(--space-lg); }

/* The entry desk: the page's one red band. Two tabs (#youth-junior, #senior), each with its championship and the form */
.entry-desk { padding-block: var(--space-3xl); --color-muted: var(--color-paper); --color-rule: color-mix(in oklab, var(--color-paper) 40%, transparent); }
.entry-desk__head { display: grid; gap: var(--space-md); margin-bottom: var(--space-xl); }
.entry-desk__line { font-size: var(--text-lead); max-width: 52ch; }
.entry-tabs__list { display: flex; gap: var(--space-xl); margin-bottom: var(--space-2xl); border-bottom: 1px solid var(--color-rule); overflow-x: auto; }
.entry-tab { min-height: 52px; padding: 0; border: 0; border-bottom: 3px solid transparent; background: transparent; color: inherit; font: 600 var(--text-lg)/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: transform var(--dur-micro) var(--ease-out); }
.entry-tab:hover { border-bottom-color: var(--color-paper); }
.entry-tab:active { transform: translateY(1px); }
.entry-tab[aria-selected="true"] { border-bottom-color: var(--color-yellow); }
.entry-tab:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.entry-panel { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; gap: var(--space-2xl); }
.entry-panel:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 6px; }
.entry-panel__info { display: grid; justify-items: start; gap: var(--space-md); min-width: 0; }
.entry-panel__title { max-width: 18ch; font: 800 var(--text-2xl)/1.05 var(--font-display); text-transform: uppercase; }
.entry-champ { display: grid; justify-items: start; gap: var(--space-xs); width: 100%; padding-block: var(--space-md); border-block: 1px solid var(--color-rule); }
.entry-champ__state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.entry-champ__name { font: 600 var(--text-title)/1.25 var(--font-body); }
.entry-champ__name a { color: inherit; text-decoration: none; }
.entry-champ__name a:hover { text-decoration: underline; text-decoration-color: var(--color-yellow); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.entry-champ__name a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.entry-champ__name a:active { color: var(--color-yellow); }
.entry-champ__meta { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); }
.entry-champ__lines { display: grid; gap: var(--space-2xs); max-width: 48ch; margin: var(--space-xs) 0 0; padding-left: var(--space-lg); }
.entry-champ .hub-files { width: 100%; margin-top: var(--space-xs); border-top-width: 1px; }
.entry-panel__form { min-width: 0; background: var(--color-paper); }
.entry-frame { display: block; width: 100%; height: min(85vh, 62rem); min-height: 36rem; border: 0; background: var(--color-paper); }
/* While the form has no address (awf_entry_form()): the notice takes its place, on the red field */
.entry-off { display: grid; justify-items: start; gap: var(--space-md); min-width: 0; padding: var(--space-xl); border: 1px solid var(--color-rule); }
.entry-off__line { max-width: 24ch; font: 600 var(--text-title)/1.25 var(--font-body); }
.entry-off__ask { max-width: 48ch; }
html:not(.js) .entry-tabs__list { display: none; }
html:not(.js) .entry-tabs [role="tabpanel"][hidden] { display: grid !important; }
html:not(.js) .entry-panel + .entry-panel { margin-top: var(--section-gap-s); }
.entry-ahead { padding-block: var(--section-gap-s); }
.entry-event { align-items: start; }
.entry-event .event__name { font-size: var(--text-title); }
.entry-event__notes { display: grid; justify-items: start; gap: var(--space-xs); margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.entry-event__from { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.entry-event__lines { display: grid; gap: var(--space-2xs); max-width: 65ch; margin: 0; padding-left: var(--space-lg); }
.entry-event__doc { display: inline-block; padding-block: var(--space-xs); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: transform var(--dur-micro) var(--ease-out); }
.entry-event__doc:hover { text-decoration-color: var(--color-mark); text-decoration-thickness: 2px; }
.entry-event__doc:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.entry-event__doc:active { transform: translateY(1px); }
.entry-none { padding-block: var(--space-xl); border-top: 2px solid var(--color-ink); color: var(--color-ink-2); }
.entry-lists { padding-block: var(--section-gap-s); }
.entry-lists__inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-2xl); }
.entry-lists__list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--color-ink); }
.entry-lists__item { display: grid; gap: var(--space-2xs); padding-block: var(--space-lg); border-bottom: 1px solid var(--color-rule); }
.entry-lists__link { color: inherit; font: 600 var(--text-xl)/1.3 var(--font-body); text-decoration: none; }
.entry-lists__link:hover { text-decoration: underline; text-decoration-color: var(--color-mark); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.entry-lists__link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.entry-lists__link:active { color: var(--color-mark); }
.entry-lists__date { font-size: var(--text-sm); color: var(--color-ink-2); }

/* ---------- Responsive ---------- */
@media (min-width: 60rem) {
  /* Three photos: the first one large, the other two stacked beside it; two photos side by side */
  .hub-photos:has(> :nth-child(3):last-child), .hub-photos:has(> :nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hub-photos:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-photos__item:first-child:nth-last-child(3) { grid-column: span 2; grid-row: span 2; }
  .hub-photos__item:first-child:nth-last-child(3) .hub-photos__link { height: 100%; aspect-ratio: auto; }
}
@media (max-width: 75rem) {
  .hub-boards { grid-template-columns: minmax(0, 1fr); }
  .hub-schedule { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-gn__grid { grid-template-columns: minmax(0, 1fr); }
  .hub-galleries__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 60rem) {
  .cal-now__item, .hub-head__inner--clock, .rc-head__inner, .entry-lists__inner, .entry-panel { grid-template-columns: minmax(0, 1fr); }
  .cal-now__clock, .hub-clock { justify-items: start; text-align: left; }
  .cal-key { margin-left: 0; }
  .cal-row { align-items: start; }
  .cal-month { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cal-month__title { position: static; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs) var(--space-sm); }
  .hub-news__grid, .rc-gn__news { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-switch__tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .rc-archives, .hub-galleries__grid { grid-template-columns: minmax(0, 1fr); }
  .rc-archive { min-height: 0; }
  .hub-files__link { grid-template-columns: minmax(0, 1fr); }
  .hub-files__meta { grid-column: 1; grid-row: auto; }
  .entry-tabs__list { gap: var(--space-lg); }
  .entry-frame { height: 80vh; min-height: 32rem; }
  .entry-off { padding: var(--space-lg); }
  .hub-lightbox { padding-inline: var(--space-md); }
  .cal-tools { flex-direction: column; align-items: stretch; }
  .cal-now__clock { display: flex; align-items: baseline; gap: var(--space-xs); }
  .hub-clock { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs); }
  .hub-clock__note { flex-basis: 100%; margin-top: 0; }
  .cal-now__day, .hub-clock__num { font-size: var(--text-display); font-variant-numeric: tabular-nums; }
  .hub-tabs__list { gap: var(--space-lg); }
  .hub-schedule, .result-books, .hub-news__grid, .rc-gn__news { grid-template-columns: minmax(0, 1fr); }
  .hub-index__row, .rc-switch__row { grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
  .rc-tab { min-height: 56px; }
  .scoreboard__weight, .rc-panel .scoreboard__weight { font-size: var(--text-section); }
  .scores th, .scores td { padding-inline: var(--space-2xs); }
  .scores__rank { width: 2.75rem; }
  .scores__box { width: 2.25rem; height: 2.25rem; font-size: var(--text-lg); }
  .scores__nation, .rc-panel .scores__country { display: none; }
  .scores__from { display: flex; align-items: center; gap: var(--space-2xs); margin-top: var(--space-2xs); font: 800 var(--text-md)/1 var(--font-display); }
  .scores__total { width: 3.5rem; }
  td.scores__total { font-size: var(--text-xl); }
  .scores__medal { width: auto; font-size: var(--text-xs); }
}
@media (prefers-reduced-motion: reduce) {
  .cal-filter__chip, .cal-row__action, .hub-tab, .rc-tab, .hub-index__link, .hub-books__link, .hub-files__link, .hub-photos__link, .hub-photos__link::after, .hub-lightbox__btn, .rc-archive, .result-books__link, .entry-tab, .entry-event__doc { transition: none; }
  .cal-filter__chip:active, .cal-row__action:active, .hub-tab:active, .rc-tab:active, .hub-index__link:active, .hub-books__link:active, .hub-files__link:active, .hub-photos__link:active, .hub-lightbox__btn:active, .rc-archive:active, .result-books__link:active, .entry-tab:active, .entry-event__doc:active { transform: none; }
  .hub-lightbox[open] { animation: none; }
}
