/* WalkRecap web — design system.
 *
 * Grounded in the locked Field kit (brand/README.md). Nothing here invents a
 * colour: every token below is one of David's, and the rules that come with
 * them are enforced by comment and by usage.
 *
 *   Leaf   is CAPTURE ONLY — camera and evidence affordances, nowhere else.
 *   Danger is ERROR TEXT ONLY — never a background, never a hero.
 *   Amber  is flags, exceptions and "needs attention".
 *   Moss   is the primary action colour.
 *
 * The ground is warm ivory drafting paper: David's approved
 * blueprint-paper-texture-v1, with faint pencil linework in the corners and a
 * broad quiet centre, over a CSS grid so faint it reads as tooth rather than
 * pattern. Content sits in the quiet middle; nothing important crosses the
 * drawing.
 *
 * PAPER IS THE DEFAULT IN EVERY THEME. The OS's dark preference is deliberately
 * NOT honoured: an auto-dark WalkRecap reads as a generic SaaS dashboard, which
 * is the one thing this product must not look like. Dark is still available,
 * but only when someone explicitly asks for it in Profile.
 */

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: light;
  /* Field kit, verbatim */
  --forest: #223c25;
  --forest-ground: #1c3a2b;
  --bone: #ebe4d4;
  --paper: #fbfaf8;
  --straw: #efe8d6;
  --leaf: #3d8b57;
  --moss: #386b4c;
  --mist: #e6ede8;
  --ink: #1a1f1c;
  --muted: #616b66;
  --line: #c7d1c9;
  --danger: #a8382e;
  --warning: #c9893a;
  /* Recording hero only. Danger stays error-text-only: a red hero that is on
     for ten minutes makes a red error mean nothing. Locked 16 Aug 2026. */
  --record: #be3a2b;
  --record-deep: #8e2a20;

  /* Semantic surface roles (paper). No pure white anywhere: a white card on
     ivory paper is the tell that gives away a generic dashboard. */
  --bg: var(--paper);
  --surface: #fdfbf6;
  --surface-sunk: var(--straw);
  --surface-raised: #fffefb;
  --text: var(--ink);
  --text-dim: var(--muted);
  --rule: var(--line);
  --head: var(--forest);
  --accent: var(--moss);
  --on-accent: #ffffff;

  /* The drafting grid, under the texture. Half its former strength — the
     texture now carries the architectural feeling and two patterns fight. */
  --grid-fine: rgba(34, 60, 37, 0.022);
  --grid-major: rgba(34, 60, 37, 0.038);

  /* How much of the approved texture shows through. Low on purpose: it should
     read as paper stock, not as wallpaper. */
  --texture-strength: 0.55;

  --shadow-card: 0 1px 2px rgba(26, 31, 28, 0.05), 0 8px 24px -18px rgba(26, 31, 28, 0.45);
  --shadow-lift: 0 2px 6px rgba(26, 31, 28, 0.08), 0 18px 40px -24px rgba(26, 31, 28, 0.5);

  /* Type — the product's own stacks. On an iPhone these are the real faces. */
  --display: "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* One spacing scale. Everything lays out with gap, not stacked margins. */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  /* Field controls are sized for a thumb in a glove, not a mouse. */
  --tap: 56px;
  --tap-sm: 48px;

  --shell-max: 1240px;
}

/* Dark is opt-in only — see the note at the top of this file. It is also warmer
   than it was: forest-toned, never near-black. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16201a;
  --surface: #1d2a21;
  --surface-sunk: #24332a;
  --surface-raised: #223026;
  --text: var(--bone);
  --text-dim: #a3b4a8;
  --rule: #35462f;
  --head: #d8e5d9;
  --accent: #4e8c66;
  --on-accent: #0f150f;
  /* DANGER HAS TO BE LIFTED IN THE DARK.
     The Field kit's #a8382e is a paper colour: on ivory it is a strong,
     serious red. On these forest-toned surfaces it measures 2.07–2.60 against
     the four backgrounds it can land on — every error message in the app,
     under the 4.5 floor, unreadable to anyone whose eyes are not perfect and
     hard work for everyone else.

     This is the same treatment --accent already gets (#386b4c → #4e8c66): the
     same colour, given the value that keeps its meaning on a dark ground. It
     is not a new brand colour and Danger stays error-text-only.

     Measured: 6.34 on --bg, 5.66 on --surface, 5.24 on --surface-raised,
     5.05 on --surface-sunk. */
  --danger: #e8837a;
  --grid-fine: rgba(235, 228, 212, 0.03);
  --grid-major: rgba(235, 228, 212, 0.05);
  --texture-strength: 0.14;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -18px rgba(0, 0, 0, 0.8);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.45), 0 18px 40px -24px rgba(0, 0, 0, 0.85);
}

/* ----------------------------------------------------------------- reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  /* A faint drafting grid only. The paper texture itself is a separate fixed
     layer below, so it can carry its own opacity without tinting the content. */
  background-image:
    repeating-linear-gradient(0deg, transparent 0 127px, var(--grid-major) 127px 128px),
    repeating-linear-gradient(90deg, transparent 0 127px, var(--grid-major) 127px 128px),
    repeating-linear-gradient(0deg, transparent 0 31px, var(--grid-fine) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, var(--grid-fine) 31px 32px);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
/* The approved drafting paper. A fixed layer rather than a body background so
   its opacity is independent of the grid, and so a screen that wants a quieter
   ground (the walk) can turn it down without touching anything else.
   The small derivative is served to phones: 3.4KB against 19KB, and first paint
   on a phone is the one that has to be quick. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("../assets/blueprint-paper-texture-v1-sm.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--texture-strength);
}
@media (min-width: 760px) {
  body::before { background-image: url("../assets/blueprint-paper-texture-v1.webp"); }
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ------------------------------------------------------------ typography */
h1, h2, h3 { font-family: var(--display); color: var(--head); margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); line-height: 1.1; letter-spacing: -0.012em; }
h2 { font-size: clamp(1.25rem, 4vw, 1.6rem); line-height: 1.2; }
h3 { font-size: 1.05rem; line-height: 1.25; }
p { margin: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.dim { color: var(--text-dim); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.err { color: var(--danger); font-size: 0.9rem; }  /* Danger: error text only. */

/* ------------------------------------------------------------- utilities */
.stack { display: flex; flex-direction: column; }
.stack-1 { gap: var(--s1); } .stack-2 { gap: var(--s2); } .stack-3 { gap: var(--s3); }
.stack-4 { gap: var(--s4); } .stack-5 { gap: var(--s5); } .stack-6 { gap: var(--s6); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.inline { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.grow { flex: 1; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hide { display: none !important; }

/* -------------------------------------------------------------- controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: var(--tap-sm);
  padding: 0 var(--s5);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.06s ease, filter 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn-block { width: 100%; }
.btn-field { min-height: var(--tap); font-size: 1.05rem; border-radius: var(--r-md); }
.btn-quiet {
  background: transparent;
  color: var(--text);
  border-color: var(--rule);
}
.btn-quiet:hover { background: var(--surface-sunk); filter: none; }
.btn-ghost { background: transparent; color: var(--text-dim); border-color: transparent; padding: 0 var(--s3); }
.btn-ghost:hover { color: var(--text); filter: none; }
.btn-sm { min-height: 38px; padding: 0 var(--s3); font-size: 0.88rem; }

/* Leaf lives here and nowhere else: capture affordances. */
.btn-capture {
  background: var(--leaf);
  color: #ffffff;
  border-color: var(--leaf);
}

.field { display: flex; flex-direction: column; gap: var(--s2); }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text-dim); }
.input {
  min-height: var(--tap);
  padding: 0 var(--s4);
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  width: 100%;
  /* Without this, `width: 100%` plus horizontal padding makes the box wider
     than its container. Every other input got away with it; the date one did
     not, because of everything below. */
  box-sizing: border-box;
}

/* DATE INPUTS ON iOS SAFARI DO NOT BEHAVE LIKE THE OTHERS.
   Safari gives <input type="date"> an intrinsic width from its own date
   widget and CENTRES the text inside it, and that intrinsic width acts as a
   floor that `width: 100%` cannot get under. On David's iPhone the Date field
   pushed past the right edge of the card while Address, Client and Agent sat
   neatly inside it — one field out of four, which is the tell.

   `min-width: 0` releases the floor; `appearance: none` stops Safari drawing
   its own box; `text-align: left` puts the value where the eye already is,
   under the label and in line with every other answer on the screen. */
.input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  max-width: 100%;
  text-align: left;
  /* Safari also vertically centres badly once appearance is removed. */
  display: block;
  line-height: var(--tap);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
}
/* The little calendar glyph Safari adds, kept but nudged to the far side so it
   does not sit in the middle of the field. */
.input[type="date"]::-webkit-calendar-picker-indicator {
  margin-left: auto;
}
.input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.input:focus { border-color: var(--accent); }

/* Password strength — the iOS app's checklist, in a browser.
   PasswordStrengthView.swift: a straw card, a segment meter, then a row per
   rule with a circle that fills moss and a tick that snaps in. Moss, not Leaf:
   Leaf is capture-only and a password field is not capture.

   The tick and the strikethrough carry the message as well as the colour — a
   meter that only goes green is unreadable to a good number of the people
   using it. Danger stays error-text-only, so an unmet rule is quiet grey and
   says what it wants rather than shouting red at somebody still typing. */
/* `display: flex` on a class beats the browser's own `[hidden] { display: none }`,
   which is a one-line rule that silently un-hides everything the JS thinks it
   has hidden. Here it meant four grey unchecked rules sitting under an empty
   password field, reading as failure before anybody had typed a character. */
/* -------------------------------------------------------------- report */
/* A document, not a screen. Long measure, generous leading, and a print
   stylesheet that survives ⌘P — because "print to PDF" is how this leaves the
   building until the official AcroForm fill exists. */

.reportview { max-width: 760px; gap: var(--s5); }
.report-comment {
  width: 100%; min-height: 96px; padding: var(--s3);
  color: var(--text); background: var(--surface-raised);
  border: 1px solid var(--text-dim); border-radius: var(--r-sm);
  font: inherit; line-height: 1.5; resize: vertical;
}
.report-comment::placeholder { color: var(--text-dim); opacity: 1; }
.report-comment:focus-visible { outline: 3px solid var(--head); outline-offset: 3px; }

.rep-controls { align-items: center; }

/* DRAFT. Printed as well as shown: a stray uncertified copy on a desk is where
   the damage happens, and a watermark that only exists on screen is decoration. */
.rep-draft {
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  padding: var(--s3) var(--s4);
  border: 1.5px dashed var(--warning);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--warning) 8%, transparent);
  font-size: 0.85rem; line-height: 1.5; color: var(--text);
}
.rep-draft-word {
  font-family: var(--mono);
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.22em;
  color: var(--warning);
}

.rep-head { border-bottom: 2px solid var(--head); padding-bottom: var(--s4); }
.rep-head h1 { margin: var(--s1) 0 var(--s4); font-size: 1.9rem; line-height: 1.15; }
.rep-meta {
  display: grid; grid-template-columns: max-content 1fr; gap: 4px var(--s4);
  margin: 0; font-size: 0.86rem;
}
.rep-meta dt { color: var(--text-dim); }
.rep-meta dd { margin: 0; color: var(--text); font-weight: 600; }

.rep-band { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
@media (min-width: 560px) { .rep-band { grid-template-columns: repeat(5, 1fr); } }
.rep-stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--s3);
  background: var(--surface-sunk); border-radius: var(--r-md);
}
.rep-stat b { font-size: 1.3rem; color: var(--head); }
.rep-stat span { font-size: 0.72rem; letter-spacing: 0.04em; color: var(--text-dim); }
.rep-stat.is-warn b { color: var(--warning); }

.rep-blockers, .rep-needs, .rep-open {
  padding: var(--s4);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--surface);
}
.rep-needs { border-color: var(--warning); }
.rep-blockers h3, .rep-needs h3, .rep-open h3 { margin: 0 0 var(--s2); font-size: 0.98rem; }
.rep-blockers ul, .rep-needs ul, .rep-open ul { margin: var(--s2) 0 0; padding-left: 1.1rem; font-size: 0.88rem; line-height: 1.6; }
.rep-req {
  margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  font-size: 0.66rem; letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning);
}

