/* ============================================================
   Sitewise — design tokens + UI styles
   Clean / trustworthy proptech. Navy + blue. Data-forward.
   ============================================================ */

:root {
  /* themeable (tweaks override --brand / fonts) */
  --brand: #2f6bf0;
  --brand-deep: #0b1f3a;
  --brand-ink: #0e1726;

  --font-ui: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* surfaces (cool neutrals) */
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f9;
  --line: #e2e8f2;
  --line-strong: #cbd5e6;

  /* text */
  --ink: #0e1726;
  --ink-2: #44506a;
  --ink-3: #7280a0;
  --on-brand: #ffffff;

  /* status */
  --go: #14855a;
  --go-bg: #e7f4ee;
  --caution: #b9740c;
  --caution-bg: #fbf0dd;
  --nogo: #c5372f;
  --nogo-bg: #fbe9e7;
  --info: #2f6bf0;

  /* geometry */
  --r-sm: 7px;
  --r: 11px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-sm: 0 1px 2px rgba(16,28,54,.06), 0 1px 1px rgba(16,28,54,.04);
  --shadow: 0 4px 18px rgba(16,28,54,.08), 0 1px 3px rgba(16,28,54,.05);
  --shadow-lg: 0 24px 60px rgba(11,31,58,.16), 0 6px 18px rgba(11,31,58,.08);

  --maxw: 1180px;
  --pad: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.45;
}
#root { min-height: 100vh; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }
::selection { background: color-mix(in oklab, var(--brand) 24%, white); }

/* density */
[data-density="compact"] { --pad: 16px; }
[data-density="detailed"] { --pad: 30px; }

/* ---------- App frame ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 18px; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--brand), color-mix(in oklab, var(--brand) 55%, var(--brand-deep)));
  color: #fff; flex: none;
}
.brand .mark svg { width: 15px; height: 15px; }
.nav .spacer { flex: 1; }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  background: none; border: 0; color: var(--ink-2); font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px;
}
.nav-link:hover { background: var(--surface-3); color: var(--ink); }
.nav-link.active { color: var(--brand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  border: 1px solid transparent; border-radius: var(--r);
  font-weight: 700; font-size: 14.5px; letter-spacing: -.01em;
  padding: 11px 18px; transition: transform .08s ease, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: color-mix(in oklab, var(--brand) 88%, black); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-quiet { background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--surface-3); color: var(--ink); }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: var(--r-sm); }
.btn svg { width: 17px; height: 17px; }

/* ---------- Generic bits ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); font-weight: 600;
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-3); }

.pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.status-pass { color: var(--go); }
.status-flag { color: var(--caution); }
.status-fail, .status-nogo { color: var(--nogo); }
.status-estimated { color: var(--info); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 6px; letter-spacing: .01em;
}
.tag.pass { background: var(--go-bg); color: var(--go); }
.tag.flag { background: var(--caution-bg); color: var(--caution); }
.tag.fail { background: var(--nogo-bg); color: var(--nogo); }
.tag.estimated { background: #e8effb; color: var(--info); }

/* ============================================================
   LANDING
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 120% at 85% -10%, color-mix(in oklab, var(--brand) 30%, var(--brand-deep)) 0%, transparent 55%),
    linear-gradient(180deg, var(--brand-deep), #08172c);
  color: #eaf1fb;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(color-mix(in oklab, #fff 7%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in oklab, #fff 7%, transparent) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(120% 90% at 70% 0%, black, transparent 75%); opacity: .5;
}
.hero .wrap { position: relative; z-index: 1; padding-top: 76px; padding-bottom: 84px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: 56px; line-height: 1.02; letter-spacing: -.035em; margin: 18px 0 0; font-weight: 800; text-wrap: balance; }
.hero h1 .accent { color: color-mix(in oklab, var(--brand) 60%, white); }
.hero p.lede { font-size: 19px; line-height: 1.5; color: #b8c6dd; margin: 20px 0 0; max-width: 38ch; }
.hero .eyebrow { color: color-mix(in oklab, var(--brand) 55%, white); }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-cta .btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.18); }
.hero-cta .btn-ghost:hover { background: rgba(255,255,255,.12); }
.hero-stats { display: flex; gap: 30px; margin-top: 38px; }
.hero-stats .s b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; display: block; }
.hero-stats .s span { font-size: 12.5px; color: #93a4c2; }

/* hero search card */
.search-card {
  background: var(--surface); color: var(--ink); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 22px; border: 1px solid rgba(255,255,255,.5);
}
.search-card .sc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.search-card .sc-head .eyebrow { color: var(--brand); }

