/* The Mortgage Actuary — client portal.
   Layout copied from the reference client portal (docs/reference/*.jpg): 68px top bar, 256px side menu,
   cards on a pale canvas, a dark estimate card beside a six-step tracker.
   Colours, type and square corners come from Ron's website (cloudflare-landing/coin.css). */
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-var.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }

:root {
  --bg: #f6f9f7; --surface: #fff; --surface-2: #f3f6f4; --surface-hover: #eef3f0; --field: #f4f6f5;
  --line: #e2e9e5; --line-2: #d3ddd8;
  --ink: #000800; --ink-2: #131d18; --text: #3a423d; --muted: #6b756f; --faint: #98a29c;
  --green: #03bd70; --green-ink: #067a48; --mint: #d7f2e9; --mint-2: #edf8f3;
  --night: #0a1b13; --brick: #1a2b23; --mortar: #24362d;
  --warn-bg: #fff6e8; --warn-line: #f3d6a4; --warn-ink: #8a4b06;
  --err-bg: #fdeeee; --err-line: #f2c7c7; --err-ink: #a12222;
  --info-bg: #edf8f3; --info-line: #c9eadb;
  --shadow: 0 1px 2px rgba(10, 27, 19, .05);
  --shadow-lg: 0 18px 40px rgba(10, 27, 19, .12);
  --top: 68px; --side: 256px; --gut: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #08130e; --surface: #0f1d16; --surface-2: #13241b; --surface-hover: #172a20; --field: #13241b; --line: #1f3329; --line-2: #2a4235; --ink: #f2f7f4; --ink-2: #e9f1ec; --text: #c3cec8; --muted: #8fa097; --faint: #66776d; --green-ink: #4fd99a; --mint: #143526; --mint-2: #11291e; --warn-bg: #2a1e0b; --warn-line: #5a3f12; --warn-ink: #f2c37a; --err-bg: #2b1212; --err-line: #5b2222; --err-ink: #f1a3a3; --info-bg: #11291e; --info-line: #1f4a35; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #08130e; --surface: #0f1d16; --surface-2: #13241b; --surface-hover: #172a20; --field: #13241b; --line: #1f3329; --line-2: #2a4235; --ink: #f2f7f4; --ink-2: #e9f1ec; --text: #c3cec8; --muted: #8fa097; --faint: #66776d; --green-ink: #4fd99a; --mint: #143526; --mint-2: #11291e; --warn-bg: #2a1e0b; --warn-line: #5a3f12; --warn-ink: #f2c37a; --err-bg: #2b1212; --err-line: #5b2222; --err-ink: #f1a3a3; --info-bg: #11291e; --info-line: #1f4a35; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.5 "DM Sans", system-ui, -apple-system, sans-serif; color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--green-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; letter-spacing: -.015em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink-2); color: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.ic { width: 18px; height: 18px; flex: none; }
.ic.xs { width: 14px; height: 14px; }
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: revert !important; } :root[data-theme="dark"] .only-light { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: revert !important; } :root:not([data-theme="light"]) .only-light { display: none !important; } }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .block { display: block; }
.strong-link { font-weight: 600; color: var(--ink); }

