/* Quick Math — standalone calculator pages (LEN-457).
   Shared styles for /quick-math/<slug>/ pages. Calc markup is wrapped in
   .qm-toggle-body so the index.html-derived scoped rules apply unchanged. */
:root {
  --bg: #FFFFFF;
  --bg-alt: #FAFAFA;
  --bg-page: #F3F4F6;
  --text: #111827;
  --text-muted: #6B7280;
  --text-faint: #9CA3AF;
  --accent: #14532D;
  --accent-hover: #142E23;
  --accent-soft: rgba(26, 60, 46, 0.08);
  --border: #E5E7EB;
  --border-hover: #D1D5DB;
  --radius: 8px;
  --radius-sm: 6px;
  /* Canonical design language, rooted in the big calcs (Deal Analysis /
     Payment Breakdown / Payment Fit): cards are white, 1px border, 12px
     radius; the results surface is #f9fafb; highlights use green-soft +
     a green hairline; the talk box adds a 4px green left bar. */
  --card-radius: 12px;
  --surface: #F9FAFB;
  --green-soft: #ECFDF3;
  --green-line: #C8D9D2;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); color: var(--text);
  background: var(--bg-page); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.qm-page { max-width: 920px; margin: 0 auto; padding: 22px 20px 60px; }

/* Embedded in the app shell (iframe tool-view): the SPA sidebar + top bar
   provide the chrome, so hide this page's own top bar and tighten spacing. */
body[data-qm-embed] .qm-topbar { display: none; }
body[data-qm-embed] .qm-page { padding-top: 18px; }

/* Top bar */
.qm-topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.qm-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--accent-ink); font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.qm-brand svg { display: block; }
.qm-back { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.qm-back:hover { color: var(--accent-ink); }

/* Page heading */
.qm-page h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; color: var(--text); }
.qm-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }

/* Card wrapper around the calc */
.qm-card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 22px; margin-top: 14px; }

/* On a standalone page the body is always shown */
.qm-toggle-body { display: block; }
.qm-calc-body { display: block; padding: 4px 0; }

/* Explainer card (mirrors .lp-definition) */
.qm-def {
  background: #EDF2EF; border-radius: var(--card-radius);
  font-size: 13px; font-weight: 500; color: #334155; line-height: 1.6;
  padding: 14px 38px 14px 16px; margin-bottom: 16px; position: relative;
}
.qm-def strong { color: var(--accent-ink, #14532D); font-weight: 800; }
.qm-def-x {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.8); border: none; cursor: pointer;
  font-size: 18px; font-weight: 800; line-height: 1; color: #94a3b8;
  padding: 0; border-radius: 7px; font-family: inherit;
}
.qm-def-x:hover { color: var(--accent-ink, #14532D); }

/* Two-column layout */
.qm-cols { display: flex; gap: 20px; align-items: flex-start; }
.qm-left, .qm-right {
  flex: 1; min-width: 0;
  border: 1px solid var(--border); border-radius: var(--card-radius); padding: 18px;
}
/* Inputs on white, results on the canonical #f9fafb surface so white result
   tiles read as cards (mirrors the big calcs' inputs/results split). */
.qm-left { background: var(--bg); }
.qm-right { background: var(--surface); min-height: 100px; }
@media (max-width: 760px) { .qm-cols { flex-direction: column; } }

/* Standalone pages: left column inputs are always stacked vertically. */
.qm-cols .qm-left .row2,
.qm-cols .qm-left .row3 { grid-template-columns: 1fr; }

/* Right-column teaser — previews the outputs before any input is entered.
   Hidden by quick-math-init.js as soon as real results render. */
.qm-teaser { color: var(--text-faint); }
.qm-teaser-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px; }
.qm-teaser-sub { font-size: 12px; color: var(--text-faint); margin-bottom: 14px; }
.qm-teaser-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px dashed var(--border); border-radius: 7px; margin-bottom: 8px; }
.qm-teaser-row::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--border-hover); flex-shrink: 0; }
.qm-teaser-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.qm-teaser-bar { margin-left: auto; width: 46px; height: 8px; border-radius: 4px; background: var(--border); }

