/* ==========================================================================
   SLOSKI — Štartne liste / Prijave
   Tokens are the only source of color + type. No ad-hoc hex in components.
   ========================================================================== */

:root {
  /* Brand — sampled from Logo_SLOSKI@2x.png */
  --blue:        #006AB6;
  --blue-deep:   #00518C;
  --green:       #8DC63F;

  /* Ink + surface.
     Muted text and borders are TINTS OF THE INK, not separate greys — that is
     what stops a palette reading as stock. rgba(ink,.66) still clears 4.5:1. */
  --navy:        #001D3D;
  --ink:         #001D3D;
  --ink-muted:   rgba(0, 29, 61, .66);
  --bg:          #FFFFFF;
  --surface:     #F2F7FA;   /* pale wash of the brand blue, not neutral grey */
  --surface-2:   #E6EFF5;
  --line:        rgba(0, 29, 61, .14);
  --line-strong: rgba(0, 29, 61, .28);

  /* Status */
  --ok:          #2E7D32;
  --ok-bg:       #E8F5E9;
  --warn:        #8A6100;
  --warn-bg:     #FFF6E0;
  --err:         #B3261E;
  --err-bg:      #FDECEA;

  /* Type — Montserrat only, matching sloski.si.
     One family for headings and body; hierarchy comes from weight (800 vs 400)
     and case, not from a second typeface. Montserrat has no width axis, so
     never set font-stretch on it — the browser would synthesise it. */
  --display: "Montserrat", -apple-system, "Segoe UI", Roboto, sans-serif;
  --body:    "Montserrat", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:    ui-monospace, "SF Mono", "Roboto Mono", Menlo, monospace;

  /* Rhythm — 4/8 base, three tiers */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  16px;
  --s-4:  24px;
  --s-5:  32px;
  --s-6:  48px;
  --s-7:  72px;
  --s-8:  96px;

  --radius:    8px;    /* buttons and inputs */
  --radius-sm: 12px;
  --radius-lg: 16px;   /* cards and panels */

  /* One elevation scale — wide and soft, never a tight dark drop shadow */
  --lift-1: 0 6px 24px rgba(0, 29, 61, .08);
  --lift-2: 0 16px 44px rgba(0, 29, 61, .14);

  --wrap: 1440px;
  --dur:  .18s;
  --ease: cubic-bezier(.2, .6, .35, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Must outrank component display rules (.note and .form-error are flex). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* Tabular figures everywhere: start times, bibs and years must align in
     columns, and a proportional 1 would break every table on the site. */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Focus — visible, never removed */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-4); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--s-3); top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: var(--s-2) var(--s-3);
  border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: var(--s-3); }

/* ---------- Type scale ---------- */
/* Sentence case, weight 700, tight negative tracking. NOT uppercase:
   all-caps headings plus letter-spacing is the single loudest generic-template
   signal, and Slovenian headings are long enough that caps hurt reading. */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-transform: none;
  margin: 0;
  color: var(--navy);
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.15; letter-spacing: -.02em; }
h2 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); }
h3 { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); }
h4 { font-size: 1rem; }
p  { margin: 0 0 var(--s-3); }
.lead { font-size: 1.125rem; color: var(--ink-muted); max-width: 62ch; }
/* Headings carry margin: 0, so the gap belongs to whatever follows them. */
h1 + p, h2 + p, h3 + p, h1 + .lead, h2 + .lead { margin-top: var(--s-3); }

/* Eyebrow — a quiet label naming the section. No ornament: the green dash that
   used to sit in front of it was decoration and carried no information. */
.eyebrow {
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin: 0 0 var(--s-2);
}
.hero .eyebrow { color: rgba(255, 255, 255, .65); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: var(--s-5);
  min-height: 72px;
}
.logo { display: flex; align-items: center; flex: none; }
.logo img { height: 38px; width: auto; }

