/* ==========================================================================
   Ambrilindo Design System — "Broadcast" (landing redesign, Phase 0, rev 3 - Lexend)
   Source of truth: docs/landing-redesign/DESIGN-SYSTEM.md

   Dark, flat, square, rule-lined; Lexend type in normal case (rev 3). High-contrast text only.
   OPT-IN ONLY: nothing applies until a page adds `ds` to its body class:
       {% block body_class %}ds{% endblock %}
   Tokens are --a-*, components .a-*; never collide with legacy styles.css
   (--cal-*, .dojo-*, .cal-*) or Bootstrap (--bs-*). Bootstrap stays data-bs-theme="dark".
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Neutrals — flat greys, no blue tint, no transparency for surfaces */
  --a-bg: #0A0A0A;            /* page */
  --a-surface: #121212;       /* cards, tables */
  --a-surface-2: #1C1C1C;     /* zebra, inputs, hover */
  --a-black: #000000;         /* .a-band strips, hero */
  --a-rule: #262626;          /* 1px dividers, card borders */
  --a-rule-strong: #3A3A3A;   /* input borders, secondary buttons */
  --a-ink: #FAFAFA;           /* headings, primary data   18.9:1 on bg */
  --a-text: #EDEDED;          /* body                      >= 14.6:1 on every surface */
  --a-muted: #CFCFCF;         /* secondary text            >= 10.9:1 — the dimmest text allowed. NO dim text, ever. */
  --a-placeholder: #BDBDBD;   /* input placeholders        >= 9:1 */
  --a-scrim: rgba(0, 0, 0, 0.6); /* translucent black over thumbnails (gallery upload tiles); never behind body text */
  --a-faint: #525252;         /* icons/dividers only, never text */

  /* Brand red */
  --a-red: #FF8A8A;           /* red TEXT/links/icons      >= 7.5:1 on every surface */
  --a-red-fill: #B91C1C;      /* buttons, solid fills      white on it 6.47:1 */
  --a-red-fill-hover: #C81E1E;
  --a-red-bright: #EF4444;    /* decoration: rules, bars, live dot */
  --a-red-tint: rgba(239, 68, 68, 0.16);
  --a-on-red: #FFFFFF;

  /* Medals — fill + text pairs (text versions are for dark surfaces) */
  --a-gold: #F5C542;   --a-gold-text: #F5C542;   --a-gold-tint: rgba(245, 197, 66, 0.14);
  --a-silver: #CBD5E1; --a-silver-text: #CBD5E1; --a-silver-tint: rgba(203, 213, 225, 0.12);
  --a-bronze: #D99058; --a-bronze-text: #E8A877; --a-bronze-tint: rgba(217, 144, 88, 0.16);
  --a-on-medal: #0A0A0A;

  /* Match sides */
  --a-aka: #FF8A8A;
  --a-ao: #93C5FD;            /* >= 9.4:1 */
  --a-ao-tint: rgba(147, 197, 253, 0.14);

  /* Status */
  --a-live: #EF4444;
  --a-upcoming: #93C5FD;
  --a-success: #4ADE80;  --a-success-tint: rgba(74, 222, 128, 0.12);
  --a-warning: #FBBF24;  --a-warning-tint: rgba(251, 191, 36, 0.12);
  --a-done: #CFCFCF;

  /* Typography */
  --a-font-display: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --a-font-body: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --a-fs-xs: 0.8125rem;   /* 13 — minimum for any text */
  --a-fs-sm: 0.875rem;    /* 14 */
  --a-fs-base: 1rem;      /* 16 — body */
  --a-fs-lg: 1.125rem;    /* 18 — lead */
  --a-fs-h4: 1.25rem;     /* 20 */
  --a-fs-h3: 1.625rem;    /* 26 */
  --a-fs-h2: clamp(1.875rem, 1.4rem + 1.9vw, 2.75rem);  /* 30–44 */
  --a-fs-h1: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);     /* 40–72 */
  --a-fs-display: clamp(2.75rem, 1.5rem + 5vw, 5.75rem); /* 44–92 hero only */
  --a-lh-tight: 1.05;
  --a-lh-snug: 1.2;
  --a-track-display: -0.03em; /* Lexend is wide: tighten large type */
  --a-lh-body: 1.6;
  --a-track-caps: 0.06em;     /* tracking for small uppercase labels */

  /* Spacing (4px base) */
  --a-space-1: 4px;  --a-space-2: 8px;  --a-space-3: 12px; --a-space-4: 16px;
  --a-space-5: 24px; --a-space-6: 32px; --a-space-7: 48px; --a-space-8: 64px;
  --a-space-9: 96px; --a-space-10: 128px;
  --a-section-y: clamp(64px, 6vw + 32px, 128px);

  /* Shape — square. The only radius is 2px on controls (anti-alias softening). */
  --a-radius: 0;
  --a-radius-ctl: 2px;
  --a-rule-w: 1px;
  --a-bar-w: 4px;             /* red accent bars */

  /* Depth — none. Elevation = lighter surface + rule, never shadow or glow. */
  --a-ring: 0 0 0 2px var(--a-bg), 0 0 0 4px var(--a-red-bright);

  /* Motion — quick, linear-ish, broadcast "cut" feel */
  --a-ease-out: cubic-bezier(0.2, 0.9, 0.3, 1);
  --a-dur-1: 100ms;  /* hover color, press */
  --a-dur-2: 180ms;  /* wipes, underlines */
  --a-dur-3: 280ms;  /* reveal */

  --a-nav-h: 64px;
}

