
/* Guides 01 to 03 online. Builds on shared.css (the tools' brand tokens, toggles, ticks and money boxes), so the guide and
   the tools look like one product. Sift brand: weights 400 and 600, sentence case, no pure white. */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 30; background: var(--green); color: var(--surface); padding: 8px 16px; border-radius: var(--radius-button); }
.skip-link:focus { top: 8px; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
[hidden]:not([hidden="until-found"]) { display: none !important; }
/* shared.css hides every [hidden] with !important; let the folded tax section use the browser's until-found instead,
   so find-in-page and links to its text open it. Browsers without until-found still hide it. */
.sec-body[hidden="until-found"], .fold-body[hidden="until-found"] { display: revert !important; }
/* Without script: hide the controls that need it (and the promise that answers save). */
.no-js .js-only, .no-js .topbar { display: none !important; }
html:not(.no-js) .no-js-only { display: none !important; }

/* Reading progress: a thin bar at the very top (goal-gradient: people speed up as the end comes into view). */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 26; }
.progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width .15s linear; }
@media (prefers-reduced-motion: reduce) { .progress span { transition: none; } }

/* ─── Header ─── */
.guide-head { margin-bottom: 32px; }
/* The logo row spans the page, so "Sign in" sits top right; everything else keeps a readable width. */
.guide-head > :not(.head-top) { max-width: 720px; }
.kicker { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.guide-head .lead { font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.meta { margin: 0 0 24px; font-size: var(--fs-small); color: var(--muted); }
/* The small Sources link at the start gets a taller tap area without changing the line (v17). */
.sources-link { padding: 4px 0; }
.notice { margin: 0 0 24px; padding: 12px 16px; background: var(--tint); border-left: 3px solid var(--green); border-radius: 0 var(--radius-button) var(--radius-button) 0; font-weight: 600; }
.logo-link { display: inline-block; }
.head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.head-top .logo { margin-bottom: 24px; }
.head-top .link-button { min-height: 44px; padding: 0; font-weight: 600; }
/* The bite-size lines: what it takes, then that it saves */
.bite { margin: 0 0 6px; }
.bite + .meta, .bite + .notice { margin-top: 16px; }
/* Times, quieter than the labels they sit beside */
.sec-time, .stage-time, .contents-total { color: var(--muted); font-weight: 400; letter-spacing: 0; text-transform: none; }
.sec-time { font-size: 13px; }
.contents-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; margin-bottom: 4px; }
.contents-head .overview-h { margin: 0; }
.contents-total { font-size: var(--fs-small); }
/* Next: the step to the following section, at the end of each one */
.next-link { margin: 20px 0 0 !important; text-align: right; max-width: none !important; }
.next-link a { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0 6px; min-height: 44px; text-decoration: none; }
.next-link a:hover .next-title { text-decoration: underline; }
.next-link .next-time { color: var(--muted); font-size: var(--fs-small); }
.tailor { margin: 0 0 24px; }
.tailor legend { font-size: var(--fs-body); }
.head-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; text-align: center; border: 1px solid var(--green); border-radius: var(--radius-button); background: var(--green); color: var(--surface); font: 600 var(--fs-body) Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.button:hover { text-decoration: none; filter: brightness(1.08); }
.button.secondary { background: var(--surface); color: var(--green); }
.link-button { background: none; border: 0; padding: 0; min-height: 44px; color: var(--green); font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }

/* ─── Layout: contents alongside on desktop, one tap away on phones ─── */
.guide-layout { display: block; }
.guide-main { min-width: 0; }
@media (min-width: 1024px) {
  .guide-layout { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 32px; align-items: start; }
  .toc-list a { min-height: 36px; }
  /* Only the list scrolls, so "Contents", the progress line and "Save my plan" never scroll out of sight. */
  /* Short enough that it still fits at the very bottom of the page, where it can't stick any lower. */
  .toc { position: sticky; top: 24px; max-height: calc(100vh - 112px); display: flex; flex-direction: column; }
  .toc-lists { flex: 1 1 auto; min-height: 0; overflow-y: auto; mask-image: linear-gradient(to bottom, transparent 0, black 12px, black calc(100% - 16px), transparent 100%); }
  .toc-close, .topbar, .overview { display: none !important; }
}
.guide-main { max-width: 760px; }

/* ─── Contents ─── */
.toc-head { display: flex; align-items: center; justify-content: space-between; }
.toc-label { margin: 0; font-weight: 600; }
.toc-progress { margin: 4px 0 4px; font-size: var(--fs-small); color: var(--muted); }
/* Stages (chunking): a small label over each group of sections. */
.toc-stage-name { margin: 16px 0 4px 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list a { display: grid; grid-template-columns: 20px 1fr 20px; gap: 8px; align-items: center; min-height: 40px; padding: 6px 8px; border-radius: var(--radius-button); color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.3; }
.toc-list a:hover { background: var(--tint); }
/* Three states that differ by more than colour: here (tint and bold), read (a filled tick), not yet (an empty ring). */
.toc-list a[aria-current="true"] { background: var(--tint); color: var(--green); font-weight: 600; }
.toc-num { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.toc-tick { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted); }
.toc-list li.read .toc-tick { box-shadow: none; }
.toc-list li.read .toc-tick { background: var(--green) url("/assets/a1f54591bd5dcce6.svg") center/12px no-repeat; }
.saved { margin: 12px 0 0; font-size: 13px; color: var(--muted); min-height: 1.4em; }

@media (max-width: 1023px) {
  /* Phones and tablets: a slim bar at the top; the contents open from it as a full-screen sheet. */
  .toc { display: none; }
  .toc.open { display: block; position: fixed; inset: 0; z-index: 40; background: var(--surface); padding: 16px 16px 32px; overflow-y: auto; }
  .toc-close { min-width: 44px; min-height: 44px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--ink); cursor: pointer; }
  /* The sheet opens at the current section, so its heading and close button stay pinned at the top. */
  .toc.open .toc-head { position: sticky; top: -16px; z-index: 1; margin: -16px -16px 0; padding: 8px 8px 0 16px; background: var(--surface); }
  .toc-list a { min-height: 48px; font-size: 16px; }
  .js body { padding-top: 52px; }
  /* Without script the contents sit in the page instead of in a sheet. */
  .no-js .toc { display: block; margin: 0 0 24px; }
  .no-js .overview { display: none; }
  /* WCAG 2.4.11: jumps and focus land below the bar, never under it. */
  html { scroll-padding-top: 60px; }
}
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 25; display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-where { flex: 1; min-width: 0; font-size: var(--fs-small); font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar-saved { flex: none; font-size: 13px; color: var(--muted); }
.topbar .link-button { flex: none; font-weight: 600; min-height: 44px; padding: 0; }

/* Phones: the stages near the top, so the shape of the guide is clear before anyone scrolls. */
.overview { margin: 28px 0 0; padding: 16px 16px 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.overview-h { font-size: var(--fs-body); margin: 0 0 4px; }
.overview-list { list-style: none; margin: 0; padding: 0; }
.overview-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 12px; min-height: 44px; border-bottom: 1px solid var(--border); }
.overview-list a { font-weight: 600; padding: 10px 0; }
.overview-list span { font-size: var(--fs-small); color: var(--muted); }

/* ─── Sections ─── */
.g-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px 16px; margin: 0 0 24px; scroll-margin-top: 16px; }
@media (min-width: 560px) { .g-section { padding: 32px; } }
.g-section h2 { display: flex; gap: 12px; align-items: baseline; font-size: clamp(22px, 5vw, 26px); line-height: 1.25; margin: 0 0 12px; }
.sec-num { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--green); font-size: 14px; font-weight: 600; transform: translateY(-3px); }
.sec-body > * { max-width: 68ch; }
.sec-body p { margin: 0 0 12px; }
.g-section .lead { font-size: 17px; margin-bottom: 20px; }
.save-note { font-size: var(--fs-small); color: var(--muted); }
.tax-skip { padding: 12px 16px; background: var(--tint); border-radius: var(--radius-button); }
.block { margin: 24px 0 0; scroll-margin-top: 16px; }
.block h3, .g-section h3 { font-size: 18px; color: var(--green); margin: 0 0 8px; }
.sec-body ul, .sec-body ol { margin: 0 0 12px; padding-left: 22px; }
.sec-body li { margin: 0 0 8px; }
.sec-body li::marker { color: var(--green); }
.source { font-size: 13px; color: var(--muted); margin: 16px 0 0; }
.tailor-note { margin: 0 0 12px; padding: 12px 16px; background: var(--tint); border-radius: var(--radius-button); }

