/* Pension & Inheritance Check.
   Warm ivory ground, ink, one signature colour (deep green) on the plate, the emphasised phrase, the 2027 column and the button.
   Libre Caslon for display and reading, Hanken Grotesk for controls. Tracked small caps for labels. Hairlines and space do the
   section work; no grey bands. One type scale, six sizes: xl (the question) · l (result headline, plate figures) · m (section
   titles) · body · ui · label. Motion slow and deliberate. */

:root {
  --bg: #F6F4F0;
  --bg-2: #ECEBE6;
  --ink: #1A1D1C;
  --ink-2: #4E524F;
  --ink-3: #6E736F;
  --line: #DAD9D3;
  --line-2: #C5C4BD;
  --green: #1E3B32;
  --green-2: #27493E;
  --on-green: #F6F4F0;
  --on-green-2: rgba(246, 244, 240, 0.74);
  --on-green-3: rgba(246, 244, 240, 0.56);
  --on-green-line: rgba(246, 244, 240, 0.18);

  --display: "Libre Caslon Display", "Libre Caslon Text", "Times New Roman", serif;
  --serif: "Libre Caslon Text", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --hand: "La Belle Aurore", "Bradley Hand", "Segoe Script", cursive;

  --t-xl: clamp(40px, 5vw, 66px);
  --t-l: clamp(26px, 2.8vw, 38px);
  --t-m: clamp(22px, 2vw, 26px);
  --t-body: 17px;
  --t-ui: 14px;
  --t-label: 11.5px;

  --page: 1160px;
  --reading: 720px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(64px, 9vh, 112px);
  --inside: 26px;
  --masthead: 73px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: var(--t-ui); line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100svh; display: flex; flex-direction: column; overflow-x: hidden; caret-color: var(--ink); }
::selection { background: var(--green); color: var(--on-green); }
[hidden] { display: none !important; }
.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: var(--gutter); top: -48px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 20; }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* labels: tracked small caps, one size */
.eyebrow, .plate__rule, .row__title, .block__subtitle, .priority__label, .more__summary, .step__k, .ledger th {
  font-family: var(--sans); font-size: var(--t-label); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
}
.eyebrow { margin: 0 0 22px; display: flex; align-items: center; gap: 14px; }
.eyebrow::after { content: ""; width: 36px; height: 1px; background: var(--ink-3); }

