/* Zoozah — Mobile-first web styles
 *
 * Mirrors the Flutter app's design system exactly.
 * iPhone-first: max-width 430px centered, safe area padding.
 * Colors, typography, radii, shadows all match the spec.
 */

/* Brand type (Erotique Text + Roobert) is declared in /css/fonts.css, which
   partials/head.ejs links BEFORE this file. Nothing here names a font
   family directly — use the --font-* tokens (brand guide v3.0 pp.20–23). */

/* ── Reset + iPhone optimizations ─────────────────────────────────── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--font-body);
  line-height: var(--lh-body, 1.35);   /* guide p.21: 18/24 body */
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none; /* prevent rubber-band bounce */
}
input, select, button, textarea {
  font-family: inherit;
  outline: none;
  font-size: 16px; /* prevent iOS zoom on input focus */
}
/* Strip native styling on text-like controls only — checkboxes & radios need
   their native rendering so users can SEE that they're checked. The previous
   blanket `input { -webkit-appearance: none }` nuked the checkmark on every
   native checkbox (e.g. Inspectors → "Services they do" on /web/admin/scheduling
   and the homeowner public-request services list), so clicks toggled the state
   invisibly. Pages with custom-styled toggles (.remember-checkbox in login,
   .plan-card input in signup) already hide the native input via
   `opacity:0 + position:absolute`, so they're unaffected by this change. */
input:not([type="checkbox"]):not([type="radio"]),
select,
button,
textarea {
  -webkit-appearance: none;
}
select { font-size: 16px; }
::-webkit-scrollbar { display: none; }

/* iOS safe area padding — respects notch, home indicator, status bar */
.safe-top { padding-top: env(safe-area-inset-top, 20px); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 20px); }
.safe-x { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

/* ── Brand tokens ─────────────────────────────────────────────────── */
:root {
  --nest: #2D2B27;
  --beak: #B45F34;
  --terra: #C3A88A;
  --linen: #E5DBC5;
  --leaf: #4A6741;
  --down: #EDEADF;
  /* The page ground is Down itself, as on zoozah.com; --stripe is the
     alternate row tone (a step of Nest into Down) now that Down is the ground. */
  --bg: #EDEADF;
  --stripe: #E4E0D3;
  --stripe: color-mix(in srgb, var(--down) 94%, var(--nest));
  --card: #FAFAF7;
  --dark: #080808;
  --red: #B5362A;
  --amber: #C67B25;
  --white: #FFFFFF;
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.06);
  --rpt-4pt: #5B7FA5;
  --rpt-wm: #8B6BAE;
  --rpt-full: #6B8E5B;
  --rpt-rc: #C4823E;
  --rpt-pool: #4A9B8E;
  --bg-soft: rgba(195,168,138,0.08);
  --focus-ring: 0 0 0 2px rgba(180,95,52,0.45);
  /* Severity ink tokens — AA-contrast text colors for finding/observation
     labels. Light-mode values clear 4.5:1 on the --card/--bg surfaces; the
     dark-mode blocks below flip them to light tints that clear 4.5:1 on the
     dark card. Markup references var(--sev-*) so severity color follows the
     theme instead of baking a single hardcoded hue that fails in one mode.
     The matching accent (left-border / pill background) keeps the brighter
     OBS_CLR hue — color is never the SOLE signal (a label + icon carry it). */
  --sev-issue: #A32E22;
  --sev-safety: #A32E22;
  --sev-maintenance: #8A5310;
  --sev-recommend: #3D6087;
  --sev-info: #6E5B43;
  /* Chrome (sidebar + topbar) tokens — light defaults. The dark-mode
     blocks below flip these so the chrome follows the OS theme rather
     than being permanently dark. The sidebar used to be hardcoded
     dark-on-light, which read as a brand decision but actually came
     from never wiring the chrome into the same light/dark token system
     the rest of the page uses. */
  /* Sidebar chrome sits on the paper (--card: #FAFAF7 in light, its dark
     twin in dark) against the page ground (2026-09-27, founder direction —
     the rail reads white); the hairline rule is its only edge. */
  --chrome-bg: var(--card);
  --chrome-text-muted: rgba(45,43,39,0.55);
  --chrome-text-hover: rgba(45,43,39,0.85);
  --chrome-text-active: var(--nest);
  --chrome-active-bg: rgba(180,95,52,0.08);
  --chrome-hover-bg: rgba(45,43,39,0.04);
  --chrome-divider: rgba(45,43,39,0.08);
  /* The wordmark is Nest on light chrome, Down on dark (guide p.18). */
  --chrome-logo: var(--nest);
  /* Ruled grid (zoozah.com, 2026-09-25): surfaces are divided by 1px
     Nest rules, never boxed in rounded cards. --rule is the structural
     line (cells, panels, the rail edge); --rule-soft the inner divider
     (rows, stats). Nest flips to Linen in dark mode, so both follow. */
  --rule: var(--nest);
  --rule-soft: rgba(45,43,39,0.22);
  --rule-soft: color-mix(in srgb, var(--nest) 24%, transparent);
  /* The page gutter, so full-bleed grids can cancel it (set per breakpoint
     beside .page-container). */
  --page-px: 8px;
  /* Inks (fix pass 2, 2026-10-07). Words are never Beak, Terra or Amber on
     the cream; they take Nest or one of these. --ink-2 / --ink-3 are the
     secondary and the quiet ink (the phone's zTextSecondary / zTextMuted):
     Nest mixed toward the ground, so they flip with Nest in dark mode.
     --accent-ink is what a link may wear (the phone's zAccentInk): Beak on
     the light ground, its lighter tint on the dark one. --nest-fill is Nest
     as a FILL under white words in both themes (--nest flips to cream in
     dark mode, and white on cream vanishes): a Beak control pressed.
     --info is the info tone's dot (the phone's ZTone.info). */
  --ink-2: color-mix(in srgb, var(--nest) 82%, transparent);
  --ink-3: color-mix(in srgb, var(--nest) 72%, transparent);
  --accent-ink: var(--beak);
  --nest-fill: #2D2B27;
  --info: #5B7FA5;
}

/* ── Dark mode ────────────────────────────────────────────────────── */
/* Tokens apply in two modes:
   1. System default — @media (prefers-color-scheme: dark) follows the OS,
      but only when the user hasn't explicitly overridden via settings.
   2. Explicit override — html.theme-dark (always dark) or html.theme-light
      (always light) set by the Appearance section in settings.ejs. The
      class-based selectors are scoped under `html.theme-dark` so they
      win over the @media query's `:root` cascade by specificity (0,1,1
      vs 0,0,1). Component overrides still live at the bottom of the file
      where they stay higher in source order than base rules. */
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) :root,
  html:not(.theme-light) {
    --bg: #121212;
    --card: #1A1A1A;
    --down: #2A2A2A;
    --stripe: #1C1C1C;
    --nest: #E5DBC5;
    --linen: #333;
    --terra: #9A8B75;
    --chrome-bg: #1A1A1A;
    --chrome-text-muted: rgba(255,255,255,0.45);
    --chrome-text-hover: rgba(255,255,255,0.7);
    --chrome-text-active: #FFFFFF;
    --chrome-active-bg: rgba(255,255,255,0.05);
    --chrome-hover-bg: rgba(255,255,255,0.03);
    --chrome-divider: rgba(255,255,255,0.06);
    --chrome-logo: #EDEADF;
    --sev-issue: #E8897E;
    --sev-safety: #E8897E;
    --sev-maintenance: #E0A85C;
    --sev-recommend: #8FB3D9;
    --sev-info: #C3A88A;
    --accent-ink: #E29A72;
  }
}

html.theme-dark :root,
html.theme-dark {
  --bg: #121212;
  --card: #1A1A1A;
  --down: #2A2A2A;
  --stripe: #1C1C1C;
  --nest: #E5DBC5;
  --linen: #333;
  --terra: #9A8B75;
  --bg-soft: rgba(229,219,197,0.06);
  --sev-issue: #E8897E;
  --sev-safety: #E8897E;
  --sev-maintenance: #E0A85C;
  --sev-recommend: #8FB3D9;
  --sev-info: #C3A88A;
  --chrome-bg: #1A1A1A;
  --chrome-text-muted: rgba(255,255,255,0.45);
  --chrome-text-hover: rgba(255,255,255,0.7);
  --chrome-text-active: #FFFFFF;
  --chrome-active-bg: rgba(255,255,255,0.05);
  --chrome-hover-bg: rgba(255,255,255,0.03);
  --chrome-divider: rgba(255,255,255,0.06);
  --chrome-logo: #EDEADF;
  --accent-ink: #E29A72;
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) :root,
  html:not(.theme-light) {
    --bg-soft: rgba(229,219,197,0.06);
  }
}

/* ── Animations ───────────────────────────────────────────────────── */
@keyframes breathe { 0%,100%{opacity:1} 50%{opacity:0.4} }
@keyframes slideUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* Honour OS-level "reduce motion" — disables decorative animations
   (slideUp message entries, the breathing recording dot, fadeIn cards)
   but EXEMPTS load spinners. A frozen spinner reads as a hung app, the
   exact opposite of "respectful". Spinners convey progress; without
   motion the user has no signal that work is happening. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.05s !important;
    scroll-behavior: auto !important;
  }
  .spinner, .login-spinner {
    animation-duration: 0.6s !important;
    animation-iteration-count: infinite !important;
  }
}

/* ── Focus rings (keyboard a11y) ──────────────────────────────────── */
/* Browser default outlines were stripped by the iOS reset above, so we
   re-add a visible ring scoped to keyboard focus only — never on touch
   or mouse — using :focus-visible. Use `outline` rather than box-shadow
   so we don't clobber the lift shadow on .btn-primary or other shadowed
   elements. `outline-offset` lifts the ring off rounded corners so it
   reads as a halo, not a square crop. */
:focus-visible { outline: 2px solid var(--beak); outline-offset: 2px; }
.btn-primary:focus-visible {
  outline: 2px solid var(--nest);
  outline-offset: 2px;
}
/* Text-entry controls never carry the ring: browsers treat them as
   keyboard targets, so the box appeared on every mouse click too. Each
   field already shows focus its own way — the rule under a ruled field
   and the border of a boxed .input both turn Beak on focus (2026-09-25).
   Checkboxes, radios, ranges and file pickers keep the ring. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="button"]):not([type="submit"]):focus-visible,
textarea:focus-visible, select:focus-visible, [contenteditable="true"]:focus-visible,
.input:focus-visible, .chat-input:focus-visible { outline: none; }
/* A title or note that a new page, sheet or drawer focuses for screen
   readers (tabindex="-1": script-focused, never a Tab stop) carries no
   ring — it is not a control, and the box read as a bug (2026-10-04).
   Controls that rove with tabindex="-1" (tabs, buttons, plan features)
   keep theirs — every interactive role (a radio, a checkbox, a switch, a
   link, a cell …), so no keyboard control ever loses its ring. */
[tabindex="-1"]:not(a):not(button):not(input):not(select):not(textarea):not([role="button"]):not([role="tab"]):not([role="menuitem"]):not([role="menuitemcheckbox"]):not([role="menuitemradio"]):not([role="option"]):not([role="link"]):not([role="checkbox"]):not([role="radio"]):not([role="switch"]):not([role="slider"]):not([role="spinbutton"]):not([role="combobox"]):not([role="textbox"]):not([role="searchbox"]):not([role="gridcell"]):not([role="treeitem"]):focus { outline: none; }

/* ── Responsive shell ─────────────────────────────────────────────── */
/* iPhone-first (430px), grows on tablet/desktop with sensible max widths */
.app-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

.app-shell-workspace {
  max-width: none !important;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  border: none !important;
}

/* Tablet (iPad): wider shell, comfortable reading width */
@media (min-width: 768px) {
  .app-shell { max-width: 600px; }
  .header-bar { padding-top: 20px; }
}

