/* =========================================================================
   The Stake List app. Same design language as the site (site/assets/site.css,
   site/selfserve): the permit card's yellow field for the head of every page,
   paper sheets for the work, hairlines that carry information, Big Shoulders
   Display for names and figures, Atkinson Hyperlegible Next for reading.
   Night is "under a sodium lamp": the card dimmed to amber, paper-white ink.

   Built for a rep in a truck: phone first, one thumb, readable in sun.
   Body 18px (19 on wider screens). Every control is at least 56px tall, the
   tab bar 68px. Contrast: ink on paper 17:1, ink on yellow 13:1.
   Yellow (amber at night) means "look here": the page head, the rank tag,
   the call button, this month's bar. Never text on paper.
   ========================================================================= */

@font-face {
  font-family: "Big Shoulders Display";
  src: url(fonts/big-shoulders-display.woff2) format("woff2");
  font-weight: 600 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url(fonts/atkinson-hyperlegible-next.woff2) format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}

/* ------------------------------------------------------------------ tokens: type */

:root {
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --text: "Atkinson Hyperlegible Next", Arial, "Helvetica Neue", Helvetica, sans-serif;
  --t-label: 13px;
  --t-small: 15.5px;
  --t-meta: 16.5px;
  --t-ui: 17.5px;
  --t-body: 18px;
  --t-lede: 19px;
  --t-name: 30px;
  --t-h2: 26px;
  --t-h1: clamp(40px, 5.5vw + 18px, 76px);
  --track-label: .085em;
  --measure: 34em;
  --tap: 56px;
  --tabbar: 68px;
}

/* ------------------------------------------------------------------ tokens: day, the posted card */

:root {
  --yellow: #f5d14a;
  --paper: #ffffff;
  --ground: #eeefec;
  --ink: #16181b;
  --ink-2: #4d525a;
  --hair: #d3d6d9;
  --rule: #16181b;
  --focus: #1f5bd8;
  --link-ul: currentColor;
  --field-top: #f5d14a;
  --field-bottom: #f5d14a;
  --field-ink: #16181b;
  --field-ink-2: #3f3a22;
  --field-h1: #16181b;
  --field-rule: rgba(22, 24, 27, .28);
  --field-rule-strong: rgba(22, 24, 27, .62);
  --sheet: #ffffff;
  --sheet-edge: transparent;
  --sheet-shadow: 0 1px 1px rgba(60, 48, 0, .10), 0 18px 36px -20px rgba(60, 48, 0, .38);
  --mark: #ffe04a;
  --btn: #16181b;
  --btn-ink: #ffffff;
  --btn-hover: #33373d;
  --ghost-hover: rgba(22, 24, 27, .07);
  --call: #f5d14a;
  --call-ink: #16181b;
  --call-edge: #16181b;
  --tag: #f5d14a;
  --tag-ink: #16181b;
  --bar: #4d525a;
  --bar-now: #16181b;
  --ok: #1d6b3a;
  --ok-bg: #e5f2e8;
  --warn: #8a4b00;
  --error: #a3221b;
  --error-bg: #fbe9e7;
  --mk-card: #16181b;
  --mk-hl: #f5d14a;
  --mk-line: #ffffff;
  --map-dot: #16181b;
  --map-dot-ring: #ffffff;
  --map-cust: #f5d14a;
  --map-approx: #4d525a;
  --map-ring: #16181b;
  --map-route: #1f5bd8;
  --map-filter: none;
  --w-body: 400;
  --w-semi: 600;
  --w-bold: 700;
  --w-display: 800;
  --w-display-x: 900;
  --track-text: 0;
  --smooth: auto;
  color-scheme: light;
}

