/* DSCR design system: cool ledger paper, ink, deep "coverage" green, amber for the ratio marker. Term-sheet crisp:
   hairlines over shadows, sentence-case labels, tabular figures. Shared by every surface.
   Tokens first; components below. Tenant brand color overrides --brand at runtime. */

@font-face { font-family: 'Plex'; src: url('/fonts/plex-sans-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/plex-sans-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/plex-sans-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/archivo-700.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --font: 'Plex', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Archivo', 'Plex', system-ui, -apple-system, 'Segoe UI', sans-serif; /* display face (variable name kept) */
  --mono: 'Plex Mono', ui-monospace, Menlo, monospace;

  --paper: #F2F5F3;
  --surface: #FFFFFF;
  --surface-2: #F8FAF9;
  --sunken: #E8EDEA;
  --ink: #0C1B24;
  --ink-2: #2B3B45;
  --muted: #55646D;
  --faint: #85929A;
  --line: #D9E0DC;
  --line-2: #E7ECE9;

  --brand: #0B5D4B;
  --brand-ink: #FFFFFF;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, var(--surface));
  --brand-line: color-mix(in srgb, var(--brand) 30%, var(--surface));
  --brass: #A8701A;
  --brass-soft: #F6ECD8;

  --good: #0F7B4F;
  --good-soft: #E2F2E9;
  --warn: #9A5B04;
  --warn-soft: #FBEFD8;
  --bad: #B42318;
  --bad-soft: #FBE6E3;
  --info: #2B5C9E;
  --info-soft: #E5EEF9;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 0 rgba(12, 27, 36, 0.04), 0 6px 18px -12px rgba(12, 27, 36, 0.18);
  --shadow-lg: 0 1px 0 rgba(12, 27, 36, 0.05), 0 22px 48px -24px rgba(12, 27, 36, 0.35);
  --focus: 0 0 0 3px color-mix(in srgb, var(--brand) 32%, transparent);
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0B111B; --surface: #111A27; --surface-2: #0F1723; --sunken: #0A0F18; --ink: #E8EDF3; --ink-2: #C7D0DC;
    --muted: #93A1B3; --faint: #6C7A8D; --line: #223044; --line-2: #1A2534; --brand: #3DB38E; --brand-ink: #06140F;
    --brass: #E0A64A; --brass-soft: #2A2214; --good: #45C08A; --good-soft: #0F2A1F; --warn: #E5A73A; --warn-soft: #2C2312;
    --bad: #F0766B; --bad-soft: #321614; --info: #7FA9E8; --info-soft: #14233A;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -12px rgba(0, 0, 0, 0.6); color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #0B111B; --surface: #111A27; --surface-2: #0F1723; --sunken: #0A0F18; --ink: #E8EDF3; --ink-2: #C7D0DC;
  --muted: #93A1B3; --faint: #6C7A8D; --line: #223044; --line-2: #1A2534; --brand: #3DB38E; --brand-ink: #06140F;
  --brass: #E0A64A; --brass-soft: #2A2214; --good: #45C08A; --good-soft: #0F2A1F; --warn: #E5A73A; --warn-soft: #2C2312;
  --bad: #F0766B; --bad-soft: #321614; --info: #7FA9E8; --info-soft: #14233A;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -12px rgba(0, 0, 0, 0.6); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.022em; line-height: 1.1; margin: 0 0 0.4em; text-wrap: balance; }
h1 { font-size: clamp(30px, 5vw, 48px); }
h2 { font-size: clamp(24px, 3.2vw, 32px); }
h3 { font-size: 18px; letter-spacing: -0.012em; }
h4 { font: 600 14px/1.4 var(--font); margin: 0 0 6px; letter-spacing: 0.01em; }
p { margin: 0 0 0.9em; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num, .money { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 13px; }
.serif { font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.eyebrow { font: 600 13.5px/1.3 var(--font); color: var(--brand); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ------------------------------------------------------------------ layout */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: var(--gap, 12px); }
.row { display: flex; gap: var(--gap, 12px); align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.top { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: var(--gap, 16px); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
@media (min-width: 720px) { :root { --gutter: 24px; } }

/* ------------------------------------------------------------------ surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.pad-lg { padding: 28px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 14px; }
.card-head h3 { margin: 0; }
.panel { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 14px 16px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 15px/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--sunken); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.lg { min-height: 52px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.busy { opacity: 0.55; cursor: not-allowed; }
.btn .spin { width: 16px; height: 16px; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------------ forms */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label { font: 600 13px/1.3 var(--font); color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--bad); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: 400 16px/1.3 var(--font); font-variant-numeric: tabular-nums;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:hover { border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.input.invalid { border-color: var(--bad); }
.affix { position: relative; }
.affix .input { padding-left: 26px; }
.affix .pre { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.affix.suffix .input { padding-left: 12px; padding-right: 36px; }
.affix .post { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }

/* segmented choice */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--sunken); border-radius: 12px; }
.seg.wrapping { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
.seg button {
  min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2);
  font: 500 14px/1.2 var(--font); cursor: pointer; padding: 6px 10px;
}
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(14, 23, 38, 0.12); }

/* ------------------------------------------------------------------ status */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font: 600 12px/1 var(--font); background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--info-soft); color: var(--ink); font-size: 14px; }
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--bad-soft); }
.notice.good { background: var(--good-soft); }

/* ------------------------------------------------------------------ data */
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.stat { display: grid; gap: 2px; }
.stat .label { font: 500 12.5px/1.3 var(--font); color: var(--muted); text-transform: none; }
.stat .value { font: 600 22px/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12.5px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font: 600 12.5px/1.2 var(--font); color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.r, .table th.r { text-align: right; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: var(--surface-2); }

/* checks list (pass / warn / fail) */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.checks .ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--font); }
.checks .pass .ico { background: var(--good-soft); color: var(--good); }
.checks .warn .ico { background: var(--warn-soft); color: var(--warn); }
.checks .fail .ico { background: var(--bad-soft); color: var(--bad); }
.checks strong { display: block; font-weight: 600; }

