/* =====================================================================
   Contractor app: one stylesheet for the owner's app and the customer
   pages. Built from reports/02-design-tokens.css and the approved mockups
   (reports/design-mockups/).

   Colours and fonts come ONLY from the --brand-* block that the page emits
   from config/company.<client>.json (company.css_tokens()). This file
   derives everything else from those, so a new client is a config change.
   The few brand values the config has no slot for yet (logo-brown and the
   light "paper" family) are mixed from the configured colours below; a
   page may override them inline when the config grows those keys.
   ===================================================================== */

/* ---------------------------------------------------------------
   1. Derived brand values (overridable after this file loads)
   --------------------------------------------------------------- */
:root {
  --brand-logo-brown: color-mix(in srgb, var(--brand-cedar-dark) 72%, var(--brand-black));
  --brand-paper:      color-mix(in srgb, var(--brand-bone) 70%, #fff);
  --brand-sand:       color-mix(in srgb, var(--brand-bone) 86%, var(--brand-cedar));
  --brand-linen:      color-mix(in srgb, var(--brand-bone) 93%, var(--brand-cedar-dark));
  --brand-field:      color-mix(in srgb, var(--brand-bone) 35%, #fff);
  --brand-label-ink:  color-mix(in srgb, var(--brand-ink) 72%, var(--brand-sage-ink));

  /* Semantic: dark (default, matches the website) */
  --color-bg:              var(--brand-black);
  --color-bg-app:          var(--brand-ink);
  --color-surface:         color-mix(in srgb, var(--brand-bone) 5%, var(--brand-ink));
  --color-surface-2:       color-mix(in srgb, var(--brand-bone) 9%, var(--brand-ink));
  --color-glass:           color-mix(in srgb, var(--brand-black) 84%, transparent);
  --color-glass-strong:    color-mix(in srgb, var(--brand-black) 96%, transparent);
  --color-text:            var(--brand-bone);
  --color-text-muted:      var(--brand-muted);
  --color-line:            color-mix(in srgb, var(--brand-bone) 18%, transparent);
  --color-line-strong:     color-mix(in srgb, var(--brand-bone) 34%, transparent);
  --color-accent:          var(--brand-cedar);
  --color-accent-hover:    var(--brand-bone);
  --color-on-accent:       var(--brand-black);
  --color-accent-tint:     color-mix(in srgb, var(--brand-cedar) 15%, transparent);
  --color-accent-line:     color-mix(in srgb, var(--brand-cedar) 45%, transparent);
  --color-eyebrow:         var(--brand-cedar);
  --btn-secondary-bg:      color-mix(in srgb, var(--brand-black) 36%, transparent);
  --field-bg:              color-mix(in srgb, var(--brand-bone) 6%, transparent);
  --field-border:          color-mix(in srgb, var(--brand-bone) 24%, transparent);
  --field-text:            var(--brand-bone);
  --field-focus:           var(--brand-cedar);
  --grid-line:             rgba(255,255,255,.018);

  /* Status: colour + icon + word, never colour alone */
  --status-draft:   var(--brand-muted);
  --status-waiting: var(--brand-cedar);
  --status-active:  #a3b47c;
  --status-done:    #8cc084;
  --status-overdue: #e0835a;
  --on-light-waiting: var(--brand-cedar-dark);
  --on-light-active:  #4d5a33;
  --on-light-done:    #2f6b35;
  --on-light-overdue: #a3401f;
  --on-light-draft:   var(--brand-sage-ink);

  /* Type */
  --font-display: var(--brand-font-display);
  --font-body:    var(--brand-font-body);
  --text-hero:    clamp(2.4rem, 9vw, 3.2rem);
  --text-body:    1.0625rem;
  --weight-body:  400;

  /* Shape, touch, motion */
  --radius-button: 4px;
  --radius-card:   8px;
  --radius-media:  6px;
  --radius-sheet:  20px;
  --tap-min:      48px;
  --tap-default:  52px;
  --tap-primary:  56px;
  --tap-hero:     64px;
  --tap-shutter:  92px;
  --header-h:     80px;
  --tabbar-h:     calc(75px + var(--safe-bottom));
  --shadow-float: 0 10px 30px rgba(0,0,0,.45);
  --shadow-lift:  0 18px 40px rgba(0,0,0,.45);
  --safe-top:     env(safe-area-inset-top, 0px);
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
  --gutter:       16px;
  --max:          1180px;
  color-scheme: dark;
}

/* Sun mode: the site's bone palette for job-site glare. Photo heroes and
   the camera dock stay dark, like the website. */
:root[data-theme="sun"] {
  --color-bg:           var(--brand-bone);
  --color-bg-app:       var(--brand-bone);
  --color-surface:      var(--brand-paper);
  --color-surface-2:    #fff;
  --color-glass:        color-mix(in srgb, var(--brand-bone) 90%, transparent);
  --color-glass-strong: color-mix(in srgb, var(--brand-bone) 97%, transparent);
  --color-text:         var(--brand-ink);
  --color-text-muted:   var(--brand-sage-ink);
  --color-line:         rgba(5,7,6,.18);
  --color-line-strong:  rgba(5,7,6,.36);
  --color-accent-hover: var(--brand-cedar-dark);
  --color-eyebrow:      var(--brand-cedar-dark);
  --color-accent-tint:  color-mix(in srgb, var(--brand-cedar) 18%, transparent);
  --btn-secondary-bg:   transparent;
  --field-bg:           var(--brand-field);
  --field-border:       rgba(5,7,6,.28);
  --field-text:         var(--brand-ink);
  --field-focus:        var(--brand-cedar-dark);
  --status-draft:       var(--on-light-draft);
  --status-waiting:     var(--on-light-waiting);
  --status-active:      var(--on-light-active);
  --status-done:        var(--on-light-done);
  --status-overdue:     var(--on-light-overdue);
  --weight-body:        500;
  color-scheme: light;
}

/* Always-dark scope: photo heroes, the camera dock, dark sections */
.dark-scope {
  --color-text: var(--brand-bone);
  --color-text-muted: var(--brand-muted);
  --color-line: color-mix(in srgb, var(--brand-bone) 18%, transparent);
  --color-eyebrow: var(--brand-cedar);
  --color-surface: color-mix(in srgb, var(--brand-bone) 5%, var(--brand-ink));
  --color-accent-hover: var(--brand-bone);
  --btn-secondary-bg: color-mix(in srgb, var(--brand-black) 36%, transparent);
  --field-bg: color-mix(in srgb, var(--brand-bone) 6%, transparent);
  --field-border: color-mix(in srgb, var(--brand-bone) 24%, transparent);
  --field-text: var(--brand-bone);
  --status-draft: var(--brand-muted); --status-waiting: var(--brand-cedar);
  --status-active: #a3b47c; --status-done: #8cc084; --status-overdue: #e0835a;
  color: var(--color-text);
}

/* Light scope: the website's bone sections and "paper" cards */
.light, .paper, .items, .ledger-docs, .stat, .pdoc, .ask, .accept, .state-card, .faq, .meta, .zelle {
  --color-text: var(--brand-ink);
  --color-text-muted: var(--brand-sage-ink);
  --color-line: rgba(5,7,6,.14);
  --color-line-strong: rgba(5,7,6,.34);
  --color-eyebrow: var(--brand-cedar-dark);
  --color-surface: var(--brand-paper);
  --color-accent-hover: var(--brand-cedar-dark);
  --btn-secondary-bg: transparent;
  --field-bg: var(--brand-field);
  --field-border: rgba(5,7,6,.24);
  --field-text: var(--brand-ink);
  --field-focus: var(--brand-cedar-dark);
  --status-draft: var(--on-light-draft); --status-waiting: var(--on-light-waiting);
  --status-active: var(--on-light-active); --status-done: var(--on-light-done);
  --status-overdue: var(--on-light-overdue);
  color: var(--color-text);
  color-scheme: light;
}
.light { background: var(--brand-bone); }

/* ---------------------------------------------------------------
   2. Base
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--color-bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  font-family: var(--font-body); font-size: var(--text-body); font-weight: var(--weight-body);
  line-height: 1.55; color: var(--color-text);
  background-color: var(--color-bg-app);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
:root[data-theme="sun"] body { background-image: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: 0; margin: 0; line-height: 1.08; }
p { margin: 0; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--brand-cedar); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--brand-cedar) 40%, transparent); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ico { display: inline-block; vertical-align: -.2em; width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico--sm { width: 18px; height: 18px; }
.eyebrow .ico, p > .ico, .fine .ico, .lrow__sub .ico { display: inline-block; vertical-align: -.18em; margin-right: 4px; }
.ico--xs { width: 15px; height: 15px; stroke-width: 2.4; }
.ico--lg { width: 28px; height: 28px; }

.eyebrow { margin: 0 0 10px; color: var(--color-eyebrow); font-size: .8125rem; font-weight: 900; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--color-text-muted); }
.num { font-family: var(--font-display); font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.good { color: var(--status-done); }
.warn { color: var(--status-overdue); }
.fine { font-size: .8125rem; color: var(--color-text-muted); line-height: 1.5; }
.small { font-size: .9375rem; }
.center { text-align: center; }
.stack { display: grid; gap: 12px; }
.stack--lg { display: grid; gap: 18px; }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.wrap-anywhere { overflow-wrap: anywhere; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 14px; } .mt-3 { margin-top: 22px; } .mt-4 { margin-top: 34px; }
.mb-2 { margin-bottom: 14px; }

/* ---------------------------------------------------------------
   3. Buttons (the website's .button: 4px corners, 900 weight)
   --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap-default); padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--radius-button);
  font-size: 1.0625rem; font-weight: 900; line-height: 1.15; text-align: center; text-decoration: none;
  cursor: pointer; background: none; color: var(--color-text);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease, opacity 180ms ease;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }
.btn--primary, .btn-primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn--secondary, .btn-secondary, .btn-success {
  color: var(--color-text); background: var(--btn-secondary-bg);
  border-color: color-mix(in srgb, var(--color-text) 45%, transparent);
}
.btn--bone { background: var(--brand-bone); color: var(--brand-black); }
.btn--ghost { color: var(--color-eyebrow); padding: 0 10px; min-height: var(--tap-min); }
.btn--danger, .btn-danger { color: var(--status-overdue); background: transparent; border-color: currentColor; }
.btn--block, .btn-block { display: flex; width: 100%; }
.btn--lg { min-height: var(--tap-primary); }
.btn--hero { min-height: var(--tap-hero); width: 100%; font-size: 1.15rem; }
.btn--sm, .btn-sm { min-height: var(--tap-min); padding: 0 16px; font-size: 1rem; }
.btn .ico { margin-left: -2px; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn--primary:hover, .btn-primary:hover { background: var(--color-accent-hover); color: var(--color-on-accent); }
  :root[data-theme="sun"] .btn--primary:hover, .light .btn--primary:hover, .paper .btn--primary:hover { color: var(--brand-bone); }
  .btn--secondary:hover, .btn-secondary:hover { border-color: var(--color-accent); }
}
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; padding: 0 10px; gap: 8px; font-size: 1rem; white-space: nowrap; }
.nowrap { white-space: nowrap; }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: var(--tap-min); height: var(--tap-min); padding: 0;
  border-radius: 999px; border: 1px solid var(--color-line);
  background: var(--color-surface); color: var(--color-text); cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn--sq { border-radius: var(--radius-button); width: var(--tap-default); height: var(--tap-default); }
.icon-btn--lg { width: var(--tap-primary); height: var(--tap-primary); }
.icon-btn[aria-pressed="true"] { background: var(--brand-cedar); color: var(--brand-black); border-color: var(--brand-cedar); }

.text-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap-min);
  color: var(--color-eyebrow); font-weight: 900; white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer;
  max-width: 100%;
}
/* Its words wrap only when the link wouldn't fit (a 320 px phone), instead of pushing the page sideways. */
.text-link > span { border-bottom: 1px solid color-mix(in srgb, currentColor 62%, transparent); white-space: normal; min-width: 0; }
.text-link--quiet { color: var(--color-text-muted); font-weight: 800; }
.text-link--danger { color: var(--status-overdue); }
.link-row { display: flex; flex-wrap: wrap; gap: 4px 22px; }

/* ---------------------------------------------------------------
   4. Chips (status = colour + icon + word)
   --------------------------------------------------------------- */
.chip {
  --c: var(--status-waiting);
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 12px;
  border-radius: 999px; font-size: .8125rem; font-weight: 800; line-height: 1.2; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.chip .ico { width: 15px; height: 15px; stroke-width: 2.5; }
.chip[data-s="draft"]   { --c: var(--status-draft); }
.chip[data-s="active"]  { --c: var(--status-active); }
.chip[data-s="done"]    { --c: var(--status-done); }
.chip[data-s="overdue"] { --c: var(--status-overdue); }
.chip--solid { background: rgba(5,7,6,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.chip--plain { --c: var(--color-text-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.badge-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: .8125rem; font-weight: 800; color: var(--brand-bone);
  background: color-mix(in srgb, var(--brand-cedar) 15%, transparent); border: 1px solid color-mix(in srgb, var(--brand-cedar) 45%, transparent);
}

/* ---------------------------------------------------------------
   5. Surfaces
   --------------------------------------------------------------- */
.panel { padding: 16px; border-radius: var(--radius-card); border: 1px solid var(--color-line); background: var(--color-surface); }
.panel + .panel { margin-top: 12px; }
.paper {
  border-radius: var(--radius-card); background: var(--brand-paper); color: var(--brand-ink);
  border: 1px solid rgba(5,7,6,.12); overflow: hidden;
}
.paper--pad { padding: 18px 16px; }
.paper__row { padding: 16px; border-top: 1px solid rgba(5,7,6,.1); }
.paper__row:first-child { border-top: 0; }
.callout {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-card);
  background: var(--color-accent-tint); border: 1px solid var(--color-accent-line); font-size: .97rem; line-height: 1.5;
}
.callout .ico { color: var(--color-eyebrow); margin-top: 1px; flex-shrink: 0; }
/* Long links (the review URL) wrap inside the card on a phone instead of
   pushing the text off the right edge: a flex item won't shrink below its
   longest word unless min-width is 0. */
.callout > :not(.ico) { min-width: 0; overflow-wrap: anywhere; }
.callout a { overflow-wrap: anywhere; word-break: break-word; }
.callout--warn { --color-accent-tint: color-mix(in srgb, var(--status-overdue) 12%, transparent); --color-accent-line: color-mix(in srgb, var(--status-overdue) 45%, transparent); }
.callout--warn .ico { color: var(--status-overdue); }
.callout--good { --color-accent-tint: color-mix(in srgb, var(--status-done) 12%, transparent); --color-accent-line: color-mix(in srgb, var(--status-done) 45%, transparent); }
.callout--good .ico { color: var(--status-done); }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.disclosure { border-radius: var(--radius-card); border: 1px solid var(--color-line); }
.disclosure > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 0 16px; font-weight: 800; color: var(--color-text-muted);
}
.disclosure > summary .ico { transition: transform 180ms ease; }
.disclosure[open] > summary .ico { transform: rotate(90deg); }
.disclosure__body { padding: 0 16px 16px; }
.disclosure--danger > summary { color: var(--status-overdue); }

/* ---------------------------------------------------------------
   6. Forms (G8): 52px fields, sentence-case labels
   --------------------------------------------------------------- */
.field-group, .form-group { margin-bottom: 18px; }
.lbl, .form-label {
  display: block; margin: 0 0 7px; font-size: .9rem; font-weight: 900; line-height: 1.3;
  color: var(--color-text); letter-spacing: 0; text-transform: none;
}
.paper .lbl, .light .lbl, .paper .form-label, .light .form-label { color: var(--brand-label-ink); }
.lbl small, .form-label small { font-size: .8125rem; font-weight: 700; color: var(--color-text-muted); }
.field, .form-control {
  display: block; width: 100%; min-height: var(--tap-default); padding: 12px 14px;
  border: 1px solid var(--field-border); border-radius: var(--radius-button);
  background: var(--field-bg); color: var(--field-text);
  font-size: 1.0625rem; line-height: 1.35; outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.field::placeholder, .form-control::placeholder { color: color-mix(in srgb, var(--field-text) 50%, transparent); }
.field:focus, .form-control:focus { border-color: var(--field-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-cedar) 24%, transparent); }
textarea.field, textarea.form-control { min-height: 96px; resize: vertical; }
select.field, select.form-control {
  padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
select.field option, select.form-control option { color: #111; background: #fff; }
input[type="date"].field, input[type="date"].form-control { min-height: var(--tap-default); }
input[type="file"].field { padding: 12px; font-size: 1rem; }
.field-hint, .form-hint { margin-top: 6px; font-size: .9rem; color: var(--color-text-muted); line-height: 1.45; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.field-row > * { min-width: 0; }
/* side-by-side boxes line up even when one label wraps */
.field-row > .field-group { display: flex; flex-direction: column; }
.field-row > .field-group > .field:last-child { margin-top: auto; }
/* a half-width date box can't show a whole date on a phone: stack the row */
@media (max-width: 430px) { .field-row:has(input[type="date"]) { grid-template-columns: minmax(0, 1fr); row-gap: 0; } }
input[type="date"] { min-width: 0; max-width: 100%; }

.check-row {
  display: flex; gap: 14px; align-items: flex-start; min-height: 56px; padding: 14px;
  border-radius: var(--radius-card); background: color-mix(in srgb, var(--color-text) 6%, transparent); cursor: pointer;
  font-size: .97rem; line-height: 1.5;
}
.light .check-row, .paper .check-row { background: var(--brand-linen); color: var(--brand-label-ink); }
.check-row input[type="checkbox"], .check-row input[type="radio"], input.mat-check {
  appearance: none; -webkit-appearance: none; flex: none; width: 30px; height: 30px; margin: 0;
  border: 2px solid var(--color-line-strong); border-radius: 6px; background: var(--field-bg);
  display: grid; place-items: center; cursor: pointer;
}
.check-row input[type="radio"] { border-radius: 50%; }
.check-row input:checked, input.mat-check:checked { background: var(--brand-cedar-dark); border-color: var(--brand-cedar-dark); }
.check-row input[type="checkbox"]:checked::after, input.mat-check:checked::after { content: ""; width: 8px; height: 15px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px,-2px); }
.check-row input[type="radio"]:checked::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.check-row em { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(5,7,6,.08); font-style: normal; font-weight: 800; font-size: .8125rem; }

/* Segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--color-surface); border: 1px solid var(--color-line); }
.seg > button, .seg > a, .seg > label {
  display: grid; place-items: center; min-height: var(--tap-min); padding: 0 8px; border: 0; border-radius: 9px;
  background: transparent; font-weight: 800; font-size: .98rem; color: var(--color-text-muted); cursor: pointer; text-align: center; line-height: 1.15;
}
.seg > [aria-pressed="true"], .seg > .is-on, .seg > input:checked + label { background: var(--brand-cedar); color: var(--brand-black); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

/* Stepper (gloves: − 1 + instead of a number keyboard) */
.stepper { display: flex; align-items: stretch; min-height: var(--tap-default); border: 1px solid var(--field-border); border-radius: var(--radius-button); background: var(--field-bg); overflow: hidden; }
.stepper button { width: 52px; flex: none; border: 0; background: color-mix(in srgb, var(--field-text) 8%, transparent); font-size: 1.5rem; font-weight: 700; color: var(--field-text); display: grid; place-items: center; }
.stepper input { width: 100%; min-width: 0; border: 0; background: transparent; text-align: center; font-weight: 800; font-size: 1.1rem; color: var(--field-text); outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Toggle rows (64px, whole row tappable) */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 64px; padding: 10px 16px; border-top: 1px solid var(--color-line); cursor: pointer; }
.toggle:first-child { border-top: 0; }
.toggle b { display: block; font-weight: 800; }
.toggle small { display: block; font-size: .9rem; color: var(--color-text-muted); font-weight: 600; line-height: 1.35; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; flex: none; width: 56px; height: 34px; border-radius: 999px; background: rgba(5,7,6,.22); transition: background 180ms ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform 180ms ease; }
.toggle input:checked + .switch, .switch.on { background: var(--on-light-done); }
.toggle input:checked + .switch::after, .switch.on::after { transform: translateX(22px); }
.toggle input:focus-visible + .switch { outline: 3px solid var(--brand-cedar); outline-offset: 2px; }

/* ---------------------------------------------------------------
   7. Admin shell: demo strip, header, nav, tab bar, action bar
   --------------------------------------------------------------- */
.demo-strip {
  position: relative; z-index: 31; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap;
  padding: calc(2px + var(--safe-top)) 14px 2px; background: var(--brand-black); color: var(--brand-muted);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-cedar) 35%, transparent); font-size: .875rem; font-weight: 700;
}
.demo-strip__tag { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--brand-cedar); color: var(--brand-cedar); font-size: .8125rem; font-weight: 900; letter-spacing: .1em; }
.demo-strip a, .demo-strip button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--brand-cedar); font-weight: 900; background: none; border: 0; padding: 0; }
.demo-strip__links { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.demo-strip form { margin: 0; }
.notice-strip { padding: 10px 16px; background: #f2c94c; color: #1a1a1a; font-size: .9rem; font-weight: 800; text-align: center; }

.app-header {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  height: var(--header-h); padding: 10px 14px; color: var(--color-text);
  background: var(--color-glass); border-bottom: 1px solid var(--color-line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  transition: background 180ms ease, border-color 180ms ease;
}
body:not(.has-demo) .app-header { padding-top: calc(10px + var(--safe-top)); height: calc(var(--header-h) + var(--safe-top)); }
.has-hero .app-header:not(.is-scrolled) {
  color: var(--brand-bone); border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(180deg, rgba(5,7,6,.78), rgba(5,7,6,0));
}
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; min-width: 0; color: inherit; }
.brand__logo {
  width: 50px; height: 50px; flex: none; object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.32));
}
/* The wordmark pill sizes to its text: no clipping (overflow/max-width cut
   "Construction" off at larger phone text sizes) and a radius that stays
   rounded-rect on two lines instead of a stadium that shaves the corners. */
.brand__name {
  padding: .44em .85em .4em; border-radius: 1.1em; background: var(--brand-logo-brown);
  font-family: var(--font-display); font-weight: 800; font-size: .86rem; line-height: 1.04; text-align: center;
  color: var(--brand-bone); white-space: nowrap; flex: none;
}
@media (max-width: 380px) {
  .brand { gap: 6px; }
  .brand__logo { width: 42px; height: 42px; }
}
.app-header__title { flex: 1; min-width: 0; line-height: 1.15; }
.app-header__title b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-header__title span { display: block; font-size: .875rem; font-weight: 700; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.has-hero .app-header:not(.is-scrolled) .app-header__title { opacity: 0; }
.app-header__title { transition: opacity 180ms ease; }
.header-tools {
  margin-left: auto; display: flex; gap: 6px; padding: 5px; border-radius: var(--radius-sheet);
  background: color-mix(in srgb, var(--color-text) 6%, transparent); border: 1px solid var(--color-line);
}
.has-hero .app-header:not(.is-scrolled) .header-tools { background: rgba(5,7,6,.55); border-color: rgba(243,239,229,.14); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.header-tools .icon-btn { background: transparent; border-color: transparent; color: inherit; }
.header-tools .icon-btn[aria-pressed="true"] { background: var(--brand-cedar); color: var(--brand-black); }
.app-header .back { background: color-mix(in srgb, var(--color-text) 6%, transparent); border-color: var(--color-line); color: inherit; }
.has-hero .app-header:not(.is-scrolled) .back { background: rgba(5,7,6,.55); border-color: rgba(243,239,229,.14); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.desk-nav { display: none; }

/* Toasts (flash messages) */
.toasts { position: fixed; z-index: 60; left: 12px; right: 12px; top: calc(var(--header-h) + var(--safe-top) + 8px); display: grid; gap: 8px; pointer-events: none; }
.toast {
  --c: var(--status-done);
  pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; max-width: 560px; margin: 0 auto; width: 100%;
  padding: 14px 12px 14px 16px; border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--brand-black) 92%, transparent); color: var(--brand-bone);
  border: 1px solid rgba(243,239,229,.16); box-shadow: inset 4px 0 0 var(--c), var(--shadow-float);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 1rem; font-weight: 600; line-height: 1.45; animation: toast-in 260ms ease both;
}
.toast .ico { color: var(--c); margin-top: 1px; }
.toast__msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast__x { margin: -10px -6px -10px 0; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--brand-muted); }
.toast[data-kind="error"] { --c: #e0835a; }
.toast[data-kind="warning"] { --c: var(--brand-cedar); }
.toast[data-kind="info"] { --c: var(--brand-muted); }
.toast.is-leaving { animation: toast-out 220ms ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* Bottom tab bar with the centre "+" */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 6px 6px calc(8px + var(--safe-bottom));
  background: var(--color-glass); border-top: 1px solid var(--color-line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px;
  color: var(--color-text-muted); font-size: .8125rem; font-weight: 800; background: none; border: 0; padding: 0;
}
.tab__pill { display: grid; place-items: center; width: 58px; height: 32px; border-radius: 999px; transition: background 180ms ease; }
.tab .ico { width: 26px; height: 26px; }
.tab[aria-current="page"] { color: var(--color-eyebrow); }
.tab[aria-current="page"] .tab__pill { background: var(--color-accent-tint); }
.fab {
  display: grid; place-items: center; width: 66px; height: 66px; margin: -30px auto 2px; border-radius: 50%;
  background: var(--brand-cedar); color: var(--brand-black); border: 4px solid var(--color-bg-app); box-shadow: var(--shadow-float);
  transition: transform 180ms ease;
}
.tab:active .fab { transform: scale(.94); }
.tab--fab { gap: 0; color: var(--color-text); }
.tab--fab .fab { margin-bottom: 0; }
.tab--fab[aria-current="page"] { color: var(--color-eyebrow); }
.fab .ico { width: 30px; height: 30px; stroke-width: 2.6; }

/* Sticky thumb-zone action bar (detail screens) */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 10px 14px calc(12px + var(--safe-bottom));
  background: var(--color-glass); border-top: 1px solid var(--color-line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.actionbar > .btn, .actionbar > form > .btn { flex: 1; min-width: 0; min-height: var(--tap-primary); padding: 0 14px; white-space: normal; }
/* A long next step ("Sign & send the estimate") wraps to a second line on a
   narrow phone instead of being cut off mid-word; past two lines it's clipped. */
.actionbar > .btn > span, .actionbar > form > .btn > span {
  min-width: 0; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.actionbar > .btn--primary { font-size: 1.05rem; }
@media (max-width: 400px) {
  .actionbar > .btn, .actionbar > form > .btn { padding: 0 10px; gap: 8px; }
  .actionbar > .btn--primary, .actionbar > form > .btn--primary { font-size: 1rem; }
}
.actionbar > .icon-btn { width: var(--tap-primary); height: var(--tap-primary); }
.actionbar > .icon-btn .ico { width: 26px; height: 26px; }
.actionbar__sum { flex-basis: 100%; display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; font-weight: 700; color: var(--color-text-muted); }
.actionbar__sum span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actionbar__sum b { color: var(--color-text); }
.actionbar form { display: contents; }

.page-bottom { height: calc(112px + var(--safe-bottom)); }
.page-bottom--tall { height: calc(160px + var(--safe-bottom)); }
/* The tab bar stays on every owner screen (one tap to Home, Jobs, New job,
   Clients, Money from anywhere, like before). A screen's own action bar or
   the camera dock sits right on top of it. */
.has-tabbar .page-bottom { height: calc(var(--tabbar-h) + 28px); }
.has-tabbar .page-bottom--bar { height: calc(var(--tabbar-h) + 100px); }
.has-tabbar .page-bottom--tall { height: calc(var(--tabbar-h) + 140px); }
.has-tabbar .actionbar { bottom: var(--tabbar-h); padding-bottom: 10px; border-bottom: 1px solid var(--color-line); }
.has-tabbar .dock { bottom: var(--tabbar-h); padding-bottom: 14px; }

/* Sheets (bottom sheet on phones, dialog on desktop) */
dialog.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 560px; max-height: 92svh;
  padding: 10px 18px calc(20px + var(--safe-bottom)); border: 1px solid var(--color-line); border-bottom: 0;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; background: var(--color-bg-app); color: var(--color-text);
  box-shadow: 0 -12px 40px rgba(0,0,0,.5); overflow: auto; overscroll-behavior: contain;
}
dialog.sheet[open] { animation: sheet-up 260ms cubic-bezier(.2,.8,.2,1) both; }
dialog.sheet::backdrop { background: rgba(5,7,6,.62); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet__grip { width: 44px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--color-line-strong); }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet__head h2 { font-size: 1.5rem; }
.sheet__head p { margin-top: 4px; color: var(--color-text-muted); font-size: .97rem; }
.sheet-list { display: grid; gap: 10px; }
.sheet-item {
  display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 14px; border-radius: var(--radius-card);
  border: 1px solid var(--color-line); background: var(--color-surface); text-align: left; width: 100%; color: var(--color-text);
}
.sheet-item__icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--color-accent-tint); color: var(--color-eyebrow); }
.sheet-item--primary { background: var(--brand-cedar); border-color: var(--brand-cedar); color: var(--brand-black); }
.sheet-item--primary .sheet-item__icon { background: var(--brand-black); color: var(--brand-cedar); }
.sheet-item b { display: block; font-weight: 900; font-size: 1.06rem; }
.sheet-item small { display: block; font-size: .92rem; font-weight: 600; opacity: .8; }
.sheet-item .ico--chev { margin-left: auto; opacity: .6; }

/* ---------------------------------------------------------------
   8. Page scaffolding
   --------------------------------------------------------------- */
.page { padding: 18px var(--gutter) 0; max-width: 680px; margin: 0 auto; }
.page--wide { max-width: var(--max); }
.page-head { padding: 22px var(--gutter) 6px; max-width: 680px; margin: 0 auto; }
.page-head h1 { font-size: clamp(2rem, 8vw, 2.6rem); line-height: 1; }
.page-head p:not(.eyebrow) { margin-top: 8px; color: var(--color-text-muted); }
.section { padding: 34px var(--gutter); }
.section--tight { padding-top: 8px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section__head h2 { font-size: 1.6rem; line-height: 1.02; }
.section__head .eyebrow { margin-bottom: 8px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.block-head h2 { font-size: 1.4rem; line-height: 1.05; }
.block-head .muted { font-weight: 700; font-size: .95rem; }

.empty {
  position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 14px; justify-items: start;
  padding: 26px 20px; border-radius: var(--radius-card); border: 1px dashed var(--color-line-strong);
  background: var(--color-surface);
}
.empty h3 { font-size: 1.35rem; line-height: 1.15; }
.empty p { color: var(--color-text-muted); }
.empty--center { justify-items: center; text-align: center; }

.credit { margin: 28px 0 0; text-align: center; font-size: .8125rem; }
.credit a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 700; color: var(--color-text-muted); opacity: .7; }
.vendor-cta, .credit a.vendor-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 6px; padding: 0 18px; border-radius: var(--radius-button); background: var(--brand-cedar); color: var(--brand-black); font-weight: 900; opacity: 1; font-size: .95rem; }
@media (max-width: 599px) { .hide-sm { display: none !important; } }

/* Voice row: dashed "Tap and talk" */
.voice-row {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-card);
  border: 1px dashed color-mix(in srgb, var(--brand-cedar) 55%, transparent); background: var(--color-accent-tint);
}
.voice-row b { display: block; font-size: 1.06rem; line-height: 1.25; }
.voice-row small { display: block; margin-top: 2px; font-size: .92rem; color: var(--color-text-muted); line-height: 1.4; }
.voice-row__status { display: block; margin-top: 4px; font-size: .95rem; font-weight: 800; color: var(--color-eyebrow); min-height: 0; }
.voice-row__status:empty { display: none; }
.mic-sm, .mini-mic {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; flex: none; padding: 0;
  border: 0; border-radius: 50%; background: var(--brand-cedar); color: var(--brand-black); cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}
.mic-sm .ico, .mini-mic .ico { width: 28px; height: 28px; }
.mic-sm:active, .mini-mic:active { transform: scale(.94); }
.is-recording, .mini-mic.recording, .mic-sm.recording { background: var(--status-overdue) !important; color: var(--brand-black) !important; animation: rec-pulse 1.3s ease-in-out infinite; }
@keyframes rec-pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-overdue) 55%, transparent); } 50% { box-shadow: 0 0 0 14px transparent; } }
.voice-status {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: .95rem;
  color: var(--color-text); background: color-mix(in srgb, var(--color-text) 8%, transparent); border: 1px solid var(--color-line);
}
.voice-status[data-state="done"], .voice-status[data-state="saved"] { color: var(--status-done); background: color-mix(in srgb, var(--status-done) 12%, transparent); border-color: color-mix(in srgb, var(--status-done) 40%, transparent); }
.voice-status[data-state="error"], .voice-status[data-state="logged_out"] { color: var(--status-overdue); background: color-mix(in srgb, var(--status-overdue) 12%, transparent); border-color: color-mix(in srgb, var(--status-overdue) 40%, transparent); }
.voice-status[data-state="recording"], .voice-status[data-state="uploading"], .voice-status[data-state="retrying"] { color: var(--color-eyebrow); background: var(--color-accent-tint); border-color: var(--color-accent-line); }
.voice-status:empty { display: none; }