/* Jargon: a dotted underline you can tap; the meaning opens just below it, pushing the text down. */
button.term { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline dotted 1.5px var(--green); text-underline-offset: 4px; cursor: pointer; }
button.term[aria-expanded="true"] { color: var(--green); text-decoration-style: solid; }
.tip { display: block; margin: 8px 0; padding: 12px 16px; background: var(--tint); border-left: 3px solid var(--green); border-radius: 0 var(--radius-button) var(--radius-button) 0; font-size: 15px; }
.tip strong { display: block; color: var(--green); }

/* Inputs inside the guide */
.criteria { display: grid; gap: 16px 24px; margin: 16px 0 20px; max-width: none !important; }
@media (min-width: 640px) { .criteria { grid-template-columns: 1fr 1fr; } }
.criteria .field, .next-fields .field { margin: 0; }
.text-input { width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid var(--green); border-radius: var(--radius-button); background: var(--surface); color: var(--ink); font: 400 var(--fs-body) Inter, system-ui, sans-serif; }
.text-input:focus { outline: 2px solid var(--green); outline-offset: 2px; }
textarea.text-input { resize: vertical; }
.field .hint { margin: 0 0 8px; }
.field .label { margin-bottom: 2px; }
.money { max-width: 280px; }
.text-input[aria-invalid="true"], .money:has(input[aria-invalid="true"]) { border-width: 2px; border-color: var(--ink); }
.print-value, .read-mark { display: none; }
.read-mark { display: block; height: 1px; }

/* The search questions, laid out like the Sift app's search page: rows with a thin line between them, the label on
   the left and a Must-have switch (the app's "Dealbreaker") or a compact control on the right. */
.criteria.search { display: block !important; max-width: 640px !important; }
.criteria.search > .q { padding: 20px 0; border-top: 1px solid var(--border); }
.criteria.search > .q:first-child { padding-top: 4px; border-top: 0; }
.q { position: relative; min-width: 0; margin: 0; }
.q > .label { margin-bottom: 4px; }
.q > .hint { margin: 0 0 10px; }
.q-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.q-head .label { margin: 0; }
.q.inline .q-head { margin-bottom: 0; }

/* Must-have: a small switch */
.must-switch { position: relative; display: inline-flex; align-items: center; min-height: 32px; font-size: var(--fs-small); color: var(--muted); cursor: pointer; }
.must-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.must-switch span { position: relative; padding-left: 46px; }
.must-switch span::before { content: ""; position: absolute; left: 0; top: 50%; width: 36px; height: 20px; margin-top: -10px; border-radius: 999px; background: var(--guide-switch-track); transition: background .15s; }
.must-switch span::after { content: ""; position: absolute; left: 2px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px var(--shadow-ink-25); transition: transform .15s; }
.must-switch input:checked + span { color: var(--green); font-weight: 600; }
.must-switch input:checked + span::before { background: var(--green); }
.must-switch input:checked + span::after { transform: translateX(16px); }
.must-switch input:focus-visible + span::before { outline: 2px solid var(--green); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .must-switch span::before, .must-switch span::after { transition: none; } }

/* Chips: a quiet outline; a chosen chip fills a light tint with a green edge, as in the app (not solid green) */
.chips { gap: 8px; }
.chips span { min-width: 0; min-height: 44px; padding: 0 14px; border-color: var(--guide-chip-border); font-size: 15px; }
.chips label:hover span { border-color: var(--green); }
.toggle.chips input:checked + span { background: var(--tint); color: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); font-weight: 600; }
.chips.small span { min-width: 48px; padding: 0 12px; }
/* Yes-or-no questions: one joined control beside the label */
.chips.segmented { gap: 0; }
.chips.segmented label + label span { margin-left: -1px; }
.chips.segmented label:first-child span { border-radius: var(--radius-button) 0 0 var(--radius-button); }
.chips.segmented label:last-child span { border-radius: 0 var(--radius-button) var(--radius-button) 0; }
.chips.segmented label:not(:first-child):not(:last-child) span { border-radius: 0; }
.chips.segmented input:checked + span { position: relative; z-index: 1; }
.chips.segmented span { min-height: 40px; padding: 0 12px; font-size: var(--fs-small); }
/* Phones: the joined control takes the full width in equal thirds, so it never breaks onto two lines */
@media (max-width: 559px) {
  .q.inline .q-head .chips.segmented { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .chips.segmented label, .chips.segmented span { width: 100%; }
  .chips.segmented span { min-height: 44px; padding: 4px 6px; line-height: 1.2; text-align: center; }
}
.q-head + .hint { margin-top: -4px; }
/* Bedrooms: "From" and "To" above a tidy row of six that fits a phone without wrapping. */
.beds-row { margin-top: 10px; }
.beds-label { display: block; margin-bottom: 4px; font-size: var(--fs-small); color: var(--muted); }
.chips.beds { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 6px; max-width: 420px; }
.chips.beds label, .chips.beds span { width: 100%; }
.chips.beds span { min-width: 0; padding: 0 4px; }
.price-row { display: flex; align-items: flex-end; gap: 12px; }
.price-row .field { flex: 1 1 0; margin: 0; }
.price-row .label { font-weight: 400; font-size: var(--fs-small); color: var(--muted); margin-bottom: 4px; }
.price-row .money { max-width: none; }
/* Amounts typed into the guide read like any other answer: regular weight, body size (the tools' big bold amounts
   suit a result, not a form). */
.guide-main .money input { font: 400 var(--fs-body) Inter, system-ui, sans-serif; }
.price-to { padding-bottom: 12px; color: var(--muted); }

/* Back to where you were: a small pill, bottom right (bottom centre on phones), with its own close button */
.back-chip { position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: stretch; border-radius: 999px; background: var(--ink); box-shadow: 0 8px 24px var(--shadow-ink-25); }
.back-chip[hidden] { display: none; }
.back-chip button { border: 0; background: none; color: var(--surface); font: 600 15px Inter, system-ui, sans-serif; cursor: pointer; }
.back-go { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px 0 20px; border-radius: 999px 0 0 999px; }
.back-dismiss { min-width: 44px; padding: 0 16px 0 12px !important; border-left: 1px solid var(--surface-on-ink-divider) !important; border-radius: 0 999px 999px 0; font-size: 20px !important; font-weight: 400 !important; }
.back-chip button:hover { background: var(--surface-on-ink-hover); }
.back-chip button:focus-visible { outline: 2px solid var(--surface); outline-offset: -4px; }
@media (max-width: 1023px) { .back-chip { right: auto; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); white-space: nowrap; } }
#main:focus { outline: none; }

