/* Molly Budget landing site. Looks like the app (docs/08-DESIGN.md): cream page, soft glows of Molly's
   eyes, nose and fur behind it, white cards floating above. Colours are the app's own tokens from
   src/theme.ts, filled in at build time; don't add hex values here. */
:root {
  --bg: #F7F4EF;
  --card: #FFFFFF;
  --text: #26282C;
  --muted: #6E6A66;
  --border: #E7E2DA;
  --primary: #4F5866;
  --primaryText: #FFFFFF;
  --primarySoft: #EFEDD8;
  --income: #5E7321;
  --expense: #B03E52;
  --warn: #B45309;
  --warnSoft: #FEF3C7;
  --eye: #B5AE4A;
  --nose: #E9A3AB;
  --shadow: 0 6px 18px color-mix(in srgb, var(--primary) 10%, transparent);
  --shadow-lift: 0 18px 40px color-mix(in srgb, var(--primary) 18%, transparent);
  --radius: 16px;
  --radius-sm: 12px;
  --wrap: 1120px;
  --gutter: 16px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); line-height: 1.55; font-size: 17px; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw + 1rem, 3.6rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.4rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }
.muted, .note { color: var(--muted); }
.note { font-size: 0.9rem; margin-top: 0.75rem; }
.eyebrow { color: var(--muted); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.lead { font-size: 1.2rem; color: var(--text); }
/* An article's button straight to its tool, under the title. */
.card.jump { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 24px 0; background: var(--primarySoft); border-color: var(--primarySoft); }
.jump p { margin: 0; flex: 1 1 260px; font-weight: 600; }
.jump .button { flex: none; }

/* Molly's glows, like src/components/Backdrop.tsx: faint, blurred, never behind text without a card. */
.glow { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.glow span { position: absolute; border-radius: 50%; filter: blur(60px); }
.glow .g1 { width: 60vmax; height: 60vmax; left: -20vmax; top: -22vmax; background: radial-gradient(circle, color-mix(in srgb, var(--eye) 42%, transparent), transparent 65%); }
.glow .g2 { width: 50vmax; height: 50vmax; right: -18vmax; top: 10vh; background: radial-gradient(circle, color-mix(in srgb, var(--nose) 44%, transparent), transparent 65%); }
.glow .g3 { width: 70vmax; height: 70vmax; left: 10vw; bottom: -45vmax; background: radial-gradient(circle, color-mix(in srgb, var(--primary) 16%, transparent), transparent 65%); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  border-radius: var(--radius-sm); background: var(--primary); color: var(--primaryText); font-weight: 650; font-size: 1.05rem;
  text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; box-shadow: var(--shadow);
}
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--eye); outline-offset: 3px; }
.button.ghost { background: transparent; color: var(--primary); box-shadow: none; border: 1px solid var(--border); }
.button.ghost:hover { background: var(--card); }
.button.small { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }

/* Header and footer */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.1rem; }
.foot { margin-top: 64px; padding: 40px 0 56px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--card) 70%, transparent); }
.foot p { color: var(--muted); max-width: 560px; margin: 12px 0 16px; font-size: 0.95rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot nav a { text-decoration: none; font-weight: 600; }

/* Sections */
section, article { padding: 56px 0; }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
  .feature.flip .split { grid-template-columns: 0.9fr 1.1fr; }
  .feature.flip .copy { order: 2; }
  section, article { padding: 80px 0; }
}

.hero { padding-top: 32px; }
.hero h1 { max-width: 14ch; }
.story-page h1 { max-width: 20ch; font-size: clamp(2rem, 3.5vw + 1rem, 3rem); }
.story-page .helped { margin: 1.5rem 0 0; }
.story-page .helped h2 { font-size: 1.2rem; }

/* Phones: the app's real screens in a simple frame. */
.phone { margin: 0; width: min(300px, 78vw); aspect-ratio: 390 / 844; border-radius: 40px; padding: 10px; background: var(--text);
  box-shadow: var(--shadow-lift); justify-self: center; }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 30px; background: var(--bg); }
