:root {
  /* Golden Hour an der Riviera: Sand, Sonne, Meer, Abendhimmel */
  --paper: #fcf5ea;
  --paper-2: #f5e7d3;
  --ink: #18233a;
  --ink-2: #4a5468;
  --muted: #5f6573;
  --line: #ecdcc4;
  --gold: #ffc45a;
  --terra: #ef5f3c;
  --sage: #22a99e;
  --sky: #4f86c6;
  --plum: #b0607e;
  --sun: #ff8a3d;
  --night-1: #1d2c4f;
  --night-2: #101a30;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-hero: clamp(2.4rem, 1.2rem + 5vw, 5.2rem);
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font: 400 var(--text-base)/1.6 var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 100% 30%, rgba(255, 196, 90, .16) 0%, transparent 60%),
    radial-gradient(900px 600px at 0% 75%, rgba(34, 169, 158, .08) 0%, transparent 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}
/* feines Papierkorn */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.18 0 0 0 0 0.1 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, header, footer { position: relative; z-index: 1; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--terra); }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* Kopfzeile */
.masthead { border-bottom: 1px solid var(--line); }
.masthead__row { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 0; }
.brand { font: 600 1.35rem/1 var(--serif); text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--terra); font-style: italic; }
nav a { margin-left: 1.4rem; font-size: .92rem; text-decoration: none; color: var(--ink-2); }