/* Desktop: centered with side margins, no wider than needed */
@media (min-width: 1024px) {
  .app-shell { max-width: 720px; }
  body { background: #E8E4DC; }
  .app-shell { border-left: 1px solid var(--linen); border-right: 1px solid var(--linen); }
}
@media (min-width: 1024px) and (prefers-color-scheme: dark) {
  html:not(.theme-light) body { background: #0A0A0A; }
}
@media (min-width: 1024px) {
  html.theme-dark body { background: #0A0A0A; }
}

/* ── Page backgrounds ─────────────────────────────────────────────── */
.page-light { background: var(--bg); }
.page-dark { background: var(--dark); }
.page-transition { transition: background 0.4s ease; }

/* ── Brand marks (logo kit; guide pp.10–18) ────────────────────────
   The wordmark and the stork symbol are drawings, not type — the "a"
   tucks into the "z" and joins the "h" — so they are never set as text.
   Each is an alpha mask painted with currentColor: Nest on light
   surfaces, Down (#EDEADF) on dark ones. Never tracked, rotated, stacked
   or given effects (p.17). Minimum widths: wordmark 54px, symbol 36px
   (p.16). Width sets the size; the aspect ratio is the artwork's. */
.brand-wordmark, .brand-symbol {
  display: inline-block; vertical-align: middle; background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.brand-wordmark {
  width: 96px; aspect-ratio: 494 / 111;
  -webkit-mask-image: url('/assets/brand/zoozah-wordmark-nest.png'); mask-image: url('/assets/brand/zoozah-wordmark-nest.png');
}
.brand-symbol {
  width: 40px; aspect-ratio: 250 / 144;
  -webkit-mask-image: url('/assets/brand/zoozah-symbol.svg'); mask-image: url('/assets/brand/zoozah-symbol.svg');
}
/* Illustrations (guide p.26): one-colour Nest line art that accompanies
   a service or an empty state — supplemental, never decoration for its
   own sake. The SVGs carry their own Nest fill and white knockouts. */
.brand-illo { display: block; width: 120px; height: auto; margin: 0 auto; }

/* ── Dashboard: header + bento grid ─────────────────────────────────
   Six columns; tiles are cream surfaces on the page's Down ground with a
   hairline, never a shadow (guide: elevation is surface colour). Figures
   and the hero title are Erotique; labels are tracked Roobert caps. The
   hero sits on Linen so the illustration's Nest ink reads. */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dash-eyebrow {
  font-size: 14px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--nest); margin-bottom: 8px;
}
.dash-greeting {
  font-family: var(--font-display); font-weight: 400; margin: 0;
  font-size: clamp(30px, 4vw, 42px); line-height: var(--lh-headline); letter-spacing: 0;
  color: var(--nest); font-feature-settings: var(--font-display-features);
}
/* Header search — a ruled field (underline only, like writing on paper),
   not a pill. The rule darkens to Beak on focus. */
.dash-search {
  /* Exactly the width of the two-column tile beneath it: two of six grid
     columns plus the gap between them (grid gap is 12px). */
  display: flex; align-items: center; gap: 10px; width: calc((100% + 43px) / 3 - 47px);
  padding: 8px 2px 10px; border-radius: 0; background: transparent;
  border: none; border-bottom: 1px solid var(--rule-soft);
  color: var(--terra); transition: border-color 0.2s, color 0.2s;
}
.dash-search:focus-within { border-bottom-color: var(--beak); color: var(--nest); }
.dash-search .nav-icon {
  flex: none; width: 18px; height: 18px; background-color: currentColor;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.dash-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent; padding: 0;
  font: inherit; font-size: 15px; color: var(--nest); -webkit-appearance: none; appearance: none;
}
.dash-search input::placeholder { color: var(--ink-3); }
.dash-search input::-webkit-search-decoration, .dash-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.btn-primary.dash-new {
  width: auto; padding: 11px 20px; font-size: 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px; box-shadow: none;
}

/* The grid is ruled, not tiled: the grid draws its top and left edge,
   every cell draws its right and bottom edge, so each shared line is
   drawn once however the cells span, and a hole in the grid stays
   empty ground (zoozah.com's about-us grid). Cells sit on the page
   ground with square corners. */
.bento {
  display: grid; gap: 0;
  border-top: 1px solid var(--rule); border-left: 1px solid var(--rule);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(0, auto);
}
.bento > * { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.bento-tile {
  min-width: 0; display: flex; flex-direction: column; gap: 12px;
  background: var(--bg); border-radius: 0;
  padding: 22px 24px 24px;
}
.bento-tile--hero { grid-column: span 4; grid-row: span 2; background: var(--linen); }
.bento-tile--stats { grid-column: span 2; grid-row: span 2; }
.bento-tile--attention { grid-column: span 2; }
.bento-tile--upcoming { grid-column: span 2; }
.bento-tile--money { grid-column: span 2; }
.bento-tile--list { grid-column: 1 / -1; }
@media (max-width: 1023px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-tile--hero { grid-column: 1 / -1; grid-row: auto; }
  .bento-tile--stats { grid-column: 1 / -1; grid-row: auto; }
  .bento-tile--attention, .bento-tile--upcoming, .bento-tile--money { grid-column: span 1; }
}
@media (max-width: 639px) {
  .bento { grid-template-columns: 1fr; }
  .bento-tile { padding: 18px 16px; }
  .bento-tile--attention, .bento-tile--upcoming, .bento-tile--money { grid-column: 1 / -1; }
}

.bento-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 15px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--nest); line-height: 1.2;
}
.bento-label__link { color: var(--beak); text-decoration: none; letter-spacing: 0.06em; text-transform: none; font-size: 13px; }
/* zoozah.com's text-link underline (2026-09-25): a 1px line in the link's
   own colour runs in from the left on hover and back out to the left on
   leave — drawn as a background so it can animate, never text-decoration.
   Shared by every text link below (the .rr-* and .cf-/.ak- links reuse
   the same declarations in their own sheets). */
.bento-label__link, .rr-linkbtn, .rr-readmore { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: left bottom; background-size: 0% 1px; padding-bottom: 1px; transition: background-size 0.35s ease, color 0.15s; }
.bento-label__link:hover, .bento-label__link:focus-visible,
.rr-linkbtn:hover, .rr-linkbtn:focus-visible,
.rr-readmore:hover, .rr-readmore:focus-visible { text-decoration: none; background-size: 100% 1px; }
.bento-figure {
  font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1;
  letter-spacing: 0; color: var(--nest); font-variant-numeric: tabular-nums;
  font-feature-settings: var(--font-display-features);
}

/* Hero */
.bento-hero__body { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex: 1; min-height: 150px; }
.bento-hero__text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
/* The Up Next address is content, not a second headline: Roobert, so the
   greeting above stays the page's one Erotique moment (Jared, 2026-09-27). */
.bento-hero__title {
  font-family: var(--font-body); font-weight: 400; margin: 0;
  font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -0.005em;
  color: var(--nest);
}
/* Muted through opacity, never a baked-in light literal, so the line flips
   with --nest in dark mode (fix pass 2026-09-27). */
.bento-hero__meta { font-size: 13px; color: var(--nest); opacity: .75; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.bento-hero__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bento-hero__cta { margin-top: 6px; }
.bento-hero__illo { flex: none; width: clamp(96px, 14vw, 150px); height: auto; }
@media (max-width: 639px) { .bento-hero__illo { display: none; } }

/* ── Dashboard reminders (js/dashboardReminders.js) ─────────────────
   The phone's home reminders (app/lib/ui/z_kit.dart ZNoticeRow;
   dashboard_screen.dart _profileNotices, agreement_readiness_banner.dart),
   under the head and above the grid: one ruled row each — a soft rule
   inset like the head above it, a 7px status dot, the title at 15.5/400,
   a quiet line of one or two lines hanging under the title clear of the
   dot, and at the right a carrot when the row opens something or a ×
   when it can be put away. Never a boxed banner. */
.dash-reminders { margin-top: 20px; }
.dash-reminders:empty, .dash-reminders > div:empty { display: none; }
.dash-notice {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 14px 24px; color: var(--nest); text-decoration: none;
}
.dash-notice::before { content: ''; position: absolute; top: 0; left: 24px; right: 24px; height: 1px; background: var(--rule-soft); }
.dash-notice--closable { padding-right: 12px; }   /* the close's 44px target reaches into the gutter */
.dash-notice__link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.dash-notice__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-notice__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dash-notice__dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.dash-notice__dot--bad { background: var(--red); }
.dash-notice__dot--info { background: var(--info); }
.dash-notice__title {
  min-width: 0; font-size: 15.5px; font-weight: 400; line-height: 1.3; color: var(--nest);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dash-notice__summary {
  margin-top: 3px; padding-left: 17px; font-size: 13px; line-height: 1.35; color: var(--nest); opacity: 0.72;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dash-notice__carrot {
  flex: none; width: 12px; height: 12px; background-color: currentColor; opacity: 0.6;
  -webkit-mask: url('/assets/icons/svg/Right-Carrot_NestBlack.svg') center / contain no-repeat;
  mask: url('/assets/icons/svg/Right-Carrot_NestBlack.svg') center / contain no-repeat;
}
.dash-notice__close {
  flex: none; width: 44px; height: 44px; margin: -8px 0; padding: 0; border: 0; border-radius: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--nest); opacity: 0.6; font-size: 20px; line-height: 1; cursor: pointer;
}
.dash-notice__close:hover { opacity: 1; }
.dash-notice__link:hover .dash-notice__title, a.dash-notice:hover .dash-notice__title { color: var(--nest); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Stats */
/* Four figures in a 2×2 ruled by soft inner lines — no boxes. */
.bento-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; flex: 1; align-content: stretch; }
.bento-stat { padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid var(--rule-soft); }
.bento-stat:nth-child(odd) { border-right: 1px solid var(--rule-soft); }
.bento-stat:nth-last-child(-n+2) { border-bottom: none; }
.bento-stat__k { margin-top: 6px; font-size: 12px; color: var(--ink-2); }

/* Row lists (attention, upcoming) */
.bento-rows { display: flex; flex-direction: column; }
.bento-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--rule-soft); text-decoration: none; color: inherit; min-width: 0;
}
.bento-row:first-child { border-top: none; padding-top: 2px; }
.bento-row__main { min-width: 0; flex: 1; }
.bento-row__title { font-size: 13px; font-weight: 500; color: var(--nest); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bento-row__sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The row's aside is ink, never Beak words on the cream (fix pass 2). */
.bento-row__aside { flex: none; font-size: 12px; font-weight: 500; color: var(--nest); white-space: nowrap; }
/* A row's title stays ink under the pointer; a 1px underline shows the
   hover (the inspection list's rule; never Beak words — fix pass 2 S4). */
.bento-row:hover .bento-row__title { color: var(--nest); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.bento-empty { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-2); padding: 4px 0; }
.bento-empty .brand-illo { width: 44px; margin: 0; flex: none; }
.bento-money__figure { margin-top: 4px; }
/* Persona home (docs/kit/PHASE_SIX.md §1): the dashboard a persona sees —
   the home tile with its purpose, the persona's first entries as quick
   links, the pinned list — on the same ruled bento; the package widgets
   band (.cf-widgets, facilities.css) sits beneath it in the persona's
   order. Same hairlines, same faces, no new colour. */
.bento-tile--home { grid-column: span 4; background: var(--linen); }
.bento-tile--quick { grid-column: span 2; }
.bento-tile--pins { grid-column: span 2; }
.bento-home__purpose { font-size: 13px; color: var(--nest); opacity: .75; margin-top: 6px; max-width: 52ch; }
.bento-quick { display: flex; flex-direction: column; }
.bento-quick a { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--rule-soft); font-size: 13px; font-weight: 500; color: var(--nest); text-decoration: none; }
.bento-quick a:first-child { border-top: none; padding-top: 2px; }
.bento-quick a:hover { color: var(--beak); }
.bento-quick .nav-icon { width: 18px; height: 18px; flex: none; background-color: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
@media (max-width: 1023px) { .bento-tile--home, .bento-tile--quick, .bento-tile--pins { grid-column: 1 / -1; } }

/* Two-up list on wide screens */
@media (min-width: 900px) { .content-grid--two { grid-template-columns: 1fr 1fr; gap: 10px; } }

/* ── Typography ───────────────────────────────────────────────────── */
.t-display { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: var(--lh-display); color: var(--nest); letter-spacing: 0; font-feature-settings: var(--font-display-features); }
.t-title { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: var(--lh-headline); color: var(--nest); letter-spacing: 0; font-feature-settings: var(--font-display-features); }
.t-section { font-weight: 600; font-size: 15px; color: var(--nest); }
.t-body { font-weight: 400; font-size: 14px; color: var(--nest); }
.t-label { font-weight: 400; font-size: 13px; color: var(--nest); text-transform: uppercase; letter-spacing: 0.06em; }
.t-small { font-weight: 400; font-size: 12px; color: var(--ink-2); }
.t-small.t-muted { color: var(--ink-3); }
.t-tiny { font-weight: 400; font-size: 10px; color: var(--ink-2); }

/* ── Input fields ─────────────────────────────────────────────────── */
.input {
  font-size: 16px; font-weight: 400; color: var(--nest);
  background: transparent; border: 1px solid var(--rule-soft);
  border-radius: 0; padding: 14px 16px; width: 100%;
}
.input:focus { border-color: var(--beak); }
.input::placeholder { color: var(--ink-3); }

.input-icon-shell {
  position: relative;
  width: 100%;
}

.input-icon-shell .input {
  padding-right: 44px;
}

.input-icon-shell .z-icon {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--terra);
  pointer-events: none;
}

.input-date-shell input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.input-date-shell input[type="date"]::-webkit-inner-spin-button,
.input-date-shell input[type="date"]::-webkit-clear-button {
  display: none;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn-primary {
  font-size: 16px; font-weight: 600; color: var(--white);
  background: var(--beak); border: none; border-radius: 28px;
  padding: 16px; width: 100%; cursor: pointer;
  letter-spacing: 0.3px; transition: transform 0.15s;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* The quiet button: secondary ink at rest (the phone's TextButton default,
   theme.dart; fix pass 2 S1), never Beak words. Hover and press turn the
   words Nest (no underline: several pages draw .btn-secondary as a ruled
   pill). A page whose one action this was takes .btn-primary instead. */
.btn-secondary {
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  background: none; border: none; cursor: pointer; padding: 0;
}
.btn-secondary:not(:disabled):hover, .btn-secondary:not(:disabled):active { color: var(--nest); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }
.input:disabled { opacity: 0.6; cursor: not-allowed; background: var(--down); }

/* Outlined secondary action — used where a tonal button needs
   visible affordance but shouldn't compete with the primary CTA.
   Replaces inline `border:1.5px solid var(--linen);border-radius:12px`
   patterns scattered across deliver/team/setup. */
/* The label is centred in the pill both ways (2026-09-27): a flex box
   centres it vertically whatever height the pill is stretched to, and a
   line height of 1 puts Roobert's capitals on the optical centre — at the
   body's 1.35 they rode about 3px high. */
.btn-outline {
  font-size: 13px; font-weight: 500; color: var(--nest);
  background: transparent; border: 1.5px solid var(--nest);
  border-radius: 999px; padding: 10px 16px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  line-height: 1; text-align: center; box-sizing: border-box;
}
/* A few pages set the pill's display inline; keep their block or inline
   flow, but as flex so the label stays centred. */
.btn-outline[style*="display:block"], .btn-outline[style*="display: block"] { display: flex !important; }
.btn-outline[style*="display:inline-block"], .btn-outline[style*="display: inline-block"] { display: inline-flex !important; }
.btn-outline:hover { border-color: var(--terra); }
.btn-outline:disabled { opacity: 0.5; cursor: not-allowed; }

/* Inline banner blocks used for warnings/success/info. Tokens-based
   so they adapt to dark mode automatically — replaces the hardcoded
   `#FFF4E5`/`#C67B25`/`#6B4410` blocks in deliver and client-report. */
.banner {
  padding: 12px 14px; border-radius: 0; border-left: 3px solid var(--terra);
  background: var(--bg-soft); color: var(--nest); font-size: 13px; line-height: 1.5;
}
.banner-warning { border-left-color: var(--amber); background: rgba(198,123,37,0.10); }
.banner-success { border-left-color: var(--leaf); background: rgba(74,103,65,0.10); }
.banner-error   { border-left-color: var(--red);  background: rgba(181,54,42,0.10); }

/* ── Cards ────────────────────────────────────────────────────────── */
.card {
  background: transparent; border: 1px solid var(--rule);
  border-radius: 0; padding: 16px 18px;
}

/* ── Chips (scope selector, answer chips) ─────────────────────────── */
/* A 1px rule, the kit's hairline (the phone's setup chips; fix pass 2). */
.chip {
  display: inline-block; font-size: 13px; font-weight: 500;
  border-radius: 24px; padding: 8px 16px; cursor: pointer;
  transition: all 0.2s; border: 1px solid var(--linen);
  color: rgba(45,43,39,0.9); background: transparent;
}
.chip.active { color: var(--white); }

/* ── Progress bar ─────────────────────────────────────────────────── */
.progress-bar {
  height: 2px; border-radius: 1px; overflow: hidden;
}
.progress-bar-bg { background: rgba(255,255,255,0.06); }
.progress-bar-fill { height: 100%; transition: width 0.5s ease; border-radius: 1px; }

/* ── Header bar (inspection / conversation workspaces) ───────────── */
/* Intentionally stays dark in both light and dark modes. The
   inspection screen is a focus/recording workspace — the timer,
   progress bar, capture-policy pill and tab labels rely on a dark
   surface for legibility, and most of those colors live as hardcoded
   inline styles in inspect.ejs / conversation_v2.ejs. Flipping the
   header background to the chrome tokens (which the sidebar uses to
   follow OS theme) would orphan all those inline white-tint styles
   on a light surface. The sidebar is a navigation chrome and follows
   the system theme; this header is a workspace surface and doesn't.
   If we ever want a light-mode workspace header, the migration is
   the inline styles → tokens, not the other way around. */
.header-bar {
  position: sticky; top: 0; z-index: 30;
  background: var(--nest); padding: max(48px, env(safe-area-inset-top, 48px)) 16px 0;
}

/* ── Tab bar ──────────────────────────────────────────────────────── */
.tab-bar { display: flex; }
.tab-btn {
  flex: 1; background: none; border: none; padding: 10px 0 9px;
  font-size: 13px; cursor: pointer; transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
/* The current tab is its Nest ink alone — no Beak underline competing with the full-width rule beneath (Jared, 2026-09-27). */
.tab-btn.active { font-weight: 600; color: var(--white); }
.tab-btn:not(.active) { font-weight: 400; color: rgba(255,255,255,0.3); }

/* ── Chat messages ────────────────────────────────────────────────── */
/* The phone's editorial conversation (app/lib/widgets/chat_tab.dart
   _buildMessage, 2026-10-07; the founder's parity rule). The teammate's
   words are body copy set on the page ground — no bubble, the column's
   full measure, 15/1.45 — and a proactive nudge (POST /chat/proactive,
   the persisted `proactive` flag) carries a 2px Amber line at the left
   and runs italic. The person's words sit in a square block at the right
   that is the page inverted: Nest with ground-coloured words (--nest and
   --bg both flip in dark mode, so the block flips with them). A message
   still sending is that block drawn as a Nest hairline, its status under
   the words (_optimisticBubble). What follows a message — tool calls,
   answer chips, captured fields, shots to take, the source line — stacks
   under its words in one column (.msg-col). */
.msg { margin-bottom: 20px; display: flex; animation: slideUp 0.3s ease; }
.msg.user { justify-content: flex-end; margin-bottom: 16px; }
.msg.ai { justify-content: flex-start; }
.msg-col { flex: 1 1 auto; min-width: 0; max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; }
.msg.user .msg-col { flex: 0 1 auto; max-width: 82%; align-items: flex-end; }
/* During SSE streaming the renderer rewrites all bubbles on every
   chunk; replaying slideUp on every paint flickers the whole list.
   The .is-streaming flag (set in inspect.page.js) opts out of the
   entry animation while a stream is in flight, then is removed after
   the final `done` event so new messages animate normally again. */
#messages.is-streaming .msg { animation: none; }
.msg-bubble {
  max-width: 100%; padding: 0; border-radius: 0;
  font-size: 15px; line-height: 1.45; white-space: pre-wrap;
  word-wrap: break-word; overflow-wrap: anywhere;
}
.msg.ai .msg-bubble { color: var(--nest); background: transparent; border: 0; }
.msg.ai.is-proactive .msg-bubble { padding-left: 12px; border-left: 2px solid var(--amber); font-style: italic; }
.msg.user .msg-bubble { padding: 10px 14px; background: var(--nest); color: var(--bg); }
.msg.user.is-sending .msg-bubble { background: transparent; color: var(--nest); border: 1px solid var(--rule); }
.msg-bubble strong, .msg-bubble b { font-weight: 600; }
.msg-bubble em, .msg-bubble i { font-style: italic; }
.msg-bubble code {
  font-family: var(--font-mono); font-feature-settings: var(--font-mono-features);
  font-size: 0.92em; background: rgba(127,127,127,0.18);
  padding: 1px 5px; border-radius: 0;
}
/* The sending block's status, under the words at the right: a small Leaf
   ring and the word. */
.msg-status {
  display: flex; align-items: center; justify-content: flex-end; gap: 5px;
  margin-top: 6px; white-space: normal; font-style: normal;
  font-size: 11.5px; font-weight: 500; line-height: 1.35; color: var(--nest); opacity: 0.82;
}
.msg-status__spin {
  flex: none; width: 10px; height: 10px; box-sizing: border-box;
  border: 1.5px solid var(--leaf); border-right-color: transparent; border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
/* The glasses line under a person's words that came in through glasses
   (voice_glasses, solos_airgo_krypton, rayban_webhook): an eye and the
   source, in quiet ink. */
.msg-provenance {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 6px;
  font-size: 11.5px; line-height: 1.35; color: var(--nest); opacity: 0.72; white-space: normal;
}
.msg-provenance svg { flex: none; width: 13px; height: 13px; }
/* The source line under the teammate's words when it was not the cloud,
   is waiting on a cloud review, or was cut short — the warn ink when cut
   short (a warning, never Beak words; fix pass 2). */
.msg-source {
  margin-top: 8px; font-size: 11.5px; line-height: 1.35; color: var(--nest); opacity: 0.72;
  white-space: normal; font-style: normal;
}
.msg-source--interrupted { color: var(--sev-maintenance); opacity: 1; }
/* What the answer chips answer ("Roof · Covering"), quiet, over them. */
.chip-field-label { margin-top: 10px; font-size: 12px; line-height: 1.35; color: var(--nest); opacity: 0.72; }
.chip-field-label + .answer-chips { margin-top: 6px; }

/* The typing indicator: three dots on the ground where the teammate's
   words will set — no bubble, the reply has none either (chat_tab.dart
   _buildTypingIndicator, _BouncingDot: a 6px dot fading 0.3 → 0.8). The
   lock-wait hint, when the server is holding the turn, sits under them. */
.msg-bubble-thinking {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px;
  padding: 6px 0 0; white-space: normal;
}
.msg-bubble-thinking > :not(.thinking-dot) { flex-basis: 100%; }
.thinking-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--nest); opacity: 0.3;
  animation: thinkingPulse 1.2s ease-in-out infinite;
}
.thinking-dot:nth-child(2) { animation-delay: 0.15s; }
.thinking-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes thinkingPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* A capture in the conversation (_buildMediaCaptureBubble): a square cell
   on one soft rule, no fill, centred; its photo square. */
.msg.is-media { justify-content: center; margin-bottom: 16px; }
.msg.is-media .msg-col { flex: 0 1 auto; align-items: center; }
.msg .msg-bubble.msg-bubble--media {
  padding: 10px; background: transparent; color: var(--nest); white-space: normal;
  border: 1px solid var(--rule-soft); font-size: 14px; line-height: 1.35;
}
/* The capture's human name under it (the phone's slotDisplayLabel), in ink;
   a voice note heads its cell with the phone's mic glyph and that name —
   no badge (fix pass 2). */
.msg-media-label { margin-top: 8px; font-size: 14px; line-height: 1.35; color: var(--nest); overflow-wrap: anywhere; }
.msg-voice-head { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; line-height: 1.35; color: var(--nest); }
.msg-voice-head__mic { flex: none; width: 18px; height: 18px; color: var(--accent-ink); }
.msg-voice-head__label { min-width: 0; overflow-wrap: anywhere; }
/* The photo-vs-entry question (_buildVisionConfirmBubble): the kit's warn
   notice — a soft Amber wash, one soft rule round it, a 3px Amber accent
   at the left, square — holding the choices as Nest hairline pills. */
.msg .msg-bubble.msg-bubble--notice {
  max-width: 86%; padding: 12px 12px 12px 14px; color: var(--nest); white-space: normal;
  background: rgba(198,123,37,0.08);
  border: 1px solid var(--rule-soft); border-left: 3px solid var(--amber);
}
/* The question, then one row of choices per field; on a card holding
   several fields of one photo, each row under its field's name in the warn
   ink's tracked caps (the phone's ZEyebrow on the card, D7). */
.vc-head { font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.vc-field {
  margin: 12px 0 0; font-size: 11px; line-height: 1.2; letter-spacing: var(--track-caps);
  text-transform: uppercase; color: var(--sev-maintenance);
}
.vc-choices { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.vc-field + .vc-choices { margin-top: 6px; }
/* The photo's percentage after its value: the secondary ink at 400 (the
   phone's detail span on the choice). */
.vc-btn__pct { color: var(--ink-2); font-weight: 400; }

/* ── Answer chips ─────────────────────────────────────────────────── */
/* The phone's flat chip (chat_tab.dart _buildFlatChip): a 28px pill of
   13px words in sentence case — never the buttons' caps — 10/4 padding,
   at most 280px wide, ONE line: a long answer ellipsises inside its pill
   (its label span), it never wraps into a rounded box. An answer is ink
   in a Nest hairline; a shot to take (a capture suggestion) is ink in a
   Beak hairline, its reason after a dot in the secondary ink — Beak is
   the hairline only, never the words (fix pass 2). The pill stays 28px to
   the eye while its ::before carries the tap target to the 44px floor:
   inspectors in gloves still hit it on the first try (2026-04 field
   report) — so the pill itself never clips (no overflow on it). */
.answer-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.answer-chip {
  position: relative; display: inline-flex; align-items: center; justify-content: flex-start;
  min-height: 28px; max-width: min(280px, 100%); padding: 4px 10px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500; line-height: 1.2;
  text-align: left; text-transform: none; letter-spacing: 0; white-space: nowrap;
  color: var(--nest); background: transparent; border: 1px solid var(--rule); border-radius: 999px;
  cursor: pointer; transition: background-color 0.15s;
}
.answer-chip::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; bottom: -8px; }
.answer-chip:hover { background: var(--bg-soft); }
.answer-chip:active { transform: scale(0.97); }
.answer-chip--capture { color: var(--nest); border-color: var(--beak); }
.answer-chip__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.answer-chip__sep { flex: none; padding: 0 6px; font-size: 12px; font-weight: 400; opacity: 0.55; }
.answer-chip__sub {
  min-width: 0; font-size: 12px; font-weight: 400; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Read-only chat tags: what a turn wrote to the report (a captured field)
   and what the teammate checked (a tool call) — a soft hairline pill, a
   drawn Leaf check or Red alert (a shape, never a ✓ or ⚠ glyph), the
   words in ink. */
.chat-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chat-tags--tools { margin-top: 8px; }
.chat-tag {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0;
  padding: 5px 10px; border: 1px solid var(--rule-soft); border-radius: 999px;
  font-size: 12.5px; font-weight: 500; line-height: 1.2; color: var(--nest);
  white-space: normal; font-style: normal; cursor: default;
}
.chat-tags--tools .chat-tag { padding: 4px 10px; font-size: 12px; font-weight: 400; }
.chat-tag__icon { flex: none; width: 13px; height: 13px; }
.chat-tag__icon--ok {
  color: var(--leaf); background-color: currentColor;
  -webkit-mask: url('/assets/icons/svg/check.svg') center / contain no-repeat;
  mask: url('/assets/icons/svg/check.svg') center / contain no-repeat;
}
.chat-tag__icon--fail { color: var(--red); }
.chat-tag__text { min-width: 0; overflow-wrap: anywhere; }
.chat-tag__name { flex: none; margin-right: -5px; font-weight: 500; opacity: 0.82; white-space: pre; }   /* "name · " runs into its result, as on the phone */
.chat-tags--tools .chat-tag__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Chat composer ────────────────────────────────────────────────── */
/* The phone's composer (chat_tab.dart build(), 'chat-composer'): on the
   ground under one soft rule — the brand's bare plus (Plus-Cross, no ring;
   it opens the attach menu: photo, video, files), the ruled field whose
   rule turns Beak on focus, the voice controls (mic, conversation,
   settings) grouped in one hairline pill so the bar reads as field + one
   group + send, and the Beak send circle — the bar's one primary. */
.chat-input-bar {
  display: flex; align-items: center; gap: 0;
  padding: 8px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--bg); border-top: 1px solid var(--rule-soft);
}
.chat-attach { position: relative; flex: none; margin-right: 4px; }
.chat-attach-btn {
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--nest); cursor: pointer; transition: color 0.15s;
}
.chat-attach-btn:hover, .chat-attach-btn[aria-expanded="true"] { color: var(--beak); }
.chat-attach-btn__glyph {
  display: block; width: 24px; height: 24px; background-color: currentColor;
  -webkit-mask: url('/assets/icons/svg/Plus-Cross_NestBlack.svg') center / contain no-repeat;
  mask: url('/assets/icons/svg/Plus-Cross_NestBlack.svg') center / contain no-repeat;
}
/* The attach menu (the phone's Attach sheet, _showAttachSheet): a square
   sheet on the ground over the plus, its Erotique title, then one ruled
   row per way in — the glyph, the words, a quiet line, the carrot. */
.chat-attach-menu {
  position: absolute; left: 0; bottom: calc(100% + 12px); z-index: 30;
  width: min(340px, calc(100vw - 32px)); background: var(--bg); border: 1px solid var(--rule);
  animation: slideUp 0.2s ease;
}
.chat-attach-menu[hidden] { display: none; }
.chat-attach-menu__title {
  padding: 16px 16px 12px; font-family: var(--font-display); font-weight: 400; font-size: 22px;
  line-height: var(--lh-section); letter-spacing: 0; font-feature-settings: var(--font-display-features); color: var(--nest);
}
.chat-attach-item {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; margin: 0;
  padding: 12px 16px; border: 0; border-top: 1px solid var(--rule-soft); border-radius: 0;
  background: transparent; color: var(--nest); font: inherit; text-align: left; cursor: pointer;
}
.chat-attach-item:hover, .chat-attach-item:focus-visible { background: var(--stripe); }
.chat-attach-item .composer-icon { flex: none; width: 22px; height: 22px; display: block; }
.chat-attach-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-attach-item__label { font-size: 16px; line-height: 1.3; }
.chat-attach-item__sub { font-size: 13px; line-height: 1.35; opacity: 0.72; }
.chat-attach-item__carrot {
  flex: none; width: 12px; height: 12px; background-color: currentColor; opacity: 0.6;
  -webkit-mask: url('/assets/icons/svg/Right-Carrot_NestBlack.svg') center / contain no-repeat;
  mask: url('/assets/icons/svg/Right-Carrot_NestBlack.svg') center / contain no-repeat;
}
.chat-input {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 11px 0;
  font-size: 16px; color: var(--nest); background: transparent;
  border: 0; border-bottom: 1px solid var(--rule-soft); border-radius: 0;
  caret-color: var(--beak); transition: border-color 0.2s;
}
/* The hint in the quiet ink (the phone's hint style), never Terra words. */
.chat-input::placeholder { color: var(--ink-3); opacity: 1; }
.chat-input:focus { border-bottom-color: var(--beak); }
/* What the mic hears, while it listens (inspect.page.js showCaption — the
   phone's transcript line, chat_tab.dart): a quoted line over the composer,
   a Leaf hairline at the left, italic words in the secondary ink — no box,
   no dark scrim (fix pass 2). */
.voice-caption {
  margin: 4px 16px 8px; padding: 0 0 0 12px; border-left: 2px solid var(--leaf);
  font-size: 14.5px; line-height: 1.45; font-style: italic; color: var(--ink-2);
  max-height: 30vh; overflow: hidden; overflow-wrap: anywhere;
}
.chat-voice-group {
  flex: none; display: inline-flex; align-items: center; margin-left: 8px; padding: 0 2px;
  border: 1px solid var(--rule-soft); border-radius: 999px;
}
.circle-btn {
  position: relative; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; border: none; background: transparent;
  color: var(--nest);
}
.chat-voice-group .circle-btn { width: 36px; height: 36px; min-width: 36px; }
/* A voice control's state is drawn on a 30px disc inside its 36px target:
   a wash, a ring, or a fill. */
.chat-voice-group .circle-btn::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 30px; height: 30px;
  box-sizing: border-box; border-radius: 50%; pointer-events: none;
}
.chat-voice-group .composer-icon { position: relative; display: block; width: 20px; height: 20px; }
.chat-voice-group #chat-conversation-btn .composer-icon,
.chat-voice-group #chat-voice-settings-btn .composer-icon { width: 19px; height: 19px; }
/* The conversation control reads as voice mode in the accent ink (the
   phone's walk-talk; its glyph, never words — the token takes the lighter
   tint on the dark ground); settings in secondary ink. */
.chat-voice-group #chat-conversation-btn { color: var(--accent-ink); }
.chat-voice-group #chat-voice-settings-btn { color: var(--nest); color: color-mix(in srgb, var(--nest) 80%, transparent); }
/* Recording — the mic is open: a Leaf wash and ring, and a Leaf square
   (stop) in place of the mic. */
.circle-btn.is-recording::before, .circle-btn.mic-active::before {
  background: rgba(74,103,65,0.15); border: 1px solid rgba(74,103,65,0.5);
}
.circle-btn.is-recording .composer-icon { visibility: hidden; }
.circle-btn.is-recording::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px;
  margin: -5px 0 0 -5px; background: var(--leaf);
}
/* Conversation mode on: the mic is armed — the phone's Beak ring. */
.circle-btn.is-conversation-armed:not(.is-recording)::before { border: 1.5px solid var(--beak); }
/* Conversation engaged: a Nest disc with the glyph in white — never a
   second Beak disc beside the send, the bar's one Beak (fix pass 2, B6; the
   phone's chat_tab.dart). Nest is --nest-fill, #2D2B27 in both themes, as
   the Beak pills' pressed rule below explains: --nest flips to cream in
   dark mode and the white glyph would vanish. The send disc is Beak at
   rest and turns --nest-fill while pressed (that same rule). */
.circle-btn.is-conversation-active::before { background: var(--nest-fill); }
.chat-voice-group #chat-conversation-btn.is-conversation-active { color: var(--white); }
/* A reply being read aloud: the mic is the thing to tap to interrupt
   (web: no recognizer runs while speechSynthesis speaks) — a Leaf wash
   that gently breathes (its opacity; no shadow ring, the brand has none). */
.circle-btn.tts-interruptible::before {
  background: rgba(74,103,65,0.14); border: 1px solid rgba(74,103,65,0.45);
  animation: zh-mic-pulse 1.8s ease-in-out infinite;
}
@keyframes zh-mic-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .circle-btn.tts-interruptible::before { animation: none; }
}
/* Send: the Beak circle; the brand arrow carries its own ring, so it is
   drawn at the disc's full size and the ring sits on its edge. */
.circle-btn.beak { background: var(--beak); color: var(--white); }
.circle-btn.beak:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-input-bar #chat-send-btn { width: 38px; height: 38px; margin-left: 8px; }
.chat-send-glyph { display: block; width: 38px; height: 38px; color: currentColor; }
.circle-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* The year sheet (inspect.page.js openYearPickerModal — the phone's
   _showYearPicker, D5): a square sheet risen from the bottom on the page
   ground under one Nest rule; its Erotique title "Year built" and the round
   hairline close; the years as rows of ink between two soft rules, the
   picked one on the soft band; the optional suffix as a ruled field; then
   Cancel quiet and "Use year", the sheet's one Beak fill. */
.ysheet-overlay {
  position: fixed; inset: 0; z-index: 240; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.4);
}
.ysheet {
  width: 100%; max-width: 480px; display: flex; flex-direction: column;
  background: var(--bg); color: var(--nest); border: 1px solid var(--rule); border-bottom: 0; border-radius: 0;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); animation: slideUp 0.2s ease;
}
.ysheet__head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 12px 20px; }
.ysheet__title {
  flex: 1; min-width: 0; margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 24px;
  line-height: var(--lh-section); letter-spacing: 0; font-feature-settings: var(--font-display-features); color: var(--nest);
}
.ysheet__close {
  flex: none; width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule-soft); border-radius: 50%; background: transparent;
  color: var(--nest); font-size: 18px; line-height: 1; cursor: pointer; transition: border-color 0.15s;
}
.ysheet__close:hover { border-color: var(--nest); }
.ysheet__years {
  max-height: 240px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft);
}
.ysheet__year {
  display: block; width: 100%; padding: 9px 0; border: 0; border-radius: 0; background: transparent;
  font-family: var(--font-body); font-size: 20px; line-height: 1.2; text-align: center; color: var(--nest);
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.ysheet__year:hover { background: var(--bg-soft); }
.ysheet__year.is-picked { background: var(--stripe); font-weight: 500; }
.ysheet__body { padding: 14px 20px 0; }
/* The suffix's label above its ruled field, the secondary ink (the phone's
   floating label, which keeps that ink when focused — the rule carries
   the focus, never Beak words). */
.ysheet__label { display: block; font-size: 12px; line-height: 1.3; letter-spacing: 0.2px; color: var(--ink-2); }
.ysheet__suffix {
  display: block; width: 100%; padding: 10px 0 9px; font-size: 16px; color: var(--nest);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule-soft); border-radius: 0;
}
.ysheet__suffix:focus { border-bottom-color: var(--beak); }
.ysheet__suffix::placeholder { color: var(--ink-3); opacity: 1; }
.ysheet__actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.ysheet__actions .btn-secondary { flex: 1; min-height: 50px; color: var(--ink-2); }
.ysheet__actions .btn-primary { flex: 1; width: auto; min-height: 50px; padding: 0 22px; font-size: 14px; }

