/* Fähigkeit und Geschwindigkeit: halogen gegen llama.cpp
   Die Palette ist nicht erfunden, sondern aus scripts/grafiken.py übernommen:
   die neun Diagramme bringen ihren Untergrund mit, also folgt ihnen die Seite.
   Darum bewusst nur ein Thema (dunkel) - ein Hellmodus würde neun dunkle
   Rechtecke auf Weiß setzen. */


/* Schriften: IBM Plex, vom eigenen Server. Die Pfade sind relativ zu dieser
   Datei, die im Wurzelverzeichnis liegt - jede Sprach- und Projektebene erbt
   sie darueber richtig, ohne eigene Anpassung.
   Erzeugt aus der offiziellen Auslieferung: website/tools/build_fonts.py */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("schriften/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("schriften/ibm-plex-sans-400-kursiv.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("schriften/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("schriften/ibm-plex-sans-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("schriften/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("schriften/ibm-plex-mono-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
/* Ende Schriften */

:root {
  color-scheme: dark;

  --grund:    #0E1116;   /* Untergrund, identisch mit dem der Diagramme */
  --flaeche:  #151A21;   /* Plotfläche, Karten */
  --erhoben:  #1B222B;   /* eine Stufe darüber: Tafeln, Codeblöcke */
  --gitter:   #232B35;   /* Linien */
  --text:     #EDF1F6;
  --text2:    #97A3B2;
  --text3:    #5F6B7A;
  --llama:    #5B9BF8;   /* llama.cpp: kühl */
  --halogen:  #F0A03C;   /* halogen: warm */
  --llama-w:  #2B4A78;
  --halogen-w:#7A5320;

  /* Die Hausfarbe. Das unveraenderte Firmengruen aus holistech.ai erreicht auf
     --grund nur 3,02:1 - genug fuer Bedienelemente, zu wenig fuer Text (WCAG AA
     verlangt 4,5:1). Die hier aufgehellte Ableitung erreicht 6,00:1;
     nachgerechnet in website/tests/test_website.py.
     --llama und --halogen bleiben den Engines vorbehalten und dienen nie als
     Bedienfarbe: ein blaues Bedienelement laese sich als Aussage ueber
     llama.cpp. */
  --akzent:   #6A9E5C;
  --akzent-w: #2F4A29;   /* gedaempft: Flaechen und Rahmen */

  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "DejaVu Sans Mono", ui-monospace, monospace;

  --spalte: 68ch;        /* Lesebreite */
  --breit: 1240px;       /* Diagrammbreite */
  --kopf: 3.5rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--kopf) + 1.5rem); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--llama-w); color: var(--text); }

a { color: var(--text); text-decoration-color: var(--text3); text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--llama); }
:focus-visible { outline: 2px solid var(--llama); outline-offset: 3px; border-radius: 2px; }

/* --------------------------------------------------------------- Kopfzeile */
.kopf {
  position: sticky; top: 0; z-index: 40;
  height: var(--kopf);
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--grund) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gitter);
}
.marke { font-weight: 700; font-size: .95rem; letter-spacing: -.01em; white-space: nowrap;
         text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.punkt { width: .55rem; height: .55rem; border-radius: 2px; display: inline-block; flex: none; }
.punkt.l { background: var(--llama); }
.punkt.h { background: var(--halogen); }

.kopfnav { display: flex; gap: .1rem; overflow-x: auto; scrollbar-width: none; margin-right: auto; }
.kopfnav::-webkit-scrollbar { display: none; }
.kopfnav a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .04em;
  color: var(--text3); text-decoration: none; padding: .35rem .5rem; border-radius: 3px;
  white-space: nowrap; transition: color .15s;
}
.kopfnav a:hover { color: var(--text); }
.kopfnav a[aria-current="true"] { color: var(--text); background: var(--flaeche); }
@media (max-width: 800px) { .kopfnav { display: none; } }

.sprachen { display: flex; gap: .25rem; font-family: var(--mono); font-size: .72rem; flex: none; }
.sprachen a, .sprachen span { padding: .25rem .45rem; border-radius: 3px; text-decoration: none; color: var(--text3); }
.sprachen [aria-current="true"] { color: var(--text); background: var(--flaeche); }
.sprachen .aus { color: var(--text3); opacity: .45; cursor: default; }

#fortschritt {
  position: fixed; top: var(--kopf); left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--llama), var(--halogen));
  z-index: 41; transition: width .1s linear;
}

/* ------------------------------------------------------------------ Raster */
.bahn { max-width: var(--breit); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.eng  { max-width: var(--spalte); }
.stapel { display: flex; flex-direction: column; }

/* -------------------------------------------------------------------- Kopf */
.held { padding: clamp(3rem, 8vw, 5.5rem) clamp(1rem, 4vw, 2.5rem) 0; }
.augenbraue {
  font-family: var(--mono); font-size: .73rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text3); margin: 0 0 1.2rem;
}
h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.9rem); line-height: 1.06; letter-spacing: -.03em;
  font-weight: 700; margin: 0 0 1.2rem; text-wrap: balance; max-width: 20ch;
}
h1 .l { color: var(--llama); }
h1 .h { color: var(--halogen); }
.vorspann { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--text2); max-width: 60ch; margin: 0; }
.vorspann strong { color: var(--text); font-weight: 600; }

.zeugnis {
  margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  font-family: var(--mono); font-size: .76rem; color: var(--text3);
}
.zeugnis span { display: flex; align-items: center; gap: .45rem; }

/* -------------------------------------------------------------- Kennzahlen */
.kennzahlen {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1px;
  background: var(--gitter); border: 1px solid var(--gitter); border-radius: 6px; overflow: hidden;
  margin: clamp(2rem, 5vw, 3.5rem) 0;
}
.kennzahl { background: var(--flaeche); padding: 1.4rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; }
.kennzahl dt {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text3); order: -1;
}
.kennzahl dd { margin: 0; }
.kennzahl .wert {
  font-family: var(--mono); font-size: 2rem; font-weight: 600; line-height: 1;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.kennzahl .wert .klein { font-size: 1.05rem; color: var(--text2); font-weight: 400; }
.kennzahl .hinweis { font-size: .84rem; color: var(--text2); line-height: 1.45; }

/* --------------------------------------------------------------- Abschnitt */
section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--gitter); }
section > .bahn > * + * { margin-top: 1.1rem; }
h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.3rem); line-height: 1.15; letter-spacing: -.025em;
  font-weight: 600; margin: 0; text-wrap: balance; max-width: 24ch;
}
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; margin: 2rem 0 0; }
p { margin: 0; max-width: var(--spalte); }
p + p { margin-top: 1.1rem; }
.gross { font-size: 1.12rem; color: var(--text2); }
.gross strong { color: var(--text); font-weight: 600; }
strong { font-weight: 600; }
.nz { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .95em; }
.nl { color: var(--llama); font-weight: 600; }
.nh { color: var(--halogen); font-weight: 600; }

/* ----------------------------------------------------------------- Tafeln */
/* Ueberschriften, die die Grafik des Kapitels schon traegt: sie stehen
   weiter in der Gliederung und werden vorgelesen, aber nicht angezeigt. */
.nur-vorlesen {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

figure.tafel { margin: 2rem 0 0; }
.rahmen {
  background: var(--flaeche); border: 1px solid var(--gitter); border-radius: 8px;
  overflow: hidden; line-height: 0; position: relative; cursor: zoom-in;
}
.rahmen svg { width: 100%; height: auto; display: block; }
.rahmen::after {
  content: "vergrößern"; position: absolute; right: .75rem; bottom: .75rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; line-height: 1;
  color: var(--text2); background: color-mix(in srgb, var(--grund) 85%, transparent);
  border: 1px solid var(--gitter); border-radius: 3px; padding: .35rem .5rem;
  opacity: 0; transition: opacity .15s;
}
.rahmen:hover::after, .rahmen:focus-visible::after { opacity: 1; }
figcaption {
  margin-top: .85rem; font-size: .87rem; color: var(--text2); max-width: 80ch; line-height: 1.55;
}
figcaption b { color: var(--text); font-weight: 600; }

dialog.leuchtkasten {
  border: none; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh;
  color: var(--text);
}
dialog.leuchtkasten::backdrop { background: rgba(6, 8, 11, .93); }
dialog.leuchtkasten svg { width: 96vw; max-width: 1900px; height: auto; max-height: 88vh; display: block; }
dialog.leuchtkasten .schliessen {
  position: fixed; top: 1rem; right: 1.25rem; font-family: var(--mono); font-size: .75rem;
  background: var(--flaeche); color: var(--text2); border: 1px solid var(--gitter);
  border-radius: 4px; padding: .45rem .7rem; cursor: pointer;
}

/* --------------------------------------------------------------- Tabellen */
.tabellenkasten { overflow-x: auto; border: 1px solid var(--gitter); border-radius: 6px; margin-top: 1.6rem; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { padding: .6rem .85rem; text-align: left; border-bottom: 1px solid var(--gitter); white-space: nowrap; }
thead th {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text3); font-weight: 400; background: var(--flaeche);
  position: sticky; top: 0;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--flaeche); }
td.z, th.z { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.frei { white-space: normal; min-width: 22ch; color: var(--text2); }

/* Gruppierte Tabelle: je Modell ein tbody, abwechselnd hinterlegt. Der
   Streifen ersetzt die wiederholte Zeilenlinie - innerhalb einer Gruppe
   trennt nur eine schwache Linie, zwischen den Gruppen die volle. */
.gruppiert tbody:nth-of-type(even) td,
.gruppiert tbody:nth-of-type(even) th { background: var(--flaeche); }
.gruppiert tbody th {
  vertical-align: middle; font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--gitter);
}
.gruppiert tbody td { border-bottom: 1px solid color-mix(in srgb, var(--gitter) 45%, transparent); }
.gruppiert tbody tr:last-child td { border-bottom: 1px solid var(--gitter); }
.gruppiert tbody:last-of-type tr:last-child td,
.gruppiert tbody:last-of-type th { border-bottom: none; }
.gruppiert tbody tr:hover td { background: var(--erhoben); }

th.sortierbar { cursor: pointer; user-select: none; }
th.sortierbar:hover { color: var(--text); }
th.sortierbar::after { content: "↕"; opacity: .3; margin-left: .4rem; }
th[aria-sort="ascending"]::after  { content: "↑"; opacity: 1; }
th[aria-sort="descending"]::after { content: "↓"; opacity: 1; }

.marke-ok  { color: var(--text); }
.marke-weg { color: var(--text3); }

/* ------------------------------------------------------------------ Tafel */
.vorbehalt {
  background: var(--erhoben); border: 1px solid var(--gitter); border-left: 3px solid var(--text3);
  border-radius: 0 6px 6px 0; padding: 1.4rem 1.6rem; margin-top: 1.6rem; max-width: 80ch;
}
.vorbehalt .titel {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text3); margin-bottom: .7rem;
}
.vorbehalt p { max-width: none; }

/* ------------------------------------------------------------------- Code */
.codekasten { position: relative; margin-top: 1.4rem; }
pre {
  background: var(--erhoben); border: 1px solid var(--gitter); border-radius: 6px;
  padding: 1.1rem 1.2rem; overflow-x: auto; margin: 0;
  font-family: var(--mono); font-size: .8rem; line-height: 1.65; color: var(--text2);
}
pre .k { color: var(--text3); }         /* Kommentar */
pre b { color: var(--text); font-weight: 400; }
code { font-family: var(--mono); font-size: .88em; color: var(--text); }
p code, li code, td code { background: var(--flaeche); border: 1px solid var(--gitter);
                           border-radius: 3px; padding: .05em .35em; }
.kopieren {
  position: absolute; top: .6rem; right: .6rem; font-family: var(--mono); font-size: .68rem;
  background: var(--flaeche); color: var(--text3); border: 1px solid var(--gitter);
  border-radius: 3px; padding: .3rem .5rem; cursor: pointer; opacity: 0; transition: opacity .15s;
}
.codekasten:hover .kopieren, .kopieren:focus-visible { opacity: 1; }
.kopieren:hover { color: var(--text); }

/* ------------------------------------------------------------- Listen etc. */
ul.klar { list-style: none; padding: 0; margin: 1.2rem 0 0; max-width: var(--spalte); }
ul.klar li { padding-left: 1.4rem; position: relative; margin-top: .6rem; }
ul.klar li::before { content: ""; position: absolute; left: .2rem; top: .72em;
                     width: .35rem; height: .35rem; border-radius: 1px; background: var(--text3); }

dl.paare { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 1.4rem 0 0;
           font-size: .9rem; }
dl.paare dt { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase;
              color: var(--text3); padding-top: .15rem; }
dl.paare dd { margin: 0; }
@media (max-width: 620px) { dl.paare { grid-template-columns: 1fr; gap: .15rem 0; }
                            dl.paare dd { margin-bottom: .8rem; } }

/* ------------------------------------------------------------------- Fuss */
.fuss { border-top: 1px solid var(--gitter); padding: 3rem 0 4rem; color: var(--text3); font-size: .85rem; }
.fuss a { color: var(--text2); }
.fuss .zeilen { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; justify-content: space-between; }

.weiter {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.8rem;
  font-family: var(--mono); font-size: .82rem; text-decoration: none;
  border: 1px solid var(--gitter); background: var(--flaeche);
  border-radius: 5px; padding: .7rem 1.1rem; transition: border-color .15s;
}
.weiter:hover { border-color: var(--text3); }

/* ---------------------------------------------------------- Berichtsseite */
.bericht { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; padding: 3rem 0 5rem; }
@media (min-width: 1000px) { .bericht { grid-template-columns: 15rem minmax(0, 1fr); } }
.inhalt { align-self: start; position: sticky; top: calc(var(--kopf) + 2rem); font-size: .82rem; }
@media (max-width: 999px) { .inhalt { position: static; } }
.inhalt ol { list-style: none; margin: .8rem 0 0; padding: 0; }
.inhalt li { margin-top: .45rem; }
.inhalt a { color: var(--text3); text-decoration: none; display: block; line-height: 1.35; }
.inhalt a:hover { color: var(--text); }
.inhalt a[aria-current="true"] { color: var(--text); }
.fliess { max-width: 76ch; }
.fliess h2 { margin-top: 3rem; padding-top: 1.8rem; border-top: 1px solid var(--gitter); max-width: none; }
.fliess h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.fliess h3 { margin-top: 2rem; }
.fliess p, .fliess li { max-width: none; }
.fliess ul, .fliess ol { padding-left: 1.3rem; margin: 1.1rem 0 0; }
.fliess li { margin-top: .45rem; }
.fliess blockquote { margin: 1.4rem 0 0; padding-left: 1.2rem; border-left: 2px solid var(--gitter);
                     color: var(--text2); }
.fliess hr { border: none; border-top: 1px solid var(--gitter); margin: 2.5rem 0; }
.fliess td.frei { white-space: normal; }
.fliess table { font-size: .84rem; }
.fliess th, .fliess td { white-space: normal; }
.fliess h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 30ch; margin-bottom: 1.6rem; }

/* ------------------------------------------------------- Datenblatt oben */
.untertitel {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem); font-weight: 600; letter-spacing: -.015em;
  color: var(--text2); margin: 0 0 .4rem; display: flex; flex-wrap: wrap;
  align-items: center; gap: .55rem;
}
.untertitel .gegen { color: var(--text3); font-weight: 400; }
.datenblatt {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 1px;
  background: var(--gitter);
  border-top: 1px solid var(--gitter); border-bottom: 1px solid var(--gitter);
  margin: clamp(2rem, 4vw, 2.8rem) 0 clamp(1.8rem, 3vw, 2.4rem);
}
.feld { background: var(--grund); padding: 1.25rem 1.35rem 1.4rem; }
.feld .rolle {
  font-family: var(--mono); font-size: .67rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text3); margin: 0 0 .6rem; display: flex; align-items: center; gap: .45rem;
}
.feld .name { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 .8rem;
              line-height: 1.3; max-width: none; }
.feld dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .85rem;
           margin: 0; font-size: .795rem; line-height: 1.45; }
.feld dt { font-family: var(--mono); font-size: .68rem; color: var(--text3); padding-top: .16rem;
           white-space: nowrap; }
.feld dd { margin: 0; color: var(--text2); }
.feld dd code { font-size: .82em; color: var(--text2); }
.ergebniskopf { margin-top: clamp(2rem, 4vw, 2.8rem); }