/* ---------- masthead ---------- */
.masthead { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 26px var(--gutter) 22px; border-bottom: 1px solid var(--line); height: var(--masthead); }
.masthead__name { font-size: var(--t-label); font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.masthead__meta { margin: 0; font-size: 13px; color: var(--ink-3); }
@media (max-width: 640px) { .masthead__meta { display: none; } }

/* ---------- typography ---------- */
.display { font-family: var(--display); font-weight: 400; font-size: var(--t-xl); line-height: 1.02; letter-spacing: -0.012em; margin: 0 0 24px; text-wrap: balance; }
.display em { font-style: normal; color: var(--green); }
.display--result { font-size: var(--t-l); line-height: 1.1; max-width: 22em; }
.display--result:focus { outline: none; }
.lead { font-family: var(--serif); font-size: var(--t-body); line-height: 1.6; color: var(--ink-2); max-width: 34em; margin: 0 0 28px; }

/* ---------- screens ---------- */
main { flex: 1; }
.screen { padding: clamp(40px, 7vh, 96px) var(--gutter) clamp(56px, 9vh, 120px); max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; }
.screen--intro, .screen--chapter { min-height: calc(100svh - var(--masthead)); display: flex; flex-direction: column; justify-content: center; padding-top: 24px; padding-bottom: 28px; }
.screen.is-entering > * { animation: rise 1.1s var(--ease-out) both; }
.screen.is-entering > *:nth-child(2) { animation-delay: 0.1s; }
.screen.is-entering > *:nth-child(3) { animation-delay: 0.2s; }
.screen.is-entering > *:nth-child(n+4) { animation-delay: 0.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
::view-transition-old(root) { animation: vtOut 0.3s ease both; }
::view-transition-new(root) { animation: vtIn 0.6s var(--ease-out) both; }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- intro: the drawing sits on the page itself, bleeding off the right and the bottom; the text on the paper to its left ---------- */
.screen--intro { position: relative; max-width: none; padding-left: 0; padding-right: 0; overflow: hidden; }
.screen--intro > .hero, .screen--intro > .more { position: relative; z-index: 1; width: 100%; max-width: calc(var(--page) + 2 * var(--gutter)); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
body:has(.screen--intro:not([hidden])) .masthead { display: none; }
.screen--intro { min-height: 100svh; padding-bottom: 16px; }
.hero__text { max-width: 30em; }
.hero__text .display { max-width: 9.5em; }
.actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
/* the stage is the sheet the drawing is on: same ivory, so the drawing (multiplied) and its edges (masked) dissolve into the page */
@property --stage-solid { syntax: "<percentage>"; inherits: false; initial-value: 97%; }
@property --stage-end { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
.hero__stage { position: absolute; top: 0; right: 0; width: 100%; height: 100svh; background: var(--bg); pointer-events: none; z-index: 0; --stage-solid: 97%; --stage-end: 100%;
  transition: --stage-solid 1s var(--ease-out), --stage-end 1s var(--ease-out);
  -webkit-mask-image: linear-gradient(to right, transparent 0, transparent var(--fade-from, 42%), #000 var(--fade-to, 60%)), linear-gradient(to bottom, transparent 0, #000 9%, #000 var(--stage-solid), transparent var(--stage-end));
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, transparent var(--fade-from, 42%), #000 var(--fade-to, 60%)), linear-gradient(to bottom, transparent 0, #000 9%, #000 var(--stage-solid), transparent var(--stage-end));
  mask-composite: intersect; }
/* the disclosure opens over the foot of the drawing, so the drawing withdraws above it */
.screen--intro:has(.more[open]) .hero__stage { --stage-solid: 56%; --stage-end: 74%; }
.screen.is-entering > .hero__stage { animation: none; }
.hero__art { position: absolute; margin: 0; right: var(--art-right, -5%); top: var(--art-top, 0); height: var(--art-h, 100%); aspect-ratio: var(--art-ratio, 3 / 2); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; mix-blend-mode: multiply; opacity: 0; animation: fadeIn 2s var(--ease-out) 0.2s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
/* the notes: written on the drawing by hand, about the family and what comes next */
.callouts { list-style: none; margin: 0; padding: 0; }
.callout { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%) rotate(var(--r, -2deg)); font-family: var(--hand); font-size: clamp(18px, 1.5vw, 23px); line-height: 1.25; color: var(--ink); white-space: nowrap; opacity: 0; animation: noteIn 1.4s var(--ease-out) forwards; }
@keyframes noteIn { to { opacity: 0.86; } }
.callout:nth-child(1) { animation-delay: 1.4s; } .callout:nth-child(2) { animation-delay: 1.8s; } .callout:nth-child(3) { animation-delay: 2.2s; } .callout:nth-child(4) { animation-delay: 2.6s; } .callout:nth-child(5) { animation-delay: 3s; }
@media (max-width: 900px) {
  /* one screen on a phone: the question, the lead and the button, then the house filling the width and running off the bottom */
  :root { --masthead: 56px; --section: 48px; }
  .screen--result { padding-bottom: 40px; }
  .block--actions .secondary-actions { margin-bottom: 0; }
  .screen--intro { justify-content: flex-start; padding-top: 30px; padding-bottom: 10px; }
  .screen--intro .eyebrow { margin-bottom: 12px; }
  .screen--intro .display { font-size: clamp(32px, 9.4vw, 44px); margin-bottom: 14px; }
  .screen--intro .lead { font-size: 16px; line-height: 1.5; margin-bottom: 16px; }
  .screen--intro .actions { gap: 8px 20px; }
  .hero__stage { position: relative; order: 2; flex: 1 1 auto; min-height: 220px; height: auto; margin-top: 6px; overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 12%); }
  .hero__art { width: var(--art-w-m, 148%); height: auto; aspect-ratio: auto; left: var(--art-left-m, -48%); right: auto; top: 0; bottom: var(--art-bottom-m, -14%); }
  .hero__img { object-fit: cover; object-position: 100% 100%; }
  .screen--intro > .more { order: 3; margin-top: 4px; }
  .screen--intro > .more .more__summary { padding: 8px 0; }
  .hero__text { max-width: none; }
  .callout { display: none; }
  .masthead { height: var(--masthead); padding: 18px var(--gutter) 16px; }
  /* steps: the question first, the explanation beneath it, no air above */
  .screen--chapter { padding-top: 10px; padding-bottom: 20px; justify-content: flex-start; }
  .rail { margin-bottom: 16px; }
  .chapter { display: flex; flex-direction: column; gap: 0; }
  .chapter__aside { display: contents; }
  .chapter__aside .eyebrow { order: 0; margin-bottom: 14px; }
  .chapter__step { display: none; }
  .chapter__main { order: 1; }
  .chapter__why { order: 2; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
  .chapter__note { order: 3; margin-top: 14px; }
  .chapter__q { margin-bottom: 12px; }
}

.more { width: 100%; margin: 12px auto 0; }
.more__summary { list-style: none; cursor: pointer; padding: 10px 0; display: flex; align-items: center; gap: 12px; transition: color 0.4s; }
.more__summary::-webkit-details-marker { display: none; }
.more__summary:hover { color: var(--ink); }
.more__mark { position: relative; width: 11px; height: 11px; display: inline-block; flex: 0 0 auto; }
.more__mark::before, .more__mark::after { content: ""; position: absolute; background: currentColor; top: 5px; left: 0; width: 11px; height: 1px; transition: transform 0.5s var(--ease-out); }
.more__mark::after { transform: rotate(90deg); }
.more[open] .more__mark::after, .fold[open] .more__mark::after { transform: rotate(0deg); }
.more__body { padding-top: 14px; animation: rise 0.9s var(--ease-out) both; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; border-top: 1px solid var(--line); padding-top: 18px; }
.step__n { font-family: var(--display); font-size: var(--t-m); margin: 0 0 10px; color: var(--ink); }
.step__k { margin: 0 0 8px; }
.step__t { margin: 0; font-size: var(--t-ui); line-height: 1.55; color: var(--ink-2); }
.step--note { border-left: 1px solid var(--line-2); padding-left: 24px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; gap: 20px; } .step--note { border-left: 0; padding-left: 0; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; background: var(--green); color: var(--on-green); padding: 0 22px; height: 46px; font-weight: 500; font-size: var(--t-label); letter-spacing: 0.16em; text-transform: uppercase; transition: background 0.4s var(--ease); }
.btn:hover { background: var(--green-2); }
.btn__arrow { display: inline-block; width: 18px; height: 1px; background: currentColor; position: relative; flex: 0 0 auto; }
.btn__arrow::before, .btn__arrow::after { content: ""; position: absolute; right: 0; width: 6px; height: 1px; background: currentColor; transform-origin: right center; }
.btn__arrow::before { transform: rotate(-45deg); }
.btn__arrow::after { transform: rotate(45deg); }
.btn-text { color: var(--ink); font-size: var(--t-ui); position: relative; min-height: 28px; padding-bottom: 3px; }
.btn-text::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--line-2); transition: background 0.4s; }
.btn-text:hover::after { background: var(--ink); }
.btn-text--small { font-size: 13px; color: var(--ink-2); }
.btn-text--plate { color: var(--on-green-2); }
.btn-text--plate::after { background: var(--on-green-line); }
.btn-text--plate:hover { color: var(--on-green); }
.btn-text--plate:hover::after { background: var(--on-green); }

/* ---------- chapters ---------- */
.rail { display: flex; gap: 6px; margin-bottom: clamp(24px, 4vh, 40px); }
.rail i { display: block; height: 1px; flex: 1; background: var(--line-2); position: relative; overflow: hidden; }
.rail i::after { content: ""; position: absolute; inset: 0; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease-out); }
.rail i.is-done::after { transform: scaleX(1); background: var(--ink-3); }
.rail i.is-now::after { transform: scaleX(1); }
.chapter { display: grid; grid-template-columns: 240px minmax(0, 620px); gap: clamp(40px, 7vw, 120px); align-items: start; }
@media (max-width: 860px) { .chapter { grid-template-columns: 1fr; gap: 20px; } }
.chapter__aside { position: sticky; top: 40px; }
@media (max-width: 860px) { .chapter__aside { position: static; } }
.eyebrow--step { color: var(--ink); margin-bottom: 6px; }
.chapter__step { margin: 0 0 18px; font-size: 13px; color: var(--ink-3); }
.chapter__why { font-family: var(--serif); font-size: var(--t-body); line-height: 1.55; color: var(--ink-2); margin: 0 0 18px; }
.chapter__note { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.chapter__note strong { font-weight: 500; color: var(--ink); }
.chapter__q { font-family: var(--display); font-weight: 400; font-size: var(--t-l); line-height: 1.1; margin: 0 0 22px; letter-spacing: -0.008em; text-wrap: balance; }
.chapter__q:focus { outline: none; }
.chapter__nav { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }

.choices { border: 0; padding: 0; margin: 0 0 24px; border-top: 1px solid var(--ink); }
.choice { display: flex; gap: 16px; align-items: flex-start; padding: 13px 4px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.4s var(--ease); }
.choice:hover { background: var(--bg-2); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__ring { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 1px solid var(--ink-3); position: relative; transition: border-color 0.3s; }
.choice__ring::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--green); transform: scale(0); transition: transform 0.35s var(--ease-out); }
.choice:hover .choice__ring { border-color: var(--ink); }
.choice input:checked + .choice__ring { border-color: var(--green); }
.choice input:checked + .choice__ring::after { transform: scale(1); }
.choice input:focus-visible + .choice__ring { outline: 2px solid var(--ink); outline-offset: 3px; }
.choice__text { display: flex; flex-direction: column; gap: 3px; }
.choice__title { font-size: 16px; font-weight: 500; }
.choice__desc { font-size: var(--t-ui); color: var(--ink-2); line-height: 1.5; }
.choices--inline { border-top: 0; display: flex; flex-wrap: wrap; gap: 0 28px; align-items: center; }
.choices--inline .field__label { width: 100%; margin-bottom: 8px; }
.choices--inline .field__hint { width: 100%; margin-top: 8px; }
.choice--pill { border-bottom: 0; padding: 6px 0; align-items: center; }
.choice--pill:hover { background: transparent; }
.choice--pill .choice__ring { margin-top: 0; }

.checks { border: 0; padding: 0; margin: 8px 0 0; }
.check { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; border: 1px solid var(--ink-3); position: relative; transition: border-color 0.3s, background 0.3s; }
.check__box::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 0.3s var(--ease-out); }
.check:hover .check__box { border-color: var(--ink); }
.check input:checked + .check__box { background: var(--green); border-color: var(--green); }
.check input:checked + .check__box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible + .check__box { outline: 2px solid var(--ink); outline-offset: 3px; }
.check__text { font-size: 15px; line-height: 1.5; }
.check--consent { border-bottom: 0; margin-top: 8px; }
.check--contact { margin-top: 0; padding-top: 4px; }

.fields { display: grid; gap: 26px; margin-bottom: 20px; }
.fields--two { grid-template-columns: 1fr 1fr; }
.fields--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .fields--two, .fields--three { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; }
.field__label { font-size: var(--t-ui); font-weight: 500; color: var(--ink); margin-bottom: 8px; display: block; padding: 0; }
.field__opt { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.field__hint { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.5; }
.field__error { font-size: 13px; color: var(--ink); margin: 8px 0 0; }
.line, .money { position: relative; border-bottom: 1px solid var(--line-2); transition: border-color 0.4s; }
.line:focus-within, .money:focus-within { border-bottom-color: var(--ink); }
.money { display: flex; align-items: baseline; gap: 8px; }
.money__prefix { font-family: var(--serif); font-size: 22px; color: var(--ink-3); transition: color 0.4s; }
.money:focus-within .money__prefix { color: var(--ink); }
.field__input { font-family: var(--sans); font-size: 22px; font-weight: 400; font-variant-numeric: tabular-nums lining-nums; color: var(--ink); background: transparent; border: 0; padding: 8px 0 10px; width: 100%; border-radius: 0; -webkit-appearance: none; appearance: none; }
.field__input::placeholder { color: var(--ink-3); opacity: 0.5; }
.field__input:focus { outline: none; }
.field__input--short { max-width: 120px; }
.field__input--text { font-size: 17px; padding: 9px 0; }
select.field__input--text { padding-right: 24px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: right 8px top 19px, right 3px top 19px; background-size: 5px 5px; background-repeat: no-repeat; }
textarea.field__input--text { resize: vertical; line-height: 1.5; }
.field.is-invalid .line, .field.is-invalid .money { border-bottom-color: var(--ink); }

/* ---------- result ---------- */
.example-note { background: var(--bg-2); padding: 4px 12px; margin: 0 auto 8px; font-size: 12.5px; color: var(--ink-2); max-width: var(--page); }
.example-note p { margin: 0; }
.example-note .btn-text { font-size: 13.5px; margin-left: 6px; }
.result-head { max-width: var(--page); margin: 0 auto 10px; }
.result-head .lead { margin-bottom: 0; max-width: 52em; }
.result-head .display { margin-bottom: 6px; }
.screen--result { padding-top: 12px; }

/* the plate: one instrument, the two figures and the two bars on the signature colour */
.plate { background: var(--green); color: var(--on-green); padding: clamp(16px, 2vw, 22px) clamp(24px, 3.5vw, 44px) clamp(12px, 1.6vw, 16px); margin: 0 0 var(--section); }
.plate__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(28px, 5vw, 80px); padding-bottom: 8px; border-bottom: 1px solid var(--on-green-line); }
.plate__col { min-width: 0; }
.plate__col + .plate__col { border-left: 1px solid var(--on-green-line); padding-left: clamp(24px, 4vw, 64px); }
.plate__rule { color: var(--on-green-2); margin: 0 0 10px; }
.plate__col--next .plate__rule { color: var(--on-green); }
.plate__figure { font-family: var(--display); font-weight: 400; font-size: var(--t-l); line-height: 1; letter-spacing: -0.01em; font-variant-numeric: lining-nums tabular-nums; margin: 0 0 4px; color: var(--on-green); }
.plate__figure .cur { font-size: 0.7em; vertical-align: 0.22em; margin-right: 0.04em; color: var(--on-green-2); }
.plate__label { font-size: 13px; color: var(--on-green-3); margin: 0 0 6px; }
.plate__sub { font-family: var(--serif); font-size: var(--t-body); margin: 0; color: var(--on-green-2); }
.plate__sub b { font-weight: 400; color: var(--on-green); font-variant-numeric: lining-nums tabular-nums; }
.plate__note { display: none; }
.plate__chart { padding: 10px 0 6px; position: relative; }
.block__head--plate { position: absolute; right: 0; top: 16px; }
.block__head--plate .plate__rule { display: none; }
.plate__delta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--on-green-line); opacity: 0; transform: translateY(6px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.plate__delta.is-in { opacity: 1; transform: none; }
.plate__basis { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--on-green-3); max-width: 70em; }
.plate__delta div { min-width: 0; }
.plate__delta dt { font-size: 12.5px; color: var(--on-green-3); margin-bottom: 4px; }
.plate__delta dd { margin: 0; font-family: var(--display); font-size: 20px; font-variant-numeric: lining-nums tabular-nums; }
@media (max-width: 680px) {
  .plate__cols { grid-template-columns: 1fr; }
  .plate__col + .plate__col { border-left: 0; border-top: 1px solid var(--on-green-line); padding-left: 0; padding-top: 20px; margin-top: 20px; }
  .plate__delta { grid-template-columns: 1fr; gap: 14px; }
}

