/* Phone-first, document-like. Fonts and colors come from the firm's own site (firms.js brand),
   hairline rules, flat surfaces.
   Navy carries actions and structure; red is only for money at risk and deadlines. */
:root {
  --accent: #C8102E; --accent-2: #0B3D91;
  --bg: #F6F5F2; --card: #FFFFFF; --ink: #14181F; --ink-2: #454B55; --muted: #7C808A;
  --line: #E5E3DE; --sunk: #F4F3EF;
  --good: #1F6F4A; --good-bg: #EAF3EE; --warn: #9A5B00; --warn-bg: #FBF3E4; --bad: #B3122B; --bad-bg: #FBEDEE;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: var(--font-body);
  --serif: var(--font-head);
  --r: 12px; --shadow: 0 1px 2px rgba(20,24,31,.04);
  color-scheme: light;
  font-family: var(--font-body);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; padding-bottom: 84px; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-2); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent-2) 40%, transparent); outline-offset: 2px; }
p { margin: 0; }

/* Header */
#top { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; max-width: 520px; margin: 0 auto; height: 52px; padding: 0 16px; }
.brand img { height: 30px; width: auto; }
.brand.text { font-weight: 700; color: var(--ink); }
.call-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--accent-2); background: #fff; border: 1px solid var(--line); padding: 7px 13px; border-radius: 999px; }
.call-pill svg { width: 14px; height: 14px; }

main { max-width: 520px; margin: 0 auto; padding: 14px 16px 8px; }
.eyebrow { font-size: 12px; font-weight: 500; color: var(--muted); }
h1 { font-family: var(--serif); font-size: 25px; line-height: 1.18; letter-spacing: -0.01em; margin: 4px 0 6px; font-weight: 600; }
h2 { font-family: var(--serif); font-size: 17px; line-height: 1.3; margin: 0; font-weight: 600; }
h3 { font-size: 14px; margin: 0; font-weight: 600; }
.lead { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 11.5px; line-height: 1.4; margin-top: 10px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.sec-head .more { font-size: 12.5px; font-weight: 600; white-space: nowrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); margin: 0 0 12px; }

/* Chips + tags */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.chip svg { width: 12px; height: 12px; }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.good { background: var(--good-bg); color: var(--good); }

/* Icon tile */
.ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent-2) 9%, #fff); color: var(--accent-2); }
.ico svg { width: 18px; height: 18px; }
.ico.bad { background: var(--bad-bg); color: var(--bad); }
.ico.warn { background: var(--warn-bg); color: var(--warn); }
.ico.good { background: var(--good-bg); color: var(--good); }

/* Rows (hub list, letters, options, prep) */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; margin: 0 0 12px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; width: 100%; background: none; border: 0; text-align: left; cursor: pointer; }
.row + .row { border-top: 1px solid var(--line); }
.row .txt { flex: 1; min-width: 0; }
.row .t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s.wrap { white-space: normal; }
.row .chev { flex: none; color: #B4BAC3; width: 16px; height: 16px; }
.row:active { background: var(--sunk); }

/* Stepper: where they are on the collection path */
.stepper { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin: 6px 0 2px; }
.stepper::before { content: ""; position: absolute; left: 10%; right: 10%; top: 9px; height: 2px; background: var(--line); }
.stepper .fill { position: absolute; left: 10%; top: 9px; height: 2px; background: var(--accent); }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.15; }
.step i { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; }
.step.done i { background: var(--accent); border-color: var(--accent); }
.step.done i::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.step.now { color: var(--ink); font-weight: 700; }
.step.now i { width: 20px; height: 20px; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); }