/* ---------- 2. Base (scoped to opted-in pages) ---------- */
body.ds {
  /* Map Bootstrap's dark-theme variables to ours */
  --bs-body-bg: var(--a-bg);
  --bs-body-color: var(--a-text);
  --bs-body-font-family: var(--a-font-body);
  --bs-body-font-size: var(--a-fs-base);
  --bs-body-line-height: var(--a-lh-body);
  --bs-emphasis-color: var(--a-ink);
  --bs-secondary-color: var(--a-muted);
  --bs-tertiary-bg: var(--a-surface);
  --bs-border-color: var(--a-rule);
  --bs-border-radius: 0;
  --bs-border-radius-sm: 0;
  --bs-border-radius-lg: 0;
  --bs-link-color: var(--a-red);
  --bs-link-color-rgb: 255, 138, 138;
  --bs-link-hover-color: var(--a-ink);
  --bs-link-hover-color-rgb: 250, 250, 250;
  --bs-primary: var(--a-red-fill);
  --bs-primary-rgb: 185, 28, 28;
  --bs-danger: var(--a-red);
  --bs-danger-rgb: 255, 138, 138;
  --bs-focus-ring-color: rgba(239, 68, 68, 0.5);

  background: var(--a-bg);
  color: var(--a-text);
  font-family: var(--a-font-body);
  font-size: var(--a-fs-base);
  line-height: var(--a-lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: dark;
}
/* Element defaults use :where() so .a-* components (e.g. <a class="a-btn">) always override them. */
:where(body.ds) h1, :where(body.ds) h2, :where(body.ds) h3, :where(body.ds) h4, :where(body.ds) h5, :where(body.ds) h6,
:where(body.ds) .a-display {
  font-family: var(--a-font-display);
  color: var(--a-ink);
  font-weight: 700;
  letter-spacing: 0;
  line-height: var(--a-lh-snug);
  text-wrap: balance;
}
:where(body.ds) h1 { font-size: var(--a-fs-h1); font-weight: 700; line-height: var(--a-lh-tight); letter-spacing: var(--a-track-display); }
:where(body.ds) h2 { font-size: var(--a-fs-h2); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
:where(body.ds) h3 { font-size: var(--a-fs-h3); font-weight: 600; letter-spacing: -0.015em; }
:where(body.ds) h4 { font-size: var(--a-fs-h4); font-weight: 600; letter-spacing: -0.01em; }
:where(body.ds) p { color: inherit; text-wrap: pretty; }
:where(body.ds) a { color: var(--a-red); text-underline-offset: 3px; transition: color var(--a-dur-1); }
:where(body.ds) a:hover, :where(body.ds) a:focus { color: var(--a-ink); }
:where(body.ds) :focus-visible { outline: 2px solid var(--a-red-bright); outline-offset: 2px; }
body.ds .a-num { font-variant-numeric: tabular-nums lining-nums; }
:where(body.ds) ::selection { background: var(--a-red-fill); color: #fff; }

/* Page canvas + Bootstrap text utilities (were overrides for the legacy styles.css, removed in Phase 10;
   still needed: html has no background of its own, and the utilities must stay high-contrast) */
html:has(body.ds) { background-color: var(--a-bg); }
body.ds { position: relative; overflow-x: hidden; }   /* no sideways scroll from wide decoration (was in styles.css) */
body.ds .text-muted, body.ds .text-secondary { color: var(--a-muted) !important; }
body.ds .text-dark { color: var(--a-ink) !important; }

/* ---------- 3. Layout ---------- */
.a-section { padding-block: var(--a-section-y); }
.a-section--tight { padding-block: var(--a-space-7); }
.a-section--alt { background: var(--a-surface); }
.a-section--ruled { border-top: var(--a-rule-w) solid var(--a-rule); }
/* Pure-black strip (hero, CTA, footer, ticker). Hairline rules top/bottom. */
.a-band { background: var(--a-black); border-block: var(--a-rule-w) solid var(--a-rule); }
.a-stack > * + * { margin-top: var(--a-space-4); }
.a-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--a-space-2); }
.a-rule { height: var(--a-rule-w); background: var(--a-rule); border: 0; margin: var(--a-space-5) 0; opacity: 1; }
.a-redbar { display: block; width: 56px; height: var(--a-bar-w); background: var(--a-red-bright); }

/* Section heading: eyebrow (small caps label, red marker) + large h2, ruled underneath */
.a-eyebrow {
  display: inline-flex; align-items: center; gap: var(--a-space-2);
  font-family: var(--a-font-display); font-weight: 600; font-size: var(--a-fs-xs);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--a-ink);
}
.a-eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--a-red-bright); }
.a-lead { font-size: var(--a-fs-lg); color: var(--a-text); max-width: 60ch; }   /* taglines are never dimmed */
.a-section-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--a-space-4);
  padding-bottom: var(--a-space-5); margin-bottom: var(--a-space-6); border-bottom: var(--a-rule-w) solid var(--a-rule);
}
.a-section-head h2 { margin: var(--a-space-3) 0 0; }

