/* Colours taken from lockerbietractorrun.co.uk: red #b80406, navy #2a345d, white.
   The page follows the phone's light or dark setting (the run is after dark). Only the tokens change between
   the two; the red title bar and the white logo strip stay the same so the brand does not shift. */
:root {
  color-scheme: light dark;
  --red: #b80406;
  --ink: #2a345d;       /* main text, borders, filled buttons */
  --on-ink: #fff;       /* text on a filled button */
  --bg: #fff;
  --soft: #f1f2f7;      /* status strip */
  --notice: #e8ebf5;
  --muted: #4b5470;
  --front-ui: #1f8a3b;  /* tractor icons in the status strip */
  --rear-ui: #b80406;
  --route: #2a345d;     /* planned route line on the map */
  --casing: #fff;       /* outline round the convoy stretch */
  --convoy: #b80406;
  --map-bg: #e9ecf3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #dbe3f7;
    --on-ink: #0f1b2d;
    --bg: #0f1b2d;
    --soft: #16253b;
    --notice: #1d2d49;
    --muted: #b4bfd6;
    --front-ui: #4cd07a;
    --rear-ui: #ff7a7d;
    --route: #9fb0d8;
    --casing: #0f1b2d;
    --convoy: #ff6b73;
    --map-bg: #16253b;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
/* The page uses the phone's own system font on purpose. The committee's site uses a licensed typeface (brother-1816)
   that we do not have, and a mismatch is fine (decided 2026-11-11). */
body { display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
       font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--ink); }
.brand { background: #fff; padding: .35rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand img { display: block; height: 48px; width: auto; }
.bar { background: var(--red); color: #fff; padding: .45rem 1rem .5rem; }
h1 { margin: 0; font-size: 1.05rem; line-height: 1.2; }
.lede { margin: .1rem 0 0; font-size: .85rem; font-weight: 400; }
.donate { background: var(--ink); color: var(--on-ink); text-decoration: none; font-weight: 700; padding: .6rem .9rem; border-radius: .4rem; white-space: nowrap; }
.donate:focus-visible, #follow:focus-visible, .linklike:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
#demo { background: #fff3cd; color: #5a3d00; padding: .3rem 1rem; font-size: .85rem; }
#banner { background: var(--red); color: #fff; padding: .45rem 1rem; font-weight: 700; }
#notice { background: var(--notice); color: var(--ink); padding: .4rem 1rem; font-size: .9rem; }
#countdown { background: var(--notice); color: var(--ink); padding: 0 1rem .4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
#map { flex: 1; min-height: 300px; min-height: 52dvh; background: var(--map-bg); }
#status { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.25rem; padding: .6rem 1rem; background: var(--soft); }
#status > span > b { color: var(--ink); }
#status span { color: var(--muted); }
.ico { width: 1.5rem; height: 1.5rem; vertical-align: -.4rem; margin-right: .2rem; }
.ico.front { color: var(--front-ui); }
.ico.rear { color: var(--rear-ui); }
#follow { font: inherit; min-height: 44px; padding: .4rem 1.1rem; border-radius: .4rem; border: 2px solid var(--ink);
          background: var(--bg); color: var(--ink); cursor: pointer; font-weight: 700; }
#follow[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
details { padding: .5rem 1rem; }
summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
details p { margin: .2rem 0 .6rem; color: var(--muted); font-size: .9rem; }
footer { padding: .4rem 1rem .8rem; font-size: .8rem; color: var(--muted); }
footer a { color: var(--ink); }
footer #offline { margin: 0 0 .3rem; }
footer .thanks { margin: 0 0 .5rem; font-size: .9rem; color: var(--ink); font-weight: 700; }
.linklike { font: inherit; background: none; border: 0; padding: .6rem .3rem; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* Vehicle markers: a white badge in both schemes, so the green and red tractors keep their contrast. */
.pin { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff;
       border: 3px solid currentColor; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.pin svg { width: 26px; height: 26px; }
.pin.front { color: #1f8a3b; }
.pin.rear { color: #b80406; }

/* Map lines. Leaflet draws these as SVG paths; classes let the colours follow the scheme. */
.route-line { stroke: var(--route); stroke-opacity: .6; }
.stop-dot { stroke: var(--route); fill: var(--bg); }
.convoy-case { stroke: var(--casing); stroke-opacity: .9; }
.convoy-line { stroke: var(--convoy); stroke-opacity: .95; }

/* Bigger map buttons for thumbs. */
.leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; }

.timings { border-collapse: collapse; margin-top: .4rem; }
.timings td, .timings th { padding: .15rem .6rem .15rem 0; text-align: left; }
.fine { color: var(--muted); font-size: .8rem; }

/* Privacy page */
.doc { padding: .5rem 1rem 1.5rem; max-width: 42rem; margin: 0 auto; line-height: 1.5; }
.doc h2 { font-size: 1.05rem; margin: 1.4rem 0 .3rem; }
.doc p, .doc li { color: var(--ink); font-size: .95rem; }
.doc ul { padding-left: 1.2rem; }
.doc .updated { color: var(--muted); font-size: .85rem; }
