/* jcpelotas.com design system, copied 1:1 from the main site for promo.jcpelotas.com.
 * Order as on the main site: fonts → tokens → base → layout → components → wide → motion.
 * Do not edit here — change the main site and copy again. Promo-only rules live in promo.css. */

/* ===== fonts.css ===== */
/* Self-hosted Geist + Geist Mono (Google Fonts, OFL). Both are variable fonts: one file
 * per family and subset covers every weight the site uses (400–700), so each face is
 * downloaded once instead of once per weight. */
@font-face{font-family:'Geist';font-style:normal;font-weight:400 700;font-display:swap;src:url('../fonts/geist-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Geist';font-style:normal;font-weight:400 700;font-display:swap;src:url('../fonts/geist-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Geist Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url('../fonts/geist-mono-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Geist Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url('../fonts/geist-mono-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

/* ===== tokens.css ===== */
/* Design tokens — jcpelotas.com
 * Source: approved mockup A «Folha de Programa» (Swiss Editorial),
 * <kit>/mockups/jcpelotas.com/a-folha-de-programa.html, approved 2026-09-24.
 * Values of the mockup's :root move here as they are; what the mockup did not
 * define is marked «added».
 */
:root {
  /* ── Colour: from the mockup ─────────────────────────────────────────── */
  --color-bg: #F3F1EA;            /* cal — page */
  --color-surface: #FFFFFF;       /* sheet / tiles */
  --color-surface-2: #FAF9F5;     /* row hover (mockup inline value) */
  --color-text: #14172A;          /* tinta */
  --color-muted: #4A4E5E;         /* ink-2: 8.2:1 on cal */
  --color-brand: #2B337B;         /* club blue (official theme-color of the club) */
  --color-brand-deep: #1E2461;
  --color-brand-tint: #E8E9F3;
  --color-accent: #D6362C;        /* distance-post red — small markers only */
  --color-border: #D9D5CA;        /* hairline */
  --color-on-brand: #FFFFFF;
  --color-on-brand-muted: #E4E6F3;
  --color-scrim: rgb(20 23 42 / .5);
  --color-caption: rgb(20 23 42 / .82);

  /* ── Colour: added (states, feedback) ────────────────────────────────── */
  --color-brand-hover: var(--color-brand-deep);
  --color-brand-active: color-mix(in srgb, var(--color-brand) 70%, black);
  --color-error: #B3261E;
  --color-error-bg: #FBEDEC;
  --color-success: #1D6B3A;
  --color-success-bg: #E9F3EC;
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--color-brand) 40%, transparent);

  /* ── Typography: from the mockup ─────────────────────────────────────── */
  --font-display: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: var(--font-display);
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --fs-h1: clamp(3rem, 1.1rem + 6vw, 7rem);
  --fs-h1-sub: clamp(1.5rem, 1rem + 1.9vw, 2.6rem);
  --fs-page-h1: clamp(2.5rem, 1.2rem + 3.6vw, 4.75rem);   /* added: inner pages */
  --fs-h2: clamp(2rem, 1.3rem + 2.2vw, 3.25rem);
  --fs-h3: clamp(1.35rem, 1.1rem + .8vw, 1.75rem);
  --fs-lead: 17px;
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-mono-xs: .75rem;
  --lh-tight: .98;
  --lh-snug: 1.2;
  --lh-base: 1.55;
  --ls-display: -.045em;

  /* ── Space (mockup scale) ────────────────────────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 112px;

  /* ── Shape ───────────────────────────────────────────────────────────── */
  --radius: 2px;
  --oct: polygon(29.3% 0, 70.7% 0, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0 70.7%, 0 29.3%);
  --shadow-panel: 0 12px 40px rgb(20 23 42 / .18);   /* added: overlays */

  /* ── Layout: from the mockup ─────────────────────────────────────────── */
  --rail: 248px;
  --container: 1140px;
  --container-pad: 56px;

  /* ── Motion (added; mockup easing kept) ──────────────────────────────── */
  --dur-fast: 150ms;
  --dur-base: 200ms;
  --dur-slow: 250ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-in: cubic-bezier(.5, 0, .8, .3);

  /* ── Layers ──────────────────────────────────────────────────────────── */
  --z-topbar: 30;
  --z-rail: 40;
  --z-scrim: 55;
  --z-rail-open: 60;
  --z-overlay: 900;
  --z-modal: 1000;
}

/* Breakpoints (media queries cannot read custom properties):
   1279 — container 40px, phead/meta stack · 1023 — rail becomes a sheet + topbar
   899 — hero/bento single column · 759 — phone: 16px gutter, tables → cards
   kit.config.json → breakpoints: desktop 1440, mobile 390 */

/* ===== base.css ===== */
/* Reset, document defaults, accessibility basics. Nothing project-specific. */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;          /* nothing may scroll the page sideways */
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

/* headings take face, size and line-height from their class, per mockup node — a
   global display face silently changes every card title set in the body face */
h1, h2, h3, h4 { font: inherit; }

a { color: inherit; }

ul, ol { list-style: none; padding: 0; }

/* Visible focus is not optional, whatever the mockup shows. */
:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
/* links, buttons and switches keep a ring on any focus, not only the keyboard heuristic */
a:focus, .btn:focus, .ibtn:focus, .switch input:focus { outline: 2px solid var(--color-brand); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: var(--z-modal);
  padding: 12px 16px; background: var(--color-text); color: #fff;
  font-weight: 600; text-decoration: none;
  transition: transform var(--dur-base) var(--ease);
}
.skip-link:focus { transform: translateY(72px); }

/* A hidden control inside a component must stay hidden even when the component
   sizes its inputs (`.field input { width:100% }`): the doubled class wins. */
.visually-hidden.visually-hidden { width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }

/* A hidden element must stay hidden even when a component sets display.
   Without this a closed panel keeps its height and pushes sections down. */
[hidden][hidden] { display: none !important; }

/* Tap targets: 24×24 minimum (WCAG 2.2 AA, 2.5.8) added by a pseudo-element,
   never by padding — padding changes the layout, this does not. */
.tap-target { position: relative; }
.tap-target::after {
  content: ""; position: absolute; inset: 50% 0 auto 0; translate: 0 -50%;
  height: 100%; min-height: 24px; z-index: 1;
}

/* Tabular figures for every number that is data (times, distances, rateios). */
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1, "zero" 0; }
button { cursor: pointer; }
abbr[title] { text-decoration: none; cursor: help; }

/* Closed <details>: the body leaves the layout entirely (no stray boxes, no focusable links). */
details:not([open]) > :not(summary) { display: none; }

/* #main takes programmatic focus after a regulatory choice; no ring on the whole column */
#main:focus { outline: none; }

/* ===== layout.css ===== */
/* Page structure of mockup A «Folha de Programa»: side rail, main column,
 * section rhythm, inner-page head, RG band, footer. Values from the mockup;
 * inner-page head, breadcrumbs and footer columns are new, in its language. */

/* ── rail (≥1024: fixed column; <1024: sheet) ─────────────────────────── */
.topbar { display: none; }
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: var(--z-rail);
  background: var(--color-surface); border-right: 1px solid var(--color-border);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
}
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 28px 24px 22px; border-bottom: 1px solid var(--color-border); color: var(--color-text); }
.brand .oct { --s: 46px; font-size: 11px; letter-spacing: .02em; }
.brand__txt { display: flex; flex-direction: column; line-height: 1; }
.brand__l1 { font-weight: 700; font-size: 17px; letter-spacing: .06em; }
.brand__l2 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .28em; margin-top: 6px; color: var(--color-brand); font-weight: 600; }
.brand:hover .brand__l1 { color: var(--color-brand); }

