/* ---- css/approvals.css */
/* Approval cards (wave 2 brief 3, Brandon Q11): components/approval-card.js, on Today, in Alerts and in the conversation.
   Scoped to .apr-* and .approvals only. Tokens only (light and dark come from app.css). 44px targets at 375px. */

.apr-list { display: grid; gap: 8px; margin: 0 0 12px; }
.apr-list.apr-gutter { margin: 4px var(--gutter) 16px; }   /* Alerts: its rows run edge to edge */
.apr-card { border: 1px solid var(--card-line); border-radius: var(--r-md); background: var(--surface); padding: 12px 14px; display: grid; gap: 8px; min-width: 0; }
.apr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.apr-kind { flex: none; }
.apr-who { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
a.apr-who { text-decoration: none; }
a.apr-who:active { color: var(--copper-text); }
.apr-why { color: var(--ink-2); font-size: 15px; line-height: 21px; overflow-wrap: anywhere; }

/* the exact text, as the customer will get it */
.apr-msg { display: grid; gap: 4px; justify-items: end; }
.apr-msg-label { font-size: 13px; color: var(--ink-3); justify-self: start; }
.apr-bubble { max-width: 100%; padding: 9px 13px; border-radius: 18px; border-bottom-right-radius: 5px; border: 1px solid var(--evergreen-tint-line);
  background: var(--evergreen-tint); color: var(--ink); font-size: 16px; line-height: 22px; overflow-wrap: anywhere; white-space: pre-wrap; }
.apr-action { font-size: 16px; line-height: 22px; color: var(--ink); overflow-wrap: anywhere; }

.apr-actions { display: flex; gap: 8px; }
.apr-actions .btn { flex: 1 1 0; min-height: var(--tap); }
.apr-status:empty { display: none; }
.apr-status { font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* decided: the quiet line for the rest of the day */
.apr-card.apr-done { background: var(--surface-2); border-color: var(--line); }
.apr-line { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; min-width: 0; }
.apr-line .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.apr-line b { font-weight: 600; color: var(--ink); }

/* the Decline sheet */
.apr-sheet-sub { margin-top: 6px; color: var(--ink-2); }
.apr-reason { width: 100%; }

/* Today: the section above Needs you */
.approvals { margin-bottom: 16px; }

/* Settings, Follow-ups (web/app/js/settings/followups.js) */
.fu-rows { display: grid; gap: 8px; }
.fu-row { border: 1px solid var(--card-line); border-radius: var(--r-md); background: var(--surface); padding: 12px 14px; display: grid; gap: 10px; min-width: 0; }
.fu-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fu-label { font-weight: 600; color: var(--ink); }
.fu-switch { margin-top: 2px; }   /* the shared .switch (settings.css): 52 x 32 with a 44 px touch area */
.fu-sentence { color: var(--ink-2); line-height: 22px; overflow-wrap: anywhere; }
.fu-days { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fu-days select { min-height: var(--tap); border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); padding: 0 10px; font: inherit; }
.fu-text summary { min-height: var(--tap); display: flex; align-items: center; color: var(--copper-text); cursor: pointer; }
.fu-text .apr-bubble { margin-top: 4px; }
.fu-note { font-size: 13px; color: var(--ink-3); }
.fu-saved { font-size: 13px; color: var(--ok-text); }
.fu-saved:empty { display: none; }

/* ---- css/back-link.css */
/* back-link.css: W3 QA #46, the back link above the title on the sub-screens of More and Settings (components/back-link.js).
 * Scoped to its own classes; .backlink itself is app.css's (an inline link: the title under it starts its own line). */
.title-back { min-width: 0; }
@media (min-width: 1024px) {
  .back-phone { display: none; }   /* back to More: the computer's side menu has no More, it lists the screen itself */
}

/* ---- css/calling.css */
/* calling.css: wave 2 brief 10, calls in the app: the incoming-call card (.ic-*) and the in-call panel (.cp-*), both inside the
 * one call layer the shell mounts on <body> (.call-layer, components/shell.js). Served inside /app/features.css after app.css,
 * in file-name order. Every rule is scoped to these classes; shared classes (.btn, .field, .sheet) are used as they are.
 * Phone: pinned above the tab bar. Computer (1024 px and up): top right, beside the side menu. Above the tab bar (20), below a
 * sheet's scrim (40) and the toast (50), so Book a visit's sheet covers it while it is open. Tokens only (light and dark). */

.call-layer {
  position: fixed; z-index: 30; left: 8px; right: 8px;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
  display: grid; gap: 8px; pointer-events: none;
}
.call-layer > * { pointer-events: auto; }
@media (min-width: 1024px) {
  .call-layer { top: 16px; right: 16px; bottom: auto; left: auto; width: 380px; }
}

/* ---- the ring */
.ic-card, .cp-panel {
  display: grid; gap: 10px; padding: 14px; border-radius: var(--r-lg);
  background: var(--evergreen); color: var(--on-evergreen); box-shadow: var(--shadow);
  max-height: calc(100vh - var(--tabbar-h) - 32px); overflow-y: auto;
  animation: ic-in var(--dur-sheet-in) var(--ease-out) both;
}
@keyframes ic-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ic-head, .cp-head { display: flex; align-items: center; gap: 12px; }
.ic-ring {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--copper); color: var(--on-copper); animation: ic-pulse 1.2s var(--ease-out) infinite;
}
.ic-ring .icon { width: 20px; height: 20px; }
@keyframes ic-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .ic-ring, .ic-card, .cp-panel { animation: none; } }
.ic-who, .cp-who { min-width: 0; flex: 1; }
.ic-title, .cp-title {
  margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere;
}
.ic-sub, .cp-sub { margin: 0; font-size: 14px; line-height: 20px; color: var(--evergreen-2); font-variant-numeric: tabular-nums; }
.ic-sub:empty, .cp-sub:empty { display: none; }

.ic-details, .cp-details { display: grid; gap: 6px; }
.ic-details:empty, .cp-details:empty { display: none; }
.ic-addr, .cp-addr { margin: 0; font-size: 14px; line-height: 20px; color: var(--evergreen-2); overflow-wrap: anywhere; }
.ic-lines, .cp-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ic-line, .cp-l { font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.ic-site, .cp-site { display: flex; gap: 6px; margin: 0; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.ic-site .icon, .cp-site .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.ic-tags, .cp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.ic-tag, .cp-tag {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  border: 1px solid var(--evergreen-2); font-size: 13px; font-weight: 500;
}
.ic-note { margin: 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--attn-bg); color: var(--attn-text); font-size: 15px; line-height: 21px; font-weight: 600; }
.ic-note:empty { display: none; }
/* W3 QA #42: an URGENT nobody acknowledged yet (the Inbox's red dot), on a light chip so the red reads on the evergreen card */
.ic-urgent {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 2px 10px; border-radius: var(--r-pill);
  background: var(--danger-bg); color: var(--danger-text); font-size: 14px; line-height: 20px; font-weight: 600;
}

/* Decline and Answer: 48 px (podium P4), Answer filled copper, side by side */
.ic-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ic-buttons .btn { min-height: 48px; font-size: 16px; }
.ic-decline { background: transparent; border-color: var(--evergreen-2); color: var(--on-evergreen); }
.ic-decline:active { background: var(--danger-fill); border-color: var(--danger-fill); }
.ic-buttons .btn:only-child { grid-column: 1 / -1; }

/* ---- the call in progress */
.cp-line { margin: 0; font-size: 14px; line-height: 20px; color: var(--evergreen-2); }
.cp-status { font-variant-numeric: tabular-nums; color: var(--on-evergreen); font-weight: 600; }
.cp-toggle {
  flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0 6px;
  border: 0; background: transparent; color: var(--evergreen-2); font: inherit; font-size: 14px; cursor: pointer;
}
.cp-toggle .icon { width: 18px; height: 18px; transform: rotate(180deg); transition: transform var(--dur-release) var(--ease-out); }
.cp-toggle[aria-expanded="false"] .icon { transform: none; }
.cp-tools, .cp-call-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-tools:empty { display: none; }
.cp-tools .btn, .cp-call-row .btn { background: transparent; border-color: var(--evergreen-2); color: var(--on-evergreen); }
.cp-tools .btn-primary { background: var(--copper); border-color: var(--copper); color: var(--on-copper); }
.cp-call-row .cp-end { margin-left: auto; background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-copper); }
.cp-mute[aria-pressed="true"] { background: var(--on-evergreen); color: var(--evergreen); }
.cp-small .cp-head { gap: 8px; }
.cp-small { gap: 6px; padding: 10px 14px; }

/* the two sheets (Save as customer, Add a note) */
.cp-form { display: grid; gap: 10px; }
.cp-form .field { margin-top: 0; }
.cp-form input, .cp-form textarea { width: 100%; }
.cp-hint { margin: 0; color: var(--ink-2); }

/* ---- css/calls.css */
/* calls.css: wave 1 brief 6, the call card (components/call-card.js) in a conversation and on the Customer File.
 * Served inside /app/features.css after app.css, in file-name order. Every rule is scoped to .callcard (docs/BUILDERS.md).
 * Colours come from tokens.css only, so light and dark follow the theme. */