/* List rows (jobs, clients) */
.searchbar { position: sticky; top: calc(var(--header-h) + var(--safe-top)); z-index: 20; margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter); background: var(--color-glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.has-demo .searchbar { top: var(--header-h); }
.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); pointer-events: none; }
.search input { padding-left: 46px; border-radius: 999px; }
.filter-chips { display: flex; gap: 8px; margin: 10px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 2px; overflow-x: auto; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.fchip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap-min); padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--color-line); background: var(--color-surface); color: var(--color-text-muted); font-weight: 800; font-size: .95rem; white-space: nowrap;
}
.fchip[aria-pressed="true"] { background: var(--brand-cedar); border-color: var(--brand-cedar); color: var(--brand-black); }
.fchip b { font-weight: 900; opacity: .7; }

.list { display: grid; gap: 10px; }
.lrow {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 14px;
  min-height: 88px; padding: 10px 12px 10px 10px; border-radius: var(--radius-card); border: 1px solid var(--color-line);
  background: var(--color-surface); color: var(--color-text); transition: background 180ms ease, transform 180ms ease;
}
.lrow:active { transform: scale(.99); }
@media (hover: hover) { .lrow:hover { background: var(--color-surface-2); } }
.lrow__thumb { width: 72px; height: 72px; border-radius: var(--radius-media); object-fit: cover; background: var(--brand-pine); }
.lrow__thumb--empty { display: grid; place-items: center; color: color-mix(in srgb, var(--brand-bone) 70%, transparent);
  background: linear-gradient(135deg, var(--brand-pine), var(--brand-evergreen)); }
