/*
 * The committee portal in Waymark (#00220), behind a per-person switch while it's built: <html class="wm"> (set in
 * new.html from cr.look, which only staff can turn on for now). Nothing here applies without that class.
 *
 * Two layers: (1) the portal's own colour names (--ground, --ink, --blue…) mapped onto Waymark's, so every screen picks
 * up the new palette at once; (2) the shell and shared pieces (nav, New, buttons, tags, sheets, fields, the phone bar)
 * reshaped to the design system in /ds/waymark.css. Screens get their own Waymark layouts in later batches.
 */

/* ---------- 1. The portal's colours, in Waymark ---------- */
html.wm {
  --ground: #EFEBDF; --panel: #FFFDF7; --well: #E8E2D2; --hover: #F4F0E4; --line: #DDD6C5; --line-2: #E6E0CF; --line-strong: #8C8676;
  --ink: #14233A; --ink-2: #374151; --ink-3: #4B5563; --ink-4: #5A6473; --ink-5: #8C8676;
  --blue: #2457C5; --blue-ink: #173E94; --blue-bg: #E3E9F6; --route: #14233A;
  --orange: #7A5A00; --orange-bg: #FBF0C8; --orange-ink: #5C4400; --attn-bg: #FBF0C8;
  --ok-bg: #DDEFE2; --ok-ink: #1F6B3F; --start: #1F6B3F;
  --event-bg: #E3E9F6; --event-ink: #1F3F8F; --bad: #A3241A; --bad-bg: #FBE3E0;
  --map: #EAE4D2; --map-road: #D3C9AE;
  --shadow: 0 1px 2px rgba(20,35,58,.12), 0 6px 18px rgba(20,35,58,.08);
  --shadow-lg: 0 12px 40px rgba(20,35,58,.22);
  --display: "Overpass", system-ui, sans-serif;
  --body: "Overpass", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Overpass Mono", ui-monospace, monospace;
  --accent: #F2C230; --on-accent: #14233A; --night: #14233A;
}
@media (prefers-color-scheme: dark) {
  html.wm:not([data-theme="light"]) {
    --ground: #0E1828; --panel: #16243A; --well: #1C2D47; --hover: #1F304B; --line: #2A3B57; --line-2: #22324B; --line-strong: #6A7C9E;
    --ink: #EFEBDF; --ink-2: #D6D9DE; --ink-3: #B4BCC8; --ink-4: #A9B1BD; --ink-5: #6A7C9E;
    --blue: #8FB0FF; --blue-ink: #B7CCFF; --blue-bg: #22345A; --route: #EFEBDF;
    --orange: #F2D27A; --orange-bg: #33301F; --orange-ink: #F2D27A; --attn-bg: #33301F;
    --ok-bg: #173323; --ok-ink: #6FD39A; --start: #6FD39A;
    --event-bg: #22345A; --event-ink: #B7CCFF; --bad: #FF9B85; --bad-bg: #3A1D1A;
    --map: #121F33; --map-road: #24344E;
    --shadow: 0 1px 2px rgba(0,0,0,.45), 0 6px 18px rgba(0,0,0,.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.55);
    --accent: #F2C230; --on-accent: #0E1828; --night: #0A1220;
  }
}
html.wm[data-theme="dark"] {
  --ground: #0E1828; --panel: #16243A; --well: #1C2D47; --hover: #1F304B; --line: #2A3B57; --line-2: #22324B; --line-strong: #6A7C9E;
  --ink: #EFEBDF; --ink-2: #D6D9DE; --ink-3: #B4BCC8; --ink-4: #A9B1BD; --ink-5: #6A7C9E;
  --blue: #8FB0FF; --blue-ink: #B7CCFF; --blue-bg: #22345A; --route: #EFEBDF;
  --orange: #F2D27A; --orange-bg: #33301F; --orange-ink: #F2D27A; --attn-bg: #33301F;
  --ok-bg: #173323; --ok-ink: #6FD39A; --start: #6FD39A;
  --event-bg: #22345A; --event-ink: #B7CCFF; --bad: #FF9B85; --bad-bg: #3A1D1A;
  --map: #121F33; --map-road: #24344E;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 6px 18px rgba(0,0,0,.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.55);
  --accent: #F2C230; --on-accent: #0E1828; --night: #0A1220;
}
html.wm body { font-family: var(--body); font-variant-numeric: tabular-nums; }
html.wm :focus-visible { outline-color: var(--blue); }

/* ---------- 2. The shell ---------- */
/* Top bar: the mark and the club, on the map-paper ground */
/* Wide screens: menu, page, side panel, rail. Below 1440px the side panel opens over the page instead of squeezing it
   (Jeff 22/10: the next four weeks became unusable with the panel open on a smaller screen); below 1180px the menu
   is the slim strip too, as before. */
@media (min-width: 1440px) {
  html.wm .app { grid-template-columns: 240px minmax(0, 1fr) 360px 56px; }
  html.wm .app.nav-closed { grid-template-columns: 76px minmax(0, 1fr) 360px 56px; }
  html.wm .app.panel-closed { grid-template-columns: 240px minmax(0, 1fr) 0 56px; }
  html.wm .app.nav-closed.panel-closed { grid-template-columns: 76px minmax(0, 1fr) 0 56px; }
}
@media (min-width: 1181px) and (max-width: 1439px) {
  html.wm .app, html.wm .app.panel-closed { grid-template-columns: 240px minmax(0, 1fr) 0 56px; }
  html.wm .app.nav-closed, html.wm .app.nav-closed.panel-closed { grid-template-columns: 76px minmax(0, 1fr) 0 56px; }
  html.wm .app .right { display: none; }
  html.wm .app.panel-open .right { display: flex; position: fixed; right: 56px; top: 64px; bottom: 0; width: 360px; padding: 0 12px 16px; background: var(--ground); z-index: 30; box-shadow: var(--shadow-lg); border-radius: 18px 0 0 0; }
}
@media (max-width: 1180px) {
  html.wm .app.panel-open .right { border-radius: 18px 0 0 0; }
}
html.wm .brand { display: flex; align-items: center; gap: 10px; font: 900 17px/1 var(--body); text-transform: none; letter-spacing: .005em; }
html.wm .brand .wmmark { width: 32px; height: 32px; flex: none; }
html.wm .brand .wmname { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
html.wm .brand .wmname b { color: var(--ink); font-weight: 900; overflow: hidden; text-overflow: ellipsis; }
html.wm .brand small { font: 600 11px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); margin-top: 3px; }
html.wm .clubsel { font-family: var(--body); font-weight: 700; border-radius: 22px; }
html.wm .ib { width: 44px; height: 44px; color: var(--ink-2); }
html.wm .ib:hover { background: var(--hover); color: var(--ink); }
html.wm .ib .badge { background: var(--accent); border-color: var(--ground); }
html.wm .av { background: var(--ink); color: var(--panel); font-family: var(--body); font-weight: 800; }
html.wm .search label { border-radius: 22px; background: var(--panel); border: 1.5px solid var(--line); }
html.wm .search label:focus-within { border-color: var(--ink); }