.callcard {
  display: grid; gap: 8px; min-width: min(280px, 100%); max-width: 100%;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card);
}
.callcard.out { background: var(--surface-2); }
.callcard-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 24px; }
.callcard-icon { display: inline-flex; color: var(--copper-text); }
.callcard-icon .icon { width: 18px; height: 18px; }
.callcard-title { font-weight: 600; }
.callcard-time { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.callcard-head .outcome-chip { margin-left: auto; }
.callcard-summary { display: grid; gap: 4px; }
.callcard-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.callcard-lines li { line-height: 21px; overflow-wrap: anywhere; }
.callcard-from { margin: 0; color: var(--ink-3); font-size: 13px; }
.callcard-fine { margin: 0; color: var(--ink-3); font-size: 12px; line-height: 16px; }
.callcard-note { margin: 0; color: var(--ink-3); font-style: italic; }
.callcard-led { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--ink-2); }
.callcard-led .icon { width: 16px; height: 16px; flex: none; }
.callcard-led a { color: var(--copper-text); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.callcard-led.faint { color: var(--ink-3); }
.callcard-play { display: grid; gap: 6px; justify-items: start; }
.callcard-play audio { width: 100%; max-width: 320px; }
.callcard-tx { display: grid; gap: 6px; justify-items: start; }
.callcard-more { min-height: 44px; }
.callcard-transcript { margin: 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--muted-bg); color: var(--ink-2); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.callcard-details { display: grid; gap: 6px; justify-items: start; padding-top: 8px; border-top: 1px solid var(--line); }
.callcard-details .btn { min-height: 44px; }
.callcard-added { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.callcard-added.ok { color: var(--ok-text); }
.callcard-added .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.callcard-callback { margin: 0; font-size: 14px; }
.callcard-callback a { color: var(--copper-text); min-height: 44px; display: inline-flex; align-items: center; }
.callcard-details .hint:empty { display: none; }
.callcard-play .btn { min-height: 44px; }

/* ---- css/estimates.css */
/* estimates.css: workstream D: the Estimates screen and its upload sheet's customer picker.
 * Served inside /app/features.css (services/api/static.js), after app.css, in file-name order. Scope every rule to this
 * feature's own classes; anything two features share belongs in app.css (docs/BUILDERS.md). */
/* estimates */
.est .topbar { align-items: flex-start; }
.est .topbar > div { min-width: 0; }
/* a phone: the title and its line take the full width, the Upload button goes under them (W3 QA: the line wrapped to three
   narrow lines beside the button) */
@media (max-width: 479px) { .est .topbar { flex-wrap: wrap; } .est .topbar > div { flex: 1 1 100%; } .est .topbar .est-upload { order: 2; } }
.est-upload { flex: none; white-space: nowrap; }
.est-stats { padding: 4px var(--gutter) 0; }
.est .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }   /* Today's tiles are scoped to .today (css/today.css): the two never share a rule */
.est .stat { display: grid; align-content: start; gap: 2px; padding: 12px 12px 10px; border: 1px solid var(--card-line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-card); }
.est .stat-label { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.est .stat-value { font-size: 22px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.est .stat-note { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.est .stat.is-main { background: var(--brand-fill); border-color: var(--brand-fill); color: var(--on-evergreen); box-shadow: none; }
.est .stat.is-main .stat-label, .est .stat.is-main .stat-note { color: var(--evergreen-2); }
.est .stat.is-ok .stat-value { color: var(--ok-text); }
@media (max-width: 479px) { .est .stat-value { font-size: 18px; line-height: 24px; } .est .stat { padding: 10px; } }
.est-l2 { flex-wrap: wrap; }
.est-when { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.est-empty .btn { margin-top: 16px; }
.est-build { padding: 8px var(--gutter) 0; margin-top: 20px; }
.build { padding: 18px 16px; border-style: dashed; border-color: var(--line-2); background: var(--surface-2); box-shadow: none; }
.build-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.build-top .section-title { margin: 0; }
.build-lead { margin-top: 6px; color: var(--ink-2); font-size: 15px; line-height: 22px; max-width: 62ch; }
.build-panels { display: grid; gap: 10px; margin-top: 16px; }
.build-panel { display: grid; grid-template-columns: 24px 1fr; gap: 2px 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); opacity: .92; }
.build-panel .icon { grid-row: 1 / span 2; color: var(--ink-3); margin-top: 2px; }
.build-panel b { font-size: 15px; line-height: 22px; }
.build-panel p { font-size: 14px; line-height: 20px; color: var(--ink-3); }
.build-flow { display: grid; gap: 14px; margin: 18px 0 16px; align-items: center; }
.flow-col { display: grid; gap: 8px; align-content: start; }
.flow-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.flow-inputs li { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); font-size: 14px; color: var(--ink-2); background: var(--surface); }
.flow-inputs .icon { width: 16px; height: 16px; color: var(--ink-3); }
.flow-arrow { display: none; color: var(--ink-3); }
.flow-arrow .icon { transform: rotate(180deg); }
.tiers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }   /* one drafted estimate (no Good / Better / Best) */
.tier { display: grid; gap: 8px; padding: 10px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.tier b { font-size: 13px; }
.tier-lines { display: grid; gap: 5px; }
.sk { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.sk.short { width: 60%; }
.tier-total { height: 10px; width: 50%; border-radius: 3px; background: var(--line-2); }
.tier-better { border-color: var(--copper-tint-line); background: var(--copper-tint); }
.flow-caption { font-size: 13px; color: var(--ink-3); }
.build .btn[disabled] { opacity: .5; }
.build .hint { margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
@media (min-width: 640px) {
  .build-panels { grid-template-columns: 1fr 1fr; }
  .build-flow { grid-template-columns: 1fr 28px 1fr; }
  .flow-arrow { display: block; }
}
@media (min-width: 1024px) { .est .search-wrap { position: static; } }

/* the upload sheet's customer picker */
.steps { margin: 12px 0 0; padding: 0; display: grid; gap: 6px; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.steps li::before { content: counter(step); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--evergreen-tint); color: var(--evergreen-text); font-size: 12px; font-weight: 600; }
.pick-label { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.pick-list { margin-top: 4px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; color: var(--ink); font-size: 16px; }
.pick .icon { margin-left: auto; transform: rotate(180deg); color: var(--ink-3); width: 18px; height: 18px; }
.pick-text { display: grid; min-width: 0; }
.pick-text small { color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-none { padding: 14px 4px; color: var(--ink-3); font-size: 15px; }
.pick .avatar.sm { width: 32px; height: 32px; font-size: 12px; }   /* D: the estimate customer picker; scoped at the merge so the Inbox rows (B) keep 40px */

/* ---- css/feedback.css */
/* feedback.css: "Report a problem" (docs/build-log/report-a-problem.md): the sheet, the side-menu and More entries, the founders'
 * "Problem reports" screen. Every selector carries an fb- class of its own; colors and sizes come from the shared tokens. */

/* the sheet */
.fb-form .field textarea { width: 100%; min-height: 120px; resize: vertical; }
.fb-form .field + .field textarea { min-height: 84px; }
.fb-note { margin-top: 14px; font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* More list on a phone: the same row as the links, but a button */
.more-link.fb-more-btn { width: 100%; background: none; border: 0; text-align: left; font: inherit; cursor: pointer; }

/* side menu on a computer (hidden on a phone together with its .nav-desk item) */
@media (min-width: 1024px) {
  .tabbar .fb-nav {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px;
    background: none; border: 0; border-radius: 10px; font: inherit; font-size: 15px; line-height: 20px; text-align: left;
    color: var(--ink-2); cursor: pointer;
  }
  .tabbar .fb-nav svg { box-sizing: border-box; width: 20px; height: 20px; padding: 0; border-radius: 0; background: none; color: var(--ink-3); }
  .tabbar .fb-nav:active { background: var(--press-bg); }
}
@media (min-width: 1024px) and (hover: hover) {
  .tabbar .fb-nav:hover { background: var(--surface-2); color: var(--ink); }
}

/* founders' screen */
.fb-reports .fb-tabs { display: flex; gap: 8px; margin: 12px var(--gutter) 0; }
.fb-tab {
  min-height: var(--tap); padding: 0 16px; border-radius: 22px; border: 1px solid var(--field-line); background: var(--surface);
  color: var(--ink-2); font-weight: 500;
}
.fb-tab[aria-pressed="true"] { background: var(--copper-tint); border-color: transparent; color: var(--copper-text); font-weight: 600; }
.fb-body { margin: 12px var(--gutter) 24px; }
.fb-list { display: grid; gap: 12px; }
.fb-card { padding: 14px 16px; }
.fb-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 14px; color: var(--ink-2); }
.fb-head b { color: var(--ink); font-size: 16px; }
.fb-meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.fb-meta dd { min-width: 0; overflow-wrap: anywhere; }
.fb-label { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--evergreen-text); }
.fb-text { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.fb-done { margin-top: 10px; font-size: 14px; color: var(--ok-text); }
.fb-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.fb-more { width: 100%; margin-top: 12px; }

/* ---- css/house.css */
/* ---- the House card on the Customer File and the permit packet sheet (wave 2 brief 9): .hs-* and .pp-*, plus the
   off-screen textarea device.copyText uses as its fallback (.device-copy, made only by web/app/js/device.js). Scoped to its own
   classes (docs/BUILDERS.md); tokens only, no hex and no colour-scheme media query (tokens.css handles light and dark). */

/* ---- the card */
.hs { margin: 12px var(--gutter) 0; padding: 14px; border: 1px solid var(--card-line); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.hs-label {
  display: flex; align-items: center; gap: 6px; margin: 0;
  font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em;
}
.hs-label .icon { width: 16px; height: 16px; flex: none; }
.hs-muted { color: var(--ink-3); }
.hs-small { font-size: 13px; line-height: 18px; }
.hs-small .icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* the photo, or a plain tile with the address */
.hs-photo { margin: 10px 0 0; }
.hs-img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.hs-credit { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.hs-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin-top: 10px; padding: 16px;
  aspect-ratio: 8 / 5; max-height: 200px; box-sizing: border-box; border-radius: var(--r-sm); border: 1px dashed var(--line-2);
  background: var(--surface-2); color: var(--ink-2); text-align: center; min-width: 0;
}
.hs-tile .icon { width: 22px; height: 22px; color: var(--ink-3); }
.hs-tile-addr { font-weight: 600; overflow-wrap: anywhere; }
.hs-tile-line { font-size: 13px; color: var(--ink-3); }

.hs-addr-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.hs-addr { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink); overflow-wrap: anywhere; min-width: 0; flex: 1 1 180px; }
.hs-maps { min-height: var(--tap); }

/* public records */
.hs-records { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.hs-records .btn { min-height: var(--tap); margin-top: 6px; }
.hs-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.hs-facts dt { font-size: 14px; line-height: 22px; font-weight: 600; color: var(--ink-2); }
.hs-facts dd { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink); overflow-wrap: anywhere; }
.hs-facts dd.hs-muted { color: var(--ink-3); }
.hs-note { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.hs-source { margin: 6px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-3); }

/* links */
.hs-links { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.hs-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.hs-link { min-height: var(--tap); max-width: 100%; }
.hs-link span { overflow-wrap: anywhere; }

/* jobs: the packet button, Permit sent, and (only when unlocked) the lien lines */
.hs-jobs { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.hs-job { min-width: 0; }
.hs-job-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.hs-job-title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; min-width: 0; flex: 1 1 140px; }
.hs-job-head .btn { min-height: var(--tap); }
.hs-job .hs-small { margin: 6px 0 0; color: var(--ink-2); }
.hs-lien { margin-top: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); }
.hs-lien p { margin: 0 0 6px; }
.hs-lien-title { font-weight: 600; color: var(--ink); }
.hs-deadline { font-weight: 600; color: var(--attn-text); }
.hs-paid { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.hs-paid .btn { min-height: var(--tap); }
.hs-paid .hs-on { border-color: var(--evergreen); color: var(--evergreen-text); background: var(--evergreen-tint); }

/* ---- the permit packet sheet */
.pp-job { margin: 0 0 4px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pp-note { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; line-height: 22px; }
.pp-muted { color: var(--ink-3); }
.pp-small { font-size: 13px; line-height: 18px; margin: 4px 0 0; overflow-wrap: anywhere; }
.pp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.pp-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.pp-label { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.pp-value { font-size: 16px; line-height: 22px; color: var(--ink); overflow-wrap: anywhere; user-select: text; }
.pp-value.pp-muted { color: var(--ink-3); }
.pp-copy { flex: none; min-height: var(--tap); min-width: 72px; }
.pp-copy.pp-done { border-color: var(--evergreen); color: var(--evergreen-text); }
.pp-actions { display: grid; gap: 8px; margin-top: 16px; }
.pp-site { justify-content: center; }
.pp-sent { display: flex; align-items: center; gap: 6px; margin: 4px 0; color: var(--evergreen-text); font-weight: 600; }
.pp-sent .icon { width: 18px; height: 18px; }

/* ---- device.copyText's fallback textarea: off screen, never seen */
.device-copy { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---- css/inbox-done.css */
/* inbox-done.css: wave 1, brief 1: the Inbox lists (Needs reply / Done) and the Done controls in a conversation.
 * Scoped to its own classes; inbox.css (brief 2) and app.css are not touched. Colors come from the shared tokens, so light,
 * dark and the theme switch follow without a rule here. The Done / Reopen and Send and done buttons are plain .btn .btn-sm
 * (brief 0 owns button sizes and the 44 px hit area). */
.irow-done { color: var(--ok-text); font-weight: 500; }
.irow-l3 .irow-done::before { display: none; }
.done-btn, .send-done { flex: none; white-space: nowrap; }
.done-btn.is-done { color: var(--ink-2); }

/* ---- css/inbox.css */
/* inbox.css: workstream B: the Inbox (conversations, reply by text) and the B2 call bar.
 * Served inside /app/features.css (services/api/static.js), after app.css, in file-name order. Scope every rule to this
 * feature's own classes; anything two features share belongs in app.css (docs/BUILDERS.md). */
/* ------------------------------------------------------------------ B: inbox (conversations, reply by text) */
.inbox-filters { padding-bottom: 0; }
.irows { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.irow {
  display: flex; gap: 12px; align-items: flex-start; min-height: 76px; padding: 12px var(--gutter) 12px calc(var(--gutter) - 3px);
  border-left: 3px solid transparent; border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.irows li:last-child .irow { border-bottom: 0; }
.irow:active { background: var(--surface-2); }
/* one unread mark (feel spec 5.5): an 8 px copper dot before the name; no wash, no side bar, no count badge (the tab badge counts) */
.irow.unread .irow-name::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--copper); vertical-align: middle; }
/* .irow[aria-current="page"]: the copper tint with a 3 px copper edge comes from app.css */
.irow-main { flex: 1; min-width: 0; }
.irow-l1 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.irow-name { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; }
.irow.unread .irow-name { font-weight: 700; }
.irow-time { flex: none; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.irow.unread .irow-time { color: var(--copper-text); font-weight: 600; }
.irow-l2 { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--ink-3); font-size: 14px; line-height: 20px; }
.irow-snip { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irow.unread .irow-snip { color: var(--ink); }
.irow-l3 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 13px; line-height: 18px; }
.irow-l3:empty { display: none; }
.irow-next { color: var(--ink-2); font-weight: 600; }
.irow-next.hot { color: var(--attn-text); }   /* copper means "tap" (feel spec 5.6) */
.irow-job { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14em; }
.irow-next.danger { color: var(--danger-text); }   /* an URGENT nobody acknowledged: "Call now" */
/* no "·" separators: when the line wraps, a dot would start the next line (W3 QA); the gap and the colours separate them */
.irow-auto { color: var(--ok-text); font-weight: 500; }

/* the conversation */
.inbox-pane { display: none; }
.screen.inbox.has-thread .inbox-pane { display: block; }
.screen.inbox.has-thread .inbox-list { display: none; }
.screen.inbox.has-thread { padding-bottom: 0; }
.screen.inbox.has-thread ~ .tabbar { display: none; }
.thread { display: flex; flex-direction: column; min-height: 100dvh; }
.thread-head {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) var(--gutter) 10px; background: var(--paper); border-bottom: 1px solid var(--line);
}
.thread-back { flex: none; margin-right: -4px; }
.thread-back { font-size: 0; gap: 0; }            /* the phone shows only the arrow: the page title says where you are */
.thread-back svg { width: 24px; height: 24px; }
.thread-who { flex: 1; min-width: 0; }
.thread-who h2 { font-family: var(--font-display); font-size: 20px; line-height: 26px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-who h2 a { color: inherit; text-decoration: none; }
.thread-who p { font-size: 13px; line-height: 18px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-head .btn.call { flex: none; color: var(--evergreen-text); border-color: var(--evergreen-tint-line); }
.thread-ctx { padding: 0 var(--gutter); background: var(--paper); }
.ctx-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0 0; font-size: 14px; line-height: 20px; }
.ctx-next { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--attn-text); }
.ctx-next.danger { color: var(--danger-text); }
.ctx-job { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.ctx-job .icon { width: 15px; height: 15px; color: var(--ink-3); }
.thread-ctx .auto { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--ink-2); }
.thread-ctx .auto.paused { background: var(--ok-bg); border-color: transparent; color: var(--ok-text); }
.thread-ctx .auto .btn-quiet { color: inherit; text-decoration: underline; padding: 0 4px; }
.thread-log { flex: 1; padding: 6px 0 16px; outline: none; }
.msgs { display: flex; flex-direction: column; gap: 8px; padding: 0 var(--gutter); }
.msgs .day { align-self: center; margin: 12px 0 2px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); }
.msgs .day span { padding: 3px 10px; border-radius: 999px; background: var(--muted-bg); color: var(--muted-text); }
.msg { display: flex; flex-direction: column; max-width: 88%; min-width: 0; }
.msg.in { align-self: flex-start; }
.msg.you, .msg.auto { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 9px 13px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; line-height: 22px; overflow-wrap: anywhere; min-width: 0; }
.msg.in .bubble { border-bottom-left-radius: 5px; }
.msg.you .bubble { background: var(--evergreen); border-color: var(--evergreen); color: var(--on-evergreen); border-bottom-right-radius: 5px; }
.msg.auto .bubble { background: var(--auto-bg); border: 1px solid var(--auto-line); color: var(--auto-text); border-bottom-right-radius: 5px; }   /* pale evergreen: sent by the system (the word "Automatic" is always under it) */
.msg-text { white-space: pre-wrap; }
.msg-text.faint { color: var(--ink-3); font-style: italic; }
.msg-kind { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.msg-kind + .msg-text, .msg-kind + .msg-player { margin-top: 6px; }
.msg-kind .icon { width: 16px; height: 16px; color: var(--copper-text); }
.msg.call .bubble { min-width: min(260px, 100%); }
.msg-player { display: grid; gap: 6px; margin: 6px 0; justify-items: start; }
.msg-player audio { width: 100%; max-width: 320px; }
.msg-meta { display: flex; flex-wrap: wrap; gap: 0 8px; margin: 3px 6px 0; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.msg.you .msg-meta, .msg.auto .msg-meta { justify-content: flex-end; }
.msg-meta span + span::before, .msg-meta span + time::before, .msg-meta time + span::before { content: "· "; }
.msg-status.held { color: var(--attn-text); font-weight: 600; }
.msg-meta .msg-status.held { flex-basis: 100%; text-align: inherit; }   /* its own line, so no "·" starts a line (W3 QA) */
.msg-meta .msg-status.held::before { content: none; }
.msg.you .msg-meta .msg-status.held, .msg.auto .msg-meta .msg-status.held { text-align: right; }
.msg-status.not_sent { color: var(--danger-text); font-weight: 600; }
.msg-who { font-weight: 600; }
.msgs .sys { align-self: center; max-width: 94%; text-align: center; font-size: 12px; line-height: 16px; color: var(--ink-3); padding: 2px 0; }
.msgs .sys .sys-link { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); margin: -14px 0; padding: 0 10px; color: inherit; text-decoration: none; border-radius: 999px; -webkit-tap-highlight-color: transparent; }
.msgs .sys .sys-link:active { background: var(--muted-bg); }
.msgs .sys .sys-link:focus-visible { outline: 2px solid var(--copper); outline-offset: -2px; }
.msgs .sys .icon { width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; }
.msgs .sys.bad { color: var(--danger-text); background: var(--danger-bg); border-radius: 999px; padding: 4px 12px; }
.hint.center { text-align: center; padding: 12px var(--gutter); }
.reply {
  position: sticky; bottom: 0; z-index: 15; background: var(--surface); border-top: 1px solid var(--line);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
}
.reply-box { display: flex; align-items: flex-end; gap: 8px; }
.reply-box textarea {
  flex: 1; min-width: 0; min-height: var(--tap); max-height: 160px; padding: 10px 14px; resize: none;
  border: 1px solid var(--line-2); border-radius: 22px; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 22px; font-family: inherit;
}
.reply-box textarea:focus { outline: none; border-color: var(--copper); }
.reply-box .btn-primary { flex: none; border-radius: 22px; padding: 0 16px; }
.reply-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 6px 0; min-height: 18px; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.reply-foot .counter { font-size: 12px; white-space: nowrap; }
.reply-foot { flex-wrap: wrap; }
.reply-foot .how { flex: 1 1 150px; min-width: 0; }   /* "From your business number" stays on one line on a phone (W3 QA) */
.reply-blocked { display: grid; gap: 10px; justify-items: start; }
.reply-blocked p { color: var(--ink-2); font-size: 15px; line-height: 22px; }
.pane-empty { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 320px; padding: 24px; text-align: center; color: var(--ink-3); }
.pane-empty .icon { color: var(--copper-text); opacity: .7; }

@media (min-width: 1024px) {
  .screen.inbox { max-width: none; margin-left: calc(var(--sidebar-w) + 24px); margin-right: 24px; padding-bottom: 0; display: grid; grid-template-columns: minmax(340px, 400px) minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .screen.inbox .inbox-list, .screen.inbox.has-thread .inbox-list { display: block; }
  .screen.inbox .inbox-pane, .screen.inbox.has-thread .inbox-pane { display: block; position: sticky; top: 20px; height: calc(100dvh - 40px); margin-top: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-card); overflow: hidden; }
  .screen.inbox.has-thread ~ .tabbar { display: flex; }
  .inbox-list .topbar { padding-top: 28px; }
  .irows { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
  .thread { height: 100%; min-height: 0; }
  .thread-head { position: static; padding: 14px 20px; background: var(--surface); }
  .thread-back { display: none; }
  .thread-ctx { padding: 0 20px 4px; }
  .thread-log { overflow-y: auto; padding: 8px 8px 12px; }
  .msgs { padding: 0 12px; }
  .msg { max-width: 76%; }
  .reply { position: static; padding: 12px 20px 14px; }
  .pane-empty { height: 100%; }
}

/* B2: the in-app call bar (above the reply box) */
.callhost:empty { display: none; }
.callbar { margin: 0 var(--gutter) 8px; padding: 10px 12px; border-radius: var(--r-md); background: var(--evergreen); color: var(--on-evergreen); display: grid; gap: 8px; }
.callbar-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.callbar-who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.callbar-status { font-variant-numeric: tabular-nums; color: var(--evergreen-2); }
.callbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.callbar .btn { background: transparent; border-color: var(--evergreen-2); color: var(--on-evergreen); }
.callbar .btn[aria-pressed="true"] { background: var(--on-evergreen); color: var(--evergreen); }
.callbar .btn-end { background: var(--danger-fill); border-color: var(--danger-fill); color: #FFFFFF; }
.callbar-note { font-size: 12px; line-height: 16px; color: var(--evergreen-2); }
@media (min-width: 1024px) { .callbar { margin: 0 20px 8px; } }

/* wave 1 builder 2: the view switch, crew notes, ready-made replies */
.thread-view { padding: 10px var(--gutter) 0; background: var(--paper); }
.thread-view:empty { display: none; }
.inbox-pane .seg { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--muted-bg); border: 1px solid var(--line); }
.inbox-pane .seg-btn {
  position: relative; min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.inbox-pane .seg-btn::after { content: ""; position: absolute; inset: -6px 0; }     /* a 44 px target around the 32 px control */
.inbox-pane .seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line-2); }
.inbox-pane .seg-btn:focus-visible { outline: 2px solid var(--copper); outline-offset: 1px; }
.msgs .note-card { align-self: stretch; padding: 9px 13px; border-radius: var(--r-md); background: var(--attn-bg); color: var(--attn-text); border: 1px solid transparent; }
.note-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; line-height: 18px; font-weight: 600; }
.note-card-head .icon { width: 15px; height: 15px; flex: none; }
.note-pinned { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-weight: 600; }
.note-card-body { margin-top: 4px; font-size: 16px; line-height: 22px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--attn-text); }
.reply-modes { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.reply-modes .replies-btn { flex: none; }
/* W3 QA #49: each chip is at least as wide as its words (the rest of the row is shared out) and the row wraps, so no label is
   cut ("Someone h…"); a label longer than the whole row wraps inside its chip */
.reply-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.reply-chips[hidden] { display: none; }
.reply-chip {
  flex: 1 1 auto; min-height: var(--tap); min-width: 0; max-width: 100%; padding: 6px 12px; border-radius: 22px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  font: inherit; font-size: 14px; line-height: 18px; font-weight: 500; text-align: center; overflow-wrap: anywhere; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.reply-chip:active { background: var(--surface-2); }
.reply-chip:focus-visible { outline: 2px solid var(--copper); outline-offset: 1px; }
.reply-list { display: grid; gap: 8px; margin-top: 12px; }
.reply-pick {
  display: grid; gap: 2px; width: 100%; min-height: var(--tap); padding: 10px 14px; text-align: left; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.reply-pick:active { background: var(--surface-2); }
.reply-pick strong { font-size: 15px; line-height: 20px; }
.reply-pick span { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.reply.note-mode { background: var(--attn-bg); border-top-color: transparent; }
.reply-form.crew-note .reply-box textarea { background: var(--surface); border-color: var(--attn-text); color: var(--ink); }
.reply-form.crew-note .reply-box textarea:focus { border-color: var(--attn-text); outline: 2px solid var(--attn-text); outline-offset: 1px; }
.reply-box .btn-note { flex: none; border-radius: 22px; padding: 0 16px; background: var(--attn-text); border-color: var(--attn-text); color: var(--attn-bg); font-weight: 600; }
.reply.note-mode .reply-foot { color: var(--attn-text); }
@media (min-width: 1024px) { .thread-view { padding: 10px 20px 0; } }

/* wave 1 brief 6: a call in the conversation is its call card (components/call-card.js, css/calls.css) */
.msg.call-item { max-width: min(92%, 440px); }
.msg.call-item .callcard { width: 100%; }
/* wave 1 brief 6: Call and Done share the phone header; the name keeps room (the avatar returns from 480 px) */
@media (max-width: 479px) {
  .thread-head .avatar { display: none; }
  .thread-head .btn.call, .thread-head .done-btn { padding: 0 10px; }
  /* W3 QA: "Frank Moreno" was cut to "Frank More…" next to Call and Done: a long name wraps to a second line instead */
  .thread-who h2 { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 18px; line-height: 22px; overflow-wrap: anywhere; }
}

/* Wave 2 brief 1 (Brandon Q18): the assistant's draft above the reply box, the Off notice, "Draft ready" in the list */
.asst-draft {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; padding: 6px 6px 6px 12px;
  border: 1px solid var(--auto-line); border-radius: var(--r-sm); background: var(--auto-bg); color: var(--auto-text); font-size: 13px; line-height: 18px;
}
.asst-draft-line { display: block; margin: 0; min-width: 0; flex: 1 1 220px; }
.asst-draft-line .icon { display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.asst-draft-at { opacity: .8; white-space: nowrap; }
.asst-draft .btn-quiet { min-height: var(--tap); color: inherit; text-decoration: underline; }
.asst-off .btn-quiet { color: inherit; text-decoration: underline; padding: 0 4px; }
.irow-draft { color: var(--auto-text); font-weight: 600; }
.asst-draft-held { display: block; padding: 8px 12px; }
.asst-draft-body { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.thread-apr:empty { display: none; }
.thread-apr { margin: 8px 0 0; }

/* ---- css/job-link.css */
/* ---- the customer page (wave 2 brief 6): the Customer File's "Customer page" row and its two sheets (.jl-*), and the
   Settings section "Customer page" with "Your photo" (.jp-*). Scoped to its own classes (docs/BUILDERS.md); tokens only, no
   hex and no colour-scheme media query (tokens.css handles light and dark). Buttons use the shared .btn / .btn-main sizes. */

/* ---- Customer File: the row */
.jl { margin: 12px var(--gutter) 0; padding: 14px; border: 1px solid var(--card-line); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.jl-label {
  display: flex; align-items: center; gap: 6px; margin: 0;
  font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em;
}
.jl-label .icon { width: 16px; height: 16px; flex: none; }
.jl-help { margin: 6px 0 0; font-size: 15px; line-height: 22px; color: var(--ink-2); overflow-wrap: anywhere; }
.jl-url {
  display: block; width: 100%; min-width: 0; min-height: var(--tap); margin-top: 10px; padding: 0 12px; box-sizing: border-box;
  border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink);
  font-family: var(--font-mono); font-size: 14px; text-overflow: ellipsis;
}
.jl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.jl-actions .btn { min-height: var(--tap); }

/* ---- the Text the link / Make a new link sheets */
.jl-to { margin: 4px 0 6px; color: var(--ink-2); font-size: 14px; }
.jl-text {
  margin: 0; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--ink); font-size: 16px; line-height: 24px; overflow-wrap: anywhere;
}
.jl-why { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0; }
.jl-why .icon { flex: none; margin-top: 2px; }
.jl-sheet-actions { display: grid; gap: 8px; margin-top: 16px; }

/* ---- Settings: Customer page */
.jp-photo { align-items: flex-start; }
.jp-photo-side { display: flex; align-items: center; gap: 12px; flex: none; }
.jp-photo-actions { display: grid; gap: 6px; }
.jp-photo-actions .btn { min-height: var(--tap); }
.jp-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.jp-avatar-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); border: 1px solid var(--line-2); }
.jp-avatar-empty .icon { width: 22px; height: 22px; }
@media (max-width: 430px) {
  .jp-photo { flex-wrap: wrap; }
  .jp-photo-side { width: 100%; }
}

/* ---- css/job-progress.css */
/* ---- job progress page, the contractor's side (wave 2 brief 7): what the customer ticked, the decisions asked and answered, the notes shared,
   and the buttons that text one update. Scoped to .jdc-* and .jpr-* (docs/BUILDERS.md); tokens only, no hex and no colour-scheme media query
   (tokens.css handles light and dark). Buttons use the shared .btn / .btn-sm sizes (44 px on touch). */

.jdc { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.jdc:empty { display: none; }
.jdc-title { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; line-height: 22px; font-weight: 600; }
.jdc-before { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.jdc-before .icon { width: 16px; height: 16px; color: var(--evergreen-text); flex: none; }
.jdc-list, .jdc-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.jdc-decision, .jdc-notes li { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.jdc-kind { margin: 0; color: var(--ink-3); font-size: 12px; line-height: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.jdc-question, .jdc-note { margin: 0; color: var(--ink); font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.jdc-meta, .jdc-help { margin: 0; color: var(--ink-3); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.jdc-status { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.jdc-is-open .jdc-status, .jdc-is-late .jdc-status { color: var(--ink); font-weight: 500; }
.jdc-row-actions, .jdc-buttons, .jdc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.jdc-actions { margin-top: 12px; }
.jdc-steps { display: grid; gap: 4px; }
.jdc-step { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink-2); font-size: 14px; }
.jdc-step span { min-width: 0; overflow-wrap: anywhere; }

/* the sheets */
.jdc-sheet { display: grid; gap: 10px; }
.jdc-to { margin: 0; color: var(--ink-3); font-size: 14px; }
.jdc-text { margin: 0; padding: 12px; border-radius: var(--r-md); background: var(--info-bg); color: var(--ink); font-size: 15px; line-height: 22px; overflow-wrap: anywhere; white-space: pre-wrap; }
.jdc-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.jdc-choices { display: grid; gap: 12px; margin: 8px 0; }
.jdc-choice { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.jdc-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jdc-photo-status { color: var(--ink-3); font-size: 13px; }

/* Settings: the "before we arrive" lists */
.jpr-row { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.jpr-items { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.jpr-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.jpr-item-text { margin: 0; color: var(--ink); font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.jpr-item-actions { display: flex; gap: 4px; }
.jpr-up .icon { transform: rotate(180deg); }
.jpr-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.jpr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* ---- css/job-steps.css */
/* ---- job steps (wave 2 brief 5): a job's list of steps on the visit and the customer file, and the Settings editor. Scoped to
   .jst-* (docs/BUILDERS.md); tokens only, no hex and no colour-scheme media query (tokens.css handles light and dark). Buttons use
   the shared .btn / .btn-sm / .btn-primary sizes (44 px on touch). */

.jst { margin-top: 14px; }
.jst-compact { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.jst-loading { margin: 0; color: var(--ink-3); font-size: 14px; }
.jst-fail { display: grid; gap: 8px; justify-items: start; }

/* the progress line and bar */
.jst-head { display: grid; gap: 8px; margin-bottom: 4px; }
.jst-progress { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 22px; overflow-wrap: anywhere; }
.jst-bar { height: 6px; border-radius: var(--r-pill); background: var(--line-2); overflow: hidden; }
.jst-fill { display: block; height: 100%; border-radius: var(--r-pill); background: var(--evergreen-text); }
.jst-w0 { width: 0; } .jst-w1 { width: 10%; } .jst-w2 { width: 20%; } .jst-w3 { width: 30%; } .jst-w4 { width: 40%; } .jst-w5 { width: 50%; }
.jst-w6 { width: 60%; } .jst-w7 { width: 70%; } .jst-w8 { width: 80%; } .jst-w9 { width: 90%; } .jst-w10 { width: 100%; }

/* "your list has changed" */
.jst-stale {
  display: grid; gap: 8px; justify-items: start; margin: 10px 0 0; padding: 10px 12px;
  border-radius: var(--r-md); background: var(--info-bg); color: var(--info-text); font-size: 14px; line-height: 20px;
}
.jst-stale p { margin: 0; }

/* the steps, one under another */
.jst-list { margin: 8px 0 0; padding: 0; list-style: none; }
.jst-step { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.jst-step:first-child { border-top: 0; }
.jst-mark {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 2px 0 0;
  padding: 0; border-radius: 50%; border: 2px solid var(--field-line); background: var(--surface); color: var(--surface); cursor: pointer;
}
.jst-mark::after { content: ""; position: absolute; inset: -9px; }                          /* 46 px touch area around the 28 px mark */
.jst-mark .icon { width: 16px; height: 16px; stroke-width: 3; }
.jst-mark[disabled] { cursor: default; }
.jst-is-done .jst-mark { background: var(--evergreen-text); border-color: var(--evergreen-text); }
.jst-is-next .jst-mark { border-color: var(--copper); }
.jst-body { flex: 1 1 auto; min-width: 0; }
.jst-label { margin: 0; color: var(--ink); font-size: 16px; line-height: 24px; font-weight: 500; overflow-wrap: anywhere; }
.jst-is-later .jst-label { color: var(--ink-2); font-weight: 400; }
.jst-auto {
  display: inline-block; margin-left: 8px; padding: 0 6px; border-radius: var(--r-pill); background: var(--auto-bg); border: 1px solid var(--auto-line);
  color: var(--auto-text); font-size: 12px; font-weight: 500; line-height: 18px; vertical-align: 2px;
}
.jst-meta { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; margin: 0; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.jst-date {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); margin: 0 0 0 -6px; padding: 0 6px; border: 0; background: transparent;
  color: var(--copper-text); font-size: 14px; font-weight: 500; cursor: pointer;
}
.jst-date .icon { width: 16px; height: 16px; }
.jst-date.empty { color: var(--ink-3); font-weight: 400; }
.jst-hint { margin: 0; color: var(--ink-3); font-size: 13px; line-height: 18px; }
.jst-next { margin-top: 6px; }

/* Settings: the list editor */
.jst-set .set-help { margin: 0 0 4px; color: var(--ink-2); font-size: 15px; line-height: 22px; }
.jst-note { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--info-bg); color: var(--info-text); font-size: 14px; line-height: 20px; }
.jst-rows { margin: 12px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.jst-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--card-line); background: var(--surface); }
.jst-row.off { background: var(--surface-2); }
.jst-rowtop { display: flex; align-items: center; gap: 8px; }
.jst-rowtop input { flex: 1 1 auto; min-width: 0; min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--field-line); border-radius: var(--r-md); background: var(--surface); font-size: 16px; }
.jst-rowtop input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.jst-up .icon { transform: rotate(90deg); }
.jst-down .icon { transform: rotate(-90deg); }
.jst-rowmid { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.jst-onoff { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; }
.jst-why { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; line-height: 18px; }
.jst-why .icon { width: 14px; height: 14px; flex: none; }
.jst-cust summary { min-height: var(--tap); display: flex; align-items: center; color: var(--ink-2); font-size: 14px; cursor: pointer; overflow-wrap: anywhere; }
.jst-cust .field { margin-top: 4px; }
.jst-add { display: grid; gap: 6px; justify-items: start; margin-top: 12px; }
.jst-reset { margin-top: 4px; }
.jst-newtype { margin-top: 18px; }
.jst-newrow { display: flex; gap: 8px; }
.jst-newrow input { flex: 1 1 auto; min-width: 0; }
.jst-savebar {
  position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 18px;
  padding: 12px 0; background: var(--paper); border-top: 1px solid var(--line);
}
.jst-status { flex: 1 1 100%; margin: 0; min-height: 0; font-size: 14px; line-height: 20px; }
.jst-status:empty { display: none; }
.jst-saved { display: inline-flex; align-items: center; gap: 6px; color: var(--ok-text); }
.jst-saved .icon { width: 16px; height: 16px; }

/* ---- css/new-customer.css */
/* new-customer.css: the + New menu's "New customer" sheet and the "Message" picker (components/new-customer.js,
 * components/customer-picker.js). Scoped to .nc-* and .cp-* only; tokens only (no hex colour, no theme query), so light, dark
 * and the theme switch follow. Shared classes (.field, .check, .banner, .menu, .action-bar, .btn-main) are used as they are. */

.nc-form .sheet-body { margin-bottom: 2px; }
.nc-form .field-row { margin-top: 14px; }
.nc-form .field-row > div { min-width: 0; }
.nc-form .field-row .form-error { margin-top: 6px; }
.nc-form textarea { min-height: 72px; }

/* "This looks like Dana Ruiz": under the phone and email it is about, above the buttons it replaces */
.nc-match:empty { display: none; }
.nc-match .banner { margin-top: 10px; }
.nc-match-bits { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; font-weight: 400; overflow-wrap: anywhere; }

/* the one unticked box, with its line under it: the line sits level with the label text, not the box */
.nc-consent { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--line); }
.nc-consent .check { display: flex; align-items: center; color: var(--ink); font-weight: 500; }
.nc-consent .hint { margin: 0 0 0 32px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.nc-consent .form-error { margin-left: 32px; }

/* saved */
.nc-added { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 16px; line-height: 22px; color: var(--ink); }
.nc-added .icon { flex: none; color: var(--ok-text); }
.nc-texts { margin-top: 8px; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.nc-form .btn-block, .nc .btn-block { margin-top: 8px; }

/* the Message picker rows: name, address, then how they can be reached (only when it is not "by text") */
.cp-row { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.cp-row .icon { margin-top: 2px; flex: none; }
.cp-row > span { min-width: 0; overflow-wrap: anywhere; }
.sheet .cp-row small.cp-reach { color: var(--attn-text); }

/* ---- css/ring-alerts.css */
/* ring-alerts.css: wave 2 brief 2, Settings "When someone calls" and "When to get you" (web/app/js/settings/{calls,alerts}.js).
 * Served inside /app/features.css (services/api/static.js), after app.css, in file-name order. Every rule is scoped to this
 * feature's own .ra-* classes; shared classes (.btn, .chip, .set-row, .field) are used as they are, never restyled here. */

.ra-section { display: grid; gap: 4px; }
.ra-calls, .ra-alerts { display: grid; gap: 12px; margin-top: 10px; }
.ra-block { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.ra-block > .set-sub-title { margin: 0; }

/* ---- the three ring choices (radio buttons drawn as rows, 44 px tall or more) */
.ra-choices { display: grid; gap: 8px; }
.ra-choice {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--tap); padding: 10px 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); color: var(--ink);
  font-size: 15px; line-height: 21px; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color var(--dur-release) var(--ease-out), border-color var(--dur-release) var(--ease-out), transform var(--dur-release) var(--ease-out);
}
.ra-choice:active { background: var(--press-bg); transform: scale(var(--press-scale)); transition-duration: var(--dur-press); }
.ra-choice[aria-checked="true"] { border-color: var(--copper); background: var(--copper-tint); font-weight: 600; }
.ra-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink-3); background: var(--surface); }
.ra-choice[aria-checked="true"] .ra-dot { border-color: var(--copper); border-width: 6px; }

.ra-sentence { margin: 2px 0 0; font-size: 15px; line-height: 22px; color: var(--ink-2); max-width: 60ch; }
.ra-press { margin: 0; }
.ra-note, .ra-problem { margin: 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--attn-bg); color: var(--attn-text); font-size: 14px; line-height: 20px; }
.ra-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ra-pills .chip { min-height: var(--tap); min-width: 64px; justify-content: center; }

/* ---- word chips: built in (fixed, a lock) and the shop's own (an × to remove) */
.ra-group { display: grid; gap: 6px; }
.ra-group-title { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-3); }
.ra-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ra-word {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 4px 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1;
  overflow-wrap: anywhere;
}
.ra-word.fixed { padding: 0 12px; border-color: var(--evergreen-tint-line); background: var(--evergreen-tint); color: var(--evergreen-text); }
.ra-word .icon { width: 14px; height: 14px; flex: none; }
.ra-word-x {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ra-word-x::after { content: ""; position: absolute; inset: -8px; }        /* 44 px touch area */
.ra-word-x:active { background: var(--press-bg); }
.ra-add { justify-self: start; display: inline-flex; align-items: center; gap: 6px; }

/* ---- forms: the phone, a new word, the times */
.ra-form { display: grid; gap: 10px; }
.ra-form .card-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.ra-fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ra-fieldset legend { padding: 0; margin-bottom: 2px; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink); }
.ra-fieldset .field select { width: 100%; min-height: var(--tap); }
@media (min-width: 640px) {
  .ra-times { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .ra-times .form-error, .ra-times .card-actions { grid-column: 1 / -1; }
}

/* ---- css/route-days.css */
/* ---- route days (wave 2 brief 4): Settings > Route days (.rd-*) and the visit's arrival time row and sheet (.arr-*).
   Scoped to its own classes (docs/BUILDERS.md); tokens only, no hex and no colour-scheme media query (tokens.css handles
   light and dark). Buttons and chips use the shared .btn / .btn-main / .chip / .switch looks; every target is 44 px. */

/* ---- Settings > Route days */
.rd { display: grid; gap: 14px; }
.rd-quiet { margin: 0; color: var(--ink-3); font-size: 14px; }
.rd-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.rd-row-text { min-width: 0; flex: 1 1 auto; }
.rd-row-label { margin: 0; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 22px; }
.rd-help { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.rd-zip {
  flex: none; width: 96px; min-height: var(--tap); padding: 0 10px; border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-variant-numeric: tabular-nums; text-align: center;
}
.rd-banner { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
.rd-banner .icon { flex: none; margin-top: 2px; }
.rd-areas { display: grid; gap: 12px; }
.rd-area {
  display: grid; gap: 10px; padding: 12px; border: 1px solid var(--card-line); border-radius: var(--r-md); background: var(--surface);
}
.rd-unplaced { border-style: dashed; }
.rd-name {
  min-height: var(--tap); padding: 0 10px; border: 1px solid var(--field-line); border-radius: var(--r-md); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; width: 100%; box-sizing: border-box;
}
.rd-days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.rd-days .rd-day { justify-content: center; min-height: var(--tap); padding: 0 4px; min-width: 0; }
.rd-towns { display: flex; flex-wrap: wrap; gap: 8px; }
.rd-town { min-height: var(--tap); gap: 6px; max-width: 100%; }
.rd-town span:first-child { overflow-wrap: anywhere; }
.rd-move-word { color: var(--copper-text); font-weight: 600; font-size: 13px; }
.rd-new-mark {
  padding: 0 6px; border-radius: var(--r-pill); background: var(--info-bg); color: var(--info-text); font-size: 12px; font-weight: 600;
}
.rd-move { display: grid; gap: 8px; margin-top: 8px; }
.rd-move .btn { min-height: var(--tap); justify-content: space-between; }
.rd-move-now { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.rd-stepper { display: flex; align-items: center; gap: 6px; flex: none; }
.rd-step { min-width: var(--tap); min-height: var(--tap); padding: 0; font-size: 20px; }
.rd-wait { min-width: 28px; text-align: center; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.rd-sentence {
  padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--ink); font-size: 15px; line-height: 22px;
}
.rd-sentence p { margin: 0; }
.rd-sentence p + p { margin-top: 6px; }

/* ---- the visit's arrival time row: "Arrival time  9:30 am  [Change]" */
.arr-row {
  display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 8px 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface);
}
.arr-row[hidden] { display: none; }
.arr-row > .icon { flex: none; color: var(--ink-2); }
.arr-what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; flex: 1 1 auto; }
.arr-label { color: var(--ink-2); font-size: 14px; }
.arr-value { color: var(--ink); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.arr-unset { color: var(--ink-3); font-weight: 400; }
.arr-note { flex-basis: 100%; color: var(--ink-3); font-size: 13px; }
.arr-set { flex: none; min-height: var(--tap); }

/* ---- the arrival time sheet */
.arr-win { margin: 4px 0 10px; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.arr-times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.arr-times .chip { justify-content: center; min-height: var(--tap); padding: 0 4px; min-width: 0; font-variant-numeric: tabular-nums; }
.arr-to { margin: 14px 0 6px; color: var(--ink-2); font-size: 14px; }
.arr-text {
  margin: 0; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--ink); font-size: 16px; line-height: 24px; overflow-wrap: anywhere;
}
.arr-hint { margin: 14px 0 0; color: var(--ink-3); font-size: 14px; }
.arr-why { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; }
.arr-why .icon { flex: none; margin-top: 2px; }
.arr-actions { display: grid; gap: 8px; margin-top: 16px; }
.arr .form-error { margin-top: 12px; }

/* the exact arrival time on a Schedule tile (coordinator hook, README 4.3.2) */
.arr-tile { display: block; font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- css/schedule.css */
/* schedule.css: workstream A: the Schedule screen (day / week / month, the time grid, the sheets).
 * Served inside /app/features.css after app.css, in file-name order. Scoped to this feature's own classes (docs/BUILDERS.md). */
/* ---- schedule (workstream A): day / week / month, the time grid, the sheets ------------------------------------------- */
:root { --sg-axis: 52px; }   /* --sg-off and --sg-hatch (closed hours, busy hatch) are theme tokens: tokens.css, light and both dark blocks */

.sch .btn.fwd .icon, .sch .btn-icon.fwd .icon { transform: rotate(180deg); }
/* the hours sheet's time boxes (the other sheet boxes are .field / .field-row inputs: app.css) */
.hr-times input { display: block; min-height: var(--tap); border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--surface); font-size: 16px; line-height: 22px; }
.hr-times input:focus { outline: none; border-color: var(--focus); }
.hr-times input:disabled { opacity: .45; }
.sheet-h { margin: 22px 0 6px; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }

.sch .topbar { align-items: flex-start; }
.sch-tools { display: flex; gap: 8px; flex: none; padding-top: 4px; }
.sch-tools .btn { position: relative; }
.sch-dot { position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok-text); border: 2px solid var(--surface); }
.sch-dot.bad { background: var(--danger-text); }
.sch-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 4px var(--gutter) 10px; }
.sch .seg { grid-column: 1 / -1; display: flex; padding: 3px; background: var(--muted-bg); border-radius: 10px; }
.sch .seg-btn { flex: 1; min-height: var(--tap); border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer; }
.sch .seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-card); }
.sch .nav { display: inline-flex; align-items: center; gap: 4px; }
.sch-label { font-size: 20px; line-height: 26px; font-weight: 600; }
.sch-label-short { display: none; }
@media (max-width: 459px) { .sch-label-long { display: none; } .sch-label-short { display: inline; } }
.sch-notes { padding: 0 var(--gutter); }
.sch-notes .banner { margin-bottom: 8px; align-items: center; }
.sch-filters .chips { margin: 0; padding: 0 var(--gutter) 10px; }
.sch-body { padding: 0 var(--gutter); }
.sch-legend { display: none; flex-wrap: wrap; gap: 4px 14px; margin: 2px 0 10px; font-size: 12px; line-height: 18px; color: var(--ink-3); }
.sch-legend li { display: inline-flex; align-items: center; gap: 6px; }
.sch-legend .k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-2); }
.sch-legend .k-booked { background: var(--copper-tint); border-color: var(--copper); }
.sch-legend .k-req { background: var(--attn-bg); border: 1px dashed var(--attn-text); }
.sch-legend .k-busy { background: repeating-linear-gradient(135deg, var(--sg-hatch) 0 2px, transparent 2px 5px); }
.sch-legend .k-block { background: repeating-linear-gradient(45deg, var(--copper-tint-line) 0 2px, var(--copper-tint) 2px 5px); }
.sch-legend .k-off { background: var(--sg-off); }
.sch-empty { margin-top: 12px; text-align: center; color: var(--ink-3); font-size: 14px; }

/* the time grid */
.sg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-card); }
.sg-head { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: var(--sg-axis) repeat(var(--ncols), minmax(0, 1fr)); background: var(--surface); border-bottom: 1px solid var(--line); border-radius: var(--r-md) var(--r-md) 0 0; }
.sg-dayhead { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 2px 6px; padding: 8px 4px; border-left: 1px solid var(--line); text-align: center; }
.sg-wd { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.sg-dn { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 14px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sg-dayhead.is-today .sg-dn { background: var(--copper); color: var(--on-copper); }
.sg-dayhead.is-today .sg-wd { color: var(--copper-text); }
.sg-note { flex: 1 1 100%; font-size: 11px; line-height: 14px; color: var(--ink-3); }
.sg-day .sg-dayhead { justify-content: flex-start; padding-left: 12px; }
.sg-body { position: relative; display: grid; grid-template-columns: var(--sg-axis) minmax(0, 1fr); }
.sg-axis { position: relative; }
.sg-axis span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; line-height: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sg-axis span:first-child { transform: translateY(0); }
.sg-cols { display: grid; grid-template-columns: repeat(var(--ncols), minmax(0, 1fr)); }
.sg-col { position: relative; border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row) - 1px), var(--line) calc(var(--row) - 1px), var(--line) var(--row)); }
.sg-off { position: absolute; left: 0; right: 0; background: var(--sg-off); }
.sg-busy, .sg-block { position: absolute; left: 0; right: 0; overflow: hidden; padding: 2px 6px; font-size: 11px; line-height: 14px; color: var(--ink-3); pointer-events: none; }
.sg-busy { background: repeating-linear-gradient(135deg, var(--sg-hatch) 0 2px, transparent 2px 6px); }
.sg-block { background: repeating-linear-gradient(45deg, var(--copper-tint-line) 0 2px, var(--copper-tint) 2px 6px); color: var(--copper-text); }
.sg-busy span, .sg-block span { background: var(--surface); padding: 0 4px; border-radius: 4px; }
.sg-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--copper); z-index: 2; pointer-events: none; }
.sg-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--copper); }

.sv {
  position: absolute; z-index: 1; display: flex; flex-direction: column; gap: 1px; overflow: hidden; padding: 4px 6px; text-align: left;
  border: 1px solid var(--copper-tint-line); border-left: 4px solid var(--copper); border-radius: 8px; background: var(--copper-tint); color: var(--ink);
  font-size: 12px; line-height: 16px; cursor: pointer; touch-action: auto; user-select: none; -webkit-user-select: none;
}
.sv:focus-visible { outline: 2px solid var(--copper); outline-offset: 1px; z-index: 3; }
.sv-time { font-size: 11px; font-weight: 600; color: var(--copper-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (pointer: coarse) { .sv-name { padding-right: 22px; } .sv { min-height: var(--tap); } }   /* a 15-minute visit is 14 px of grid: the block still is a 44 px target (the grip is the one drag handle on touch) */
.sv-job { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv.status-requested, .ag-card.status-requested { background: var(--attn-bg); border-color: var(--attn-text); border-left-style: solid; }
.sv.status-requested { border-style: dashed; border-left: 4px solid var(--attn-text); }
.sv.status-requested .sv-time { color: var(--attn-text); }
.sv.status-moved { background: var(--info-bg); border-color: var(--line-2); border-left-color: var(--info-text); }
.sv.status-moved .sv-time { color: var(--info-text); }
.sv.status-confirmed { background: var(--ok-bg); border-color: var(--line-2); border-left-color: var(--ok-text); }
.sv.status-confirmed .sv-time { color: var(--ok-text); }
.sv.status-done { background: var(--muted-bg); border-color: var(--line); border-left-color: var(--ink-3); color: var(--ink-3); }
.sv.status-done .sv-time, .sv.status-done .sv-job { color: var(--ink-3); }
.sv.dragging { opacity: .4; }
.sv-grip { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: var(--tap); height: var(--tap); color: var(--ink-3); touch-action: none; cursor: grab; }
.sv-grip .icon { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .sv-grip { opacity: 0; width: 22px; height: 32px; } .sv:hover .sv-grip, .sv:focus-visible .sv-grip { opacity: 1; } .sv { cursor: grab; } }
body.sg-dragging, body.sg-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.sg-ghost { position: absolute; left: 2px; right: 2px; z-index: 5; padding: 4px 8px; border: 2px dashed var(--copper); border-radius: 8px; background: color-mix(in srgb, var(--copper) 14%, transparent); pointer-events: none; font-size: 12px; font-weight: 600; color: var(--copper-text); font-variant-numeric: tabular-nums; }

/* month */
.sch .sm { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-card); overflow: hidden; }
.sm-head, .sm-cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sm-wd { padding: 8px 4px; text-align: center; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.sm-day { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: 64px; padding: 6px 4px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.sm-day:nth-child(7n) { border-right: 0; }
.sm-day:hover { background: var(--surface-2); }
.sm-day.outside { color: var(--ink-3); }
.sm-day.outside .sm-n { opacity: .55; }
.sm-day.closed { background: var(--sg-off); }
.sm-n { display: inline-grid; place-items: center; align-self: flex-start; min-width: 26px; height: 26px; border-radius: 13px; font-size: 14px; font-weight: 600; }
.sm-day.is-today .sm-n { background: var(--copper); color: var(--on-copper); }
.sm-count { font-size: 12px; line-height: 16px; color: var(--copper-text); padding-left: 4px; }
.sm-count-word { display: none; }
.sm-chip { display: none; padding: 1px 6px; border-radius: 5px; border-left: 3px solid var(--copper); background: var(--copper-tint); font-size: 11px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-chip.status-requested { background: var(--attn-bg); border-left-color: var(--attn-text); }
.sm-chip.status-done { background: var(--muted-bg); border-left-color: var(--ink-3); color: var(--ink-3); }
.sm-more { display: none; padding-left: 4px; font-size: 11px; color: var(--ink-3); }
.sm-busy { position: absolute; right: 6px; top: 8px; width: 10px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(135deg, var(--sg-hatch) 0 2px, transparent 2px 4px); border: 1px solid var(--line-2); }
@media (min-width: 760px) { .sm-day { min-height: 112px; } .sm-chip, .sm-more { display: block; } .sm-count { display: none; } }

/* phone week: the strip + the day's cards */
.ws { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; }
.ws-day { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 64px; padding: 6px 0 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.ws-wd { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); }
.ws-n { font-size: 17px; line-height: 24px; font-weight: 600; }
.ws-dots { display: flex; gap: 3px; min-height: 6px; }
.ws-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--copper); }
.ws-day.closed { background: var(--sg-off); }
.ws-day.is-today { border-color: var(--copper); }
.ws-day.sel { background: var(--evergreen); border-color: var(--evergreen); color: var(--on-evergreen); }
.ws-day.sel .ws-wd { color: var(--evergreen-2); }
.ws-day.sel .ws-dots i { background: var(--on-evergreen); }
.ag-title { margin: 4px 0 8px; font-size: 18px; line-height: 24px; font-weight: 600; }
.ag-note { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--muted-bg); color: var(--ink-2); font-size: 14px; line-height: 20px; }
.ag-note .icon { width: 16px; height: 16px; color: var(--ink-3); }
.ag-empty { padding: 28px 0; text-align: center; color: var(--ink-3); }
.ag-list > li + li { margin-top: 8px; }
.ag-card { padding: 0; border-left: 4px solid var(--copper); overflow: hidden; }
.ag-card.status-moved { border-left-color: var(--info-text); }
.ag-card.status-confirmed { border-left-color: var(--ok-text); }
.ag-card.status-requested { border-left-color: var(--attn-text); }
.ag-card.status-done { border-left-color: var(--ink-3); opacity: .8; }
.ag-main { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 12px 8px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.ag-time { flex: none; width: 74px; display: grid; line-height: 20px; white-space: nowrap; }
.ag-time b { font-size: 15px; } .ag-time small { font-size: 13px; color: var(--ink-3); }
.ag-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ag-name { font-weight: 600; font-size: 16px; line-height: 22px; overflow-wrap: anywhere; }
.ag-job { color: var(--ink-2); font-size: 14px; line-height: 20px; }
.ag-addr { display: flex; align-items: flex-start; gap: 4px; color: var(--ink-3); font-size: 13px; line-height: 18px; margin-top: 2px; }
.ag-addr .icon { width: 14px; height: 14px; margin-top: 2px; }
.ag-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px 98px; }

/* sheets */
.vs-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vs-job { color: var(--ink-2); font-size: 15px; }
.vs-addr { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; color: var(--ink-2); font-size: 15px; line-height: 22px; }
.vs-addr .icon { margin-top: 1px; color: var(--ink-3); }
.vs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.vs-actions .btn { flex: 1 1 140px; }
.ms-new { margin-top: 14px; font-size: 15px; color: var(--ink-2); } .ms-summary { font-weight: 600; color: var(--ink); }
.ms-tell { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--info-bg); color: var(--info-text); font-size: 14px; line-height: 20px; }
.ms-tell .icon { width: 18px; height: 18px; margin-top: 1px; }
.ms-conflicts { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--attn-bg); color: var(--attn-text); font-size: 14px; line-height: 20px; }
.ms-conflicts ul { margin-top: 4px; padding-left: 18px; list-style: disc; }
.ms-actions { display: grid; gap: 8px; margin-top: 16px; }
.hr-list { border: 1px solid var(--line); border-radius: var(--r-sm); }
.hr-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 10px; min-height: 52px; }
.hr-row + .hr-row { border-top: 1px solid var(--line); }
.hr-day { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 500; cursor: pointer; min-width: 112px; }
.hr-day input { width: 20px; height: 20px; accent-color: var(--copper); margin: 0; }
.hr-times { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 14px; }
.hr-times input { width: 9.2rem !important; padding: 6px 10px !important; }
@media (max-width: 520px) { .hr-row { flex-wrap: wrap; padding-bottom: 8px; } .hr-times { flex: 1 1 100%; } .hr-times input { flex: 1; width: auto !important; min-width: 0; } }
.bl-add #bl-weekly, .bl-add .check input { width: 20px; height: 20px; accent-color: var(--copper); margin: 0; }
.bl-list { border: 1px solid var(--line); border-radius: var(--r-sm); }
.bl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; }
.bl-row + .bl-row { border-top: 1px solid var(--line); }
.bl-row span { display: grid; min-width: 0; } .bl-row small { color: var(--ink-3); font-size: 13px; }
.bl-empty { padding: 12px; color: var(--ink-3); font-size: 14px; }
.bl-add { margin-top: 4px; }
.bl-add .btn-block { margin-top: 12px; }
.cal-list > li + li { margin-top: 8px; }
.cal-item { padding: 12px; }
.cal-top { display: flex; align-items: center; gap: 10px; }
.cal-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--evergreen); color: var(--on-evergreen); flex: none; }
.cal-name { flex: 1; min-width: 0; display: grid; } .cal-name small { color: var(--ink-3); font-size: 13px; overflow-wrap: anywhere; }
.cal-warn { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--danger-text); }
.cal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cal-empty { margin: 10px 0; color: var(--ink-2); font-size: 15px; line-height: 22px; }
.cal-buttons { display: grid; gap: 8px; }
.cal-off .btn { width: 100%; }
.cal-steps { margin: 6px 0 0; padding-left: 20px; list-style: decimal; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.cal-steps li + li { margin-top: 4px; }
.cal-confirm { padding: 4px 0; } .cal-confirm p { margin-bottom: 4px; }
.cal-apple .btn-block { margin-top: 12px; }
@media (min-width: 760px) {
  .cal-buttons { grid-template-columns: 1fr 1fr; }
  .sch-bar { display: flex; align-items: center; gap: 10px; padding-top: 8px; }
  .sch .seg { order: -1; grid-column: auto; flex: 0 1 260px; }
  .sch-label { margin-left: auto; order: 2; }
  .sch-legend { display: flex; }
}

/* ---- To book (wave 1 builder 5): the drawer, the count, Pick a time, the confirm step ------------------------------------ */
.sch-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 10px; background: var(--danger-fill); color: var(--on-copper); font-size: 12px; line-height: 20px; font-weight: 700; font-variant-numeric: tabular-nums; vertical-align: middle; }
.sch-tobook { flex: none; }
.sch-tools { flex-wrap: wrap; justify-content: flex-end; }
/* a phone: the buttons take their own row under the title, so none is cut off (To book, Calendars, Hours) */
@media (max-width: 520px) {
  .sch .topbar { flex-wrap: wrap; }
  .sch .topbar > div:first-child { flex: 1 1 100%; }
  .sch-tools { flex: 1 1 100%; justify-content: flex-start; padding-top: 0; }
  .sch-tools .btn { flex: none; justify-content: center; }
  .sch-tools .sch-tobook { flex: 1 1 auto; }
  .sch-btn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* Calendars and Hours: icons on a phone */
  .sch-tools .btn:not(.sch-tobook) { width: var(--tap); padding: 0; }
}
.sch-main { min-width: 0; }
.sch-drawer { margin: 12px var(--gutter) 0; }
.tb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.tb-title { font-size: 18px; line-height: 24px; font-weight: 600; font-family: var(--font-sans); }
.tb-hint { margin: 0 0 8px; color: var(--ink-3); font-size: 13px; line-height: 18px; }
.tb-empty { padding: 20px 0; color: var(--ink-3); text-align: center; }
.tb-list > li + li { margin-top: 8px; }
.tb-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--card-line); border-left: 4px solid var(--copper); border-radius: var(--r-md); background: var(--surface); }
.tb-row.approved { border-left-color: var(--ok-text); }
.tb-row.dragging { opacity: .45; }
@media (hover: hover) and (pointer: fine) { .tb-panel .tb-row[draggable="true"] { cursor: grab; } }
.tb-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.tb-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tb-name { min-width: 0; overflow-wrap: anywhere; font-size: 16px; line-height: 22px; }
.tb-ago { flex: none; color: var(--ink-3); font-size: 12px; line-height: 16px; }
.tb-job { color: var(--ink-2); font-size: 14px; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 2px; color: var(--ink-3); font-size: 13px; line-height: 18px; }
.tb-meta .icon { width: 14px; height: 14px; }
.tb-asked, .tb-town { display: inline-flex; align-items: center; gap: 4px; }
.tb-asked { color: var(--attn-text); font-weight: 600; }
.tb-next { display: inline-flex; align-items: center; gap: 6px; color: var(--danger-text); font-weight: 600; }   /* W3 QA #42: an URGENT nobody acknowledged, as in the Inbox */
.tb-pick { flex: none; align-self: center; }
body.tb-dragging .sg-col { outline: 1px dashed var(--copper-tint-line); outline-offset: -2px; }
.sg-col.sg-drop { background-color: var(--copper-tint); }

.tb-times > li + li, .tb-wins > li + li { margin-top: 8px; }
.tb-slot { display: grid; gap: 2px; width: 100%; min-height: var(--tap); padding: 10px 14px; border: 1px solid var(--field-line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.tb-slot:active { background: var(--press-bg); }
.tb-when { font-size: 16px; line-height: 22px; font-variant-numeric: tabular-nums; }
.tb-why { color: var(--evergreen-text); font-size: 14px; line-height: 20px; }
.tb-slot.plain { display: block; }
.tb-flow .btn-block { margin-top: 8px; }
.tb-flow > .tb-times, .tb-flow > .tb-days { margin-top: 12px; }
.tb-flow .banner { margin-top: 10px; }
.tb-chosen { margin-top: 8px; font-size: 20px; line-height: 26px; font-weight: 600; }
.tb-msg { margin-top: 12px; padding: 12px; border: 1px solid var(--card-line); border-radius: var(--r-md); background: var(--surface-2); }
.tb-msg-label { margin-bottom: 4px; color: var(--ink-3); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; overflow-wrap: anywhere; }
.tb-msg-body { font-size: 15px; line-height: 22px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-flow .action-bar { margin-top: 16px; }

/* a computer: the drawer sits beside the calendar, so the calendar stays in view */
@media (min-width: 1024px) {
  .sch-main.drawer-open { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; padding-right: var(--gutter); }
  .sch-main.drawer-open .sch-drawer { margin: 0; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
  .sch-drawer .tb-panel { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
}

/* ---- css/settings.css */
/* settings.css: workstream C: Settings, password sign-in, delete account.
 * Served inside /app/features.css (services/api/static.js), after app.css, in file-name order. Scope every rule to this
 * feature's own classes; anything two features share belongs in app.css (docs/BUILDERS.md). */
/* ---- C: Settings, password sign-in, delete account (2026-11-17) */
.set-body { padding: 4px var(--gutter) 0; }
.set-nav { display: none; }
.set-sections { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }   /* minmax: one wide row (a job step editor) must not push every card past a 375 px phone */
.set-card { padding: 16px 16px 12px; scroll-margin-top: 16px; }
.set-card + .set-card { margin-top: 0; }
.set-title { font-size: 17px; line-height: 24px; font-weight: 600; color: var(--evergreen-text); }
.set-intro { margin-top: 2px; font-size: 15px; line-height: 22px; color: var(--ink-3); max-width: 60ch; }
.set-sub-title { margin: 16px 0 4px; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; padding: 10px 0; border-top: 1px solid var(--line); }
.set-title + .set-row, .set-intro + .set-row { margin-top: 10px; }
.set-row-text { min-width: 0; flex: 1; }
.set-label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 600; font-size: 15px; line-height: 22px; }
.set-value { font-size: 15px; line-height: 22px; color: var(--ink-2); overflow-wrap: anywhere; }
.set-sub { margin-top: 2px; font-size: 13px; line-height: 19px; color: var(--ink-3); }
.set-row-action { flex: none; }
.set-card .card-actions { flex-wrap: wrap; padding-top: 4px; }
.set-card .devices .set-row.device:first-child { border-top: 1px solid var(--line); }
@media (max-width: 430px) {
  .set-row { flex-wrap: wrap; }
  .set-row:has(.switch) { flex-wrap: nowrap; }            /* the switch stays on the right of its label */
  .set-row-action .btn { min-height: var(--tap); }
}
.switch {
  position: relative; flex: none; width: 52px; height: 32px; padding: 0;
  border: 0; border-radius: 16px; background: var(--switch-off); cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color var(--dur-release) var(--ease-out);
}
.switch::after { content: ""; position: absolute; inset: -6px; }                 /* 44 px touch area */
.switch-knob {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--switch-knob); box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  transition: transform var(--dur-release) var(--ease-out);
}
.switch[aria-checked="true"] { background: var(--switch-on); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(20px); }
.switch[disabled] { opacity: .5; cursor: default; }
@media (prefers-reduced-motion: reduce) { .switch, .switch-knob { transition-duration: 0ms; } }
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 76px; }
.pw-toggle { position: absolute; top: 0; right: 0; height: 100%; min-width: 64px; padding: 0 14px; border: 0; background: transparent; color: var(--copper-text); font-weight: 600; font-size: 14px; cursor: pointer; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.signin-links { flex-wrap: wrap; justify-content: center; }
.export-buttons { margin-top: 12px; }
.export-row { display: flex; flex-wrap: wrap; gap: 8px; }
.danger-zone { border-color: var(--danger-text); background: var(--surface); }
.danger-zone .set-title { color: var(--danger-text); }
.danger-zone .btn { margin-top: 14px; }
.delete-list { margin: 10px 0 12px; display: grid; gap: 10px; }
.delete-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.delete-list .icon { color: var(--danger-text); margin-top: 2px; }
.deletion .deletion-date { display: grid; gap: 2px; margin-bottom: 14px; }
.deletion .deletion-date b { font-size: 32px; line-height: 38px; font-weight: 700; font-variant-numeric: tabular-nums; }
.deletion .btn { margin-top: 14px; }
.deletion .export-buttons .btn { margin-top: 0; }
@media (min-width: 1024px) {
  .set-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 8px; }
  .set-nav { display: block; position: sticky; top: 24px; }
  .set-nav ul { display: grid; gap: 2px; }
  .set-nav a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 15px; color: var(--ink-2); text-decoration: none; }
  .set-nav a:hover { background: var(--surface-2); color: var(--ink); }
  .set-nav a:active { background: var(--press-bg); }
  .set-nav a.danger { color: var(--danger-text); }
  .set-card { padding: 20px 22px 14px; }
  .set-row-action .btn { white-space: nowrap; }
}

/* Appearance: Match phone / Light / Dark (feel spec 5.10; Brandon Q35). Native radios, so arrow keys and screen readers work. */
.look-field { border: 0; margin: 12px 0 0; padding: 0; min-width: 0; }
.look-field legend { display: block; padding: 0; margin-bottom: 8px; }
.look-seg {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface-2);
}
.look-seg label {
  position: relative; display: grid; place-items: center; min-height: var(--tap); padding: 0 2px;
  border-radius: var(--r-sm); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); text-align: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color var(--dur-release) var(--ease-out), transform var(--dur-release) var(--ease-out);
}
.look-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.look-seg label:active { background: var(--press-bg); transform: scale(var(--press-scale)); transition-duration: var(--dur-press); }
.look-seg label:has(input:checked) { background: var(--copper-tint); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--copper); }
.look-seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) { .look-seg label:hover:not(:has(input:checked)) { background: var(--surface); } }