.lrow__body { min-width: 0; }
.lrow__title { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lrow__sub { margin-top: 2px; font-size: .95rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lrow__end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.lrow__amt { font-size: 1.15rem; }
.lrow__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.lrow .icon-btn { position: relative; z-index: 1; }
.avatar {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: var(--brand-logo-brown); color: var(--brand-bone); font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: .02em;
}

/* ---------------------------------------------------------------
   9. Dashboard
   --------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 26px) var(--gutter) 26px;
  background: var(--brand-black);
}
body:not(.has-demo) .hero { margin-top: calc(-1 * (var(--header-h) + var(--safe-top))); padding-top: calc(var(--header-h) + var(--safe-top) + 26px); }
.hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero__img--brand { background: var(--hero-photo, none) center/cover, radial-gradient(120% 90% at 80% 10%, color-mix(in srgb, var(--brand-cedar) 28%, var(--brand-evergreen)) 0%, var(--brand-ink) 62%, var(--brand-black) 100%); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(5,7,6,.9) 0%, rgba(5,7,6,.62) 44%, rgba(5,7,6,.3) 100%),
              linear-gradient(180deg, rgba(5,7,6,.35), rgba(5,7,6,.92));
}
.hero h1 { font-size: var(--text-hero); line-height: .96; max-width: 11ch; margin-bottom: 12px; }
.hero__lead { color: var(--brand-muted); font-size: 1.0625rem; line-height: 1.6; max-width: 34ch; }
.hero__lead b { color: var(--brand-bone); }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.hero-stat {
  display: block; padding: 14px 14px 12px; border-radius: var(--radius-card); background: rgba(5,7,6,.5);
  border: 1px solid rgba(243,239,229,.18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--brand-bone);
}
.hero-stat__label { font-size: .8125rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-cedar); }
.hero-stat__num { display: block; font-size: 1.95rem; line-height: 1.1; margin-top: 4px; }
.hero-stat__sub { font-size: .875rem; color: var(--brand-muted); font-weight: 600; }

.quick { display: grid; gap: 12px; padding: 18px var(--gutter) 0; }
.talk { justify-content: flex-start; gap: 14px; min-height: 80px; padding: 0 14px; text-align: left; }
.talk__mic { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 50%; background: var(--brand-black); color: var(--brand-cedar); }
.talk__mic .ico { width: 28px; height: 28px; }
.talk b { display: block; font-size: 1.2rem; }
.talk small { display: block; margin-top: 2px; font-size: .92rem; font-weight: 600; opacity: .78; }
.talk.is-recording .talk__mic { background: var(--brand-bone); color: var(--brand-black); }
.quick__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick__tiles .tile { min-height: 76px; font-size: .95rem; }

/* What's new (shown once after an upgrade) */
.whatsnew { position: relative; z-index: 2; margin: -18px var(--gutter) 0; padding: 18px 16px 16px; border-radius: var(--radius-card);
  background: var(--brand-bone); color: var(--brand-ink); box-shadow: var(--shadow-lift); border: 2px solid var(--brand-cedar); }
.whatsnew__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.whatsnew__head .eyebrow { color: var(--brand-cedar-dark); margin-bottom: 6px; }
.whatsnew__head h2 { font-size: 1.45rem; line-height: 1.1; }
.whatsnew__x { flex: none; width: 48px; height: 48px; margin: -8px -6px 0 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--brand-sage-ink); cursor: pointer; }
.whatsnew__list { display: grid; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.whatsnew__item { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }
.whatsnew__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-linen); color: var(--brand-cedar-dark); }
.whatsnew__item b { display: block; font-weight: 900; line-height: 1.3; }
.whatsnew__item b + span { display: block; margin-top: 2px; font-size: .97rem; line-height: 1.45; color: var(--brand-sage-ink); }
.whatsnew__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.whatsnew__more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 8px; list-style: none; cursor: pointer; font-weight: 800; color: var(--brand-cedar-dark); }
.whatsnew__more > summary::-webkit-details-marker { display: none; }
.whatsnew__more[open] > summary { display: none; }
.whatsnew__actions form { display: grid; margin: 0; }
.whatsnew.is-leaving { animation: toast-out 220ms ease both; }
.moved { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.moved li { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 12px 0; border-top: 1px solid var(--color-line); }
.moved li:first-child { border-top: 0; }
.moved b { font-weight: 900; }
.moved span { color: var(--color-text-muted); font-size: .97rem; line-height: 1.45; }
.talk-live { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--radius-card); border: 1px solid var(--color-accent-line); background: var(--color-accent-tint); }
.talk-live:empty { display: none; }
.transcript {
  padding: 12px 14px; border-left: 3px solid var(--brand-cedar); border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--brand-black) 45%, transparent); font-family: var(--font-display); font-style: italic; font-size: 1rem; line-height: 1.5; color: var(--color-text);
}
:root[data-theme="sun"] .transcript { background: var(--brand-paper); }

