/* HeirReady: calm, private-wealth look. Original design: navy ink, ivory paper, teal and brass. */

:root {
  --ink: #13233a;
  --ink-2: #2c3e55;
  --muted: #566273;
  --paper: #f6f3ec;
  --card: #ffffff;
  --line: #e2dbcf;
  --line-2: #cfc5b4;
  --teal: #1d5c63;
  --teal-dark: #154349;
  --teal-bg: #e4eff0;
  --brass: #8a6326;
  --brass-bg: #f5eddf;
  --good: #2b7449;
  --good-bg: #e4f1e8;
  --warn: #855400;
  --warn-bg: #fbefd9;
  --bad: #ad3229;
  --bad-bg: #f9e4e1;
  --grey: #5f6773;
  --grey-bg: #eceef1;
  --radius: 14px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgba(19, 35, 58, 0.06), 0 6px 18px rgba(19, 35, 58, 0.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 0.8em; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }
small, .small { font-size: 0.875rem; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
h1:focus, main:focus, .term:focus { outline: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: var(--r-md); z-index: 10; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 640px; padding-top: 60px; }
main.container { padding-top: 28px; padding-bottom: 48px; }
.loading { color: var(--muted); padding: 40px 0; }

/* Top bar */
.topbar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 5; }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; letter-spacing: 0.01em; }
.brand:hover { color: #e7d3ad; }
.brand-tag { font: 600 0.68rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); background: #e7d3ad; padding: 4px 8px; border-radius: var(--r-sm); vertical-align: middle; margin-left: 8px; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav a { color: #dfe6ef; text-decoration: none; padding: 8px 12px; border-radius: var(--r-md); font-size: 0.95rem; }
.topbar nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.topbar nav a[aria-current="page"] { background: rgba(231, 211, 173, 0.18); color: #fff; box-shadow: inset 0 -2px 0 #e7d3ad; }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; padding: 22px 0 36px; }
.footer p { margin: 0 0 6px; }

/* Page heads */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head > div:first-child { max-width: 760px; }
.eyebrow { letter-spacing: 0.01em; font-size: 0.875rem; font-weight: 700; color: var(--brass); margin-bottom: 8px; }
.eyebrow a { color: var(--brass); }
.lede { font-size: 1.08rem; color: var(--ink-2); }
.meta { color: var(--muted); margin-bottom: 6px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Cards and layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + * { margin-top: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prose { max-width: 820px; }
.empty { text-align: center; padding: 36px 22px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.kpi-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.kpi-value { font-family: var(--serif); font-size: 1.75rem; font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.kpi-value small { font-size: 0.95rem; color: var(--muted); font-family: var(--sans); font-weight: 500; }
.kpi-note { font-size: 0.8rem; color: var(--muted); }
.kpi-accent { border-top: 4px solid var(--teal); }
.kpi-risk { border-top: 4px solid var(--bad); }
.kpi-risk .kpi-value { color: var(--bad); }
.assumptions { font-size: 0.9rem; color: var(--muted); margin: 6px 0 18px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--line-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table caption { text-align: left; font-weight: 700; padding: 0 0 6px; color: var(--ink-2); }
.table.compact th[scope="row"] { font-weight: 600; width: 46%; color: var(--ink-2); }
.table-card { padding-bottom: 8px; }
.table-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.table-tools h2 { margin: 0; }
.row-link { font-weight: 700; font-family: var(--serif); font-size: 1.05rem; }
.row-sub { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.families tbody tr:hover { background: #faf8f3; }
.is-deceased td { color: var(--muted); }
.missing { color: var(--bad); font-weight: 600; }

/* Badges, chips, tags */
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 12px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.badge b { font-size: 0.95rem; }
.badge-ready { background: var(--good-bg); color: var(--good); }
.badge-gaps { background: var(--warn-bg); color: var(--warn); }
.badge-risk { background: var(--bad-bg); color: var(--bad); }
.chip { display: inline-block; border-radius: var(--r-sm); padding: 2px 8px; font-size: 0.8rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.chip-never-met { background: var(--bad-bg); color: var(--bad); border-color: #efc4be; }
.chip-met { background: var(--warn-bg); color: var(--warn); border-color: #efd7a8; }
.chip-engaged { background: var(--teal-bg); color: var(--teal); border-color: #bcd8da; }
.chip-client { background: var(--good-bg); color: var(--good); border-color: #bfdcc9; }
.chip-left { background: var(--grey-bg); color: var(--grey); border-color: #d6d9de; }
.legend { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.tag { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; background: var(--brass-bg); color: var(--brass); padding: 2px 8px; border-radius: var(--r-sm); vertical-align: middle; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.concept { display: inline-block; background: var(--teal-bg); color: var(--teal-dark); border-radius: 999px; padding: 4px 12px; font-size: 0.88rem; text-decoration: none; font-weight: 600; }
.concept:hover { background: #d3e6e7; }
.risk-text { color: var(--bad); }
.placeholder { background: #fff3c4; color: #5c4400; padding: 0 4px; border-radius: 3px; font-weight: 600; }

/* Alerts and messages */
.alert { background: var(--bad-bg); border: 1px solid #efc4be; border-left: 4px solid var(--bad); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; }
.alert h2 { color: var(--bad); font-size: 1.15rem; }
.notice { background: var(--teal-bg); border: 1px solid #bcd8da; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; }
.notice h2 { font-size: 1.05rem; margin-bottom: 4px; }
.notice p { margin-bottom: 6px; }
.msg { border-radius: 10px; padding: 12px 16px; margin-top: 12px; }
.msg ul { margin: 6px 0 0; padding-left: 20px; }
.msg-ok { background: var(--good-bg); color: #1d5634; }
.msg-error { background: var(--bad-bg); color: #7d221b; border: 1px solid #efc4be; }
.history { border-left: 6px solid var(--grey); }
.fineprint { font-size: 0.82rem; color: var(--muted); max-width: 820px; }

/* Readiness checklist */
.checklist { list-style: none; margin: 8px 0 0; padding: 0; }
.check { border-top: 1px solid var(--line); padding: 10px 0; }
.check-line { display: flex; align-items: baseline; gap: 10px; }
.check-title { font-weight: 600; flex: 1; }
.check-points { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.check-detail { margin: 2px 0 0 32px; color: var(--ink-2); font-size: 0.93rem; }
.check details { margin: 6px 0 0 32px; font-size: 0.92rem; }
.check summary { cursor: pointer; color: var(--teal); font-weight: 600; }
.check details p { margin: 6px 0; }
.status { display: inline-flex; justify-content: center; align-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 0.8rem; font-weight: 700; flex: none; }
.status-pass { background: var(--good-bg); color: var(--good); }
.status-partial { background: var(--warn-bg); color: var(--warn); }
.status-fail { background: var(--bad-bg); color: var(--bad); }
.status-na { background: var(--grey-bg); color: var(--grey); }
.check-na .check-title { color: var(--muted); }

/* Stats */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 12px; }
.stats div { background: #faf8f3; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stats dt { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.stats dd { margin: 4px 0 0; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.stats dd small { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
.stats.big dd { font-size: 1.7rem; }
.people-outlook { margin: 0 0 10px; padding-left: 18px; font-size: 0.92rem; }
.whatif { background: var(--brass-bg); border-radius: 10px; padding: 12px 14px; }
.watchouts li { margin-bottom: 6px; }
.draft-list { padding-left: 18px; }
.draft-list li { margin-bottom: 8px; }

/* Family tree */
.tree-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf6; padding: 6px; margin: 8px 0 16px; }
.tree { display: block; max-width: 100%; height: auto; min-width: 560px; margin: 0 auto; font-family: var(--sans); }
.tree-link, .tree-couple { fill: none; stroke: #b9ae9b; stroke-width: 1.6; }
.tree-couple { stroke: var(--brass); stroke-width: 2; }
.tree-node rect { fill: #fff; stroke: var(--line-2); stroke-width: 1.5; }
.tree-node.node-never-met rect { stroke: var(--bad); stroke-width: 2.2; fill: #fffafa; }
.tree-node.node-met rect { stroke: #c08a2c; stroke-width: 2; }
.tree-node.node-engaged rect { stroke: var(--teal); stroke-width: 2; }
.tree-node.node-client rect { stroke: var(--good); stroke-width: 2; fill: #f8fcf9; }
.tree-node.node-left rect { stroke: var(--grey); stroke-dasharray: 5 4; fill: #f6f7f8; }
.tree-node.node-deceased rect { stroke: #b8bcc3; stroke-dasharray: 3 3; fill: #f3f4f6; }
.tree-name { font-size: 14px; font-weight: 700; fill: var(--ink); }
.tree-age { font-weight: 400; fill: var(--muted); }
.tree-rel { font-size: 12px; fill: var(--ink-2); }
.tree-status { font-size: 12px; font-weight: 700; fill: var(--muted); }
.node-never-met .tree-status { fill: var(--bad); }
.node-met .tree-status { fill: var(--warn); }
.node-engaged .tree-status { fill: var(--teal); }
.node-client .tree-status { fill: var(--good); }
.tree-roles { font-size: 11px; fill: var(--brass); font-weight: 600; }
.tree-heir { font-size: 10px; font-weight: 700; fill: var(--brass); letter-spacing: 0.05em; text-transform: uppercase; }
.node-deceased .tree-name, .node-deceased .tree-rel { fill: var(--muted); }
.tree-node.quiet rect { stroke: var(--line-2); stroke-width: 1.5; fill: #fff; }
.tree-node.quiet .tree-status { fill: var(--muted); font-weight: 600; }
.row-alert { display: block; color: var(--bad); font-weight: 700; font-size: 0.85rem; margin-top: 2px; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 600 0.93rem/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-danger { color: var(--bad); border-color: #e7b8b2; }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.btn-small { min-height: 32px; padding: 4px 12px; font-size: 0.85rem; }
.btn-big { min-height: 48px; padding: 12px 20px; font-size: 1rem; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.actions.wrap { margin-top: 0; }
.inline { display: inline-flex; align-items: center; gap: 8px; }
.visually-hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.segmented a { padding: 8px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 0.92rem; }
.segmented a + a { border-left: 1px solid var(--line-2); }
.segmented a[aria-current="page"] { background: var(--ink); color: #fff; }

label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 10px; color: var(--ink-2); }
input[type="text"], input:not([type]), input[type="number"], input[type="month"], input[type="search"], input[type="email"], select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-md);
  font: 400 1rem/1.3 var(--sans); color: var(--ink); background: #fff; min-height: 44px;
}
.inline select, .inline input { display: inline-block; width: auto; margin-top: 0; }
textarea { resize: vertical; }
label.check, label.radio { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.check input, label.radio input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
fieldset { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 16px 8px; margin: 0 0 16px; }
legend { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; padding: 0 6px; }
.hint { font-size: 0.85rem; color: var(--muted); margin-top: -4px; }
.req { color: var(--muted); font-weight: 400; font-size: 0.82rem; }
.grid-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.member { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 4px; margin-bottom: 12px; background: #fcfbf8; }
.member-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.member-head h3 { margin: 0; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; }
.role-row, .doc-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr); gap: 0 14px; align-items: end; }
.doc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
#form-errors:focus { outline: none; }
.calc fieldset { margin-bottom: 12px; }

/* Learn */
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-bottom: 24px; }
.module { margin: 0; display: flex; flex-direction: column; }
.module h2 { font-size: 1.1rem; }
.module-n { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brass); margin-bottom: 4px; }
.module .chips { margin-top: auto; }
.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.term { margin: 0; scroll-margin-top: 80px; }
.term h3 { font-size: 1.2rem; }
.term-short { font-weight: 600; color: var(--ink-2); }
.term-example { background: var(--teal-bg); border-radius: var(--r-md); padding: 8px 12px; font-size: 0.93rem; }
.term-interview { background: var(--brass-bg); border-radius: var(--r-md); padding: 8px 12px; font-size: 0.93rem; }
.term.highlight { box-shadow: 0 0 0 3px var(--teal), var(--shadow); }
.sources { color: var(--muted); margin-bottom: 0; }
.family-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.family-card { margin: 0; }
.family-card h2 { font-size: 1.15rem; }

/* Landing page */
.hero { background: linear-gradient(180deg, #13233a 0%, #1b3050 100%); color: #fff; padding: 64px 0 56px; }
.hero .eyebrow { color: #e7d3ad; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); max-width: 16ch; }
.hero-lede { font-size: 1.18rem; max-width: 62ch; color: #e3e9f1; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.hero .btn:not(.btn-primary):hover { border-color: #fff; }
.hero .btn-primary { background: #e7d3ad; border-color: #e7d3ad; color: var(--ink); }
.hero .btn-primary:hover { background: #f1e2c4; color: var(--ink); }
.hero .small { color: #c4cfdc; }
.stats-band { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: -32px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; }
.stat-big { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; color: var(--teal-dark); margin-bottom: 4px; font-variant-numeric: lining-nums tabular-nums; }
.how, .care, .learn-band { padding-top: 48px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; counter-increment: step; box-shadow: var(--shadow); }
.steps li::before { content: counter(step); display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #e7d3ad; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 10px; }
.care-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.care-grid .card { margin: 0; }
.landing .footer { margin-top: 48px; }

/* Narrow screens */
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .grid-2, .two-col, .terms, .steps, .care-grid, .stats-band { grid-template-columns: 1fr; }
  .grid-fields { grid-template-columns: 1fr 1fr; }
  .role-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .table.families thead, .table.people thead { display: none; }
  .table.families tr, .table.people tr { display: block; border-bottom: 1px solid var(--line-2); padding: 10px 0; }
  .table.families td, .table.people td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 0; text-align: right; }
  .table.families td::before, .table.people td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: 0.85rem; text-align: left; flex: none; }
  .table.families td:first-child, .table.people td:first-child { display: block; text-align: left; }
  .table.families td:first-child::before, .table.people td:first-child::before { content: none; }
  .table .num { text-align: right; }
  .stats { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .hero { padding: 44px 0 48px; }
}
@media (max-width: 520px) {
  .topbar { position: static; }
  .grid-fields, .doc-row { grid-template-columns: 1fr; }
  .kpi-value { font-size: 1.45rem; }
  .card { padding: 16px; }
  .topbar nav a { padding: 6px 8px; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ---------- v2 design pass (2026-11-26) ---------- */

/* Brand and top bar */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-tag { margin-left: 2px; }
.topbar nav { align-items: center; }
.nav-cta { background: #e7d3ad; color: var(--ink) !important; font-weight: 700; }
.nav-cta:hover { background: #f1e2c4 !important; }
.nav-tour { font: 600 0.9rem/1 var(--sans); color: #fff; background: transparent; border: 1px solid rgba(231, 211, 173, 0.55); border-radius: var(--r-md); padding: 8px 12px; margin-left: 8px; cursor: pointer; }
.nav-tour:hover { background: rgba(231, 211, 173, 0.14); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.footer-links a { color: var(--ink-2); }

/* Landing hero with product preview */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 44px; align-items: center; }
.hero h1 { max-width: none; letter-spacing: -0.01em; }
.hero-em { display: block; color: #e7d3ad; }
.hero-note { color: #c4cfdc; font-size: 0.92rem; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }
.preview { margin: 0 auto; width: 100%; max-width: 460px; }
.preview-card { background: #fff; color: var(--ink); border-radius: var(--r-lg); padding: 20px 20px 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28); }
.preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.preview-eyebrow { font-size: 0.8rem; font-weight: 700; color: var(--brass); margin: 0 0 4px; }
.preview-title { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin: 0; }
.preview-meta { font-size: 0.85rem; color: var(--muted); margin: 0 0 6px; }
.preview-checks { list-style: none; padding: 0; margin: 8px 0 10px; font-size: 0.9rem; }
.preview-checks li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); }
.preview-tree { width: 100%; height: auto; display: block; }
.preview-tree .pt { font: 700 11px var(--sans); fill: var(--ink); }
.preview-legend { display: flex; gap: 6px; margin: 6px 0 0; }
.preview figcaption { color: #c4cfdc; font-size: 0.85rem; margin-top: 14px; text-align: center; }

/* Landing sections */
.stats-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-big { font-size: 1.9rem; }
.step-icon { width: 28px; height: 28px; color: var(--teal); display: block; margin-bottom: 8px; }
.steps li::before { content: none; }
.who, .faq, .final-cta { padding-top: 48px; }
.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.who-grid .card { margin: 0; }
.faq details { background: #fff; border: 1px solid var(--line); border-top: 0; padding: 16px 20px; }
.faq h2 + details { border-top: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.faq details:last-of-type { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.faq summary { cursor: pointer; font-weight: 700; font-family: var(--serif); font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(45deg); flex: none; margin-right: 4px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { margin: 12px 0 0; }
.final-card { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 32px; text-align: center; }
.final-card h2 { font-size: 1.6rem; }
.final-card p { color: #dfe6ef; max-width: 60ch; margin-left: auto; margin-right: auto; }
.final-card .btn-primary { background: #e7d3ad; border-color: #e7d3ad; color: var(--ink); }

/* Legal pages */
.legal { max-width: 780px; padding-top: 36px; padding-bottom: 24px; }
.legal h2 { margin-top: 28px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }

/* Chart */
.chart-card .chart-wrap { position: relative; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: #e9e4da; stroke-width: 1; }
.chart .axis text { font: 12px var(--sans); fill: var(--muted); }
.chart .bar { fill: #00897b; } /* validated: lightness, chroma >= 0.10, contrast >= 3:1 on white (dataviz validator) */
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:focus { outline: none; }
.chart .hit:focus + .bar, .chart .bar.is-active { fill: #00695c; }
.chart .hit:focus-visible { stroke: var(--teal); stroke-width: 2; }
.chart .value-label { font: 600 12px var(--sans); fill: var(--ink-2); }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; border-radius: var(--r-md); padding: 8px 12px; font-size: 0.85rem; line-height: 1.35; box-shadow: var(--shadow); transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; z-index: 2; }
.chart-tip strong { display: block; font-size: 0.98rem; }
.chart-table summary { cursor: pointer; color: var(--teal); font-weight: 600; font-size: 0.9rem; margin-top: 6px; }

/* Tabs (AI drafts) */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 2px solid var(--line); margin: 10px 0 14px; }
.tab { font: 600 0.92rem/1.2 var(--sans); background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 10px 12px; color: var(--ink-2); cursor: pointer; border-radius: 6px 6px 0 0; }
.tab:hover { color: var(--teal-dark); background: #faf8f3; }
.tab[aria-selected="true"] { color: var(--teal-dark); border-bottom-color: var(--teal); }
.draft-banner { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--brass-bg); border-radius: 10px; padding: 8px 12px; font-size: 0.85rem; margin-bottom: 12px; }
.draft h3 { margin-top: 14px; }
.draft ul { padding-left: 20px; }
.draft li { margin-bottom: 6px; }
.heir-plan { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: #fcfbf8; }
.heir-plan h4 { margin: 0 0 6px; font-family: var(--serif); font-size: 1.05rem; }
.agenda { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.agenda td, .agenda th { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.agenda .mins { white-space: nowrap; color: var(--muted); width: 70px; }
.note-body { white-space: pre-line; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--r-md); padding: 16px; }
.locked { background: var(--bad-bg); border: 1px solid #efc4be; border-radius: 10px; padding: 14px 16px; }
.locked h3 { margin-top: 0; color: var(--bad); }

/* Lessons and quizzes */
.lesson-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 24px; }
.lesson-card { margin: 0; display: flex; flex-direction: column; }
.lesson-card .actions { margin-top: auto; }
.progress { font-size: 0.82rem; font-weight: 700; color: var(--good); }
.lesson { max-width: 820px; }
.lesson h2 { margin-top: 24px; }
.key-points { background: var(--teal-bg); border-radius: 10px; padding: 12px 16px 6px; }
.quiz fieldset { background: #fff; }
.quiz legend { font-family: var(--sans); font-size: 1rem; font-weight: 700; }
.quiz .feedback { font-size: 0.92rem; border-radius: var(--r-md); padding: 8px 12px; margin: 4px 0 12px; }
.quiz .feedback.right { background: var(--good-bg); color: #1d5634; }
.quiz .feedback.wrong { background: var(--bad-bg); color: #7d221b; }
.explain-back textarea { min-height: 120px; }

/* Tour */
.tour { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); background: var(--ink); color: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); z-index: 20; }
.tour h2 { color: #fff; font-size: 1.1rem; margin-bottom: 6px; }
.tour p { color: #dfe6ef; margin-bottom: 10px; }
.tour .step-count { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: #e7d3ad; font-weight: 700; margin-bottom: 4px; }
.tour .actions { margin-top: 0; justify-content: flex-end; }
.tour .btn { min-height: 36px; }
.tour .btn-primary { background: #e7d3ad; border-color: #e7d3ad; color: var(--ink); }
.tour-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: #c4cfdc; font-size: 1.3rem; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.tour-close:hover { color: #fff; }
.tour-target { outline: 3px solid #c08a2c !important; outline-offset: 4px; border-radius: var(--r-lg); }

/* Feedback */
.feedback-form { max-width: 680px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .preview-card { transform: none; }
  .stats-band, .who-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .nav-tour { margin-left: 0; }
  .final-card { padding: 22px; }
  .tour { bottom: 10px; }
}

/* ---------- unslop polish (2026-11-27) ---------- */
.icon { display: inline-block; vertical-align: -0.15em; flex: none; }
.status .icon { vertical-align: 0; }
.alert h2, .locked h3 { display: flex; align-items: center; gap: 8px; }
.row-alert, .progress { display: flex; align-items: center; gap: 4px; }
.module-n { letter-spacing: 0.01em; font-size: 0.85rem; text-transform: none; }
.section-title { display: flex; align-items: center; gap: 12px; }
.section-title::before { content: ""; width: 24px; height: 24px; background: url("/mark.svg") center / contain no-repeat; flex: none; }

/* Print: a clean family brief */
@media print {
  body { background: #fff; font-size: 11pt; }
  .topbar, .footer, .no-print, .skip, .segmented, .head-actions, details summary, .tour, #tour-root { display: none !important; }
  .card, .kpi, .stat-card { box-shadow: none; break-inside: avoid; }
  .check details { display: block; }
  .check details[open] summary, .check details summary { display: none; }
  a { color: inherit; text-decoration: none; }
  .tree-wrap { overflow: visible; border: 0; }
  .tree { min-width: 0; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