/* Page header for inner pages (Phase 3+): black band under the fixed nav, eyebrow + h1 + lead */
.a-pagehead { background: var(--a-black); border-bottom: var(--a-rule-w) solid var(--a-rule); padding-block: clamp(40px, 4vw + 16px, 80px) clamp(32px, 3vw + 16px, 56px); }
.a-pagehead h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem); margin: var(--a-space-4) 0 var(--a-space-3); }
.a-pagehead .a-lead { margin: 0; }
.a-pagehead__row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--a-space-5); }

/* ---------- 4. Buttons ---------- */
.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--a-space-2);
  min-height: 48px; padding: 12px 24px;
  font-family: var(--a-font-display); font-weight: 600; font-size: 0.9375rem;
  text-transform: uppercase; letter-spacing: var(--a-track-caps); line-height: 1;
  border: var(--a-rule-w) solid transparent; border-radius: var(--a-radius-ctl);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--a-dur-1), color var(--a-dur-1), border-color var(--a-dur-1);
}
.a-btn:disabled, .a-btn[aria-disabled="true"] { background: var(--a-surface-2); color: var(--a-muted); border-color: var(--a-rule-strong); pointer-events: none; }   /* no opacity fade: stays readable */
.a-btn .bi { font-size: 1.1em; }
.a-btn--primary { background: var(--a-red-fill); color: var(--a-on-red); }
.a-btn--primary:hover, .a-btn--primary:focus { background: var(--a-red-fill-hover); color: var(--a-on-red); }
.a-btn--secondary { background: transparent; color: var(--a-ink); border-color: var(--a-rule-strong); }
.a-btn--secondary:hover, .a-btn--secondary:focus { border-color: var(--a-ink); color: var(--a-ink); }
.a-btn--ghost { background: transparent; color: var(--a-ink); padding-inline: 12px; }
.a-btn--ghost:hover, .a-btn--ghost:focus { color: var(--a-red); }
/* Arrow link-button: text + → that slides on hover (motion disabled under reduced motion) */
.a-btn--arrow::after { content: "\2192"; font-family: var(--a-font-body); transition: transform var(--a-dur-2) var(--a-ease-out); }
.a-btn--arrow:hover::after { transform: translateX(4px); }
.a-btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.8125rem; }
.a-btn--lg { min-height: 56px; padding: 16px 30px; font-size: 1rem; }
.a-btn--block { width: 100%; }
.a-icon-btn { min-width: 44px; min-height: 44px; padding: 0; }

/* Button group: side by side from 768px; below that, stacked full-width at equal size (no ragged wrap) */
.a-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
@media (max-width: 767.98px) {
  .a-actions { flex-direction: column; }
  .a-actions > .a-btn { width: 100%; }
}

/* ---------- 5. Cards / panels (flat, ruled, square) ---------- */
.a-card { background: var(--a-surface); border: var(--a-rule-w) solid var(--a-rule); border-radius: var(--a-radius); overflow: hidden; }
.a-card__body { padding: var(--a-space-5); }
.a-card__media { aspect-ratio: 16 / 9; background: var(--a-surface-2); overflow: hidden; border-bottom: var(--a-rule-w) solid var(--a-rule); }
.a-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.a-card__title { font-family: var(--a-font-display); font-size: var(--a-fs-h4); font-weight: 600; color: var(--a-ink); line-height: var(--a-lh-snug); letter-spacing: -0.01em; margin: 0; }
.a-card__meta { font-size: var(--a-fs-sm); color: var(--a-muted); }
.a-card--link { position: relative; transition: border-color var(--a-dur-1), background-color var(--a-dur-1); }
.a-card--link::before { /* red bar wipes in on hover */
  content: ""; position: absolute; left: 0; top: 0; height: var(--a-bar-w); width: 100%; background: var(--a-red-bright);
  transform: scaleX(0); transform-origin: left; transition: transform var(--a-dur-2) var(--a-ease-out); z-index: 2;
}
.a-card--link:hover { border-color: var(--a-rule-strong); background: var(--a-surface-2); }
.a-card--link:hover::before { transform: scaleX(1); }
.a-card--link .a-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* whole card clickable, one link */
.a-card--accent { border-top: var(--a-bar-w) solid var(--a-red-bright); }

