/* Wasscore — bewegwijzering. See docs/DESIGN.md for the reasoning. */

@font-face {
  font-family: "Overpass";
  src: url("/fonts/overpass-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
  color-scheme: light;
  --blue: #00538a;          /* verkeersblauw: the sign, "do this" */
  --blue-press: #00446f;
  --blue-ink: #00538a;      /* blue used as text on the page */
  --blue-mark: #00538a;     /* blue used as a chart mark */
  --blue-wash: rgba(0, 83, 138, .11);
  --on-blue: #ffffff;
  --yellow: #f5b700;        /* omleidingsgeel: must-wash plate */
  --on-yellow: #1d2730;
  --slate: #3c4955;         /* the "niet wassen" sign */
  --ink: #1d2730;           /* wegdek */
  --ink-2: #46535f;
  --ink-3: #5c6975;
  --page: #e9edf0;          /* mist */
  --surface: #ffffff;
  --surface-2: #f5f7f8;
  --line: #cfd6dc;
  --line-2: #dde3e7;
  --track: #d9e0e5;
  --rain: #46535f;          /* rain marks are wet-asphalt grey, never blue */
  --rain-soft: #9aa7b2;
  --sun: #f0c24b;
  --hatch: rgba(29, 39, 48, .07);
  --lamp-go: #129c57;
  --lamp-wait: #e39b00;
  --lamp-stop: #c4321f;
  --focus: #0b6fd0;
  --seg-on: #ffffff;
  --on-mark: #ffffff;
  --tl-ring: transparent;
  --shadow: 0 1px 0 rgba(29, 39, 48, .06), 0 6px 18px -10px rgba(29, 39, 48, .35);
  /* week strip ramp: worst → best of this week */
  --r0: #b4c0ca;
  --r1: #9aaebf;
  --r2: #7b98b2;
  --r3: #5480a5;
  --r4: #2b6898;
  --r5: #00538a;

  --font: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
  --col: 560px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --r-sign: 14px;
  --r: 10px;
  --r-key: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --blue: #0a5a96;
    --blue-press: #0c6aae;
    --blue-ink: #8cc3f5;
    --blue-mark: #5aa6ee;
    --blue-wash: rgba(90, 166, 238, .14);
    --slate: #34414c;
    --ink: #e4eaee;
    --ink-2: #b3bec7;
    --ink-3: #95a2ad;
    --page: #141b21;
    --surface: #1d252d;
    --surface-2: #192128;
    --line: #34404a;
    --line-2: #2a343d;
    --track: #29333c;
    --rain: #aab6c0;
    --rain-soft: #5d6a75;
    --sun: #d9ad3c;
    --hatch: rgba(228, 234, 238, .06);
    --lamp-go: #22c06e;
    --lamp-wait: #f0a91a;
    --lamp-stop: #f0543f;
    --focus: #f5b700;
    --seg-on: #3a4651;
    --on-mark: #0d1a26;
    --tl-ring: rgba(255, 255, 255, .16);
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 24px -12px rgba(0, 0, 0, .8);
    --r0: #3a4651;
    --r1: #3e566c;
    --r2: #426a8e;
    --r3: #4880b4;
    --r4: #5194d4;
    --r5: #5aa6ee;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --blue: #0a5a96;
  --blue-press: #0c6aae;
  --blue-ink: #8cc3f5;
  --blue-mark: #5aa6ee;
  --blue-wash: rgba(90, 166, 238, .14);
  --slate: #34414c;
  --ink: #e4eaee;
  --ink-2: #b3bec7;
  --ink-3: #95a2ad;
  --page: #141b21;
  --surface: #1d252d;
  --surface-2: #192128;
  --line: #34404a;
  --line-2: #2a343d;
  --track: #29333c;
  --rain: #aab6c0;
  --rain-soft: #5d6a75;
  --sun: #d9ad3c;
  --hatch: rgba(228, 234, 238, .06);
  --lamp-go: #22c06e;
  --lamp-wait: #f0a91a;
  --lamp-stop: #f0543f;
  --focus: #f5b700;
  --seg-on: #3a4651;
  --on-mark: #0d1a26;
  --tl-ring: rgba(255, 255, 255, .16);
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 24px -12px rgba(0, 0, 0, .8);
  --r0: #3a4651;
  --r1: #3e566c;
  --r2: #426a8e;
  --r3: #4880b4;
  --r4: #5194d4;
  --r5: #5aa6ee;
}

@media (min-width: 400px) {
  :root { --gutter: 20px; }
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--blue-ink); text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
img { max-width: 100%; }

:focus { outline: none; }
/* headings get focus after a route change for screen readers; no ring for that */
[tabindex="-1"]:focus-visible { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 8px; top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--page);
  border-radius: var(--r);
  font-weight: 650;
}
.skip:focus { top: calc(8px + var(--safe-t)); }

