/* JibTrak website: one stylesheet, no build step, no external requests.
   Colours are the app's own (Resources/Styles/Colors.xaml in the app repo).
   Navy areas (header, hero, page banners, footer) are navy in BOTH themes;
   everything else follows the visitor's light/dark setting. */

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: light dark;

  /* brand, fixed */
  --navy-900: #071e30;
  --navy-800: #0b2a43;
  --navy-700: #11314b;
  --navy-600: #163a57;
  --navy-500: #1f4b6b;
  --teal: #17beb0;
  --aqua: #5ad1e3;
  --amber: #f6b53c;
  --on-navy: #eaf2f7;
  --muted-on-navy: #93aec2;
  --ink-on-accent: #06202e;

  /* light theme (default) */
  --page: #f3f7fa;
  --card: #ffffff;
  --soft: #e9eff4;
  --line: #d3dee7;
  --text: #08263a;
  --muted: #46647a;
  --link: #08706a;
  --link-hover: #05544f;
  --icon: #0e8c82;
  --chip: #0b2a43;
  --focus: #08706a;
  --btn: #0b2a43;          /* the buttons that take you to another site (the Garmin watch cards) */
  --btn-text: #eaf2f7;
  --btn-hover: #163a57;
  --shadow: 0 1px 2px rgba(7, 30, 48, .06), 0 10px 28px rgba(7, 30, 48, .07);
  --field-line: #5f7a8f;   /* the edge of a form control: 3:1 or better against the card and the page, as WCAG asks */
  --danger: #b3261e;       /* a button that deletes */
  --danger-text: #ffffff;
  --danger-ink: #b3261e;   /* the same red as text or an outline on a card */

  --radius: 16px;      /* cards (same two-step scale as the app) */
  --radius-sm: 12px;   /* small surfaces */

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b2a43;
    --card: #11314b;
    --soft: #0f3049;
    --line: #1f4b6b;
    --text: #eaf2f7;
    --muted: #93aec2;
    --link: #5ad1e3;
    --link-hover: #8fe3f0;
    --icon: #17beb0;
    --chip: #163a57;
    --focus: #5ad1e3;
    --btn: #17beb0;        /* navy would vanish into a navy card, so these are the brand teal in dark */
    --btn-text: #06202e;
    --btn-hover: #45d3c7;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px rgba(0, 0, 0, .25);
    --field-line: #7596ad;
    --danger: #ff9f95;
    --danger-text: #3a0a06;
    --danger-ink: #ff9f95;
  }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: var(--link-hover); }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
strong { font-weight: 650; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.site-header :focus-visible, .hero :focus-visible, .cta :focus-visible, .site-footer :focus-visible, .page-hero :focus-visible { outline-color: var(--aqua); }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 24px; } }

.skip-link {
  position: absolute; left: 16px; top: -72px; z-index: 100;
  background: var(--teal); color: var(--ink-on-accent);
  padding: .65rem 1rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 650; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ---------------------------------------------------------------- icons */
.icon { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-tile {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  border-radius: var(--radius-sm); background: rgba(23, 190, 176, .14); color: var(--icon);
}

/* ---------------------------------------------------------------- header */
.site-header { background: var(--navy-900); color: var(--on-navy); border-bottom: 1px solid rgba(147, 174, 194, .16); box-shadow: 0 6px 18px rgba(7, 30, 48, .14); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; line-height: 0; padding-block: 4px; }
.brand img { height: 30px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.site-nav a { color: var(--on-navy); text-decoration: none; font-weight: 560; font-size: .95rem; padding-block: .7rem; }
.site-nav a:hover { color: var(--aqua); }
/* the page you are on: colour and an underline, so it does not rely on colour alone */
.site-nav a[aria-current="page"] { color: var(--aqua); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }

/* Phones and small tablets: the logo gets its own 44px row and the seven menu links a row of their own below it.
   The links share the row out equally and only wrap onto a second row if they truly do not fit (a narrow
   phone, or large text). From 640px up there is room for the logo and the menu side by side. */
@media (max-width: 639px) {
  .header-inner { display: block; padding-block: 0; }
  .brand { display: flex; width: max-content; height: 44px; padding-block: 0; }
  .brand img { height: 26px; }
  .site-nav { flex-wrap: wrap; width: calc(100% + 16px); margin-inline: -8px; gap: 0; }
  .site-nav a { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .1rem; font-size: .76rem; text-align: center; }
  .site-nav a[aria-current="page"] { text-underline-offset: 6px; }
}

/* The menu stays on screen while the page scrolls, as long as the window is tall enough to spare the room
   (so not on a phone held sideways, or at high zoom, where it would cover the page). On a phone only the
   menu row(s) stay: the 44px logo row slides away, hence the negative top. scroll-padding keeps jump links
   and keyboard focus from landing underneath the menu. */
@media (min-height: 480px) {
  .site-header { position: sticky; top: 0; z-index: 50; }
  html { scroll-padding-top: 88px; }
}
@media (min-height: 480px) and (max-width: 639px) {
  .site-header { top: -44px; }
  html { scroll-padding-top: 104px; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.3rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: 650 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--teal); color: var(--ink-on-accent); }
.btn-primary:hover { background: #45d3c7; color: var(--ink-on-accent); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: clip; color: var(--on-navy);
  background:
    radial-gradient(70% 90% at 85% 12%, rgba(23, 190, 176, .22), transparent 62%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
}
.hero-grid { display: grid; gap: 44px; align-items: center; padding-block: clamp(40px, 7vw, 84px) clamp(84px, 10vw, 132px); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }

.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--muted-on-navy); font-size: .95rem; }
.pill {
  display: inline-block; background: var(--amber); color: var(--ink-on-accent);
  font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .65rem; border-radius: 999px;
}
.hero h1 { font-size: clamp(2.4rem, 1.15rem + 5.2vw, 4.2rem); font-weight: 800; margin-bottom: .4em; }
.hero h1 em, .cta h2 em, .page-hero h1 em { font-style: normal; color: var(--teal); }
.lede { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); color: #d5e3ec; max-width: 36em; }

.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted-on-navy); font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points .icon { width: 18px; height: 18px; color: var(--teal); }
.wave { position: absolute; z-index: 2; left: 0; right: 0; bottom: -1px; display: block; width: 100%; height: clamp(30px, 5vw, 58px); fill: var(--page); }
.wave-band { fill: var(--soft); }   /* a banner that runs straight into a shaded band */

/* One photo per page, in its banner (the app's own race-banner photos). The words must keep their contrast whatever
   the picture, so wherever text sits the navy shade alone must pass, never the photo.
   Below 900px the words run the full width of a tall, narrow banner, where a wide photo would be cropped to a thin
   slice under a heavy shade. So there the photo is a strip across the top (--photo-strip tall, nearly the whole
   picture), lightly shaded, fading to solid navy by the time the words start (--photo-strip minus 40px, where the
   shade is past .92). From 900px it fills the banner, shaded deepest on the left where the words are. */
.with-photo { --photo-strip: min(60vw, 340px); }
.hero-photo { position: absolute; top: 0; left: 0; z-index: 0; width: 100%; height: var(--photo-strip); object-fit: cover; object-position: 50% 60%; }
.with-photo::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: var(--photo-strip); z-index: 1;
  background: linear-gradient(180deg, rgba(7, 30, 48, .2) 0%, rgba(7, 30, 48, .3) 45%, rgba(7, 30, 48, .93) 78%, #071e30 100%);
}
@media (max-width: 899px) {
  .page-hero.with-photo { padding-top: calc(var(--photo-strip) - 40px); }
  /* Each photo is lifted (and a tall one positioned) so its horizon sits about halfway up the strip, in the light part,
     not low down where the strip fades to navy (the skipper, 7 Nov 2026). Lifting leaves navy under the photo's foot,
     which the shade has already all but reached. --photo-lift is a share of the strip's height. */
  .hero-photo { object-position: 50% var(--photo-y, 60%); transform: translateY(calc(var(--photo-strip) * var(--photo-lift, 0) * -1)); }
  .hero-photo[src*="photo-spinnakers"] { --photo-lift: .2; }
  .hero-photo[src*="photo-calm"] { --photo-lift: .1; }
  .hero-photo[src*="photo-coast"] { --photo-lift: .12; }
  .hero-photo[src*="photo-dusk"] { --photo-lift: .22; }
  .hero-photo[src*="photo-fleet"] { --photo-lift: .18; }
  .hero-photo[src*="photo-beat"] { --photo-y: 50%; }
  .hero-photo[src*="photo-island."] { --photo-y: 100%; --photo-lift: .19; }
  .hero-photo[src*="photo-dawn"] { --photo-y: 90%; }
  .hero-photo[src*="photo-needles"] { --photo-y: 85%; }
  .hero-photo[src*="photo-sun-path"] { --photo-y: 18%; }
  .hero.with-photo .hero-grid { padding-top: calc(var(--photo-strip) - 40px); }
  /* below the strip the banner is the strip's own solid navy: the usual lighter-lower shading (and the home banner's
     teal glow) would meet the strip's foot in a visible line */
  .hero.with-photo, .page-hero.with-photo { background: var(--navy-900); }
}
@media (min-width: 900px) {
  .hero-photo { height: 100%; }
  .hero .hero-photo { object-position: 70% 65%; }   /* the home page: the sunset and the spinnakers sit behind the phone */
  .with-photo::before {
    bottom: 0; height: auto;
    background: linear-gradient(90deg, rgba(7, 30, 48, .92) 0%, rgba(7, 30, 48, .88) 48%, rgba(7, 30, 48, .5) 100%);
  }
}
.hero > .wrap, .page-hero > .wrap { position: relative; z-index: 2; }

/* The phones are real screenshots of the app (assets/app-*.jpg, made by tools/make_assets.py) in a navy frame: in the
   home page's banner the Home screen, in its Watches row the watch chart with the asleep watch beside it, in its Lists
   row and on the Lists page the crew's answers to the season's races (drawn, not screenshots: see .ans-media). */
.hero-art { display: flex; justify-content: center; width: min(100%, 440px); margin-inline: auto; }
.phone {
  width: min(100%, 292px); overflow: hidden;
  background: var(--navy-900); border: 8px solid var(--navy-600); border-radius: 40px; box-shadow: 0 26px 60px rgba(0, 0, 0, .38);
}
.phone-shot img { display: block; width: 100%; height: auto; }
.split-art .phone { margin-inline: auto; }

/* ---------------------------------------------------------------- sections */
.section { padding-block: clamp(56px, 8vw, 104px); }
.band { background: var(--soft); }
.kicker { margin: 0 0 12px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--link); }
.section h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.7rem); font-weight: 760; max-width: 21em; }
.section h2 em { font-style: normal; color: var(--icon); }
.section-lede { max-width: 40em; margin-bottom: 0; font-size: 1.15rem; color: var(--muted); }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin: 16px 0 6px; font-size: 1.15rem; line-height: 1.25; }
.card p { margin: 0; color: var(--muted); }
.card.value h3 { margin-top: 0; }