.nav { display: flex; align-items: center; gap: var(--s-3); margin-left: auto; }
.nav a {
  font-size: .875rem; font-weight: 500; text-decoration: none; color: var(--navy); white-space: nowrap;
  padding: var(--s-2) 0; position: relative;
  transition: color var(--dur) var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--green);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav a:hover { color: var(--blue); }
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.lang { display: flex; gap: var(--s-1); align-items: center; font-size: .875rem; font-weight: 500; }
.lang a { text-decoration: none; color: var(--ink-muted); padding: var(--s-1) var(--s-2); border-radius: var(--radius); }
.lang a[aria-current="true"] { color: #fff; background: var(--blue); }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--navy); }
.nav-toggle span + span { margin-top: 4px; }

/* ==========================================================================
   Role preview — admin / klub / obiskovalec
   Prototype-only. Mirrors the real permission model:
     admin      manage_options — sees everything, including personal data
     klub       the `klub` role — scoped to its own posts by pre_get_posts
     obiskovalec logged out — published start lists only
   Mark any element with data-roles="admin klub" to limit who sees it.
   Elements with no data-roles attribute are visible to everyone.
   ========================================================================== */
[data-role="admin"]       [data-roles]:not([data-roles~="admin"]),
[data-role="klub"]        [data-roles]:not([data-roles~="klub"]),
[data-role="obiskovalec"] [data-roles]:not([data-roles~="obiskovalec"]) {
  display: none !important;
}

.role-switch {
  display: flex; align-items: center; gap: var(--s-2);
  flex: none; margin-left: var(--s-3);
  padding-left: var(--s-3); border-left: 1px solid var(--line);
}
.role-switch-label {
  font-size: .8125rem; font-weight: 500; color: var(--ink-muted); white-space: nowrap;
}
.role-seg { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.role-seg input { position: absolute; opacity: 0; pointer-events: none; }
.role-seg label {
  font-size: .8125rem; font-weight: 500; color: var(--ink-muted);
  padding: 7px 14px; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.role-seg label:hover { background: var(--surface); color: var(--navy); }
.role-seg input:checked + label { background: var(--navy); color: #fff; }
.role-seg input:focus-visible + label { outline: 3px solid var(--blue); outline-offset: -3px; }

/* Preview banner so the active role is never ambiguous */
.role-banner {
  background: var(--navy); color: #fff;
  font-size: .875rem; padding: var(--s-2) 0;
}
.role-banner .container { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.role-banner b { color: var(--green); font-weight: 600; }
.role-banner span { color: rgba(255, 255, 255, .7); }

/* Gate shown to roles that may not use a page at all */
.gate {
  text-align: center; padding: var(--s-6) var(--s-4);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); max-width: 560px;
}
.gate svg { width: 24px; height: 24px; color: var(--ink-muted); margin-bottom: var(--s-2); }
.gate h3 { margin-bottom: var(--s-2); }
.gate p { color: var(--ink-muted); max-width: 46ch; margin-inline: auto; }

/* Rows belonging to the signed-in club */
[data-role="klub"] tr[data-own] { background: rgba(0, 106, 182, .05); }
.own-flag {
  font-size: .8125rem; font-weight: 500; color: var(--blue); margin-left: var(--s-2);
}

@media (max-width: 720px) {
  .role-switch {
    margin: 0; padding: var(--s-3) 0 0;
    border-left: 0; border-top: 1px solid var(--line);
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy);
  color: #fff;
  padding: var(--s-8) 0 var(--s-7);
}
.hero::after { /* readability scrim over any photo */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,29,61,.55) 0%, rgba(0,29,61,.88) 100%);
  z-index: 1;
}
.hero > * { position: relative; z-index: 2; }
.hero-photo {
  position: absolute; inset: 0; z-index: 0;
  object-fit: cover; width: 100%; height: 100%;
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { color: rgba(255, 255, 255, .82); }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4);
  margin-top: var(--s-4); padding-top: var(--s-3);
  border-top: 1px solid rgba(255, 255, 255, .2);
  font-size: .875rem; color: rgba(255, 255, 255, .78);
}
.hero-meta b { color: #fff; font-weight: 600; }

/* Way back to the list the page was opened from */
.back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .875rem; font-weight: 500; color: rgba(255, 255, 255, .78);
  text-decoration: none; margin-bottom: var(--s-3);
}
.back svg { width: 14px; height: 14px; }
.back:hover { color: #fff; text-decoration: underline; }
.nav-account { color: var(--ink-muted) !important; }

/* Compact hero for interior pages — a header, not a billboard */
.hero--compact { padding: var(--s-6) 0 var(--s-5); }
.hero--compact h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); max-width: none; }

/* ==========================================================================
   Signature: the etched mountain, bottom-anchored
   ========================================================================== */
.mountain-anchor { position: relative; overflow: hidden; }
.mountain-anchor::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -20px;
  width: min(760px, 72%);
  aspect-ratio: 16 / 9;
  background: url("../img/mountain-line.png") right bottom / contain no-repeat;
  opacity: .16;
  pointer-events: none;
  z-index: 0;
}
.mountain-anchor > * { position: relative; z-index: 1; }
/* On dark surfaces the ink drawing needs inverting */
.mountain-anchor--dark::after { filter: invert(1); opacity: .13; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--body); font-size: .875rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  padding: 9px var(--s-3); min-height: 40px;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--surface-2); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .5; cursor: not-allowed; pointer-events: none;
}
.btn-lg { font-size: .9375rem; padding: 13px var(--s-4); min-height: 48px; }

/* ==========================================================================
   Section rhythm
   ========================================================================== */
