/* Konzept: Die Seite sieht aus wie eine Stromrechnung, die jemand mit dem Textmarker durchgeht.
   Seit 07.11.: weiße Rechnungsblätter auf schwarzem Grund, Königsblau als Marker und Flächen, Orange nur als Akzent (Hauptknopf, Ergebnis, Haken). */
@font-face { font-family: "Bricolage"; src: url("fonts/display.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("fonts/text.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ziffern.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --grund: #0a0a0d;          /* Schwarz: Seitengrund */
  --seite-text: #f3f4f8;
  --seite-text-2: #a9aec2;
  --linie-dunkel: #2a2c38;
  --blatt: #ffffff;
  --tinte: #0a0a0d;          /* Schrift auf weißen Blättern */
  --tinte-2: #4b5063;
  --linie: #cfd3df;
  --blau: #2346d8;           /* Königsblau */
  --blau-tief: #1a35b0;
  --blau-hell: #7d97ff;      /* Königsblau als Schrift auf Schwarz */
  --orange: #ff7a1a;         /* nur Akzent */
  --gruen: #0b7a4b;
  --rot: #c8202b;
  --zaehler: #0a0a0d;
  --display: "Bricolage", "Arial Narrow", Arial, sans-serif;
  --text: "Instrument", "Helvetica Neue", Arial, sans-serif;
  --ziffern: "Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--grund); color: var(--seite-text); font-family: var(--text); font-size: 18px; line-height: 1.6; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.2vw, 3.9rem); font-weight: 750; }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 700; }
h3 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.rand { width: min(1120px, 100%); margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.block { padding-block: clamp(56px, 8vw, 96px); }
.kicker { font-family: var(--ziffern); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blau-hell); }
.blatt .kicker { color: var(--tinte-2); }
.intro { display: grid; gap: 14px; max-width: 42rem; margin-bottom: 40px; }
.intro p:not(.kicker) { color: var(--seite-text-2); }

/* Marker */
.mark { background: linear-gradient(100deg, transparent 1%, var(--blau) 2.5%, var(--blau) 97%, transparent 99%) no-repeat 0 62% / 100% 74%; padding-inline: 0.12em; margin-inline: -0.12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; color: #fff; }
.mark.los { animation: marker 0.7s 0.25s cubic-bezier(0.3, 0.7, 0.2, 1) backwards; }
@keyframes marker { from { background-size: 0% 74%; } }

/* Kopf */
.kopf { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--grund); border-bottom: 1px solid var(--linie-dunkel); }
.kopf .rand { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { text-decoration: none; display: grid; line-height: 1.15; }
.logo b { font-family: var(--display); font-size: 1.2rem; font-weight: 750; letter-spacing: -0.01em; }
.logo span { font-size: 0.8rem; color: var(--seite-text-2); }
.nav { display: flex; align-items: center; gap: 24px; font-size: 0.95rem; }
.nav a:not(.knopf) { text-decoration: none; }
.nav a:not(.knopf):hover { text-decoration: underline; }
@media (max-width: 820px) { .nav a:not(.knopf) { display: none; } }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 24px; border: 2px solid var(--seite-text); border-radius: 8px; background: transparent; color: var(--seite-text); font: 600 1rem var(--text); text-decoration: none; cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.knopf:hover { transform: translate(-1px, -2px); box-shadow: 3px 4px 0 var(--blau); }
.knopf.haupt { background: var(--orange); border-color: var(--orange); color: var(--tinte); }
.knopf.haupt:hover { box-shadow: 3px 4px 0 var(--seite-text); }
.blatt .knopf:not(.haupt) { border-color: var(--tinte); color: var(--tinte); background: var(--blatt); }
.blatt .knopf.haupt:hover, .blatt .knopf:hover { box-shadow: 3px 4px 0 var(--tinte); }
.knopf.klein { min-height: 42px; padding: 8px 16px; font-size: 0.92rem; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }

/* Erster Bildschirm */
.start { padding-block: clamp(40px, 6vw, 72px) clamp(56px, 7vw, 88px); }
.start .rand { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.start .links { display: grid; gap: 22px; min-width: 0; }
.start .sub { font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.start .text { max-width: 34rem; color: var(--seite-text-2); }
.haken { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; margin: 0; list-style: none; font-size: 0.95rem; }
.haken li::before { content: "✓"; color: var(--orange); font-weight: 700; margin-right: 8px; }
.direkt { font-size: 0.95rem; color: var(--seite-text-2); }
@media (max-width: 860px) { .start .rand { grid-template-columns: minmax(0, 1fr); } h1 { font-size: clamp(1.9rem, 9vw, 3.4rem); } }

/* Rechnungsblatt */
.blatt { background: var(--blatt); color: var(--tinte); border: 1px solid var(--linie); border-radius: 4px; padding: clamp(22px, 3vw, 32px); box-shadow: 0 1px 0 var(--linie), 0 26px 50px -24px rgba(35, 70, 216, 0.55); min-width: 0; }
.rechnung { transform: rotate(1.2deg); }
.rechnung .oben { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--tinte); margin-bottom: 8px; }
.rechnung .oben b { font-family: var(--display); font-size: 1.3rem; font-weight: 750; }
.zeile { display: flex; align-items: baseline; gap: 8px; padding-block: 9px; font-size: 1rem; }
.zeile .punkte { flex: 1; min-width: 12px; border-bottom: 2px dotted var(--linie); transform: translateY(-4px); }
.zeile .wert { font-family: var(--ziffern); font-size: 0.95rem; text-align: right; font-variant-numeric: tabular-nums; }
.zeile.summe { border-top: 2px solid var(--tinte); margin-top: 6px; padding-top: 12px; font-weight: 700; }
.zeile.gut .wert { color: var(--gruen); }
.ergebnis { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 14px 16px; background: var(--zaehler); color: #fff; border-radius: 4px; }
.ergebnis span { font-size: 0.92rem; }
.ergebnis b { font-family: var(--ziffern); font-size: 1.7rem; color: var(--orange); font-variant-numeric: tabular-nums; }
.kleingedruckt { margin-top: 12px; font-size: 0.8rem; line-height: 1.45; color: var(--tinte-2); }

/* Für wen */
.drei { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.drei .blatt { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; }
.drei p { color: var(--tinte-2); }
.drei .fuer { font-family: var(--ziffern); font-size: 0.82rem; color: var(--tinte); }
@media (max-width: 860px) { .drei { grid-template-columns: minmax(0, 1fr); } }

/* Ablauf */
.band { background: var(--blau); color: #fff; }
.band .kicker, .band .intro p { color: #dfe5ff; }
.band .intro .kicker { color: #dfe5ff; }
.schritte { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding: 0; margin: 0; list-style: none; }
.schritte li { display: grid; gap: 10px; align-content: start; }
.schritte p { color: #dfe5ff; }
.rolle { display: inline-flex; width: 52px; height: 66px; align-items: center; justify-content: center; background: #fff; color: var(--zaehler); border-radius: 3px; font-family: var(--ziffern); font-size: 2.1rem; box-shadow: inset 0 9px 8px -7px rgba(0, 0, 0, 0.45), inset 0 -9px 8px -7px rgba(0, 0, 0, 0.45); }
.schritte li:last-child .rolle { background: var(--orange); color: var(--tinte); }
@media (max-width: 760px) { .schritte { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* Selbst prüfen */
.pruefen { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.pruefliste { display: grid; gap: 22px; margin: 0; list-style: none; }
.pruefliste li { display: grid; gap: 4px; padding-bottom: 18px; border-bottom: 2px dotted var(--linie); }
.pruefliste li:last-child { padding-bottom: 0; border-bottom: 0; }
.pruefliste p { color: var(--tinte-2); }
@media (max-width: 820px) { .pruefen { grid-template-columns: minmax(0, 1fr); } }

/* Check-Formular */
.check { background: linear-gradient(135deg, var(--blau-tief) 0%, var(--blau) 100%); color: #fff; }
.check .links p { color: #dfe5ff; }
.check .rand { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.check .links { display: grid; gap: 16px; }
.formular { display: grid; gap: 16px; }
.felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feld { display: grid; gap: 6px; min-width: 0; }
.feld label, .wahl legend { font-size: 0.92rem; font-weight: 600; padding: 0; }
.feld input { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--tinte); border-radius: 6px; background: #fff; color: var(--tinte); font: 400 1rem var(--text); }
.wahl { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; min-width: 0; }
.wahl .optionen { display: flex; gap: 8px; flex-wrap: wrap; }
.wahl label { position: relative; font-weight: 500; }
.wahl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wahl span { display: inline-block; padding: 9px 12px; border: 2px solid var(--tinte); border-radius: 6px; background: #fff; }
.wahl input:checked + span { background: var(--blau); border-color: var(--blau); color: #fff; }
.wahl input:focus-visible + span { outline: 3px solid var(--tinte); outline-offset: 2px; }
.vorschau { padding: 12px 14px; background: #f1f3f8; border-radius: 4px; font-family: var(--ziffern); font-size: 0.85rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.fehler { color: var(--rot); font-weight: 600; font-size: 0.95rem; }
.formular .kleingedruckt { margin-top: 0; }
@media (max-width: 860px) { .check .rand { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .felder { grid-template-columns: minmax(0, 1fr); } }

/* Über mich */
.ueber { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.ueber .links { display: grid; gap: 16px; }
.ueber .links p:not(.kicker) { color: var(--seite-text-2); }
.ueber .offen p, .ueber .offen li { color: var(--tinte); }
.ueber .offen { margin-top: 8px; }
.offen { display: grid; gap: 10px; }
.haken.liste { display: grid; gap: 10px; font-size: 1rem; }
/* Porträt: freigestellt, läuft unten und seitlich in den Seitengrund aus. Namensschild wie ein Rechnungsetikett */
.portraet { position: relative; margin: 0; width: 100%; max-width: 500px; }
.portraet img { display: block; width: 100%; height: auto; }
.portraet figcaption { position: absolute; left: 8%; bottom: 6%; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.7); display: grid; gap: 2px; padding: 10px 14px; background: var(--blatt); color: var(--tinte); border-radius: 4px; border-left: 6px solid var(--orange); line-height: 1.2; }
.portraet figcaption b { font-family: var(--display); font-size: 1.15rem; font-weight: 750; letter-spacing: -0.01em; }
.portraet figcaption span { font-family: var(--ziffern); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--tinte-2); }
.kopfbild { float: left; width: 64px; height: 64px; margin: 4px 16px 4px 0; border-radius: 50%; border: 3px solid var(--blau); box-shadow: 0 6px 16px -8px rgba(35, 70, 216, 0.8); }
@media (max-width: 820px) { .ueber { grid-template-columns: minmax(0, 1fr); } .portraet { justify-self: center; max-width: 460px; } }

/* Fragen */
.fragen { display: grid; max-width: 46rem; }
.fragen details { border-bottom: 2px dotted var(--linie-dunkel); }
.fragen summary { padding-block: 16px; font-weight: 600; cursor: pointer; list-style-position: inside; }
.fragen summary::marker { color: var(--orange); }
.fragen details p { padding-bottom: 18px; color: var(--seite-text-2); }

/* Schluss + Fuß */
.schluss { display: grid; gap: 20px; justify-items: start; }
.fuss { border-top: 1px solid var(--linie-dunkel); padding-block: 28px; font-size: 0.92rem; color: var(--seite-text-2); }
.fuss .rand { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.fuss nav { display: flex; gap: 20px; }

/* Rechtstexte */
.recht { padding-block: 48px 72px; }
.recht .blatt { max-width: 48rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; overflow-wrap: anywhere; }
.recht h1 { font-size: clamp(2rem, 5vw, 3rem); }
.recht h2 { font-size: 1.3rem; margin-top: 14px; letter-spacing: -0.01em; }
.recht ul { margin: 0; padding-left: 1.2em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mark.los { animation: none; }
  .knopf { transition: none; }
  .knopf:hover { transform: none; box-shadow: none; }
}

.kicker.dunkel { color: #dfe5ff; }
.ohne-oben { padding-top: 0; }