.rep-section { break-inside: auto; }
.rep-section h2 {
  margin: 0 0 var(--s3);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--rule);
  font-size: 1.15rem;
}
.rep-answers { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
@media (min-width: 560px) { .rep-answers { grid-template-columns: 15rem 1fr; } }
.rep-answers dt {
  padding: var(--s2) 0; font-size: 0.86rem; color: var(--text-dim);
  border-top: 1px solid var(--rule);
}
.rep-answers dd {
  margin: 0; padding: var(--s2) 0; font-size: 0.92rem; color: var(--text);
}
@media (min-width: 560px) { .rep-answers dd { border-top: 1px solid var(--rule); } }
.rep-judge, .rep-unconfirmed, .rep-photos {
  margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  font-size: 0.66rem; letter-spacing: 0.03em;
}
.rep-judge { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.rep-unconfirmed { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.rep-photos { background: var(--surface-sunk); color: var(--text-dim); }

.rep-cert {
  padding: var(--s5);
  border: 2px solid var(--head);
  border-radius: var(--r-lg);
  background: var(--surface);
  display: flex; flex-direction: column; gap: var(--s3);
}
.rep-cert.is-signed { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.rep-cert h2 { margin: 0; font-size: 1.15rem; }
.rep-statement {
  margin: 0; padding: var(--s3) var(--s4);
  border-left: 3px solid var(--accent);
  background: var(--surface-sunk);
  font-size: 0.92rem; line-height: 1.6;
}
.rep-contract { font-size: 0.78rem; color: var(--text-dim); line-height: 1.6; }

/* ⌘P. The document prints; the app does not. */
@media print {
  .topbar, .tabbar, .rail, .stalebar, .rep-controls, .rep-cert .btn, .rep-cert .field { display: none !important; }
  body { background: #fff !important; }
  .reportview { max-width: none; padding: 0; gap: 18pt; }
  .rep-section, .rep-cert, .rep-needs, .rep-blockers, .rep-open { break-inside: avoid; }
  .rep-head { break-after: avoid; }
  /* DRAFT survives the printer. This is the whole point of printing it. */
  .rep-draft { border-color: #000; background: transparent; }
  .rep-draft-word { color: #000; }
  a[href]::after { content: ''; }
}

/* ------------------------------------------------------------- new job */
/* Matched to ios/WalkRecap/Views/NewJobView.swift: labelled groups, each a
   straw card of rows divided by hairlines, with the label ABOVE the value
   inside the row rather than beside a boxed input. The focused row warms.
   Nothing here invents a colour. */

.newjob { gap: var(--s5); }

.nj-group { display: flex; flex-direction: column; }
.nj-grouplabel {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  padding: 0 0 var(--s2) 12px;
}
.nj-card {
  background: var(--surface-sunk);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.nj-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 16px;
  min-height: 62px;
  justify-content: center;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  transition: background-color .18s ease;
}
.nj-card > .nj-row:last-child,
.nj-split > .nj-row { border-bottom: 0; }
/* The warm focus wash from the phone. */
.nj-row.is-focused { background: color-mix(in srgb, var(--straw) 60%, var(--surface-raised)); }

.nj-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-dim);
}
.nj-input {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 1.02rem;
  color: var(--text);
  width: 100%;
  min-width: 0;
}
.nj-input:focus { outline: none; }
.nj-input::placeholder { color: color-mix(in srgb, var(--text-dim) 70%, transparent); }

/* The "never auto-filled" note, on a moss wash, exactly as on the phone. */
.nj-lock {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-bottom: 1px solid var(--rule);
}
.nj-lock > svg { flex: none; margin-top: 2px; color: var(--accent); }
.nj-lock p { margin: 0; font-size: 0.78rem; line-height: 1.45; color: var(--head); }

/* City / State / ZIP on one line, split by vertical hairlines. */
.nj-split { display: grid; grid-template-columns: 1fr 76px 104px; }
.nj-split > .nj-row + .nj-row { border-left: 1px solid var(--rule); }

/* WHEN — a taller row that reads like a summary, with the controls under it. */
.nj-when { flex-direction: row; align-items: center; gap: 12px; }
.nj-when > svg { flex: none; color: var(--accent); }
.nj-when-value { font-size: 1.02rem; color: var(--text); }
.nj-when-inputs { display: flex; gap: var(--s2); margin-top: 6px; flex-wrap: wrap; }
.nj-when-input {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm, 8px);
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  padding: 6px 10px;
  text-align: left;
}
.nj-when-input::-webkit-date-and-time-value { text-align: left; }

/* The inspector: information, not a control. Recessed, no chevron. */
.nj-readonly {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  background: color-mix(in srgb, var(--ink) 4.5%, transparent);
  cursor: default;
}
.nj-readonly > svg { flex: none; color: var(--text-dim); }
.nj-readonly-name { font-size: 1.02rem; font-weight: 600; color: var(--text); }

/* REPORT TYPE — two cards you swipe, snapped, with dots underneath. */
.nj-deck {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px;
  scrollbar-width: none;
}
.nj-deck::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .nj-deck { grid-auto-columns: 1fr; overflow-x: visible; } }

.nj-typecard {
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
  padding: var(--s4);
  min-height: 176px;
  background: var(--surface-raised);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-lg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.nj-typecard > svg { color: var(--text-dim); }
.nj-typecard h3 { margin: 0; font-size: 1.05rem; color: var(--head); }
.nj-typecard p { margin: 0; font-size: 0.82rem; line-height: 1.45; color: var(--text-dim); }
.nj-typecard.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface-raised)); }
.nj-typecard.on > svg { color: var(--accent); }
.nj-tick {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
}
.nj-soon {
  margin-top: auto;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--warning);
}

.nj-dots { display: flex; justify-content: center; gap: 7px; padding-top: 12px; }
.nj-dots > i {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--rule);
  transition: width .25s cubic-bezier(.34,1.56,.64,1), background-color .25s ease;
}
.nj-dots > i.on { width: 20px; background: var(--accent); }

.nj-both {
  margin-top: 18px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  font: inherit; font-size: 1rem; font-weight: 600;
  background: var(--bg);
  color: var(--head);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-md);
  cursor: pointer;
}
.nj-both.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.nj-caption { margin: 9px 0 0; text-align: center; font-size: 0.75rem; color: var(--text-dim); }

@media (prefers-reduced-motion: reduce) {
  .nj-row, .nj-dots > i, .nj-typecard { transition: none; }
}

/* The read-back progress bar.
   Two states, and the difference between them is honest: a filled bar when we
   genuinely know how much has been sent, and a travelling sweep when we do not
   know how long the server will take. A bar that creeps to 90% and stops is the
   universal sign that nobody is measuring anything. */
/* "You are running an old copy" — sits above the tab bar, out of the way, and
   never reloads on its own. A walk in progress is not something to interrupt
   because a deploy landed. */
.stalebar {
  position: fixed;
  left: var(--s4);
  right: var(--s4);
  bottom: calc(64px + env(safe-area-inset-bottom, 0px) + var(--s3));
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lift);
  font-size: 0.86rem;
  color: var(--text);
}
.stalebar > span { flex: 1 1 auto; min-width: 12ch; }
@media (min-width: 900px) {
  .stalebar { left: auto; right: var(--s5); bottom: var(--s5); max-width: 420px; }
}

.uploadbar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.uploadbar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .25s ease;
}
.uploadbar-waiting > i {
  width: 34%;
  animation: wr-sweep 1.5s ease-in-out infinite;
}
@keyframes wr-sweep {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}
@media (prefers-reduced-motion: reduce) {
  .uploadbar-waiting > i { animation: none; width: 100%; opacity: .45; }
  .uploadbar > i { transition: none; }
}

.pwmeter[hidden] { display: none; }
.pwmeter {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: 14px;
  background: color-mix(in srgb, var(--surface-sunk) 70%, transparent);
  border-radius: var(--r-md);
}
.pwbars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.pwbars > i {
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rule) 55%, transparent);
  transition: background-color .4s ease;
}
/* Each segment lands a beat after the one before it, as on the phone. */
.pwbars > i:nth-child(2) { transition-delay: .04s; }
.pwbars > i:nth-child(3) { transition-delay: .08s; }
.pwbars > i:nth-child(4) { transition-delay: .12s; }
.pwbars > i.on { background: var(--muted); }
.pwmeter[data-score="3"] .pwbars > i.on { background: color-mix(in srgb, var(--accent) 65%, transparent); }
.pwmeter[data-score="4"] .pwbars > i.on { background: var(--accent); }
/* Only a fully-passing password earns the glow. A partial one must not look
   like success. */
.pwmeter.done .pwbars { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 34%, transparent)); }

.pwrules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pwrules > li { display: flex; align-items: center; gap: 10px; }

.pwtick {
  flex: none;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  display: grid;
  place-items: center;
  color: var(--paper);
  transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.pwtick > svg { width: 12px; height: 12px; opacity: 0; transform: scale(.5); transition: opacity .2s ease, transform .34s cubic-bezier(.34, 1.56, .64, 1); }
.pwrules > li.on .pwtick {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 5px color-mix(in srgb, var(--accent) 45%, transparent);
}
.pwrules > li.on .pwtick > svg { opacity: 1; transform: scale(1); }

.pwrule { font-size: 0.845rem; color: var(--text); transition: color .28s ease; }
.pwrules > li.on .pwrule { color: var(--text-dim); text-decoration: line-through; text-decoration-color: var(--text-dim); }

/* Reserved for the guards — an obvious password, or one built from the email.
   Empty most of the time, so it takes no room until it has something to say. */
.pwproblem { margin: 0; font-size: 0.78rem; color: var(--text-dim); }
.pwproblem:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .pwbars > i, .pwtick, .pwtick > svg, .pwrule { transition: none; }
}

/* ---------------------------------------------------------------- pieces */
.card {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.card-flat { box-shadow: none; }
.panel {
  background: var(--surface);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.panel-head {
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--rule);
  background: var(--surface-sunk);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

/* A tappable row where the WHOLE ROW is the target, not a control inside it. */
.rowbtn {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: var(--tap);
  padding: var(--s3) var(--s4);
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  text-align: left;
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.rowbtn:hover { border-color: var(--accent); }
.rowbtn[aria-pressed="true"] {
  border-color: var(--forest);
  border-width: 2px;
  background: var(--surface-sunk);
  font-weight: 600;
}
.rowbtn .tick { color: var(--moss); margin-left: auto; display: none; }
.rowbtn[aria-pressed="true"] .tick { display: block; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule);
  color: var(--text-dim);
  background: var(--surface);
  white-space: nowrap;
}
.chip-ok { border-color: var(--moss); color: var(--moss); }
.chip-warn { border-color: var(--warning); color: var(--warning); }
.chip-capture { border-color: var(--leaf); color: var(--leaf); }
.chip-sample {
  border-style: dashed;
  border-color: var(--warning);
  color: var(--warning);
}

.meter { height: 6px; border-radius: 3px; background: var(--surface-sunk); overflow: hidden; border: 1px solid var(--rule); }
.meter > i { display: block; height: 100%; background: var(--moss); transition: width 0.4s ease; }

.ring { --pct: 0; width: 40px; height: 40px; flex: none; position: relative; }
.ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--moss) calc(var(--pct) * 1%), var(--surface-sunk) 0);
  -webkit-mask: radial-gradient(closest-side, transparent 66%, #000 67%);
  mask: radial-gradient(closest-side, transparent 66%, #000 67%);
}
.ring > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  letter-spacing: -0.02em;
}

.banner {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px dashed var(--warning);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--warning) 8%, var(--surface));
  font-size: 0.88rem;
}
.banner b { color: var(--head); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  text-align: center;
  padding: var(--s7) var(--s4);
  color: var(--text-dim);
}
.empty h2 { color: var(--head); }

/* ------------------------------------------------------------- app shell */
#app { min-height: 100%; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar .lockup { height: 20px; width: auto; }
.wordmark { font-family: var(--display); font-size: 1.05rem; color: var(--head); letter-spacing: 0.01em; }

.view { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: var(--s5) var(--s4) 104px; display: flex; flex-direction: column; gap: var(--s5); }
.view-auth { max-width: 440px; justify-content: center; gap: var(--s6); padding-top: var(--s7); }

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--rule);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tabbar a {
  min-height: var(--tap);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}
.tabbar a[aria-current="page"] { color: var(--head); font-weight: 600; }
.tabbar svg { width: 22px; height: 22px; }

/* Desktop rail is hidden until there is room for it. */
.rail { display: none; }

