/* Zuhause bereit — v0.4. Every colour, size, space and radius comes from DESIGN.md. */
:root {
  /* Neutrals */
  --bg: #faf9f5; --card: #fffefa; --surface: #f0f1e9; --surface-2: #e4e7d9; --line: #dedfd5; --line-strong: #7f8c79;
  /* Text */
  --ink: #203e32; --ink-2: #3c5246; --muted: #5f6a60;
  /* Brand */
  --accent: #294e3c; --accent-hover: #1d3c2e; --accent-active: #163024; --accent-ink: #fffefa;
  --sage-700: #5c6f58; --sage-500: #6e8f5d; --sage-100: #eef2e8;
  /* Status */
  --critical: #8a3412; --critical-bg: #f8e4da; --critical-mark: #c4683f;
  --gap: #7a5410; --gap-bg: #f6ecd2; --gap-mark: #a8791f;
  --ok: #2f5b33; --ok-bg: #e3eddc;
  --unknown: #565f58; --unknown-bg: #ebece5;
  /* Utility */
  --focus: #bc682e; --focus-on-dark: #f6d9a8; --on-accent-line: rgba(255, 255, 255, .5); --on-accent-2: #dfe8dc; --on-accent-fill: rgba(255, 255, 255, .08); --backdrop: rgba(32, 62, 50, .4);
  /* Type */
  --sans: Arial, Helvetica, sans-serif; --serif: Georgia, 'Times New Roman', serif; --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Radius */
  --r-1: 6px; --r-2: 8px; --r-3: 12px; --r-4: 16px; --pill: 99px;
  --arch-lg: 28px 28px 14px 14px; --arch-md: 22px 22px 12px 12px; --arch-sm: 18px 18px 10px 10px; --arch-xs: 14px 14px 8px 8px;
  /* Spacing: base 4. Stack = distance inside a scene group, group = distance between groups (phones: see media query) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --stack: var(--space-4); --stack-group: 40px;
  /* Controls */
  --control-h: 48px; --control-h-sm: 40px;
  /* Layout: header height, page gutter (16px, or the notch inset in landscape; needs viewport-fit=cover). Phones (see media query) get a 56px header, the action bar and the image band. */
  --header-h: 76px; --gutter: max(var(--space-4), env(safe-area-inset-left), env(safe-area-inset-right));
  --bar-h: 64px; --band-h: clamp(140px, 26svh, 220px); --band-pos: 50% 50%; --tile-ratio: 1;
  /* Motion */
  --t-fast: .15s; --t-base: .25s; --t-slow: .4s;
  /* Image placeholder: the brand mark, fill = --sage-700 */
  --house-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 36' fill='%235c6f58'%3E%3Cpath d='M0 36V16a16 16 0 0 1 32 0v20H27.5V17.864L16 6.364L4.5 17.864V36ZM12 36V31a4 4 0 0 1 8 0v5Z'/%3E%3C/svg%3E");
  font-family: var(--sans); font-size: 100%; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; overflow-wrap: anywhere; hyphens: auto; hyphenate-limit-chars: 14 6 5; } /* only long compounds break */