.logos { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 30px; opacity: .9; }
.logos span { font-size: 12px; color: #8499ba; font-weight: 600; }
.logos b { color: #c6d4ea; font-weight: 800; letter-spacing: -.01em; }

/* sections */
.section { padding: 78px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: 36px; letter-spacing: -.03em; margin: 12px 0 0; font-weight: 800; }
.section .sub { color: var(--ink-2); font-size: 17px; margin: 14px 0 0; max-width: 56ch; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.step { padding: 26px; }
.step .n { font-family: var(--font-mono); font-size: 13px; color: var(--brand); font-weight: 600; }
.step h3 { font-size: 19px; margin: 14px 0 8px; letter-spacing: -.01em; }
.step p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.step .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3); color: var(--brand); display: grid; place-items: center; margin-bottom: 16px; }
.step .ic svg { width: 21px; height: 21px; }

.checks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
.check-card { padding: 20px; }
.check-card .ic { color: var(--brand); margin-bottom: 14px; }
.check-card .ic svg { width: 22px; height: 22px; }
.check-card h4 { font-size: 15.5px; margin: 0 0 5px; letter-spacing: -.01em; }
.check-card p { font-size: 13px; color: var(--ink-3); margin: 0; }

.cta-band { background: var(--brand-deep); color: #eaf1fb; border-radius: var(--r-xl); padding: 48px; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band .sub { color: #aebfda; margin-left: auto; margin-right: auto; }

.footer { padding: 40px 0; color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line); }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ============================================================
   SEARCH / AUTOCOMPLETE
   ============================================================ */
.search-shell { max-width: 720px; margin: 0 auto; padding: 70px 0 90px; }
.search-box { position: relative; }
.search-input-row {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-lg); padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.search-input-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 16%, transparent), var(--shadow); }
.search-input-row svg.pin { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.search-input-row input {
  flex: 1; border: 0; outline: 0; font-size: 18px; font-family: inherit; color: var(--ink);
  background: transparent; padding: 12px 0; letter-spacing: -.01em;
}
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 20; }
.ac-item { display: flex; align-items: center; gap: 13px; padding: 13px 16px; cursor: pointer; border-bottom: 1px solid var(--line); }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.active { background: var(--surface-3); }
.ac-item .pin { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.ac-item b { font-weight: 700; font-size: 15px; }
.ac-item .meta { font-size: 12.5px; color: var(--ink-3); }
.ac-item mark { background: color-mix(in oklab, var(--brand) 22%, transparent); color: inherit; border-radius: 3px; }
.ac-item.ac-live { background: color-mix(in oklab, var(--go) 6%, white); }
.ac-empty { padding: 12px 16px; font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.ac-item.ac-live:hover { background: color-mix(in oklab, var(--go) 12%, white); }
.ac-live-dot { width: 18px; display: grid; place-items: center; flex: none; }
.ac-live-dot .dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in oklab, var(--go) 22%, transparent); }
.rule-note.live { color: color-mix(in oklab, var(--go) 75%, black); background: color-mix(in oklab, var(--go) 8%, white); border-color: color-mix(in oklab, var(--go) 24%, white); }
.rule-note.live svg { color: var(--go); }

/* ============================================================
   INTAKE FORM
   ============================================================ */