/* Stat / scoreboard numbers */
.a-stat { display: flex; flex-direction: column; gap: 4px; }
.a-stat__value { font-family: var(--a-font-display); font-weight: 700; font-size: 2.5rem; line-height: 1; letter-spacing: -0.03em; color: var(--a-ink); font-variant-numeric: tabular-nums; }
.a-stat__label { font-family: var(--a-font-display); font-size: var(--a-fs-xs); color: var(--a-muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
/* Dividers are the 1px grid gap showing the rule colour, so they stay correct when items wrap */
.a-statline { --a-statline-bg: var(--a-bg); display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--a-rule-w); background: var(--a-rule); border: var(--a-rule-w) solid var(--a-rule); }
.a-statline > * { padding: var(--a-space-5); background: var(--a-statline-bg); }
.a-band .a-statline { --a-statline-bg: var(--a-black); }
.a-section--alt .a-statline, .a-card .a-statline { --a-statline-bg: var(--a-surface); }

/* ---------- 6. Tags, badges ---------- */
/* Status tag — square, small caps, text + marker, never color alone */
.a-chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  min-height: 26px; padding: 3px 8px; border-radius: var(--a-radius-ctl);
  font-family: var(--a-font-display); font-size: var(--a-fs-xs); font-weight: 600; line-height: 1.2;
  text-transform: uppercase; letter-spacing: var(--a-track-caps);
  background: var(--a-surface-2); color: var(--a-text); border: var(--a-rule-w) solid var(--a-rule);
}
.a-chip__dot { width: 8px; height: 8px; background: currentColor; flex: none; }  /* square marker */
.a-chip--live { background: var(--a-red-fill); color: #fff; border-color: transparent; }
.a-chip--live .a-chip__dot { border-radius: 50%; animation: a-blink 1.2s steps(2, jump-none) infinite; }
.a-chip--upcoming { background: var(--a-ao-tint); color: var(--a-upcoming); border-color: transparent; }
.a-chip--done { color: var(--a-done); background: transparent; }
.a-chip--success { background: var(--a-success-tint); color: var(--a-success); border-color: transparent; }
.a-chip--warning { background: var(--a-warning-tint); color: var(--a-warning); border-color: transparent; }

/* Tier badge (Nasional / Provinsi / Kab-Kota / Open) */
.a-tier {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 3px 8px; border-radius: var(--a-radius-ctl);
  font-family: var(--a-font-display); font-weight: 700; font-size: var(--a-fs-xs);
  text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--a-ink); color: var(--a-bg);
}
.a-tier--outline { background: transparent; color: var(--a-ink); box-shadow: inset 0 0 0 1px var(--a-ink); }