h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); line-height: 1.05; letter-spacing: -.03em; } /* Display */
h2 { font-size: clamp(1.875rem, 3.4vw, 2.875rem); line-height: 1.12; letter-spacing: -.025em; } /* H1 */
h3 { font-size: 1.1875rem; line-height: 1.35; letter-spacing: -.015em; } /* H3 */
em { font-family: var(--serif); font-weight: 400; color: var(--sage-700); }
p { line-height: 1.6; }
a { color: inherit; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { opacity: .4; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* Headings and regions get focus from the code so screen readers announce them (tabindex=-1). They are not controls: no ring. */
[tabindex="-1"]:focus-visible { outline: none; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--card); padding: 8px 12px; }
.icon { width: 22px; height: 22px; flex-shrink: 0; vertical-align: middle; }
.wrap { width: min(1240px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.eyebrow { font-size: .75rem; font-weight: 700; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; color: var(--sage-700); }
.lead { font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.lead strong, .purpose strong { color: var(--ink); }
.purpose { font-size: 1.125rem; line-height: 1.5; color: var(--ink-2); max-width: 32em; }

/* Buttons: primary, outline, text. Hover and press live under "States". */
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--control-h); padding: 10px 20px; border-radius: var(--r-2); font-size: 1rem; font-weight: 600; text-decoration: none; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-base), transform var(--t-fast); }
.button.primary { background: var(--accent); color: var(--accent-ink); }
.button.primary.is-ready { box-shadow: 0 0 0 2px var(--sage-500); transform: translateY(-1px); } /* an optional question is answered */
.button.outline { border: 1px solid var(--line-strong); background: var(--card); color: var(--accent); }
.button.small { min-height: var(--control-h-sm); padding: 8px 14px; font-size: .875rem; gap: 8px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; text-align: left; font-size: .9375rem; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 6px; transition: text-decoration-color var(--t-fast), transform var(--t-fast); }
.text-button.small { font-size: .875rem; }
.text-button .icon, .button .icon { width: 18px; height: 18px; }

/* Keycaps: 30 in options, 26 in buttons and notes, 36 as the number label */
.keycap { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 7px; border: 1px solid var(--line-strong); border-bottom-width: 3px; border-radius: var(--r-1); background: var(--card); font: 600 .875rem var(--mono); color: var(--ink); flex-shrink: 0; transition: transform .1s, border-bottom-width .1s; }
.button .keycap, .step-next .keycap, .quiz-note .keycap { min-width: 26px; height: 26px; font-size: .8125rem; }
.button.primary .keycap, .kc-option[aria-pressed=true] .keycap, .step-question .step-next .keycap, .step-intro .step-next .keycap { background: transparent; color: inherit; border-color: var(--on-accent-line); }
.kc-number .keycap { min-width: 36px; height: 36px; font-size: 1.0625rem; }
/* On touch screens, keycaps are noise, except where the keycap is the label (number buttons). */
@media (hover: none) and (pointer: coarse) {
  .keycap:not(.kc-number .keycap), .kbd-only { display: none; }
}
/* Copy for touch screens only ("Tippe auf Weiter."). */
@media not all and (hover: none) and (pointer: coarse) { .touch-only { display: none; } }

/* Fact: a muted caption under the lead, no rule. */
.fact { font-size: .875rem; line-height: 1.5; color: var(--muted); }
.fact .source, .horizon-note .source { padding: 16px 6px; margin: -16px -6px; font-size: .8125rem; color: var(--muted); text-decoration-color: var(--line-strong); text-underline-offset: 3px; white-space: nowrap; transition: color var(--t-fast); }

/* Header and footer */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
body[data-view=home] .site-header { position: relative; z-index: 3; }
body.story-end .site-header nav { display: none; } /* the CTA scene carries the action */
/* Logo: the mark stands on the text baseline, 1.1em tall (its walls = the Arial Bold stem), two walls from the name. */
.brand { display: inline-block; white-space: nowrap; line-height: 44px; font-size: 1.5rem; font-weight: 700; letter-spacing: -.0375em; color: var(--accent); text-decoration: none; }
.brand-mark { width: .978em; height: 1.1em; margin-right: .275em; vertical-align: baseline; }
.brand-dot { color: var(--sage-500); }
.brand.small { font-size: .9375rem; line-height: normal; color: inherit; } /* footer: quiet, in the footer's text colour */
.site-header nav { display: flex; align-items: center; gap: 16px; }
.site-header .text-button { white-space: nowrap; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 32px 0 40px; margin-top: 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.legal-links, .social-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
:is(.legal-links, .social-links) a { padding: 16px 6px; margin: -16px -6px; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: color var(--t-fast), text-decoration-color var(--t-fast); }

/* Boot, no-script and error screens */
.boot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 60vh; padding: var(--space-5) var(--gutter); text-align: center; color: var(--muted); }
.boot p { max-width: 32em; }

/* Landing: one scene per screen */
.story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "steps stage" "nav stage"; grid-template-rows: 1fr auto; width: min(1240px, calc(100% - 2 * var(--gutter))); margin-inline: auto; gap: 0 56px; min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); padding-bottom: 24px; }
.story-nav { grid-area: nav; display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 8px 24px; min-height: 44px; padding-bottom: 8px; }
.story[data-scene="0"] .story-nav { visibility: hidden; }
.story-progress { display: flex; gap: 4px; }
.story-progress i { width: 14px; height: 4px; border-radius: var(--r-1); background: var(--line); transition: background var(--t-base); }
.story-progress i.is-done { background: var(--accent); }
.story-back[hidden] { display: none; }
.story-go, .quiz-controls > .bar-progress { display: none; } /* action bar parts that exist on phones only */
.story-stage { grid-area: stage; display: grid; place-items: center; }
/* Image frame: a placeholder house until the image is in; only the incoming image fades, the outgoing one stays underneath. */
.stage-frame { position: relative; margin: 0; width: 100%; aspect-ratio: 1; max-height: min(calc(100svh - 140px), 640px); max-width: min(calc(100svh - 140px), 640px); border-radius: var(--arch-lg); overflow: hidden; background: var(--surface-2) var(--house-icon) center / 64px no-repeat; }
.stage-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0s .6s; }
.stage-frame img.is-active { z-index: 1; }
.stage-frame img.is-active.is-loaded { opacity: 1; transition: opacity .6s ease; }
.stage-frame img.is-broken, .stage-frame.is-broken img.is-active { visibility: hidden; }
.story-steps { grid-area: steps; display: grid; align-content: center; }
.step { padding: 24px 0; }
.step[hidden] { display: none; }
/* Scene rhythm: --stack inside a group, --stack-group between groups. Groups: purpose line | headline with lead, fact and list | question with its options | callout (also the answer feedback of a plain question) | action. */
.step-inner { display: grid; gap: var(--stack); max-width: 520px; animation: scene-in .55s ease both; }
.step-inner > :is(.purpose + h1, :not(h1) + .lq, .lq-card, .for-you, .step-next, .cta-actions, .step-other) { margin-top: calc(var(--stack-group) - var(--stack)); }
.lq-plain > .lq-feedback { margin-top: calc(var(--stack-group) - var(--space-3)); } /* the answer callout of an unboxed question is its own group */
.stage-choice + .lq-plain > .lq-feedback { margin-top: 0; } /* phones: the tiles are the options, so the question block already starts the callout's group */
.step h1, .step h2 { outline: none; }
@keyframes scene-in { from { opacity: 0; transform: translateY(14px); } }
/* The first question waits with a blinking cursor until it is answered. */
.step-intro h1::after { content: ""; display: inline-block; width: .1em; height: .85em; margin-left: .12em; vertical-align: -.05em; background: var(--accent); animation: caret 1.1s steps(1) infinite; }
.story.has-home .step-intro h1::after { display: none; }
@keyframes caret { 50% { opacity: 0; } }
.step-kicker { display: flex; justify-content: space-between; gap: var(--space-4); align-items: baseline; } /* type from .eyebrow */
.step-kicker i { font-style: normal; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

/* Scene 0: the two buildings are the answer to "Wie wohnst du?" */
.stage-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; max-width: min(calc(100svh - 140px), 640px); }
.choice-tile { position: relative; padding: 0; border: 1px solid var(--line); border-radius: var(--arch-md); overflow: hidden; background: var(--surface-2) var(--house-icon) center / 48px no-repeat; cursor: pointer; aspect-ratio: var(--tile-ratio); transition: transform var(--t-fast) ease, border-color var(--t-base) ease; }
.choice-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.choice-tile.is-broken img { visibility: hidden; }
.choice-tile:focus-visible { border-color: var(--accent); }
.choice-tile[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.choice-caption { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: var(--r-2); background: var(--card); color: var(--ink); font-size: .9375rem; font-weight: 600; text-align: left; }
.story[data-scene="0"] .stage-frame { display: none; }
.story:not([data-scene="0"]) .stage-choice { display: none; }
/* Wide screens: before the answer the tiles are the options; after it the image replaces them and the option row appears. Phones keep the tiles. */
@media (min-width: 821px) {
  .story[data-scene="0"].has-home .stage-choice { display: none; }
  .story[data-scene="0"].has-home .stage-frame { display: block; }
  .story:not(.has-home) .home-options { display: none; }
}

/* Callout: feedback, "Für euch heißt das", reveals. Optional label, optional serif lead line, then text. */
.for-you, .lq-feedback, .lq-figure, .reveal { display: grid; gap: 6px; padding: 16px 18px; border-radius: var(--r-3); background: var(--sage-100); border-left: 3px solid var(--sage-500); animation: rise var(--t-slow) ease; }
.lq-feedback:empty, .lq-figure:empty { display: none; }
.for-you > span, .reveal > span { font-size: .8125rem; font-weight: 700; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; color: var(--sage-700); }
.lq-feedback strong, .lq-figure strong { font: italic 400 1.625rem/1.2 var(--serif); color: var(--ink); }
.for-you p, .reveal p, .lq-feedback span, .lq-figure span { font-size: 1.0625rem; line-height: 1.5; color: var(--ink-2); }
.for-you p strong { color: var(--ink); }
.reveal.figure { background: var(--gap-bg); border-left-color: var(--gap-mark); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* Landing questions */
.lq { display: grid; gap: var(--space-3); padding: 24px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--card); }
.lq-plain { padding: 0; border: 0; border-radius: 0; background: none; }
.lq-card { display: grid; gap: 20px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--card); } /* several plain questions in one box */
.lq-card .lq, .lq-card .lq-follow .lq { margin-top: 0; }
.lq-title { font-size: 1.25rem; font-weight: 600; line-height: 1.35; }
.lq-hint { color: var(--muted); font-size: .9375rem; margin-top: -4px; }
.lq-options { display: flex; flex-wrap: wrap; gap: 10px; }
.kc-option { text-align: left; display: inline-flex; align-items: center; gap: 10px; min-height: var(--control-h); min-width: 48px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg); font-size: 1rem; font-weight: 600; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.kc-option[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kc-option.key-pressed .keycap, .answer.key-pressed .keycap { transform: translateY(2px); border-bottom-width: 1px; }
.kc-number { padding: 6px; min-width: 52px; justify-content: center; }
.lq-follow[hidden] { display: none; }
.lq-follow .lq { margin-top: -8px; }
.step-question .lq { gap: 16px; }
/* "Weiter" on every scene: keycap on desktop, arrow on touch screens. Outline by default, filled on question scenes. */
.step-next { justify-self: start; display: inline-flex; align-items: center; gap: 12px; min-height: var(--control-h); padding: 10px 14px 10px 20px; border: 1px solid var(--accent); border-radius: var(--r-2); color: var(--accent); font-size: 1rem; font-weight: 600; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.step-next .touch-only { width: 18px; height: 18px; }
.step-next[hidden] { display: none; }
.step-question .step-next, .step-intro .step-next { background: var(--accent); color: var(--accent-ink); animation: rise var(--t-slow) ease both; }
.cta-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 1.125rem; }
.cta-list li { display: flex; gap: 10px; align-items: center; }
.cta-list .icon { color: var(--sage-500); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.cta-secondary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.cta-secondary .text-button { color: var(--muted); }

/* Recessed band: full-width --surface with a --line hairline on top, behind an element that keeps its own width.
   The band is drawn as border-image outset, which never widens the page. On the start page: the FAQ and the footer. */
.recessed { border-image: linear-gradient(var(--line) 0 1px, var(--surface) 0) fill 0 / 0 / 0 100vmax; }
.site-footer.recessed { margin-top: 0; }
.faq { max-width: 860px; padding: var(--space-8) 0; }
.faq h2 { margin-bottom: var(--space-3); }
.faq-intro { color: var(--ink-2); max-width: 42em; }
.faq h3 { margin: var(--stack-group) 0 var(--space-3); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-size: 1.125rem; font-weight: 600; cursor: pointer; list-style: none; text-decoration: underline transparent; text-underline-offset: 6px; transition: text-decoration-color var(--t-fast); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon, .more summary .icon, .method summary .icon { transition: transform var(--t-base); }
.faq details[open] summary .icon, .more[open] summary .icon, .method[open] summary .icon { transform: rotate(45deg); }
.faq-answer { display: grid; gap: var(--space-2); padding: 0 0 20px; color: var(--ink-2); max-width: 42em; }

/* Questionnaire */
.quiz { display: grid; grid-template-columns: minmax(0, 1fr) 240px; grid-template-areas: "panel side"; gap: clamp(32px, 5vw, 72px); padding: 32px 0 0; align-items: start; }
.quiz-panel { grid-area: panel; width: 100%; max-width: 800px; display: grid; gap: 16px; padding: 32px; border: 1px solid var(--line); border-radius: var(--r-4); background: var(--card); }
/* The side column stays quiet so the question keeps the focus. */
.quiz-side { grid-area: side; display: grid; gap: 20px; position: sticky; top: 24px; padding-top: 32px; color: var(--muted); }
@media (max-width: 1000px) {
  .quiz { grid-template-columns: minmax(0, 1fr); grid-template-areas: "panel" "side"; gap: 16px; }
  .quiz-panel { max-width: none; }
  .quiz-side { position: static; padding-top: 0; }
  .quiz-groups, .quiz-context { display: none; }
}
.quiz-side .eyebrow { color: var(--muted); }
.quiz-groups { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.quiz-groups li { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-left: 2px solid var(--line); color: var(--muted); font-size: .875rem; }
.quiz-groups li span { width: 18px; display: inline-grid; } .quiz-groups li .icon { width: 16px; height: 16px; color: var(--sage-500); }
.quiz-groups li.current { border-left-color: var(--accent); color: var(--ink); font-weight: 600; }
.quiz-context { display: grid; gap: 6px; padding: 16px 0 0; border-top: 1px solid var(--line); }
.quiz-context .icon { display: none; } .quiz-context h3 { font-size: .9375rem; font-weight: 600; color: var(--ink-2); } .quiz-context p { font-size: .875rem; line-height: 1.5; }
.quiz-legal { display: none; font-size: .8125rem; } /* phones only: stands in for the footer, which the quiz hides there */
.quiz-privacy { display: flex; gap: 8px; font-size: .8125rem; color: var(--muted); line-height: 1.5; } .quiz-privacy .icon { width: 18px; }
.quiz-meta { display: flex; justify-content: space-between; gap: 16px; font-size: .875rem; color: var(--muted); }
.quiz-progress { height: 4px; background: var(--surface-2); border-radius: var(--pill); overflow: hidden; } .quiz-progress div { height: 100%; background: var(--accent); transition: width var(--t-base); }
.quiz-panel h1 { font-size: clamp(1.875rem, 3.4vw, 2.875rem); letter-spacing: -.025em; line-height: 1.12; margin-top: 8px; outline: none; } /* H1 step */
.quiz-hint { color: var(--muted); font-size: 1.0625rem; margin-top: -4px; }
.answers { display: grid; gap: 10px; margin-top: 6px; }
.answer { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 16px 10px 12px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg); text-align: left; font-size: 1.0625rem; transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.answer-label { flex: 1; }
.answer-mark { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; }
.answers.multi .answer-mark { border-radius: var(--r-1); }
.answer.selected { border-color: var(--accent); background: var(--sage-100); box-shadow: inset 0 0 0 1px var(--accent); }
.answer.selected .answer-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .answer-mark .icon { width: 16px; height: 16px; }
.quiz-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .875rem; color: var(--muted); }
.reveals { display: grid; gap: 10px; }
.quiz-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 6px; }

/* Results */
.results { display: grid; gap: 56px; padding-top: 24px; }
.results h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); } /* Display, capped */
.example-tag { padding: 6px 12px; border-radius: var(--pill); background: var(--gap-bg); color: var(--gap); border: 1px dashed var(--gap-mark); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.results-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.results-top > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.results-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.results-hero > div:first-child { display: grid; gap: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 6px 12px; border-radius: var(--pill); background: var(--surface); font-size: .875rem; font-weight: 600; } /* large chip */
.horizon { display: grid; gap: 12px; padding: 20px; border-radius: var(--r-3); background: var(--surface); }
.horizon > p:first-child { font-weight: 600; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: var(--r-2); background: var(--card); border: 1px solid var(--line); overflow: visible; }
.segmented button { min-height: 44px; padding: 0 var(--space-1); white-space: nowrap; border-radius: var(--r-1); font-size: .875rem; font-weight: 600; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.segmented button:focus-visible { position: relative; z-index: 1; outline-offset: 1px; }
.segmented button[aria-checked=true] { background: var(--accent); color: var(--accent-ink); }
.horizon-note { font-size: .875rem; color: var(--ink-2); }
.block { display: grid; gap: 24px; }
.block-head { display: grid; gap: 6px; max-width: 760px; }
.block-head p { color: var(--ink-2); }
.line-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.line-card { display: grid; gap: 8px; align-content: start; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--card); }
.line-card.status-critical { border-left: 4px solid var(--critical-mark); }
.line-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.line-top > .icon { width: 26px; height: 26px; color: var(--sage-700); }
.pill { padding: 4px 10px; border-radius: var(--pill); font-size: .8125rem; font-weight: 700; }
.pill.status-critical { background: var(--critical-bg); color: var(--critical); }
.pill.status-gap { background: var(--gap-bg); color: var(--gap); }
.pill.status-ok { background: var(--ok-bg); color: var(--ok); }
.pill.status-unknown { background: var(--unknown-bg); color: var(--unknown); }
.line-summary { font-size: 1.0625rem; font-weight: 600; }
.line-detail { font-size: .9375rem; color: var(--ink-2); }
.cover-bar { height: 6px; border-radius: var(--pill); background: var(--surface); overflow: hidden; }
.cover-bar div { height: 100%; background: var(--gap-mark); }
.status-ok .cover-bar div { background: var(--sage-500); } .status-critical .cover-bar div { background: var(--critical-mark); }
/* Timeline: when | dot | text; the rule runs through the dot centre. */
.timeline { --when: 110px; --tl-gap: 12px; list-style: none; margin: 0; padding: 0; display: grid; max-width: 780px; }
.timeline li { display: grid; grid-template-columns: var(--when) 28px minmax(0, 1fr); gap: var(--tl-gap); align-items: start; padding-bottom: 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(var(--when) + var(--tl-gap) + 13.5px); top: 22px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .when { font-size: .875rem; font-weight: 700; color: var(--sage-700); padding-top: 3px; }
.timeline .dot { width: 22px; height: 22px; margin: 2px 3px; border-radius: 50%; border: 2px solid var(--critical-mark); background: var(--card); display: grid; place-items: center; z-index: 1; }
.timeline .covered .dot { border-color: var(--sage-500); background: var(--sage-500); color: var(--accent-ink); } .timeline .dot .icon { width: 13px; height: 13px; }
.timeline .covered p { color: var(--ok); }
.action-list { display: grid; gap: 12px; }
.action { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--card); }
.action-nr { font: 400 1.875rem var(--serif); color: var(--sage-700); }
.action > div { display: grid; gap: 8px; }
.action-meta { display: flex; flex-wrap: wrap; gap: 8px; } .action-meta span { padding: 4px 10px; border-radius: var(--pill); background: var(--surface); font-size: .8125rem; font-weight: 600; } /* chip */
.action p { color: var(--ink-2); max-width: 46em; }
/* Answers the action follows from: quiet panel, question in --muted, chosen option in --ink. */
.action-basis { display: grid; gap: var(--space-1); padding: var(--space-3) var(--space-4); border-radius: var(--r-2); background: var(--surface); font-size: .875rem; line-height: 1.5; color: var(--muted); max-width: 46em; }
.action-basis ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.action-basis li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); }
.action-basis .text-button { flex-shrink: 0; }
.action-basis strong { font-weight: 600; color: var(--ink); }
.action-done { display: inline-flex; align-items: center; gap: 8px; font-size: .9375rem; font-weight: 600; min-height: 44px; cursor: pointer; }
.action-done input { width: 20px; height: 20px; accent-color: var(--accent); }
.action.is-done h3 { text-decoration: line-through; color: var(--muted); }
.more summary, .method summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; list-style: none; text-decoration: underline transparent; text-underline-offset: 6px; transition: text-decoration-color var(--t-fast); }
.more summary::-webkit-details-marker, .method summary::-webkit-details-marker { display: none; }
.more[open] .action-list { margin-top: 12px; }
.shopping ul, .unknowns ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 780px; }
.shopping li { display: flex; gap: 10px; align-items: center; font-size: 1.0625rem; } .shopping .icon { color: var(--sage-500); }
.unknowns li { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 16px; border-radius: var(--r-3); background: var(--surface); }
/* Affiliate block (src/affiliate.js): criteria first, then example links marked as Werbelink. */
.affiliate { padding: var(--space-6); border-radius: var(--r-4); border: 1px solid var(--line); background: var(--card); }
.affiliate-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-6); }
.affiliate-body > div { display: grid; gap: var(--space-3); align-content: start; }
.affiliate h3 { font-size: 1.125rem; }
.affiliate ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.affiliate-criteria li { color: var(--ink-2); line-height: 1.5; } .affiliate-criteria strong { color: var(--ink); }
.affiliate-products li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-3); align-items: start; padding: var(--space-3) var(--space-4); border-radius: var(--r-3); background: var(--surface); }
.affiliate-products a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; font-weight: 600; color: var(--accent); text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.affiliate-products p { grid-column: 1 / -1; font-size: .9375rem; color: var(--ink-2); }
.affiliate-tag { align-self: center; padding: 2px var(--space-2); border-radius: var(--pill); background: var(--unknown-bg); color: var(--unknown); font-size: .75rem; font-weight: 700; }
.affiliate-note { font-size: .875rem; color: var(--muted); }
/* Email block: the only dark surface; its button is light and its focus ring is light. */
.email { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 32px; border-radius: var(--r-4); background: var(--accent); color: var(--accent-ink); }
.email > div { display: grid; gap: 12px; align-content: start; } .email > div .icon { width: 30px; height: 30px; } .email p { color: var(--on-accent-2); }
.email .cta-list { margin-top: var(--space-2); font-size: 1rem; color: var(--accent-ink); } .email .cta-list .icon { width: 18px; height: 18px; color: var(--on-accent-2); } /* benefits on the dark surface */
.email form { display: grid; gap: 12px; }
.email label { font-weight: 600; }
.email :is(input[type=email], input[name=plz]) { min-height: var(--control-h); padding: 0 14px; border-radius: var(--r-2); border: 0; background: var(--card); font: inherit; color: var(--ink); }
.email .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9375rem; line-height: 1.5; }
.email .check input { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--sage-500); }
.email .button.primary { justify-self: start; }
/* Postcode for warning emails: only shown once the warnings box is ticked. */
.alert-plz { display: grid; gap: 8px; } .email input[name=plz] { max-width: 10rem; }
.email form:has([name=alerts]:not(:checked)) .alert-plz { display: none; }
/* Free extras (reminders, tips, warnings): a lighter box that opens once the address is valid and the plan consent is ticked. */
.extras { display: none; gap: 12px; padding: 16px; border: 1px solid var(--on-accent-line); border-radius: var(--r-3); background: var(--on-accent-fill); }
.email form:has(#email:valid):has([name=consent]:checked) .extras { display: grid; animation: rise var(--t-slow) ease-out; }
.extras-head { display: grid; gap: 4px; } .extras-head h3 { font-size: 1.125rem; } .extras-head p { font-size: .9375rem; }
/* Dark surfaces (email block, save bar, the share pane beside the email block): light buttons, light focus ring. */
:is(.email, .save-bar) .button.primary { background: var(--card); color: var(--accent); }
:is(.email, .save-bar, .save-share) :focus-visible { outline-color: var(--focus-on-dark); }
.email .check a { color: inherit; }
.email .form-done { display: grid; gap: 8px; align-content: start; } .email .form-done h3 { font-size: 1.25rem; } .email .form-done strong { color: var(--accent-ink); }
/* Honeypot: off screen and hidden from assistive tech; only bots fill it. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Status line on the results page after arriving through an email link. */
.notice { padding: 12px 16px; border-radius: var(--r-3); background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.notice.is-error { background: var(--gap-bg); color: var(--gap); }
.save-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 16px 16px 16px 20px; border-radius: var(--r-3); background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.save-bar > span { display: inline-flex; align-items: center; gap: 10px; } .save-bar > span .icon { color: var(--on-accent-2); }
.form-note { font-size: .875rem; }
.form-note.is-error { display: flex; align-items: center; gap: 8px; color: var(--focus-on-dark); font-weight: 600; }
.form-note.is-error::before { content: "!"; display: inline-grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--focus-on-dark); color: var(--accent); font-weight: 700; }
.results-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.method { max-width: 780px; color: var(--ink-2); } .method p { margin-top: 10px; font-size: .9375rem; }
.empty { color: var(--ink-2); }

/* Sharing */
.share, .handover-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px 40px; padding: 28px 32px; border-radius: var(--r-4); background: var(--surface); }
.share > div:first-child, .handover-cta > div { display: grid; gap: 8px; }
.share p, .handover-cta p { color: var(--ink-2); max-width: 36em; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.share-buttons .button { gap: 10px; justify-content: center; text-decoration: none; }
.share-buttons [hidden] { display: none; }
/* Email block and share section in one dark panel: two thirds email, one third sharing. */
.save-share { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); border-radius: var(--r-4); background: var(--accent); color: var(--accent-ink); }
.save-share .email { border-radius: 0; background: none; }
.save-share .share { grid-template-columns: minmax(0, 1fr); align-content: start; border-radius: 0 var(--r-4) var(--r-4) 0; background: var(--accent-hover); } /* a shade darker than the email block */
.save-share .share p { color: var(--on-accent-2); }
.save-share .share-buttons { display: grid; }
.cta-share { justify-self: start; color: var(--muted); }
.cta-share .icon { width: 16px; height: 16px; }