.intake { max-width: 760px; margin: 0 auto; padding: 48px 0 80px; }
.intake .selected-addr { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.intake .selected-addr .pin { width: 22px; height: 22px; color: var(--brand); }
.field { margin-top: 22px; }
.field > label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.field .hint { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 9px 16px; border-radius: 7px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.ct-inputs { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 12px; margin-top: 6px; }
.input {
  width: 100%; border: 1.5px solid var(--line-strong); border-radius: var(--r); padding: 11px 13px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: var(--surface); outline: none;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 14%, transparent); }
.input.mono { font-family: var(--font-mono); }
.num-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.num-field { display: block; }
.num-field > span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.num-field > span em { font-style: normal; font-weight: 500; color: var(--ink-3); font-size: 12px; margin-left: 6px; }
.input-prefix { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.input-prefix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 14%, transparent); }
.input-prefix i { font-style: normal; padding: 0 4px 0 13px; color: var(--ink-3); font-family: var(--font-mono); font-size: 15px; }
.input-prefix b { padding: 0 13px 0 6px; color: var(--ink-3); font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.input-prefix .input { border: 0; border-radius: 0; box-shadow: none; padding-left: 4px; }
.input-prefix .input:focus { box-shadow: none; }
.cost-preview { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 11px 14px; border-radius: var(--r); background: color-mix(in oklab, var(--brand) 6%, white); border: 1px solid color-mix(in oklab, var(--brand) 22%, white); font-size: 13px; color: var(--ink-2); }
.cost-preview svg { color: var(--brand); flex: none; }
.cost-preview b { color: var(--ink); font-family: var(--font-mono); }
.finance-row em.basis { font-style: normal; color: var(--ink-3); font-size: 11.5px; font-weight: 500; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: #e8effb; border: 1px solid color-mix(in oklab, var(--info) 24%, white); color: #234; font-size: 13.5px; margin-top: 14px; }
.callout svg { width: 18px; height: 18px; color: var(--info); flex: none; margin-top: 1px; }

/* ============================================================
   SCREENING (running)
   ============================================================ */
.screening { max-width: 640px; margin: 0 auto; padding: 70px 0 90px; text-align: center; }
.screening h2 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 6px; }
.scan-list { text-align: left; margin-top: 36px; display: flex; flex-direction: column; gap: 2px; }
.scan-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.scan-row.pending { opacity: .45; }
.scan-row .label { flex: 1; font-weight: 600; font-size: 14.5px; }
.scan-ic { width: 22px; height: 22px; flex: none; display: grid; place-items: center; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--line-strong); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s ease; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.check-mark { animation: pop .25s ease; }

/* ============================================================
   REPORT
   ============================================================ */
.report { padding: 34px 0 90px; }

/* ---------- Subdivision strip ---------- */
.subdiv { padding: 20px 22px; margin-top: 22px; }
.subdiv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pill.corner { background: color-mix(in oklab, var(--brand) 10%, white); border-color: color-mix(in oklab, var(--brand) 30%, white); color: var(--brand); }
.subdiv-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; margin-top: 18px; }
.subdiv-col {
  text-align: left; border: 1.5px solid var(--line); background: var(--surface-2); border-radius: var(--r-lg);
  padding: 18px 20px; transition: border-color .15s, background .15s; cursor: pointer; font-family: inherit;
}
.subdiv-col:hover { border-color: var(--line-strong); }
.subdiv-col.on { border-color: var(--brand); background: color-mix(in oklab, var(--brand) 6%, white); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 12%, transparent); }
.subdiv-col .sc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: nowrap; }
.subdiv-col .t-label { font-weight: 800; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.subdiv-col .t-sel { font-size: 11px; font-weight: 700; color: var(--brand); background: var(--surface); border: 1px solid color-mix(in oklab, var(--brand) 30%, white); padding: 2px 8px; border-radius: 999px; }
.subdiv-col .t-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.subdiv-col .t-lots { font-family: var(--font-mono); font-size: 42px; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 12px 0 6px; color: var(--ink); }
.subdiv-col .t-lots span { font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--ink-3); margin-left: 8px; letter-spacing: 0; }
.subdiv-col .t-note { font-size: 12.5px; color: var(--ink-2); }
.subdiv-vs { align-self: center; font-weight: 800; color: var(--ink-3); font-size: 13px; font-family: var(--font-mono); }
.subdiv-foot { margin-top: 16px; font-size: 13.5px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 14px; line-height: 1.5; }
[data-density="compact"] .subdiv-foot { display: none; }
@media (max-width: 720px) { .subdiv-cols { grid-template-columns: 1fr; } .subdiv-vs { display: none; } }
.report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.report-head .addr h1 { font-size: 28px; letter-spacing: -.02em; margin: 8px 0 4px; }
.report-head .addr .sub { color: var(--ink-2); font-size: 14.5px; }
.report-actions { display: flex; gap: 10px; }

