/* SAS Hub — design tokens and components. See docs/DESIGN.md.
   Register: premium UK estate agency. Serif display, deep ink, stone paper,
   fine rules, one dark masthead per screen at most. Signal colours only for verdicts. */

/* Design tokens now live in css/tokens.css, loaded before this file. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
body.sheet-open, body.more-open { overflow: hidden; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── Type ────────────────────────────────────────────────────── */
h1 { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 6px; font-variation-settings: 'opsz' 48; }
h2, .h-section { font-family: var(--serif); font-weight: 500; font-size: 23px; line-height: 1.2; margin: 0 0 14px; letter-spacing: -0.005em; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-muted); font-size: 14px; }
.body { font-size: 16px; }
.small { font-size: 13px; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; }
.good { color: var(--good); } .caution { color: var(--caution); } .risk { color: var(--risk); }
.page-head { margin: 4px 0 24px; max-width: 620px; }
.page-head p { margin: 0; font-size: 16px; color: var(--ink-muted); }
@media (max-width: 600px) { h1 { font-size: 30px; } }

/* ── Layout ───────────────────────────────────────────────────── */
.auth-loading { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100vh; color: var(--ink-muted); }
.spin { width: 18px; height: 18px; border: 2px solid var(--rule); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.rail { position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail-w); background: var(--surface); border-right: 1px solid var(--rule); display: flex; flex-direction: column; overflow-y: auto; padding: 28px 16px 20px; }
.rail-brand { padding: 0 12px 20px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.rail-brand img { width: 128px; display: block; }
.rail-tag { font-family: var(--serif); font-size: 18px; color: var(--ink); margin-top: 12px; }
.rail-tag small { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); margin-top: 4px; }
.rail-group { margin-top: 10px; }
.rail-heading { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); padding: 14px 12px 6px; font-weight: 500; }
.rail-user { margin-top: auto; padding: 18px 12px 0; border-top: 1px solid var(--rule); }
.rail-user-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-user-email { font-size: 13px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 12px; }