/* sections */
.block { margin-bottom: var(--section); }
/* one axis: a titled block is a full-width row, the title in the left column, the content in the right, like the steps */
.block--grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 0 clamp(32px, 5vw, 72px); border-top: 1px solid var(--ink); padding-top: var(--inside); align-items: start; }
.block--grid > .block__title { margin: 5px 0 0; padding-right: 8px; font-family: var(--sans); font-size: var(--t-label); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); line-height: 1.6; }
.block__body { min-width: 0; }
.block__title { font-family: var(--display); font-weight: 400; font-size: var(--t-m); line-height: 1.15; margin: 0 0 var(--inside); }
.block__caption { font-size: var(--t-ui); color: var(--ink-2); margin: 0 0 var(--inside); max-width: 36em; line-height: 1.55; }
.block__subtitle { margin: 0 0 16px; }
.block__after { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; margin: 20px 0 0; max-width: 36em; }
.block__after .btn-text { font-size: 13.5px; }
.block__after--sources a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.block__after--sources a:hover { text-decoration-color: var(--ink); }
.block--two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 760px) { .block--two { grid-template-columns: 1fr; gap: 32px; } }

.drivers { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px; margin: 0 0 30px; padding: 2px 0 22px; border-bottom: 1px solid var(--line); }
.driver { min-width: 0; }
.driver__v { font-family: var(--display); font-size: var(--t-m); line-height: 1; margin: 0 0 8px; font-variant-numeric: lining-nums tabular-nums; }
.driver__k { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.5; }
@media (max-width: 640px) { .drivers { grid-template-columns: 1fr; gap: 16px; } }