/* ------------------------------------------------------------ field mode */
/* The walk runs on the same drafting paper as the rest of the app. Forest is a
   restrained header and action colour here, not a ground — a dark full-screen
   flow reads as a dashboard, and this is a paper field tool.
   What buys outdoor readability is contrast and size, and ink on ivory beats
   bone on forest for both: it is what a printed field form has always used. */
.fieldmode {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* Quieter paper here: the walk is work, and the drawing should not compete
     with the question. */
  --texture-strength: 0.3;
}
.fieldmode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--bg) url("../assets/blueprint-paper-texture-v1-sm.webp") center / cover no-repeat;
  opacity: var(--texture-strength);
}

/* The one forest surface in the walk: the header. It says "you are in the
   field" and then gets out of the way. */
.fieldmode .fm-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--forest);
  color: var(--bone);
  border-bottom: 1px solid rgba(26, 31, 28, 0.18);
  padding: var(--s3) var(--s4) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  box-shadow: 0 1px 12px -6px rgba(26, 31, 28, 0.55);
}
.fieldmode .fm-head .dim { color: #b9cabe; }
.fieldmode .fm-head .btn-ghost { color: var(--bone); }
.fieldmode .fm-head .chip { background: transparent; border-color: rgba(235, 228, 212, 0.38); color: #cfdcd3; }
.fieldmode .fm-head .chip-sample { border-color: #e6bb84; color: #e6bb84; }
.fieldmode .fm-head .meter { background: rgba(0, 0, 0, 0.28); border-color: rgba(235, 228, 212, 0.2); }
.fieldmode .fm-head .meter > i { background: var(--bone); }
.fieldmode .fm-head :focus-visible { outline-color: var(--bone); }

/* Breathing room. One decision on screen at a time, with air around it. */
.fieldmode .fm-body {
  padding: var(--s6) var(--s5) 148px;
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}
.fieldmode .fm-body > h2 {
  font-size: clamp(1.5rem, 6.2vw, 2rem);
  line-height: 1.16;
  margin-bottom: var(--s1);
}

/* Answer rows: taller, quieter, and unmistakable once chosen. */
.fieldmode .rowbtn {
  min-height: 72px;
  padding: var(--s4) var(--s5);
  font-size: 1.08rem;
  background: var(--surface-raised);
  border-color: var(--rule);
  box-shadow: var(--shadow-card);
}
.fieldmode .rowbtn:hover { border-color: var(--moss); }
.fieldmode .rowbtn[aria-pressed="true"] {
  background: var(--surface-sunk);
  border-color: var(--forest);
  border-width: 2px;
  padding: calc(var(--s4) - 1px) calc(var(--s5) - 1px);
}
.fieldmode .rowbtn .tick { color: var(--forest); }
.fieldmode .stack-2 { gap: var(--s3); }

.fm-actions {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  box-shadow: 0 -10px 20px -18px rgba(26, 31, 28, 0.5);
  padding: var(--s4) var(--s5) calc(var(--s4) + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: var(--s3);
  max-width: 600px;
  width: 100%;
  margin-inline: auto;
}
.fm-actions .btn { flex: 1; min-height: 60px; }

/* Evidence. Leaf lives here and only here. */
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s3); }
.evidence-tile {
  aspect-ratio: 1;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--line);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  text-align: center;
  padding: var(--s2);
  transition: border-color 0.12s ease, color 0.12s ease;
}
button.evidence-tile:hover { border-color: var(--leaf); color: var(--leaf); }
.evidence-tile.filled {
  border-style: solid;
  border-color: var(--rule);
  background: var(--surface-sunk);
  color: var(--muted);
}
/* A captured photo fills its tile; the × sits in the corner so removing one is
   possible without a second screen. */
.evidence-tile.has-photo { position: relative; overflow: hidden; padding: 0; }
.evidence-tile.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.evidence-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(26, 31, 28, 0.66);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

/* --------------------------------------------------------- loading state */
.loading {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s5);
  padding: var(--s6) var(--s5) var(--s7);
  overflow: hidden;
}
.loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../assets/blueprint-paper-texture-v1-sm.webp") center / cover no-repeat;
  opacity: 0.9;
}
@media (min-width: 760px) {
  .loading::before { background-image: url("../assets/blueprint-paper-texture-v1.webp"); }
}

/* WALKRECAP —•— INSPECTION MODE */
.launch-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--forest);
  opacity: 0;
  animation: fade-up 0.7s ease forwards;
}
.launch-rule {
  display: block;
  width: 46px;
  height: 1px;
  background: var(--forest);
  position: relative;
  opacity: 0.55;
}
.launch-rule::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--forest);
}

.launch-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s5);
}

/* The deboss. Three stacked copies of the same masked shape: a light edge
   pushed down, a dark edge pushed up, and the paper colour on top. That is
   what reads as pressed into the sheet rather than printed on it. */
.launch-deboss {
  --mark: url("../assets/wr-mark.png");
  position: relative;
  width: clamp(150px, 44vw, 210px);
  aspect-ratio: 212 / 100;
  opacity: 0;
  animation: fade-up 0.9s ease 0.1s forwards;
}
.launch-deboss::before,
.launch-deboss::after,
.launch-deboss .launch-deboss-face {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}
.launch-deboss::before {                    /* light edge, pushed down */
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(1.5px);
}
.launch-deboss::after {                     /* dark edge, pushed up */
  background: rgba(34, 60, 37, 0.28);
  transform: translateY(-1.5px);
}
.launch-deboss .launch-deboss-face {        /* the paper face, on top of both */
  background: #efeae0;
  z-index: 1;
}

.launch-name {
  font-family: var(--display);
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--forest);
  opacity: 0;
  animation: fade-up 0.9s ease 0.22s forwards;
}
.launch-tagline {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1rem, 4.2vw, 1.2rem);
  color: var(--muted);
  opacity: 0;
  animation: fade-up 0.9s ease 0.34s forwards;
}

/* Reserved for the house drawing. Collapses cleanly while it is absent. */
.launch-art {
  flex: 1;
  min-height: 0;
  width: min(560px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.launch-art img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0;
  animation: fade-up 1.2s ease 0.5s forwards;
}
/* The house drawing itself (desk and iPad). Multiply hides the clip's own
   paper; the soft mask hides its rectangle. Plays once; holds the last frame. */
.launch-art video {
  max-height: 100%;
  width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  /* Its paper is a shade greyer than ours; lift it to white so multiply leaves only ink. */
  filter: brightness(1.07) contrast(1.1);
  opacity: 0;
  animation: fade-up 0.9s ease 0.15s forwards;
  -webkit-mask-image: radial-gradient(ellipse 72% 86% at 50% 55%, #000 40%, transparent 96%);
  mask-image: radial-gradient(ellipse 72% 86% at 50% 55%, #000 40%, transparent 96%);
}
@media (min-width: 760px) { .launch-art { width: min(900px, 100%); } }

.launch-progress {
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  opacity: 0;
  animation: fade-up 0.9s ease 0.5s forwards;
}
.launch-progress .eyebrow { color: var(--forest); font-family: var(--sans); font-weight: 600; letter-spacing: 0.16em; }
.launch-progress .num { color: var(--forest); font-size: 0.95rem; }
.loading .meter { height: 4px; border: 0; border-radius: 2px; background: rgba(34, 60, 37, 0.14); }
.loading .meter > i { background: var(--forest); width: 0; transition: width 0.5s ease; }
.launch-caption {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--muted);
}

.launch-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s2);
  margin-top: var(--s3);
}
.launch-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  color: var(--muted);
}
/* The connecting hairline runs between the dots, not through the labels. */
.launch-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 27px;
  left: 60%;
  width: 80%;
  height: 1px;
  background: rgba(34, 60, 37, 0.2);
}
.launch-step .num { font-size: 0.7rem; letter-spacing: 0.08em; }
.launch-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(34, 60, 37, 0.35);
  background: transparent;
  z-index: 1;
}
.launch-step-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.launch-step.is-done .launch-dot { background: rgba(34, 60, 37, 0.35); border-color: transparent; }
.launch-step.is-active { color: var(--forest); }
.launch-step.is-active .launch-dot { background: var(--forest); border-color: var(--forest); }

@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-sunk) 25%, var(--surface) 37%, var(--surface-sunk) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ------------------------------------------------------------ job pieces */
.joblist { display: flex; flex-direction: column; gap: var(--s3); }
.jobcard {
  display: flex;
  align-items: center;
  gap: var(--s4);
  width: 100%;
  text-align: left;
  padding: var(--s5) var(--s5);
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  color: var(--text);
  transition: transform 0.1s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}
.jobcard:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); border-color: var(--accent); }
.jobcard .addr { font-family: var(--display); font-size: 1.12rem; color: var(--head); line-height: 1.2; }

.statusdot { width: 8px; height: 8px; border-radius: 50%; flex: none; transition: background-color 0.22s ease; }
/* Phase 20: state changes animate, nothing else. The reduce-motion rule at the top zeroes this. */
.st-draft { background: var(--muted); }
.st-walking { background: var(--leaf); }
.st-review { background: var(--warning); }
.st-done { background: var(--moss); }
.st-cancelled { background: var(--muted); opacity: 0.55; }
.st-failed { background: var(--danger); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); font-size: 0.92rem; }
.kv dt { color: var(--text-dim); }
.kv dd { margin: 0; }

/* ------------------------------------------------------------- calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); text-align: center; padding-bottom: var(--s1); }
.cal button {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 40px;
}
.cal button:hover { border-color: var(--accent); }
.cal button.has-jobs {
  background: var(--surface);
  border-color: var(--rule);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-card);
}
.cal button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--bone); }
.cal .pips { display: flex; gap: 2px; }
.cal .pips i { width: 4px; height: 4px; border-radius: 50%; background: var(--moss); }
.cal button[aria-pressed="true"] .pips i { background: var(--bone); }

/* ------------------------------------------------------ desktop, ≥ 900px */
@media (min-width: 900px) {
  .view { max-width: var(--shell-max); padding: var(--s6) var(--s6) var(--s6); }
  .tabbar { display: none; }
  .topbar { padding: var(--s3) var(--s6); }

  .shell { display: grid; grid-template-columns: 224px 1fr; gap: var(--s6); align-items: start; }
  .rail {
    display: flex;
    flex-direction: column;
    gap: var(--s1);
    position: sticky;
    top: 88px;
  }
  .rail a {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.95rem;
  }
  .rail a:hover { background: var(--surface); color: var(--text); }
  .rail a[aria-current="page"] { background: var(--forest); color: var(--bone); font-weight: 600; }
  .rail svg { width: 20px; height: 20px; }
  .rail .rail-label { padding: var(--s4) var(--s3) var(--s2); }

  .mission { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--s5); align-items: start; }
  .mission-wide { grid-column: 1 / -1; }
  .evidence-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }

  /* Field mode on a desktop is a preview of a phone, framed and labelled —
     it is not the desktop experience and should not pretend to be. */
  .fieldmode { position: relative; inset: auto; border-radius: var(--r-lg); max-width: 460px; margin: 0 auto; min-height: 640px; box-shadow: var(--shadow-lift); }
}


/* ==========================================================================
   TALK — real microphone capture. No AI anywhere near this.
   ========================================================================== */

/* A section he talked through, marked on the section list. */
.chip-record { border-color: var(--record); color: var(--record); gap: 4px; }
.chip-record svg { width: 13px; height: 13px; }