/* ── Bundle review (inspect.page.js openBundleReviewModal) ────────── */
/* The phone's review sheet (app/lib/widgets/bundle_review_sheet.dart,
   2026-10-07): a square sheet on the page ground — the bundle's name in
   Erotique with its count and state under it and a round hairline close;
   a 2px Beak line while a refresh or a decision is out; Pending and
   Decided as ruled sections (a Nest rule, a caps head); each proposal a
   ruled row — the field and where the value came from, the change, the
   evidence, then its decision at the right (Reject and Modify quiet,
   Confirm the outline) or its decided status; Reject all beside the one
   primary, Approve all. On a phone the sheet rises from the bottom edge
   (its handle, its top rule); wider, it sits centred on one Nest rule. */
.brm-overlay {
  position: fixed; inset: 0; z-index: 280; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(0,0,0,0.4);
}
.brm-sheet {
  width: 100%; max-width: 640px; max-height: min(85vh, 880px); display: flex; flex-direction: column;
  background: var(--bg); color: var(--nest); border: 1px solid var(--rule); border-radius: 0;
  animation: slideUp 0.2s ease;
}
.brm-head { flex: none; padding: 10px 12px 14px 20px; }
.brm-handle { display: none; width: 36px; height: 3px; margin: 0 auto 14px; border-radius: 2px; background: var(--nest); opacity: 0.22; }
.brm-head__row { display: flex; align-items: flex-start; gap: 8px; }
.brm-head__text { flex: 1; min-width: 0; padding-top: 6px; }
.brm-title {
  margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: var(--lh-section);
  letter-spacing: 0; font-feature-settings: var(--font-display-features); color: var(--nest); overflow-wrap: anywhere;
}
.brm-sub { margin-top: 6px; font-size: 14px; line-height: 1.35; color: var(--nest); opacity: 0.82; }
.brm-close {
  flex: none; width: 34px; height: 34px; margin: 5px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule-soft); border-radius: 50%; background: transparent;
  color: var(--nest); font-size: 18px; line-height: 1; cursor: pointer; transition: border-color 0.15s;
}
.brm-close:hover { border-color: var(--nest); }
.brm-close:disabled { opacity: 0.5; cursor: not-allowed; }
/* The 2px Beak line: an indeterminate run while the sheet works. */
.brm-progress { flex: none; position: relative; height: 2px; overflow: hidden; }
.brm-progress.is-busy { background: var(--rule-soft); }
.brm-progress.is-busy::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: var(--beak);
  animation: brmRun 1.1s ease-in-out infinite;
}
@keyframes brmRun { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.brm-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 16px; }
.brm-section { border-top: 1px solid var(--rule); }
.brm-section__head {
  padding: 18px 20px 10px; font-size: 13px; font-weight: 400; line-height: 1.2;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--nest);
}
.brm-row { position: relative; padding: 14px 20px; }
.brm-row + .brm-row::before { content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 1px; background: var(--rule-soft); }
.brm-row__top { display: flex; align-items: center; gap: 12px; }
.brm-row__field {
  flex: 1; min-width: 0; font-size: 15px; font-weight: 500; line-height: 1.35;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
/* A read-only tag (the kit's ZTag): sentence case in a soft hairline pill,
   the tone in the words only. */
.brm-tag {
  display: inline-flex; align-items: center; max-width: 60%; padding: 4px 10px;
  border: 1px solid var(--rule-soft); border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--nest); color: color-mix(in srgb, var(--nest) 82%, transparent);
}
.brm-tag--good { color: var(--leaf); }
.brm-tag--info { color: var(--sev-recommend); }
@media (prefers-color-scheme: dark) { html:not(.theme-light) .brm-tag--good { color: #9CC28E; } }
html.theme-dark .brm-tag--good { color: #9CC28E; }
.brm-diff { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; line-height: 1.35; }
.brm-diff__cur { flex: 1; min-width: 0; overflow-wrap: anywhere; opacity: 0.82; }
.brm-diff__arrow {
  flex: none; width: 12px; height: 12px; background-color: currentColor; opacity: 0.6;
  -webkit-mask: url('/assets/icons/svg/Right-Arrow_NestBlack.svg') center / contain no-repeat;
  mask: url('/assets/icons/svg/Right-Arrow_NestBlack.svg') center / contain no-repeat;
}
.brm-diff__new { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.brm-line { margin-top: 6px; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.brm-quote { margin-top: 6px; font-size: 13px; line-height: 1.35; font-style: italic; opacity: 0.72; overflow-wrap: anywhere; }
.brm-meta { margin-top: 4px; font-size: 13px; line-height: 1.35; opacity: 0.72; }
.brm-status { margin-top: 10px; }
.brm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; margin-top: 10px; }
/* Reject and Modify quiet: the secondary ink (the phone's quiet buttons),
   never Beak words. */
.brm-actions .btn-secondary {
  min-height: 40px; padding: 0 16px; font-size: 12.5px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2);
}
.brm-actions .btn-secondary:not(:disabled):hover { color: var(--nest); }
.brm-actions .btn-outline { margin-left: 8px; padding: 0 16px; font-size: 12.5px; border-width: 1px; }
/* Modify, inline (the phone's "Modify proposal" field; fix pass 2 — never
   the browser's prompt): a caps label, a ruled field holding the proposed
   value, then Cancel quiet and Save the outline at the right. */
.brm-edit { margin-top: 10px; }
.brm-edit__label { font-size: 12px; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.brm-edit__input {
  display: block; width: 100%; margin-top: 6px; padding: 8px 0; font-size: 15px; line-height: 1.35;
  color: var(--nest); background: transparent; border: 0; border-bottom: 1px solid var(--rule-soft); border-radius: 0;
}
.brm-edit__input:focus { border-bottom-color: var(--beak); }
.brm-empty { padding: 32px 20px; text-align: center; }
.brm-empty .brand-illo { width: 104px; }
.brm-empty__title {
  margin-top: 18px; font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: var(--lh-section);
  font-feature-settings: var(--font-display-features); color: var(--nest);
}
.brm-empty__msg { margin-top: 8px; font-size: 14.5px; line-height: 1.35; opacity: 0.72; overflow-wrap: anywhere; }
.brm-loading { display: flex; justify-content: center; padding: 72px 20px; }
.brm-foot {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rule-soft);
}
.brm-foot .btn-outline { flex: none; min-height: 50px; padding: 0 22px; font-size: 14px; border-width: 1px; }
.brm-foot .btn-primary { flex: 1 1 auto; width: auto; min-height: 50px; padding: 0 22px; font-size: 14px; }
@media (max-width: 639px) {
  .brm-overlay { align-items: flex-end; padding: 0; }
  .brm-sheet { max-width: none; max-height: 92vh; max-height: 92dvh; border-width: 1px 0 0; }
  .brm-handle { display: block; }
}

/* ── Report tab (light mode sections) ─────────────────────────────── */
/* A jump pill at rest is the phone's (report_tab.dart _buildJumpBar): a
   stadium on the soft rule, its words in the secondary ink — never Terra
   on a Linen ring (fix pass 2). Done reads Leaf on a Leaf hairline; the
   open one is filled Nest. */
.jump-bar { display: flex; gap: 5px; overflow-x: auto; padding: 4px 0 14px; -webkit-overflow-scrolling: touch; }
.jump-pill {
  font-size: 11px; font-weight: 500; border-radius: 999px;
  padding: 5px 14px; flex-shrink: 0; white-space: nowrap;
  cursor: pointer; transition: all 0.2s; border: 1px solid var(--rule-soft);
  color: var(--ink-2); background: transparent;
}
.jump-pill.active { background: var(--nest); color: var(--bg); border-color: var(--nest); }
.jump-pill.complete { color: var(--leaf); border-color: rgba(74,103,65,0.25); }
/* An incomplete section's blocker count on its pill (inspect.page.js
   renderReport — the phone's _JumpPillBadge, report_tab.dart): an 18px
   stadium, a soft red tint laid over the ground (so it reads on the open
   Nest pill too) inside a red hairline, the figure in the issue ink at the
   brand's 500 in tabular figures, never tracked like the pill's caps. */
.jump-pill__badge {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px;
  background: rgba(181,54,42,0.16); background: color-mix(in srgb, var(--red) 16%, var(--bg));
  border: 1px solid rgba(181,54,42,0.4);
  color: var(--sev-issue); font-size: 10px; font-weight: 500; line-height: 1;
  letter-spacing: 0; font-variant-numeric: tabular-nums;
}

/* 2026-09-23 — 4-Point <-> Wind Mitigation report switcher on combined jobs.
   The phone's look (report_tab.dart _buildReportTypeSwitcher, fix pass 2):
   the kit's pill track — one Nest hairline stadium, 42px — the chosen
   report filled Nest with its words and dot in the ground's colour, the
   others in ink, each report's dot before its caps: Leaf when the report is
   complete, else the report's own colour (set inline by inspect.page.js). */
.report-type-switcher {
  display: flex; gap: 0; height: 42px; padding: 3px; margin: 0 0 14px; box-sizing: border-box;
  border: 1px solid var(--nest); border-radius: 999px;
}
.report-type-tab {
  flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 11.5px; font-weight: 400; line-height: 1; border-radius: 999px; padding: 0 10px;
  border: 0; background: transparent; color: var(--nest);
  cursor: pointer; transition: background-color 0.2s, color 0.2s; white-space: nowrap;
}
.report-type-tab:not(.active):hover { background: var(--bg-soft); }
.report-type-tab.active { background: var(--nest); color: var(--bg); }
.report-type-tab .report-type-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.report-type-tab .report-type-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--beak); flex-shrink: 0;
}
.report-type-tab .report-type-dot.complete { background: var(--leaf); }
.report-type-tab.active .report-type-dot { background: var(--bg); }

/* A section's body (inspect.page.js renderReport — the phone's section
   card, report_tab.dart:4383-4440; fix pass 2 S5): "Add photos from
   library" and "Add observation" are the kit's secondary compact pill at
   full width (ZButton.secondary, compact, expand: a 1px Nest hairline,
   40px, 12.5px ink caps, a 14px icon before the words — the photo library,
   the plus); a repeatable section's "Duplicate section" / "Add {label}" is
   the quiet compact pill at the right (ZButton.quiet: ink caps, the copy
   icon, no rule). The AI suggestions' bulk dismiss (web only) stays a quiet
   square cell. The sign-off is the kit's outline pill whatever the state
   (D1): complete, "Sign off as inspected"; incomplete, "Sign off — n
   remaining" (it asks first); once signed, a Leaf check and the line. */
.sec-cell {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 44px; margin-top: 8px; padding: 10px 14px; box-sizing: border-box;
  font-family: var(--font-body); font-size: 13px; font-weight: 400; line-height: 1.3; text-align: center;
  color: var(--nest); background: transparent; border: 1px solid var(--rule-soft); border-radius: 0;
  cursor: pointer; transition: border-color 0.15s, background-color 0.15s;
}
.sec-cell:hover { border-color: var(--nest); }
.sec-cell:active { background: var(--bg-soft); }
.sec-cell--quiet { min-height: 40px; font-size: 12px; color: var(--ink-2); }
.sec-pill { display: flex; width: 100%; margin-top: 8px; min-height: 40px; padding: 0 16px; gap: 8px; border-width: 1px; font-size: 12.5px; }
.sec-pill--photos { margin-top: 14px; }
.sec-pill:not(:disabled):active { background: var(--bg-soft); }
.sec-pill__icon { flex: none; width: 14px; height: 14px; }
.sec-pill__icon--photos {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Crect x='7' y='3' width='14' height='14'/%3E%3Cpath d='M3 7v14h14'/%3E%3Cpath d='M9.5 14l3-3.5 2.5 2.5 1.5-1.5 2.5 2.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Crect x='7' y='3' width='14' height='14'/%3E%3Cpath d='M3 7v14h14'/%3E%3Cpath d='M9.5 14l3-3.5 2.5 2.5 1.5-1.5 2.5 2.5'/%3E%3C/svg%3E");
}
.sec-pill__icon--copy {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Crect x='8' y='8' width='12' height='13'/%3E%3Cpath d='M16 8V3H4v13h4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Crect x='8' y='8' width='12' height='13'/%3E%3Cpath d='M16 8V3H4v13h4'/%3E%3C/svg%3E");
}
.sec-dup {
  display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; margin: 4px 0 0 auto; padding: 0 16px; min-height: 40px;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 400; line-height: 1; letter-spacing: var(--track-caps); text-transform: uppercase;
  color: var(--nest); background: transparent; border: 0; border-radius: 999px; cursor: pointer;
}
.sec-dup:hover, .sec-dup:active { background: var(--bg-soft); }
.sec-signoff { margin-top: 14px; }
/* The phone's ZButton.secondary at full width: 50px, 14px caps (D1). */
.sec-signoff .btn-outline { width: 100%; min-height: 50px; padding: 0 22px; border-width: 1px; font-size: 14px; }
.sec-signoff__done {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 0;
  font-size: 14.5px; font-weight: 500; line-height: 1.3; color: var(--nest);
}
.sec-signoff__done .z-icon { width: 13px; height: 13px; color: var(--leaf); }
/* A closed section's first values under its head: the quiet ink, one line
   (the phone's section summary). */
.sec-summary {
  margin-top: 6px; font-size: 12.5px; line-height: 1.35; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* The Wind Mitigation question number before a section's name (Q1 … Q9):
   ink on a hairline, never a Terra block (PB3). */
.wm-q {
  display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid var(--rule-soft); border-radius: 999px;
  font-size: 11px; font-weight: 500; line-height: 1.2; letter-spacing: 0.02em; color: var(--nest);
}
/* The did-you-mean card under a field the chat wrote with alternates
   (inspect.page.helpers.js alternatesCardHtml — the phone's
   _AlternatesCard, report_tab.dart; fix pass 2): the kit's warn notice —
   a soft Amber tint, a soft rule round it and the 3px Amber accent at the
   left, square — the question in ink beside "{n}% sure", the kit's warn
   tag (the warn ink in a soft hairline stadium, never Amber words); then
   Keep and every alternate as the same secondary compact pill: a 1px Nest
   hairline, ink caps, 40px tall, its ::before keeping the 44px touch
   floor. The card repeats down a section, so no choice is a Beak fill. */
.alt-card {
  margin-top: 8px; padding: 10px 10px 10px 12px; border-radius: 0; color: var(--nest);
  background: rgba(198,123,37,0.08); border: 1px solid var(--rule-soft); border-left: 3px solid var(--amber);
}
.alt-card__head { display: flex; align-items: flex-start; gap: 8px; }
.alt-card__q { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; color: var(--nest); overflow-wrap: anywhere; }
.alt-card__chip {
  flex: none; display: inline-block; padding: 3px 10px; border: 1px solid var(--rule-soft); border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.2; white-space: nowrap; color: var(--sev-maintenance);
}
.alt-card__picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.alt-card__pick { position: relative; min-width: 0; max-width: 100%; min-height: 40px; padding: 0 16px; border-width: 1px; font-size: 12.5px; }
.alt-card__pick::before { content: ''; position: absolute; left: 0; right: 0; top: -2px; bottom: -2px; }
.alt-card__pick:not(:disabled):active { background: var(--bg-soft); }
.alt-card__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The whole-report sign-off step (inspect.page.js renderSignoffCard — the
   phone's _buildSignoffCard, D2): the kit's square notice — a soft tint
   of its tone, a soft rule round it and the 3px accent at the left, Leaf
   once signed, Amber while it waits — its title in ink, its line in the
   secondary ink, and the step's one action under the words as the outline
   pill ("Sign now") or the quiet link ("Re-sign"). */
.so-card {
  padding: 14px; border: 1px solid var(--rule-soft); border-left: 3px solid var(--amber); border-radius: 0;
  background: rgba(198,123,37,0.08); color: var(--nest);
}
.so-card--signed { border-left-color: var(--leaf); background: rgba(74,103,65,0.08); }
.so-card__row { display: flex; align-items: flex-start; gap: 10px; }
.so-card__mark { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.so-card__mark.z-icon { color: var(--leaf); }
.so-card__mark--draw { width: 18px; height: 18px; margin-top: 0; color: var(--sev-maintenance); }
.so-card__text { flex: 1; min-width: 0; }
.so-card__title { font-size: 15.5px; font-weight: 500; line-height: 1.3; }
.so-card__line { margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.so-card__sig { display: block; margin-top: 8px; max-width: 220px; max-height: 66px; background: var(--white); border: 1px solid var(--rule-soft); }
.so-card__action { margin: 12px 0 0 25px; }
/* The phone's compact pills (40px, 12.5px caps): "Sign now" the secondary
   outline; "Re-sign" the quiet one, its words ink (ZButton.quiet). */
.so-card__action .btn-outline { min-height: 40px; padding: 0 16px; border-width: 1px; font-size: 12.5px; }
.so-card__action .btn-secondary { min-height: 40px; padding: 0 16px; font-size: 12.5px; color: var(--nest); }

/* A confirmation on the inspect page (inspect.page.js zoozahConfirm — the
   phone's showZConfirm): the square sheet, its Erotique title, the words,
   Cancel quiet and the confirm the outline pill at the right. */
.zc-title {
  margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: var(--lh-section);
  letter-spacing: 0; font-feature-settings: var(--font-display-features); color: var(--nest);
}
.zc-msg { margin-top: 10px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.zc-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 20px; }
.zc-actions .btn-secondary { min-height: 40px; color: var(--ink-2); }
.zc-actions .btn-outline { border-width: 1px; }

.section-card { margin-bottom: 8px; animation: fadeIn 0.3s ease; }
.section-header {
  background: transparent; border: 1px solid var(--rule);
  padding: 14px 16px; cursor: pointer; transition: all 0.2s;
}
/* Square, never rounded: a section's head and body are cells of the ruled
   grid, the head's bottom line the body's top (2026-10-07, the phone's
   square sections). */
.section-header.rounded { border-radius: 0; }
.section-header.top-only { border-radius: 0; }
.section-body {
  background: transparent; border: 1px solid var(--rule);
  border-top: none; border-radius: 0; padding: 6px 16px 16px;
  animation: slideUp 0.2s ease;
}

/* ── Observation inline card ──────────────────────────────────────── */
/* Square on the grid (PB13): its severity's 2px edge at the left and a
   faint tint; the words in the severity's ink (inspect.page.js sets both). */
.obs-inline {
  margin-top: 6px; padding: 6px 10px;
  border-radius: 0; font-size: 11px; font-weight: 500;
}

/* ── Deliver screen ───────────────────────────────────────────────── */
/* A report on Review & deliver is a ruled row of its section (the phone's
   _reportRow, app/lib/screens/deliver_screen.dart): its colour as the 3px
   accent at the left, a soft rule under it, square. deliver.ejs lays the
   row out (.dl-report); this is the shape any page that borrows it gets. */
.report-card {
  background: transparent; border: 0; border-left: 3px solid var(--rule);
  border-bottom: 1px solid var(--rule-soft); border-radius: 0;
  padding: 16px 20px 18px 17px; margin: 0;
  animation: slideUp 0.3s ease;
}
.report-card:last-child { border-bottom: 0; }

/* ── Loading spinner ──────────────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px; border: 2px solid var(--linen);
  border-top-color: var(--beak); border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Authed-image loading shimmer ─────────────────────────────────────
   <img data-authed-src="…"> elements have no real `src` until
   hydrateAuthedImages mints an object URL from a bearer-auth fetch.
   Until that resolves, the slot used to render as a flat grey
   rectangle with no signal that something was loading. While the
   fetch is in flight, hydrateAuthedImages adds [data-authed-loading]
   so we can overlay a shimmer + spinner. Removed once the blob
   resolves and the real image paints. Honours prefers-reduced-motion
   below (block #143) by falling back to a flat tint. */
img[data-authed-loading="true"],
video[data-authed-loading="true"],
audio[data-authed-loading="true"] {
  /* Flat loading tint — no shimmer sweep (the platform has no effects). */
  background: var(--down);
}
@keyframes authedImgShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}

/* ── App layout (sidebar + main content) ──────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg);
}

.sidebar-nav {
  display: none;
  /* Icon-only rail (2026-09-23): 72px, labels are visually hidden and
     carried by title/aria-label; the account menu holds the words. */
  width: 72px; flex-shrink: 0;
  background: var(--chrome-bg); color: var(--chrome-text-active);
  padding: 24px 0; position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto; z-index: 40;
  flex-direction: column;
  border-right: 1px solid var(--rule);
}
/* Stork symbol (logo kit) → dashboard. Colour comes from --chrome-logo so
   it flips Nest → Down with the chrome; 44px clears the 36px floor. */
/* The stork sits in the rail like any other entry (2026-09-25): the same
   46px slot, drawn at the icons' scale, and no rule beneath it — the rail
   carries no horizontal lines at all. */
.sidebar-brand {
  display: flex; align-items: center; justify-content: center; height: 40px; padding: 0; margin: 2px 0;   /* the mark is shorter than the icons, so a shorter slot keeps the visual gap even */
  color: var(--chrome-logo); text-decoration: none; line-height: 1;
}
.sidebar-brand .brand-symbol { width: 28px; }
.sidebar-brand:hover { color: var(--beak); }
/* Legacy hook: a few pages still address the old wordmark slot. */
.sidebar-logo { padding: 0 20px 20px; color: var(--chrome-logo); line-height: 1; }
.sidebar-logo .brand-wordmark { width: 104px; }
.sidebar-links { list-style: none; margin: 0; padding: 0; }
.sidebar-links a {
  display: flex; align-items: center; justify-content: center;
  height: 46px; margin: 2px 12px; border-radius: 0;
  color: var(--nest); text-decoration: none;   /* icons are Nest */
  transition: color 0.15s, background 0.15s;
}
.sidebar-links a:hover { color: var(--chrome-text-hover); background: var(--chrome-hover-bg); }
.sidebar-links a.active { color: var(--beak); background: var(--chrome-active-bg); }
/* Every rail icon answers a hover the way the assistant's question mark does
   (the founder, 2026-10-01): a soft square well (12px corners, the floating
   rule) behind the icon, and the icon turns Beak. The rail's links, the bell,
   the avatar and the stork; .sidebar-nav lifts these past the buttons' own
   files (notifications.css, assistant.css), which load later. */
.sidebar-nav .sidebar-links a, .sidebar-nav .sidebar-bell__btn, .sidebar-nav .sidebar-avatar { border-radius: 12px; }
.sidebar-nav .sidebar-links a { width: 46px; margin-left: auto; margin-right: auto; }
.sidebar-nav .sidebar-links a:hover, .sidebar-nav .sidebar-bell__btn:hover, .sidebar-nav .sidebar-bell__btn[aria-expanded="true"],
.sidebar-nav .sidebar-avatar:hover, .sidebar-nav .sidebar-avatar[aria-expanded="true"] { color: var(--beak); background: var(--chrome-hover-bg); }
.sidebar-nav .sidebar-brand { width: 46px; height: 46px; margin: 0 auto; border-radius: 12px; transition: color 0.15s, background 0.15s; }
.sidebar-nav .sidebar-brand:hover { color: var(--beak); background: var(--chrome-hover-bg); }
/* Search: a real field, dressed like the nav rows so the column reads as
   one list. Cream well, hairline, Beak ring on focus. */
.sidebar-search-item { padding: 0 16px 6px; }
.sidebar-search {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--chrome-divider);
  color: var(--chrome-text-muted); transition: border-color 0.15s, color 0.15s;
}
.sidebar-search:focus-within { border-color: var(--beak); color: var(--chrome-text-active); }
.sidebar-search .nav-icon { flex: none; }
.sidebar-search input {
  flex: 1; min-width: 0; padding: 0; margin: 0; border: none; outline: none;
  background: transparent; font: inherit; font-size: 13px; line-height: 1.2;
  color: var(--chrome-text-active); -webkit-appearance: none; appearance: none;
}
.sidebar-search input::placeholder { color: var(--chrome-text-muted); }
.sidebar-search input::-webkit-search-decoration,
.sidebar-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
/* "New" is the one action in the nav — the pill, in the one action colour. */
/* New: the Plus glyph IS the button (2026-09-25) — no disc behind it. The
   glyph's ring and cross are the Nest mask; a Beak disc sits inside the
   ring (::before, inset so nothing shows past the ring). Hover / press /
   current: the disc grows to the ring's edge and fades to Nest, the ring
   merges into it, and only the cross (::after, the cross-only mask)
   turns white — a solid Nest disc with a white plus and no ring. Nest is
   --nest-fill, like the Beak pills below, so dark mode keeps the contrast. The
   glyph is drawn at the same 24px as its neighbours so its stroke weight
   matches theirs (at 30px it read heavier). */
.sidebar-links a.sidebar-new {
  width: 46px; height: 46px; margin: 2px auto; border-radius: 999px;
  background: transparent; color: var(--nest); position: relative;
}
.sidebar-links a.sidebar-new::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 21px; height: 21px;
  transform: translate(-50%, -50%); border-radius: 50%; background: var(--beak);
  transition: background-color 0.7s ease, width 0.7s ease, height 0.7s ease;   /* slower than the pills' 0.4s */
}
.sidebar-links a.sidebar-new .nav-icon { position: relative; width: 24px; height: 24px; transition: background-color 0.7s ease; }
.sidebar-links a.sidebar-new::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 24px; height: 24px;
  transform: translate(-50%, -50%); background-color: transparent; transition: background-color 0.7s ease;
  -webkit-mask-image: url('/assets/icons/svg/Plus-Cross_NestBlack.svg'); mask-image: url('/assets/icons/svg/Plus-Cross_NestBlack.svg');
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.sidebar-links a.sidebar-new:hover, .sidebar-links a.sidebar-new:active, .sidebar-links a.sidebar-new.active { background: transparent; color: var(--nest-fill); }
.sidebar-links a.sidebar-new:hover::before, .sidebar-links a.sidebar-new:active::before, .sidebar-links a.sidebar-new.active::before { background: var(--nest-fill); width: 24px; height: 24px; }
.sidebar-links a.sidebar-new:hover::after, .sidebar-links a.sidebar-new:active::after, .sidebar-links a.sidebar-new.active::after { background-color: var(--white); }
.sidebar-links .nav-icon {
  display: inline-block; width: 22px; height: 22px; vertical-align: middle;
  background-color: currentColor;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.nav-icon-dashboard { -webkit-mask-image: url('/assets/icons/svg/Zhub_NestBlack.svg'); mask-image: url('/assets/icons/svg/Zhub_NestBlack.svg'); }
.nav-icon-calendar { -webkit-mask-image: url('/assets/icons/svg/Calendar_NestBlack.svg'); mask-image: url('/assets/icons/svg/Calendar_NestBlack.svg'); }
.nav-icon-billing { -webkit-mask-image: url('/assets/icons/svg/Finances_NestBlack.svg'); mask-image: url('/assets/icons/svg/Finances_NestBlack.svg'); }
.nav-icon-contracts { -webkit-mask-image: url('/assets/icons/svg/Handshake_NestBlack.svg'); mask-image: url('/assets/icons/svg/Handshake_NestBlack.svg'); }
.nav-icon-templates { -webkit-mask-image: url('/assets/icons/svg/Documents_NestBlack.svg'); mask-image: url('/assets/icons/svg/Documents_NestBlack.svg'); }
.nav-icon-analytics { -webkit-mask-image: url('/assets/icons/svg/Activity_NestBlack.svg'); mask-image: url('/assets/icons/svg/Activity_NestBlack.svg'); }
.nav-icon-team { -webkit-mask-image: url('/assets/icons/svg/Vendors_NestBlack.svg'); mask-image: url('/assets/icons/svg/Vendors_NestBlack.svg'); }
.nav-icon-settings { -webkit-mask-image: url('/assets/icons/svg/More_NestBlack.svg'); mask-image: url('/assets/icons/svg/More_NestBlack.svg'); }
.nav-icon-tasks { -webkit-mask-image: url('/assets/icons/svg/Tasks_NestBlack.svg'); mask-image: url('/assets/icons/svg/Tasks_NestBlack.svg'); }
.nav-icon-notifications { -webkit-mask-image: url('/assets/icons/svg/Notifications_NestBlack.svg'); mask-image: url('/assets/icons/svg/Notifications_NestBlack.svg'); }
.nav-icon-plus { -webkit-mask-image: url('/assets/icons/svg/Plus_NestBlack.svg'); mask-image: url('/assets/icons/svg/Plus_NestBlack.svg'); }
.nav-icon-overrides { -webkit-mask-image: url('/assets/icons/svg/maintenance-icon.svg'); mask-image: url('/assets/icons/svg/maintenance-icon.svg'); }
.nav-icon-profiles { -webkit-mask-image: url('/assets/icons/svg/Tasks_NestBlack.svg'); mask-image: url('/assets/icons/svg/Tasks_NestBlack.svg'); }
/* Clients (landscaping): the brand's Documents icon (07_Iconography › NestBlack — the founder, 2026-10-01,
   in place of the handshake). An upright glyph like its neighbours: the square nav-icon box, no wider footprint. */
.nav-icon-clients { -webkit-mask-image: url('/assets/icons/svg/Documents_NestBlack.svg'); mask-image: url('/assets/icons/svg/Documents_NestBlack.svg'); }
.nav-icon-platform-ops { -webkit-mask-image: url('/assets/icons/svg/Notifications_NestBlack.svg'); mask-image: url('/assets/icons/svg/Notifications_NestBlack.svg'); }
.nav-icon-contacts { -webkit-mask-image: url('/assets/icons/svg/Profile_NestBlack.svg'); mask-image: url('/assets/icons/svg/Profile_NestBlack.svg'); }
/* Distinct icons so nav items stop sharing glyphs (2026-05-29):
   Portal (was reusing Overrides' wrench), Scheduling (was reusing the
   Calendar grid), Help (was reusing Settings' dots). */
.nav-icon-portal { -webkit-mask-image: url('/assets/icons/svg/portal-icon.svg'); mask-image: url('/assets/icons/svg/portal-icon.svg'); }
.nav-icon-scheduling { -webkit-mask-image: url('/assets/icons/svg/clock-icon.svg'); mask-image: url('/assets/icons/svg/clock-icon.svg'); }
.nav-icon-help { -webkit-mask-image: url('/assets/icons/svg/help-icon.svg'); mask-image: url('/assets/icons/svg/help-icon.svg'); }
.nav-icon-search { -webkit-mask-image: url('/assets/icons/svg/search-icon.svg'); mask-image: url('/assets/icons/svg/search-icon.svg'); }
.nav-icon-inspections { -webkit-mask-image: url('/assets/icons/svg/Tasks_NestBlack.svg'); mask-image: url('/assets/icons/svg/Tasks_NestBlack.svg'); }
.nav-icon-facilities { -webkit-mask-image: url('/assets/icons/svg/Facilities_NestBlack.svg'); mask-image: url('/assets/icons/svg/Facilities_NestBlack.svg'); }

/* Generic branded icon (use outside of nav) */
.z-icon {
  display: inline-block; background-color: currentColor;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.z-icon-right-arrow { -webkit-mask-image: url('/assets/icons/svg/Right-Arrow_NestBlack.svg'); mask-image: url('/assets/icons/svg/Right-Arrow_NestBlack.svg'); }
.z-icon-left-arrow { -webkit-mask-image: url('/assets/icons/svg/Left-Arrow_NestBlack.svg'); mask-image: url('/assets/icons/svg/Left-Arrow_NestBlack.svg'); }
.z-icon-down-arrow { -webkit-mask-image: url('/assets/icons/svg/Down-Arrow_NestBlack.svg'); mask-image: url('/assets/icons/svg/Down-Arrow_NestBlack.svg'); }
.z-icon-up-arrow { -webkit-mask-image: url('/assets/icons/svg/Up-Arrow_NestBlack.svg'); mask-image: url('/assets/icons/svg/Up-Arrow_NestBlack.svg'); }
.z-icon-check { -webkit-mask-image: url('/assets/icons/svg/check.svg'); mask-image: url('/assets/icons/svg/check.svg'); }
.z-icon-calendar { -webkit-mask-image: url('/assets/icons/svg/Calendar_NestBlack.svg'); mask-image: url('/assets/icons/svg/Calendar_NestBlack.svg'); }
.z-icon-plus { -webkit-mask-image: url('/assets/icons/svg/Plus_NestBlack.svg'); mask-image: url('/assets/icons/svg/Plus_NestBlack.svg'); }
/* ── Account disc + menu (bottom of the sidebar) ──────────────────────
   The avatar is the only control down here; everything that is not a
   primary destination (profile, settings, team, admin, help, sign out)
   lives in the menu it opens. The menu anchors ABOVE the disc. */
.sidebar-user {
  margin-top: auto; position: relative; display: flex; justify-content: center;
  padding: 12px 12px 0;   /* no rule above the account button either */
}
/* The account button is the brand Profile icon (icon suite), flat: Nest
   at rest, Beak on hover/open, a keyboard ring on focus only. */
.sidebar-avatar {
  width: 46px; height: 46px; border-radius: 0; padding: 0; border: none;
  background: transparent; color: var(--nest); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; transition: color 0.15s, background 0.15s;
}
.sidebar-avatar .nav-icon { flex: none; }
/* Icon-only rail: the name lives in the menu head (screen readers get it here). */
.sidebar-user__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sidebar-avatar .nav-icon {
  display: inline-block; width: 24px; height: 24px; background-color: currentColor;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.sidebar-avatar:hover, .sidebar-avatar[aria-expanded="true"] { color: var(--beak); background: var(--chrome-hover-bg); }
.sidebar-avatar:focus-visible { outline: 2px solid var(--beak); outline-offset: 2px; }
.nav-icon-profile { -webkit-mask-image: url('/assets/icons/svg/Profile_NestBlack.svg'); mask-image: url('/assets/icons/svg/Profile_NestBlack.svg'); }
.sidebar-avatar__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sidebar-menu {
  /* Fixed, so the narrow rail's overflow can never clip it: it opens
     beside the profile icon, bottom-aligned with it. */
  position: fixed; left: 80px; bottom: 14px; width: 236px;
  background: var(--bg); border: 1px solid var(--rule); border-radius: 0;
  padding: 6px; z-index: 50;
}
.sidebar-menu[hidden] { display: none; }
.sidebar-menu__head { padding: 10px 10px 9px; border-bottom: 1px solid var(--rule-soft); margin-bottom: 4px; }
.sidebar-menu__head .name { font-size: 13px; font-weight: 500; color: var(--chrome-text-active); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-menu__head .email { font-size: 12px; color: var(--chrome-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-menu__group { padding: 4px 0; }
.sidebar-menu__group + .sidebar-menu__group { border-top: 1px solid var(--rule-soft); }
.sidebar-menu__label {
  padding: 6px 10px 2px; font-size: 11px; font-weight: 500;
  letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--chrome-text-muted);
}
.sidebar-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 0; font-size: 13px;
  color: var(--chrome-text-hover); text-decoration: none; transition: background 0.12s, color 0.12s;
}
.sidebar-menu a:hover, .sidebar-menu a:focus-visible { background: var(--chrome-hover-bg); color: var(--chrome-text-active); outline: none; }
.sidebar-menu a.active { background: var(--chrome-active-bg); color: var(--chrome-text-active); font-weight: 500; }
.sidebar-menu .sidebar-signout { color: var(--chrome-text-muted); }
.sidebar-menu .sidebar-signout:hover { color: var(--red); }
/* Pinned items (docs/kit/PHASE_SIX.md §1): the person's own shortcuts under
   the rail, drawn as the label's first letter in a hairline disc — the icon
   suite carries no pin glyph, and the disc reads like the avatar's
   initials. The menu's "Pin this page" is a button dressed as a menu row. */
.sidebar-pins { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--chrome-divider); }
.sidebar-pin__glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--rule);
  font-family: var(--font-display); font-feature-settings: var(--font-display-features);
  font-size: 13px; line-height: 1; color: currentColor;
}
.sidebar-links a:hover .sidebar-pin__glyph, .sidebar-links a.active .sidebar-pin__glyph { border-color: currentColor; }
.sidebar-menu__action {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; text-align: left; color: var(--chrome-text-hover);
}
.sidebar-menu__action:hover, .sidebar-menu__action:focus-visible { background: var(--chrome-hover-bg); color: var(--chrome-text-active); outline: none; }

.app-main {
  flex: 1;
  /* The flex-item guard: without it the main column sizes to its content's
     min-content and a wide panel pushes the page past the viewport with no
     way to scroll to it (fix pass 2026-09-27; measured 429px in a 375px
     pane on Capture quality, the Tenants tab and the IoT tab). */
  min-width: 0;
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg);
}

.bottom-nav {
  display: flex; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--card); border-top: 1px solid var(--linen);
  padding: 6px 0 env(safe-area-inset-bottom, 8px); z-index: 40;
}
/* The bar's words (fix pass 2; the phone's staff_nav.dart): each tab's
   glyph and word in the quiet ink; the current tab in Nest, its word at
   500, with a short Beak marker on the bar's rule above it — the colour
   marks the tab, the words never wear Beak. */