/* ---------- top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 40; display: flex; align-items: center; gap: 12px; padding: 0 var(--gut); background: var(--surface); box-shadow: var(--shadow); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; }
.brand .logo { height: 30px; width: auto; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: flex; gap: 2px; margin-right: 6px; }
.lang .seg { font-size: 12px; font-weight: 600; padding: 4px 8px; color: var(--muted); }
.lang .seg.on { background: var(--ink-2); color: #fff; }
:root[data-theme="dark"] .lang .seg.on { color: var(--night); }
.lang .seg:hover { text-decoration: none; color: var(--ink); }
.lang .seg.on:hover { color: #fff; }
.round-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-hover); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.round-btn:hover { background: var(--mint); color: var(--ink); }
.menu-btn { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink-2); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; letter-spacing: .02em; flex: none; text-transform: uppercase; }
.avatar:hover { text-decoration: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.broker { background: var(--green); color: var(--night); }
:root[data-theme="dark"] .avatar { background: var(--green); color: var(--night); }
.dot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--green); color: var(--night); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.inline { display: inline; margin: 0; }

.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 44px; width: 340px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 50; }
.menu-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.menu-head form { margin: 0; }
.menu-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; }
.menu-list a { display: block; padding: 10px 16px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--line); }
.menu-list li.unread a { background: var(--mint-2); color: var(--ink); }
.menu-list a:hover { background: var(--surface-hover); text-decoration: none; }
.menu-list .when, .notif-list .when { display: block; font-size: 12px; color: var(--faint); margin-top: 2px; }
.menu-empty { padding: 20px 16px; color: var(--muted); font-size: 13px; }
.menu-foot { display: block; text-align: center; padding: 10px; font-size: 13px; font-weight: 600; }

/* ---------- shell / side menu ---------- */
.shell { display: flex; min-height: 100vh; padding-top: var(--top); }
.sidebar { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px 0; z-index: 30; transition: width .18s ease; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px; }
.side-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; overflow: hidden; }
.side-collapse { width: 28px; height: 28px; border: 0; background: none; color: var(--faint); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.side-collapse:hover { color: var(--ink); background: var(--surface-hover); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); background: none; border: 0; text-align: left; cursor: pointer; white-space: nowrap; }
.side-link:hover { background: var(--surface-hover); text-decoration: none; }
.side-link.active { background: var(--mint-2); color: var(--green-ink); font-weight: 600; }
.side-link.active::before { content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 3px; background: var(--green); }
.side-link.accent { color: var(--green-ink); font-weight: 600; }
.side-link .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--green); color: var(--night); padding: 1px 7px; border-radius: 9px; }
.side-foot { margin-top: auto; padding: 12px 0; display: flex; flex-direction: column; gap: 2px; }
.side-foot form { margin: 0; }
.side-lang { display: none; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 14px 4px 16px; border-top: 1px solid var(--line); margin: 0 -12px; padding-left: 14px; padding-right: 14px; }
.side-user .who { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.side-user strong { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { flex: 1; min-width: 0; margin-left: var(--side); display: flex; flex-direction: column; transition: margin .18s ease; }
.page { flex: 1; width: 100%; max-width: 1180px; padding: 28px var(--gut) 40px; display: flex; flex-direction: column; gap: 20px; }
.foot { border-top: 1px solid var(--line); padding: 14px var(--gut); font-size: 12px; color: var(--faint); background: var(--bg); }
body.collapsed .sidebar { width: 72px; }
body.collapsed .main { margin-left: 72px; }
body.collapsed .side-link span, body.collapsed .side-label, body.collapsed .side-user .who, body.collapsed .side-link .count { display: none; }
body.collapsed .side-head { justify-content: center; }
body.collapsed .side-collapse svg { transform: scaleX(-1); }
body.collapsed .side-link { justify-content: center; padding: 10px; }
.drawer-scrim { position: fixed; inset: var(--top) 0 0 0; background: rgba(8, 19, 14, .45); z-index: 29; }

/* ---------- page heads ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head.tight { margin-top: -8px; }
.page-head > div:first-child { flex: 1 1 260px; min-width: 0; }
.page-head h1 { font-size: 22px; line-height: 1.25; }
.page-head .sub, .sub { color: var(--muted); font-size: 14px; margin-top: 3px; }
.with-badge { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.head-actions.wrap { flex-wrap: wrap; justify-content: flex-end; }
.head-actions form { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.back:hover { color: var(--ink); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green-ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; font: 500 14px/1 "DM Sans", sans-serif; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none !important; border-radius: 0; }
.btn-dark { background: var(--ink-2); border-color: var(--ink-2); color: #fff; box-shadow: 0 8px 18px rgba(10, 27, 19, .16); }
.btn-dark:hover { background: #000; }
:root[data-theme="dark"] .btn-dark { background: var(--green); border-color: var(--green); color: var(--night); }
.btn-line { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); box-shadow: var(--shadow); }
.btn-line:hover { border-color: var(--ink-2); }
.btn-ghost { background: none; color: var(--muted); padding: 0 8px; }
.btn-ghost:hover { color: var(--ink); }
.btn-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-sm .ic { width: 16px; height: 16px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; height: 46px; }
.btn[disabled], .btn.is-busy { opacity: .55; cursor: default; box-shadow: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.strong { font-size: 15px; }
.icon-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); text-decoration: none; }
.icon-btn.danger:hover { color: var(--err-ink); border-color: var(--err-line); }
.icon-btn .ic { width: 16px; height: 16px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card.pad-sm { padding: 12px 16px; }
.card-head { padding: 16px 24px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 15px; color: var(--ink); }
.card-head .sub { font-size: 12.5px; margin-top: 2px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.form-card { display: block; }
form.form-card > .card-body, section.form-card > .card-body { padding: 20px 24px 24px; }
form.card.form-card:not(:has(.card-body)) { padding: 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2.cards { gap: 20px; }
.narrow { max-width: 720px; }
.subsection { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.subsection h3 { font-size: 14px; }
.sep-line { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.field > label, .label, .label-row label { font-size: 13px; font-weight: 500; color: var(--text); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.label-row a { font-size: 13px; font-weight: 600; }
.label-row small { font-size: 12px; color: var(--faint); }
.req { color: #d83b3b; margin-left: 2px; }
input, select, textarea { width: 100%; font: 400 14px "DM Sans", sans-serif; color: var(--ink-2); background: var(--field); border: 1px solid var(--line-2); padding: 0 12px; height: 38px; border-radius: 0; }
textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: -1px; background: var(--surface); }
input.computed, input[readonly] { background: var(--surface-2); color: var(--muted); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--err-ink); }
.err { font-size: 12.5px; color: var(--err-ink); }
.hint { font-size: 12px; color: var(--faint); }
.hint b { color: var(--green-ink); }
.money { display: flex; align-items: stretch; }
.money > span { display: flex; align-items: center; justify-content: center; min-width: 32px; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--line-2); border-right: 0; color: var(--muted); font-size: 13px; }
.money.suffix { flex-direction: row-reverse; }
.money.suffix > span { border-right: 1px solid var(--line-2); border-left: 0; }
.money input { flex: 1; min-width: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.choice span:hover { border-color: var(--ink-2); }
.choice input:checked + span { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
:root[data-theme="dark"] .choice input:checked + span { background: var(--green); border-color: var(--green); color: var(--night); }
.choice input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; flex: none; margin: 1px 0 0; accent-color: var(--ink-2); padding: 0; }
.check.boxed { border: 1px solid var(--line); padding: 12px 14px; }
.checks { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.levels { border: 1px solid var(--line); margin: 0; padding: 0; }
.levels legend { float: left; width: 100%; padding: 12px 14px; font-size: 13.5px; font-weight: 600; color: var(--green-ink); border-bottom: 1px solid var(--line); }
.levels legend small { color: var(--faint); font-weight: 400; }
.level { clear: both; display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.levels legend + .level { border-top: 0; }
.level:hover { background: var(--surface-2); }
.level input { width: 16px; height: 16px; margin-top: 2px; flex: none; accent-color: var(--ink-2); padding: 0; }
.level span { display: flex; flex-direction: column; }
.level b { font-weight: 500; font-size: 13.5px; color: var(--ink); }
.level small { font-size: 12px; color: var(--muted); }
.level.none { padding-top: 6px; padding-bottom: 6px; }
fieldset[disabled] { opacity: .45; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-card > .form-actions { padding-top: 20px; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 70%, transparent); padding: 16px 0; z-index: 5; }
.form-error, .form-ok { font-size: 13.5px; padding: 10px 12px; border: 1px solid var(--err-line); background: var(--err-bg); color: var(--err-ink); }
.form-ok { border-color: var(--info-line); background: var(--info-bg); color: var(--green-ink); }
.hp { position: absolute; left: -9999px; }
.code-input { font-size: 22px; letter-spacing: .4em; text-align: center; height: 52px; font-variant-numeric: tabular-nums; }
.pw { position: relative; }
.pw input { padding-right: 42px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 30px; border: 0; background: none; color: var(--faint); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pw-eye:hover { color: var(--ink); }
.autosave { font-size: 12px; color: var(--faint); align-self: center; }
.info { display: inline-flex; vertical-align: middle; color: var(--faint); cursor: help; position: relative; }
.info:hover::after, .info:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 240px; padding: 8px 10px; background: var(--night); color: #fff; font-size: 12px; font-weight: 400; line-height: 1.4; z-index: 20; text-transform: none; letter-spacing: 0; }

/* ---------- alerts / flash ---------- */
.flash { padding: 12px 16px; border: 1px solid var(--info-line); border-left: 4px solid var(--green); background: var(--info-bg); color: var(--ink-2); font-size: 14px; }
.flash-error { border-color: var(--err-line); border-left-color: var(--err-ink); background: var(--err-bg); color: var(--err-ink); }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: 1px solid var(--info-line); background: var(--info-bg); font-size: 13.5px; color: var(--text); }
.alert .ic { margin-top: 1px; color: var(--green-ink); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); }
.alert-warn .ic { color: var(--warn-ink); }
.alert-error { border-color: var(--err-line); background: var(--err-bg); color: var(--err-ink); }
.alert-error .ic { color: var(--err-ink); }