/* Features and the home page's three tools are open columns, not boxes: a coloured line on top and the words. */
.card.feature { background: none; border: 0; border-top: 4px solid var(--teal); border-radius: 0; box-shadow: none; padding: 18px 0 0; }
.card.feature h3 { margin-top: 0; }
.grid:has(> .card.feature) { column-gap: 36px; row-gap: 44px; }

/* The home page's three tools: one row each (option A of the 7 Nov 2026 mock-ups), a picture with another overlapping
   it beside the words: the watch chart with the watch, the crew's race answers, and the middle row on a navy band with
   the Scope in camera mode, the fleet photo as its camera view.
   Straight edges on the band: the page keeps its one wave, under the banner. */
.tool-row { display: grid; gap: 52px 56px; align-items: center; padding-block: clamp(36px, 5vw, 64px); }
@media (min-width: 860px) {
  .tool-row { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .tool-row-flip .tool-media { order: 2; }
}
.tool-media { position: relative; }
.tool-media-shot { display: flex; justify-content: center; align-items: flex-end; }
.tool-media-shot .phone { flex: 0 0 min(60%, 270px); }
.tool-watch-side { position: relative; flex: 0 0 min(44%, 210px); min-width: 0; height: auto; margin: 0 0 14% -13%; }

/* The crew's answers to the season's races (the home page's third row and the Lists page): an ILLUSTRATION drawn from
   the app's My availability screen (each race with its calendar-page date badge, violet month strip, and Yes, No, Maybe
   buttons in that order, the chosen one filled in its colour) beside the skipper's view of one race (each person's
   answer and the race's tally, as the app's race availability screen words it). The races and names are made up.
   The filled buttons are a shade darker than the app's green, red and amber so white lettering on them passes AA; the
   answer chips are pale fills with dark lettering, which read in light and dark alike. */
/* The skipper's card hangs 26px below the list; the padding keeps that inside the picture's own box. */
.ans-media { display: flex; justify-content: center; align-items: flex-end; padding-bottom: 26px; }
.ans-list {
  flex: 0 1 min(58%, 320px); min-width: 0; padding: 14px 14px 4px;
  background: var(--soft); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.ans-list p { margin: 0; }
.ans-head { margin: 0 2px 10px; font-weight: 700; }
.ans-race { margin-bottom: 10px; padding: 10px 12px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ans-top { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ans-date { flex: none; width: 44px; overflow: hidden; text-align: center; line-height: 1.1; background: #fff; border: 1px solid #b6c5d2; border-radius: 8px; }
.ans-date span { display: block; }
.ans-m { padding: 2px 0; background: #5b4fc7; color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .06em; }
.ans-d { padding-top: 2px; color: #000; font-size: 1.15rem; font-weight: 700; }
.ans-w { padding-bottom: 3px; color: #000; font-size: .58rem; }
.ans-name { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.ans-when { margin-top: 2px; color: var(--muted); font-size: .8rem; }
.ans-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.ans-btns span { display: block; padding: 5px 0; text-align: center; white-space: nowrap; font-size: .8rem; font-weight: 600;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; }
.ans-btns .ans-on-yes { background: #1d7a4c; border-color: #1d7a4c; color: #fff; }
.ans-btns .ans-on-no { background: #b3261e; border-color: #b3261e; color: #fff; }
.ans-btns .ans-on-maybe { background: #8a5a00; border-color: #8a5a00; color: #fff; }
.ans-side {
  position: relative; flex: 0 1 min(44%, 240px); min-width: 0; margin: 0 0 -26px -4%; padding: 12px 16px 6px; font-size: .92rem;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.ans-side p { margin: 0; }
.ans-title { font-weight: 700; }
.ans-sum { padding: 2px 0 8px; color: var(--muted); font-size: .8rem; }
.ans-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.ans-chip { flex: none; min-width: 4.6em; padding: 1px 9px; text-align: center; font-size: .72rem; font-weight: 700; border-radius: 999px; }
.ans-chip-yes { background: #dff3e8; color: #17603b; }
.ans-chip-no { background: #fde2df; color: #8f1f17; }
.ans-chip-maybe { background: #fdf0d2; color: #6b4700; }
.ans-chip-none { background: #e3eef5; color: #1f4b6b; }
/* On a narrow phone the two sit one above the other, the skipper's card tucked under the list's bottom-right corner. */
@media (max-width: 520px) {
  .ans-media { flex-wrap: wrap; justify-content: flex-start; padding-bottom: 0; }
  .ans-list { flex-basis: 88%; padding-bottom: 30px; }
  .ans-side { flex-basis: 70%; margin: -24px 0 0 auto; }
}
.tool-text > .tool-num { margin: 0 0 6px; font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--icon); }
.tool-text h3 { margin: 0 0 10px; font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
.tool-text > p { margin: 0; color: var(--muted); font-size: 1.08rem; }
.tool-text .bullets { margin-bottom: 18px; }
.tool-text .more + .more { margin-top: 6px; }
.tool-band { background: var(--navy-900); color: var(--on-navy); }
.tool-band .tool-text > .tool-num { color: var(--aqua); }
.tool-band h3 { color: var(--on-navy); }
.tool-band .tool-text > p, .tool-band .bullets li { color: #c9d8e3; }
.tool-band .bullets .icon { color: var(--teal); }
.tool-band a { color: var(--aqua); }
.tool-band a:hover { color: var(--on-navy); }
.tool-band :focus-visible { outline-color: var(--aqua); }
/* the phone: the camera view in the screen's sight band, the screen picture (clear there) over it */
.ar-phone { position: relative; width: min(100%, 300px); aspect-ratio: 320 / 548; margin-inline: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.ar-phone img { position: absolute; left: 0; width: 100%; }
.ar-photo { top: 29.562%; height: 47.810%; }
.ar-ui { top: 0; height: 100%; }
.tool-note { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }

.audience { margin: 28px 0 0; color: var(--muted); max-width: 46em; }

/* how it works */
.how-grid { display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) { .how-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } }
.how-grid figure img { width: 100%; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 24px; }
.steps li { counter-increment: step; position: relative; padding-left: 64px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px;
  border-radius: 50%; background: var(--chip); border: 1px solid var(--navy-500); color: var(--teal);
  font: 700 1.1rem/42px var(--mono); text-align: center;
}
.steps h3 { margin: 0 0 4px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); }
figure { margin: 0; }
figure img { display: block; margin-inline: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
figcaption { margin-top: 14px; font-size: .9rem; text-align: center; color: var(--muted); }

/* The Garmin page's top section: the introduction, then the watch pictures, then the store tiles and the checklist.
   On a phone they follow one another in that order, so the picture is seen straight away, and only the "on watch"
   picture shows (two would be too small to read). From 600px both show, side by side, and from 900px the pictures
   move into a column of their own at the right and stay in view while the page scrolls. */
.watch-grid { display: grid; }
.watch-stage { display: grid; justify-items: center; gap: 14px; margin-top: 30px; }
.watch-pair { display: grid; grid-template-columns: minmax(0, 300px); justify-content: center; gap: 8px 12px; width: 100%; }
.watch-pair figure { display: grid; justify-items: center; gap: 0; }
.watch-pair img { display: block; width: 100%; height: auto; border-radius: 0; box-shadow: none; }
.watch-pair figcaption { margin: 0; max-width: 17em; font-size: .9rem; line-height: 1.35; color: var(--muted-on-navy); }
.page-hero .watch-note { max-width: 30em; margin: 0; font-size: .85rem; line-height: 1.45; text-align: center; color: var(--muted-on-navy); }
@media (max-width: 599px) { .watch-pair .watch-asleep { display: none; } }
@media (min-width: 600px) { .watch-pair { grid-template-columns: repeat(2, minmax(0, 270px)); } }
@media (min-width: 900px) {
  .watch-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); column-gap: 52px; grid-template-areas: "intro stage" "rest stage"; }
  .watch-intro { grid-area: intro; }
  .watch-stage { grid-area: stage; align-self: start; position: sticky; top: 112px; margin-top: 0; padding-top: 12px; }
  .watch-rest { grid-area: rest; }
}
.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: #d5e3ec; }
.checklist strong { color: var(--on-navy); }
.checklist .icon { width: 22px; height: 22px; margin-top: 3px; color: var(--teal); }
.fineprint { margin: 28px 0 0; font-size: .9rem; color: var(--muted-on-navy); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary { position: relative; list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 650; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--link); border-bottom: 2px solid var(--link);
  transform: translateY(-70%) rotate(45deg);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 18px 16px; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }
.faq-more { margin: 22px 0 0; color: var(--muted); }
/* The FAQ's topic links and group headings (JibTrak-site#24) */
.prose .faq-jump ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.faq-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-size: .95rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 600; text-decoration: none; }
.faq-jump a:hover { border-color: var(--link); }
.prose .faq-jump li { margin: 0; }
.prose h2 + .faq { margin-top: 4px; }

/* closing call to action */
.cta { text-align: center; color: var(--on-navy); padding-block: clamp(56px, 8vw, 96px); background: linear-gradient(135deg, var(--navy-800), var(--navy-900)); }
.cta h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); font-weight: 760; margin-inline: auto; max-width: 20em; }
.cta p { margin: 0 auto 26px; max-width: 34em; color: #d5e3ec; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--navy-900); color: var(--muted-on-navy); padding-block: 44px 30px; font-size: .92rem; }
.site-footer a { color: var(--on-navy); }
.site-footer a:hover { color: var(--aqua); }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.footer-brand img { height: 28px; width: auto; display: block; margin-bottom: 12px; }
.footer-brand p { margin: 0; max-width: 30em; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 4px 40px; }
.footer-links a { display: inline-block; padding-block: .35rem; }
.legal { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(147, 174, 194, .16); font-size: .82rem; line-height: 1.55; }
.legal p { margin: 0 0 .6em; }

/* ---------------------------------------------------------------- page banners, and document pages (privacy, support, 404) */
.page-hero { position: relative; overflow: clip; background: linear-gradient(180deg, var(--navy-900), var(--navy-800)); color: var(--on-navy); padding-block: clamp(36px, 6vw, 72px); border-bottom: 1px solid rgba(147, 174, 194, .16); }
.page-hero.with-photo { padding-bottom: clamp(64px, 10vw, 120px); border-bottom: 0; }   /* room for the wave */
.page-hero h1 { margin: 0 0 .3em; font-size: clamp(2rem, 1.3rem + 3vw, 3.1rem); font-weight: 800; }
.page-hero p { margin: 0; max-width: 38em; color: #d5e3ec; font-size: 1.15rem; }
.page-hero .meta { margin-top: 14px; font-size: .9rem; color: var(--muted-on-navy); }
.page-hero .kicker { margin: 0 0 12px; max-width: none; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--aqua); }
.page-hero .fineprint { margin: 28px 0 0; font-size: .9rem; color: var(--muted-on-navy); }
.page-hero .checklist { margin-top: 28px; }

/* App store tiles, on every page. A store whose listing is live (.store-live: Garmin Connect IQ since 5 Nov 2026, the App Store since 8 Nov 2026) is a
   link to it, with a solid edge and an "Available now" tag; the others are not links and say "Coming soon" until their
   listing exists. A tile carries either the store's own official badge (.store-official: the App Store
   and Google Play so far) or, until that store's official file has been supplied, the store's mark in a chip. The fourth
   tile is the early Windows version (.store-windows, the skipper, 7 Nov 2026: "put the windows download button with the
   other apps with the same shape button"); it opens /windows, which offers the file only on a Windows device. The four sit
   two across (one on the narrowest phones, where two would leave a badge too little room, because a badge can be neither
   squashed nor shrunk below 40px tall). The column counts are fixed by screen width on purpose: a self-wrapping
   grid made the page scroll sideways. Google Play's badge is wider than Apple's: re-measure where these switch if either changes. */
.stores { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 520px; color: var(--on-navy); }
.page-hero .stores { margin-top: 24px; }
.cta.cta-slim { padding-block: clamp(28px, 5vw, 44px); }
.cta .stores { margin-inline: auto; text-align: left; }
.stores + .hero-points { margin-top: 22px; }
/* The answer page carries the two phone tiles alone (JibTrak#1184 follow-up), with a line under them about using the link in the app. */
.page-hero .stores-note { margin: 12px 0 0; max-width: 520px; font-size: .9rem; color: var(--muted-on-navy); }
.hero-trust { max-width: 36em; margin: 16px 0 0; color: var(--muted-on-navy); font-size: .95rem; }
/* Links on the navy hero and page banners stay aqua in both themes (the ordinary link colour is too dark on navy by day) */
/* a link in a navy banner (not a button or a store tile): aqua, as the light-page teal is too dark on navy */
.hero-trust a, .page-hero p a:not(.btn) { color: var(--aqua); }
.hero-trust a:hover, .page-hero p a:not(.btn):hover { color: var(--on-navy); }
.stores li { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 11px; border: 1px dashed rgba(234, 242, 247, .42); border-radius: var(--radius-sm); background: rgba(234, 242, 247, .07); line-height: 1.25; cursor: default; }
/* forced-color-adjust keeps each chip's own colours if a visitor forces theirs (the white behind the Garmin mark must stay white) */
/* A live tile: the whole tile is the link, so the padding moves from the tile onto the link. */
.stores li.store-live { padding: 0; border-style: solid; border-color: rgba(234, 242, 247, .7); cursor: auto; }
.store-link { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 10px 12px 11px; border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.store-link:hover { background: rgba(234, 242, 247, .1); }
.store-link:hover .store-name { text-decoration: underline; }
.store-link:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }
.store-live .store-tag { color: var(--aqua); }
.store-chip { align-self: flex-start; display: inline-flex; align-items: center; height: 28px; margin-bottom: 4px; padding: 0 8px; border: 1px solid #1f4b6b; border-radius: 8px; background: #163a57; forced-color-adjust: none; }
.store-chip img { display: block; height: 18px; width: auto; }
.store-chip-garmin { background: #fff; border-color: #fff; }
/* An official badge is shown exactly as the store supplies it: never recoloured, squashed, dimmed or covered, never
   under 40px tall, and with clear space of a quarter of its height on every side (Apple's rule). That is the tile's
   padding, and below the badge its margin plus the tile's 3px gap: 11px at 44px tall and 11px at 40px tall. */
.store-badge { display: block; align-self: flex-start; height: 44px; width: auto; max-width: none; margin-bottom: 8px; }
.stores li.store-official { padding: 12px; }
/* a live official badge (the App Store): the link carries the padding, as on the other live tiles */
.stores li.store-official.store-live { padding: 0; }
.store-official .store-link { padding: 12px; }
/* Google's badge arrives as a plain picture with a grey edge, which is trimmed off; this gives it the thin white edge and
   rounded corners Apple's badge has built in. Google's is wider than Apple's, so it is fitted inside a box the same size as
   Apple's (132 x 44) with black above and below, which is the badge's own colour; the picture itself is not stretched. */
.store-badge-play { box-sizing: border-box; width: 132px; border: 1px solid #fff; border-radius: 8px; background: #000; object-fit: contain; }
.store-tag { font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--amber); }
.store-name { font-size: 1rem; font-weight: 700; text-wrap: balance; }
.store-for { font-size: .8rem; color: var(--muted-on-navy); }
@media (max-width: 559px) {
  .stores { gap: 8px; }
  .stores li { padding: 9px 10px 10px; }
  .stores li.store-live { padding: 0; }
  .store-link { padding: 9px 10px 10px; }
  .stores li.store-official { padding: 10px; }
  .stores li.store-official.store-live { padding: 0; }
  .store-official .store-link { padding: 10px; }
  .store-badge { height: 40px; }
  .store-badge-play { width: 120px; border-radius: 7px; }
  .store-name { font-size: .9rem; }
  .store-for { display: none; }
}
@media (max-width: 359px) { .stores { grid-template-columns: minmax(0, 1fr); } }   /* two across would leave a badge too little room */

.prose { max-width: 760px; padding-block: clamp(36px, 6vw, 72px); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2.2em 0 .5em; font-size: 1.5rem; }
.prose h3 { margin: 1.6em 0 .4em; font-size: 1.1rem; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--icon); }
.callout { margin: 1.4em 0; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--radius-sm); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

.service { margin: 12px 0; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.service h3 { margin: 0 0 8px; font-size: 1.05rem; }
.service dl { display: grid; grid-template-columns: 1fr; gap: 6px 16px; margin: 0; }
@media (min-width: 620px) { .service dl { grid-template-columns: 9.5em 1fr; } }
.service dt { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding-top: .15em; }
.service dd { margin: 0; }

.contact-card { margin: 1.4em 0; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-card .address { display: block; margin: 4px 0 10px; font: 650 1.25rem/1.3 var(--mono); overflow-wrap: anywhere; }
.contact-card p:last-child { margin-bottom: 0; }

.notfound { text-align: center; padding-block: clamp(64px, 12vw, 140px); }
.notfound .code { display: block; margin-bottom: 8px; font: 700 clamp(3rem, 12vw, 6rem)/1 var(--mono); color: var(--icon); }

/* ---------------------------------------------------------------- print */
@media print {
  .site-header, .hero, .cta, .skip-link, .stores, .site-footer .footer-links { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .page-hero { background: none; color: #000; padding: 0 0 12pt; }
  .page-hero p, .page-hero .meta { color: #333; }
  .site-footer { background: none; color: #333; padding: 12pt 0 0; }
  a { color: #000; }
}

/* contact card and 404 details */
.contact-card h2 { margin: 0 0 .35em; font-size: 1.25rem; }
.notfound h1 { margin-bottom: .3em; font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); }
.notfound p { margin: 0 auto 24px; max-width: 30em; color: var(--muted); }

/* ---------------------------------------------------------------- building blocks for the longer pages (handicap, lists, Garmin) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* a block inside a long page; .split puts words on one side and a picture on the other */
.block { margin-top: clamp(56px, 8vw, 96px); }
.block:first-child, .section-head + .block { margin-top: 0; }
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  .split.flip .split-art { order: -1; }
}
.split h2, .split h3, .block-head h2 { margin: 0 0 .5em; font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.8rem); font-weight: 740; }
.split-text > p, .block-head p { color: var(--muted); }
.block-head { max-width: 44em; margin-bottom: 28px; }
.block-head p:last-child { margin-bottom: 0; }
.note { margin: 18px 0 0; font-size: .9rem; color: var(--muted); }
.card .note { margin: 12px 0 0; }
.card p + p { margin-top: 12px; }
.card .more { margin-top: 12px; font-weight: 650; }

.bullets { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; }
.bullets li { display: grid; grid-template-columns: 20px 1fr; column-gap: 12px; color: var(--muted); }
.bullets .icon { width: 20px; height: 20px; margin-top: 4px; color: var(--icon); }
.bullets strong { color: var(--text); }

.split-art figcaption { max-width: 34em; margin-inline: auto; }
.shot { width: 100%; max-width: 320px; border-radius: 28px; box-shadow: 0 26px 60px rgba(7, 30, 48, .28); }
.shot-large { max-width: 390px; }

/* cards with a heading row */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.lc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.lc-head h3 { margin: 0; font-size: 1.2rem; line-height: 1.2; }

/* list cards, and the smaller cards for the shorter lists */
.list-card { display: flex; flex-direction: column; }
.list-card > p { margin: 0; }
.list-card > .note { margin: 12px 0 0; }
.card.compact { padding: 18px 20px; }
.card.compact h3 { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.25; }

/* the Garmin watch shortlist */
.score-note { max-width: 46em; margin: 22px 0 28px; color: var(--muted); }
.watch-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.watch-card { display: flex; flex-direction: column; }
.card.watch-card .wc-desc { flex: 1 1 auto; }
/* where the browser can, each card borrows five rows from the list, so titles, descriptions, scores and prices
   line up across a row (older browsers keep the plain stacked card above) */
@supports (grid-template-rows: subgrid) {
  .watch-card { display: grid; grid-template-rows: subgrid; grid-row: span 5; row-gap: 0; }
}
.wc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card.watch-card h3 { margin: 0; font-size: 1.4rem; letter-spacing: -.02em; }
.wc-tag { flex: none; margin-top: .2rem; padding: .18rem .6rem; border-radius: 999px; background: rgba(23, 190, 176, .16); color: var(--link); font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.card.watch-card .wc-desc { margin: 10px 0 16px; }
/* Four scores, then the total (their sum) across the whole row underneath. The number sits above its label and
   everything is packed from the top, so a label that has to wrap ("Price & looks" on a phone) cannot push its own
   number out of line with the others; two across on a phone, four across from 720px. */
.wc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; margin: 0; padding: 12px 0; border-block: 1px solid var(--line); }
.wc-stats > div { display: flex; flex-direction: column; min-width: 0; }
.wc-stats dt { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wc-stats dd { order: -1; margin: 0; font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.wc-stats .wc-total { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.wc-stats .wc-total dd { order: 0; font-size: 1.25rem; }
@media (max-width: 719px) { .wc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wc-bar { height: 8px; margin-top: 14px; border-radius: 8px; background: var(--soft); overflow: hidden; }
.wc-bar i { display: block; height: 100%; border-radius: 8px; background: var(--teal); }
.w-51 { width: 51%; }
.w-65 { width: 65%; }
.w-69 { width: 69%; }
.w-72 { width: 72%; }
.w-76 { width: 76%; }
.w-78 { width: 78%; }
.w-79 { width: 79%; }
.w-80 { width: 80%; }
.w-82 { width: 82%; }
.card.watch-card .wc-price { margin: 0; padding-top: 14px; color: var(--text); }
/* Where to buy: every choice is its own button, two to a row and the retailer still to come across the bottom.
   The real links are solid (navy in light, teal in dark, so they read as buttons in both); the retailer to come
   is dashed and is not a link. The buttons sit along the bottom of each card, so they line up across a row. */
.wc-foot { display: flex; flex-direction: column; }
.card.watch-card .wc-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: 10px; margin: auto 0 0; padding-top: 16px; }
.wc-links a { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: .5rem 14px; border: 2px solid transparent; border-radius: var(--radius-sm); font-size: .95rem; font-weight: 650; line-height: 1.2; text-align: center; }
.wc-links a { background: var(--btn); color: var(--btn-text); text-decoration: none; }
.wc-links a:hover { background: var(--btn-hover); color: var(--btn-text); }
.wc-links a:focus-visible { border-radius: var(--radius-sm); }
/* The comparison table above the watch cards (made by tools/garmin_watches.py) */
.table-wrap.compare-wrap { max-width: 34rem; margin: 0 0 28px; }
.compare-table tr:last-child th { border-bottom: 0; }
.compare-table caption { caption-side: top; padding: 10px 10px 6px; text-align: left; font-weight: 700; color: var(--text); }
.compare-table th[scope="row"] { font-size: .93rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); background: transparent; white-space: normal; }
.compare-table th[scope="row"] a { display: inline-block; padding: 6px 0; }
/* Garmin page: putting it on your watch, and the watches it runs on */
.install-grid { display: grid; gap: 44px; margin-top: 36px; }
@media (min-width: 900px) { .install-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.watch-families h3 { margin: 0 0 10px; font-size: 1.1rem; }
.watch-families ul { margin: 0 0 12px; padding-left: 1.2em; display: grid; gap: 6px; }
.watch-families p { margin: 0 0 8px; }
.wc-price b { margin-right: .35em; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* "about US$985" under a UK price, added by assets/garmin.js for a reader outside the UK (21 Nov 2026). */
.local-price { display: block; margin-top: .15em; font-weight: 600; color: var(--text); }
.compare-table .local-price { font-size: .9rem; }
/* The "What to avoid" card ends the list: the whole width of the row, with amber down its left edge like the other
   places the site says "take care" (see .row-card). */
.avoid-card { grid-column: 1 / -1; border-left: 4px solid var(--amber); }
.card.avoid-card h3 { margin: 0 0 6px; font-size: 1.4rem; letter-spacing: -.02em; }
.card.avoid-card .avoid-intro { margin: 0 0 14px; }
.avoid-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.avoid-list li { margin: 0; color: var(--muted); }
.avoid-list strong { color: var(--text); }
/* The accessories card after it (9 Nov 2026): the whole width of the row too, teal down its left edge, one buy button that
   looks like the watch cards' ones but sits at its natural width rather than stretching across the row. */
.accessories-card { grid-column: 1 / -1; border-left: 4px solid var(--teal); }
.card.accessories-card h3 { margin: 0 0 6px; font-size: 1.4rem; letter-spacing: -.02em; }
.card.accessories-card .accessories-text { margin: 0; color: var(--muted); }
.card.accessories-card .wc-links { display: flex; margin: 0; padding-top: 16px; }


/* ---------------------------------------------------------------- the club pages (clubs, club-setup, club)
   Forms, tables and status lines. The site had no form controls before these pages, so every control here keeps to
   the same rules as the rest of the site: at least 44px to tap, a visible edge (3:1), the shared focus ring, and
   colours from the same tokens in light and dark. Nothing is set inline: the Content-Security-Policy forbids it. */
[hidden] { display: none !important; }

.club-section { padding-block: clamp(28px, 5vw, 56px); }
.club-app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.club-foot { max-width: 46em; margin-top: 28px; }
.club-app .grid { margin: 0; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); min-width: 0; }
@media (max-width: 599px) { .panel { padding: 18px 16px; } }
.panel > :first-child { margin-top: 0; }
.panel h2 { margin: 0 0 .35em; font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); }
.panel h3 { margin: 1.2em 0 .4em; font-size: 1.1rem; }
.panel h4 { margin: 0 0 .25em; font-size: 1rem; }
.panel p { margin: 0 0 .9em; text-wrap: pretty; }
.panel .note { margin: 0 0 1.1em; font-size: .93rem; color: var(--muted); }
.sub-card { margin: 0 0 16px; padding: 16px; background: var(--page); border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.sub-card > :first-child { margin-top: 0; }
.sub-card .note { margin-bottom: .9em; }

/* fields */
.field { display: grid; gap: 6px; margin: 0 0 16px; min-width: 0; }
.field > label, .label-line { font-weight: 650; font-size: .95rem; }
.label-line { margin: 1.2em 0 .3em; }
.hint { margin: 0; font-size: .88rem; color: var(--muted); }
.field .hint { margin-bottom: 2px; }
.club-app input[type="text"], .club-app input[type="password"], .club-app input[type="url"], .club-app input[type="email"], .club-app input[type="date"], .club-app input[type="time"], .club-app select, .club-app textarea {
  display: block; width: 100%; min-width: 0; min-height: 48px; padding: .6rem .75rem;
  font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--field-line); border-radius: var(--radius-sm);
}
.club-app textarea { min-height: 8rem; line-height: 1.45; resize: vertical; }
.club-app select { text-overflow: ellipsis; }
.club-app input.mono, .club-app textarea.mono { font-family: var(--mono); }
.club-app input::placeholder, .club-app textarea::placeholder { color: var(--muted); opacity: 1; }
.field-row { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--teal); }
.check label { cursor: pointer; }
.check-big label { font-weight: 650; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.sub-card .actions, .field + .actions { margin-top: 10px; }

/* more buttons (.btn and .btn-primary are above) */
.btn-secondary, .btn-small { background: transparent; color: var(--text); border-color: var(--field-line); }
.btn-secondary:hover, .btn-small:hover { background: var(--soft); color: var(--text); }
.btn-small, .btn-danger-quiet { min-height: 44px; padding: .45rem 1rem; font-size: .95rem; }
.btn-icon { min-height: 44px; min-width: 44px; padding: .4rem .7rem; background: transparent; color: var(--link); border-color: transparent; font-size: .95rem; text-decoration: underline; text-underline-offset: .18em; }
.btn-icon:hover { background: var(--soft); color: var(--link-hover); }
.btn-danger { background: var(--danger); color: var(--danger-text); }
.btn-danger:hover { filter: brightness(1.08); color: var(--danger-text); }
.btn-danger-quiet { background: transparent; color: var(--danger-ink); border-color: var(--danger-ink); }
.btn-danger-quiet:hover { background: var(--soft); color: var(--danger-ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn[disabled]:hover { filter: none; }

/* messages */
.notice { margin: 0 0 16px; padding: 12px 14px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--radius-sm); }
.notice-error { border-left-color: var(--danger-ink); }
.notice-warn { border-left-color: var(--amber); }
.panel .notice { margin-bottom: 1em; }
.status { min-height: 1.5em; margin: 12px 0 0; font-size: .95rem; color: var(--muted); }
.status-ok { color: var(--link); font-weight: 600; }
.status-error { color: var(--danger-ink); font-weight: 650; }
.form-errors:focus { outline: none; }
.empty { padding: 14px 16px; margin: 0 0 16px; color: var(--muted); border: 1px dashed var(--field-line); border-radius: var(--radius-sm); }

/* a banner with something beside its words: the club buttons on /clubs, and the signed-in club on /club-setup. Side by side
   from 760px wide, one under the other below that. */
.hero-split { display: grid; gap: 22px 40px; align-items: center; }
@media (min-width: 760px) { .hero-split { grid-template-columns: minmax(0, 1fr) auto; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 760px) { .hero-actions { flex-direction: column; align-items: stretch; min-width: 14rem; } }
.hero-actions-free { flex-basis: 100%; margin: -4px 0 4px; color: var(--muted-on-navy); font-size: .9rem; }
@media (min-width: 760px) { .hero-actions-free { text-align: center; } }
.btn-quiet { background: transparent; border-color: transparent; color: var(--aqua); font-weight: 600; text-decoration: underline; text-underline-offset: .18em; }
.btn-quiet:hover { color: var(--on-navy); }

/* the buttons that sit on the navy banner (the page's own secondary button is dark on light and would vanish there) */
.page-hero .btn-secondary { background: transparent; color: var(--on-navy); border-color: rgba(234, 242, 247, .55); }
.page-hero .btn-secondary:hover { background: rgba(234, 242, 247, .12); color: #fff; }

/* the signed-in club, in the banner at the top of the page: logo and name, the link to its public page, and who is signed in */
.club-hero-bar h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.5rem); }
.page-hero .club-bar-links { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 1rem; }
.club-hero-bar a { color: var(--aqua); }
.club-hero-bar a:hover { color: #8fe3f0; }
.page-hero .club-area { margin: 0 0 .3em; font-size: 1.1rem; }
.page-hero .club-address { margin: 0 0 .3em; font-size: 1rem; overflow-wrap: anywhere; }
.club-hero-public .link-line { margin: 0; font-size: 1rem; }
.page-hero .club-disclaimer { margin: .8em 0 0; font-size: .9rem; color: var(--muted-on-navy); }
.club-bar-side { display: grid; gap: 8px; justify-items: start; }
.page-hero .signed-in-as { margin: 0; font-size: .95rem; color: var(--muted-on-navy); overflow-wrap: anywhere; }
@media (min-width: 760px) { .club-bar-side { justify-items: end; } .page-hero .signed-in-as { text-align: right; } }

/* a club's logo: drawn on a canvas (the pages' policy allows no image from anywhere else), on a white tile so that a dark or
   see-through picture shows in light and dark alike */
.club-logo { display: block; flex: none; width: auto; max-width: 100%; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.club-logo-bar { height: 60px; max-width: 120px; }
.club-logo-head { height: 84px; max-width: 168px; }
.club-logo-card { height: 112px; max-width: 224px; }
.club-bar-title { display: flex; align-items: center; gap: 12px 16px; margin: 0 0 .4em; min-width: 0; }
.logo-card { margin: 0 0 6px; }
.logo-card .empty { margin: 0; }

/* the views of a signed-in club: Class ratings, Boats, Races, Account */
.view-tabs { display: flex; gap: 4px; margin: 0; border-bottom: 2px solid var(--line); }
.view-tab { flex: 1 1 0; min-height: 48px; padding: .5rem .3rem; font: inherit; font-size: .95rem; font-weight: 650; color: var(--muted); background: transparent; border: 0; border-bottom: 4px solid transparent; margin-bottom: -2px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; cursor: pointer; }
@media (max-width: 479px) { .view-tab { font-size: .88rem; padding-inline: .15rem; } }
@media (min-width: 600px) { .view-tab { flex: 0 0 auto; min-width: 9rem; padding-inline: 1.4rem; font-size: 1rem; } }
.view-tab:hover { background: var(--soft); color: var(--text); }
.view-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--link); }
.view-stack { display: grid; gap: 20px; }

/* tables */
.table-wrap { position: relative; max-width: 100%; margin: 0 0 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.data-table th, .data-table td { padding: 8px 10px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th { white-space: nowrap; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--soft); }
.data-table td { color: var(--text); }
.data-table td:not(:first-child) { white-space: nowrap; }
.data-table td:first-child { min-width: 7rem; }
.band-table td input { min-height: 44px; }
.band-table td:first-child input { min-width: 9rem; }
.band-table td input.num { width: 7.5rem; }
.band-table td:last-child { width: 1%; white-space: nowrap; }
/* On a phone each class is a small block with its own labels, instead of a table that has to be scrolled sideways to reach To and Remove */
@media (max-width: 599px) {
  .band-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .band-table, .band-table tbody { display: block; }
  .band-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  .band-table tr:last-child { border-bottom: 0; }
  .band-table td { display: block; padding: 0; border: 0; }
  .band-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .band-table td:first-child { grid-column: 1 / -1; }
  .band-table td:first-child input, .band-table td input.num { width: 100%; min-width: 0; }
  .band-table td:last-child { grid-column: 1 / -1; width: auto; white-space: normal; }
  .band-table td:last-child::before { content: none; }
}

/* races */
.race-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.race-groups { display: grid; gap: 8px; margin: 0 0 16px; }
.race-group h3 { margin: 12px 0 10px; font-size: 1.1rem; }
.race-group .race-list, .race-group .empty { margin-bottom: 8px; }
.race-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px 16px; align-items: center; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
@media (min-width: 900px) { .race-row:not(.race-row-view) { grid-template-columns: minmax(0, 1fr) auto auto; } }
.race-main .race-name, .race-name { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.race-when { margin: 2px 0 0; font-size: .93rem; color: var(--muted); }
.race-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.race-count { font-size: .9rem; color: var(--muted); }
.race-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.race-main-pick { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.race-main-text { min-width: 0; }
.race-pick { flex: none; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--teal); cursor: pointer; }
.batch-bar { display: grid; gap: 8px; margin: 0 0 8px; padding: 12px 16px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.batch-count { margin: 0; font-weight: 600; }
.batch-bar .actions { margin: 0; gap: 8px; }
.batch-bar .btn { min-height: 44px; padding: .45rem 1rem; font-size: .95rem; }
@media (max-width: 599px) { .batch-bar .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; } .batch-bar .btn { width: 100%; padding-inline: .6rem; } }
.chip { display: inline-block; padding: .18rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.chip-live { background: rgba(23, 190, 176, .16); color: var(--link); }
.chip-draft { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.start-row { display: grid; gap: 0 12px; grid-template-columns: minmax(0, 1fr) 9rem auto; align-items: end; }
.start-row .field { margin-bottom: 8px; }
.start-row .btn-icon { margin-bottom: 8px; }
@media (max-width: 479px) { .start-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 8px; } .start-row .btn-icon { grid-column: 1 / -1; justify-self: start; margin: -4px 0 0; } }
.course-extra > .field-row:first-child { margin-top: 0; }
.entries-box { min-height: 10rem; font-size: .88rem; white-space: pre; overflow: auto; tab-size: 4; }
.sub-card h5, .import-title { margin: 24px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 1rem; }
.boat-editor { margin: 12px 0 0; padding: 14px 16px 6px; background: var(--card); border: 1px solid var(--field-line); border-radius: var(--radius-sm); }
.boat-editor h5, .boat-editor .editor-title { margin: 0 0 10px; padding: 0; border: 0; font-size: 1rem; }
.boat-editor .field-row { margin-bottom: 0; }
.boat-editor .actions { margin: 6px 0 12px; }
.boats-wrap { max-height: 26rem; overflow-y: auto; }
.boats-wrap th { position: sticky; top: 0; z-index: 1; }
.data-table td.boat-actions { width: 1%; white-space: nowrap; text-align: right; }
.boat-actions .btn-icon { padding-inline: .5rem; }
.boat-editor .field-row { align-items: end; }
/* On a phone each boat is a small block with its own labels and its Edit and Remove buttons in view, not a table to scroll sideways */
@media (max-width: 599px) {
  .boats-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .boats-table, .boats-table tbody { display: block; }
  .boats-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  .boats-table tr:last-child { border-bottom: 0; }
  .boats-table td, .data-table.boats-table td:not(:first-child) { display: block; min-width: 0; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .data-table.boats-table td:empty { display: none; }
  .boats-table td:first-child { grid-column: 1 / -1; font-weight: 700; }
  .boats-table td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .data-table td.boat-actions { grid-column: 1 / -1; display: flex; gap: 4px; width: auto; text-align: left; margin-left: -8px; }
}
/* picking boats from the club's own list, in a race's entries */
.boat-picker { margin: 12px 0 16px; padding: 14px 16px 10px; background: var(--card); border: 1px solid var(--field-line); border-radius: var(--radius-sm); }
.boat-picker h5 { margin: 0 0 10px; padding: 0; border: 0; }
.boat-picker .actions { margin: 6px 0 10px; }
.boat-picker .preview-count { margin: 8px 0; }
.pick-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 20rem; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--page); }
.pick-row { display: flex; align-items: flex-start; gap: 12px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.pick-row:last-child { border-bottom: 0; }
.pick-row input { flex: none; width: 24px; height: 24px; margin: 10px 0 0; accent-color: var(--teal); }
.pick-row label { flex: 1; display: grid; gap: 2px; min-width: 0; padding: 10px 0; cursor: pointer; overflow-wrap: anywhere; }
.pick-name { font-weight: 700; }
.pick-detail { color: var(--muted); font-size: .93rem; }
/* bringing in a race calendar (JibTrak-site#119) */
.calendar-import > h3 { margin: 0 0 8px; }
.calendar-import .file-pick { margin: 4px 0 0; }
.calendar-import .file-feedback { margin-bottom: 12px; }
.calendar-list { max-height: 28rem; }
.pick-note { font-size: .88rem; color: var(--muted); font-style: italic; }
.calendar-import .sub-card { margin-top: 20px; }
.preview-count { margin: 16px 0 8px; font-weight: 600; color: var(--text); }
.entries-preview .notice { margin-bottom: 8px; font-size: .93rem; }
.file-pick { position: relative; display: inline-block; margin-top: 12px; }
.actions .file-pick { margin-top: 0; }
.file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-input:focus-visible + .file-label { outline: 3px solid var(--focus); outline-offset: 3px; }
.file-label { cursor: pointer; }
.danger-zone { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.danger-zone h3 { margin-top: 0; }

/* a club's public page: each race opens in place */
.race-details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.race-row-view { padding: 0; border: 0; background: none; }
.race-details summary { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 16px; overflow-wrap: anywhere; padding: 14px 48px 14px 16px; cursor: pointer; list-style: none; }
.race-details summary::-webkit-details-marker { display: none; }
.race-details summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--link); border-bottom: 2px solid var(--link); transform: translateY(-70%) rotate(45deg); }
.race-details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.race-details .race-name { display: block; }
.race-details .race-when, .race-details .race-count { display: block; margin: 0; }
.race-body { padding: 0 16px 16px; }
.race-body h3 { margin: 1em 0 .4em; font-size: 1rem; }
.facts { display: grid; gap: 10px 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); margin: 0 0 14px; }
.facts dt { font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.earlier > summary { cursor: pointer; font-weight: 650; padding-block: 4px; }
.earlier[open] > summary { margin-bottom: 12px; }

/* a link that stands on a line of its own is a tap target, so it gets the room to be one */
.link-line a { display: inline-flex; align-items: center; min-height: 44px; }

/* the overview page */
.club-steps { max-width: 46em; }
.club-steps h3 { margin-bottom: 6px; }
.club-coming { max-width: 46em; margin: 28px 0 0; }
.cta .btn { margin-top: 4px; }
.cta-slim h2 { margin-bottom: .3em; }
@media print { .club-app .actions, .club-bar-side, .hero-actions { display: none; } .club-hero-bar a { color: #000; } .page-hero .club-disclaimer { color: #333; } }

/* ---------------------------------------------------------------- the answer page (/answer, JibTrak#1184) */
.answer-form { display: grid; gap: 14px; max-width: 46em; }
.answer-race { margin: 0; padding: 14px 16px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
/* each card's title sits inside the card, not on its edge (the skipper, 12 Nov 2026): a floated legend is drawn inside the box */
.answer-race legend, .answer-claim legend { float: left; width: 100%; padding: 0; margin: 0 0 8px; font-weight: 700; }
.answer-race legend { font-size: 1.05rem; }
.answer-race legend + *, .answer-claim legend + * { clear: both; }
/* the race card: the date tile with the start time under it on the left, the facts beside it (the skipper's mock-up, 12 Nov 2026) */
.answer-race-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 16px; align-items: start; margin: 0 0 14px; }
.answer-when { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.answer-when p { margin: 0; }
.answer-hours { color: var(--muted); font-weight: 400; white-space: nowrap; }
@media (max-width: 399px) { .answer-race-body { grid-template-columns: minmax(0, 1fr); gap: 12px; } .answer-when { align-items: flex-start; } }
/* the app's calendar tile (IconDecor.DateBadge): a paper calendar page, white with black ink in light and dark alike */
.date-tile { flex: none; display: flex; flex-direction: column; width: 64px; overflow: hidden; text-align: center; background: #fff; color: #000;
  border: 1px solid #1f4b6b; border-radius: 12px; font-weight: 600; line-height: 1.2; }
.date-tile-month { padding: 4px 0; background: #9d93f0; color: #06202e; font-size: 11px; letter-spacing: 1px; }
.date-tile-day { padding-top: 6px; font-size: 22px; }
.date-tile-weekday { padding-bottom: 8px; font-size: 11px; letter-spacing: 1px; }
/* always two columns: the questions down the left, never wrapped, each answer beside its question (the skipper, 12 Nov 2026) */
.answer-facts { grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; align-items: baseline; margin: 0; }
.answer-facts dt { white-space: nowrap; letter-spacing: .04em; }
/* on a phone the date tile takes room on the left, so the two long questions ("Crew aboard by", "Entry and notice") may take two lines */
@media (max-width: 599px) { .answer-facts { grid-template-columns: fit-content(5.5rem) minmax(0, 1fr); gap: 8px 12px; } .answer-facts dt { white-space: normal; } }
/* the mini account on the group link (JibTrak#1184 follow-up): keep your name with a password, log in */
.answer-claim, .answer-login, .answer-login-panel { margin: 0; padding: 14px 16px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.answer-claim .hint { margin-bottom: 10px; }
.hint-list { margin: 2px 0 4px; padding-left: 1.3em; }
.hint-list li { margin: 0; }
.answer-login h3, .answer-login-panel h3 { margin: 0 0 6px; font-size: 1.05rem; }
.answer-login .hint { margin-bottom: 10px; }
.answer-login .field, .answer-claim .field { margin-bottom: 10px; }
.answer-after:empty { display: none; }
.answer-after { display: grid; gap: 14px; }
.btn-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; margin-top: 6px; border: 0; background: none; color: var(--link); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.btn-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.answer-forgot { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.answer-forgot .field { margin-bottom: 10px; }
.answer-facts dd { overflow-wrap: anywhere; }
/* nothing in a race card is bold but the race's name (the skipper, 12 Nov 2026) */
.answer-race .date-tile, .answer-race .facts dt, .answer-race .facts dd { font-weight: 400; }
.answer-choices { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.answer-choice { position: relative; }
.answer-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.answer-choice label { display: inline-flex; align-items: center; justify-content: center; min-width: 5.2em; min-height: 44px; padding: .4rem .8rem; border: 2px solid var(--field-line); border-radius: 999px; font-weight: 400; cursor: pointer; background: transparent; color: var(--text); }
.answer-choice label:hover { background: var(--soft); }
.answer-choice input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.answer-yes input:checked + label { background: #1d7a43; border-color: #1d7a43; color: #ffffff; }
.answer-no input:checked + label { background: var(--danger); border-color: var(--danger); color: var(--danger-text); }
.answer-maybe input:checked + label { background: var(--amber); border-color: var(--amber); color: var(--ink-on-accent); }
.answer-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.answer-area { display: grid; gap: 14px; }

/* ---------------------------------------------------------------- the statistics page (/stats, for the skipper only) */
.stats-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; }
.stats-toolbar .actions { margin: 0; }
.stats-toolbar .status { flex-basis: 100%; margin: 0; }
.stats-toolbar .status:empty { display: none; }
.stats-fetched { margin: 0; color: var(--muted); font-size: .95rem; }
.stats-key { max-width: 34rem; }
.stats-source { margin: 0 0 1em; color: var(--muted); font-size: .93rem; }
.stats-block { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); min-width: 0; }
.stats-source + .stats-block, .stats-source + .notice + .stats-block { margin-top: 0; padding-top: 0; border-top: 0; }
.stats-block h3 { margin: 0 0 .5em; font-size: 1.1rem; }
.stats-block .note { margin: -.2em 0 .9em; }
.stats-missing { margin: 0; padding-left: 1.2em; color: var(--muted); }
.stats-missing li { margin: 0 0 .4em; }

/* figures: a label, the number under it, and a short note */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: 12px; margin: 0; }
@media (max-width: 599px) { .stat-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); gap: 10px; } .stat { padding: 10px 12px; } }
.stat { margin: 0; padding: 12px 14px; background: var(--page); border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.stat dt { margin: 0; font-size: .88rem; font-weight: 600; color: var(--muted); }
.stat dd { margin: 0; }
.stat .stat-value { margin-top: 2px; font-size: 1.6rem; font-weight: 700; line-height: 1.2; color: var(--text); overflow-wrap: anywhere; }
.stat .stat-note { margin-top: 4px; font-size: .85rem; color: var(--muted); }
.stat-grid-glance .stat-value { font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem); }

/* charts: one series of columns, drawn by the script at the width they are shown. Thin columns with a rounded top, square at the
   baseline; hairline gridlines; the axis words in the muted text colour, never the column's colour. */
.chart { margin: 0; }
.chart-plot { width: 100%; min-width: 0; }
.chart-svg { display: block; }
.chart-bar { fill: var(--icon); }
.chart-bar.is-on { fill: var(--link-hover); }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-base { stroke: var(--field-line); stroke-width: 1; }
.chart-axis { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-hit { fill: transparent; pointer-events: all; cursor: crosshair; }
.chart-readout { min-height: 1.5em; margin: 6px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.chart-caption { margin: 2px 0 0; font-size: .88rem; text-align: left; color: var(--muted); }
.chart-table { margin-top: 10px; }
.chart-table summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--link); font-weight: 600; cursor: pointer; }
.chart-table .table-wrap { margin-top: 6px; max-height: 22rem; overflow-y: auto; }
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
