/* Sooner Blog, buyer guides and trust pages (/blog/, /privacy/, /verify/, /404.html).
   A-3800: restyled into the new homepage and /brokers/ language: Inter on white, warm ink,
   a light header, the dark footer, homepage-style cards, and the hand-drawn vocabulary
   (Nanum Pen Script asides, ink doodles, yellow marker gestures). Self-contained on purpose:
   nothing here imports home.css or brokers.css; the few shared rules are copied. */

:root {
  --ink: #23201d;
  --grey: #5e564e;
  --line: #dfdbd8;
  --soft: #f3f2f0;
  --tint: #f9f8f8;
  --white: #ffffff;
  --blue: #3c6fd1;
  --yellow: #e9fe0f;
  --footer-text: #bdb7b1;
  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 20px;
  --shadow-card: 0 16px 40px rgba(35, 32, 29, 0.07);
  --header-h: 72px;
  --gutter: 20px;
  --hand: "Nanum Pen Script", "Bradley Hand", "Segoe Print", cursive;
  /* the marker stroke behind a highlighted phrase, a rough brush rather than a block */
  --marker: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'%3E%3Cpath d='M3 14 C 36 9, 74 16, 108 11 S 170 9, 197 13' stroke='%23E9FE0F' stroke-width='17' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3 L5 8.6 L9.5 3.6' stroke='%2323201D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--white);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-x: clip;
}

img,
svg { display: block; max-width: 100%; }

a { color: var(--ink); }

button { font: inherit; }

::selection { background: var(--yellow); color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--white);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 0;
  height: 2px;
  background: var(--ink);
}

/* ---------- buttons and links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.button:hover { color: var(--white); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(35, 32, 29, 0.2); }
.button:active { transform: none; box-shadow: none; }

.secondary-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color 0.2s;
}
.secondary-action:hover { text-decoration-color: transparent; }

.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }

.eyebrow,
.section-label,
.table-label,
.toc-title {
  margin: 0;
  color: var(--grey);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-meta,
.meta { color: var(--grey); font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }

/* ---------- header (light, as on the homepage and /brokers/) ---------- */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 1240px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.brand img { width: 97px; height: 23px; }

.header-desktop { display: flex; align-items: center; justify-content: flex-end; gap: 34px; min-width: 0; }

.header-nav { display: none; flex: 0 0 auto; align-items: center; gap: 34px; }

.header-link {
  padding: 11px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.header-link:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

.header-desktop > .button { display: none; min-height: 44px; padding: 10px 18px; font-size: 15px; white-space: nowrap; }

.header-menu { position: static; }
.header-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  list-style: none;
  cursor: pointer;
  border-radius: 8px;
}
.header-menu summary::-webkit-details-marker { display: none; }