.prose { font-family: var(--serif); font-size: var(--t-body); line-height: 1.62; font-variant-numeric: lining-nums tabular-nums; max-width: 38em; }
.prose p { margin: 0 0 18px; }
.prose strong { font-weight: 700; }

/* the priority sits in the content column; anything else worth reviewing stacks beneath it, only when there is something */
.block__body .priority { border-top: 0; padding-top: 0; }
.also-wrap { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 18px; }
.also { display: grid; grid-template-columns: 1fr; gap: 22px; }
.also .priority { border-top: 1px solid var(--line); padding-top: 16px; }
.also .priority:first-child { border-top: 0; padding-top: 0; }
@media (max-width: 780px) { .block--grid { grid-template-columns: 1fr; gap: 14px 0; } }

/* chart: on the plate */
.chart { display: grid; gap: 12px; margin-bottom: 0; min-width: 0; }
.row { min-width: 0; }
.row__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; padding-right: 72px; }
.row__title { margin: 0; color: var(--on-green-2); }
.row--next .row__title { color: var(--on-green); }
.row__tax { margin: 0; font-family: var(--display); font-size: var(--t-body); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; color: var(--on-green); }
.row__tax span { font-family: var(--sans); font-size: 12px; color: var(--on-green-3); margin-right: 10px; }
.track { display: flex; width: 100%; overflow: hidden; }
.part { flex: 0 0 auto; width: var(--w); position: relative; padding-right: 3px; min-width: 0; outline-offset: 4px; overflow: hidden; transition: width 1.6s var(--ease-out), opacity 0.8s; }
.part:last-child { padding-right: 0; }
.part.is-gone { opacity: 0; }
.part__labels { height: 36px; padding: 0 8px 0 9px; border-left: 1px solid var(--on-green-line); margin-bottom: 6px; overflow: hidden; transition: opacity 0.5s; }
.part__labels.is-hidden { opacity: 0; }
.part__k { display: block; font-size: 11.5px; line-height: 1.25; color: var(--on-green-3); white-space: nowrap; }
.part__v { display: block; font-size: 15px; line-height: 1.2; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; margin-top: 3px; color: var(--on-green); }
.part__bar { height: 18px; }
.part--free .part__bar { background: rgba(246, 244, 240, 0.14); box-shadow: inset 0 0 0 1px rgba(246, 244, 240, 0.28); }
.part--charity .part__bar { background: rgba(246, 244, 240, 0.34); }
.part--taxed .part__bar { background: var(--on-green); }
.part--outside .part__bar { background: repeating-linear-gradient(135deg, rgba(246,244,240,0.55) 0 1px, transparent 1px 5px); box-shadow: inset 0 0 0 1px rgba(246, 244, 240, 0.7); }
.part:hover .part__bar { opacity: 0.85; }
.scale { position: relative; height: 20px; margin-top: 2px; }
.scale__tick { position: absolute; left: var(--x); top: 0; height: 6px; width: 1px; background: var(--on-green-line); }
.scale__tick span { position: absolute; top: 9px; left: 0; transform: translateX(-50%); font-size: 10.5px; color: var(--on-green-3); white-space: nowrap; letter-spacing: 0.06em; }
.scale__tick:first-child span { transform: none; }
.scale__tick--taper { background: var(--on-green-2); height: 9px; }
.scale__tick--taper span { color: var(--on-green-2); }
.scale__tick span.is-off { visibility: hidden; }
.row__keys { list-style: none; padding: 0; margin: 8px 0 0; display: none; font-size: 13px; }
.row__keys li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--on-green-line); align-items: baseline; }
.row__keys li span { color: var(--on-green-2); display: flex; align-items: center; gap: 8px; }
.row__keys li b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--on-green); }
.row__keys i { display: inline-block; width: 12px; height: 10px; flex: 0 0 auto; }
/* above phone width the list carries only the parts too small to label on the bar */
@media (min-width: 561px) {
  .row__keys.has-items { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 8px; }
  .row__keys.has-items li { border: 0; padding: 0; }
  .row__keys li.is-off { display: none; }
}
@media (max-width: 560px) {
  .row__head { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 10px; }
  .row__tax span { display: block; margin: 0 0 2px; }
  .part__labels { display: none; }
  .row__keys { display: block; }
  .scale { display: none; }
}
.legend { display: none; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 14px; height: 10px; }
.is-free { background: rgba(246, 244, 240, 0.14); box-shadow: inset 0 0 0 1px rgba(246, 244, 240, 0.28); }
.is-taxed { background: var(--on-green); }
.is-charity { background: rgba(246, 244, 240, 0.34); }
.is-outside { background: repeating-linear-gradient(135deg, rgba(246,244,240,0.55) 0 1px, transparent 1px 5px); box-shadow: inset 0 0 0 1px rgba(246, 244, 240, 0.7); }
.tip { position: fixed; z-index: 30; pointer-events: none; background: var(--ink); color: var(--bg); padding: 9px 12px; font-size: 13px; line-height: 1.45; max-width: 280px; font-variant-numeric: tabular-nums; }
.tip strong { font-weight: 500; }