/* ------------------------------------------------------------------ tokens: night, under a sodium lamp
   (the same block twice: once for the device setting, once for the choice on the Account page) */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12100d; --ground: #1a1713; --ink: #efe6d2; --ink-2: #b8ad98; --hair: #332f28; --rule: #cdbfa6;
    --focus: #9db8ff; --link-ul: rgba(239, 230, 210, .5);
    --field-top: #5a3b0a; --field-bottom: #2a1a07; --field-ink: #f6e7c6; --field-ink-2: #d8c59e; --field-h1: #ffc14a;
    --field-rule: rgba(246, 231, 198, .2); --field-rule-strong: rgba(246, 231, 198, .5);
    --sheet: #1f1b16; --sheet-edge: rgba(255, 205, 120, .14);
    --sheet-shadow: 0 1px 0 rgba(255, 210, 140, .08) inset, 0 22px 44px -24px rgba(0, 0, 0, .9);
    --mark: #cf972c; --btn: #e9b444; --btn-ink: #1a1306; --btn-hover: #f4c460; --ghost-hover: rgba(246, 231, 198, .08);
    --call: #e9b444; --call-ink: #1a1306; --call-edge: #e9b444; --tag: #e9b444; --tag-ink: #1a1306;
    --bar: #a89b83; --bar-now: #f2b84b; --ok: #8fd3a4; --ok-bg: #16261b; --warn: #f2b84b; --error: #ff9c8f; --error-bg: #2d1512;
    --mk-card: #ffc14a; --mk-hl: #1a1306; --mk-line: #6b5216;
    --map-dot: #f2b84b; --map-dot-ring: #12100d; --map-cust: #fff3c4; --map-approx: #b8ad98; --map-ring: #ffc14a;
    --map-route: #9db8ff; --map-filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.92) sepia(.35);
    --w-body: 380; --w-semi: 560; --w-bold: 660; --w-display: 760; --w-display-x: 840; --track-text: .006em;
    --smooth: antialiased; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12100d; --ground: #1a1713; --ink: #efe6d2; --ink-2: #b8ad98; --hair: #332f28; --rule: #cdbfa6;
  --focus: #9db8ff; --link-ul: rgba(239, 230, 210, .5);
  --field-top: #5a3b0a; --field-bottom: #2a1a07; --field-ink: #f6e7c6; --field-ink-2: #d8c59e; --field-h1: #ffc14a;
  --field-rule: rgba(246, 231, 198, .2); --field-rule-strong: rgba(246, 231, 198, .5);
  --sheet: #1f1b16; --sheet-edge: rgba(255, 205, 120, .14);
  --sheet-shadow: 0 1px 0 rgba(255, 210, 140, .08) inset, 0 22px 44px -24px rgba(0, 0, 0, .9);
  --mark: #cf972c; --btn: #e9b444; --btn-ink: #1a1306; --btn-hover: #f4c460; --ghost-hover: rgba(246, 231, 198, .08);
  --call: #e9b444; --call-ink: #1a1306; --call-edge: #e9b444; --tag: #e9b444; --tag-ink: #1a1306;
  --bar: #a89b83; --bar-now: #f2b84b; --ok: #8fd3a4; --ok-bg: #16261b; --warn: #f2b84b; --error: #ff9c8f; --error-bg: #2d1512;
  --mk-card: #ffc14a; --mk-hl: #1a1306; --mk-line: #6b5216;
  --map-dot: #f2b84b; --map-dot-ring: #12100d; --map-cust: #fff3c4; --map-approx: #b8ad98; --map-ring: #ffc14a;
  --map-route: #9db8ff; --map-filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.92) sepia(.35);
  --w-body: 380; --w-semi: 560; --w-bold: 660; --w-display: 760; --w-display-x: 840; --track-text: .006em;
  --smooth: antialiased; color-scheme: dark;
}

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ground); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--ground); color: var(--ink);
  font: var(--w-body) var(--t-body)/1.5 var(--text); letter-spacing: var(--track-text);
  -webkit-font-smoothing: var(--smooth); overflow-wrap: break-word;
}
body.has-tabs { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); }
main { flex: 1 0 auto; }
p, ul, ol, dl, figure, blockquote, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--link-ul); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
b, strong { font-weight: var(--w-bold); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 50; padding: 12px 18px; border-radius: 6px;
  background: var(--btn); color: var(--btn-ink); font-weight: var(--w-bold); text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 680px; }
.i { width: 22px; height: 22px; fill: currentColor; flex: none; }