/* Medal counts */
.a-medals { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.a-medal {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 2px 8px 2px 2px; border-radius: var(--a-radius-ctl);
  font-family: var(--a-font-display); font-weight: 600; font-size: var(--a-fs-sm); font-variant-numeric: tabular-nums;
}
.a-medal::before { content: ""; width: 18px; height: 18px; flex: none; }
.a-medal--gold { background: var(--a-gold-tint); color: var(--a-gold-text); }
.a-medal--gold::before { background: var(--a-gold); }
.a-medal--silver { background: var(--a-silver-tint); color: var(--a-silver-text); }
.a-medal--silver::before { background: var(--a-silver); }
.a-medal--bronze { background: var(--a-bronze-tint); color: var(--a-bronze-text); }
.a-medal--bronze::before { background: var(--a-bronze); }

/* Event ranking points: medal icon + number (partials/event_points.html) */
.a-pts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.a-pt { display: inline-flex; align-items: center; gap: 6px; font: 600 0.9375rem/1 var(--a-font-display); color: var(--a-ink); font-variant-numeric: tabular-nums; }
.a-pt__icon { width: 15px; height: 20px; fill: currentColor; flex: none; }
.a-pt--gold .a-pt__icon { color: var(--a-gold); }
.a-pt--silver .a-pt__icon { color: var(--a-silver); }
.a-pt--bronze .a-pt__icon { color: var(--a-bronze); }
.a-pt.is-zero { color: var(--a-muted); }                       /* number stays readable (10.9:1) */
.a-pt.is-zero .a-pt__icon { color: var(--a-rule-strong); }      /* only the decorative icon is quiet */
.a-pts__unit { font: 400 0.9375rem/1 var(--a-font-body); color: var(--a-text); margin-left: -4px; }

/* Rank number — zero-padded broadcast style is done in the template ("01") */
.a-rank {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px;
  background: var(--a-surface-2); color: var(--a-ink);
  font-family: var(--a-font-display); font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums;
}
.a-rank--1 { background: var(--a-gold); color: var(--a-on-medal); }
.a-rank--2 { background: var(--a-silver); color: var(--a-on-medal); }
.a-rank--3 { background: var(--a-bronze); color: var(--a-on-medal); }

/* Aka / Ao side markers */
.a-side { display: inline-flex; align-items: center; gap: 6px; font-family: var(--a-font-display); font-weight: 700; font-size: var(--a-fs-xs); text-transform: uppercase; letter-spacing: 0.1em; }
.a-side::before { content: ""; width: var(--a-bar-w); height: 18px; background: currentColor; }
.a-side--aka { color: var(--a-aka); }
.a-side--ao { color: var(--a-ao); }

/* ---------- 7. Tables — scoreboard rows ---------- */
.a-table-wrap { background: var(--a-surface); border: var(--a-rule-w) solid var(--a-rule); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.a-table { width: 100%; border-collapse: collapse; font-size: var(--a-fs-base); color: var(--a-text); }
.a-table th {
  background: var(--a-black);
  font-family: var(--a-font-display); font-weight: 600; font-size: var(--a-fs-xs);
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--a-muted);
  text-align: left; padding: 12px 16px; border-bottom: var(--a-rule-w) solid var(--a-rule); white-space: nowrap;
}
.a-table td { padding: 14px 16px; border-bottom: var(--a-rule-w) solid var(--a-rule); vertical-align: middle; }
.a-table tbody tr:last-child td { border-bottom: 0; }
.a-table tbody tr { transition: background-color var(--a-dur-1); }
.a-table tbody tr:hover { background: var(--a-surface-2); }
.a-table th.is-num { text-align: right; }
.a-table td.is-num { text-align: right; font-family: var(--a-font-display); font-weight: 600; font-size: 1.0625rem; font-variant-numeric: tabular-nums; color: var(--a-ink); }
.a-table .a-name { font-family: var(--a-font-body); font-weight: 600; font-size: 1rem; color: var(--a-ink); }
.a-table .a-sub { display: block; font-size: var(--a-fs-sm); color: var(--a-muted); }
.a-table tr.is-top td:first-child { box-shadow: inset var(--a-bar-w) 0 0 var(--a-gold); }
/* Below 576px: stacked rows. First cell = rank (left), last cell = value (top right), others stack in the middle. */
@media (max-width: 575.98px) {
  .a-table--stack thead { display: none; }
  .a-table--stack, .a-table--stack tbody, .a-table--stack td { display: block; width: 100%; }
  .a-table--stack tr { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: start; padding: 12px 14px; border-bottom: var(--a-rule-w) solid var(--a-rule); }
  .a-table--stack tbody tr:last-child { border-bottom: 0; }
  .a-table--stack td { padding: 0; border: 0; min-width: 0; }
  .a-table--stack td:first-child { grid-column: 1; grid-row: 1 / span 3; }
  .a-table--stack td:last-child { grid-column: 3; grid-row: 1; text-align: right; }
  .a-table--stack tr.is-top { box-shadow: inset var(--a-bar-w) 0 0 var(--a-gold); }
  .a-table--stack tr.is-top td:first-child { box-shadow: none; }
  .a-table--stack td[data-label]::before { content: attr(data-label) " "; color: var(--a-muted); font-size: var(--a-fs-xs); }
}

/* ---------- 8. Podium (top 3) ---------- */
.a-podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: var(--a-space-2); }
.a-podium__slot { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--a-space-2); min-width: 0; }
.a-podium__slot--1 { order: 2; } .a-podium__slot--2 { order: 1; } .a-podium__slot--3 { order: 3; }
.a-podium__avatar { width: 72px; height: 72px; object-fit: cover; background: var(--a-surface-2); border: 2px solid var(--a-rule-strong); display: grid; place-items: center; font-family: var(--a-font-display); font-weight: 700; font-size: 1.375rem; color: var(--a-muted); }
.a-podium__slot--1 .a-podium__avatar { width: 96px; height: 96px; border-color: var(--a-gold); }
.a-podium__name { font-family: var(--a-font-display); font-weight: 600; font-size: 1.125rem; color: var(--a-ink); line-height: 1.2; letter-spacing: -0.01em; max-width: 100%; overflow-wrap: anywhere; }
.a-podium__team { font-size: var(--a-fs-sm); color: var(--a-muted); }
.a-podium__block {
  width: 100%; display: grid; place-items: center;
  font-family: var(--a-font-display); font-weight: 700; color: var(--a-on-medal); font-size: 3rem; line-height: 1;
}
.a-podium__slot--1 .a-podium__block { height: 150px; background: var(--a-gold); }
.a-podium__slot--2 .a-podium__block { height: 108px; background: var(--a-silver); }
.a-podium__slot--3 .a-podium__block { height: 80px; background: var(--a-bronze); }
.a-podium__points { font-family: var(--a-font-display); font-size: 1rem; font-weight: 600; color: var(--a-ink); font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) {
  .a-podium__avatar { width: 52px; height: 52px; font-size: 1.1rem; }
  .a-podium__slot--1 .a-podium__avatar { width: 64px; height: 64px; }
  .a-podium__name { font-size: 0.875rem; }
  .a-podium__block { font-size: 2rem; }
  .a-podium__slot--1 .a-podium__block { height: 104px; }
  .a-podium__slot--2 .a-podium__block { height: 74px; }
  .a-podium__slot--3 .a-podium__block { height: 56px; }
}