.nav { padding: 0 12px 16px; flex: 1; }
.nav__group { padding-top: 14px; }
.nav__label {
  display: flex; justify-content: space-between; margin: 0 0 4px; padding: 0 12px 6px;
  font-family: var(--font-mono); font-size: var(--fs-mono-xs); letter-spacing: .14em; text-transform: uppercase;
  color: var(--color-muted); border-bottom: 1px solid var(--color-border);
}
.nav ul { margin: 0; padding: 0; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 32px; padding: 4px 12px; text-decoration: none; font-size: 15px; color: var(--color-text);
  border-left: 2px solid transparent;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.nav a:hover { background: var(--color-bg); color: var(--color-brand); }
.nav a[aria-current="page"] { border-left-color: var(--color-brand); font-weight: 600; color: var(--color-brand); background: var(--color-brand-tint); }
.nav a[aria-current="page"]::after { content: ""; width: 6px; height: 6px; background: var(--color-accent); clip-path: var(--oct); }
.nav .ext { font-family: var(--font-mono); font-size: 11px; color: var(--color-muted); font-weight: 400; }

.rail__rg { margin: 0 12px 16px; border: 1px solid var(--color-text); padding: 14px 14px 12px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; }
.rail__rg .oct { --s: 44px; font-size: 15px; background: var(--color-text); grid-row: span 2; }
.rail__rg strong { font-size: 14px; line-height: 1.25; }
.rail__rg a { font-size: 14px; font-weight: 600; color: var(--color-brand); text-underline-offset: 3px; display: inline-flex; min-height: 24px; align-items: center; }
.rail__rg a:hover { color: var(--color-brand-deep); }
.rail__close { display: none; }
.scrim { display: none; }

/* ── main column ──────────────────────────────────────────────────────── */
main, .rg, .foot { margin-left: var(--rail); min-width: 0; }
.wrap { max-width: var(--container); padding: 0 var(--container-pad); margin: 0 auto 0 0; }

.secnum { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 13px; letter-spacing: .12em; color: var(--color-muted); text-transform: uppercase; }
.secnum b { font-weight: 600; color: var(--color-text); font-size: 13px; border: 1px solid var(--color-text); padding: 2px 6px; letter-spacing: .04em; }
.secnum::after { content: ""; width: 28px; height: 2px; background: var(--color-accent); }
.kick { font-family: var(--font-mono); font-size: var(--fs-mono-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted); margin: 0; }

.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--color-text); padding-bottom: 12px; }
.hero__meta .mono { font-size: 13px; color: var(--color-muted); letter-spacing: .04em; }

/* sections */
.sec { padding: var(--space-9) 0 0; }
.sec--tight { padding-top: var(--space-8); }
.sec__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 56px; align-items: end; margin-bottom: 32px; }
.sec__head h2 { font-size: var(--fs-h2); letter-spacing: var(--ls-display); line-height: var(--lh-tight); margin: 14px 0 0; font-weight: 600; }
.sec__head h2 span { display: block; color: var(--color-muted); font-weight: 500; }
.sec__aside { font-size: 15px; color: var(--color-muted); }
.sec__aside p { margin: 0 0 12px; }