.label, .kicker, .field-l, .step-of, .ob-label {
  font: var(--w-bold) var(--t-label)/1.3 var(--text); letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.fine { font-size: var(--t-small); line-height: 1.5; color: var(--ink-2); }
.lede { font-size: var(--t-lede); line-height: 1.45; max-width: var(--measure); }
.sec-h { font: var(--w-display) var(--t-h2)/1.05 var(--display); letter-spacing: .005em; margin-bottom: 12px; }
.error { padding: 12px 14px; border-left: 4px solid var(--error); background: var(--error-bg); color: var(--ink);
  font-weight: var(--w-semi); border-radius: 0 3px 3px 0; }
.saved, .welcome { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 3px;
  background: var(--ok-bg); border-left: 4px solid var(--ok); color: var(--ink); font-size: var(--t-ui); }
.saved .i { color: var(--ok); }
.dev-note { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.textlink { display: inline-flex; align-items: center; min-height: 44px; font-weight: var(--w-bold); font-size: var(--t-ui);
  text-decoration-thickness: 2px; text-decoration-color: currentColor; }
.textlink.plain { background: none; border: 0; padding: 0; color: inherit; font-family: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: .2em; margin-top: 8px; }
.textlink.back { align-self: flex-start; }
.more-link { margin-top: 14px; }
.more-link a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: var(--w-bold);
  font-size: var(--t-ui); text-decoration: none; }
.more-link a:hover span, .more-link a:hover { text-decoration: underline; }
.more-link .i { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ masthead, nav, tab bar */

.field { background: var(--field-top); color: var(--field-ink); }
.masthead .bar { display: flex; align-items: center; gap: 8px 28px; min-height: 58px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--field-ink); text-decoration: none;
  font: var(--w-display) 25px/1 var(--display); letter-spacing: .01em; min-height: 44px; }
.brand .mark { width: 30px; height: 30px; }
.mk-card { fill: var(--mk-card); } .mk-hl { fill: var(--mk-hl); } .mk-line { fill: var(--mk-line); }
.topnav { display: none; margin-left: auto; gap: 0 26px; }
.topnav a { color: var(--field-ink); text-decoration: none; font-weight: var(--w-semi); font-size: var(--t-ui);
  padding: 12px 0 9px; border-bottom: 3px solid transparent; }
.topnav a:hover, .topnav a[aria-current="page"] { border-bottom-color: currentColor; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--paper); border-top: 2px solid var(--rule);
}
.tabbar a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-2); text-decoration: none; font: var(--w-bold) 13.5px/1.1 var(--text); letter-spacing: .01em;
}
.tabbar a .i { width: 27px; height: 27px; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: -2px; left: 18%; right: 18%; height: 5px;
  background: var(--tag); border-radius: 0 0 3px 3px; }

/* ------------------------------------------------------------------ the band: page head on the card */

.band { padding: 22px 0 30px; background: linear-gradient(to bottom, var(--field-top), var(--field-bottom));
  color: var(--field-ink); border-bottom: 1px solid var(--field-rule); }
.band h1 { font: var(--w-display-x) var(--t-h1)/.92 var(--display); letter-spacing: -.008em; color: var(--field-h1);
  margin-top: 6px; }
.band .kicker, .band .step-of { color: var(--field-ink-2); }
.band .lede { margin-top: 12px; color: var(--field-ink); }
.band .band-sub { font-weight: var(--w-semi); }
.band-note { margin-top: 6px; font-size: var(--t-small); color: var(--field-ink-2); }
.band-actions { margin-top: 22px; }
.crumbs { font-size: var(--t-small); color: var(--field-ink-2); }
.crumbs a { color: var(--field-ink-2); display: inline-block; padding: 8px 0; }
.sheet-wrap { margin-top: -14px; padding-bottom: 40px; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap);
  padding: 12px 22px; border-radius: 6px; border: 2px solid var(--btn); background: var(--btn); color: var(--btn-ink);
  font: var(--w-bold) 18px/1.2 var(--text); letter-spacing: .005em; text-decoration: none; text-align: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-ink); text-decoration: none; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.ghost:hover { background: var(--ghost-hover); color: inherit; }
