/* SteadyNote. Light theme, one stylesheet. */
:root {
  color-scheme: light;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-2: #f8f9f6;
  --surface-3: #eef1eb;
  --line: #e1e5de;
  --line-strong: #cbd3c8;
  --ink: #0f1b16;
  --ink-2: #3f4d46;
  --muted: #5f6d66;
  --brand: #0b6b4f;
  --brand-ink: #08563f;
  --brand-deep: #0e2b21;
  --brand-50: #eaf5f0;
  --brand-100: #d2eadf;
  --brand-200: #a9d6c2;
  --accent: #e2a42b;
  --accent-50: #fdf4e1;
  --focus: #1f6feb;
  --good: #0ca30c; --good-ink: #0d6320; --good-bg: #e6f5e6;
  --warning: #fab219; --warning-ink: #7a4b00; --warning-bg: #fff4d9;
  --serious: #ec835a; --serious-ink: #8c3413; --serious-bg: #fdede4;
  --critical: #d03b3b; --critical-ink: #9a1d1d; --critical-bg: #fce9e9;
  --info-ink: #1b4e8f; --info-bg: #e8f0fb;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --grid: #e6e8e1;
  --axis: #c3c2b7;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 22, .05);
  --shadow: 0 1px 2px rgba(15, 27, 22, .04), 0 8px 24px rgba(15, 27, 22, .06);
  --shadow-lg: 0 24px 64px rgba(15, 27, 22, .22);
  --sidebar-w: 256px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: 'cv11', 'ss01';
}
img, svg { display: block; max-width: 100%; }
svg.icon { display: inline-block; flex: none; vertical-align: middle; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-ink); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 1em; }
small { font-size: .85em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }
::selection { background: var(--brand-100); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; border: 0; border-radius: 8px; padding: 10px 14px; font-weight: 600; cursor: pointer; }
.skip:focus { top: 12px; }