/* Tap or talk. Two doors, the same size, neither of them the default. */
.optbtn {
  display: flex;
  align-items: center;
  gap: var(--s4);
  width: 100%;
  min-height: 84px;
  padding: var(--s4) var(--s5);
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.optbtn:hover { border-color: var(--moss); }
.optbtn-title { font-size: 1.08rem; font-weight: 600; }
.optbtn-sub { font-size: 0.84rem; color: var(--text-dim); }
.optbtn-dot {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mist);
  color: var(--forest);
}
.optbtn-mic { border-color: var(--record); }
.optbtn-mic .optbtn-dot { background: var(--record); color: #fff; }

/* The recording stage. One control, unmistakable, thumb-reachable. */
.recstage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
  padding: var(--s5) 0 var(--s3);
}
.rec-clock {
  font-family: var(--display);
  font-size: 2.1rem;
  font-variant-numeric: tabular-nums;
  color: var(--head);
  line-height: 1;
}
.wave { display: flex; align-items: center; gap: 3px; height: 48px; }
.wave > i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 2px;
  background: var(--record);
  transition: height 90ms linear;
}
.recbtn {
  width: 104px;
  height: 104px;
  border: 0;
  border-radius: 50%;
  background: var(--record);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(142, 42, 32, 0.75);
}
.recbtn:hover { background: var(--record-deep); }
.recbtn:disabled { background: var(--muted); cursor: not-allowed; box-shadow: none; }
.recbtn.live { animation: rec-pulse 2s ease-out infinite; }
@keyframes rec-pulse {
  0% { box-shadow: 0 0 0 0 rgba(190, 58, 43, 0.42); }
  70% { box-shadow: 0 0 0 26px rgba(190, 58, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(190, 58, 43, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .recbtn.live { animation: none; outline: 3px solid var(--record); outline-offset: 4px; }
  .wave > i { transition: none; }
}

/* Walk and talk.
 *
 * THE SHUTTER IS THE BIGGEST TARGET ON THE SCREEN, and that is the whole design
 * decision. He presses it thirty times a house — one-handed, sometimes lying on
 * his back in a crawlspace, often in sunlight he cannot shade. Stop gets pressed
 * once, so Stop is a normal button at the bottom.
 *
 * Leaf is capture-only by brand rule, and a shutter during a live recording is
 * the most capture thing in the product. The record dot stays Record red.
 */
.shutterwrap { display: grid; place-items: center; padding: var(--s2) 0; }
.shutterbtn {
  width: 156px;
  height: 156px;
  border: 0;
  border-radius: 50%;
  background: var(--leaf);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 26px -10px rgba(61, 139, 87, 0.8);
  /* No transition on transform: a 40ms press response is the only feedback he
     gets that the shutter fired, and easing it makes the phone feel slow. */
}
.shutterbtn:active { background: #2F6E44; transform: scale(0.96); }
.shutterbtn:focus-visible { outline: 3px solid var(--head); outline-offset: 4px; }

/* The live dot. Small, red, and moving — because "is it even recording?" is the
   question this screen has to answer without being asked. */
.rec-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--record); display: inline-block; flex: none;
  animation: rec-blink 1.6s ease-in-out infinite;
}
@keyframes rec-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Photographs taken during this recording, newest first, each showing the
   moment in the walk it belongs to. Scrolls sideways so it never pushes the
   shutter off the screen. */
.shotstrip {
  display: flex; gap: var(--s2); overflow-x: auto;
  padding-bottom: 4px; scroll-snap-type: x proximity;
}
.shot {
  margin: 0; flex: none; width: 92px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 4px;
}
.shot img {
  width: 92px; height: 92px; object-fit: cover;
  border-radius: var(--r2); background: var(--line);
}
.shot figcaption {
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 0.74rem; color: var(--muted);
  font-variant-numeric: tabular-nums; text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .rec-dot { animation: none; }
  .shutterbtn:active { transform: none; }
}

/* A saved take: play it, see it, delete it. */
.takerow {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
}
.takerow audio { display: none; }
.playbtn {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--forest);
  color: var(--bone);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.playbtn:hover { background: var(--moss); }
.playtrack { height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.playtrack > i { display: block; height: 100%; width: 0; background: var(--moss); }

/* Something he needs to know, in a sentence, in place. */
.notice {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--surface-sunk);
  font-size: 0.85rem;
  line-height: 1.5;
}
.notice > svg { flex: none; margin-top: 2px; color: var(--text-dim); }
.notice-warn { border-color: var(--warning); }
.notice-warn > svg { color: var(--warning); }
/* Danger is error TEXT only — the border and the glyph carry it, never a fill. */
.notice-bad { border-color: var(--danger); }
.notice-bad > svg { color: var(--danger); }
.notice-bad > span { color: var(--danger); }

/* ==========================================================================
   THE CHECK SCREEN — one line, then one decision, then the rest collapsed.
   David's ruling on the mockup was "too much to read", and this layout is it.
   ========================================================================== */

/* The one line of truth. */
.tally { font-size: 0.92rem; color: var(--text-dim); margin: 0; }
.tally b { color: var(--text); font-variant-numeric: tabular-nums; }

/* The single thing that actually needs him. Amber: a flag, not an error. */
.needscard {
  border: 1px solid var(--warning);
  background: color-mix(in srgb, var(--warning) 8%, var(--surface-raised));
  border-radius: var(--r-md);
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.needslbl {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #8a5a17;
}
.needsask { font-family: var(--display); font-size: 1.05rem; line-height: 1.3; margin: 0; }
.needsval { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--head); }
.quote {
  margin: 0;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-dim);
  border-left: 2px solid var(--rule);
  padding-left: var(--s3);
}

/* What it got right, one line each. Reading the evidence is opt-in. */
.slim { border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; background: var(--surface-raised); }
.slim > button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s3);
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  padding: var(--s3) var(--s4);
  min-height: var(--tap-sm);
  font: inherit;
  font-family: var(--sans);
  color: var(--text);
  cursor: pointer;
}
.slim > button:last-child { border-bottom: 0; }
.slim .k { font-size: 0.82rem; color: var(--text-dim); flex: none; width: 7.5rem; }
.slim .v { font-weight: 600; font-size: 0.92rem; flex: 1; min-width: 0; }
.slim .tickmark { color: var(--moss); flex: none; display: inline-flex; }
.slim .chev { color: var(--text-dim); flex: none; display: inline-flex; transition: transform 0.18s ease; }
.slim .open .chev { transform: rotate(90deg); }
.slim .drawer {
  padding: 0 var(--s4) var(--s3);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  align-items: flex-start;
}
.slim .drawer p {
  margin: 0;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-dim);
  border-left: 2px solid var(--rule);
  padding-left: var(--s3);
}

/* A gap. It follows him to the end; it never blocks him. Dashed, not red:
   an unanswered question is unfinished work, not an error. */
.openrow {
  display: flex;
  align-items: center;
  gap: var(--s3);
  border: 1px dashed var(--rule);
  border-radius: var(--r-md);
  padding: var(--s3) var(--s4);
  background: transparent;
}
.openrow b { font-size: 0.9rem; font-weight: 600; }
.openrow small { font-size: 0.76rem; }

/* Everything he said, folded away by default. */
.transcript { border-top: 1px solid var(--rule); padding-top: var(--s3); }
.transcript summary {
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--text-dim);
  min-height: var(--tap-sm);
  display: flex;
  align-items: center;
}
.transcript p { font-size: 0.86rem; color: var(--text-dim); line-height: 1.55; margin: var(--s2) 0 0; }

/* ==========================================================================
   THE DESK — one property, one screen, after the walk.

   Set like a document, not a dashboard. An inspection record IS a document:
   it is read, checked and signed off, and the layout should say so before a
   word of it is read. Wide measure for the walk, a narrow rail for the facts,
   a masthead that gives the address the weight it has in the inspector's day.
   ========================================================================== */

.deskjob { max-width: 1180px; gap: var(--s5); }

/* ---- masthead: the address is the headline, the facts are the byline ---- */
/* The address gets the full measure and the byline sits beneath it. Sharing a
   row squeezed "1420 Palmetto Drive" into a break after Palmetto — an address
   is a name, and a name should not wrap unless it truly has to. */
.desk-mast {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding-bottom: var(--s4);
  border-bottom: 2px solid var(--head);
}
.desk-address {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  max-width: 22ch;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.desk-where { color: var(--text-dim); margin: 0; font-size: 1rem; }
.desk-dot { color: var(--rule); }

/* The facts sit as a byline row, hairline-separated — a masthead device, and
   it keeps four short values from reading as a table. */
.desk-meta {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  row-gap: var(--s3);
  border-top: 1px solid var(--rule);
  padding-top: var(--s4);
}
.desk-meta > * { padding: 0 var(--s5); border-left: 1px solid var(--rule); }
.desk-meta > *:first-child { padding-left: 0; border-left: 0; }
.desk-k {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}
.desk-v { font-family: var(--display); font-size: 1.05rem; color: var(--head); white-space: nowrap; }

/* ---- the layout: reading column, then a rail that follows ---- */
.desk-grid { display: grid; gap: var(--s5); align-items: start; }
@media (min-width: 1060px) {
  .desk-grid { grid-template-columns: minmax(0, 1fr) 292px; gap: var(--s6); }
  .desk-rail { position: sticky; top: var(--s5); }
}

/* ---- the band: four numbers, big, before any prose ---- */
.desk-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.desk-stat { background: var(--surface-raised); padding: var(--s4) var(--s4) var(--s3); display: flex; flex-direction: column; gap: 2px; }
.desk-stat b {
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--head);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.desk-stat span { font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); }
.desk-stat small { font-size: 0.76rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
/* Semantic, and separate from the accent: state is not decoration. */
.desk-stat.is-good b { color: var(--moss); }
.desk-stat.is-warn b { color: var(--warning); }

/* ---- a section of the walk ---- */
.desk-section {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.desk-sechead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  background: var(--surface-sunk);
  border-bottom: 1px solid var(--rule);
}
.desk-sechead h2 { font-size: 1.06rem; margin: 0; }
.desk-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 2px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface-raised);
  white-space: nowrap;
}
.desk-count.is-good { color: var(--moss); border-color: var(--moss); }
.desk-count.is-warn { color: var(--warning); border-color: var(--warning); }

/* One question, its answer, and the photographs that support it. */
.desk-rows { display: flex; flex-direction: column; }
.desk-row {
  display: flex;
  gap: var(--s5);
  align-items: flex-start;
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--rule-soft, rgba(34, 60, 37, 0.09));
}
.desk-row:last-child { border-bottom: 0; }
.desk-ask { margin: 0; font-size: 0.86rem; color: var(--text-dim); line-height: 1.4; }
.desk-answer { margin: 0; font-family: var(--display); font-size: 1.12rem; color: var(--text); line-height: 1.3; }
/* An unanswered row is dashed and quiet, not red: unfinished work is not an
   error, and this screen has a lot of it early on. */
.desk-none { margin: 0; font-size: 0.95rem; color: var(--text-dim); font-style: italic; }
.desk-row.is-open { background: repeating-linear-gradient(-45deg, transparent, transparent 7px, rgba(201, 137, 58, 0.045) 7px, rgba(201, 137, 58, 0.045) 14px); }

.desk-shots { display: flex; gap: var(--s2); flex: none; }
.desk-thumb {
  width: 76px;
  height: 76px;
  margin: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-sunk);
  border: 1px solid var(--rule);
}
.desk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.desk-noshot {
  width: 76px; height: 76px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--rule);
  display: grid; place-items: center;
  color: var(--text-dim);
}

.desk-takes {
  padding: var(--s4) var(--s5);
  border-top: 1px solid var(--rule);
  background: var(--surface-sunk);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

/* ---- what is still open ---- */
.desk-open {
  border: 1px solid var(--warning);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--warning) 6%, var(--surface));
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.desk-open .desk-sechead { background: none; border: 0; padding: 0; }
.desk-openlist { margin: 0; padding-left: 1.15em; display: flex; flex-direction: column; gap: var(--s2); }
.desk-openlist li { font-size: 0.94rem; }
.desk-clear {
  display: flex; gap: var(--s4); align-items: flex-start;
  border: 1px solid var(--moss);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--moss) 6%, var(--surface));
  padding: var(--s5);
  color: var(--moss);
}
.desk-clear h3 { margin: 0; color: var(--head); }
.desk-clear p { color: var(--text-dim); }

/* ---- the rail ---- */
.desk-rail { display: flex; flex-direction: column; gap: var(--s4); }
.desk-card {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface-raised);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  box-shadow: var(--shadow-card);
}
.desk-card h3 { margin: 0; font-size: 1rem; }
.desk-card .kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); font-size: 0.88rem; }
.desk-card .kv dt { color: var(--text-dim); }
.desk-card .kv dd { margin: 0; text-align: right; font-weight: 600; }
.desk-warn {
  display: flex; gap: var(--s2); align-items: flex-start;
  margin: 0; font-size: 0.8rem; line-height: 1.45;
  color: var(--text-dim);
  border-top: 1px solid var(--rule);
  padding-top: var(--s3);
}
.desk-warn svg { flex: none; margin-top: 2px; color: var(--warning); }
/* The same line when there is nothing to warn about — the walk is on the
   server. Moss rather than amber, and the tick rather than the triangle. */
.desk-ok {
  display: flex; gap: var(--s2); align-items: flex-start;
  margin: 0; font-size: 0.8rem; line-height: 1.45;
  color: var(--text-dim);
  border-top: 1px solid var(--rule);
  padding-top: var(--s3);
}
.desk-ok svg { flex: none; margin-top: 2px; color: var(--accent); }
.desk-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.88rem; font-weight: 600; color: var(--accent);
  text-decoration: none;
  min-height: var(--tap-sm);
}
.desk-link:hover { text-decoration: underline; }