.btn.big { width: 100%; min-height: 60px; font-size: 19px; }
.btn.small { min-height: 48px; padding: 8px 16px; font-size: 16.5px; }
.btn.call { background: var(--call); color: var(--call-ink); border-color: var(--call-edge); }
.btn.call:hover { filter: brightness(.96); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .i { width: 22px; height: 22px; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 6px;
  border: 2px solid var(--hair); background: transparent; color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { border-color: var(--ink); color: var(--ink); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }

/* ------------------------------------------------------------------ forms */

.sheet { background: var(--sheet); color: var(--ink); border-radius: 3px; box-shadow: var(--sheet-shadow), 0 0 0 1px var(--sheet-edge); }
.form-sheet { padding: 22px 18px 26px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > .field-l { margin-top: 10px; margin-bottom: -6px; }
.stack > .btn.big { margin-top: 10px; }
.hint { font-size: var(--t-small); color: var(--ink-2); margin-top: -8px; }
.input {
  width: 100%; min-height: 58px; padding: 12px 14px; border: 2px solid var(--ink-2); border-radius: 0; background: var(--paper);
  color: var(--ink); font: var(--w-body) 20px/1.3 var(--text); letter-spacing: var(--track-text);
}
.input:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.input::placeholder { color: var(--ink-2); opacity: .7; }
.input.code { font: var(--w-display) 40px/1 var(--display); letter-spacing: .32em; text-align: center; font-variant-numeric: tabular-nums; }
.input.file { min-height: auto; padding: 14px; font-size: 17px; border-style: dashed; }
.choices { display: grid; gap: 8px; margin-top: 4px; }
.choices legend { margin-bottom: 10px; }
.choice { position: relative; display: flex; align-items: center; gap: 14px; min-height: var(--tap); padding: 10px 14px;
  border: 2px solid var(--hair); border-radius: 6px; cursor: pointer; font-size: var(--t-ui); font-weight: var(--w-semi); }
.choice input { width: 24px; height: 24px; margin: 0; accent-color: var(--ink); flex: none; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--ghost-hover); box-shadow: inset 6px 0 0 var(--tag); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice.tall { min-height: 76px; }
.choice .big-n { display: block; font: var(--w-display) 30px/1 var(--display); }
.choice .choice-sub { display: block; margin-top: 4px; font-size: var(--t-small); font-weight: var(--w-body); color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 10px 18px 10px 14px;
  border: 2px solid var(--ink-2); border-radius: 30px; font-size: var(--t-ui); font-weight: var(--w-semi); }
.chip .i { width: 20px; height: 20px; display: none; }
.chip span::before { content: ""; width: 18px; height: 18px; border: 2px solid currentColor; border-radius: 50%; flex: none; }
.chip input:checked + span { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.chip input:checked + span::before { display: none; }
.chip input:checked + span .i { display: block; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; max-width: 360px; }
.steps li { height: 8px; border-radius: 4px; background: var(--field-rule); }
.steps li.done { background: var(--field-ink-2); }
.steps li.now { background: var(--field-ink); }
.segs { display: inline-flex; flex-wrap: wrap; gap: 0; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.segs label { position: relative; cursor: pointer; }
.segs input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segs span { display: inline-flex; align-items: center; min-height: 52px; padding: 8px 18px; font-weight: var(--w-semi); font-size: var(--t-ui); }
.segs label + label span { border-left: 2px solid var(--ink); }
.segs input:checked + span { background: var(--btn); color: var(--btn-ink); }
.segs input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -4px; }
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }

/* sign in */
.signin-band { padding-top: 34px; padding-bottom: 40px; }
.signin-band h1 { font-size: clamp(44px, 7vw + 16px, 84px); }
.demo-box { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--hair); display: grid; gap: 10px; }

/* search and pick */
.searchbox { display: grid; gap: 8px; }
.sb { position: relative; }
.sb-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.sb .input { padding-left: 46px; }
.results:empty { display: none; }
.hits { border-top: 2px solid var(--rule); }
.hit { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); min-height: 68px; }
.hit-main { flex: 1; min-width: 0; font-size: var(--t-ui); line-height: 1.35; }
.hit-sub { display: block; font-size: var(--t-small); color: var(--ink-2); }
.added { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: var(--w-bold); padding: 0 6px; }
.none, .empty { color: var(--ink-2); font-size: var(--t-ui); padding: 8px 0; }
.chosen { margin-top: 6px; }
.picked { display: grid; gap: 8px; margin-top: 8px; }
.picked li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 4px 14px;
  border: 2px solid var(--ink); border-radius: 6px; font-weight: var(--w-semi); font-size: var(--t-ui); min-height: 60px; }
.csv-box { margin-top: 8px; border-top: 1px solid var(--hair); padding-top: 6px; }
.csv-box summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; font-weight: var(--w-bold); font-size: var(--t-ui); }
.csv-box form { margin-top: 6px; }
.report { margin-top: 14px; padding: 14px; background: var(--ground); border-radius: 3px; font-size: var(--t-ui); }
.review { display: grid; gap: 10px; margin-top: 8px; }
.review li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.done-row { margin-top: 12px; }

/* ------------------------------------------------------------------ this week */