.score-ring { --p: 0; width: 132px; height: 132px; flex: none; position: relative; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-ring .val b { font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-family: var(--font-mono); }
.score-ring .val span { font-size: 11px; color: var(--ink-3); font-weight: 600; }

.verdict-card { display: flex; gap: 26px; align-items: center; padding: 26px 28px; margin-top: 24px; border-radius: var(--r-lg); }
.verdict-card.go { background: var(--go-bg); border: 1px solid color-mix(in oklab, var(--go) 26%, white); }
.verdict-card.caution { background: var(--caution-bg); border: 1px solid color-mix(in oklab, var(--caution) 26%, white); }
.verdict-card.nogo { background: var(--nogo-bg); border: 1px solid color-mix(in oklab, var(--nogo) 26%, white); }
.verdict-card .v-main { flex: 1; }
.verdict-card .v-rating { font-size: 30px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.verdict-card .v-tone { font-size: 13px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,.6); }
.verdict-card .v-note { font-size: 15px; margin-top: 8px; color: var(--ink-2); max-width: 60ch; }
.verdict-metrics { display: flex; gap: 30px; }
.verdict-metrics .m b { font-size: 26px; font-weight: 800; font-family: var(--font-mono); letter-spacing: -.02em; display: block; line-height: 1.1; }
.verdict-metrics .m span { font-size: 12px; color: var(--ink-2); font-weight: 600; }

.report-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; margin-top: 26px; align-items: start; }
@media (max-width: 980px) { .report-grid { grid-template-columns: 1fr; } }

.panel { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 15px; margin: 0; letter-spacing: -.01em; }
.panel-head .cnt { font-size: 12px; color: var(--ink-3); font-family: var(--font-mono); }

.check-group { border-bottom: 1px solid var(--line); }
.check-group:last-child { border-bottom: 0; }
.cg-head { display: flex; align-items: center; gap: 10px; padding: 12px 20px 4px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.check-row { display: flex; gap: 14px; padding: 14px 20px; align-items: flex-start; }
.check-row:hover { background: var(--surface-2); }
.check-row .ci { width: 26px; height: 26px; border-radius: 7px; flex: none; display: grid; place-items: center; }
.check-row .ci.pass { background: var(--go-bg); color: var(--go); }
.check-row .ci.flag { background: var(--caution-bg); color: var(--caution); }
.check-row .ci.fail { background: var(--nogo-bg); color: var(--nogo); }
.check-row .ci.estimated { background: #e8effb; color: var(--info); }
.check-row .ci svg { width: 15px; height: 15px; }
.check-row .cmain { flex: 1; }
.check-row .crow1 { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.check-row .clabel { font-weight: 700; font-size: 14.5px; }
.check-row .cval { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.check-row .cdetail { font-size: 13px; color: var(--ink-2); margin-top: 4px; line-height: 1.5; }
[data-density="compact"] .check-row .cdetail { display: none; }

/* side panels */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--ink-2); }
.kv .v { font-weight: 700; font-family: var(--font-mono); }
.panel-body { padding: 16px 20px; }

.finance-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.finance-row:last-child { border-bottom: 0; }
.finance-row.total { font-weight: 800; border-top: 2px solid var(--line-strong); margin-top: 4px; padding-top: 12px; border-bottom: 0; }
.finance-row .num { font-family: var(--font-mono); font-weight: 700; }
.finance-row.profit .num { color: var(--go); }
.finance-row.profit.neg .num { color: var(--nogo); }
.finance-row.bal span { color: var(--caution); }
.finance-row.bal .num { color: var(--caution); }
.fin-h { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 16px 0 6px; }

/* RLV banner */
.rlv-banner { border-radius: var(--r); padding: 14px 16px; margin-bottom: 6px; border: 1px solid var(--line); }
.rlv-banner.under { background: var(--go-bg); border-color: color-mix(in oklab, var(--go) 24%, white); }
.rlv-banner.over { background: var(--nogo-bg); border-color: color-mix(in oklab, var(--nogo) 24%, white); }
.rlv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.rlv-lab { font-size: 13px; font-weight: 700; }
.rlv-sub { font-size: 11.5px; color: var(--ink-3); }
.rlv-val { font-family: var(--font-mono); font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.rlv-delta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; margin-top: 8px; padding-top: 8px; border-top: 1px dashed color-mix(in oklab, var(--ink) 12%, transparent); }
.rlv-delta.under { color: var(--go); }
.rlv-delta.over { color: var(--nogo); }

/* margin grid */
.margin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.margin-grid .mg { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 11px; }
.margin-grid .mg span { font-size: 11px; color: var(--ink-3); font-weight: 600; display: block; }
.margin-grid .mg b { font-size: 20px; font-family: var(--font-mono); font-weight: 800; letter-spacing: -.02em; display: block; margin: 3px 0 1px; }
.margin-grid .mg em { font-size: 10.5px; color: var(--ink-3); font-style: normal; }
.margin-grid .mg.ok b { color: var(--go); }
.margin-grid .mg.ok { background: var(--go-bg); border-color: color-mix(in oklab, var(--go) 20%, white); }
.margin-grid .mg.warn b { color: var(--caution); }
.margin-grid .mg.warn { background: var(--caution-bg); border-color: color-mix(in oklab, var(--caution) 20%, white); }
.margin-grid .mg.bad b { color: var(--nogo); }
.margin-grid .mg.bad { background: var(--nogo-bg); border-color: color-mix(in oklab, var(--nogo) 20%, white); }
.hurdle-line { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; font-weight: 600; line-height: 1.45; margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); }
.hurdle-line svg { flex: none; margin-top: 1px; }
.hurdle-line.ok { background: var(--go-bg); color: var(--go); }
.hurdle-line.warn { background: var(--caution-bg); color: var(--caution); }
.hurdle-line.bad { background: var(--nogo-bg); color: var(--nogo); }
[data-density="compact"] .hurdle-line, [data-density="compact"] .fin-h { display: none; }
.disclaimer { font-size: 11.5px; color: var(--ink-3); margin-top: 14px; line-height: 1.5; }

/* yield bar viz */
.yield-viz { display: flex; gap: 8px; margin: 6px 0 4px; }
.dwelling-ico { flex: 1; aspect-ratio: 1; background: var(--surface-3); border: 1.5px solid var(--line-strong); border-radius: 8px; display: grid; place-items: center; color: var(--brand); }
.dwelling-ico.lot { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--surface-3) 6px, var(--surface-3) 12px); color: var(--ink-3); border-style: dashed; }
.dwelling-ico svg { width: 60%; height: 60%; }