/* priority */
.priority { border-top: 1px solid var(--ink); padding-top: 22px; }
.priority__title { font-family: var(--display); font-size: var(--t-m); font-weight: 400; margin: 0 0 12px; line-height: 1.15; }
.priority__why { font-family: var(--serif); font-size: var(--t-body); line-height: 1.6; color: var(--ink-2); margin: 0 0 20px; max-width: 36em; font-variant-numeric: lining-nums tabular-nums; }
.priority__label { margin: 0 0 8px; }
.priority ul { margin: 0; padding: 0; list-style: none; max-width: 36em; }
.priority li { padding: 7px 0 7px 20px; font-size: var(--t-ui); line-height: 1.55; position: relative; color: var(--ink-2); }
.priority li::before { content: ""; position: absolute; left: 0; top: 17px; width: 8px; height: 1px; background: var(--ink-3); }
.also .priority__title { font-size: 19px; }
.also .priority__label, .also .priority ul { display: none; }
.also .priority__why { margin-bottom: 0; }
.also .priority__why { font-size: 15px; }

.questions { padding-left: 0; margin: 0; font-family: var(--serif); font-size: var(--t-body); line-height: 1.55; list-style: none; counter-reset: q; max-width: 40em; }
.questions li { padding: 12px 0 12px 36px; position: relative; counter-increment: q; border-bottom: 1px solid var(--line); }
.questions li::before { content: counter(q); position: absolute; left: 0; top: 13px; font-family: var(--display); color: var(--ink-3); }
.questions li:last-child { border-bottom: 0; }