.bottom-nav a,
.bottom-nav button {
  position: relative;
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 400; color: var(--ink-3);
  text-decoration: none; padding: 4px 0; transition: color 0.15s;
  border: 0; background: transparent; cursor: pointer;
}
.bottom-nav a.active,
.bottom-nav button.active { color: var(--nest); font-weight: 500; }
.bottom-nav a.active::before,
.bottom-nav button.active::before {
  content: ''; position: absolute; top: -7px; left: 50%; width: 22px; height: 2px; margin-left: -11px;
  background: var(--beak); pointer-events: none;
}
.bottom-nav .nav-icon {
  display: inline-block; width: 20px; height: 20px;
  background-color: currentColor;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}

/* ── The phone's More menu (zoozah.com's expanded mobile menu) ──────────
   The Perky Bros mockup, drawn as the phone app draws it
   (app/lib/screens/dashboard_screen.dart DashboardMoreMenu; markup in
   views/partials/foot.ejs). Full screen on the page ground: a thin close
   at the left and the stork at the right over one structural rule; the
   workspace's pages as big tracked Roobert caps; the Company's and the
   Platform's folded under a heading with the font's own arrow (Roobert
   carries U+2193), turned up while open; the one Beak pill; then the
   settings and the account as two columns of small links, the account's
   underlined. No glyphs and no boxes: each line keeps its icon span for the
   markup's contract and the menu does not draw it. It fades in over the
   page (Slide-out motion, below). Tokens only, so the dark themes follow. */