/* ---- css/setup.css */
/* ---- the guided setup (wave 2 brief 8): /app/setup (.su-*) and its Settings section. Scoped to its own classes
   (docs/BUILDERS.md); tokens only, no hex and no colour-scheme media query (tokens.css handles light and dark). Buttons use the
   shared .btn / .btn-main / .action-bar sizes. */
.su-body { padding: 4px var(--gutter) 0; }
.su-head { display: grid; gap: 8px; margin: 4px 0 14px; }
.su-count { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-3); }
.su-progress {
  display: block; width: 100%; height: 8px; border: 0; border-radius: var(--r-pill); overflow: hidden;
  appearance: none; -webkit-appearance: none; background: var(--muted-bg); color: var(--copper);
}
.su-progress::-webkit-progress-bar { background: var(--muted-bg); border-radius: var(--r-pill); }
.su-progress::-webkit-progress-value { background: var(--copper); border-radius: var(--r-pill); }
.su-progress::-moz-progress-bar { background: var(--copper); border-radius: var(--r-pill); }

.su-step { display: grid; gap: 12px; min-width: 0; }
.su-title { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.su-title:focus { outline: none; }
.su-text { margin: 0; max-width: 60ch; font-size: 16px; line-height: 24px; color: var(--ink-2); overflow-wrap: anywhere; }
.su-aside { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); }
.su-aside .icon { margin-top: 2px; }
.su-note { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-3); }
.su-hint { margin: 6px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-3); }
.su-label { margin: 0 0 6px; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }

/* the exact words a customer gets */
.su-preview { display: grid; gap: 4px; }
.su-item { display: grid; gap: 4px; min-width: 0; }
.su-bubble {
  margin: 0; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface-2);
  color: var(--ink); font-size: 16px; line-height: 24px; white-space: pre-line; overflow-wrap: anywhere;
}
.su-waiting { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--attn-bg); color: var(--attn-text); font-size: 14px; line-height: 20px; }
.su-waiting .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }

.su-card { padding: 4px 14px 8px; }
.su-card > .set-row:first-child, .su-card > .ss-block:first-child { border-top: 0; }
.su-card .ss-block { padding-top: 10px; }
.su-ui { min-width: 0; }
.su-link { justify-self: start; }

/* the two tests */
.su-test { display: grid; gap: 4px; justify-items: start; }
.su-test-btn { min-height: var(--tap); }
.su-result { margin: 6px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--ok-bg); color: var(--ok-text); font-size: 15px; line-height: 22px; }
.su-result.bad { background: var(--attn-bg); color: var(--attn-text); }

/* the summary */
.su-summary { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.su-summary li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--card-line); border-radius: var(--r-md); background: var(--surface); font-size: 16px; line-height: 24px; color: var(--ink); }
.su-summary .icon { flex: none; margin-top: 2px; color: var(--ok-text); }

