/* ki-weiterbildung-foerderung.de · Entwurf 12.11.2026
   Leitbild: das Formularblatt. Papier, Tinte, Formularlinien, Textmarker.
   Eine Schriftfamilie (Barlow, DIN-nah wie deutsche Vordrucke), Condensed für Überschriften und Zahlen. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/assets/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("/assets/fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("/assets/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --papier: #F5F8F5;
  --blatt: #FFFFFF;
  --tinte: #10333B;
  --tinte-hell: #456269;
  --linie: #C4D1CC;
  --feld: #E6EFEB;
  --marker: #FFE55C;
  --marker-tief: #F2CF1F;
  --warnung: #FFF3B8;
  --text: "Barlow", "DIN Next", "Helvetica Neue", Arial, sans-serif;
  --schmal: "Barlow Condensed", "Barlow", "Arial Narrow", Arial, sans-serif;
  --s-1: 0.875rem; --s0: 1.0625rem; --s1: 1.3125rem; --s2: 1.75rem; --s3: 2.375rem; --s4: 3.25rem; --s5: 4.5rem;
  --rand: clamp(1rem, 4vw, 2.5rem);
  --breite: 74rem;
  --spalte: 39rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { margin: 0; background: var(--papier); color: var(--tinte); font-family: var(--text); font-size: var(--s0); line-height: 1.55; font-variant-numeric: lining-nums; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--marker-tief); text-decoration-thickness: 0.14em; text-underline-offset: 0.2em; }
a:hover { background: var(--marker); }
:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; border-radius: 2px; }
p, ul, ol, table, figure { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: 0.4rem; }
strong { font-weight: 600; }
h1, h2, h3 { font-family: var(--schmal); font-weight: 700; line-height: 1.04; letter-spacing: -0.005em; margin: 0 0 1rem; text-wrap: balance; hyphens: none; }
h1 { font-size: clamp(2.5rem, 6.2vw, var(--s5)); }
h2 { font-size: clamp(2rem, 4vw, var(--s4)); }
h3 { font-size: var(--s2); font-weight: 600; line-height: 1.12; }
.sprung { position: absolute; left: -999rem; }
.sprung:focus { left: 1rem; top: 1rem; background: var(--blatt); padding: 0.6rem 1rem; z-index: 50; }

.huelle { width: min(100% - 2 * var(--rand), var(--breite)); margin-inline: auto; }
.lesen { max-width: var(--spalte); }
.gross { font-size: var(--s1); line-height: 1.45; }
.leise { color: var(--tinte-hell); font-size: var(--s-1); }
.zahl { font-family: var(--schmal); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

/* Textmarker: unregelmäßiger Strich hinter der Schrift */
.marker { background: linear-gradient(101deg, transparent 0.35em, var(--marker) 0.35em, var(--marker) calc(100% - 0.3em), transparent calc(100% - 0.3em)); background-size: 100% 78%; background-position: 0 62%; background-repeat: no-repeat; padding: 0 0.32em; margin: 0 -0.2em; border-radius: 0.5em 0.15em 0.6em 0.2em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Entwurfshinweise */
.entwurf { background: var(--tinte); color: var(--papier); font-size: var(--s-1); padding: 0.45rem 0; }
.entwurf a:hover { color: var(--tinte); }
.offen { background: var(--warnung); border-left: 4px solid var(--marker-tief); padding: 0.15rem 0.5rem; font-size: 0.94em; }
.offen::before { content: "Entscheidung offen: "; font-weight: 600; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--papier) 94%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--linie); }
.kopf .huelle { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.marke { font-family: var(--schmal); font-weight: 700; font-size: 1.4rem; line-height: 1; text-decoration: none; display: flex; flex-direction: column; justify-content: center; gap: 0.2rem; min-width: 0; min-height: 2.75rem; }
.marke:hover { background: none; }
.marke small { font-family: var(--text); font-weight: 400; font-size: 0.875rem; color: var(--tinte-hell); }
.menue { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; font-weight: 500; font-size: 1rem; }
.menue a { text-decoration: none; padding: 0.3rem 0; border-bottom: 3px solid transparent; }
.menue a:hover { background: none; border-bottom-color: var(--marker-tief); }
.menue a[aria-current="page"] { border-bottom-color: var(--tinte); }
.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0.7rem 1.35rem; background: var(--tinte); color: var(--papier); font-family: var(--text); font-weight: 600; font-size: 1.0625rem; text-decoration: none; border: 2px solid var(--tinte); border-radius: 3px; cursor: pointer; }
.knopf:hover { background: var(--marker); color: var(--tinte); }
.knopf.hell { background: transparent; color: var(--tinte); }
.knopf.hell:hover { background: var(--marker); }
.menue .knopf { min-height: 2.6rem; padding: 0.45rem 1rem; border-bottom-width: 2px; }
.menue .knopf:hover { border-bottom-color: var(--tinte); background: var(--marker); }
.menue-schalter { display: none; }