/* folds: the workings, open on request */
.folds { border-top: 1px solid var(--ink); }
.fold { border-bottom: 1px solid var(--line); }
.fold__summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 18px 0; font-family: var(--display); font-size: var(--t-m); line-height: 1.15; transition: color 0.4s; }
.fold__summary::-webkit-details-marker { display: none; }
.fold__summary:hover { color: var(--green); }
.fold__body { padding: 4px 0 28px; animation: rise 0.9s var(--ease-out) both; }

/* ledger */
.ledger-wrap { max-width: 900px; }
.ledger { width: 100%; border-collapse: collapse; font-size: var(--t-ui); }
.ledger th, .ledger td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.ledger th { border-bottom-color: var(--ink); padding-bottom: 10px; }
.ledger td.n, .ledger th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; padding-left: 24px; }
.ledger th.n--next { color: var(--green); }
.ledger th.n--diff, .ledger td.d { color: var(--ink-3); }
.ledger tr.is-total td { font-weight: 500; border-bottom-color: var(--ink); }
.ledger tr.is-result td { font-weight: 500; font-size: 15px; border-bottom: 0; }
.ledger td.muted { color: var(--ink-3); }
.ledger td small { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 400; margin-top: 3px; max-width: 34em; }
.ledger td.n.is-accent { font-weight: 600; }
@media (max-width: 600px) {
  .ledger, .ledger thead, .ledger tbody { display: block; }
  .ledger thead tr { display: grid; grid-template-columns: 1fr 1fr 1fr; border-bottom: 1px solid var(--ink); padding: 0 0 8px; }
  .ledger thead th { border: 0; padding: 0; }
  .ledger thead th:first-child { display: none; }
  .ledger tbody tr { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 2px 8px; }
  .ledger tbody td { border: 0; padding: 0; }
  .ledger tbody td:first-child { grid-column: 1 / -1; padding-bottom: 4px; }
  .ledger td.n, .ledger th.n { padding-left: 0; text-align: left; font-size: 13.5px; }
  .ledger td.n:last-child, .ledger th.n:last-child { text-align: right; }
  .ledger tr.is-total td, .ledger tr.is-result td { border: 0; }
  .ledger tr.is-total, .ledger tr.is-result { border-bottom-color: var(--ink); }
}
.plain { list-style: none; padding: 0; margin: 0; max-width: 36em; }
.plain li { padding: 10px 0; font-size: var(--t-ui); line-height: 1.55; color: var(--ink-2); }
.plain li + li { border-top: 1px solid var(--line); }
.plain li strong { color: var(--ink); font-weight: 500; }

