/* idgr.de — Design „Prüfprotokoll" (generiert von build_coins.py) */
@font-face { font-family: "Archivo"; src: url(fonts/archivo-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Archivo"; src: url(fonts/archivo-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/sourceserif4-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/sourceserif4-400i.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/sourceserif4-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/plexmono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/plexmono-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --papier: #F4F5F8;
  --flaeche: #FFFFFF;
  --tinte: #171A21;
  --tinte-2: #4C5160;
  --linie: #D9DCE4;
  --stempel: #332DA8;
  --stempel-hell: #E9E8F8;
  --gruen: #1E7A3C;
  --amber: #A16700;
  --rot: #B3261E;
  --grau: #6B7280;
  --gruen-bg: #E4F1E9;
  --amber-bg: #F6ECD7;
  --rot-bg: #F9E4E2;
  --grau-bg: #ECEDF1;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --grotesk: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
  --mass: 46rem;
  --breit: 72rem;
  --d-schnell: 130ms;
  --d-mittel: 250ms;
  --ease-aus: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #121419;
    --flaeche: #1A1D25;
    --tinte: #E8EAF0;
    --tinte-2: #9BA1B0;
    --linie: #2B2F3A;
    --stempel: #A29CFF;
    --stempel-hell: #232145;
    --gruen: #4CAF6E;
    --amber: #D79A2B;
    --rot: #E5675F;
    --grau: #8A8F9C;
    --gruen-bg: #1A2B20;
    --amber-bg: #2D2515;
    --rot-bg: #311B18;
    --grau-bg: #22242B;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 400 1.05rem/1.75 var(--serif);
  background: var(--papier);
  color: var(--tinte);
}
@media (min-width: 700px) { body { font-size: 1.17rem; } }

a { color: var(--stempel); text-decoration-thickness: 1px; text-underline-offset: 3px;
    transition: text-decoration-color var(--d-schnell) ease-out; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--stempel); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--stempel-hell); }

