/* BrainBuild by Wisdom Systems AI. Pacific rebrand: cube mark, dark side panel, 48px tap targets, 17px text. */
:root {
  --bg: #F0F7F8; --surface: #FFFFFF; --ink: #101619; --muted: #455B63; --line: #C1D5DB;
  --brand: #006C85; --brand-2: #00596E; --brand-ink: #FFFFFF; --focus: #0F8AA6;
  --teal: #1CA9C9; --teal-soft: #79D9EB;
  --panel: #141719; --panel-raised: #252C2F; --panel-line: #2E373B; --panel-ink: #FFFFFF; --panel-muted: #A9BCC3;
  --ok: #17784A; --ok-bg: #E7F5EE; --warn: #9A5B00; --warn-bg: #FFF4E0; --bad: #B42318; --bad-bg: #FDECEA;
  --water: #1565C0; --gas: #D35400; --electric: #B7791F; --fire: #C62828;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,22,25,.06), 0 4px 16px rgba(16,22,25,.05);
  --tabbar: 64px; --side: 256px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0B0E; --surface: #141719; --ink: #EEF6F8; --muted: #A9BCC3; --line: #2E373B;
    --brand: #1CA9C9; --brand-2: #79D9EB; --brand-ink: #0A0B0E; --focus: #79D9EB;
    --panel: #0F1113; --panel-raised: #1E2427;
    --ok: #4ACB8A; --ok-bg: #0F2A1E; --warn: #F2B75B; --warn-bg: #2E2210; --bad: #FF7A6E; --bad-bg: #3A1512;
    --water: #5AA2F0; --gas: #FF8A3D; --electric: #F2C14E; --fire: #FF6B6B;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* the hidden attribute always wins over component display rules */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 16px); }
a { color: var(--brand); }
h1 { font-size: 1.5rem; line-height: 1.25; margin: .4em 0 .5em; letter-spacing: -.01em; }
h1 small, h2 small { font-size: .8rem; font-weight: 500; }
h2 { font-size: 1.1rem; margin: 0 0 .6em; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { flex: none; border-radius: 8px; }
.brand-t { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-t b { font-size: 1rem; } .brand-t small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.topnav a.on, .topnav a:hover { color: var(--ink); background: var(--bg); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 12px 16px 24px; }

/* bottom tab bar (phones) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); height: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted);
  font-size: .72rem; font-weight: 600; min-height: 48px; }
.tabbar a.on { color: var(--brand); }
.tabbar a.em { color: var(--fire); }
@media (min-width: 900px) {
  .topnav { display: flex; } .tabbar { display: none; } body { padding-bottom: 24px; }
  .wrap { padding: 20px 24px 40px; }
}

/* ---- side panel (Pacific rebrand) ----
   Desktop/tablet: the header becomes a fixed dark side panel with vertical tabs. Pure CSS, no template edits.
   Phones: app.js turns the same nav into a slide-out panel and keeps Emergency one tap away in the top bar.
   Without JS, phones keep the original bottom tab bar. Sign-in pages (body.auth) keep the plain header. */
.topnav a[href^="/emergency"] { color: var(--fire); }
.side-btn, .em-chip, .side-head, .side-scrim { display: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 900px) {
  body:not(.auth) { padding-left: var(--side); }
  body:not(.auth) .top {
    position: fixed; top: 0; bottom: 0; left: 0; width: var(--side); z-index: 20;
    flex-direction: column; align-items: stretch; gap: 0; overflow-y: auto;
    padding: calc(20px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
    background: var(--panel); border: 0; border-right: 1px solid var(--panel-line); color: var(--panel-ink);
  }
  body:not(.auth) .brand { color: var(--panel-ink); padding: 2px 8px 22px; }
  body:not(.auth) .brand img { border-radius: 9px; }
  body:not(.auth) .brand-t small { color: var(--panel-muted); max-width: 170px; }
  body:not(.auth) .topnav { display: flex; flex: 1 0 auto; flex-direction: column; margin: 0; gap: 2px; }
  body:not(.auth) .topnav a {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px;
    border-radius: 10px; color: var(--panel-muted); background: none; font-size: .95rem;
  }
  body:not(.auth) .topnav a:hover { color: var(--panel-ink); background: var(--panel-raised); }
  body:not(.auth) .topnav a.on, body:not(.auth) .topnav a[aria-current="page"] { color: var(--panel-ink); background: var(--panel-raised); }
  body:not(.auth) .topnav a.on::before, body:not(.auth) .topnav a[aria-current="page"]::before {
    content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--teal);
  }
  body:not(.auth) .topnav a[href^="/emergency"] { color: #FF8A80; }
  body:not(.auth) .topnav a[href^="/emergency"]:hover { color: #FFB4AD; }
  body:not(.auth) .topnav a.side-head { display: none; }
  body:not(.auth) .topnav .ic { width: 20px; height: 20px; }
  body:not(.auth) .top :focus-visible { outline-color: var(--teal-soft); }
  body:not(.auth) .wrap { max-width: 1120px; padding: 28px 32px 48px; }
}

@media (max-width: 899.98px) {
  html.js-side body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  html.js-side .tabbar { display: none; }
  html.js-side .top { background: var(--panel); border-bottom-color: var(--panel-line); }
  html.js-side .brand { color: var(--panel-ink); }
  html.js-side .brand-t small { color: var(--panel-muted); max-width: 40vw; }
  html.js-side .em-chip {
    display: inline-flex; align-items: center; gap: 6px; margin-left: auto; min-height: 44px; padding: 0 14px;
    border-radius: 999px; background: #C62828; color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap;
  }
  html.js-side .em-chip .ic { width: 18px; height: 18px; }
  html.js-side .side-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; margin: 0 -6px 0 auto;
    border: 0; border-radius: 12px; background: none; color: var(--panel-ink); cursor: pointer;
  }
  html.js-side .em-chip + .side-btn { margin-left: 4px; }
  html.js-side .side-btn svg { width: 26px; height: 26px; }
  html.js-side .side-btn:focus-visible, html.js-side .topnav :focus-visible { outline-color: var(--teal-soft); }

  html.js-side .topnav {
    display: flex; flex-direction: column; gap: 2px; position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; margin: 0;
    width: min(86vw, 320px); overflow-y: auto; background: var(--panel); border-right: 1px solid var(--panel-line);
    padding: calc(16px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
    transform: translateX(-104%); visibility: hidden; transition: transform .22s cubic-bezier(.2,.8,.2,1), visibility 0s linear .22s;
  }
  html.js-side .top.open .topnav { transform: none; visibility: visible; transition: transform .22s cubic-bezier(.2,.8,.2,1); }
  html.js-side .side-head { display: flex; padding: 4px 8px 18px; }
  html.js-side .topnav a {
    position: relative; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 12px;
    border-radius: 12px; color: var(--panel-muted); background: none; font-size: 1.05rem;
  }
  html.js-side .topnav a.side-head { min-height: 0; padding: 4px 8px 18px; color: var(--panel-ink); font-size: 1rem; }
  html.js-side .topnav a.on, html.js-side .topnav a[aria-current="page"] { color: var(--panel-ink); background: var(--panel-raised); }
  html.js-side .topnav a.on::before, html.js-side .topnav a[aria-current="page"]::before {
    content: ""; position: absolute; left: -14px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--teal);
  }
  html.js-side .topnav a[href^="/emergency"] { color: #FF8A80; }
  html.js-side .side-scrim {
    display: block; position: fixed; inset: 0; z-index: 35; background: rgba(10,11,14,.55);
    opacity: 0; pointer-events: none; transition: opacity .22s;
  }
  html.js-side .top.open .side-scrim { opacity: 1; pointer-events: auto; }
  html.side-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  html.js-side .topnav, html.js-side .top.open .topnav, html.js-side .side-scrim { transition: none; }
}

/* voice typing: the mic beside a field; red while listening */
.voice-btn { min-width: 48px; min-height: 48px; padding: 0 12px; }
.voice-wrap { position: relative; }
.voice-wrap > .voice-btn { position: absolute; right: 5px; bottom: 5px; min-width: 44px; min-height: 44px; padding: 0 10px; border-color: transparent; background: transparent; }
.voice-wrap.multi > .voice-btn { right: 20px; }  /* clear of the textarea's resize grip */
.voice-wrap textarea.has-voice { resize: vertical; }  /* the mic stays at its edge */
.has-voice { padding-right: 56px; }
.voice-btn.on { background: var(--bad); border-color: var(--bad); color: #fff; animation: voice-pulse 1.2s ease-in-out infinite; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 25%, transparent); } }
.voice-status { color: var(--muted); margin: 6px 0 0; }
@media (prefers-reduced-motion: reduce) { .voice-btn.on { animation: none; } }
@media (prefers-color-scheme: dark) { .voice-btn.on { color: #0A0B0E; } }  /* dark ink on the light red: 7.7:1 */
.voice-status:empty { margin: 0; }  /* stays in the page so screen readers announce what it says next */

.ic { width: 24px; height: 24px; flex: none; } .ic.sm { width: 18px; height: 18px; vertical-align: -3px; } .ic.lg { width: 34px; height: 34px; }

/* cards + layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; box-shadow: var(--shadow); }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card h2:first-child { margin-top: 0; }
body.auth .wrap { padding-top: 8vh; }
.stack { display: flex; flex-direction: column; gap: 14px; } .pad { padding-top: 12px; }
.two { display: grid; gap: 14px; } @media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }
.section { margin: 22px 0 10px; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.eyebrow { color: var(--muted); text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; }
.grow { flex: 1; min-width: 0; }

/* forms */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
input, select, textarea { font: inherit; font-size: 17px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; min-height: 48px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
label.check input { width: 22px; height: 22px; min-height: 0; }
fieldset.seg { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
fieldset.seg legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
fieldset.seg label { position: relative; }
fieldset.seg input { position: absolute; opacity: 0; }
fieldset.seg span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 600; }
fieldset.seg input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
fieldset.seg input[value=urgent]:checked + span { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
fieldset.seg input:focus-visible + span { outline: 3px solid var(--focus); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-2); }
.btn.block { display: flex; width: 100%; }
.btn.sm { min-height: 40px; padding: 6px 12px; font-size: .9rem; }
.btn.call { background: var(--ok); border-color: var(--ok); color: #fff; margin: 14px 0; font-size: 1.05rem; }
.danger-btn { color: var(--bad); }
.warnbtn { color: var(--warn); list-style: none; } .warnbtn::-webkit-details-marker { display: none; }

/* notes */
.note { padding: 12px 14px; border-radius: 12px; }
.note.ok { background: var(--ok-bg); color: var(--ok); } .note.bad { background: var(--bad-bg); color: var(--bad); }
.note.ok p, .note.ok b { color: var(--ink); }
.danger { display: flex; gap: 12px; align-items: flex-start; background: var(--bad); color: #fff; border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px; font-weight: 600; }
.danger p { margin: 0; } .danger.slim { margin-top: 14px; }
.caution { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-weight: 600; font-size: .95rem; }

/* ask */
.askbox { margin: 6px 0 4px; }
.askbox .h1 { font-size: 1.45rem; font-weight: 750; margin-bottom: 10px; display: block; }
.askrow { display: flex; gap: 8px; }
.askrow input { font-size: 18px; min-height: 56px; border-radius: 14px; }
.askrow .btn { min-width: 56px; min-height: 56px; border-radius: 14px; }
.askbox .muted { margin-top: 8px; }

/* emergency tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 112px; border-radius: var(--radius); color: #fff; text-decoration: none; justify-content: flex-end; }
.tile b { font-size: 1.1rem; } .tile small { opacity: .9; }
.tiles.big .tile { min-height: 140px; }
.t-water { background: var(--water); } .t-gas { background: var(--gas); } .t-electric { background: var(--electric); } .t-fire { background: var(--fire); }
@media (prefers-color-scheme: dark) { .tile { color: #0A0F16; } }
.report-cta { margin-top: 14px; }
.pill { display: inline-block; min-width: 22px; padding: 1px 8px; border-radius: 99px; background: var(--bad-bg); color: var(--bad); font-size: .8rem; font-weight: 700; text-align: center; }
h1.kh { display: flex; align-items: center; gap: 10px; background: none !important; }
h1.kh.t-water { color: var(--water); } h1.kh.t-gas { color: var(--gas); } h1.kh.t-electric { color: var(--electric); } h1.kh.t-fire { color: var(--fire); }

/* lists */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list li { border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.list li:first-child { border-top: 0; }
.list li > a, .list li > div { display: flex; flex-direction: column; padding: 12px 0; text-decoration: none; color: var(--ink); flex: 1; min-height: 56px; justify-content: center; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; padding-top: 0; }
.rows li small { display: block; }
form.inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
form.inline input { min-height: 40px; padding: 6px 10px; width: auto; flex: 1; min-width: 140px; }

/* answer */
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; min-height: 44px; }
h1.q { font-size: 1.3rem; }
.answer .lead p { font-size: 1.12rem; margin: 0 0 .5em; }
.answer.none .lead { font-weight: 650; }
.cite { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 2px; border-radius: 99px;
  background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand); font-size: .78rem; font-weight: 750; text-decoration: none; vertical-align: 2px; }
.sources { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sources a { display: flex; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.sources small { display: block; color: var(--muted); margin-top: 4px; }
.sources .cite { flex: none; margin-top: 2px; }
.feedback { margin: 18px 0 8px; }
.fbrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.fbrow details { flex: 1; min-width: 200px; }
.fbrow summary { width: 100%; }

/* shutoff cards */
.cards { display: grid; gap: 10px; } @media (min-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }
.shutoff { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--muted);
  border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.shutoff b { font-size: 1.12rem; }
.shutoff .loc, .shutoff-detail .where { font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }
.shutoff-detail .where { font-size: 1.2rem; }
.shutoff-kind { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.k-water { border-left-color: var(--water); } .k-gas { border-left-color: var(--gas); } .k-electric { border-left-color: var(--electric); } .k-fire { border-left-color: var(--fire); }
.shutoff-detail { border-left: 6px solid var(--muted); }
.filter { margin-bottom: 12px; }

.badge { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 3px 10px; border-radius: 99px; font-size: .8rem; font-weight: 700;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.badge.s-done { background: var(--ok-bg); color: var(--ok); } .badge.s-in_progress { background: var(--warn-bg); color: var(--warn); }

/* docs */
.doctext { white-space: pre-wrap; font-size: 1rem; line-height: 1.6; }
.pager { display: flex; justify-content: space-between; gap: 10px; }

/* dashboards */
.subtabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 8px; padding: 2px 16px 8px; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a, .seg-links a { flex: none; padding: 9px 14px; border-radius: 99px; text-decoration: none; color: var(--muted); font-weight: 650; font-size: .92rem;
  background: var(--surface); border: 1px solid var(--line); min-height: 40px; display: inline-flex; align-items: center; }
.subtabs a.on, .seg-links a.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.seg-links { display: flex; gap: 6px; margin-bottom: 12px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.kpi-v { font-size: 1.7rem; font-weight: 780; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-l { font-size: .85rem; font-weight: 650; color: var(--muted); margin-top: 4px; }
.kpi-h { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.kpi.good .kpi-v { color: var(--ok); } .kpi.warn .kpi-v { color: var(--warn); } .kpi.bad .kpi-v { color: var(--bad); }
.bars { width: 100%; height: 150px; display: block; }
.bars .b-all { fill: var(--line); } .bars .b-ans { fill: var(--brand); }
.bars text { font-size: 8px; fill: var(--muted); }
.legend { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; } .sw-ans { background: var(--brand); } .sw-all { background: var(--line); margin-left: 10px; }
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 650; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td select { min-height: 40px; padding: 6px 10px; width: auto; }
.copyrow { display: flex; gap: 8px; } .copyrow input { font-size: .9rem; }
details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
@media print { .tabbar, .top, .subtabs, .sec-links, .side-scrim { display: none; } body { padding-left: 0 !important; } }

/* tap-target fixes (e2e: every control >= 44px) */
.brand { min-height: 44px; }
.topnav a { min-height: 44px; display: inline-flex; align-items: center; }
.rows li > .grow > a { display: inline-flex; align-items: center; min-height: 44px; }
label.check { min-height: 44px; }

/* pictures tied to answers */
.piclink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; font-weight: 650; text-decoration: none; }
.cards .piclink { margin: -4px 0 4px 6px; }
.sources li { display: flex; flex-direction: column; }
.sources .piclink { margin-left: 8px; }
.photo-thumb { display: block; margin: 10px 0; text-decoration: none; font-weight: 650; }
.photo-thumb img { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 6px; }
.photo-thumb span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.picture { margin: 0; }
.picture img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }

/* install banner */
.install { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-color: var(--brand); }
.install p { margin: 4px 0 0; }

/* guides + poster */
.guide ol, .guide ul { padding-left: 1.2em; } .guide li { margin-bottom: .6em; }
.poster { background: #fff; color: #0E1726; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; max-width: 720px; margin: 0 auto; }
.poster h1 { font-size: 2rem; margin: .2em 0; } .poster .lead { font-size: 1.15rem; }
.poster .qr svg { width: min(320px, 80vw); height: auto; }
.poster .url { font-weight: 700; word-break: break-all; }
.poster .steps { text-align: left; max-width: 520px; margin: 16px auto; font-size: 1.05rem; }
.poster .foot { font-weight: 700; color: #B42318; } .poster .brandline { color: #5A6475; font-size: .9rem; }
@media print {
  body { background: #fff; padding: 0; } .noprint, .install { display: none !important; }
  .poster { border: 0; } .card { box-shadow: none; break-inside: avoid; }
}

.helplink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }

/* question log */
.qfilter { margin-bottom: 12px; }
.qfilter select { min-height: 44px; padding: 6px 10px; width: auto; flex: 1; min-width: 140px; }
.qlog .qa-answer { margin: 6px 0; padding: 8px 12px; border-left: 3px solid var(--line); overflow-wrap: anywhere; }
.qlog .qa-answer p { margin: 0 0 .35em; }
.qlog .qa-answer .cite { pointer-events: none; }
.qlog .grow > a.small { display: inline-flex; align-items: center; min-height: 44px; }
.bad-text { color: var(--bad); font-weight: 650; }

/* ---- answer card v1: one layout for every answer (see answer-template/ANSWER-SPEC.md) ---- */
.ans { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; box-shadow: var(--shadow); }
.ans-ctx { margin: 0 0 2px; color: var(--muted); font-size: .85rem; }
.ans-title { margin: 0 0 14px; font-size: 1.25rem; line-height: 1.3; }
.ans-steps { list-style: none; margin: 0; padding: 0; counter-reset: ans; }
.ans-step { counter-increment: ans; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.ans-step:first-child { border-top: 0; padding-top: 0; }
.ans-step::before { content: counter(ans); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); font-weight: 700; font-size: .85rem; }
.ans-step p { margin: 0; }
.ans-where { font-weight: 700; }
.valves { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.valve { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.valve b { display: block; font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.valve span { color: var(--muted); font-size: .85rem; }
.ans-warn { display: flex; gap: 8px; margin: 6px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: .9rem; font-weight: 600; }
.ans-warn .ic { width: 18px; height: 18px; margin-top: 2px; }
.ans-gap { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: .9rem; font-weight: 600; }
.ans-facts { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; }
.ans-facts dt { color: var(--muted); } .ans-facts dd { margin: 0; font-weight: 600; }
.ans-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; margin-top: 12px; color: var(--muted); font-size: .85rem; }
.ans-foot a { font-weight: 600; }
.ans-src summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; list-style: none; }
.ans-src summary::-webkit-details-marker { display: none; }
.ans-src ul { margin: 4px 0 0; padding-left: 1.1em; }
.ans-sub { margin: 16px 0 8px; font-size: .95rem; }
.ans-assets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 760px) { .ans-assets { grid-template-columns: 1fr 1fr; } }
.ans-assets .piclink { margin: 2px 0 0 6px; }
.ans-quotes { margin: 0; }
.ans-doc { margin: 12px 0 4px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.ans-doc:first-child { margin-top: 0; }
.ans-quote { margin: 0 0 8px; line-height: 1.5; }
.ans-src li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.ans-src li a { font-weight: 600; }
.ans-src .pagelink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }


/* ==== The simpler app (2026-09-30): one menu, one question bar, answers as a thread, one Overview ==== */
:root { --shadow: none; --bubble: color-mix(in srgb, var(--brand) 11%, var(--surface)); }
@media (prefers-color-scheme: dark) { :root { --bubble: var(--panel-raised); } }
h1 { letter-spacing: -.015em; }
.card { border-color: color-mix(in srgb, var(--line) 75%, transparent); }

/* the one menu: sections, recent questions, the person at the bottom */
.topnav .nav-sec { margin: 16px 12px 4px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--panel-muted); opacity: .8; }
.top .topnav a.nav-new { background: var(--panel-raised); color: var(--panel-ink); font-weight: 700; margin-bottom: 8px; }
.top .topnav a.nav-recent { display: block; min-height: 40px; padding: 9px 12px; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav .nav-count { margin-left: auto; min-width: 24px; text-align: center; padding: 1px 8px; border-radius: 99px; font-size: .78rem; font-weight: 800;
  background: rgba(255, 122, 110, .18); color: #FF8A80; }
.top .topnav a.nav-me { margin-top: auto; border-top: 1px solid var(--panel-line); border-radius: 0; padding-top: 14px; }
.topnav a.nav-me small { display: block; font-size: .78rem; font-weight: 500; color: var(--panel-muted); }
.topnav a.nav-me span, .topnav a.nav-help span { line-height: 1.2; }

/* staff home: a greeting, three quick starts, the question bar */
.hero { text-align: center; padding: 9vh 8px 12px; }
.hero-cube { display: block; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
  box-shadow: 0 0 36px color-mix(in srgb, var(--teal) 32%, transparent); }
.hero h1 { font-size: 1.8rem; margin: 0 0 4px; }
.hero > p { margin: 0 0 20px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.chip:hover { border-color: var(--brand); }
.chip .pill { margin-left: 2px; }

/* the question bar: one rounded field with the mic and send; pinned to the bottom on phones */
.composer { margin: 22px 0 0; }
.composer .askrow { align-items: center; gap: 2px; padding: 5px 5px 5px 18px; border-radius: 28px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(16, 22, 25, .10); }
.composer .askrow:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.composer .askrow input { flex: 1; min-width: 0; min-height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 17px; box-shadow: none; outline: none; }
.composer .askrow input::-webkit-search-cancel-button { display: none; }
.composer .askrow .btn { flex: none; min-width: 48px; min-height: 48px; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; }
.composer .askrow .voice-btn { background: transparent; color: var(--ink); }
.composer .askrow .voice-btn.on { background: var(--bad); color: #fff; }
@media (prefers-color-scheme: dark) { .composer .askrow .voice-btn.on { color: #0A0B0E; } }
.composer .btn.send { background: var(--ink); color: var(--surface); }
.composer .btn.send .ic { width: 22px; height: 22px; }
.composer-note { margin-top: 10px; }
.composer + .voice-status, .askrow + .voice-status { text-align: center; }
@media (max-width: 899.98px) {
  /* --composer-h is the bar's live height (app.js): a voice message makes it taller, and the page's end and focus must stay clear of it */
  html.js-side body.has-composer { padding-bottom: calc(var(--composer-h, 60px) + 36px + env(safe-area-inset-bottom)); }
  html.js-side:has(> body.has-composer) { scroll-padding-bottom: calc(var(--composer-h, 60px) + 36px + env(safe-area-inset-bottom)); }
  html.js-side .has-composer .composer { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 15; margin: 0; }
  html.js-side .has-composer .composer .voice-status:not(:empty) { background: var(--surface); border-radius: 10px; padding: 4px 10px; margin: 6px auto 0; width: fit-content; }
}
@media (min-width: 900px) {
  .has-composer .composer { position: sticky; bottom: 20px; z-index: 5; }
  body.has-composer:not(.auth) .wrap { max-width: 820px; }
}

/* an answer: a thread (the question, the card, call and rate, the next question) */
.thread { display: flex; flex-direction: column; }
h1.qbubble { font-size: inherit; line-height: inherit; letter-spacing: normal; }
.qbubble { align-self: flex-end; max-width: 85%; margin: 6px 0 14px; padding: 10px 15px; border-radius: 20px 20px 6px 20px;
  background: var(--bubble); font-weight: 600; overflow-wrap: anywhere; }
.ans-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.ans-actions .note { flex-basis: 100%; margin: 0; }
.ans-actions .fbrow { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-left: auto; }
.ans-actions .fbrow details { flex: none; min-width: 0; }
.ans-actions .fbrow summary { width: auto; }
.ans-actions .fbrow summary.icon-btn { width: 44px; }  /* as big as thumbs-up beside it: a gloved thumb mustn't hit Helpful instead */
.ans-actions .fb-q { line-height: 44px; }
.ans-actions .fbrow details[open] { flex-basis: 100%; }
.icon-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
details.fb-wrong > summary { list-style: none; } details.fb-wrong > summary::-webkit-details-marker { display: none; }
.decision { text-align: center; margin: 14px 0 0; }

/* the call button: label and number, the number never split */
.btn.call { flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
.nowrap { white-space: nowrap; }
.btn.call.pill-call { display: inline-flex; width: auto; min-height: 44px; margin: 0; padding: 8px 16px; border-radius: 999px; font-size: .95rem;
  background: transparent; color: var(--ok); border: 1.5px solid color-mix(in srgb, var(--ok) 55%, transparent); }

/* Emergency: the life-safety call first */
.lifesafety { background: var(--bad-bg); border-radius: var(--radius); padding: 14px; margin: 0 0 20px; }
.lifesafety p { margin: 0 0 10px; color: var(--ink); }
.lifesafety .btn { margin: 8px 0 0; }
.btn.call911 { background: var(--bad); border-color: var(--bad); color: #fff; font-size: 1.1rem; font-weight: 800; }
@media (prefers-color-scheme: dark) { .btn.call911, .btn.call:not(.pill-call) { color: #0A0B0E; } }  /* dark ink on the light fills: readable in a dim plant room */

/* one Overview: four numbers, what needs attention, one chart */
.kpis.four { grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .kpis.four { grid-template-columns: repeat(4, 1fr); } }
.ov-grid { display: grid; gap: 14px; }
@media (min-width: 1000px) { .ov-grid { grid-template-columns: 1.45fr 1fr; align-items: start; } }
.att { list-style: none; margin: 0; padding: 0; }
.att li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.att li:first-child { border-top: 0; padding-top: 2px; }
.att .grow { flex: 1; min-width: 0; } .att small { display: block; }
.att .btn { flex: none; }
.dot { flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--muted); }
.dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }
/* dashboard sections as a row of links, only on a phone where the menu script didn't run */
.sec-links { display: none; }
@media (max-width: 899.98px) {
  html:not(.js-side) .sec-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
  html:not(.js-side) .sec-links a { padding: 9px 14px; min-height: 44px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface);
    color: var(--ink); text-decoration: none; font-weight: 650; font-size: .92rem; display: inline-flex; align-items: center; }
}
.att .att-more a { display: inline-block; padding: 10px 0; font-weight: 650; }
.resolve { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.resolve input { flex: 1 1 180px; min-width: 0; }
.bars { height: 170px; }
.axis { display: flex; justify-content: space-between; margin: 6px 0 0; font-size: .78rem; color: var(--muted); }

/* two views under one menu item */
.switch { margin: 0 0 12px; }

/* forms and pages read at a comfortable width on desktop */
@media (min-width: 900px) { form.card, .formcard { max-width: 760px; } }

.att .grow > a { display: inline-block; padding: 10px 0; margin: -10px 0 -4px; }  /* a 44px tap target in a compact row */
/* Approved Buildings evidence presentation; all links/images retain existing authorization. */
.building-answer .ans-facts { grid-template-columns: minmax(72px, max-content) minmax(0, 1fr); }
.building-answer .ans-facts dd { overflow-wrap: anywhere; }
.building-answer .ans-ctx, .building-answer .ans-src { min-width: 0; overflow-wrap: anywhere; }
.building-answer .reviewed-photo { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); margin: 2px 0 8px; }
.building-answer .reviewed-photo img { width: 106px; height: 88px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.building-answer .reviewed-photo > span { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.building-answer .reviewed-photo strong { font-size: .95rem; }
.building-answer .reviewed-photo small { color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.building-answer .reviewed-photo .badge { font-size: .67rem; white-space: normal; }
.building-answer .reviewed-photo > b { font-size: 1.4rem; }
@media (max-width: 899.98px) {
  .building-answer .reviewed-photo { gap: 10px; }
  .building-answer .reviewed-photo img { width: 80px; height: 88px; }
}
details.qa-more > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--brand); font-weight: 600; font-size: .92rem; }
details.add-building > summary { list-style: none; width: fit-content; } details.add-building > summary::-webkit-details-marker { display: none; }
details.add-building[open] > summary { margin-bottom: 8px; }

/* owner console portfolio: a table on wide screens, one card per building on a phone */
.portfolio .pf-name small { display: block; }
@media (max-width: 759.98px) {
  .table-wrap.portfolio { overflow: visible; margin: 0; padding: 0; }
  .portfolio thead { display: none; }
  .portfolio table, .portfolio tbody { display: block; width: 100%; }
  .portfolio tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 14px; margin: 0 0 12px;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .portfolio td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; }
  .portfolio td.num { text-align: left; }
  .portfolio td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .75rem;
    font-weight: 600; letter-spacing: .02em; color: var(--muted); }
  .portfolio .pf-name, .portfolio .pf-open { grid-column: 1 / -1; }
  .portfolio .pf-name b { font-size: 1.05rem; }
  .portfolio .pf-open .btn { width: 100%; min-height: 44px; }
  .portfolio select { width: 100%; }
}

/* Owner-only role previews: real routes, read-only controls, keyboard/touch accessible. */
.role-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.role-preview p { margin: 0 0 10px; }
.role-preview .small { margin: 10px 0 0; }
.preview-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.preview-fields :disabled { opacity: .65; cursor: not-allowed; }

/* Buildings navigation: keep the established palette and make task entry clear. */
.side-close { display: none; }
body[data-buildings-ui] .question-guide { margin: 24px auto; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
body[data-buildings-ui] .question-guide h2 { font-size: 1.05rem; margin: 0 0 8px; }
body[data-buildings-ui] .question-guide p { margin: 8px 0 0; }
body[data-buildings-ui] .ask-status:empty { display: none; }
body[data-buildings-ui] .ask-status:not(:empty) { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--surface); text-align: center; }
body[data-buildings-ui] .top .topnav a.nav-recent { min-height: 44px; }
@media (max-width: 899.98px) {
  body[data-buildings-ui] .side-close { display: block; align-self: flex-end; min-height: 44px; margin-bottom: 8px; padding: 8px 12px; border: 1px solid var(--panel-line); border-radius: 10px; background: var(--panel-raised); color: var(--panel-ink); font: inherit; cursor: pointer; }
}

.manual-quote { white-space: pre-wrap; overflow-wrap: anywhere; border-left: 3px solid var(--line); padding-left: 16px; margin: 18px 0; }