/* Fact tiles */
.facts { display: grid; gap: 8px; margin-top: 12px; }
.fact { display: flex; gap: 10px; align-items: flex-start; background: var(--sunk); border-radius: 12px; padding: 10px; }
.fact .k { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.fact .v { font-size: 13px; color: var(--ink); }
.fact.bad { background: var(--bad-bg); }
.fact.bad .k { color: var(--bad); }

/* Stats */
.big { font-size: 30px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.big.bad { color: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.stat { background: var(--sunk); border-radius: 10px; padding: 8px; }
.stat b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--muted); }

/* Bar chart (cost of waiting) */
.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: 120px; margin: 14px 0 4px; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar b { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.bar i { width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--accent) 22%, #fff); }
.bar.last i { background: var(--accent); }
.bar span { font-size: 11px; color: var(--muted); }

/* Split bar (garnishment) */
.split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 12px 0 8px; background: var(--line); }
.split .keep { background: var(--good); }
.split .take { background: var(--bad); }
.legend { display: flex; justify-content: space-between; font-size: 12px; }
.legend b { font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }

/* Hero (personal plan) */
.hero { background: linear-gradient(150deg, #0B3D91 0%, #082C6A 100%); color: #fff; border-radius: 20px; padding: 16px; margin: 0 0 12px; box-shadow: 0 10px 30px -14px rgba(8,44,106,.6); }
.hero .eyebrow { color: rgba(255,255,255,.7); }
.hero h1 { color: #fff; margin: 4px 0 2px; }
.hero .by { font-size: 12.5px; color: rgba(255,255,255,.75); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.hero-stats div { background: rgba(255,255,255,.1); border-radius: 12px; padding: 8px; min-width: 0; }
.hero-stats span { display: block; font-size: 10.5px; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .05em; }
.hero-stats b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-stats .hot b { color: #FFB4B4; }

/* Numbered steps */
.steps { counter-reset: s; display: grid; gap: 0; }
.nstep { display: flex; gap: 12px; position: relative; padding-bottom: 12px; }
.nstep:last-child { padding-bottom: 0; }
.nstep::before { counter-increment: s; content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-2); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; position: relative; z-index: 1; }
.nstep:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.nstep .t { font-weight: 600; font-size: 13.5px; }
.nstep .s { font-size: 12.5px; color: var(--muted); }

/* Forms */
.field { margin: 0 0 14px; }
.field:last-child { margin-bottom: 0; }
label, .label { display: block; font-weight: 600; font-size: 12.5px; color: var(--ink-2); margin: 0 0 6px; }
.input, select { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0 12px; font-size: 16px; }
.money-input { position: relative; }
.money-input span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 16px; }
.money-input .input { padding-left: 24px; font-weight: 600; }
input[type=range] { width: 100%; accent-color: var(--accent); margin: 10px 0 0; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--sunk); padding: 3px; border-radius: 12px; }
.seg.two { grid-template-columns: 1fr 1fr; }
.seg button { height: 34px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 650; box-shadow: 0 1px 3px rgba(16,24,40,.12); }

/* Search */
.search { position: relative; margin: 0 0 10px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search .input { padding-left: 36px; font-size: 15px; }

.code-chip { flex: none; min-width: 64px; font-size: 12px; font-weight: 700; padding: 4px 7px; border-radius: 8px; background: var(--sunk); text-align: center; }
.code-chip.warn { background: var(--warn-bg); color: var(--warn); }
.code-chip.bad { background: var(--bad-bg); color: var(--bad); }
.back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--accent-2); padding: 0; cursor: pointer; font-weight: 600; font-size: 13px; margin: 0 0 10px; }

/* Checklist */
.check { display: flex; gap: 10px; align-items: center; padding: 11px 14px; cursor: pointer; }
.check + .check { border-top: 1px solid var(--line); }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; border: 2px solid #C9CED6; border-radius: 6px; margin: 0; display: grid; place-items: center; background: #fff; }
.check input:checked { background: var(--good); border-color: var(--good); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.check .t { font-size: 13.5px; font-weight: 500; }
.check .s { font-size: 12px; color: var(--muted); }
.check input:checked + .txt .t { color: var(--muted); text-decoration: line-through; }
.group-label { font-size: 12px; font-weight: 600; color: var(--muted); margin: 16px 2px 6px; }
.ring { width: 44px; height: 44px; flex: none; }

/* Sticky action bar */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
.dock-in { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dock-in:has(> :only-child) { grid-template-columns: 1fr; }
.btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 46px; font-weight: 600; font-size: 14px; color: #fff; background: var(--accent-2); border: 0; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #D5D2CB; }
.dock-note { max-width: 520px; margin: 0 auto 6px; font-size: 11.5px; color: var(--muted); text-align: center; }

#foot { max-width: 520px; margin: 0 auto; padding: 4px 16px 20px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; font-size: 12px; }
.foot-nav a { color: var(--ink-2); }

@media print {
  #top, .dock, #foot nav, .no-print { display: none !important; }
  body { background: #fff; padding: 0; }
}
.card, section { scroll-margin-top: 64px; }

/* ---------- Case review document (personal plan) ---------- */
.doc-head { padding: 6px 2px 14px; }
.doc-head .meta { font-size: 12px; color: var(--muted); }
.doc-head .meta b { color: var(--ink-2); font-weight: 600; }
.doc-head h1 { font-size: 27px; margin: 8px 0 6px; }
.doc-head p { color: var(--ink-2); font-size: 14px; }
.sheet { background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 14px; overflow: hidden; }
.sheet > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.sheet > header .n { font-size: 12px; color: var(--muted); }
.sheet .pad { padding: 14px 16px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; font-size: 13.5px; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; }
.kv b.alarm { color: var(--bad); }
.letter-art { display: block; width: 100%; height: auto; margin: 2px 0 12px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 0; font-size: 13.5px; color: var(--muted); }
.timeline li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #C9C5BD; background: #fff; flex: none; position: relative; z-index: 1; margin-left: 4px; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 8px; top: 21px; height: calc(100% - 12px); width: 1.5px; background: var(--line); }
.timeline li.past { color: var(--ink-2); }
.timeline li.past::before { background: var(--accent-2); border-color: var(--accent-2); }
.timeline li.now { color: var(--ink); font-weight: 600; }
.timeline li.now::before { width: 13px; height: 13px; margin-left: 2px; background: var(--bad); border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.timeline .here { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, #fff); padding: 2px 8px; border-radius: 999px; }
.note-line { font-size: 13px; color: var(--ink-2); padding: 10px 12px; border-left: 3px solid var(--bad); background: var(--bad-bg); border-radius: 0 8px 8px 0; margin-top: 12px; }
.note-line.calm { border-left-color: var(--accent-2); background: var(--sunk); }
.figs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.figs div { padding: 10px 12px; }
.figs div + div { border-left: 1px solid var(--line); }
.figs span { display: block; font-size: 11.5px; color: var(--muted); }
.figs b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.figs b.alarm { color: var(--bad); }
.chart { display: block; width: 100%; height: auto; }
.numbered { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.numbered li { counter-increment: n; display: flex; gap: 14px; padding: 12px 16px; }
.numbered li + li { border-top: 1px solid var(--line); }
.numbered li::before { content: counter(n); font-size: 18px; font-weight: 600; line-height: 1; color: var(--accent-2); width: 16px; flex: none; }
.numbered .t { font-weight: 600; font-size: 14px; }
.numbered .s { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.opt { display: flex; gap: 12px; padding: 12px 16px; }
.opt + .opt { border-top: 1px solid var(--line); }
.opt svg { width: 20px; height: 20px; color: var(--accent-2); flex: none; margin-top: 1px; stroke-width: 1.6; }
.opt .t { font-weight: 600; font-size: 14px; }
.opt .s { font-size: 12.5px; color: var(--muted); }
.contact { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.mono { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-2); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 18px; font-weight: 600; flex: none; }
.contact .t { font-weight: 600; font-size: 14.5px; }
.contact .s { font-size: 12.5px; color: var(--muted); }
.trust { display: flex; justify-content: space-around; gap: 8px; padding: 12px 8px; border-top: 1px solid var(--line); background: var(--sunk); }
.trust div { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); font-weight: 500; }
.trust svg { width: 14px; height: 14px; color: var(--accent-2); }
.bring { display: flex; flex-wrap: wrap; gap: 6px; }
.bring span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.bring svg { width: 13px; height: 13px; color: var(--muted); }