/* New: the yellow pill at the top of the menu */
html.wm .left { gap: 10px; padding: 8px 14px 12px; }
html.wm .left > .newwrap { align-self: stretch; }
html.wm .create { width: 100%; justify-content: center; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent); box-shadow: none; font: 900 15px var(--body); }
html.wm .create:hover { box-shadow: none; filter: brightness(.96); }
html.wm .create svg { color: var(--on-accent); width: 20px; height: 20px; }

/* The five areas; the open one in navy */
html.wm .nav { gap: 4px; }
html.wm .nav a { height: 44px; border-radius: 10px; gap: 12px; padding: 0 12px; color: var(--ink); font-weight: 600; font-size: 15px; }
html.wm .nav a svg { color: var(--ink-3); }
html.wm .nav a:hover { background: var(--hover); color: var(--ink); }
html.wm .nav a.on { background: var(--ink); color: var(--panel); font-weight: 700; }
html.wm .nav a.on svg { color: var(--accent); }
html.wm .nav .count { font: 600 12px/1 var(--mono); background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 4px 8px; }
html.wm .nav .wmsep { flex: 1 1 auto; min-height: 16px; }
html.wm .nav a.minor { height: 40px; color: var(--ink-3); font-size: 14px; }
html.wm .nav a.minor.on { background: var(--ink); color: var(--panel); }
html.wm .nav a.minor.on svg { color: var(--accent); }
/* Collapsed: a slim strip of icons (names on hover), the choice remembered as before */
html.wm .app.nav-closed .create { width: 48px; height: 48px; padding: 0; border-radius: 50%; align-self: center; }
html.wm .app.nav-closed .left > .newwrap { align-self: center; }
html.wm .app.nav-closed .nav a { width: 48px; justify-content: center; margin: 0 auto; }
html.wm .app.nav-closed .nav .count { position: absolute; margin: -22px -26px 0 0; padding: 2px 6px; }

/* Sub-tabs where an area holds more than one screen (Schedule: Calendar · Groups · Races) */
html.wm .wmtabs { display: flex; gap: 2px; padding: 3px; margin: 20px 24px 0; border-radius: 999px; background: var(--well); width: max-content; max-width: calc(100% - 48px); overflow-x: auto; scrollbar-width: none; }
html.wm .wmtabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; color: var(--ink); text-decoration: none; font: 700 14px var(--body); white-space: nowrap; }
html.wm .wmtabs a:hover { background: var(--hover); }
html.wm .wmtabs a[aria-current="page"] { background: var(--panel); box-shadow: var(--shadow); font-weight: 800; }
html.wm .wmtabs[hidden] { display: none; }

/* Headings: Overpass, sentence case (the old look set them in condensed capitals) */
html.wm :is(.hero-title h2, .sechead h3, .setup h2, .calnav h1, .rg-head h2, .cpart h2, .cpart h3, .rpanel h2, .stbl h4, .pl-head h1) { font-family: var(--body); font-weight: 900; text-transform: none; letter-spacing: -.005em; }
html.wm :is(.month .mhd, .shead, .rhd, .mb-table th) { font-family: var(--mono); }