/* What this means for you: a quiet card on a warm grey (a background, not a border), right after the box it's about.
   The label carries a symbol as well as words, so the status never relies on colour: i, ✓ or !. No red anywhere. */
.plan-note { margin: 16px 0 0; max-width: none !important; }
.note-card { padding: 16px 20px; background: var(--bg); border-radius: var(--radius-card); }
/* v37: the check a "Worth checking" link goes to is outlined, so it's clear which one it means. */
.note-card:focus { outline: 2px solid var(--green); outline-offset: 2px; }
.note-card p { margin: 0 0 8px; }
.note-card p:last-child { margin-bottom: 0; }
.note-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.note-label::before { content: "i"; flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--tint); color: var(--green); font-size: 12px; letter-spacing: 0; text-transform: none; }
.note-card[data-status="ok"] .note-label::before { content: "✓"; background: var(--green); color: var(--surface); }
.note-card[data-status="check"] .note-label { color: var(--ink); }
.note-card[data-status="check"] .note-label::before { content: "!"; background: var(--ink); color: var(--surface); }
.note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 12px !important; }
.note-use { min-height: 40px; padding: 0 16px; font-size: var(--fs-small); }
.note-source { font-size: 13px; color: var(--muted); }
/* The figures: numbers right-aligned in tabular figures, each price as its row's heading */
.note-figures { width: 100%; max-width: 520px; margin: 4px 0 12px; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.note-figures th, .note-figures td { padding: 8px 0 8px 12px; border-bottom: 1px solid var(--border); text-align: right; vertical-align: bottom; }
.note-figures thead th { padding-top: 0; border-bottom-color: var(--guide-chip-border); color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.3; }
.note-figures th:first-child { padding-left: 0; text-align: left; }
.note-figures tbody th { color: var(--ink); font-weight: 600; }
@media (max-width: 479px) { .note-figures { font-size: 14px; } .note-figures thead th { font-size: 12px; } }
/* v24: on the narrowest phones (320px, WCAG 1.4.10 reflow) the four-column borrowing table fits without scrolling the page. */
@media (max-width: 359px) { .note-figures { font-size: 13px; } .note-figures thead th { font-size: 11px; } .note-figures th, .note-figures td { padding-left: 4px; } .note-figures th:first-child { padding-left: 0; } }
/* v18: two-column tables only as wide as they need to be, so each figure sits beside its price. */
.note-figures.narrow { max-width: 320px; }
/* v19: section 4's one panel. The worked-out tax is laid out like the moving costs in section 3 (the price small, the
   tax large), then the "First-time buyer" switch (v18: the Must-have switch at body size, as it's the panel's one
   control) with its rule, then why the tax jumps, if it does. */
.tax-panel { scroll-margin-top: 16px; }
/* v21: the figures sit side by side when they fit and wrap when they don't (section 5's are longer). */
.tax-ends { display: flex; flex-wrap: wrap; gap: 8px 48px; margin: 4px 0 12px; }
.tax-ends dt { font-size: var(--fs-small); color: var(--muted); }
.tax-ends dd { margin: 0; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ftb { margin: 0 0 12px; }
.ftb-switch { min-height: 40px; font-size: var(--fs-body); }
.ftb .hint { margin: 0; }
.tax-why { margin: 0 0 8px; }
/* v20: "Try another price": a money box with its answer beside it, at the size of the figures above. */
.tax-try { margin: 0 0 16px; }
.tax-try .label { display: block; margin-bottom: 6px; }
.tax-try-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.tax-try .money { width: 220px; max-width: 100%; }
.tax-try-row .field-error { flex-basis: 100%; margin: 0; }
.tax-try-result { margin: 0 !important; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 479px) { .tax-try-row { gap: 8px 16px; } .tax-try .money { width: 160px; } }
/* v22: section 5's boxes sit in the steps they answer (Tim: "just a box"); the results are a small tinted card.
   v23, from a design audit (Tim: "it could look a bit nicer"):
   - each box is 8px under its own step and 24px from the next, so it reads as part of its step (Refactoring UI: more
     space around a group than within it; the guide's 4, 8, 16, 24 scale);
   - every box and the results share the list's left edge, so the sums read as one column (Gestalt continuity);
   - boxes are sized to a monthly figure, not the line (GOV.UK; The UI/UX Playbook: size inputs to the answer);
   - each has its unit beside it ("a month"), which screen readers also get from the label (GOV.UK text input);
   - a figure worked out for you is tinted and says so (Gestalt similarity: different styling marks a different kind);
   - "Use …" beside a box is the same button everywhere it fills one. */
.sec-body li.step { margin-bottom: 24px; }
.step-box { margin: 8px 0 0; }
.step-box.aligned, .budget-results.aligned { margin-left: 22px; }
.box-label { display: block; margin: 0 0 8px; font-weight: 600; }
.box-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.step-box .money { flex: 0 0 auto; width: 180px; max-width: 100%; }
.money-unit { color: var(--muted); font-size: var(--fs-small); }
.money.auto { background: var(--tint); }
.fill-button { min-height: 44px; }
.box-row .budget-offer { margin: 0 !important; }
.pay-open { margin: 6px 0 0 !important; font-size: var(--fs-small); }
.pay-open .link-button { min-height: 32px; text-align: left; }
.pay-helper { max-width: 440px; margin: 8px 0 0; padding: 16px; background: var(--bg); border-radius: var(--radius-button); }
.pay-period { margin: 0 0 12px; padding: 0; border: 0; }
.pay-period legend { margin: 0 0 8px; padding: 0; }
.pay-period .chips.segmented label, .pay-period .chips.segmented span { width: auto; }
.pay-helper .field { margin: 0 0 12px; }
.pay-helper .hint { margin: 8px 0 0; }
.pay-estimate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 !important; font-weight: 600; }
.budget-offer { margin: 6px 0 0 !important; font-size: var(--fs-small); }
.budget-offer .link-button { min-height: 32px; margin-left: 2px; }
.step-box [data-running-typical] { margin: 8px 0 0; }
.budget-results { margin: 16px 0 0; padding: 16px 20px; background: var(--tint); border-radius: var(--radius-card); }
.budget-results .tax-ends { margin: 0 0 8px; }
.budget-results p { margin: 0 0 6px; }
.budget-results p:last-child { margin-bottom: 0; }
/* v39: "Use £… as your top price" on its own line under section 5's sentence about the range. On a phone it keeps to
   one line where it can, and wraps evenly where it can't (never "price" on its own). */
.budget-results .top-price-button { display: flex; width: fit-content; margin-top: 12px; }
.top-price-button { text-wrap: balance; }
@media (max-width: 480px) { .top-price-button { padding-left: 12px; padding-right: 12px; } }
/* v24: the working under each worked-out figure, quiet next to the figure it explains (Refactoring UI: labels and
   supporting text quiet, values prominent). */
.tax-ends dd.working { margin: 2px 0 0; font-size: var(--fs-small); font-weight: 400; color: var(--muted); }
.step-box .working { margin: 6px 0 0; }
/* Two figures side by side when there's room, their working wrapping beneath each; one column on phones, with the
   figures sized to stay on one line. */
.budget-results .tax-ends { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 32px; }
.budget-results .tax-ends dd:not(.working) { font-size: clamp(18px, 5.4vw, 24px); white-space: nowrap; }
@media (max-width: 359px) { .budget-results .tax-ends dd:not(.working) { white-space: normal; } }
@media (max-width: 479px) { .step-box .money { width: 160px; } }
/* v25: section 6. "Your figures to take" is a quiet box of label and value rows on the list's edge; the next step's
   boxes sit two to a row on wider screens, "Fixed for" as one row of four; its results card stands out against the
   tinted panel. */
.own-figures { max-width: 440px; margin: 12px 0 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-button); }
.own-figures.aligned { margin-left: 22px; }
.own-figures .next-label { margin: 0 0 4px !important; }
.own-figures-list { margin: 0; }
.own-figures-list > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.own-figures-list > div:last-child { border-bottom: 0; }
.own-figures-list dt { color: var(--muted); }
.own-figures-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.quote-grid { display: grid; gap: 16px 24px; margin-top: 12px; }
@media (min-width: 640px) { .quote-grid { grid-template-columns: 1fr 1fr; } }
.quote-grid .field { margin: 0; }
.quote-grid .label { display: block; margin: 0 0 6px; }
.quote-grid .money { width: 200px; max-width: 100%; }
.quote-grid .money.short { width: 120px; }
.quote-grid .deal-chips { display: grid; grid-template-columns: repeat(4, 52px); }
.quote-grid .deal-chips label, .quote-grid .deal-chips > label > span { width: 100%; }
.quote-grid .deal-chips span { justify-content: center; padding: 0 8px; }
.quote-panel { scroll-margin-top: 16px; }
.quote-panel .budget-results { margin-top: 16px; background: var(--surface); }
/* v26: section 7. The tool's three questions as rows with a thin line between them, as in section 1's search, then
   the list they shape, a line above it; where to get each document sits under it, lined up with its words. */
