/* Layout-Idee: Die Seite ist wie ein Solarmodul gerastert. Inhalte sitzen als Zellen im Raster, Sonnengelb markiert nur, was man antippen kann. */
:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --ink: #101b33;
  --muted: #55627d;
  --cell: #14306b;
  --cell-ink: #eef3ff;
  --sun: #f5b400;
  --sun-ink: #2a1e00;
  --line: #d5ddec;
  --good: #1d7a4a;
  --bad: #b3261e;
  --font-display: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1224; --surface: #121d38; --ink: #e9eefb; --muted: #9eabc8;
    --cell: #1c3f8a; --cell-ink: #f2f6ff; --sun: #ffc52e; --sun-ink: #2a1e00; --line: #26355a;
    --good: #5fd08f; --bad: #ff8a80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1224; --surface: #121d38; --ink: #e9eefb; --muted: #9eabc8;
  --cell: #1c3f8a; --cell-ink: #f2f6ff; --sun: #ffc52e; --sun-ink: #2a1e00; --line: #26355a;
  --good: #5fd08f; --bad: #ff8a80;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.55; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.2rem, 8vw, 4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; }

/* Kopf */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.top nav { display: flex; gap: 18px; font-weight: 500; flex-wrap: wrap; }
.top nav a { text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.top nav a:hover { border-color: var(--sun); }

/* Hero */
.hero {
  background: var(--cell); color: var(--cell-ink); border-radius: 18px;
  padding: clamp(28px, 6vw, 56px);
  background-image:
    linear-gradient(to right, rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 56px 56px;
  display: flex; flex-direction: column; gap: 18px;
}
.hero p { max-width: 34em; font-size: 1.1rem; }
.hero .sun { color: var(--sun); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.btn { display: inline-block; text-decoration: none; font-weight: 700; padding: 12px 20px; border-radius: 10px; background: var(--sun); color: var(--sun-ink); border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--cell-ink); box-shadow: inset 0 0 0 2px rgba(255,255,255,.45); }
.btn:hover { filter: brightness(1.06); }

section { padding: 56px 0 0; display: flex; flex-direction: column; gap: 22px; }
.lead { color: var(--muted); max-width: 38em; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }

/* Über mich */
.about { display: grid; grid-template-columns: 132px 1fr; gap: 24px; align-items: start; }
.about img { width: 132px; height: 132px; border-radius: 50%; border: 4px solid var(--sun); object-fit: cover; display: block; }
.about .text { display: flex; flex-direction: column; gap: 12px; max-width: 62ch; }
.about .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: .88rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }

/* Kanäle */
.channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.channel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; border-top: 5px solid var(--cell); }
.channel:hover { border-top-color: var(--sun); }
.channel .head { display: flex; align-items: center; gap: 12px; }
.channel .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--cell); color: var(--cell-ink); display: grid; place-items: center; flex: none; }
.channel .ico svg { width: 22px; height: 22px; }
.channel .handle { font-size: .92rem; color: var(--muted); }
.channel .go { margin-top: auto; font-weight: 700; }
.channel .go::after { content: " \2192"; }
.channel p { color: var(--muted); font-size: .98rem; }

/* Mein Weg */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.step .num { font-family: var(--font-display); font-weight: 800; font-size: .85rem; color: var(--muted); }
.step .state { align-self: flex-start; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.step.done .state { background: var(--cell); color: var(--cell-ink); border-color: var(--cell); }
.step.now { border-color: var(--sun); box-shadow: inset 0 0 0 1px var(--sun); }
.step.now .state { background: var(--sun); color: var(--sun-ink); border-color: var(--sun); }
.step p { color: var(--muted); font-size: .96rem; }

/* Rechner */
.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .9rem; font-weight: 600; }
.field .in { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; }
.field input { font: inherit; color: var(--ink); background: transparent; border: 0; padding: 10px 12px; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.field .unit { padding: 10px 12px; color: var(--muted); font-size: .9rem; border-left: 1px solid var(--line); white-space: nowrap; }
.field small { color: var(--muted); font-size: .8rem; }
.result { display: flex; flex-direction: column; gap: 14px; }
.big { display: flex; flex-direction: column; gap: 2px; }
.big .val { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 6vw, 2.8rem); font-variant-numeric: tabular-nums; line-height: 1; }
.big .lab { color: var(--muted); font-size: .9rem; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.bars span { flex: 1; border-radius: 3px 3px 0 0; min-height: 2px; }
.bars .up { background: var(--cell); }
.bars .down { background: var(--bad); opacity: .75; }
.bars-cap { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; }

/* FAQ */
.tools { display: flex; flex-direction: column; gap: 12px; }
.search { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-weight: 500; cursor: pointer; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; }
.chip[aria-pressed="true"] { background: var(--cell); color: var(--cell-ink); border-color: var(--cell); }
.group { display: flex; flex-direction: column; gap: 10px; }
.group h3 { padding-top: 14px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
summary { cursor: pointer; list-style: none; font-weight: 700; padding: 16px 48px 16px 18px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-family: var(--font-display); font-size: 1.5rem; width: 26px; height: 26px; line-height: 24px; text-align: center; background: var(--sun); color: var(--sun-ink); border-radius: 6px; }
details[open] summary::after { content: "\2212"; }
details .a { padding: 0 18px 18px; max-width: 65ch; display: flex; flex-direction: column; gap: 10px; }
.empty { color: var(--muted); display: none; }
.note { border-left: 4px solid var(--sun); padding: 4px 0 4px 14px; color: var(--muted); font-size: .95rem; max-width: 65ch; }

.ask { display: flex; flex-direction: column; gap: 12px; }
.ask .btn { align-self: flex-start; }

/* Rechtstexte */
.legal { display: flex; flex-direction: column; gap: 12px; max-width: 65ch; padding-top: 24px; }
.legal h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.legal h3 { padding-top: 12px; }
.legal p, .legal li { font-size: .98rem; }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.back { font-weight: 600; }

footer { margin-top: 64px; border-top: 1px solid var(--line); padding: 22px 0 40px; color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .calc { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .channels { grid-template-columns: 1fr; }
  section { padding-top: 44px; }
}
@media (max-width: 520px) {
  .about { grid-template-columns: 1fr; }
  .about img { width: 104px; height: 104px; }
  .steps { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
}

/* Checkliste */
.dl { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; border-top: 5px solid var(--sun); }
.dl-text { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.dl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dl-list li { position: relative; padding-left: 26px; font-weight: 600; font-size: .96rem; }
.dl-list li::before { content: ""; position: absolute; left: 0; top: 3px; width: 15px; height: 15px; border: 2px solid var(--cell); border-radius: 3px; }
@media (max-width: 720px) { .dl { grid-template-columns: 1fr; } }

/* Rechner-Erweiterung, Aktuell, Glossar */
.field.wide { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 14px; }
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.news article { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.news p { font-size: .96rem; }
.news .src { color: var(--muted); font-size: .85rem; }
.glossary { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.glossary div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) { .news { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .glossary { grid-template-columns: 1fr; } }