/* --------------------------------------------------- Befund vor dem Vergleich */
.befund {
  font-size: clamp(1.4rem, 3.1vw, 2.3rem); line-height: 1.3; letter-spacing: -.02em;
  font-weight: 600; max-width: 21em; margin: clamp(1.8rem, 3.5vw, 2.6rem) 0 0;
  text-wrap: pretty;
}
.befund b {
  font-family: var(--mono); font-weight: 600; font-size: .93em; letter-spacing: -.03em;
  color: var(--halogen); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.befund .gegen { color: var(--text3); font-weight: 400; }
.befund b.l { color: var(--llama); }   /* die Zahl gehoert llama.cpp */
.befundfuss {
  font-size: .85rem; color: var(--text3); max-width: 68ch; line-height: 1.55;
  margin-top: 1.2rem;
}

/* --------------------------------------- Leistung: halogen fuer sich allein */
.leistung {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1px;
  background: var(--gitter); border-top: 1px solid var(--gitter);
  border-bottom: 1px solid var(--gitter);
  margin: .9rem 0 0;
}
.leistung > div { background: var(--grund); padding: 1.5rem 1.35rem 1.6rem; }
.leistung .zahl {
  font-family: var(--mono); font-weight: 600; color: var(--halogen);
  font-size: clamp(2.4rem, 5vw, 3.5rem); line-height: 1; letter-spacing: -.045em;
  font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: .55rem;
}
.leistung .einheit {
  font-family: var(--sans); font-size: clamp(.85rem, 1.4vw, 1rem); font-weight: 600;
  color: var(--text2); letter-spacing: 0;
}
.leistung .wobei { margin: .85rem 0 0; font-size: .87rem; color: var(--text2); line-height: 1.45; }
.leistung .wobei b { color: var(--text); font-weight: 600; display: block; }
.klein-grau { color: var(--text3); font-size: .82em; font-weight: 400; }
table td.z { line-height: 1.35; }

#setup .tabellenkasten { max-width: 860px; }
#setup thead th:not(:first-child) { text-align: right; }

/* ------------------------------------------------------------- Autoren */
.autoren {
  display: flex; flex-wrap: wrap; gap: .9rem 3rem; margin: .7rem 0 0;
  font-size: .85rem; color: var(--text2); line-height: 1.45;
}
.autoren > span { display: block; }
.autoren b { display: block; color: var(--text); font-weight: 600; font-size: .93rem; }

/* -------------------------------------------------------- Rechtsseiten */
/* Kein zweites Thema: Impressum und Datenschutz uebernehmen den dunklen
   Untergrund des Berichts. Die Ueberschriften stehen eine Stufe unter denen
   der Kapitel - eine Rechtsseite ist kein Kapitel. */
.legal-content {
  max-width: var(--spalte);
  margin: 2.5rem 0 0;
  color: var(--text2);
  line-height: 1.7;
}
.legal-content h2 {
  font-size: 1.05rem; font-weight: 600; letter-spacing: 0;
  color: var(--text); max-width: none;
  margin: 2.4rem 0 .7rem; padding-top: 1.4rem;
  border-top: 1px solid var(--gitter);
}
.legal-content > :first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-content p { margin: 0 0 1rem; max-width: none; }
.legal-content address {
  font-style: normal; color: var(--text);
  background: var(--flaeche); border: 1px solid var(--gitter);
  border-radius: 5px; padding: .9rem 1.1rem; margin: 0 0 1rem;
}
.legal-content a { color: var(--text); }

.rechtszeile { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }

/* ------------------------------------------------- Rahmen: Domain und Labor */
/* Die Marke gehoert der Domain. Der Projektname steht daneben und traegt die
   beiden Engine-Punkte, weil sie zum Projekt gehoeren, nicht zum Haus. */
.marke-teil { color: var(--akzent); font-weight: 700; }
.marke:hover .marke-teil { color: var(--text); }

.projektmarke {
  display: flex; align-items: center; gap: .5rem;
  padding-left: 1rem; margin-left: .25rem;
  border-left: 1px solid var(--gitter);
  font-family: var(--mono); font-size: .78rem; color: var(--text2);
  white-space: nowrap;
}
@media (max-width: 640px) { .projektmarke { display: none; } }

/* Ohne Kapitelnavigation traegt nichts mehr den Rechtsrand - die
   Sprachumschaltung uebernimmt das selbst. */
.kopf .sprachen { margin-left: auto; }

.untertitel-labs {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem); line-height: 1.5;
  color: var(--text2); max-width: 46ch; margin: 0;
}
.kacheln {
  display: grid; gap: 1.2rem; margin-top: 2rem;
  /* auto-fit statt auto-fill: Ein einzelnes Projekt fuellt die Reihe, statt
     neben zwei leeren Spuren zu stehen. Die Breite bleibt begrenzt, damit die
     Kachel nicht ueber die volle Diagrammbreite laeuft. */
  max-width: 860px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.kachel {
  display: block; text-decoration: none;
  background: var(--flaeche); border: 1px solid var(--gitter);
  border-radius: 6px; padding: 1.5rem 1.6rem 1.4rem;
  transition: border-color .15s, background .15s;
}
.kachel:hover { border-color: var(--akzent); background: var(--erhoben); }
.kachel .augenbraue { margin-bottom: .9rem; letter-spacing: .12em; }
.kachel h3 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.kachel p { color: var(--text2); font-size: .92rem; line-height: 1.6;
            margin: .7rem 0 0; max-width: 58ch; }
.kachel-weiter {
  display: inline-block; margin-top: 1.2rem;
  font-family: var(--mono); font-size: .78rem; color: var(--akzent);
}