/* Back and Skip under the one main action */
.su-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.su-skip[hidden] { display: none; }

/* Settings: the Setup section */
.su-set-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 8px; }
.su-set-btn { min-height: var(--tap); }

/* Today: the "Finish setting up" card */
.su-today { display: flex; align-items: center; gap: 12px; margin: 12px var(--gutter) 0; color: var(--ink); text-decoration: none; }
.su-today-text { display: grid; gap: 8px; flex: 1; min-width: 0; }
.su-today-title { font-size: 16px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.su-today-bar { height: 6px; }
.su-today-count { margin-top: -2px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.su-today-go { flex: none; min-height: var(--tap); }
.su-open-settings { margin-top: 12px; }   /* the office's "Setup is for the owner" page (W3 QA) */

/* ---- css/shop-settings.css */
/* shop-settings.css: wave 2 brief 1, the shop settings registry on the Settings screen (components/settings-controls.js).
 * Served inside /app/features.css after app.css, in file-name order. Every rule starts with this feature's own .ss-
 * class; the rows reuse the Settings screen's .set-row / .set-label / .switch as they are (docs/BUILDERS.md). Tokens only. */

/* a full-width row: a choice, a number, a time, words */
.ss-block { min-width: 0; margin: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--line); }
.ss-block legend { float: left; width: 100%; padding: 0; }
.ss-block legend + .set-sub, .ss-block legend + * { clear: both; }
.ss-block > .set-row-text { margin-bottom: 10px; }
.ss-card > .set-title + .ss-block, .ss-card > .set-intro + .ss-block, .ss-card > .set-title + .ss-row, .ss-card > .set-intro + .ss-row { margin-top: 10px; }

/* "Saved" */
.ss-saved { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ok-text);
  opacity: 0; transition: opacity var(--dur-release) var(--ease-out); }