.menu-icon,
.menu-icon::after {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-icon { position: relative; transform: translateY(-4.5px); }
.menu-icon::after { content: ""; position: absolute; left: 0; top: 9px; }
.header-menu[open] .menu-icon { transform: rotate(45deg); }
.header-menu[open] .menu-icon::after { transform: translateY(-9px) rotate(-90deg); }

.header-menu-panel {
  position: absolute;
  top: var(--header-h);
  right: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 0 var(--gutter) 20px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  animation: menu-pop 0.28s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
.header-menu-panel nav { display: flex; flex-direction: column; }
.header-menu-panel .header-link { padding: 13px 0; border-top: 1px solid var(--soft); font-size: 18px; }
.header-menu-panel .header-link:hover { text-decoration: none; }
.header-menu-panel .button { width: 100%; }

@keyframes menu-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- footer (dark, as on the homepage and /brokers/) ---------- */
.site-footer {
  margin-top: 0;
  background: var(--ink);
  color: var(--white);
}
.site-footer .shell { padding-top: 52px; padding-bottom: 40px; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 20px;
}
.footer-brand { grid-column: 1 / -1; min-width: 0; }
.footer-brand img { width: 93px; height: 22px; }
.footer-brand p { max-width: 20em; margin: 14px 0 0; color: var(--footer-text); font-size: 16px; line-height: 1.45; }
.footer-brand .footer-cta {
  display: inline-block;
  margin-top: 10px;
  padding: 11px 0;
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.footer-brand .footer-cta:hover { text-decoration-color: transparent; }

.footer-group { display: flex; flex-direction: column; min-width: 0; }
.footer-group h2 { margin: 0 0 6px; color: var(--white); font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.footer-group a {
  display: block;
  padding: 11px 0;
  color: var(--footer-text);
  font-size: 15px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.footer-group a:hover { color: var(--white); }
.site-footer a:focus-visible { outline-color: var(--white); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--footer-text);
  font-size: 13px;
  line-height: 1.5;
}

/* mobile action dock: the homepage's sticky bar, edge-attached at the bottom of phones */
.mobile-action-dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
}
.mobile-action-dock .dock-copy { min-width: 0; }
.mobile-action-dock .dock-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.3; }
.mobile-action-dock .dock-sub { margin: 0; color: var(--grey); font-size: 12px; line-height: 1.4; }
.mobile-action-dock .dock-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
}
body.header-menu-open .mobile-action-dock { display: none; }

/* ---------- the hand-drawn vocabulary (reusable) ----------
   .hand            Nanum Pen Script aside, ink only
   .hl              yellow marker stroke behind one key phrase (unwrapped in Markdown)
   .ink-ring        hand-drawn circle around a key figure (svg <use href="#d-ring">)
   .ink-sq          squiggle underline under a key phrase (svg <use href="#d-squiggle">)
   .doodle          any inline ink doodle (arrow, star, tick) drawn from the page's symbols
   .margin-note     handwritten aside in the right margin (desktop), in flow on tablets,
                    hidden on phones; always aria-hidden and data-md-skip
   Every doodle repeats something the text already says; none carries information. */
.hand {
  font-family: var(--hand);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  color: var(--ink);
}

.hl {
  padding: 0 0.12em;
  margin: 0 -0.12em;
  background-image: var(--marker);
  background-repeat: no-repeat;
  background-size: 100% 64%;
  background-position: 0 78%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* The ring is sized from the phrase: an inline box (so the line height never changes) with
   16px of side padding, and an SVG 5.5px taller than the glyph box above and below. The path
   is a loose rounded rectangle whose top and bottom strokes run 1 to 2px inside the SVG edge,
   so the painted stroke stays 3px or more off the figure and inside the gap to the lines
   above and below; its corner radius (about 9px) is smaller than the 13px side clearance. */
.ink-ring { position: relative; display: inline; padding: 0 16px; white-space: nowrap; }
.ink-ring > svg {
  position: absolute;
  left: 0;
  top: -5.5px;
  width: 100%;
  height: calc(100% + 11px);
  overflow: visible;
  pointer-events: none;
  color: var(--ink);
}

/* The squiggle hangs below the glyph box (descenders included) and above the next line. */
.ink-sq { position: relative; display: inline; white-space: nowrap; }
.ink-sq > svg {
  position: absolute;
  left: 0;
  top: calc(100% + 1.5px);
  width: 100%;
  height: 4px;
  overflow: visible;
  pointer-events: none;
  color: var(--ink);
}

.doodle { flex: none; overflow: visible; color: var(--ink); pointer-events: none; }

.margin-note { display: none; }

/* the marker as a value's own background (totals in receipts and worked examples) */
.receipt-total span:last-child,
.formula-row.is-result span:last-child,
.number-callout mark {
  background-color: transparent;
  background-image: var(--marker);
  background-repeat: no-repeat;
  background-size: 100% 62%;
  background-position: 0 80%;
  color: var(--ink);
}

/* hand-drawn number circle (steps, numbered lists, directory cards) */
.hand-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 38px;
  border: 1.6px solid var(--ink);
  border-radius: 52% 48% 56% 44% / 46% 58% 42% 54%;
  transform: rotate(-5deg);
  font-family: var(--hand);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

/* ---------- article hero ---------- */
.article-page main,
.blog-index-page main,
.info-page main { display: block; }
.article-page main { overflow: clip; }

.article-hero { padding: 28px 0 40px; }
.article-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
.article-hero-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--grey);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.breadcrumbs { margin-bottom: -12px; }

.article-hero h1,
.info-hero h1,
.blog-hero h1 {
  margin: 0;
  font-size: clamp(34px, 8.6vw, 56px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.article-standfirst {
  max-width: 34em;
  margin: 0;
  color: var(--grey);
  font-size: 18px;
  line-height: 1.5;
}

.article-meta-row { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--grey); font-size: 14px; font-weight: 500; }
.article-meta-row span + span::before { content: "·"; margin-right: 10px; }

/* hero card: same family as the homepage's cost breakdown and product cards */
.article-hero-visual {
  position: relative;
  min-width: 0;
  padding: 18px;
  border-radius: var(--radius-l);
  background: var(--soft);
}
.hero-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 20px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(35, 32, 29, 0.08);
}
.cover-kicker { margin: 0; color: var(--grey); font-size: 13px; font-weight: 500; }
.hero-card > strong { font-size: 22px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.25; }
.cover-caption { margin: 0; color: var(--grey); font-size: 14px; line-height: 1.45; }

.card-note {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
  margin: 12px 8px 0 0;
}
.card-note .hand { font-size: 26px; transform: rotate(-2deg); }
.card-note .doodle { width: 40px; height: 30px; margin-bottom: 8px; }

/* receipt: the homepage cost breakdown, flattened */
.receipt { display: flex; flex-direction: column; min-width: 0; font-size: 15px; }
.receipt-head,
.receipt-row,
.receipt-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.receipt-head { padding-bottom: 12px; font-weight: 600; font-size: 16px; letter-spacing: -0.03em; }
.receipt-row { padding: 10px 0; border-top: 1px solid var(--line); }
.receipt-row span:first-child { min-width: 0; color: var(--grey); }
.receipt-row span:last-child,
.receipt-head span:last-child { white-space: nowrap; font-weight: 500; }
.receipt-total {
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
  font-weight: 600;
}
.receipt-total span:first-child { min-width: 0; }
.receipt-total span:last-child { padding: 0 0.2em; margin-right: -0.2em; font-size: 20px; letter-spacing: -0.035em; white-space: nowrap; }

/* financing hero: three options */
.cover-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.cover-option span { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; letter-spacing: -0.03em; }
.cover-option small { color: var(--grey); font-size: 13px; text-align: right; }
.cover-option.is-sooner span::before {
  content: "";
  flex: none;
  width: 24px;
  height: 22px;
  border-radius: 46% 54% 58% 42% / 54% 44% 56% 46%;
  background: var(--tick) center / 12px no-repeat, var(--yellow);
  transform: rotate(-7deg);
}

/* buyer's agent hero: who works for whom */
.agent-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.agent-flow span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}
.agent-flow span.is-sooner { border: 1.5px solid var(--ink); }
.agent-flow span.is-sooner::before {
  content: "";
  flex: none;
  width: 24px;
  height: 22px;
  border-radius: 46% 54% 58% 42% / 54% 44% 56% 46%;
  background: var(--tick) center / 12px no-repeat, var(--yellow);
  transform: rotate(-7deg);
}
.agent-flow .doodle { justify-self: center; width: 30px; height: 26px; }