.nav-item { display: flex; align-items: center; width: 100%; text-align: left; padding: 9px 12px; min-height: 42px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink-soft); font-size: 15px; cursor: pointer; text-decoration: none; position: relative; }
.nav-item:hover { background: var(--paper); color: var(--ink); }
.nav-item.active { background: var(--ink); color: #fff; font-weight: 500; }

.main { margin-left: var(--rail-w); padding: 40px 48px 64px; max-width: calc(var(--rail-w) + 860px); }
.page { display: none; }
.page.active { display: block; }

.topbar, .tabbar, .more-sheet { display: none; }

@media (max-width: 900px) {
  .rail { display: none; }
  .main { margin-left: 0; padding: 16px 18px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); max-width: none; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; background: rgba(245, 244, 240, .92); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--rule); padding: 12px 18px; margin: -16px -18px 20px; }
  .topbar-title { font-family: var(--serif); font-size: 19px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--rule); }
  .tab { border: 0; background: none; font-size: 11px; letter-spacing: .02em; color: var(--ink-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 44px; cursor: pointer; }
  .tab.active { color: var(--ink); font-weight: 600; }
  .tab.active .tab-glyph { color: var(--ink); }
  .tab-glyph { font-size: 20px; line-height: 1; color: var(--ink-muted); }
  .tab-primary { color: var(--ink); }
  .tab-primary .tab-glyph { background: var(--ink); color: #fff; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 6px 14px -6px rgba(21, 24, 30, .5); }
  .more-sheet { display: block; position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 25; background: var(--surface); border-top: 1px solid var(--rule); border-radius: 16px 16px 0 0; padding: 10px 10px 14px; transform: translateY(110%); transition: transform .22s ease; max-height: 70vh; overflow: auto; box-shadow: var(--shadow-sheet); }
  .more-sheet.open { transform: none; }
}

/* ── Panels ───────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 22px; margin-bottom: 18px; box-shadow: var(--shadow-panel); }
.panel-tight { padding: 4px 22px; }
.panel > h2:first-child { margin-top: 2px; }
@media (max-width: 600px) { .panel { padding: 18px; } .panel-tight { padding: 2px 18px; } }

/* Dark masthead: one per screen at most. */
.hero { background: linear-gradient(160deg, var(--masthead) 0%, var(--masthead-2) 100%); color: #fff; border: 0; box-shadow: 0 18px 40px -22px rgba(21, 24, 30, .6); padding: 26px 24px; }
.hero .muted, .hero .verdict-fig-label { color: rgba(255, 255, 255, .62); }
.hero .h-section { color: #fff; }
.hero .progress { background: rgba(255, 255, 255, .14); }
.hero .progress > span { background: #fff; }
.hero .progress-good > span { background: #6FCF97; }
.hero .btn-primary { background: #fff; border-color: #fff; color: var(--ink); }
.hero .btn-primary:hover { background: var(--paper); }
.hero .big-count { font-family: var(--serif); font-size: 56px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }

.verdict { border-radius: var(--radius); padding: 28px 26px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--rule-strong); box-shadow: var(--shadow-panel); }
.verdict-good { background: var(--good-tint); border-top-color: var(--good); }
.verdict-caution { background: var(--caution-tint); border-top-color: var(--caution); }
.verdict-risk { background: var(--risk-tint); border-top-color: var(--risk); }
.verdict-headline { font-family: var(--serif); font-size: 42px; font-weight: 500; line-height: 1.05; margin: 0 0 20px; letter-spacing: -0.015em; }
.verdict-good .verdict-headline { color: var(--good); }
.verdict-caution .verdict-headline { color: var(--caution); }
.verdict-risk .verdict-headline { color: var(--risk); }
.verdict-figs { display: flex; gap: 40px; flex-wrap: wrap; margin-bottom: 14px; }
.verdict-fig { font-family: var(--serif); font-size: 36px; font-weight: 500; line-height: 1.05; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.verdict-fig-label { font-size: 13px; color: var(--ink-muted); margin-top: 4px; }
.verdict p { margin: 0; color: var(--ink-soft); }
@media (max-width: 420px) { .verdict { padding: 22px 20px; } .verdict-headline { font-size: 32px; } .verdict-fig { font-size: 30px; } .verdict-figs { gap: 24px; } }

/* ── Rows ─────────────────────────────────────────────────────── */
.rows { margin: 0; padding: 0; list-style: none; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--rule); min-height: 48px; }
.row:first-child { border-top: 0; }
.row.clickable { cursor: pointer; }
.row.clickable:hover { background: var(--paper); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: var(--radius-sm); }
.row.clickable:hover + .row { border-top-color: transparent; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 500; }
.row-sub { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.row-val { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row-val-lg { font-size: 20px; font-weight: 500; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 16px; }
.kv:first-child { border-top: 0; }
.kv-total { border-top: 1px solid var(--rule-strong); font-weight: 500; }

/* ── Tables ───────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 16px; }
.tbl th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); padding: 8px 8px 10px; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.tbl td { padding: 12px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tbl tr.current td { background: var(--paper); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl-sticky thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--ink); }

/* ── Forms ────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--ink-muted); margin-bottom: 6px; }
.field input, .field select, .field textarea, .input { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 16px; transition: border-color .12s, box-shadow .12s; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 24, 30, .08); }
.field textarea { min-height: 92px; resize: vertical; }
.field input:disabled { background: var(--paper); color: var(--ink-muted); }
.field .hint { display: block; font-size: 13px; color: var(--ink-muted); margin-top: 5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 18px; }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.error { color: var(--risk); font-size: 13px; margin: 0 0 8px; }
.success { color: var(--good); font-size: 13px; margin: 0 0 8px; }
input[type=range] { width: 100%; accent-color: var(--ink); min-height: 44px; }
.control { display: grid; grid-template-columns: 1fr 100px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.control:first-child { border-top: 0; }
.control-label { font-weight: 500; }
.control input[type=number] { min-height: 44px; padding: 8px 10px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); width: 100%; text-align: right; font-family: var(--mono); }
.control-range { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--ink); flex-shrink: 0; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 15px; font-weight: 500; letter-spacing: .01em; cursor: pointer; text-decoration: none; background: var(--surface); color: var(--ink); transition: background .12s, border-color .12s, transform .06s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.btn-secondary { border-color: var(--rule-strong); }
.btn-secondary:hover { background: var(--paper); border-color: var(--ink-muted); }
.btn-ghost { background: none; color: var(--brand); padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { background: var(--brand-tint); }
.btn-danger { border-color: var(--risk); color: var(--risk); }
.btn-danger:hover { background: var(--risk-tint); }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 18px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-icon { width: 44px; height: 44px; border: 0; background: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 18px; color: var(--ink-muted); }
.btn-icon:hover { background: var(--paper); color: var(--ink); }
.row-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-actions .btn { flex: 1 1 auto; }

/* ── Choice grid (large tap targets) ──────────────────────────── */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 18px; }
.choice { min-height: 62px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: 16px; font-weight: 500; cursor: pointer; padding: 8px; transition: background .12s, border-color .12s; }
.choice:hover { border-color: var(--ink-muted); }
.choice.selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.choice-full { grid-column: 1 / -1; }

/* ── Tags ─────────────────────────────────────────────────────── */
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; letter-spacing: .02em; border: 1px solid var(--rule-strong); color: var(--ink-muted); white-space: nowrap; background: var(--surface); }
.tag-good { color: var(--good); border-color: rgba(27, 127, 75, .35); background: var(--good-tint); }
.tag-caution { color: var(--caution); border-color: rgba(168, 105, 11, .35); background: var(--caution-tint); }
.tag-risk { color: var(--risk); border-color: rgba(179, 38, 30, .35); background: var(--risk-tint); }
.tag-brand { color: var(--brand-deep); border-color: rgba(46, 90, 172, .35); background: var(--brand-tint); }

/* ── Bands (rent, long stay) ──────────────────────────────────── */
.band-track { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--good), var(--caution), var(--risk)); margin: 14px 0 8px; }
.band-marker { position: absolute; top: -5px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; transform: translateX(-50%); box-shadow: 0 2px 6px rgba(21, 24, 30, .3); }
.band-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-muted); font-family: var(--mono); }
.score-track { height: 10px; border-radius: 5px; background: var(--paper-deep); overflow: hidden; margin: 10px 0 14px; }
.score-fill { height: 100%; border-radius: 5px; }
.score-fill-High { background: var(--good); } .score-fill-Medium { background: var(--caution); } .score-fill-Low { background: var(--risk); }
.score-head { display: flex; align-items: baseline; gap: 14px; }
.score-num { font-family: var(--serif); font-size: 40px; font-weight: 500; line-height: 1; }
.factor { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--rule); }
.factor-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; border: 2px solid var(--rule-strong); }
.factor-found .factor-dot { background: var(--good); border-color: var(--good); }
.factor-failed .factor-dot { background: var(--caution); border-color: var(--caution); }