.week-wrap { padding-top: 18px; padding-bottom: 32px; display: grid; gap: 18px; }
.welcome { font-size: var(--t-ui); }
.strip { background: var(--sheet); border-top: 4px solid var(--rule); border-radius: 0 0 3px 3px; padding: 12px 16px 6px;
  box-shadow: var(--sheet-shadow), 0 0 0 1px var(--sheet-edge); }
.strip-h { font: var(--w-display) 22px/1.05 var(--display); letter-spacing: .005em; }
.strip-sub { margin-top: 8px; font-size: var(--t-small); color: var(--ink); }
.strip > .strip-sub:last-child { margin-bottom: 8px; }
.strip-sub a { font-weight: var(--w-bold); }
.cis { margin-top: 4px; }
.ci { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--hair); }
.ci:last-child { border-bottom: 0; }
.ci-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center;
  padding: 7px 0; min-height: 56px; text-decoration: none; color: inherit; }
.ci-name { grid-column: 1; font-weight: var(--w-bold); font-size: 17.5px; line-height: 1.25; }
.ci-main:hover .ci-name { text-decoration: underline; }
.ci-line { grid-column: 1; font-size: var(--t-small); color: var(--ink-2); line-height: 1.35; margin-top: 1px; }
.ci-go { grid-column: 2; grid-row: 1 / span 2; color: var(--ink-2); }
.ci-go .i { width: 20px; height: 20px; }
.ci .btn.small { width: 52px; padding: 0; }

.cards { display: grid; gap: 16px; }
.card {
  position: relative; background: var(--sheet); border-radius: 3px; padding: 18px 16px 12px;
  box-shadow: var(--sheet-shadow), 0 0 0 1px var(--sheet-edge); scroll-margin-top: 12px;
}
.card:has(.logged) > :not(.outcome):not(.card-h) { opacity: .62; }
.card-h { display: flex; align-items: flex-start; gap: 12px; }
.rank { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px;
  padding: 0 6px; border-radius: 3px; background: var(--tag); color: var(--tag-ink);
  font: var(--w-display-x) 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.card-name { font: var(--w-display) var(--t-name)/1 var(--display); letter-spacing: -.002em; padding-top: 4px; }
.card-name a { text-decoration: none; }
.card-name a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.reason { margin-top: 12px; font-weight: var(--w-bold); font-size: 19.5px; line-height: 1.4; }
.why { margin-top: 6px; display: grid; gap: 2px; }
.why li { position: relative; padding-left: 16px; font-size: var(--t-meta); line-height: 1.45; color: var(--ink-2); }
.why li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 7px; height: 2px; background: var(--ink-2); }
.you-note { margin-top: 10px; display: inline-block; padding: 4px 10px; border-radius: 3px; background: var(--ground);
  font-size: var(--t-small); font-weight: var(--w-semi); }
.card h3.label { margin-top: 16px; }
.jobs { margin-top: 6px; border-top: 2px solid var(--rule); }
.jobrow { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 9px 0 10px; border-bottom: 1px solid var(--hair); }
.j-type { grid-column: 1 / -1; font-size: var(--t-small); font-weight: var(--w-bold); color: var(--ink-2); }
.j-where { font-size: var(--t-ui); line-height: 1.35; }
.j-n { color: var(--ink-2); font-size: var(--t-small); white-space: nowrap; }
.j-meta { font-size: var(--t-small); color: var(--ink-2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; align-self: end; }
.j-meta b { color: var(--ink); }
.nojobs { margin-top: 12px; color: var(--ink-2); font-size: var(--t-small); }
.say { margin-top: 16px; padding: 10px 14px 12px; border-left: 5px solid var(--tag); background: var(--ground); border-radius: 0 3px 3px 0; }
.say blockquote { margin: 4px 0 0; }
.say p { font-size: var(--t-ui); line-height: 1.45; }
.contact { margin-top: 16px; display: grid; gap: 10px; }
.contact .btn { width: 100%; }
.contact .btn.call span { font-variant-numeric: tabular-nums; }
.outcome { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); }
.ob-label { margin-bottom: 8px; }
.obtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ob { min-height: var(--tap); border-radius: 6px; border: 2px solid var(--ink-2); background: transparent; color: var(--ink);
  font: var(--w-bold) 17.5px/1.15 var(--text); cursor: pointer; padding: 6px 8px; -webkit-tap-highlight-color: transparent; }