/* ------------------------------------------------------------------ shell */

.shell {
  min-height: 100dvh;
  padding-top: var(--safe-t);
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}

.main {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--gutter) 40px;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.nav {
  position: fixed;
  z-index: 20;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + var(--safe-b)) max(8px, env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid var(--line);
}

.nav-brand { display: none; }

.nav-item {
  position: relative;
  flex: 1 1 0;
  max-width: 160px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .005em;
  border-radius: var(--r);
}
.nav-icon {
  width: 44px; height: 28px;
  padding: 3px 11px;
  border-radius: 8px;
  transition: background-color .2s, color .2s;
}
.nav-item[aria-current="page"] { color: var(--ink); }
.nav-item[aria-current="page"] .nav-icon {
  background: var(--blue);
  color: var(--on-blue);
}
.nav-dot {
  position: absolute;
  top: 6px; left: calc(50% + 12px);
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 2px var(--page);
}

/* offline / stale banner */
.netbar {
  max-width: var(--col);
  margin: 10px auto 0;
  padding: 0 var(--gutter);
}
.netbar-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: var(--r);
  background: var(--slate);
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
}
.netbar-inner svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.netbar-inner b { font-weight: 700; }

/* ------------------------------------------------------------------ top bar */

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: 8px 0 6px;
}
.topbar-text { flex: 1; min-width: 0; }
.topbar-place {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 750;
  font-size: 19px;
  line-height: 1.15;
}
.topbar-place svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.topbar-meta {
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-3);
  margin-top: 2px;
}
.topbar-title {
  flex: 1;
  font-size: 28px;
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: -.01em;
  padding-top: 6px;
}

.icon-btn {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-right: -10px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:active { background: var(--line-2); }
.icon-btn.is-busy svg { animation: spin 1s linear infinite; }
.icon-btn--back { margin: 0 0 0 -12px; color: var(--ink); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ the sign */

.sign {
  position: relative;
  display: block;
  padding: 22px 22px 18px;
  border-radius: var(--r-sign);
  background: var(--blue);
  color: var(--on-blue);
  text-decoration: none;
  /* the inset keyline of a route sign */
  box-shadow:
    inset 0 0 0 5px var(--blue),
    inset 0 0 0 7.5px rgba(255, 255, 255, .96),
    var(--shadow);
  --focus: #f5b700;
}
.sign--slate { background: var(--slate); box-shadow: inset 0 0 0 5px var(--slate), inset 0 0 0 7.5px rgba(255,255,255,.9), var(--shadow); }
.sign:active { filter: brightness(.94); }

.sign-chev {
  position: absolute;
  top: 18px; right: 16px;
  width: 22px; height: 22px;
  opacity: .8;
}
.sign-title {
  font-size: 40px;
  line-height: 1.02;
  font-weight: 820;
  letter-spacing: -.018em;
  text-wrap: balance;
  padding-right: 22px;
}
/* destination on one line, the time under it: how a route sign sets it */
.sign-dest, .sign-dist { display: block; }
.sign-title { overflow-wrap: break-word; hyphens: manual; }
.sign-title .sign-dest, .sign-title .sign-dist { white-space: nowrap; }
.sign-title.is-wrapped .sign-dest, .sign-title.is-wrapped .sign-dist { white-space: normal; }
.sign-dist { font-weight: 640; letter-spacing: -.01em; margin-top: 2px; }
.sign-text {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.42;
  color: rgba(255, 255, 255, .92);
  text-wrap: pretty;
  max-width: 34em;
}
.sign-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1.5px solid rgba(255, 255, 255, .28);
}
.sign-clean { display: flex; flex-direction: column; gap: 6px; }
.sign-clean-text { font-size: 15px; font-weight: 600; line-height: 1.2; }
.sign-score {
  text-align: right;
  line-height: 1;
}
.sign-score b {
  display: block;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.sign-score span { display: block; margin-top: 4px; font-size: 13px; font-weight: 650; opacity: .9; }

/* clean-day pips: survival probability per day */
.pips { display: flex; gap: 4px; }
.pip {
  position: relative;
  width: 14px; height: 22px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .22);
  overflow: hidden;
}
.pip i {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--p) * 100%);
  background: #fff;
}
.pips--page .pip { background: var(--track); }
.pips--page .pip i { background: var(--blue-mark); }