/* ---- notices ---- */
.desk-hero-note {
  display: flex; gap: var(--s4); align-items: flex-start;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--forest);
  border-radius: var(--r-md);
  background: var(--surface-sunk);
  padding: var(--s5);
}
.desk-hero-note h3 { margin: 0; }
.desk-hero-note p { margin: 0; font-size: 0.92rem; line-height: 1.55; max-width: 62ch; }
.desk-hero-note > svg { flex: none; color: var(--forest); margin-top: 2px; }

.desk-empty-room {
  border: 1px dashed var(--rule);
  border-radius: var(--r-lg);
  padding: var(--s5);
}
.desk-empty-room h3 { margin: 0; }
.desk-empty-room svg { color: var(--text-dim); flex: none; margin-top: 2px; }

@media (max-width: 640px) {
  .desk-row { flex-direction: column; gap: var(--s3); }
  .desk-meta > * { padding: 0 var(--s4); }
}

/* =========================================================================
 * THE OFFICE — rescheduling, the week ahead, property folders, review queue.
 *
 * Everything below is Field kit only. No new colour: Moss for action, Forest
 * for headings, Amber for "needs attention", Danger for error TEXT, Leaf
 * nowhere (it is capture-only and none of this is capture).
 * ========================================================================= */

/* ---- moving a job to another day ---- */
.reschedule { display: flex; flex-direction: column; gap: var(--s1); }
.reschedule label { display: block; }
.reschedule-input {
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 10px var(--s3);
  min-height: var(--tap-sm);
  width: 100%;
  max-width: 100%;
}
.reschedule-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.reschedule-note { font-size: 0.78rem; color: var(--text-dim); line-height: 1.45; }
/* Two tones only, and both are measured in dark as well as light.
   The settled state stays quiet — a green "On the server." on every job card is
   a colour that stops meaning anything. Amber carries everything that wants a
   second look: a queue still draining, and a change that would not save.
   Danger is deliberately NOT used here: it is error-text-only and, on the warm
   forest dark ground, #a8382e measures 1.9:1 — a red that cannot be read is
   worse than an amber that can. */
.reschedule-note.is-ok { color: var(--text-dim); }
.reschedule-note.is-warn { color: var(--warning); }

/* ---- the week ahead ---- */
/* Its own scroller, so a narrow shell scrolls the strip and never the page. */
.weekstrip-scroll { overflow-x: auto; padding: var(--s4); }
.weekstrip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--s2);
  min-width: 620px;
}
.weekday {
  display: flex; flex-direction: column; gap: var(--s2);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: var(--s2);
  min-width: 0;
}
.weekday.is-clear { background: transparent; border-style: dashed; }
.weekday.is-today { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.weekday-head {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: none; border: 0; padding: var(--s1) var(--s2);
  cursor: pointer; text-align: left; color: inherit; font: inherit;
  border-radius: var(--r-sm); width: 100%;
}
.weekday-head:hover { background: var(--surface-sunk); }
.weekday-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.weekday-dow {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dim);
}
.weekday.is-today .weekday-dow { color: var(--head); font-weight: 700; }
.weekday-num { font-size: 1.25rem; line-height: 1.1; color: var(--head); }
.weekday-count { font-size: 0.72rem; color: var(--text-dim); }
.weekday-jobs { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.weekday-job {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-sunk); border: 1px solid var(--rule);
  border-radius: var(--r-sm); padding: 6px var(--s2);
  cursor: pointer; text-align: left; color: inherit;
  font: inherit; font-size: 0.76rem; min-width: 0;
}
.weekday-job { width: 100%; max-width: 100%; }
.weekday-job > .stack { min-width: 0; flex: 1 1 auto; }
.weekday-job:hover { border-color: var(--accent); }
.weekday-job:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.weekday-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.weekday-clear {
  margin: 0; padding: 0 var(--s2) var(--s2);
  font-size: 0.74rem; color: var(--text-dim); font-style: italic;
}

/* ---- by date / by property ---- */
.segmented {
  display: inline-flex; align-self: flex-start;
  border: 1px solid var(--rule); border-radius: var(--r-md);
  background: var(--surface-sunk); padding: 3px; gap: 3px;
}
.segmented button {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 0.86rem; font-weight: 600;
  color: var(--text-dim); background: none; border: 0;
  border-radius: var(--r-sm); padding: 8px var(--s3);
  min-height: var(--tap-sm); cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--surface-raised); color: var(--head); box-shadow: var(--shadow-card); }
.segmented button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- a property in the jobs list ---- */
.property-row {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; text-align: left; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-md); padding: var(--s3) var(--s4);
  min-height: var(--tap); cursor: pointer;
}
.property-row:hover { border-color: var(--accent); }
.property-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.property-row-visits {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-sunk); border: 1px solid var(--rule);
  font-size: 0.95rem; color: var(--head);
}
.property-row-addr { font-weight: 600; }
.property-row-last { flex: none; white-space: nowrap; }

/* ---- the folder ---- */
.property-single {
  display: flex; gap: var(--s3); align-items: flex-start;
  margin: 0; padding: var(--s4);
  border: 1px solid var(--rule); border-left: 3px solid var(--forest);
  border-radius: var(--r-md); background: var(--surface-sunk);
  font-size: 0.9rem; line-height: 1.55; max-width: 72ch;
}
.property-single > svg { flex: none; margin-top: 3px; color: var(--forest); }

.property-visit {
  display: flex; align-items: center; gap: var(--s4);
  width: 100%; text-align: left; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-md); padding: var(--s3) var(--s4);
  min-height: var(--tap); cursor: pointer;
}
.property-visit:hover { border-color: var(--accent); }
.property-visit:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.property-visit-date { flex: none; font-size: 0.86rem; color: var(--head); min-width: 8.5em; }
.property-visit-addr { font-weight: 600; }
.property-visit-counts { flex: none; font-size: 0.8rem; color: var(--text-dim); text-align: right; }

.property-shots {
  display: grid; gap: var(--s3);
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.property-shot { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.property-shot img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--surface-sunk); display: block;
}
.property-shot figcaption {
  display: flex; flex-direction: column;
  font-size: 0.72rem; color: var(--text-dim); line-height: 1.35;
  overflow: hidden;
}
.property-shot figcaption b { color: var(--head); font-weight: 600; }
.property-shot figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 640px) {
  .property-visit { flex-wrap: wrap; }
  .property-visit-counts { text-align: left; width: 100%; }
  .property-visit-date { min-width: 0; }
}

/* ---- walking the day, from the desk ---- */
.desk-topline { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.desk-stepper { display: flex; align-items: center; gap: var(--s2); margin-left: auto; flex-wrap: wrap; }
.desk-stepper .btn[disabled] { opacity: 0.45; cursor: default; }
.desk-stepper-count {
  font-size: 0.8rem; color: var(--text-dim); text-decoration: none;
  padding: 0 var(--s2); white-space: nowrap;
}
.desk-stepper-count:hover { color: var(--head); text-decoration: underline; }

/* ---- the end-of-day queue ---- */
.reviewq-line {
  margin: 0; font-size: 1rem; color: var(--head);
  font-family: var(--display); letter-spacing: 0.01em;
}
.reviewq-row {
  display: flex; gap: var(--s4); align-items: flex-start; flex-wrap: wrap;
  border: 1px solid var(--rule); border-left: 3px solid var(--rule);
  border-radius: var(--r-md); background: var(--surface);
  padding: var(--s4);
}
/* Ready reads as settled, open reads as needing a look. Never as a blocker:
   the walk never blocks and neither does this. */
.reviewq-row.is-ready { border-left-color: var(--moss); }
.reviewq-row.is-open { border-left-color: var(--warning); }
.reviewq-row.is-away { border-left-color: var(--forest); border-style: dashed; }
.reviewq-open {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.reviewq-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.reviewq-addr { font-family: var(--display); font-size: 1.16rem; color: var(--head); }
.reviewq-open:hover .reviewq-addr { text-decoration: underline; }
.reviewq-facts {
  display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4);
  font-size: 0.8rem; color: var(--text-dim);
}
/* THE WORDS STAY IN THE HEADING COLOUR AND THE ICON CARRIES THE TONE.
   Measured: amber on paper is 2.85:1 and moss on the dark ground is 3.75:1,
   both below 4.5 for text this size. The same rule the desk already follows
   for .desk-warn / .desk-ok. Tone still reads three ways — the icon, the left
   border of the row, and the words themselves. */
.reviewq-state {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; font-size: 0.86rem; font-weight: 600; color: var(--head);
}
.reviewq-state > svg { flex: none; }
.reviewq-state.is-ready > svg { color: var(--accent); }
.reviewq-state.is-open > svg { color: var(--warning); }
.reviewq-state.is-away > svg { color: var(--text-dim); }
.reviewq-actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; margin-left: auto; }
.reviewq-done {
  display: flex; align-items: center; gap: var(--s3);
  border: 1px solid var(--rule); border-radius: var(--r-md);
  background: var(--surface-sunk); padding: var(--s2) var(--s4);
  min-height: var(--tap-sm);
}
.reviewq-done > svg { flex: none; color: var(--accent); }

@media (max-width: 640px) {
  .reviewq-actions { margin-left: 0; width: 100%; }
  .reviewq-done { flex-wrap: wrap; }
  .desk-stepper { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* ---- the company ---- */
.teamrow {
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  border: 1px solid var(--rule); border-radius: var(--r-md);
  background: var(--surface); padding: var(--s2) var(--s4);
  min-height: var(--tap-sm);
}
.teamrow > svg { flex: none; color: var(--text-dim); }
/* An email address is one long unbreakable word. Without both of these a
   `flex: 1` column refuses to shrink below its content and pushes the row —
   and the page — 120px past a 390px phone. Measured, not guessed. */
.teamrow .grow { min-width: 0; }
.teamrow .grow > span { overflow-wrap: anywhere; }
.teamrole {
  flex: none; font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim);
}


/* The lead action on the walk: one press, before the list of sections. */
.rowbtn-lead {
  border-color: var(--leaf);
  background: color-mix(in srgb, var(--leaf) 7%, transparent);
  align-items: center;
}
.lead-dot {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--leaf); color: #fff;
  display: grid; place-items: center; flex: none;
}


/* The live walk. Three bands: proof at the top, evidence in the middle, and
   the shutter where a thumb actually reaches. */
/* The body does not fill its own height by default, so a "push the shutter to
   the bottom" rule had nothing to push against. Only the live walk needs it. */
/* The standard body reserves 148px for a tall actions bar. This screen's bar is
   one button, and the difference was 250px of dead space between the shutter and
   the thumb that has to reach it. */
.fieldmode .fm-body:has(.livewalk) { flex: 1 1 auto; padding-bottom: 104px; }
.livewalk {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  flex: 1 1 auto;
  min-height: 0;
}
/* Space kept for the quiet label whether or not it is showing, so the caption
   underneath never gets sat on and nothing jumps when he stops talking. */
.livewalk .wave { margin-bottom: 15px; }
.livewalk-top { display: flex; flex-direction: column; gap: var(--s2); }
.livewalk-shots { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end; }
.livewalk .shutterwrap { padding-bottom: var(--s2); }

/* Silence, said rather than implied. A row of motionless dots looks like a
   broken meter, and "is it even recording?" is the one question this screen
   exists to answer. */
.wave { position: relative; }
.wave.wave-quiet > i { opacity: .45; }
.wave.wave-quiet::after {
  content: 'very quiet';
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ------------------------------------------------ component layer, mirrored
   Phase 16: every WRKit component on the phone names a class here, and
   ios/check-components.py refuses a WR* component without one. Where the web
   already had the surface (.card .empty .skeleton .segmented .meter .playtrack
   .shot .notice .chip) nothing changed; these are the ones it lacked. */

/* WRStatTile — a labelled figure. Amber only as "needs attention". */
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.stat .num { font-size: 1.6rem; line-height: 1.1; color: var(--head); }
.stat.stat-warn .num { color: var(--warning); }

/* WRLoading — a spinner with a sentence, or shimmering rows (.skeleton). */
.loading-row { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text-dim); font-size: 0.9rem; }
.loading-row::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--rule); border-top-color: var(--moss);
  animation: wr-spin 0.9s linear infinite;
}
@keyframes wr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-row::before, .skeleton { animation: none; } }

