/* Tee Time Helper — mobile-first, calm club stationery.
   Identity from bhcc.flynch.com: the white crest on slate-blue #5a7b93.
   One bold element: tee times and dates set large in a book serif, like a scorecard.
   No web fonts (system serif + system sans), no inline styles (strict CSP). */

:root {
  color-scheme: light dark;
  --slate: #5a7b93;          /* brand band (white text only at >= 19px bold) */
  --accent: #3d5a70;         /* buttons, links, focus — 7.2:1 with white */
  --accent-ink: #ffffff;
  --link: #33536a;
  --ink: #1d2b36;
  --muted: #556776;          /* 5.4:1 on paper */
  --paper: #f3f6f8;
  --surface: #ffffff;
  --sunk: #e9eff3;
  --line: #d6dfe5;
  --field-line: #718393;     /* control borders: >= 3:1 on surface and paper (WCAG 1.4.11) */
  --focus: #1f6fb2;
  --booked-fg: #24603e;  --booked-bg: #e2f2e8;
  --failed-fg: #9a2f24;  --failed-bg: #f9e5e2;
  --armed-fg: #6e5200;   --armed-bg: #f7ecca;
  --pending-fg: #33536a; --pending-bg: #e4edf3;
  --muted-fg: #556776;   --muted-bg: #edf0f2;
  --firing-fg: #ffffff;  --firing-bg: #3d5a70;
  --danger-bg: #9a2f24;  --danger-ink: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --nav-h: 64px;
  --gutter: 16px;
  --shadow: 0 1px 0 rgba(29, 43, 54, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --slate: #46657c;
    --accent: #93b7d0;
    --accent-ink: #0c1720;
    --link: #a7c8de;
    --ink: #e5ecf1;
    --muted: #a3b4c1;
    --paper: #0f171e;
    --surface: #16222c;
    --sunk: #1c2a35;
    --line: #2a3a47;
    --field-line: #8a9aa6;
    --focus: #8cc4ff;
    --booked-fg: #94d8ae;  --booked-bg: #17352a;
    --failed-fg: #f2a89b;  --failed-bg: #3c1d19;
    --armed-fg: #ecd27c;   --armed-bg: #372d10;
    --pending-fg: #b2cfe2; --pending-bg: #1b3143;
    --muted-fg: #a3b4c1;   --muted-bg: #1f2b34;
    --firing-fg: #0c1720;  --firing-bg: #93b7d0;
    --danger-bg: #f2a89b;  --danger-ink: #2a0f0b;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  /* A focused field must not land under the fixed tab bar + sticky action bar (WCAG 2.4.11). */
  scroll-padding-top: 16px;
  scroll-padding-bottom: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom));
}
body {
  margin: 0;
  font: 400 1.0625rem/1.5 var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 0.15em; }
code { overflow-wrap: anywhere; word-break: break-all; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; }

/* ---- Band (header) ---------------------------------------------------------------- */
.band {
  background: var(--slate);
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 10px) var(--gutter) 10px;
}
.band-inner { display: flex; align-items: center; gap: 12px; max-width: 72rem; margin: 0 auto; }
.band a.home { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-height: 44px; }
.band :focus-visible { outline-color: #fff; }  /* the blue ring is ~1.2:1 on slate */
.crest { width: 34px; height: 34px; flex: none; }
/* D79: text-only "BH" mark on anonymous pages (slate on a white tile; no crest, no club name). */
.bh-mark { display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--slate);
  border-radius: 20%; font: 700 1.25rem/1 var(--serif); letter-spacing: -0.02em; padding: 0.15em 0.3em; }
.wordmark { font: 700 1.25rem/1.1 var(--serif); letter-spacing: 0.01em; }
/* Small text on slate needs a darker pill to reach 4.5:1 (white on slate alone is 4.48:1). */
.band .who { margin-left: auto; font-size: 0.9375rem; font-weight: 600; max-width: 40vw;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(12, 23, 32, 0.28); padding: 4px 10px; border-radius: 999px; }

/* ---- Banners ---------------------------------------------------------------------- */
.banner { padding: 10px var(--gutter); font-weight: 600; font-size: 0.9375rem; border-bottom: 1px solid var(--line); }
.banner p { margin: 0 auto; max-width: 46rem; }
.banner a { color: inherit; }
/* Banner links sit inside a sentence: inline padding enlarges the tap area to ≥ 44px
   without stretching the line box (inline-flex would open a double-height gap). */
.banner a { display: inline; padding: 14px 0; }
.section-head a, .row-title a, .gate-card a, main > p > a:only-child {
  display: inline-flex; align-items: center; min-height: 44px; }