/* template default cover */
.text-cover-inner { display: flex; flex-direction: column; gap: 8px; }
.text-cover-inner span { color: var(--grey); font-size: 13px; font-weight: 500; }
.text-cover-inner strong { font-size: 22px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.25; }

/* ---------- article body ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 72px;
}

.toc { display: none; }

.toc-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-m);
  background: var(--tint);
  border: 1px solid var(--soft);
}
.toc-cta strong { font-size: 17px; font-weight: 600; letter-spacing: -0.03em; }
.toc-cta span { color: var(--grey); font-size: 14px; line-height: 1.45; }
.toc-cta .cta-actions { flex-direction: column; align-items: stretch; gap: 4px; margin-top: 6px; }
.toc-cta .button { width: 100%; font-size: 15px; }
.toc-cta .secondary-action { justify-content: center; font-size: 15px; }

.toc-title { margin: 28px 0 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--soft); }
.toc ol a {
  display: block;
  margin-left: -2px;
  padding: 7px 0 7px 14px;
  border-left: 2px solid transparent;
  color: var(--grey);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}
.toc ol a:hover { color: var(--ink); }
.toc ol a.is-active { border-left-color: var(--blue); color: var(--ink); }

.mobile-reading-tools { margin: 0 0 28px; }
.toc-mobile { border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--white); }
.toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; font-size: 22px; font-weight: 400; line-height: 1; transition: transform 0.3s; }
.toc-mobile[open] summary::after { transform: rotate(45deg); }
.toc-mobile ol { margin: 0; padding: 4px 18px 12px 38px; color: var(--grey); font-size: 15px; }
.toc-mobile li + li { margin-top: 0; }
.toc-mobile a { display: block; padding: 9px 0; color: var(--ink); text-decoration: none; }
.toc-mobile a:hover { text-decoration: underline; text-underline-offset: 5px; }

.prose {
  position: relative;
  min-width: 0;
  max-width: 570px;
  font-size: 17px;
  line-height: 1.6;
}
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose .lead { font-size: 19px; line-height: 1.55; letter-spacing: -0.025em; }
.prose strong { font-weight: 600; }
.prose a:not(.button) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(35, 32, 29, 0.45);
}
.prose a:not(.button):hover { text-decoration-color: var(--blue); }

.prose h2, .prose h3 { scroll-margin-top: 94px; }
.prose h2 {
  margin: 2.1em 0 0.55em;
  font-size: clamp(26px, 6.4vw, 32px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.prose h3 {
  margin: 1.6em 0 0.4em;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.prose > ul,
.prose > ol { margin: 0 0 1.3em; padding: 0; list-style: none; }
.prose > ul > li,
.prose > ol > li { position: relative; }
.prose > ul > li + li,
.prose > ol > li + li { margin-top: 0.55em; }

/* ticks sit on a yellow dab, as on /brokers/ */
.prose > ul > li { padding-left: 38px; }
.prose > ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 24px;
  height: 22px;
  border-radius: 46% 54% 58% 42% / 54% 44% 56% 46%;
  background: var(--tick) center / 12px no-repeat, var(--yellow);
  transform: rotate(-7deg);
}
.prose > ul > li:nth-child(even)::before { border-radius: 58% 42% 46% 54% / 44% 58% 42% 56%; transform: rotate(6deg); }