.mobile-more-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  flex-direction: column;
  background: var(--bg);
  color: var(--nest);
}
.mobile-more-overlay[hidden] { display: none !important; }
.mobile-more-overlay.show { display: flex; }
.mobile-more-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
}
/* The bar: 60px and the rule under it. */
.mobile-more-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 61px;
  border-bottom: 1px solid var(--rule);
}
.mobile-more-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--nest);
  cursor: pointer;
}
.mobile-more-close:focus-visible { outline-offset: -6px; }
/* The thin cross: two 1.4px strokes in a 22px box, drawn as lines (no
   inline SVG, so no page carries a drawing it did not ask for). Each is the
   phone's stroke, (1,1) to (21,21) with its round caps. */
.mobile-more-close__x { position: relative; display: block; width: 22px; height: 22px; pointer-events: none; }
.mobile-more-close__x::before,
.mobile-more-close__x::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 29.7px;
  height: 1.4px;
  border-radius: 0.7px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.mobile-more-close__x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.mobile-more-head .mobile-more-symbol { flex: 0 0 auto; width: 46px; margin-right: 20px; color: var(--chrome-logo); }
.mobile-more-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 48px 20px calc(32px + env(safe-area-inset-bottom, 0px)) 24px;
}
.mobile-more-panel .nav-icon,
.mobile-more-panel .sidebar-pin__glyph { display: none; }
/* The pages, and the headings that fold the long lists: big tracked caps. */
.mobile-more-links > a,
.mobile-more-group__toggle,
.mobile-more-group__links > a {
  display: block;
  padding: 8px 0;
  font-family: var(--font-body);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--nest);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.mobile-more-group__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.mobile-more-group__arrow {
  display: inline-block;
  font-size: 24px;
  transition: transform 0.24s var(--slide-ease);
}
.mobile-more-group__toggle[aria-expanded="true"] .mobile-more-group__arrow { transform: rotate(180deg); }
/* A fold opens to its height and closes back (a 0fr → 1fr row); folded,
   its links are hidden from the eye, the keyboard and the reader. */
.mobile-more-group__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.24s var(--slide-ease), visibility 0s linear 0.24s;
}
.mobile-more-group__panel.is-open {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.24s var(--slide-ease), visibility 0s;
}
.mobile-more-group__links {
  min-height: 0;
  overflow: hidden;
  margin: 0 -6px;
  padding: 0 6px 0 8px;   /* the links sit 2px in; the 6px each side keeps a focus ring inside the clip */
}
.mobile-more-group__links::before { content: ''; display: block; height: 2px; }
.mobile-more-group__links::after { content: ''; display: block; height: 12px; }
.mobile-more-group__links > a { padding: 6px 0; font-size: 19px; }
.mobile-more-group__links > a:focus-visible { outline-offset: 0; }
/* The one pill, full width: .btn-primary's look (Beak, white caps at the
   caps tracking, Nest on hover and press, the Nest ring) under its own
   class — it is the menu's, not a primary action of the page beneath, so
   it stays out of every page's "one .btn-primary" count. Nest on hover is
   --nest-fill, as the Beak pills' rule below explains: --nest turns cream
   in dark mode and the white words would vanish. */
.mobile-more-new {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--beak);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.4s ease, color 0.4s ease, transform 0.15s ease;
}
.mobile-more-new:hover, .mobile-more-new:active { background: var(--nest-fill); color: var(--white); }
.mobile-more-new:active { transform: scale(0.98); }
.mobile-more-new:focus-visible { outline: 2px solid var(--nest); outline-offset: 2px; }
/* The settings and the account: two columns of small Roobert links. */
.mobile-more-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 16px;
  margin-top: 48px;
}
.mobile-more-foot__col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.mobile-more-foot a {
  display: block;
  max-width: 100%;
  padding: 7px 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--nest);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.mobile-more-foot__col--account a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: currentColor;
  text-decoration-color: color-mix(in srgb, currentColor 60%, transparent);
}
/* The current page and a hovered line stay Nest (D11, the phone's menu):
   the menu's words never wear Beak — the one Beak is the pill. */
.mobile-more-links > a.active,
.mobile-more-group__links > a.active,
.mobile-more-foot a.active { color: var(--nest); }
@media (hover: hover) {
  .mobile-more-close:hover,
  .mobile-more-links > a:hover,
  .mobile-more-group__toggle:hover,
  .mobile-more-group__links > a:hover,
  .mobile-more-foot a:hover { color: var(--nest); }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-more-group__panel,
  .mobile-more-group__panel.is-open,
  .mobile-more-group__arrow { transition: none !important; }
}
body.mobile-more-open { overflow: hidden; }

.page-container {
  /* Mobile: tight horizontal padding so cards run nearly edge-to-
     edge — wide horizontal margins on a phone screen waste a chunk
     of the viewport that inspectors need for one-glance scanning.
     Inner cards keep their own padding so text doesn't kiss the
     screen edge. Tablet/desktop bumps padding up via the @media
     blocks below. */
  padding: 12px 8px 80px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

/* Wide pages (dashboard, inspections, calendar…) run edge to edge with a
   modest gutter instead of centring in a 1180px column. */
.page-container-wide { max-width: none; }
.page-container-form { max-width: 760px; }
.page-container-settings { max-width: 1040px; }

.content-grid {
  display: grid; gap: 8px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .sidebar-nav { display: flex; }
  .bottom-nav { display: none; }
  .mobile-more-overlay { display: none !important; }
  .app-main { margin-left: 72px; }
  .page-container { padding: 28px 32px; padding-bottom: 32px; }
  .content-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .app-layout .app-shell { max-width: none; border: none; }
}

@media (min-width: 1200px) {
  .content-grid { grid-template-columns: repeat(3, 1fr); }
  .page-container { padding: 32px 28px; }
}

.summary-row {
  display: grid; gap: 12px; margin-bottom: 20px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .summary-row { grid-template-columns: repeat(4, 1fr); } }

.summary-card {
  background: transparent; border: 1px solid var(--rule);
  border-radius: 0; padding: 14px 16px;
}
.summary-card .label { font-size: 10px; font-weight: 500; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.5px; }
.summary-card .value { font-size: 22px; font-weight: 600; color: var(--nest); margin-top: 4px; font-variant-numeric: tabular-nums; }
.summary-card .sub { font-size: 11px; color: var(--ink-2); margin-top: 2px; }

.pill {
  display: inline-block; font-size: 11px; font-weight: 500;
  padding: 3px 10px; border-radius: 0;
}
.pill-paid { color: var(--leaf); background: rgba(74,103,65,0.1); }
.pill-pending { color: var(--red); background: rgba(181,54,42,0.1); }
.pill-sent { color: var(--sev-maintenance); background: rgba(198,123,37,0.1); }
.pill-unpaid { color: var(--red); background: rgba(181,54,42,0.1); }
.pill-due { color: var(--sev-maintenance); background: rgba(198,123,37,0.1); }
.pill-overdue { color: var(--red); background: rgba(181,54,42,0.18); }
.pill-settled { color: var(--leaf); background: rgba(74,103,65,0.1); }
.pill-setup { color: var(--sev-maintenance); background: rgba(198,123,37,0.1); }
.pill-active { color: var(--nest); background: rgba(180,95,52,0.1); }
.pill-delivered { color: var(--leaf); background: rgba(74,103,65,0.1); }

.filter-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-tab {
  font-size: 12px; font-weight: 500; padding: 6px 14px;
  border-radius: 20px; cursor: pointer; border: 1.5px solid var(--linen);
  color: var(--ink-2); background: transparent; transition: all 0.15s;
}
.filter-tab.active { background: var(--nest); color: var(--white); border-color: var(--nest); }

.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.4); align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--bg); border: 1px solid var(--rule); border-radius: 0; padding: 24px;
  width: 90%; max-width: 440px; max-height: 85vh; overflow-y: auto;
  animation: slideUp 0.2s ease;
}