/* Abschnitte: Weißraum und Formularlinien statt Kartenraster */
.abschnitt { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--linie); }
.abschnitt.erster { border-top: 0; padding-top: clamp(2rem, 5vw, 3.5rem); }
.abschnitt.blatt { background: var(--blatt); }
.zwei { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start; }
.zwei.gleich { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Bühne: Eingabe links, Rechenzettel rechts */
.buehne { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.buehne h1 { max-width: 17ch; font-size: clamp(2.4rem, 5vw, 3.9rem); }
.buehne.start { grid-template-areas: "text zettel" "rest zettel"; grid-template-rows: auto 1fr; row-gap: 0; }
.buehne.start .buehne-text { grid-area: text; }
.buehne.start .zettel { grid-area: zettel; }
.buehne.start .buehne-rest { grid-area: rest; }
.buehne.start .felder { margin-bottom: 1.5rem; }
.buehne .gross { max-width: 34rem; }
.hinweis-ermessen { border-left: 4px solid var(--marker-tief); padding-left: 0.9rem; max-width: 34rem; }

/* Formularfelder */
.felder { display: grid; gap: 1.15rem; margin: 1.75rem 0 1.25rem; max-width: 34rem; }
.feld > label, .feld > .beschriftung, fieldset.feld > legend { display: block; font-weight: 600; margin-bottom: 0.4rem; padding: 0; }
fieldset.feld { border: 0; margin: 0; padding: 0; min-width: 0; }
.feld input[type="number"], .feld select { width: 100%; min-height: 3rem; font: inherit; font-weight: 500; color: var(--tinte); background: var(--feld); border: 0; border-bottom: 2px solid var(--tinte); border-radius: 3px 3px 0 0; padding: 0.55rem 0.8rem; }
.feld input[type="number"]:focus-visible, .feld select:focus-visible { outline-offset: 0; background: var(--blatt); }
.feld .hilfe { font-size: var(--s-1); color: var(--tinte-hell); margin: 0.35rem 0 0; }
.paar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; align-items: end; }
.wahl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--tinte); border-radius: 3px; overflow: hidden; }
.wahl.ja-nein { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 11rem; flex: none; }
.wahl label { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 3rem; padding: 0.4rem 0.5rem; font-weight: 500; line-height: 1.2; cursor: pointer; border-left: 2px solid var(--tinte); margin: 0; }
.wahl label:first-of-type { border-left: 0; }
.wahl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wahl label:has(input:checked) { background: var(--tinte); color: var(--papier); }
.wahl label:has(input:focus-visible) { outline: 3px solid var(--marker-tief); outline-offset: -5px; }
.haken { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.haken input { width: 1.35rem; height: 1.35rem; margin: 0.15rem 0 0; accent-color: var(--tinte); flex: none; }

/* Der Rechenzettel */
.zettel { position: relative; background: var(--blatt); padding: 1.75rem clamp(1.1rem, 3vw, 2rem) 1.5rem; box-shadow: 0 1px 0 var(--linie), 0 18px 40px -22px rgba(16, 51, 59, 0.45); transform: rotate(-0.9deg); }
.zettel::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 10px; background: radial-gradient(circle at 9px 0, transparent 6px, var(--blatt) 6.5px) -9px 0 / 18px 10px repeat-x; }
.zettel h2 { font-size: var(--s2); margin-bottom: 0.2rem; }
.zettel .kopfzeile { color: var(--tinte-hell); font-size: var(--s-1); margin-bottom: 1.1rem; }
.posten { list-style: none; margin: 0; padding: 0; }
.posten li { display: flex; align-items: baseline; gap: 0.5rem; margin: 0; padding: 0.7rem 0; border-bottom: 1px dashed var(--linie); }
.posten .was { flex: 1 1 auto; min-width: 0; }
.posten .was small { display: block; color: var(--tinte-hell); font-size: var(--s-1); }
.posten .zahl { font-size: var(--s2); flex: none; text-align: right; }
.posten .spanne { flex-wrap: wrap; }
.posten .spanne .was { flex-basis: 100%; }
.posten .spanne .zahl { margin-left: auto; }
.posten .summe { border-bottom: 0; border-top: 2px solid var(--tinte); margin-top: 0.35rem; padding-top: 1rem; align-items: flex-end; }
.posten .summe .was { font-weight: 600; }
.posten .summe .zahl { font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; padding-bottom: 0.35rem; border-bottom: 5px double var(--tinte); }
.posten .summe .zahl .marker { animation: anstreichen 0.9s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes anstreichen { from { background-size: 0% 78%; } to { background-size: 100% 78%; } }
.zettel .fuss { margin: 1rem 0 0; font-size: var(--s-1); color: var(--tinte-hell); }

/* Fördersätze: echte Tabelle, große Sätze */
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle caption { text-align: left; color: var(--tinte-hell); font-size: var(--s-1); padding-bottom: 0.6rem; }
.tabelle th, .tabelle td { text-align: left; vertical-align: top; padding: 0.85rem 1rem 0.85rem 0; border-bottom: 1px solid var(--linie); }
.tabelle thead th { font-weight: 600; border-bottom: 2px solid var(--tinte); font-size: var(--s-1); }
.tabelle tbody th { font-weight: 600; }
.tabelle .satz { font-family: var(--schmal); font-weight: 700; font-size: var(--s3); line-height: 1; display: block; }
.tabelle td small { display: block; color: var(--tinte-hell); font-size: var(--s-1); margin-top: 0.3rem; }
.rollen { overflow-x: auto; }

/* Rechenbeispiele */
.beispiel { background: var(--blatt); padding: 1.5rem clamp(1rem, 3vw, 1.75rem); border-top: 4px solid var(--tinte); }
.beispiel h3 { margin-bottom: 0.3rem; }
.beispiel .posten .zahl { font-size: var(--s1); }
.beispiel .posten .summe .zahl { font-size: var(--s3); border-bottom-width: 4px; }

/* Schritte: echte Reihenfolge, deshalb nummeriert */
.schritte { list-style: none; counter-reset: schritt; margin: 0; padding: 0; }
.schritte li { counter-increment: schritt; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0.5rem 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--linie); margin: 0; }
.schritte li::before { content: counter(schritt); font-family: var(--schmal); font-weight: 700; font-size: var(--s3); line-height: 0.9; }
.schritte h3 { font-size: var(--s1); font-family: var(--text); font-weight: 600; letter-spacing: 0; margin: 0 0 0.2rem; line-height: 1.3; }
.schritte p { margin: 0; }