/* WRPhotoTile — the one frame for a thumbnail; WRLightbox — one photo, one way out. */
.photo-tile { display: inline-flex; flex-direction: column; gap: var(--s1); width: 88px; }
.photo-tile img, .photo-tile .photo-tile-blank {
  width: 88px; height: 88px; object-fit: cover; display: block;
  border-radius: var(--r-md); border: 1px solid var(--rule); background: var(--surface-sunk);
}
.photo-tile figcaption { font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: var(--ink); display: grid; place-items: center; }
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox .sheet-head { position: absolute; top: 0; left: 0; right: 0; background: rgba(0,0,0,0.35); color: var(--bone); }

/* WRPageHeader — eyebrow, one serif title, a line under it, one action. */
.page-head { display: flex; align-items: flex-start; gap: var(--s3); }
.page-head > .stack { flex: 1; min-width: 0; }
.page-head h1 { margin: 0; }

/* WRSheetHeader — a title and a way out, at the top of anything modal. */
.sheet-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); }
.sheet-head h2 { flex: 1; margin: 0; font-size: 1.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* WRScrubber — .playtrack with a 44px touch height and a thumb. */
.scrubber { position: relative; height: var(--tap-sm); display: flex; align-items: center; cursor: pointer; }
.scrubber .playtrack { width: 100%; }
.scrubber .thumb {
  position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--moss); border: 2px solid var(--surface-raised);
}

/* ======================================================= control center */
/* The office, on the same drafting paper. Tiles are doors; panels hold one
   answer each; nothing here invents a surface the field kit does not have. */
.cc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s3); }
.cc-tile { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.cc-tile:hover, .cc-tile:focus-visible { transform: translateY(-1px); box-shadow: var(--shadow-lift); border-color: var(--accent); }
.cc-grid { display: grid; gap: var(--s5); align-items: start; }
@media (min-width: 900px) { .cc-grid { grid-template-columns: 1fr 1fr; } .cc-wide { grid-column: 1 / -1; } }
.cc-body { padding: var(--s4); }
.cc-link { font-size: 0.82rem; text-decoration: none; }
.cc-link:hover { color: var(--text); text-decoration: underline; }
.cc-attn {
  display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left;
  min-height: 48px; padding: var(--s2) var(--s3); border-radius: var(--r-md);
  background: var(--surface-raised); border: 1px solid var(--rule); color: var(--text); font: inherit; cursor: pointer;
}
.cc-attn:hover { border-color: var(--accent); }
.cc-attn.is-warn { border-left: 3px solid var(--warning); }
.cc-attn.is-good { border-left: 3px solid var(--moss); }
.cc-row { min-height: 52px; }
.cc-money-row { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--rule); font-size: 0.92rem; }
.cc-money-row:last-of-type { border-bottom: 0; }
.cc-money-row.is-warn .num { color: var(--warning); }
.cc-money-row.is-good .num { color: var(--moss); }

/* ------------------------------------------------------------ calendar */
.cal-grid { display: grid; gap: var(--s5); align-items: start; }
@media (min-width: 900px) { .cal-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } .cal-wide { grid-column: 1 / -1; } }
.cal-big { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-big button { min-height: 64px; min-width: 0; align-items: flex-start; padding: 6px 8px; }
.cal-big .dow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-job-foot .reschedule label { white-space: nowrap; }
.cal-big button.is-today { box-shadow: inset 0 0 0 2px var(--moss); }
.cal-big .pips i.st-draft { background: var(--muted); }
.cal-big .pips i.st-walking { background: var(--record); }
.cal-big .pips i.st-review { background: var(--warning); }
.cal-big .pips i.st-done { background: var(--moss); }
.cal-big .pips i.st-cancelled { background: var(--rule); }
.cal-legend { display: flex; flex-wrap: wrap; gap: var(--s4); padding: 0 var(--s4) var(--s4); font-size: 0.78rem; color: var(--text-dim); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-job { display: flex; flex-direction: column; gap: var(--s2); }
.cal-job-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); padding: 0 var(--s2); }
.cal-job-foot .reschedule { flex-direction: row; align-items: center; gap: var(--s2); }

/* ---------------------------------------------------------- job table */
.jt-tools { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.jt-search { flex: 1 1 260px; min-height: 40px; }
.jt-select { min-height: 40px; width: auto; }
.jt { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-card); }
.jt-row {
  display: grid; grid-template-columns: 2fr 1fr 1.2fr 1fr 1fr 1.6fr 1fr; gap: var(--s3); align-items: center;
  padding: var(--s3) var(--s4); text-align: left; font: inherit; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--rule); cursor: pointer; min-height: 56px;
}
.jt-row:last-child { border-bottom: 0; }
.jt-row:not(.jt-head):hover { background: var(--surface-raised); }
.jt-head { background: var(--surface-sunk); font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); min-height: 40px; cursor: default; }
.jt-addr { font-family: var(--display); font-size: 1.02rem; color: var(--head); }
.jt-prop { grid-template-columns: 3fr 1fr 1.4fr 32px; }
.jt-inv { grid-template-columns: 1.1fr 1.2fr 2fr 1fr 1fr 1.6fr 1fr; }
.jt-inv .num { font-size: 0.9rem; }
.inv-overdue { color: var(--warning); font-weight: 600; }
@media (max-width: 899px) { .jt-row { grid-template-columns: 1fr; gap: 4px; } .jt-head { display: none; } }

/* ------------------------------------------------------------- reports */
.rep-row { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.rep-row.is-done { border-left: 4px solid var(--moss); }
.rep-open { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: var(--s3) var(--s4); text-align: left; font: inherit; color: var(--text); background: transparent; border: 0; cursor: pointer; min-height: 60px; }
.rep-open:hover { background: var(--surface-raised); }
.rep-addr { font-family: var(--display); font-size: 1.1rem; color: var(--head); }
.rep-actions { display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0 var(--s4) var(--s3); }
.rep-note { padding: 0 var(--s4) var(--s3); font-size: 0.84rem; margin: 0; }

/* ------------------------------------------------------------ invoices */
.inv-grid { display: grid; gap: var(--s5); align-items: start; }
@media (min-width: 900px) { .inv-grid { grid-template-columns: minmax(0, 1fr) 292px; gap: var(--s6); } }
.inv-fields { display: grid; gap: var(--s3); padding: var(--s4); }
@media (min-width: 700px) { .inv-fields { grid-template-columns: 1fr 1fr 1fr; } }
.inv-ro { min-height: 40px; display: flex; align-items: center; font-size: 0.95rem; }
.inv-lines { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); }
.inv-line { display: grid; grid-template-columns: minmax(0, 3fr) 70px 110px 100px 40px; gap: var(--s2); align-items: center; }
.inv-line .input { min-height: 38px; padding: 0 var(--s2); }
.inv-line-head { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.inv-price { grid-template-columns: 1fr 2fr 120px 40px; }
.inv-totals { display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s4); justify-items: end; margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--rule); }
@media (max-width: 699px) { .inv-line { grid-template-columns: 1fr 1fr; } .inv-line-head { display: none; } }

/* ---------------------------------------------------- the pack check */
.pack { border: 1px solid var(--rule); border-left: 4px solid var(--rule); border-radius: var(--r-md); padding: var(--s3) var(--s4); background: var(--surface-raised); display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }
.pack.is-clean { border-left-color: var(--moss); }
.pack.has-rejects { border-left-color: var(--warning); }
.pack.has-advisories { border-left-color: var(--rule); }
.pack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.pack-item { display: flex; gap: var(--s2); align-items: flex-start; font-size: 0.92rem; }
.pack-item.is-reject svg { color: var(--warning); }
.pack-item.is-advisory svg { color: var(--text-dim); }

/* ------------------------------------------------ the completeness circle */
/* Fig 2 of the 4 Sep handoff, in the locked field-kit tokens. Track: forest
   at ~12%, dashed. Arc: solid forest, round caps, ~1.5s ease. Progress only. */
.cring { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s4); border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface-raised); box-shadow: var(--shadow-card); position: relative; overflow: hidden; min-width: 168px; }
.cring::after { content: ""; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(closest-side, rgba(34, 60, 37, 0.10), transparent); pointer-events: none; }
.cring-head { display: flex; align-items: center; gap: 6px; align-self: flex-start; }
.cring-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--forest); color: var(--paper); }
.cring-title { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.cring-dial { position: relative; display: grid; place-items: center; }
.cring-svg { display: block; }
.cring-track { stroke: var(--forest); opacity: 0.12; }
.cring-arc { stroke: var(--forest); transition: stroke-dashoffset 1.5s ease; }
.cring-pct { position: absolute; font-size: 1.5rem; color: var(--text); }
.cring-compact .cring-pct { font-size: 0.95rem; }
.cring-status { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
.cring-status.is-not { color: var(--warning); }
.cring-status.is-ready { color: var(--forest); }
.cring-desc { margin: 0; font-size: 0.82rem; color: var(--text-dim); text-align: center; }
.cring-foot { margin: 0; font-size: 0.74rem; color: var(--text-dim); text-align: center; font-style: italic; }
.cring-compact { padding: var(--s2) var(--s3); min-width: 0; gap: 2px; }
.mc-hero { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.mc-job { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.mc-job:hover { border-color: var(--accent); box-shadow: var(--shadow-lift); }
.mc-job { position: relative; }
.mc-trash {
  position: absolute; top: var(--s2); right: var(--s2); z-index: 1;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid transparent;
  background: transparent; color: var(--text-dim); display: grid; place-items: center; cursor: pointer;
}
.mc-trash:hover, .mc-trash:focus-visible { color: var(--text); border-color: var(--rule); background: var(--surface-sunk); }
.mc-trash:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mc-confirm { display: flex; flex-direction: column; gap: var(--s2); }
.mc-confirm p { margin: 0; font-size: 0.92rem; }
.mc-job .addr { font-family: var(--display); font-size: 1.15rem; color: var(--head); }
.mc-status { display: flex; flex-direction: column; gap: 4px; padding: var(--s3) var(--s4); border: 1px dashed var(--rule); border-radius: var(--r-md); font-size: 0.86rem; color: var(--text-dim); }
@media (prefers-reduced-motion: reduce) { .cring-arc { transition: none; } }

/* Mission Control: stored evidence, confirmed one row at a time. */

.said { display: flex; flex-direction: column; gap: var(--s2); }
.said-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s4); align-items: start; padding: var(--s3) var(--s4); border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface-raised); }
.said-row.is-judgment { border-left: 4px solid var(--forest); }
.said-row.is-ask { border-left: 4px solid var(--warning); }
.said-row.is-editing { border-color: var(--moss); box-shadow: 0 0 0 3px color-mix(in srgb, var(--moss) 12%, transparent); grid-template-columns: 1fr; }
.said-row.is-done .said-v::after { content: " ✓"; color: var(--moss); }
.said-q { font-size: 0.78rem; color: var(--text-dim); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.said-q .your { font: 500 0.62rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--forest); border: 1px solid var(--forest); border-radius: 999px; padding: 1px 7px; }
.said-v { font-family: var(--display); font-size: 1.12rem; color: var(--head); }
.said-v .was { font-family: var(--sans); font-size: 0.78rem; color: var(--text-dim); margin-left: 8px; text-decoration: line-through; }
.said-v .yours { font: 500 0.62rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--moss); margin-left: 6px; }
.said-quote { font-size: 0.88rem; color: var(--text-dim); font-style: italic; line-height: 1.45; }
.said-quote mark { background: color-mix(in srgb, var(--moss) 16%, transparent); color: var(--text); font-style: normal; border-radius: 3px; padding: 0 2px; }
.said-acts { display: flex; gap: var(--s2); align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.said-edit { display: flex; flex-direction: column; gap: var(--s3); padding-top: var(--s2); border-top: 1px dashed var(--rule); }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices button { font: 500 0.84rem var(--sans); border: 1px solid var(--rule); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 12px; min-height: 36px; }
.choices button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--bone); }
.said-foot { display: flex; align-items: center; gap: var(--s3); justify-content: space-between; flex-wrap: wrap; padding-top: var(--s2); }