/* urgency: yellow plate with a blue onderbord */
.plates { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.plate-urgent {
  position: relative;
  padding: 20px 22px 18px;
  border-radius: var(--r-sign);
  background: var(--yellow);
  color: var(--on-yellow);
  box-shadow: inset 0 0 0 5px var(--yellow), inset 0 0 0 7.5px var(--on-yellow), var(--shadow);
  --focus: var(--blue);
}
.plate-urgent .sign-title { padding-right: 0; }
.plate-urgent .sign-text { color: var(--on-yellow); }
.plate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 650;
}
.plate-meta li { display: flex; align-items: center; gap: 7px; }
.plate-meta svg { width: 20px; height: 20px; flex: none; }
.deadline span { font-weight: 600; opacity: .85; }
.deadline {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 12px 5px;
  border-radius: 999px;
  background: var(--on-yellow);
  color: var(--yellow);
  font-weight: 750;
  font-size: 15px;
}
.plate-actions { margin-top: 14px; }
.sign--slot { padding-top: 20px; }
.sign--slot .sign-title { font-size: 34px; }
.sign--slot .sign-foot { margin-top: 14px; }

/* murphy meter: frequency drops */
.murphy {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 2px 0;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink-2);
}
.drops { display: flex; gap: 3px; flex: none; }
.drops svg { width: 12px; height: 17px; }
.drops .on { color: var(--rain); }
.drops .off { color: var(--rain-soft); }
.murphy b { color: var(--ink); font-weight: 750; }

/* ------------------------------------------------------------------ sections */