/* Wer macht was */
.rollen table { min-width: 34rem; }

/* Fördercheck */
.check { display: grid; gap: 0; margin: 1.5rem 0; }
.check fieldset { border: 0; border-bottom: 1px solid var(--linie); margin: 0; padding: 1rem 0; display: flex; gap: 1rem 2rem; align-items: center; justify-content: space-between; min-width: 0; }
.check legend { float: left; padding: 0; font-weight: 600; max-width: 38rem; }
.check legend small { display: block; font-weight: 400; color: var(--tinte-hell); font-size: var(--s-1); }
.befund { padding: 1rem 1.1rem; background: var(--feld); border-left: 4px solid var(--tinte); }
.befund[data-stand="ja"] { background: var(--marker); }
.befund[data-stand="nein"] { background: var(--warnung); border-left-color: var(--marker-tief); }
.befund ul { margin: 0.4rem 0 0; }
.befund p { margin: 0; }

/* Fragen */
.fragen details { border-bottom: 1px solid var(--linie); }
.fragen summary { cursor: pointer; list-style: none; padding: 1.05rem 2.5rem 1.05rem 0; font-weight: 600; font-size: var(--s1); line-height: 1.3; position: relative; }
.fragen summary::-webkit-details-marker { display: none; }
/* Die Frage ist eine echte Überschrift (H2 im summary). Sie soll aussehen wie vorher. */
.fragen summary h2 { display: inline; margin: 0; font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; letter-spacing: normal; color: inherit; text-transform: none; }
.fragen summary::after { content: "+"; position: absolute; right: 0.4rem; top: 0.75rem; font-family: var(--schmal); font-size: var(--s2); font-weight: 700; }
.fragen details[open] summary::after { content: "\2212"; }
.fragen .antwort { max-width: var(--spalte); padding-bottom: 0.6rem; }

/* Stand und Quelle */
.stand { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; font-size: var(--s-1); color: var(--tinte-hell); border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); padding: 0.7rem 0; margin: 1.5rem 0; }
.quellen { font-size: var(--s-1); }
.pfad { font-size: var(--s-1); color: var(--tinte-hell); margin-bottom: 1.25rem; }
.pfad a { text-decoration: none; }
.pfad a:hover { background: none; text-decoration: underline; }
.aufruf { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }
.rechenweg summary { cursor: pointer; font-weight: 600; padding: 0.6rem 0; }
.rechenweg ol { margin-top: 0.5rem; }
.inhalt h2 { font-size: var(--s3); margin-top: 2.75rem; }
.inhalt h3 { margin-top: 1.75rem; }
.inhalt > :first-child { margin-top: 0; }