/* inner page head (added, in the hero's language) */
.phero { padding: 56px 0 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 18px; padding: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--color-muted); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--color-border); }
.crumbs a { color: var(--color-muted); text-underline-offset: 3px; position: relative; }
.crumbs a:hover { color: var(--color-brand); }
.crumbs a::after { content: ""; position: absolute; inset: 50% 0 auto 0; translate: 0 -50%; height: 100%; min-height: 24px; }
.crumbs [aria-current] { color: var(--color-text); }
.phero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px 48px; align-items: end; margin-top: 34px; }
.phero__h1 { font-size: var(--fs-page-h1); line-height: .94; letter-spacing: -.05em; font-weight: 600; margin: 0; }
.phero__h1 span { display: block; color: var(--color-muted); font-weight: 500; }
.phero__lead { margin: 0 0 12px; color: var(--color-muted); font-size: var(--fs-lead); }
.phero__lead strong { color: var(--color-text); font-weight: 600; }
.phero + .sec { padding-top: var(--space-7); }

/* prose (legal, guide, history) */
.prose { max-width: 70ch; font-size: 17px; line-height: 1.65; }
.prose h2 { font-size: var(--fs-h3); letter-spacing: -.03em; line-height: 1.15; font-weight: 600; margin: 2.2em 0 .6em; }
.prose h3 { font-size: 19px; font-weight: 600; margin: 1.6em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul { list-style: none; padding: 0; }
.prose ul li { position: relative; padding-left: 22px; margin-bottom: .4em; }
.prose ul li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; background: var(--color-brand); clip-path: var(--oct); }
.prose ol { padding-left: 1.4em; }
.prose a { color: var(--color-brand); text-underline-offset: 3px; }
.prose strong { font-weight: 600; }

/* ── RG band ──────────────────────────────────────────────────────────── */
.rg { margin-top: var(--space-9); background: var(--color-brand); color: var(--color-on-brand); }
.rg__in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px 36px; align-items: center; padding-top: 40px; padding-bottom: 40px; }
.rg .oct { --s: 96px; font-size: 28px; }
.rg p { margin: 0; }
.rg__t { font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.rg__s { margin-top: 8px !important; color: var(--color-on-brand-muted); max-width: 62ch; }
.rg .btn { border-color: #fff; color: #fff; background: transparent; }
.rg .btn:hover { background: #fff; color: var(--color-brand); }

/* ── footer ───────────────────────────────────────────────────────────── */
.foot { padding-top: 40px; padding-bottom: 40px; font-size: 14px; color: var(--color-muted); }
.foot__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-bottom: 20px; border-bottom: 1px solid var(--color-text); }
.brand--foot { padding: 0; border: 0; }
.brand--foot .oct { --s: 40px; font-size: 10px; }
.foot__tag { font-size: 12px; letter-spacing: .06em; margin: 0; }
.foot__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 40px; padding: 24px 0; border-bottom: 1px solid var(--color-border); }
.foot__h { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted); margin: 0 0 10px; }
.foot__col ul { margin: 0; padding: 0; display: grid; gap: 2px; }
.foot__col a { display: inline-flex; min-height: 28px; align-items: center; color: var(--color-text); text-decoration: none; font-size: 15px; transition: color var(--dur-fast); }
.foot__col a:hover { color: var(--color-brand); text-decoration: underline; text-underline-offset: 3px; }
.foot__data { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 40px; padding: 24px 0; }
.foot__data p { margin: 0 0 4px; }
.foot__data b { color: var(--color-text); font-weight: 600; }
.foot__data a { color: var(--color-text); text-underline-offset: 3px; overflow-wrap: anywhere; }
.foot__data a:hover { color: var(--color-brand); }
.foot__reg { padding: 16px 0 24px; border-top: 1px solid var(--color-border); }
.foot__reglist { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 4px 40px; }
.foot__reglist li { margin: 0; }
.foot__legal { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--color-border); font-family: var(--font-mono); font-size: 12px; }