.section { margin-top: 34px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.h2 {
  font-size: 21px;
  line-height: 1.2;
  font-weight: 740;
  letter-spacing: -.005em;
}
.section-note { font-size: 13px; font-weight: 550; color: var(--ink-3); }
.lede { color: var(--ink-2); font-size: 15px; margin-top: -4px; margin-bottom: 12px; }

/* ------------------------------------------------------------------ week strip */

.strip { display: grid; gap: 2px; }
.day { position: relative; }
.day-link {
  display: grid;
  grid-template-columns: 62px 1fr 40px;
  grid-template-areas:
    "when bar score"
    "label reasons reasons";
  align-items: center;
  column-gap: 12px;
  row-gap: 3px;
  min-height: 64px;
  padding: 10px 12px 11px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}
.day-link:active { background: var(--line-2); }
.day + .day .day-link::before {
  content: "";
  position: absolute;
  top: -1px; left: 12px; right: 12px;
  border-top: 1px solid var(--line);
}
.day--best .day-link::before, .day--best + .day .day-link::before,
.day--second .day-link::before, .day--second + .day .day-link::before,
.deadline-row + .day .day-link::before { display: none; }

.day-when { grid-area: when; font-size: 17px; line-height: 1.1; white-space: nowrap; }
.day-when .day-today { font-size: 15px; letter-spacing: -.01em; }
.day-when b { font-weight: 800; }
.day-when span { color: var(--ink-2); font-weight: 500; }
.day-label { grid-area: label; font-size: 13px; font-weight: 650; color: var(--ink-2); line-height: 1.2; }
.day-score {
  grid-area: score;
  justify-self: end;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
}
.day-bar {
  grid-area: bar;
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: var(--track);
  --halo: var(--page);
}
/* a typical day (median of the last 90 days): a short tick through the track */
.day-norm {
  position: absolute;
  top: -4px; bottom: -4px;
  left: calc(var(--m) - 1px);
  width: 2px;
  border-radius: 1px;
  background: var(--ink-2);
  box-shadow: 0 0 0 1.5px var(--halo);
}
.day--best .day-bar { --halo: var(--blue); }
.day--best .day-norm { background: #fff; }
.day-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  min-width: 3px;
  border-radius: 6px;
  background: var(--c, var(--r2));
  transform-origin: left center;
}
.day--zero .day-bar i { display: none; }
.day--lowconf .day-bar i {
  background-image: repeating-linear-gradient(-45deg, transparent 0 4px, rgba(255,255,255,.35) 4px 6px);
}
.day-reasons {
  grid-area: reasons;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.32;
  color: var(--ink-2);
  text-wrap: pretty;
}
.day-reasons b { color: var(--ink); font-weight: 700; margin-right: 6px; }

/* best day: the same sign, smaller */
.day--best .day-link {
  background: var(--blue);
  color: var(--on-blue);
  box-shadow: inset 0 0 0 4px var(--blue), inset 0 0 0 6px rgba(255,255,255,.95);
  padding: 14px 16px 15px;
  --focus: #f5b700;
}
.day--best .day-when span, .day--best .day-label, .day--best .day-reasons { color: rgba(255,255,255,.9); }
.day--best .day-reasons b { color: #fff; }
.day--best .day-bar { background: rgba(255,255,255,.24); }
.day--best .day-bar i { background: #fff; }
.day--best.day--lowconf .day-bar i { background-image: repeating-linear-gradient(-45deg, transparent 0 4px, rgba(0,83,138,.25) 4px 6px); }

/* second choice: the sign's keyline without the fill */
.day--second .day-link {
  box-shadow: inset 0 0 0 2px var(--blue-mark);
  padding: 12px 14px 13px;
  margin: 4px 0;
}
.tag {
  display: inline-block;
  padding: 2px 7px 1px;
  border-radius: 5px;
  background: var(--blue-wash);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  vertical-align: 1px;
}
.day--least .day-link { box-shadow: inset 0 0 0 2px var(--ink-3); margin: 4px 0; }
.day--least .tag { background: var(--line-2); color: var(--ink); }
.day--late .day-link { opacity: .62; }

.strip-key { margin: 12px 12px 0; font-size: 13px; line-height: 1.4; color: var(--ink-3); font-weight: 550; }
.strip-key ul { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; }
.strip-key li { display: flex; align-items: center; gap: 10px; }
.key-bar { position: relative; flex: none; width: 34px; height: 8px; border-radius: 4px; background: var(--track); }
.key-bar i { position: absolute; inset: 0 auto 0 0; width: 45%; border-radius: 4px; background: var(--r2); }
.key-bar b { position: absolute; top: -4px; bottom: -4px; left: 64%; width: 2px; border-radius: 1px; background: var(--ink-2); box-shadow: 0 0 0 1.5px var(--page); }
.key-bar--hatch i { width: 60%; background: var(--r3) repeating-linear-gradient(-45deg, transparent 0 4px, rgba(255,255,255,.35) 4px 6px); }

.deadline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.deadline-row::before, .deadline-row::after {
  content: "";
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 14px, var(--on-yellow) 14px 28px);
}
.deadline-row::before { flex: 0 0 18px; }

/* load sequence: bars grow once */
@media (prefers-reduced-motion: no-preference) {
  .strip.is-entering .day-bar i { animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 45ms + 120ms); }
  .is-entering .sign, .is-entering .plates { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
}
@keyframes grow { from { transform: scaleX(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ------------------------------------------------------------------ nowcast */

.panel {
  padding: 16px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-2);
}
.nowcheck .h2 { margin-bottom: 12px; }
.verdict { display: flex; gap: 16px; align-items: flex-start; }
/* the exit light of the wash tunnel: position and colour both carry the verdict */
.tl {
  flex: none;
  display: grid;
  gap: 4px;
  padding: 5px;
  border-radius: 9px;
  background: #1f272e;
  box-shadow: inset 0 0 0 1px var(--tl-ring);
}
.tl i { width: 16px; height: 16px; border-radius: 50%; background: #3a444d; }
.tl--stop .tl-stop { background: var(--lamp-stop); box-shadow: 0 0 8px var(--lamp-stop); }
.tl--wait .tl-wait { background: var(--lamp-wait); box-shadow: 0 0 8px var(--lamp-wait); }
.tl--go .tl-go { background: var(--lamp-go); box-shadow: 0 0 8px var(--lamp-go); }
.verdict-title { font-size: 21px; font-weight: 780; line-height: 1.15; }
.verdict-text { margin-top: 3px; font-size: 15px; color: var(--ink-2); line-height: 1.38; }
.radar { margin-top: 14px; }
.radar-dry {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 22px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
}
.radar-dry::before, .radar-dry::after { content: ""; flex: 1; height: 2px; border-radius: 1px; background: var(--line); }
.radar-dry::before { flex: 0 0 12px; }
.radar svg { width: 100%; height: auto; overflow: visible; }
.radar-axis { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--ink-3); margin-top: 4px; }
.panel-foot { margin-top: 10px; font-size: 13px; color: var(--ink-3); font-weight: 550; }

/* moet er nu af */
.moet {
  display: grid;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.moet .btn { justify-self: start; padding-left: 22px; padding-right: 22px; }
.moet p { font-size: 15px; color: var(--ink-2); }
.moet .h3 { font-size: 17px; font-weight: 720; line-height: 1.25; margin-bottom: 3px; }

/* ------------------------------------------------------------------ buttons & forms */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 18px 10px;
  border: 0;
  border-radius: var(--r);
  background: var(--blue);
  color: var(--on-blue);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, transform .1s;
  touch-action: manipulation;
}
.btn:hover { background: var(--blue-press); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn--quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line);
}
.btn--quiet:hover { background: var(--line-2); }
.btn--yellow { background: var(--yellow); color: var(--on-yellow); }
.btn--yellow:hover { background: #e7ab00; }
.btn--ink { background: var(--on-yellow); color: var(--yellow); }
.btn--ink:hover { background: #000; }
.btn--danger { background: transparent; color: var(--lamp-stop); box-shadow: inset 0 0 0 2px currentColor; }
.btn--block { width: 100%; }
.btn--big {
  min-height: 72px;
  font-size: 26px;
  font-weight: 820;
  letter-spacing: -.01em;
  border-radius: var(--r-sign);
  box-shadow: inset 0 0 0 4px var(--blue), inset 0 0 0 6px rgba(255,255,255,.95);
  --focus: #f5b700;
}
.btn--big:hover { box-shadow: inset 0 0 0 4px var(--blue-press), inset 0 0 0 6px rgba(255,255,255,.95); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { flex: 1 1 auto; }

.field { display: grid; gap: 6px; }
.field + .field { margin-top: 14px; }
.label { font-size: 15px; font-weight: 650; }
.hint { font-size: 13px; color: var(--ink-3); font-weight: 500; line-height: 1.35; }
.input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 17px;
  appearance: none;
}
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--lamp-stop); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.grid-2 > .field + .field { margin-top: 0; }

/* program keys: the buttons on the wash terminal */
.keys { display: flex; flex-wrap: wrap; gap: 8px; }
.key {
  position: relative;
  min-height: 48px;
  padding: 11px 15px 10px;
  border: 0;
  border-radius: var(--r-key);
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line), 0 2px 0 var(--line);
  font-weight: 650;
  font-size: 16px;
  cursor: pointer;
  touch-action: manipulation;
}
.key[aria-pressed="true"] {
  background: var(--blue);
  color: var(--on-blue);
  box-shadow: inset 0 0 0 1.5px var(--blue), 0 2px 0 var(--blue-press);
  --focus: #f5b700;
}
.key:active { transform: translateY(1px); }
.key-x { margin-left: 6px; opacity: .65; }

.seg {
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--line-2);
  gap: 3px;
}
.seg button {
  flex: 1 1 0;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  color: var(--ink-2);
}
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

.switch-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 8px 0;
  cursor: pointer;
}
.switch-row + .switch-row { border-top: 1px solid var(--line-2); }
.switch-text { flex: 1; }
.switch-text b { display: block; font-weight: 650; font-size: 17px; line-height: 1.25; }
.switch-text span { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; line-height: 1.35; }
.switch {
  position: relative;
  flex: none;
  appearance: none;
  width: 52px; height: 32px;
  margin: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: background-color .2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 4px; left: 4px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform .2s;
}
.switch:checked { background: var(--blue); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.hours-table { display: grid; gap: 2px; }
.hours-row {
  display: grid;
  grid-template-columns: minmax(0, 88px) 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 56px;
}
.hours-row + .hours-row { border-top: 1px solid var(--line-2); }
.hours-day { font-weight: 650; }
.hours-times { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hours-times .input { flex: 1 1 0; width: 100%; min-width: 0; padding: 10px 4px; text-align: center; font-size: 16px; }
.hours-times .input::-webkit-calendar-picker-indicator { display: none; }
.hours-times span { color: var(--ink-3); }
.hours-closed { color: var(--ink-3); font-size: 15px; }

.savebar {
  position: sticky;
  bottom: calc(var(--nav-h) + var(--safe-b) + 10px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 10px 10px 16px;
  border-radius: var(--r-sign);
  background: var(--ink);
  color: var(--page);
  box-shadow: var(--shadow);
}
.savebar p { flex: 1; font-size: 15px; font-weight: 600; }
.savebar .btn { min-height: 44px; }

/* ------------------------------------------------------------------ day detail */

.day-head { margin-top: 4px; }
.day-date { font-size: 15px; font-weight: 600; color: var(--ink-3); margin-bottom: 2px; }
.scoreline {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  align-items: center;
  margin-top: 16px;
}
.scoreline-num {
  grid-row: span 2;
  min-width: 76px;
  padding: 10px 12px 7px;
  border-radius: 10px;
  text-align: center;
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--line);
  font-size: 36px;
  font-weight: 820;
  line-height: 1;
  letter-spacing: -.02em;
}
.scoreline-num.is-best {
  background: var(--blue);
  color: var(--on-blue);
  box-shadow: inset 0 0 0 3px var(--blue), inset 0 0 0 5px rgba(255,255,255,.95);
}
.scoreline-label { font-size: 21px; font-weight: 760; line-height: 1.15; }
.scoreline-text { font-size: 15px; color: var(--ink-2); line-height: 1.35; }

.reasons { display: grid; gap: 8px; margin-top: 18px; }
.reason { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; line-height: 1.35; }
.reason-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  margin-top: 1px;
  border-radius: 6px;
}
.reason-mark svg { width: 16px; height: 16px; }
.reason--good .reason-mark { background: var(--blue); color: #fff; }
.reason--bad .reason-mark { background: var(--rain); color: var(--page); }
.reason--info .reason-mark { background: var(--line-2); color: var(--ink); }

.chart { margin-top: 6px; position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chart text { font-family: var(--font); font-variant-numeric: tabular-nums; }
.readout {
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0, 1fr));
  gap: 2px 10px;
  align-items: start;
  padding: 10px 12px 9px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-2);
  font-size: 13px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.readout-h { font-size: 21px; font-weight: 800; padding-right: 2px; align-self: center; }
.readout dt { color: var(--ink-3); font-weight: 600; font-size: 12px; }
.readout dd { font-weight: 750; font-size: 15px; white-space: nowrap; }
.readout dd small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.readout dd small.unit { display: inline; }
.readout div { min-width: 0; }
.readout-closed { grid-column: 2 / -1; font-size: 12px; font-weight: 650; color: var(--ink-3); margin-top: 2px; }
.swatch--hatch { background: repeating-linear-gradient(45deg, var(--line) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--line); }

.legend-note { font-size: 13px; color: var(--ink-3); font-weight: 550; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legend-note span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }

.hours-tab { margin-top: 12px; font-size: 15px; }
.hours-tab summary { min-height: 44px; display: flex; align-items: center; font-weight: 650; color: var(--blue-ink); cursor: pointer; }
.tab-scroll { overflow-x: auto; }
.hours-tab table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours-tab th, .hours-tab td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.hours-tab thead th { color: var(--ink-3); font-weight: 650; font-size: 12px; }
.hours-tab tbody th { text-align: left; font-weight: 750; }
.hours-tab tr.is-closed { color: var(--ink-3); }

.windows { display: grid; gap: 0; }
.win {
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-areas: "time bar" ". note";
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  min-height: 44px;
}
.win--plain { grid-template-areas: "time bar"; }
.win--zero { grid-template-areas: "time why"; }
.win-why { grid-area: why; font-size: 14px; color: var(--ink-3); font-weight: 550; line-height: 1.3; }
.win--mark .win-time::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--blue-mark); vertical-align: 2px; }
.win-all { margin-top: 6px; }
.win-all > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 12px;
  font-weight: 700;
  color: var(--blue-ink);
  cursor: pointer;
  list-style: none;
}
.win-all > summary::-webkit-details-marker { display: none; }
.win-all > summary::before {
  content: "";
  width: 8px; height: 8px;
  margin-right: 4px;
  border-right: 2.2px solid currentColor;
  border-bottom: 2.2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .15s;
}
.win-all[open] > summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.win-all > summary span { color: var(--ink-3); font-weight: 600; }
.win + .win { border-top: 1px solid var(--line-2); }
.win-time { grid-area: time; font-weight: 750; font-size: 16px; white-space: nowrap; }
.win-bar { grid-area: bar; height: 8px; border-radius: 4px; background: var(--track); position: relative; overflow: hidden; }
.win-bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--q) * 100%); border-radius: 4px; background: var(--r3); }
.win-note { grid-area: note; font-size: 13px; color: var(--ink-3); font-weight: 550; line-height: 1.3; }
.win--zero .win-time { color: var(--ink-3); font-weight: 600; }
.win--best { background: var(--blue); color: var(--on-blue); border-top-color: transparent; }
.win--best + .win { border-top-color: transparent; }
.win--best .win-bar { background: rgba(255,255,255,.25); }
.win--best .win-bar i { background: #fff; }
.win--best .win-note { color: #fff; font-weight: 650; }
.win--best { box-shadow: inset 0 0 0 3px var(--blue), inset 0 0 0 4.5px rgba(255,255,255,.9); }
.win:not(.win--best) { border-radius: 0; }

.horizon {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.hz { display: grid; gap: 6px; text-align: center; }
.hz-col {
  position: relative;
  height: 112px;
  border-radius: 6px;
  background: var(--track);
  overflow: hidden;
}
.hz-col i {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--s) * 100%);
  background: var(--blue-mark);
  border-radius: 6px 6px 0 0;
}
.hz-col b {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(var(--s) * 100% + 4px);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}
.hz-col.is-high b { bottom: auto; top: 6px; color: var(--on-mark); }
.hz-day { font-weight: 750; font-size: 15px; }
.hz-why { font-size: 12px; color: var(--ink-3); font-weight: 550; line-height: 1.25; hyphens: auto; overflow-wrap: anywhere; }
.expect {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-2);
}
.expect b { font-size: 28px; font-weight: 820; line-height: 1; letter-spacing: -.02em; }
.expect span { font-size: 15px; color: var(--ink-2); line-height: 1.3; }