/* ── Utility ──────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.flex-1 { flex: 1; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.p-20 { padding: 20px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
/* Visually hidden but readable by assistive tech — used for form labels
   that pair with placeholder-driven inputs. */
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}
/* Comfortable touch target — used by inline action buttons that need
   ≥44×44 hit area without growing visually. Keeps the rendered glyph
   tiny while expanding the tap surface and pulling layout back with
   negative margin so the surrounding row doesn't bloat. */
.tap-target {
  min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}

/* ── Responsive fixes ────────────────────────────────────────────── */

/* Fixed bottom button: above bottom nav on mobile, scale with content on tablet/desktop */
.fixed-bottom-btn {
  position: fixed; bottom: calc(60px + env(safe-area-inset-bottom, 8px));
  right: 24px; left: 24px;
  max-width: 430px; margin: 0 auto; z-index: 35;
}
@media (min-width: 768px) {
  .fixed-bottom-btn { bottom: 24px; left: 244px; right: 24px; max-width: 536px; margin: 0 auto; }
}
@media (min-width: 1200px) {
  .fixed-bottom-btn { max-width: 600px; }
}

/* Ensure body doesn't overflow horizontally.
 *
 * Use `overflow-x: clip` rather than `hidden`. Per CSS spec, setting
 * `overflow-x: hidden` on the `html` element forces `overflow-y` to
 * compute to `auto`, turning html into a scroll container. That breaks
 * the viewport's natural scroll on desktop browsers (notably Chrome/
 * Edge on macOS with trackpad) and on some iOS Safari combinations,
 * especially with `body { overscroll-behavior: none }` above and the
 * scrollbar-display:none rule on the global reset. `clip` hides
 * horizontal overflow without establishing a scroll container, so the
 * viewport keeps its default vertical scrolling.
 *
 * Compat: Chrome 90+, Edge 90+, Firefox 81+, Safari 16+ (iOS 16+).
 * Matches the app's iOS 16 deployment target and modern-browser-only
 * staff web support.
 */
html, body { overflow-x: clip; }