.ss-saved.on { opacity: 1; }
.ss-saved:empty { min-height: 0; }
.ss-saved .icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* choices with one line each: stacked rows, the whole row is the target */
.ss-options { display: grid; gap: 8px; margin-top: 10px; }
.ss-option {
  position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: var(--tap); padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color var(--dur-release) var(--ease-out), transform var(--dur-release) var(--ease-out);
}
.ss-option input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--copper); }
.ss-option:active { background: var(--press-bg); transform: scale(var(--press-scale)); transition-duration: var(--dur-press); }
.ss-option:has(input:checked) { border-color: var(--copper); background: var(--copper-tint); }
.ss-option:has(input:disabled) { opacity: .7; cursor: default; }
.ss-option-text { display: grid; gap: 2px; min-width: 0; }
.ss-option-label { font-weight: 600; font-size: 15px; line-height: 22px; color: var(--ink); }
.ss-option-line { font-size: 14px; line-height: 20px; color: var(--ink-3); overflow-wrap: anywhere; }

/* up to three short choices: pills */
.ss-seg {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 10px; padding: 4px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface-2);
}
.ss-seg.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ss-seg label {
  position: relative; display: grid; place-items: center; min-height: var(--tap); padding: 0 4px; border-radius: var(--r-sm);
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color var(--dur-release) var(--ease-out), transform var(--dur-release) var(--ease-out);
}
.ss-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ss-seg label:active { background: var(--press-bg); transform: scale(var(--press-scale)); transition-duration: var(--dur-press); }
.ss-seg label:has(input:checked) { background: var(--copper-tint); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--copper); }
.ss-seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* more than three choices: a button that opens a sheet */
.ss-pick-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ss-pick { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-height: var(--tap); min-width: 180px; }
.ss-pick .icon { width: 18px; height: 18px; }