/* ── back to top ──────────────────────────────────────────────────────── */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: var(--z-topbar);
  width: 48px; height: 48px; display: grid; place-items: center; border: 0;
  background: var(--color-text); color: #fff; clip-path: var(--oct);
  transition: background-color var(--dur-fast), transform var(--dur-fast);
}
.to-top:hover { background: var(--color-brand); transform: translateY(-2px); }
.to-top .ico { width: 20px; height: 20px; }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1279px) {
  :root { --container-pad: 40px; }
}
/* rail present but narrow window: the page head stacks (H1 over lead) before words collide */
@media (max-width: 1180px) {
  .phero__grid { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  main, .rg, .foot { margin-left: 0; }
  /* the header wrapper is as tall as the topbar, so it is the header that sticks */
  .site-header { position: sticky; top: 0; z-index: var(--z-topbar); }
  .topbar {
    display: flex;
    justify-content: space-between; align-items: center; gap: 12px;
    background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding: 8px 16px;
  }
  .topbar .brand { padding: 0; border: 0; }
  .topbar .brand .oct { --s: 38px; font-size: 9.5px; }
  .topbar .brand__l1 { font-size: 15px; }
  .topbar .brand__l2 { font-size: 11px; margin-top: 4px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--color-text); background: var(--color-surface); font-weight: 600; transition: background-color var(--dur-fast), color var(--dur-fast); }
  .menu-btn:hover { background: var(--color-text); color: #fff; }
  .rail {
    width: min(100%, 420px); border-right: 1px solid var(--color-text); z-index: var(--z-rail-open);
    transform: translateX(-100%); visibility: hidden;
    transition: transform var(--dur-slow) var(--ease), visibility 0s linear var(--dur-slow);
  }
  .rail.is-open { transform: none; visibility: visible; transition: transform var(--dur-slow) var(--ease); }
  .rail__close { display: inline-flex; position: absolute; top: 22px; right: 16px; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--color-text); background: var(--color-surface); }
  .rail__close:hover { background: var(--color-text); color: #fff; }
  .rail .brand { padding-right: 72px; }
  .nav a { min-height: 44px; font-size: 16px; }
  .scrim { display: block; position: fixed; inset: 0; background: var(--color-scrim); z-index: var(--z-scrim); opacity: 0; visibility: hidden; transition: opacity var(--dur-slow); }
  .scrim.is-on { opacity: 1; visibility: visible; }
  .phero { padding-top: 32px; }
}
@media (max-width: 899px) {
  .sec__head, .phero__grid { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1279px) { .foot__data { gap: 20px 28px; } }
@media (max-width: 759px) {
  :root { --container-pad: 16px; }
  .hero__meta { flex-direction: column; align-items: flex-start; }
  .sec { padding-top: 80px; }
  .phero__grid { margin-top: 24px; }
  .rg__in { grid-template-columns: auto 1fr; padding-top: 32px; padding-bottom: 32px; }
  .rg .oct { --s: 64px; font-size: 19px; }
  .rg .btn { grid-column: 1 / -1; }
  .foot__cols, .foot__data { grid-template-columns: 1fr; }
  .to-top { right: 12px; bottom: 12px; }
}
@media (max-width: 389px) {
  .topbar .brand__l2 { letter-spacing: .18em; }
}

/* Phones: the trail stays on one line, so the swap from the fallback face to Geist Mono
   cannot re-wrap it and push the page head down (CLS). The current page repeats the H1:
   on phones it is kept for screen readers only; the crumb before it may shorten. */
@media (max-width: 759px) {
  .crumbs ol { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
  .crumbs li { flex: none; }
  .crumbs li:nth-last-child(2) { flex: 0 1 auto; min-width: 0; }
  .crumbs li:nth-last-child(2) > a, .crumbs li:nth-last-child(2) > span { display: block; overflow: hidden; text-overflow: ellipsis; line-height: 24px; }
  .crumbs li:last-child:not(:first-child),
  .crumbs li:last-child:not(:first-child) > span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}


/* ===== components.css ===== */
/* Components of mockup A «Folha de Programa», moved as drawn; the ones the
 * mockup did not draw (fields, filters, empty state, overlays, switches,
 * table scroller) are designed here on the same tokens. States: hover, focus,
 * active, disabled, selected, error — everywhere. */

.ico { width: 18px; height: 18px; flex: none; }
.icon { fill: none; stroke: currentColor; }
.icon--missing { display: inline-block; width: 1em; height: 1em; outline: 1px dashed var(--color-error); }

/* ── octagon: distintivo octogonal (Estatuto, Art. 6º) — signature 1 ──── */
.oct {
  --s: 40px; width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center;
  clip-path: var(--oct); background: var(--color-brand); color: var(--color-on-brand);
  font-family: var(--font-mono); font-weight: 600; font-size: calc(var(--s) * .4); line-height: 1;
  position: relative; letter-spacing: -.02em;
}
.oct .ico { width: 45%; height: 45%; }
.oct--ring::before { content: ""; position: absolute; inset: 2px; clip-path: var(--oct); background: var(--color-on-brand); }
.oct--ring::after { content: ""; position: absolute; inset: 3.5px; clip-path: var(--oct); background: var(--color-brand); }
.oct--ring > span { position: relative; z-index: 1; }
.oct--paper { background: var(--color-surface); color: var(--color-brand); }
.oct--ink { background: var(--color-text); }
.oct--blank { background: var(--color-border); }
.oct--line { background: var(--color-brand-tint); color: var(--color-brand); }
.oct--sm { --s: 28px; font-size: 12px; background: var(--color-text); }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border: 1px solid var(--color-text); border-radius: var(--radius);
  background: transparent; color: var(--color-text); text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -.005em;
  cursor: pointer;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
.btn:hover { background: var(--color-text); color: var(--color-surface); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; background: transparent; color: var(--color-text); }
.btn--primary { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-on-brand); }
.btn--primary:hover { background: var(--color-brand-deep); border-color: var(--color-brand-deep); color: var(--color-on-brand); }
.btn--primary:active { background: var(--color-brand-active); }
.btn--primary:disabled, .btn--primary[aria-disabled="true"] { background: var(--color-brand); color: var(--color-on-brand); }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 14px; gap: 8px; }
.btn--quiet { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.btn--quiet:hover { background: var(--color-bg); color: var(--color-brand); }
.btn.is-busy { pointer-events: none; opacity: .7; }
.cta { display: flex; flex-wrap: wrap; gap: 8px; }
.cta .btn { padding: 0 16px; font-size: 15px; }

.lnk { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--color-brand); text-decoration: none; min-height: 44px; }
.lnk span { border-bottom: 1px solid currentColor; line-height: 1.2; }
.lnk:hover { color: var(--color-brand-deep); }
.lnk .ico { transition: transform var(--dur-fast) var(--ease); }
.lnk:hover .ico { transform: translateX(3px); }

.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--color-text); background: var(--color-surface); color: var(--color-text); transition: background-color var(--dur-fast), color var(--dur-fast); }
.iconbtn:hover { background: var(--color-text); color: #fff; }

/* ── hairline sheet (bento) — signature 2 ─────────────────────────────── */
.sheet { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1px; background: var(--color-border); border: 1px solid var(--color-border); }
.sheet > * { background: var(--color-surface); min-width: 0; }
.tile { padding: 26px 28px 22px; }
.tile__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 18px; }
.tile__h { font-size: var(--fs-h3); letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 0; font-weight: 600; }
.tile__h a { text-decoration: none; }
.tile__h a:hover { color: var(--color-brand); }
.tile__date { font-family: var(--font-mono); font-size: 13px; color: var(--color-muted); white-space: nowrap; }
.span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: 1 / -1; }

