/* Shared stylesheet for kompensationsydelser.dk and merudgift.dk — tokens and rules: sites/DESIGN.md.
   Mobile-first: base = phone; 480px = large phone; 769px = tablet/desktop; 1100px = desktop with sidebar. */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/fonts/fraunces-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("/fonts/source-sans-3-latin-wght-italic.woff2") format("woff2"); }

:root {
  --paper: #f7f5f0;
  --card: #ffffff;
  --tint: #eaf2f0;
  --sand: #f3ede3;
  --ink: #16252b;
  --muted: #4e5b61;
  --line: #dce3e1;
  --line-strong: #bfcbc8;
  --primary: #0b5d63;
  --primary-dark: #08474c;
  --primary-soft: #e1efec;
  --pos: #17703f;
  --pos-soft: #e7f4eb;
  --caution: #8a4b08;
  --caution-soft: #fff3e0;
  --risk: #a8291c;
  --risk-soft: #fcebe7;
  --new: #17703f;
  --new-soft: #e7f4eb;
  --existing: #94470a;
  --existing-soft: #fff1e2;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(22, 37, 43, 0.06), 0 8px 24px rgba(22, 37, 43, 0.07);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --measure: 44rem;
  --gap: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}

a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.012em; line-height: 1.14; margin: 0 0 0.5em; font-optical-sizing: auto; }
/* Fluid on phones so "kompensationsydelse?" fits on one line from 320px up (no hyphen needed). */
/* "kompensationsydelse?" is 10.8em wide in Fraunces 600: (100vw − 2rem gutter) / 10.8 ≈ 9.2vw − 3px. */
h1 { font-size: clamp(1.5rem, calc(9vw - 4px), 2.45rem); } /* margin for a desktop-style scrollbar */
h2 { font-size: 1.6rem; margin-top: 3rem; }
h3 { font-size: 1.2rem; line-height: 1.3; margin: 1.6rem 0 0.45rem; font-weight: 700; }
p, ul, ol, dl { margin: 0 0 1em; }
ul, ol { padding-left: 1.3rem; }
li + li { margin-top: 0.35em; }
strong { font-weight: 650; }
.small { font-size: 0.94rem; color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 74rem; margin: 0 auto; padding: 0 1rem; }
.main { min-width: 0; padding-bottom: 1rem; }
.main > * { max-width: var(--measure); }
.main > .wide { max-width: none; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.75rem 1rem; z-index: 60; }
.skip:focus { left: 0; }