.mc-job-open { display: flex; flex-direction: column; gap: var(--s3); width: 100%; color: inherit; text-align: left; border: 0; background: transparent; padding: 0; cursor: pointer; }
.said-view .panel { min-width: 0; }
.said-view h1 { font-size: 1.45rem; margin: 0; }
.said-head { flex-wrap: wrap; gap: var(--s3); }
.said-view .said-foot, .said-view > .panel > p { padding: var(--s3) var(--s4); margin: 0; }
.said-view .said-row, .said-view .said-quote { overflow-wrap: anywhere; }
.said-row[hidden], .said-section[hidden] { display: none; }
.said-row { transition: opacity 200ms, transform 200ms; }
.said-row.is-done .said-v::after { display: inline-block; animation: said-confirm 200ms ease-out; }
.said-summary { transition: opacity 200ms; }
.said-row:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
.said-view button, .said-view a { min-height: 36px; }
.said-view .said-v .was { color: var(--text-dim); opacity: 1; }
.said-view .input { max-width: 100%; }
@keyframes said-confirm { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 700px) {
  .said-row { grid-template-columns: 1fr; padding: var(--s3); }
  .said-head .segmented { flex-wrap: wrap; }
  .said-acts { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .said-row, .said-summary { transition: none; }
  .said-row.is-done .said-v::after { animation: none; }
}

/* Semantic roles keep the specimen's header and judgment pill legible at night. */
.said-view .panel-head { background: var(--surface-sunk); }
.said-view .said-q .your { color: var(--head); border-color: var(--head); }
.said-view .said-v .yours { color: var(--text); }

/* Recorder instruments — WRWaveHistory / WRLevelScale / WRLevelState.
   Stage A mirrors only; the web recorder adopts these in live-words stage C. */
.wavehist { position: relative; height: 46px; display: flex; align-items: center; gap: 1px; overflow: hidden; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.wavehist i { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--record); min-height: 2px; max-height: 44px; }
.wavehist i.q { opacity: 0.32; }
.wavehist .shotmark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--leaf); }
.wavehist .head { position: absolute; right: 0; top: 0; bottom: 0; width: 2px; background: var(--record); }
.lvl { display: flex; flex-direction: column; gap: 4px; }
.lvl-bar { position: relative; height: 10px; border-radius: 5px; background: var(--surface-sunk); }
.lvl-fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--leaf) 0% 90%, var(--warning) 90% 100%); clip-path: inset(0 calc(100% - var(--pct, 0%)) 0 0); }
.lvl-peak { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--head); border-radius: 1px; }
/* Ticks follow their actual dB positions, not five equally spaced labels. */
.lvl-scale { position: relative; height: 18px; font: 500 0.58rem var(--mono); color: var(--text-dim); letter-spacing: 0.04em; }
.lvl-scale span { position: absolute; left: var(--at); transform: translateX(-50%); padding-top: 5px; }
.lvl-scale span::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 3px; background: currentColor; }
.lvl-scale span:nth-child(1) { --at: 0%; transform: none; }
.lvl-scale span:nth-child(2) { --at: 33.333%; }
.lvl-scale span:nth-child(3) { --at: 66.667%; }
.lvl-scale span:nth-child(4) { --at: 90%; }
.lvl-scale span:nth-child(5) { --at: 100%; transform: translateX(-100%); }
.lvl-scale span:first-child::before { left: 0; }
.lvl-scale span:last-child::before { left: auto; right: 0; }
.lvlstate { font: 500 0.7rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.lvlstate.is-quiet, .lvlstate.is-no-input, .lvlstate.is-paused { color: var(--warning); }
/* Meter/history updates are information: no tween, even with reduced motion. */

/* Live words — WRLiveWords. Stage B mirror; the web recorder adopts it in stage C. */
.livetx { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--s3) var(--s4); }
.livetx .livewords { margin: 0; font-family: var(--display); font-size: 1rem; line-height: 1.45; color: var(--text); max-height: 4.4em; overflow: hidden; }
.livetx .ago { font: 500 0.62rem var(--mono); color: var(--text-dim); margin-right: 6px; letter-spacing: 0.04em; }
.livetx .caret { display: inline-block; width: 2px; height: 1em; background: var(--record); vertical-align: -2px; margin-left: 2px; }
.livetx .is-paused { font: 500 0.7rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--warning); }

/* The recorder's display on the web walk screens (recorder-display.js). */
.recdisplay { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 360px; }
.recstage-instrument { gap: var(--s3); }
.recstage-instrument .lvlstate { align-self: center; }
.recdisplay .lvl-scale span { white-space: nowrap; }
.recdisplay .lvl-scale { height: 16px; }
.recdisplay .lvl-fill.hot { background: linear-gradient(90deg, var(--leaf) 0% 84%, var(--warning) 84% 100%); }
.recstage-instrument .livetx { width: 100%; max-width: 360px; text-align: left; }
.recstage-instrument .livetx .row-between { display: flex; justify-content: space-between; align-items: center; }

/* The read-back: the reading told as steps; evidence in place; follow-ups asked. */
.readsteps { display: flex; flex-direction: column; border-left: 2px solid var(--rule); margin-left: 9px; padding-left: var(--s4); gap: var(--s3); }
.readstep { position: relative; display: flex; flex-direction: column; gap: 2px; }
.readstep::before { content: ""; position: absolute; left: calc(-1 * var(--s4) - 9px); top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--moss); border: 2px solid var(--bg); box-shadow: 0 0 0 2px var(--moss); }
.readstep.is-live::before { background: var(--record); box-shadow: 0 0 0 2px var(--record); animation: rec-pulse 2s ease-out infinite; }
.readstep.is-todo { opacity: 0.55; }
.readstep.is-todo::before { background: var(--bg); box-shadow: 0 0 0 2px var(--rule); }
.readstep b { font-weight: 600; }
.readstep .dim { font-size: 0.82rem; }
.readstep .num { font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim); margin-left: 6px; }
@media (prefers-reduced-motion: reduce) { .readstep.is-live::before { animation: none; } }
.rb-evidence { margin: 0; padding: 0 var(--s4); font-size: 0.88rem; color: var(--text-dim); font-style: italic; line-height: 1.45; }
.rb-evidence mark { background: rgba(56, 107, 76, 0.18); color: var(--text); font-style: normal; border-radius: 3px; padding: 0 2px; }
.rb-evidence .rb-reason { display: block; font-style: normal; margin-top: 2px; }
.rb-ask { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--s4); border: 1px solid var(--rule); border-left: 4px solid var(--warning); border-radius: var(--r-lg); background: var(--surface-raised); }
.rb-ask .chip { align-self: flex-start; }
.rb-askq { margin: 0; font-family: var(--display); font-size: 1.05rem; color: var(--head); }
.rb-err { font-size: 0.82rem; color: var(--danger); }