/* numbered steps get a hand-drawn number circle */
.prose > ol { counter-reset: step; }
.prose > ol > li { padding-left: 48px; counter-increment: step; min-height: 34px; }
.prose > ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 31px;
  border: 1.5px solid var(--ink);
  border-radius: 52% 48% 56% 44% / 46% 58% 42% 54%;
  transform: rotate(-5deg);
  font-family: var(--hand);
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
}
.prose > ol > li:nth-child(even)::before { border-radius: 46% 54% 44% 56% / 56% 44% 58% 42%; transform: rotate(4deg); }

/* margin asides: in flow on tablets, in the right margin on wide screens */
@media (min-width: 700px) {
  .margin-note {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 0.7em 0 0.9em;
  }
  .margin-note .hand { font-size: 26px; transform: rotate(-2deg); transform-origin: right center; }
  .margin-note .doodle { width: 30px; height: 26px; transform: rotate(80deg); }
}

/* worked example card: the homepage cost breakdown */
.formula-card {
  margin: 1.4em 0 1.6em;
  padding: 6px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  box-shadow: var(--shadow-card);
  font-size: 16px;
}
.formula-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.formula-row:first-child { border-top: 0; }
.formula-row span:first-child { min-width: 0; color: var(--grey); }
.formula-row span:last-child { font-weight: 500; text-align: right; }
.formula-row.is-result { border-top: 1px solid var(--ink); font-weight: 600; }
.formula-row.is-result span:first-child { color: var(--ink); }
.formula-row.is-result span:last-child { padding: 0 0.2em; margin-right: -0.2em; font-weight: 600; font-size: 18px; letter-spacing: -0.03em; white-space: nowrap; }
.formula-row:last-child { padding-bottom: 15px; }

/* key number */
.number-callout {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 1.6em 0;
  padding: 22px 22px 20px;
  border-radius: var(--radius-l);
  background: var(--soft);
}
.number-callout strong {
  font-size: clamp(32px, 8vw, 44px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.045em;
}
.number-callout mark { display: inline-block; padding: 0 0.12em; margin-left: -0.12em; }
.number-callout p { margin: 4px 0 0; color: var(--grey); font-size: 16px; line-height: 1.5; }
.callout-note { display: flex; align-items: flex-end; gap: 4px; margin: 2px 0 0; }
.callout-note .hand { font-size: 26px; transform: rotate(-2deg); }
.callout-note .doodle { width: 38px; height: 28px; transform: scaleX(-1) rotate(-10deg); margin-bottom: 10px; }

/* a short takeaway; a hand-drawn star sits in its own gutter */
.article-note {
  position: relative;
  margin: 1.5em 0;
  padding: 18px 20px 18px 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
}
.article-note > .doodle { position: absolute; left: 18px; top: 18px; width: 24px; height: 24px; }
.article-note strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.35; }
.article-note p { margin: 6px 0 0; color: var(--grey); font-size: 16px; line-height: 1.5; }