/* ---------- 9. Forms ---------- */
.a-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--a-space-4); }
.a-label { font-family: var(--a-font-display); font-weight: 600; font-size: var(--a-fs-sm); color: var(--a-ink); }
.a-input, body.ds .form-control, body.ds .form-select {
  min-height: 48px; padding: 12px 14px; width: 100%;
  font: inherit; font-size: var(--a-fs-base); color: var(--a-ink);
  background: var(--a-surface-2); border: var(--a-rule-w) solid var(--a-rule-strong); border-radius: var(--a-radius-ctl);
  transition: border-color var(--a-dur-1), box-shadow var(--a-dur-1);
}
.a-input::placeholder, body.ds .form-control::placeholder { color: var(--a-placeholder); opacity: 1; }
.a-input:focus, body.ds .form-control:focus, body.ds .form-select:focus { outline: none; border-color: var(--a-red-bright); box-shadow: inset 0 -2px 0 var(--a-red-bright); background: var(--a-surface-2); color: var(--a-ink); }
.a-input[aria-invalid="true"], body.ds .form-control.is-invalid { border-color: var(--a-red); }
.a-help { font-size: var(--a-fs-xs); color: var(--a-muted); }
.a-error { font-size: var(--a-fs-sm); color: var(--a-red); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.a-search { position: relative; display: block; }
.a-search .bi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--a-muted); pointer-events: none; }
.a-search .a-input { padding-left: 42px; }

/* ---------- 10. Tabs (skin Bootstrap .nav-link; keep data-bs-* attributes) ---------- */
.a-tabs { display: flex; gap: var(--a-space-6); border-bottom: var(--a-rule-w) solid var(--a-rule); overflow-x: auto; scrollbar-width: none; }
.a-tabs .nav-link {
  padding: 14px 0; border: 0; border-bottom: var(--a-bar-w) solid transparent; margin-bottom: -1px; background: none; white-space: nowrap; border-radius: 0;
  font-family: var(--a-font-display); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: var(--a-track-caps);
  color: var(--a-muted);
}
.a-tabs .nav-link:hover { color: var(--a-ink); }
.a-tabs .nav-link.active { color: var(--a-ink); border-bottom-color: var(--a-red-bright); background: none; }
/* Segmented control (e.g. Atlet / Kontingen switch) */
.a-segment { display: inline-flex; border: var(--a-rule-w) solid var(--a-rule-strong); flex-wrap: wrap; }
.a-segment .nav-link, .a-segment__item {
  min-height: 44px; padding: 8px 18px; border: 0; border-radius: 0;
  font-family: var(--a-font-display); font-weight: 600; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: var(--a-track-caps);
  color: var(--a-muted); background: transparent; cursor: pointer;
  transition: background-color var(--a-dur-1), color var(--a-dur-1);
}
.a-segment .nav-link:hover, .a-segment__item:hover { color: var(--a-ink); }
.a-segment .nav-link.active, .a-segment__item[aria-selected="true"], .a-segment__item.is-active { background: var(--a-ink); color: var(--a-bg); }

/* Full-width segmented switch on small screens: equal halves, sits on its own row */
@media (max-width: 767.98px) {
  .a-segment--fluid { display: flex; width: 100%; }
  .a-segment--fluid > .nav-item, .a-segment--fluid > .a-segment__item { flex: 1 1 0; }
  .a-segment--fluid .nav-link { width: 100%; }
}