/* ── programme-sheet table ────────────────────────────────────────────── */
.psheet { width: 100%; border-collapse: collapse; font-size: 15px; }
.psheet caption { text-align: left; padding-bottom: 8px; }
.psheet th { font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-mono-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--color-muted); text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--color-text); white-space: nowrap; }
.psheet td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.psheet th + th, .psheet td + td { padding-left: 12px; border-left: 1px solid var(--color-border); }
.psheet .num { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.psheet .r, .psheet th.r { text-align: right; }
.psheet .horse { font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.psheet a { color: inherit; text-underline-offset: 3px; }
.psheet a:hover { color: var(--color-brand); }
.table-scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch;
  /* scroll hint: a soft shadow shows on the edge that still hides columns, and fades once scrolled there */
  background:
    linear-gradient(to right, var(--color-surface) 30%, rgb(255 255 255 / 0)) left / 32px 100% no-repeat local,
    linear-gradient(to left, var(--color-surface) 30%, rgb(255 255 255 / 0)) right / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(20 23 42 / .16), rgb(20 23 42 / 0)) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(20 23 42 / .16), rgb(20 23 42 / 0)) right / 12px 100% no-repeat scroll;
}
.table-scroll:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }

.dist { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); white-space: nowrap; }
.post { width: 5px; height: 15px; flex: none; background: repeating-linear-gradient(180deg, var(--color-accent) 0 3px, #fff 3px 6px); outline: 1px solid var(--color-accent); }
.turma { display: inline-grid; place-items: center; min-width: 44px; height: 28px; padding: 0 6px; border: 1px solid var(--color-text); font-family: var(--font-mono); font-weight: 600; font-size: 13px; }
.note { font-size: 14px; color: var(--color-muted); margin: 16px 0 0; }
.dash { color: var(--color-muted); }
.pos { font-weight: 600; }
.restable tr.is-win td { background: var(--color-brand-tint); }
.restable .num .oct { --s: 30px; font-size: 11px; background: var(--color-brand); }

/* status of the next meeting */
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 22px 0; padding: 12px 14px; background: var(--color-bg); border-left: 3px solid var(--color-brand); }
.status__label { font-weight: 600; }
.status__sub { font-family: var(--font-mono); font-size: 13px; color: var(--color-muted); }
.status[data-state="closed"] { border-left-color: var(--color-muted); }
.status[data-state="today"] { border-left-color: var(--color-accent); }

/* ── documents ────────────────────────────────────────────────────────── */
.docs { margin: 0; padding: 0; border-top: 1px solid var(--color-text); }
.docs li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.docs li > .ico { color: var(--color-brand); }
.docs__name { font-weight: 500; line-height: 1.3; }
.docs__name small { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); font-weight: 400; margin-top: 2px; }
.docs__act { display: flex; gap: 6px; flex-wrap: wrap; }
.ibtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 10px;
  border: 1px solid var(--color-border); text-decoration: none; font-size: 13px; font-weight: 600; color: var(--color-text); background: var(--color-surface);
  transition: border-color var(--dur-fast), color var(--dur-fast), background-color var(--dur-fast);
}
.ibtn:hover { border-color: var(--color-brand); color: var(--color-brand); background: var(--color-brand-tint); }
.ibtn .ico { width: 16px; height: 16px; }
.ibtn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ── replay facade ────────────────────────────────────────────────────── */
.facade { position: relative; aspect-ratio: 16 / 9; background: var(--color-text); margin: 0; overflow: hidden; container-type: inline-size; }
.facade > button { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; }
.facade > button:focus-visible { outline: 3px solid var(--color-accent); outline-offset: -3px; }
.facade img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); transition: transform .4s var(--ease); }
.facade > button:hover img { transform: scale(1.03); }
.facade__poster {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 96px; color: #fff;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(255,255,255,.07) calc(10% - 1px) 10%), var(--color-brand);
  transition: filter .3s var(--ease);
}
.facade > button:hover .facade__poster { filter: brightness(1.1); }
.facade__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.facade__t { font-size: clamp(14px, 4.4cqi, 22px); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; max-width: 32ch; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
@container (max-width: 420px) {
  .facade__poster { padding: 12px 14px; gap: 4px; }
  .facade__k { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .facade__t { -webkit-line-clamp: 1; line-clamp: 1; font-size: 14px; }
}
.facade__play { position: absolute; left: 18px; bottom: 18px; display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 600; }
.facade__play .oct { --s: 60px; background: var(--color-surface); color: var(--color-brand); }
.facade__play .oct .ico { width: 22px; height: 22px; fill: currentColor; margin-left: 3px; }
.facade__play .lbl { background: var(--color-caption); padding: 6px 10px; font-size: 14px; }
.facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facade--sm .facade__play { left: 12px; bottom: 12px; }
.facade--sm .facade__play .oct { --s: 44px; }
.facade--sm .facade__play .lbl { font-size: 13px; padding: 4px 8px; }
.replay__cap { margin: 12px 0 0; font-size: 15px; }
.replay__cap .mono { font-size: 13px; color: var(--color-muted); display: block; }
.live { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--color-muted); margin: 0; }

/* ── tabs (páreos) ────────────────────────────────────────────────────── */
.prog { background: var(--color-surface); border: 1px solid var(--color-border); }
.tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); border-bottom: 1px solid var(--color-text); }
.tab { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 20px; min-height: 72px; border-right: 1px solid var(--color-border); position: relative; transition: background-color var(--dur-fast); }
.tab:last-child { border-right: 0; }
.tab:hover { background: var(--color-bg); }
.tab:focus-visible { outline: 2px solid var(--color-brand); outline-offset: -4px; }
.tab .oct { --s: 40px; font-size: 16px; background: var(--color-border); color: var(--color-text); }
.tab[aria-selected="true"] .oct { background: var(--color-brand); color: #fff; }
.tab[aria-selected="true"] { background: var(--color-surface); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: var(--color-brand); }
.tab__t { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.tab__t .tab__d { font: inherit; color: inherit; }
.tab__t b { font-weight: 600; font-size: 16px; }
.tab__t span { font-family: var(--font-mono); font-size: 13px; color: var(--color-muted); }

.panel { padding: 32px 32px 28px; }
.phead { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 300px); gap: 20px 32px; align-items: start; padding-bottom: 24px; border-bottom: 1px solid var(--color-border); }
.phead__n { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.phead__n .oct { --s: 88px; font-size: 40px; }
.phead__n .mono { font-size: 14px; color: var(--color-muted); }
.phead h3 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem); letter-spacing: -.04em; line-height: 1.02; margin: 4px 0 8px; font-weight: 600; }
.phead__cond { margin: 0; color: var(--color-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; }
.chips li { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; padding: 4px 8px; border: 1px solid var(--color-text); text-transform: uppercase; }
.pmeta { margin: 0; border-top: 1px solid var(--color-text); }
.pmeta div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--color-border); }
.pmeta dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--color-muted); padding-top: 3px; }
.pmeta dd { margin: 0; font-family: var(--font-mono); font-size: 15px; font-weight: 500; }
.times { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--color-text); border-bottom: 1px solid var(--color-border); margin: 0 0 14px; }
.times div { padding: 8px 10px 8px 0; }
.times div + div { padding-left: 10px; border-left: 1px solid var(--color-border); }
.times dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.times dd { margin: 0; font-family: var(--font-mono); font-size: 20px; font-weight: 600; color: var(--color-text); }