/* actions */
.primary-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px clamp(24px, 4vw, 56px); align-items: center; width: 100%; text-align: left; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 24px 0; margin-bottom: 28px; transition: background 0.4s var(--ease); }
.primary-action:hover { background: var(--bg-2); }
.primary-action__title { display: block; font-family: var(--display); font-size: var(--t-m); line-height: 1.2; margin-bottom: 6px; }
.primary-action__desc { display: block; font-size: var(--t-ui); line-height: 1.55; color: var(--ink-2); max-width: 40em; }
.primary-action__cta { display: inline-flex; align-items: center; gap: 14px; background: var(--green); color: var(--on-green); height: 46px; padding: 0 22px; font-size: var(--t-label); letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; white-space: nowrap; transition: background 0.4s var(--ease); }
.primary-action:hover .primary-action__cta { background: var(--green-2); }
@media (max-width: 640px) { .primary-action { grid-template-columns: 1fr; gap: 14px; } }
.secondary-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 24px; }
.secondary-action { text-align: left; display: flex; flex-direction: column; gap: 5px; padding-top: 14px; border-top: 1px solid var(--line-2); transition: border-color 0.4s; }
.secondary-action:hover { border-top-color: var(--ink); }
.secondary-action__title { font-family: var(--display); font-size: 18px; line-height: 1.2; }
.secondary-action__desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 760px) { .secondary-actions { grid-template-columns: 1fr; gap: 10px; } }
.handoff, .briefing { border-top: 1px solid var(--ink); padding-top: 28px; max-width: var(--reading); }
.briefing { margin-top: 8px; }
.handoff__intro, .briefing__intro { color: var(--ink-2); margin: 0 0 24px; max-width: 36em; }
.briefing .fields { margin-bottom: 22px; }
.briefing .field { margin-bottom: 0; }
.briefing__done p { font-family: var(--serif); font-size: var(--t-body); line-height: 1.6; max-width: 36em; color: var(--ink-2); }
.briefing__download { margin-top: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.print-next { display: none; }
.handoff .fields { margin-bottom: 22px; }
.handoff .field { margin-bottom: 0; }
.handoff__done p { font-family: var(--serif); font-size: var(--t-body); line-height: 1.6; max-width: 36em; color: var(--ink-2); }

/* footer: only under the result */
.foot { padding: 26px var(--gutter) 40px; border-top: 1px solid var(--line); }
.foot p { margin: 0 auto; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); max-width: var(--page); }
body:has(.screen--result[hidden]) .foot { display: none; }

/* short laptop screens: the same steps, less air, so Continue stays in view */
@media (max-height: 760px) and (min-width: 901px) {
  .screen--chapter { padding-top: 10px; padding-bottom: 12px; }
  .rail { margin-bottom: 16px; }
  .chapter__aside { top: 16px; }
  .chapter__q { margin-bottom: 14px; font-size: clamp(24px, 2.4vw, 30px); }
  .choices { margin-bottom: 16px; }
  .choice { padding: 9px 4px; }
  .fields { gap: 18px; margin-bottom: 12px; }
  .field__hint { margin-top: 5px; }
  .checks { margin-top: 4px; }
  .check { padding: 7px 0; }
  .chapter__nav { margin-top: 14px; padding-top: 12px; }
}