/* ---------- 11. Modal (skin Bootstrap .modal) ---------- */
body.ds .modal { --bs-modal-bg: var(--a-surface); --bs-modal-color: var(--a-text); --bs-modal-border-color: var(--a-rule-strong); --bs-modal-border-radius: 0; --bs-modal-inner-border-radius: 0; --bs-modal-padding: var(--a-space-5); --bs-modal-header-border-color: var(--a-rule); --bs-modal-footer-border-color: var(--a-rule); }
body.ds .modal-backdrop { --bs-backdrop-bg: #000; --bs-backdrop-opacity: 0.8; }
body.ds .modal-content { border-top: var(--a-bar-w) solid var(--a-red-bright); }
body.ds .modal-title { font-family: var(--a-font-display); font-weight: 700; color: var(--a-ink); font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; }
body.ds .btn-close { width: 44px; height: 44px; padding: 0; }

/* ---------- 12. Pagination ---------- */
.a-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: var(--a-space-6) 0 0; }
.a-pagination a, .a-pagination span {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px;
  border: var(--a-rule-w) solid var(--a-rule-strong); background: transparent;
  color: var(--a-ink); font-family: var(--a-font-display); font-weight: 600; font-size: 1rem; text-decoration: none; font-variant-numeric: tabular-nums;
}
.a-pagination a:hover, .a-pagination a:focus { border-color: var(--a-ink); color: var(--a-ink); }
.a-pagination [aria-current="page"] { background: var(--a-red-fill); color: #fff; border-color: var(--a-red-fill); }
.a-pagination .is-disabled { color: var(--a-muted); border-color: var(--a-rule); pointer-events: none; }
.a-pagination__info { text-align: center; margin: var(--a-space-3) 0 0; font-size: var(--a-fs-sm); color: var(--a-muted); }

/* Countdown (main.js fills [data-unit] inside [data-countdown]; use with class "countdown a-countdown") */
.a-countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--a-rule); border: var(--a-rule-w) solid var(--a-rule); }
.a-countdown > div { background: var(--a-black); padding: 8px 4px; text-align: center; }
.a-countdown .countdown-number { display: block; font: 700 1.375rem/1 var(--a-font-display); color: var(--a-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.a-countdown .countdown-label { display: block; margin-top: 4px; font: 600 var(--a-fs-xs)/1 var(--a-font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--a-muted); }
.countdown-closed { display: block; font: 600 0.9375rem/1.4 var(--a-font-body); color: var(--a-ink); }
.a-countdown:has(.countdown-closed) { display: block; background: transparent; border: 0; }

/* ---------- 13. Empty state ---------- */
.a-empty { text-align: center; padding: var(--a-space-8) var(--a-space-5); border: var(--a-rule-w) dashed var(--a-rule-strong); background: var(--a-surface); }
.a-empty .bi { font-size: 2.25rem; color: var(--a-muted); }
.a-empty__title { font-family: var(--a-font-display); font-weight: 600; font-size: var(--a-fs-h4); color: var(--a-ink); margin: var(--a-space-3) 0 var(--a-space-1); }
.a-empty p { color: var(--a-muted); margin: 0 auto var(--a-space-4); max-width: 42ch; }

/* ---------- 14. Live, ticker, skeleton ---------- */
.a-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--a-live); animation: a-blink 1.2s steps(2, jump-none) infinite; }
/* Lower-third style label: black block + red block, e.g. [LIVE][TATAMI 2] */
.a-lowerthird { display: inline-flex; font-family: var(--a-font-display); font-weight: 600; text-transform: uppercase; letter-spacing: var(--a-track-caps); font-size: var(--a-fs-xs); line-height: 1; }
.a-lowerthird > * { padding: 8px 12px; }
.a-lowerthird > :first-child { background: var(--a-red-fill); color: #fff; }
.a-lowerthird > :last-child { background: var(--a-ink); color: var(--a-bg); }
.a-skeleton { background: linear-gradient(90deg, var(--a-surface-2) 25%, var(--a-rule) 50%, var(--a-surface-2) 75%); background-size: 200% 100%; animation: a-shimmer 1.4s linear infinite; }
@keyframes a-blink { 0% { opacity: 1; } 100% { opacity: 0.35; } }   /* the dot only, never text */
@keyframes a-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 14b. One-line page header + expanding search (Phase 7 feedback, 2026-11-26) ---------- */
/* Every inner page gets a brief header: eyebrow | h1 | compact facts/actions, all on one line. */
.a-pagebar { background: var(--a-black); border-bottom: var(--a-rule-w) solid var(--a-rule); }
.a-pagebar__row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; min-height: 76px; padding-block: 14px; }
.a-pagebar__title { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 auto; }
.a-pagebar__title .a-eyebrow { flex: none; padding-right: 16px; border-right: var(--a-rule-w) solid var(--a-rule-strong); }
.a-pagebar h1 { margin: 0; min-width: 0; font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.a-pagebar__side { display: flex; align-items: center; gap: 12px; flex: none; margin-left: auto; }
.a-pagebar__fact { margin: 0; white-space: nowrap; font-size: var(--a-fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--a-track-caps); color: var(--a-muted); }
.a-pagebar__fact strong { margin-right: 4px; font-size: 1.125rem; font-weight: 700; letter-spacing: 0; color: var(--a-ink); font-variant-numeric: tabular-nums; }
@media (max-width: 767.98px) {
  .a-pagebar__row { flex-wrap: nowrap; min-height: 60px; padding-block: 10px; gap: 12px; }   /* one line on phones: the title shrinks/wraps inside, the facts never drop */
  .a-pagebar__title { flex: 1 1 auto; }
  .a-pagebar h1 { font-size: 1.125rem; line-height: 1.25; }
  .a-pagebar__side { gap: 8px; }
  .a-pagebar__title .a-eyebrow { display: none; }
  .a-pagebar__btnlabel { display: none; }
}

/* Expanding search: a 44px search icon; activating it reveals the field with a left-to-right wipe
   (clip-path, not width). Needs a positioned host (.a-xsearch-host). JS: static/landing/js/xsearch.js.
   --end variant sits at the right edge and wipes right-to-left. */
.a-xsearch-host { position: relative; }
.a-xsearch__toggle {
  flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--a-surface); border: var(--a-rule-w) solid var(--a-rule-strong); border-radius: var(--a-radius-ctl);
  color: var(--a-ink); font-size: 1.05rem; cursor: pointer; transition: border-color var(--a-dur-1), background-color var(--a-dur-1);
}
.a-xsearch__toggle:hover, .a-xsearch__toggle:focus-visible { border-color: var(--a-ink); background: var(--a-surface-2); }
.a-xsearch.is-open .a-xsearch__toggle { visibility: hidden; }
.a-xsearch__panel {
  position: absolute; z-index: 5; top: var(--a-xsearch-top, 0); left: 0; width: min(100%, var(--a-xsearch-w, 520px)); height: 44px;
  display: flex; align-items: center;
  background: var(--a-surface-2); border: var(--a-rule-w) solid var(--a-ink); border-radius: var(--a-radius-ctl);
  clip-path: inset(0 100% 0 0); visibility: hidden;
  transition: clip-path var(--a-dur-2) var(--a-ease-out), visibility 0s linear var(--a-dur-2);
}
.a-xsearch.is-open .a-xsearch__panel { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path var(--a-dur-2) var(--a-ease-out), visibility 0s; }
.a-xsearch__panel:focus-within { border-color: var(--a-red-bright); box-shadow: inset 0 -2px 0 var(--a-red-bright); }
.a-xsearch__icon { flex: none; width: 44px; text-align: center; color: var(--a-ink); font-size: 1.05rem; }
.a-xsearch__input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; background: transparent; border: 0; color: var(--a-ink); font: 400 var(--a-fs-base) var(--a-font-body); }
.a-xsearch__input::placeholder { color: var(--a-placeholder); opacity: 1; }
.a-xsearch__input:focus { outline: none; }
.a-xsearch__input::-webkit-search-cancel-button { display: none; }
.a-xsearch__close { flex: none; width: 44px; height: 42px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--a-ink); cursor: pointer; }
.a-xsearch__close:hover, .a-xsearch__close:focus-visible { color: var(--a-red); }
.a-xsearch--end .a-xsearch__panel { left: auto; right: 0; clip-path: inset(0 0 0 100%); }
.a-xsearch--end.is-open .a-xsearch__panel { clip-path: inset(0 0 0 0); }
/* In the page bar the field opens IN the flow, never on top of the title (an overlay cut the title mid-word,
   user feedback 2026-11-26). xsearch.js marks the row with .has-open-search.
   >= 992px: the field (max 440px) replaces the count + icon on the right; the title stays whole.
   <  992px: the title and count step aside and the field takes the whole row. */
