/*
 * Courtside: the charter of the Saint-Joseph Strasbourg Basketball sites.
 *
 * Born on the Performance Center (mock-up C, validated in July 2026), then
 * copied to every club site. Header and hero live on the club black, with the
 * yellow #FFD24D as the accent; the content comes back down onto a light
 * background, because a table, a form or a fixture list reads better there.
 *
 * Copy this file as it is into a new site (`/css/courtside.css`) with the
 * `/assets/` folder, then add the site's own sheet after it. Sites copy rather
 * than share on purpose: each one is read in its own place (a gym, a desk,
 * outdoors) and its sheet will drift; this file is the reference they drift
 * from, not a dependency they break.
 *
 * Rules that hold everywhere:
 * - the HTML only sets classes, never an inline style;
 * - light theme only: the pages are read on a phone, in a gym or outdoors;
 * - fonts are self-hosted, no Google Fonts at runtime (speed and privacy);
 * - the page never scrolls sideways: a wide table scrolls inside its card.
 */

/* ---- Urbanist variable (100-900), latin + latin-ext subsets ---- */
@font-face {
  font-family: Urbanist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/urbanist-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: Urbanist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/urbanist-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: Urbanist;
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/urbanist-latin-italic.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: Urbanist;
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/urbanist-latin-ext-italic.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;
}
/* Bungee: the display face of a sub-brand (Yellow Room). Declared here so a
   sub-brand finds it, but no rule below uses it: the club UI speaks Urbanist. */
@font-face {
  font-family: Bungee;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/bungee-latin.woff2") format("woff2");
}

/* ---- Tokens ---- */
:root {
  /* The club. */
  --yellow: #ffd24d;
  --black: #000;

  /* Light surfaces: the content. */
  --bg: #f4f3ef;
  --card: #fff;
  --rule: #e3e1d9;
  /* Field borders: a rule is too pale to show where to tap (1.3:1). */
  --line: #c9c6bb;

  /* Text on light. */
  --ink: #121212;
  /* 5.8:1 on --bg. The Performance Center's older #6e6e68 only reaches 4.6:1,
     too thin for a phone read outdoors. */
  --muted: #5f5f59;
  /* Dark amber: the family of the club yellow, but legible on white (7.2:1).
     The yellow itself is never text on a light background (1.4:1). */
  --link: #6d5400;

  /* Night: the header, the hero and their chips. */
  --black-2: #141414;
  --black-rule: #2a2a2a;
  --black-muted: #8d8d86;
  --black-text: #cfcfc8;

  /* States. */
  --green: #1d7c32;
  --red: #b3261e;
  /* Between the yellow of « to watch » and the red of a fault. */
  --orange: #b85c00;

  /* Tinted backgrounds. */
  --notice: #fff3c4;
  --selected: #fffbea;
  --highlight: #fff7dc;
  --alert: #fde8e6;

  /* Illustration only (the ball of the logo and of the animations), never UI. */
  --ball: #e0701f;

  /* Shape. */
  --radius: 12px;
  --radius-field: 10px;
  --radius-pill: 999px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);

  /* Column width: a consultation site. `.app` narrows it for a form. */
  --page: 64rem;
  --gutter: 1.2rem;

  --font: Urbanist, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Bungee, Impact, "Arial Black", sans-serif;
}