.tip {
  display: grid;
  gap: 4px;
  padding: 14px 16px 15px 18px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--blue-mark), 0 0 0 1px var(--line-2);
}
.tip-key {
  grid-row: span 2;
  align-self: start;
  padding: 9px 11px 8px;
  border-radius: var(--r-key);
  background: var(--blue);
  color: var(--on-blue);
  font-weight: 760;
  font-size: 15px;
  box-shadow: 0 2px 0 var(--blue-press);
}
.tip h3 { font-size: 17px; font-weight: 740; }
.tip p { font-size: 15px; color: var(--ink-2); }

/* ------------------------------------------------------------------ wash log */

.wash-form { display: grid; gap: 18px; margin-top: 6px; }
.wash-done {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--blue-mark);
  font-size: 15px;
}
.wash-done svg { width: 24px; height: 24px; color: var(--blue-ink); flex: none; }
.wash-done b { display: block; font-size: 17px; }

.ask {
  padding: 16px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-2);
}
.ask .h3 { font-size: 19px; font-weight: 760; }
.ask p { color: var(--ink-2); font-size: 15px; margin: 2px 0 12px; }

.calib { display: grid; gap: 10px; }
.calib-row { display: grid; grid-template-columns: 92px 1fr 48px; gap: 10px; align-items: center; font-size: 15px; }
.calib-row span:first-child { font-weight: 600; color: var(--ink-2); }
.calib-bar { height: 14px; border-radius: 7px; background: var(--track); position: relative; overflow: hidden; }
.calib-bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); border-radius: 7px; background: var(--c); }
.calib-row b { text-align: right; font-weight: 800; }
.calib-text { font-size: 15px; color: var(--ink-2); }