.a-pagebar__row.has-open-search .a-pagebar__fact,
.a-pagebar__row.has-open-search .a-xsearch__toggle { display: none; }
.a-pagebar__row.has-open-search .a-pagebar__side { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
.a-pagebar__row.has-open-search .a-xsearch { flex: 0 1 440px; min-width: 0; }
.a-pagebar__row.has-open-search .a-xsearch__panel { position: relative; top: auto; left: auto; right: auto; width: 100%; }
@media (max-width: 991.98px) {
  .a-pagebar__row.has-open-search .a-pagebar__title { display: none; }
  .a-pagebar__row.has-open-search .a-xsearch { flex: 1 1 auto; }
}

/* ---------- 15. Motion: reveal (hook into main.js observer) ---------- */
/* Slide only — never fade. Text must be full-contrast at every moment (user rule: no dim text),
   and a stalled transition must not leave content faded. */
.a-reveal { transform: translateY(12px); transition: transform var(--a-dur-3) var(--a-ease-out); }
.a-reveal.is-visible { transform: none; }
.no-js .a-reveal { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .a-reveal { transform: none; transition: none; }
  .a-card--link::before { transition: none; }
  .a-btn--arrow:hover::after { transform: none; }
  .a-chip--live .a-chip__dot, .a-live-dot, .a-skeleton { animation: none; }
  .a-xsearch__panel, .a-xsearch.is-open .a-xsearch__panel { transition: none; }
  body.ds *, body.ds *::before, body.ds *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- 16. Utilities ---------- */
.a-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.a-text-ink { color: var(--a-ink) !important; }
.a-text-muted { color: var(--a-muted) !important; }
.a-text-red { color: var(--a-red) !important; }
.a-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.a-upper { text-transform: uppercase; letter-spacing: var(--a-track-caps); }
.a-medalcount-none { color: var(--a-muted); font-weight: 600; }