.ob:hover { border-color: var(--ink); background: var(--ghost-hover); }
.ob:active { background: var(--tag); color: var(--tag-ink); border-color: var(--tag); }
.ob.wide { grid-column: 1 / -1; }
.ob.htmx-request, .obtns.htmx-request .ob { opacity: .6; }
.logged { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 4px 0; }
.logged p:first-child { display: flex; align-items: center; gap: 8px; font-size: 19px; }
.logged .tick { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--ok); color: var(--paper); }
.logged .tick .i { width: 20px; height: 20px; }
.logged .when { color: var(--ink-2); font-size: var(--t-small); font-weight: var(--w-body); }
.logged-next { grid-column: 1; font-size: var(--t-small); color: var(--ink-2); }
.logged form { grid-column: 2; grid-row: 1 / span 2; }
.more-calls { margin-top: 4px; }
.more-calls > summary { cursor: pointer; display: flex; align-items: center; min-height: var(--tap); padding: 0 16px;
  border: 2px solid var(--ink); border-radius: 6px; font-weight: var(--w-bold); font-size: var(--t-ui); background: var(--sheet); }
.more-calls[open] > summary { margin-bottom: 16px; }
.empty-week { padding: 20px 16px; background: var(--sheet); border-radius: 3px; font-size: var(--t-ui); display: grid; gap: 14px; }
.empty-week .btn { margin: 0 8px 8px 0; }
.week-foot { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: var(--t-small);
  color: var(--ink-2); max-width: 46em; }

/* ------------------------------------------------------------------ contractor page */

.c-band h1.c-h1 { font-size: clamp(38px, 5vw + 18px, 72px); line-height: .95; }
.c-sub { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: var(--t-ui); font-weight: var(--w-semi); }
.trend { display: inline-block; padding: 4px 9px 3px; border-radius: 3px; font: var(--w-bold) 13px/1.2 var(--text);
  letter-spacing: var(--track-label); text-transform: uppercase; border: 1.5px solid currentColor; white-space: nowrap; }
.band .trend { color: var(--field-ink); }
.trend.t-busier { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.band .trend.t-busier { background: var(--field-ink); color: var(--field-top); border-color: var(--field-ink); }
.trend.t-quiet, .trend.t-none { color: var(--ink-2); }
.c-actions { margin-top: 18px; display: grid; gap: 10px; }
.c-actions .contact { margin-top: 0; }
.band .btn.call { border-color: var(--field-ink); }
.band .btn.ghost { color: var(--field-ink); }
.cust-btn form { display: grid; gap: 8px; }
.cust-btn .btn { width: 100%; }
.is-cust { display: flex; align-items: center; gap: 8px; font-size: var(--t-ui); }
.is-cust .i { color: var(--ok); }
.band .is-cust .i { color: var(--field-ink); }
.c-grid { display: grid; gap: 16px; padding-top: 18px; padding-bottom: 32px; }
.c-sec { background: var(--sheet); border-radius: 3px; padding: 16px; box-shadow: var(--sheet-shadow), 0 0 0 1px var(--sheet-edge); }
.c-sec h3.label { margin-top: 14px; }
.c-sec > .fine { margin-bottom: 6px; }
.c-src { padding: 0 2px; }
.chart { width: 100%; max-width: 760px; height: auto; margin-top: 4px; overflow: visible; }
.chart .c-bar { fill: var(--bar); }
.chart .c-bar.now { fill: var(--bar-now); }
.chart .c-base { stroke: var(--rule); stroke-width: 2; }
.chart text { font-family: var(--text); fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.chart .c-n { font-size: 24px; font-weight: var(--w-bold); fill: var(--ink); }
.chart .c-n.zero { fill: var(--ink-2); font-weight: var(--w-body); }
.chart .c-m { font-size: 23px; }
.chart .c-m.now { fill: var(--ink); font-weight: var(--w-bold); }
.c-trend { margin-top: 10px; font-size: var(--t-ui); font-weight: var(--w-semi); }
.c-size { margin-top: 12px; font-size: var(--t-ui); font-weight: var(--w-semi); }
.tally { border-top: 2px solid var(--rule); }
.tally li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair);
  font-size: var(--t-ui); line-height: 1.35; }
.tally b { font-variant-numeric: tabular-nums; }
.tally a { font-weight: var(--w-semi); }
.hist li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: var(--t-ui); }
.hist span { color: var(--ink-2); }