.history { display: grid; }
.hist {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "when side" "meta meta" "note note";
  gap: 0 12px;
  padding: 10px 0 12px;
  align-items: center;
}
.hist + .hist { border-top: 1px solid var(--line); }
.hist-when { grid-area: when; font-weight: 720; }
.hist-meta { grid-area: meta; font-size: 13px; color: var(--ink-3); font-weight: 550; margin-top: -2px; }
.hist-note { grid-area: note; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.hist-side { grid-area: side; display: flex; align-items: center; gap: 2px; }
.icon-btn.is-armed { color: var(--lamp-stop); background: color-mix(in srgb, var(--lamp-stop) 12%, transparent); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 3px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.badge svg { width: 14px; height: 14px; }
.badge--clean { background: var(--blue-wash); color: var(--blue-ink); }
.badge--dirty { background: var(--line-2); color: var(--ink); }
.badge--wait { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--line); }
.icon-btn--sm { width: 44px; height: 44px; margin: 0 -8px 0 0; color: var(--ink-3); }
.icon-btn--sm svg { width: 20px; height: 20px; }

/* ------------------------------------------------------------------ states */

.empty, .error {
  padding: 18px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-2);
}
.error { box-shadow: inset 0 0 0 2px var(--lamp-stop); }
.empty .h3, .error .h3 { font-size: 19px; font-weight: 760; line-height: 1.25; }
.empty p, .error p { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.empty .btn, .error .btn { margin-top: 14px; }

.skel { border-radius: 8px; background: var(--line-2); }
@media (prefers-reduced-motion: no-preference) {
  .skel { animation: pulse 1.4s ease-in-out infinite; }
}
@keyframes pulse { 50% { opacity: .55; } }

.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-b) + 14px);
  max-width: min(92vw, 480px);
  padding: 12px 18px 11px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--page);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: var(--shadow);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .25s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ about */