/* Card, dialog and legal section titles */
.email h2, .share h2, .handover-cta h2, .share-dialog h2, .prompt-dialog h2, .review h2, .legal h2 { font-size: clamp(1.375rem, 4vw, 1.75rem); line-height: 1.2; letter-spacing: -.02em; }

/* Legal pages: same chrome as the app, left-aligned column. */
.legal { display: grid; grid-template-columns: minmax(0, 760px); gap: 16px; padding: 24px 0 0; }
.legal h1 { font-size: clamp(1.875rem, 9vw, 2.875rem); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 8px; }
.legal h2 { margin-top: 16px; }
.legal p { color: var(--ink-2); }
.legal-lead { font-size: 1.125rem; }
/* Ordering warnings on the settings page (api/manage.js). */
.alert-order { display: grid; gap: 10px; justify-items: start; max-width: 560px; }
.alert-order input[name=plz] { min-height: var(--control-h); width: 10rem; padding: 0 14px; border-radius: var(--r-2); border: 1px solid var(--line-strong); background: var(--card); font: inherit; color: var(--ink); }
.alert-order .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink-2); }
.alert-order .check input { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.legal .legal-draft { padding: 12px 16px; border-radius: var(--r-3); background: var(--gap-bg); color: var(--gap); font-size: .875rem; font-weight: 600; }
.legal-tag { font-size: .75rem; font-weight: 700; letter-spacing: .04em; padding: 4px 8px; border-radius: var(--pill); background: var(--surface); color: var(--muted); vertical-align: middle; }
.legal-date { font-size: .875rem; }
/* Contact form in the imprint: light surface, fields in the card colour. */
.contact-form { display: grid; gap: 8px; max-width: 560px; }
.contact-form label { font-weight: 600; margin-top: 8px; }
.contact-form :is(input, textarea) { min-height: var(--control-h); padding: 10px 14px; border-radius: var(--r-2); border: 1px solid var(--line-strong); background: var(--card); font: inherit; color: var(--ink); }
.contact-form textarea { resize: vertical; }
.contact-form .form-note { margin-top: 8px; }
.contact-form .button.primary { justify-self: start; }
.todo { background: var(--gap-bg); padding: 0 4px; border-radius: var(--r-1); }

/* Content pages (search pages, generated by tools/pages.mjs): one reading column, text 65ch, figure and boxes up to 760px. */
.article { display: grid; grid-template-columns: minmax(0, 760px); gap: var(--space-5); padding: var(--space-4) 0 0; }
.article h1 { font-size: clamp(1.875rem, 7vw, 2.875rem); line-height: 1.12; letter-spacing: -.025em; }
.article h2 { font-size: clamp(1.375rem, 4vw, 1.75rem); line-height: 1.2; letter-spacing: -.02em; }
.article .lead { font-size: 1.1875rem; max-width: 65ch; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: .875rem; color: var(--muted); }
.breadcrumb a { padding: 12px 0; margin: -12px 0; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.breadcrumb [aria-current] { overflow-wrap: anywhere; }
.article-figure { margin: 0; border-radius: var(--arch-md); overflow: hidden; background: var(--surface-2); }
.article-figure img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.article-body { display: grid; gap: var(--space-4); }
.article-body > section { display: grid; gap: var(--space-3); }
.article-body h2 { margin-top: var(--space-4); }
.article-body p, .article-body li { color: var(--ink-2); max-width: 65ch; }
.article-body li { line-height: 1.6; }
.article-body ul, .article-body ol { display: grid; gap: var(--space-2); margin: 0; padding-left: 1.25em; }
.article-body a, .related a, .sources a { text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
/* Check box: the step into the check, after the answer. A callout-like card in the page's column. */
.check-box { display: grid; gap: var(--space-3); justify-items: start; padding: var(--space-5); border-radius: var(--r-3); background: var(--sage-100); border-left: 3px solid var(--sage-500); }
.check-box p { color: var(--ink-2); max-width: 55ch; }
.check-box .check-privacy { display: flex; gap: var(--space-2); font-size: .8125rem; color: var(--muted); } .check-privacy .icon { width: 18px; height: 18px; }
.article .faq { max-width: none; padding: 0; }
.article .faq h2 { margin-bottom: var(--space-3); }
.related ul, .sources ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.related h2, .sources h2 { margin-bottom: var(--space-3); }
.related a { display: inline-block; padding: 10px 0; font-weight: 600; }
.sources { display: grid; gap: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.sources .fact a { color: var(--muted); }
@media (max-width: 480px) { .check-box { padding: var(--space-4); } }
/* Chronicle (/chronik and the teaser on guide pages). Filter: radio chips; :has() hides entries without the chosen supply line, no script. */
.chronik-filter { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.chronik-filter legend { padding: 0; margin-bottom: var(--space-2); font-size: .875rem; color: var(--muted); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); }
.filter-chip { position: relative; display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; }
.filter-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.filter-chip span { padding: 6px 12px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line); font-size: .875rem; font-weight: 600; transition: background var(--t-fast), border-color var(--t-fast); }
.filter-chip:hover span { border-color: var(--line-strong); }
.filter-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.filter-chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.chronik { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-5); }
.article-body .chronik { padding: 0; margin-top: var(--space-5); gap: var(--space-6); }
.chronik-entry { display: grid; gap: var(--space-2); padding-left: var(--space-4); border-left: 2px solid var(--line); scroll-margin-top: var(--space-4); }
.chronik-entry:target { border-left-color: var(--sage-500); }
.chronik-entry h3 { font-size: 1.1875rem; line-height: 1.3; }
.chronik-when { font-size: .875rem; font-weight: 600; color: var(--sage-700); }
.article-body .chronik-scale { color: var(--ink); font-weight: 600; }
.article-body .chronik-lines { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chronik-lines li { padding: 4px 10px; border-radius: var(--pill); background: var(--surface); font-size: .8125rem; font-weight: 600; color: var(--ink-2); line-height: 1.4; } /* chip */
.chronik-entry .fact a { color: var(--muted); }
.source-type { white-space: nowrap; }
.chronik-wrap > .fact { margin-top: var(--space-4); }
.chronik-wrap:has(input[value="power"]:checked) .chronik-entry:not([data-lines~="power"]),
.chronik-wrap:has(input[value="water"]:checked) .chronik-entry:not([data-lines~="water"]),
.chronik-wrap:has(input[value="waste"]:checked) .chronik-entry:not([data-lines~="waste"]),
.chronik-wrap:has(input[value="heat"]:checked) .chronik-entry:not([data-lines~="heat"]),
.chronik-wrap:has(input[value="hot"]:checked) .chronik-entry:not([data-lines~="hot"]),
.chronik-wrap:has(input[value="food"]:checked) .chronik-entry:not([data-lines~="food"]),
.chronik-wrap:has(input[value="comm"]:checked) .chronik-entry:not([data-lines~="comm"]),
.chronik-wrap:has(input[value="cash"]:checked) .chronik-entry:not([data-lines~="cash"]),
.chronik-wrap:has(input[value="med"]:checked) .chronik-entry:not([data-lines~="med"]),
.chronik-wrap:has(input[value="mobility"]:checked) .chronik-entry:not([data-lines~="mobility"]) { display: none; }
.chronik-teaser { display: grid; gap: var(--space-3); padding: var(--space-5); border-radius: var(--r-3); border: 1px solid var(--line); background: var(--card); }
.chronik-teaser ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.chronik-teaser li { display: grid; gap: 2px; }
.chronik-teaser li a { display: grid; gap: 2px; padding: 4px 0; text-decoration: none; }
.chronik-teaser-title { font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.chronik-teaser li a:hover .chronik-teaser-title { text-decoration-color: currentColor; }
.chronik-teaser > p a { font-weight: 600; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
@media (max-width: 480px) { .chronik-teaser { padding: var(--space-4); } }

/* Dialogs: share and review. Fade in and out. */
dialog { opacity: 0; transition: opacity var(--t-base), overlay var(--t-base) allow-discrete, display var(--t-base) allow-discrete; }
dialog[open] { opacity: 1; }
@starting-style { dialog[open] { opacity: 0; } }
dialog::backdrop { background: var(--backdrop); opacity: 0; transition: opacity var(--t-base), overlay var(--t-base) allow-discrete, display var(--t-base) allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style { dialog[open]::backdrop { opacity: 0; } }
dialog.prompt-dialog { width: min(520px, calc(100% - 2 * var(--gutter))); padding: 28px; border: 0; border-radius: var(--r-4); background: var(--card); color: var(--ink); }
.prompt-dialog p { margin-top: 12px; }
.prompt-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
dialog.share-dialog { width: min(560px, calc(100% - 2 * var(--gutter))); padding: 0; border: 0; border-radius: var(--r-4); background: var(--card); color: var(--ink); }
.share-dialog .share { grid-template-columns: minmax(0, 1fr); padding: 28px; background: none; }
dialog.review { width: min(640px, calc(100% - 2 * var(--gutter))); max-height: 85vh; max-height: 85dvh; padding: 28px; border: 0; border-radius: var(--r-4); background: var(--card); color: var(--ink); }
.share-dialog h2, .prompt-dialog h2, .review h2, dialog > .eyebrow { padding-right: 48px; } /* room for the close button */
.dialog-close { position: absolute; right: 16px; top: 12px; z-index: 1; width: 44px; height: 44px; border-radius: var(--r-2); font-size: 1.75rem; transition: background var(--t-fast), transform var(--t-fast); }
.review h2 { margin: 8px 0 16px; }
.review-list { display: grid; }
.review-list button { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 8px; margin: 0 -8px; border-bottom: 1px solid var(--line); text-align: left; transition: background var(--t-fast); }
.review-list span { display: grid; gap: 2px; font-size: .9375rem; color: var(--muted); } .review-list strong { color: var(--ink); font-size: 1rem; }

/* States: hover only on devices that hover (no sticky hover after a tap). */
@media (hover: hover) {
  .button.primary:hover:not(:disabled) { background: var(--accent-hover); }
  .button.outline:hover:not(:disabled) { border-color: var(--accent); background: var(--sage-100); }
  :is(.email, .save-bar) .button.primary:hover:not(:disabled) { background: var(--sage-100); color: var(--accent); }
  .text-button:hover:not(:disabled) { text-decoration-color: currentColor; }
  .kc-option:hover { border-color: var(--line-strong); }
  .kc-option[aria-pressed=true]:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .answer:hover { border-color: var(--line-strong); }
  .answer.selected:hover { border-color: var(--accent); }
  .segmented button:hover:not([aria-checked=true]) { background: var(--sage-100); }
  .step-next:hover { background: var(--accent); color: var(--accent-ink); }
  .step-next:hover .keycap { background: transparent; color: inherit; border-color: var(--on-accent-line); }
  .step-question .step-next:hover, .step-intro .step-next:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .choice-tile:hover { transform: translateY(-2px); border-color: var(--accent); }
  .dialog-close:hover { background: var(--surface); }
  .review-list button:hover { background: var(--sage-100); }
  .faq summary:hover, .more summary:hover, .method summary:hover { text-decoration-color: var(--line-strong); }
  .legal-links a:hover, .site-footer a:hover, .fact .source:hover { color: var(--ink); text-decoration-color: currentColor; }
}
/* Pressed: 1px down, darker fill where there is a fill. */
.button:active:not(:disabled), .text-button:active:not(:disabled), .step-next:active, .kc-option:active, .answer:active, .segmented button:active, .dialog-close:active, .choice-tile:active { transform: translateY(1px); }
.button.primary:active:not(:disabled), .step-next:active, .kc-option[aria-pressed=true]:active, .segmented button[aria-checked=true]:active { background: var(--accent-active); border-color: var(--accent-active); color: var(--accent-ink); }
.step-next:active .keycap { background: transparent; color: inherit; border-color: var(--on-accent-line); }
.button.outline:active:not(:disabled), .kc-option:not([aria-pressed=true]):active, .answer:not(.selected):active, .segmented button:not([aria-checked=true]):active, .dialog-close:active, .review-list button:active { background: var(--surface-2); }
:is(.email, .save-bar) .button.primary:active:not(:disabled) { background: var(--surface-2); color: var(--accent); }

/* Mobile: every landing scene is header | image band | content | action bar. */
@media (max-width: 820px) {
  :root { --stack-group: var(--space-6); --header-h: 56px; --tile-ratio: 5 / 4; scroll-padding-bottom: calc(var(--bar-h) + var(--space-4)); }
  .site-header nav [data-action="example"] { display: none; }
  /* Once the check is under way (landing past the first scene, the quiz) there is nothing below it to scroll into.
     The first scene and the results keep the FAQ and the footer. */
  body.story-started :is(.faq, .site-footer), body[data-view=quiz] .site-footer { display: none; }
  .brand { font-size: 1.3125rem; }
  .site-header .button.small { min-height: var(--control-h-sm); padding: 8px 12px; font-size: .875rem; }
  .story { display: flex; flex-direction: column; width: 100%; min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); min-height: calc(100dvh - var(--header-h)); padding: 0 var(--gutter); }
  .story-stage { display: block; }
  /* Image band: same size and place on every scene; the tiles are the image on scene 0. */
  .stage-frame { width: 100%; height: var(--band-h); aspect-ratio: auto; max-width: none; max-height: none; margin-top: var(--space-2); border-radius: var(--arch-sm); background-size: 40px; }
  .stage-frame img { object-position: var(--band-pos); }
  .story-steps { flex: 1; align-content: start; }
  .step { padding: var(--space-5) 0; }
  .lead { font-size: 1.0625rem; }
  .purpose { font-size: 1rem; }
  .lq:not(.lq-plain), .lq-card { padding: 16px; }
  .step-next, .cta-actions { display: none; } /* the action bar carries them */
  .home-options { display: none; } /* the tiles are the options */
  .stage-choice { max-width: none; gap: var(--space-3); }
  .choice-tile { border-radius: var(--arch-xs); background-size: 32px; }
  .choice-caption { left: 8px; bottom: 8px; max-width: calc(100% - 24px); font-size: clamp(.75rem, 3.5vw, .9375rem); }
  /* Action bar: back icon and progress left, primary action right. Sticks to the bottom of its scene. */
  .action-bar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-3); min-height: var(--bar-h); margin: 0 calc(-1 * var(--gutter)); padding: var(--space-2) var(--gutter) calc(var(--space-2) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
  .story[data-scene="0"] .story-nav { visibility: visible; }
  .action-bar .bar-back { order: 1; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; min-height: 0; border-radius: var(--r-2); text-decoration: none; }
  .action-bar .bar-back[hidden] { display: inline-flex; visibility: hidden; } /* keeps the bar from shifting on scene 0 */
  .action-bar .bar-back .icon { width: 22px; height: 22px; }
  .bar-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .action-bar .bar-progress { order: 2; display: flex; flex: 1; min-width: 0; gap: 0; height: 4px; background: var(--surface-2); border-radius: var(--pill); overflow: hidden; } /* one bar: the scene dots fill it, the quiz fill is its child */
  .story-progress i { flex: 1; width: auto; border-radius: 0; background: none; }
  .story-progress i.is-done, .bar-progress div { background: var(--accent); }
  .bar-progress div { height: 100%; }
  .action-bar .bar-primary { order: 3; display: inline-flex; flex-shrink: 0; gap: var(--space-2); padding: 10px 16px; }
  .quiz { padding-top: 0; }
  .quiz-panel { display: flex; flex-direction: column; min-height: calc(100vh - var(--header-h)); min-height: calc(100dvh - var(--header-h)); padding: var(--space-5) 0 0; border: 0; border-radius: 0; background: none; }
  .quiz-progress { display: none; } /* the action bar shows it */
  .quiz-controls { margin-top: auto; }
  .quiz-side { order: 2; padding: var(--space-5) 0 0; }
  .quiz-side > :not(.quiz-privacy, .quiz-legal) { display: none; }
  .quiz-side .quiz-legal { display: flex; padding-bottom: var(--space-5); }
  .answer { font-size: 1rem; min-height: 54px; }
  .results { gap: 40px; }
  .share, .handover-cta { grid-template-columns: minmax(0, 1fr); padding: 24px 16px; }
  .share-buttons .button { flex: 1 1 140px; }
  .results-hero, .email { grid-template-columns: minmax(0, 1fr); }
  .email { padding: 24px 16px; }
  .affiliate { padding: 24px 16px; }
  .affiliate-body { grid-template-columns: minmax(0, 1fr); }
  .save-share { grid-template-columns: minmax(0, 1fr); }
  .save-share .share { border-radius: 0 0 var(--r-4) var(--r-4); }
  .save-share .share-buttons { display: flex; }
  .segmented button { font-size: .8125rem; }
  .horizon { padding: var(--space-4); }
  .timeline { --when: 76px; --tl-gap: 8px; }
  .action { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 20px; }
  .action-nr { font-size: 1.375rem; }
}
@media (max-width: 430px) {
  /* Icon buttons in the header nav (icon plus .label, e.g. "Teilen") show only the icon; the label stays for screen readers.
     44px tap target; the negative margin, (44 − 18) / 2, lines the icon up with the gutter. */
  .site-header nav { gap: 4px; }
  .site-header nav .text-button:has(.label) { justify-content: center; width: 44px; margin-right: -13px; }
  .site-header nav .text-button .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 1100px) {
  .save-share .email { grid-template-columns: minmax(0, 1fr); } /* two thirds of the page are too narrow for text and form side by side */
}
@media (max-width: 420px) {
  .share-buttons .button { flex: 1 1 100%; }
}
@media (max-width: 360px) {
  /* Back link shows only its icon; the label stays for screen readers. */
  .site-header .text-button .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .site-header nav .text-button { white-space: nowrap; font-size: .875rem; }
  .site-header { gap: 12px; }
  .brand { font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::backdrop { transition: none !important; animation: none !important; }
  .button.primary.is-ready, .choice-tile:hover { transform: none; }
}

/* Handover sheet (plan for someone else's household, src/helper.js): print only, large type, in the "Sie" form. */
.handover { display: none; }

@media print {
  .site-header, .site-footer, .horizon, .email, .share, .save-share, .affiliate, .cta-share, .results-bottom, .results-top div, .save-bar, .faq, .handover-cta { display: none !important; }
  body { background: var(--card); } .results { gap: 24px; } .line-card, .action { break-inside: avoid; }
  body[data-print="handover"] .results > :not(.handover) { display: none !important; }
  body[data-print="handover"] .handover { display: grid; gap: var(--space-4); font-size: 1.25rem; line-height: 1.5; color: var(--ink); }
  .handover h1 { font-size: 2.25rem; line-height: 1.15; }
  .handover h2 { margin-top: var(--space-5); font-size: 1.625rem; line-height: 1.2; break-after: avoid; }
  .handover h3 { font-size: 1.25rem; font-weight: 600; }
  .handover .lead { font-size: inherit; color: var(--ink-2); }
  .handover-fill { display: flex; gap: var(--space-3); align-items: baseline; }
  .handover-fill span, .handover-numbers td:empty { flex: 1; border-bottom: 1px solid var(--line-strong); }
  .handover ul, .handover ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
  .handover-ok li { display: flex; gap: var(--space-2); } .handover-ok .icon { flex: none; width: 1.25em; height: 1.25em; color: var(--sage-500); }
  .handover-steps li { display: flex; gap: var(--space-4); break-inside: avoid; } .handover-steps p { margin-top: var(--space-1); }
  .handover-box { flex: none; width: 1.25em; height: 1.25em; margin-top: .15em; border: 2px solid var(--ink); border-radius: var(--r-1); }
  .handover-during { list-style: disc !important; padding-left: 1.25em !important; }
  .handover-numbers { width: 100%; border-collapse: collapse; break-inside: avoid; }
  .handover-numbers th { width: 45%; padding: var(--space-4) var(--space-4) var(--space-2) 0; text-align: left; font-weight: 600; }
  .handover-numbers td { padding: var(--space-4) 0 var(--space-2); font-weight: 600; }
  .handover .fact { margin-top: var(--space-5); font-size: 1rem; }
}