/* ---------- utilities ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.small { font-size: .875rem; }
.xs { font-size: .78rem; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 650; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; }
.g-main-r { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.65fr); align-items: start; }
.span-2 { grid-column: span 2; }
.sticky { position: sticky; top: 76px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.hide { display: none !important; }
.good-text { color: var(--good-ink); } .warn-text { color: var(--warning-ink); } .bad-text { color: var(--critical-ink); }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: .8rem; font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--surface); --fg: var(--ink); --bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border-radius: 10px; border: 1px solid var(--bd); background: var(--bg); color: var(--fg); font-weight: 600; font-size: .92rem;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { color: var(--fg); background: var(--surface-2); border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-primary { --bg: var(--brand); --fg: #fff; --bd: var(--brand); box-shadow: 0 1px 2px rgba(11, 107, 79, .25); }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn-secondary { --bg: var(--surface); }
.btn-ghost { --bg: transparent; --bd: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-danger { --bg: var(--critical); --fg: #fff; --bd: var(--critical); }
.btn-danger:hover { background: #b32e2e; border-color: #b32e2e; color: #fff; }
.btn-accent { --bg: var(--accent); --fg: #1f1400; --bd: var(--accent); }
.btn-accent:hover { background: #cf9320; color: #1f1400; border-color: #cf9320; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .85rem; border-radius: 9px; }
.btn-lg { min-height: 50px; padding: 12px 22px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; align-items: center; }
.btn-row.wrap { flex-wrap: wrap; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .seg-field legend, .field-label { font-weight: 600; font-size: .86rem; color: var(--ink); }
.req { color: var(--critical-ink); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233f4d46' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 107, 79, .18); }
input[readonly] { background: var(--surface-2); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.input-group:hover { border-color: var(--ink-2); }
.input-group:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 107, 79, .18); }
.input-group input, .input-group select { border: 0; box-shadow: none !important; background: transparent; min-width: 0; }
.input-group .affix { display: grid; place-items: center; padding: 0 0 0 12px; color: var(--muted); font-weight: 600; }
.input-group input + .affix { padding: 0 12px 0 0; }
.help { margin: 0; color: var(--muted); font-size: .8rem; }
.error { margin: 0; color: var(--critical-ink); font-size: .82rem; font-weight: 600; }
.field.invalid input, .field.invalid select, .field.invalid textarea, .field.invalid .input-group { border-color: var(--critical); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-section { padding: 18px 0; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section > h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.seg-field legend { margin-bottom: 6px; padding: 0; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 11px; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-opt span { display: block; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.seg-opt input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check-label { font-weight: 600; font-size: .92rem; display: block; }
.check-desc { display: block; color: var(--muted); font-size: .84rem; }
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.switch-ui { flex: none; width: 44px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; margin-top: 1px; }
.switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch-label { display: block; font-weight: 600; font-size: .92rem; }
.switch-desc { display: block; color: var(--muted); font-size: .84rem; }

/* ---------- badges & grades ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: .78rem; font-weight: 650; line-height: 1.3; white-space: nowrap; border: 1px solid transparent; }
.badge.good { background: var(--good-bg); color: var(--good-ink); }
.badge.warning { background: var(--warning-bg); color: var(--warning-ink); }
.badge.serious { background: var(--serious-bg); color: var(--serious-ink); }
.badge.critical { background: var(--critical-bg); color: var(--critical-ink); }
.badge.neutral { background: var(--surface-3); color: var(--ink-2); }
.badge.info { background: var(--info-bg); color: var(--info-ink); }
.badge.brand { background: var(--brand-50); color: var(--brand-ink); }
.badge.outline { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.grade { display: inline-flex; align-items: center; gap: 8px; }
.grade-letter { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-weight: 800; font-size: .95rem; }
.grade-A .grade-letter, .grade-B .grade-letter { background: var(--good-bg); color: var(--good-ink); }
.grade-C .grade-letter { background: var(--warning-bg); color: var(--warning-ink); }
.grade-D .grade-letter { background: var(--serious-bg); color: var(--serious-ink); }
.grade-E .grade-letter { background: var(--critical-bg); color: var(--critical-ink); }
.grade-label { font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.grade.big .grade-letter { width: 64px; height: 64px; border-radius: 18px; font-size: 2rem; }

/* ---------- cards & stats ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.card.flush { padding: 0; }
.card.flush > .card-head { padding: 18px 20px 0; }
.card.tint { background: var(--surface-2); }
.card.brand { background: var(--brand-deep); color: #e7f1ec; border-color: var(--brand-deep); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title { font-size: 1rem; font-weight: 650; margin: 0; }
.card-sub { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stats.s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.s2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat-value { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; line-height: 1.15; }
.stat-sub { margin-top: 4px; font-size: .82rem; color: var(--muted); }
.stat-sub.good { color: var(--good-ink); } .stat-sub.bad { color: var(--critical-ink); } .stat-sub.warn { color: var(--warning-ink); }
.stat-hero .stat-value { font-size: 3rem; }
.inner-stats .stat { border: 0; padding: 0; background: transparent; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0; }
.kv.one { grid-template-columns: 1fr; }
.kv.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kv dt { color: var(--muted); font-size: .8rem; font-weight: 600; }
.kv dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv.rows { grid-template-columns: 1fr; gap: 0; }
.kv.rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv.rows > div:last-child { border-bottom: 0; }
.kv.rows dd { margin: 0; text-align: right; }
.kv.rows dt { font-size: .88rem; color: var(--ink-2); font-weight: 500; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover { background: var(--surface-2); }
.tbl tbody tr.hl { background: var(--accent-50); }
.tbl tbody tr.muted-row td { color: var(--muted); }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line-strong); background: var(--surface-2); }
.tbl .cell-main { font-weight: 600; color: var(--ink); text-decoration: none; }
.tbl a.cell-main:hover { text-decoration: underline; }
.cell-sub { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }
.tbl.compact td { padding: 8px 12px; }
.tbl.compact th { padding: 8px 12px; }
.card > .table-wrap { margin: 0 -20px -20px; border-radius: 0 0 var(--radius) var(--radius); border-top: 1px solid var(--line); }
.card > .table-wrap .tbl th { background: var(--surface-2); }
.card.flush > .table-wrap { margin: 0; }
.card.flush > .card-head + .table-wrap { border-top: 1px solid var(--line); }

/* ---------- alerts, empty ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid transparent; }
.alert > svg { margin-top: 2px; }
.alert-body { flex: 1; min-width: 0; }
.alert-body strong { display: block; }
.alert-body p { margin: 2px 0 0; font-size: .9rem; }
.alert-actions { display: flex; gap: 8px; flex-wrap: wrap; align-self: center; }
.alert.good { background: var(--good-bg); border-color: #bfe3bf; color: var(--good-ink); }
.alert.warning { background: var(--warning-bg); border-color: #f5dd9d; color: var(--warning-ink); }
.alert.serious { background: var(--serious-bg); border-color: #f5c6b1; color: var(--serious-ink); }
.alert.critical { background: var(--critical-bg); border-color: #f2c1c1; color: var(--critical-ink); }
.alert.info, .alert.neutral { background: var(--info-bg); border-color: #c9dbf4; color: var(--info-ink); }
.alert .alert-body p, .alert .alert-body strong { color: inherit; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty h3 { color: var(--ink); margin: 6px 0 0; }
.empty p { margin: 0 0 8px; max-width: 420px; }

/* ---------- meter ---------- */
.meter-track { position: relative; height: 10px; border-radius: 999px; background: var(--brand-100); }
.meter-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--brand); }
.meter-track.tone-good { background: #d7eed7; } .tone-good .meter-fill { background: var(--good); }
.meter-track.tone-warning { background: #fdecc2; } .tone-warning .meter-fill { background: var(--warning); }
.meter-track.tone-serious { background: #fad8c9; } .tone-serious .meter-fill { background: var(--serious); }
.meter-track.tone-critical { background: #f5cccc; } .tone-critical .meter-fill { background: var(--critical); }
.meter-track.tone-blue { background: #d6e6f8; } .tone-blue .meter-fill { background: var(--series-1); }
.meter-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); border-radius: 1px; }
.meter-mark-label { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.meter-row { display: grid; grid-template-columns: 150px 1fr 70px; gap: 14px; align-items: center; padding: 10px 0; }
.meter-row + .meter-row { border-top: 1px solid var(--line); }
.meter-row .meter { padding-bottom: 14px; }
.meter-row .label { font-weight: 600; font-size: .9rem; }
.meter-row .val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; color: var(--ink-2); font-weight: 600; font-size: .92rem; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--brand-ink); border-bottom-color: var(--brand); }
.tab-count { background: var(--surface-3); border-radius: 999px; padding: 0 7px; font-size: .75rem; }

/* ---------- modal & toast ---------- */
dialog.modal { border: 0; padding: 0; background: transparent; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); width: 560px; overflow: visible; color: var(--ink); }
dialog.modal-sm { width: 440px; }
dialog.modal-lg { width: 780px; }
dialog.modal-xl { width: 980px; }
dialog.modal::backdrop { background: rgba(9, 20, 15, .48); backdrop-filter: blur(2px); }
.modal-card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 16px 16px; flex-wrap: wrap; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: .9rem; animation: toast-in .2s ease-out; max-width: calc(100vw - 32px); }
.toast.good svg { color: #7fdc92; } .toast.warning svg, .toast.serious svg { color: #ffc861; } .toast.info svg { color: #9cc4ff; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .4s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; outline-offset: 4px; }
.chart svg { overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.projected { stroke-dasharray: 5 5; opacity: .75; }
.chart .rule { stroke: var(--ink-2); stroke-width: 1; opacity: .5; }
.chart .rule-label { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.chart .mark-label { fill: var(--ink); font-size: 11.5px; font-weight: 650; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.chart .xhair { stroke: var(--ink-2); stroke-width: 1; opacity: .45; }
.chart .bar { transition: opacity .12s; }
.chart .bar.dim { opacity: .45; }
.chart-tip { position: absolute; display: none; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 11px; font-size: .8rem; min-width: 150px; z-index: 5; }
.tip-title { font-weight: 650; color: var(--ink-2); margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tip-row strong { font-variant-numeric: tabular-nums; }
.tip-label { color: var(--muted); }
.tip-key { width: 12px; height: 2px; border-radius: 2px; flex: none; }
.tip-key.box { width: 9px; height: 9px; border-radius: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--ink-2); margin-bottom: 8px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: var(--c); }
.legend-key.line { width: 16px; height: 2px; border-radius: 2px; }
.legend-key.dash { width: 16px; height: 0; border-top: 2px dashed var(--c); background: none; border-radius: 0; }
details.table-view { margin-top: 10px; }
details.table-view summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .85rem; }
details.table-view[open] summary { margin-bottom: 8px; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 750; font-size: 1.16rem; letter-spacing: -0.02em; }
.logo:hover { color: var(--ink); }
.logo-word span { color: var(--brand); }

/* ---------- marketing ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(244, 245, 241, .9); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid rgba(15, 27, 22, .06); }
.site-header-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.site-nav { display: flex; gap: 22px; flex: 1; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .93rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-cta { display: flex; gap: 8px; align-items: center; }
.section { padding: 84px 0; }
.section.tight { padding: 56px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.dark { background: var(--brand-deep); color: #dce9e2; }
.section.dark h2, .section.dark h3 { color: #fff; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.section.dark .eyebrow { color: var(--accent); }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-optical-sizing: auto; }
.section-title { font-size: clamp(1.8rem, 3.2vw, 2.6rem); max-width: 760px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 680px; line-height: 1.6; }
.section.dark .lead { color: #b9cfc4; }
.hero { padding: 72px 0 64px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -30% -10% auto auto; width: 720px; height: 720px; background: radial-gradient(closest-side, rgba(11, 107, 79, .12), transparent 70%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; position: relative; }
.hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.5rem, 5.2vw, 4.1rem); line-height: 1.04; letter-spacing: -0.03em; margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero .lead { font-size: 1.2rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.hero-proof { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-2); font-size: .88rem; font-weight: 550; }
.hero-proof span { display: inline-flex; gap: 6px; align-items: center; }
.hero-proof svg { color: var(--brand); }
.mock { position: relative; }
.mock-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 22px; }
.mock-float { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; gap: 10px; align-items: center; font-size: .85rem; }
.mock-float .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--good-bg); color: var(--good-ink); flex: none; }
.mock-float.f1 { left: -30px; bottom: -44px; }
.mock { margin-bottom: 36px; }
.mock-float.f2 { right: -22px; top: -22px; }
.mock-float strong { display: block; }
.rate-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rate-card { padding: 22px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.rate-card .big { font-size: 2.6rem; font-weight: 750; color: #fff; letter-spacing: -0.03em; line-height: 1.1; }
.rate-card p { margin: 6px 0 0; color: #b9cfc4; font-size: .92rem; }
.rate-card a { color: #f3c96f; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 36px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; position: relative; }
.step-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-50); color: var(--brand-ink); font-weight: 750; margin-bottom: 14px; }
.step h3 { font-size: 1.05rem; }
.step p { color: var(--ink-2); font-size: .92rem; margin: 0; }
.step .who { display: inline-block; margin-top: 12px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.feature { padding: 22px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.feature .ficon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 14px; }
.feature h3 { font-size: 1rem; }
.feature p { font-size: .92rem; color: var(--ink-2); margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 12px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist svg { color: var(--brand); margin-top: 3px; }
.section.dark .checklist svg { color: var(--accent); }
.faq { max-width: 820px; margin: 28px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 650; font-size: 1.02rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 12px; font-size: 1.4rem; color: var(--brand); font-weight: 400; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--ink-2); padding-bottom: 12px; margin: 0; }
.cta-band { background: var(--brand); color: #fff; border-radius: 24px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 6px; }
.cta-band p { color: #cfe7dc; margin: 0; }
.cta-band .btn-primary { --bg: #fff; --fg: var(--brand-ink); --bd: #fff; }
.cta-band .btn-primary:hover { background: var(--brand-50); color: var(--brand-ink); }
.cta-band .btn-secondary { --bg: transparent; --fg: #fff; --bd: rgba(255, 255, 255, .5); }
.cta-band .btn-secondary:hover { background: rgba(255,255,255,.1); color: #fff; }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; align-items: stretch; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.price-card.popular { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.price-card .tag { position: absolute; top: -12px; left: 24px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.price-card h3 { margin: 0; font-size: 1.1rem; }
.price { font-size: 2.4rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.price small { font-size: .9rem; font-weight: 550; color: var(--muted); letter-spacing: 0; }
.price-card ul { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 9px; font-size: .92rem; }
.price-card li { display: flex; gap: 8px; align-items: flex-start; }
.price-card li svg { color: var(--brand); margin-top: 3px; }
.addon-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.addon { padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.addon .amt { font-weight: 750; font-size: 1.25rem; }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.6fr; gap: 32px; }
.footer-grid h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; }
.footer-grid nav a { color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.footer-grid nav a:hover { color: var(--brand); }
.footer-brand p, .footer-note p { color: var(--muted); font-size: .88rem; margin-top: 12px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.source { font-size: .78rem; color: var(--muted); }
.section.dark .source { color: #8fb0a1; }
.section.dark .source a { color: #b9d7c9; }

/* ---------- app shell ---------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--brand-deep); color: #cfe0d7; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .logo { color: #fff; }
.sidebar .logo-word span { color: #7fd1ad; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.sidebar-close { display: none; color: #cfe0d7; }
.workspace { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.workspace strong { display: block; color: #fff; font-size: .88rem; line-height: 1.25; }
.workspace small { color: #9fbcaf; font-size: .76rem; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #2a1b00; font-weight: 800; font-size: .8rem; flex: none; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .sidebar-foot a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: #cfe0d7; text-decoration: none; font-weight: 550; font-size: .92rem; position: relative; }
.side-nav a:hover, .sidebar-foot a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-nav a[aria-current="page"] { background: rgba(255, 255, 255, .11); color: #fff; }
.side-nav a[aria-current="page"]::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-nav svg, .sidebar-foot svg { opacity: .85; }
.nav-count { margin-left: auto; background: var(--accent); color: #2a1b00; border-radius: 999px; font-size: .72rem; font-weight: 800; padding: 1px 7px; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, .09); margin: 8px 6px; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(255, 255, 255, .09); padding-top: 10px; }
.sidebar-foot a { font-size: .86rem; color: #a9c5b8; }
.sidebar :focus-visible { outline-color: #8ab4ff; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 28px; background: rgba(244, 245, 241, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; }
.topbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.clock-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: .85rem; cursor: pointer; color: var(--ink-2); }
.clock-chip:hover { border-color: var(--ink-2); color: var(--ink); }
.clock-chip.shifted { border-color: var(--accent); background: var(--accent-50); color: #6b4700; }
.clock-shift { background: var(--accent); color: #2a1b00; border-radius: 999px; padding: 0 7px; font-size: .75rem; font-weight: 800; }
.demo-banner { display: flex; align-items: center; gap: 10px; padding: 9px 28px; background: var(--brand-50); color: var(--brand-ink); font-size: .85rem; border-bottom: 1px solid var(--brand-100); }
.demo-banner.warn { background: var(--warning-bg); color: var(--warning-ink); border-color: #f5dd9d; }
.demo-banner .link-btn { margin-left: auto; font-size: .85rem; }
.page { padding: 28px; max-width: 1320px; width: 100%; }
.page:focus { outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .btn-row { flex-wrap: wrap; }
.crumbs { display: flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 550; }
.crumbs a:hover { color: var(--brand); }
.scrim { display: none; }

/* ---------- app components ---------- */
.hero-income { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.hero-income .stat-hero { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.hero-income .stat-hero .stat-label { color: #a9c5b8; }
.hero-income .stat-hero .stat-sub { color: #cfe0d7; }
.attention { display: flex; flex-direction: column; }
.att-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); }
.att-item:first-child { border-top: 0; padding-top: 0; }
.att-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.att-icon.critical, .att-icon.serious { background: var(--critical-bg); color: var(--critical-ink); }
.att-icon.warning { background: var(--warning-bg); color: var(--warning-ink); }
.att-icon.good { background: var(--good-bg); color: var(--good-ink); }
.att-icon.info, .att-icon.neutral { background: var(--info-bg); color: var(--info-ink); }
.att-body { flex: 1; min-width: 0; }
.att-body strong { display: block; font-size: .93rem; }
.att-body p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.att-item .btn { flex: none; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.feed li:first-child { border-top: 0; padding-top: 2px; }
.feed-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.feed-icon.good { background: var(--good-bg); color: var(--good-ink); }
.feed-icon.serious, .feed-icon.critical { background: var(--critical-bg); color: var(--critical-ink); }
.feed-icon.warning { background: var(--warning-bg); color: var(--warning-ink); }
.feed-icon.scheduled { background: var(--info-bg); color: var(--info-ink); }
.feed-body { flex: 1; min-width: 0; font-size: .9rem; }
.feed-body strong { font-weight: 650; }
.feed-body .feed-meta { display: block; color: var(--muted); font-size: .8rem; }
.feed-date { color: var(--muted); font-size: .8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.deal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.deal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.deal-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); color: inherit; }
.deal-card .prop-art { width: 100%; aspect-ratio: 16 / 8; }
.deal-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.deal-card h3 { margin: 0; font-size: 1.02rem; }
.deal-card .terms-line { color: var(--ink-2); font-size: .88rem; }
.deal-card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.prop-head { display: flex; gap: 18px; align-items: center; }
.prop-thumb { width: 112px; height: 72px; border-radius: 12px; overflow: hidden; flex: none; border: 1px solid var(--line); }
.prop-thumb .prop-art { width: 100%; height: 100%; }
.prop-hero { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.prop-hero .prop-art { width: 100%; aspect-ratio: 16 / 7; }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.title-row h1 { margin: 0; }
.big-number { font-size: 2.4rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.05; }
.big-number small { font-size: .95rem; color: var(--muted); font-weight: 550; letter-spacing: 0; }
.result-card { background: var(--brand-deep); color: #dce9e2; border-radius: var(--radius); padding: 22px; }
.result-card .big-number { color: #fff; }
.result-card .kv dt { color: #9fbcaf; }
.result-card .kv dd { color: #fff; }
.result-card .kv.rows > div { border-color: rgba(255, 255, 255, .1); }
.result-card .kv.rows dt { color: #cfe0d7; }
.verdict { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; }
.verdict.good { background: var(--good-bg); color: var(--good-ink); }
.verdict.critical { background: var(--critical-bg); color: var(--critical-ink); }
.verdict.neutral { background: var(--info-bg); color: var(--info-ink); }
.verdict.warning { background: var(--warning-bg); color: var(--warning-ink); }
.verdict strong { display: block; }
.verdict p { margin: 3px 0 0; font-size: .88rem; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; }
.checks .ci { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.checks .ci.pass { background: var(--good-bg); color: var(--good-ink); }
.checks .ci.fail { background: var(--critical-bg); color: var(--critical-ink); }
.checks .ci.pending { background: var(--warning-bg); color: var(--warning-ink); }
.checks small { display: block; color: var(--muted); }
details.path { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
details.path + details.path { margin-top: 10px; }
details.path summary { cursor: pointer; padding: 12px 0; font-weight: 650; display: flex; align-items: center; gap: 8px; list-style: none; }
details.path summary::-webkit-details-marker { display: none; }
details.path summary .ref { margin-left: auto; font-weight: 500; color: var(--muted); font-size: .78rem; }
details.path[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
details.path > .checks { padding-bottom: 14px; }
.history-strip { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; }
.hcell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hcell .hbox { width: 100%; aspect-ratio: 1; max-width: 38px; border-radius: 8px; display: grid; place-items: center; }
.hbox.ontime, .hbox.grace { background: var(--good-bg); color: var(--good-ink); }
.hbox.late { background: var(--serious-bg); color: var(--serious-ink); }
.hbox.late30 { background: var(--critical-bg); color: var(--critical-ink); }
.hbox.open { background: var(--warning-bg); color: var(--warning-ink); }
.hbox.openlate, .hbox.open30 { background: var(--critical-bg); color: var(--critical-ink); }
.hbox.future { background: var(--surface-3); color: var(--muted); }
.hcell span { font-size: .68rem; color: var(--muted); }
.score-hero { display: flex; gap: 18px; align-items: center; }
.score-num { font-size: 2.2rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.score-num small { font-size: 1rem; color: var(--muted); font-weight: 550; }
.factor-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }
.factor-list li { display: flex; gap: 8px; align-items: flex-start; }
.factor-list .plus { color: var(--good-ink); }
.factor-list .minus { color: var(--critical-ink); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .85rem; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-current="true"], .chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { background: rgba(127, 127, 127, .18); border-radius: 999px; padding: 0 6px; font-size: .75rem; }
.share-box { display: flex; gap: 8px; align-items: stretch; }
.share-box input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.progress-steps { display: flex; gap: 6px; margin-bottom: 22px; }
.progress-steps span { flex: 1; height: 5px; border-radius: 999px; background: var(--line); }
.progress-steps span.done { background: var(--brand); }
.progress-steps span.current { background: var(--brand-200); }
.rule-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); }
.rule-row:first-child { border-top: 0; padding-top: 0; }
.rule-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.rule-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.rule-row .switch { margin-left: auto; }
.money-in { color: var(--good-ink); }
.money-out { color: var(--critical-ink); }
.alloc { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); }
.alloc b { color: var(--ink-2); font-weight: 650; }
.alloc-preview { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.alloc-preview h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.doc-item { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; color: inherit; }
.doc-item:hover { border-color: var(--brand-200); box-shadow: var(--shadow-sm); color: inherit; }
.doc-item .dicon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.doc-item strong { display: block; font-size: .93rem; }
.doc-item span { color: var(--muted); font-size: .82rem; }
.note-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.note-list li { background: var(--accent-50); border: 1px solid #f3e2b8; border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.note-list time { display: block; font-size: .76rem; color: var(--muted); font-weight: 600; }
.balloon-callout { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--accent-50); border: 1px solid #f3e2b8; }
.balloon-callout svg { color: #9a6700; }

/* ---------- borrower / apply portal ---------- */
.portal-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.portal-header-inner { display: flex; align-items: center; gap: 6px 14px; min-height: 62px; padding: 10px 24px; flex-wrap: wrap; }
.portal-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand-ink); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.logo-mark { flex: none; }
.portal-links { margin-left: auto; display: flex; gap: 16px; font-size: .88rem; white-space: nowrap; }
.portal-links a { color: var(--ink-2); text-decoration: none; font-weight: 550; }
.portal-links a:hover { color: var(--brand); }
.portal-main { max-width: 1080px; margin: 0 auto; padding: 28px 24px 40px; }
.portal-main:focus { outline: none; }
.portal-footer { max-width: 1080px; color: var(--muted); font-size: .82rem; padding-bottom: 32px; }
.pay-card { background: var(--brand-deep); color: #dce9e2; border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.pay-card .amount { font-size: 2.8rem; font-weight: 750; color: #fff; letter-spacing: -0.03em; line-height: 1; }
.pay-card .btn-primary { --bg: #fff; --fg: var(--brand-ink); --bd: #fff; }
.pay-card .btn-primary:hover { background: var(--brand-50); color: var(--brand-ink); }
.pay-card .btn-secondary { --bg: transparent; --fg: #fff; --bd: rgba(255, 255, 255, .4); }
.pay-card .btn-secondary:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.pay-card .sub { color: #b9cfc4; font-size: .9rem; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.apply-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-bottom: 24px; }
.apply-hero .prop-art { width: 100%; height: 100%; min-height: 220px; }
.apply-hero-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.apply-hero-body h1 { font-size: 1.5rem; margin: 0; }
.term-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.term-pills span { background: var(--surface-3); border-radius: 999px; padding: 5px 12px; font-size: .84rem; font-weight: 650; color: var(--ink-2); }
.wizard { max-width: 760px; margin: 0 auto; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.applicant-block { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface-2); }
.applicant-block + .applicant-block { margin-top: 14px; }
.applicant-block h3 { font-size: .95rem; margin-bottom: 12px; }
.review-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.success { text-align: center; max-width: 620px; margin: 24px auto; }
.success .big-check { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--good-bg); color: var(--good-ink); margin: 0 auto 16px; }

/* ---------- documents ---------- */
.doc-main { background: #e9ebe6; min-height: 100vh; padding: 24px 16px 60px; }
.doc-main:focus { outline: none; }
.doc-toolbar { max-width: 816px; margin: 0 auto 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.doc-page { max-width: 816px; margin: 0 auto; background: #fff; box-shadow: var(--shadow); border-radius: 4px; padding: 56px 64px; font-size: 13.5px; line-height: 1.55; color: #111; }
.doc-page h1 { font-size: 1.45rem; margin: 0 0 4px; }
.doc-page h2 { font-size: 1rem; margin: 22px 0 8px; }
.doc-page p { margin: 0 0 10px; }
.doc-letterhead { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #111; padding-bottom: 14px; margin-bottom: 20px; }
.doc-letterhead .from { font-size: .8rem; color: #444; text-align: right; }
.doc-page table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 12.5px; }
.doc-page th, .doc-page td { border-bottom: 1px solid #d9d9d9; padding: 6px 8px; text-align: left; vertical-align: top; }
.doc-page th { background: #f3f3f1; font-weight: 700; }
.doc-page td.num, .doc-page th.num { text-align: right; font-variant-numeric: tabular-nums; }
.doc-page tr.total td { font-weight: 800; border-top: 2px solid #111; border-bottom: 0; }
.doc-page .box { border: 1px solid #111; padding: 12px 14px; margin: 12px 0; }
.doc-page .fine { font-size: 11px; color: #555; }
.doc-page .sig { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.doc-page .sig div { border-top: 1px solid #111; padding-top: 4px; font-size: 11.5px; }
.doc-draft { background: #fff7e0; border: 1px dashed #c89400; color: #6a4c00; padding: 10px 12px; margin-bottom: 18px; font-size: 12px; }
.doc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero-income { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g-main-r { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .addon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 60; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(9, 20, 15, .45); z-index: 50; }
  .sidebar-close { display: inline-grid; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .demo-banner { padding: 9px 16px; }
  .page { padding: 20px 16px; }
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .features, .price-grid, .rate-band { grid-template-columns: minmax(0, 1fr); }
  .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .apply-hero { grid-template-columns: minmax(0, 1fr); }
  .apply-hero .prop-art { min-height: 0; aspect-ratio: 16 / 7; }
  .mock-float.f1 { left: 8px; } .mock-float.f2 { right: 8px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  h1 { font-size: 1.45rem; }
  .section { padding: 56px 0; }
  .hero { padding: 40px 0 48px; }
  .g-2, .g-3, .g-4, .form-grid, .form-grid.g3, .kv, .kv.three, .review-list, .doc-cols { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .stats, .stats.s3, .hero-income { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero-income .stat-hero { grid-column: 1 / -1; }
  .stat { padding: 13px 14px; }
  .stat-value { font-size: 1.25rem; }
  .stat-hero .stat-value { font-size: 2.4rem; }
  .steps, .addon-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none !important; }
  .topbar-right .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hero-income > :last-child:nth-child(even) { grid-column: 1 / -1; }
  .topbar-right .btn { padding: 6px 10px; }
  .cta-band { padding: 28px 22px; }
  .meter-row { grid-template-columns: 1fr 64px; }
  .meter-row .meter { grid-column: 1 / -1; grid-row: 2; }
  .doc-page { padding: 28px 20px; }
  .history-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .prop-head { flex-direction: column; align-items: flex-start; }
  .portal-main { padding: 20px 16px 32px; }
  .portal-links { gap: 10px; font-size: .8rem; }
  .pay-card .amount { font-size: 2.2rem; }
  .card { padding: 16px; }
  .card > .table-wrap { margin: 0 -16px -16px; }
  .mock-float { display: none; }
  .alert { flex-wrap: wrap; }
  .alert-body { flex-basis: calc(100% - 40px); }
  .alert-actions { width: 100%; padding-left: 32px; }
  .tbl th, .tbl td { padding: 10px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .badge, .btn, .chip { border: 1px solid CanvasText; }
  .meter-fill { background: Highlight; }
}
@media print {
  body { background: #fff; }
  .doc-toolbar, .skip { display: none !important; }
  .doc-main { background: #fff; padding: 0; }
  .doc-page { box-shadow: none; padding: 0; max-width: none; }
  @page { margin: 0.6in; }
}