/* ── Progress ─────────────────────────────────────────────────── */
.progress { height: 8px; background: var(--paper-deep); border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.progress-good > span { background: var(--good); }
.big-count { font-family: var(--serif); font-size: 44px; font-weight: 500; line-height: 1.05; letter-spacing: -0.015em; }

/* ── Folds ────────────────────────────────────────────────────── */
details.fold { border-top: 1px solid var(--rule); }
details.fold:first-of-type { border-top: 0; }
details.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; cursor: pointer; font-weight: 500; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: '›'; color: var(--ink-muted); font-size: 22px; transform: rotate(90deg); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(-90deg); }
details.fold .fold-body { padding-bottom: 14px; }
.fold-val { font-family: var(--mono); color: var(--ink-muted); margin-left: auto; }

/* ── Sheet ────────────────────────────────────────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(21, 24, 30, .5); opacity: 0; transition: opacity .2s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 18px 18px 0 0; transform: translateY(100%); transition: transform .25s ease; padding-bottom: env(safe-area-inset-bottom); box-shadow: var(--shadow-sheet); }
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 10px 6px 20px; }
.sheet-title { font-family: var(--serif); font-size: 23px; }
.sheet-body { padding: 8px 20px 26px; }
@media (min-width: 700px) {
  .sheet { left: 50%; top: 50%; right: auto; bottom: auto; width: min(580px, 92vw); border-radius: var(--radius); transform: translate(-50%, -50%) translateY(12px); opacity: 0; transition: transform .2s ease, opacity .2s ease; max-height: 88vh; box-shadow: 0 30px 80px -20px rgba(21, 24, 30, .45); }
  .sheet-wide { width: min(880px, 94vw); }
  .sheet-wrap.open .sheet { transform: translate(-50%, -50%); opacity: 1; }
}

/* ── Toast ────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 200; max-width: 92vw; box-shadow: 0 10px 30px -10px rgba(21, 24, 30, .5); }
.toast.show { opacity: 1; }
@media (min-width: 901px) { .toast { bottom: 28px; } }

/* ── Uploads ──────────────────────────────────────────────────── */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.thumb { border: 1px solid var(--rule); border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); }
.thumb-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--paper); }
.thumb-ph { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; color: var(--ink-muted); font-size: 13px; font-family: var(--mono); }
.thumb-meta { padding: 6px 8px; font-size: 13px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop { display: block; border: 1px dashed var(--rule-strong); border-radius: var(--radius-sm); padding: 24px; text-align: center; color: var(--ink-muted); cursor: pointer; background: var(--paper); }
.drop:hover { border-color: var(--ink-muted); }
.drop input { display: none; }
audio { width: 100%; }

/* ── Misc ─────────────────────────────────────────────────────── */
.stack > * + * { margin-top: 12px; }
.divider { border: 0; border-top: 1px solid var(--rule); margin: 18px 0; }
.notice { border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; background: var(--surface); }
.notice-caution { border-color: rgba(168, 105, 11, .4); background: var(--caution-tint); }
.notice-risk { border-color: rgba(179, 38, 30, .4); background: var(--risk-tint); }
.notice-good { border-color: rgba(27, 127, 75, .4); background: var(--good-tint); }
.script-block { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--ink); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 16px; line-height: 1.65; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--surface); font-size: 13px; cursor: pointer; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.empty { padding: 28px 0; color: var(--ink-muted); text-align: center; }
.pipeline-cols { display: block; }
.pipeline-col h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; padding-bottom: 8px; border-bottom: 1px solid var(--rule-strong); }
.week { margin-bottom: 8px; }
.week h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; padding: 8px 0 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .001s !important; animation-iteration-count: 1 !important; }
}
@media print {
  .rail, .tabbar, .topbar, .more-sheet, .toast { display: none !important; }
  .main { margin: 0; padding: 0; }
  .panel, .verdict { box-shadow: none; }
}