.banner-off { background: var(--failed-bg); color: var(--failed-fg); }
.banner-dry { background: var(--armed-bg); color: var(--armed-fg); }
.banner-stale { display: none; background: var(--muted-bg); color: var(--muted-fg); }
body.is-stale .banner-stale { display: block; }

/* ---- Page frame ------------------------------------------------------------------- */
.frame { max-width: 72rem; margin: 0 auto; }
main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 20px var(--gutter) calc(var(--nav-h) + 40px + env(safe-area-inset-bottom));
}
body.gate main { padding-bottom: 40px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.lede { color: var(--muted); margin: 6px 0 0; max-width: 34rem; }
section + section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.small-head { padding-top: 14px; border-top: 1px solid var(--line); }
p { margin: 0 0 12px; }

.footer {
  margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.8125rem; text-align: center;
}
.footer p { margin: 0 0 4px; }

/* ---- Bottom tab bar (phone) → side rail (desktop) --------------------------------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 40rem; }
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--nav-h); color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 600;
}
.tabs a svg { width: 24px; height: 24px; }
.tabs a[aria-current="page"] { color: var(--accent); }
.tabs a[aria-current="page"] svg { stroke-width: 2.25; }

@media (min-width: 960px) {
  .tabs {
    top: 64px; bottom: auto; right: auto; width: 200px; border-top: 0; border-right: 1px solid var(--line);
    height: calc(100vh - 64px); padding-top: 16px; background: transparent;
  }
  .tabs ul { grid-template-columns: 1fr; gap: 2px; padding: 0 10px; }
  .tabs a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 12px;
    font-size: 0.9375rem; border-radius: var(--radius-sm); }
  .tabs a:hover { background: var(--sunk); }
  .tabs a[aria-current="page"] { background: var(--sunk); }
  body.signed-in main, body.signed-in .banner p { margin-left: max(224px, calc((100vw - 46rem) / 2)); }
  main { padding-bottom: 48px; }
  html { scroll-padding-bottom: 96px; }
}

/* ---- Buttons ---------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--radius-sm);
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
}
.btn:hover { filter: brightness(1.08); }
.btn-quiet { background: transparent; color: var(--accent); }
.btn-quiet:hover { background: var(--sunk); filter: none; }
.btn-danger { background: var(--danger-bg); border-color: var(--danger-bg); color: var(--danger-ink); }
.btn-small { min-height: 44px; padding: 0 14px; font-size: 0.9375rem; }
.btn-block { width: 100%; }
.linkish { background: none; border: 0; padding: 0 6px; min-height: 44px; font: inherit; font-weight: 600;
  color: var(--link); text-decoration: underline; cursor: pointer; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.row-actions form { margin: 0; }
.row-actions a, .row-actions .linkish { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px;
  padding: 0 6px; font-weight: 600; }

/* Sticky primary action, above the tab bar on phones. */
.actionbar {
  position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 10;
  margin: 24px calc(-1 * var(--gutter)) 0; padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-top: 1px solid var(--line);
  display: flex; gap: 12px; align-items: center;
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .actionbar { background: var(--paper); } }
.actionbar .btn:first-child { flex: 1; }
/* Desktop: no tab bar below, so the bar sits on the viewport edge and stays inside the
   form column. Must come AFTER the base .actionbar rule (same specificity: last wins). */
@media (min-width: 960px) {
  .actionbar { bottom: 0; margin-left: 0; margin-right: 0; }
}
.fab-row { margin: 18px 0 0; }

/* ---- Surfaces & rows (scorecard lists) -------------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.panel > * { margin-top: 0; margin-bottom: 0; }
.panel > * + * { margin-top: 14px; }
details > summary { display: list-item; min-height: 44px; padding-top: 10px; cursor: pointer; }
details[open] > summary { margin-bottom: 12px; }
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.row { display: grid; grid-template-columns: 4.25rem 1fr; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-plain { grid-template-columns: 1fr; }
/* The whole row opens the run: the link's hit area is stretched over the row. */
.row-tap { position: relative; }
.row-tap .row-link::after { content: ""; position: absolute; inset: 0; }
.row-tap:hover { background: var(--sunk); }
.datecol { text-align: center; border-right: 1px solid var(--line); padding-right: 12px; font-family: var(--serif);
  font-variant-numeric: lining-nums tabular-nums; }
.datecol .dow { display: block; font-size: 0.875rem; color: var(--muted); }
.datecol .dom { display: block; font-size: 1.875rem; line-height: 1.05; font-weight: 600; }
.datecol .mon { display: block; font-size: 0.875rem; color: var(--muted); }
.row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.row-title strong { font-family: var(--serif); font-size: 1.125rem; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.facts { display: flex; flex-wrap: wrap; margin: 4px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9375rem; }
.facts li + li::before { content: ",\00a0"; }
.row-note { margin: 6px 0 0; font-size: 0.875rem; color: var(--muted); }

/* ---- Badges ----------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 700; line-height: 1.4; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tone-booked { color: var(--booked-fg); background: var(--booked-bg); }
.tone-failed { color: var(--failed-fg); background: var(--failed-bg); }
.tone-failed::before { border-radius: 1px; transform: rotate(45deg); }
.tone-armed { color: var(--armed-fg); background: var(--armed-bg); }
.tone-armed::before { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tone-pending { color: var(--pending-fg); background: var(--pending-bg); }
.tone-pending::before { background: transparent; border: 2px solid currentColor; width: 8px; height: 8px; }
.tone-firing { color: var(--firing-fg); background: var(--firing-bg); }
.tone-muted { color: var(--muted-fg); background: var(--muted-bg); }
.tone-muted::before { border-radius: 1px; height: 2px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 0.8125rem; font-weight: 600;
  border: 1px dashed var(--armed-fg); color: var(--armed-fg); }

/* ---- Dashboard scorecard ---------------------------------------------------------- */
.scorecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.scorecard-top { border-top: 5px solid var(--slate); padding: 18px 18px 14px; }
.scorecard .kicker { color: var(--muted); font-size: 0.9375rem; margin: 0 0 2px; }
.bigtime { font: 600 3rem/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; margin: 4px 0 6px; }
.bigtime .ampm { font-size: 1.25rem; margin-left: 4px; color: var(--muted); font-weight: 600; }
.scorecard-date { font: 600 1.125rem/1.3 var(--serif); margin: 0; }
.scorecard-for { margin: 8px 0 0; color: var(--muted); }
.holes { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); border-top: 1px solid var(--line); }
.holes > div { padding: 12px 18px; border-left: 1px solid var(--line); }
.holes > div:first-child { border-left: 0; }
.holes dt { color: var(--muted); font-size: 0.875rem; }
.holes dd { margin: 2px 0 0; font: 600 1.25rem/1.2 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.empty { text-align: left; padding: 22px 18px; }
.empty h2 { margin-bottom: 6px; }
.updated { margin-top: 10px; font-size: 0.8125rem; color: var(--muted); }

/* ---- Forms ------------------------------------------------------------------------ */
form { margin: 0; }
fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
legend { font: 600 1.125rem/1.3 var(--serif); padding: 0; margin-bottom: 10px; }
.field { margin-bottom: 14px; }
.field > label, .label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { display: block; color: var(--muted); font-size: 0.9375rem; margin-top: 4px; }
input[type="text"], input[type="password"], input[type="email"], input[type="date"], input[type="time"],
input[type="number"], input[inputmode], select {
  width: 100%; min-height: 48px; padding: 10px 12px; font: 400 1rem/1.3 var(--sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--radius-sm);
}
/* Text-like fields and selects get the custom look; date/time keep the native picker. */
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select { appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus-visible, select:focus-visible { border-color: var(--focus); }
[aria-invalid="true"] { border-color: var(--failed-fg) !important; border-width: 2px !important; }
.error-text { color: var(--failed-fg); font-weight: 600; font-size: 0.9375rem; margin-top: 6px; display: block; }
.error-summary { background: var(--failed-bg); color: var(--failed-fg); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 18px; }
.error-summary h2 { font-size: 1.0625rem; margin-bottom: 4px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; }
.notice { border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 18px; font-weight: 600; }
.notice-ok { background: var(--booked-bg); color: var(--booked-fg); }
.notice-error { background: var(--failed-bg); color: var(--failed-fg); }
.notice-info { background: var(--pending-bg); color: var(--pending-fg); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* 320px phones: two native time inputs side by side must be allowed to shrink. */
.pair > *, .pair input, .pair select { min-width: 0; }
/* iOS Safari centres the value of date / time inputs; keep it with its label. */
input::-webkit-date-and-time-value { text-align: left; }
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 560px) { .quad { grid-template-columns: repeat(4, 1fr); } }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 8px 0; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.check span { display: block; }
.check strong { display: block; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--field-line); border-radius: var(--radius-sm); overflow: hidden; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label { display: flex; align-items: center; justify-content: center; min-height: 48px; font: 600 1.125rem var(--serif);
  border-left: 1px solid var(--field-line); cursor: pointer; background: var(--surface); }
.segmented label:first-of-type { border-left: 0; }
.segmented input:checked + label { background: var(--accent); color: var(--accent-ink); }
/* A surface-coloured gap between the ring and the accent fill keeps the ring visible. */
.segmented input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: -3px;
  box-shadow: inset 0 0 0 6px var(--surface); }
.rank { display: grid; grid-template-columns: 2.25rem 1fr; gap: 10px; align-items: center; margin-bottom: 10px; }
.rank .n { font: 600 1.25rem var(--serif); text-align: center; color: var(--muted); }
/* ---- Request form (M4.9g): CSS-only reveals, no script needed ---------------------- */
fieldset fieldset { margin-bottom: 0; }
.choices { margin-bottom: 10px; }
.choices .check { padding: 4px 0; }
/* M49g-10: hidden only where :has() works — without it (iOS < 15.4, older webviews) every
   field stays visible and usable. app.js toggles classes as a second path (.aim-earliest on
   #time, .is-off on .second, .players-N on .guests). */
@supports selector(:has(*)) {
  fieldset:has(#aim_earliest:checked) .pref-field { display: none; }
  .second:has(#second_on:not(:checked)) .second-times { display: none; }
  /* Guest names: only the places the player count leaves (Player 2..n); a re-render with too
     many names (.keep) shows them all so the member can see what to remove. */
  form:has(#players_1:checked) .guests:not(.keep) { display: none; }
  form:has(#players_2:checked) .guests:not(.keep) .guest-3,
  form:has(#players_2:checked) .guests:not(.keep) .guest-4,
  form:has(#players_3:checked) .guests:not(.keep) .guest-4 { display: none; }
}
#time.aim-earliest .pref-field, .second.is-off .second-times { display: none; }
.guests.players-1:not(.keep),
.guests.players-2:not(.keep) .guest-3, .guests.players-2:not(.keep) .guest-4,
.guests.players-3:not(.keep) .guest-4 { display: none; }
details.more { margin: 0 0 22px; border-top: 1px solid var(--line); }
details.more > summary { font: 600 1.125rem/1.3 var(--serif); }
.plan-summary { margin: 18px 0 0; font-weight: 600; }
.plan-summary.is-warn { color: var(--failed-fg); }
.btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.code-input { font: 600 1.75rem/1 var(--serif) !important; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }
.code-input-text { font-size: 1.375rem !important; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---- Sign-in gate ----------------------------------------------------------------- */
body.gate { background: var(--slate); }
.gate-card { background: var(--surface); border-radius: 16px; padding: 24px 20px; max-width: 26rem; margin: 0 auto; }
.gate-crest { display: block; width: 92px; height: 92px; margin: 8px auto 18px; }
.gate-crest.bh-mark { display: flex; font-size: 3.5rem; }
.gate-title { text-align: center; color: #fff; font: 700 1.5rem/1.2 var(--serif); margin: 0 0 18px;
  display: flex; align-items: center; justify-content: center; gap: 0.4em; flex-wrap: wrap; }
/* The BH mark sits on the same line as the title, at the same size: "BH Tee Time Helper". */
.gate-title .gate-bh.bh-mark { font-size: inherit; line-height: 1; padding: 0.15em 0.3em; }
.gate-title img.gate-bh { width: 1.6em; height: 1.6em; border-radius: 20%; }
.qr { display: block; width: 220px; height: 220px; margin: 8px auto 12px; border-radius: 8px; }
.secret { font: 600 1rem/1.6 ui-monospace, Menlo, Consolas, monospace; word-break: break-all; text-align: center; background: var(--sunk); padding: 8px; border-radius: 8px; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 18px; }
.codes li { font: 600 1rem ui-monospace, Menlo, Consolas, monospace; background: var(--sunk); border-radius: 6px; padding: 8px; text-align: center; }

/* ---- Filters, timeline, definition lists ------------------------------------------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); background: var(--surface); white-space: nowrap; font-weight: 600; font-size: 0.9375rem; }
.chips a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 14px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--slate); }
.timeline .when { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.875rem; }
.kv { display: grid; grid-template-columns: minmax(7rem, max-content) 1fr; gap: 4px 14px; margin: 6px 0 0; font-size: 0.9375rem; }
.kv dt { color: var(--muted); overflow-wrap: anywhere; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.pager { display: flex; justify-content: space-between; margin-top: 14px; }
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 0;
  border-top: 1px solid var(--line); }
.status-list li > span { min-width: 0; overflow-wrap: anywhere; }
.status-list li:first-child { border-top: 0; }
.ok { color: var(--booked-fg); font-weight: 700; }
.no { color: var(--failed-fg); font-weight: 700; }
.settings-section { scroll-margin-top: 16px; }
.inline-status { display: inline-block; margin-left: 8px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (min-width: 560px) { :root { --gutter: 24px; } .gate-card { padding: 32px 28px; } }