/* ---------- chips, badges, filters ---------- */
.filters { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.search-row { display: flex; gap: 8px; margin: 0; }
.search-row .search { flex: 1; }
.chips { display: flex; gap: 8px; }
.scroll-x { overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.chip { flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 13.5px; white-space: nowrap; }
.chip:hover { border-color: var(--ink-2); text-decoration: none; }
.chip.on { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
:root[data-theme="dark"] .chip.on { background: var(--green); border-color: var(--green); color: var(--night); }
.more-filters summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--green-ink); font-weight: 600; font-size: 13.5px; }
.more-filters summary::-webkit-details-marker { display: none; }
.filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin-top: 12px; }
.filter-actions { display: flex; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); white-space: nowrap; letter-spacing: 0; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.st-new, .st-pending_offer { background: #eef4ff; border-color: #cddcfb; color: #2450a8; }
.st-mandate_signed, .st-credit_dept { background: #fff6e8; border-color: #f3d6a4; color: #8a4b06; }
.st-approved, .st-closed { background: var(--mint-2); border-color: #bfe6d3; color: var(--green-ink); }
.st-dead { background: var(--err-bg); border-color: var(--err-line); color: var(--err-ink); }
.st-archived { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
:root[data-theme="dark"] .st-new, :root[data-theme="dark"] .st-pending_offer { background: #13203a; border-color: #263a63; color: #9cbcf5; }
:root[data-theme="dark"] .st-mandate_signed, :root[data-theme="dark"] .st-credit_dept { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.tag-est { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 0 5px; margin-left: 4px; vertical-align: 1px; }
.chip-info { display: inline-block; font-size: 12px; font-weight: 600; color: var(--green-ink); background: var(--mint-2); padding: 4px 10px; }

/* ---------- view toggle ---------- */
.viewtoggle { display: flex; border: 1px solid var(--line); background: var(--surface-2); padding: 3px; gap: 2px; }
.vt { width: 32px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--faint); }
.vt.on { background: var(--surface); color: var(--green-ink); box-shadow: var(--shadow); }
.vt .ic { width: 16px; height: 16px; }

/* ---------- deals ---------- */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; }
.deal-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.deal-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.deal-card-main { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; color: inherit; flex: 1; }
.deal-card-main:hover { text-decoration: none; }
.deal-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.deal-card h2 { font-size: 16px; color: var(--ink); }
.addr { font-size: 12.5px; color: var(--faint); }
.client-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.tags { font-size: 13px; color: var(--text); }
.tags span { color: var(--faint); margin: 0 4px; }
.progress { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.progress span { height: 4px; background: var(--line); }
.progress span.done { background: var(--green); }
.progress span.part { background: var(--green); opacity: .55; }
.deal-card-nums { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 2px; }
.deal-card-nums .k { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.deal-card-nums b { display: block; font-size: 15px; color: var(--ink); }
.deal-card-nums .s { font-size: 12px; color: var(--faint); }
.deal-card-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; background: var(--mint-2); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 48px 20px; color: var(--muted); font-size: 14px; }
.empty-ic { width: 34px; height: 34px; color: var(--line-2); }
.empty.big { padding: 80px 20px; }
.err-code { font-size: 48px; font-weight: 600; color: var(--line-2); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table td:first-child { min-width: 190px; }
.unit-table td:first-child { min-width: 0; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions .icon-btn + .icon-btn { margin-left: 4px; }
.who-cell { display: flex; align-items: center; gap: 10px; }

/* ---------- steps (new deal) ---------- */
.steps-line { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--faint); }
.steps-line li { display: flex; align-items: center; gap: 8px; }
.steps-line li.on { color: var(--green-ink); font-weight: 600; }
.stepnum { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.steps-line li.on .stepnum { background: var(--green-ink); border-color: var(--green-ink); color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 10px 16px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--green-ink); border-bottom-color: var(--green-ink); }
.tabs a .stepnum { width: 20px; height: 20px; font-size: 11px; background: var(--surface-2); border-color: var(--line-2); color: var(--muted); }
.tabs a.on .stepnum { border-color: var(--green-ink); color: var(--green-ink); background: var(--mint-2); }

/* unit mix table */
.unit-mix { margin: 0 -24px; overflow-x: auto; }
.unit-table th:first-child, .unit-table td:first-child { padding-left: 24px; }
.unit-table td { padding: 8px 10px; vertical-align: middle; }
.unit-table input, .unit-table select { height: 34px; }
.unit-table td:nth-child(1) { width: 26%; } .unit-table td:nth-child(2) { width: 16%; }
.unit-table tfoot td { border-bottom: 1px solid var(--line); padding: 10px 24px; }
.total-row th { background: var(--surface-2); color: var(--muted); }
.total-row th[data-u-total-count] { color: var(--ink); font-size: 13.5px; }
.total-row th[data-u-total-annual] { color: var(--green-ink); font-size: 13.5px; }

/* ---------- deal page ---------- */
.deal-top { display: grid; grid-template-columns: minmax(300px, 1fr) 1.9fr; gap: 20px; }
.hero-card, .result-card { background: var(--night); color: #dfe9e3; padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 16px 36px rgba(10, 27, 19, .22); }
.hero-card .eyebrow, .result-card .eyebrow { color: #9fb5a9; text-align: left; }
.hero-wait { color: #c4d3cb; font-size: 14px; line-height: 1.55; }
.hero-num { font-size: clamp(20px, 2.1vw, 27px); white-space: nowrap; font-weight: 600; color: #fff; letter-spacing: -.02em; line-height: 1.15; }
.hero-num .cur { color: var(--green); margin-right: 4px; }
.hero-num .dash { color: #7f9a8b; font-weight: 400; }
.hero-program { font-size: 13px; color: var(--green); font-weight: 600; }
.hero-sub { margin: 0; display: grid; gap: 6px; border-top: 1px solid var(--mortar); padding-top: 10px; }
.hero-sub div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.hero-sub dt { color: #9fb5a9; } .hero-sub dd { margin: 0; color: #fff; font-weight: 500; text-align: right; }
.hero-note { font-size: 12px; color: #8ea597; }
.steps-card { padding: 22px 24px 18px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.track::before { content: ""; position: absolute; left: 8.33%; right: 8.33%; top: 17px; height: 1px; background: var(--line-2); }
.track li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.track-ic { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--faint); display: flex; align-items: center; justify-content: center; position: relative; }
.track-ic .ic { width: 16px; height: 16px; }
.track small { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.track b { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.track li.done .track-ic { background: var(--green); border-color: var(--green); color: var(--night); }
.track li.current .track-ic { box-shadow: 0 0 0 4px var(--mint); }
.track-note { text-align: center; font-size: 12.5px; color: var(--faint); min-height: 1em; }
.facts { margin: 0; padding: 20px 24px 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; }
.facts.one { grid-template-columns: 1fr; gap: 14px; }
.facts dt { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 3px 0 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.pad { padding: 0 24px 20px; }
.statement { font-size: 13px; }
.statement thead th { background: none; color: var(--ink-2); text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--line-2); padding: 14px 16px 8px; }
.statement thead th:first-child, .statement td:first-child { padding-left: 24px; }
.statement thead th:last-child, .statement td:last-child { padding-right: 24px; }
.statement td { padding: 6px 16px; border-bottom: 1px solid var(--line); }
.statement tr.group td { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding-top: 14px; border-bottom: 0; }
.statement tr.indent td:first-child { padding-left: 38px; color: var(--muted); }
.statement tr.deduct td { color: #c03c3c; } .statement tr.deduct td:first-child { color: var(--muted); }
.statement tr.subtotal td, .statement tr.expense_total td { font-weight: 600; }
.statement tr.total td { font-weight: 700; border-bottom: 1.5px solid var(--ink-2); }
.statement tr.noi td { font-weight: 700; border-top: 1.5px solid var(--ink-2); border-bottom: 0; padding-top: 10px; padding-bottom: 14px; }
.statement tr.noi td:last-child { color: var(--green-ink); }
.mli-sum { flex-direction: row; align-items: center; gap: 32px; flex-wrap: wrap; }
.mli-total .k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mli-total b { font-size: 30px; color: var(--ink); }
.mli-parts { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--text); }
.mli-parts b { margin-left: 6px; color: var(--ink); }
.dropzone { border: 1.5px dashed var(--line-2); padding: 26px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin: 0; transition: background .15s; }
.dropzone.over { background: var(--mint-2); border-color: var(--green); }
.dz-ic { width: 28px; height: 28px; color: var(--faint); }
.dz-status { font-size: 13px; color: var(--green-ink); min-height: 1em; }
.dz-status.bad { color: var(--err-ink); }
.doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); }
.doc-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.doc-list li:last-child { border-bottom: 0; }
.doc-list form { margin: 0; }
.doc-ic { color: var(--green-ink); }
.doc-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-meta a { color: var(--ink); font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta small { font-size: 12px; color: var(--faint); }
.messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; max-height: 480px; overflow-y: auto; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg.mine { flex-direction: row-reverse; }
.bubble { max-width: 78%; background: var(--surface-2); border: 1px solid var(--line); padding: 10px 14px; }
.msg.mine .bubble { background: var(--mint-2); border-color: var(--info-line); }
.msg.status .bubble { background: none; border-style: dashed; }
.msg-head { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.msg-head b { color: var(--ink); }
.msg-kind { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--green-ink); margin-bottom: 2px; }
.msg-body { white-space: pre-wrap; font-size: 14px; overflow-wrap: anywhere; }
.msg-form { display: flex; gap: 10px; align-items: flex-end; margin: 0; border-top: 1px solid var(--line); padding-top: 16px; }
.msg-form textarea { min-height: 44px; }
.broker-panel { border-color: var(--info-line); }
.broker-panel .card-head { background: var(--mint-2); }
.broker-panel .card-body.grid2 { grid-template-columns: 1fr 1.4fr 1fr; align-items: start; }
.client-box p { font-size: 14px; margin-top: 6px; overflow-wrap: anywhere; }
.dialog { border: 0; padding: 0; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: rgba(8, 19, 14, .5); }
.dialog form { padding: 22px 24px; }
.dialog h2 { font-size: 18px; }

/* ---------- notifications ---------- */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list a { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 14px; }
.notif-list li:last-child a { border-bottom: 0; }
.notif-list a:hover { background: var(--surface-hover); text-decoration: none; }
.notif-list .notif-text { flex: 1; }
.notif-list .when { margin: 0; white-space: nowrap; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.notif-list li.unread a { color: var(--ink); background: var(--mint-2); }
.notif-list li.unread .notif-dot { background: var(--green); }

/* ---------- profile ---------- */
.who-big { display: flex; align-items: center; gap: 14px; }

/* ---------- calculators ---------- */
.seg-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-tab { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.seg-tab:hover { border-color: var(--ink-2); text-decoration: none; }
.seg-tab.on { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
:root[data-theme="dark"] .seg-tab.on { background: var(--green); border-color: var(--green); color: var(--night); }
.calc { display: flex; flex-direction: column; gap: 6px; }
.calc-title { font-size: 26px; letter-spacing: -.02em; }
.calc .sub { max-width: 640px; margin-bottom: 4px; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-top: 10px; }
.result-card { position: sticky; top: calc(var(--top) + 20px); }
.result-card .per { font-size: 13px; color: #9fb5a9; margin-top: -6px; }
.result-rows { border-top: 1px solid var(--mortar); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.result-rows .r { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.result-rows .r span { color: #9fb5a9; } .result-rows .r b { color: #fff; font-weight: 500; text-align: right; }
.result-rows .r.minus b { color: #8fe0b8; }
.result-rows .r.total { border-top: 1px solid var(--mortar); padding-top: 8px; }
.result-rows .r.total b { font-weight: 700; }
.result-rows .warn { color: #f2c37a; font-size: 13px; }

/* ---------- auth pages ---------- */
body.auth { background: var(--surface); }
.auth-grid { display: grid; grid-template-columns: 46% 1fr; min-height: 100vh; }
.auth-art { position: relative; overflow: hidden; background: var(--night); }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 27, 19, .15) 30%, rgba(10, 27, 19, .82)); }
.auth-art-logo { position: absolute; top: 36px; left: 40px; z-index: 1; }
.auth-art-line { position: absolute; left: 40px; right: 40px; bottom: 44px; z-index: 1; color: #fff; font-size: 42px; font-weight: 600; line-height: 1.08; letter-spacing: -.025em; }
.auth-main { display: flex; flex-direction: column; align-items: center; padding: 20px 24px 32px; }
.auth-top { align-self: stretch; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.auth-box { width: 100%; max-width: 380px; margin: auto 0; display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding: 24px 0; }
.auth-logo { align-self: center; }
.auth-logo img { width: 170px; }
.auth-title { font-size: 18px; text-align: center; }
.auth-title.big { font-size: 24px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin-top: -10px; }
.auth-card { border: 1px solid var(--line); background: var(--surface); padding: 26px 26px 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 6px 18px rgba(10, 27, 19, .06); margin: 0; }
.auth-switch { text-align: center; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.auth-switch a { font-weight: 600; }
.auth-copy { text-align: center; font-size: 12px; color: var(--faint); }
body.auth .flash { margin: 0; }

/* ---------- print ---------- */
.print-body { background: #fff; color: #000; }
.print-sheet { max-width: 900px; margin: 0 auto; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.print-head { display: flex; gap: 24px; align-items: center; border-bottom: 2px solid #000; padding-bottom: 16px; }
.print-head h1 { font-size: 22px; } .print-head p { font-size: 13px; color: #444; }
.print-range { display: flex; flex-direction: column; gap: 4px; border: 1px solid #ccc; padding: 14px 18px; }
.print-range span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #555; } .print-range b { font-size: 22px; } .print-range small { color: #555; }
.print-foot { font-size: 11px; color: #666; border-top: 1px solid #ccc; padding-top: 10px; }
.print-sheet .card { box-shadow: none; break-inside: avoid; }
.print-sheet .link-btn { display: none; }
@media print { @page { margin: 14mm; } .print-sheet { padding: 0; } body { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- qualification (broker) ---------- */
.mini-head { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.facts.keyfacts { padding: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts.keyfacts.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 4px; }
.facts.keyfacts dd { font-weight: 600; color: var(--ink); }
.qtable td { padding: 8px 10px; vertical-align: middle; }
.qtable input, .qtable select { height: 34px; min-width: 90px; }
.qtable td:first-child { min-width: 150px; }
.qresult td:first-child { padding-left: 24px; } .qresult td:last-child, .qresult th:last-child { padding-right: 24px; }
.qresult tr.indent td:first-child { padding-left: 40px; color: var(--muted); }
.table tr.total-line td { font-weight: 600; background: var(--surface-2); }
.table tr.grand td { font-weight: 700; color: var(--green-ink); border-top: 1.5px solid var(--ink-2); }
.prop-block { display: flex; flex-direction: column; gap: 14px; }
.cottage { border-top: 1px solid var(--line); padding-top: 12px; }
.cottage summary { cursor: pointer; font-weight: 600; color: var(--green-ink); font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.qual-dash .alert { font-size: 14.5px; }
@media print {
  .app .topbar, .app .sidebar, .app .foot, .app .sticky-actions, .app .back, .app .head-actions, .app .skip { display: none !important; }
  .app .main { margin: 0 !important; } .app .shell { padding-top: 0; } .app .page { max-width: none; padding: 0; }
  .app .card { break-inside: avoid; box-shadow: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .broker-panel .card-body.grid2 { grid-template-columns: 1fr 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
  .result-card { position: static; order: -1; }
}
@media (max-width: 900px) {
  :root { --gut: 16px; }
  .menu-btn { display: inline-flex; }
  .brand .logo { height: 26px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: 280px; box-shadow: var(--shadow-lg); }
  body.drawer .sidebar { transform: none; }
  .side-collapse { display: none; }
  .main, body.collapsed .main { margin-left: 0; }
  body.collapsed .sidebar { width: 280px; }
  body.collapsed .side-link span, body.collapsed .side-label, body.collapsed .side-user .who { display: revert; }
  body.collapsed .side-link { justify-content: flex-start; padding: 10px 12px; }
  .deal-top { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts.keyfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .page { padding-top: 20px; gap: 16px; }
  .top-right .lang { display: none; }
  .side-lang { display: block; padding: 4px 12px 8px; }
  .top-right { gap: 6px; }
  .top-right > .round-btn[data-theme-toggle] { display: none; }
  .grid2, .grid3, .pair, .broker-panel .card-body.grid2, .filter-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head > div:first-child { flex: none; }
  .head-actions { justify-content: space-between; }
  .head-actions.wrap { justify-content: flex-start; }
  .card-head, .card-body, form.form-card > .card-body, section.form-card > .card-body { padding-left: 16px; padding-right: 16px; }
  form.card.form-card:not(:has(.card-body)) { padding: 16px; }
  .unit-mix { margin: 0 -16px; }
  .unit-table, .unit-table tbody, .unit-table tfoot { display: block; }
  .unit-table thead { display: none; }
  .unit-table tr[data-unit-row] { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.2fr) 32px; gap: 6px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); }
  .unit-table tr[data-unit-row] td { display: block; padding: 0; border: 0; width: auto; min-width: 0; }
  .unit-table tr[data-unit-row] td:nth-child(4) { display: none; }
  .unit-table input, .unit-table select { min-width: 0; }
  .unit-table .money > span { min-width: 24px; padding: 0 6px; }
  .unit-table tfoot tr { display: block; }
  .unit-table tfoot td, .unit-table tfoot td:first-child { display: block; width: 100%; border: 0; padding: 12px 16px; }
  .unit-table tfoot tr.total-row { display: flex; justify-content: space-between; align-items: center; padding: 0 16px; background: var(--surface-2); }
  .unit-table tfoot tr.total-row th { display: block; padding: 10px 0; background: none; border: 0; }
  .unit-table tfoot tr.total-row th:empty { display: none; }
  .unit-table th:first-child, .unit-table td:first-child { padding-left: 16px; }
  .facts { grid-template-columns: 1fr 1fr; padding: 16px; gap: 14px 16px; }
  .track b { font-size: 9.5px; letter-spacing: 0; }
  .track small { display: none; }
  .track-ic { width: 30px; height: 30px; }
  .track::before { top: 15px; }
  .steps-card { padding: 16px 10px 12px; }
  .hero-num { font-size: 24px; }
  .statement td:first-child, .statement thead th:first-child { padding-left: 16px; }
  .statement td:last-child, .statement thead th:last-child { padding-right: 16px; }
  .statement td:nth-child(2), .statement th:nth-child(2), .statement td:nth-child(3), .statement th:nth-child(3) { display: none; }
  .bubble { max-width: 88%; }
  .msg-form { flex-direction: column; align-items: stretch; }
  .menu-pop { position: fixed; left: 8px; right: 8px; top: calc(var(--top) - 4px); width: auto; }
  .auth-card { padding: 20px 18px 16px; }
  .auth-main { padding: 12px 16px 24px; }
  .calc-title { font-size: 22px; }
  .row2 { grid-template-columns: 1fr; }
  .qual-dash .table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .qual-dash .table td { border: 0; padding: 0; min-width: 0; }
  .qual-dash .table td:nth-child(3) { grid-column: 1 / -1; text-align: left; color: var(--muted); font-size: 12.5px; }
  .qual-dash .table-wrap { overflow: visible; }
  .qresult td:first-child { padding-left: 16px; } .qresult td:last-child, .qresult th:last-child { padding-right: 16px; }
  .deal-grid { grid-template-columns: 1fr; }
}