/* Field + result styles (scoped, mirrors index.html) */
.qm-toggle-body .field { margin-bottom: 20px; }
.qm-toggle-body .field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.025em; color: var(--brand-primary, var(--text)); margin-bottom: 8px; white-space: nowrap; }
.qm-toggle-body .field label .lbl-ico { display: inline-flex; vertical-align: -3px; margin-right: 6px; color: currentColor; }
.qm-toggle-body .field label .lbl-ico svg { width: 15px; height: 15px; }
/* Data-entry boxes match the Payoff Breakdown exactly: white, 2px border,
   8px radius, 10/12 padding, 15px/600 text, single green border on focus
   (no double outline ring — BRANDING single-outline rule). */
.qm-toggle-body input[type=number], .qm-toggle-body input[type=text], .qm-toggle-body input[type=date], .qm-toggle-body select { width: 100%; padding: 10px 12px; border: 2px solid var(--border); border-radius: 8px; font-size: 15px; font-weight: 600; font-family: inherit; background: #FFFFFF; color: var(--text); transition: border-color 0.15s ease; }
.qm-toggle-body input[type=number]:focus, .qm-toggle-body input[type=text]:focus, .qm-toggle-body input[type=date]:focus, .qm-toggle-body select:focus { outline: none; border-color: var(--accent-ink); }
.qm-toggle-body input::placeholder { color: var(--text-faint); font-weight: 500; }
.qm-toggle-body .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.qm-toggle-body .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: end; }
.qm-toggle-body .model-note { font-size: 12px; color: var(--text-muted); font-style: italic; margin-bottom: 10px; }
.qm-toggle-body .field-hint { font-size: 11px; color: var(--text-faint); margin-top: -6px; margin-bottom: 8px; }
.qm-toggle-body .check-row { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; margin-bottom: 8px; }
.qm-toggle-body .divider { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.qm-toggle-body details summary { font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; margin-bottom: 8px; }
.qm-toggle-body .accel-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 10px; }
.qm-toggle-body .accel-table th, .qm-toggle-body .accel-table td { padding: 4px 8px; border: 1px solid var(--border); text-align: left; }
.qm-toggle-body .accel-table thead { background: var(--bg-alt, #F9FAFB); }
.qm-toggle-body .month-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.qm-toggle-body .month-row label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); white-space: nowrap; }
.qm-toggle-body .result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.qm-toggle-body .result-cell { background: var(--bg); border: 1px solid var(--border); border-radius: var(--card-radius); padding: 10px 12px; }
.qm-toggle-body .rl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.qm-toggle-body .rv { font-size: 18px; font-weight: 800; color: var(--accent-ink); margin-top: 2px; }
.qm-toggle-body .rs { font-size: 11px; color: var(--text-faint); }
.qm-toggle-body .result { background: var(--bg); border: 1px solid var(--border); border-radius: var(--card-radius); padding: 12px; margin-bottom: 8px; }
.qm-toggle-body .result-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); display: block; margin-bottom: 4px; }
.qm-toggle-body .result-value { font-size: 26px; font-weight: 900; color: var(--accent-ink); }
.qm-toggle-body .chip { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; background: #EDF2EF; color: var(--accent-ink, #065F46); }
.qm-toggle-body .bar-wrap { height: 5px; background: var(--border); border-radius: 3px; margin: 5px 0; overflow: hidden; }
.qm-toggle-body .bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.qm-toggle-body .tt { background: rgba(var(--accent-rgb, 20, 83, 45), 0.05); border: 1px solid rgba(var(--accent-rgb, 20, 83, 45), 0.15); border-radius: 7px; padding: 10px 12px; margin-bottom: 10px; }
.qm-toggle-body .tt-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.qm-toggle-body .tt-eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-ink); }
.qm-toggle-body .tt-copy-btn { font-size: 11px; font-weight: 600; border: 1px solid var(--accent); border-radius: 4px; padding: 2px 8px; background: none; cursor: pointer; color: var(--accent-ink); font-family: inherit; }
.qm-toggle-body .tt-copy-btn.copied { background: var(--accent); color: #fff; }
.qm-toggle-body .tt-body { font-size: 12px; line-height: 1.5; color: var(--text); }
.qm-toggle-body .disclaimer { margin-top: 10px; font-size: 11px; color: var(--text-faint); background: var(--bg); border: 1px solid var(--border); border-radius: var(--card-radius); padding: 10px 12px; }
.qm-toggle-body .disclaimer-title { font-weight: 700; color: var(--text-muted); margin-bottom: 3px; }
.qm-toggle-body .product-list, .qm-toggle-body .lender-list { margin-top: 6px; }
.qm-toggle-body .product-item { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 5px; font-size: 12px; }
.qm-toggle-body .product-item.likely { border-color: var(--green-line); background: var(--green-soft); }
.qm-toggle-body .product-item.possible { border-color: #FCD34D; background: #FFFBEB; }
.qm-toggle-body .product-name { font-weight: 600; }
.qm-toggle-body .product-verdict { font-size: 11px; color: var(--text-muted); }
.qm-toggle-body .product-item.possible .product-verdict { color: #92400E; }
.qm-toggle-body .product-item.unlikely .product-verdict { color: #991B1B; }
.qm-toggle-body .lender-item { border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; margin-bottom: 5px; cursor: pointer; }
.qm-toggle-body .lender-item-header { display: flex; gap: 8px; align-items: center; }
.qm-toggle-body .lender-products { display: flex; flex-wrap: wrap; gap: 3px; margin-left: auto; }
.qm-toggle-body .lender-detail { display: none; padding-top: 8px; }
.qm-toggle-body .lender-detail.open { display: block; }
.qm-toggle-body .lender-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 5px; }
.qm-toggle-body .lender-detail-cell { background: var(--bg-alt, #F9FAFB); border-radius: 4px; padding: 5px 8px; font-size: 11px; }
.qm-toggle-body .dk { color: var(--text-faint); font-size: 10px; margin-bottom: 1px; }
.qm-toggle-body .dv { font-weight: 700; }
.qm-toggle-body .lender-tag { background: var(--bg-alt, #F9FAFB); border: 1px solid var(--border); border-radius: 3px; padding: 1px 5px; font-size: 10px; font-weight: 600; color: var(--text-muted); margin-right: 2px; }
.qm-toggle-body .lender-name { font-weight: 600; font-size: 12px; }
.qm-toggle-body .no-lenders { font-size: 12px; color: var(--text-faint); padding: 8px; }
.qm-toggle-body .flag { display: flex; gap: 6px; background: #FEF2F2; border: 1px solid #FCA5A5; border-radius: 6px; padding: 8px 10px; margin-top: 8px; font-size: 12px; }
.qm-toggle-body .deep-links { font-size: 11px; color: var(--text-faint); margin-top: 10px; }
.qm-toggle-body .deep-links a { color: var(--accent-ink); text-decoration: none; }
.qm-toggle-body .qm-full-link { display: inline-block; margin-top: 14px; font-size: 12px; font-weight: 600; color: var(--accent-ink); text-decoration: none; border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; transition: border-color .12s, background .12s; }
.qm-toggle-body .qm-full-link:hover { background: var(--accent-soft); border-color: var(--border-hover); }
.qm-toggle-body input.solve-blank { background: var(--accent-soft) !important; border-color: var(--border-hover) !important; }

/* Likely-products dropdown folded under the Potential Lender Fits hero (LEN-494) */
.qm-toggle-body .qm-prod-toggle { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; background: none; border: none; border-top: 1px solid var(--border); margin-top: 14px; padding: 13px 2px 0; font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-faint); cursor: pointer; }
.qm-toggle-body .qm-prod-toggle:hover { color: var(--accent-ink); }
.qm-toggle-body .qm-prod-arrow { font-style: normal; font-size: 9px; transition: transform .2s; flex-shrink: 0; }
.qm-toggle-body .qm-prod-toggle.open .qm-prod-arrow { transform: rotate(90deg); }
.qm-toggle-body .qm-prod-summary { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-muted); margin-left: auto; }
.qm-toggle-body #q-products { margin-top: 10px; }

/* Invalid-input hint (e.g. payback below funded) — replaces confusing negative
   figures with a friendly nudge (LEN-493). */
.qm-toggle-body .qm-warn { background: #FFFBEB; border: 1px solid #FCD34D; color: #92400E; border-radius: 10px; padding: 12px 14px; font-size: 13px; font-weight: 500; line-height: 1.5; margin-bottom: 12px; }

/* Factor-rate entry feedback (LEN-490): flash the field on normalize, pulse the
   result cells once as the read unlocks. */
@keyframes qmFieldFlash { 0% { background: var(--accent-soft); } 100% { background: #FFFFFF; } }
.qm-toggle-body input.qm-flash { animation: qmFieldFlash .6s ease; }
@keyframes qmCellPulse { 0% { transform: scale(1); } 40% { transform: scale(1.015); } 100% { transform: scale(1); } }
.qm-toggle-body .result-cell.qm-pulse { animation: qmCellPulse .4s ease; }

/* Circle-i info tooltip on field labels (LEN-490). Paperclip icon is banned —
   always the circle-i SVG. Visual language mirrors #qm-gloss-tip. */
.qm-toggle-body .qm-info { display: inline-flex; align-items: center; vertical-align: -2px; margin-left: 5px; color: var(--text-faint); cursor: help; position: relative; }
.qm-toggle-body .qm-info svg { width: 14px; height: 14px; }
.qm-toggle-body .qm-cta-note { font-size: 12px; color: var(--text-faint); line-height: 1.6; margin: 14px 0 0; }
.qm-toggle-body .qm-info:hover { color: var(--accent-ink); }
.qm-toggle-body .qm-info:hover::after {
  content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 8px);
  width: 250px; background: #fff; color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; font-size: 12px; font-weight: 500; line-height: 1.5;
  box-shadow: 0 4px 14px rgba(17,24,39,0.1); z-index: 9999; white-space: normal;
  /* LEN-821: the tooltip sits inside a .field label, which sets
     text-transform:uppercase (line ~104) for its own short field-name text.
     Without this reset every Quick Math tooltip — sitewide, not just this
     page — inherits that uppercase and renders its sentence-case copy in
     ALL CAPS. Guarded in tests/regressions.spec.js. */
  text-transform: none;
}

/* Save to Deal Log button (commission + future calcs) */
.qm-save-btn {
  display: inline-block; margin-top: 12px; padding: 9px 16px;
  background: var(--accent); color: #fff; border: none; border-radius: 7px;
  font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.qm-save-btn:hover { background: var(--accent-hover); }
.qm-save-hint { font-size: 11px; color: var(--text-faint); margin-top: 6px; }

/* "Request a custom comp model" call-to-action box */
.qm-custom-box {
  display: block; margin-top: 14px; padding: 12px 14px;
  border: 1px dashed var(--border-hover); border-radius: 8px;
  background: var(--accent-soft); text-decoration: none;
}
.qm-custom-box:hover { border-color: var(--accent-ink); }
.qm-custom-title { display: block; font-size: 13px; font-weight: 700; color: var(--accent-ink); margin-bottom: 3px; }
.qm-custom-sub { display: block; font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ───────────────────────────────────────────────────────────────────────────
   LEN-484: "What you tell the borrower" box — mirrors the big-calc .takeaway
   pattern (eyebrow + up/down arrows cycling multiple talk tracks + Copy).
   Replaces the old single-track .tt box in the mini calcs.
   ─────────────────────────────────────────────────────────────────────────── */
.qm-toggle-body .wytb {
  display: flex; align-items: stretch;
  background: #fff; border: 1px solid #e5e7eb;
  border-left: 4px solid var(--accent); border-radius: 12px;
  overflow: hidden; margin-bottom: 10px;
}
.qm-toggle-body .wytb-body { flex: 1; min-width: 0; padding: 16px 18px; }
.qm-toggle-body .wytb-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.qm-toggle-body .wytb-eyebrow { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #64748b; }
.qm-toggle-body .wytb-copy-btn { font-size: 11px; font-weight: 600; border: 1px solid var(--accent); border-radius: 4px; padding: 2px 8px; background: none; cursor: pointer; color: var(--accent-ink); font-family: inherit; flex-shrink: 0; }
.qm-toggle-body .wytb-copy-btn.copied { background: var(--accent); color: #fff; }
.qm-toggle-body .wytb-text { font-size: 14px; font-weight: 600; line-height: 1.6; color: #1e293b; }
.qm-toggle-body .wytb-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.qm-toggle-body .wytb-track-name { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-ink); }
.qm-toggle-body .wytb-counter { font-size: 10px; color: #94a3b8; font-variant-numeric: tabular-nums; }
/* Vertical arrow rail on the right, matching the big-calc .takeaway-nav exactly */
.qm-toggle-body .wytb-nav { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-left: 0.5px solid #e5e7eb; padding: 8px 10px; min-width: 36px; }
.qm-toggle-body .wytb-nav-btn { background: transparent; border: none; cursor: pointer; color: #94a3b8; padding: 4px; display: flex; align-items: center; justify-content: center; transition: color 0.15s; }
.qm-toggle-body .wytb-nav-btn:hover { color: var(--accent-ink); }
@keyframes qmArrowShimmer { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.qm-toggle-body .wytb-nav-btn.shimmer-a { color: var(--accent-ink); animation: qmArrowShimmer 2.2s ease-in-out infinite; }
.qm-toggle-body .wytb-nav-btn.shimmer-b { color: var(--accent-ink); animation: qmArrowShimmer 2.2s ease-in-out infinite; animation-delay: 1.1s; }
.qm-toggle-body .wytb-nav:hover .wytb-nav-btn { animation: none; }

/* Glossary term links inside talk tracks (+ instant definition tooltip) */
.qm-toggle-body .glossary-link { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; cursor: help; }
.qm-toggle-body .glossary-link:hover { text-decoration-thickness: 2px; }
#qm-gloss-tip { position: fixed; z-index: 9999; max-width: 260px; background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 12px; line-height: 1.5; box-shadow: 0 4px 14px rgba(17,24,39,0.1); opacity: 0; pointer-events: none; transition: opacity .12s; }
#qm-gloss-tip .gt-term { font-weight: 700; display: block; margin-bottom: 2px; }
#qm-gloss-tip .gt-more { color: var(--accent-ink); font-weight: 600; display: block; margin-top: 5px; font-size: 11px; }

/* ── Stronger right-panel teaser (progressive disclosure, LEN-484/457) ── */
.qm-toggle-body .qm-teaser { border: 1px solid var(--border); border-radius: var(--card-radius); padding: 16px 18px; background: var(--bg); }
.qm-toggle-body .qm-teaser-head { font-size: 13px; font-weight: 700; color: var(--accent-ink); margin-bottom: 4px; }
.qm-toggle-body .qm-teaser-sub { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.qm-toggle-body .qm-teaser-progress { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.qm-toggle-body .qm-teaser-progress > span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .35s ease; }
.qm-toggle-body .qm-teaser-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.qm-toggle-body .qm-teaser-row.lit { opacity: 1; }
.qm-toggle-body .qm-teaser-row { opacity: 0.5; transition: opacity .3s; }
.qm-toggle-body .qm-teaser-label { flex: 0 0 auto; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.qm-toggle-body .qm-teaser-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--border); }
.qm-toggle-body .qm-teaser-row.lit .qm-teaser-bar { background: linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb, 20, 83, 45), 0.35)); }
.qm-toggle-body .qm-teaser-nudge { font-size: 12px; font-weight: 600; color: var(--accent-ink); margin-top: 4px; }

/* ───────────────────────────────────────────────────────────────────────────
   LEN-821: Product Recommendations — one deal in, every product's math out.
   Full-width (not the two-column .qm-cols split): shared inputs → about-the-
   deal disclosure → product pills → row-local inputs → category chips → live
   comparison table → Napkin → lender match. Style-lock: gray labels, green on
   live answers only (.wb-th-name/table values), neutral category tags, no
   green accordions.
   ─────────────────────────────────────────────────────────────────────────── */
.qm-toggle-body .wb-section { margin-bottom: 18px; }
.qm-toggle-body .wb-eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 8px; }

/* Shared inputs — responsive field grid on white */
.qm-toggle-body .wb-shared { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; }
.qm-toggle-body .wb-shared .field { margin-bottom: 0; }

/* Product pills — multi-select, all-on by default. Active = brand tint (control
   state, mirrors the app's nav-active; result VALUES are the only green text). */
.qm-toggle-body .wb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.qm-toggle-body .wb-pill {
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text-muted); transition: all .12s;
}
.qm-toggle-body .wb-pill:hover { border-color: var(--border-hover); }
.qm-toggle-body .wb-pill[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* Category chips — filter the table rows. Single-outline states only
   (BRANDING.md §2): border-color shifts, never a box-shadow ring. */
.qm-toggle-body .wb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qm-toggle-body .wb-chip {
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text); transition: all .12s;
}
.qm-toggle-body .wb-chip:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.qm-toggle-body .wb-chip:focus-visible { outline: none; border-color: var(--accent); }
.qm-toggle-body .wb-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Live comparison table — columns = every selected product, rows = metrics,
   sticky first column so it reads at up to 6 columns without feeling broken. */
.qm-toggle-body .wb-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--bg); }
.qm-toggle-body .wb-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 480px; font-size: 13px; }
.qm-toggle-body .wb-table thead th { text-align: right; padding: 10px 12px; font-size: 11px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--bg); vertical-align: bottom; }
.qm-toggle-body .wb-table tbody td { padding: 9px 12px; text-align: right; font-size: 14px; font-weight: 800; color: var(--accent-ink); border-bottom: 1px solid var(--border); white-space: nowrap; }
.qm-toggle-body .wb-table tbody tr:hover td, .qm-toggle-body .wb-table tbody tr:hover .wb-th-label { background: var(--accent-soft); }
.qm-toggle-body .wb-table tbody .wb-reason-row:hover td { background: var(--bg); }
.qm-toggle-body .wb-table .wb-th-label { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--bg); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); white-space: nowrap; }
.qm-toggle-body .wb-table thead .wb-th-label { z-index: 2; }
.qm-toggle-body .wb-th-name { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.qm-toggle-body .wb-subtag { font-size: 10px; font-weight: 600; color: var(--text-faint); text-transform: none; letter-spacing: 0; }
.qm-toggle-body .wb-fit { margin-top: 3px; font-size: 9px; font-weight: 700; letter-spacing: 0.02em; padding: 2px 7px; border-radius: 20px; white-space: nowrap; }
.qm-toggle-body .wb-fit-best { background: var(--green-soft); color: var(--accent-ink); border: 1px solid var(--green-line); }
.qm-toggle-body .wb-fit-runner { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border-hover); }
/* Faded (ineligible) column — muted, not blurred: the numbers stay true and
   legible, just visually deprioritized. Reason caption row sits at the bottom. */
.qm-toggle-body .wb-table .wb-faded { opacity: .55; filter: grayscale(.4); }
.qm-toggle-body .wb-table .wb-reason-row td { border-bottom: none; padding-top: 4px; padding-bottom: 10px; }
.qm-toggle-body .wb-reason { font-size: 10px; font-weight: 600; color: #92400E; white-space: normal; }
.qm-toggle-body .wb-empty { font-size: 13px; color: var(--text-faint); padding: 18px 4px; }
.qm-toggle-body .wb-rates-hint { font-size: 13px; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin-top: 10px; }

/* "About the deal" disclosure — reuses .qm-prod-toggle verbatim (product-match's
   own fold), just a new body id. */
.qm-toggle-body .wb-deal-details { margin-top: 10px; }

/* Lender-match login gate — mirrors js/summary-voice-ui.js's .lpv-lockable/
   .lpv-vlock mechanism (blur-in-place, not a redirect) scoped to just this
   one section via .wb-lender-wrap.wb-anon, not the whole page. */
.qm-toggle-body .wb-lockable { transition: filter .15s; }
.qm-toggle-body .wb-lender-wrap.wb-anon .wb-lockable { filter: blur(4px); opacity: .6; pointer-events: none; user-select: none; }
.qm-toggle-body .wb-vlock { display: none; }
.qm-toggle-body .wb-lender-wrap.wb-anon .wb-vlock { display: flex; flex-direction: column; gap: 3px; align-items: center; text-align: center; margin-top: 12px; padding: 12px; background: var(--accent-soft); border: 1px solid var(--green-line); border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.qm-toggle-body .wb-vlock a { color: var(--accent-ink); font-weight: 700; }

/* The Napkin — auto-written plain-English summary + one Copy button. Mirrors the
   .wytb card (green left bar), one line per selected product, no nav arrows. */
.qm-toggle-body .wb-napkin { background: #fff; border: 1px solid #e5e7eb; border-left: 4px solid var(--accent); border-radius: 12px; padding: 16px 18px; margin-top: 16px; }
.qm-toggle-body .wb-napkin-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.qm-toggle-body .wb-napkin-eyebrow { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #64748b; }
.qm-toggle-body .wb-napkin-line { font-size: 13px; font-weight: 500; line-height: 1.6; color: #1e293b; padding: 3px 0; }
.qm-toggle-body .wb-napkin-line + .wb-napkin-line { border-top: 1px solid #f1f5f9; }