/* ------------------------------------------------------------------ map */

.map-band { padding-bottom: 22px; }
.map-grid { display: grid; gap: 16px; padding-top: 14px; padding-bottom: 32px; }
.map-box { min-width: 0; }
.map { height: 56vh; min-height: 320px; border-radius: 3px; background: var(--ground);
  box-shadow: var(--sheet-shadow), 0 0 0 1px var(--hair); z-index: 0; }
.map .leaflet-tile-pane { filter: var(--map-filter); }
.map-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; font-size: var(--t-small); color: var(--ink-2); }
.k { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin-right: 2px; }
.k-store { border-radius: 3px; background: var(--tag); border: 2px solid var(--ink); }
.k-call { background: var(--map-dot); border: 2px solid var(--map-dot-ring); box-shadow: 0 0 0 1px var(--map-dot); }
.k-cust { background: var(--map-cust); border: 2px solid var(--map-dot-ring); box-shadow: 0 0 0 1px var(--ink); }
.k-ring { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px dashed var(--map-approx); vertical-align: -2px; margin-right: 2px; }
.pin-store span { display: block; width: 26px; height: 26px; border-radius: 4px; background: var(--tag); border: 3px solid var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.pin-stop span { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--btn); color: var(--btn-ink); border: 3px solid var(--paper); font: var(--w-display-x) 19px/1 var(--display);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.leaflet-container { font: var(--w-body) 16px/1.4 var(--text); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--sheet); color: var(--ink); }
.leaflet-popup-content { margin: 12px 16px; }
.pop-name { font-weight: var(--w-bold); font-size: 17px; }
.pop-sub { margin: 2px 0 0 !important; font-size: 15px; color: var(--ink-2); }
.leaflet-bar a { width: 40px !important; height: 40px !important; line-height: 40px !important; font-size: 22px !important; }
.leaflet-control-attribution { font-size: 12px; }
.route-box { background: var(--sheet); border-radius: 3px; padding: 16px; box-shadow: var(--sheet-shadow), 0 0 0 1px var(--sheet-edge); }
.route-actions { display: grid; gap: 10px; margin-bottom: 14px; }
.pick { border-top: 2px solid var(--rule); }
.pickrow { display: flex; align-items: flex-start; gap: 14px; padding: 12px 2px; border-bottom: 1px solid var(--hair); cursor: pointer; min-height: 64px; }
.pickrow input { width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.pickrow b { display: block; font-size: var(--t-ui); }
.stop-sub { display: block; font-size: var(--t-small); color: var(--ink-2); line-height: 1.4; }
.sticky-go { position: sticky; bottom: calc(var(--tabbar) + 10px + env(safe-area-inset-bottom, 0px)); z-index: 5;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .45); }
.stops { border-top: 2px solid var(--rule); margin-bottom: 12px; }
.stop { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); min-height: 68px; }
.stop-n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--btn); color: var(--btn-ink); font: var(--w-display-x) 20px/1 var(--display); }
.stop-main { flex: 1; min-width: 0; }
.stop-name { font-weight: var(--w-bold); font-size: var(--t-ui); text-decoration: none; }

/* ------------------------------------------------------------------ customers */