.about {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
}
.about ul { display: grid; gap: 2px; margin-top: 4px; }
.about a { color: var(--ink-2); }
.about p + p { margin-top: 8px; }

/* ------------------------------------------------------------------ pairing */

.pair {
  min-height: calc(100dvh - var(--safe-t) - 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0 40px;
  max-width: 460px;
  margin: 0 auto;
}
.pair-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; margin-bottom: 18px; }
.pair-brand svg { width: 30px; height: 30px; }
.pair .sign-title { padding-right: 0; }
.pair-steps { margin-top: 26px; display: grid; gap: 16px; }
.pair-or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; font-weight: 600; margin: 6px 0; }
.pair-or::before, .pair-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.body-pair .nav { display: none; }
.body-pair .shell { padding-bottom: var(--safe-b); }

/* ------------------------------------------------------------------ small phones */

@media (max-width: 359px) {
  .murphy { display: grid; gap: 6px; }
  .day-label { font-size: 12px; white-space: nowrap; }
  .sign { padding: 20px 18px 16px; }
  .sign-title { font-size: 33px; }
  .sign--slot .sign-title { font-size: 30px; }
  .day-link { grid-template-columns: 56px 1fr 36px; column-gap: 10px; padding-left: 10px; padding-right: 10px; }
  .readout { grid-template-columns: auto repeat(2, minmax(0, 1fr)); }
  .readout-h { grid-row: span 2; }
  .nav-item { font-size: 12px; }
}