/* Hero */
.hero { padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.eyebrow { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.2rem; }
h1 { font: 500 var(--text-hero)/1.02 var(--serif); letter-spacing: -.025em; margin: 0; max-width: 15ch; }
h1 em { color: var(--terra); }
.lede { max-width: 62ch; font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: var(--ink-2); margin: 1.6rem 0 0; }

/* Bühne: Foto über die volle Breite, Licht, Wellen */
.stage { position: relative; z-index: 1; isolation: isolate; overflow: hidden; min-height: min(92vh, 860px); display: flex; flex-direction: column; color: #fff; background: #f0a565; }
.stage__photo, .stage__photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage__photo img { object-fit: cover; object-position: 60% 55%; animation: drift 28s var(--ease) both; }
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(24, 35, 58, .72) 0%, rgba(24, 35, 58, .38) 42%, rgba(24, 35, 58, 0) 70%),
    linear-gradient(180deg, rgba(24, 35, 58, .35) 0%, rgba(24, 35, 58, 0) 22%, rgba(239, 95, 60, .10) 70%, rgba(252, 245, 234, .0) 100%);
}
.stage__glow {
  position: absolute; z-index: 1; left: -8%; top: 18%; width: 46vw; height: 46vw; max-width: 720px; max-height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 90, .55) 0%, rgba(255, 138, 61, .22) 35%, transparent 68%);
  mix-blend-mode: screen; animation: breathe 9s ease-in-out infinite; pointer-events: none;
}
.stage > .masthead, .stage > .hero { position: relative; z-index: 2; }
.stage__waves { position: absolute; z-index: 2; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(50px, 8vw, 120px); }
.wave--back { fill: rgba(252, 245, 234, .55); animation: sway 12s ease-in-out infinite alternate; transform-origin: center; }
.wave--front { fill: var(--paper); }
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes breathe { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes sway { from { transform: translateX(-2%); } to { transform: translateX(2%); } }

.masthead--over { border-bottom: 1px solid rgba(255, 255, 255, .18); }
.masthead--over .brand { color: #fff; }
.masthead--over .brand span { color: var(--gold); }
.masthead--over nav a { color: rgba(255, 255, 255, .88); }
.masthead--over nav a:hover { color: var(--gold); }

.stage .hero { flex: 1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); align-items: end; gap: 2rem; padding: clamp(3rem, 8vw, 7rem) 0 clamp(5rem, 10vw, 9rem); }
.stage .eyebrow { color: var(--gold); text-shadow: 0 1px 12px rgba(0, 0, 0, .25); }
.stage h1 { color: #fff; text-shadow: 0 2px 30px rgba(16, 26, 48, .35); max-width: 14ch; }
.stage h1 em { color: var(--gold); }
.stage .lede { color: rgba(255, 255, 255, .92); text-shadow: 0 1px 14px rgba(16, 26, 48, .4); max-width: 52ch; }
.stage .lede strong { color: #fff; }
.hero__text > * { animation: rise .9s var(--ease) both; }
.hero__text > :nth-child(2) { animation-delay: .08s; }
.hero__text > :nth-child(3) { animation-delay: .16s; }
.hero__text > :nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero__perks { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: 1.8rem 0 0; }
.hero__perks li { padding: .45rem .9rem; border-radius: 99px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .32); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: .9rem; }

.hero__card {
  display: grid; gap: .35rem; padding: 1.5rem 1.6rem; border-radius: 20px; text-decoration: none; color: #fff;
  background: linear-gradient(145deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .08));
  border: 1px solid rgba(255, 255, 255, .4); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 30px 60px -30px rgba(16, 26, 48, .6); animation: rise 1s .35s var(--ease) both;
  transition: transform .35s var(--ease), box-shadow .35s;
}
.hero__card:hover { color: #fff; transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 40px 70px -30px rgba(16, 26, 48, .75); }
.hero__card-kicker { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.hero__card-num { font: 500 clamp(2.2rem, 1.6rem + 2vw, 3.2rem)/1 var(--serif); letter-spacing: -.02em; }
.hero__card-sub { color: rgba(255, 255, 255, .85); font-size: .95rem; }
.hero__cta { margin-top: .7rem; justify-self: start; padding: .7rem 1.1rem; border-radius: 12px; background: var(--gold); color: var(--ink); font-weight: 700; }
.hero__card:hover .hero__cta { background: #fff; }

/* Icons in der Definition */
.definition__icon { width: 3.2rem; height: 3.2rem; margin-bottom: .4rem; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.i-sun { fill: var(--gold); stroke: var(--sun); }
.i-rays { stroke: var(--sun); }
.i-sea { stroke: var(--sage); }
.i-shell { fill: rgba(34, 169, 158, .14); stroke: var(--sage); }
.i-line { stroke: var(--sage); }
.i-trunk { stroke: var(--terra); stroke-width: 3.5; }
.i-leaf { fill: rgba(34, 169, 158, .25); stroke: var(--sage); stroke-width: 2.5; }
.definition__card { position: relative; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s; }
.definition__card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -28px rgba(24, 35, 58, .45); }
.definition__card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 90, .35), transparent 70%); }

/* Der Weg dorthin: Fußspuren-Foto */
.weg { position: relative; isolation: isolate; padding: clamp(4rem, 8vw, 7rem) 0; color: #fff; overflow: hidden; }
.weg__photo, .weg__photo img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.weg__photo img { object-fit: cover; object-position: center 60%; }
.weg::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--paper) 0%, rgba(24, 35, 58, .55) 18%, rgba(24, 35, 58, .45) 60%, var(--paper) 100%); }
.weg h2 { font: 500 clamp(1.8rem, 1.2rem + 2vw, 2.7rem)/1.1 var(--serif); letter-spacing: -.015em; margin: 0 0 1.4rem; text-shadow: 0 2px 20px rgba(16, 26, 48, .4); }
.weg .lede { color: rgba(255, 255, 255, .92); text-shadow: 0 1px 12px rgba(16, 26, 48, .5); }
.weg .pathbox__inputs { color: var(--ink); background: rgba(252, 245, 234, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.weg .pathbox__out { background: linear-gradient(160deg, rgba(29, 44, 79, .92), rgba(16, 26, 48, .94)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* Definition */
.definition { padding: clamp(1.5rem, 4vw, 3rem) 0 3rem; }
.definition h2 { font: 500 clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem)/1.15 var(--serif); margin: 0 0 1.2rem; }
.definition__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.definition__card { background: #fffdf7; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.definition__num { display: block; font: 500 2.4rem/1 var(--serif); color: var(--terra); margin-bottom: .5rem; }
.definition__card h3 { font: 600 1.1rem var(--serif); margin: 0 0 .4rem; }
.definition__card p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.definition__note { max-width: 85ch; margin: 1.2rem 0 0; font-size: .93rem; color: var(--ink-2); padding-left: 1rem; border-left: 3px solid var(--gold); }
.result__def { margin: .3rem 0 0; font-size: .8rem; color: #9fb0a6; }

/* Rechner-Layout */
.calc { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 1.5rem; align-items: start; padding-bottom: 4rem; }
.panel { border-radius: var(--radius); }
.inputs { background: #fffdf7; border: 1px solid var(--line); padding: clamp(1.2rem, 3vw, 2rem); box-shadow: 0 1px 0 #fff inset, 0 24px 48px -36px rgba(20, 35, 28, .35); }

fieldset { border: 0; margin: 0 0 1.9rem; padding: 0; }
legend { font: 600 1.18rem/1.3 var(--serif); margin-bottom: .9rem; display: flex; align-items: center; gap: .6rem; }
.step { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ink); color: var(--gold); font: 600 .85rem/1 var(--sans); }
.label { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; color: var(--ink-2); margin-bottom: .45rem; }
.label output { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.hint { font-size: .84rem; color: var(--muted); margin: .5rem 0 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: block; }

/* Stadt-Chips */
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span {
  display: block; padding: .7rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
  cursor: pointer; transition: transform .25s var(--ease), background .2s, border-color .2s;
}
.chip b { display: block; font: 600 .98rem/1.2 var(--serif); }
.chip small { color: var(--muted); font-size: .74rem; font-variant-numeric: tabular-nums; }
.chip span:hover { border-color: var(--ink-2); transform: translateY(-2px); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:checked + span small { color: var(--gold); }
.chip input:focus-visible + span { outline: 3px solid var(--terra); outline-offset: 2px; }

/* Segment-Schalter */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper-2); border-radius: 10px; padding: 4px; gap: 4px; }
.seg--3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 1.1rem; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; text-align: center; padding: .55rem .4rem; border-radius: 7px; cursor: pointer; font-size: .92rem; transition: background .2s; }
.seg input:checked + span { background: #fffdf7; box-shadow: 0 2px 8px -3px rgba(20, 35, 28, .35); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--terra); }

.stepper { display: flex; align-items: center; background: var(--paper-2); border-radius: 10px; padding: 4px; }
.stepper button { width: 2.6rem; height: 2.3rem; border: 0; border-radius: 7px; background: #fffdf7; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--gold); }
.stepper button:active { transform: scale(.94); }
.stepper output { flex: 1; text-align: center; font: 600 1.15rem var(--serif); }

/* Slider */
.slider { display: block; margin-top: .4rem; }
input[type="range"] { width: 100%; accent-color: var(--terra); height: 1.6rem; cursor: pointer; }
input[type="number"] {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
  font: inherit; color: var(--ink);
}
input[type="number"]:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(200, 85, 61, .25); }
.ticks { position: relative; height: 1.3rem; font-size: .72rem; color: var(--muted); }
.ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ticks span::before { content: ""; display: block; width: 1px; height: 6px; background: var(--muted); margin: 0 auto 2px; }

.advanced { border-top: 1px dashed var(--line); padding-top: 1rem; }
.advanced summary { cursor: pointer; font: 600 1.02rem var(--serif); }
.advanced summary span { font: 400 .85rem var(--sans); color: var(--muted); }
.advanced[open] summary { margin-bottom: 1rem; }

/* Ergebnis */
.result {
  position: sticky; top: 1.2rem;
  background: linear-gradient(165deg, var(--night-1) 0%, var(--night-2) 70%); color: var(--paper); padding: clamp(1.4rem, 3vw, 2.1rem);
  box-shadow: 0 30px 60px -30px rgba(16, 26, 48, .75);
  overflow: hidden;
}
.result::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 193, 78, .22), transparent 70%); pointer-events: none;
}
.result__kicker { margin: 0; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.result__number { margin: .35rem 0 .2rem; font: 500 clamp(2.5rem, 1.4rem + 3.6vw, 4rem)/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #fff; }
.result__sub { margin: 0 0 1.4rem; color: #c9d2cc; font-size: .95rem; }
.result__sub b { color: var(--gold); }

.bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: #2a3a32; }
.bar i { display: block; height: 100%; transition: flex-grow .6s var(--ease); }
.legend { list-style: none; margin: .9rem 0 1.4rem; padding: 0; display: grid; gap: .35rem; font-size: .88rem; }
.legend li { display: flex; align-items: center; gap: .55rem; }
.legend li span:last-child { margin-left: auto; font-variant-numeric: tabular-nums; color: #fff; }
.legend .dot { width: .7rem; height: .7rem; border-radius: 3px; flex: none; }
.legend .minus { color: var(--sage); }

.mini { font: 600 .78rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #9fb0a6; margin: 0 0 .5rem; }
.budget { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; margin: 0 0 1.4rem; font-size: .92rem; }
.budget dt { color: #c9d2cc; }
.budget dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.budget .sum { border-top: 1px solid #2f3f60; padding-top: .35rem; font-weight: 650; color: #fff; }

.reverse { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 1rem; }
.reverse .label { color: #c9d2cc; }
.reverse__row { display: flex; align-items: center; gap: .5rem; }
.reverse input { background: #0d1527; border-color: #2f3f60; color: #fff; }
.reverse__out { margin: .6rem 0 0; font-size: .9rem; color: #dfe6e1; min-height: 1.4em; }
.reverse__out b { color: var(--gold); }

.share {
  margin-top: 1rem; width: 100%; padding: .75rem; border-radius: 10px; border: 1px solid var(--gold); background: transparent;
  color: var(--gold); font: 600 .92rem var(--sans); cursor: pointer; transition: background .2s, color .2s;
}
.share:hover { background: var(--gold); color: var(--ink); }

/* Inhalt */
.prose { padding: 3.5rem 0; border-top: 1px solid var(--line); }
.prose h2 { font: 500 clamp(1.8rem, 1.2rem + 2vw, 2.7rem)/1.1 var(--serif); letter-spacing: -.015em; margin: 0 0 1.4rem; }
.prose h3 { font: 600 1.15rem var(--serif); margin: 0 0 .6rem; }
.formula { font: 400 clamp(1.2rem, 1rem + 1.2vw, 1.9rem)/1.4 var(--serif); padding: 1.2rem 1.4rem; background: var(--ink); color: var(--paper); border-radius: var(--radius); display: inline-block; margin: 0 0 2rem; }
.formula b { color: var(--gold); font-weight: 600; }
.grid3 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2rem 2.5rem; margin-bottom: 3rem; }
.grid3 article { border-top: 3px solid var(--ink); padding-top: 1rem; }
.grid3 article:first-child { grid-row: span 3; }
.grid3 article:nth-child(2) { border-color: var(--terra); }
.grid3 article:nth-child(3) { border-color: var(--gold); }
.grid3 article:nth-child(4) { border-color: var(--sage); }

/* Herleitung des Faktors */
.derive { list-style: none; counter-reset: d; padding: 0; margin: 1rem 0 0; display: grid; gap: .55rem; }
.derive li { counter-increment: d; display: grid; grid-template-columns: 1.8rem 1fr; gap: .1rem .6rem; padding: .7rem .8rem; background: #fffdf7; border: 1px solid var(--line); border-radius: 10px; font-size: .92rem; }
.derive li::before { content: counter(d); grid-row: span 2; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ink); color: var(--gold); font-size: .8rem; font-weight: 600; }
.derive span { color: var(--ink-2); }
.derive b { font-variant-numeric: tabular-nums; }
.derive li:last-child { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.derive li:last-child span { color: #c9d2cc; }
.derive li:last-child b { color: var(--gold); font: 600 1.15rem var(--serif); }

/* Eigener Ort */
.chip--custom { grid-column: 1 / -1; }
.chip--custom span { border-style: dashed; background: transparent; display: flex; align-items: baseline; gap: .7rem; }
.custom { margin-top: 1rem; padding: 1rem; border-radius: 12px; background: var(--paper); border: 1px dashed var(--ink-2); }
.custom .hint:first-child { margin-top: 0; margin-bottom: .8rem; }
.field--wide { margin-bottom: .8rem; }
.row--3 { grid-template-columns: repeat(3, 1fr); }
input[type="text"] { width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fffdf7; font: inherit; color: var(--ink); }
input[type="text"]:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(200, 85, 61, .25); }
#rules-custom { margin-top: .9rem; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--terra); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.housing-total { margin: .9rem 0 0; padding: .65rem .9rem; background: var(--paper-2); border-radius: 10px; font-size: .95rem; display: flex; justify-content: space-between; }
.housing-total b { font-variant-numeric: tabular-nums; }

/* Der Weg dorthin */
.lede--small { font-size: 1.08rem; margin: -.6rem 0 1.8rem; }
.pathbox { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1.5rem; }
.pathbox__inputs { display: grid; gap: 1rem; align-content: start; background: #fffdf7; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.pathbox__out { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 1.4rem 1.6rem; }
.path__headline { font: 400 1.3rem/1.4 var(--serif); margin: 0 0 1rem; }
.path__headline b { color: var(--gold); font-weight: 600; }
.path__headline small { display: block; margin-top: .4rem; font: 400 .85rem/1.5 var(--sans); color: #b4bfd3; }
.chart { width: 100%; height: auto; display: block; }
.chart__grid { stroke: #2a3a5a; stroke-width: 1; }
.chart__axis { fill: #8fa198; font: 11px var(--sans); }
.chart__target { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 6 5; }
.chart__label { fill: var(--gold); font: 600 12px var(--sans); }
.chart__line { fill: none; stroke: var(--terra); stroke-width: 3; stroke-linejoin: round; }
.chart__area { fill: rgba(200, 85, 61, .18); }
.path__goal { margin-top: 1rem; border-top: 1px solid #2a3a5a; padding-top: 1rem; }
.path__goal .label { color: #c9d2cc; }
.path__goal .label output { color: #fff; }
.path__req { margin: .4rem 0 0; color: #dfe6e1; }
.path__req b { color: var(--gold); font-size: 1.1rem; }

/* Anlage-Schritte */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; max-width: 860px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#kids-age-row { margin-top: .8rem; align-items: end; }
.steps li { counter-increment: s; position: relative; padding: 1.1rem 1.3rem 1.1rem 4.2rem; background: #fffdf7; border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(s); position: absolute; left: 1.2rem; top: 1rem; font: 500 2rem/1 var(--serif); color: var(--terra); }
.steps p { margin: 0; color: var(--ink-2); }
.steps .table-wrap { margin: .8rem 0 .3rem; }
.grid3 p { color: var(--ink-2); font-size: .97rem; }
.tag { font: 600 .78rem var(--sans); background: var(--gold); padding: .15rem .45rem; border-radius: 5px; margin-right: .3rem; vertical-align: middle; }
.assumptions { max-width: 80ch; padding-left: 1.1rem; color: var(--ink-2); }
.assumptions li { margin-bottom: .7rem; }
.assumptions__detail { display: block; margin-top: .45rem; font-size: .93rem; }
.notice { max-width: 80ch; margin-top: 2rem; padding: 1rem 1.2rem; border-left: 4px solid var(--terra); background: #fffdf7; border-radius: 0 10px 10px 0; font-size: .93rem; }
.sources { padding-left: 1.3rem; max-width: 90ch; font-size: .93rem; }
.sources li { margin-bottom: .45rem; }
.table-wrap { overflow-x: auto; }
.citytable { border-collapse: collapse; width: 100%; max-width: 720px; font-size: .93rem; font-variant-numeric: tabular-nums; }
.citytable th, .citytable td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.citytable th { font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }

.footer { padding: 1.6rem 0 2.4rem; font-size: .85rem; color: rgba(252, 245, 234, .7); background: var(--ink); margin-top: -1px; }
.footer a { color: rgba(252, 245, 234, .9); }
.footer a:hover { color: var(--gold); }

/* Gezeichneter Horizont über dem Seitenende */
.horizon { display: block; width: 100%; height: clamp(110px, 15vw, 220px); position: relative; z-index: 1; margin-top: 2rem; }
.horizon__boat { animation: bob 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
.horizon__sun { animation: breathe 9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(3px) rotate(1.5deg); } }

/* Blog-Kopf mit Foto */
.blog__head {
  max-width: none; padding: clamp(2rem, 5vw, 3.5rem); border-radius: 22px; color: #fff; position: relative; overflow: hidden; isolation: isolate;
  background-image: url("/img/hero-sm.jpg");
  background-image: image-set(url("/img/hero-sm.avif") type("image/avif"), url("/img/hero-sm.jpg") type("image/jpeg"));
  background-size: cover; background-position: 60% 60%;
}
.blog__head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(24, 35, 58, .78), rgba(24, 35, 58, .25) 70%); }
.blog__head .eyebrow { color: var(--gold); }
.blog__head h1 { color: #fff; }
.blog__head .lede { color: rgba(255, 255, 255, .92); max-width: 60ch; }
.footer__row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem; }

/* Mobile Ergebnis-Leiste */
.peek { display: none; }

/* Responsiv */
@media (max-width: 980px) {
  .calc { grid-template-columns: 1fr; }
  .result { position: relative; top: 0; }
  .grid3 { grid-template-columns: 1fr; }
  .grid3 article:first-child { grid-row: auto; }
  .stage .hero { grid-template-columns: 1fr; align-items: start; }
  .stage { min-height: auto; }
  .definition__grid { grid-template-columns: 1fr; }
  .pathbox { grid-template-columns: 1fr; }
  .peek {
    display: flex; align-items: baseline; gap: .7rem; position: fixed; left: .75rem; right: .75rem; bottom: .75rem; z-index: 5;
    padding: .8rem 1.1rem; border-radius: 12px; background: var(--ink); color: var(--paper); text-decoration: none;
    box-shadow: 0 16px 36px -12px rgba(20, 35, 28, .6); transition: transform .35s var(--ease), opacity .35s;
    font-size: .8rem;
  }
  .peek b { font: 500 1.35rem var(--serif); color: #fff; font-variant-numeric: tabular-nums; }
  .peek__go { margin-left: auto; color: var(--gold); }
  .peek.is-hidden { transform: translateY(140%); opacity: 0; }
  .footer { padding-bottom: 6rem; }
}
@media (max-width: 560px) {
  .chips { grid-template-columns: repeat(2, 1fr); }
  .row, .row--3 { grid-template-columns: 1fr; }
  .steps li { padding-left: 3.2rem; }
  .steps li::before { left: .9rem; }
  nav a:not(:first-child):not(:last-child) { display: none; }
  .stage h1 { font-size: clamp(2.3rem, 9vw, 3rem); }
  .stage__glow { width: 90vw; height: 90vw; top: 5%; }
  .seg span { font-size: .84rem; }
}

/* Blog */
.blog { padding: 3rem 0 4rem; }
.blog__head { margin-bottom: 2.5rem; }
.blog__head h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); max-width: 20ch; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.card a { display: block; height: 100%; padding: 1.4rem 1.5rem; background: #fffdf7; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: transform .3s var(--ease), box-shadow .3s, border-color .2s; }
.card a:hover { transform: translateY(-3px); border-color: var(--ink-2); box-shadow: 0 18px 36px -24px rgba(20, 35, 28, .45); color: var(--ink); }
.card h2 { font: 500 1.4rem/1.25 var(--serif); margin: .6rem 0 .5rem; }
.card p { margin: 0 0 .9rem; color: var(--ink-2); font-size: .95rem; }
.card__meta { font-size: .8rem; color: var(--muted); margin: 0; }
.card__tag { display: inline-block; background: var(--gold); color: var(--ink); font-weight: 600; padding: .1rem .45rem; border-radius: 5px; margin-right: .3rem; }
.card__more { font-weight: 600; color: var(--terra); font-size: .9rem; }
nav a[aria-current="page"] { color: var(--terra); }

.post { padding: 3rem 0 4rem; }
.post article { max-width: 720px; margin-inline: auto; }
.post__head h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); max-width: none; margin: .7rem 0 0; }
.post__head .lede { font-size: 1.15rem; }
.post__body { font-size: 1.05rem; line-height: 1.75; }
.post__body h2 { font: 500 1.6rem/1.25 var(--serif); margin: 2.4rem 0 .6rem; }
.post__body p { margin: 0 0 1rem; }
.post__body .table-wrap { margin: 1rem 0 1.5rem; }
.post__cta { margin: 2.5rem 0; padding: 1.3rem 1.5rem; background: var(--ink); color: var(--paper); border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.post__cta p { margin: 0; max-width: 46ch; }
.btn { display: inline-block; padding: .7rem 1.2rem; border-radius: 10px; background: var(--gold); color: var(--ink); font-weight: 650; text-decoration: none; }
.btn:hover { background: #fff; color: var(--ink); }
.post__sources { font-size: .92rem; padding-left: 1.2rem; }

@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }

/* Unterseiten */
.legal { max-width: 75ch; padding: 3rem 0 4rem; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); max-width: none; margin-bottom: 1.5rem; }
.legal h2 { font: 600 1.25rem var(--serif); margin-top: 2rem; }
.placeholder { background: #fde9c3; padding: 0 .3rem; border-radius: 4px; }

.reverse__title { margin: 0 0 .5rem; color: var(--gold); }
.reverse__label { display: block; font-size: .85rem; color: #c9d2cc; margin-bottom: .45rem; }
.reverse__hint { margin: .6rem 0 0; font-size: .75rem; color: #8f9bb3; }
.progress { display: flex; align-items: center; gap: .7rem; margin-top: .8rem; }
.progress__bar { flex: 1; height: 10px; border-radius: 99px; background: #2a3a5a; overflow: hidden; }
.progress__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--sun), var(--gold)); transition: width .6s var(--ease); }
.progress__pct { font: 600 1rem var(--serif); color: var(--gold); min-width: 3.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.result__disclaimer { margin: .9rem 0 0; font-size: .75rem; line-height: 1.5; color: #9aa6bd; }
.result__disclaimer a { color: var(--gold); }