/* Fuß */
.fuss-seite { background: var(--tinte); color: var(--papier); padding: 3rem 0 2rem; margin-top: 0; font-size: 1rem; }
.fuss-seite a { text-decoration-color: var(--marker); }
.fuss-seite a:hover { background: var(--marker); color: var(--tinte); }
.fuss-seite .spalten { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.fuss-seite li { margin-bottom: 0.3rem; }

/* Weiterlesen: Aktenlasche am Ende der Seite */
.weiter { background: var(--feld); border-top: 2px solid var(--tinte); }
.weiter h2 { font-size: var(--s2); }
.weiter-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.9rem 2rem; }
.weiter-liste li { margin: 0; padding: 0.7rem 0; border-bottom: 1px dashed var(--linie); }
.weiter-liste a { font-weight: 600; display: block; }
.weiter-liste span { display: block; color: var(--tinte-hell); font-size: var(--s-1); margin-top: 0.15rem; }

/* Glossar: Begriff links, Erklärung rechts, wie ein Formularfeld */
.begriffe { margin: 0; }
.begriffe > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 0.4rem 2rem; padding: 0.9rem 0; border-bottom: 1px solid var(--linie); }
.begriffe dt { font-weight: 600; margin: 0; }
.begriffe dd { margin: 0; max-width: var(--spalte); }
.begriffe dd p { margin: 0 0 0.4rem; }

/* Beispielseite: Steckbrief über dem Zettel */
.steckbrief { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font-size: var(--s-1); color: var(--tinte-hell); }
.steckbrief li { margin: 0; }
.steckbrief strong { color: var(--tinte); font-weight: 600; }
.inhalt .zettel-flach { margin: 1rem 0 1.5rem; }
.inhalt table.tabelle { font-size: 1rem; }
.fuss-seite h2 { font-size: var(--s1); font-family: var(--text); font-weight: 600; letter-spacing: 0; margin-bottom: 0.6rem; }
.fuss-seite ul { list-style: none; padding: 0; margin: 0; }
.fuss-seite .klein { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(245, 248, 245, 0.25); font-size: var(--s-1); color: #C9D8D4; }

@media (max-width: 72rem) {
  .menue-schalter { display: inline-flex; margin-left: auto; min-height: 2.75rem; padding: 0.4rem 0.9rem; font: inherit; font-weight: 600; background: transparent; color: var(--tinte); border: 2px solid var(--tinte); border-radius: 3px; cursor: pointer; }
  .menue { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--papier); border-bottom: 1px solid var(--linie); flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--rand) 1.25rem; margin: 0; }
  .menue.offen-menue { display: flex; }
  .menue a { padding: 0.8rem 0; border-bottom: 1px solid var(--linie); }
  .menue .knopf { margin-top: 0.9rem; border-bottom-width: 2px; }
}
@media (max-width: 62rem) {
  .buehne, .zwei, .zwei.gleich { grid-template-columns: minmax(0, 1fr); }
  .buehne.start { grid-template-areas: "text" "zettel" "rest"; grid-template-rows: auto; row-gap: 1.75rem; }
  .zettel { transform: none; }
  .fuss-seite .spalten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fuss-seite .spalten > div:first-child { grid-column: 1 / -1; }
  .begriffe > div { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 36rem) {
  h1, h2, h3 { overflow-wrap: anywhere; }
  .paar { grid-template-columns: minmax(0, 1fr); }
  .wahl:not(.ja-nein) { grid-template-columns: minmax(0, 1fr); }
  .wahl:not(.ja-nein) label { border-left: 0; border-top: 2px solid var(--tinte); justify-content: flex-start; padding-left: 0.9rem; }
  .wahl:not(.ja-nein) label:first-of-type { border-top: 0; }
  .check fieldset { flex-direction: column; align-items: flex-start; }
  .fuss-seite .spalten { grid-template-columns: minmax(0, 1fr); }
  .posten li { flex-wrap: wrap; }
  .posten .zahl { margin-left: auto; }
  .rollen table { min-width: 0; }
  .tabelle.stapel thead { position: absolute; left: -999rem; }
  .tabelle.stapel tr { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--linie); }
  .tabelle.stapel th, .tabelle.stapel td { display: block; border: 0; padding: 0.2rem 0; }
  .tabelle.stapel td::before { content: attr(data-spalte); display: block; font-size: var(--s-1); color: var(--tinte-hell); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .posten .summe .zahl .marker { animation: none; }
}
@media print { .kopf, .entwurf, .aufruf { display: none; } body { background: #fff; } }
