/* ═══════════════════════════════════════════════════════════════════════
   The coverage calculator (/advisor/underwriting) and the family's coverage
   options (/portal/options). Loaded after /portal/portal.css and built on
   its tokens.
   ═══════════════════════════════════════════════════════════════════════ */

.uw-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 22px; }
.uw-grid > .stack > .card + .card { margin-top: 18px; }
.uw-sticky { position: sticky; top: calc(var(--shell-h) + 18px); }
@media (max-width: 980px) { .uw-grid { grid-template-columns: minmax(0, 1fr); } .uw-sticky { position: static; } }

.fgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .fgrid--3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .uw-grid .fgrid { grid-template-columns: minmax(0, 1fr); } }

/* Money inputs carry a dollar sign inside the box. */
.money { position: relative; }
.money::before { content: "$"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); font-size: 14px; pointer-events: none; }
.money input { padding-left: 22px !important; }
.pct { position: relative; }
.pct::after { content: "%"; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); font-size: 14px; pointer-events: none; }
.pct input { padding-right: 26px !important; }

/* Rows of assets and liabilities */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.2fr) minmax(0, 1fr) 40px 30px; gap: 8px; align-items: center; }
.row--debt { grid-template-columns: minmax(0, 2.45fr) minmax(0, 1fr) 30px; }
.row__liq { display: flex; align-items: center; justify-content: center; width: 40px; }
.row__liq input { width: 16px; height: 16px; accent-color: var(--bronze-deep); }
.row__x { border: 0; background: none; color: var(--ink-faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 6px; border-radius: 6px; }
.row__x:hover { color: var(--clay); background: var(--stone-1); }
.rows__head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.2fr) minmax(0, 1fr) 40px 30px; gap: 8px; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.rows__head--debt { grid-template-columns: minmax(0, 2.45fr) minmax(0, 1fr) 30px; }
@media (max-width: 640px) {
  .rows__head { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px 30px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
  .row > :first-child, .row > :nth-child(2) { grid-column: span 2; }
  .row__liq::after { content: "Liquid"; font-size: 11px; color: var(--ink-faint); margin-left: 4px; }
  .row__liq { width: auto; }
  .row--debt { grid-template-columns: minmax(0, 1fr) auto; }
  .row--debt > :first-child { grid-column: auto; }
}
.addrow { margin-top: 10px; }

/* Segmented control */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 20px; padding: 3px; background: var(--paper); flex-wrap: wrap; }
.seg button { font: 500 11px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; border: 0; background: none; color: var(--ink-faint); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink-deep); color: var(--paper); }

/* Figures */
.hero-fig { font-family: var(--serif); font-size: clamp(34px, 4vw, 48px); line-height: 1; color: var(--ink-strong); letter-spacing: -0.01em; }
.hero-fig__l { font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.hero-fig__s { margin-top: 8px; font-size: 13.5px; color: var(--ink-mid); }
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; margin-top: 18px; }
.figs > div { background: var(--paper); padding: 14px 16px; min-width: 0; }
.figs dt { font-size: 11.5px; color: var(--ink-faint); }
.figs dd { margin: 4px 0 0; font-family: var(--serif); font-size: 21px; color: var(--ink-strong); overflow-wrap: anywhere; }
.figs dd small { display: block; font-family: var(--sans); font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

.verdict { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; font-size: 13.5px; margin-top: 16px; border: 1px solid var(--line); background: var(--paper); }
.verdict b { color: var(--ink-strong); font-weight: 600; }
.verdict__i { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--paper); margin-top: 1px; }
.verdict[data-tone="ok"] { border-color: rgba(94, 122, 99, 0.45); }
.verdict[data-tone="ok"] .verdict__i { background: var(--sage-deep); }
.verdict[data-tone="warn"] { border-color: rgba(154, 116, 76, 0.55); }
.verdict[data-tone="warn"] .verdict__i { background: var(--bronze-deep); }

.bar { height: 8px; border-radius: 999px; background: var(--stone-2); overflow: hidden; margin-top: 10px; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--sage); }
.bar[data-over] span { background: var(--bronze-deep); }

.reqs { margin: 0; padding-left: 18px; font-size: 13.5px; }
.reqs li + li { margin-top: 6px; }

.tbl--num td, .tbl--num th { text-align: right; }
.tbl--num td:first-child, .tbl--num th:first-child { text-align: left; }
.tbl tr.is-on td { color: var(--ink-strong); font-weight: 600; }
.tbl--quiet tbody tr { cursor: default; }
.tbl--quiet tbody tr:hover { background: none; }

/* Illustration */
.drop { border: 1px dashed var(--line); border-radius: 8px; padding: 18px; text-align: center; background: var(--paper); font-size: 13.5px; color: var(--ink-mid); }
.drop[data-over] { border-color: var(--bronze); background: var(--stone-1); }
.drop input { margin-top: 10px; }
.colmap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.colmap .field + .field { margin-top: 0; }
@media (max-width: 640px) { .colmap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.peek { margin-top: 14px; max-height: 220px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--paper); }
.peek .tbl { font-size: 12px; }
.peek .tbl td, .peek .tbl th { padding: 6px 10px; }
.peek .tbl th { position: sticky; top: 0; background: var(--paper); }
.peek .is-col { background: rgba(154, 116, 76, 0.10); }

/* Chart */
.chart { position: relative; margin-top: 16px; }
.chart__legend { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-mid); }
.chart__legend li { display: flex; align-items: center; gap: 7px; }
.chart__key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 2px; }
.chart__svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.chart__grid { stroke: var(--line-soft); stroke-width: 1; }
.chart__base { stroke: var(--line); stroke-width: 1; }
.chart__tick { font: 10.5px var(--sans); fill: var(--ink-faint); }
.chart__end { font: 600 11px var(--sans); fill: var(--ink-mid); }
.chart__cross { stroke: var(--ink-faint); stroke-width: 1; stroke-dasharray: 3 3; }
.chart__tip { position: absolute; top: 34px; pointer-events: none; background: var(--ink-deep); color: var(--paper); border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.6; min-width: 200px; box-shadow: 0 8px 24px rgba(25, 28, 23, 0.18); }
.chart__tip b { color: var(--paper); font-weight: 600; margin-left: 4px; }
.chart__tip-h { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze-pale); margin-bottom: 2px; }
.chart__table { margin-top: 12px; font-size: 13px; }
.chart__table summary { cursor: pointer; color: var(--bronze-deep); }
.chart__table .tablewrap { max-height: 320px; overflow: auto; margin-top: 10px; }

/* Cases list on the calculator */
.cases { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cases select { width: auto; min-width: 220px; }

/* The family's options */
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 26px; }
.opt .card__h { font-size: 22px; }
.opt__note { margin-top: 10px; font-size: 14px; color: var(--ink-mid); }
.explore { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.explore input[type="range"] { width: 100%; accent-color: var(--bronze-deep); margin-top: 8px; }
.explore__v { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.explore__v b { font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--ink-strong); }
.compare { margin-top: 18px; }
.fineprint { margin-top: 26px; font-size: 12px; color: var(--ink-faint); max-width: 80ch; }