/* ---------- Disclosure: one quiet line, every page ---------- */
.disclosure { background: var(--ink); color: #e9eff0; font-size: 0.875rem; line-height: 1.35; }
.disclosure .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.6rem; min-height: 34px; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.disclosure a { color: #fff; font-weight: 600; }
.disclosure a:focus-visible { outline-color: #fff; }

/* ---------- Header ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: none; border-radius: 9px; background: var(--primary); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 650; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 419px) {
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-mobile summary { width: 44px; padding: 0; justify-content: center; }
  .header-inner { gap: 0.5rem; }
}
.brand-sub { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-desktop { display: none; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.1rem; }
.nav li + li { margin-top: 0; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.65rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 500; }
.nav a:hover { background: var(--paper); color: var(--primary); }
.nav a[aria-current="page"] { color: var(--primary); font-weight: 700; background: var(--primary-soft); }

.nav-mobile summary { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.8rem; border: 1px solid var(--line-strong); border-radius: var(--r-md); font-weight: 600; font-size: 1rem; cursor: pointer; list-style: none; background: var(--card); }
.nav-mobile summary::-webkit-details-marker { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform 0.2s var(--ease), background 0.2s; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.nav-mobile[open] .menu-icon { background: transparent; }
.nav-mobile[open] .menu-icon::before { top: 0; transform: rotate(45deg); }
.nav-mobile[open] .menu-icon::after { top: 0; transform: rotate(-45deg); }
.nav-mobile nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; overflow-y: auto; background: var(--card); border-top: 1px solid var(--line); }
html.menu-open { overflow: hidden; }
.nav-mobile ul { list-style: none; margin: 0; padding: 0.4rem 0; }
.nav-mobile li + li { margin-top: 0; }
.nav-mobile li { border-bottom: 1px solid var(--line); }
.nav-mobile a { display: flex; align-items: center; min-height: 54px; padding: 0 1.25rem; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.nav-mobile a[aria-current="page"] { font-weight: 700; color: var(--primary); box-shadow: inset 4px 0 0 var(--primary); }
.menu-foot { padding: 1rem 1.25rem; font-size: 0.98rem; color: var(--muted); }
.menu-foot a { display: flex; min-height: 44px; align-items: center; font-weight: 700; font-size: 1.05rem; padding: 0; }

/* ---------- Hero band ---------- */
.hero-band { background: var(--tint); border-bottom: 1px solid #d6e5e1; }
.hero-grid { display: grid; gap: 1.4rem; padding-top: 1rem; padding-bottom: 1.8rem; }
.hero-grid > * { min-width: 0; }
.crumbs { font-size: 0.875rem; margin-bottom: 0.4rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; color: var(--muted); }
.crumbs li + li { margin-top: 0; }
.crumbs li + li::before { content: "›"; margin-right: 0.3rem; }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); }
.hero { padding-top: 0.6rem; }
.hero h1 { margin-bottom: 0.4em; }
.hero .eyebrow { font-weight: 700; color: var(--primary); margin-bottom: 0.4rem; font-size: 0.95rem; letter-spacing: 0.01em; }
.hero .lead { font-size: 1.2rem; line-height: 1.5; color: #2f3e44; max-width: 40rem; }
.hero .tag { margin-bottom: 0.8rem; }
.page-line { font-size: 0.875rem; color: var(--muted); margin: 0.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; }
.page-line span { display: inline-flex; align-items: center; gap: 0.35rem; }
.page-line span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: 0.55; }
.page-line a { color: var(--muted); }
.hero-aside > :last-child { margin-bottom: 0; }

/* The answer next to the title */
.summary { margin: 0; padding: 1.1rem 1.2rem 0.4rem; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); border: 1px solid #d6e5e1; }
.summary-title { font-family: var(--sans); font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); margin: 0 0 0.6rem; }
.summary ul { list-style: none; padding: 0; }
.summary li { position: relative; padding-left: 1.6rem; }
.summary li::before { content: ""; position: absolute; left: 0.15rem; top: 0.5em; width: 0.7rem; height: 0.38rem; border-left: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: rotate(-45deg); }
.main > .summary { margin: 1.6rem 0; }

.short-answer { padding: 1.2rem 1.25rem; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); border: 1px solid #d6e5e1; }
.short-answer .summary-title { color: var(--existing); }
.short-answer p { font-size: 1.12rem; }
.short-answer p:last-child { margin-bottom: 0; }

.toc-mobile { margin: 1.4rem 0 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.toc-mobile summary { min-height: 50px; display: flex; align-items: center; padding: 0 2.6rem 0 1rem; font-weight: 700; cursor: pointer; list-style: none; position: relative; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.chev::after, .toc-mobile summary::after, .faq summary::after, .sources summary::after {
  content: ""; position: absolute; right: 1rem; top: 50%; width: 0.55rem; height: 0.55rem; margin-top: -0.4rem;
  border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: rotate(45deg); transition: transform 0.2s var(--ease);
}
.toc-mobile[open] summary::after, .faq details[open] summary::after, .sources[open] summary::after { transform: rotate(-135deg); margin-top: -0.1rem; }
.toc-mobile ol, .toc ol { list-style: none; margin: 0; padding: 0 0 0.5rem; }
.toc-mobile li + li, .toc li + li { margin-top: 0; }
.toc-mobile a { display: flex; align-items: center; min-height: 44px; padding: 0.3rem 1rem; text-decoration: none; }

/* ---------- Audience tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: var(--r-sm); line-height: 1.5; }
.tag-existing { color: var(--existing); background: var(--existing-soft); box-shadow: inset 0 0 0 1.5px currentColor; }
.tag-new { color: var(--new); background: var(--new-soft); box-shadow: inset 0 0 0 1.5px currentColor; }

/* ---------- Path cards (who are you?) ---------- */
.paths { display: grid; gap: 0.75rem; margin: 1.3rem 0 0; }
.path-card {
  position: relative; display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start; min-width: 0;
  padding: 1rem 1.1rem 1.05rem; border-radius: var(--r-lg); background: var(--card); color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s;
}
.path-card:hover { color: var(--ink); border-color: var(--primary); transform: translateY(-2px); }
.path-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
.path-text { color: var(--muted); font-size: 1rem; line-height: 1.5; }
.path-text strong { color: var(--ink); }
.path-cta { margin-top: 0.15rem; font-weight: 700; color: var(--primary); }
.path-cta small { font-weight: 500; color: var(--muted); font-size: 0.9rem; }

/* ---------- Key figures ---------- */
.fig-strip { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.fig-strip li { margin: 0; padding: 0.55rem 0.6rem; border-radius: var(--r-md); background: var(--card); border: 1px solid #d6e5e1; min-width: 0; }
.fig-strip b { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.15; }
.fig-strip span { display: block; font-size: 0.8rem; line-height: 1.3; color: var(--muted); }
@media (max-width: 768px) { .hero-aside .figures { display: none; } }
@media (min-width: 769px) { .fig-strip { display: none; } }
.figures { padding: 1.1rem 1.2rem 0.6rem; border-radius: var(--r-lg); background: var(--card); border: 1px solid #d6e5e1; box-shadow: var(--shadow); }
.figures dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.figures dl > div { padding: 0.7rem 0; border-top: 1px solid var(--line); min-width: 0; }
.figures dl > div:nth-child(-n+2) { border-top: 0; }
.figures dt { font-size: 0.9rem; line-height: 1.35; color: var(--muted); }
.figures dd { margin: 0 0 0.15rem; font-family: var(--serif); font-weight: 600; font-size: 1.75rem; line-height: 1.1; color: var(--ink); order: -1; }
.figures dl > div { display: flex; flex-direction: column; }
.figures-foot { font-size: 0.9rem; margin: 0.4rem 0 0.4rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }

/* ---------- Callouts ---------- */
.note { margin: 1.6rem 0; padding: 0.95rem 1.15rem; border-left: 4px solid var(--primary); background: var(--card); border-radius: 0 var(--r-md) var(--r-md) 0; }
.note > :last-child { margin-bottom: 0; }
.note-label { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.25rem; color: var(--caution); }
.note-warn { border-left-color: var(--caution); background: var(--caution-soft); }
.crosslink { font-size: 1rem; margin-top: 1.6rem; padding: 0.8rem 1rem; border-radius: var(--r-md); background: var(--card); border: 1px dashed var(--line-strong); }
.crosslink a { font-weight: 700; }

.example { margin: 1.6rem 0; padding: 1.05rem 1.2rem; background: var(--sand); border-radius: var(--r-lg); }
.example figcaption { font-weight: 700; margin-bottom: 0.45rem; font-size: 1.1rem; }
.example-label { display: inline-block; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-right: 0.4rem; vertical-align: 0.1em; }
.example-caveat { font-size: 0.9rem; color: var(--muted); margin-bottom: 0; padding-top: 0.5rem; border-top: 1px solid rgba(22, 37, 43, 0.1); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 48px; padding: 0 1.2rem; border-radius: var(--r-md); font-weight: 700; text-decoration: none; line-height: 1.25; text-align: center; transition: background 0.2s, color 0.2s, transform 0.2s var(--ease); }
.btn-primary { background: var(--primary); color: #fff; border: 2px solid var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--card); color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background: var(--primary-soft); }
.btn .arr { transition: transform 0.2s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.3rem 0; }

/* ---------- Option cards: Gruppe I / Gruppe II ---------- */
.options { display: grid; gap: 0.9rem; margin: 1.2rem 0 0.6rem; }
.option { position: relative; min-width: 0; padding: 1.15rem 1.2rem 0.5rem; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.option-kicker { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); }
.option-kicker span:last-child { color: var(--muted); letter-spacing: 0.04em; text-transform: none; font-weight: 600; font-size: 0.85rem; }
.option-figure { font-family: var(--serif); font-weight: 600; font-size: 2.3rem; line-height: 1.05; margin: 0.35rem 0 0.1rem; letter-spacing: -0.015em; }
.option-figure small { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.option-sub { color: var(--muted); font-size: 1rem; margin-bottom: 0.7rem; }
.option dl { margin: 0; }
.option dl > div { padding: 0.55rem 0; border-top: 1px solid var(--line); }
.option dt { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.option dd { margin: 0.1rem 0 0; font-size: 1.02rem; line-height: 1.45; }

/* ---------- Model viz (rails + payouts), used by the explainer and the calculator ---------- */
.model { margin: 1.4rem 0; padding: 1.1rem 1.1rem 1.2rem; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.model-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.3rem 1rem; margin-bottom: 0.4rem; }
.model-head h3 { margin: 0; font-size: 1.15rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.5rem 0 1rem; }
.chip { min-height: 44px; padding: 0.35rem 0.85rem; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; font-size: 0.95rem; font-weight: 600; line-height: 1.25; cursor: pointer; text-align: left; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip small { display: block; font-weight: 500; font-size: 0.82rem; opacity: 0.85; }

.rail { margin: 0 0 1.25rem; }
.rail-label { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.95rem; margin-bottom: 0.35rem; }
.rail-label b { font-weight: 700; white-space: nowrap; }
.rail-track { position: relative; height: 14px; border-radius: 999px; background: #edf1f0; }
.rail-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 0%); border-radius: 999px; background: #8fb7b3; transition: width 0.45s var(--ease), background 0.3s; }
.rail.is-over .rail-fill { background: var(--primary); }
.rail-mark { position: absolute; top: -5px; bottom: -5px; left: var(--at); width: 2px; background: var(--ink); }
.rail-mark-label { position: absolute; top: 100%; left: var(--at); transform: translateX(-50%); margin-top: 6px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; color: var(--ink); }
.rail-mark-label.end { transform: translateX(-85%); }
.rail-mark-label small { font-weight: 500; color: var(--muted); }
.rail-status { display: block; margin-top: 1.75rem; font-size: 0.92rem; color: var(--muted); }
.rail.is-over .rail-status { color: var(--pos); font-weight: 600; }

.payouts { display: grid; gap: 0.7rem; margin-top: 0.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.payout { display: grid; grid-template-columns: 5.2rem 1fr; align-items: center; gap: 0.6rem; }
.payout-name { font-size: 0.92rem; font-weight: 700; line-height: 1.2; }
.payout-name small { display: block; font-weight: 500; color: var(--muted); font-size: 0.8rem; }
.payout-bar { position: relative; height: 38px; border-radius: 8px; background: #f1f3f2; overflow: hidden; }
.payout-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 0%); background: var(--line-strong); border-radius: 8px; transition: width 0.6s var(--ease), background 0.3s; }
.payout.is-best .payout-fill { background: var(--primary); }
.payout.is-none .payout-fill { width: 0 !important; }
.payout-val { position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%); font-weight: 750; font-size: 1rem; color: var(--ink); white-space: nowrap; transition: color 0.3s; }
.payout.is-best .payout-val { color: #fff; }
.payout.is-best.is-narrow .payout-val { color: var(--ink); left: calc(var(--w) + 0.5rem); }
.model-verdict { margin: 0 0 1.1rem; padding: 0.75rem 0.9rem; border-radius: var(--r-md); background: var(--tint); font-size: 1rem; }
.model-verdict strong { color: var(--primary-dark); }
.model-fine { font-size: 0.88rem; color: var(--muted); margin: 0.6rem 0 0; }

/* ---------- "The extra part" splitter ---------- */
.extra { margin: 1.4rem 0; padding: 1.1rem; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.extra h3 { margin: 0 0 0.2rem; font-size: 1.15rem; }
.extra-intro { color: var(--muted); font-size: 1rem; margin-bottom: 0.4rem; }
.extra-stage { margin: 0.4rem 0 0; }
.extra-case { font-weight: 600; margin: 0 0 0.6rem; font-size: 1rem; }
.extra-bar { display: flex; height: 64px; border-radius: 10px; overflow: hidden; background: #edf1f0; }
.extra-base, .extra-plus { display: flex; align-items: center; min-width: 0; padding: 0 0.6rem; font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; transition: flex-basis 0.6s var(--ease), opacity 0.4s; }
.extra-base { flex: 0 0 var(--base); background: #cfd8d6; color: var(--ink); }
.extra-plus { flex: 1 1 auto; background: var(--primary); color: #fff; justify-content: flex-end; }
.extra-legend { display: grid; gap: 0.5rem; margin: 0.8rem 0 0; padding: 0; list-style: none; font-size: 0.98rem; }
.extra-legend li { display: grid; grid-template-columns: 0.9rem 1fr auto; gap: 0.55rem; align-items: baseline; margin: 0; }
.extra-legend i { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: #cfd8d6; transform: translateY(0.1em); }
.extra-sum { margin: 0.8rem 0 0; padding: 0.6rem 0.8rem; border-radius: var(--r-md); background: var(--tint); font-size: 1rem; }
.extra-sum strong { color: var(--primary-dark); }
.extra-base, .extra-plus { flex-direction: column; justify-content: center; align-items: flex-start; line-height: 1.2; font-weight: 600; font-size: 0.85rem; }
.extra-plus { align-items: flex-end; text-align: right; }
.extra-base b, .extra-plus b { display: block; font-weight: 800; font-size: 0.98rem; }
.extra-legend li:last-child i { background: var(--primary); }
.extra-legend b { white-space: nowrap; }
.extra-legend li:last-child { font-weight: 700; color: var(--primary-dark); }
.extra-note { font-size: 0.88rem; color: var(--muted); margin: 0.8rem 0 0; }

/* ---------- Categories as icons ---------- */
.catgrid { list-style: none; padding: 0; margin: 1.1rem 0; display: grid; gap: 0.6rem; grid-template-columns: minmax(0, 1fr); }
.catgrid li > div { min-width: 0; }
.catgrid strong { overflow-wrap: anywhere; hyphens: auto; }
.catgrid li { margin: 0; display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 0.8rem; align-items: start; padding: 0.85rem 0.95rem; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); min-width: 0; }
.cat-ic { position: relative; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.cat-ic svg { width: 1.5rem; height: 1.5rem; }
.cat-n { position: absolute; right: -6px; top: -6px; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.72rem; font-weight: 800; border: 2px solid var(--card); }
.catgrid strong { display: block; line-height: 1.3; }
.cat-ex { display: block; color: var(--muted); font-size: 0.96rem; line-height: 1.45; margin-top: 0.15rem; }
.catgrid.compact li { padding: 0.55rem 0.7rem; align-items: center; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0.6rem; }
.catgrid.compact .cat-ic { width: 2.2rem; height: 2.2rem; border-radius: 10px; }
.catgrid.compact .cat-ic svg { width: 1.2rem; height: 1.2rem; }
.catgrid.compact strong { font-weight: 600; font-size: 0.98rem; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 1.3rem 0; counter-reset: s; }
.step { position: relative; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.9rem; margin: 0; padding-bottom: 1.3rem; }
.step:not(:last-child)::before { content: ""; position: absolute; left: calc(1.2rem - 1px); top: 2.6rem; bottom: 0.2rem; width: 2px; background: var(--line-strong); }
.step-n { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--primary); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; }
.step-body { min-width: 0; }
.step-body h3 { margin: 0.35rem 0 0.35rem; }
.step-body > :last-child { margin-bottom: 0; }

/* ---------- Date strip + timeline ---------- */
.datestrip { margin: 1.6rem 0; padding: 1.1rem 1.1rem 1rem; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.datestrip h2, .datestrip h3 { margin: 0 0 1rem; font-size: 1.15rem; font-family: var(--sans); font-weight: 700; }
.ds-track { position: relative; margin: 0 0.3rem; height: 8px; border-radius: 999px; background: #edf1f0; }
.ds-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--now, 0%); border-radius: 999px; background: var(--existing); transition: width 0.9s var(--ease); }
.ds-now { position: absolute; top: 50%; left: var(--now, 0%); width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--card); border: 4px solid var(--existing); transition: left 0.9s var(--ease); }
.ds-now::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--existing); opacity: 0; }
.ds-now-label { position: absolute; bottom: calc(100% + 12px); left: var(--now, 0%); transform: translateX(-50%); padding: 0.15rem 0.5rem; border-radius: var(--r-sm); background: var(--existing); color: #fff; font-size: 0.8rem; font-weight: 700; white-space: nowrap; transition: left 0.9s var(--ease); }
.ds-now-label::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--existing); }
.ds-track-wrap { padding-top: 2.1rem; }
/* Phones: the three stops as rows under the track; from 480px, three columns under their points. */
.ds-stops { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.ds-stops li { margin: 0; font-size: 0.95rem; line-height: 1.35; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 0.5rem; }
.ds-stops li:nth-child(2) b { color: var(--existing); }
.ds-stops b { font-size: 0.95rem; }
.ds-stops span { color: var(--muted); }
.ds-caption { margin: 0.9rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--line); font-size: 1rem; }

.timeline-wrap { position: relative; margin: 1.4rem 0; }
.timeline { list-style: none; position: relative; padding: 0 0 0 2rem; margin: 0; }
.timeline::before { content: ""; position: absolute; left: 0.62rem; top: 0.5rem; bottom: 0.5rem; width: 3px; border-radius: 3px; background: #e6e0d6; }
.timeline-fill { position: absolute; left: 0.62rem; top: 0.5rem; width: 3px; height: var(--p, 18%); max-height: calc(100% - 1rem); border-radius: 3px; background: var(--existing); z-index: 1; transition: height 0.9s var(--ease); }
.timeline li { position: relative; margin: 0 0 1rem; padding: 0.85rem 1rem; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.timeline li::before { content: ""; position: absolute; left: -1.73rem; top: 1.05rem; width: 0.95rem; height: 0.95rem; border-radius: 50%; background: var(--paper); border: 3px solid var(--existing); z-index: 1; }
.timeline .when { display: block; font-weight: 750; color: var(--existing); margin-bottom: 0.1rem; }
.timeline li.is-fixed::before { border-radius: 3px; background: var(--existing); }
.timeline li.is-now { border-color: var(--existing); box-shadow: 0 0 0 3px var(--existing-soft); }
.timeline li.is-now::before { background: var(--existing); box-shadow: 0 0 0 5px var(--existing-soft); }
.now-badge { display: inline-block; margin-left: 0.4rem; padding: 0 0.45rem; border-radius: var(--r-sm); background: var(--existing); color: #fff; font-size: 0.78rem; font-weight: 700; vertical-align: 0.12em; }
.timeline .branch { margin: 0.6rem 0 0; padding: 0.5rem 0.7rem; border-radius: 8px; background: var(--caution-soft); font-size: 0.98rem; }
.timeline-key { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: 0.9rem; color: var(--muted); margin: -0.4rem 0 0.4rem; }
.timeline-key span { display: inline-flex; align-items: center; gap: 0.4rem; }
.timeline-key i { width: 0.8rem; height: 0.8rem; border: 3px solid var(--existing); border-radius: 50%; }
.timeline-key span:first-child i { border-radius: 3px; background: var(--existing); }

/* ---------- Outcome fan ---------- */
.fan { margin: 1.3rem 0 0.6rem; }
.fan-root { position: relative; display: flex; align-items: center; gap: 0.55rem; margin: 0; font-weight: 700; font-size: 1rem; z-index: 1; }
.fan-root span { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: none; border-radius: 50%; background: var(--existing-soft); color: var(--existing); box-shadow: inset 0 0 0 2px var(--existing); font-size: 1.1rem; }
.fan-list { list-style: none; margin: 0; padding: 0.6rem 0 0 1.4rem; position: relative; display: grid; gap: 0.7rem; }
.fan-list::before { content: ""; position: absolute; left: 1.3rem; top: -0.2rem; bottom: 2rem; width: 2px; background: var(--line-strong); transform-origin: top; }
.fan-item { position: relative; margin: 0; padding: 0.95rem 1rem 0.85rem 1.05rem; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); min-width: 0; }
.fan-item::before { content: ""; position: absolute; left: -0.98rem; top: 1.6rem; width: 0.98rem; height: 2px; background: var(--line-strong); }
.fan-head { display: flex; align-items: center; gap: 0.7rem; }
.fan-ic { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; background: var(--primary-soft); color: var(--primary); }
.fan-item.is-up .fan-ic { background: var(--pos-soft); color: var(--pos); }
.fan-item.is-down .fan-ic { background: var(--caution-soft); color: var(--caution); }
.fan-item.is-zero { border-color: #efc4bc; }
.fan-item.is-zero .fan-ic { background: var(--risk-soft); color: var(--risk); font-size: 0.95rem; }
.fan-title { font-weight: 750; font-size: 1.08rem; line-height: 1.25; }
.fan-when { margin: 0.5rem 0 0; font-size: 0.98rem; color: var(--muted); }
.fan-do { margin: 0.55rem 0 0; padding-top: 0.5rem; border-top: 1px solid var(--line); font-size: 0.96rem; }
.fan-do b { color: var(--ink); }

/* ---------- Checklist (ticks saved on this device) ---------- */
.checks { margin: 1.2rem 0; padding: 1rem 1.05rem; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.checks-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.checks-progress { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 0.98rem; }
.checks-ring { --p: 0; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--pos) calc(var(--p) * 1%), #e6ebea 0); display: grid; place-items: center; transition: --p 0.3s; }
.checks-ring::after { content: ""; width: 24px; height: 24px; border-radius: 50%; background: var(--card); }
.checks-tools { display: flex; gap: 0.4rem; }
.linkbtn { min-height: 44px; padding: 0 0.6rem; border: 0; background: none; color: var(--primary); font: inherit; font-size: 0.95rem; font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.checks ul { list-style: none; margin: 0; padding: 0; }
.checks li { margin: 0; border-top: 1px solid var(--line); }
.checks label { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.7rem; align-items: start; padding: 0.7rem 0; cursor: pointer; min-height: 44px; }
.checks input { appearance: none; -webkit-appearance: none; margin: 0.15rem 0 0; width: 1.5rem; height: 1.5rem; border: 2px solid var(--line-strong); border-radius: 6px; background: var(--card); display: grid; place-items: center; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.checks input::after { content: ""; width: 0.55rem; height: 0.3rem; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -0.12rem; transition: transform 0.2s var(--ease); }
.checks input:checked { background: var(--pos); border-color: var(--pos); }
.checks input:checked::after { transform: rotate(-45deg) scale(1); }
.checks input:checked + span { color: var(--muted); }
.checks-tip { display: block; margin-top: 0.3rem; font-size: 0.92rem; color: var(--muted); }
.checks-tip a { font-weight: 600; }
.checks-foot { font-size: 0.86rem; color: var(--muted); margin: 0.4rem 0 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 20rem; font-size: 0.95rem; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.55rem; border-bottom: 1px solid var(--line); hyphens: auto; }
thead th { background: var(--paper); font-size: 0.9rem; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 650; }
.more-table { margin: 0.8rem 0 0; }
.more-table > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--primary); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 650; min-height: 56px; display: flex; align-items: center; padding: 0.75rem 2.6rem 0.75rem 0; position: relative; list-style: none; }
.faq summary:hover { color: var(--primary); }
.faq summary::-webkit-details-marker { display: none; }
.faq-a { padding: 0 0 0.8rem; }

/* ---------- Cards and links ---------- */
.link-list { padding-left: 1.2rem; }
.link-list a, .sources a { display: inline-block; min-height: 32px; }
.cards { display: grid; gap: 0.7rem; margin: 1rem 0; }
.card { display: block; padding: 0.95rem 1.05rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); text-decoration: none; color: var(--ink); min-width: 0; }
.card strong { display: block; color: var(--ink); }
.card span { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.98rem; line-height: 1.5; }
.card-link { position: relative; padding-right: 2.6rem; transition: border-color 0.2s, transform 0.2s var(--ease); }
.card-link strong { color: var(--primary); }
.card-link::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: 0.5rem; height: 0.5rem; margin-top: -0.28rem; border-right: 2.5px solid var(--primary); border-top: 2.5px solid var(--primary); transform: rotate(45deg); transition: right 0.2s var(--ease); }
.card-link:hover { border-color: var(--primary); }
.card-link:hover::after { right: 0.85rem; }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before { content: ""; position: absolute; left: 0.2rem; top: 0.45em; width: 0.75rem; height: 0.42rem; border-left: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: rotate(-45deg); }

.related { margin-top: 3rem; }
.related h2 { margin-top: 0; }

/* Sources fold away; the link in the hero opens them */
.sources { margin-top: 2rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.97rem; }
.sources > summary { position: relative; display: flex; align-items: center; min-height: 56px; padding-right: 2.6rem; cursor: pointer; list-style: none; }
.sources > summary::-webkit-details-marker { display: none; }
.sources > summary h2 { margin: 0; font-family: var(--sans); font-size: 1.1rem; font-weight: 700; }
.sources > summary span { margin-left: 0.5rem; color: var(--muted); font-size: 0.92rem; }
.sources h3 { font-size: 0.95rem; margin: 1rem 0 0.3rem; }
.sources-body { padding-bottom: 0.8rem; }

/* "Who's behind this page" + updated + legal basis, in one block */
.about-card { margin: 2rem 0 2.6rem; padding: 1.1rem 1.2rem; border-radius: var(--r-lg); background: var(--sand); font-size: 0.97rem; }
.about-card h2 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.about-card p { color: #3c4a50; }
.about-card a { font-weight: 650; }
.about-meta { display: grid; gap: 0.25rem; margin: 0.8rem 0 0; padding-top: 0.75rem; border-top: 1px solid rgba(22, 37, 43, 0.1); font-size: 0.9rem; color: var(--muted); }
.about-meta p { margin: 0; color: var(--muted); }
.about-meta strong { color: var(--ink); }

/* ---------- LumaCare offer ---------- */
.luma-icon { display: inline-block; vertical-align: middle; border-radius: 7px; flex: none; }
.luma-offer { display: grid; gap: 1rem; margin: 2rem 0; padding: 1.1rem 1.15rem 0.9rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); }
.luma-offer > * { min-width: 0; }
.luma-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.06em; }
.luma-heading { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1.2; margin-bottom: 0.4rem; }
.luma-copy > p:not(.luma-label):not(.luma-heading):not(.luma-fine) { font-size: 1.02rem; }
.luma-fine { font-size: 0.84rem; color: var(--muted); margin: 0.7rem 0 0.1rem; }
.luma-textlink { font-weight: 650; }

/* The illustration: a receipt is photographed, sorted into a category, counted */
.luma-demo { position: relative; padding: 0.9rem; border-radius: 14px; background: var(--tint); min-height: 228px; overflow: hidden; }
.luma-demo-cap { position: absolute; right: 0.6rem; bottom: 0.4rem; font-size: 0.72rem; color: var(--muted); }
.ld-receipt { position: relative; width: 62%; max-width: 12rem; padding: 0.6rem 0.7rem 0.75rem; background: #fff; border-radius: 6px 6px 2px 2px; box-shadow: 0 6px 16px rgba(22, 37, 43, 0.12); font-size: 0.78rem; line-height: 1.35; transform: rotate(-3deg); }
.ld-receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; background: radial-gradient(circle at 5px -1px, transparent 5px, #fff 5.5px) 0 0 / 10px 6px repeat-x; }
.ld-receipt b { display: block; font-size: 0.82rem; }
.ld-line { display: block; height: 5px; margin: 5px 0; border-radius: 3px; background: #e5e9e8; }
.ld-line.s { width: 60%; }
.ld-total { display: flex; justify-content: space-between; margin-top: 6px; padding-top: 5px; border-top: 1px dashed #c9d1cf; font-weight: 700; }
.ld-chip { position: absolute; right: 0.8rem; top: 2.6rem; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.65rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: 0.8rem; font-weight: 700; box-shadow: 0 4px 12px rgba(11, 93, 99, 0.3); }
.ld-chip svg { width: 1rem; height: 1rem; }
.ld-sum { position: absolute; left: 0.9rem; right: 0.9rem; bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0.7rem; border-radius: 10px; background: #fff; font-size: 0.82rem; box-shadow: 0 2px 8px rgba(22, 37, 43, 0.08); }
.ld-sum b { font-size: 0.95rem; }
.ld-folder { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); }
.ld-folder svg { width: 1.05rem; height: 1.05rem; color: var(--primary); }

/* ---------- Calculator ---------- */
.calc-wrap { display: grid; gap: 1rem; margin: 0.4rem 0 1.4rem; }
.calc-wrap > * { min-width: 0; }
.calc { padding: 1.15rem; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.calc label { display: block; font-weight: 700; margin: 0 0 0.35rem; line-height: 1.35; }
.calc .hint { display: block; font-weight: 400; font-size: 0.94rem; color: var(--muted); margin-top: 0.15rem; }
.calc-field { margin-bottom: 1.15rem; }
.calc-input { position: relative; max-width: 15rem; }
.calc input { width: 100%; min-height: 54px; padding: 0 4.6rem 0 0.9rem; font: inherit; font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; border: 2px solid var(--line-strong); border-radius: var(--r-md); color: var(--ink); background: #fff; }
.calc input:focus { outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.calc-unit { position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 0.98rem; pointer-events: none; }
.calc-privacy { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.92rem; color: var(--muted); margin: 0 0 1rem; }
.calc-privacy svg { flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; color: var(--pos); }
.calc-cats { margin: 0 0 0.6rem; font-size: 0.95rem; }
.calc-cats summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--primary); font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }
.calc-try { font-size: 0.92rem; color: var(--muted); margin: 0.2rem 0 0.2rem; }
.calc-error { color: var(--risk); font-weight: 650; margin: 0.4rem 0 0; }
.calc-result-box .model { margin: 0; }
.calc-status { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--caution); margin: 0 0 0.2rem; }
.calc-headline { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; line-height: 1.2; margin: 0 0 0.3rem; }
.calc-figure { font-family: var(--serif); font-size: 2.3rem; font-weight: 600; color: var(--primary-dark); margin: 0 0 0.3rem; line-height: 1.1; }
.calc-caveat { font-size: 0.95rem; color: var(--muted); }
.calc-next { margin: 0.9rem 0 1.2rem; }
.calc-sum { display: inline-block; margin: 0 0 0.6rem; padding: 0.3rem 0.6rem; border-radius: var(--r-sm); background: var(--tint); font-weight: 650; font-size: 0.98rem; }
.calc-luma { margin: 0.4rem 0 0; padding: 0.65rem 0.8rem; border-left: 3px solid var(--primary); background: var(--paper); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 0.98rem; }
.calc-luma a { font-weight: 700; }

/* ---------- Sidebar ---------- */
.sidebar { display: none; }
.toc-h { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.5rem; }
.toc a { display: block; padding: 0.4rem 0 0.4rem 0.85rem; border-left: 2px solid var(--line); color: var(--ink); text-decoration: none; font-size: 0.95rem; line-height: 1.35; transition: border-color 0.2s, color 0.2s; }
.toc a:hover { color: var(--primary); }
.toc a[aria-current="true"] { border-left: 3px solid var(--primary); color: var(--primary); font-weight: 700; padding-left: calc(0.85rem - 1px); }
.side-card { margin-top: 1.4rem; padding: 0.95rem 1rem; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); font-size: 0.93rem; }
.side-card ul { list-style: none; padding: 0; margin: 0; }
.side-card li + li { margin-top: 0; }
.side-dates li { display: grid; grid-template-columns: 1fr; padding: 0.45rem 0; border-top: 1px solid var(--line); }
.side-dates li:first-child { border-top: 0; padding-top: 0; }
.side-dates b { font-size: 0.98rem; }
.side-dates span { color: var(--muted); line-height: 1.35; }
.side-help a { display: block; padding: 0.3rem 0; line-height: 1.35; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cdd8da; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer a:focus-visible { outline-color: #fff; }
.footer-inner { display: grid; gap: 1.4rem; padding-top: 2rem; padding-bottom: 2rem; }
.footer-inner p { margin-bottom: 0.4rem; }
.footer-brand { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: #fff; }
.footer-h { font-weight: 700; color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0 0 0.6rem; }
.footer-links li + li { margin-top: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; }
.footer-fine { font-size: 0.86rem; color: #a9b8bb; }

/* ---------- Motion: start states exist only with JS and motion allowed ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-anim="rise"] { opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
  html.js [data-anim="rise"].is-in { opacity: 1; transform: none; }
  html.js .paths [data-anim="rise"]:nth-child(2) { transition-delay: 0.08s; }

  html.js .extra:not(.is-in) .extra-base { flex-basis: 100%; }
  html.js .extra:not(.is-in) .extra-plus { opacity: 0; }

  html.js .timeline-wrap:not(.is-in) .timeline-fill { height: 0; }
  html.js .datestrip:not(.is-in) .ds-fill, html.js .datestrip:not(.is-in) .ds-now, html.js .datestrip:not(.is-in) .ds-now-label { --now: 0% !important; }
  html.js .datestrip.is-in .ds-now::after { animation: ping 1.6s var(--ease) 1s 2; }

  html.js .fan:not(.is-in) .fan-list::before { transform: scaleY(0); }
  html.js .fan .fan-list::before { transition: transform 0.9s var(--ease); }
  html.js .fan:not(.is-in) .fan-item { opacity: 0; transform: translateX(-10px); }
  html.js .fan .fan-item { transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
  html.js .fan .fan-item:nth-child(2) { transition-delay: 0.12s; }
  html.js .fan .fan-item:nth-child(3) { transition-delay: 0.24s; }
  html.js .fan .fan-item:nth-child(4) { transition-delay: 0.36s; }

  html.js .catgrid:not(.compact):not(.is-in) li { opacity: 0; transform: translateY(10px); }
  html.js .catgrid:not(.compact) li { transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); transition-delay: calc(var(--i, 0) * 45ms); }

  html.js .luma-demo:not(.is-in) .ld-receipt { opacity: 0; transform: translateY(18px) rotate(-6deg); }
  html.js .luma-demo .ld-receipt { transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
  html.js .luma-demo:not(.is-in) .ld-chip { opacity: 0; transform: scale(0.6) translateX(-30px); }
  html.js .luma-demo .ld-chip { transition: opacity 0.35s var(--ease) 0.7s, transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) 0.7s; }
  html.js .luma-demo:not(.is-in) .ld-sum { opacity: 0; transform: translateY(10px); }
  html.js .luma-demo .ld-sum { transition: opacity 0.4s var(--ease) 1.25s, transform 0.4s var(--ease) 1.25s; }

  html.js .model:not(.is-in) .payout-fill, html.js .model:not(.is-in) .rail-fill { width: 0 !important; }
}
@keyframes ping { 0% { opacity: 0.8; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Large phone ---------- */
@media (min-width: 480px) {
  .wrap { padding: 0 1.4rem; }
  .cards, .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catgrid:not(.compact) li { grid-template-columns: 1fr; }
  .catgrid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  th, td { padding: 0.7rem 0.85rem; }
  .payout { grid-template-columns: 6.5rem 1fr; }
  .figures dd { font-size: 2rem; }
  .ds-stops { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
  .ds-stops li { display: block; font-size: 0.92rem; }
  .ds-stops b { display: block; }
  .ds-stops li:nth-child(2) { text-align: center; }
  .ds-stops li:last-child { text-align: right; }
}

/* ---------- Tablet / desktop ---------- */
@media (min-width: 769px) {
  body { font-size: 1.1rem; }
  h1 { font-size: 2.85rem; }
  h2 { font-size: 1.95rem; margin-top: 3.6rem; }
  .hero-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); column-gap: 3rem; align-items: start; padding-top: 1.4rem; padding-bottom: 2.6rem; }
  .hero-grid > .crumbs { grid-column: 1 / -1; margin-bottom: -0.6rem; }
  .hero-grid.no-aside { grid-template-columns: minmax(0, 1fr); }
  .hero-aside { padding-top: 0.9rem; }
  .hero .lead { font-size: 1.3rem; }
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .option-figure { font-size: 2.6rem; }
  .catgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main > .catgrid { max-width: none; }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
  .luma-offer { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; padding: 1.4rem; }
  .fan-list { padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0.9rem; }
  .fan-list::before, .fan-item::before { display: none; }
  .calc-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .calc-result-box { position: sticky; top: 1rem; }
  .main > .calc-wrap { max-width: none; }
  .model { padding: 1.4rem; }
  .extra { padding: 1.4rem; }
  .datestrip { padding: 1.4rem 1.4rem 1.2rem; }
}

@media (min-width: 960px) {
  .nav-desktop { display: block; }
  .nav-mobile { display: none; }
}

/* ---------- Desktop with sidebar ---------- */
@media (min-width: 1100px) {
  .page-grid.has-side { display: grid; grid-template-columns: minmax(0, var(--measure)) 17rem; gap: 4rem; justify-content: space-between; }
  .page-grid.has-side .main > .wide { max-width: var(--measure); }
  .sidebar { display: block; padding-top: 3rem; }
  .sidebar-inner { position: sticky; top: 1.2rem; }
  .has-side .toc-mobile { display: none; }
}

@media print {
  .disclosure, .site-header, .sidebar, .site-footer, .luma-offer, .toc-mobile, .related, .checks-tools { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .hero-band { background: none; border: 0; }
}