.section { padding: var(--s-8) 0; }
.section--tight { padding: var(--s-6) 0; }
.section--surface { background: var(--surface); }
.section-head { margin-bottom: var(--s-5); }
.section-head p { max-width: 62ch; color: var(--ink-muted); margin: var(--s-2) 0 0; font-size: .9375rem; }
.section-head p + .btn { margin-top: var(--s-3); }

/* ==========================================================================
   The fork: two registration paths
   ========================================================================== */
.paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
.path {
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.path:hover { border-color: var(--blue); box-shadow: var(--lift-2); }
.path-tag {
  align-self: flex-start;
  font-size: .8125rem; font-weight: 500;
  padding: 5px 12px; border-radius: 999px; margin-bottom: var(--s-3);
}
.path-tag--club { background: rgba(0, 106, 182, .1); color: var(--blue-deep); }
.path-tag--solo { background: rgba(141, 198, 63, .18); color: #4A6B18; }
.path h3 { margin-bottom: var(--s-2); }
.path > p { color: var(--ink-muted); }
.path ul { list-style: none; margin: 0 0 var(--s-5); padding: 0; }
.path li {
  position: relative; padding-left: 26px; margin-bottom: var(--s-2);
  font-size: .9375rem; color: var(--ink-muted);
}
.path li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--green);
}
.path .btn { margin-top: auto; }

/* ==========================================================================
   Competition list — a table of races, not a card grid
   ========================================================================== */
.races { border-top: 1px solid var(--line); margin-bottom: var(--s-6); }
.races-group { font-size: 1rem; font-weight: 600; color: var(--ink-muted); margin: 0 0 var(--s-3); }
.race {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
  transition: background-color var(--dur) var(--ease);
}
.race:hover { background: var(--surface); }

/* Date block — reads like a race calendar, monospaced day */
.race-date {
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: var(--s-3);
}
.race-day {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.5rem; line-height: .9; color: var(--navy);
  display: block;
}
.race-month {
  font-size: .8125rem; font-weight: 500; color: var(--ink-muted);
}
.race-body h3 { font-size: 1.5rem; margin-bottom: var(--s-2); }
.race-body h3 a { color: var(--navy); text-decoration: none; }
.race-body h3 a:hover { color: var(--blue); }
.race-facts {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  font-size: .875rem; color: var(--ink-muted);
}
.race-facts span { display: inline-flex; align-items: center; gap: 6px; }
.race-facts svg { width: 14px; height: 14px; flex: none; color: var(--blue); }
.race-action { text-align: right; }

/* Status pills — color is never the only signal, each carries a word */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8125rem; font-weight: 500;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--open   { background: var(--ok-bg);   color: var(--ok); }
.pill--soon   { background: var(--warn-bg); color: var(--warn); }
.pill--closed { background: var(--surface-2); color: var(--ink-muted); }

/* ==========================================================================
   Forms
   ========================================================================== */
/* Two columns: the form itself on the left, a sticky summary with the fee and
   the submit on the right. No card around the form; sections are separated by
   headings and space. The summary panel is the only bordered box. */
.form-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--s-6) var(--s-6); align-items: start;
}
/* The column fills the grid; only single inputs are capped so a text field
   never stretches to 900px. Tables and headings use the full width. */
.form-main { min-width: 0; }
.form-main .form-group, .form-main .form-row { max-width: 640px; }
.form-main .form-section > h2 + p { max-width: 640px; }
.form-main .roster-tools .form-group { max-width: 360px; }
.form-section { padding-bottom: var(--s-6); margin-bottom: var(--s-6); border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.form-section > h2 { font-size: 1.25rem; margin-bottom: var(--s-2); }
.form-section > h2 + p { color: var(--ink-muted); font-size: .9375rem; max-width: 62ch; margin: 0 0 var(--s-4); }
.form-section > h2:only-child, .form-section > h2 + .form-group, .form-section > h2 + .form-row { margin-bottom: var(--s-4); }

.form-aside { position: sticky; top: 88px; }
.summary {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--s-4); background: var(--bg);
}
.summary h2 { font-size: 1.0625rem; margin-bottom: var(--s-3); }
.summary dl { margin: 0; }
.summary-row {
  display: flex; justify-content: space-between; gap: var(--s-3);
  padding: 10px 0; border-top: 1px solid var(--line); font-size: .9375rem;
}
.summary-row dt { color: var(--ink-muted); flex: none; }
.summary-row dd { margin: 0; text-align: right; color: var(--navy); font-weight: 500; }
.summary-row dd small { display: block; font-weight: 400; color: var(--ink-muted); font-size: .8125rem; }
.summary-row--stack { flex-direction: column; gap: 2px; }
.summary-row--stack dd { text-align: left; }
.summary-total { font-weight: 700; font-size: 1.0625rem; border-top: 1px solid var(--line-strong); }
.summary-total dd { font-weight: 700; }
.summary .deadline { display: block; font-size: .875rem; }
.summary .deadline b { display: block; font-size: 1rem; margin-bottom: 2px; }
.summary .check { padding: 10px 0 2px; margin: 0; border-top: 1px solid var(--line); }
.summary .check label { font-size: .875rem; }
.summary .btn { width: 100%; margin-top: var(--s-3); }
.summary .form-hint { margin-top: var(--s-3); }