.docs-questions > .q { padding: 14px 0; border-top: 1px solid var(--border); }
.docs-questions > .q:first-child { padding-top: 4px; border-top: 0; }
.docs-questions .chips.yes-no span { min-width: 72px; }
.docs-questions + .checklist { margin-top: 14px; padding-top: 4px !important; border-top: 1px solid var(--border); }
.checklist .check-how { margin: -8px 0 8px 36px; }
/* v31: section 9's Lifetime ISA, laid out like section 6's panel: a yes-or-no, two boxes, then the results card. The
   month and year look like the guide's boxes. */
.lisa-panel { scroll-margin-top: 16px; }
.lisa-have .label { display: block; margin: 0 0 8px; }
.lisa-panel .chips.yes-no span { min-width: 72px; }
.lisa-panel .field .hint { margin: 0 0 8px; }
/* The two boxes line up at the bottom of their cells, whichever hint wraps. */
.lisa-panel .quote-grid .field { display: flex; flex-direction: column; }
.lisa-panel .quote-grid .field > .box-row, .lisa-panel .quote-grid .field > .lisa-dates { margin-top: auto; }
.lisa-dates { display: flex; flex-wrap: wrap; gap: 8px; }
.lisa-dates select { min-height: 48px; padding: 0 12px; border: 1px solid var(--green); border-radius: var(--radius-button); background: var(--surface); color: var(--ink); font: inherit; }
.lisa-dates select:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.lisa-panel .lisa-line { margin: 14px 0 0; }
.lisa-panel .budget-results { margin-top: 16px; background: var(--surface); }
.plan-checks { display: grid; gap: 12px; }
.plan-check:focus { outline: none; }
.plan-check { margin-bottom: 20px; }
.plan-check-empty { color: var(--muted); }

/* Your next step: the same tinted panel at the end of every section, as in the PDF (Tondreau: one place to look). */
.next-step { margin: 28px 0 0; padding: 20px; background: var(--tint); border-radius: var(--radius-card); max-width: none !important; }
@media (min-width: 560px) { .next-step { padding: 20px 24px; } }
.next-label { margin: 0 0 6px !important; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.next-step p:last-child { margin-bottom: 0; }
/* Section 3's "Use typical figures", under its box */
.use-typical { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 16px 0 0 !important; }
.use-typical .button { min-height: 44px; }
.use-typical .hint { margin: 0; }
.next-fields { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 640px) { .next-fields { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }

/* Costs */
.cost-grid { display: grid; gap: 12px; margin: 4px 0 0; max-width: none !important; }
@media (min-width: 640px) { .cost-grid { grid-template-columns: 1fr 1fr; } .cost.wide { grid-column: 1 / -1; } }
.cost { padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-card); }
.cost h3 { color: var(--ink); font-size: var(--fs-body); margin: 0; }
.cost-price { margin: 4px 0 8px !important; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cost p:last-of-type { margin: 0; color: var(--muted); font-size: 15px; }
.moving { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 8px; }
.moving dt { font-size: var(--fs-small); color: var(--muted); }
.moving dd { margin: 0; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 8px 0 0; max-width: none !important; }
/* Phones: each row stacks, the word above what it means, so nothing scrolls sideways. */
@media (max-width: 559px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  table.stack th, table.stack td { display: block; padding: 0; border: 0; }
  table.stack tbody th { margin-bottom: 2px; }
}
table { width: 100%; border-collapse: collapse; font-size: 15px; }
caption { text-align: left; font-weight: 600; margin-bottom: 8px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); }
thead th { color: var(--green); border-bottom: 1px solid var(--green); font-size: var(--fs-small); }
tbody th { font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; }
.tax-pair { display: grid; gap: 24px; margin: 8px 0 0; max-width: none !important; }
@media (min-width: 720px) { .tax-pair { grid-template-columns: 1fr 1fr; } }
.tax-col h3 { margin-bottom: 4px; }
.rates td { font-size: 15px; }

/* Checklists: real tick boxes that remember (shared.css .check), with a 44px row to tap and a count */
.checklist { list-style: none; padding: 0 !important; margin-bottom: 4px !important; }
.check-count { min-height: 1.5em; font-size: var(--fs-small); font-weight: 600; color: var(--green); }
.checklist li { margin: 0; }
.checklist .check { min-height: 44px; padding: 10px 0; }
/* v2 (Claude's browser check): the words are one block, so a link inside a line flows with it (as a flex row, the
   link and the words either side became columns). The box sits in the gap on the left. */
.checklist .check > span { display: block; position: relative; padding-left: 36px; }
.checklist .check > span::before { position: absolute; left: 0; top: 0; margin-right: 0; }

/* Our free tools */
.tool-list { list-style: none; padding: 0 !important; display: grid; gap: 12px; max-width: none !important; }
@media (min-width: 640px) { .tool-list { grid-template-columns: 1fr 1fr; } }
.tool-card { display: block; height: 100%; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-card); color: var(--ink); text-decoration: none; }
.tool-card:hover { border-color: var(--green); }
.tool-card strong { display: block; color: var(--green); margin-bottom: 4px; }
.tool-card span:not(.visually-hidden) { color: var(--muted); font-size: 15px; }