/* ── Auth pages (login, forgot-password, reset, 2fa) ────────────── */
.auth-page {
  position: relative; min-height: 100vh; min-height: 100dvh;
  background: #E2D8C8;   /* flat — no washes (guide: elevation is surface colour) */
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-card {
  background: rgba(255,252,242,0.72);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 20px; padding: 32px 40px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative; overflow: hidden;
  width: 100%; max-width: 440px;
}
.auth-card::before {
  content: ''; position: absolute; inset: 0;
  pointer-events: none; border-radius: inherit;
}
/* The wordmark + kicker that open forgot-password / reset-password /
   2fa-verify. These were inline style="" on all three, which no skin can
   outrank — see partials/auth-brand.ejs. Declarations are verbatim what
   was inline, so the classic skin is byte-for-byte unchanged. */
.auth-wordmark { font-family: var(--font-display); font-feature-settings: var(--font-display-features); font-size: 36px; color: var(--nest); margin-bottom: 2px; line-height: 1; }
.auth-wordmark .brand-wordmark { width: 150px; }
.auth-kicker { font-size: 12px; color: #000; margin-bottom: 20px; }
/* reset-password's strength meter + requirement checklist, same story. */
.pw-meter { height: 4px; border-radius: 2px; background: #ddd; margin-bottom: 8px; overflow: hidden; }
.pw-reqs { font-size: 12px; color: #888; margin-bottom: 16px; }
/* Break out of .app-shell for full-bleed auth backgrounds */
.app-shell:has(.auth-page) { max-width: none !important; border: none !important; margin: 0; }
/* Auth page inputs inherit the underline style from login */
.auth-card .input {
  background: transparent; border: none; border-bottom: 1px solid #000;
  border-radius: 0; padding: 12px 5px 8px; font-size: 16px; color: #000;
}
.auth-card .input:focus { border-color: var(--beak); border-bottom-width: 1.5px; }
.auth-card .input::placeholder { color: #B8B5AA; }
.auth-card .btn-primary {
  background: var(--beak); border: 1px solid #2D2B27; border-radius: 100px;
  color: #2D2B27; font-size: 18px; height: 49px; max-width: 348px;
}
.auth-card .btn-secondary { color: #2D2B27; }
.auth-card .btn-secondary:hover { color: #2D2B27; }
.auth-card a { color: #2D2B27; }
.auth-card a:hover { color: var(--beak); }
@media (max-width: 480px) {
  .auth-card { padding: 24px 22px; }
  .auth-card .btn-primary { font-size: 16px; height: 42px; }
}

/* ── Dark mode component overrides ───────────────────────────────── */
/* Placed AFTER all base rules so source-order wins at equal specificity.
   Applied in two modes: system (OS dark + user hasn't chosen light) and
   explicit `html.theme-dark`. Selector lists ensure each rule fires for
   either trigger without duplicating the whole block. */
/* Sidebar now follows the chrome-* tokens in :root and the dark-mode
   token block above, so it switches automatically with the OS theme —
   no more hardcoded #1A1A1A here. The .header-bar is intentionally
   left out of the chrome system; it stays dark in both modes (see
   the comment on the .header-bar rule for rationale). */
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .input { background: var(--card); color: var(--nest); border-color: var(--linen); }
  html:not(.theme-light) .header-bar { background: #1A1A1A; }
  html:not(.theme-light) .chip { color: var(--nest); }
  html:not(.theme-light) .filter-tab.active,
  html:not(.theme-light) .jump-pill.active { background: #E5DBC5; color: #121212; border-color: #E5DBC5; }
}
html.theme-dark .input { background: var(--card); color: var(--nest); border-color: var(--linen); }
html.theme-dark .header-bar { background: #1A1A1A; }
html.theme-dark .chip { color: var(--nest); }
html.theme-dark .filter-tab.active,
html.theme-dark .jump-pill.active { background: #E5DBC5; color: #121212; border-color: #E5DBC5; }

/* Active receiver pills (findings filter chips + TOC tabs) flip to dark ink
   on the cream surface in dark mode — var(--nest) becomes light, so the
   light-mode "white on dark" inverts and would otherwise be light-on-light.
   Mirrors the .filter-tab.active / .jump-pill.active treatment above. */
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .rr-chip[aria-pressed="true"],
  html:not(.theme-light) .rr-tab.active { background: #E5DBC5; color: #121212; border-color: #E5DBC5; }
  html:not(.theme-light) .rr-tab.active .rr-tab-count { background: rgba(18,18,18,0.16); color: #121212; }
}
html.theme-dark .rr-chip[aria-pressed="true"],
html.theme-dark .rr-tab.active { background: #E5DBC5; color: #121212; border-color: #E5DBC5; }
html.theme-dark .rr-tab.active .rr-tab-count { background: rgba(18,18,18,0.16); color: #121212; }

/* ═══════════════════════════════════════════════════════════════════════
   Report-receiver experience (rr-*)
   Shared chrome for the public magic-link report view and the signed-in
   portal report. Rendered by renderReceiverReport() in app.js. All colors
   are token-based so the surface follows light/dark; interactive chrome
   collapses cleanly under @media print at the bottom of this block.
   ═══════════════════════════════════════════════════════════════════════ */

/* Skip-to-content link — visible only on keyboard focus. */
.rr-skip {
  position: absolute; left: 8px; top: -48px; z-index: 200;
  background: var(--beak); color: var(--white); padding: 10px 16px;
  border-radius: 0 0 10px 10px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: top 0.15s;
}
.rr-skip:focus { top: 0; }

/* Company branding header — tenant logo + name above the report body.
   Rendered by rrBrandHeaderMarkup() only when the payload carries a
   validated logo data URI; absent for non-branded tenants. Kept visible
   under @media print — branding is part of the deliverable. */
.rr-brand {
  text-align: center; margin-bottom: 20px;
}
.rr-brand-logo {
  max-width: 180px; max-height: 64px; object-fit: contain;
}
.rr-brand-name {
  margin-top: 6px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.4px; color: var(--ink-2);
}

/* Reading progress — fixed hairline at the very top of the viewport that
   fills as the recipient scrolls through the report. */
.rr-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: rgba(180,95,52,0.12); z-index: 90; pointer-events: none;
}
.rr-progress-fill {
  height: 100%; width: 0; background: var(--beak);
  transition: width 0.1s linear; will-change: width;
}

/* At-a-glance summary — the first thing a recipient sees: what kind of
   report, how many findings by severity, total estimated cost. */
.rr-summary { margin-bottom: 16px; }
.rr-summary-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px;
}
.rr-stats {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}
.rr-stat {
  border: 1px solid var(--rule); border-radius: 0; padding: 12px 10px;
  background: transparent; text-align: left; cursor: default;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  display: flex; flex-direction: column; gap: 2px; min-height: 64px;
}
button.rr-stat { cursor: pointer; font-family: inherit; }
button.rr-stat:hover { border-color: var(--terra); }
button.rr-stat:active { transform: scale(0.98); }
button.rr-stat[aria-pressed="true"] {
  border-color: var(--beak); box-shadow: inset 0 0 0 1px var(--beak);
}
.rr-stat-value { font-size: 22px; font-weight: 600; color: var(--nest); line-height: 1.05; font-variant-numeric: tabular-nums; }
.rr-stat-label { font-size: 10.5px; font-weight: 500; color: var(--ink-2); letter-spacing: 0.2px; }
.rr-stat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Severity ink + accent helpers. Color is reinforced by the icon/label in
   markup, so it is never the only differentiator. */
.rr-ink-issue { color: var(--sev-issue); }
.rr-ink-safety { color: var(--sev-safety); }
.rr-ink-maintenance { color: var(--sev-maintenance); }
.rr-ink-recommend { color: var(--sev-recommend); }
.rr-ink-info { color: var(--sev-info); }

/* Sticky table-of-contents / report nav. Horizontally scrollable pill row;
   highlights the section currently in view (scroll-spy). */
.rr-nav {
  position: sticky; top: 0; z-index: 50; margin: 0 -20px 14px;
  padding: 10px 20px; background: var(--bg);   /* flat: no blur, so no translucency */
  border-bottom: 1px solid var(--linen);
}
.rr-nav-scroll {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rr-nav-scroll::-webkit-scrollbar { display: none; }
.rr-tab {
  flex-shrink: 0; white-space: nowrap; cursor: pointer;
  font-size: 12px; font-weight: 500; padding: 7px 13px; border-radius: 20px;
  border: 1.5px solid var(--linen); background: var(--card); color: var(--ink-2);
  transition: all 0.15s; text-decoration: none; min-height: 34px;
  display: inline-flex; align-items: center; gap: 6px;
}
.rr-tab:hover { border-color: var(--terra); color: var(--nest); }
.rr-tab.active { background: var(--nest); color: var(--white); border-color: var(--nest); }
.rr-tab-count {
  font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 0;
  background: rgba(180,95,52,0.14); color: var(--beak); min-width: 16px; text-align: center;
}
.rr-tab.active .rr-tab-count { background: rgba(255,255,255,0.22); color: var(--white); }

.rr-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.rr-linkbtn {
  background: none; border: none; padding: 4px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--beak); font-family: inherit;
}
/* .rr-linkbtn:hover — the running underline, see .bento-label__link */

/* Report block + collapsible section cards. */
.rr-report { margin-bottom: 22px; scroll-margin-top: 64px; }
.rr-report-head { margin-bottom: 10px; }
.rr-report-title { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: var(--lh-section); color: var(--nest); margin: 0; letter-spacing: 0; font-feature-settings: var(--font-display-features); }
.rr-report-sub { font-size: 12px; color: var(--ink-2); margin-top: 3px; }

.rr-section {
  border: 1px solid var(--rule); border-radius: 0; background: transparent;
  margin-bottom: 8px; overflow: hidden; scroll-margin-top: 64px;
}
/* Accordion header: the <h3> stays a real heading (screen-reader heading
   nav) and wraps a full-width <button> that is the actual control. */
.rr-sec-title { margin: 0; font-weight: 600; font-size: 15px; }
.rr-sec-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; background: none; border: none; cursor: pointer;
  text-align: left; font-family: inherit; color: var(--nest); min-height: 52px;
}
.rr-sec-name { flex: 1; font-weight: 600; font-size: 15px; color: var(--nest); }
.rr-sec-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.rr-sec-badge {
  font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px;
}
.rr-sec-badge.has-issue { color: var(--sev-issue); background: rgba(181,54,42,0.10); }
.rr-sec-chevron {
  width: 12px; height: 12px; color: var(--terra); flex-shrink: 0;
  transition: transform 0.2s ease;
}
.rr-section.open .rr-sec-chevron { transform: rotate(180deg); }
.rr-sec-body { padding: 0 16px 16px; }
.rr-section:not(.open) .rr-sec-body { display: none; }

/* Findings panel — aggregated, filterable list of every observation. */
.rr-findings { margin-bottom: 18px; }
.rr-finding {
  display: block; padding: 12px 14px; border-left: 3px solid var(--terra);
  background: var(--bg-soft); border-radius: 0 10px 10px 0; margin-top: 8px;
  text-decoration: none; color: inherit; transition: background 0.15s;
}
a.rr-finding:hover { background: rgba(195,168,138,0.16); }
.rr-finding-issue { border-left-color: var(--sev-issue); }
.rr-finding-safety { border-left-color: var(--sev-safety); }
.rr-finding-maintenance { border-left-color: var(--sev-maintenance); }
.rr-finding-recommend { border-left-color: var(--sev-recommend); }
.rr-finding-info { border-left-color: var(--sev-info); }
.rr-finding-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rr-finding-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 0; background: var(--bg-soft); flex-shrink: 0;
}
.rr-finding-title { font-size: 13.5px; font-weight: 600; color: var(--nest); }
.rr-finding-cost { font-size: 12px; font-weight: 600; color: var(--nest); margin-left: auto; white-space: nowrap; }
.rr-finding-loc { font-size: 11px; color: var(--ink-2); margin-top: 3px; }
.rr-finding-desc { font-size: 12.5px; line-height: 1.5; color: var(--nest); margin-top: 5px; white-space: pre-wrap; }
.rr-readmore { background: none; border: none; padding: 2px 0; margin-top: 4px; cursor: pointer; color: var(--beak); font-size: 11.5px; font-weight: 600; font-family: inherit; }
/* .rr-readmore:hover — the running underline, see .bento-label__link */
.rr-empty { padding: 18px; text-align: center; color: var(--ink-2); font-size: 12.5px; }

/* Filter chips for the findings panel. */
.rr-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.rr-chip {
  font-size: 12px; font-weight: 500; padding: 6px 13px; border-radius: 20px;
  border: 1.5px solid var(--linen); background: transparent; color: var(--ink-2);
  cursor: pointer; transition: all 0.15s; font-family: inherit;
  min-height: 34px; display: inline-flex; align-items: center; gap: 6px;
}
.rr-chip:hover { border-color: var(--terra); color: var(--nest); }
.rr-chip[aria-pressed="true"] { background: var(--nest); color: var(--white); border-color: var(--nest); }
.rr-chip-n { font-size: 10.5px; font-weight: 700; opacity: 0.85; }

/* View toggle: Full report ⇄ Issues & photos. Active segment uses --beak
   (brand orange, theme-stable) so it needs no dark-mode override — white on
   --beak clears AA in both modes. */
.rr-vtoggle {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px;
  border: 1px solid var(--linen); border-radius: 24px; background: var(--card);
}
.rr-vtoggle-btn {
  border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 8px 16px; border-radius: 20px; min-height: 38px; transition: all 0.15s;
}
.rr-vtoggle-btn:hover { color: var(--nest); }
.rr-vtoggle-btn.active { background: var(--beak); color: var(--white); }

/* Issues-summary area groups. */
.rr-sum-group { margin-bottom: 18px; }
.rr-sum-report { font-size: 11px; font-weight: 500; color: var(--ink-2); }
.rr-sum-photos { margin-top: 10px; }
.rr-sum-photos-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  text-transform: uppercase; color: var(--ink-2); margin-bottom: 2px;
}
.rr-sum-issue { margin-top: 8px; }
/* This issue's own photos sit directly under its card — slightly smaller
   tiles than the area grid so they read as evidence for the finding above. */
.rr-issue-media { margin-top: 6px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
@media (max-width: 380px) { .rr-issue-media { grid-template-columns: repeat(2, 1fr); } }

/* Responsive media grid — wraps the existing mediaThumbMarkup() tiles. The
   tiles keep their own inline styling; the grid just lays them out and the
   JS enhancement pass tags each photo for the lightbox. */
.rr-media-grid {
  display: grid; gap: 10px; margin-top: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
@media (max-width: 380px) { .rr-media-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
.rr-media-grid a[data-rr-zoom] { cursor: zoom-in; }

/* Lightbox — full-screen photo review with prev/next + caption + counter. */
.rr-lightbox {
  position: fixed; inset: 0; z-index: 1000; display: none;
  background: rgba(8,8,8,0.92); flex-direction: column;
}
.rr-lightbox.show { display: flex; }
.rr-lb-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px; color: #fff; gap: 12px;
}
.rr-lb-counter { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85); }
.rr-lb-close, .rr-lb-arrow {
  background: rgba(255,255,255,0.12); border: none; color: #fff; cursor: pointer;
  border-radius: 999px; width: 44px; height: 44px; font-size: 22px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.15s;
}
.rr-lb-close:hover, .rr-lb-arrow:hover { background: rgba(255,255,255,0.24); }
.rr-lb-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 8px; }
.rr-lb-img { max-width: 94vw; max-height: 76vh; object-fit: contain; border-radius: 0; }
.rr-lb-arrow.prev, .rr-lb-arrow.next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; font-size: 26px; background: rgba(255,255,255,0.14);
}
.rr-lb-arrow.prev { left: 10px; } .rr-lb-arrow.next { right: 10px; }
.rr-lb-cap {
  color: rgba(255,255,255,0.9); font-size: 13px; line-height: 1.5; text-align: center;
  padding: 12px 20px max(16px, env(safe-area-inset-bottom)); max-width: 720px;
  margin: 0 auto; flex-shrink: 0;
}
.rr-lb-cap strong { color: #fff; font-weight: 600; }
@media (max-width: 540px) {
  .rr-lb-img { max-height: 70vh; }
  .rr-lb-arrow.prev, .rr-lb-arrow.next { width: 40px; height: 40px; font-size: 22px; }
}

/* Portal-list search/filter affordances. */
.rr-search {
  width: 100%; font-size: 16px; color: var(--nest); background: transparent;
  border: 1px solid var(--rule); border-radius: 0; padding: 12px 14px; margin-bottom: 12px;
}
.rr-search:focus { border-color: var(--beak); }
.rr-search::placeholder { color: var(--ink-3); }
.rr-edited-flag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600;
  color: var(--sev-maintenance); background: rgba(198,123,37,0.12); padding: 2px 8px; border-radius: 0;
}

/* ── Repair-request builder (per-company opt-in; buyers/agents pick findings
   and generate a printable addendum) ── */
.rr-pick { display: inline-flex; align-items: center; flex-shrink: 0; cursor: pointer; }
.rr-pick input { width: 17px; height: 17px; cursor: pointer; accent-color: var(--beak); margin: 0; }
.rr-buildbar {
  position: sticky; bottom: 8px; z-index: 5; margin-top: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-radius: 0; background: var(--nest); color: var(--white);
}
.rr-buildbar .rr-tab { background: var(--beak); color: var(--white); border-color: var(--beak); }
.rr-build-form {
  margin: 14px 0; padding: 16px; border-radius: 0;
  background: var(--bg-soft); border: 1.5px solid var(--linen);
}
.rr-build-fields { display: flex; gap: 12px; flex-wrap: wrap; }
.rr-build-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 160px; }
.rr-build-field > span { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.rr-build-field input, .rr-build-field select, .rr-build-field textarea {
  font-family: inherit; font-size: 13px; padding: 8px 10px; border-radius: 0;
  border: 1.5px solid var(--linen); background: var(--white); color: var(--nest); min-height: 36px;
}
.rr-build-items { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.rr-build-item {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 8px 10px; border-radius: 0; background: var(--white); border: 1px solid var(--rule);
}
.rr-build-item-title { font-size: 13px; font-weight: 500; color: var(--nest); }
.rr-build-action { font-family: inherit; font-size: 12.5px; padding: 5px 8px; border-radius: 0; border: 1.5px solid var(--linen); background: var(--bg-soft); color: var(--nest); flex-shrink: 0; }
.rr-build-actions { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 12px; }
.rr-build-msg { margin-top: 8px; font-size: 12.5px; color: var(--nest); text-align: right; }

/* ── Homeowner Home Manual (per-company opt-in): appliance/system inventory ── */
.rr-homemanual { margin: 20px 0; }
.rr-hm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rr-hm-card { background: var(--bg-soft); border: 1px solid var(--rule); border-radius: 0; padding: 12px 14px; }
.rr-hm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rr-hm-label { font-size: 14px; font-weight: 600; color: var(--nest); }
.rr-hm-facts { display: flex; flex-direction: column; gap: 3px; }
.rr-hm-fact { font-size: 12.5px; color: var(--nest); }
.rr-hm-fact b { font-weight: 600; color: var(--ink-2); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; margin-right: 6px; }
.rr-hm-life { margin-top: 7px; font-size: 12px; color: var(--ink-2); }
.rr-hm-past { color: var(--sev-maintenance); font-weight: 500; }
.rr-hm-recall { margin-top: 8px; font-size: 12.5px; padding: 7px 9px; border-radius: 0; line-height: 1.4; }
.rr-hm-recall a { text-decoration: underline; white-space: nowrap; }
.rr-hm-recall-confirmed { background: rgba(208,59,59,.12); color: var(--critical, #d03b3b); }
.rr-hm-recall-possible { background: rgba(250,178,25,.16); color: var(--sev-maintenance); }

/* ── Print: a clean, ink-friendly report (recipients print for insurance/tax) ── */
@media print {
  .rr-progress, .rr-nav, .rr-skip, .rr-chips, .rr-toolbar, .rr-vtoggle,
  .rr-pick, .rr-buildbar, .rr-build-form,
  .rr-lightbox, #portal-cta, #support-banner, .btn-primary, .btn-secondary { display: none !important; }
  .rr-section, .rr-report { break-inside: avoid; }
  .rr-section:not(.open) .rr-sec-body { display: block !important; }
  .rr-sec-chevron { display: none; }
  .rr-media-grid { grid-template-columns: repeat(2, 1fr); }
  .rr-media-grid > * { break-inside: avoid; }
  .rr-media-grid img { max-height: 320px; }
  .rr-finding, .rr-stat, .rr-section { background: #fff !important; }
  body, .page-light { background: #fff !important; }
  .rr-finding-desc { display: block !important; }
  a[href]::after { content: ''; } /* don't append raw URLs */
}

/* ── Pill buttons: Roobert Regular, ALL CAPS, 45 tracking ─────────────
   Every button-shaped pill (primary/secondary actions, filter tabs,
   chips you press, review tabs). Status pills and badges that are not
   pressable keep sentence case — caps-and-tracking on 11px labels reads
   as noise. The chat's answer chips (.answer-chip) keep sentence case
   too: their words are the inspector's answers, as on the phone's flat
   chip (chat_tab.dart _buildFlatChip, 2026-10-07). Last in the file so
   it wins the cascade. */
.btn-primary, .btn-secondary, .btn-outline, .dash-new,
.filter-tab, .chip, .jump-pill,
.rr-tab, .rr-chip, .rr-vtoggle-btn, .report-type-tab,
.zp .zp-btn, .zp .zp-pill, .zp .zp-tab {
  font-family: var(--font-body); font-weight: 400;
  text-transform: uppercase; letter-spacing: var(--track-caps);
}
.filter-tab.active, .rr-tab.active, .chip.active, .rr-vtoggle-btn.active, .tab-btn.active { font-weight: 400; }
.btn-primary { font-size: 15px; }

/* ── Beak-filled pills: Nest on hover / press ─────────────────────────
   Every Beak button already sets white text, which stays white. Nest is
   --nest-fill (#2D2B27 in both themes), not --nest: in dark mode --nest
   flips to cream and white-on-cream would vanish. Disabled buttons keep
   Beak. */
.btn-primary:not(:disabled):hover, .btn-primary:not(:disabled):active,
.dash-new:hover, .dash-new:active,
.rr-vtoggle-btn.active:hover, .rr-vtoggle-btn.active:active,
.rr-buildbar .rr-tab:hover, .rr-buildbar .rr-tab:active,
.circle-btn.beak:not(:disabled):hover, .circle-btn.beak:not(:disabled):active,
.auth-skin-brand .btn-primary:not(:disabled):hover, .login-skin-brand .login-button:hover {
  background: var(--nest-fill); border-color: var(--nest-fill); color: var(--white);
}
/* …and the Beak → Nest change eases in rather than snapping. */
.btn-primary, .dash-new, .rr-vtoggle-btn.active,
.rr-buildbar .rr-tab, .circle-btn.beak, .auth-skin-brand .btn-primary, .login-skin-brand .login-button {
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.15s ease;
}

/* ── Dashboard fills the viewport ─────────────────────────────────────
   The grid takes the remaining height and the last row (Recent
   inspections) stretches to the bottom gutter, so the bottom margin
   matches the sides instead of leaving a void under the tiles. */
.dash-page { display: flex; flex-direction: column; }
.dash-page .page-container { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.dash-page .bento { flex: 1; min-height: 0; }
@media (min-width: 1024px) {
  .dash-page .bento { grid-template-rows: auto auto auto minmax(0, 1fr); }
}
/* The stretched Recent tile: cards start at the top; an empty message
   sits in the middle of the space instead of hugging the label. */
.bento-tile--list #list { flex: 1; align-content: start; }
.bento-tile--list #list:has(> .text-center:only-child) { align-content: center; }
.bento-tile--list #list > .text-center { margin-top: 0 !important; }

/* ── Document sheet (New inspection) ─────────────────────────────────
   The Perky Bros document templates, on screen: a cream sheet with the
   Erotique title top-left and the stork top-right; sections are Roobert
   caps over a hairline; fields are ruled lines, not boxes; summaries are
   hairline-topped blocks, never bordered cards. Scoped to .doc-form so
   the script's ids and helper classes keep working untouched. */
.doc-page { max-width: 920px; }
.doc-sheet {
  background: #FFFFFF; border: 1px solid var(--rule); border-radius: 0;   /* the document itself: a white sheet of paper on the Down ground (2026-09-25) */
  padding: 40px 48px 44px;
}
@media (prefers-color-scheme: dark) { html:not(.theme-light) .doc-sheet { background: var(--card); } }
html.theme-dark .doc-sheet { background: var(--card); }
@media (max-width: 767px) { .doc-sheet { padding: 24px 18px 28px; } }
.doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 8px; }
.doc-title {
  font-family: var(--font-display); font-weight: 400; margin: 0;
  font-size: clamp(32px, 4vw, 44px); line-height: var(--lh-headline); letter-spacing: 0;
  color: var(--nest); font-feature-settings: var(--font-display-features);
}
.doc-mark { width: 64px; flex: none; color: var(--nest); margin-top: 4px; }
.doc-back { margin-bottom: 18px; }

/* Section headings: the template's caps heading with a rule beneath. */
.doc-form .t-label {
  font-size: 15px; font-weight: 400; letter-spacing: var(--track-caps); text-transform: uppercase;
  color: var(--nest); margin: 30px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--nest);
}
.doc-form .doc-head + .t-label, .doc-form .doc-head + .t-label + * { margin-top: 12px; }
.doc-form .t-tiny { color: var(--ink-2); font-size: 12px; line-height: 1.4; }

/* Ruled fields: hairline beneath, no box; the placeholder plays the
   template's small caps label until something is typed. */
.doc-form .input,
.doc-form select.input,
.doc-form textarea.input {
  background: transparent; border: none; border-radius: 0;
  border-bottom: 1px solid rgba(45,43,39,0.28);
  padding: 10px 0 9px; font-size: 16px; color: var(--nest);
  transition: border-color 0.2s;
}
.doc-form .input:focus { border-bottom-color: var(--beak); }
.doc-form .input::placeholder {
  color: var(--ink-3); font-size: 12px; letter-spacing: var(--track-caps); text-transform: uppercase;
}
.doc-form select.input { padding-right: 24px; }
.doc-form .input[type="date"], .doc-form .input[type="time"] { font-size: 14px; }

/* Summary blocks and the price line. */
.doc-form .card {
  background: transparent; border: none; border-radius: 0;
  border-top: 1px solid var(--linen); padding: 14px 0 4px;
}
.doc-form #price {
  font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1;
  color: var(--nest); font-variant-numeric: tabular-nums; width: 120px;
}
.doc-form .doc-actions { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--nest); display: flex; justify-content: flex-end; }
/* The price is a field of the form: its figure sits on the closing rule
   the way a value sits on its underline, and the actions follow below
   (2026-09-27). */
.doc-form .card:has(> #price) { margin-bottom: 0 !important; padding-bottom: 10px; border-bottom: 1px solid var(--nest); }
.doc-form .card:has(> #price) + .doc-actions { margin-top: 0; border-top: none; }
.doc-form .doc-actions .btn-primary { width: auto; padding: 13px 28px; }
.doc-form .btn-secondary { border-radius: 999px; }
/* Ruled fields signal focus with the rule turning Beak — no outline box. */
.doc-form .input:focus-visible, .doc-form .input:focus,
.dash-search input:focus-visible, .dash-search input:focus { outline: none; box-shadow: none; }

/* ── Brand date / time pickers (js/zoozah-picker.js) ─────────────────
   A cream sheet with a hairline, no shadow. Erotique carries the month
   and the time readout; labels are Roobert caps; the selection is a
   Beak disc with white text. The trigger is a ruled field like the rest
   of the document form. */
.z-icon-clock { -webkit-mask-image: url('/assets/icons/svg/clock-icon.svg'); mask-image: url('/assets/icons/svg/clock-icon.svg'); }
.zpick-wrap { position: relative; min-width: 0; }
.zpick-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--nest);
}
.zpick-trigger.is-empty .zpick-trigger__text {
  color: var(--ink-3); font-size: 12px; letter-spacing: var(--track-caps); text-transform: uppercase;
}
.zpick-trigger__icon { width: 16px; height: 16px; flex: none; color: var(--terra); }
.zpick-trigger[aria-expanded="true"] { border-bottom-color: var(--beak); }
.zpick {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  width: 320px; max-width: calc(100vw - 32px); padding: 18px 18px 12px;
  background: var(--bg); border: 1px solid var(--rule); border-radius: 0;   /* the popover floats over the page: it keeps its rule */
}
.zpick__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.zpick__title {
  font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.1;
  color: var(--nest); letter-spacing: 0; font-feature-settings: var(--font-display-features);
}
.zpick__nav {
  width: 36px; height: 36px; border-radius: 999px; border: none; background: transparent;
  color: var(--nest); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.zpick__nav .z-icon { width: 14px; height: 14px; }
.zpick__nav:hover { background: var(--bg-soft); color: var(--beak); }
.zpick__dow {
  display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px;
  font-size: 11px; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-2); text-align: center;
}
.zpick__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.zpick__day {
  height: 38px; border-radius: 999px; border: 1px solid transparent; background: transparent;
  font: inherit; font-size: 14px; color: var(--nest); cursor: pointer;
  font-variant-numeric: tabular-nums; transition: background 0.15s, color 0.15s;
}
.zpick__day.is-out { color: var(--ink-3); opacity: 0.55; }
.zpick__day.is-today { border-color: rgba(45,43,39,0.28); }
.zpick__day:hover { background: var(--bg-soft); }
.zpick__day.is-selected { background: var(--beak); color: #FFFFFF; border-color: var(--beak); }
.zpick__foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--linen); }
.zpick__link {
  border: none; background: transparent; cursor: pointer; padding: 6px 0; font: inherit;
  font-size: 12px; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-2);
}
/* "Done" and a link under the pointer are ink, never Beak words (fix pass 2). */
.zpick__link:hover, .zpick__link--done { color: var(--nest); }
/* time */
.zpick--time { width: 340px; }
.zpick__readout { font-size: 30px; margin-bottom: 12px; }
.zpick__cols { display: grid; grid-template-columns: 3fr 4fr 1fr; gap: 12px; }
.zpick__label { font-size: 11px; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; min-height: 14px; }
.zpick__opts { display: grid; gap: 4px; }
.zpick__opts--hours { grid-template-columns: repeat(3, 1fr); }
.zpick__opts--mins { grid-template-columns: repeat(4, 1fr); }
.zpick__opt {
  height: 32px; border-radius: 999px; border: 1px solid transparent; background: transparent;
  font: inherit; font-size: 13px; color: var(--nest); cursor: pointer; font-variant-numeric: tabular-nums;
  transition: background 0.15s, color 0.15s;
}
.zpick__opt:hover { background: var(--bg-soft); }
.zpick__opt.is-selected { background: var(--beak); color: #FFFFFF; }
.zpick__opt--ampm { font-size: 12px; letter-spacing: var(--track-caps); }

/* ── Compact inspection rows (dashboard Recent tile) ──────────────────
   A ruled list: the whole row is the link; rows alternate the page
   ground and Down so the eye tracks across without gridlines. */
#list.il-rows { display: block; gap: 0; margin: 0 -24px -24px; background: transparent; }
.il-row {
  display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto auto;
  align-items: center; gap: 16px; padding: 12px 20px; min-height: 56px;
  color: inherit; text-decoration: none; transition: background 0.15s;
}
.il-row:nth-child(odd) { background: var(--bg); }
.il-row:nth-child(even) { background: var(--stripe); }
.il-row { border-radius: 0; }   /* rows butt straight into the tile */
/* The row's action stays Nest on hover (its words never wear Beak; the
   phone's planner row action is Nest too — fix pass 2). The title stays
   ink too: a 1px underline shows the hover (fix pass 2 S4). */
.il-row:hover .il-row__title { color: var(--nest); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.il-row__main { min-width: 0; }
.il-row__title { font-size: 14px; font-weight: 500; color: var(--nest); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.il-row__sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.il-row__types { display: flex; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.il-row__type { font-size: 11px; letter-spacing: var(--track-caps); text-transform: uppercase; white-space: nowrap; }
.il-row__progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 0; }
.il-row__bar { flex: 1; height: 3px; background: var(--down); border-radius: 999px; overflow: hidden; min-width: 40px; }   /* a theme token, so the track survives dark mode */
.il-row__bar > span { display: block; height: 100%; background: var(--beak); border-radius: 999px; }
.il-row__status .pill { text-transform: capitalize; }
.il-row__action { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--nest); white-space: nowrap; }
.il-row__action .z-icon { width: 12px; height: 12px; }
@media (max-width: 767px) {
  .il-row { grid-template-columns: minmax(0, 1fr) auto; }
  .il-row__types, .il-row__progress, .il-row__status { display: none; }
}


/* ── Ruled grid layout (zoozah.com about-us, 2026-09-25) ───────────────
   The page is a sheet ruled into cells: lines are 1px Nest, corners are
   square, and the lines run to the edges — into the rail's rule on the
   left and off the viewport on the right — instead of floating as
   rounded cards. Cells sit on the page ground; a filled cell (the hero
   on Linen) is a colour block inside the grid, not a card on top of it. */
@media (min-width: 768px) { :root { --page-px: 32px; } }
@media (min-width: 1200px) { :root { --page-px: 28px; } }

/* Dashboard: the header is inset 24px like a cell's content; the grid
   cancels the page gutter and bleeds to both edges — its left line is the
   rail's rule, its right line falls off the viewport. */
.dash-page .page-container { padding-left: 0; padding-right: 0; }
.dash-page .dash-head { padding: 0 24px; }
.dash-page .bento { margin-top: 20px; border-left: none; }
.dash-page .bento + .bento { margin-top: 0; }
@media (max-width: 1023px) { .dash-search { width: 100%; } }
/* A facilities page section (the Portfolio page's Regions, Budgets, Spend,
   Unfiled, Board summary): a head band, then its content as a band — a
   panel loses its top and side lines (the head's rule is above it, the
   rail's beside it), and content that drew no line of its own gets the one
   rule beneath, so the next section's head always has a line above it
   (2026-09-27). A card grid already closes itself. Top-level sections only,
   so a panel that nests its own sub-head is left alone. */
.cf-page .page-container > section > .cf-section-head + .cf-panel { border: none; border-bottom: 1px solid var(--rule); margin-top: 0; }
/* A grid that rules its own cells (stat tiles, the two-up and three-up
   analytics grids) already closes on its cells' bottom lines. */
.cf-page .page-container > section > .cf-section-head + div:not(.cf-panel):not(.cf-grid):not(.bento):not(.cfa-cols):not(.cfa-exports) { border-bottom: 1px solid var(--rule); }
@media (max-width: 767px) {
  .cf-page .page-container > section > .cf-section-head + .cf-panel { border-left: 1px solid var(--rule); }   /* no rail to supply the left line */
}
/* Facilities analytics on one sheet (2026-09-27): every section is a head
   band, then content that starts right on the head's rule and closes with
   one rule of its own — no Linen divider between sections (its base rule is
   pinned by the analytics contract, so it is overridden here), no 16px gaps
   that put a second line under the first, and the two-up and three-up
   grids draw only their cells' right and bottom lines. */
.cfa-page .cfa-section { border-top: none; padding-top: 0; }
/* The Region or group filter sits between the tool nav and the first
   section: a band of the sheet, inset like a cell, closed by one rule. */
.cfa-page .page-container > .cfa-region { margin: 0 !important; padding: 16px 24px 20px; border-bottom: 1px solid var(--rule); }
@media (max-width: 639px) { .cfa-page .page-container > .cfa-region { padding: 14px 16px 18px; } }
.cfa-page .page-container > section > .cfa-cols,
.cfa-page .page-container > section > .cfa-exports { margin-top: 0 !important; border-top: none; }
.cfa-page .page-container > section > .cfa-ratio,
.cfa-page .page-container > section > [data-cfa-fci-list] { margin-top: 0 !important; padding-top: 18px; }
.cfa-page .page-container > section > .cfa-trend { padding: 18px 24px; }
.cfa-page .page-container > section > :last-child:not(.cfa-cols):not(.cfa-exports):not(.bento) { border-bottom: 1px solid var(--rule); }
@media (max-width: 639px) { .cfa-page .page-container > section > .cfa-trend { padding: 16px; } }
/* A thread mounted inside a facilities panel (the facility thread on the
   overview): the panel's own rules frame it, so the thread's hairline and
   the gap above the grid would only draw a second line (2026-09-27). */
.cf-page .cf-panel .th-panel { border-top: none; padding-top: 0; }
.cf-page [data-cf-panel] > .cf-overview { margin-top: 0 !important; }
/* Facilities pages (facilities.css owns the .cf- rules): the sections are
   bands of one sheet, so the utility margins between them are cancelled,
   panels placed straight on the page become full-width bands, and the
   error banner is inset like a cell. */
.cf-page .page-container > section, .cf-page .page-container > .cf-overview { margin-top: 0 !important; }
.cf-page .page-container > .cf-panel { border-left: none; border-right: none; border-top: none; }
.cf-page .page-container > .banner { margin: 16px 24px 0; }
.cf-page .page-container > .cf-small { padding: 0 24px; }

/* Hybrid: structure is ruled, items are cards. A content grid is a list
   of items, so its cards keep their gutters and sit on the lighter cream
   surface with a soft hairline — square, so they belong to the sheet. */
.content-grid > * { min-width: 0; }
.content-grid > .card { background: var(--card); border: 1px solid var(--rule-soft); border-radius: 0; transition: border-color 0.4s ease; }
.content-grid > .card:hover { border-color: var(--nest); }
/* The compact ruled list alternates row colour instead. */
#list.il-rows { border: none; }
#list.il-rows > .il-row { border: none; }

/* Ruled panel: a bordered region of the sheet (the inspections page's
   filters + list). The filter band and the pagination band are ruled;
   the cards between them keep their gutters. */
.ruled-panel { border: 1px solid var(--rule); margin-top: 20px; }
.ruled-panel > .filter-tabs { margin: 0 !important; padding: 14px 24px; border-bottom: 1px solid var(--rule); }
.ruled-panel .content-grid { padding: 20px 24px; }
.ruled-panel .content-grid > .text-center { padding: 20px 0; }
.ruled-panel #pagination { padding: 14px 24px; margin-top: 0 !important; border-top: 1px solid var(--rule); }
.ruled-panel #pagination:empty { display: none; }
@media (max-width: 639px) { .ruled-panel .content-grid { padding: 12px; } .ruled-panel > .filter-tabs, .ruled-panel #pagination { padding: 12px; } }

/* Banners, section cards and the account menu are ruled blocks too. */
.banner { border: 1px solid var(--rule); border-left-width: 3px; }
.sidebar-menu a:hover, .sidebar-menu a:focus-visible { background: var(--stripe); }
.sidebar-links a { margin: 2px 0; }
.mobile-more-panel { background: var(--bg); }

/* Section headings follow zoozah.com: Roobert caps, larger, in Nest. */
.dash-page .cf-label, .page-light .cf-section-head .cf-label { font-size: 15px; font-weight: 400; letter-spacing: 0.06em; color: var(--nest); }

/* Phones have no rail to supply the grid's left line, so the full-bleed
   grids close their own left edge there and read as a framed sheet. */
@media (max-width: 767px) {
  .dash-page .bento, .cf-page .cf-overview, .cf-page .cf-grid { border-left: 1px solid var(--rule); }
}

/* ── Ruled sheet primitives (2026-09-25) ──────────────────────────────
   The vocabulary every content page is built from: a sheet of bands and
   cells on Nest rules, edge to edge on a .dash-page (the rail's rule is
   the left line, the right runs off the viewport). Figures sit in the
   display face; headings are the site's Roobert caps in Nest. */
.sheet { margin-top: 20px; border-top: 1px solid var(--rule); }
.sheet-band { padding: 22px 24px 24px; border-bottom: 1px solid var(--rule); }
.sheet-filters { padding: 14px 24px; border-bottom: 1px solid var(--rule); margin: 0 !important; }
.sheet-heading { font-size: 15px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nest); margin: 0 0 14px; }
.sheet-heading--row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sheet-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sheet-stats--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sheet-stat { padding: 22px 24px 24px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 0; }
.sheet-stat .label { font-size: 15px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nest); }
.sheet-stat .value {
  font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1; margin-top: 12px;
  color: var(--nest); font-variant-numeric: tabular-nums; font-feature-settings: var(--font-display-features); overflow-wrap: anywhere;
}
.sheet-stat .value--text { font-family: var(--font-body); font-size: 18px; margin-top: 16px; }
.sheet-stat .sub { font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.sheet-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.sheet-cols > * { padding: 22px 24px 24px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 0; }
/* Key/value rows inside a cell, ruled by soft inner lines. */
.sheet-kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 13px; border-top: 1px solid var(--rule-soft); }
.sheet-kv:first-child { border-top: none; padding-top: 0; }
.sheet-kv > span:first-child { color: var(--nest); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-kv > span:last-child { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sheet-empty { font-size: 13px; color: var(--ink-2); }
@media (max-width: 1023px) {
  .sheet-stats, .sheet-stats--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .sheet { border-left: 1px solid var(--rule); }   /* no rail to supply the left line */
  .sheet-band, .sheet-stat, .sheet-cols > * { padding: 18px 16px 20px; }
  .sheet-filters { padding: 12px 16px; }
  .sheet-cols { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .sheet-stats, .sheet-stats--5 { grid-template-columns: 1fr; }
}

/* ── Admin kit pages on the ruled sheet (2026-09-27) ─────────────────
   Integrations, API keys, Roles, Audit, Standards, Warehouse and
   Contractors (admin-kit.css owns the .ak- rules; its contract pins
   them, so the sheet lives here, scoped to .ak-page). One weight of
   line: every structural rule is 1px Nest, every inner divider 1px soft
   Nest, and no two rules ever sit side by side. Panels are bands: a rule
   above and below, pulled up 1px so a band's top rule lands exactly on
   the rule before it (the tab strip's, or the band above) instead of
   drawing a second line 16px under it; no side rules, so nothing doubles
   against the rail's. */
.ak-page .ak-tabs { margin: 20px 0 0; padding: 0 24px; gap: 0 26px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ak-page .ak-tab { font-size: 13px; font-weight: 400; padding: 14px 0 12px; }
.ak-page .ak-panel {
  border: none; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  margin-top: -1px; padding: 24px 24px 26px; background: transparent;
}
.ak-page .dash-head + .ak-panel, .ak-page .dash-head ~ .banner + .ak-panel { margin-top: 20px; }
.ak-page .ak-panel--soft { background: var(--stripe); }
.ak-page .ak-reveal { box-shadow: inset 3px 0 0 var(--beak); }
.ak-page .ak-panel__head { margin-bottom: 16px; }
/* Two columns of the sheet: cells side by side on one Nest rule. */
.ak-page .ak-split { gap: 0; margin-top: -1px !important; align-items: stretch; }
.ak-page .ak-split > .ak-panel { margin-top: 0; }
.ak-page .ak-split > .ak-panel + .ak-panel { border-left: 1px solid var(--rule); }
/* Loose blocks between bands are inset like a cell's content. */
.ak-page .ak-intro { padding: 18px 24px 20px; margin: 0 !important; }
.ak-page .banner { margin: 16px 24px !important; }
/* Inner lines: one soft weight for field rules, row and grant dividers,
   diff rows, matrix cells and chips. Focus still turns a field Beak. */
.ak-page .ak-field input, .ak-page .ak-field select, .ak-page .ak-field textarea { border-bottom-color: var(--rule-soft); }
.ak-page .ak-field input:focus, .ak-page .ak-field select:focus, .ak-page .ak-field textarea:focus { border-bottom-color: var(--beak); }
.ak-page .ak-row, .ak-page .ak-connector__grant, .ak-page .ak-diff, .ak-page .ak-diff__row,
.ak-page .ak-matrix th, .ak-page .ak-matrix td { border-color: var(--rule-soft); }
.ak-page .ak-chip { border-color: var(--rule-soft); }
.ak-page .ak-chip--accent { border-color: var(--beak); }
/* A select's chevron is placed from the foot of its field; a neighbour's
   help line stretches the grid row, so selects sit at the row's top and
   the chevron stays on the select's own rule. */
.ak-page .ak-form > .ak-select { align-self: start; }
@media (max-width: 767px) {
  .ak-page .ak-panel, .ak-page .ak-tabs { border-left: 1px solid var(--rule); }   /* no rail to supply the left line */
  .ak-page .ak-panel { padding: 20px 16px 22px; }
  .ak-page .ak-tabs { padding: 0 16px; }
  .ak-page .ak-split > .ak-panel + .ak-panel { border-left: 1px solid var(--rule); }
  .ak-page .ak-intro { padding: 16px; }
  .ak-page .banner { margin: 16px !important; }
}

/* ── Slide-out motion (2026-09-27) ────────────────────────────────────
   Every slide-out opens by travelling in from the edge it belongs to:
   the right-hand drawers (Assistant, Thread, facility facts, work order,
   the analytics "Why", the landscaping Operations drawers) glide in from the right edge, and the phone's
   full-screen More menu fades in over the page as the phone's does (a
   1.5% drift down, 320ms in on the same curve, 220ms out on an ease-in —
   app/lib/screens/dashboard_screen.dart _openMoreSheet). One curve for all of it — a long,
   soft ease-out that starts decisively and settles slowly — at a pace
   that reads as deliberate, never snappy. The scrims fade in beneath.
   These are entrance animations: they run each time a panel goes from
   hidden to shown (or is inserted), so no script changes. The global
   prefers-reduced-motion rule above flattens them for anyone who asks. */
:root {
  --slide-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --slide-in: 0.62s;
  --slide-fade: 0.45s;
  /* Exits leave on a gentle ease-in — they drift, then accelerate away —
     a touch quicker than the entrance, as things leaving should be. */
  --slide-exit-ease: cubic-bezier(0.55, 0, 0.8, 0.25);
  --slide-out: 0.48s;
}
@keyframes zSlideFromRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes zMenuIn { from { opacity: 0; transform: translateY(-1.5%); } to { opacity: 1; transform: none; } }
@keyframes zScrimIn { from { opacity: 0; } }

/* (The two rail pop-ups — the account menu and the notifications panel —
   are pop-ups, not slide-outs: see "Pop-up motion" below.) */
.za-panel, .th-sheet__panel, .cf-sheet__panel, .cfx-panel, .lo-drawer__panel {
  animation: zSlideFromRight var(--slide-in) var(--slide-ease) both;
  will-change: transform;
}
.za-scrim, .th-sheet__scrim, .cf-sheet__scrim, .cfx-backdrop, .lo-drawer__scrim {
  animation: zScrimIn var(--slide-fade) ease-out both;
}
.mobile-more-overlay.show { animation: zMenuIn 0.32s var(--slide-ease) both; }
/* Exits (public/js/app.js zoozahSlideClose puts .is-closing on the
   element, waits for the exit, then hides it): each goes back the way it
   came. */
@keyframes zSlideToRight { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes zMenuOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-1.5%); } }
@keyframes zScrimOut { to { opacity: 0; } }

.za-drawer.is-closing .za-panel, .th-sheet.is-closing .th-sheet__panel,
.cf-sheet.is-closing .cf-sheet__panel, .cfx-panel.is-closing, .lo-drawer.is-closing .lo-drawer__panel {
  animation: zSlideToRight var(--slide-out) var(--slide-exit-ease) both;
}
.za-drawer.is-closing .za-scrim, .th-sheet.is-closing .th-sheet__scrim,
.cf-sheet.is-closing .cf-sheet__scrim, .cfx-backdrop.is-closing, .lo-drawer.is-closing .lo-drawer__scrim {
  animation: zScrimOut var(--slide-out) ease-in both;
}
.mobile-more-overlay.is-closing { animation: zMenuOut 0.22s ease-in both; }
/* A closing panel takes no clicks, so a stray tap mid-exit lands on the page. */
.is-closing, .is-closing * { pointer-events: none; }
/* ── Pop-up motion (2026-09-27) ───────────────────────────────────────
   A pop-up belongs to the button that summoned it, so it grows out of
   that button and shrinks back into it — it never travels in from an
   edge. It blooms from a point beside its icon (the bell's height for
   notifications, the profile icon's for the account menu): a quick fade,
   a gentle scale up past full size that settles back, and a whisper of
   blur that clears as it lands. It closes faster than it opens, drawing
   back toward the icon. Short and springy, where the drawers are long
   and gliding. */
:root {
  --pop-in: 0.38s;
  --pop-out: 0.22s;
  --pop-spring: cubic-bezier(0.34, 1.32, 0.64, 1);   /* a small overshoot, then settles */
  --pop-exit-ease: cubic-bezier(0.4, 0, 1, 1);
}
@keyframes zPopIn {
  from { opacity: 0; transform: translateX(-6px) scale(0.9); filter: blur(3px); }
  45% { opacity: 1; filter: blur(0); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}
@keyframes zPopOut {
  from { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
  to { opacity: 0; transform: translateX(-4px) scale(0.94); filter: blur(2px); }
}
.sidebar-bell__panel, .sidebar-menu { animation: zPopIn var(--pop-in) var(--pop-spring) both; }
.sidebar-bell__panel.is-closing, .sidebar-menu.is-closing { animation: zPopOut var(--pop-out) var(--pop-exit-ease) both; }
/* The bloom point: beside the bell, level with its centre (the panel is
   top-aligned with the bell); beside the profile icon, level with its
   centre (the menu is bottom-aligned with the icon). */
.sidebar-bell__panel { transform-origin: 0 23px; }
.sidebar-menu { transform-origin: 0 calc(100% - 23px); }
/* On a phone the notifications panel sits above the bottom bar, so it
   blooms upward from its foot instead. */
@media (max-width: 639px) {
  .sidebar-bell__panel { transform-origin: 50% 100%; }
}

/* ── Line audit (2026-09-27) ─────────────────────────────────────────────
   One weight everywhere: a line is 1px, Nest for structure or the soft
   rule inside a block, and two lines never sit side by side. The fixes a
   platform-wide sweep turned up, page by page. */
/* The rail's rule is the left line of every edge-to-edge page, so a panel
   that starts at the rail does not draw its own (a phone has no rail and
   keeps it). */
@media (min-width: 768px) {
  .cf-page .cf-fp-rail, .cf-page .cf-md-rail, .cf-page .cf-labels { border-left: none; }
}
/* A tool page's panels after the tool nav: the first starts on the nav's
   rule, and each one after on the rule that closed the one before (hidden
   banners sit between, so this is ~, not +). */
.cf-page .page-container > .cf-subnav ~ .ak-panel:not([hidden]) { border-top: none; margin-top: 0 !important; }
/* Single sign-on: its panels are bands of the sheet, one rule between two,
   like the other admin pages (adminSso.css keeps its pinned base). */
.sso-page .sso-panel { background: transparent; border-radius: 0; border: none; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: -1px !important; padding: 22px 24px 24px; }
.sso-page .sso-panel + :not(.sso-panel) { margin-top: 0; }
@media (max-width: 767px) { .sso-page .sso-panel { padding: 18px 16px 20px; } }
/* Agreements: the heading inset like every page head, and the cards as
   bands of one sheet, one rule between two. */
.app-shell:has(> #ag-platform-card) > .page-head { padding: 28px 24px 20px; margin: 0; }
.app-shell:has(> #ag-platform-card) > #ag-status { margin: 0 24px 14px !important; }
.app-shell:has(> #ag-platform-card) > section.card {
  margin: -1px 0 0 !important; padding: 20px 24px 24px; border-radius: 0; background: transparent;
  border: none; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
@media (max-width: 767px) {
  .app-shell:has(> #ag-platform-card) > .page-head { padding: 20px 16px 16px; }
  .app-shell:has(> #ag-platform-card) > section.card { padding: 18px 16px 20px; }
}
/* Form sheets: the cards inside a white document sheet take the soft rule. */
.doc-sheet .card { border-color: var(--rule-soft); }

/* ── Toasts (js/app.js toast(), 2026-09-29) ───────────────────────────
   A status message on the paper, square and ruled like every surface.
   Opaque: a toast floats over whatever the page has under it, so its
   contrast cannot lean on the page. Its words are Nest, an error's the
   severity ink; its kind is its rule's colour and, where color-mix() is
   known, a tint of it (the plain card where it is not: a var() inside an
   unknown function would drop the background altogether). Every word
   clears 4.5:1 in both themes (tests/toastContrast.test.js computes it).
   The stack and the fade stay in app.js. */
.z-toast {
  padding: 12px 16px; border-radius: 0; font-size: 14px; line-height: 1.4; pointer-events: auto;
  color: var(--nest); background: var(--card); border: 1px solid var(--rule);
}
.z-toast--success { border-color: var(--leaf); }
.z-toast--error { color: var(--sev-issue); border-color: var(--sev-issue); }
@supports (color: color-mix(in srgb, currentColor 50%, transparent)) {
  .z-toast--success { background: color-mix(in srgb, var(--leaf) 10%, var(--card)); }
  .z-toast--error { background: color-mix(in srgb, var(--sev-issue) 8%, var(--card)); }
}

/* ── ASCE Hazard Tool lookup — Wind-Mit Region section (2026-09-29) ──
   Ruled-grid treatment (hairline --rule borders, no rounded card), matching
   the staff web grid. */
.asce-lookup { border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); padding: 10px 0 12px; margin: 4px 0 12px; }
.asce-lookup-title { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; }
.asce-lookup-hint { font-size: 11px; opacity: 0.75; margin-top: 2px; }
.asce-lookup-search { display: flex; gap: 8px; margin-top: 8px; align-items: stretch; }
.asce-lookup-search .asce-lookup-input { flex: 1 1 auto; min-width: 0; }
.asce-lookup-search .asce-lookup-go { flex: 0 0 auto; white-space: nowrap; }
.asce-lookup-error { margin-top: 8px; font-size: 12px; color: var(--sev-issue); }
.asce-lookup-result { display: grid; grid-template-columns: 1fr 1fr; margin-top: 10px; border-top: 1px solid var(--rule-soft); border-left: 1px solid var(--rule-soft); }
.asce-lookup-cell, .asce-lookup-note, .asce-lookup-source { border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); padding: 8px 10px; }
.asce-lookup-note, .asce-lookup-source { grid-column: 1 / -1; font-size: 11px; }
.asce-lookup-source { opacity: 0.75; }
.asce-lookup-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.asce-lookup-value { font-size: 13px; font-weight: 500; margin-top: 2px; word-break: break-word; }
.asce-lookup-sub { font-size: 11px; opacity: 0.8; margin-top: 2px; }
.asce-lookup-differs { margin-top: 4px; color: var(--sev-maintenance); }
@media (max-width: 560px) {
  .asce-lookup-result { grid-template-columns: 1fr; }
  .asce-lookup-search { flex-direction: column; }
}