.todo-list { display: grid; gap: 12px; }
.todo {
  --c: var(--status-waiting);
  position: relative; padding: 16px 16px 14px 20px; border-radius: var(--radius-card);
  background: var(--color-surface); border: 1px solid var(--color-line);
}
.todo::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 5px; border-radius: 0 5px 5px 0; background: var(--c); }
.todo[data-s="overdue"] { --c: var(--status-overdue); }
.todo[data-s="done"] { --c: var(--status-done); }
.todo[data-s="active"] { --c: var(--status-active); }
.todo[data-s="draft"] { --c: var(--status-draft); }
.todo__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.todo__amt { font-size: 1.55rem; line-height: 1; white-space: nowrap; }
.todo__note { font-size: 1rem; font-weight: 800; color: var(--color-text-muted); white-space: nowrap; }
.todo__title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.todo__actions { position: relative; z-index: 1; }
.todo__title { display: block; margin-top: 10px; font-family: var(--font-display); font-size: 1.22rem; font-weight: 800; line-height: 1.15; }
.todo__sub { margin-top: 3px; color: var(--color-text-muted); font-size: .97rem; }
.todo__actions { display: flex; gap: 10px; margin-top: 14px; }
.todo__actions > .btn, .todo__actions > form { flex: 1; }
.todo__actions form .btn { width: 100%; }
.todo__actions .btn { min-height: var(--tap-min); font-size: 1rem; }
.todo__actions .icon-btn--sq { width: var(--tap-default); height: var(--tap-min); }
.all-clear { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius-card); border: 1px solid color-mix(in srgb, var(--status-done) 40%, transparent); background: color-mix(in srgb, var(--status-done) 8%, var(--color-surface)); }
.all-clear .ico { color: var(--status-done); width: 30px; height: 30px; }
.all-clear b { display: block; font-family: var(--font-display); font-size: 1.2rem; }

.jobs-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
.jobs-rail::-webkit-scrollbar { display: none; }
.job-card { display: block; scroll-snap-align: start; overflow: hidden; border-radius: var(--radius-card); border: 1px solid var(--color-line); background: var(--brand-black); color: var(--brand-bone); }
:root[data-theme="sun"] .job-card { background: #fff; color: var(--brand-ink); }
.job-card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(135deg, var(--brand-pine), var(--brand-evergreen)); }
.job-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 280ms ease; }
.job-card__media--empty { display: grid; place-items: center; color: color-mix(in srgb, var(--brand-bone) 55%, transparent); }
.job-card__media--empty > .ico { width: 44px; height: 44px; stroke-width: 1.5; }
@media (hover: hover) { .job-card:hover .job-card__media img { transform: scale(1.03); } }
.job-card__media .chip { position: absolute; left: 12px; top: 12px; }
.job-card__day { position: absolute; right: 12px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(5,7,6,.72); color: var(--brand-bone); font-size: .8125rem; font-weight: 800; }
.job-card__body { padding: 16px 16px 18px; }
.job-card__body h3 { font-size: 1.3rem; line-height: 1.1; }
.job-card__meta { margin-top: 4px; color: var(--color-text-muted); font-size: .95rem; }
:root:not([data-theme="sun"]) .job-card__meta { color: var(--brand-muted); }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 14px; }
.steps i { height: 6px; border-radius: 3px; background: color-mix(in srgb, currentColor 18%, transparent); }
.steps .done { background: var(--status-done); }
.steps .now { background: var(--brand-cedar); }
.steps-label { display: flex; justify-content: space-between; margin-top: 8px; font-size: .875rem; font-weight: 700; opacity: .85; }
.steps-label b { color: var(--brand-cedar); }
:root[data-theme="sun"] .steps-label b { color: var(--brand-cedar-dark); }

.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { display: block; padding: 16px; border-radius: var(--radius-card); background: var(--brand-paper); border: 1px solid rgba(5,7,6,.12); color: var(--brand-ink); }
.stat__label { font-size: .9375rem; font-weight: 800; color: var(--brand-label-ink); }
.stat__num { display: block; margin-top: 6px; font-size: 1.75rem; line-height: 1.05; color: var(--brand-ink); overflow-wrap: anywhere; }
.stat__sub { margin-top: 4px; font-size: .875rem; font-weight: 600; color: var(--brand-sage-ink); }
.stat--good .stat__num { color: var(--on-light-done); }
.stat--warn .stat__sub { color: var(--on-light-overdue); font-weight: 800; }
.bar { display: flex; height: 10px; border-radius: 5px; background: rgba(5,7,6,.1); overflow: hidden; margin-top: 18px; }
.bar i { display: block; height: 100%; }
.bar-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .875rem; font-weight: 700; color: var(--brand-sage-ink); }
.bar-key span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--k); }
.counts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: .9375rem; font-weight: 700; color: var(--brand-sage-ink); }
.counts b { color: var(--brand-ink); font-family: var(--font-display); font-size: 1.1rem; }
/* Tappable summary boxes (item 32): each opens its itemized list. */
a.stat--link { text-decoration: none; transition: border-color .15s, transform .15s; }
a.stat--link:hover, a.stat--link:focus-visible { border-color: var(--brand-cedar); }
a.stat--link:active { transform: scale(.98); }
.counts a { color: inherit; text-decoration: none; }
.counts a:hover b, .counts a:focus-visible b { text-decoration: underline; }

@media (max-width: 979px) {
  .dash { display: flex; flex-direction: column; }
  .dash > div, .dash > aside { display: contents; }
  .o-today { order: 0; } .o-quick { order: 1; } .o-needs { order: 2; } .o-jobs { order: 3; } .o-money { order: 4; }
}

/* ---------------------------------------------------------------
   10. Job detail
   --------------------------------------------------------------- */
.job-hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 400px;
  display: flex; flex-direction: column; justify-content: flex-end;
  margin-top: calc(-1 * var(--header-h)); padding: calc(var(--header-h) + 18px) var(--gutter) 22px; background: var(--brand-black);
}
body:not(.has-demo) .job-hero { margin-top: calc(-1 * (var(--header-h) + var(--safe-top))); }
.job-hero > img, .job-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.job-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(5,7,6,.5) 0%, rgba(5,7,6,.2) 28%, rgba(5,7,6,.78) 55%, rgba(5,7,6,.95) 100%); }
.job-hero--plain { min-height: 300px; }
.job-hero h1 { font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: .98; max-width: 14ch; margin: 4px 0 8px; overflow-wrap: anywhere; }
.job-hero__client { font-size: 1.1rem; font-weight: 700; }
.job-hero__addr { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--brand-muted); font-size: .98rem; }
.job-hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.job-hero__who { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.job-hero__who > div { min-width: 0; }
.job-hero__edit {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; font-size: .9375rem; font-weight: 800; color: var(--brand-bone); text-decoration: none;
  background: rgba(5,7,6,.55); border: 1px solid rgba(243,239,229,.18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.job-hero__edit:hover { border-color: var(--brand-accent); }

.contact-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px var(--gutter) 0; }
/* The texts-off reason / "Turn texts off" under the contact row keep its gutter. */
.contact-note { padding: 0 var(--gutter); }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 72px; padding: 6px 4px;
  border-radius: var(--radius-card); border: 1px solid var(--color-line); background: var(--color-surface);
  font-size: .875rem; font-weight: 800; color: var(--color-text); text-align: center; line-height: 1.15; cursor: pointer;
}
.tile .ico { width: 26px; height: 26px; color: var(--color-eyebrow); }
.tile[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.next-step { margin: 14px var(--gutter) 0; }
.next-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 14px; border-radius: var(--radius-card);
  border: 1px solid var(--color-accent-line); background: var(--color-accent-tint); color: var(--color-text); text-align: left; cursor: pointer; }
.next-row--warn { --color-accent-line: color-mix(in srgb, var(--status-waiting) 45%, transparent); }
.next-row__icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--brand-cedar); color: var(--brand-black); }
.next-row__txt { flex: 1; min-width: 0; }
.next-row__txt small { display: block; font-size: .8125rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--color-eyebrow); }
.next-row__txt b { display: block; font-size: 1.1rem; font-weight: 900; line-height: 1.25; }
.next-row__txt span { display: block; font-size: .95rem; color: var(--color-text-muted); line-height: 1.4; }

.progress { margin: 18px var(--gutter) 0; padding: 16px; border-radius: var(--radius-card); border: 1px solid var(--color-line); background: var(--color-surface); }
.progress__track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pstep { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pstep i { height: 8px; border-radius: 4px; background: var(--color-line); }
.pstep.done i { background: var(--status-done); }
.pstep.now i { background: var(--brand-cedar); }
.pstep b { font-family: var(--font-display); font-size: .95rem; font-weight: 800; color: var(--color-text-muted); }
.pstep span { display: block; font-size: .8125rem; font-weight: 800; line-height: 1.2; color: var(--color-text-muted); }
.pstep.now b, .pstep.now span { color: var(--color-eyebrow); }
.pstep.done b { color: var(--color-text); }
.progress__now { display: none; margin-top: 12px; font-size: .95rem; font-weight: 700; color: var(--color-text-muted); }
.progress__now b { color: var(--color-eyebrow); }
@media (max-width: 599px) { .pstep span { display: none; } .progress__now { display: block; } }
.progress__note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--color-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: .95rem; }