/* Calendar chips: runs in navy, events and races outlined in blue, a route still needed in yellow */
html.wm .chip { border-radius: 6px; font-family: var(--body); }
html.wm .chip.run, html.wm .chip:not(.event):not(.need):not(.off):not(.racechip):not(.groupchip) { background: var(--night); color: #FFFDF7; }
html.wm .chip.need { background: var(--accent); color: var(--on-accent); box-shadow: none; }
html.wm .chip.racechip { background: var(--event-bg); color: var(--event-ink); box-shadow: inset 0 0 0 1.5px var(--event-ink); }
html.wm .chip.racechip.diary { background: transparent; }

/* "Needs you": yellow-soft, no side stripe */
html.wm .attn .dot { background: var(--accent); width: 10px; height: 10px; }
html.wm .needs { border: 1px solid var(--accent); border-radius: 18px; background: var(--attn-bg); }

/* The page */
html.wm .main { border-radius: 18px 18px 0 0; }
html.wm .vhead h1 { font: 900 34px/1.05 var(--body); text-transform: none; letter-spacing: -.01em; }
html.wm .card { border-radius: 18px; }
html.wm .relline { font-family: var(--mono); }

/* ---------- Today (#00220): needs-you strip, the next run with tiles and map, then coming up beside the side cards ---------- */
/* Needs you: quiet rows in the panel colour, only the dot in yellow, so the run card is what the eye lands on */
html.wm .wmt-needs { margin: 0 24px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
html.wm .wmt-needs-h { display: flex; align-items: center; gap: 12px; padding: 8px 14px 6px; }
html.wm .wmt-needs-h .grow { flex: 1; }
html.wm .wmt-needs-h .linkbtn { font-size: 13px; }
html.wm .wmt-needs-quiet { margin: 0 24px 12px; padding: 0 2px; }
html.wm .wmt-needs-list { list-style: none; margin: 0; padding: 0; }
html.wm .wmt-need { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 14px; border-top: 1px solid var(--line); min-width: 0; }
html.wm .wmt-need .dot { width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 900; font-size: 12px; }
html.wm .wmt-need .txt { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
html.wm .wmt-need .fix { flex: none; font-size: 13.5px; font-weight: 700; }
html.wm .wmt-need .x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; }
html.wm .wmt-need .x:hover { background: var(--well, var(--ground)); color: var(--ink); }
html.wm .wmt-need .x svg { width: 16px; height: 16px; }
html.wm .wmt-day { color: var(--ink-3); }
html.wm .rows .row .code.gcode { max-width: 240px; }
html.wm .wmt-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
html.wm .wmt-pad { padding: 16px 18px; display: grid; gap: 10px; justify-items: start; }
html.wm .wmt-p { margin: 0; font-size: 15px; font-weight: 600; }
/* What's coming (Jeff 22/10): one card, the picked date large on top, the next four weeks under it */
html.wm .wmt-plan { margin: 0 24px 16px; overflow: hidden; scroll-margin-top: 76px; }
html.wm .wmt-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 46%); border-bottom: 1px solid var(--line); }
html.wm .wmt-hero.cancelled .wmt-title h2 { text-decoration: line-through; }
html.wm .wmt-hero-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
html.wm .wmt-meta { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; font-weight: 600; color: var(--ink-3); font-size: 14px; }
html.wm .wmt-title { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
html.wm .wmt-title h2 { flex: 1 1 240px; }
html.wm .wmt-title h2 { margin: 0; font: 900 26px/1.1 var(--body); overflow-wrap: anywhere; }
html.wm .wmt-long { margin: 0; font-size: 14px; color: var(--ink-3); }
html.wm .wmt-tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
html.wm .wmt-tiles .v { font-size: 22px; }
html.wm .wmt-hero .hero-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
html.wm .wmt-hero .hero-acts .grow { flex: 1; }
/* More: the run's other actions (Jeff 22/10: one main button, the rest tucked away) */
html.wm .wmt-more { position: relative; }
html.wm .wmt-more > summary { list-style: none; cursor: pointer; }
html.wm .wmt-more > summary::-webkit-details-marker { display: none; }
html.wm .wmt-more > summary svg { width: 16px; height: 16px; margin: 0 0 0 4px; transition: transform .15s; }
html.wm .wmt-more[open] > summary svg { transform: rotate(180deg); }
html.wm .wmt-more-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 250px; padding: 6px; background: var(--panel); border: 1px solid var(--line-strong, #8C8676); border-radius: 14px; box-shadow: 0 12px 32px rgb(20 35 58 / .18); display: grid; }
html.wm .wmt-more-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 700 14.5px/1.2 var(--body); text-align: left; cursor: pointer; }
html.wm .wmt-more-menu button:hover, html.wm .wmt-more-menu button:focus-visible { background: var(--attn-bg); }
html.wm .wmt-more-menu button svg { width: 18px; height: 18px; flex: none; }
html.wm .wmt-more-menu button.danger { color: var(--bad, #A3241A); }
@media (max-width: 760px) { html.wm .wmt-more-menu { left: auto; right: 0; } }
html.wm .wmt-map { border-left: 1px solid var(--line); min-height: 340px; border-radius: 0; margin: 0; }
html.wm .wmt-coming { padding-bottom: 6px; }
html.wm .wmt-coming .sechead { padding: 14px 20px 6px; display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
html.wm .wmt-coming .sechead h3 { margin: 0; }
html.wm .wmt-hint { color: var(--ink-3); font-size: 13.5px; font-weight: 600; flex: 1; }
html.wm .wmt-coming .row { padding-left: 20px; padding-right: 20px; position: relative; }
/* The row being shown: a thick ink bar, a lighter fill and bold text, so it doesn't rely on colour */
html.wm .wmt-coming .row.on { background: var(--attn-bg); box-shadow: inset 5px 0 0 var(--ink); }
html.wm .wmt-coming .row.on .what span:last-child { font-weight: 800; }
html.wm .wmt-coming .row:focus-visible { outline: 3px solid var(--link, #2457C5); outline-offset: -3px; }
/* The other cards: a row under it */
html.wm .wmt-side { margin: 0 24px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
html.wm .wmt-side .setup { margin: 0; }
/* Sized by the room the page actually has, not the screen: the side panel can take 360px of a laptop (Jeff 22/10) */
html.wm #view { container: view / inline-size; }
html.wm .rows { container: rows / inline-size; }
@container view (max-width: 760px) {
  html.wm .wmt-hero { grid-template-columns: minmax(0, 1fr); }
  html.wm .wmt-map { order: -1; border-left: 0; border-bottom: 1px solid var(--line); min-height: 200px; }
}
/* Any list of dates, when narrow (Today's four weeks, Schedule's list): date and status on one line, the group and
   route under it (each on its own line when tight), then distance and who's going */
@container rows (max-width: 620px) {
  html.wm .rows .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "when status" "what what" "km going"; gap: 4px 12px; padding: 12px 16px; }
  html.wm .rows .row .when { grid-area: when; display: flex; gap: 8px; align-items: baseline; }
  html.wm .rows .row .when b { display: inline; }
  html.wm .rows .row .what { grid-area: what; flex-wrap: wrap; row-gap: 4px; }
  html.wm .rows .row .what span:last-child { flex: 1 1 160px; min-width: 0; }
  html.wm .rows .row .code.gcode { max-width: 100%; }
  html.wm .rows .row .km { grid-area: km; display: block; font-size: 13.5px; }
  html.wm .rows .row .going { grid-area: going; text-align: right; font-size: 13.5px; }
  html.wm .rows .row .status { grid-area: status; display: block; }
  html.wm .rows .row .km:empty { display: none; }
}
@media (max-width: 760px) {
  html.wm .wmt-needs, html.wm .wmt-needs-quiet, html.wm .wmt-plan, html.wm .wmt-side { margin-left: 14px; margin-right: 14px; }
  html.wm .wmt-need { flex-wrap: wrap; }
  html.wm .wmt-need .txt { flex-basis: calc(100% - 80px); }
  html.wm .wmt-need .fix { order: 3; margin-left: 30px; }
  html.wm .wmt-hero { grid-template-columns: minmax(0, 1fr); }
  html.wm .wmt-map { order: -1; border-left: 0; border-bottom: 1px solid var(--line); min-height: 180px; }
  html.wm .wmt-tiles { grid-template-columns: 1fr 1fr; }
  html.wm .wmt-title h2 { font-size: 21px; }
  html.wm .wmt-hint { display: none; }
}

/* ---------- Publicity (#00220): four panels, each with its state and next step ---------- */
html.wm .pub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; padding: 0 24px 24px; }
html.wm .pub-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
html.wm .pub-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
html.wm .pub-h h2 { margin: 0; font: 900 22px/1.1 var(--body); }
html.wm .pub-p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
html.wm .pub-warn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--attn-bg); font-size: 14px; }
html.wm .pub-warn > b { font: 600 12px/1 var(--mono); background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 4px 8px; }
html.wm .pub-warn > span { flex: 1; }
html.wm .pub-facts { display: grid; }
html.wm .pub-fact { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 42px; border-top: 1px solid var(--line-2); font-size: 14px; }
html.wm .pub-fact > span:first-child { color: var(--ink-3); min-width: 0; }
html.wm .pub-fact b { text-align: right; }
html.wm .pub-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html.wm .pub-tiles .v { font-size: 19px; }
html.wm .pub-list { margin: 0; padding-left: 18px; font-size: 14.5px; line-height: 1.7; }
html.wm .pub-acts { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
html.wm .pub-acts:empty { display: none; }
@container view (max-width: 840px) { html.wm .pub-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { html.wm .pub-grid { padding: 0 14px 24px; } html.wm .pub-tiles { grid-template-columns: 1fr 1fr; } }

/* ---------- A route's page (#00220) ---------- */
html.wm .rp-crumb { display: flex; gap: 8px; padding: 20px 24px 0; font-size: 14px; }
html.wm .rp-crumb a { font-weight: 700; }
html.wm .rp-crumb span[aria-hidden] { color: var(--ink-4); }
html.wm .rp-head { padding-top: 8px; }
html.wm .rp-title { display: flex; gap: 12px; align-items: baseline; min-width: 0; }
html.wm .rp-title h1 { font-size: 30px; overflow-wrap: anywhere; }
html.wm .rp-archived { margin: 0 24px 12px; display: flex; gap: 8px; align-items: center; color: var(--ink-3); }
html.wm .rp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; padding: 0 24px 24px; align-items: start; }
html.wm .rp-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
html.wm .rp-map { min-height: 380px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
html.wm .rp-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
html.wm .rp-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
html.wm .rp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: grid; gap: 10px; }
html.wm .rp-card h3 { margin: 0; font: 800 16px var(--body); }
html.wm .rp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
html.wm .rp-tags .pill { color: var(--ink); }
html.wm .rp-note { padding: 10px 12px; border-radius: 12px; background: var(--ground); font-size: 14px; line-height: 1.45; }
html.wm .rp-note.warn { background: var(--attn-bg); }
html.wm .rp-facts { gap: 0; padding-top: 6px; padding-bottom: 6px; }
html.wm .rp-fact { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 40px; border-top: 1px solid var(--line-2); font-size: 14px; }
html.wm .rp-fact:first-child { border-top: 0; }
html.wm .rp-fact span { color: var(--ink-3); }
html.wm .rp-fact b { text-align: right; overflow-wrap: anywhere; }
html.wm .rp-acts { display: flex; flex-wrap: wrap; gap: 8px; }
/* The interactive map: room to explore, zoom buttons, and the profile under it */
html.wm .rp-map { min-height: 440px; }
html.wm .rp-map .rmap.live { cursor: grab; }
html.wm .rp-elev { gap: 6px; }
html.wm .rp-elev-h { display: flex; justify-content: space-between; align-items: baseline; min-height: 20px; }
html.wm .rp-elev-read { font: 600 13px var(--mono); color: var(--ink); }
html.wm .rp-elev-svg { max-width: 100%; height: auto; display: block; touch-action: pan-y; cursor: crosshair; }
html.wm .rp-elev-svg .a { fill: var(--well); }
html.wm .rp-elev-svg .l { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
html.wm .rp-elev-svg .g { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
html.wm .rp-elev-svg .t { fill: var(--ink-4); font: 600 11px var(--mono); }
html.wm .rp-elev-svg .cur { stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
html.wm .rp-elev-sum { margin: 0; font-size: 13.5px; color: var(--ink-3); }
html.wm .rc-hidden { margin-left: 6px; }
@container view (max-width: 880px) { html.wm .rp-grid { grid-template-columns: minmax(0, 1fr); } html.wm .rp-map { min-height: 320px; } }
@media (max-width: 760px) { html.wm .rp-grid { padding: 0 14px 24px; } html.wm .rp-crumb { padding: 14px 14px 0; } html.wm .rp-title h1 { font-size: 24px; } }

/* ---------- People: the newcomers board (#00220) ---------- */
html.wm .board { gap: 10px; }
html.wm .col { background: var(--well); border-radius: 16px; }
html.wm .colh b { font-weight: 800; font-size: 14px; }
html.wm .colh span { font: 600 12px var(--mono); }
html.wm .pc { border: 1px solid var(--line); border-radius: 12px; }
html.wm .pc:hover { border-color: var(--ink); }
html.wm .pc.ask { box-shadow: none; border: 1.5px solid var(--accent); background: var(--attn-bg); }
html.wm .pc-t .av { background: var(--ink) !important; color: var(--panel); }
html.wm .pc-t b { font-weight: 800; }
html.wm .tdots i { height: 8px; border-radius: 4px; background: var(--line); box-shadow: inset 0 0 0 1px var(--line-strong); }
html.wm .tdots i.f { background: var(--ink); box-shadow: none; }
html.wm .pstate { border-radius: 12px; }
html.wm .pstate.joined { background: var(--attn-bg); color: var(--ink); }

/* ---------- The register on the night (#00220): big rows to tick, a clear tick when someone's here ---------- */
html.wm dialog.sheet.register .reglist { gap: 0; }
html.wm dialog.sheet.register .regrow { min-height: 56px; padding: 8px 10px; border-top: 1px solid var(--line-2); border-radius: 0; }
html.wm dialog.sheet.register .regrow:first-child { border-top: 0; }
html.wm dialog.sheet.register .regrow b { font-weight: 800; font-size: 15px; }
html.wm dialog.sheet.register .regrow input { width: 26px; height: 26px; accent-color: var(--ok-ink); order: 2; margin-left: auto; }
html.wm dialog.sheet.register .regrow.on { background: var(--ok-bg); }
html.wm dialog.sheet.register .regrow.on b::after { content: " · here"; font-weight: 700; color: var(--ok-ink); }

/* ---------- 3. Shared pieces ---------- */
html.wm .btn { height: 36px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 700 13.5px var(--body); }
html.wm .btn:hover { background: var(--hover); color: var(--ink); }
html.wm .btn.fill { background: var(--ink); border-color: var(--ink); color: var(--panel); }
html.wm .btn.fill:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--panel); }
html.wm .btn.danger { border-color: var(--bad); color: var(--bad); }
html.wm .btn.danger:hover { background: var(--bad-bg); }
html.wm .btn.dangerfill { background: var(--bad); border-color: var(--bad); color: var(--panel); }
html.wm .btn.ghost { border-color: transparent; }
html.wm .btn.wa { border-color: var(--ink); background: transparent; color: var(--ink); }
html.wm .btn.go, html.wm .btn.publish { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 900; }
html.wm .gate .btn { height: 46px; border-radius: 999px; }

/* Route codes: a navy outline, mono */
html.wm .code { background: transparent; color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; padding: 2px 6px; font: 600 12px/1 var(--mono); }
html.wm .code.event { color: var(--event-ink); border-color: var(--event-ink); background: transparent; }
html.wm .code.none { color: var(--ink-4); border-color: var(--ink-5); background: transparent; }
/* Status pills: a word with an edge, never colour alone */
html.wm .pill { border-radius: 6px; height: 24px; padding: 0 8px; font: 600 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; border: 1.5px solid currentColor; background: transparent; }
html.wm .pill.next { color: var(--accent); background: var(--night); border-color: var(--night); }
html.wm .pill.ok { color: var(--ok-ink); background: transparent; }
html.wm .pill.need { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
html.wm .pill.event { color: var(--event-ink); background: transparent; }
html.wm .pill.off { color: var(--bad); background: transparent; }

/* Segmented controls: a well with the chosen one raised */
html.wm .seg { border: 0; border-radius: 999px; background: var(--well); padding: 3px; gap: 2px; height: auto; }
html.wm .seg button, html.wm .seg label { min-height: 34px; border-radius: 999px; color: var(--ink); font: 700 13.5px var(--body); }
html.wm .seg button + button, html.wm .seg label + label { border-left: 0; }
html.wm .seg [aria-pressed="true"], html.wm .seg label:has(input:checked) { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); font-weight: 800; }
html.wm .subnav a { border-radius: 999px; background: var(--well); color: var(--ink); font-weight: 700; }

/* Sheets and fields */
html.wm dialog.sheet { border-radius: 18px; }
html.wm dialog.sheet h2 { font: 900 24px/1.1 var(--body); text-transform: none; }
html.wm .field label { font-weight: 700; }
html.wm .field input, html.wm .field select, html.wm .field textarea { border: 1.5px solid var(--line-strong); }
html.wm .field input:focus, html.wm .field select:focus, html.wm .field textarea:focus { border-color: var(--ink); outline-color: var(--blue); }

/* Sign-in */
html.wm .gate h1 { font: 900 28px/1.05 var(--body); text-transform: none; }
html.wm .gate h1 b { color: var(--ink); }
html.wm .gate h1.gate-brand { display: flex; align-items: center; gap: 10px; font: 900 19px/1 var(--body); letter-spacing: .01em; text-transform: uppercase; margin: 0 0 22px; }
html.wm .gate h1.gate-brand svg { width: 34px; height: 34px; flex: none; }
html.wm .gate .box { width: min(460px, 100%); padding: 32px 30px; }
html.wm .gate .gate-t { font: 900 26px/1.1 var(--body); margin: 0 0 8px; }
html.wm .gate .gate-new { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- 4. Phones: the five areas along the bottom, New as a yellow pill ---------- */
@media (max-width: 760px) {
  html.wm .bn { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  html.wm .bn a, html.wm .bn button { color: var(--ink-3); font-weight: 700; font-size: 11.5px; }
  html.wm .bn .ic { width: 44px; height: 28px; border-radius: 14px; }
  html.wm .bn .on { color: var(--ink); font-weight: 900; }
  html.wm .bn .on .ic { background: var(--accent); color: var(--on-accent); }
  html.wm .fab { width: auto; height: 56px; padding: 0 22px 0 18px; gap: 6px; display: inline-flex; align-items: center; border-radius: 28px; background: var(--accent); color: var(--on-accent); font: 900 16px var(--body); }
  html.wm .fab svg { width: 22px; height: 22px; }
  html.wm #view { padding-bottom: 96px; }   /* the last buttons on a screen are never under New (walkthrough 22/10) */
  html.wm.scrolled .fab { width: 56px; padding: 0; justify-content: center; }
  html.wm.scrolled .fab span { display: none; }
  html.wm .fab { transition: width .18s, padding .18s; }
  html.wm .wmtabs { margin: 14px 14px 0; max-width: calc(100% - 28px); width: auto; display: flex; }
  html.wm .wmtabs a { flex: 1 1 auto; justify-content: center; padding: 0 10px; font-size: 13px; }
}

/* ---------- Polish (walkthrough 22/10, point 7) ---------- */
/* Loading: soft placeholder bars instead of the word (still read out as "Loading…"); still when motion is turned down */
html.wm .loading { color: transparent !important; user-select: none; height: 70px; max-width: 520px; border-radius: 8px; margin-top: 6px; margin-bottom: 6px;
  background: repeating-linear-gradient(180deg, var(--well) 0 14px, transparent 14px 28px);
  -webkit-mask-image: linear-gradient(90deg, #000 0 35%, rgb(0 0 0 / .45) 50%, #000 65% 100%); mask-image: linear-gradient(90deg, #000 0 35%, rgb(0 0 0 / .45) 50%, #000 65% 100%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%; animation: wm-shimmer 1.6s linear infinite; }
html.wm .vhead .loading { height: 14px; width: 240px; background: var(--well); }
@keyframes wm-shimmer { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
/* Today: the big card eases in when another date is picked */
html.wm .wmt-sel.swap .wmt-hero-body { animation: wm-in .22s ease-out; }
html.wm .wmt-sel.swap .wmt-map { animation: wm-fade .3s ease-out; }
@keyframes wm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes wm-fade { from { opacity: .3; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html.wm .loading, html.wm .wmt-sel.swap .wmt-hero-body, html.wm .wmt-sel.swap .wmt-map { animation: none; }
  html.wm .fab, html.wm .wmt-more > summary svg { transition: none; }
}

/* ---------- Getting ready: a new club's guide (point 6) ---------- */
html.wm .wmg { margin: 0 24px 16px; }
html.wm .wmg-bar { height: 8px; border-radius: 4px; background: var(--well); overflow: hidden; }
html.wm .wmg-bar i { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
html.wm .wmg-full { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; overflow: hidden; }
html.wm .wmg-head { padding: 22px 24px 18px; display: grid; gap: 8px; grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
html.wm .wmg-head h2 { margin: 0; font: 900 28px/1.1 var(--body); }
html.wm .wmg-head p { margin: 0; color: var(--ink-2); max-width: 60ch; }
html.wm .wmg-next { padding: 24px; display: grid; gap: 8px; align-content: start; justify-items: start; border-right: 1px solid var(--line); }
html.wm .wmg-next .wm-eyebrow { background: var(--accent); color: var(--on-accent); padding: 3px 8px; border-radius: 6px; }
html.wm .wmg-next h3 { margin: 0; font: 900 22px/1.15 var(--body); }
html.wm .wmg-next p { margin: 0 0 6px; color: var(--ink-2); }
html.wm .wmg-list { list-style: none; margin: 0; padding: 8px 0; }
html.wm .wmg-list li { display: flex; gap: 12px; align-items: center; padding: 9px 20px; }
html.wm .wmg-list li.next { background: var(--hover); }
html.wm .wmg-list .tick { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font: 800 12.5px var(--wm-mono, monospace); color: var(--ink-3); }
html.wm .wmg-list li.done .tick { background: var(--ok-ink); border-color: var(--ok-ink); color: var(--panel); }
html.wm .wmg-list li.done .tick svg { width: 15px; height: 15px; }
html.wm .wmg-list li.next .tick { border: 2px solid var(--ink); color: var(--ink); }
html.wm .wmg-list .t { flex: 1; min-width: 0; display: grid; }
html.wm .wmg-list .t b { font-weight: 700; font-size: 14.5px; }
html.wm .wmg-list .t small { color: var(--ink-3); font-size: 12.5px; }
html.wm .wmg-list li.done .t b { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
html.wm .wmg-list .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html.wm .wmg-later { justify-self: start; margin: 4px 24px 16px; font-size: 13.5px; }
html.wm .wmg-full .wmg-later { border-top: 1px solid var(--line); margin: 0; padding: 12px 24px; width: 100%; text-align: left; }
html.wm .wmg-full .wmg-later { grid-column: 1 / -1; }
html.wm .wmg-line { overflow: hidden; }
html.wm .wmg-line > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 120px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; }
html.wm .wmg-line > summary::-webkit-details-marker { display: none; }
html.wm .wmg-nx { font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.wm .wmg-all { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 13.5px; }
html.wm .wmg-all svg { width: 16px; height: 16px; transition: transform .15s; }
html.wm .wmg-line[open] .wmg-all svg { transform: rotate(180deg); }
html.wm .wmg-body { border-top: 1px solid var(--line); display: grid; }
@container view (max-width: 760px) {
  html.wm .wmg-full { grid-template-columns: minmax(0, 1fr); }
  html.wm .wmg-next { border-right: 0; border-bottom: 1px solid var(--line); }
  html.wm .wmg-line > summary { grid-template-columns: minmax(0, 1fr) auto; }
  html.wm .wmg-line > summary .wmg-bar { grid-column: 1 / -1; grid-row: 2; }
  html.wm .wmg-line > summary .wmg-nx { grid-column: 1 / -1; grid-row: 3; white-space: normal; }
}
@media (max-width: 760px) { html.wm .wmg { margin-left: 14px; margin-right: 14px; } }

/* ---------- The route picker (point 1): a route dropdown becomes a button that opens a searchable list ---------- */
html.wm .rpick-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
html.wm .rpick-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; font: inherit; min-height: 64px; }
html.wm .rpick-btn:hover { background: var(--hover); }
html.wm .rpick-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
html.wm .rpick-thumb { width: 72px; height: 48px; flex: none; border-radius: 8px; background: var(--map, #EAE4D2); display: grid; place-items: center; overflow: hidden; color: var(--ink-3); }
html.wm .rpick-thumb svg { width: 100%; height: 100%; }
html.wm .rpick-thumb.none svg { width: 22px; height: 22px; }
html.wm .rpick-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
html.wm .rpick-t .code { justify-self: start; margin-bottom: 2px; }
html.wm .rpick-t b { font-weight: 700; font-size: 14.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
html.wm .rpick-t small { color: var(--ink-3); font-size: 12.5px; }
html.wm .rpick-t small.soon { color: var(--orange-ink); font-weight: 700; }
html.wm .rpick-ch { flex: none; font-weight: 800; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
html.wm dialog.rpick { width: min(620px, calc(100vw - 24px)); max-height: min(86vh, 900px); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
html.wm dialog.rpick:not([open]) { display: none; }
html.wm .rpick-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
html.wm .rpick-head h2 { margin: 0; }
html.wm .rpick-q { margin: 8px 20px; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; font: inherit; background: var(--panel); color: var(--ink); }
html.wm .rpick-sort { margin: 2px 20px 10px; align-self: flex-start; }
html.wm .rpick-list { list-style: none; margin: 0; padding: 4px 8px 12px; overflow-y: auto; border-top: 1px solid var(--line); flex: 1 1 auto; min-height: 0; }
html.wm .rpick-head, html.wm .rpick-q, html.wm .rpick-sort { flex: none; }
html.wm .rpick-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
html.wm .rpick-list button:hover, html.wm .rpick-list button:focus-visible { background: var(--hover); outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
html.wm .rpick-list button.on { background: var(--attn-bg); box-shadow: inset 4px 0 0 var(--ink); }
html.wm .rpick-tick { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--panel); display: grid; place-items: center; }
html.wm .rpick-tick svg { width: 16px; height: 16px; }
html.wm .rpick-empty { padding: 18px 12px; }
@media (max-width: 760px) { html.wm dialog.rpick { width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; } }

/* A date's form: the rest under "More options" (point 1) */
html.wm details.moreopts { margin: 6px 0 0; border-top: 1px solid var(--line); }
html.wm details.moreopts > summary { list-style: none; cursor: pointer; padding: 12px 0 6px; font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 6px; }
html.wm details.moreopts > summary::-webkit-details-marker { display: none; }
html.wm details.moreopts > summary::before { content: "+"; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 14px; line-height: 1; }
html.wm details.moreopts[open] > summary::before { content: "\2212"; }
html.wm .moreopts-body { display: grid; gap: 0; }
/* The distance box only matters without a route */
html.wm .field:has(> select[name="std"]:not(:has(option[value=""]:checked))) .fieldrow input[name="km"] { display: none; }
html.wm .field:has(> select[name="long"]:has(option[value=""]:checked)) .fieldrow input[name="longKm"] { display: none; }
html.wm .field:has(> select[name="long"]:has(option[value=""]:checked)) .fieldrow:not(:has(> :not(input[name="longKm"]))) { display: none; }

/* Past dates (who came): full contrast, told apart by a plain ground instead of fading (walkthrough 22/10) */
html.wm .row.pastrow { opacity: 1; background: var(--ground); }
html.wm .row.pastrow.on { background: var(--attn-bg); }
html.wm .wmt-hero.past .wmt-meta .pill { background: var(--well); }
html.wm dialog.register .sheet-acts [data-close] { display: none; }   /* the register has one way out: Done */

/* The website editor (point 1): one bar at the top; on phones, Preview and Publish stay at the bottom */
html.wm .ws-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
html.wm .ws-phonebar { display: none; }
@media (max-width: 760px) {
  html.wm .ws-acts > #ws-open, html.wm .ws-acts > #ws-publish { display: none; }
  html.wm .ws-phonebar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 25; padding: 10px 14px; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgb(20 35 58 / .08); }
  html.wm .ws-phonebar .btn { flex: 1; justify-content: center; }
  html.wm:has(.ws-phonebar) .fab { display: none; }
  html.wm:has(.ws-phonebar) #view { padding-bottom: 150px; }
  html.wm .ws-tabs { flex-wrap: wrap; overflow: visible; }   /* every tab in sight, Settings too (V1 editor fixes, 26/10) */
  html.wm .ws-tabs a { flex: none; }
}

/* Settings (point 1): the section menu stays in view and marks where you are; unsaved changes are said */
html.wm .subnav { position: sticky; top: 0; z-index: 15; background: var(--panel); padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 760px) { html.wm .subnav { top: 60px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } html.wm .subnav a { flex: none; } }
html.wm .subnav a[aria-current] { background: var(--ink); color: var(--panel); }
html.wm .csave.dirty .btn.fill { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
html.wm .csave .unsaved { font-weight: 700; font-size: 13.5px; color: var(--orange-ink); }
html.wm .cpart { scroll-margin-top: 70px; }
@media (max-width: 760px) { html.wm .cpart { scroll-margin-top: 130px; } }

/* The route planner on a phone (point 1): one row of tools that scrolls sideways, and no New button over the map */
@media (max-width: 760px) {
  html.wm:has(.pl-mapwrap) .fab { display: none; }
  html.wm .pl-mapwrap .tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  html.wm .pl-mapwrap .tools > * { flex: none; }
}

/* ---------- Today's run card: the weather above a shorter map (Jeff 22/10) ---------- */
html.wm .wmt-hero { grid-template-columns: minmax(0, 1fr) minmax(300px, 40%); }
html.wm .wmt-aside { display: flex; flex-direction: column; border-left: 1px solid var(--line); min-width: 0; }
html.wm .wmt-aside .wmt-map { border-left: 0; flex: 1 1 auto; min-height: 220px; }
html.wm .wmt-hero.past .wmt-map { min-height: 300px; }
html.wm .wmt-wx { padding: 14px 18px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
html.wm .wmt-wx.loading { height: auto; min-height: 120px; max-width: none; margin: 0; border-radius: 0; }
html.wm .wmt-wx.none p { margin: 0; color: var(--ink-3); font-size: 14px; }
html.wm .wmt-wx-now { display: flex; align-items: center; gap: 12px; }
html.wm .wmt-wx-now .wxi { width: 40px; height: 40px; flex: none; }
html.wm .wmt-wx-now .t { font: 900 34px/1 var(--body); }
html.wm .wmt-wx-now .l { font-weight: 800; font-size: 16px; display: grid; }
html.wm .wmt-wx-now .l small { font-weight: 600; font-size: 13px; color: var(--ink-3); }
html.wm .wmt-wx-bits { margin: 0; font-size: 13.5px; color: var(--ink-2); }
html.wm .wmt-wx-hours { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
html.wm .wmt-wx-hours li { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; background: var(--ground); font-size: 12.5px; }
html.wm .wmt-wx-hours li svg { width: 22px; height: 22px; }
html.wm .wmt-wx-hours li b { font-size: 14px; }
html.wm .wmt-wx-hours li small { color: var(--ink-3); }
html.wm .wmt-wx-hours .sr, html.wm .wmt-wx .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html.wm .wmt-wx-foot { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-3); }
html.wm .wmt-wx-warn { margin: 0; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; font-size: 13px; color: #14233A; }
html.wm .wmt-wx-warn svg { width: 18px; height: 18px; flex: none; }
html.wm .wmt-wx-warn.yellow { background: #FBE38A; }
html.wm .wmt-wx-warn.amber { background: #F6B26B; }
html.wm .wmt-wx-warn.red { background: #E8908A; }
@container view (max-width: 760px) {
  html.wm .wmt-hero { grid-template-columns: minmax(0, 1fr); }
  html.wm .wmt-aside { order: 1; border-left: 0; border-top: 1px solid var(--line); }   /* phones: the details first, then the weather and the map */
  html.wm .wmt-aside .wmt-map { order: 0; border-bottom: 0; min-height: 190px; }
}

/* ---------- Today's run card, take two (Jeff 22/10): the weather is a tile; its hour by hour slides open under the tiles ---------- */
html.wm .wmt-hero { grid-template-columns: minmax(0, 1fr) minmax(280px, 38%); }
html.wm .wmt-hero .wmt-map { min-height: 260px; }
html.wm .wm-tile.wxt { text-align: left; font: inherit; color: inherit; cursor: default; position: relative; }
html.wm button.wm-tile.wxt { cursor: pointer; }
html.wm button.wm-tile.wxt:hover { border-color: var(--ink); }
html.wm .wm-tile.wxt .v { display: flex; align-items: center; gap: 8px; }
html.wm .wm-tile.wxt .wxi { width: 28px; height: 28px; flex: none; }
html.wm .wm-tile.wxt .wxw { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
html.wm .wm-tile.wxt .wxt-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12.5px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
html.wm .wm-tile.wxt[aria-expanded="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
html.wm .wm-tile.wxt[aria-expanded="true"] .wxt-more { text-decoration: none; }
html.wm .wm-tile.wx-yellow { background: #FBE38A; border-color: #C9A227; }
html.wm .wm-tile.wx-amber { background: #F6C48E; border-color: #B8732C; }
html.wm .wm-tile.wx-red { background: #F0B0AB; border-color: #A3241A; }
html.wm .wm-tile.wx-yellow, html.wm .wm-tile.wx-amber, html.wm .wm-tile.wx-red { color: #14233A; }
html.wm .wm-tile.wx-yellow .k, html.wm .wm-tile.wx-amber .k, html.wm .wm-tile.wx-red .k, html.wm .wm-tile.wx-yellow .k2, html.wm .wm-tile.wx-amber .k2, html.wm .wm-tile.wx-red .k2 { color: #14233A; }
/* The strip: closed by default; opens by growing (grid rows 0fr to 1fr), the hours easing in one after another */
html.wm .wmt-wxh { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .34s cubic-bezier(.2, .7, .2, 1); }
html.wm .wmt-wxh.open { grid-template-rows: 1fr; }
html.wm .wmt-wxh-in { overflow: hidden; min-height: 0; display: grid; gap: 8px; }
html.wm .wmt-wxh-list { list-style: none; margin: 2px 0 0; padding: 2px 2px 6px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
html.wm .wmt-wxh-list li { flex: 1 0 118px; scroll-snap-align: start; display: grid; justify-items: start; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--ground); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2);
  opacity: 0; transform: translateX(18px); transition: opacity .3s ease, transform .3s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i) * 55ms + 60ms); }
html.wm .wmt-wxh.open .wmt-wxh-list li { opacity: 1; transform: none; }
html.wm .wmt-wxh-list .tm { font: 800 13px var(--body); color: var(--ink); }
html.wm .wmt-wxh-list .wxi { width: 26px; height: 26px; color: var(--ink); }
html.wm .wmt-wxh-list b { font: 900 20px/1 var(--body); color: var(--ink); }
html.wm .wmt-wxh-list .rn { font-weight: 700; color: var(--ink); }
html.wm .wmt-wxh .wmt-wx-warn { margin: 2px 0 0; }
html.wm .wmt-wxh .wmt-wx-foot { margin: 0 0 4px; }
@media (prefers-reduced-motion: reduce) {
  html.wm .wmt-wxh { transition: none; }
  html.wm .wmt-wxh-list li { transition: none; opacity: 1; transform: none; }
}

/* All the tiles in one row while there's room (five with the weather); two to a row on phones as before */
html.wm .wmt-hero-body { container: herobody / inline-size; }
@container herobody (min-width: 560px) {
  html.wm .wmt-tiles { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; }
  html.wm .wmt-tiles .wm-tile { padding-left: 12px; padding-right: 10px; }
  html.wm .wmt-tiles .v { font-size: 20px; }
}

/* Narrow (phones, or the side panel open): one column, the map on top, as before */
@container view (max-width: 760px) {
  html.wm .wmt-hero { grid-template-columns: minmax(0, 1fr); }
  html.wm .wmt-hero .wmt-map { order: -1; border-left: 0; border-bottom: 1px solid var(--line); min-height: 190px; }
}
html.wm .wmt-wx-warn { align-items: flex-start; }
html.wm .wmt-wx-warn svg { margin-top: 1px; }
@container herobody (max-width: 559px) { html.wm .wmt-tiles .wm-tile.wxt { grid-column: 1 / -1; } }

/* ---------- The stage (Jeff 22/10): the map's place shows what a tile was tapped for ---------- */
html.wm .wmt-stage { position: relative; display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); }
html.wm .wmt-stage .wmt-map { flex: 1 1 auto; border-left: 0; }
html.wm .wmt-stage-panel { position: absolute; inset: 0; z-index: 2; overflow-y: auto; background: var(--panel); padding: 14px 18px 16px; display: grid; align-content: start; gap: 10px; }
html.wm .wmt-stage-panel.in { animation: stg-in .26s cubic-bezier(.2, .7, .2, 1); }
@keyframes stg-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
html.wm .stg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
html.wm .stg-head h3 { margin: 0; font: 900 18px/1.2 var(--body); }
html.wm .stg-lead { margin: 0; font-size: 15px; }
html.wm .stg-who { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; }
html.wm .stg-who li { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: 14px; }
html.wm .stg-who li > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.wm .stg-who .av { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--well); display: grid; place-items: center; font-weight: 800; font-size: 12.5px; }
html.wm .stg-not summary { cursor: pointer; font-weight: 700; font-size: 13.5px; margin: 4px 0 6px; }
html.wm .stg-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
html.wm .stg-facts > div { padding: 10px 12px; border-radius: 12px; background: var(--ground); display: grid; gap: 2px; }
html.wm .stg-facts dt { font: 600 11.5px var(--wm-mono, monospace); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
html.wm .stg-facts dd { margin: 0; font: 900 20px/1.1 var(--body); }
html.wm .stg-facts small { font-size: 12px; color: var(--ink-3); }
html.wm .stg-big { display: flex; align-items: center; gap: 14px; }
html.wm .stg-big .wxi { width: 44px; height: 44px; }
html.wm .stg-big b { display: block; font: 900 20px var(--body); }
/* Hour by hour: a row an hour, easing in one after another */
html.wm .stg-hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
html.wm .stg-hours li { display: grid; grid-template-columns: 62px 26px minmax(0, 1fr) 46px 46px 92px; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--ground); font-size: 13.5px;
  animation: stg-row .32s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms + 80ms); }
html.wm .stg-hours li.hd { background: none; padding-top: 0; padding-bottom: 0; animation: none; font: 600 11px var(--wm-mono, monospace); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
html.wm .stg-hours .tm { font-weight: 800; }
html.wm .stg-hours .wxi { width: 24px; height: 24px; }
html.wm .stg-hours .lb { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.wm .stg-hours b { font: 900 17px var(--body); }
html.wm .stg-hours .rn { font-weight: 700; }
html.wm .stg-hours .wd { color: var(--ink-2); }
@keyframes stg-row { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* When it gets dark: a bar from an hour before the start to an hour after the finish, light then dark */
html.wm .stg-light { position: relative; height: 46px; margin: 18px 0 4px; border-radius: 10px; background: #2B3A55; overflow: visible; }
html.wm .stg-light .day { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 10px 0 0 10px; background: #F2D27A; }
html.wm .stg-light .mk { position: absolute; top: -18px; transform: translateX(-50%); font: 700 11.5px var(--body); color: var(--ink); white-space: nowrap; }
html.wm .stg-light .mk::after { content: ""; position: absolute; left: 50%; top: 16px; width: 2px; height: 50px; background: var(--ink); }
html.wm .stg-light .mk.sun { top: auto; bottom: -20px; }
html.wm .stg-light .mk.sun::after { top: auto; bottom: 16px; height: 50px; background: #8C8676; }
/* The pressed tile */
html.wm .wmt-tiles button.wm-tile { cursor: pointer; text-align: left; font: inherit; color: inherit; }
html.wm .wmt-tiles button.wm-tile:hover { border-color: var(--ink); }
html.wm .wmt-tiles button.wm-tile[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
@media (prefers-reduced-motion: reduce) { html.wm .wmt-stage-panel.in, html.wm .stg-hours li { animation: none; } }
/* Narrow: the stage is above the details; a panel takes the map's place at its own height */
@container view (max-width: 760px) {
  html.wm .wmt-stage { order: -1; border-left: 0; border-bottom: 1px solid var(--line); }
  html.wm .wmt-stage .wmt-map { border-bottom: 0; }
  html.wm .wmt-stage-panel { position: static; }
  html.wm .wmt-stage:not([data-now="map"]) .wmt-map { display: none; }
  html.wm .stg-hours li { grid-template-columns: 52px 24px minmax(0, 1fr) 40px 40px; }
  html.wm .stg-hours .wd { display: none; }
  html.wm .stg-hours li.hd span:last-child { display: none; }
}
html.wm .stg-hours li { grid-template-columns: 54px 24px minmax(70px, 1fr) 38px 40px 74px; gap: 6px; }
html.wm .stg-facts > div { align-content: start; }
@container view (max-width: 760px) { html.wm .stg-hours li { grid-template-columns: 54px 24px minmax(0, 1fr) 34px 40px; } }

/* Panels are the map's exact size (Jeff 22/10): only the list of who's going scrolls */
html.wm .wmt-stage-panel { overflow: hidden; padding: 12px 16px 12px; gap: 8px; }
html.wm .wmt-stage-panel[data-kind="who"] { overflow-y: auto; }
html.wm .stg-hours li { padding: 5px 10px; }
html.wm .stg-hours li.hd { padding-top: 0; padding-bottom: 0; }
html.wm .stg-light { height: 40px; margin: 22px 0 22px; }
html.wm .stg-light .day { display: none; }
html.wm .stg-light .mk { color: var(--ink); }
html.wm .stg-light .mk::after { height: 44px; background: var(--panel); box-shadow: 0 0 0 1px rgb(20 35 58 / .5); }
html.wm .stg-light .mk.sun::after { height: 44px; background: var(--panel); }
html.wm .stg-facts > div { padding: 8px 10px; }
html.wm .stg-facts dd { font-size: 18px; }
@container view (max-width: 760px) {
  html.wm .wmt-stage { height: 300px; }
  html.wm .wmt-stage .wmt-map { min-height: 0; height: 100%; }
  html.wm .wmt-stage-panel { position: absolute; }
  html.wm .wmt-stage:not([data-now="map"]) .wmt-map { display: block; }
}
@container view (max-width: 760px) {
  html.wm .stg-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  html.wm .stg-facts dt { font-size: 10px; letter-spacing: .04em; }
  html.wm .stg-facts dd { font-size: 16px; }
  html.wm .stg-facts small { display: none; }
  html.wm .stg-lead { font-size: 14px; }
}

/* Today's rows (Jeff 22/10): every date shows its route code in the same column; a group's name sits under the route
   name, with the group's colour; the last run is no longer shaded, its "Last run" pill says it */
html.wm .rows .row .what .wt { display: flex; flex-direction: column; min-width: 0; }
html.wm .rows .row .what .grp { display: flex; align-items: center; gap: 6px; margin-top: 2px; font: 600 13px/1.3 var(--body); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.wm .rows .row .what .grp::before, html.wm .wmt-grp::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gc, var(--ink-3)); flex: none; }
html.wm .wmt-grp { display: inline-flex; align-items: center; gap: 6px; font: 700 13.5px/1 var(--body); color: var(--ink-2); }
html.wm .row.pastrow, html.wm .row.pastrow:not(.on) { background: transparent; }
html.wm .rows .row .what .wt .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.wm .rows .row .what:has(.wt) > .code { align-self: flex-start; margin-top: 1px; }
/* Club services (Jeff 26/10/2026): a break in the menu, then the paid services */
html.wm .nav .wmgroup { display: block; margin: 14px 12px 4px; padding-top: 12px; border-top: 1px solid var(--line); font: 700 11.5px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
html.wm .nav .wmnew { margin-left: auto; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-strong); font: 700 11px var(--body); color: var(--ink-2); white-space: nowrap; }
html.wm .nav a.on .wmnew { border-color: var(--accent); color: var(--accent); }
html.wm .app.nav-closed .nav .wmgroup { font-size: 0; margin: 10px 8px 4px; padding-top: 8px; }
html.wm .app.nav-closed .nav .wmnew { display: none; }