/* ------------------------------------------------------------------ desktop */

@media (min-width: 960px) {
  :root { --col: 1040px; --nav-h: 0px; }
  .shell { padding-bottom: 0; }
  .nav {
    position: sticky;
    top: 0;
    bottom: auto;
    justify-content: flex-start;
    gap: 6px;
    max-width: var(--col);
    margin: 0 auto;
    padding: 12px var(--gutter);
    border-top: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--page) 90%, transparent);
  }
  .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    font-size: 19px;
  }
  .nav-brand svg { width: 30px; height: 30px; }
  .nav-item { flex: none; flex-direction: row; gap: 6px; max-width: none; min-height: 44px; padding: 0 14px 0 6px; font-size: 15px; }
  .nav-icon { width: 40px; height: 28px; padding: 3px 9px; }
  .nav-dot { top: 6px; left: 30px; }
  .toast { bottom: 24px; }
  .savebar { bottom: 16px; }
  .home {
    display: grid;
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
    gap: 0 48px;
    align-items: start;
  }
  .home-side { position: sticky; top: 84px; }
  .home-week { grid-row: span 3; }
  .home-week.section { margin-top: 12px; }
  .home .topbar { grid-column: 1 / -1; }
  .home .about { grid-column: 1 / -1; }
  .daygrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 0 48px; align-items: start; }
  .daygrid > .col-wide { grid-column: 1; }
  .narrow { max-width: 640px; }
}

@media (max-width: 339px) {
  .sign-title { font-size: 30px; }
  .sign--slot .sign-title { font-size: 28px; }
}