/* runners */
.runners { margin-top: 24px; overflow-x: auto; }
.runners .psheet td.num .oct { --s: 34px; font-size: 14px; }
.runners .horse { font-size: 16px; }
.runners tbody tr.runner { transition: background-color var(--dur-fast); }
.runners tbody tr.runner:hover { background: var(--color-surface-2); }
.xbtn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 1px solid var(--color-border); font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; transition: border-color var(--dur-fast), color var(--dur-fast), background-color var(--dur-fast); }
.xbtn:hover { border-color: var(--color-brand); color: var(--color-brand); }
.xbtn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.xbtn .ico { width: 15px; height: 15px; transition: transform var(--dur-base) var(--ease); }
.xbtn[aria-expanded="true"] { border-color: var(--color-brand); color: var(--color-brand); background: var(--color-brand-tint); }
.xbtn[aria-expanded="true"] .ico { transform: rotate(180deg); }
tr.detail td { background: var(--color-bg); padding: 12px 16px 14px 58px; border-left: 0 !important; }
tr.detail dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 28px; }
tr.detail dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--color-muted); }
tr.detail dd { margin: 2px 0 0; font-weight: 500; }
tr.detail dd.mono { font-weight: 600; }
.pfoot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center; margin-top: 20px; font-size: 15px; }
.won { display: flex; align-items: center; gap: 10px; margin: 0; }
.won .oct { --s: 28px; font-size: 12px; background: var(--color-text); }
.won b { font-weight: 600; }
.won > span:not(.oct) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }

/* retrospecto list */
.retro { margin: 0; padding: 0; border-top: 1px solid var(--color-text); }
.retro li { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.retro__n { font-family: var(--font-mono); font-weight: 600; font-size: 20px; letter-spacing: -.03em; }
.retro__n small { font-size: 12px; font-weight: 500; color: var(--color-muted); margin-right: 2px; }
.retro__d { font-size: 15px; line-height: 1.3; }
.retro__d small { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); }
.camp { margin: 16px 0 0; padding: 12px 14px; border: 1px dashed var(--color-muted); font-size: 14px; }
.camp .mono { display: block; font-size: 13px; margin-top: 4px; }

/* rateios */
.rateios td.val { font-weight: 600; font-size: 18px; }

/* steps + external handoff + official warning */
.steps { counter-reset: s; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--color-text); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--color-border); font-size: 15px; line-height: 1.35; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); padding-top: 2px; }
.extnote { display: flex; gap: 6px; align-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--color-muted); margin: 8px 0 0; }
.extnote .ico { width: 14px; height: 14px; }
.aviso { margin: 16px 0 0; padding: 10px 12px; border-left: 3px solid var(--color-accent); background: var(--color-bg); font-size: 13px; line-height: 1.4; font-weight: 600; letter-spacing: .01em; }