/* Your buying plan: the answers in one place, each with a way back to change it (GOV.UK "check your answers") */
.plan { margin: 0; }
.plan-row { display: grid; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
@media (min-width: 560px) { .plan-row { grid-template-columns: 44% 1fr; } }
.plan dt { font-weight: 600; }
.plan dd { margin: 0; overflow-wrap: anywhere; }
.plan-value.empty { color: var(--muted); }
.plan-change { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0 -10px 4px; padding: 0 4px; font-size: var(--fs-small); }
/* v40: under the price range, what's worth checking, with the same "!" as the card it links to. */
.plan-flag { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: var(--fs-small); font-weight: 600; }
.plan-flag[hidden] { display: none; }
.plan-flag::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 700; }
.plan-row.total { background: var(--tint); border-radius: var(--radius-button); padding: 14px 16px; border: 0; margin-top: 8px; }
.plan-row.total [data-total] { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-sum { display: block; font-size: var(--fs-small); color: var(--muted); }
.plan-row.wide { grid-template-columns: 1fr; }
.plan-row.wide .field { margin: 0; }
.plan-status { font-weight: 600; }
/* v36: the line under "Your money", and the total's working on a line of its own above anything still to add. */
.plan-intro { margin: -4px 0 4px; color: var(--muted); }
.plan-sum-line { display: block; }

/* Save my plan (and Sign in): one quiet card wherever it appears. Refactoring UI, via both knowledge bases: fewer
   borders (a tint groups it instead), emphasis by de-emphasis (one accent: the button), only as wide as the content
   needs (600px), and more space around the group than within it. Microcopy: the title says what they get. */
.save-card { max-width: 600px; padding: 16px; background: var(--tint); border-radius: var(--radius-card); }
@media (min-width: 560px) { .save-card { padding: 20px 24px; } }
.save-title { margin: 0 0 14px; }
.save-heading { margin: 0 0 2px !important; color: var(--ink) !important; font-size: var(--fs-body) !important; }
.save-label { display: block; margin: 0 0 6px; font-size: var(--fs-small); font-weight: 600; }
.save-row { display: flex; flex-wrap: wrap; gap: 8px; }
.save-row .text-input { flex: 1 1 240px; width: auto; min-width: 0; }
.save-row .button { flex: 0 0 auto; }
@media (max-width: 479px) { .save-row .button { flex: 1 1 100%; } }
.save-extra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; margin-top: 6px; }
.save-extra .check { margin: 0; min-height: 40px; align-items: center; }
.save-extra .check span { display: flex; align-items: center; font-size: var(--fs-small); }
.save-extra .check span::before { width: 20px; height: 20px; margin-right: 10px; }
.save-extra .check input { top: 50%; width: 20px; height: 20px; transform: translateY(-50%); }
.save-extra .check input:checked + span::before { background-size: 16px; }
.save-small { font-size: 13px; color: var(--muted); }
/* WCAG 2.5.8: the small links still get a 24px-tall target. */
.save-small a { display: inline-block; padding: 3px 0; }
.save-small .not-now { min-height: 40px; margin-left: 12px; font-size: var(--fs-small); color: var(--ink); }
.save-sent p { margin: 0; }
.save-sent .preview-note { margin-top: 6px; }
.save-sent .save-again { min-height: 40px; margin-top: 4px; font-size: var(--fs-small); }

/* v28: the break card at the end of a stage. Quieter than "Your next step" (a thin line, no tint), so that stays the
   one panel to act on; the days look like the guide's chips, and its email box is the save form's. */
.break-card { max-width: 600px; margin: 20px 0 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-card); }
@media (min-width: 560px) { .break-card { padding: 16px 20px; } }
.break-title { margin: 0 0 12px; }
.break-label { margin: 0 0 8px; font-size: var(--fs-small); font-weight: 600; }
.break-days { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip-button { min-height: 44px; padding: 0 14px; border: 1px solid var(--guide-chip-border); border-radius: var(--radius-button); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.chip-button:hover { border-color: var(--green); }
.chip-button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.break-no { min-height: 44px; margin-left: 4px; font-size: var(--fs-small); color: var(--ink); }
.break-done { margin: 0; }
.sent-to { font-weight: 600; overflow-wrap: anywhere; }
.save-top { margin: 20px 0 28px; }
.head-actions + .meta { margin: 12px 0 0; }
.link-prompt { margin: 24px 0; max-width: 600px !important; }
.sign-in { margin: -8px 0 24px; }
.keep .save-card { margin-bottom: 8px; }
.keep .source { margin-top: 16px; }
.save-dialog .save-card, .save-dialog form { max-width: none; }
.toc-save { display: inline-flex; align-items: center; min-height: 36px; margin: 0 0 4px 8px; padding: 0; font-size: var(--fs-small); font-weight: 600; }
.inline-link { min-height: 0; padding: 0; font-size: inherit; }


/* Save my plan, from the contents: a small dialog */
.save-dialog { width: min(480px, calc(100vw - 32px)); padding: 20px 24px 24px; border: 0; border-radius: var(--radius-card); background: var(--surface); color: var(--ink); box-shadow: 0 16px 48px var(--shadow-ink-20); }
.save-dialog::backdrop { background: var(--guide-dialog-backdrop); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.dialog-head h2 { margin: 0; font-size: var(--fs-h2); }
.dialog-close { min-width: 44px; min-height: 44px; margin-right: -12px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--ink); cursor: pointer; }
.save-dialog form p:first-child { margin-top: 0; }
.save-dialog .save-sent .button { margin-top: 16px; }

/* Keep your plan: in the plan section, straight after the plan */
.keep { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--border); max-width: none !important; }
.plan-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 24px; }
.cleared { margin: 0; }