/* two roles side by side */
.comparison-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 1.4em 0 1.6em; }
.comparison-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
}
.comparison-card.is-highlighted { border: 1.5px solid var(--ink); box-shadow: var(--shadow-card); }
.comparison-card h3 { margin: 8px 0 6px; font-size: 19px; }
.comparison-card p { margin: 0; color: var(--grey); font-size: 15px; line-height: 1.5; }
.comparison-card > .doodle { position: absolute; right: 16px; top: 16px; width: 24px; height: 24px; }

/* tables: homepage card language; phones scroll inside the card, never the page */
.table-wrap {
  max-width: 100%;
  margin: 1.4em 0 1.6em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  overscroll-behavior-x: contain;
}
.data-table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.data-table th {
  padding: 12px 16px;
  background: var(--tint);
  border-bottom: 1px solid var(--line);
  color: var(--grey);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  vertical-align: bottom;
}
.data-table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr:first-child td { border-top: 0; }
.data-table td:first-child { font-weight: 500; }
.data-table.is-numeric th:last-child,
.data-table.is-numeric td:nth-child(3) { text-align: right; white-space: nowrap; }
.data-table.is-numeric td:nth-child(2) { color: var(--grey); }
.data-table .total-row td { border-top: 1px solid var(--ink); font-weight: 600; }
.data-table.is-comparison td:nth-child(2),
.data-table.is-comparison td:nth-child(3) { color: var(--grey); }

.article-cta {
  position: relative;
  margin: 2.4em 0;
  padding: 28px 22px;
  border-radius: var(--radius-l);
  background: var(--soft);
}
.article-cta h2 { margin: 6px 0 8px; font-size: clamp(26px, 6.4vw, 32px); }
.article-cta p { margin: 0 0 18px; color: var(--grey); font-size: 16px; }
.article-cta .cta-actions .button { min-height: 52px; padding: 14px 22px; }

.article-disclaimer {
  margin-top: 2em !important;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--grey);
  font-size: 14px !important;
  line-height: 1.55;
}

.sources { margin-top: 28px; }
.sources h2 { margin: 0 0 10px; font-size: 18px; letter-spacing: -0.03em; }
.source-list { margin: 0; padding-left: 20px; color: var(--grey); font-size: 15px; line-height: 1.5; }
.source-list li + li { margin-top: 8px; }

.related-section { padding: 56px 0 64px; background: var(--tint); border-top: 1px solid var(--soft); }
.related-header { margin-bottom: 22px; }
.related-header h2 { margin: 4px 0 0; font-size: clamp(26px, 6.4vw, 36px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.12; }
.related-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.related-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.related-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(35, 32, 29, 0.1); }
.related-card h3 { margin: 0; font-size: 19px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.3; }

/* ---------- blog index ---------- */
.blog-hero { padding: 28px 0 8px; }
.blog-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: end; }
.blog-hero p { max-width: 30em; margin: 12px 0 0; color: var(--grey); font-size: 18px; line-height: 1.5; }
.blog-hero .hero-aside { display: none; }