.jump {
  position: sticky; top: calc(var(--header-h) + var(--safe-top) + 6px); z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 18px var(--gutter) 0; padding: 4px;
  border-radius: 12px; background: var(--color-glass); border: 1px solid var(--color-line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.has-demo .jump { top: calc(var(--header-h) + 6px); }
.jump a { display: grid; place-items: center; min-height: 48px; border-radius: 9px; font-weight: 800; font-size: .95rem; color: var(--color-text-muted); }
.jump a[aria-current="true"] { background: var(--brand-cedar); color: var(--brand-black); }
[id] { scroll-margin-top: calc(var(--header-h) + 80px); }

/* Money ledger: one bone paper card, a row per document */
.ledger-docs { border-radius: var(--radius-card); background: var(--brand-paper); color: var(--brand-ink); border: 1px solid rgba(5,7,6,.12); overflow: hidden; }
.ledger-docs > .card { position: relative; border-top: 1px solid rgba(5,7,6,.1); }
.ledger-docs > .card:first-child { border-top: 0; }
.doc { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 14px 16px; }
.doc__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-button); background: var(--brand-linen); color: var(--brand-cedar-dark); align-self: start; }
.doc__toggle { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; width: 100%; min-height: 48px; padding: 0; text-align: left; background: none; border: 0; color: inherit; cursor: pointer; }
.doc__name { flex: 1 1 170px; font-weight: 800; font-size: 1.02rem; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.doc__amt { margin-left: auto; font-size: 1.3rem; text-align: right; white-space: nowrap; }
.doc__meta { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .92rem; color: var(--brand-sage-ink); }
.doc__seen { display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; font-weight: 700; }
.doc__chev { margin-left: auto; }
/* Every document's actions show right away (nothing is a tap deeper than
   before); tapping the row folds it away if Mason wants it tidy. */
.doc__open { display: block; padding: 0 16px 16px; }
.card.is-collapsed .doc__open { display: none; }
.doc__chev { transform: rotate(90deg); }
.card.is-collapsed .doc__chev { transform: none; }
.audit-inline { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-button); background: var(--brand-linen); font-size: .9375rem; line-height: 1.5; color: var(--brand-label-ink); overflow-wrap: anywhere; }
.audit-inline dt { font-weight: 900; color: var(--on-light-done); }
.audit-inline dd { margin: 2px 0 0; }
.doc__chev { width: 18px; height: 18px; color: var(--brand-sage-ink); transition: transform 180ms ease; }
.doc__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.doc__actions > .btn:only-child, .doc__actions > form:only-child { grid-column: 1 / -1; }
.doc__actions form { margin: 0; display: grid; }
.doc__actions .btn { min-height: var(--tap-min); font-size: 1rem; padding: 0 12px; }
.doc__more { display: flex; flex-wrap: wrap; gap: 2px 20px; margin-top: 8px; }
.doc__more a, .doc__more button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none; font-weight: 800; font-size: .95rem; color: var(--brand-cedar-dark); cursor: pointer; }
.doc__more form { margin: 0; }
.doc__more .danger { color: var(--on-light-overdue); }
.doc__note { margin-top: 10px; font-size: .92rem; color: var(--brand-sage-ink); line-height: 1.5; }
.doc__sub-form { margin-top: 12px; padding: 14px; border-radius: var(--radius-card); background: var(--brand-linen); }
.doc__sub-form h4 { font-family: var(--font-body); font-weight: 900; font-size: 1rem; margin-bottom: 10px; }
.balance { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px; background: var(--brand-ink); color: var(--brand-bone); }
.balance span { font-weight: 800; }
.balance .num { font-size: 1.9rem; color: var(--brand-cedar); }
.balance--done .num { color: var(--status-done); }
.signed-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 2px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--on-light-done) 45%, transparent); background: color-mix(in srgb, var(--on-light-done) 10%, transparent); color: var(--on-light-done); font-weight: 800; font-size: .875rem; }
.audit { display: grid; gap: 8px; font-size: 1rem; }
.audit div { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; }
.audit dt, .audit .k { font-weight: 800; color: var(--color-text-muted); }
.audit .v { overflow-wrap: anywhere; }

.costs { margin-top: 0; padding: 16px; border-radius: var(--radius-card); border: 1px solid var(--color-line); background: var(--color-surface); }
.costs__row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 1rem; }
.costs__row b { font-weight: 800; }
.costs__left { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--color-line); }
.costs__left .num { font-size: 1.7rem; color: var(--status-done); }
.costs__left.is-neg .num { color: var(--status-overdue); }
.meter { height: 10px; border-radius: 5px; background: var(--color-line); margin-top: 12px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand-cedar); border-radius: inherit; }
.exp { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-line); }
.exp b { display: block; font-weight: 800; }
.exp small { display: block; font-size: .92rem; color: var(--color-text-muted); }
.exp__end { display: flex; flex-direction: column; align-items: flex-end; }
.exp .num { font-size: 1.15rem; }

.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.ph { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-media); overflow: hidden; background: var(--brand-pine); padding: 0; border: 0; cursor: pointer; width: 100%; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph__tag { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 2px 8px; border-radius: 999px; background: rgba(5,7,6,.75); color: var(--brand-bone); font-size: .8125rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph--hidden img { opacity: .4; }
.ph__hidden { position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(5,7,6,.8); color: var(--brand-bone); }
.ph__hidden .ico { width: 16px; height: 16px; }
.ph-wrap { position: relative; }
.ph-wrap > .ph { width: 100%; }
.ph__btns { position: absolute; top: 4px; right: 4px; display: grid; gap: 4px; z-index: 2; }
.ph__btns form { margin: 0; }
.ph__btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid rgba(243,239,229,.22);
  background: rgba(5,7,6,.66); color: var(--brand-bone); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: pointer; }
.ph__btn .ico { width: 20px; height: 20px; }
.ph__btn--off { background: var(--brand-cedar); color: var(--brand-black); border-color: var(--brand-cedar); }
.ph--add { display: grid; place-items: center; align-content: center; gap: 4px; border: 2px dashed var(--color-line-strong); background: transparent; color: var(--color-eyebrow); font-weight: 900; font-size: .95rem; }
.ph--add .ico { width: 30px; height: 30px; }
.ph--add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.note { padding: 14px 0; border-bottom: 1px solid var(--color-line); }
.note__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .875rem; font-weight: 700; color: var(--color-text-muted); }
.note p { margin-top: 6px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.note__act { display: flex; gap: 18px; margin-top: 2px; }
.note__act form { margin: 0; }
.note__act button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; font-weight: 800; font-size: .95rem; color: var(--color-eyebrow); }
.note__act .quiet { color: var(--color-text-muted); }

.more { margin: 6px var(--gutter) 0; }
.more .disclosure__body { display: grid; gap: 10px; }
.more-sec .stack { gap: 10px; }

/* Photo viewer */
dialog.viewer { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5,7,6,.96); color: var(--brand-bone); }
dialog.viewer[open] { display: grid; grid-template-rows: auto 1fr auto; }
dialog.viewer::backdrop { background: rgba(5,7,6,.9); }
.viewer__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + var(--safe-top)) 14px 10px; }
.viewer__top b { font-weight: 800; }
.viewer__img { min-height: 0; display: grid; place-items: center; padding: 0 8px; }
.viewer__img img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 6px; }
.viewer__bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 14px calc(16px + var(--safe-bottom)); }
.viewer__bar form { display: grid; margin: 0; }
.viewer__bar .btn { min-height: var(--tap-primary); }
.viewer .icon-btn { background: rgba(243,239,229,.08); border-color: rgba(243,239,229,.18); color: var(--brand-bone); }

/* ---------------------------------------------------------------
   11. Builder (estimate / invoice / change order)
   --------------------------------------------------------------- */
.voice {
  position: relative; isolation: isolate; overflow: hidden; margin-top: 16px; padding: 24px 18px 20px;
  border-radius: var(--radius-card); text-align: center; border: 1px solid rgba(243,239,229,.18); background: var(--brand-ink);
}
.voice::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(rgba(11,18,14,.86), rgba(11,18,14,.94)), var(--texture-photo, radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--brand-cedar) 22%, var(--brand-evergreen)), var(--brand-ink) 70%)); background-size: cover; background-position: center; }
.voice h2 { font-size: 1.5rem; line-height: 1.1; }
.voice__help { margin: 6px auto 0; max-width: 32ch; font-size: .98rem; color: var(--brand-muted); }
.mic {
  position: relative; display: grid; place-items: center; width: var(--tap-shutter); height: var(--tap-shutter); margin: 20px auto 0;
  border: 0; border-radius: 50%; background: var(--brand-cedar); color: var(--brand-black); cursor: pointer;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--brand-cedar) 14%, transparent), 0 0 0 22px color-mix(in srgb, var(--brand-cedar) 7%, transparent);
  transition: transform 160ms ease;
}
.mic:active { transform: scale(.95); }
.mic .ico { width: 40px; height: 40px; }
.voice__state { margin-top: 20px; min-height: 0; }
.voice .transcript { margin-top: 14px; text-align: left; }
.voice__example { margin-top: 12px; font-family: var(--font-display); font-style: italic; color: var(--brand-muted); font-size: .97rem; }

.chips-row { display: flex; gap: 8px; margin: 18px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 4px; overflow-x: auto; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.tchip {
  flex: none; display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--color-accent-line); background: var(--color-accent-tint); font-weight: 800; font-size: .95rem; white-space: nowrap; color: var(--color-text); cursor: pointer;
}
.tchip:active { transform: scale(.97); }

.items { border-radius: var(--radius-card); background: var(--brand-paper); color: var(--brand-ink); border: 1px solid rgba(5,7,6,.12); overflow: hidden; }
.item { border-top: 1px solid rgba(5,7,6,.1); }
.item:first-child { border-top: 0; }
.item__sum { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 6px 8px 6px 16px; }
.item__sum > button { min-height: 44px; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.item__d b { font-weight: 800; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.item__a { font-size: 1.2rem; text-align: right !important; padding: 0 8px !important; white-space: nowrap; }
.item__q small { font-size: .92rem; font-weight: 600; color: var(--brand-sage-ink); }
.item__x { justify-self: end; width: 48px; display: grid !important; place-items: center; color: var(--on-light-overdue); }
.item__edit { display: none; padding: 16px; }
.item.is-open { background: #fffdf7; box-shadow: inset 4px 0 0 var(--brand-cedar); }
.item.is-open .item__sum { display: none; }
.item.is-open .item__edit { display: block; }
.qty-row { display: grid; grid-template-columns: minmax(0, 168px) 1fr; gap: 12px; margin-top: 14px; }
.edit-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.edit-foot .num { font-size: 1.4rem; }
.linkbtn, .remove-btn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap-min); padding: 0; border: 0; background: none; font-weight: 800; font-size: 1rem; color: var(--on-light-overdue); cursor: pointer; }
.done-line { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap-min); padding: 0 16px; border-radius: var(--radius-button); border: 1px solid rgba(5,7,6,.3); background: transparent; font-weight: 900; color: var(--brand-ink); }
.add-line {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: var(--tap-primary); margin-top: 12px;
  border: 2px dashed color-mix(in srgb, var(--brand-cedar) 55%, transparent); border-radius: var(--radius-card); background: transparent;
  color: var(--color-eyebrow); font-weight: 900; font-size: 1.05rem; cursor: pointer;
}
.totals { padding: 6px 16px 16px; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid rgba(5,7,6,.1); }
.trow > span:first-child, .trow > label { font-weight: 700; color: var(--brand-sage-ink); }
.trow > label small { display: inline; font-size: .9rem; }
.trow .mini { width: 120px; min-height: var(--tap-min); text-align: right; }
.trow--total { border-bottom: 0; padding-top: 10px; }
.trow--total > span:first-child { color: var(--brand-ink); font-weight: 900; font-size: 1.05rem; }
.trow--total .num { font-size: 2.3rem; line-height: 1; }
.trow--credit .num { color: var(--on-light-done); }
.trow small { display: block; font-size: .85rem; font-weight: 600; color: var(--brand-sage-ink); }
.side .block-head:first-child { margin-top: 0; }

.builder { padding: 16px var(--gutter) 0; }
.builder .main, .builder .side { min-width: 0; }

/* ---------------------------------------------------------------
   12. Camera
   --------------------------------------------------------------- */
.target {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 80px; padding: 10px 14px 10px 10px;
  border-radius: var(--radius-card); border: 1px solid var(--color-line); background: var(--color-surface); text-align: left; color: var(--color-text); cursor: pointer;
}
.target img, .target__ph { width: 60px; height: 60px; border-radius: 6px; object-fit: cover; flex: none; background: var(--brand-pine); display: grid; place-items: center; color: var(--brand-muted); }
.target b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.15; }
.target small { display: block; font-size: .92rem; font-weight: 600; color: var(--color-text-muted); }
.target__change { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-weight: 900; color: var(--color-eyebrow); white-space: nowrap; }
.phase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.phase button { min-height: var(--tap-primary); border-radius: var(--radius-button); border: 1px solid var(--color-line); background: var(--color-surface); font-weight: 900; font-size: 1.05rem; color: var(--color-text-muted); }
.phase button[aria-pressed="true"] { background: var(--brand-cedar); border-color: var(--brand-cedar); color: var(--brand-black); }
.cam-vis { margin-top: 10px; }
.cam-vis small { display: block; margin-top: 2px; font-size: .875rem; font-weight: 600; color: var(--color-text-muted); }
.viewfinder { position: relative; margin-top: 16px; aspect-ratio: 4/3; border-radius: var(--radius-card); overflow: hidden; background: #000; color: var(--brand-bone); }
.viewfinder video, .viewfinder img { width: 100%; height: 100%; object-fit: cover; }
.viewfinder__grid { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(90deg, transparent 33.2%, rgba(243,239,229,.25) 33.3%, transparent 33.5%, transparent 66.5%, rgba(243,239,229,.25) 66.6%, transparent 66.8%),
                    linear-gradient(transparent 33.2%, rgba(243,239,229,.25) 33.3%, transparent 33.5%, transparent 66.5%, rgba(243,239,229,.25) 66.6%, transparent 66.8%); }
.viewfinder__tag { position: absolute; left: 12px; top: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(5,7,6,.75); color: var(--brand-bone); font-weight: 800; font-size: .875rem; }
.viewfinder__idle { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; padding: 20px; color: var(--brand-muted);
  background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--brand-cedar) 16%, var(--brand-evergreen)), var(--brand-black)); }