/* ---- Base ---- */
* { box-sizing: border-box; margin: 0; }
html {
  color-scheme: light;
  /* iOS inflates text in landscape without this, and widths overflow. */
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  /* Safety rail: nothing may scroll the page sideways. */
  overflow-x: clip;
}
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
[hidden] { display: none !important; }
img { max-width: 100%; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
li + li { margin-top: 0.25rem; }

/* A link is visible without hovering it: amber and a discreet underline.
   Hovering only reinforces, no yellow springing out of a light page. */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: #000; text-decoration-color: #000; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
/* Urbanist has no tabular figures (measured: 111 stays narrower than 888):
   this is a no-op today, kept for a face that has them. Right alignment is
   what lines figures up. */
.num { font-variant-numeric: tabular-nums; }
/* For a label only a screen reader needs (a logo link on a phone). */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---- Header (black) ----
   Row 1: the brand (home) and the menu. Row 2, optional: the breadcrumb under
   a thin rule. Two rows of links side by side gave no hint of which was the
   menu and which the path. */
.header { background: #000; color: #fff; }
.header-inner {
  max-width: var(--page); margin: 0 auto; padding: 0.6rem var(--gutter);
  display: flex; align-items: center; gap: 0 1.4rem; flex-wrap: wrap;
}
.header-inner:has(.breadcrumb a) { padding-bottom: 0; }
.brand {
  display: flex; align-items: center; gap: 0.6rem; font-weight: 800;
  white-space: nowrap; color: #fff; text-decoration: none;
}
.brand:hover { color: #fff; }
/* The app header names the club, then its own word in yellow. */
.brand-accent { color: var(--yellow); }
.logo { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.header-nav {
  margin-left: auto; display: flex; gap: 1.1rem;
  font-size: 0.85rem; font-weight: 700;
}
.header-nav a {
  color: var(--black-text); white-space: nowrap;
  text-decoration-color: color-mix(in srgb, var(--black-text) 45%, transparent);
}
.header-nav a:hover, .header-nav a[aria-current="page"] {
  color: var(--yellow); text-decoration-color: var(--yellow);
}
.breadcrumb {
  order: 2; flex: 1 1 100%; min-width: 0;
  font-size: 0.82rem; color: var(--black-muted);
  margin-top: 0.55rem; padding: 0.45rem 0; border-top: 1px solid var(--black-rule);
}
.breadcrumb:not(:has(a)) { display: none; }
.breadcrumb .sep { margin: 0 0.45em; color: #3a3a3a; }
.breadcrumb a {
  color: var(--black-text);
  text-decoration-color: color-mix(in srgb, var(--black-text) 45%, transparent);
}
.breadcrumb a:hover { color: #fff; text-decoration-color: #fff; }

/* ---- Hero (black, slanted yellow rule at the right edge) ---- */
.hero { background: #000; color: #fff; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -3rem; top: 0; bottom: 0; width: 11rem;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 46%, var(--yellow) 46%, var(--yellow) 54%, transparent 54%);
}
.hero-inner {
  max-width: var(--page); margin: 0 auto; padding: 2.1rem var(--gutter) 1.9rem;
  position: relative; z-index: 1;
}
.eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--yellow); margin: 0;
}
.hero h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.7rem); font-weight: 900; line-height: 1.15;
  letter-spacing: -0.015em; text-transform: uppercase; text-wrap: balance;
  margin: 0.2rem 0 0.4rem; max-width: 46rem;
}
.hero h1::after { content: none; }
.hero .subtitle { color: var(--black-muted); font-size: 0.92rem; margin: 0; max-width: 46rem; }
.hero .subtitle a {
  color: #e6e4dc;
  text-decoration-color: color-mix(in srgb, #e6e4dc 45%, transparent);
}
.hero .subtitle a:hover { color: #fff; text-decoration-color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.3rem; }

/* Key figures under the title: a black tile resting on a yellow line. */
.chips { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.3rem; }
.chip {
  background: var(--black-2); border: 1px solid var(--black-rule);
  border-bottom: 3px solid var(--yellow); border-radius: 8px 8px 0 0;
  padding: 0.65rem 1.2rem 0.5rem; min-width: 8.5rem;
}
a.chip { text-decoration: none; display: block; }
a.chip:hover { background: #1e1e1e; border-color: #3a3a3a; }
a.chip:hover .chip-label { color: var(--yellow); }
.chip-value {
  display: block; font-size: 1.55rem; font-weight: 800; color: #fff;
  font-variant-numeric: tabular-nums;
}
.chip-of { font-size: 0.9rem; color: var(--black-muted); font-weight: 600; }
.chip-label {
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--black-muted);
}

/* ---- Content (light) ---- */
main { display: block; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter) 4rem; }

/* A form outside the hero (consultation pages put their h1 in the hero). */
h1 { font-size: 1.65rem; line-height: 1.2; font-weight: 800; margin: 0 0 1rem; }
h1::after, h2::after {
  content: ""; display: block; width: 3.2rem; height: 4px;
  background: var(--yellow); margin-top: 0.3rem;
}
h2 {
  font-size: 1.12rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.04em; line-height: 1.3; margin: 2.3rem 0 0.8rem;
}
h2[id] { scroll-margin-top: 1rem; }
h3 {
  font-size: 0.95rem; letter-spacing: 0.02em; margin: 1.1rem 0 0.4rem;
  text-transform: uppercase; color: var(--muted);
}
.subtitle { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.3rem; }
.label {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 0.3rem;
}
.note { color: var(--muted); font-size: 0.8rem; font-style: italic; }

/* ---- Cards ---- */
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1rem; margin: 1rem 0; box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
/* The card to see first (next match, latest episode): a yellow edge. */
.card-accent { border-left: 4px solid var(--yellow); }
/* Holds a wide table: the table scrolls, never the page. */
.card-table { padding: 0.4rem 0.9rem; overflow-x: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.cards > .card { margin: 0; }

/* ---- Buttons ----
   A black pill ringed with yellow: legible on the light page, on the black
   hero and on the yellow block alike. Hover swaps the two colours. */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  padding: 0.5rem 1.25rem; font: inherit; font-weight: 800; font-size: 0.88rem;
  background: #000; color: var(--yellow); border: 2px solid var(--yellow);
  border-radius: var(--radius-pill); text-decoration: none; white-space: nowrap;
  cursor: pointer;
}
.button:hover { background: var(--yellow); color: #000; text-decoration: none; }
.button:disabled { opacity: 0.55; cursor: default; }
.button:disabled:hover { background: #000; color: var(--yellow); }
/* Second choice beside the main one: outlined, never a second black pill. */
.button-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.button-secondary:hover { background: var(--ink); color: var(--yellow); }
.hero .button-secondary { color: #fff; border-color: #fff; }
.hero .button-secondary:hover { background: #fff; color: #000; }
/* Under the thumb, in a form: 52 px high, the whole row. */
.button-large { min-height: 52px; padding: 12px 22px; font-size: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2.25rem; }
.actions .button-large:first-child { flex: 1; }
/* A link that does an action (cancel, back), in a button's place. */
.link-button {
  font: inherit; background: none; border: 0; padding: 8px 0; cursor: pointer;
  color: var(--ink); text-decoration: underline; text-underline-offset: 2px;
}

/* ---- Tabs: segmented pills, plain links ----
   They wrap onto as many rows as needed: a row that scrolls sideways hides
   the tabs off screen, and a mouse has no swipe to reach them. */
.tabs {
  display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 1.6rem 0 0.2rem;
  background: var(--card); border: 1px solid var(--rule); border-radius: 1rem;
  padding: 0.35rem;
}
.tab {
  padding: 0.3rem 1.1rem; border-radius: var(--radius-pill); font-weight: 700;
  font-size: 0.9rem; text-decoration: none; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
a.tab:hover { color: #000; background: var(--bg); }
.tab-active, .tab[aria-current="page"] { background: #000; color: var(--yellow); }
a.tab[aria-current="page"]:hover { background: #000; color: var(--yellow); }
.tab-label {
  padding: 0.3rem 0.5rem 0.3rem 0.7rem; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; align-self: center;
}

/* ---- Tables ---- */
.table {
  border-collapse: collapse; width: 100%; font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.table th, .table td {
  padding: 0.42rem 0.55rem; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--rule);
}
.table thead th {
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); border-bottom: 2px solid #000;
}
.table th.left, .table td.left { text-align: left; }
.table td.left { white-space: normal; }
.table tbody tr:hover td { background: #f6f5f0; }
/* The finish line: the sum, on a pale yellow. */
.table tr.total td {
  font-weight: 800; border-top: 2px solid #000; border-bottom: none;
  background: var(--highlight);
}
/* The reader's own row (their team in the standings): where the eye lands. */
.table tr.row-self td { background: var(--highlight); font-weight: 800; }
.of { color: var(--muted); font-size: 0.85em; }

/* ---- Small marks ---- */
/* Outcome of a match: green won, red lost, grey draw. Always with a word or a
   title: colour alone says nothing to one reader in twelve. */
.dot {
  display: inline-block; width: 0.58em; height: 0.58em; border-radius: 50%;
  margin-right: 0.5em;
}
.dot-v { background: var(--green); }
.dot-d { background: var(--red); }
.dot-n { background: var(--muted); }
/* A short status beside a name (CAP, NOUVEAU). */
.badge {
  display: inline-block; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em;
  background: #000; color: var(--yellow); padding: 0.14em 0.55em;
  border-radius: var(--radius-pill); margin-left: 0.45em; white-space: nowrap;
  vertical-align: 0.1em;
}
.done-mark {
  width: 56px; height: 56px; border-radius: 50%; background: var(--yellow); color: #000;
  display: grid; place-items: center; font-size: 1.8rem; font-weight: 900; margin-bottom: 1rem;
}

/* ---- Messages ---- */
/* A fact to see before the rest of the page. */
.notice {
  background: var(--notice); border-left: 5px solid var(--yellow); border-radius: 8px;
  padding: 12px 14px; margin: 1rem 0; font-size: 0.97rem;
}
.notice > :last-child { margin-bottom: 0; }
.notice-title { font-weight: 800; margin: 0 0 0.25rem; }
/* Something went wrong, and what to do now. */
.alert {
  background: var(--alert); color: var(--red); border-radius: var(--radius-field);
  padding: 12px 14px; margin: 1rem 0; font-weight: 600;
}
.alert > :last-child { margin-bottom: 0; }
.success { color: var(--green); font-weight: 700; }

/* The amount that matters, black on the light page. Not `.total`: that is the
   sum row of a table (`tr.total`), and the two would mix. */
.amount { background: #000; color: #fff; border-radius: var(--radius); padding: 16px; margin: 1.5rem 0; }
.amount-label { color: var(--black-text); font-size: 0.92rem; font-weight: 700; }
.amount strong { display: block; color: var(--yellow); font-size: 1.7rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.amount p { margin: 0.5rem 0 0; font-size: 0.95rem; }

/* The bold block of a page (sign up, subscribe): yellow, ink text. */
.block-yellow {
  background: var(--yellow); color: var(--ink); border-radius: 16px; padding: 16px; margin: 1rem 0;
}
.block-yellow a { color: var(--ink); text-decoration-color: var(--ink); }
.block-yellow > :last-child { margin-bottom: 0; }

/* ---- Fields ---- */
.field { margin: 1.25rem 0; }
.field > label:not(.option), legend {
  display: block; font-weight: 700; margin: 0 0 0.4rem; padding: 0;
}
.help { color: var(--muted); font-size: 0.93rem; margin: -0.2rem 0 0.5rem; }
fieldset { border: 0; padding: 0; margin: 1.25rem 0; min-width: 0; }
.input,
input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="password"], input[type="search"], input[type="number"], textarea, select {
  font: inherit;
  /* 16 px or more: below that, iOS zooms into the field. */
  font-size: 17px;
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-field);
  background: var(--card); color: var(--ink);
}
input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="password"], input[type="search"], input[type="number"], textarea { appearance: none; }
textarea { min-height: 100px; resize: vertical; }
input:disabled, textarea:disabled, select:disabled { background: var(--bg); color: var(--muted); }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--yellow); outline-offset: 0; border-color: var(--ink);
}
.error-text { color: var(--red); font-size: 0.93rem; font-weight: 700; margin: 0.4rem 0 0; }
.has-error input, .has-error textarea, .has-error select, .has-error .option { border-color: var(--red); }

/* A choice is a whole card to tap, not a 16 px circle. */
.options { display: grid; gap: 8px; }
.option {
  display: flex; align-items: center; gap: 12px;
  min-height: 50px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-field);
  cursor: pointer; font-weight: 600;
}
.option input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: #000; }
.option:has(input:checked) { border-color: #000; box-shadow: inset 0 0 0 1px #000; background: var(--selected); }
.option:has(input:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 1px; }
.option-help { display: block; font-weight: 500; color: var(--muted); font-size: 0.92rem; }
/* Short answers (sizes, yes or no) as chips, three to a row on a phone. The
   input stays, hidden, for the keyboard and screen readers. */
.options-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.options-grid .option { position: relative; justify-content: center; text-align: center; padding: 10px 6px; }
.options-grid .option input { position: absolute; opacity: 0; pointer-events: none; }
.options-grid .option:has(input:checked) { background: #000; color: var(--yellow); }

/* ---- Waiting: a ball dribbling, in the club's yellow ----
   <div class="loader" role="status"><span class="dribble" aria-hidden="true"><span class="ball"></span></span>Chargement…</div> */
.loader {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  margin: 2rem 0; color: var(--muted); font-weight: 700; text-align: center;
}
.dribble { position: relative; width: 52px; height: 96px; }
/* Its shadow on the floor, wider and darker as the ball comes down. */
.dribble::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 0; height: 8px;
  border-radius: 50%; background: var(--ink); opacity: 0.3;
  animation: ball-shadow 0.9s infinite;
}
.ball {
  position: absolute; left: 0; bottom: 4px; width: 52px; height: 52px;
  transform-origin: 50% 100%; animation: ball-bounce 0.9s infinite;
}
/* Apart from the bounce, so that the seams turn while the ball squashes. */
.ball::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='46' fill='%23ffd24d' stroke='%23121212' stroke-width='5'/%3E%3Cpath d='M50 4v92M4 50h92M17 18q27 32 0 64M83 18q-27 32 0 64' fill='none' stroke='%23121212' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: ball-spin 2.7s linear infinite;
}
@keyframes ball-bounce {
  0%, 100% { transform: translateY(-40px) scale(1, 1); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  46% { transform: translateY(0) scale(1, 1); animation-timing-function: ease-out; }
  54% { transform: translateY(0) scale(1.15, 0.82); animation-timing-function: ease-in; }
  62% { transform: translateY(-6px) scale(0.95, 1.05); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
}
@keyframes ball-shadow {
  0%, 100% { transform: scaleX(0.45); opacity: 0.1; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  46%, 54% { transform: scaleX(1); opacity: 0.3; }
  62% { transform: scaleX(0.9); opacity: 0.26; animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
}
@keyframes ball-spin { to { transform: rotate(360deg); } }

/* ---- Footer ---- */
.footer {
  max-width: var(--page); margin: 0 auto; padding: 1rem var(--gutter) 2.5rem;
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--rule);
  font-size: 0.8rem; color: var(--muted);
}
.footer p { margin: 0 0 0.4rem; }

/* ---- Form app: narrower column, sticky header, plain section titles ----
   <body class="app">. A form is filled on a phone: one column, the header
   stays in reach. */
.app { --page: 600px; --gutter: 16px; }
.app .header { position: sticky; top: 0; z-index: 2; }
.app .logo { width: 40px; height: 40px; }
.app main { padding-top: 20px; padding-bottom: 56px; }
.app h2 { font-size: 1.15rem; font-weight: 800; text-transform: none; letter-spacing: 0; margin: 2rem 0 0.5rem; }
.app h2::after { content: none; }
/* Its back office reads tables: it takes the width back. */
.app.admin { --page: 1180px; }

/* ---- Narrow screens ---- */
@media (max-width: 40rem) {
  :root { --gutter: 0.9rem; }
  .hero::after { display: none; }
  .hero-inner { padding: 1.4rem var(--gutter) 1.3rem; }
  .chips { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1rem; }
  .chip { min-width: 0; padding: 0.55rem 0.8rem 0.45rem; }
  .chip-value { font-size: 1.3rem; }
  /* The logo and the menu only fit side by side once the site's name goes:
     it stays for screen readers, the link would otherwise have no name. */
  .header-nav ~ .brand .brand-name, .brand:has(~ .header-nav) .brand-name {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .breadcrumb {
    white-space: nowrap; overflow-x: auto; scrollbar-width: none;
  }
  .breadcrumb::-webkit-scrollbar { display: none; }
  main { padding-bottom: 3rem; }
  h2 { font-size: 1rem; margin-top: 1.8rem; }
  .table { font-size: 0.8rem; }
  .table th, .table td { padding: 0.38rem 0.4rem; }
  .card-table { padding: 0.3rem 0.6rem; }
}

/* ---- Print (Ctrl+P): black ink, no chrome ---- */
@media print {
  .header, .header-nav, .tabs, .footer, .hero-actions, .button, .loader { display: none; }
  body, .hero { background: #fff; color: #000; }
  .hero::after { display: none; }
  .hero-inner { padding: 0 0 0.6rem; }
  .eyebrow, .hero .subtitle, .hero .subtitle a { color: #000; }
  .chips { display: none; }
  a { color: #000; text-decoration: none; }
  .card { box-shadow: none; border-color: #999; break-inside: avoid; }
  .badge { background: none; color: #000; border: 1px solid #000; }
  .table tr.total td, .table tr.row-self td { background: none; }
}

/* ---- Less motion, asked by the phone ---- */
@media (prefers-reduced-motion: reduce) {
  .ball, .ball::before, .dribble::after { animation: none; }
}