.page-grid { display: grid; gap: 22px; padding-top: 18px; padding-bottom: 32px; }
.col-main > .sec-h, .col-side > .sec-h { margin-bottom: 10px; }
.custs { background: var(--sheet); border-radius: 3px; box-shadow: var(--sheet-shadow), 0 0 0 1px var(--sheet-edge); padding: 4px 16px; }
.cust { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); min-height: 76px; }
.cust:last-child { border-bottom: 0; }
.cust-main { flex: 1; min-width: 0; }
.cust-name { font-weight: var(--w-bold); font-size: 19px; text-decoration: none; }
a.cust-name:hover { text-decoration: underline; }
.cust-line { margin-top: 4px; font-size: var(--t-small); color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.review-box { background: var(--sheet); border-left: 5px solid var(--tag); padding: 14px 16px; margin-bottom: 14px; border-radius: 0 3px 3px 0; }

/* ------------------------------------------------------------------ account */

.acct-grid { display: grid; gap: 16px; padding-top: 18px; padding-bottom: 32px; }
.acct-sec { background: var(--sheet); border-radius: 3px; padding: 18px 16px; box-shadow: var(--sheet-shadow), 0 0 0 1px var(--sheet-edge);
  display: grid; gap: 12px; align-content: start; }
.acct-sec .sec-h { margin-bottom: 0; }
.acct-sec > .btn, .acct-sec > form > .btn { justify-self: start; }
.kv { border-top: 2px solid var(--rule); }
.kv div { display: grid; grid-template-columns: minmax(0, 9em) 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.kv dt { font: var(--w-bold) var(--t-label)/1.6 var(--text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-2); }
.kv dd { margin: 0; font-size: var(--t-ui); font-weight: var(--w-semi); }
.plans { display: grid; gap: 14px; }
.plan { border: 2px solid var(--hair); border-radius: 6px; padding: 16px; display: grid; gap: 10px; align-content: start; }
.plan.current { border-color: var(--ink); box-shadow: inset 0 6px 0 var(--tag); }
.plan-name { font: var(--w-display) 26px/1 var(--display); }
.plan-price .amt { font: var(--w-display-x) 52px/1 var(--display); font-variant-numeric: tabular-nums; }
.plan-price .per { margin-left: 4px; color: var(--ink-2); font-weight: var(--w-semi); }
.plan-for { font-weight: var(--w-semi); }
.incl { display: grid; gap: 6px; }
.incl li { display: flex; gap: 8px; font-size: var(--t-meta); line-height: 1.4; }
.incl .i { width: 18px; height: 18px; margin-top: 3px; color: var(--ok); }
.acct-sec form + form { margin-top: -4px; }

/* ------------------------------------------------------------------ wider screens */

@media (min-width: 560px) {
  .contact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .obtns { grid-template-columns: repeat(3, 1fr); }
  .ob.wide { grid-column: auto / span 1; }
  .c-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .form-sheet { padding: 28px 28px 32px; }
}

@media (min-width: 900px) {
  :root { --t-body: 19px; --t-name: 34px; --t-h2: 30px; }
  .wrap { padding: 0 28px; }
  .topnav { display: flex; }
  .tabbar { display: none; }
  body.has-tabs { padding-bottom: 0; }
  .masthead .bar { min-height: 68px; }
  .band { padding: 30px 0 40px; }
  .card { padding: 24px 26px 16px; }
  .week-wrap { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 22px 28px; padding-top: 26px; }
  .week-wrap > .welcome, .week-wrap > .week-foot { grid-column: 1 / -1; }
  .week-wrap > .strip { grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 18px; }
  .week-wrap:has(> .welcome) > .strip { grid-row: 2 / span 3; }
  .week-wrap > .cards, .week-wrap > .more-calls, .week-wrap > .empty-week { grid-column: 1; }
  .obtns { display: flex; flex-wrap: wrap; }
  .ob { flex: 1 1 110px; padding: 6px 14px; }
  .ob.wide { flex: 1.5 1 170px; }
  .contact { grid-template-columns: repeat(auto-fit, minmax(240px, max-content)); }
  .contact .btn { width: auto; }
  .c-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; grid-auto-flow: row dense; align-items: start; }
  .c-grid > .c-chart { grid-column: 1 / span 2; grid-row: span 2; }
  .c-grid > .c-recent { grid-column: span 2; }
  .c-wide { grid-column: 1 / -1; }
  .c-actions { display: flex; flex-wrap: wrap; gap: 12px; }
  .c-actions .contact .btn, .cust-btn .btn { width: auto; }
  .cust-btn form { display: flex; align-items: center; gap: 14px; }
  .map-grid { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
  .map { height: calc(100vh - 240px); min-height: 480px; }
  .route-box { max-height: calc(100vh - 160px); overflow: auto; position: sticky; top: 18px; }
  .sticky-go { bottom: 0; }
  .page-grid { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; gap: 28px; }
  .acct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .acct-wide, .acct-grid > .saved { grid-column: 1 / -1; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn.big { width: auto; min-width: 280px; }
  .form-sheet .btn.big, .signin-band + .sheet-wrap .btn.big { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .card, .logged { transition: opacity .2s ease; }
  .htmx-added .logged { animation: pop .3s ease both; }
  @keyframes pop { from { transform: scale(.97); opacity: .4; } to { transform: none; opacity: 1; } }
}

@media print {
  .tabbar, .topnav, .outcome, .contact, .more-link { display: none !important; }
  body { background: #fff; }
}
.quiet { color: var(--ink-2); }