/* coverage meter: rent against the full payment, with 0.75 / 1.00 / 1.25 marks */
.meter { position: relative; height: 14px; border-radius: 999px; background: var(--sunken); overflow: visible; }
.meter .fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #c8452f 0%, #e07b2e 16%, #e9b730 24%, #e3c53a 40%, #3fa66a 45.5%, #2f9a60 68%, #14885a 100%); }
.meter .mark { position: absolute; top: -5px; bottom: -5px; width: 2px; }
.meter .mark::before { content: ''; position: absolute; inset: 0; border-radius: 2px; background: var(--ink); opacity: 0.35; }
.meter .mark.goal { width: 3px; }
.meter .mark.goal::before { opacity: 0.75; }
.meter .mark.goal span { color: var(--good); font-weight: 700; }
.meter .mark.best span { color: #a87b12; font-weight: 700; top: 36px; }
.meter.tone-stellar .pin, .meter.tone-great .pin { border-color: var(--good); box-shadow: 0 0 0 5px color-mix(in srgb, var(--good) 22%, transparent), var(--shadow); }
.meter.tone-good .pin { border-color: var(--good); }
.meter.tone-ok .pin { border-color: #d9a400; }
.meter.tone-low .pin { border-color: #d9692a; }
.meter .mark span { position: absolute; top: 22px; transform: translateX(-50%); font: 600 11px/1 var(--font); color: var(--muted); white-space: nowrap; }
.meter .pin { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brass); transform: translate(-50%, -50%); box-shadow: var(--shadow); }

/* progress steps */
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.steps i.on { background: var(--brand); }
.milestones { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.milestones li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; position: relative; padding: 0 0 18px; font-size: 14.5px; }
.milestones li::before { content: ''; position: absolute; left: 12px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.milestones li:last-child::before { display: none; }
.milestones .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; font: 700 12px/1 var(--font); color: var(--faint); position: relative; z-index: 1; }
.milestones .done .dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.milestones .current .dot { border-color: var(--brass); color: var(--brass); box-shadow: 0 0 0 4px var(--brass-soft); }
.milestones .current { font-weight: 600; }
.milestones .todo { color: var(--muted); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 10px 14px; border: 0; background: none; font: 600 14px/1 var(--font); color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs [aria-current='page'], .tabs [aria-selected='true'] { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .count { margin-left: 6px; padding: 2px 6px; border-radius: 99px; background: var(--sunken); font-size: 11px; color: var(--ink-2); }

/* modal + toasts */
.overlay { position: fixed; inset: 0; background: rgba(9, 14, 22, 0.45); display: grid; place-items: end center; z-index: 50; padding: 12px; animation: fade 0.15s ease-out; }
@media (min-width: 640px) { .overlay { place-items: center; } }
.modal { width: 100%; max-width: 560px; max-height: calc(100dvh - 24px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px; animation: rise 0.18s ease-out; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.modal-head h3 { margin: 0; }
.toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(92vw, 420px); }
.toast { background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; animation: rise 0.18s ease-out; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty h3 { color: var(--ink); }
.skeleton { background: linear-gradient(90deg, var(--line-2), var(--sunken), var(--line-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; min-height: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* brand lockup: mark + DSCR + spelled-out descriptor */
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand .mark { width: 36px; height: 36px; flex: none; }
.brand .tile { width: 36px; height: 36px; flex: none; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font: 600 17px/1 var(--serif); }
.brand .lockup { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand .word { font: 600 22px/1 var(--serif); letter-spacing: 0.02em; white-space: nowrap; }
.brand .word .tld { color: var(--brand); letter-spacing: 0.01em; }
.brand .mark { border-radius: 9px; box-shadow: 0 1px 0 rgba(12, 27, 36, 0.06), 0 6px 14px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.brand .tag { font: 500 10.5px/1.2 var(--font); color: var(--muted); white-space: nowrap; }
@media (min-width: 760px) {
  .brand .lockup { flex-direction: row; align-items: center; gap: 0; }
  .brand .tag { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); font-size: 10.5px; line-height: 1.3; }
  .brand .tag span { display: block; }
}

/* app chrome (portal, LO app, staff console) */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.page { padding: 20px 0 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1, .page-head h2 { margin: 0; }
.footer-legal { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.footer-legal p { margin: 0 0 6px; }
.badge-ehl { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* ---- Loan application form (shared by the borrower portal and the loan officer's editor) ---- */
.urla-grid { display: grid; gap: 16px 18px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .urla-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .urla-grid > .wide { grid-column: 1 / -1; } }
.pt-yesno { display: grid; gap: 6px; }
@media (min-width: 620px) {
  .pt-yesno .field { grid-template-columns: minmax(0, 1fr) 180px; align-items: center; column-gap: 20px; }
  .pt-yesno .label { font-size: 14.5px; font-weight: 500; color: var(--ink); }
}
.urla-grid > .wide:has(.pt-yesno) + .wide:has(.pt-yesno) { border-top: 1px solid var(--line-2); padding-top: 14px; }
.pt-onfile { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; }
.pt-onfile .mono { font-size: 15px; letter-spacing: 0.04em; }
.pt-onfile .linkish { margin-left: auto; }
.urla-rows > .label { margin-bottom: 8px; }
.urla-rows-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.urla-rows-list > li { border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 8px; background: var(--surface-2); }
.urla-row { display: grid; gap: 10px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.urla-row > .grow2 { grid-column: 1 / -1; }
@media (min-width: 900px) { .urla-row { grid-template-columns: 2fr repeat(calc(var(--cols) - 1), minmax(0, 1fr)); } .urla-row > .grow2 { grid-column: auto; } }
.urla-row .field label, .urla-row .field .label { font-size: 12.5px; }
.urla-row-x { display: block; margin: 6px 0 0 auto; color: var(--muted); }
.urla-table { margin-top: 12px; }
.urla-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.urla-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; gap: 10px; }
.urla-miss { color: var(--warn-ink, var(--warn)); margin: 10px 0 0; }
.urla-rows > .err { color: var(--bad, #b3261e); font-size: 14px; font-weight: 550; margin: 0 0 10px; }

/* ---- DSCR star: green at 1.00, gold at 1.20, gold with a one-time burst at 1.50 ---- */
.dscr-star { position: relative; display: inline-block; line-height: 1; margin-left: 6px; font-size: 0.9em; }
.dscr-star.good { color: var(--good); }
.dscr-star.great, .dscr-star.stellar { color: #e0a92e; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08); }
.dscr-star .fireworks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.dscr-star .fireworks i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: 0; transform: rotate(var(--a)) translateY(0) scale(0.4); animation: dscr-burst 2.6s cubic-bezier(0.2, 0.7, 0.3, 1) var(--d) infinite both; }
.dscr-star .fireworks i:nth-child(even) { width: 6px; height: 6px; left: -3px; top: -3px; animation-name: dscr-burst-far; animation-delay: calc(var(--d) + 1.3s); }
/* A burst, then a rest, forever: the show keeps going for as long as the ratio stays at 1.50 or better. */
@keyframes dscr-burst { 0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(0.4); } 8% { opacity: 1; } 45% { opacity: 0; transform: rotate(var(--a)) translateY(-70px) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-70px) scale(1); } }
@keyframes dscr-burst-far { 0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(0.4); } 8% { opacity: 1; } 45% { opacity: 0; transform: rotate(var(--a)) translateY(-104px) scale(0.9); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-104px) scale(0.9); } }
.dscr-star.stellar { animation: dscr-pop 0.6s ease-out 1 both, dscr-glow 2.6s ease-in-out 0.6s infinite; }
@keyframes dscr-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(224, 169, 46, 0)); } 12% { filter: drop-shadow(0 0 10px rgba(224, 169, 46, 0.9)); } 45% { filter: drop-shadow(0 0 0 rgba(224, 169, 46, 0)); } }
@keyframes dscr-pop { 0% { transform: scale(0.4) rotate(-20deg); } 70% { transform: scale(1.25) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .dscr-star.stellar { animation: none; } .dscr-star .fireworks { display: none; } }

/* milestones */
.mile-list{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.mile-list li{padding:7px 0;border-top:1px solid var(--line,rgba(0,0,0,.08))}
.mile-list li:first-child{border-top:0}
.mile-row{display:flex;align-items:flex-start;gap:10px}
.mile-main{flex:1;min-width:0}
.mile-dot{flex:none;width:10px;height:10px;border-radius:50%;margin-top:5px;border:2px solid currentColor;opacity:.35}
.mile-list li.done .mile-dot{background:var(--good,#1f8a4c);border-color:var(--good,#1f8a4c);opacity:1}
.mile-list li.upnext .mile-dot{opacity:1}
.mile-form{display:grid;gap:8px;margin:8px 0 4px 20px}
.mile-check{display:flex;align-items:center;gap:6px}
.msgs-head{gap:10px;flex-wrap:wrap;padding:12px 16px;align-items:center}
.msg.sys{align-self:stretch;max-width:none}
.msg.sys .bubble{background:transparent;border:1px dashed var(--line,rgba(0,0,0,.18));color:inherit}

/* listing agent suggestion */
.pt-found{border:1px solid var(--line,rgba(0,0,0,.14));border-left:4px solid var(--good,#1f8a4c);border-radius:10px;padding:12px 14px}
.pt-found-h{font-size:.85rem;opacity:.75;margin-bottom:2px}
.pt-found-who{display:flex;gap:10px;flex-wrap:wrap;align-items:baseline;font-size:1.05rem}

.lst-edit{display:grid;gap:10px}
.lst-cands{display:grid;gap:8px;margin:10px 0;padding-top:10px;border-top:1px solid var(--line,rgba(0,0,0,.1))}
.lst-cand{display:flex;gap:10px;align-items:center;justify-content:space-between}
.lst-warn{color:var(--warn,#9a6700)}

/* pricing engine gateway */
.pe-gate{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.pe-gate p{flex-basis:100%}
.pe-lines{flex-basis:100%;margin:4px 0}