/* number, time, text */
.ss-field-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ss-num { display: inline-flex; align-items: center; gap: 6px; }
.ss-step { min-width: var(--tap); min-height: var(--tap); padding: 0; font-size: 20px; line-height: 1; }
.ss-num-input { width: 72px; min-height: var(--tap); text-align: center; font-variant-numeric: tabular-nums; }
.ss-unit { font-size: 15px; color: var(--ink-2); }
.ss-time-input { min-height: var(--tap); min-width: 140px; }
.ss-text-input { min-height: var(--tap); flex: 1 1 220px; min-width: 0; }
.ss-error { margin-top: 6px; }

/* words: chips with ×, then "+ Add a word" */
.ss-words { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.ss-word {
  display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding: 0 2px 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface-2); font-size: 14px; line-height: 20px; color: var(--ink);
}
.ss-word-x {
  position: relative; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-3); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ss-word-x::after { content: ""; position: absolute; inset: -6px; }        /* 44 px touch area */
.ss-word-x:active { background: var(--press-bg); }
.ss-word-x .icon { width: 16px; height: 16px; }
.ss-words-none { font-size: 14px; color: var(--ink-3); }
.ss-word-add { display: flex; flex-wrap: wrap; gap: 8px; }
.ss-word-input { flex: 1 1 180px; min-width: 0; min-height: var(--tap); }
.ss-word-add .btn { min-height: var(--tap); }

/* a section drawn by its own module: loading and failed */
.ss-loading { padding: 12px 0 4px; font-size: 14px; color: var(--ink-3); }
.ss-failed { padding: 12px 0 4px; font-size: 14px; line-height: 20px; color: var(--danger-text); }
.ss-owner-only { font-style: italic; }

@media (prefers-reduced-motion: reduce) { .ss-saved, .ss-option, .ss-seg label { transition-duration: 0ms; } }
@media (min-width: 1024px) {
  .ss-options { max-width: 560px; }
  .ss-seg { max-width: 420px; }
}

/* ---- css/smart-replies.css */
/* Smart replies (services/inbox/smart-replies.js): the one reply the assistant wrote, and the note under the buttons.
   Its own classes only (tests/css-scope.js); .reply-chip itself is the Inbox's (web/app/css/inbox.css), and this file loads after it. */
.reply-chip-suggested { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-style: dashed; border-color: var(--copper); }
.reply-chip-suggested .icon { width: 16px; height: 16px; flex: none; }
.reply-suggested-note { flex: 1 1 100%; margin: 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }

/* ---- css/subscription.css */
/* subscription.css: workstream D: the Subscription screen.
 * Served inside /app/features.css (services/api/static.js), after app.css, in file-name order. Scope every rule to this
 * feature's own classes; anything two features share belongs in app.css (docs/BUILDERS.md). */