.viewfinder__idle .ico { width: 46px; height: 46px; color: var(--brand-cedar); stroke-width: 1.6; }
.viewfinder__idle b { color: var(--brand-bone); font-family: var(--font-display); font-size: 1.25rem; }
.queue { display: grid; gap: 8px; }
.up { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius-card); border: 1px solid var(--color-line); background: var(--color-surface); }
.up img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; flex: none; background: var(--brand-pine); }
.up__txt { flex: 1; min-width: 0; }
.up__txt b { display: block; font-weight: 800; font-size: 1rem; }
.up__state { display: flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; }
.up__state .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.up__state.ok { color: var(--status-done); } .up__state.wait { color: var(--status-waiting); } .up__state.bad { color: var(--status-overdue); }
.up .bar { margin-top: 6px; height: 6px; background: var(--color-line); }
.up .bar i { background: var(--brand-cedar); }
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px 22px calc(16px + var(--safe-bottom)); background: rgba(5,7,6,.92); border-top: 1px solid rgba(243,239,229,.14);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); color: var(--brand-bone);
}
.dock__side { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 800; color: var(--brand-muted); }
.dock__side .sq { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 10px; border: 1px solid rgba(243,239,229,.25); background: rgba(243,239,229,.06); overflow: hidden; color: var(--brand-bone); }
.dock__side .sq img { width: 100%; height: 100%; object-fit: cover; }
.dock__side .sq input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dock__side .done { background: var(--brand-bone); color: var(--brand-black); border-color: var(--brand-bone); }
.shutter { position: relative; display: grid; place-items: center; width: var(--tap-shutter); height: var(--tap-shutter); border-radius: 50%; border: 4px solid var(--brand-bone); background: transparent; cursor: pointer; padding: 0; }
.shutter span { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--brand-cedar); color: var(--brand-black); transition: transform 140ms ease; }
.shutter:active span { transform: scale(.9); }
.shutter .ico { width: 32px; height: 32px; }
.shutter input { position: absolute; inset: 0; opacity: 0; cursor: pointer; border-radius: 50%; }
.picker-list { display: grid; gap: 8px; max-height: 52svh; overflow: auto; }
.picker-list .target { min-height: 72px; }
.picker-list .target[aria-current="true"] { border-color: var(--brand-cedar); background: var(--color-accent-tint); }

/* ---------------------------------------------------------------
   13. Customer pages (portal, accept, pay, lien waiver, legal)
       These must feel like the company's website.
   --------------------------------------------------------------- */
.site { background: var(--brand-black); color: var(--brand-bone); }
.site body, body.site { background: var(--brand-black); background-image: none; }
.site-head { position: absolute; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-top)) 14px 10px; }
.site-head--static { position: relative; background: var(--brand-black); border-bottom: 1px solid color-mix(in srgb, var(--brand-bone) 12%, transparent); }
.brand-mark { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--brand-bone); }
.brand-mark__logo { width: 56px; height: 56px; flex: none; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,.32)); }
.brand-mark__text { padding: .38em .72em .34em; border-radius: 999px; background: var(--brand-logo-brown); font-family: var(--font-display); font-weight: 800; font-size: .86rem; line-height: 1.04; text-align: center; color: var(--brand-bone); }
.site-tools { margin-left: auto; display: flex; gap: 6px; padding: 6px; border-radius: 20px; background: rgba(5,7,6,.84); border: 1px solid rgba(243,239,229,.12); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.header-call { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: 999px; font-weight: 900; font-size: .98rem; color: var(--brand-black); background: var(--brand-bone); white-space: nowrap; }
.header-call .ico { width: 20px; height: 20px; }

.site-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: min(72svh, 620px); padding: calc(130px + var(--safe-top)) 18px 40px; background: var(--brand-black); }
.site-hero--short { min-height: 0; padding-bottom: 36px; }
.site-hero > img, .site-hero__img { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; }
.site-hero__img--brand { background: var(--hero-photo, none) center/cover, radial-gradient(120% 90% at 80% 10%, color-mix(in srgb, var(--brand-cedar) 30%, var(--brand-evergreen)) 0%, var(--brand-ink) 60%, var(--brand-black) 100%); }
.site-hero::after { content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg, rgba(5,7,6,.9) 0%, rgba(5,7,6,.62) 44%, rgba(5,7,6,.25) 100%), linear-gradient(180deg, rgba(5,7,6,.32), rgba(5,7,6,.88)); }
.site-hero h1 { font-size: clamp(2.5rem, 11vw, 2.9rem); line-height: .96; max-width: 12ch; margin-bottom: 16px; overflow-wrap: anywhere; }
.site-hero__lead { max-width: 36ch; color: var(--brand-muted); font-size: 1.08rem; line-height: 1.7; }
.site-hero__addr { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--brand-muted); font-size: 1rem; }
.site-hero__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.site-hero__total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 20px; }
.site-hero__total .num { font-size: clamp(2.6rem, 12vw, 3.2rem); line-height: 1; }
.site-hero__total small { color: var(--brand-muted); font-weight: 700; }

.site-section { padding: 56px 18px; }
.site-section--dark { position: relative; isolation: isolate; background: var(--brand-ink); }
.site-intro { margin-bottom: 26px; }
.site-intro .eyebrow { margin-bottom: 12px; }
.site-intro h2 { font-size: 2.1rem; line-height: 1; }
.site-intro p:not(.eyebrow) { margin-top: 12px; color: var(--color-text-muted); line-height: 1.7; }

.ask { position: relative; z-index: 2; margin: -28px 18px 0; padding: 20px; border-radius: var(--radius-card); background: var(--brand-bone); color: var(--brand-ink); box-shadow: var(--shadow-lift); }
.ask .eyebrow { color: var(--brand-cedar-dark); margin-bottom: 8px; }
.ask h3 { font-size: 1.45rem; line-height: 1.1; }
.ask__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 6px; color: var(--brand-sage-ink); }
.ask__row .num { font-size: 1.6rem; color: var(--brand-ink); white-space: nowrap; }
.ask .btn { margin-top: 16px; }
.ask + .ask { margin-top: 12px; }

.psteps { display: grid; gap: 10px; }
.pstep-row { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-card); border: 1px solid color-mix(in srgb, var(--brand-bone) 18%, transparent); background: rgba(5,7,6,.6); }
.pstep-row__n { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; color: rgba(243,239,229,.4); }
.pstep-row b { display: block; font-family: var(--font-display); font-size: 1.2rem; }
.pstep-row small { display: block; font-size: .92rem; color: var(--brand-muted); }
.pstep-row__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--brand-bone) 22%, transparent); color: var(--brand-black); }
.pstep-row__mark .ico { width: 18px; height: 18px; stroke-width: 2.8; }
.pstep-row.done .pstep-row__n { color: var(--status-done); }
.pstep-row.done .pstep-row__mark { background: var(--status-done); border-color: var(--status-done); }
.pstep-row.now { border-color: var(--brand-cedar); background: color-mix(in srgb, var(--brand-cedar) 12%, transparent); }
.pstep-row.now .pstep-row__n { color: var(--brand-cedar); }
.pstep-row.now .pstep-row__mark { border-color: var(--brand-cedar); background: var(--brand-cedar); }
.when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.when > div { padding: 14px 16px; border-radius: var(--radius-card); border: 1px solid color-mix(in srgb, var(--brand-bone) 18%, transparent); background: rgba(5,7,6,.6); }
.when small { display: block; font-size: .8125rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-cedar); }
.when b { display: block; margin-top: 2px; font-family: var(--font-display); font-size: 1.25rem; }

.update { position: relative; padding: 0 0 30px 22px; border-left: 2px solid color-mix(in srgb, var(--brand-cedar) 50%, transparent); }
.update:last-child { border-left-color: transparent; padding-bottom: 0; }
.update::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-cedar); }
.update__date { font-size: .875rem; font-weight: 800; color: var(--brand-cedar); }
.update p { margin-top: 6px; font-size: 1.06rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.update__sig { margin-top: 6px; font-family: var(--font-display); font-style: italic; color: var(--brand-muted); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }

.docs { display: grid; gap: 14px; }
.pdoc { padding: 20px; border-radius: var(--radius-card); border: 1px solid rgba(5,7,6,.16); background: var(--brand-paper); color: var(--brand-ink); }
.pdoc--due { border: 2px solid var(--brand-cedar); background: var(--brand-field); }
.pdoc__top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.pdoc__label { font-size: .92rem; font-weight: 800; color: var(--brand-sage-ink); }
.pdoc h3 { margin-top: 8px; font-size: 1.35rem; line-height: 1.12; overflow-wrap: anywhere; }
.pdoc__amt { margin-top: 10px; font-size: 2.4rem; line-height: 1; }
.pdoc__sub { margin-top: 6px; color: var(--brand-sage-ink); font-size: .98rem; }
.pdoc__lines { margin-top: 12px; display: grid; gap: 4px; font-size: .97rem; }
.pdoc__lines div { display: flex; justify-content: space-between; gap: 12px; }
.pdoc__lines .strong { font-weight: 900; color: var(--brand-ink); }
.pay { display: grid; gap: 10px; margin-top: 18px; }
.pay .btn { justify-content: flex-start; text-align: left; padding: 10px 16px; min-height: var(--tap-primary); font-size: 1rem; line-height: 1.25; }
.zelle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-card); background: var(--brand-linen); border: 1px solid rgba(5,7,6,.14); }
.zelle b { display: block; font-weight: 900; }
.zelle small { display: block; color: var(--brand-sage-ink); font-size: .95rem; overflow-wrap: anywhere; }
.zelle button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border-radius: var(--radius-button); border: 1px solid rgba(5,7,6,.35); background: transparent; font-weight: 900; color: var(--brand-ink); }
.fee { font-size: .875rem; color: var(--brand-sage-ink); text-align: center; line-height: 1.5; }
.fee .ico { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }

.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gallery-item { position: relative; overflow: hidden; border-radius: var(--radius-card); aspect-ratio: 1; background: color-mix(in srgb, var(--brand-sand) 70%, var(--brand-sage-ink)); }
.gallery-item--wide { grid-column: span 2; aspect-ratio: 16/9; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms ease; }
@media (hover: hover) { .gallery-item:hover img { transform: scale(1.045); } }
.gallery-item figcaption { position: absolute; left: 8px; bottom: 8px; right: 8px; padding: 3px 10px; border-radius: 999px; width: fit-content; max-width: calc(100% - 16px); background: rgba(5,7,6,.72); color: var(--brand-bone); font-size: .8125rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.faq { border-radius: var(--radius-card); border: 1px solid rgba(5,7,6,.16); background: var(--brand-paper); color: var(--brand-ink); }
.faq + .faq { margin-top: 12px; }
.faq > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; padding: 0 18px; font-weight: 900; }
.faq > summary span { color: var(--brand-cedar-dark); font-size: .95rem; }
.faq__chev { display: grid; place-items: center; transition: transform 180ms ease; }
.faq[open] > summary .faq__chev { transform: rotate(180deg); }
.faq__body { padding: 0 18px 18px; font-size: .97rem; line-height: 1.65; color: var(--brand-label-ink); max-height: 340px; overflow: auto; }
.faq__body h1, .faq__body h2, .faq__body h3, .faq__body h4 { font-size: 1.05rem; margin: 14px 0 6px; }
.faq__body p, .faq__body li { margin: 0 0 10px; }