/* ── filters (GET, work without JS) ───────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; padding: 18px 20px; background: var(--color-surface); border: 1px solid var(--color-border); border-top: 2px solid var(--color-text); margin-bottom: 24px; }
.filters__field { display: grid; gap: 6px; min-width: 0; flex: 1 1 220px; }
/* four short filters (Temporada · Reunião · Data · Status) share one row with the buttons */
.filters:has(> .filters__field:nth-of-type(4)) > .filters__field { flex-basis: 180px; }
@media (max-width: 1365px) { .filters:has(> .filters__field:nth-of-type(4)) > .filters__field { flex-basis: 160px; } }
.filters__field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted); }
.filters__act { display: flex; gap: 8px; flex: 0 0 auto; margin-left: auto; align-self: stretch; align-items: flex-end; }
@media (max-width: 1365px) { .filters { padding-inline: 14px; } }
@media (max-width: 899px) { .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .filters__act { grid-column: 1 / -1; } }
@media (max-width: 759px) { .filters { grid-template-columns: 1fr; } }
.select { position: relative; display: block; }
.select select {
  appearance: none; width: 100%; min-height: 44px; padding: 0 32px 0 12px;
  border: 1px solid var(--color-text); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text);
  font: 500 15px/1.2 var(--font-body); cursor: pointer; transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.select select:hover { border-color: var(--color-brand); }
.select select:focus-visible { outline: none; border-color: var(--color-brand); box-shadow: var(--focus-ring); }
.select .ico { position: absolute; right: 10px; top: 50%; translate: 0 -50%; pointer-events: none; width: 16px; height: 16px; }
.result-count { font-family: var(--font-mono); font-size: 13px; color: var(--color-muted); margin: 0 0 12px; }

/* ── empty state ──────────────────────────────────────────────────────── */
.empty { display: flex; gap: 16px; align-items: flex-start; padding: 28px; background: var(--color-surface); border: 1px dashed var(--color-muted); }
.empty .oct { --s: 48px; }
.empty__t { font-weight: 600; font-size: 18px; margin: 0 0 4px; }
.empty__s { margin: 0; color: var(--color-muted); }

/* ── fields (contact, ouvidoria, help search) ─────────────────────────── */
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; }
.field__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted); }
.field__hint { font-size: 13px; color: var(--color-muted); }
.field input:not(.visually-hidden):not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--color-text); border-radius: var(--radius);
  background: var(--color-surface); color: var(--color-text); font: 400 16px/1.4 var(--font-body);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field textarea { min-height: 140px; padding-block: 12px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--color-brand); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-brand); box-shadow: var(--focus-ring); outline: none; }
.field input[aria-invalid="true"]:not([type=checkbox]):not([type=radio]), .field select[aria-invalid="true"], .field textarea[aria-invalid="true"], .field.has-error input:not([type=checkbox]):not([type=radio]), .field.has-error select, .field.has-error textarea { border-color: var(--color-error); background: var(--color-error-bg); }
.field__error { color: var(--color-error); font-size: 14px; font-weight: 500; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.field--check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--color-brand); }
.field--check .field__label { font: 400 15px/1.45 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--color-text); }
.form__error { color: var(--color-error); background: var(--color-error-bg); border-left: 3px solid var(--color-error); padding: 10px 12px; font-weight: 500; }
.form__success { color: var(--color-success); background: var(--color-success-bg); border-left: 3px solid var(--color-success); padding: 14px 16px; }

/* ── overlays ─────────────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 16px;
  background: var(--color-scrim); opacity: 0; transition: opacity var(--dur-slow) var(--ease);
}
.overlay.is-open { opacity: 1; }
.overlay__panel {
  width: min(100%, 560px); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--color-surface); border-top: 4px solid var(--color-brand); padding: 32px;
  box-shadow: var(--shadow-panel); transform: translateY(8px); transition: transform var(--dur-slow) var(--ease);
}
.overlay.is-open .overlay__panel { transform: none; }
.overlay--gate { background: rgb(20 23 42 / .82); z-index: calc(var(--z-modal) + 1); }

.gate__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.gate__head .oct { --s: 64px; font-size: 20px; background: var(--color-text); }
.gate__h { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1; letter-spacing: -.045em; font-weight: 600; margin: 0 0 12px; }
.gate__p { color: var(--color-muted); margin: 0 0 22px; }
.gate__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gate__actions .btn--primary { flex: 1 1 260px; }
.gate__actions .btn:not(.btn--primary) { flex: 0 1 120px; }
.gate__note { display: flex; gap: 8px; align-items: center; margin: 16px 0 0; padding: 10px 12px; border-left: 3px solid var(--color-accent); background: var(--color-bg); font-weight: 600; font-size: 14px; }
.gate__small { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--color-border); font-size: 13px; color: var(--color-muted); }

.cookiebar {
  position: fixed; left: calc(var(--rail) + 16px); right: 16px; bottom: 16px; z-index: var(--z-overlay);
  background: var(--color-surface); border: 1px solid var(--color-text); box-shadow: var(--shadow-panel);
  transition: opacity var(--dur-base) var(--ease-in), transform var(--dur-base) var(--ease-in);
}
.cookiebar.is-leaving { opacity: 0; transform: translateY(12px); }
.cookiebar__in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px 20px; align-items: center; padding: 16px 20px; }
.cookiebar .oct { --s: 44px; }
.cookiebar__h { font-weight: 600; font-size: 16px; margin: 0 0 2px; }
.cookiebar__txt p { margin: 0; font-size: 14px; color: var(--color-muted); }
.cookiebar__txt a { color: var(--color-brand); text-underline-offset: 3px; }
.cookiebar__act { display: flex; flex-wrap: wrap; gap: 8px; }

.cset__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 8px; }
.cset__h { font-size: var(--fs-h3); letter-spacing: -.03em; font-weight: 600; margin: 0; }
.cset__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.cset__t { font-weight: 600; margin: 0 0 2px; }
.cset__d { margin: 0; font-size: 14px; color: var(--color-muted); }
.cset__act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.switch { position: relative; display: inline-block; width: 52px; height: 30px; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.switch__ui { position: absolute; inset: 0; border: 1px solid var(--color-text); background: var(--color-bg); transition: background-color var(--dur-fast); }
.switch__ui::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; background: var(--color-text); clip-path: var(--oct); transition: transform var(--dur-base) var(--ease), background-color var(--dur-fast); }
.switch input:checked + .switch__ui { background: var(--color-brand); border-color: var(--color-brand); }
.switch input:checked + .switch__ui::after { transform: translateX(22px); background: #fff; }
.switch input:focus-visible + .switch__ui { box-shadow: var(--focus-ring); }
.switch input:disabled + .switch__ui { opacity: .6; }
.switch input:disabled { cursor: not-allowed; }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1279px) {
  .phead { grid-template-columns: auto minmax(0, 1fr); }
  .pmeta { grid-column: 1 / -1; }
}
@media (max-width: 1023px) {
  .cookiebar { left: 16px; }
  .cookiebar__in { grid-template-columns: auto minmax(0, 1fr); }
  .cookiebar__act { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
  .span-4, .span-6, .span-8 { grid-column: 1 / -1; }
}
@media (max-width: 759px) {
  .sheet > * { grid-column: 1 / -1 !important; }
  .tile { padding: 22px 18px; }
  .docs li { grid-template-columns: auto 1fr; }
  .docs li .docs__act { grid-column: 1 / -1; padding-left: 30px; }
  .docs li .docs__act .ibtn { flex: 1; }
  .tab__d { display: none; }
  .tab { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; min-height: 88px; }
  .tab .oct { --s: 34px; font-size: 14px; }
  .tab__t span { font-size: 12px; }
  .panel { padding: 22px 16px; }
  .phead { grid-template-columns: 1fr; gap: 16px; }
  .phead__n { flex-direction: row; }
  .phead__n .oct { --s: 64px; font-size: 28px; }
  .retro li { grid-template-columns: 52px 1fr auto; }
  .retro li .docs__act { padding-left: 0; }
  .filters { padding: 16px; }
  .filters__act { width: 100%; }
  .filters__act .btn { flex: 1; }
  .overlay__panel { padding: 24px 20px; }
  .gate__actions .btn { flex: 1 1 100% !important; }
  .cookiebar { left: 8px; right: 8px; bottom: 8px; }
  .cookiebar__in { padding: 14px; gap: 12px; }
  .cookiebar .oct { display: none; }
  .cookiebar__in { grid-template-columns: 1fr; }
  .cookiebar__act .btn { flex: 1 1 auto; }
  .empty { padding: 20px; }
}

/* runners table → stacked cards. With the 248px rail the 7-column sheet (≈704px) does not fit
   below ~1180px, so the cards start there instead of at phone width. */
