/* Civic design system (Tim, 22 Oct 2026). Matches the Civic PDFs (tools/reports/civic.py): Newsreader headings,
   Hanken Grotesk text, slate #2E4A52 primary, brass #8C6F3E / #C9B48A, paper #F1EEE7, text #22282A, hairline rules.
   Loaded last; overrides the Graphite tokens. Fonts are self-hosted (public/fonts) with font-display: swap. */
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader.woff2") format("woff2"); font-weight: 300 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 300 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root, html[data-theme="light"] {
  --slate: #2E4A52; --slate-2: #3A5A63; --brass: #8C6F3E; --brass-l: #C9B48A; --paper: #F1EEE7; --paper-2: #E9E4D9; --hair: #CFC8BA; --grey: #6E7270;
  --bg: #F1EEE7; --bg2: #EBE7DE; --card: #FAF8F3; --card2: #EFEBE2; --ink: #22282A; --muted: #6E7270; --line: #DCD5C7; --line-strong: #CFC8BA;
  --accent: #2E4A52; --accent-ink: #FAF8F3; --accent-soft: #E6E9E6; --pill: #EBE7DE; --pill-ink: #22282A; --track: #E6E1D6;
  --tile: #FAF8F3; --tile-ink: #22282A; --tile-lab: #6E7270; --link: #2E4A52; --hdr-bg: #2E4A52; --toast-bg: #22282A; --toast-ink: #F1EEE7;
  --brand: #8C6F3E; --bar: #2E4A52; --bar-ink: #F1EEE7; --ok: #3F6247; --warn: #8C6F3E; --radius: 4px; --r: 4px; --r-btn: 4px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif; --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}
html[data-theme="dark"] {
  --bg: #161D1F; --bg2: #1B2325; --card: #1F282B; --card2: #263134; --ink: #ECE8DF; --muted: #A3A7A3; --line: #304044; --line-strong: #3B4D52;
  --accent: #C9B48A; --accent-ink: #1B2325; --brand: #C9B48A; --bar: #22383E; --bar-ink: #F1EEE7; --link: #C9B48A; --hair: #3B4D52;
  --serif: "Newsreader", Georgia, serif; --sans: "Hanken Grotesk", system-ui, sans-serif;
}
html body { font-family: var(--sans) !important; font-feature-settings: normal; letter-spacing: 0; background: var(--bg); color: var(--ink); }
body button, body input, body select, body textarea { font-family: inherit; }
h1, h2, h3, .hdr-title, .smp-t, .smx-t, .sb-ttl, .sb-ht h3, .ov-title, .view > h2:first-child { font-family: var(--serif) !important; font-weight: 400 !important; letter-spacing: -.005em !important; }
h1 em, h2 em, h3 em, .it { font-style: italic; color: var(--brass); }
a { color: var(--link); text-decoration-color: var(--hair); }
/* section labels: small caps tracked sans, like PDF h2 */
.eyebrow, .hw-h, .sb-h, .sec-h, .rp-h, .ov-h, .lab, h2.sec, .card > h3:first-child, .hx-k, .lbl, .smx-h {
  font-family: var(--sans) !important; font-size: 11px !important; font-weight: 600 !important; letter-spacing: .18em !important; text-transform: uppercase; color: var(--grey, var(--muted)) !important; }
/* ---- Header: slate, hairline brass rule, STANIFORTH wordmark in type ---- */
header.top { background: var(--bar) !important; color: var(--bar-ink) !important; border-bottom: 1px solid var(--brass-l) !important; }
header.top *, .hdr-title { color: var(--bar-ink) !important; }
.eb-mark { display: none !important; }
.cv-wm { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--bar-ink); white-space: nowrap; line-height: 1; padding-right: 14px; margin-right: 2px; border-right: 1px solid rgba(201,180,138,.55); }
.hdr-title { font-family: var(--serif) !important; font-size: 20px !important; font-weight: 400 !important; }
.hdr-b, header.top .hdr-b { background: transparent !important; border: 1px solid rgba(241,238,231,.28) !important; border-radius: 4px !important; color: var(--bar-ink) !important; }
.hdr-b:hover { background: rgba(241,238,231,.08) !important; }
nav.tabs button { font-family: var(--sans) !important; letter-spacing: .02em; }
header.top nav.tabs button[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--brass-l) !important; background: transparent !important; color: #fff !important; }
nav.tabs button[aria-selected="true"]::after { background: var(--brass) !important; }
/* menu sheet: paper with a slate rule, not a band */
html body #nav-sheet .nav-top { background: var(--card) !important; color: var(--ink) !important; border-bottom: 1px solid var(--slate) !important; }
#nav-sheet .nav-top .wordmark, #nav-sheet .nav-top .nav-x, #nav-sheet .nav-top .cv-wm { color: var(--ink) !important; border-color: var(--hair) !important; }
#nav-sheet .nav-x { background: transparent !important; border-color: var(--line) !important; }
#nav-sheet .nav-it[aria-current="page"]::before { background: var(--brass) !important; }
/* ---- Buttons ---- */
html body .btn.btn-primary, html body button.btn-primary, html body a.btn-primary, .btn-primary, a.gmaps {
  background: var(--accent) !important; color: var(--accent-ink) !important; border: 1px solid var(--accent) !important; border-radius: 4px !important; font-weight: 500 !important; letter-spacing: .02em; }