/* Words you'll hear */
.glossary { margin: 8px 0 0; }
.glossary > div { padding: 12px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 16px; }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 4px 0 0; }
.glossary > div:target { background: var(--tint); border-radius: var(--radius-button); padding: 12px; }
/* Sources (v17): laid out like the meanings above, a row a topic; one source a line, then when we checked it. */
.sources { margin: 8px 0 0; }
.sources > div { padding: 12px 0; border-bottom: 1px solid var(--border); }
.sources dt { font-weight: 600; }
.sources dd { margin: 4px 0 0; }
.sec-body .sources ul { list-style: none; margin: 0; padding: 0; }
.sec-body .sources li { margin: 0; }
.sources li a { display: inline-block; padding: 2px 0; }
.sources .checked { margin: 4px 0 0; font-size: var(--fs-small); color: var(--muted); }

.guide-foot { margin: 8px 0 0; color: var(--ink); }

/* v38: section 12's "How you're buying", above the final check; it fills the plan's line of the same name. */
.position-question { max-width: 640px; margin: 4px 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
/* v38: the next guide, beside "Save your plan" at the end of the plan: the divider goes above it, so the two read as
   one block (the save card says what saving gets them in the next guide). */
.next-guide { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--border); }
.next-guide + .keep { margin-top: 16px; padding-top: 0; border-top: 0; }

/* Print: Ctrl+P prints the guide with your answers; "Print your plan" prints just the plan. */
@media print {
  body { background: var(--print-paper); padding: 0; }
  .progress, .toc, .topbar, .overview, .head-actions, .plan-note, .break-card, .note-actions, .use-typical, .tailor, .notice, .skip-link, .link-prompt, .next-link, .sign-in, #sign-in-open, .sec-time, .save-card, .save-dialog, .email-form, .email-sent, .plan-tools, .plan-change, .tailor-note, .tax-skip, .back-to-plan, .save-note, .top-price-button, .price-changed, .plan-flag { display: none !important; }
  /* v36: the phone top bar's space (.js body) and the page's top padding aren't needed on paper. */
  body, .js body { padding-top: 0; }
  .page { padding-top: 0; }
  button.term { text-decoration: none; }
  .guide-layout { display: block; }
  .g-section { border: 0; padding: 0; margin: 0 0 24px; break-inside: auto; background: none; }
  .block, .next-step, .cost, .plan-row, .checklist li { break-inside: avoid; }
  /* Answers print as text, so nothing is cut off; an empty box prints as a line to write on. */
  .docs-questions, .lisa-have, .lisa-dates, .text-input, .money, .field-error, .q .toggle, .must-switch, .beds-row, .back-chip, .price-to, .ftb, .tax-try, .pay-open, .pay-helper, .budget-offer, [data-use-typical-running] { display: none !important; }
  .print-value { display: block; min-height: 28px; padding: 4px 0; border-bottom: 1px solid var(--guide-print-border); white-space: pre-wrap; overflow-wrap: anywhere; }
  a { color: inherit; text-decoration: none; }
  body.print-plan .guide-head, body.print-plan .guide-foot, body.print-plan .g-section:not(#buying-plan) { display: none !important; }
  body.print-plan .keep, body.print-plan .next-guide { display: none; }
  /* v36 (Tim's section 13 audit: it printed 4 pages, half of the first blank): the plan on page 1, the checks on page 2.
     The plan's two lists may break between rows (a row never splits), each check stays whole, and the next step stays
     on screen. */
  body.print-plan #buying-plan .block { break-inside: auto; }
  body.print-plan #buying-plan .plan-row { padding: 3px 0; }
  body.print-plan #buying-plan .note-card { break-inside: avoid; padding: 8px 0; }
  body.print-plan #buying-plan h3 { break-after: avoid; }
  body.print-plan #buying-plan .note-figures th, body.print-plan #buying-plan .note-figures td { padding-top: 4px; padding-bottom: 4px; }
  body.print-plan #buying-plan .next-step { display: none !important; }
  /* Prints what applies: the other country's tax section stays out. */
  .g-section.collapsed { display: none !important; }
}

/* ─── Guides 02 and 03: shared (from online Guide 02 v44) ─── */

/* Tips: as on paper, a tinted card with its label (Tim, PDF v5: "like the Your Next Step box"). The label says whose
   tip it is; the tip itself is the heading. */
.tip-card { margin: 4px 0 0; padding: 18px 20px; background: var(--tint); border-radius: var(--radius-card); max-width: none !important; }
@media (min-width: 560px) { .tip-card { padding: 20px 24px; } }
.tip-label { margin: 0 0 6px !important; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.g-section .tip-card h3 { color: var(--ink); font-size: 17px; margin: 0 0 8px; }
.tip-card p:last-child, .tip-card ol:last-child, .tip-card ul:last-child { margin-bottom: 0; }
/* An example email or something to say: ruled on the left like a quoted message. */
.example-label { margin: 4px 0 6px !important; }
.example { margin: 0 0 12px; padding: 2px 0 2px 14px; border-left: 2px solid var(--green); }
.example p { margin: 0 0 6px !important; }
.sec-body ul.spaced li { margin-bottom: 12px; }
.muted { color: var(--muted); }
.copy-note { margin: 4px 0 0 !important; font-size: var(--fs-small); font-weight: 600; }
.copy-note:focus { outline: none; }
.removed { margin: 12px 0 0 !important; padding: 10px 16px; background: var(--tint); border-radius: var(--radius-button); }

/* Without script: the PDF's fillable grids, to print and fill in by hand. */
.compare { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 15px; }
.compare th, .compare td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.compare tbody th { width: 22%; color: var(--ink); font-weight: 600; }
.compare thead td { width: 22%; }
.compare.static td { height: 44px; }
.compare-notes { margin: 12px 0 0 !important; padding-left: 22px !important; font-size: var(--fs-small); color: var(--muted); }

/* Top bar and contents: one tap to the offer plan. */
.topbar-cards { flex: none; font-size: var(--fs-small); font-weight: 600; color: var(--green); min-height: 44px; display: inline-flex; align-items: center; }
.toc-cards { display: inline-flex; align-items: center; min-height: 40px; margin: 4px 0 0; font-weight: 600; }
.toc-cards + .toc-save { margin-left: 16px; }
.toc.open { scroll-padding-top: 64px; }
@media (max-width: 359px) { .topbar-saved { display: none; } }
@media print { .check span::before, .chips span { print-color-adjust: exact; -webkit-print-color-adjust: exact; } }

/* Guide 02 v6 to v12: the panels. No box inside the section's card: a title, a lead, the boxes on the same two
   columns (each label on one line, each hint under its box, every box 48px), then what it writes, open and editable,
   like a letter, with one main action and quiet links (Refactoring UI: fewer borders, one accent). */
.agent-email { margin: 20px 0 4px; max-width: 640px !important; }
.agent-email p { margin: 0; }
.agent-email-title { margin: 0 0 2px !important; font-weight: 600; color: var(--green); font-size: 18px; }
.agent-email-lead { margin: 0 0 12px !important; color: var(--muted); }
.agent-email-fields { display: grid; gap: 16px; margin: 0; }
@media (min-width: 640px) { .agent-email-fields { grid-template-columns: 1fr 1fr; } }
.agent-email-fields .field { margin: 0; min-width: 0; }
.agent-email .optional { font-weight: 400; color: var(--muted); }
.agent-email .field .label { margin: 0 0 6px; }
.agent-email .field .hint.below { margin: 6px 0 0; }
.agent-email input.text-input, .agent-email select.text-input { height: 48px; min-height: 48px; }
.agent-email .money { max-width: none; }
/* Guide 03: a money box is 48px with its border, the same as the text boxes and drop-downs beside it, so a row lines up. */
.agent-email .money input { height: 46px; min-height: 46px; padding-top: 0; padding-bottom: 0; }
/* The drop-downs drawn like the text boxes, the arrow in the ink colour (two gradients, so it follows the theme). */
.agent-email select.select { appearance: none; -webkit-appearance: none; padding: 0 44px 0 16px; background-color: var(--surface); background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 24px) 50%, calc(100% - 18px) 50%; background-size: 6px 6px; background-repeat: no-repeat; cursor: pointer; }
.email-letter { margin: 0 0 8px; padding: 14px 18px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.email-letter:focus-within { border-color: var(--green); }
.email-subject-row { display: flex; align-items: baseline; gap: 10px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.email-key { flex: none; display: inline-block; min-width: 4.5em; font-size: var(--fs-small); color: var(--muted); }
.email-subject, .email-letter .email-body { width: 100%; border: 0; background: transparent; color: var(--ink); font: 400 15px/1.5 Inter, system-ui, sans-serif; padding: 2px 0; overflow-wrap: anywhere; }
.email-subject:focus, .email-letter .email-body:focus { outline: none; }
.email-letter .email-body, .email-letter .email-subject { display: block; resize: none; overflow: hidden; min-height: 0; white-space: pre-wrap; }
.email-more { margin: 4px 0 0 !important; font-size: var(--fs-small); color: var(--muted); }
.email-more .link-button { min-height: 0; padding: 3px 0; font-size: var(--fs-small); }
@media (max-width: 559px) { .agent-email .email-more .sep { display: none; } .agent-email .email-more .link-button { display: block; padding: 6px 0; } }
.update-note { margin: 10px 0 0 !important; font-size: var(--fs-small); }
.agent-email .copy-note { margin: 8px 0 0 !important; }
.agent-email .copy-note:empty { display: none; }
.chev { flex: none; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s ease; }
.disclosure[aria-expanded="true"] .chev, .disclosure[data-open="true"] .chev { transform: translateY(2px) rotate(-135deg); }
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }
@media print { .agent-email { display: none !important; } }

/* Keep it in your inbox (v14), with the guides and tips box after the address. */
.agent-email-keep { margin: 16px 0 0; max-width: none; }
.agent-email-keep .save-small { display: block; margin-top: 8px; }
.agent-email-keep .save-extra { margin-top: 8px; }
.agent-email-optin { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--green-alpha-20); }
.agent-email-optin p { margin: 0 0 8px; }
.agent-email-optin .button { min-height: 44px; }
.agent-email-optin-done { margin: 14px 0 0 !important; }
.agent-email-optin-done:focus { outline: none; }
.offer-keep { margin: 14px 0 0; max-width: 640px; }
@media print { .offer-keep { display: none !important; } }

/* v17: worked-out figures as rows, like a statement: amounts on the right, details small under their names. */
.home-check-rows { margin: 8px 0 0; border-bottom: 1px solid var(--border); }
.hc-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--border); }
.hc-row dt { color: var(--ink); }
.hc-row dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc-detail { display: block; margin-top: 1px; font-size: var(--fs-small); color: var(--muted); }