/* Legacy card wrapper: still valid but no longer used by the entry pages. */
.form-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  max-width: 760px;
}
/* min-width: 0 — a fieldset's default min-content width lets a wide table push
   it past its container. That was the overflow on the club roster. */
.fieldset { border: 0; padding: 0; margin: 0 0 var(--s-6); min-width: 0; }
.fieldset legend {
  font-family: var(--display); font-weight: 700;
  letter-spacing: -.01em; font-size: 1.25rem;
  color: var(--navy); padding: 0; margin-bottom: var(--s-1);
}
.fieldset-note { color: var(--ink-muted); font-size: .9375rem; margin-bottom: var(--s-4); }

.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--s-4); }
.form-group { margin-bottom: var(--s-4); min-width: 0; }
.form-group label {
  display: block; font-size: .875rem; font-weight: 600; color: var(--navy);
  margin-bottom: 6px;
}
.req { color: var(--err); }
.optional { color: var(--ink-muted); font-weight: 500; text-transform: none; letter-spacing: 0; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="search"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  font-size: .9375rem;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form-group select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23001D3D' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: var(--navy); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 106, 182, .18);
}
.form-group input[readonly] { background: var(--surface); color: var(--ink-muted); border-color: var(--line); }
.form-group textarea { min-height: 96px; resize: vertical; }
.form-hint { font-size: .8125rem; color: var(--ink-muted); margin: 6px 0 0; }
.form-error { font-size: .8125rem; color: var(--err); margin: 6px 0 0; display: flex; gap: 6px; }
.form-group[data-invalid] input,
.form-group[data-invalid] select { border-color: var(--err); }