.phones { position: relative; display: flex; justify-content: center; min-height: 520px; }
.phones .phone.back { position: absolute; transform: translate(-28%, 6%) rotate(-6deg) scale(0.86); opacity: 0.96; }
.phones .phone.front { position: relative; transform: translate(14%, 0) rotate(3deg); }
.phones.single .phone.front { transform: rotate(2deg); }
@media (max-width: 899px) {
  .phones { min-height: 0; }
  .phones .phone.back { display: none; }
  .phones .phone.front, .phones.single .phone.front { transform: none; }
}

.problem .card { padding: 32px; }
.problem .card p:last-child { margin-bottom: 0; }


/* How it works: the Molly Loop. "Set up" once on the left, then the four monthly steps on a line, the optional
   steps above step 1, "round again" under the four, and one panel below for the chosen step. Five columns of 20%:
   centres at 10% (set up), 30%, 50%, 70%, 90%. Without JavaScript all the panels show. */
/* Molly in her loop, beside the loop's name: above it on a phone, to its left on a wider screen. */
.loop-intro { display: grid; justify-items: center; gap: 6px; text-align: center; max-width: 680px; margin: 0 auto; }
.loop-emblem { width: 168px; height: 168px; overflow: visible; }
.loop-name { font-weight: 700; font-size: 1.15rem; margin: 0 0 6px; }
.loop-lead { color: var(--muted); max-width: 560px; margin: 0 auto; }
/* A ball of yarn rolls round the loop, and Molly's eyes follow it: both turn once every 9 seconds, together. */
.loop-runner { transform-box: view-box; transform-origin: 50% 50%; animation: loop-run 9s linear infinite; }
.loop-emblem .molly-look { transform-box: view-box; animation: loop-run 9s linear infinite; }
@keyframes loop-run { to { transform: rotate(360deg); } }
/* Her tail lashes: a few quick swings from the base, the tip flicking on its own, then still for a moment. */
.loop-emblem .molly-tail { transform-box: view-box; animation: molly-lash 2.6s ease-in-out infinite; }
@keyframes molly-lash { 0%, 55%, 100% { transform: rotate(0); } 8% { transform: rotate(14deg); } 18% { transform: rotate(-9deg); } 28% { transform: rotate(12deg); } 40% { transform: rotate(-4deg); } }
.loop-emblem .molly-tail-tip { transform-box: view-box; animation: molly-flick 1.3s ease-in-out infinite; }
@keyframes molly-flick { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-24deg); } 80% { transform: rotate(10deg); } 90% { transform: rotate(-12deg); } }
.loop { max-width: 900px; margin: 28px auto 0; }
.loop-track { --again: calc(8px + 44px + 34px); position: relative; padding: 8px 0 58px; }
.loop-main { --n: 5; position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); }
/* The line joining the four steps, with an arrowhead halfway between each pair showing which way the loop goes. */
.loop-main::before { content: ''; position: absolute; top: 21px; left: 30%; right: 10%; border-top: 2.5px solid var(--primary); }
.loop-chev { position: absolute; top: 16.25px; transform: translateX(-50%); border-left: 10px solid var(--primary); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
/* Set up leads into step 1 once: a dashed arrow, not part of the loop. It runs from the edge of the "Once" box to
   the edge of step 1's circle, so the arrowhead shows. */
/* On a phone the gap is short, so the line is solid there and dashed on wider screens. */
.loop-arrow { position: absolute; top: 21px; left: calc(10% + 23px); right: calc(70% + 25px); border-top: 2.5px solid var(--primary); }
.loop-arrow::after { content: ''; position: absolute; right: -3px; top: -7.5px; border-left: 10px solid var(--primary); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
/* "Round again": a dashed line from step 4 back under the row to step 1, with an arrowhead pointing up into step 1. */
.loop-track::before { content: ''; position: absolute; left: calc(30% + 1.25px); top: calc(var(--again) - 10px); transform: translateX(-50%); border-bottom: 11px solid var(--muted); border-left: 6px solid transparent; border-right: 6px solid transparent; }
.loop-track::after { content: ''; position: absolute; left: 30%; right: 10%; top: var(--again); height: 14px; border: 2.5px dashed var(--muted); border-top: 0; border-radius: 0 0 18px 18px; }
.loop-back { position: absolute; z-index: 1; left: 60%; top: calc(var(--again) + 30px); transform: translate(-50%, -50%); margin: 0; padding: 0 10px; background: var(--bg); color: var(--muted); font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.loop-node { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; color: var(--text); }
.loop-node .num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--primaryText); border: 2px solid var(--primary); font-weight: 800; font-size: 1.05rem; box-shadow: 0 0 0 5px var(--bg); }
.loop-node .label { font-size: 0.8rem; font-weight: 650; color: var(--text); line-height: 1.2; text-align: center; }
.loop-node.setup .num { width: auto; min-width: 44px; padding: 0 6px; border-radius: 14px; background: var(--primarySoft); color: var(--primary); border-color: var(--primarySoft); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; }
.loop-more { margin: 20px 0 0; text-align: center; }
@media (min-width: 640px) {
  .loop-node .label { font-size: 0.9rem; }
  .loop-node .num { width: 52px; height: 52px; font-size: 1.2rem; }
  .loop-main::before { top: 25px; }
  .loop-chev { top: 20.25px; }
  .loop-track { --again: calc(8px + 52px + 38px); padding-bottom: 44px; }
  /* Wide enough for the label to sit on the line. */
  .loop-back { top: calc(var(--again) + 15px); }
  .loop-arrow { top: 25px; left: calc(10% + 36px); right: calc(70% + 32px); border-top-style: dashed; }
  .loop-intro { grid-template-columns: auto 1fr; gap: 28px; text-align: left; align-items: center; }
  .loop-intro .loop-lead { margin: 0; }
  .loop-emblem { width: 184px; height: 184px; }
  .loop-node.setup .num { min-width: 52px; padding: 0 10px; font-size: 0.85rem; }
}
@media (prefers-reduced-motion: reduce) { .loop-runner, .loop-emblem .molly-look, .loop-emblem .molly-tail, .loop-emblem .molly-tail-tip { animation: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ticks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: '✓'; position: absolute; left: 0; top: 0.15em; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--primarySoft); color: var(--income); font-weight: 800; font-size: 0.75rem; }

.grid { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.extras .emoji { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.extras p { margin: 0; color: var(--muted); }

.story { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.story:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.story .tag { color: var(--muted); font-size: 0.85rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.story h3 { font-size: 1.25rem; margin: 0; }
.story .more { color: var(--primary); font-weight: 650; margin-top: auto; padding-top: 8px; }

.faq details { padding: 0; margin-top: 12px; }
.faq summary { cursor: pointer; padding: 18px 24px; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--primary); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 24px 18px; margin: 0; color: var(--muted); }

.final .card { text-align: center; padding: 40px 24px; background: var(--primarySoft); border-color: var(--primarySoft); }
.final .card .button { margin-top: 0.5rem; }

.molly { flex: none; }

/* The moment between a button and the app (/start/…/): Molly and one line, centred. */
.opening { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; color: var(--muted); }

/* Header links */
.topnav { display: flex; align-items: center; gap: 16px; }
.topnav > a:not(.button) { color: var(--text); text-decoration: none; font-weight: 600; }
.topnav > a:not(.button):hover { color: var(--primary); }

/* Guides */
.grid.one { grid-template-columns: 1fr; }
.guides .story h2 { font-size: 1.35rem; margin: 0; }
.guide { padding-top: 24px; }
.guide h1 { font-size: clamp(2rem, 3.2vw + 1rem, 2.9rem); max-width: 22ch; }
.guide .eyebrow a { color: inherit; }
.guide section { padding: 0; margin-top: 44px; }
.guide h2 { font-size: clamp(1.4rem, 1.5vw + 1rem, 1.9rem); }
.guide p, .guide li { font-size: 1.05rem; }
.toc { margin-top: 28px; }
.toc h2 { font-size: 1.1rem; margin-bottom: 8px; }
.toc ol { margin: 0 0 12px; padding-left: 1.3em; }
.toc a { text-decoration: none; font-weight: 600; }
.toc .methods-list { list-style: none; padding: 12px 0 0; margin: 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.toc .methods-list a { font-weight: 500; font-size: 0.95rem; }
.method { margin-top: 32px !important; padding-top: 24px !important; border-top: 1px solid var(--border); scroll-margin-top: 80px; }
.method h3 { font-size: 1.3rem; margin-bottom: 2px; }
.method .from { color: var(--muted); font-style: italic; margin-bottom: 12px; font-size: 0.95rem; }
.in-molly { background: var(--primarySoft); border-radius: var(--radius-sm); padding: 14px 18px; margin-top: 8px; }
.in-molly .label { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); margin-bottom: 4px; }
.in-molly p { margin: 0; }
.guide section[id] { scroll-margin-top: 80px; }
.guide-figure { margin: 48px 0 0; display: grid; justify-items: center; gap: 12px; }
.guide-figure figcaption { color: var(--muted); text-align: center; max-width: 46ch; font-size: 0.95rem; }
.steps-list { padding-left: 1.3em; display: grid; gap: 8px; }
.sources ol { padding-left: 1.3em; display: grid; gap: 4px; }
.sources li, .sources a { font-size: 0.95rem; overflow-wrap: anywhere; }
.brand span, .topnav .button { white-space: nowrap; }
@media (max-width: 560px) { .topnav > a:not(.button) { display: none; } }
.more-guides { margin-top: 24px; }
.more-guides a { font-weight: 650; text-decoration: none; }
.more-guides + .more-guides { margin-top: 8px; }

/* Tables in guides: scroll sideways inside their box on a phone, never the page. */
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 480px; }
.table-wrap caption { text-align: left; font-weight: 650; padding: 12px 14px 4px; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 10px 14px; border-top: 1px solid var(--border); }
.table-wrap th { color: var(--muted); font-weight: 650; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.guide h3 { margin-top: 20px; }
.center-actions { justify-content: center; margin-top: 32px; }
.more-reading a, .related-guides a { font-weight: 600; text-decoration: none; }
.related-guides { margin-top: 32px; padding: 20px 20px 8px; border-radius: var(--radius-sm); background: var(--primarySoft); }
.related-guides h2 { margin-top: 0; }
.table-wrap table.two { min-width: 0; }
.table-wrap table.two td:last-child { text-align: right; white-space: nowrap; }
.table-wrap table.two th:last-child { text-align: right; }
.table-wrap tr.total td { font-weight: 650; }

/* On a phone, a table wider than two columns shows each row as a small card, each value under its heading. */
@media (max-width: 640px) {
  .table-wrap table:not(.two) { min-width: 0; }
  .table-wrap table:not(.two) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap table:not(.two) tr { display: block; padding: 10px 14px; border-top: 1px solid var(--border); }
  .table-wrap table:not(.two) td { display: block; border: 0; padding: 2px 0; }
  .table-wrap table:not(.two) td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 0.78rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 6px; }
  .table-wrap table:not(.two) td:first-child::before { margin-top: 0; }
}

/* Money books */
.book-link { margin-top: 20px; }
.book-link a { font-weight: 650; text-decoration: none; }
.method .book-link { margin: 12px 0 0; }
.story .by, .book-card .by { color: var(--muted); margin: 0; }
.book-card { margin-top: 28px; }
.book-card .label { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); margin-bottom: 4px; }
.book-card .book-title { font-size: 1.3rem; font-weight: 750; margin: 0 0 2px; }
.book-card .book-title cite { font-style: normal; }
.book-card .actions { margin-top: 1rem; }
.pros-cons { display: grid; gap: 16px; }
@media (min-width: 700px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros-cons h3 { margin-top: 0; }
.crosses { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 10px; }
.crosses li { position: relative; padding-left: 30px; }
.crosses li::before { content: '–'; position: absolute; left: 0; top: 0.15em; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--warnSoft); color: var(--warn); font-weight: 800; font-size: 0.85rem; }
.guide .faq details { margin-top: 12px; }
.quiz-card { display: flex; flex-direction: column; gap: 6px; margin-top: 28px; text-decoration: none; color: var(--text); background: var(--primarySoft); border-color: var(--primarySoft); }
.quiz-card h2, .quiz-card h3 { margin: 0; font-size: 1.35rem; }
.quiz-card p { margin: 0; }
.quiz-card .tag { color: var(--muted); font-size: 0.85rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.quiz-card .more { color: var(--primary); font-weight: 650; }

/* The quiz: each question a card, each answer a large tap target. */
.quiz { display: grid; gap: 16px; margin-top: 28px; }
.quiz fieldset { margin: 0; min-width: 0; }
.quiz legend { float: left; width: 100%; display: flex; gap: 10px; align-items: baseline; font-weight: 700; font-size: 1.15rem; margin-bottom: 12px; padding: 0; }
.quiz legend .num { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primarySoft); color: var(--primary); font-size: 0.9rem; }
.quiz .options { clear: both; display: grid; gap: 8px; }
/* Questions that take more than one answer say so, quietly, under the question. */
.quiz .pick-any { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-top: 2px; }
@media (min-width: 640px) { .quiz .options { grid-template-columns: 1fr 1fr; } }
.quiz label { display: flex; gap: 10px; align-items: center; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; background: var(--bg); }
.quiz label:hover { border-color: var(--primary); }
.quiz label:has(input:checked) { border-color: var(--primary); background: var(--primarySoft); font-weight: 650; }
.quiz input[type='radio'], .quiz input[type='checkbox'] { accent-color: var(--primary); width: 18px; height: 18px; flex: none; margin: 0; }
.quiz .button { border: 0; cursor: pointer; font: inherit; font-weight: 650; }
.quiz .missing { color: var(--expense); font-weight: 650; margin: 0; }
.result { margin-top: 28px; }
#result { padding: 0; overflow: hidden; scroll-margin-top: 80px; }
.result h2:focus { outline: none; }
.result-head { background: var(--primarySoft); padding: 24px 24px 8px; }
.result-head .eyebrow { margin-bottom: 4px; }
.result-head h2 { font-size: clamp(1.7rem, 2vw + 1rem, 2.2rem); margin-bottom: 8px; }
.result-body { padding: 24px; }
.result-book .label { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); margin-bottom: 4px; }
.result-book .book-title { font-size: 1.2rem; font-weight: 750; margin: 0 0 2px; }
.result-book .book-title cite { font-style: normal; }
.result-book .by { color: var(--muted); margin: 0; }
.result-book .actions { margin-top: 1rem; }
.result-book .actions .button { flex: 1 1 200px; }
.result-body h3 { margin: 28px 0 12px; padding-top: 24px; border-top: 1px solid var(--border); }
.alts { display: grid; gap: 12px; }
@media (min-width: 640px) { .alts { grid-template-columns: 1fr 1fr; } }
.alt { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); text-decoration: none; color: var(--text); transition: border-color 0.15s ease; }
.alt:hover { border-color: var(--primary); }
.alt .tag { color: var(--muted); font-size: 0.78rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.alt .alt-title { font-weight: 700; font-size: 1.05rem; }
.alt .more { color: var(--primary); font-weight: 650; font-size: 0.95rem; margin-top: auto; padding-top: 6px; }
.result-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.result-foot p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.result-foot .button { cursor: pointer; font: inherit; font-weight: 650; background: transparent; }
.disclosure { color: var(--muted); font-size: 0.8rem; margin: 10px 0 0; }
/* "Do it in Molly Budget": its own padding (the guide's section rule would take it away), and ticks that show on its tint. */
.guide .related-guides { padding: 20px 24px 24px; }
.related-guides h2 { font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem); margin-bottom: 4px; }
.related-guides .ticks li::before { background: var(--card); }

/* The break-even calculator on the home battery article. */
.calc { margin: 20px 0; display: grid; gap: 20px; }
.calc-form { display: grid; gap: 16px; }
@media (min-width: 640px) { .calc-form { grid-template-columns: 1fr 1fr; } }
.calc-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.calc-field label { font-weight: 650; }
.calc-input { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); padding: 0 12px; min-height: 48px; }
.calc-input:focus-within { border-color: var(--primary); }
.calc-input span { color: var(--muted); flex: none; }
.calc-input input { flex: 1 1 auto; width: 100%; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.05rem; color: var(--text); padding: 10px 0; outline: none; }
.calc-field .hint { margin: 0; color: var(--muted); font-size: 0.9rem; }
.calc-result { background: var(--primarySoft); border-radius: var(--radius-sm); padding: 16px 18px; }
.calc-result p { margin: 0 0 8px; }
.calc-answer { font-size: 1.25rem; font-weight: 650; }
.calc-years { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.calc-years li { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.calc-years strong { margin-left: auto; }
.calc-years .ahead { color: var(--income); }
.calc-years .behind { color: var(--expense); }
.calc-result .note { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }
