/* ki-überblick — Gestaltung.
 *
 * Grundlage ist das Folien-Designsystem (privat/12-beruflich/folien/designsystem/):
 * Weiß als Grund, Charcoal als Schrift, EIN Akzent in Grün, Montserrat für Text
 * und JetBrains Mono für Marken und Etiketten. Der grüne Balken bleibt das
 * wiederkehrende Zeichen.
 *
 * Wo die Seite bewusst von der Folie abweicht: Eine Folie wird projiziert und
 * aus vier Metern gelesen, diese Seite wird gelesen. Also eine echte Lesebreite,
 * kleinere Sprünge in der Hierarchie, mehr Luft zwischen den Absätzen — und
 * Grafiken, die tragen dürfen statt nur zu illustrieren.
 *
 * Die Schriftdateien tragen einen Inhaltshash im Namen; der Erzeuger setzt ihn
 * hier ein. Deshalb dürfen sie unbegrenzt gecacht werden (KUE-07).
 */

@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/montserrat-latin.6438d7b8.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/fonts/montserrat-latin-ext.920711de.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.2c32b9b3.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext.9c38cb2d.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --gruen:       #59CB3A;
  --gruen-satt:  #45A82C;   /* der kontrastreichere Grünton auf hellem Grund */
  --charcoal:    #2D3436;
  --slate:       #485F73;
  --paper:       #FFFFFF;
  --ink-40:      #A8ADB0;   /* nur Linien und Dekoration */
  --ink-lese:    #6B7378;   /* der hellste Ton, der als Schrift noch 4,5:1 erreicht */
  --ink-20:      #D4D6D7;
  --ink-08:      #EDEFEF;
  --ink-02:      #F9FAFA;

  --sans: 'Montserrat', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  --spalte: 46rem;   /* Textbreite: rund 75 Zeichen, die Leseoptimum-Spanne */
  --breit:  64rem;   /* für Weiche und Grafiken */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}

.spalte {
  width: 100%;
  max-width: var(--breit);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.sprung {
  position: absolute;
  left: -9999px;
  background: var(--charcoal);
  color: #fff;
  padding: 0.7rem 1.1rem;
  z-index: 10;
}
.sprung:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 2px solid var(--gruen-satt); outline-offset: 3px; }

/* ---------- Kopf ---------- */

.kopf { border-bottom: 1px solid var(--ink-08); }
.kopf .spalte {
  display: flex;
  align-items: center;
  gap: 1rem 2.2rem;
  flex-wrap: wrap;
  min-height: 4.25rem;
  padding-block: 0.6rem;
}

/* Die Themennavigation zeigt auf die drei Felder der Startseite. Sie braucht
   kein JavaScript und keine Klappmenüs: drei Ziele passen in eine Zeile. */
.haupt ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; padding: 0; }
.haupt a {
  font-size: 0.88rem;
  color: var(--slate);
  text-decoration: none;
  padding-block: 0.2rem;
  border-bottom: 2px solid transparent;
}
.haupt a:hover { color: var(--charcoal); border-bottom-color: var(--gruen); }

/* Die Anmeldung ist bewusst leise. Wer den Weg kennt, findet sie; sie wirbt
   für sich nicht, weil die Seite kein Angebot macht. */
.anmelden {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-lese);
  text-decoration: none;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--ink-20);
  border-radius: 2px;
  white-space: nowrap;
}
a.anmelden:hover { color: var(--gruen-satt); border-color: var(--gruen-satt); }

/* Noch nicht offen: sichtbar, aber erkennbar nicht anklickbar. */
.anmelden-zu { color: var(--ink-40); border-color: var(--ink-08); cursor: default; }

.marke {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  text-decoration: none;
}
.marke-balken { display: block; width: 30px; height: 5px; background: var(--gruen-satt); }
.marke:hover { color: var(--gruen-satt); }

/* ---------- Rumpf ---------- */

main { flex: 1; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 8vw, 6rem); }

.krumen { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.07em; margin-bottom: 2rem; }
.krumen ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.krumen li + li::before { content: "/"; color: var(--ink-40); margin-right: 0.5rem; }
.krumen a { color: var(--slate); text-decoration: none; }
.krumen a:hover { color: var(--gruen-satt); }

article { max-width: var(--spalte); }

h1 {
  font-size: clamp(2rem, 5.2vw, 3.15rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 0 0 1.5rem;
  max-width: 20ch;
  text-wrap: balance;
}
h1 .akzent { color: var(--gruen-satt); }

.vorspann {
  font-size: clamp(1.1rem, 2.2vw, 1.32rem);
  line-height: 1.58;
  color: var(--slate);
  margin-bottom: 2.75rem;
}
.vorspann p { margin: 0 0 0.9rem; }
.vorspann p:last-child { margin-bottom: 0; }

article h2 {
  font-size: clamp(1.35rem, 3vw, 1.72rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: 3.4rem 0 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--ink-08);
  position: relative;
}
article h2::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 44px; height: 3px;
  background: var(--gruen-satt);
}

article h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 2.2rem 0 0.6rem;
  letter-spacing: -0.005em;
}

p { margin: 0 0 1.25rem; }
article > p:last-child { margin-bottom: 0; }

a { color: var(--charcoal); text-decoration-color: var(--gruen); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { color: var(--gruen-satt); }

strong { font-weight: 700; }
em { font-style: italic; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--ink-02);
  border: 1px solid var(--ink-08);
  border-radius: 3px;
  padding: 0.06em 0.32em;
}

ul, ol { margin: 0 0 1.25rem; padding-left: 1.3rem; }
li { margin-bottom: 0.5rem; }
li::marker { color: var(--gruen-satt); }

blockquote {
  margin: 2rem 0;
  padding: 0 0 0 1.4rem;
  border-left: 3px solid var(--gruen-satt);
  color: var(--slate);
  font-size: 1.1rem;
  line-height: 1.6;
}
blockquote p { margin: 0; }

hr { border: 0; border-top: 1px solid var(--ink-08); margin: 2.75rem 0; }

.stand {
  max-width: var(--spalte);
  margin-top: 3.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--ink-08);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ink-lese);
}

/* ---------- Grafik ---------- */

/* Grafiken dürfen aus der Textspalte heraustreten — sie sind das, was diese
   Seite gegenüber einem langen Text zusätzlich leistet. */
figure {
  margin: 2.75rem 0;
  width: 100%;
}

/* Ab genügend Breite tritt die Grafik nach rechts aus der Lesespalte heraus,
   bis an den Rand der Seitenspalte. Sie bleibt links am Text ausgerichtet,
   damit der Lesefluss nicht springt. */
@media (min-width: 68rem) {
  article > figure { width: calc(var(--breit) - 6rem); }
}
figure svg { display: block; width: 100%; height: auto; }
figcaption {
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: var(--slate);
  max-width: var(--spalte);
}

/* Die Farben der Grafiken kommen aus denselben Tokens wie der Text. */
.g-flaeche { fill: var(--ink-02); }
.g-linie   { stroke: var(--ink-20); stroke-width: 1.5; fill: none; }
.g-akzent  { fill: var(--gruen-satt); }
.g-akzent-linie { stroke: var(--gruen-satt); stroke-width: 2.5; fill: none; }
.g-dunkel  { fill: var(--charcoal); }
.g-text    { font-family: var(--mono); font-size: 15px; letter-spacing: 0.03em; fill: var(--slate); }
.g-text-stark { font-family: var(--sans); font-size: 17px; font-weight: 700; fill: var(--charcoal); }
.g-text-invers { font-family: var(--mono); font-size: 15px; letter-spacing: 0.03em; fill: #FFFFFF; }
.g-text-klein  { font-family: var(--mono); font-size: 14px; letter-spacing: 0.02em; fill: var(--slate); }
.g-text-akzent { font-family: var(--mono); font-size: 15px; letter-spacing: 0.03em; fill: var(--gruen-satt); }

/* ---------- Startseite: die Weiche ---------- */

.leit {
  max-width: 34rem;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}
.leit .balken { width: 88px; height: 6px; background: var(--gruen-satt); margin-bottom: 2.2rem; }
.leit h1 { max-width: 16ch; }
.leit p {
  font-size: clamp(1.1rem, 2.2vw, 1.32rem);
  line-height: 1.58;
  color: var(--slate);
}

.feld { margin-bottom: clamp(2.75rem, 6vw, 4rem); }

.feld-kopf {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--ink-08);
}
.feld-kopf h2 {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gruen-satt);
  margin: 0;
}
.feld-kopf p { margin: 0; font-size: 0.92rem; color: var(--slate); }

/* Zwei Spalten statt so vieler, wie hineinpassen. Bei vier Karten in einem Feld
   ließe eine dreispaltige Reihe eine leere Zelle stehen — genau der halbleere
   Kasten, den das Designsystem als Anti-Muster führt.
   Die Trennlinien sitzen als Rahmen an den Karten selbst und nicht als
   durchscheinende Fuge im Hintergrund: eine unvollständige Reihe endet dann in
   Weiß statt in einer grauen Fläche. */
.karten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
  gap: 0;
  border-top: 1px solid var(--ink-08);
  border-left: 1px solid var(--ink-08);
}

.karte {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--paper);
  border-right: 1px solid var(--ink-08);
  border-bottom: 1px solid var(--ink-08);
  padding: 1.55rem 1.5rem 1.7rem;
  text-decoration: none;
  color: inherit;
  transition: background 140ms ease;
}
.karte:hover { background: var(--ink-02); color: inherit; }

.karte .frage {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.008em;
}
.karte:hover .frage { color: var(--gruen-satt); }
.karte .anriss { font-size: 0.92rem; line-height: 1.6; color: var(--slate); margin: 0; }
.karte .marker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-lese);
  margin-top: auto;
  padding-top: 0.6rem;
}

/* Die Startseite ist eine Übersicht, kein Fließtext: volle Spaltenbreite. */
.start article { max-width: none; }

/* Porträt auf der Autorenseite. Läuft im Text mit, statt ihn zu überragen —
   die Seite soll die Person belegen, nicht ausstellen. */
.portraet {
  float: right;
  width: 150px;
  height: 150px;
  margin: 0.3rem 0 1.2rem 1.8rem;
  border-radius: 50%;
  object-fit: cover;
  shape-outside: circle();
}
@media (max-width: 34rem) {
  .portraet { float: none; margin: 0 0 1.4rem; width: 116px; height: 116px; }
}

/* ---------- Weiterlesen und Verzeichnis ---------- */

.weiter {
  max-width: var(--spalte);
  margin-top: 3.5rem;
  padding-top: 1.8rem;
  border-top: 2px solid var(--gruen-satt);
}
.weiter h2 {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gruen-satt);
  margin: 0 0 1.1rem;
  padding: 0;
  border: 0;
}
.weiter h2::before { content: none; }
.weiter ul { list-style: none; margin: 0; padding: 0; }
.weiter li { margin-bottom: 1.1rem; }
.weiter li a { display: block; font-weight: 700; text-decoration: none; line-height: 1.35; }
.weiter li a:hover { color: var(--gruen-satt); text-decoration: underline; }
.weiter li span { display: block; font-size: 0.92rem; color: var(--slate); margin-top: 0.2rem; }
.weiter .wer {
  margin: 1.6rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}
.weiter .wer a { color: var(--ink-lese); text-decoration: none; }
.weiter .wer a:hover { color: var(--gruen-satt); text-decoration: underline; }

.verzeichnis { list-style: none; margin: 0 0 2rem; padding: 0; }
.verzeichnis li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--ink-08);
  margin: 0;
}
.verzeichnis li a { font-weight: 700; text-decoration: none; }
.verzeichnis li a:hover { color: var(--gruen-satt); text-decoration: underline; }
.verzeichnis li span { display: block; font-size: 0.94rem; color: var(--slate); margin-top: 0.25rem; }
.verzeichnis li em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-lese);
}

/* ---------- Fuß ---------- */

.fuss {
  border-top: 1px solid var(--ink-08);
  background: var(--ink-02);
  padding-block: 2.25rem 2.75rem;
  font-size: 0.88rem;
}
.fuss .spalte { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.fuss a { color: var(--slate); text-decoration: none; }
.fuss a:hover { color: var(--gruen-satt); text-decoration: underline; }
.fuss nav { display: flex; gap: 1.4rem; }
.fuss-name {
  margin: 0;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--ink-lese);
}

/* ---------- Rechtstexte ---------- */

.recht article { max-width: 42rem; }
.recht article h2 { font-size: 1.2rem; margin-top: 2.6rem; }
.recht address {
  font-style: normal;
  line-height: 1.9;
  margin-bottom: 1.25rem;
}
.recht .luecke {
  background: #FFF6D6;
  border-bottom: 2px solid #E3B505;
  padding: 0.05em 0.3em;
  font-family: var(--mono);
  font-size: 0.86em;
}

/* Auf schmalen Flächen steht die Feldüberschrift über ihrer Erläuterung,
   sonst quetschen sich beide in zwei enge Spalten. */
@media (max-width: 44rem) {
  .feld-kopf { flex-direction: column; gap: 0.35rem; }
  .kopf .spalte { gap: 0.75rem 1.2rem; }
  .haupt { order: 3; width: 100%; }
  .haupt ul { gap: 1.1rem; }
  .haupt a { font-size: 0.82rem; }
}

@media (max-width: 34rem) {
  body { font-size: 1.02rem; }
  .fuss .spalte { flex-direction: column; align-items: flex-start; }
  .fuss-name { margin-left: 0; }
}