/* ---- D: subscription + estimates (docs/CONTRACTOR-APP-PLAN.md workstream D) */
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--evergreen-text); }
.billing { padding: 0 var(--gutter); }
.billing .banner { margin: 8px 0 0; }
.billing-state { padding-top: 56px; }
.state-icon { width: 32px; height: 32px; margin: 0 auto 12px; color: var(--evergreen-text); display: block; }
.billing-grid { display: grid; gap: 0; margin-top: 12px; }
.plan-card { padding: 20px 18px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-name { margin-top: 6px; font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.01em; }
.plan-price { margin-top: 10px; display: flex; align-items: baseline; gap: 2px; color: var(--ink-2); }
.plan-price b { font-size: 44px; line-height: 48px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.plan-note { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--ink-3); }
.plan-kv { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); grid-template-columns: minmax(104px, 34%) 1fr; }
.plan-kv dd { font-weight: 500; }
.plan-sub { display: block; font-weight: 400; color: var(--ink-3); font-size: 13px; line-height: 18px; }
.plan-card .btn-block { margin-top: 20px; }
.plan-card .hint { margin-top: 10px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.plan-card .hint .icon { width: 14px; height: 14px; vertical-align: -2px; }
.start-card .plan-note { font-size: 15px; line-height: 22px; color: var(--ink-2); }
.offer { margin: 16px 0 0; border: 1px solid var(--card-line); border-radius: var(--r-md); background: var(--surface-2); }
.offer li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.offer li + li { border-top: 1px solid var(--line); }
.offer b { font-size: 22px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.billing-aside { margin-top: 12px; background: var(--surface-2); box-shadow: none; }
.billing-aside .aside-title { font-size: 15px; line-height: 20px; font-weight: 600; }
.billing-aside p { margin-top: 4px; font-size: 14px; line-height: 21px; color: var(--ink-2); }
.billing-invoices .section-title { margin-top: 24px; }
.invoice-list { padding: 0; overflow: hidden; }
.invoice { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main amount" "pill links"; gap: 8px 12px; align-items: center; padding: 14px 16px; }
.invoice + .invoice { border-top: 1px solid var(--line); }
.invoice-main { grid-area: main; display: grid; min-width: 0; }
.invoice-date { font-weight: 600; }
.invoice-desc { font-size: 14px; line-height: 20px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invoice-amount { grid-area: amount; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.invoice > .pill { grid-area: pill; justify-self: start; }
.invoice-links { grid-area: links; display: flex; gap: 8px; justify-content: flex-end; }
.invoice-empty { color: var(--ink-3); text-align: center; padding: 28px 16px; }

@media (min-width: 1024px) {
  .invoice-desc { white-space: normal; }
  .billing-grid { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 0 32px; align-items: start; margin-top: 16px; }
  .billing-invoices .section-title { margin-top: 0; }
  .invoice { grid-template-columns: 1fr auto 84px auto; grid-template-areas: "main amount pill links"; }
}

/* ---- css/team.css */
/* ---- Roles (wave 2 brief 12): Settings > Team (.team-*), the tech's home on Today (.tech-*) and "Who" in the visit sheet
   (.vs-who). Scoped to its own classes (docs/BUILDERS.md); tokens only, no hex and no colour-scheme media query (tokens.css
   handles light and dark). Buttons use the shared .btn sizes; every target is at least var(--tap) tall. */

/* ---- Settings > Team */
.team-list { list-style: none; margin: 0; padding: 0; }
.team-person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.team-person:last-child { border-bottom: 0; }
.team-who { min-width: 0; flex: 1 1 180px; }
.team-who .pill { margin-left: 8px; vertical-align: middle; }
.team-email { overflow-wrap: anywhere; }
.team-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.team-actions .btn { min-height: var(--tap); }
.team-add { margin-top: 12px; min-height: var(--tap); }
.team-form { display: grid; gap: 4px; }
.team-form .btn { margin-top: 8px; min-height: var(--tap); }
.team-roles { margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.team-roles legend { margin-bottom: 6px; }
.team-role { display: flex; align-items: flex-start; gap: 10px; min-height: var(--tap); padding: 10px 12px; margin-top: 6px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.team-role input { margin-top: 3px; flex: none; width: 20px; height: 20px; accent-color: var(--copper); }
.team-role:has(input:checked) { border-color: var(--copper); background: var(--copper-tint); }
.team-role-text { display: grid; gap: 2px; min-width: 0; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.team-role-text b { color: var(--ink); font-size: 16px; }
.team-sheet-actions { display: grid; gap: 8px; margin-top: 16px; }
.team-sheet-actions .btn { min-height: var(--tap); }

/* ---- Today for a tech */
.tech-home { display: grid; gap: 16px; margin: 0; min-width: 0; }   /* inside .today, which already has the gutter */
.tech-next { padding: 16px; border: 1px solid var(--card-line); border-radius: var(--r-lg); background: var(--surface); min-width: 0; }
.tech-kicker { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.tech-name { display: block; margin: 6px 0 0; font-size: 22px; line-height: 28px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.tech-when { margin: 4px 0 0; font-size: 16px; line-height: 22px; color: var(--ink-2); }
.tech-line { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; font-size: 15px; line-height: 22px; color: var(--ink-2); overflow-wrap: anywhere; min-width: 0; }
.tech-line .icon { flex: none; margin-top: 2px; }
a.tech-line { color: var(--ink); text-decoration: none; min-height: var(--tap); align-items: center; }
.tech-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.tech-contact .btn { min-height: var(--tap); }
.tech-step { margin-top: 14px; }
.tech-later h2, .tech-upcoming h2 { margin: 0 0 8px; }
.tech-empty { padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--ink-2); }
.tech-empty p { margin: 0; }

/* ---- Who, in the visit sheet */
.vs-who { display: grid; gap: 6px; margin-top: 12px; }
.vs-who select { min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--surface); font-size: 16px; }

/* ---- css/today.css */
/* today.css: workstream E: the Today dashboard, + Create, the Customer File money strip.
 * Served inside /app/features.css (services/api/static.js), after app.css, in file-name order. Scope every rule to this
 * feature's own classes; anything two features share belongs in app.css (docs/BUILDERS.md). */
/* ------------------------------------------------------------------ E: Today dashboard, + Create, customer money (2026-11-17) */
.topbar-end { display: flex; align-items: center; gap: 12px; }
.topbar-new { display: none; }
.today > * + * { margin-top: 24px; }
.today-cols { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
.today > .banner + .today-cols { margin-top: 16px; }
/* phone: one column under the tiles, in the order Needs you, Schedule, This month (the three results), New leads, Pipeline */
.today-main, .today-side { display: contents; }
.needs { order: 1; } .schedule { order: 2; } .month { order: 3; } .new-leads { order: 4; } .pipeline { order: 5; }
.today > .banner { margin-top: 8px; }
.today .section-head + * { margin-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.section-head .section-title { margin: 0; }
.section-link { min-height: 44px; margin: -12px 0; display: inline-flex; align-items: center; padding: 0 4px; font-size: 14px; font-weight: 500; color: var(--copper-text); text-decoration: none; }   /* 44 px to tap, W0 review S9; the negative margin keeps the heading row as tall as before */
.section-range { font-size: 14px; color: var(--ink-3); }
.card.calm { padding: 16px; }
.calm-title { font-weight: 600; font-size: 16px; line-height: 22px; }
.calm-sub { margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--ink-3); }
.today .need-list + .btn { margin-top: 10px; }

/* today's schedule */
.visits { list-style: none; margin: 0; padding: 0; }
ul.card.visits { padding: 4px 14px; }
.calm .visits { margin-top: 8px; border-top: 1px solid var(--line); }
.visit { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
.visit + .visit { border-top: 1px solid var(--line); }
.visit-time { font-size: 14px; line-height: 20px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.visit-time b { display: block; font-weight: 600; color: var(--ink); }
.visit-time span { display: block; }
.visit-body { min-width: 0; }
.visit-name { display: inline-block; margin-right: 8px; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.visit-job { font-size: 14px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; }
.visit-addr { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 2px; padding: 4px 0;   /* 44 px to tap, W0 review S9 */
   font-size: 14px; line-height: 20px; color: var(--ink-2); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.visit-addr .icon { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.visit-addr.none { color: var(--ink-3); }
.visit-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--attn-bg); color: var(--attn-text); font-size: 13px; line-height: 18px; }
.visit-note .icon { width: 14px; height: 14px; margin-top: 2px; flex: none; }
.visit.past { opacity: .62; }

/* pipeline */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) and (max-width: 1023px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label count" "money money"; align-items: baseline; gap: 2px 8px;
  min-height: 76px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-card); -webkit-tap-highlight-color: transparent;
}
.tile { touch-action: manipulation; transition: background-color var(--dur-release) var(--ease-out), transform var(--dur-release) var(--ease-out); }
.tile:active { background: var(--press-bg); transform: scale(var(--press-scale-lg)); transition-duration: var(--dur-press); }
@media (hover: hover) { .tile:hover { background: var(--surface-2); } }
.tile-leads { border-left-color: var(--info-text); }
.tile-sent { border-left-color: var(--line-2); }
.tile-viewed { border-left-color: var(--attn-text); }
.tile-signed { border-left-color: var(--ok-text); }
.tile-label { grid-area: label; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); }
.tile-count { grid-area: count; font-size: 24px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }   /* the plain font (Q31): no font-family here */
.tile-money { grid-area: money; font-size: 17px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile-money .upto, .kpi-value .upto, .money .upto { margin-right: 4px; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.tile-zero { color: var(--ink-3); font-weight: 500; }
.tile-leads .tile-money { font-size: 13px; font-weight: 400; color: var(--ink-3); }

/* this month */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-card); }
.kpi:first-child { grid-column: 1 / -1; }
.kpi-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); }
.kpi-value { font-size: 28px; line-height: 34px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi:first-child .kpi-value { font-size: 34px; line-height: 40px; }
.kpi-sub { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.trend { display: inline-flex; gap: 4px; align-items: baseline; margin-top: 2px; font-size: 13px; line-height: 18px; font-weight: 500; }
.trend.up { color: var(--ok-text); } .trend.down { color: var(--danger-text); } .trend.flat { color: var(--ink-3); font-weight: 400; }

/* skeleton shaped like Today */
.sk-card { padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.sk-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sk-line.tile { height: 76px; width: auto; margin: 0; border-radius: var(--r-md); }

/* the floating + (phone) */
.fab {
  position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); z-index: 19;
  width: 56px; height: 56px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--copper); color: var(--on-copper); box-shadow: 0 6px 18px rgba(41, 28, 20, .28); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.fab { touch-action: manipulation; transition: background-color var(--dur-release) var(--ease-out), transform var(--dur-release) var(--ease-out); }
.fab:active { background: var(--copper-press); transform: scale(.94); transition-duration: var(--dur-press); }
@media (hover: hover) { .fab:hover { background: var(--copper-hover); } }
/* One filled copper element per view: while an URGENT card is waiting, "Acknowledge URGENT" is the filled one and the + steps back to an outline. */
.screen:has(.need.urgent) ~ .fab { background: var(--surface); color: var(--copper-text); border: 1.5px solid var(--copper); box-shadow: var(--shadow-card); }
.screen:has(.need.urgent) ~ .fab:active { background: var(--press-bg); }
.fab svg { width: 26px; height: 26px; stroke-width: 2.4; }
.sheet .menu-soon { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 4px; border-bottom: 1px solid var(--line); opacity: .55; }
.sheet .menu li:last-child .menu-soon { border-bottom: 0; }
.sheet .menu-soon .icon { color: var(--ink-3); }
.sheet .search { margin-top: 12px; }
.sheet .pick-list { max-height: 40vh; overflow-y: auto; }

/* customer file: identity avatar, three-cell money strip */
.id-top { display: flex; align-items: center; gap: 12px; }
.id-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--evergreen); color: var(--on-evergreen); font-size: 15px; font-weight: 600; }
.money { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.money > div { padding: 10px 12px; display: flex; flex-direction: column; }
.money b { font-size: clamp(16px, 5vw, 21px); }
.money .money-label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-2); order: -1; }
.money .money-sub { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.money .money-none { color: var(--ink-3); }
.money-wrap { margin: 14px var(--gutter) 0; }
.money-wrap .money { margin: 0; }
.money-signed { display: flex; gap: 6px; align-items: center; margin-top: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--ok-bg); color: var(--ok-text); font-size: 14px; line-height: 20px; }
.money-signed .icon { width: 16px; height: 16px; flex: none; }
@media (max-width: 300px) { .money { grid-template-columns: 1fr; } .money > div + div { border-left: 0; border-top: 1px solid var(--line); } }

@media (min-width: 1024px) {
  .fab { display: none; }
  .topbar-new { display: inline-flex; }
  .screen.wide { max-width: 1180px; margin-left: calc(var(--sidebar-w) + 24px); }
  .today-cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
  .today-main, .today-side { display: block; }
  .today-main > * + *, .today-side > * + * { margin-top: 24px; }
  .today-side { position: sticky; top: 16px; }
  .screen.file .money-wrap { margin-left: 0; margin-right: 0; }
}
.kpis + .section-sub, .tiles + .section-sub { margin: 8px 0 0; }

/* customer file on a computer: two columns until there is room for three (the side menu takes 248px) */
@media (min-width: 1024px) {
  .screen.file { max-width: 1320px; margin-left: calc(var(--sidebar-w) + 24px); grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; grid-template-areas: "top top" "a c" "b c" ". c"; }
  .screen.file > .col-b { margin-top: 16px; }
}
@media (min-width: 1500px) {
  .screen.file { grid-template-columns: 300px minmax(0, 1fr) 360px; grid-template-rows: auto auto; grid-template-areas: "top top top" "a c b"; }
  .screen.file > .col-b { margin-top: 0; }
}

/* ------------------------------------------------------------------ wave 1: four tiles, big moments, three results, calls that did not book */
/* Numbers are in the plain font with tabular figures (Brandon Q31). */
.today .stats, .today-skel .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .today .stats, .today-skel .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.today .stat {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 4px; min-height: 76px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-align: left; text-decoration: none;
  font: inherit; cursor: pointer; box-shadow: var(--shadow-card); -webkit-tap-highlight-color: transparent;
}
.today .stat { touch-action: manipulation; transition: background-color var(--dur-release) var(--ease-out), transform var(--dur-release) var(--ease-out); }
.today .stat:active { background: var(--press-bg); transform: scale(var(--press-scale-lg)); transition-duration: var(--dur-press); }
@media (hover: hover) { .today .stat:hover { background: var(--surface-2); } }
.stat-count { font-family: var(--font-sans); font-size: 28px; line-height: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.today .stat-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); }
.today .stat.zero .stat-count { color: var(--ink-3); font-weight: 500; }
.stat-sk { height: 76px; width: auto; margin: 0; border-radius: var(--r-md); }
.today-skel > .stats { margin-bottom: 24px; }

.moments { display: grid; gap: 8px; }
.result-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.result {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 44px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-card); -webkit-tap-highlight-color: transparent;
}
.result { touch-action: manipulation; transition: background-color var(--dur-release) var(--ease-out), transform var(--dur-release) var(--ease-out); }
.result:active { background: var(--press-bg); transform: scale(var(--press-scale-lg)); transition-duration: var(--dur-press); }
@media (hover: hover) { .result:hover { background: var(--surface-2); } }
/* the one big figure on Today is a green card: Dollars booked */
.result:last-child { background: var(--brand-fill); border-color: var(--brand-fill); color: var(--on-evergreen); box-shadow: none; }
.result:last-child .result-label, .result:last-child .result-sub, .result:last-child .upto { color: var(--evergreen-2); }
.result:last-child .trend { color: var(--on-evergreen); }
.result:last-child:active { background: var(--brand-fill); }
.result-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); }
.result-value { font-family: var(--font-sans); font-size: 28px; line-height: 34px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result:last-child .result-value { font-size: 34px; line-height: 40px; }
.result-value .upto { margin-right: 4px; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.result-sub { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.result.zero .result-value { color: var(--ink-3); font-weight: 500; }
.result:last-child { grid-column: 1 / -1; }
.result-list + .section-sub { margin: 8px 0 0; }
.today-list .section-sub { margin: 0 0 12px; padding: 0 var(--gutter); }
.today-list > .card { margin: 0 var(--gutter); }
.today-list .row-line { margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* the outcome chip of a call, and its four choices */
.outcome-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.outcome-chip:active { background: var(--surface-2); }
.outcome-chip .outcome-caret { width: 16px; height: 16px; color: var(--ink-3); }
.outcome-chip.booked { background: var(--ok-bg); border-color: transparent; color: var(--ok-text); }
.outcome-chip.call_back { background: var(--attn-bg); border-color: transparent; color: var(--attn-text); }
.outcome-chip.not_a_fit, .outcome-chip.spam { color: var(--ink-2); }
.outcome-choices { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.outcome-choice { position: relative; display: block; width: 100%; min-height: 56px; padding: 8px 40px 8px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.outcome-choice:active { background: var(--surface-2); }
.outcome-choice b { display: block; font-weight: 600; }
.outcome-choice small { display: block; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.outcome-choice[aria-pressed="true"] { border-color: var(--copper); }
.outcome-choice .outcome-check { position: absolute; right: 14px; top: 50%; margin-top: -10px; color: var(--ok-text); }

/* the calls card */
.call-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.call-row { padding: 12px 0; }
.call-row + .call-row { border-top: 1px solid var(--line); }
.call-name { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.call-meta { font-size: 13px; line-height: 18px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.call-row .quote { margin-top: 4px; }
.call-row .quote.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.call-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.call-actions .btn { flex: 1 1 auto; }
.call-row .callhost:empty { display: none; }

/* ---- css/visits.css */
/* ---- visits (wave 1 brief 4): the visit's big button and steps row, the On my way sheet, site facts at the top of a
   visit, customer tags (chips + the Tags sheet). Scoped to its own classes (docs/BUILDERS.md); tokens only, no hex and no
   colour-scheme media query (tokens.css handles light and dark). Buttons use the shared .btn / .btn-main / .chip sizes. */

/* ---- steps row: Booked · On my way · Started · Done */
.vstep { margin-top: 16px; }
.vstep[hidden] { display: none; }
.vstep-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  margin: 0; padding: 0; list-style: none; counter-reset: none;
}
.vstep-row li {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0;
  color: var(--ink-3); font-size: 13px; line-height: 16px; text-align: center;
}
.vstep-row li::before {                                   /* the line between two marks */
  content: ""; position: absolute; top: 11px; left: calc(-50% + 14px); right: calc(50% + 14px);
  height: 2px; background: var(--line-2); border-radius: 1px;
}
.vstep-row li:first-child::before { display: none; }
.vstep-row li.passed::before { background: var(--evergreen-text); }
.vstep-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); color: var(--surface);   /* the tick: white on green (light), dark on light green (dark) */
}
.vstep-mark .icon { width: 14px; height: 14px; stroke-width: 3; }
.vstep-row li.passed .vstep-mark { background: var(--evergreen-text); border-color: var(--evergreen-text); }
.vstep-row li.passed { color: var(--ink); }
.vstep-label { font-weight: 500; overflow-wrap: anywhere; }
.vstep-row time { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 12px; }

/* ---- the running clock: "Started 9:12 am · 0:42" */
.vstep-clock {
  display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 12px;
  border-radius: var(--r-md); background: var(--evergreen-tint); border: 1px solid var(--evergreen-tint-line);
  color: var(--ink); font-size: 15px; line-height: 22px;
}
.vstep-clock .icon { color: var(--evergreen-text); flex: none; }
.vstep-clock b { margin-left: auto; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--evergreen-text); }
.vstep-bar { margin-top: 12px; }
.vstep-today { margin-top: 10px; }
.vstep-today .vstep-clock { margin-top: 0; margin-bottom: 8px; }

/* ---- On my way sheet */
.omw-to { margin: 4px 0 6px; color: var(--ink-2); font-size: 14px; }
.omw-text {
  margin: 0; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--ink); font-size: 16px; line-height: 24px; overflow-wrap: anywhere;
}
.omw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.omw-chips .chip { flex: 1 1 auto; justify-content: center; min-height: var(--tap); }
.omw-held, .omw-why { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; }
.omw-held .icon, .omw-why .icon { flex: none; margin-top: 2px; }
.omw-sent { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.omw-actions { display: grid; gap: 8px; margin-top: 16px; }
.omw .form-error { margin-top: 12px; }

/* ---- site facts at the top of a visit: tags, the pinned site note, the customer's own access words */
.vsite { display: grid; gap: 8px; margin: 8px 0 4px; }
.vsite[hidden] { display: none; }
.vsite-note {
  display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px;
  border-radius: var(--r-md); background: var(--attn-bg); color: var(--ink); font-size: 15px; line-height: 22px;
}
.vsite-note .icon { flex: none; margin-top: 2px; color: var(--attn-text); }
.vsite-said {
  display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--r-md);
  border: 1px dashed var(--line-2); background: var(--surface); color: var(--ink); font-size: 15px; line-height: 22px;
}
.vsite-said p { margin: 0; overflow-wrap: anywhere; }
.vsite-said b { color: var(--ink-2); font-weight: 600; }
.vsite-said .btn { justify-self: start; }

/* ---- tags: Gate code, Dog, VIP (a word with a mark, never color alone) */
.vtags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.vtag {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: var(--r-pill);
  border: 1px solid var(--evergreen-tint-line); background: var(--evergreen-tint); color: var(--evergreen-text);
  font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.vtag .icon { width: 14px; height: 14px; }
.vtag-dog { background: var(--attn-bg); border-color: var(--attn-bg); color: var(--attn-text); }
button.vtag {
  position: relative; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color var(--dur-release) var(--ease-out), transform var(--dur-release) var(--ease-out);
}
button.vtag::after { content: ""; position: absolute; inset: -8px -2px; }   /* 44 px touch area */
button.vtag:active { background: var(--press-bg); transform: scale(var(--press-scale)); transition-duration: var(--dur-press); }
button.vtag[aria-busy="true"] { opacity: .6; pointer-events: none; }
.vtag.suggested { border: 1px dashed var(--field-line); background: transparent; color: var(--ink-2); }
.vtag small { font-size: 12px; font-weight: 400; color: var(--ink-3); }

/* ---- Customer File header: the chips and the "Tags" button */
.file-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.file-tags .vtags { flex: 0 1 auto; }

/* ---- the Tags sheet: three switches */
.tag-switches { margin: 8px 0 0; padding: 0; list-style: none; }
.tag-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px;
  border-bottom: 1px solid var(--line);
}
.tag-switch:last-child { border-bottom: 0; }
.tag-switch-text { display: flex; align-items: baseline; gap: 8px; color: var(--ink); font-size: 16px; font-weight: 500; }
.tag-switch-text small { color: var(--ink-3); font-size: 13px; font-weight: 400; }

/* ---- css/voice.css */
/* voice.css: wave 3, Settings and the guided setup "Your phone greeting" (web/app/js/settings/voice.js).
 * Served inside /app/features.css (services/api/static.js), after app.css, in file-name order. Every rule is scoped to this
 * feature's own .vg-* classes; shared classes (.btn, .card, .set-row, .set-sub) are used as they are, never restyled here. */

.vg-section { display: grid; gap: 12px; }
.vg-intro { margin: 0; max-width: 60ch; }
.vg-voice, .vg-status { display: grid; gap: 10px; }
.vg-hear-row { display: grid; gap: 6px; justify-items: start; }
.vg-hear-row .set-sub { margin: 0; }
.vg-head { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--ink); }
.vg-state { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-2); max-width: 60ch; }
.vg-state.vg-live { color: var(--evergreen-text); font-weight: 600; }
.vg-state.vg-refused, .vg-state.vg-waiting {
  padding: 8px 12px; border-radius: var(--r-sm); background: var(--attn-bg); color: var(--attn-text); font-size: 14px; line-height: 20px;
}
.vg-heard { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-3); overflow-wrap: anywhere; }
.vg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vg-actions .btn, .vg-hear { min-height: var(--tap); }
.vg-call { flex: 1 1 auto; justify-content: center; }
.vg-listen, .vg-player { display: grid; gap: 6px; justify-items: start; }
.vg-listen audio { width: 100%; max-width: 420px; }
.vg-note { margin: 0; }
.vg-result { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.vg-result.bad { color: var(--attn-text); }
.vg-script { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); }
.vg-script-label { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-3); }
.vg-script-text { margin: 0; font-size: 17px; line-height: 26px; color: var(--ink); max-width: 60ch; }
.vg-texting { display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.vg-texting .set-sub { margin: 0; }
.vg-quote { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-2); font-style: italic; }

/* the transcript label under a voicemail (Inbox thread, customer file) */
.vg-source { margin: 2px 0 0; font-size: 12px; line-height: 16px; color: var(--ink-3); }

/* ---- css/wording-waiting.css */
/* Wording: an approved file's "Waiting for approval" list (app QA 3). Scoped to its own classes. */
.wd-waiting { margin-top: 12px; }
.wd-waiting .wd-wait-head { margin: 14px 0 2px; font-size: 15px; line-height: 20px; font-weight: 600; }
.wd-wait-list { list-style: none; margin: 8px 0 0; padding: 0; }
.wd-wait-list > li { padding: 10px 0; border-top: 1px solid var(--line); }
.wd-wait-item .wd-key { display: inline-block; min-height: 44px; line-height: 44px; overflow-wrap: anywhere; }
.wd-wait-item .wd-text { padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.wd-wait-item .wd-sample { margin-bottom: 6px; }
.wd-conflict + .wd-default { margin-bottom: 12px; }