/* ── Pass four: colour to separate sections (20 Sep 2026) ───────────
   Light tints only, one per kind of content, with a coloured edge and
   heading so a long page reads as distinct blocks. Signal colours are
   still reserved for verdicts. */
.tint { border-left-width: 4px; }
.tint .h-section { display: flex; align-items: center; gap: 10px; }
.tint .h-section::before { content: ''; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tint-slate  { background: #F3F5F8; border-color: #DCE2EA; border-left-color: #64748B; }
.tint-slate  .h-section::before { background: #64748B; }
.tint-blue   { background: #EEF3FB; border-color: #D5E0F3; border-left-color: var(--brand); }
.tint-blue   .h-section { color: #1F3F7A; } .tint-blue .h-section::before { background: var(--brand); }
.tint-sand   { background: #FBF4E6; border-color: #EFDFBF; border-left-color: #B7791F; }
.tint-sand   .h-section { color: #7A4F10; } .tint-sand .h-section::before { background: #B7791F; }
.tint-green  { background: #ECF5EF; border-color: #CFE6D7; border-left-color: #1B7F4B; }
.tint-green  .h-section { color: #14603A; } .tint-green .h-section::before { background: #1B7F4B; }
.tint-violet { background: #F3EFFA; border-color: #E0D6F2; border-left-color: #6B4FB3; }
.tint-violet .h-section { color: #4A3485; } .tint-violet .h-section::before { background: #6B4FB3; }
.tint input, .tint select, .tint textarea, .tint .tbl { background: var(--surface); }
.tint .tbl { border-radius: 10px; overflow: hidden; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head .h-section { margin: 0; }
.section-val { font-family: var(--serif); font-size: 23px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The conclusion block before Save to Pipeline */
.summary { border-radius: var(--radius); padding: 30px 26px; margin-bottom: 18px; color: #fff; background: linear-gradient(160deg, #15181E 0%, #1F2530 100%); border-top: 5px solid var(--rule-strong); box-shadow: var(--shadow-panel); }
.summary .eyebrow { color: rgba(255,255,255,.55); margin-bottom: 8px; }
.summary-headline { font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1.1; margin: 0 0 22px; color: #fff; }
.summary-good { border-top-color: #35B26F; }   .summary-good .summary-headline { color: #7FE0A8; }
.summary-caution { border-top-color: #E0A23A; } .summary-caution .summary-headline { color: #F2C572; }
.summary-risk { border-top-color: #E0705F; }    .summary-risk .summary-headline { color: #F3A093; }
.summary-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.14); }
.summary-hero .summary-num { font-size: 46px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 16px; }
.summary-num { font-family: var(--serif); font-size: 27px; font-weight: 500; line-height: 1.05; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.summary-num.neg { color: #F3A093; }
.summary-label { font-size: 13px; color: rgba(255,255,255,.62); margin-top: 5px; }
.summary-note { margin: 22px 0 0; font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.82); }
@media (max-width: 560px) {
  .summary { padding: 24px 18px; }
  .summary-hero .summary-num { font-size: 34px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-headline { font-size: 27px; }
}

.tbl td.num, .tbl th.num { white-space: nowrap; }
@media (max-width: 560px) { .tint .tbl td, .tint .tbl th { padding-left: 8px; padding-right: 8px; } }

/* Neutral warm tint: for sections that must not read as good or bad (upfront costs). */
.tint-stone  { background: #F4F1EC; border-color: #E3DDD2; border-left-color: #8A8172; }
.tint-stone  .h-section { color: #4E4839; } .tint-stone .h-section::before { background: #8A8172; }
.tint h3 { display: flex; align-items: center; gap: 8px; }

/* Filter chips (Pipeline stages) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; white-space: nowrap; }
.chip .chip-n { color: var(--ink-muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.active .chip-n { color: rgba(255,255,255,.7); }

/* Numbered steps (Next Steps) */
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font: 600 15px var(--sans); flex: none; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.step-head h2 { margin: 0; }
.tint-blue .step-num { background: var(--brand); } .tint-sand .step-num { background: #B7791F; } .tint-violet .step-num { background: #6B4FB3; }
.explainer { background: rgba(255,255,255,.7); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; margin: 6px 0 10px 34px; font-size: 14.5px; line-height: 1.55; }
.explainer strong { display: block; margin-bottom: 2px; }

.pipeline-cols-one { display: block; }
.step-head .h-section::before { display: none; }

.progress-on-dark { background: rgba(255,255,255,.16); }
.progress-on-dark > span { background: #7FE0A8; }

/* ── Printable checklist (Furnishing Gauger → Download PDF) ─────── */
#print-sheet { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body > *:not(#print-sheet) { display: none !important; }
  body { background: #fff !important; }
  #print-sheet { display: block; color: #15181E; font: 10.5pt/1.4 'IBM Plex Sans', Arial, sans-serif; }
  #print-sheet h1 { font: 500 22pt 'Fraunces', Georgia, serif; margin: 2pt 0 2pt; }
  #print-sheet .ps-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1.5pt solid #15181E; padding-bottom: 8pt; margin-bottom: 8pt; }
  #print-sheet .ps-eyebrow { font-size: 8pt; letter-spacing: .12em; text-transform: uppercase; color: #5B6270; }
  #print-sheet .ps-sub, #print-sheet .ps-tip { color: #5B6270; font-size: 9pt; }
  #print-sheet .ps-budget { text-align: right; }
  #print-sheet .ps-budget-num { font: 500 20pt 'Fraunces', Georgia, serif; }
  #print-sheet .ps-verdict { margin: 0 0 8pt; }
  #print-sheet table { width: 100%; border-collapse: collapse; }
  #print-sheet .ps-split { margin: 0 0 6pt; table-layout: fixed; }
  #print-sheet .ps-split td { border: .75pt solid #C9CDD4; padding: 5pt 6pt; font-size: 8.5pt; vertical-align: top; }
  #print-sheet .ps-split strong { font-size: 11pt; }
  #print-sheet .ps-room { margin-top: 12pt; break-inside: avoid-page; }
  #print-sheet .ps-room h2 { display: flex; justify-content: space-between; font: 500 13pt 'Fraunces', Georgia, serif; margin: 0 0 3pt; padding: 4pt 6pt; background: #EEF0F3; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-sheet th { text-align: left; font-size: 8pt; letter-spacing: .06em; text-transform: uppercase; color: #5B6270; padding: 3pt 6pt; border-bottom: .75pt solid #15181E; }
  #print-sheet td { padding: 4pt 6pt; border-bottom: .5pt solid #DDE0E5; vertical-align: top; }
  #print-sheet tr { break-inside: avoid; }
  #print-sheet .ps-num { text-align: right; white-space: nowrap; }
  #print-sheet .ps-tick { width: 16pt; padding-right: 0; }
  #print-sheet .ps-box { display: inline-block; width: 10pt; height: 10pt; border: 1pt solid #15181E; border-radius: 2pt; }
  #print-sheet .ps-paid { color: #9AA0AB; text-align: left; border-bottom: .75pt solid #15181E; }
  #print-sheet .ps-room h2 span:last-child { font: 500 9.5pt 'IBM Plex Sans', Arial, sans-serif; align-self: center; }
  #print-sheet .ps-foot { margin-top: 12pt; padding-top: 6pt; border-top: .75pt solid #C9CDD4; font-size: 8.5pt; color: #5B6270; }
}

/* ── Menu icons ─────────────────────────────────────────────────── */
.nav-item { gap: 11px; }
.nav-ico { flex: none; width: 19px; height: 19px; color: var(--ink-muted); transition: color .15s; }
.nav-item:hover .nav-ico { color: var(--ink); }
.nav-item.active .nav-ico { color: #fff; }
.tab-glyph .nav-ico { width: 22px; height: 22px; color: inherit; display: block; }
.tab-primary .tab-glyph .nav-ico { width: 20px; height: 20px; color: #fff; stroke-width: 2; }

/* ── Record here (recording assignments) ─────────────────────────── */
.recorder { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--brand-tint); padding: 16px; margin: 12px 0; }
.recorder .inline-actions { margin-top: 10px; }
.rec-time { font-size: 34px; line-height: 1; margin-top: 10px; color: var(--risk); }
.rec-time::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--risk); margin-right: 10px; vertical-align: middle; animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec-time::before { animation: none; } }

/* ── Furnishing Gauger: collapsible rooms with editable rows ─────── */
.fg-sec { padding: 0; }
.fg-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; min-height: 44px; }
.fg-sec > summary::-webkit-details-marker { display: none; }
.fg-sec > summary::before { content: ''; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); flex: none; opacity: .6; transition: transform .15s; }
.fg-sec[open] > summary::before { transform: rotate(45deg); }
.fg-sec-name { font-family: var(--serif); font-size: 21px; flex: 1; }
.fg-sec-tot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 16px; font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 600; text-align: right; }
.fg-sec-tot .muted { font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.fg-sec > :not(summary) { margin-left: 22px; margin-right: 22px; }
.fg-sec > :last-child { margin-bottom: 20px; }

.fg-head, .fg-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 96px 96px 120px 110px; gap: 10px; align-items: center; }
.fg-head { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); padding: 10px 0 6px; border-bottom: 1px solid var(--rule-strong); }
.fg-head span:not(:first-child) { text-align: right; }
.fg-row { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.fg-row.off { opacity: .45; }
.fg-row .check { margin: 0; align-items: flex-start; }
.fg-f { display: block; text-align: right; font-variant-numeric: tabular-nums; }
.fg-f > span { display: none; }
.fg-f input { width: 100%; min-height: 40px; padding: 6px 8px; text-align: right; background: var(--surface); }
.fg-nobudget .fg-splitcol { display: none; }
.fg-nobudget .fg-head, .fg-nobudget .fg-row { grid-template-columns: minmax(0, 1fr) 70px 96px 96px 110px; }
.fg-add { display: grid; grid-template-columns: minmax(0, 1fr) 70px 96px auto; gap: 10px; margin-top: 14px; }
.fg-add input { min-height: 40px; padding: 6px 10px; background: var(--surface); }
.fg-add input[type=number] { text-align: right; }

@media (max-width: 760px) {
  .fg-sec > summary { padding: 16px; flex-wrap: wrap; }
  .fg-sec-name { font-size: 19px; }
  .fg-sec-tot { flex-basis: 100%; justify-content: flex-start; padding-left: 21px; }
  .fg-sec > :not(summary) { margin-left: 16px; margin-right: 16px; }
  .fg-head { display: none; }
  .fg-row, .fg-nobudget .fg-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px 10px; padding: 12px 0; }
  .fg-row .fg-name { grid-column: 1 / -1; }
  .fg-f { text-align: left; grid-column: span 2; order: 1; }
  .fg-f > span { display: block; font-size: 12px; color: var(--ink-muted); margin-bottom: 3px; }
  .fg-f input { text-align: left; }
  /* the two calculated figures share one compact line under the inputs */
  div.fg-f { grid-column: span 3; order: 2; display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
  div.fg-f > span { display: inline; margin: 0; }
  .fg-nobudget div.fg-f { grid-column: 1 / -1; }
  .fg-add { grid-template-columns: 1fr 1fr; }
  .fg-add [data-add-name] { grid-column: 1 / -1; }
  .fg-add [data-add] { grid-column: 1 / -1; }
}