/* v20 and v21: a do-list in a break card, and toggles that stay in view (pressed ones filled, with a tick). */
.break-card .break-todo { margin: -4px 0 10px !important; }
.break-all-set { display: flex; align-items: center; gap: 10px; margin: -2px 0 12px !important; font-weight: 600; color: var(--green); }
.break-all-set::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--green) url("/assets/3d3d1687ccd83298.svg") center/16px no-repeat; }
.break-hint { margin-left: 6px; font-weight: 400; color: var(--muted); }
.chip-button[aria-pressed="true"] { border-color: var(--green); background: var(--green); color: var(--card); }
.chip-button[aria-pressed="true"]::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; background: url("/assets/942ad67855203b81.svg") center/14px no-repeat; }

/* v31: calendar buttons as one text line, each keeping a tall tap area without lifting off the line. */
.card-cal { display: block; margin: 0 !important; line-height: 40px; font-size: var(--fs-small); }
.card-cal .link-button { display: inline; min-height: 0; padding: 10px 0; }

/* v42: groups that open and close: each heading is the button, with a chevron, a rule between them. */
.block[data-fold] { border-bottom: 1px solid var(--border); margin-bottom: 0 !important; }
.block[data-fold] h3 { margin: 0 !important; }
.fold-button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 8px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fold-button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.fold-body { padding: 0 0 12px; }
/* v8: a similar home from its Rightmove link. */
.op-link { margin: 4px 0 16px; }
.op-link-row { display: flex; gap: 8px; align-items: stretch; }
.op-link-row .text-input { flex: 1; min-width: 0; }
.op-link-status { margin-top: 6px; }
.comp-link { margin: 0 0 6px; }
.fold-body[hidden="until-found"] { padding: 0; }
.block[data-fold] + .block:not([data-fold]), .block[data-fold] + .next-step { margin-top: 20px; }

/* ─── Guide 03 (v1) ─── */

/* Section 1: the checklist's closing line sits a little apart from the last tick. */
.follow-up { margin-top: 8px !important; }

/* Every panel: a field can span both columns; a pair of fields can come and go together (display: contents, so its
   two fields stay on the panel's grid). Three money boxes in a row for the three figures. */
.agent-email-fields .field.wide { grid-column: 1 / -1; }
.field-pair { display: contents; }
@media (min-width: 640px) { .agent-email-fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.agent-email textarea.text-input { min-height: 72px; resize: vertical; font-size: var(--fs-body); line-height: 1.45; }
.panel-subtitle { margin: 22px 0 8px !important; font-weight: 600; color: var(--ink); }
.panel-note { margin: 10px 0 0 !important; font-size: var(--fs-small); color: var(--ink); }
.panel-note a { display: inline-block; padding: 3px 0; }

/* A floor area: the box, then sq m / sq ft beside it, the same 48px high, so the row lines up with its neighbours. */
.area-pair { display: flex; gap: 8px; align-items: stretch; }
.area-pair .text-input { flex: 1 1 auto; min-width: 0; }
.area-pair .chips.segmented { flex: none; flex-wrap: nowrap; }
.area-pair .chips.segmented span, .chips.fill span { min-height: 48px; padding: 0 12px; font-size: var(--fs-small); }
/* A choice that fills its column (Same type / Different type, Call / Email / Both), in equal parts. */
.chips.fill { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; }
.chips.fill label, .chips.fill span { width: 100%; }
.chips.fill span { padding: 0 8px; text-align: center; line-height: 1.2; }
/* Month and year sold: two drop-downs side by side, the month wider. */
.date-pair { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }

/* An entry (this home, a similar home, an offer): a quiet card, its title, its boxes, then its result and actions. */
.entries { display: grid; gap: 12px; }
.entry { margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); scroll-margin-top: 16px; min-width: 0; }
@media (min-width: 560px) { .entry { padding: 16px 20px 14px; } }
.entry-title { float: left; width: 100%; margin: 0 0 12px; padding: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.entry > :not(legend) { clear: both; }
.entry-name { font-weight: 400; }
.op-home { margin-bottom: 20px; }
.op-pick { margin: 0 0 16px; }
.op-pick .text-input { width: 100%; }
.entry-heading { margin: 0 0 2px !important; font-weight: 600; color: var(--ink); }
.entry-intro { margin: 0 0 12px !important; }
.entry-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-top: 10px; }
.entry-foot .check { min-height: 44px; align-items: center; margin: 0; }
.entry-foot .check span { display: flex; align-items: center; font-size: var(--fs-small); }
.entry-foot .check input { top: 50%; transform: translateY(-50%); }
.entry-remove { min-height: 44px; padding: 0; color: var(--ink); font-size: var(--fs-small); }
.entry-add { margin: 12px 0 0 !important; }
.entry-add .button { min-height: 44px; }
.entries > .removed { margin: 0 !important; }