/* ---- Kopf ---- */
.kopfzeile { border-bottom: 1px solid var(--linie); background: var(--flaeche); }
.kopfzeile-innen { max-width: var(--breit); margin: 0 auto; padding: .9rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.marke { display: flex; align-items: baseline; gap: .7rem; text-decoration: none; color: inherit; }
.marke-siegel { font: 600 .9rem/1 var(--mono); letter-spacing: .1em; color: var(--stempel);
  border: 2px solid currentColor; border-radius: 4px; padding: .35em .5em; }
.marke-name { font: 600 .95rem/1.2 var(--grotesk); letter-spacing: .01em; }
.navi { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; font: 600 .82rem/1 var(--mono); letter-spacing: .06em; }
@media (max-width: 480px) { .navi { gap: .6rem .95rem; } }
.navi a { text-decoration: none; color: var(--tinte-2); text-transform: uppercase;
  transition: color var(--d-schnell) ease-out; }
.navi a:hover, .navi a[aria-current="page"] { color: var(--stempel); }

main { max-width: var(--mass); margin: 0 auto; padding: 2.5rem 1.25rem 5rem; }

/* ---- Typografie ---- */
h1 { font: 800 clamp(1.9rem, 5.5vw, 3rem)/1.12 var(--grotesk);
     letter-spacing: -0.015em; margin: 0 0 .7rem; text-wrap: balance; }
h2 { font: 600 clamp(1.25rem, 3vw, 1.55rem)/1.25 var(--grotesk);
     margin: 3rem 0 .8rem; padding-top: 1.4rem; border-top: 1px solid var(--linie); text-wrap: balance; }
h3 { font: 600 1.08rem/1.3 var(--grotesk); margin: 2rem 0 .5rem; }
p, li { margin: .6rem 0; }
ul, ol { padding-left: 1.4rem; }
strong { font-weight: 600; }
blockquote { margin: 1.2rem 0; padding: .2rem 1.1rem;
  border-left: 3px solid var(--stempel); color: var(--tinte-2); }
code { font: .82em var(--mono); word-break: break-all;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 3px; padding: .08em .3em; }
hr { border: 0; border-top: 1px solid var(--linie); margin: 2.5rem 0; }

.stand { font: .74rem/1.5 var(--mono); color: var(--tinte-2); letter-spacing: .03em;
  margin: .4rem 0 1.8rem; }

/* Inline-Apparat: Definitionen + Quellen-Chips */
.def { font-style: italic; color: var(--tinte-2); }
.qref { font: 600 .62em/1 var(--mono); color: var(--stempel); letter-spacing: .02em;
  vertical-align: super; white-space: nowrap; }

/* ---- Stempel ---- */
.stempel { display: inline-block; font: 600 .78rem/1.35 var(--mono);
  letter-spacing: .13em; text-transform: uppercase; color: var(--stempel);
  border: 2px solid currentColor; border-radius: 5px; padding: .55em .85em;
  transform: rotate(-2deg); box-shadow: 0 0 0 3px var(--papier), 0 0 0 4px var(--stempel); }
.hero .stempel { margin: 1.6rem 0 .4rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero .stempel { animation: stempeln 380ms var(--ease-aus) 180ms backwards; }
  @keyframes stempeln {
    from { opacity: 0; transform: rotate(-2deg) scale(1.35); }
    to   { opacity: 1; transform: rotate(-2deg) scale(1); }
  }
}

/* ---- Hero (Startseite) ---- */
.hero { padding: 1.8rem 0 1rem; }
.eyebrow { font: 600 .74rem/1.4 var(--mono); letter-spacing: .16em;
  text-transform: uppercase; color: var(--tinte-2); margin: 0 0 1rem; }
.hero .lede { font-size: 1.12em; color: var(--tinte-2); max-width: 38rem; }

/* ---- Aktenkopf (Dossier-/Seitenkopf) ---- */
.aktenkopf { border-block: 3px double var(--tinte); padding: 1.1rem 0 1.2rem; margin: .8rem 0 2.2rem; }
.aktenkopf .eyebrow { margin-bottom: .5rem; color: var(--stempel); }
.aktenkopf h1 { margin-bottom: .5rem; }
.aktenmeta { display: flex; flex-wrap: wrap; gap: .45rem .6rem; margin-top: .9rem; padding: 0; list-style: none; }
.aktenmeta li { font: 600 .72rem/1 var(--mono); letter-spacing: .05em; color: var(--tinte-2);
  border: 1px solid var(--linie); background: var(--flaeche); border-radius: 4px; padding: .5em .65em; margin: 0; }
.aktenmeta li.ampel-gruen { color: var(--gruen); border-color: currentColor; }
.aktenmeta li.ampel-gelb  { color: var(--amber); border-color: currentColor; }
.aktenmeta li.ampel-rot   { color: var(--rot);   border-color: currentColor; }

/* ---- Akten-Karten (Startseite) ---- */
.akten { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.1rem; margin: 2rem 0 .6rem; padding: 0; list-style: none; }
.akte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px;
  padding: 1.15rem 1.2rem 1.05rem; display: flex; flex-direction: column; gap: .45rem; margin: 0;
  position: relative;
  transition: transform var(--d-schnell) ease-out, border-color var(--d-schnell) ease-out; }
.akte:hover { transform: translateY(-2px); border-color: var(--stempel); }
.akte .eyebrow { margin: 0; font-size: .68rem; }
.akte h3 { margin: 0; font-size: 1.15rem; }
.akte h3 a { text-decoration: none; color: inherit; }
.akte h3 a::after { content: ""; position: absolute; inset: 0; }
.akte p { font-size: .84em; color: var(--tinte-2); margin: 0; }
.akte-fuss { margin-top: auto; padding-top: .7rem; display: flex; flex-wrap: wrap; gap: .4rem;
  font: 600 .68rem/1 var(--mono); letter-spacing: .04em; color: var(--tinte-2); }
.akte-fuss span { border: 1px solid var(--linie); border-radius: 4px; padding: .45em .55em; }
.akte-fuss .verdikt { border-color: currentColor; }
.akte-fuss .verdikt.gruen { color: var(--gruen); }
.akte-fuss .verdikt.gelb { color: var(--amber); }
.akte-fuss .verdikt.rot { color: var(--rot); }
.akte.werkzeug { grid-column: 1 / -1; }
@media (max-width: 480px) {
  .stempel { font-size: .68rem; letter-spacing: .09em; }
}

/* ---- Tabellen ---- */
.tabellen-scroll { overflow-x: auto; margin: 1.3rem 0; border: 1px solid var(--linie);
  border-radius: 8px; background: var(--flaeche); }
table { border-collapse: collapse; font-size: .8em; line-height: 1.55; min-width: 100%; }
th, td { border-bottom: 1px solid var(--linie); padding: .6rem .75rem; text-align: left; vertical-align: top; }
th { font: 600 .82em var(--mono); letter-spacing: .05em; text-transform: uppercase;
     color: var(--tinte-2); background: var(--papier); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color var(--d-schnell) ease-out; }
tbody tr:hover { background: var(--stempel-hell); }
.vergleich td:first-child, .vergleich th:first-child {
  position: sticky; left: 0; background: var(--flaeche); min-width: 11rem;
  border-right: 1px solid var(--linie); font-weight: 600; }
.vergleich th:first-child { background: var(--papier); }
.vergleich td, .vergleich th { min-width: 16rem; }
.vergleich td:first-child { font-family: var(--grotesk); font-size: .95em; }
.duell th { white-space: normal; min-width: 16rem; }
.duell th:first-child { min-width: 8rem; }
.duell td:first-child { min-width: 8rem; }

.ausbruch { width: min(calc(100vw - 2.5rem), var(--breit));
  position: relative; left: 50%; transform: translateX(-50%); }

/* ---- Verdikt-Punkte, Übersicht, Suche ---- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }
.punkt { display: inline-block; width: .9em; height: .9em; border-radius: 50%;
  background: currentColor; vertical-align: -.08em; }
.v-gruen { color: var(--gruen); } .v-gelb { color: var(--amber); }
.v-rot { color: var(--rot); } .v-unbekannt { color: var(--grau); }
.v-unbekannt .punkt { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.z-ampel { text-align: center; }
.z-ampel.v-gruen { background: var(--gruen-bg); }
.z-ampel.v-gelb { background: var(--amber-bg); }
.z-ampel.v-rot { background: var(--rot-bg); }
.z-ampel.v-unbekannt { background: var(--grau-bg); }
.z-ampel.gesamt .punkt { width: 1.1em; height: 1.1em; }
.uebersicht td, .uebersicht th { min-width: 0; }
.uebersicht td:first-child, .uebersicht th:first-child {
  position: sticky; left: 0; background: var(--flaeche); border-right: 1px solid var(--linie);
  font-family: var(--grotesk); font-weight: 600; min-width: 10rem; }
.uebersicht th:first-child { background: var(--papier); font-family: var(--mono); }
.uebersicht .tiefe, .uebersicht .bilanz { font: 600 .82em var(--mono); letter-spacing: .04em; white-space: nowrap; }
.bilanz .b-gruen { color: var(--gruen); } .bilanz .b-gelb { color: var(--amber); }
.bilanz .b-rot { color: var(--rot); } .bilanz .b-unbekannt { color: var(--grau); }
.sortier { all: unset; cursor: pointer; font: inherit; color: inherit; }
.sortier::after { content: " ↕"; opacity: .45; }
.sortier:hover, .sortier:focus-visible { color: var(--stempel); }
.suche { font: .9rem var(--mono); color: inherit; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 6px; padding: .55em .8em;
  width: 100%; max-width: 20rem; margin: .4rem 0 .2rem; }
.suche:focus { border-color: var(--stempel); outline: none; }

/* ---- Marktdaten-Box (automatisch, klar getrennt vom redaktionellen Teil) ---- */
.live-markt { border: 1px dashed var(--linie); border-radius: 8px;
  padding: .9rem 1.1rem .7rem; margin: 0 0 1.8rem; }