/* ---------- print: the family briefing, A4, rendered by the briefing function from ?print=1 ---------- */
.print-head { display: none; }
@media print {
  @page { size: A4; }
  html, body { background: #fff; color: var(--ink); font-size: 10.5pt; }
  .masthead, .foot, .no-print, .example-note, .rail, .skip, .tip, .legend, .fold__summary .more__mark, .handoff, .briefing, .block--actions, .hero__stage { display: none !important; }
  .screen { padding: 0; max-width: none; }
  .screen--result { padding-top: 0; }
  .screen.is-entering > * { animation: none !important; opacity: 1 !important; transform: none !important; }
  .print-head { display: flex; justify-content: space-between; border-bottom: 1px solid var(--ink); padding-bottom: 6pt; margin-bottom: 18pt; font-size: 8pt; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
  .print-head p { margin: 0; }
  .result-head { max-width: none; margin: 0 0 16pt; }
  .display--result { font-size: 22pt; line-height: 1.12; max-width: none; margin-bottom: 8pt; }
  .result-head .lead { font-size: 11pt; line-height: 1.5; max-width: none; }
  .part { width: var(--wf) !important; transition: none; }
  .plate, .part__bar, .part__labels, .row__keys i, .is-free, .is-taxed, .is-charity, .is-outside, .btn { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .plate { break-inside: avoid; margin: 0 0 22pt; padding: 16pt 18pt 12pt; }
  .plate__cols { grid-template-columns: 1fr 1fr; gap: 0 28pt; padding-bottom: 10pt; }
  .plate__col + .plate__col { border-left: 1px solid var(--on-green-line); border-top: 0; padding-left: 28pt; padding-top: 0; margin-top: 0; }
  .plate__figure { font-size: 26pt; }
  .plate__sub { font-size: 11pt; }
  .plate__chart { padding: 10pt 0 6pt; }
  .block__head--plate { display: none; }
  .chart { gap: 12pt; }
  .part__labels { height: 30pt; }
  .part__k { font-size: 7.5pt; }
  .part__v { font-size: 10pt; }
  .part__bar { height: 12pt; }
  .row__keys.has-items { font-size: 9pt; }
  .scale { height: 16pt; }
  .scale__tick span { font-size: 7.5pt; }
  .plate__delta { opacity: 1; transform: none; transition: none; grid-template-columns: repeat(3, 1fr); gap: 16pt; padding-top: 10pt; }
  .plate__delta dt { font-size: 8.5pt; }
  .plate__delta dd { font-size: 15pt; }
  .plate__basis { margin-top: 10pt; font-size: 8.5pt; }
  .block { margin-bottom: 20pt; }
  .block--grid { display: block; border-top: 1px solid var(--ink); padding-top: 9pt; }
  .block--grid > .block__title, .fold__summary, .print-next .block__title { display: block; margin: 0 0 10pt; padding: 0; font-family: var(--sans); font-size: 8pt; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); line-height: 1.5; cursor: default; }
  .prose { max-width: none; font-size: 10.5pt; line-height: 1.5; }
  .prose p { margin: 0 0 9pt; }
  .drivers { grid-template-columns: repeat(auto-fit, minmax(120pt, 1fr)); gap: 18pt; padding: 0 0 12pt; margin: 0 0 14pt; }
  .driver__v { font-size: 16pt; }
  .driver__k { font-size: 9pt; }
  .driver { break-inside: avoid; }
  .priority { break-inside: avoid; }
  .priority__title { font-size: 15pt; }
  .priority__why { font-size: 10.5pt; max-width: none; margin-bottom: 12pt; }
  .priority li { font-size: 9.5pt; padding: 5pt 0 5pt 16pt; }
  .priority li::before { top: 12pt; }
  .also-wrap { margin-top: 18pt; padding-top: 12pt; }
  .also .priority__title { font-size: 12pt; }
  .also .priority__why { font-size: 10pt; }
  .questions { max-width: none; font-size: 10.5pt; }
  .questions li { padding: 7pt 0 7pt 24pt; break-inside: avoid; }
  .questions li::before { top: 8pt; }
  .folds { border-top: 0; }
  .fold { border-bottom: 0; border-top: 1px solid var(--ink); padding-top: 9pt; margin-bottom: 20pt; }
  .fold--outside { break-inside: avoid; }
  .block__caption, .ledger thead { break-after: avoid; }
  .block--grid > .block__title, .fold__summary { break-after: avoid; }
  .questions { break-inside: avoid; }
  .fold__body { padding: 0; animation: none; }
  .block__caption { font-size: 9pt; margin-bottom: 12pt; }
  .ledger-wrap { max-width: none; }
  .ledger { font-size: 9pt; }
  .ledger th, .ledger td { padding: 5pt 8pt 5pt 0; }
  .ledger tr { break-inside: avoid; }
  .ledger td small { font-size: 8pt; }
  .ledger tr.is-result td { font-size: 10pt; }
  .block__after { font-size: 8.5pt; margin-top: 12pt; max-width: none; }
  .block--two { display: grid; grid-template-columns: 1fr 1fr; gap: 24pt; }
  .plain { max-width: none; }
  .plain li { font-size: 9.5pt; padding: 6pt 0; break-inside: avoid; }
  .print-next { display: block; border-top: 1px solid var(--ink); padding-top: 9pt; margin-bottom: 16pt; break-inside: avoid; }
  .print-next p { font-family: var(--serif); font-size: 10.5pt; line-height: 1.5; margin: 0 0 8pt; }
  .print-next p.print-next__link { font-family: var(--sans); font-size: 9pt; color: var(--ink-2); }
  .print-next__link a { color: var(--green) !important; text-decoration: underline !important; text-underline-offset: 2pt; }
  .foot { display: block !important; border-top: 1px solid var(--line); padding: 8pt 0 0; margin-top: 6pt; }
  .foot p { font-size: 7.5pt; line-height: 1.5; color: var(--ink-3); max-width: none; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .screen.is-entering > * { animation: none; }
  .hero__img, .callout { animation: none; opacity: 1; }
  .plate__delta { opacity: 1; transform: none; transition: none; }
  .part, .part__labels, .rail i::after { transition: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