/* A similar home's result: its price per sq ft, then what's different about it, as quiet facts (never a verdict). */
.comp-result:empty { display: none; }
.comp-result { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
.comp-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-variant-numeric: tabular-nums; }
.comp-out { font-size: var(--fs-small); color: var(--muted); }
.comp-missing { margin: 0 !important; }
.comp-notes { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 !important; padding: 0 !important; list-style: none; }
.comp-notes li { margin: 0 !important; padding: 2px 10px; border: 1px solid var(--guide-chip-border); border-radius: 999px; font-size: 13px; color: var(--ink); }
.cell-working { display: block; margin: 6px 0 0 !important; font-size: var(--fs-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.tool-panel:not(.show-working) .cell-working { display: none; }

/* The average and the guide figure: section 5's results card in Guide 01, figures in bold. */
.op-result { margin: 16px 0 0; }
.op-card p { margin: 0 0 6px !important; }
.op-card p:last-child { margin-bottom: 0 !important; }
.op-card p:first-child { font-size: 17px; }
.op-card strong { font-variant-numeric: tabular-nums; }
.op-based { font-size: var(--fs-small); color: var(--muted); }
.op-empty { margin: 0 !important; }
.op-working { margin: 6px 0 0 !important; }
.op-working .disclosure { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-size: var(--fs-small); }

/* Your three figures: each figure's facts as a statement, its name and amount on top. Flags in plain ink: no red, no
   cross (money informs, never advises, and never scares). */
.fig-results:empty { display: none; }
.fig-results { display: grid; gap: 16px; margin: 16px 0 0; }
.fig { padding: 14px 16px 12px; background: var(--bg); border-radius: var(--radius-card); }
.fig-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-weight: 600; }
.fig-amount { font-variant-numeric: tabular-nums; }
.fig-rows { margin-top: 8px; }
.fig-flag { margin: 10px 0 0 !important; padding-left: 12px; border-left: 3px solid var(--ink); font-size: var(--fs-small); }
.fig-notes { margin-top: 4px; }
.fig-five { color: var(--muted) !important; }

/* Section 4's next step: its box, then a quiet "Use your buying plan's" and where it's used. */
.next-step .next-fields { margin-top: 12px; grid-template-columns: 1fr !important; max-width: 520px; }
.next-step .next-fields .field { margin: 0; }
.next-step .next-fields .text-input { height: 48px; }
.next-step .hint.below { margin: 6px 0 0; }
.next-use { margin: 6px 0 0 !important; }
.next-use .link-button { min-height: 40px; text-align: left; font-size: var(--fs-small); }
.next-where { margin: 8px 0 0 !important; }

/* Section 6: what's attached, as ticks in a row; the call, ruled like the PDF's example; what the agent may ask. */
.attach-checks { display: flex; flex-wrap: wrap; gap: 0 24px; }
.attach-checks .check { min-height: 44px; align-items: center; }
.attach-checks .check span { display: flex; align-items: center; }
.attach-checks .check input { top: 50%; transform: translateY(-50%); }
.call-script .example { margin-bottom: 8px; }
.call-asked { margin: 0 0 4px; font-size: var(--fs-small); }
.call-asked > div { display: grid; gap: 0 16px; padding: 4px 0; }
@media (min-width: 560px) { .call-asked > div { grid-template-columns: 13em 1fr; } }
.call-asked dt { color: var(--muted); }
.call-asked dd { margin: 0; }
.letter-box { margin-top: 16px; }
#offer-email [data-kept-note] { padding: 10px 14px; background: var(--bg); border-radius: var(--radius-button); }

/* Section 7: the deadline's calendar buttons and reminder, laid out as the break cards' reminders. */
#deadline .card-cal { margin-top: 10px !important; }
.dl-remind { margin: 10px 0 0; }
.dl-remind .break-label { margin: 0 0 8px; font-size: var(--fs-small); font-weight: 600; }
#deadline .break-days { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#deadline .break-done { margin: 12px 0 0 !important; }
#deadline [data-dl-form] .agent-email-keep { margin-top: 12px; }

/* Section 8: the PDF page's Sift line, quiet, under the log. */
.sift-note { color: var(--muted) !important; }

/* Break cards: a quiet line to save, as there's no reminder in them. */
.break-save { margin: 0 !important; font-size: var(--fs-small); color: var(--muted); }

/* Phones: entries and panels take the full width, the choice chips stay in one row. */
@media (max-width: 559px) {
  .entry { padding: 14px 12px; }
  .area-pair .chips.segmented label, .area-pair .chips.segmented span { width: auto; }
  .area-pair .chips.segmented span { padding: 0 10px; }
  .area-pair .chips.segmented { display: flex; }
}

/* Print: the offer plan, three figures and log print, with every answer as text; the letter and email panels, which
   are for sending, don't. "Print my offer plan and log" prints just those three. */
@media print {
  .agent-email.prints { display: block !important; }
  .prints .entry { break-inside: avoid; border: 1px solid var(--guide-print-border); }
  .prints .button, .prints .link-button, .prints .area-pair .text-input, .prints .entry-remove, .prints .entry-add, .prints .op-working, .prints .op-pick, .prints .removed, .sift-note { display: none !important; }
  .prints .cell-working { display: block !important; }
  .prints .fig, .prints .op-card { background: none; border: 1px solid var(--guide-print-border); }
  #present-offer-1 .example-label[hidden], #present-offer-1 blockquote.example[hidden] { display: block !important; }
  body.print-tools .guide-head, body.print-tools .guide-foot, body.print-tools .keep, body.print-tools .g-section:not(:has([data-print-tool])) { display: none !important; }
  body.print-tools .g-section:has([data-print-tool]) .sec-body > :not([data-print-tool]) { display: none !important; }
  body.print-tools .g-section > .kicker { display: none !important; }
  body.print-tools #the-reply { break-before: page; }
}