/* report layout: document variant */
.doc-report { max-width: 860px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.doc-band { padding: 30px 40px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.doc-band.go { background: var(--go-bg); } .doc-band.caution { background: var(--caution-bg); } .doc-band.nogo { background: var(--nogo-bg); }
.doc-section { padding: 26px 40px; border-bottom: 1px solid var(--line); }
.doc-section h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px; }

/* report layout: scorecard variant — emphasised hero metrics */
.scorecard-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.sc-metric { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.sc-metric.feature { background: var(--brand-deep); color: #fff; border: 0; }
.sc-metric .lab { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.sc-metric.feature .lab { color: #a9bce0; }
.sc-metric b { font-size: 34px; font-weight: 800; font-family: var(--font-mono); letter-spacing: -.03em; display: block; margin-top: 8px; line-height: 1; }

/* layout switcher */
.layout-switch { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 3px; }
.layout-switch button { border: 0; background: transparent; padding: 7px 13px; border-radius: 6px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.layout-switch button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.layout-switch button svg { width: 14px; height: 14px; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash { padding: 40px 0 90px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-head h1 { font-size: 28px; letter-spacing: -.02em; margin: 6px 0 0; }
.dash-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 26px; }
.dash-stat { padding: 18px 20px; }
.dash-stat b { font-size: 28px; font-weight: 800; font-family: var(--font-mono); letter-spacing: -.02em; display: block; }
.dash-stat span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.report-table { width: 100%; }
.dash-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.builder-switch { display: flex; align-items: center; gap: 9px; }
.rt-head, .rt-row { display: grid; grid-template-columns: 2.1fr .75fr .8fr .8fr 1fr .95fr 32px; gap: 14px; align-items: center; padding: 14px 20px; }
.rt-head { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; border-bottom: 1px solid var(--line); }
.rt-row { border-bottom: 1px solid var(--line); cursor: pointer; }
.rt-row:last-child { border-bottom: 0; }
.rt-row:hover { background: var(--surface-2); }
.rt-row .raddr b { font-weight: 700; font-size: 14.5px; display: block; }
.rt-row .raddr span { font-size: 12.5px; color: var(--ink-3); }
.rt-score { font-family: var(--font-mono); font-weight: 800; font-size: 17px; }
.mini-bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 5px; }
.mini-bar > div { height: 100%; border-radius: 999px; }

@media (max-width: 860px) {
  .hero-grid, .report-grid { grid-template-columns: 1fr; }
  .steps, .checks-grid, .scorecard-hero, .dash-stats { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 40px; }
}

/* ---------- Rules applied (provenance) ---------- */
.rules-inline { display: flex; flex-direction: column; gap: 14px; }
.rule-src { display: flex; gap: 12px; align-items: flex-start; }
.rule-ico { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; }
.rule-ico.ok { background: var(--go-bg); color: var(--go); }
.rule-ico.warn { background: var(--caution-bg); color: var(--caution); }
.rule-ico svg { width: 17px; height: 17px; }
.rule-src b { font-size: 14px; }
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.rule-grid .rg { background: var(--surface); padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.rule-grid .rg span { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.rule-grid .rg b { font-size: 14px; font-family: var(--font-mono); letter-spacing: -.01em; }
.rule-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--caution); background: var(--caution-bg); border-radius: var(--r-sm); padding: 9px 11px; }
.rule-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.rule-note.override { color: var(--info); background: #e8effb; }
[data-density="compact"] .rule-note { display: none; }

/* ---------- Outcome capture ---------- */
.outcome-card .panel-head h3 { color: var(--ink); }
.ofield { display: block; margin-bottom: 14px; }
.ofield > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.ofield textarea.input { resize: vertical; font-family: inherit; line-height: 1.45; }
.outcome-compare { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 8px 0 14px; }
.oc-col { display: flex; flex-direction: column; gap: 2px; }
.oc-col span { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.oc-col b { font-size: 32px; font-weight: 800; font-family: var(--font-mono); letter-spacing: -.03em; line-height: 1; }
.oc-delta { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.oc-delta.up { background: var(--go-bg); color: var(--go); }
.oc-delta.down { background: var(--nogo-bg); color: var(--nogo); }
.oc-delta.match { background: var(--go-bg); color: var(--go); }
.oc-notes { font-size: 13.5px; color: var(--ink-2); font-style: italic; line-height: 1.5; border-left: 3px solid var(--line-strong); padding: 2px 0 2px 12px; margin: 10px 0; }