html body .btn.btn-primary:hover, html body button.btn-primary:hover { background: var(--slate-2) !important; }
html[data-theme="dark"] body .btn.btn-primary:hover { background: #D6C49E !important; }
.btn, .btn-secondary, button.chip, .chips button, .bf-filt-btn, .icon-btn, .bf-act, .rp-more, .area-dd-btn { border-radius: 4px !important; }
.btn-secondary, .btn:not(.btn-primary) { background: transparent !important; border: 1px solid var(--line-strong) !important; color: var(--ink) !important; }
.btn-secondary:hover, .btn:not(.btn-primary):hover { border-color: var(--slate) !important; }
.seg .seg-btn[aria-pressed="true"], .fx-tb[aria-pressed="true"], button.chip[aria-pressed="true"], .chips button[aria-pressed="true"] { background: var(--accent) !important; color: var(--accent-ink) !important; border-color: var(--accent) !important; }
:focus-visible { outline-color: var(--brass) !important; }
/* ---- Cards, tables, forms ---- */
.card, .smp-card, .smx-card, .rm-card, .ck-card, .ov-card, .kpi, .stat { background: var(--card) !important; border: 1px solid var(--line) !important; border-radius: 4px !important; }
.ck-card, .ck-banner { border-left: 2px solid var(--brass) !important; }
.kpi strong, .stat strong, .pr-v, .smx-p, .sb-pr .pr-v, .smx-sp { font-family: var(--serif) !important; font-weight: 400 !important; letter-spacing: -.01em !important; }
table { border-collapse: collapse; background: none !important; border-top: 1px solid var(--slate); }
th { font-family: var(--sans); font-size: 11px !important; font-weight: 600 !important; letter-spacing: .14em; text-transform: uppercase; color: var(--muted) !important; background: none !important; border-bottom: 1px solid var(--hair) !important; }
td { border-bottom: 1px solid var(--line) !important; }
tr, tr:nth-child(even) { background: none !important; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { background: var(--card) !important; border: 1px solid var(--line-strong) !important; border-radius: 4px !important; color: var(--ink) !important; }
input:focus, select:focus, textarea:focus { border-color: var(--slate) !important; outline: 0; box-shadow: 0 0 0 3px rgba(46,74,82,.12) !important; }
/* ---- Samples ---- */
.smx-grid { gap: 28px !important; }
.smx-card .smx-tap, .smp-card { background: var(--card) !important; }
.smp-cover, .smx-cover, .smx-cv, .smp-cover.smp-cover-btn { background: var(--slate) !important; border-bottom: 1px solid var(--line) !important; }
.smx-sheet .smx-use li::before { background: var(--brass) !important; border-radius: 0 !important; width: 10px !important; height: 1px !important; top: .8em !important; }
/* ---- Pop-ups: paper, slate hairline, serif title, no band ---- */
.smp-info.sb .sb-band, .ask-card > .ask-t, .sb-band { background: var(--card) !important; color: var(--ink) !important; border-bottom: 1px solid var(--slate) !important; }
.smp-info.sb .sb-band .sb-brand, .sb-band .sb-brand { color: var(--brass) !important; opacity: 1 !important; font-weight: 600 !important; letter-spacing: .22em !important; }
.smp-info.sb .sb-band .sb-ttl, .smp-info.sb .sb-band .sb-x, .sb-band .sb-ttl, .sb-band .sb-x, .ask-card > .ask-t, .ask-card > .ask-t::before { color: var(--ink) !important; }
.sb-band .sb-ttl { font-size: 18px !important; }
.smp-info-in, .ask-card { background: var(--card) !important; border-radius: 6px 6px 0 0 !important; }
.hw-hero { background: var(--slate) !important; color: var(--paper) !important; border-bottom: 1px solid var(--brass-l) !important; border-radius: 4px !important; }
.sb-chip { border-radius: 2px !important; background: var(--card2) !important; }
/* ---- Map panels ---- */
.leaflet-container { font-family: var(--sans) !important; background: #E6E1D6; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card) !important; color: var(--ink) !important; border-radius: 4px !important; }
.leaflet-popup-content-wrapper { border-top: 2px solid var(--slate); }
.leaflet-bar a, .leaflet-control-layers { background: var(--card) !important; color: var(--ink) !important; border-color: var(--line) !important; }
/* status colours tuned to the Civic palette (meaning kept) */
.ok, .rp-chip.ok { color: var(--ok); }
.rp-b.review .rp-s, .rp-chip.review, .badge.review { color: var(--brass) !important; }
/* bottom nav (phone) */
@media (max-width: 760px) {
  nav.tabs { background: var(--card) !important; border-top: 1px solid var(--hair) !important; }
  nav.tabs button { color: var(--muted) !important; }
  nav.tabs button[aria-selected="true"] { color: var(--slate) !important; box-shadow: none !important; }
  html[data-theme="dark"] nav.tabs button[aria-selected="true"] { color: var(--brass-l) !important; }
  .cv-wm { font-size: 10px; letter-spacing: .26em; padding-right: 10px; }
  .hdr-title { font-size: 19px !important; }
}

/* Civic sample cards (22 Oct 2026): airy, no header band, one slate buy, quiet View sample, plain Who it's for.
   Colours come from tokens so dark mode keeps AA contrast (Tim, 22 Oct 2026 21:30). */
:root, html[data-theme="light"] { --cv-stage: #E8E3D8; --cv-buy: #2E4A52; --cv-buy-ink: #FFFFFF; --cv-buy-h: #3A5A63; --cv-soft: #5E6260; }
html[data-theme="dark"] { --cv-stage: #263134; --cv-buy: #3E6670; --cv-buy-ink: #FFFFFF; --cv-buy-h: #4A7580; --cv-soft: #B5B9B4;
  --muted: #B0B4AF; --grey: #B0B4AF; --warn: #E0C48C; --ok: #9CCBA6; --brand: #D7C49C; --link: #D7C49C; --toast-bg: #ECE8DF; --toast-ink: #1B2325; }
html[data-theme="light"], :root { --muted: #5E6260; }
.cv-card { display: flex; flex-direction: column; background: var(--card) !important; border: 1px solid var(--line-strong) !important; border-radius: 6px !important; overflow: hidden; }
.cv-stage { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 28px; background: var(--cv-stage); cursor: pointer; border-bottom: 1px solid var(--line-strong); }
.cv-stage:focus-visible { outline: 2px solid var(--brass-l); outline-offset: -2px; }
.cv-stage img { max-width: 100%; max-height: 100%; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 24px rgba(34,40,42,.14); }
.cv-stage img[src$=".png"] { box-shadow: none; }
.cv-card .smx-body { padding: 22px 24px 24px; gap: 8px; }
html body .cv-card .smx-t { margin: 0; font-family: var(--serif) !important; font-weight: 500 !important; font-size: 22px; color: var(--ink) !important; }
.cv-card .smx-w { margin: 0; color: var(--cv-soft) !important; }
.cv-acts { display: grid; gap: 10px; margin-top: auto; padding-top: 18px; }
html body .cv-acts .cv-buy, html body .rp-list .rp-acts2 .btn-primary { background: var(--cv-buy) !important; border-color: var(--cv-buy) !important; color: var(--cv-buy-ink) !important; border-radius: 4px !important; font-weight: 600 !important; }
html body .cv-acts .cv-buy:hover, html body .rp-list .rp-acts2 .btn-primary:hover { background: var(--cv-buy-h) !important; }
.cv-acts .cv-buy { min-height: 46px; }
html body .cv-acts .cv-view, html body .rp-list .rp-view { background: transparent !important; border: 1px solid var(--line-strong) !important; color: var(--ink) !important; border-radius: 4px !important; box-shadow: none !important; }
.cv-acts .cv-view { min-height: 42px; }
.cv-who { all: unset; justify-self: center; cursor: pointer; font-size: 14px; color: var(--cv-soft); text-decoration: underline; text-decoration-color: var(--brass-l); text-underline-offset: 3px; padding: 4px; }
.cv-who:hover, .cv-who:focus-visible { color: var(--ink); }

/* ---- AA contrast fixes, both themes ---- */
html body .rp-b .rp-s, html body .rp-b.off .rp-s, html body .rp-list .rp-d, html body .rp-list .rp-d.rp-test, html body .pr-x, html body .pick-b small, html body .pick-b .pick-d, html body .pick-d, html body .smx-sm, html body .smx-not, html body .reason, html body .sum-note, html body .rp-step { color: var(--muted) !important; opacity: 1 !important; }
html body .rp-b.gen .rp-s { color: var(--warn) !important; }
html[data-theme="light"] body .rp-b.gen .rp-s, :root:not([data-theme="dark"]) body .rp-b.gen .rp-s { color: #7A5F2F !important; }
html body .rp-b.gen .rp-s::before { background: var(--warn) !important; }
html body .rp-b.off .rp-t, html body .rp-list > .rp-b.off .rp-t, html body .rp-list > .rp-b.off .rp-price .pr-v { color: var(--ink) !important; opacity: 1 !important; }
html body .rp-b.off .rp-s { color: var(--link) !important; }
.pick-b, .pick-b * { opacity: 1 !important; }
#toast, .toast { background: var(--toast-bg) !important; color: var(--toast-ink) !important; }
#toast button, .toast button, #toast a, .toast a { color: var(--toast-ink) !important; opacity: 1 !important; font-weight: 600 !important; text-decoration: underline; text-underline-offset: 3px; }
html body .btn-text, html body .linkish { color: var(--link) !important; opacity: 1 !important; }
html[data-theme="light"] body .btn-text, :root:not([data-theme="dark"]) body .btn-text { color: #2E4A52 !important; }
nav.tabs button { color: var(--muted) !important; }

/* ---- Reports list on item pages: Civic cards (paper / dark surface, cover thumb, slate buy) ---- */
html body .rp-grid.rp-list { background: transparent !important; border: 0 !important; box-shadow: none !important; display: grid !important; gap: 12px !important; padding: 0 !important; }
html body .rp-list > .rp-b { background: var(--card) !important; border: 1px solid var(--line-strong) !important; border-radius: 6px !important; padding: 16px !important; min-height: 0 !important;
  grid-template-columns: 64px minmax(0,1fr) auto !important; grid-template-areas: "ic t p" "ic d d" "ic s s" "x x x" "y y y" !important; column-gap: 14px !important; row-gap: 4px !important; align-items: start !important; }
html body .rp-list > .rp-b.rp-wrap:has(.rp-test) { grid-template-areas: "ic t p" "ic d d" ". s s" ". x x" ". y y" !important; }
html body .rp-list > .rp-b:first-child { border-top: 1px solid var(--line-strong) !important; }
.rp-list .rp-hd { display: contents !important; }
html body .rp-list .rp-ic { grid-area: ic; width: 64px !important; height: 64px !important; border-radius: 3px !important; background: var(--cv-stage) !important; color: var(--muted) !important; display: flex !important; align-items: center; justify-content: center; overflow: hidden; }
.rp-list .rp-cv img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
html body .rp-list .rp-t { grid-area: t; font-family: var(--serif) !important; font-size: 19px !important; font-weight: 500 !important; color: var(--ink) !important; line-height: 1.25; }
html body .rp-list .rp-price .pr-v { font-family: var(--serif) !important; font-size: 17px !important; color: var(--ink) !important; }
html body .rp-list .rp-d { grid-area: d; font-size: 14px !important; -webkit-line-clamp: unset !important; display: block !important; }
html body .rp-list .rp-s { grid-area: s; justify-self: start !important; max-width: none !important; font-size: 13px !important; font-weight: 500; }
html body .rp-list .rp-acts2 { grid-area: x; display: flex !important; flex-wrap: wrap; gap: 8px !important; padding-top: 12px !important; }
html body .rp-list .rp-acts2 .btn-primary { min-height: 42px !important; padding: 0 18px !important; font-size: 14px !important; }
html body .rp-list .rp-acts2 .rp-view { min-height: 42px !important; padding: 0 16px !important; font-size: 14px !important; }
html body .rp-list .rp-acts2 .rp-adm { flex-basis: 100%; justify-content: flex-start; min-height: 0 !important; height: auto !important; padding: 2px 0 !important; font-size: 12.5px !important; font-weight: 500 !important; color: var(--muted) !important; text-decoration: underline; text-underline-offset: 3px; background: none !important; border: 0 !important; }
html body .rp-list .rp-d.rp-test { grid-area: y !important; margin: 2px 0 0 0 !important; font-size: 12px !important; }
@media (max-width: 760px) {
  html body .rp-list > .rp-b { grid-template-columns: 52px minmax(0,1fr) auto !important; }
  html body .rp-list .rp-ic { width: 52px !important; height: 52px !important; }
  html body .rp-list .rp-acts2 .btn-primary, html body .rp-list .rp-acts2 .rp-view { flex: 1 1 100%; }
}

/* AA pass 2 (22 Oct 2026): legacy theme.css rules beat the earlier fixes on the Reports list */
html[data-theme] body .rp-list > .rp-b.gen .rp-s, html body .rp-list > .rp-b.gen .rp-s { color: #7A5F2F !important; }
html[data-theme="dark"] body .rp-list > .rp-b.gen .rp-s, html[data-theme="dark"] body .rp-b.gen .rp-s { color: var(--warn) !important; }
html[data-theme="dark"] body .ai-bar-t, html[data-theme="dark"] body .ai-bar { color: var(--ink) !important; }
html[data-theme="dark"] body li.red > span[aria-hidden="true"] { color: #E8968A !important; }
html body .smp-info.sb .sb-band .sb-brand, html body .sb-band .sb-brand { color: #7A5F2F !important; }
html[data-theme="dark"] body .smp-info.sb .sb-band .sb-brand, html[data-theme="dark"] body .sb-band .sb-brand { color: #D7C49C !important; }
html body .plot-chip small { color: inherit !important; opacity: 1 !important; }
html body .rp-h { color: var(--ink) !important; opacity: 1 !important; }
html body .rp-grid.rp-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)) !important; }

/* Retest 22 Oct 2026: Make-project dialog, outliers, Pipeline board */
#pjmk-sheet { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pjmk-card { max-width: 520px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; }
.pjmk-l { display: block; font-weight: 600; margin: 12px 0 6px; color: var(--ink); }
.pjmk-list { display: grid; gap: 6px; max-height: 40vh; overflow: auto; border: 1px solid var(--line, rgba(0,0,0,.12)); border-radius: var(--radius, 6px); padding: 8px; background: var(--card2); }
.pjmk-r { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); }
.pjmk-odd { color: var(--warn); font-size: .85em; }
.pjmk-dup { color: var(--warn); margin: 8px 0 0; }
.pjmk-err { color: #B3261E; margin: 8px 0 0; }
html[data-theme="dark"] .pjmk-err { color: #F2B8B5; }
.pj-odd { color: var(--warn); }
.pj-oddr { opacity: .75; }
.pb-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.pb-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; scroll-snap-type: x proximity; }
.pb-col { background: var(--card2); border-radius: var(--radius, 6px); padding: 8px; min-height: 120px; scroll-snap-align: start; border: 2px solid transparent; }
.pb-col.pb-over { border-color: var(--accent); }
.pb-h { font-size: 1rem; margin: 2px 4px 8px; color: var(--ink); }
.pb-list { display: grid; gap: 8px; }
.pb-card { background: var(--card); border-radius: var(--radius, 6px); padding: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.12); cursor: grab; }
.pb-card.pb-drag { opacity: .5; }
.pb-t { font-weight: 600; text-align: left; }
.pb-s { margin: 2px 0 6px; color: var(--muted); font-size: .85em; }
.pb-card .stage-label-t { font-size: .8em; }
.pb-empty { color: var(--muted); font-size: .85em; margin: 4px; }
@media (max-width: 800px) { .pb-board { grid-auto-columns: 78%; } }
.pb-strip { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.pb-strip .chip { flex: 0 0 auto; white-space: nowrap; padding: 4px 10px; min-height: 32px; font-size: .85rem; }

/* Retest batch 2 (22 Oct 2026): centred dialogs with a margin, More sheet, Saved tools, Reports delayed, Grants loading */
html body #ask-sheet, html body #pjmk-sheet, html body #amd-sheet, html body #chg-sheet, html body #fix-sheet { align-items: center !important; justify-content: center !important; padding: 16px !important; box-sizing: border-box; }
html body #ask-sheet .ask-card, html body #pjmk-sheet .ask-card, html body #pjmk-sheet .pjmk-card, html body #amd-sheet .ask-card, html body #chg-sheet .ask-card, html body #fix-sheet .ask-card { border-radius: 10px !important; width: 100% !important; max-width: 520px; max-height: calc(100dvh - 32px); overflow-y: auto; margin: 0 auto !important; padding-bottom: 16px !important; }
.ask-area { width: 100%; min-height: 120px; box-sizing: border-box; padding: 10px; border: 1px solid var(--line, rgba(0,0,0,.2)); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; resize: vertical; }
html body #nav-sheet .nav-in { overflow-x: hidden !important; }
html body #nav-sheet .nav-in * { min-width: 0; max-width: 100%; box-sizing: border-box; }
html body #nav-sheet .nav-brand, html body #nav-sheet .nav-brand strong, html body #nav-sheet .nav-brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.sv-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.sv-tools input, .sv-tools select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line, rgba(0,0,0,.2)); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; }
.sv-tools input { flex: 1 1 220px; min-width: 0; }
.sv-tools select { flex: 0 1 200px; }
.sv-m { display: block; color: var(--muted); font-size: .85em; margin-top: 2px; }
html body .rp-chip.bad { background: #FBE3DF; color: #8C1D12; }
html[data-theme="dark"] body .rp-chip.bad { background: #4A1F1A; color: #F2B8B5; }
.rp-late { color: var(--warn); font-size: .9em; margin: 6px 0 0; }
.gr-state { padding: 16px; }
.sk-line { height: 12px; border-radius: 4px; background: var(--card2, rgba(0,0,0,.08)); margin: 10px 0; animation: skp 1.2s ease-in-out infinite alternate; }
.sk-line.short { width: 55%; }
@keyframes skp { from { opacity: .45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sk-line { animation: none; } }
.tab-badge, .ck-badge { min-width: 18px; }

/* Retest batch 3 #21 (22 Oct 2026): slimmer phone header and bottom nav; tap targets stay at least 44px */
@media (max-width: 760px) {
  html body header.top { padding-top: env(safe-area-inset-top) !important; padding-bottom: 0 !important; min-height: 0 !important; }
  html body header.top > .wrap { min-height: 46px !important; height: 46px !important; padding-top: 0 !important; padding-bottom: 0 !important; box-sizing: border-box; }
  html body header.top .theme-tg { width: 36px !important; height: 36px !important; min-height: 36px !important; }
  html body nav.tabs { padding-top: 0 !important; padding-bottom: env(safe-area-inset-bottom) !important; min-height: 0 !important; }
  html body nav.tabs button, html body nav.tabs .tab { height: 46px !important; min-height: 44px !important; padding-top: 3px !important; padding-bottom: 3px !important; gap: 1px !important; font-size: 10.5px !important; }
  html body nav.tabs button svg, html body nav.tabs .tab svg { width: 20px !important; height: 20px !important; }
}
/* v115 retest #1/#11: a hidden dialog is really gone (the id rules above set display:flex, which beat the hidden attribute) */
#pjmk-sheet[hidden], #amd-sheet[hidden], #chg-sheet[hidden], #fix-sheet[hidden], #pick-sheet[hidden], #ask-sheet[hidden], #smp-info[hidden], #smp-ov[hidden], #ui-sheet[hidden] { display: none !important; }
.pjmk-map { height: 170px; border-radius: 6px; margin: 10px 0 0; background: var(--card2); overflow: hidden; }
.pjmk-map[hidden] { display: none; }
.pjmk-tot { font-weight: 400; color: var(--muted, inherit); font-size: .9em; }
.bf-solo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 6px 0 8px; padding: 8px 12px; border: 1px solid #C9B48A; border-left: 4px solid #8C6F3E; border-radius: 6px; background: #F6F0E2; color: #22282A; font-size: .92em; }
.bf-solo[hidden] { display: none; }
html[data-theme="dark"] .bf-solo { background: #2A2618; color: #F1EEE7; border-color: #8C6F3E; }
.ad-other { opacity: .8; font-style: italic; cursor: default; }
/* v115 retest #17: never a bare header while the desk loads; a calm skeleton until the first view has content */
main.wrap:not(:has(.view.active > *))::before { content: "Loading the desk…"; display: block; margin: 24px 0; padding: 64px 0 0; min-height: 180px; color: var(--muted, #5b6466); font-size: .95em;
  background: linear-gradient(var(--card2, #E8E3D8) 0 0) 0 0 / 40% 22px no-repeat, linear-gradient(var(--card2, #E8E3D8) 0 0) 0 100px / 100% 64px no-repeat, linear-gradient(var(--card2, #E8E3D8) 0 0) 0 176px / 70% 64px no-repeat; animation: skelp 1.4s ease-in-out infinite alternate; }
@keyframes skelp { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { main.wrap:not(:has(.view.active > *))::before { animation: none; } }
/* v115 #21: at high zoom (721-1000 CSS px) the top nav must keep "More" visible */
@media (min-width: 721px) and (max-width: 1000px) {
  html body header.top nav.tabs { gap: 0 !important; }
  html body header.top nav.tabs button { padding-left: 9px !important; padding-right: 9px !important; font-size: 14px !important; }
  html body header.top nav.tabs .tab-more { position: sticky; right: 0; background: var(--slate, #2c4a52) !important; }
}
/* v116 #1: Make-project dialog scrolls as one column, so the map and the building list keep a usable size at 300% zoom */
html body #pjmk-sheet .pjmk-card { overflow-y: auto !important; overflow-x: hidden !important; }
html body #pjmk-sheet .pjmk-card > * { flex-shrink: 0 !important; }
html body #pjmk-sheet .pjmk-map { min-height: 150px; height: 170px; }
html body #pjmk-sheet .pjmk-list { min-height: 120px; }
@media (max-height: 520px) {
  html body #pjmk-sheet { padding: 6px !important; }
  html body #pjmk-sheet .pjmk-card { max-height: calc(100dvh - 12px) !important; }
  html body #pjmk-sheet .pjmk-list { max-height: none !important; overflow: visible !important; }
  html body #pjmk-sheet .pjmk-map { height: 150px; }
}
.pj-map .leaflet-interactive, .pjmk-map .leaflet-interactive { filter: drop-shadow(0 0 1px rgba(0,0,0,.6)); }
/* v116 #6: at 300% zoom (≈340×210 CSS px) the fixed bottom nav covered the placeholder; keep it short and text-first */
@media (max-height: 520px) {
  main.wrap:not(:has(.view.active > *))::before { margin: 8px 0; padding: 0 0 0 0; min-height: 0; height: auto; font-weight: 600; color: var(--ink, #1f2a2c);
    background: none; border-left: 4px solid var(--brass, #B08D57); padding-left: 10px; line-height: 1.6; }
}
/* v116 #9: More sheet: wordmark sits above the title instead of on top of it */
html body #nav-sheet .nav-top .wordmark { display: flex !important; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; line-height: 1.25; white-space: normal; }
html body #nav-sheet .nav-top .wordmark .cv-wm { display: block; position: static !important; margin: 0 !important; font-size: 10px; letter-spacing: .22em; }
html body #nav-sheet .nav-top .nav-brand { min-width: 0; flex: 1 1 auto; margin-right: 8px; }
/* v116 #9: on desktop, Filters is a side panel, not a full-screen sheet */
@media (min-width: 900px) and (min-height: 521px) {
  html body .bf-fsheet .bf-fsheet-in { left: auto !important; right: 0 !important; top: 0 !important; bottom: 0 !important; width: 420px; max-width: 92vw; max-height: none !important; height: 100%; border-radius: 12px 0 0 12px !important; box-shadow: -6px 0 24px rgba(0,0,0,.22); }
}
html body #nav-sheet .nav-top .cv-wm::after { display: none !important; content: none !important; }
/* v117 #1: zoom-to-building buttons in the project lists */
.pjmk-zoom, .pj-zoom { min-width: 32px; min-height: 32px; padding: 0 6px; border: 1px solid var(--hair, #cfc6b5); border-radius: 8px; background: var(--card, #fff); color: var(--ink, #1f2a2c); font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; vertical-align: middle; }
.pjmk-zoom:hover, .pj-zoom:hover { border-color: var(--brass, #B08D57); }
.pjmk-zoom:focus-visible, .pj-zoom:focus-visible { outline: 2px solid var(--brass, #B08D57); outline-offset: 2px; }
/* v118: reports on the Pipeline board */
.pb-type { margin: 4px 0 10px; }
.pbr { margin: 6px 0 18px; }
.pbr-h { margin: 14px 0 4px; font-size: 1.05rem; }
.pbr-sum { margin: 0 0 8px; color: var(--ink, #1f2a2c); }
.pbr-sum small { color: var(--muted, #5d6466); margin-left: 4px; }
.pbr-card .pbr-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin: 0 0 4px; }
.pbr-age { font-size: 12px; color: var(--muted, #5d6466); white-space: nowrap; }
.pbr-price { font-weight: 600; }
.pbr-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pbr-acts .btn { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.pbr-card .rp-chip { white-space: normal; }
html.dark .pbr-sum, [data-theme="dark"] .pbr-sum { color: #e9e4da; }
html.dark .pbr-age, html.dark .pbr-sum small, [data-theme="dark"] .pbr-age, [data-theme="dark"] .pbr-sum small { color: #b9b3a6; }
/* v118: status legend readable at 100% */
.reason.rep-key { font-size: 15px; line-height: 1.6; }
.reason.rep-key .rp-chip { font-size: 13px; }
/* v118: project totals loading state */
.pj-facts-wait .pj-sk { display: block; height: 22px; width: 70%; border-radius: 6px; margin-bottom: 4px; background: linear-gradient(90deg,#E5DFD3 0,#EFEAE0 40%,#E5DFD3 80%); background-size: 200% 100%; animation: skm 1.2s linear infinite; }
html[data-theme="dark"] .pj-facts-wait .pj-sk { background: linear-gradient(90deg,#26302f 0,#313c3b 40%,#26302f 80%); background-size: 200% 100%; }
.pj-tw-wait td:nth-child(n+4) { color: transparent; }
.pj-upd { display: block; font-size: 12px; opacity: .75; }
.dl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { .pj-facts-wait .pj-sk { animation: none; } }
.pbr-hn { font-weight: 400; opacity: .85; }
#pj-map, #pjmk-map { scroll-margin-top: 72px; }
/* v121 #16: no "Stage Stage" where the fact already has its label */
.fact-v .stage-label-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.theme-tg { display: inline-flex; align-items: center; gap: 4px; width: auto !important; padding: 0 8px; }
.theme-tg-t { font-size: 13px; }
@media (max-width: 480px) { .theme-tg-t { display: none; } }

/* ---- v121 "slick" item-page Reports (Tim, 23 Oct 2026): one compact Civic list, small thumb, one-line description,
   compact primary button + "Sample" text link, slim status chip, quiet admin links on one line ---- */
html body .rp-block .rp-grid.rp-list { display: block !important; border: 1px solid var(--line-strong) !important; border-radius: 6px !important; background: var(--card) !important; overflow: hidden; }
html body .rp-block .rp-list > .rp-b, html body .rp-block .rp-list > .rp-b.rp-wrap:has(.rp-test) {
  display: grid !important; width: 100% !important; margin: 0 !important; background: transparent !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; box-shadow: none !important;
  padding: 12px 14px !important; min-height: 0 !important; height: auto !important; column-gap: 12px !important; row-gap: 2px !important; align-items: center !important;
  grid-template-columns: 44px minmax(0,1fr) auto !important; grid-template-areas: "ic t p" "ic d d" ". s s" ". x x" ". y y" !important; }
html body .rp-block .rp-list > .rp-b:first-child { border-top: 0 !important; }
html body .rp-block .rp-list > .rp-b:hover { background: var(--card2) !important; }
html body .rp-block .rp-list .rp-ic { width: 44px !important; height: 44px !important; align-self: start !important; }
html body .rp-block .rp-list .rp-t { font-size: 16.5px !important; line-height: 1.2 !important; min-width: 0; }
html body .rp-block .rp-list .rp-price .pr-v { font-size: 15px !important; }
html body .rp-block .rp-list .rp-price { font-size: 12px !important; white-space: nowrap; }
html body .rp-block .rp-list .rp-d { font-size: 13px !important; line-height: 1.35 !important; color: var(--muted) !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; min-width: 0; }
html body .rp-block .rp-list .rp-d.rp-why { white-space: normal !important; }
/* status: slim chip, no big empty area */
html body .rp-block .rp-list .rp-s { justify-self: start !important; margin-top: 4px !important; font-size: 12px !important; line-height: 1 !important; padding: 4px 9px !important; border: 1px solid var(--line-strong) !important; border-radius: 999px !important; background: var(--card2) !important; min-height: 0 !important; }
html body .rp-block .rp-list > .rp-b.off .rp-s { border: 0 !important; background: none !important; padding: 0 !important; text-decoration: underline; text-underline-offset: 3px; }
html body .rp-block .rp-list .rp-acts2 { padding-top: 8px !important; gap: 6px 14px !important; align-items: center !important; flex-wrap: wrap !important; }
html body .rp-block .rp-list .rp-acts2 .btn { flex: 0 0 auto !important; min-height: 34px !important; height: 34px !important; padding: 0 14px !important; font-size: 13.5px !important; width: auto !important; }
html body .rp-block .rp-list .rp-acts2 .btn-text, html body .rp-block .rp-list .rp-acts2 .rp-smp { background: none !important; border: 0 !important; padding: 0 2px !important; min-height: 0 !important; height: auto !important; color: var(--link, var(--slate)) !important; font-weight: 600 !important; text-decoration: underline; text-underline-offset: 3px; }
html[data-theme="dark"] body .rp-block .rp-list .rp-acts2 .btn-text, html[data-theme="dark"] body .rp-block .rp-list .rp-acts2 .rp-smp { color: var(--brass-l) !important; }
html body .rp-block .rp-list .rp-admrow { grid-area: y; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 6px; font-size: 12px; color: var(--muted); }
html body .rp-block .rp-list .rp-admrow .rp-adm { flex: 0 0 auto !important; min-height: 0 !important; height: auto !important; padding: 0 !important; font-size: 12px !important; font-weight: 500 !important; color: var(--muted) !important; background: none !important; border: 0 !important; text-decoration: underline; text-underline-offset: 3px; }
html body .rp-block .rp-list .rp-admrow .rp-d.rp-test { margin: 0 !important; font-size: 12px !important; white-space: nowrap !important; }
@media (max-width: 480px) { html body .rp-block .rp-list .rp-acts2 .btn-primary { flex: 0 0 auto !important; } }

/* ---- v121 roof material: slim collapsible row with compact pills, brass selected state, small swatch ---- */
html body .rp-lab { border: 1px solid var(--line-strong); border-radius: 6px; background: var(--card); margin: 0 0 10px; padding: 0; }
html body .rp-lab > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; font-size: 14px; min-height: 42px; }
html body .rp-lab > summary::-webkit-details-marker { display: none; }
html body .rp-lab .rp-lab-chev { color: var(--muted); transition: transform .15s; font-size: 12px; }
html body .rp-lab[open] .rp-lab-chev { transform: rotate(180deg); }
html body .rp-lab[open] > summary { border-bottom: 1px solid var(--line); }
html body .rp-lab .lab-grid { display: flex !important; flex-wrap: wrap; gap: 6px !important; padding: 10px 14px 4px; margin: 0 !important; }
html body .rp-lab .lab-grid .seg-btn.lab-c { display: inline-flex !important; align-items: center; gap: 6px; flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; min-height: 32px !important; height: 32px !important; padding: 0 12px !important; border-radius: 999px !important;
  border: 1px solid var(--line-strong) !important; background: var(--card2) !important; color: var(--ink) !important; font-size: 13px !important; font-weight: 500 !important; white-space: nowrap !important; line-height: 1 !important; box-shadow: none !important; }
html body .rp-lab .lab-grid .seg-btn.lab-c::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--sw, #9AA0A0); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); flex: 0 0 auto; }
html body .rp-lab .lab-c[data-k="A"] { --sw: #B9B3A5; } html body .rp-lab .lab-c[data-k="M"] { --sw: #7F8C92; } html body .rp-lab .lab-c[data-k="S"] { --sw: #4A535A; }
html body .rp-lab .lab-c[data-k="T"] { --sw: #A65A3A; } html body .rp-lab .lab-c[data-k="PT"] { --sw: #CFE3D6; } html body .rp-lab .lab-c[data-k="U"] { --sw: transparent; }
html body .rp-lab .lab-c[data-k="D"] { --sw: #B4553C; } html body .rp-lab .lab-c[data-k="ST"] { --sw: #9C8F78; } html body .rp-lab .lab-c[data-k="TH"] { --sw: #C2A25E; }
html body .rp-lab .lab-c[data-k="F"] { --sw: #2B2F31; } html body .rp-lab .lab-c[data-k="G"] { --sw: #BFDCE6; } html body .rp-lab .lab-c[data-k="P"] { --sw: #2D4F7C; } html body .rp-lab .lab-c[data-k="X"] { --sw: transparent; }
html body .rp-lab .lab-grid .seg-btn.lab-c:hover { border-color: var(--brass-l) !important; }
html body .rp-lab .lab-grid .seg-btn.lab-c[aria-pressed="true"] { background: color-mix(in srgb, var(--brass) 16%, var(--card)) !important; border-color: var(--brass) !important; color: var(--ink) !important; font-weight: 600 !important; }
html[data-theme="dark"] body .rp-lab .lab-grid .seg-btn.lab-c[aria-pressed="true"] { background: color-mix(in srgb, var(--brass-l) 22%, var(--card)) !important; border-color: var(--brass-l) !important; }
html body .rp-lab .lab-more { padding: 0 14px 10px; margin: 0 !important; border: 0 !important; }
html body .rp-lab .lab-more > summary { font-size: 12.5px; color: var(--muted); cursor: pointer; padding: 6px 0 0; }
html body .rp-lab .lab-more .lab-grid { padding: 6px 0 0; }

/* ---- v121 dark mode: the "Saved" button was near-black on dark slate ---- */
html[data-theme="dark"] body .bf-actions3 .bf-act.save.on, html[data-theme="dark"] body .bf-act.save.on { background: color-mix(in srgb, var(--brass-l) 20%, var(--card)) !important; border-color: var(--brass-l) !important; color: var(--ink) !important; }
html[data-theme="dark"] body .bf-act.save.on .ico { fill: var(--brass-l) !important; color: var(--brass-l) !important; }

/* v123 #13: unavailable report cards: show the whole description and reason, never an ellipsis */
html body .rp-block .rp-list > .rp-b.off .rp-d, html body .rp-block .rp-list > .rp-b.off .rp-t, html body .rp-list > .rp-b.off .rp-d { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; -webkit-line-clamp: unset !important; }
/* v123 #14: image badges: room to breathe, wrap instead of overlapping, never wider than the photo */
html body .rm-card .rm-photo .rm-score { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px; right: 10px; transform: none !important; }
html body .rm-card .rm-photo .rm-score > *, html body .rm-card .rm-photo .rm-score .badge, html body .rm-card .rm-photo .rm-score .score-badge, html body .rm-card .rm-photo .rm-score .plot-chip { font-size: 12px !important; line-height: 1.3 !important; padding: 4px 10px !important; border-radius: 999px !important; white-space: nowrap; letter-spacing: .01em; }
html body .rm-card .rm-photo .rm-rank { font-size: 12px !important; line-height: 1.3 !important; padding: 4px 10px !important; }

/* v124 #20/#21: high zoom (about 300%: short and narrow viewport) */
@media (max-height: 440px) and (max-width: 560px) {
  html body .top { min-height: 0 !important; padding-top: 4px !important; padding-bottom: 4px !important; }
  /* the header already names the page: drop the repeated in-page title */
  html body .view.active[data-view="pipeline"] > h2:first-of-type, html body .view.active .pg-head .pg-h1, html body .view.active .sv-hd > h2 { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  /* Pipeline: stack the columns instead of scrolling sideways */
  html body .pb-board { display: flex !important; flex-direction: column !important; overflow-x: visible !important; gap: 12px !important; }
  html body .pb-board > * { width: auto !important; min-width: 0 !important; max-width: none !important; flex: 0 0 auto !important; }
  html body .pb-strip { flex-wrap: wrap !important; overflow-x: visible !important; }
  /* Decisions: search box and filters always fit the width */
  html body .view.active input[type="search"], html body .view.active select { max-width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
  html body .view.active[data-view="decisions"] input[type="search"] { width: 100% !important; }
  html body .view.active[data-view="decisions"] select { flex: 1 1 140px; }
}
/* v125: report cards: hold note, per-stage UK times, multi-home tag */
.pbr-note { margin: 6px 0 0; padding: 5px 8px; border-left: 2px solid var(--brass, #8C6F3E); background: rgba(140,111,62,.08); font-size: 12.5px; line-height: 1.35; color: var(--ink, #1f2a2c); border-radius: 0 4px 4px 0; }
.pbr-ts { margin: 6px 0 0; font-size: 11.5px; color: var(--muted, #5d6466); line-height: 1.45; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.pbr-ts small { opacity: .8; }
.pbr-mh { border-color: var(--brass, #8C6F3E); color: var(--brass, #8C6F3E); }
html.dark .pbr-note, [data-theme="dark"] .pbr-note { color: #e9e4da; background: rgba(196,164,108,.12); border-left-color: #c4a46c; }
html.dark .pbr-ts, [data-theme="dark"] .pbr-ts { color: #b9b3a6; }
html.dark .pbr-mh, [data-theme="dark"] .pbr-mh { color: #d8bd8a; border-color: #c4a46c; }
/* v126: board scroll cue so off-screen report columns are easy to reach */
.pbr-scroll { position: relative; }
.pbr-scroll .pbr-board { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 6px; }
.pbr-scroll .pbr-board > .pb-col { scroll-snap-align: start; }
.pbr-cue { display: none; position: absolute; top: 0; right: 0; bottom: 6px; width: 96px; pointer-events: none; align-items: flex-start; justify-content: flex-end; padding: 10px 8px 0 0; font-size: 12px; font-weight: 600; color: var(--brass, #8C6F3E); background: linear-gradient(to right, transparent, var(--paper, #F1EEE7) 70%); }
@media (max-width: 1400px) { .pbr-cue { display: flex; } }
.pbr-scroll.at-end .pbr-cue { display: none; }
html.dark .pbr-cue, [data-theme="dark"] .pbr-cue { color: #d8bd8a; background: linear-gradient(to right, transparent, #1b2226 70%); }
/* v127: the board sits in flex/grid parents whose min-width:auto let it grow to full content width, so it never scrolled and the cue sat off-screen */
.pbr, .pbr-scroll { min-width: 0; max-width: 100%; }
.pbr-scroll { width: 100%; overflow: hidden; }
.pbr-scroll .pbr-board { max-width: 100%; margin-bottom: 0; }
.pbr-cue { z-index: 2; }
.pb-col.pbr-flash { outline: 2px solid var(--brass, #8C6F3E); outline-offset: 2px; transition: outline-color .3s; }
/* v128: cue arrow stays on one line */
.pbr-cue { white-space: nowrap; width: auto; min-width: 120px; }
/* v128: Reports view switch (Ready / In progress / All) and the collapsed status help */
.rep-top { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.rep-view { flex: 1 1 auto; display: flex; }
.rep-view .seg-btn { flex: 1 1 0; min-height: 40px; white-space: nowrap; }
.rep-view .seg-btn small { opacity: .75; margin-left: 2px; }
.rep-help { flex: 0 0 auto; position: static; }
.rep-help > summary { list-style: none; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--brass, #8C6F3E); color: var(--brass, #8C6F3E); display: inline-flex; align-items: center; justify-content: center; font: italic 600 14px/1 Newsreader, Georgia, serif; }
.rep-help > summary::-webkit-details-marker { display: none; }
.rep-help[open] { flex-basis: 100%; }
.rep-help[open] > summary { background: rgba(140,111,62,.12); }
.rep-help .rep-key { margin: 8px 0 0; font-size: 12.5px; }
html.dark .rep-help > summary, [data-theme="dark"] .rep-help > summary { color: #d8bd8a; border-color: #c4a46c; }
/* v129: the cue shows whenever a board overflows sideways (JS sets .ovf from scrollWidth > clientWidth), any width, Buildings and Reports boards */
.pbr-scroll .pbr-cue { display: none !important; }
.pbr-scroll.ovf:not(.at-end) .pbr-cue { display: flex !important; }
.pbr-scroll > .pb-board { overflow-x: auto; max-width: 100%; margin-bottom: 0; }
.pbr-ref { font-variant-numeric: tabular-nums; opacity: .8; }
/* v129: phone header: theme button is icon-only (36px) so the label was clipped; keep it for screen readers only */
@media (max-width: 760px) { html body header.top .theme-tg .theme-tg-t { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; margin: -1px; } html body header.top .theme-tg { justify-content: center; padding: 0 !important; } }

/* v129: item page Reports as one clean, uniform list (Tim, 23 Oct 2026) */
html body .rp-block .rp-hl { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; }
html body .rp-block .rp-hl .rp-h { margin: 0 !important; font-size: 12px !important; letter-spacing: .12em; text-transform: uppercase; font-weight: 700 !important; color: var(--ink) !important; font-family: inherit !important; }
html body .rp-block .rp-hx { color: var(--muted); font-size: 13px; flex: 1 1 auto; }
html body .rp-block .rp-hs { margin-left: auto; padding: 0 !important; min-height: 0 !important; color: var(--link) !important; font-size: 13px !important; background: none !important; border: 0 !important; }
html body .rp-grid.rp-list { gap: 0 !important; border-top: 1px solid var(--line-strong) !important; }
html body .rp-list > .rp-b, html body .rp-list > .rp-b.rp-wrap:has(.rp-test) { display: grid !important; width: 100%; text-align: left; background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--line-strong) !important; border-radius: 0 !important; box-shadow: none !important; padding: 12px 2px !important; min-height: 76px !important;
  grid-template-columns: minmax(0,1fr) auto !important; grid-template-areas: "t p" "d x" "y y" !important; column-gap: 12px !important; row-gap: 2px !important; align-items: center !important; }
html body .rp-list > .rp-b:first-child { border-top: 0 !important; }
html body .rp-list .rp-ic, html body .rp-list .rp-cv, html body .rp-list .rp-smp, html body .rp-list img { display: none !important; }
html body .rp-list .rp-t { grid-area: t; font-size: 17px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .rp-list .rp-price { grid-area: p; justify-self: end; white-space: nowrap; }
html body .rp-list .rp-price .pr-v { font-size: 15px !important; }
html body .rp-list .rp-d { grid-area: d; font-size: 13px !important; line-height: 1.35; color: var(--muted) !important; display: -webkit-box !important; -webkit-line-clamp: 1 !important; -webkit-box-orient: vertical; overflow: hidden; }
html body .rp-list .rp-acts2, html body .rp-list .rp-b > .rp-s { grid-area: x; justify-self: end; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin: 0 !important; }
html body .rp-list .rp-acts2 .btn { min-height: 30px !important; padding: 4px 12px !important; font-size: 13px !important; }
html body .rp-list .rp-b > .rp-s { font-size: 12px !important; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); white-space: nowrap; }
html body .rp-list .rp-b.ready > .rp-s { color: var(--ok, #2f7a4f) !important; }
html body .rp-list .rp-b.ready, html body .rp-list .rp-b.gen { grid-template-areas: "t p" "d s" "x x" "y y" !important; }
html body .rp-list .rp-b.ready > .rp-s, html body .rp-list .rp-b.gen > .rp-s { grid-area: s; }
html body .rp-list .rp-b.ready .rp-acts2 { justify-self: start; justify-content: flex-start; margin-top: 6px !important; }
html body .rp-list .rp-admrow { grid-area: y; display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 2px; }
html body .rp-list .rp-admrow .rp-adm { padding: 0 !important; min-height: 0 !important; font-size: 12px !important; color: var(--muted) !important; text-decoration: underline; background: none !important; border: 0 !important; }
html body .rp-list .rp-admrow .rp-d { display: inline !important; font-size: 12px !important; }
html body .rp-list > .rp-b.off { grid-template-areas: "t p" "d x" !important; }
html body .rp-list > .rp-b.off .rp-t, html body .rp-list > .rp-b.off .rp-price .pr-v, html body .rp-list > .rp-b.off .rp-d { color: var(--muted) !important; }
html body .rp-list > .rp-b.off .rp-why { grid-column: 1 / -1; }
html body .rp-list > button.rp-b.off .rp-why { grid-column: auto; }
/* v129 layout: name + price / description / quiet admin line + action on one line, so every row has the same shape */
html body .rp-block .rp-list > .rp-b, html body .rp-block .rp-list > .rp-b.rp-wrap:has(.rp-test), html body .rp-block .rp-list > .rp-b.ready, html body .rp-block .rp-list > .rp-b.gen, html body .rp-block .rp-list > .rp-b.off {
  grid-template-columns: minmax(0,1fr) auto !important; grid-template-areas: "t p" "d d" "y x" !important; }
html body .rp-block .rp-list > .rp-b > * { grid-column: auto; }
html body .rp-block .rp-list .rp-b.ready > .rp-s, html body .rp-block .rp-list .rp-b.gen > .rp-s { grid-area: x; }
html body .rp-block .rp-list .rp-b.ready .rp-acts2 { grid-area: y; justify-self: start; margin-top: 4px !important; }
html body .rp-block .rp-list .rp-b.ready:has(.rp-acts2) { grid-template-areas: "t p" "d d" "y x" !important; }
html body .rp-block .rp-list .rp-acts2, html body .rp-block .rp-list .rp-b > .rp-s { margin-top: 6px !important; align-self: center; }
html body .rp-block .rp-list .rp-admrow { margin-top: 6px; }
html body .rp-block .rp-list > .rp-b.off .rp-why { grid-column: 1 / -1 !important; }
html body .rp-block .rp-list .rp-t { white-space: normal; }
html body .rp-block .rp-list > .rp-b > .rp-hd > .rp-t, html body .rp-block .rp-list .rp-t { grid-area: t !important; }
html body .rp-block .rp-list .rp-price { grid-area: p !important; }
html body .rp-block .rp-list > .rp-b > .rp-d { grid-area: d !important; }
html body .rp-block .rp-list .rp-wrap > .rp-acts2 { grid-area: x !important; justify-self: end !important; }
html body .rp-block .rp-list .rp-b.ready > .rp-acts2 { grid-area: y !important; justify-self: start !important; }
html body .rp-block .rp-list .rp-admrow { grid-area: y !important; justify-self: start !important; }
html body .rp-block .rp-list .rp-b > .rp-s { grid-area: x !important; justify-self: end !important; }

/* v132 #2: Buildings columns and cards never clip their content (long titles, the Stage select) */
html body .pb-board > .pb-col { min-width: 0 !important; box-sizing: border-box; }
html body .pb-col .pb-list { min-width: 0; }
html body .pb-col .pb-card { min-width: 0 !important; max-width: 100% !important; box-sizing: border-box !important; overflow-wrap: anywhere; }
html body .pb-col .pb-card > *, html body .pb-col .pb-card label { min-width: 0 !important; max-width: 100% !important; }
html body .pb-col .pb-card select { width: 100% !important; min-width: 0 !important; max-width: 100% !important; box-sizing: border-box !important; text-overflow: ellipsis; }
html body .pb-col .pb-card .pb-t { display: block; text-align: left; white-space: normal !important; overflow-wrap: anywhere; }
/* v132 #1: the cue gets its own strip above the board, so it never covers a column heading (300% zoom included) */
html body .pbr-scroll { padding-top: 24px !important; }
html body .pbr-scroll:not(.ovf) { padding-top: 0 !important; }
html body .pbr-scroll .pbr-cue { top: 0 !important; bottom: auto !important; right: 0 !important; height: 22px !important; width: auto !important; min-width: 0 !important; padding: 2px 4px 0 12px !important; align-items: center !important; background: none !important; }
/* v133: building types still loading */
#bt-load { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2000; padding: 6px 12px; border-radius: 999px; font-size: 13px; background: var(--surface, #fff); color: var(--ink, #222); border: 1px solid var(--line, #ccc); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
/* v135: Google Maps button on the item page row: Save · Archive · Maps · ⋮ (fits a 390px phone) */
.bf-actions.bf-actions3.has-maps { grid-template-columns: 1fr 1fr 1fr 48px !important; gap: 8px; }
.bf-actions.bf-actions3.has-maps:not(:has(.more)) { grid-template-columns: 1fr 1.6fr 1fr !important; }
.bf-actions3 a.bf-act.maps { text-decoration: none; color: inherit; min-width: 0; white-space: nowrap; }
.bf-actions3.has-maps .bf-act { min-width: 0; padding-left: 6px; padding-right: 6px; }
.bf-actions3.has-maps .bf-act span { overflow: hidden; text-overflow: ellipsis; }
.bf-actions3 a.bf-act.maps:focus-visible { outline: 2px solid var(--brass-l, currentColor); outline-offset: 2px; }
/* v136 Reports: report-type chip row */
.seg.rep-types { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; gap: 6px; margin: 8px 0 2px; padding: 0 !important; background: none !important; border: 0 !important; }
.seg.rep-types::-webkit-scrollbar { display: none; }
.seg.rep-types .seg-btn { flex: 0 0 auto !important; min-height: 32px !important; padding: 0 12px !important; font-size: 13px !important; white-space: nowrap; border-radius: 999px !important; border: 1px solid var(--line, rgba(46,74,82,.25)) !important; background: transparent !important; color: var(--ink) !important; }
.seg.rep-types .seg-btn[aria-pressed="true"] { background: var(--cv-buy) !important; color: var(--cv-buy-ink) !important; border-color: var(--cv-buy) !important; }
.seg.rep-types .seg-btn small { font-size: 11px; opacity: .75; margin-left: 3px; }
/* v136 Samples: flickable brochure cards */
.cv-card .bk { position: relative; background: var(--cv-stage); }
.bk-t { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; aspect-ratio: 900 / 1274; max-height: 520px; }
.bk-land .bk-t { aspect-ratio: 900 / 637; }
.bk-t::-webkit-scrollbar { display: none; }
.bk-s { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 14px; box-sizing: border-box; }
.bk-s img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 1px 6px rgba(0,0,0,.18); background: #F1EEE7; }
.bk-c { position: absolute; right: 10px; bottom: 10px; font: 600 12px/1 "Hanken Grotesk", system-ui, sans-serif; padding: 5px 8px; border-radius: 999px; background: rgba(27,35,37,.72); color: #F1EEE7; pointer-events: none; }
.bk-a { display: none; position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(241,238,231,.92); color: #2E4A52; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.bk-p { left: 8px; } .bk-n { right: 8px; }
@media (hover: hover) and (pointer: fine) { .bk-a { display: block; } }
.bk.smp-ph .bk-t { background: var(--slate, #2E4A52); }
.bk-sw { display: flex !important; margin: 0 !important; border-radius: 0 !important; padding: 6px !important; gap: 4px; background: var(--cv-stage) !important; border: 0 !important; }
.bk-sw .seg-btn { flex: 1 1 0 !important; min-height: 36px !important; font-size: 14px !important; }
.cv-card .smx-lab { margin: 0; font: 600 11px/1.2 "Hanken Grotesk", system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8C6F3E; }
html[data-theme="dark"] .cv-card .smx-lab { color: #D7C49C; }
.cv-card .smx-body { padding: 16px 18px 18px !important; gap: 6px !important; }
.cv-acts.cv-row { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px !important; }
.cv-row .smx-pv { font-family: var(--serif, "Newsreader", serif); font-size: 24px; font-weight: 500; color: var(--ink); }
.cv-row .cv-buy { min-height: 44px !important; padding: 0 22px !important; }
.cv-card .cv-who { justify-self: start; font-size: 13px; margin-top: 2px; }
.cv-main { border-color: #8C6F3E !important; }
/* v137: stage grows so a shorter (landscape) carousel card matches its neighbours, no gap above the price */
.cv-card .bk:not([hidden]) { flex: 1 1 auto; display: flex; flex-direction: column; }
.cv-card .bk:not([hidden]) .bk-t { flex: 1 1 auto; max-height: none; }
.cv-card .bk-s img { max-height: 520px; }
.cv-card .smx-body { flex: 0 0 auto !important; }
/* v137: high zoom / narrow — Reports chip rows wrap instead of hiding off-screen */
@media (max-width: 560px) {
  .seg.rep-types, .seg.rep-modes, .seg.rep-view { flex-wrap: wrap !important; overflow-x: visible !important; }
  .seg.rep-types .seg-btn, .seg.rep-modes .seg-btn, .seg.rep-view .seg-btn { white-space: normal; }
}

/* polish-1024 accessibility: WCAG AA text contrast + one consistent Civic focus ring */
.seg-btn small { opacity: 1 !important; color: inherit; }
html:not([data-theme="dark"]) body .rp-chip.wait, html:not([data-theme="dark"]) body .rp-chip.review { color: #6F5529 !important; }
.pub-foot a { text-decoration: underline; text-underline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid #8C6F3E !important; outline-offset: 2px; }
html[data-theme="dark"] :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline-color: #C9B48A !important; }

/* owner-1025: title register guide, do-not-contact, letter source */
.owner-guide .og-steps { margin: 10px 0 8px; padding-left: 1.4em; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.45; }
.owner-guide .og-steps li::marker { font-weight: 700; color: var(--brass-t, #725A31); }
.owner-guide .og-steps a, .owner-guide .hint a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.field.field-check { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.field.field-check input { width: 20px; height: 20px; margin: 0; grid-column: 1; grid-row: 1; }
.field.field-check > span:not(.hint) { grid-column: 2; grid-row: 1; align-self: center; color: var(--ink); font-weight: 600; }
.field.field-check .hint { grid-column: 2; grid-row: 2; }
.letter-src { font-size: 14px; }
.letter-dnc { padding: 18px; }
.letter-dnc, .letter-dnc h2, .letter-dnc p, .letter-dnc .btn { color: #1F2627; }
.letter-dnc .warn-box strong { color: #7A2E1A; }

#letter-sheet .letter-dnc .warn-box, html[data-theme="dark"] #letter-sheet .letter-dnc .warn-box { background: #fff4e5 !important; border-color: #C2410C !important; color: #1F2627 !important; }
#letter-sheet .letter-dnc .warn-box *, html[data-theme="dark"] #letter-sheet .letter-dnc .warn-box *, html[data-theme="dark"] #letter-sheet .letter-dnc .btn { color: #1F2627 !important; }
html[data-theme="dark"] #letter-sheet .letter-dnc .warn-box strong { color: #7A2E1A !important; }
/* letter sheet stays light in dark theme: keep its toolbar text dark */
html[data-theme="dark"] #letter-sheet .letter-email-note p, html[data-theme="dark"] #letter-sheet .letter-email-note strong, html[data-theme="dark"] #letter-sheet .letter-tools .btn-secondary, html[data-theme="dark"] #letter-sheet .letter-variants button:not([aria-pressed="true"]) { color: #1F2627 !important; }
/* v152 Roof checks + Industrial tab */
.roof-chk .roof-rows { display: grid; gap: 2px; }
.roof-chk .ad-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.roof-chk .ad-row .ad-name { flex: 1; color: var(--ink); }
.roof-chk .ad-row .ad-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.roof-chk .roof-hint { margin: -6px 0 6px 30px; }
.roof-chk .roof-note { margin: 4px 0 10px; }
.ind-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 16px 0; }
.ind-card h3 { margin: 4px 0 8px; }
.ind-k { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.ind-held { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #fff4e5; color: #7A2E1A; border: 1px solid #C2410C; font-size: 13px; font-weight: 600; }
.ind-soon { margin-top: 8px; }
#view-industrial .bf-kind { margin-bottom: 12px; }

/* menu-1026: grouped More menu, map ⋯ tools, folding Filters, sticky header fix */
#nav-sheet .nav-h.nav-acct { margin-top: 18px !important; padding-top: 14px !important; border-top: 1px solid var(--line, #ddd); }
.loc-more { display: none; }
.bf-row .bf-order { flex: 0 0 auto; margin: 0; }
.bf-row .bf-order .seg-btn { min-height: 40px; font-size: 13px; padding: 0 10px; }
#view-barnfinder.bf-sub-map .bf-row .bf-order { display: none; }
#view-barnfinder:not(.bf-sub-map):not(.bf-sub-list) .bf-row .bf-order { display: none; }
.bf-fsheet-in details.fs-sec { border-bottom: 1px solid var(--line, #e3e3e3); padding: 2px 0; }
.bf-fsheet-in details.fs-sec > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-weight: 600; font-size: 15px; }
.bf-fsheet-in details.fs-sec > summary::-webkit-details-marker { display: none; }
.bf-fsheet-in details.fs-sec > summary::after { content: "▾"; color: var(--muted, #777); transition: transform .15s; }
.bf-fsheet-in details.fs-sec:not([open]) > summary::after { transform: rotate(-90deg); }
.bf-fsheet-in details.fs-sec > .fs-lab-x { display: none !important; }
.bf-fsheet-in details.fs-sec[hidden] { display: none !important; }
html body .bf-fsheet .bf-fsheet-in { padding-top: 0 !important; }
html body .bf-fsheet .bf-fsheet-h { position: sticky !important; top: 0 !important; z-index: 30 !important; margin: 0 -16px 4px !important; padding: 12px 16px 10px !important; background: var(--card, #fff) !important; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.bf-fsheet-h .fs-h-acts { display: flex; gap: 8px; }
.bf-fsheet-h .fs-clear[disabled] { opacity: .45; cursor: default; pointer-events: none; }
@media (pointer: coarse) { #bf-map .leaflet-control-zoom a { width: 34px; height: 34px; line-height: 34px; font-size: 20px; } }
/* reports-1032 #3: folded attribution */
.leaflet-control-attribution.attr-fold:not(.attr-open) { display: none; }
.leaflet-control-attribution.attr-open { max-width: min(320px, calc(100% - 44px)); }
.attr-btn { float: right; clear: both; margin: 0 6px 6px 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line, #ccc); background: var(--card, #fff); color: var(--ink, #111); font: 13px/20px system-ui, sans-serif; padding: 0; cursor: pointer; pointer-events: auto; }
@media (max-width: 720px) {
  .loc-in .loc-more { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; font-size: 20px; line-height: 1; }
  .loc-in .loc-add[data-act="pjsel"] { display: none; }
  body.mt-more .loc-in .loc-add[data-act="pjsel"], .loc-in .loc-add[data-act="pjcancel"] { display: inline-flex; }
  body:not(.mt-more) #bf-legend-host { display: none; }
  body.mt-more .loc-in .loc-more { box-shadow: inset 0 0 0 2px var(--brand, #B08D57) !important; }
  #view-barnfinder .bf-row { flex-wrap: wrap !important; }
  #view-barnfinder .bf-row .bf-order { order: 3 !important; flex: 1 1 100% !important; width: 100% !important; }
  .bf-row .bf-order .seg-btn { flex: 1 1 50%; font-size: 13px; min-height: 36px; }
}
/* reports-1026 polish */
html body nav.tabs .tab-badge { position: absolute !important; top: 0 !important; left: calc(50% + 9px) !important; margin: 0 !important; font-size: 11px !important; line-height: 16px !important; min-width: 16px !important; }
html body nav.tabs button, html body nav.tabs .tab { position: relative; }
img.lz-wait { visibility: hidden; }
img.lz-fail { display: flex; align-items: center; justify-content: center; min-height: 80px; font-size: 13px; color: var(--muted); }
.smp-ov { padding: 8px !important; overflow: auto; }
.smp-ov-bar { flex-wrap: wrap; font-size: 16px; }
.smp-ov iframe { min-height: 60vh; }
html[data-theme="dark"] .smp-ov { background: rgba(0,0,0,.85) !important; }
html[data-theme="dark"] .smp-ov-bar { background: var(--card, #1f2a2d) !important; color: var(--ink, #e8e4dc) !important; }
html[data-theme="dark"] .smp-ov iframe { background: #1b2325 !important; filter: invert(.9) hue-rotate(180deg); }
html[data-theme="dark"] .sv-s, html[data-theme="dark"] .sv-m, html[data-theme="dark"] #view-saved .reason { color: #c9cfd2 !important; }
html[data-theme="dark"] #view-saved .badge.muted { background: #3a4a4f !important; color: #eef1f2 !important; }
/* reports-1027: empty state over the map */
.bf-map-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 600; background: var(--card, #fff); color: inherit; padding: 12px 16px; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.18); font-size: 14px; display: flex; gap: 10px; align-items: center; max-width: 80%; }
.bf-map-empty[hidden] { display: none; }
/* v230: phone - the text collapsed to zero width (one letter per line) */
.bf-map-empty { width: max-content; max-width: min(90%, 360px); flex-wrap: wrap; justify-content: center; text-align: center; }
.bf-map-empty .bfe-t { flex: 0 0 auto; white-space: nowrap; }
.bf-map-empty .btn { flex: 0 0 auto; white-space: nowrap; }
body.ui-adding .bf-map-empty, body.ui-drawing .bf-map-empty, body.ed-on .bf-map-empty { display: none !important; }
/* reports-1028: filters-on chip */
.bf-filt-chip { display: inline-flex; gap: 6px; align-items: center; margin: 2px 0 6px; padding: 2px 10px; border-radius: 999px; background: #fdf3e1; color: #6b4e16; font-size: 12px; border: 1px solid #e9d3a6; }
.bf-filt-chip[hidden] { display: none; }
.bf-filt-chip .btn-link { padding: 0; min-height: 0; font-size: 12px; }
body.dark .bf-filt-chip, [data-theme="dark"] .bf-filt-chip { background: #3a2f1a; color: #f3dfb5; border-color: #5a4724; }
/* reports-1028 #26: on wide screens the tab icon sits left of the label, so the badge goes inline after the label (no overlap) */
@media (min-width: 700px) { html body nav.tabs .tab-badge { position: static !important; display: inline-block !important; margin: 0 0 0 6px !important; vertical-align: 1px; transform: none !important; } }
/* reports-1034: Plot concept pack chooser: bottom sheet on phones, centred modal on desktop */
#cp-sheet { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: flex-end; justify-content: center; }
#cp-sheet[hidden] { display: none !important; }
#cp-sheet .cp-bg { position: absolute; inset: 0; background: rgba(15,20,22,.5); }
#cp-sheet .cp-card { position: relative; width: 100%; max-width: 560px; max-height: calc(100dvh - 24px); overflow-y: auto; background: var(--card); color: var(--ink); border-radius: 16px 16px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 30px rgba(0,0,0,.25); transition: transform .15s; }
#cp-sheet .cp-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 2px auto 10px; }
#cp-sheet .cp-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
#cp-sheet .cp-h { font-family: var(--serif) !important; font-size: 24px; margin: 0; line-height: 1.2; color: var(--ink); }
#cp-sheet .cp-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
#cp-sheet .cp-x { min-width: 48px; min-height: 48px; margin: -8px -10px 0 0; border: 0; background: none; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; border-radius: 8px; }
#cp-sheet .cp-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
#cp-sheet .cp-opt { display: flex; align-items: center; gap: 12px; min-height: 64px; width: 100%; text-align: left; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); cursor: pointer; font: inherit; }
#cp-sheet .cp-opt.on { border: 2px solid var(--accent); padding: 11.5px 13.5px; background: var(--accent-soft, var(--card2)); }
html[data-theme="dark"] #cp-sheet .cp-opt.on { background: var(--card2); }
#cp-sheet .cp-opt.off { cursor: not-allowed; opacity: .55; }
#cp-sheet .cp-opt:focus-visible, #cp-sheet .cp-x:focus-visible, #cp-sheet .cp-lnk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#cp-sheet .cp-ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: var(--card2); color: var(--accent); }
#cp-sheet .cp-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#cp-sheet .cp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
#cp-sheet .cp-t { font-weight: 700; font-size: 16px; }
#cp-sheet .cp-p { font-family: var(--serif); font-size: 18px; margin-left: auto; white-space: nowrap; }
#cp-sheet .cp-d { color: var(--muted); font-size: 13.5px; line-height: 1.35; }
#cp-sheet .cp-chk { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
#cp-sheet .cp-opt.on .cp-chk { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
html body #cp-sheet .cp-go { width: 100% !important; min-height: 48px !important; font-size: 16px !important; }
#cp-sheet .cp-adm { margin: 8px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
#cp-sheet .cp-lnk { min-height: 48px; padding: 0 6px; border: 0; background: none; color: var(--link); text-decoration: underline; font: inherit; cursor: pointer; }
@media (min-width: 720px) and (min-height: 520px) {
  #cp-sheet { align-items: center; }
  #cp-sheet .cp-card { border-radius: 14px; padding: 20px 24px 20px; max-height: calc(100dvh - 48px); }
  #cp-sheet .cp-grab { display: none; }
}
#cp-sheet .cp-note { font-size: 12.5px; color: var(--warn); line-height: 1.35; }
html[data-theme="dark"] #cp-sheet .cp-note { color: var(--brass-l); }
/* v186 map 3: at high browser zoom (300%) the item map kept 240 px under the sticky header and tab bar; give it room */
#view-barnfinder.has-barn #bf-map { min-height: 300px !important; }
@media (max-height: 520px) { #view-barnfinder.has-barn #bf-map { height: max(300px, calc(100vh - 40px)) !important; min-height: 300px !important; scroll-margin-top: 72px; } }
/* v187: the page-level filter chip (and its Clear) hides while the Filters sheet is open; the sheet has its own Clear */
body.fs-open .bf-filt-chip { display: none !important; }
/* v188: the 'Saved filter on' banner's Clear hides while the Filters sheet is open (the sheet has its own Clear) */
body.fs-open #bf-solo [data-act="bfclearall"] { display: none !important; }
.cp-card.pay-ok .cp-sum { margin: 6px 0 14px; font-size: 14px; line-height: 1.45; }
.cp-card.pay-ok .cp-go + .cp-go { margin-top: 8px; }
/* v189: Cancel under Continue on the plot chooser */
.cp-card .cp-go.cp-cancel { margin-top: 8px; }
/* v192: compact Reports / Saved toolbars (Tim, 27 Oct 2026) */
.rep-top { flex-wrap: nowrap; }
.rep-top .rep-view { flex: 1 1 auto; min-width: 0; }
.rep-i { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--brass, #8C6F3E); color: var(--brass, #8C6F3E); background: transparent; font: italic 600 15px/1 Georgia, serif; cursor: pointer; }
.rep-i[aria-expanded="true"] { background: rgba(140,111,62,.12); }
.rep-helpbox .rep-key { margin: 0 0 10px; font-size: 13px; line-height: 1.5; }
.rep-bar, .sv-tools { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.rep-bar .rep-q, .sv-tools .sv-q { width: 100%; min-height: 40px; }
.rep-sels { display: flex; gap: 8px; min-width: 0; }
.rep-sel, .sv-tools select.rep-sel { flex: 1 1 0; min-width: 0; min-height: 38px; padding: 6px 8px; border: 1px solid var(--line, rgba(0,0,0,.2)); border-radius: 6px; background: var(--card); color: inherit; font-size: 14px; }
.sv-list.rp-cards { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 10px; }
.sv-li { list-style: none; margin: 0; padding: 0; border: 0; }
.sv-rc .rm-title .sv-open { font: inherit; color: inherit; text-align: left; padding: 0; background: none; border: 0; }
.sv-rc .sv-sc { font-weight: 600; }
.sv-tools input.sv-q { flex: 0 0 auto !important; height: 40px; }
.sv-tools .rep-sels select.rep-sel { flex: 1 1 0 !important; width: 0; }
.rep-sels select.rep-sel { width: 0; }
.sv-rc .rp-acts { align-items: center; }
.rep-view .seg-btn small { white-space: nowrap; }
.sv-rc .sv-ic { display: inline-flex !important; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line, rgba(0,0,0,.2)); border-radius: 6px; background: transparent; color: inherit; font-size: 17px; cursor: pointer; }
.sv-rc .sv-ic svg { width: 18px; height: 18px; }
.sv-rc .sv-ic.on { color: var(--brass, #8C6F3E); }
.rep-sel { font-size: 13.5px; padding: 6px 6px; }
.cp-sum .cp-price { font-size: 22px; }
.cp-sum .cp-full { color: var(--muted, #6b6b6b); font-size: 12.5px; }
.cp-err { margin: 8px 0 14px; padding: 10px 12px; border-radius: 8px; background: #fbeaea; color: #8a1f1f; border: 1px solid #e7bcbc; font-weight: 600; }
.cp-err small { font-weight: 400; }
/* v194: Reports heading, sub-line and See samples on one line; sub-line shortens, then truncates */
html body .rp-block .rp-hl { flex-wrap: nowrap; min-width: 0; }
html body .rp-block .rp-hl .rp-h, html body .rp-block .rp-hs { flex: 0 0 auto; white-space: nowrap; }
html body .rp-block .rp-hx { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .rp-block .rp-hx-s { display: none; }
@media (max-width: 430px) { html body .rp-block .rp-hx-l { display: none; } html body .rp-block .rp-hx-s { display: inline; } }
/* v198 Deal appraisal inputs sheet */
.ap-card{max-height:92vh;overflow:auto}
.ap-form{display:grid;gap:10px}
.ap-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:10px}
.ap-f{display:grid;gap:4px;font-size:.92rem}
.ap-f input{font:inherit;padding:10px;border:1px solid var(--line,#c9c2b5);border-radius:8px;background:var(--bg,#fff);color:inherit;min-width:0}
.ap-f small{opacity:.75;font-size:.8rem}
.ap-pd{display:grid;gap:6px}
.ap-pdmsg:empty,.ap-live:empty{display:none}
.ap-live{font-weight:600;margin:0}
.ap-chk{display:flex;gap:8px;align-items:flex-start;font-size:.92rem}
.ap-finf{display:grid;gap:8px}
.ap-finf[hidden]{display:none}
.ap-card,.ap-card *{box-sizing:border-box;overflow-wrap:anywhere}
.ap-card{max-width:100%}
.ap-f input{width:100%}
.ap-pd .btn,.ap-form .cp-go{max-width:100%;white-space:normal}

/* header-1027: compact Find header. One chip row for filters, no banners; one muted count line in List; sort beside search */
#view-barnfinder #bf-solo, #view-barnfinder .bf-filt-chip { display: none !important; }
#view-barnfinder.bf-sub-list .bf-sum { display: none; }
.bf-enq { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 6px; }
.bf-enq .chip { min-height: 30px; padding: 2px 12px; font-size: 13px; border-radius: 999px; width: auto; flex: 0 0 auto; }
.bf-enq .chip[aria-pressed="true"] { background: #2E4A52; color: #fff; border-color: #2E4A52; }
.bf-enq .bf-fchip { background: #F6F0E2; color: #4a3a17; border: 1px solid #C9B48A; }
.bf-enq .bf-clearall { min-height: 0; padding: 2px 4px; font-size: 13px; border: 0; background: none; text-decoration: underline; color: inherit; width: auto; }
html[data-theme="dark"] .bf-enq .chip[aria-pressed="true"] { background: #9CC3CC; color: #10191C; border-color: #9CC3CC; }
html[data-theme="dark"] .bf-enq .bf-fchip { background: #2A2618; color: #F1EEE7; border-color: #8C6F3E; }
#view-barnfinder .rm-count#bf-list-count { margin: 2px 0 6px; font-size: 13px; line-height: 1.4; color: var(--muted, #6b7280); white-space: normal; overflow-wrap: anywhere; }
/* v201 (Barry): × clear inside the search box */
#view-barnfinder .bf-qwrap { position: relative; flex: 1 1 auto; min-width: 0; display: flex; }
#view-barnfinder .bf-qwrap #bf-q { flex: 1 1 auto; min-width: 0; width: 100%; padding-right: 36px; }
#view-barnfinder .bf-qwrap #bf-q::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
#view-barnfinder .bf-qx { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted, #6b7280); font-size: 20px; line-height: 1; cursor: pointer; }
#view-barnfinder .bf-qx:hover, #view-barnfinder .bf-qx:focus-visible { background: var(--line, rgba(0,0,0,.08)); color: var(--ink, inherit); }
#view-barnfinder .bf-qx[hidden] { display: none; }
/* v201: appraisal sheet total + live preview */
.ap-card .ap-tot { display: flex; justify-content: space-between; margin: 10px 0 4px; padding-top: 8px; border-top: 1px solid var(--line, rgba(0,0,0,.12)); font-size: 15px; }
.ap-card .ap-live { font-size: 13.5px; }
.ap-card .ap-live.ap-ok { font-weight: 600; }
.bf-qrow { display: flex; gap: 6px; align-items: center; }
.bf-qrow #bf-q { flex: 1 1 auto; min-width: 0; }
.bf-qrow .bf-order { flex: 0 0 auto; margin: 0; }
.bf-qrow .bf-order .seg-btn { min-height: 40px; font-size: 13px; padding: 0 10px; }

/* v204 header/toolbar rhythm: one control height, one gap, aligned edges */
:root { --hdr-ctl: 44px; --hdr-gap: 8px; }
@media (min-width: 768px) { :root { --hdr-ctl: 42px; } }
.theme-tg .theme-tg-t { display: none !important; }
.theme-tg { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
#bf-enq:empty { display: none !important; }
.seg.bf-kind, .bf-row { margin: 0 0 var(--hdr-gap) !important; }
.bf-row { display: flex; align-items: stretch; gap: var(--hdr-gap); }
.seg.bf-kind, .seg.bf-sub, .seg.bf-order { height: var(--hdr-ctl); box-sizing: border-box; padding: 3px; align-items: stretch; }
.seg.bf-kind .seg-btn, .seg.bf-sub .seg-btn, .seg.bf-order .seg-btn { height: auto; min-height: 0; }
.bf-row .bf-filt-btn { height: var(--hdr-ctl); min-height: 0; box-sizing: border-box; margin: 0; flex: 0 0 auto; }
#bf-list-count { margin: 0 0 var(--hdr-gap) !important; }
.bf-sum { margin: 0 0 var(--hdr-gap) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 18px; }
#loc-host .loc-bar, .bf-qrow { display: flex; align-items: stretch; gap: var(--hdr-gap); margin: 0 0 var(--hdr-gap) !important; }
#loc-q, #loc-host .loc-add, #bf-q { height: var(--hdr-ctl); min-height: 0; box-sizing: border-box; margin: 0; }
.bf-qrow .bf-qwrap { flex: 1 1 auto; display: flex; }
.bf-qrow .bf-qwrap #bf-q { width: 100%; }
#loc-host .loc-bar .loc-in { flex: 1 1 auto; display: flex; min-width: 0; } #loc-host .loc-bar #loc-q { width: 100%; }
html body header.top .theme-tg { width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; } /* v206: 44px tap target */
/* v208: inline Stripe-cancel banner on the item */
.pay-cancel-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line-strong); border-left: 4px solid var(--brass, #8C6F3E); background: var(--card); color: var(--ink); border-radius: 4px; font-size: 14px; }
.pay-cancel-note .pcn-x { flex: 0 0 auto; width: 44px; height: 44px; margin: -10px -8px -10px 0; border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; }
/* v208: test-price notes are plain muted text, never button-like */
.ao-test, #cp-sheet .cp-adm > span, .cp-sum .cp-full { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; color: var(--muted) !important; font-weight: 400 !important; font-size: 12.5px; display: inline; text-align: inherit; }
.ao-test { display: block; margin: 0 16px 4px !important; }

/* v209 */
.rep-new{outline:2px solid #22c55e;outline-offset:2px;border-radius:8px;background:rgba(34,197,94,.12)}
.pay-paid-note{border-color:#22c55e}
.pl-paid{color:#16a34a;font-weight:600}
html.payret main.wrap > .view{visibility:hidden}
html.payret main.wrap::before{content:"Returning from checkout…" !important;display:block !important;margin:24px 0;padding:24px 0 0 10px;border-left:4px solid #B08D57;font-weight:600;color:var(--text,#1f2a2c)}

/* v210 (Tim, iPad): Find header on one row at 700px+ (kind | Map/List | Filters | search + Add + Select); phone stays stacked */
.bf-top-loc:empty { display: none; }
@media (min-width: 700px) {
  #view-barnfinder .bf-top.bf-one { display: flex; align-items: center; gap: var(--hdr-gap); margin: 0 0 var(--hdr-gap); }
  #view-barnfinder .bf-top.bf-one > .seg.bf-kind { flex: 0 1 auto; width: auto; max-width: none !important; margin: 0 !important; }
  #view-barnfinder .bf-top.bf-one > .seg.bf-kind .seg-btn { flex: 0 0 auto; padding-left: 12px; padding-right: 12px; font-size: 14px !important; }
  #view-barnfinder .bf-top.bf-one > .bf-row { flex: 0 0 auto; margin: 0 !important; flex-wrap: nowrap !important; }
  #view-barnfinder .bf-top.bf-one > .bf-row .seg.bf-sub { flex: 0 0 auto !important; }
  #view-barnfinder .bf-top.bf-one > .bf-row .seg.bf-sub .seg-btn { padding-left: 10px; padding-right: 10px; }
  #view-barnfinder .bf-top.bf-one > .bf-row .bf-filt-btn { margin-left: 0; padding-left: 12px; padding-right: 12px; }
  #view-barnfinder .bf-top.bf-one > .bf-top-loc { flex: 1 1 auto; min-width: 0; }
  #view-barnfinder .bf-top.bf-one #loc-host .loc-bar { margin: 0 !important; }
  #view-barnfinder .bf-top.bf-one #loc-host .loc-add { padding-left: 10px; padding-right: 10px; white-space: nowrap; }
  #view-barnfinder .bf-top.bf-one #loc-q { min-width: 120px; }
}
@media (min-width: 700px) and (max-width: 900px) {
  #view-barnfinder .bf-top.bf-one { gap: 6px; }
  #view-barnfinder .bf-top.bf-one > .seg.bf-kind .seg-btn { padding-left: 9px; padding-right: 9px; font-size: 13px !important; }
  #view-barnfinder .bf-top.bf-one > .bf-row .seg.bf-sub .seg-btn span, #view-barnfinder .bf-top.bf-one > .bf-row .bf-filt-btn > span:not(.bf-filt-n) { font-size: 13px; }
}

/* v210 (Tim, iPad): Pipeline boards. Columns are only as tall as their own cards (no stretched empty columns);
   flatter look: no column boxes, one light card per item, notes as a plain rule, even spacing. */
.pb-board { align-items: start; }
html body .pb-board > .pb-col { align-self: start; height: auto; min-height: 0; background: transparent; border: 0; border-top: 2px solid var(--line, rgba(127,127,127,.25)); border-radius: 0; padding: 10px 0 4px; }
html body .pb-board > .pb-col.pb-over { border-top-color: var(--accent, #c4a46c); }
.pb-h { margin: 0 0 10px; font-size: .95rem; display: flex; align-items: center; gap: 6px; }
.pb-list { gap: 10px; }
.pb-card { box-shadow: none; border: 1px solid var(--line, rgba(127,127,127,.22)); background: var(--card2, transparent); padding: 12px; border-radius: 10px; }
.pb-empty { margin: 2px 0; }
.pbr-card .pbr-top { margin: 0 0 6px; }
.pbr-card .pb-t { margin: 0 0 4px; font-size: 1.02rem; }
.pbr-card .pb-s { margin: 0 0 4px; }
.pbr-note { background: none !important; border-radius: 0; padding: 0 0 0 10px; margin: 8px 0 0; }
.pbr-ts { margin-top: 8px; }
.pbr-acts { margin-top: 10px; }
.pbr-h { margin: 18px 0 6px; }
.pbr-sum { margin: 0 0 14px; line-height: 1.55; font-size: 14px; }
.pbr-sum small { display: block; margin: 2px 0 0; }
/* v210: a long column (e.g. Ready) scrolls inside itself so the page doesn't run into empty space under the short columns */
@media (min-width: 600px) { .pb-board .pb-col .pb-list { max-height: calc(100vh - 240px); max-height: calc(100dvh - 240px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; } }