@media (max-width: 1180px) {
  /* runners table → stacked cards */
  .runners { overflow: visible; }
  .runners .psheet thead { display: none; }   /* each cell carries its label (data-label) in card mode */
  .runners .psheet, .runners .psheet tbody, .runners .psheet tr, .runners .psheet td { display: block; width: 100%; }
  .runners .psheet tr.runner { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; padding: 14px 0 12px; border-bottom: 1px solid var(--color-border); }
  .runners .psheet tr.runner:first-child { border-top: 1px solid var(--color-text); }
  .runners .psheet td { border: 0 !important; padding: 0 !important; }
  .runners .psheet td.horse { align-self: center; font-size: 18px; }
  .runners .psheet td[data-label] { grid-column: 2; display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; font-size: 15px; }
  .runners .psheet td[data-label]::before { content: attr(data-label); font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--color-muted); padding-top: 3px; }
  .runners .psheet td.act { grid-column: 2; padding-top: 6px !important; }
  .runners .psheet td.act:empty { display: none; }
  .runners .psheet tr[hidden] { display: none !important; }
  .xbtn { min-height: 44px; }
  tr.detail td { padding: 12px 14px !important; }
  .runners .psheet tr.detail { border-bottom: 1px solid var(--color-border); }
}

/* ===== wide.css ===== */
/* Wider than 1440: the rail stays pinned left, the content column (1140 max)
 * centres in the space to its right, and band backgrounds (RG band, footer rule)
 * keep running the full width. See site-task/S5-build.md, «Ширины шире 1440». */
@media (min-width: 1441px) {
  .wrap { margin-inline: auto; }
}

/* ===== motion.css ===== */
/* Motion, loaded last: transitions, keyframes, and the reduced-motion block.
 *
 * Rules that do not bend (S5-tech, "Движение"):
 *   · only opacity, transform, colour, shadow and filter are animated;
 *   · the first screen does not animate in — that is a direct hit on LCP;
 *   · the end state is the resting layout (transform: none, opacity: 1) — a
 *     screenshot must not catch a half-played animation.
 */

[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* Staggering by nth-child costs nothing and reads as intentional. */
[data-reveal-group] > * { transition-delay: 0ms; }
[data-reveal-group] > *:nth-child(2) { transition-delay: 60ms; }
[data-reveal-group] > *:nth-child(3) { transition-delay: 120ms; }
[data-reveal-group] > *:nth-child(4) { transition-delay: 180ms; }

/* Height is never animated: a row expands through grid-template-rows. */
.collapsible { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-base) var(--ease); }
.collapsible.is-open { grid-template-rows: 1fr; }
.collapsible > * { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s var(--dur-base); }   /* min-height: a 0fr row cannot collapse a padded item; put padding on the grandchild */
.collapsible.is-open > * { visibility: visible; transition-delay: 0s; }

/* smooth only for in-page navigation (a focused link), not for programmatic scrolls */
html:focus-within { scroll-behavior: smooth; }

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