.featured-section { padding: 28px 0 8px; }
.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.featured-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; min-width: 0; }
.featured-copy h2 { margin: 8px 0 10px; font-size: clamp(28px, 6.8vw, 40px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.12; text-wrap: balance; }
.featured-copy p { margin: 0; color: var(--grey); font-size: 17px; line-height: 1.5; }
.featured-copy .button { align-self: flex-start; }
.featured-visual {
  display: block;
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background: var(--soft);
  color: var(--ink);
  text-decoration: none;
}
.featured-visual .receipt {
  padding: 18px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(35, 32, 29, 0.08);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.featured-visual:hover .receipt { transform: translateY(-3px); }

.featured-secondary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.featured-secondary-card {
  display: block;
  min-width: 0;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.featured-secondary-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(35, 32, 29, 0.1); }
.featured-secondary-card h3 { margin: 8px 0 6px; font-size: 20px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.28; }
.featured-secondary-card p { margin: 0; color: var(--grey); font-size: 15px; line-height: 1.5; }

.story-section { padding: 56px 0 72px; }
.story-heading { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.story-heading h2 { margin: 0; font-size: clamp(28px, 6.8vw, 40px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.12; }
.story-heading p { max-width: 32em; margin: 0; color: var(--grey); font-size: 17px; line-height: 1.5; }

.topic-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.topic-filter button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.topic-filter button:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.topic-filter button.is-active { background: var(--ink); color: var(--white); box-shadow: inset 0 0 0 1px var(--ink); }

.story-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.story-card { min-width: 0; }
.story-card.is-hidden { display: none; }
.story-card-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.story-card-link:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(35, 32, 29, 0.1); }
.story-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: 46px;
  height: 42px;
  margin-bottom: 6px;
  border: 1.6px solid var(--ink);
  border-radius: 52% 48% 56% 44% / 46% 58% 42% 54%;
  transform: rotate(-5deg);
  font-family: var(--hand);
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}
.story-card:nth-child(even) .story-index { border-radius: 46% 54% 44% 56% / 56% 44% 58% 42%; transform: rotate(4deg); }
.story-card h3 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.28; }
.story-card p { flex: 1 1 auto; margin: 0; color: var(--grey); font-size: 15px; line-height: 1.5; }
.story-read {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 44px;
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
}

/* ---------- trust pages and 404 ---------- */
.info-hero { padding: 36px 0 32px; }
.info-hero .shell { display: flex; flex-direction: column; gap: 14px; }
.info-hero p { max-width: 34em; margin: 0; color: var(--grey); font-size: 18px; line-height: 1.5; }
.info-hero .hero-aside { display: none; }

.info-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter) 72px;
}
.info-content { min-width: 0; max-width: 570px; font-size: 17px; line-height: 1.6; }
.info-content > :first-child { margin-top: 0; }
.info-content p { margin: 0 0 1.1em; }
.info-lead { font-size: 19px; line-height: 1.55; letter-spacing: -0.025em; }
.info-content a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.info-content a:hover { text-decoration-color: var(--blue); }
.info-content h2 {
  margin: 2em 0 0.55em;
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.04em;
  scroll-margin-top: 94px;
}
.info-content h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--grey); letter-spacing: -0.01em; }
.info-content ul,
.info-content ol { margin: 0 0 1.3em; padding: 0; list-style: none; }
.info-content li { position: relative; padding-left: 38px; }
.info-content li + li { margin-top: 0.55em; }
.info-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 24px;
  height: 22px;
  border-radius: 46% 54% 58% 42% / 54% 44% 56% 46%;
  background: var(--tick) center / 12px no-repeat, var(--yellow);
  transform: rotate(-7deg);
}
.info-content li:nth-child(even)::before { border-radius: 58% 42% 46% 54% / 44% 58% 42% 56%; transform: rotate(6deg); }

.answer-card {
  margin: 1.2em 0 1.4em;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
}
.answer-card.is-important { background: var(--tint); }
.answer-card h3 + p { margin-bottom: 14px; }
.answer-card p:last-child { margin-bottom: 0; }
.answer-status { margin: 0 0 8px; color: var(--grey); font-size: 13px; font-weight: 600; }

.updated-note { margin-top: 2em !important; padding-top: 16px; border-top: 1px solid var(--line); color: var(--grey); font-size: 14px; }