.site-foot { display: flex; flex-direction: column; gap: 14px; padding: 36px 18px calc(30px + var(--safe-bottom)); color: var(--brand-muted); background: var(--brand-black); border-top: 1px solid color-mix(in srgb, var(--brand-bone) 14%, transparent); }
.site-foot__brand { display: flex; gap: 14px; align-items: center; }
.site-foot__brand .brand-mark__logo { width: 72px; height: 72px; }
.site-foot__brand b { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--brand-bone); }
.site-foot__brand small { display: block; font-size: .95rem; }
.site-foot .text-link { color: var(--brand-cedar); }
.site-foot__links { display: flex; flex-wrap: wrap; gap: 0 18px; font-size: .9375rem; }
.site-foot__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand-muted); border-bottom: 0; }
.site-foot .credit { margin: 0; padding-top: 12px; text-align: left; border-top: 1px solid rgba(243,239,229,.08); }
.site-foot .credit a { padding: 0; color: rgba(243,239,229,.7); opacity: 1; }
.owner-pill { position: fixed; left: 12px; bottom: calc(12px + var(--safe-bottom)); z-index: 50; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: rgba(5,7,6,.82); color: var(--brand-bone); border: 1px solid rgba(243,239,229,.2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-size: .875rem; font-weight: 800; box-shadow: var(--shadow-float); }
.owner-pill b { color: var(--brand-cedar); letter-spacing: .1em; font-size: .8125rem; }
.owner-pill a { color: var(--brand-bone); display: inline-flex; align-items: center; min-height: 44px; }
.draft-banner ~ .site-head { position: relative; background: var(--brand-black); }
.draft-banner ~ main .site-hero { padding-top: 40px; }
.draft-banner { position: relative; z-index: 21; padding: 12px 16px; background: #b45309; color: #fff; font-size: .9375rem; text-align: center; font-weight: 700; line-height: 1.45; }

/* Before & after reveal */
.ba-frame { position: relative; border-radius: var(--radius-card); overflow: hidden; aspect-ratio: 4/3; background: var(--brand-pine); }
.ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-tag { position: absolute; bottom: 8px; z-index: 2; padding: 3px 10px; border-radius: 999px; background: rgba(5,7,6,.75); color: var(--brand-bone); font-size: .8125rem; font-weight: 800; }
.ba-range { width: 100%; height: 48px; margin: 6px 0 0; accent-color: var(--brand-cedar-dark); }

/* Accept pages */
.acc-wrap { padding: 40px 18px; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; padding: 18px; border-radius: var(--radius-card); background: var(--brand-paper); border: 1px solid rgba(5,7,6,.16); }
.meta small { display: block; font-size: .8125rem; font-weight: 900; color: var(--brand-label-ink); }
.meta b { display: block; font-weight: 800; font-size: 1.02rem; overflow-wrap: anywhere; }
.sh { font-size: 1.9rem; line-height: 1; margin: 40px 0 16px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 16px 0; border-bottom: 1px solid rgba(5,7,6,.16); }
.line b { font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.line .num { font-size: 1.2rem; white-space: nowrap; }
.line small { grid-column: 1 / -1; color: var(--brand-sage-ink); font-size: .95rem; }
.line--credit .num { color: var(--on-light-done); }
.acc-totals { margin-top: 10px; }
.acc-totals .t { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; color: var(--brand-sage-ink); font-weight: 700; }
.acc-totals .t--total { margin-top: 6px; padding-top: 14px; border-top: 2px solid var(--brand-cedar-dark); color: var(--brand-ink); align-items: baseline; }
.acc-totals .t--total .num { font-size: clamp(1.8rem, 8vw, 2.3rem); }
/* The label wraps ("Change order / total") when a big amount needs the room,
   instead of pushing the amount off a phone screen. */
.acc-totals .t--total > span:first-child { min-width: 0; }
.acc-totals .t--dep { color: var(--brand-cedar-dark); }
.pull { margin-top: 28px; padding: 18px 18px 18px 20px; border-left: 4px solid var(--brand-cedar); background: var(--brand-paper); border-radius: 0 8px 8px 0; }
.pull p { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; line-height: 1.55; white-space: pre-wrap; }
.pull small { display: block; margin-top: 8px; font-weight: 800; color: var(--brand-sage-ink); }
.accept { padding: 22px 18px; border-radius: var(--radius-card); background: var(--brand-paper); border: 2px solid var(--brand-cedar); color: var(--brand-ink); }
.accept h2 { font-size: 1.8rem; line-height: 1.02; margin-bottom: 12px; }
.legal { font-size: .97rem; line-height: 1.6; color: var(--brand-label-ink); }
.legal p + p { margin-top: 10px; }
.accept .lbl { margin: 20px 0 8px; }
.accept .field { min-height: 56px; font-size: 1.1rem; }
.sig-preview { min-height: 2.2em; margin-top: 8px; padding: 4px 0; font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--brand-ink); border-bottom: 1px solid rgba(5,7,6,.3); overflow-wrap: anywhere; }
.accept .check-row { margin-top: 16px; }
.cancel-note { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-card); border: 1px solid rgba(5,7,6,.16); background: #fff; font-weight: 700; font-size: .97rem; line-height: 1.55; color: var(--brand-ink); }
.accept .btn--hero { margin-top: 20px; }
.secure { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 10px; font-size: .9rem; color: var(--brand-sage-ink); font-weight: 600; text-align: center; }
.secure .ico { width: 16px; height: 16px; }
.nexts { display: grid; gap: 14px; margin-top: 32px; }
.next { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: start; }
.next b.num { font-size: 1.6rem; color: var(--brand-cedar-dark); }
.next strong { display: block; font-weight: 900; }
.next span { color: var(--brand-sage-ink); font-size: .98rem; }
.state-card { padding: 22px 18px; border-radius: var(--radius-card); background: var(--brand-paper); border: 1px solid rgba(5,7,6,.16); color: var(--brand-ink); }
.state-card h2 { font-size: 1.7rem; line-height: 1.05; margin-bottom: 10px; }
.state-card p { color: var(--brand-label-ink); line-height: 1.6; }
.state-card p + p { margin-top: 10px; }
.state-card--done { border: 2px solid var(--on-light-done); }
.state-card--closed { border: 2px solid var(--brand-sage-ink); }
.doc-paper { padding: 24px 18px; border-radius: var(--radius-card); background: #fff; color: #1a1a1a; border: 1px solid rgba(5,7,6,.16); box-shadow: 0 2px 0 rgba(5,7,6,.04); overflow-wrap: anywhere; }
.doc-paper h1, .doc-paper h2, .doc-paper h3 { color: var(--brand-ink); }
.doc-paper table { width: 100%; border-collapse: collapse; }
.prose { font-size: 1.02rem; line-height: 1.7; }
.prose h1 { font-size: 2rem; margin: 0 0 12px; }
.prose h2 { font-size: 1.35rem; margin: 28px 0 10px; }
.prose h3 { font-size: 1.12rem; margin: 22px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose a { color: var(--brand-cedar-dark); font-weight: 800; border-bottom: 1px solid currentColor; }

/* ---------------------------------------------------------------
   14. Login
   --------------------------------------------------------------- */
.login { position: relative; isolation: isolate; min-height: 100svh; display: grid; align-items: end; padding: calc(40px + var(--safe-top)) 18px calc(30px + var(--safe-bottom)); overflow: hidden; background: var(--brand-black); }
.login__photo { position: absolute; inset: 0; z-index: -2; background: var(--hero-photo, none) center/cover, radial-gradient(130% 90% at 80% 0%, color-mix(in srgb, var(--brand-cedar) 30%, var(--brand-evergreen)) 0%, var(--brand-ink) 58%, var(--brand-black) 100%); }
.login::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5,7,6,.35) 0%, rgba(5,7,6,.6) 40%, rgba(5,7,6,.94) 100%); }
.login__inner { width: 100%; max-width: 440px; margin: 0 auto; }
.login__logo { width: 104px; height: 104px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,.4)); margin-bottom: 18px; }
.login__mark { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--brand-logo-brown); color: var(--brand-bone); margin-bottom: 18px; }
.login__mark .ico { width: 40px; height: 40px; }
.login h1 { font-size: clamp(2.5rem, 11vw, 3.2rem); line-height: .96; margin-bottom: 12px; }
.login__lead { color: var(--brand-muted); font-size: 1.06rem; line-height: 1.6; max-width: 34ch; }
.login__form { display: grid; gap: 14px; margin-top: 26px; }
.login__form .field { min-height: var(--tap-primary); font-size: 1.1rem; }
.login__note { margin-top: 18px; font-size: .9rem; color: var(--brand-muted); }
.login .credit { text-align: left; margin-top: 18px; }

/* ---------------------------------------------------------------
   15. Desktop (>= 980px): the site's pill nav, two-column layouts
   --------------------------------------------------------------- */