/* Today: the next job is the screen (experience plan, step 1). */
.nextup { background: var(--forest); color: var(--bone); border-radius: var(--r-lg); padding: var(--s4) var(--s4) var(--s3); display: flex; flex-direction: column; gap: var(--s2); box-shadow: var(--shadow-lift); }
.nextup .eyebrow { color: #b9cabe; }
.nextup-addr { font-family: var(--display); font-size: 1.5rem; line-height: 1.15; color: var(--bone); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-weight: inherit; }
.nextup-addr:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.nextup-line { font-size: 0.86rem; color: #cfdcd3; }
.nextup-rec { font-size: 0.86rem; color: #cfdcd3; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nextup-rec b { color: var(--bone); font-weight: 600; }
.nextup-chip { border-color: #7f9a88; color: #b9cabe; font-size: 0.6rem; }
.nextup-foot { display: flex; align-items: center; gap: var(--s3); margin-top: 2px; }
.nextup .cring { background: transparent; border-color: rgba(235, 228, 212, 0.25); box-shadow: none; --cring-track: rgba(235, 228, 212, 0.22); }
.nextup .cring::after { display: none; }
.nextup .cring-head { display: none; }
.nextup .cring { flex: 0 0 auto; }
.nextup-foot .nextup-line { flex: 1 1 auto; min-width: 0; }
.nextup .cring-track { stroke: var(--bone); }
.nextup .cring-arc { stroke: var(--bone); }
.nextup .cring-pct, .nextup .cring-title, .nextup .cring-status { color: var(--bone); }
.nextup .cring-icon { background: var(--bone); color: var(--forest); }
.nextup .cring-status.is-not { color: #e9c990; }
.nextup-start { background: var(--bone); color: var(--forest); border-color: var(--bone); margin-top: var(--s1); }
.nextup-start:hover { filter: brightness(0.97); }
.nextup-open { color: var(--bone); align-self: center; }
.nextup-open:hover { color: #fff; }

/* The reports library: what the pack check said when he signed. */
.risk { font: 500 0.7rem var(--mono); letter-spacing: 0.04em; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 9px; color: var(--text-dim); white-space: nowrap; }
.risk.is-ok { border-color: var(--moss); color: var(--moss); }
.risk.is-bad { border-color: var(--warning); color: var(--warning); }

/* The pack check's door: a missing photograph carries the camera. */
.pack-door { align-self: flex-start; margin-top: 4px; }
.btn-capture { background: var(--leaf); border-color: var(--leaf); color: #fff; border-radius: 999px; }
.btn-capture:hover { filter: brightness(0.95); }

/* New job: the county under the address, as he types. */
.nj-record { display: flex; gap: 8px; align-items: flex-start; font-size: 0.86rem; color: var(--text-dim); padding: var(--s2) var(--s3); background: var(--surface-sunk); border-radius: var(--r-md); }
.nj-record b { color: var(--text); font-weight: 600; }


/* Bird's-eye public context — WRAerial. No map library and no inferred answers. */
figure.aerial { margin: 0; max-width: 100%; flex-shrink: 0; }
.aerial-picture { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1; background: var(--surface-sunk); }
button.aerial-picture { cursor: zoom-in; min-height: 44px; }
.aerial-picture img { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: contain; }
.aerial-picture svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.aerial-halo, .aerial-line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.aerial-halo { stroke: var(--paper); stroke-width: 4px; }
.aerial-line { stroke: var(--leaf); stroke-width: 2px; }
.aerial figcaption { margin-top: 5px; font: 0.64rem var(--mono); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aerial-skeleton { max-width: 100%; aspect-ratio: 1; border-radius: var(--r-lg); background: var(--surface-sunk); }
.nj-aerial { padding: var(--s3) var(--s4); }
.nextup { position: relative; }
.nextup-aerial { position: absolute; top: 20px; right: 20px; }
.nextup.has-aerial .nextup-addr, .nextup.has-aerial > .eyebrow { padding-right: 88px; }
.nextup-aerial figcaption { color: var(--bone); }
.aerial-dialog { width: min(720px, 94vw); max-height: 94vh; overflow: auto; padding: var(--s4); border: 1px solid var(--rule); border-radius: var(--r-lg); color: var(--text); background: var(--surface); }
.aerial-dialog::backdrop { background: color-mix(in srgb, var(--forest) 70%, transparent); }
.aerial-dialog .aerial-picture { margin-top: var(--s3); }
.aerial-dialog p { font: 0.72rem var(--mono); margin-top: var(--s3); }
@media (max-width: 700px) { .desk-mast .aerial-slot { max-width: 100%; } }

@media (min-width: 1100px) {
  .desk-mast-aerial { display: grid; grid-template-columns: minmax(0, 1fr) 240px; }
  .desk-mast-aerial > .aerial-slot { grid-column: 2; grid-row: 1 / span 2; }
  .desk-mast-aerial > .desk-meta { grid-column: 1; }
}

/* Your signature (Settings) */
.sigpad-wrap { background: var(--surface); border: 1px dashed var(--rule); border-radius: var(--r-md); padding: 6px; }
.sigpad { display: block; width: 100%; max-width: 600px; height: auto; aspect-ratio: 3 / 1; touch-action: none; cursor: crosshair; background: var(--paper, #FBFAF8); border-radius: 6px; }
.sig-current { display: flex; align-items: center; gap: 12px; }
.sig-preview { max-height: 64px; max-width: 240px; background: var(--paper, #FBFAF8); border: 1px solid var(--rule); border-radius: 6px; padding: 4px; }

/* Permits (property page) */
.permits { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.permits th { text-align: left; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); padding: 4px 8px 6px 0; border-bottom: 1px solid var(--rule); }
.permits td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.permits tr.is-roof td { background: color-mix(in srgb, var(--leaf) 8%, transparent); }
.permits td.mono { font-family: var(--mono); font-size: 0.8rem; white-space: nowrap; }

/* Agreement (desk card, Settings, the client's sign page) */
.chip-ok { border-color: var(--moss); color: var(--moss); }
.sign-page { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
.sign-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.sign-card h1 { font-family: var(--display); font-size: 1.6rem; margin: 0; }
.sign-card h2 { font-size: 1.1rem; margin: 12px 0 0; }
.sign-body { font-family: var(--display); font-size: 1.02rem; line-height: 1.5; }
.sign-body p { margin: 0 0 10px; }
.sign-page .sigpad { aspect-ratio: 3 / 1; }
textarea.input { font-family: var(--display); line-height: 1.45; min-height: 240px; resize: vertical; }

/* Share by link (report page) */
.share-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }
.share-list li { display: flex; align-items: center; flex-wrap: wrap; }

/* Reports library: the agreement and the link, at a glance */
.rep-doors { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.risk.is-ok { border-color: var(--moss); color: var(--moss); }

/* The booking page (/book/<slug>) and the request card on the job */
.book-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.book-day { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 10px 12px; min-height: 44px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.book-day:hover:not(:disabled) { border-color: var(--accent); }
.book-day[aria-pressed="true"] { border-color: var(--moss); box-shadow: inset 0 0 0 1px var(--moss); }
.book-day:disabled { opacity: 0.45; cursor: default; }
.book-day-name { font-weight: 600; font-size: 0.9rem; }
.book-day-free { font-size: 0.76rem; color: var(--text-dim); }
.book-county { min-height: 1.2em; }
.request-card .kv dd { text-align: left; }
.request-card .segmented { max-width: 260px; }

/* Admin metrics: a single snapshot, with readable missing-data context. */
.pm { min-width: 0; width: 100%; }
.pm h2 { margin-top: 1.5rem; }
.pm p { margin: .65rem 0; }
.pm-filters { display:flex; flex-wrap:wrap; gap:1rem; align-items:end; margin:1.5rem 0; }
.pm-filters label { display:grid; gap:.5rem; }
.pm select { min-height:44px; padding:.5rem; color:var(--text); background:var(--surface); border:1px solid var(--rule); border-radius:8px; }
.pm-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:1rem; }
.pm-card,.pm-warning,.pm-history { padding:1.25rem; border:1px solid var(--rule); border-radius:16px; background:var(--bg); margin-bottom:1rem; }
.pm-warning { background:var(--surface-sunk); border-width:2px; }
.pm-warning h2 { margin-top:0; }
.pm h3 { font-size:1.1rem; }
.pm-value { font-size:1.3rem; font-variant-numeric:tabular-nums; }
.pm-reason,.pm-context,.pm-history { overflow-wrap:anywhere; }
.pm-scroll { overflow-x:auto; max-width:100%; margin:1.5rem 0; border:1px solid var(--rule); border-radius:12px; }
.pm table { border-collapse:collapse; width:100%; text-align:left; }
.pm caption { text-align:left; font-weight:bold; padding:1rem; }
.pm th { background:var(--surface-sunk); }
.pm th,.pm td { padding:1rem; border-bottom:1px solid var(--rule); vertical-align:top; min-width:140px; }
.pm td:first-child { overflow-wrap:anywhere; max-width:230px; }
.pm button { min-height:44px; overflow-wrap:anywhere; }
.pm :focus-visible { outline:3px solid var(--head); outline-offset:3px; }
@media(max-width:600px) { .pm-grid { grid-template-columns:1fr; } .pm-filters label { width:100%; } .pm { padding:1rem; } }

/* Pilot metrics shares the paper and forest Field kit of Admin Todo. */
.pm { --text:#223c25; --head:#223c25; --rule:#c7d1c9; --surface:#fdfbf6; --bg:#fbfaf8; --surface-sunk:#ebe4d4; color:#1a1f1c; background:#fbfaf8; font:14px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; padding:24px 36px 56px; min-height:100vh; max-width:none; }
.pm h1,.pm h2,.pm h3,.pm caption { font-family:inherit; color:#223c25; letter-spacing:0; }
.pm h1 { font-size:27px; font-weight:600; margin:0; }
.pm h2 { font-size:16px; margin:0 0 12px; font-weight:600; }
.pm h3 { font-size:13px; font-weight:500; color:#616b66; margin:0 0 12px; }
.pm p { margin:5px 0; }
.pm-nav { display:flex; gap:12px; align-items:center; color:#616b66; font-size:12px; border-bottom:1px solid #c7d1c9; padding-bottom:18px; margin-bottom:22px; }
.pm a { color:#386b4c; text-decoration:none; }
.pm-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.pm-header p,.pm-muted { color:#616b66; font-size:12px; }
.pm .btn,.pm-inspector { background:#fdfbf6; border:1px solid #c7d1c9; border-radius:5px; color:#223c25; font:inherit; padding:8px 14px; min-height:40px; }
.pm .btn:hover,.pm-inspector:hover { background:#ebe4d4; }
.pm .btn:disabled { opacity:.45; }
.pm-filters { background:#fdfbf6; border:1px solid #c7d1c9; border-radius:6px; padding:12px; gap:12px; margin:20px 0 8px; }
.pm-filters label { font-size:11px; color:#616b66; gap:5px; flex:1; }
.pm select { min-height:36px; width:100%; font:13px inherit; background:#fbfaf8; color:#223c25; border:1px solid #c7d1c9; border-radius:4px; }
.pm-status { color:#616b66; font-size:11px; min-height:17px; }
.pm-context { display:flex; align-items:center; flex-wrap:wrap; gap:18px; color:#616b66; font-size:12px; padding:14px 0; }
.pm-context h2 { margin:0; font-size:13px; color:#386b4c; }
.pm-context details { margin-left:auto; }
.pm-context details[open] { flex-basis:100%; }
.pm-warning { background:#efe8d6; border:1px solid #ded2b7; border-left:3px solid #c9893a; border-radius:4px; padding:10px 14px; font-size:12px; color:#805622; margin:0 0 18px; }
.pm-warning p { display:inline; margin-right:12px; }
.pm-warning strong { margin-right:14px; }
.pm-warning details { margin-top:4px; }
.pm-grid { grid-template-columns:repeat(7,minmax(0,1fr)); gap:10px; }
.pm-card { border-radius:5px; padding:15px; margin:0; min-width:0; background:#fdfbf6; border:1px solid #c7d1c9; }
.pm-value { display:block; font-size:30px; line-height:1.2; color:#223c25; font-weight:500; overflow-wrap:anywhere; }
.pm-measure:has(.pm-reason) .pm-value { font-size:17px; color:#616b66; }
.pm-measure p,.pm-measure small { font-size:10px; color:#616b66; line-height:1.4; display:block; }
.pm-reason { color:#616b66 !important; font-family:ui-monospace,monospace; font-size:10px !important; }
.pm-charts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:18px 0; }
.pm-chart,.pm-panel,.pm-quality { background:#fdfbf6; border:1px solid #c7d1c9; border-radius:5px; padding:16px; min-width:0; }
.pm-panel-title { display:flex; justify-content:space-between; }
.pm-panel-title h3 { font-size:14px; color:#223c25; margin-bottom:10px; }
.pm-panel-title span,.pm-chart-foot { font-size:11px; color:#616b66; }
.pm-chart svg { width:100%; display:block; max-height:190px; overflow:visible; }
.pm-gridline { stroke:#c7d1c9; stroke-width:1; stroke-dasharray:3 4; }
.pm-axis { fill:#616b66; font-size:10px; }
.pm-series { stroke:#386b4c; stroke-width:2.5; }
.pm-point { fill:#386b4c; stroke:#fdfbf6; stroke-width:2; }
.pm-chart:nth-child(2) .pm-series { stroke:#805622; }
.pm-chart:nth-child(2) .pm-point { fill:#805622; }
.pm-chart-empty { min-height:170px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#616b66; }
.pm-chart-empty strong { font-size:17px; font-weight:500; }
.pm-chart-empty small { font-size:11px; }
.pm-analysis { display:grid; grid-template-columns:1fr 1.4fr; gap:12px; margin:18px 0; }
.pm-quality .pm-grid { grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:14px; }
.pm-quality .pm-card { padding:12px; }
.pm-bar-row { display:grid; grid-template-columns:90px 1fr 32px; gap:12px; align-items:center; margin:20px 0; font-size:12px; }
.pm-bar-row strong { text-align:right; font-variant-numeric:tabular-nums; }
.pm-bar-track { height:15px; background:#ebe4d4; border-radius:2px; }
.pm-bar { height:100%; background:#386b4c; border-radius:2px; }
.pm-scroll { margin:18px 0 8px; border-radius:5px; background:#fdfbf6; }
.pm caption { font-size:14px; padding:14px 16px; }
.pm th,.pm td { min-width:0; padding:10px 16px; border-bottom:1px solid #c7d1c9; font-size:12px; white-space:nowrap; }
.pm th { background:#f2efe5; color:#616b66; font-weight:500; }
.pm td { color:#1a1f1c; }
.pm tr:last-child td { border-bottom:0; }
.pm-compact .pm-value { font-size:13px !important; }
.pm-compact .pm-measure p { display:none; }
.pm-compact small { font-size:10px; }
.pm-inspector { border:0; padding:0; background:transparent; color:#386b4c; min-height:32px; font-size:12px; text-align:left; }
.pm details { font-size:12px; color:#616b66; }
.pm summary { cursor:pointer; padding:6px 0; }
.pm-data { border:1px solid #c7d1c9; border-radius:5px; padding:8px 16px; margin-top:18px; background:#fdfbf6; }
.pm-history .pm-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.pm :focus-visible { outline:2px solid #c9893a; outline-offset:3px; }
@media(min-width:1600px) { .pm-charts { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:1000px) { .pm-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } .pm-analysis { grid-template-columns:1fr; } }
@media(max-width:600px) { .pm { padding:16px 14px 36px; } .pm h1 { font-size:23px; } .pm-nav { font-size:10px; } .pm-header { align-items:start; } .pm-header .btn { font-size:11px; white-space:nowrap; padding:8px; } .pm-filters { display:grid; grid-template-columns:1fr 1fr; gap:10px; } .pm-filters label { width:auto; } .pm-filters button { grid-column:1/-1; } .pm-grid,.pm-quality .pm-grid,.pm-history .pm-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .pm-charts { grid-template-columns:1fr; } .pm-card { padding:12px; } .pm-value { font-size:28px; } .pm-context { gap:8px 14px; } .pm-context details { margin-left:0; } .pm-warning p { display:block; } .pm th,.pm td { padding:10px; } }
.pm-compact .pm-measure p { display:block; white-space:normal; max-width:180px; }

/* Calm overview first; supporting metrics stay one click away. */
.pm { padding:35px 5vw 80px; background-image:linear-gradient(#223c2505 1px,transparent 1px),linear-gradient(90deg,#223c2505 1px,transparent 1px);background-size:28px 28px; }
.pm h1,.pm h2,.pm h3,.pm caption { font-family:"Iowan Old Style",Georgia,serif;font-weight:400; }
.pm h1 { font-size:clamp(34px,4vw,48px);letter-spacing:-.025em;line-height:1.13; }
.pm-header { margin:28px 0; }.pm-header p { font-size:15px;margin-top:14px;max-width:650px; }
.pm-overview { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:22px 0; }
.pm-overview .pm-card { padding:24px;display:flex;flex-direction:column;gap:14px; }.pm-overview h2{font-size:25px;margin:0}.pm-overview .pm-value{font:48px/1.1 Georgia,serif}.pm-overview .pm-muted{font-size:13px;}
.pm-card,.pm-chart,.pm-panel,.pm-quality,.pm-scroll,.pm-data { border-radius:12px;box-shadow:0 1px 2px #1a1f1c06; }
.pm .btn { border-radius:7px;min-height:44px; }.pm-header .btn { background:#386b4c;color:#fbfaf8;border-color:#386b4c; }
.pm summary { padding:16px 0;font-size:14px;font-weight:600; }.pm-data { padding:0 20px;margin:18px 0; }.pm-data[open] { padding-bottom:20px; }.pm-data .pm-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));}
.pm-filters { border:0;padding:0;background:transparent; }.pm-warning { border-radius:9px; }.pm-inspector { color:#386b4c;text-decoration:underline;text-underline-offset:3px; }.pm-nav { flex-wrap:wrap; }.pm-nav span{font-size:11px;letter-spacing:.12em;}
@media(max-width:700px){.pm{padding:22px 16px 40px}.pm-overview{grid-template-columns:1fr;gap:12px}.pm-overview .pm-card{padding:20px}.pm-header{align-items:flex-start;flex-wrap:wrap}.pm-analysis,.pm-charts{grid-template-columns:1fr}.pm-context details{margin-left:0}}