/* Checkbox / consent */
.check { display: flex; gap: var(--s-3); align-items: flex-start; margin-bottom: var(--s-3); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.check label { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .9375rem; margin: 0; line-height: 1.5; }
.check label b { font-weight: 600; }

.form-actions {
  display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center;
  padding-top: var(--s-4); border-top: 1px solid var(--line);
}

/* Club roster — the one table on an entry page */
.roster-cats .seg { margin-bottom: var(--s-4); }
.roster-cats .seg label { font-family: var(--display); font-weight: 700; font-size: .875rem; min-height: 36px; padding: 4px 12px; }
.seg input:indeterminate + label { border-color: var(--navy); background: var(--surface-2); color: var(--navy); }
.seg input:indeterminate + label b { color: var(--navy); }
.roster-tools { display: flex; gap: var(--s-3); align-items: center; margin-bottom: var(--s-3); }
.roster-tools .form-group { flex: 1 1 260px; margin: 0; max-width: 360px; }
.roster-tools .link-btn { white-space: nowrap; }
.roster td:first-child, .roster th:first-child { width: 36px; }
.roster input[type="checkbox"] { width: 20px; height: 20px; display: block; accent-color: var(--blue); cursor: pointer; }
.roster tbody tr { cursor: pointer; }
.roster tr[data-disabled] { cursor: default; }
.roster tr[data-disabled] td { color: var(--ink-muted); }
.roster tr[data-disabled] .racer-name { color: var(--ink-muted); font-weight: 500; }
.roster .racer-id { display: block; font-size: .8125rem; color: var(--ink-muted); font-family: var(--mono); }
.roster .ok   { color: var(--ok); font-weight: 600; white-space: nowrap; }
.roster .warn { color: var(--warn); font-weight: 600; white-space: nowrap; }
.roster .muted { color: var(--ink-muted); white-space: nowrap; }
.roster-empty { padding: var(--s-4) 0; color: var(--ink-muted); font-size: .9375rem; }

/* Steps — a real sequence, so numbering is information */
.steps { display: flex; gap: var(--s-2); list-style: none; margin: 0 0 var(--s-6); padding: 0; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: .9375rem; font-weight: 500; color: var(--ink-muted);
}
.step + .step::before { content: ""; width: 20px; height: 1px; background: var(--line); }
.step-n {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2); color: var(--ink-muted);
  font-family: var(--display); font-weight: 700; font-size: .875rem;
}
.step[aria-current="step"] { color: var(--navy); }
.step[aria-current="step"] .step-n { background: var(--blue); color: #fff; }
.step[data-done] .step-n { background: var(--green); color: var(--navy); }

/* ==========================================================================
   Start list — the signature strip
   ========================================================================== */
.startlist { width: 100%; border-collapse: collapse; }
.startlist caption {
  text-align: left; font-family: var(--display); font-weight: 700;
  font-size: 1.25rem; letter-spacing: -.01em;
  color: var(--navy); padding-bottom: var(--s-3);
}
.startlist th {
  text-align: left; font-size: .8125rem; font-weight: 600; color: var(--ink-muted);
  padding: 10px var(--s-3); border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.startlist td { padding: 12px var(--s-3); border-bottom: 1px solid var(--line); font-size: .9375rem; }
.startlist th:first-child, .startlist td:first-child { padding-left: 0; }
.startlist th:last-child,  .startlist td:last-child  { padding-right: 0; }
.startlist tbody tr:hover { background: var(--surface); }
.bib {
  font-family: var(--display); font-weight: 800;
  font-size: 1.25rem; line-height: 1; letter-spacing: -.02em;
  color: var(--blue); min-width: 2ch; display: inline-block;
}
.start-time { font-family: var(--mono); font-size: .875rem; color: var(--navy); }
.racer-name { font-weight: 600; color: var(--navy); white-space: nowrap; }
.racer-club { font-size: .8125rem; color: var(--ink-muted); }
.table-scroll { overflow-x: auto; }

/* ==========================================================================
   Categories — a race carries 2 to 21 start lists (JUE, MDI, ČLE …).
   The live site stacks them all open; this makes them navigable instead.
   ========================================================================== */

/* Sticky jump nav. Horizontally scrollable, never wraps into a wall. */
/* The bar spans full width for its background and border; the SCROLLING happens
   inside a normal .container, so the first chip lines up with the content below
   at every viewport. Computing the gutter from 100vw instead is off by the
   scrollbar width. */
.cat-nav {
  position: sticky; top: 72px; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.cat-nav-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-nav-scroll::-webkit-scrollbar { display: none; }
.cat-nav-inner {
  display: flex; gap: var(--s-2);
  padding-block: var(--s-3);
  min-width: max-content;
}
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display); font-weight: 700; font-size: .875rem;
  color: var(--navy); text-decoration: none; white-space: nowrap;
  padding: 6px 12px; min-height: 40px;
  border: 1px solid var(--line); border-radius: 999px;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cat-chip b {
  font-family: var(--body); font-size: .6875rem; font-weight: 700;
  color: var(--ink-muted); padding-top: 2px;
}
.cat-chip:hover { border-color: var(--blue); color: var(--blue); }
.cat-chip:hover b { color: var(--blue); }
.cat-chip[aria-current="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.cat-chip[aria-current="true"] b { color: rgba(255, 255, 255, .8); }

/* Start-order schedule — real information, and it doubles as an index. */
.schedule { width: 100%; border-collapse: collapse; }
.schedule th {
  text-align: left; font-size: .8125rem; font-weight: 600; color: var(--ink-muted);
  padding: 10px var(--s-3); border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.schedule td { padding: 12px var(--s-3); border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .9375rem; }
.schedule th:first-child, .schedule td:first-child { padding-left: 0; }
.schedule th:last-child,  .schedule td:last-child  { padding-right: 0; }
.schedule tbody tr:hover { background: var(--surface); }
.schedule a { text-decoration: none; color: var(--navy); font-weight: 600; }
.schedule a:hover { color: var(--blue); text-decoration: underline; }
.schedule .cat-code { margin-right: var(--s-2); }

/* The category code badge — the vernacular of the sport, kept literal.
   Tinted, not filled: it repeats on every row and must not shout. */
.cat-code {
  display: inline-grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: .75rem;
  min-width: 44px; padding: 3px 8px;
  background: var(--surface-2); color: var(--navy); border-radius: 6px;
}
.cat-code--f { background: rgba(0, 106, 182, .12); color: var(--blue-deep); }

/* Collapsible category block */
.cat-block { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: var(--s-2); background: var(--bg); }
.cat-block > summary {
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  padding: var(--s-3) var(--s-4); min-height: 56px; cursor: pointer; list-style: none;
  border-radius: var(--radius-sm);
}
.cat-block > summary::-webkit-details-marker { display: none; }
.cat-block > summary:hover { background: var(--surface); }
.cat-block[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.cat-title { font-family: var(--display); font-weight: 700;
  letter-spacing: -.01em; font-size: 1.0625rem; color: var(--navy); line-height: 1.2; }
.cat-facts { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-left: auto; font-size: .8125rem; color: var(--ink-muted); }
.cat-facts b { color: var(--navy); font-weight: 600; }
.cat-chevron { flex: none; width: 16px; height: 16px; color: var(--ink-muted); transition: transform var(--dur) var(--ease); }
.cat-block[open] .cat-chevron { transform: rotate(180deg); }
.cat-body { padding: var(--s-2) var(--s-4) var(--s-4); }

/* ==========================================================================
   Rule-derived UI — everything below encodes a specific clause of
   "Pravila za tekmovalno sezono 2026/2027"
   ========================================================================== */

/* Deadline countdown — entries close Thursday 24:00 before the race */
.deadline {
  display: inline-flex; align-items: baseline; gap: var(--s-2);
  font-size: .9375rem; color: var(--ink-muted);
}
.deadline b { font-size: 1.0625rem; color: var(--navy); font-weight: 700; }
.deadline--soon b { color: var(--warn); }
.deadline--closed b { color: var(--navy); }

/* Start-order explainer — says which rule produced this order */
.order-rule {
  display: flex; gap: var(--s-3); align-items: flex-start;
  font-size: .875rem; color: var(--ink-muted);
  background: var(--surface); border-radius: var(--radius-sm);
  padding: var(--s-3); margin-bottom: var(--s-4);
}
.order-rule svg { width: 18px; height: 18px; flex: none; color: var(--blue); margin-top: 2px; }
.order-rule b { color: var(--navy); }

/* SLO points column */
.slo { font-weight: 600; color: var(--navy); }
.slo--none { font-weight: 400; color: var(--ink-muted); }

/* Small inline badges on a racer row */
.tag {
  display: inline-block; font-size: .75rem; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; margin-left: 6px; white-space: nowrap;
}
.tag--drawn   { background: rgba(0,106,182,.1);  color: var(--blue-deep); }
.tag--foreign { background: var(--surface-2);    color: var(--ink-muted); }
.tag--up      { background: rgba(141,198,63,.2); color: #4A6B18; }

/* Fee summary */
.fee {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--s-4); background: var(--surface); margin-bottom: var(--s-5);
}
.fee-row { display: flex; justify-content: space-between; gap: var(--s-3); padding: 6px 0; }
.fee-row--total {
  border-top: 1px solid var(--line); margin-top: var(--s-2); padding-top: var(--s-3);
  font-weight: 700; color: var(--navy); font-size: 1.125rem;
}
.fee small { display: block; color: var(--ink-muted); font-size: .8125rem; margin-top: var(--s-2); }

/* Validity / merge warnings for organizers */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  display: flex; gap: var(--s-2); align-items: flex-start;
  padding: 6px 0; font-size: .9375rem;
}
.check-list svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.check-list .ok  { color: var(--ok); }
.check-list .no  { color: var(--err); }
.check-list .wait{ color: var(--warn); }

/* Small utility tool (pole height) */
.tool {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--s-4); background: var(--bg); max-width: 460px;
}
.tool-out {
  margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line);
  display: flex; align-items: baseline; gap: var(--s-2);
}
.tool-out b { font-size: 1.75rem; font-weight: 700; color: var(--blue); }

/* Results / standings */
.podium-1 { color: #8A6100; font-weight: 700; }
.podium-2 { color: #5C6670; font-weight: 700; }
.podium-3 { color: #8A5A2B; font-weight: 700; }
.rank { font-weight: 700; color: var(--navy); }

/* Tabs for results view switching */
.tabs { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-5); }
.tabs button {
  font-size: .9375rem; font-weight: 500; color: var(--ink-muted);
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; min-height: 44px; cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.tabs button:hover { border-color: var(--blue); color: var(--blue); }
.tabs button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ==========================================================================
   Info boxes
   ========================================================================== */
.note {
  display: flex; gap: var(--s-3);
  padding: var(--s-4); border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface);
  margin-bottom: var(--s-5);
}
.note svg { width: 20px; height: 20px; flex: none; color: var(--blue); margin-top: 2px; }
.note p:last-child { margin-bottom: 0; }
.note-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.note strong { color: var(--navy); }
.note--ok   { border-color: rgba(46, 125, 50, .25); background: var(--ok-bg); }
.note--ok svg { color: var(--ok); }
.note--warn { border-color: rgba(138, 97, 0, .25); background: var(--warn-bg); }
.note--warn svg { color: var(--warn); }

/* Empty state — an invitation to act */
.empty {
  text-align: center; padding: var(--s-7) var(--s-4);
  border: 1px dashed var(--line); border-radius: var(--radius-lg);
  background: var(--surface);
}
.empty h3 { margin-bottom: var(--s-2); }
.empty p { color: var(--ink-muted); max-width: 46ch; margin-inline: auto; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy); color: rgba(255, 255, 255, .78);
  padding: var(--s-7) 0 var(--s-5);
  margin-top: var(--s-8);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-6);
  padding-bottom: var(--s-6); border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.site-footer h4 {
  color: #fff; font-size: .9375rem; font-family: var(--body);
  font-weight: 600; margin-bottom: var(--s-3);
}
.site-footer img { height: 40px; width: auto; margin-bottom: var(--s-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--s-2); }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; font-size: .9375rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between;
  padding-top: var(--s-4); font-size: .8125rem; color: rgba(255, 255, 255, .6);
}
.socials { display: flex; gap: var(--s-2); }
.socials a {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.socials a:hover { background: var(--blue); border-color: var(--blue); }
.socials svg { width: 16px; height: 16px; }

/* ==========================================================================
   Race lifecycle — razpis (entries open / start lists) → rezultati
   Same contract as data-roles: data-states="rezultati" limits an element to
   that state; no attribute means it shows in both. The state lives on <body>
   in the HTML, so the page renders correctly with JS off; the banner switch
   only flips the attribute.
   ========================================================================== */
body[data-state="razpis"]    [data-states]:not([data-states~="razpis"]),
body[data-state="rezultati"] [data-states]:not([data-states~="rezultati"]) {
  display: none !important;
}

/* Prototype switches inside the navy banner — the role switch's segmented
   control, inverted for a dark surface. */
.banner-role { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.banner-state {
  display: flex; gap: var(--s-2); align-items: center; margin-left: auto;
  color: rgba(255, 255, 255, .7);
}
.banner-state .role-seg { border-color: rgba(255, 255, 255, .3); }
.banner-state .role-seg label { color: rgba(255, 255, 255, .75); }
.banner-state .role-seg label:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.banner-state .role-seg input:checked + label { background: #fff; color: var(--navy); }

/* Results summary at the top of a finished race.
   Header is a two-column grid: title + status left, actions right, both
   top-aligned. Below 720px it stacks and the two actions share one row. */
.results-top {
  border-bottom: 1px solid var(--line);
  padding: var(--s-6) 0;
}
.results-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-4) var(--s-6); align-items: start;
  margin-bottom: var(--s-5);
}
.results-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.results-status {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center;
  font-size: .875rem; color: var(--ink-muted); margin: var(--s-3) 0 0; max-width: 62ch;
}
.results-status b { color: var(--navy); font-weight: 600; }
.winner-time { font-family: var(--mono); font-size: .875rem; color: var(--navy); white-space: nowrap; }
.winner-club { display: block; font-size: .8125rem; color: var(--ink-muted); margin-top: 2px; }
/* The table scrolls sideways on phones (.table-scroll); a name split over two
   lines reads worse than a wider row. */
.results-top .schedule td { white-space: nowrap; }
.results-top .schedule th:last-child, .results-top .schedule td:last-child { text-align: right; width: 1%; }
.results-top .schedule td:last-child a { font-weight: 500; color: var(--blue); }

/* ==========================================================================
   Season standings — "Lestvica"
   ========================================================================== */
/* The one thing a visitor needs first: when did this table last move. */
.updated {
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); align-items: center;
}
.updated-stamp { display: flex; flex-direction: column; gap: 2px; }
.updated-stamp span { font-size: .8125rem; font-weight: 600; color: var(--ink-muted); }
.updated-stamp b {
  font-family: var(--display); font-weight: 700; letter-spacing: -.01em;
  font-size: 1.375rem; color: var(--navy); line-height: 1.1;
}
.updated-facts {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center;
  font-size: .875rem; color: var(--ink-muted);
}
.updated-facts b { color: var(--navy); }
.updated-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-left: auto; }

/* Change log — a sequence of real events, so dates are information. */
.history { list-style: none; margin: 0; padding: 0; }
.history li {
  display: grid; grid-template-columns: 180px 1fr; gap: var(--s-3);
  padding: var(--s-2) 0; border-bottom: 1px solid var(--line); font-size: .9375rem;
}
.history li:last-child { border-bottom: 0; }
.history time { font-family: var(--mono); font-size: .875rem; color: var(--ink-muted); white-space: nowrap; }

/* Rank movement since the previous update. Arrow + number + hidden words,
   so colour is never the only carrier. */
.delta {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: .8125rem; font-weight: 700; white-space: nowrap;
}
.delta svg { width: 12px; height: 12px; flex: none; }
.delta--up   { color: var(--ok); }
.delta--down { color: var(--err); }
.delta--same { color: var(--ink-muted); font-weight: 500; }

.pts { font-weight: 700; color: var(--navy); font-size: 1.0625rem; }
.pts--race { font-weight: 500; color: var(--ink-muted); font-size: .9375rem; }
.pts--none { font-weight: 400; color: var(--ink-muted); }
.standings th.num, .standings td.num { text-align: right; }

/* ==========================================================================
   Calendar filter — podlaga → tehnika → vrsta tekme
   Three groups in a strict order: the later groups count only the races the
   earlier groups still allow, and options that would leave nothing are
   disabled rather than hidden. Without JS every race stays visible.
   ========================================================================== */
.filters {
  display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); align-items: flex-start;
  padding: var(--s-4); margin-bottom: var(--s-4);
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
}
.filter { position: relative; border: 0; padding: 0; margin: 0; min-width: 0; }
.filter legend {
  font-size: .8125rem; font-weight: 600; color: var(--ink-muted);
  padding: 0; margin-bottom: var(--s-2);
}
.seg { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  font-size: .9375rem; font-weight: 500; color: var(--navy); cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.seg label b { font-size: .75rem; font-weight: 700; color: var(--ink-muted); }
.seg label:hover { border-color: var(--blue); color: var(--blue); }
.seg input:checked + label { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg input:checked + label b { color: rgba(255, 255, 255, .8); }
.seg input:checked + label .tech { background: rgba(255, 255, 255, .18); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }
.seg input:disabled + label { opacity: .45; cursor: not-allowed; }
.seg input:disabled + label:hover { border-color: var(--line); color: var(--navy); }

.filters-foot {
  flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: var(--s-3); align-items: center;
  padding-top: var(--s-3); border-top: 1px solid var(--line);
  font-size: .875rem; color: var(--ink-muted);
}
.filters-foot b { color: var(--navy); }
.link-btn {
  background: none; border: 0; padding: 0; min-height: 44px;
  color: var(--blue); font-weight: 500; text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer;
}
.link-btn:hover { color: var(--blue-deep); }

/* Technique code — K / P is how the sport writes it on every bulletin. Always
   accompanied by the full word, like .cat-code. */
.tech {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
  font-family: var(--display); font-weight: 700; font-size: .75rem; line-height: 1;
  background: var(--surface-2); color: var(--navy);
}
.race-facts .tech { margin-right: -2px; }
.hero .tech { background: rgba(255, 255, 255, .18); color: #fff; }

/* ==========================================================================
   Motion — Level 1 baseline, Level 2 reveal used on the homepage hero only
   ========================================================================== */
/* Scoped to .js so content is NEVER hidden when JS is unavailable.
   Reserved for decorative elements only — never for core content
   (see design-plan.md, Part 4: the race list and start lists do not reveal). */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1240px) {
  .role-switch-label { display: none; }
  .header-inner { gap: var(--s-4); }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .paths { grid-template-columns: 1fr; }
  .form-layout { grid-template-columns: 1fr; gap: var(--s-5); }
  .form-aside { position: static; }
}

@media (max-width: 720px) {
  :root { --s-8: 64px; --s-7: 48px; }
  .container { padding-inline: var(--s-3); }

  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: var(--s-2) var(--s-3) var(--s-4);
  }
  .nav[data-open] { display: flex; }
  .nav a { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
  .lang { padding-top: var(--s-3); }

  .race { grid-template-columns: 64px 1fr; row-gap: var(--s-3); }
  .race-date { padding-right: var(--s-2); }
  .race-day { font-size: 2rem; }
  .race-action { grid-column: 1 / -1; text-align: left; }
  .race-action .btn { width: 100%; }

  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: var(--s-4); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .form-actions .btn { width: 100%; }

  .mountain-anchor::after { width: 100%; opacity: .1; }

  .banner-state { margin-left: 0; flex-basis: 100%; }
  .banner-role > span { display: none; } /* the role name alone is enough on a phone */
  .deadline { flex-wrap: wrap; }
  .results-head { grid-template-columns: 1fr; gap: var(--s-4); }
  /* Category summary on phones: code + title + chevron on one row, the facts
     on their own line beneath, instead of three ragged wraps. */
  .cat-block > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-2) var(--s-3); align-items: center; }
  .cat-block > summary .cat-code { grid-column: 1; grid-row: 1; }
  .cat-title { grid-column: 2; grid-row: 1; }
  .cat-chevron { grid-column: 3; grid-row: 1; }
  /* A status pill instead of a category code: give the title the full first
     row and drop the pill under the facts. */
  .cat-block > summary:not(:has(.cat-code)) .cat-title { grid-column: 1 / 3; }
  .cat-block > summary > .pill { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
  .cat-facts { grid-column: 1 / -1; margin-left: 0; gap: var(--s-2) var(--s-3); }
  .results-actions .btn { flex: 1 1 auto; }
  .col-opt { display: none; }
  .hero-meta { gap: var(--s-1) var(--s-3); }
  .updated-actions { margin-left: 0; }
  .history li { grid-template-columns: 1fr; gap: 2px; }
  .filters { gap: var(--s-4); padding: var(--s-3); }
}