@media (min-width: 980px) {
  :root { --header-h: 84px; --gutter: 24px; }
  .tabbar { display: none; }
  .page-bottom, .has-tabbar .page-bottom, .has-tabbar .page-bottom--bar { height: 60px; }
  .page-bottom--tall, .has-tabbar .page-bottom--tall { height: 140px; }
  .app-header { padding: 12px max(24px, calc((100% - var(--max)) / 2)); }
  body:not(.has-demo) .app-header { padding-top: 12px; }
  .desk-nav { display: flex; gap: 8px; margin-left: auto; padding: 6px; border-radius: var(--radius-sheet); background: color-mix(in srgb, var(--color-text) 6%, transparent); border: 1px solid var(--color-line); }
  .has-hero .app-header:not(.is-scrolled) .desk-nav { background: rgba(5,7,6,.6); border-color: rgba(243,239,229,.12); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  .desk-nav a, .desk-nav button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 800; font-size: .96rem; color: inherit; opacity: .86; background: transparent; border: 1px solid transparent; }
  .desk-nav a:hover { background: var(--color-accent-tint); border-color: var(--color-accent-line); opacity: 1; }
  .desk-nav a[aria-current="page"] { background: var(--brand-cedar); color: var(--brand-black); opacity: 1; }
  .desk-nav .btn { min-height: 44px; padding: 0 18px; opacity: 1; }
  .header-tools { margin-left: 0; }
  .brand__name { font-size: 1rem; max-width: none; white-space: nowrap; }
  .br-sm { display: none; }
  .brand__logo { width: 54px; height: 54px; }
  .toasts { left: auto; right: max(24px, calc((100% - var(--max)) / 2)); width: 420px; }

  .page { max-width: 760px; padding-top: 34px; }
  .page--wide { max-width: calc(var(--max) + 48px); }
  .page-head { max-width: 760px; padding-top: 40px; }
  .page-head--wide { max-width: var(--max); }
  .two-col { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 36px; align-items: start; }
  .two-col > .side { position: sticky; top: calc(var(--header-h) + 24px); }

  .hero { padding: calc(var(--header-h) + 72px) max(24px, calc((100% - var(--max)) / 2)) 56px; }
  body:not(.has-demo) .hero { padding-top: calc(var(--header-h) + 72px); }
  .hero h1 { font-size: 4.4rem; max-width: 12ch; }
  .hero-stats { grid-template-columns: repeat(4, minmax(0, 220px)); }
  .whatsnew { max-width: var(--max); margin: -40px auto 0; padding: 24px 26px 22px; }
  .whatsnew__list { grid-template-columns: repeat(2, 1fr); gap: 16px 28px; }
  .whatsnew__actions { max-width: 520px; }
  .dash { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 36px; max-width: calc(var(--max) + 48px); margin: 0 auto; padding: 36px 24px 0; }
  .dash .section, .dash .quick { padding-left: 0; padding-right: 0; }
  .dash aside { position: sticky; top: calc(var(--header-h) + 18px); align-self: start; }
  .dash .quick { padding-top: 34px; }
  .jobs-rail { grid-auto-flow: row; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; overflow: visible; }
  .dash .o-money { border-radius: var(--radius-card); margin-top: 24px; padding: 24px; }

  .job-hero { min-height: 460px; padding: calc(var(--header-h) + 60px) max(24px, calc((100% - var(--max)) / 2)) 40px; }
  .job-hero h1 { font-size: 4.2rem; }
  .job-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; max-width: calc(var(--max) + 48px); margin: 0 auto; padding: 0 24px; }
  .job-body .section, .job-body .contact-row, .job-body .contact-note { padding-left: 0; padding-right: 0; }
  .job-body .progress, .job-body .jump, .job-body .more, .job-body .next-step { margin-left: 0; margin-right: 0; }
  .job-side { padding-top: 16px; }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
  .actionbar, .has-tabbar .actionbar { left: auto; right: max(24px, calc((100% - var(--max)) / 2)); bottom: 24px; padding-bottom: 12px; width: 400px; border: 1px solid var(--color-line); border-radius: var(--radius-sheet); box-shadow: var(--shadow-float); }
  .actionbar--static, .actionbar--static-desk { position: static; width: auto; padding: 16px 0 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

  .builder { max-width: calc(var(--max) + 48px); margin: 0 auto; padding: 34px 24px 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 36px; }
  .builder .side { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
  .chips-row { margin-left: 0; margin-right: 0; padding-left: 0; flex-wrap: wrap; }

  .cam { max-width: calc(var(--max) + 48px); margin: 0 auto; padding: 34px 24px 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 36px; }
  .dock, .has-tabbar .dock { left: 50%; right: auto; transform: translateX(-50%); bottom: 24px; width: 420px; border-radius: var(--radius-sheet); border: 1px solid rgba(243,239,229,.14); }

  .list--grid { grid-template-columns: 1fr 1fr; }
  dialog.sheet { inset: 0; margin: auto; border-radius: var(--radius-sheet); border-bottom: 1px solid var(--color-line); max-height: 86vh; padding-bottom: 22px; }

  /* customer pages */
  .site-head { padding: 14px max(24px, calc((100% - var(--max)) / 2)); }
  .brand-mark__logo { width: 84px; height: 84px; }
  .brand-mark__text { font-size: 1.05rem; }
  .site-hero { min-height: min(80svh, 760px); padding: 180px max(24px, calc((100% - var(--max)) / 2)) 100px; }
  .site-hero--short { min-height: 0; padding-bottom: 70px; }
  .site-hero h1 { font-size: 4.6rem; }
  .ask { max-width: var(--max); margin: -56px auto 0; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 30px; padding: 26px 30px; }
  .ask .btn { margin-top: 0; grid-row: 1 / span 3; grid-column: 2; min-width: 260px; }
  .ask + .ask { margin-top: 14px; }
  .site-section { padding: 86px max(24px, calc((100% - var(--max)) / 2)); }
  .site-intro h2 { font-size: 3rem; }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
  .docs { grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; }
  .gallery-item { aspect-ratio: auto; }
  .site-foot { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 34px max(24px, calc((100% - var(--max)) / 2)); }
  .site-foot .credit { flex-basis: 100%; }
  .acc-wrap { max-width: calc(var(--max) + 48px); margin: 0 auto; padding: 70px 24px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 56px; align-items: start; }
  .acc-wrap--single { display: block; max-width: 780px; }
  .acc-side { position: sticky; top: 24px; }
  .meta { grid-template-columns: repeat(4, 1fr); }

  .login { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* A closed status chip in a portal card may carry more than one word: let it wrap
   inside the card instead of widening the page on a phone (WCAG 1.4.10 reflow). */
.pdoc__top > .chip.estimate-status-closed { white-space: normal; max-width: 100%; min-width: 0; }

/* A list row's next-step chip ("Wait: cancellation period ends Oct 29") may wrap
   inside the row instead of widening the Jobs list past a phone's width and
   pushing the bottom tab bar off-screen (WCAG 1.4.10 reflow). */
.lrow__meta > .chip { white-space: normal; max-width: 100%; min-width: 0; }

/* Long unbroken text (a business email, a run-together legal name) in the
   signing column, its notes and the legal boxes breaks where it must instead of
   running past a 320 px screen (WCAG 1.4.10 reflow). */
.acc-side, .check-row span, .fee, .faq__body { overflow-wrap: anywhere; }
/* The scrolling legal boxes take keyboard focus (tabindex="0", WCAG 2.1.1):
   draw the focus ring inside the box so the card's edge doesn't clip it. */
.faq__body:focus-visible { outline-offset: -3px; }

/* ---------------------------------------------------------------
   Header pattern (app header + customer-page header), phone widths.
   The brand (logo + wordmark pill) never shrinks below its own content,
   so nothing can paint over it; the tools pill gives way instead:
   tighter buttons, then Sun mode moves to the menu only (it is in the
   menu sheet too), and on customer pages "Call Keaton" shortens to
   "Call", then to the phone icon. Breakpoints are in em so a phone set
   to larger text gets the compact header sooner.
   --------------------------------------------------------------- */
.brand, .brand-mark { flex: none; }
.header-tools, .site-tools { flex: 0 1 auto; min-width: 0; }
@media (max-width: 25em) {                                   /* <= 400px */
  .app-header { gap: 8px; }
  .header-tools { gap: 2px; padding: 3px; }
  .header-tools .icon-btn { width: 44px; height: 44px; }
  .site-head { gap: 8px; }
  .site-tools { padding: 4px; }
  .header-call { padding: 0 14px; }
  .header-call__who { display: none; }
}
@media (max-width: 22em) {                                   /* <= 352px */
  .header-tools:has([data-sheet-open]) [data-sun] { display: none; }
  .brand-mark__logo { width: 46px; height: 46px; }
}
@media (max-width: 20em) {                                   /* <= 320px */
  .header-call { width: 48px; padding: 0; justify-content: center; }
  .header-call__label { display: none; }
  .brand__logo { width: 38px; height: 38px; }
}

/* ---------------------------------------------------------------
   One-stop flow (fixes 5-7): the slim stepper, the one big next
   step, the booking sheet (only open times), the confirmation card,
   Today on Home and the calendar page.
   --------------------------------------------------------------- */
.flow { margin: 14px 0 12px; }
.flow__track { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; }
.flow__step { min-width: 0; }
.flow__dot { display: block; height: 6px; border-radius: 3px; background: var(--color-line); }
.flow__step--done .flow__dot { background: var(--brand-cedar); }
.flow__step--now .flow__dot { background: var(--color-text); box-shadow: 0 0 0 2px var(--color-accent-line); }
.flow__label { display: none; }
.flow__now { margin: 8px 0 0; font-size: .9rem; color: var(--color-text-muted); }
.flow__now b { color: var(--color-text); }
@media (min-width: 46em) {
  .flow__label { display: block; margin-top: 6px; font-size: .72rem; font-weight: 800; line-height: 1.15; color: var(--color-text-muted); overflow-wrap: anywhere; }
  .flow__step--now .flow__label { color: var(--color-text); }
}
.next-big { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; }
.next-big .btn { width: 100%; min-height: var(--tap-primary, 56px); font-size: 1.05rem; justify-content: center; }
.next-big__hint { margin: 0; font-size: .9rem; color: var(--color-text-muted); }
.next-big__label { margin: 0; font-size: .78rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--color-eyebrow); }

.book .label { display: block; margin: 14px 0 6px; }
.book__days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.book__day { flex: none; display: grid; justify-items: center; gap: 1px; width: 64px; padding: 8px 4px; border-radius: var(--radius-card); border: 1px solid var(--color-line); background: transparent; color: inherit; scroll-snap-align: start; cursor: pointer; }
.book__day b { font-size: 1.2rem; font-weight: 900; }
.book__day small { font-size: .72rem; font-weight: 700; color: var(--color-text-muted); }
.book__day[aria-pressed="true"] { background: var(--brand-cedar); border-color: var(--brand-cedar); color: var(--brand-black); }
.book__day[aria-pressed="true"] small { color: inherit; }
.book__day:disabled { opacity: .4; cursor: not-allowed; }
.book__slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.book__slot { min-height: 44px; border-radius: var(--radius-button); border: 1px solid var(--color-line); background: transparent; color: inherit; font-weight: 800; cursor: pointer; }
.book__slot[aria-pressed="true"] { background: var(--brand-cedar); border-color: var(--brand-cedar); color: var(--brand-black); }
.book__taken-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .9rem; color: var(--color-text-muted); }
.book__taken-list b { color: var(--color-text); margin-right: 4px; }
.book__go { width: 100%; margin-top: 16px; justify-content: center; }
.book__days-in { max-width: 120px; }

.confirm-card { margin: 0 0 16px; padding: 16px; border-radius: var(--radius-card); border: 2px solid var(--brand-cedar); background: var(--color-accent-tint); scroll-margin-top: 90px; }
.confirm-card h2 { margin: 2px 0 8px; }
.confirm-card__msg { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--brand-cedar); white-space: pre-wrap; overflow-wrap: anywhere; }
.confirm-card__go { display: flex; flex-direction: column; gap: 8px; }
.confirm-card__go .btn { justify-content: center; }

.agenda { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.agenda__item { display: grid; grid-template-columns: 76px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--radius-card); border: 1px solid var(--color-line); background: var(--color-surface); }
.agenda__time { font-weight: 900; line-height: 1.2; }
.agenda__time small { display: block; font-weight: 700; color: var(--color-text-muted); }
.agenda__what { min-width: 0; }
.agenda__what b { display: block; overflow-wrap: anywhere; }
.agenda__what span { display: block; font-size: .875rem; color: var(--color-text-muted); overflow-wrap: anywhere; }
.agenda__kind { display: inline-block; margin-bottom: 2px; font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--color-eyebrow); }
.agenda__item--personal { border-style: dashed; }
.agenda__item--job .agenda__kind { color: var(--brand-cedar); }
.agenda__x { margin: 0; }
.agenda__empty { margin: 0; color: var(--color-text-muted); }
.cal-day { margin: 18px 0 0; }
.cal-day h2 { font-size: 1.05rem; margin: 0 0 8px; }
.cal-day--today h2::after { content: " · Today"; color: var(--color-eyebrow); }
.cal-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; }
.block-form { padding: 14px 16px; border-radius: var(--radius-card); border: 1px solid var(--color-accent-line); scroll-margin-top: 90px; }
.block-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 25em) { .block-form .form-grid { grid-template-columns: 1fr; } .agenda__item { grid-template-columns: 64px 1fr auto; } }
.job-flow { padding: 6px var(--gutter) 4px; }
.job-flow .progress__note { margin-top: 4px; }
/* Job page, desktop: the floating action bar sat on top of the Notes / costs
   column (Eva's audit, Nov 20). The one next step is the big button at the top
   of the page there, so the bar is only for phones. */
@media (min-width: 980px) { .actionbar--job { display: none; } }
/* Long job titles and names wrap in full in the Jobs / Clients lists
   instead of being cut to two lines (Eva's audit, Nov 20). */
.lrow__title { display: block; -webkit-line-clamp: unset; overflow: visible; overflow-wrap: anywhere; }
.lrow__sub { white-space: normal; overflow-wrap: anywhere; }
/* Long job titles: a readable size across the full width, not a narrow
   14-character column seven lines tall (Eva's audit, Nov 20). */
.job-hero h1.h1--long, .site-hero h1.h1--long { max-width: none; font-size: clamp(1.7rem, 6.5vw, 2.4rem); line-height: 1.05; }
@media (min-width: 980px) { .job-hero h1.h1--long, .site-hero h1.h1--long { font-size: 2.9rem; max-width: 28ch; } }
/* The camera page's job picker shows the whole name. */
.target b { display: block; -webkit-line-clamp: unset; overflow: visible; overflow-wrap: anywhere; }
/* Search (header button -> /admin/jobs#search) keeps the page heading in
   view instead of half under the sticky header (Eva's audit item 6). */
#search { scroll-margin-top: calc(var(--header-h) + var(--safe-top) + 150px); }
.their-link { margin-top: 10px; }
.their-link__row { display: flex; gap: 8px; align-items: stretch; }
.their-link__row .field { flex: 1; min-width: 0; font-size: .9rem; }
.their-link__row .btn { flex: none; min-height: 44px; padding: 0 12px; }
/* Sticky header and the job page's section bar stay readable over light
   cards (Eva's follow-up R1: on phones the header blended into the light
   Money panel), and an anchor jump on a job page lands below both bars
   (item 6: "Save note" and "Edit job details" were half under them). */
.app-header, .has-hero .app-header.is-scrolled, .jump { background: var(--color-glass-strong); }
.is-detail [id] { scroll-margin-top: calc(var(--header-h) + var(--safe-top) + 92px); }
.is-detail #notes, .is-detail #more, .is-detail #money, .is-detail #photos, .is-detail #costs { scroll-margin-top: calc(var(--header-h) + var(--safe-top) + 80px); }
.new-client { margin: 0 0 14px; padding: 10px 12px 2px; border: 1px dashed var(--color-line-strong, var(--color-line)); border-radius: var(--radius-card); }
.new-client legend { padding: 0 6px; }
/* Dictation on every field: the mic sits at the right edge of the field the
   owner is in; its words appear below it. */
.field-mic { position: absolute; z-index: 70; display: grid; place-items: center; padding: 0; border-radius: 999px;
  border: 1px solid var(--color-accent-line); background: var(--brand-cedar); color: var(--brand-black); cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.field-mic .ico { width: 18px; height: 18px; }
.field-mic.is-recording { background: var(--status-overdue, #c0392b); color: #fff; animation: fieldmic 1.2s ease-in-out infinite; }
@keyframes fieldmic { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--status-overdue, #c0392b) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .field-mic.is-recording { animation: none; } }
.field-mic__say { position: absolute; z-index: 70; margin: 0; padding: 6px 10px; border-radius: 8px; font-size: .9rem; font-weight: 700;
  background: var(--color-glass-strong); color: var(--color-text); border: 1px solid var(--color-line); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.field-mic__say[data-state="error"] { border-color: var(--status-overdue, #c0392b); }
input.has-field-mic, textarea.has-field-mic { padding-right: 48px; }