.info-rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.info-rail-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
}
.info-rail-card:first-child { background: var(--tint); border-color: var(--soft); }
.info-rail-card h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; letter-spacing: -0.03em; }
.info-rail-card p { margin: 0 0 10px; color: var(--grey); font-size: 14px; line-height: 1.5; }
.info-rail-card .button { align-self: stretch; }
.info-rail-card a:not(.button) {
  display: block;
  padding: 9px 0;
  border-top: 1px solid var(--soft);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.info-rail-card a:not(.button):hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- breakpoints ---------- */
@media (max-width: 699px) {
  .mobile-action-dock { display: grid; }
  body:has(.mobile-action-dock) .site-footer .shell { padding-bottom: 96px; }
  .site-footer .shell { padding-bottom: 96px; }
}

@media (max-width: 999px) {
  .header-menu { display: block; }
  .header-desktop .header-nav { display: none; }
}

@media (min-width: 700px) {
  :root { --gutter: 40px; }
  .header-desktop > .button { display: inline-flex; }
  .header-inner { gap: 20px; }
  .header-desktop { gap: 20px; }
  .footer-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
  .footer-brand { grid-column: auto; }
  .prose { font-size: 18px; }
  .prose .lead { font-size: 20px; }
  .formula-card { padding: 6px 24px; }
  .number-callout { padding: 26px 28px 24px; }
  .article-cta { padding: 36px 36px 32px; }
  .comparison-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .related-grid,
  .featured-secondary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .story-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .featured-card { padding: 28px; }
  .info-content { font-size: 18px; }
  .info-lead { font-size: 20px; }
  .info-hero .hero-aside,
  .blog-hero .hero-aside {
    display: flex;
    align-items: flex-end;
    gap: 6px;
  }
  .hero-aside .hand { font-size: 28px; transform: rotate(-2deg); transform-origin: left center; }
  .hero-aside .doodle { width: 40px; height: 30px; }
  .article-standfirst { font-size: 19px; }
}

@media (min-width: 980px) {
  .article-hero { padding: 40px 0 56px; }
  .article-hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 56px; }
  .article-layout { grid-template-columns: 230px minmax(0, 570px); gap: 56px; }
  .toc { display: block; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; }
  .mobile-reading-tools { display: none; }
  .info-body { grid-template-columns: minmax(0, 570px) minmax(0, 300px); justify-content: space-between; gap: 56px; }
  .info-rail { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
  .featured-card { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 36px; padding: 32px; }
  .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .blog-hero { padding: 48px 0 16px; }
  .blog-hero-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 32px; }
  .info-hero { padding: 56px 0 40px; }
}

@media (min-width: 1000px) {
  .header-menu { display: none; }
  .header-desktop .header-nav { display: flex; }
  .header-desktop { gap: 34px; }
  :root { --gutter: 56px; }
}

/* wide screens: a third column holds the handwritten margin asides */
@media (min-width: 1280px) {
  .article-layout { grid-template-columns: 230px minmax(0, 570px) 220px; column-gap: 48px; justify-content: space-between; }
  .margin-note {
    float: right;
    clear: right;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 210px;
    min-height: 0;
    margin: 0.2em -268px 0.6em 0;
  }
  .margin-note .hand { font-size: 27px; line-height: 1.02; transform: rotate(-2deg); transform-origin: left top; }
  .margin-note .doodle { order: -1; width: 38px; height: 28px; transform: scaleX(-1) rotate(-16deg); }
}

@media (min-width: 1900px) {
  .shell,
  .header-inner,
  .info-body { max-width: 1480px; }
}

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

@media print {
  .site-header,
  .mobile-action-dock,
  .reading-progress,
  .toc,
  .mobile-reading-tools,
  .margin-note { display: none !important; }
  body { padding-top: 0; }
}

/* doodle direction helpers (the arrow symbol points up and to the right) */
.doodle.d-down { transform: rotate(72deg); }
.doodle.d-left { transform: scaleX(-1) rotate(-12deg); }
.doodle.d-up-left { transform: scaleX(-1); }

/* a direct answer gets the same yellow-dab tick as the lists */
.answer-status { display: flex; align-items: center; gap: 10px; }
.answer-status::before {
  content: "";
  flex: none;
  width: 24px;
  height: 22px;
  border-radius: 46% 54% 58% 42% / 54% 44% 56% 46%;
  background: var(--tick) center / 12px no-repeat, var(--yellow);
  transform: rotate(-7deg);
}

/* Trust-page hero aside: beside the intro on desktop, pointing at it from the right; under it
   on tablets, pointing up at it. Never below the intro where the arrow would meet the body. */
@media (min-width: 700px) {
  .info-hero .hero-aside { align-items: center; gap: 8px; margin-top: 6px; }
  .info-hero .hero-aside .doodle { transform: scaleX(-1) rotate(-10deg); }
}
@media (min-width: 980px) {
  .info-hero .shell { display: grid; grid-template-columns: minmax(0, 34em) auto; column-gap: 28px; row-gap: 14px; align-items: center; justify-content: start; }
  .info-hero .shell > :not(p):not(.hero-aside) { grid-column: 1 / -1; }
  .info-hero .hero-aside { margin-top: 0; }
  .info-hero .hero-aside .doodle { transform: scaleX(-1) rotate(28deg); }
}