.live-markt .eyebrow { margin-bottom: .4rem; font-size: .66rem; }
.live-markt .aktenmeta { margin-top: .2rem; }
.live-markt .aktenmeta strong { font-weight: 600; }
.lm-hinweis { font: .72rem/1.5 var(--mono); color: var(--tinte-2); margin: .55rem 0 0; }

/* ---- Screener: Filterleiste ---- */
.filterleiste { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: .6rem .7rem; margin: 1.4rem 0 .4rem; }
.filter { display: flex; flex-direction: column; gap: .25rem; }
.filter label { font: 600 .64rem/1.2 var(--mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--tinte-2); }
.filter select { font: .84rem var(--mono); color: inherit; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 6px; padding: .5em .55em; width: 100%; }
.filter select:focus { border-color: var(--stempel); outline: none; }
.screener-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1.1rem;
  margin: .9rem 0 .1rem; font: 600 .76rem/1.5 var(--mono); color: var(--tinte-2); }
.screener-status strong { color: var(--stempel); }
.zuruecksetzen { all: unset; cursor: pointer; font: 600 .7rem/1 var(--mono); letter-spacing: .06em;
  text-transform: uppercase; color: var(--stempel); border: 1px solid currentColor;
  border-radius: 5px; padding: .5em .7em; }
.zuruecksetzen:hover, .zuruecksetzen:focus-visible { background: var(--stempel-hell); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.screener td { white-space: nowrap; }
.screener td:nth-child(2) { font-family: var(--grotesk); font-weight: 600; }
.screener .ticker { font: 600 .78em var(--mono); color: var(--tinte-2); letter-spacing: .03em; }
.z-akte { text-align: center; }
.z-akte a { text-decoration: none; }
.leer-hinweis { border: 1px dashed var(--linie); border-radius: 8px; padding: .8rem 1.1rem;
  font-size: .88em; color: var(--tinte-2); margin: .8rem 0 .4rem; }

/* ---- Scanner: Scan-Listen ---- */
.scan { border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche);
  margin: 1rem 0; }
.scan summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap;
  align-items: baseline; gap: .5rem .8rem; padding: .85rem 1.1rem;
  font: 600 .98rem/1.3 var(--grotesk); }
.scan summary::-webkit-details-marker { display: none; }
.scan summary::before { content: "▸"; color: var(--stempel); font-size: .8em; }
.scan[open] summary::before { content: "▾"; }
.scan .warnzeichen { color: var(--rot); }
.scan-zahl { font: 600 .68rem/1 var(--mono); letter-spacing: .05em; color: var(--stempel);
  border: 1px solid currentColor; border-radius: 999px; padding: .4em .7em; margin-left: auto; }
.scan-formel { font: .72rem/1.65 var(--mono); color: var(--tinte-2);
  margin: 0; padding: 0 1.1rem .8rem; border-bottom: 1px solid var(--linie); }
.scan-inhalt { padding: .2rem 1.1rem .9rem; }
.scan-inhalt .tabellen-scroll { margin: .7rem 0 .3rem; border-radius: 6px; }
.scan-inhalt .leer-hinweis { margin: .8rem 0 .2rem; }

/* ---- Fußzeile ---- */
.fusszeile { border-top: 1px solid var(--linie); background: var(--flaeche); margin-top: 3rem; }
.fusszeile-innen { max-width: var(--breit); margin: 0 auto; padding: 1.4rem 1.25rem 1.7rem;
  font: .76rem/1.7 var(--mono); color: var(--tinte-2); }
.fusszeile a { color: inherit; }

/* ---- Reduziertes Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}
