/* ============================================================
   atomkernenergie.de – Kernenergie verständlich erklärt
   Designsystem „Cherenkov“: helles Labor-Papier, Cherenkov-Blau
   (das Leuchten aus dem Abklingbecken) als Akzent, Warn-Amber
   sparsam für Risiko-Markierungen. Monospace für Messwerte.
   Light Mode, WCAG-AA, mobile-first, performant.
   ============================================================ */

/* ---------- Font (lokal, variable, latin-Subset) ---------- */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2-variations");
}

/* ---------- Tokens ---------- */
:root {
  --papier: #FAFAF9;        /* Seitenhintergrund */
  --panel: #FFFFFF;         /* Boxen, Karten */
  --panel-tief: #F1F3F6;
  --text: #17212F;
  --muted: #5B6779;         /* AA auf --papier */
  --linie: #E4E7EC;
  --linie-dunkel: #C9D0DA;
  --blau: #0369A1;          /* Cherenkov, Links (AA) */
  --blau-hell: #0EA5E9;
  --blau-tint: rgba(14, 165, 233, 0.12);
  --amber: #B45309;         /* Warn-Akzent (AA) */
  --amber-hell: #F59E0B;
  --sans: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--papier);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }

h1, h2 { line-height: 1.22; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 800; margin: 0.4em 0 0.45em; }
h2 { font-size: 1.32rem; font-weight: 700; margin: 2.4rem 0 0.7rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
code {
  font-family: var(--mono); font-size: 0.9em;
  background: var(--panel-tief); border: 1px solid var(--linie);
  border-radius: 6px; padding: 0.08em 0.4em;
}

a { color: var(--blau); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--blau-hell); text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--blau-hell); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--blau-hell); color: #FFFFFF; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ak-skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--blau); color: #FFFFFF;
  padding: 0.6rem 1rem; border-radius: 0 0 8px 8px; z-index: 100;
  font-weight: 650; transition: top 0.15s ease;
}
.ak-skip:focus { top: 0; color: #FFFFFF; }

[id] { scroll-margin-top: 4.4rem; }

/* ---------- Signatur: Atom-Marke, Punkt & Mark ---------- */
.ak-punkt { color: var(--blau-hell); }
.ak-atom { width: 1.35em; height: 1.35em; margin-right: 0.3em; flex: none; }
.akm-kern { fill: var(--blau-hell); }
.akm-bahn { fill: none; stroke: var(--blau); stroke-width: 1.4; }

mark.ak-mark {
  color: var(--text);
  background: var(--blau-tint);
  box-shadow: inset 0 -0.14em 0 0 var(--blau-hell);
  padding: 0.02em 0.16em;
  margin: 0 -0.04em;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.ak-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}
.ak-status {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
}
.ak-status::before {
  content: ""; width: 0.55em; height: 0.55em; border-radius: 50%;
  background: var(--blau-hell); box-shadow: 0 0 8px rgba(14, 165, 233, 0.65);
}

/* ---------- Topbar ---------- */
.ak-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--linie);
}
.ak-topbar-in {
  max-width: 49rem; margin-inline: auto; padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 3.5rem; gap: 1rem;
}
.ak-brand {
  font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
  display: inline-flex; align-items: center;
}
.ak-brand:hover { color: var(--text); }
.ak-brand-sub {
  font-family: var(--mono); font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.08em; color: var(--muted);
  border-left: 1px solid var(--linie-dunkel); padding-left: 0.7em; margin-left: 0.7em;
}

.ak-nav { display: flex; gap: 1.4rem; align-items: center; }
.ak-nav a {
  color: var(--text); text-decoration: none;
  font-size: 0.95rem; font-weight: 550;
  padding: 0.35rem 0; border-bottom: 2px solid transparent;
}
.ak-nav a:hover { border-bottom-color: var(--blau-hell); color: var(--text); }
.ak-nav .ak-extern { color: var(--muted); font-weight: 450; }
.ak-nav .ak-extern:hover { color: var(--text); }

.ak-burger {
  display: none;
  background: none; border: 1px solid var(--linie-dunkel); border-radius: 8px;
  padding: 0.55rem 0.6rem; cursor: pointer;
}
.ak-burger-balken {
  display: block; width: 1.15rem; height: 2px;
  background: var(--text); margin: 3px 0; border-radius: 2px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

@media (max-width: 900px) {
  .ak-burger { display: block; }
  .ak-brand-sub { display: none; }
  .ak-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--panel);
    border-bottom: 1px solid var(--linie-dunkel);
    box-shadow: 0 18px 30px -18px rgba(23, 33, 47, 0.25);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.4rem 0 0.6rem;
  }
  body.ak-nav-offen .ak-nav { display: flex; }
  .ak-nav a {
    padding: 0.9rem 1.4rem; font-size: 1.05rem;
    border-bottom: 1px solid var(--linie);
  }
  .ak-nav a:last-child { border-bottom-color: transparent; }
  body.ak-nav-offen .ak-burger-balken:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  body.ak-nav-offen .ak-burger-balken:nth-child(2) { opacity: 0; }
  body.ak-nav-offen .ak-burger-balken:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
}

/* ---------- Hauptbereich ---------- */
.ak-main { max-width: 49rem; margin-inline: auto; padding: 0 1.25rem 3rem; }

/* ---------- Startseite ---------- */
.ak-hero { padding: 2.7rem 0 1.4rem; }
.ak-claim { font-size: 1.13rem; color: var(--muted); max-width: 40rem; }

.ak-suche { margin: 1.5rem 0 0.4rem; }
.ak-suche input[type="search"] {
  width: 100%;
  font: inherit; font-size: 1.08rem;
  color: var(--text); background: var(--panel);
  border: 1.5px solid var(--linie-dunkel); border-radius: 12px;
  padding: 0.9rem 1.15rem;
}
.ak-suche input[type="search"]::placeholder { color: var(--muted); opacity: 1; }
.ak-suche input[type="search"]:focus { border-color: var(--blau-hell); }
.ak-suche input[type="search"]:focus-visible { outline-offset: 3px; }

.ak-rail {
  display: flex; flex-wrap: wrap; gap: 0.15rem;
  font-family: var(--mono); font-size: 0.88rem;
  margin: 1.3rem 0 0.2rem;
}
.ak-rail a, .ak-rail .ak-rail-leer {
  display: inline-block; min-width: 1.7rem; text-align: center;
  padding: 0.25rem 0.2rem; border-radius: 6px;
}
.ak-rail a { color: var(--text); text-decoration: none; font-weight: 650; }
.ak-rail a:hover { background: var(--blau); color: #FFFFFF; }
.ak-rail .ak-rail-leer { color: var(--linie-dunkel); }

.ak-kats { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.9rem 0 0.4rem; }
.ak-kats button {
  font: inherit; font-size: 0.86rem; font-weight: 550;
  color: var(--text); background: var(--panel);
  border: 1.5px solid var(--linie-dunkel); border-radius: 999px;
  padding: 0.34rem 0.9rem; cursor: pointer;
}
.ak-kats button:hover { border-color: var(--blau-hell); background: var(--blau-tint); }
.ak-kats button[aria-pressed="true"] {
  background: var(--blau); color: #FFFFFF; border-color: var(--blau); font-weight: 700;
}

.ak-verzeichnis { padding-top: 0.6rem; }
.ak-gruppe { margin-top: 1.7rem; }
.ak-buchstabe {
  font-family: var(--mono); font-weight: 700; font-size: 0.95rem;
  color: var(--blau);
  border-bottom: 1px solid var(--linie-dunkel);
  padding-bottom: 0.3rem; margin: 0 0 0.2rem;
}
.ak-liste { list-style: none; margin: 0; padding: 0; }
.ak-liste li { border-bottom: 1px solid var(--linie); }
.ak-eintrag {
  display: flex; align-items: baseline; gap: 0.9rem;
  padding: 0.85rem 0.3rem;
  text-decoration: none; color: var(--text);
  border-radius: 8px;
}
.ak-eintrag-name {
  font-weight: 650; white-space: nowrap;
  text-decoration: underline; text-decoration-thickness: 2px;
  text-decoration-color: var(--linie-dunkel); text-underline-offset: 4px;
}
.ak-eintrag:hover { background: var(--panel); }
.ak-eintrag:hover .ak-eintrag-name { text-decoration-color: var(--blau-hell); }
.ak-eintrag-teaser {
  flex: 1; color: var(--muted); font-size: 0.92rem; line-height: 1.5;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.ak-eintrag-pfeil { color: var(--blau-hell); font-weight: 700; }
#ak-leer { color: var(--muted); padding: 1.4rem 0; }

/* ---------- Begriffsseite ---------- */
.ak-crumb { font-size: 0.88rem; color: var(--muted); padding: 1.3rem 0 0; }
.ak-crumb a { color: var(--muted); }
.ak-crumb a:hover { color: var(--blau); }

.ak-artikel { padding-top: 0.9rem; }
.ak-dict {
  font-family: var(--mono); font-size: 0.82rem;
  color: var(--muted); letter-spacing: 0.02em;
  margin: -0.1rem 0 1.6rem;
}

.ak-antwort {
  background: var(--panel);
  border: 1px solid var(--linie-dunkel);
  border-left: 5px solid var(--blau-hell);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(23, 33, 47, 0.06);
  padding: 1.25rem 1.5rem 0.6rem;
  margin: 0 0 1.7rem;
}
.ak-antwort-label {
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--blau); margin: 0 0 0.55rem;
}
.ak-antwort-text {
  font-size: 1.17rem; line-height: 1.7; font-weight: 450;
  margin: 0 0 0.7rem;
}

/* Grafiken */
.ak-fig {
  margin: 1.8rem 0;
  background: var(--panel);
  border: 1px solid var(--linie);
  border-radius: 12px;
  padding: 1.1rem 1.1rem 0.75rem;
}
.ak-fig svg { display: block; width: 100%; height: auto; }
.ak-fig figcaption {
  font-size: 0.85rem; color: var(--muted);
  padding-top: 0.65rem; margin-top: 0.5rem;
  border-top: 1px solid var(--linie);
}
/* SVG-Diagramm-Klassen (Light) */
.sgb  { fill: #FFFFFF; stroke: var(--linie-dunkel); stroke-width: 1.5; }
.sgbm { fill: rgba(14, 165, 233, 0.08); stroke: #0284C7; stroke-width: 1.5; }
.sgbw { fill: rgba(245, 158, 11, 0.12); stroke: #D97706; stroke-width: 1.5; }
.sgt  { fill: var(--text); font-family: var(--sans); font-size: 15px; font-weight: 650; }
.sgs  { fill: var(--muted); font-family: var(--sans); font-size: 12.5px; }
.sgc  { fill: var(--blau); font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; }
.sgl  { stroke: var(--linie-dunkel); stroke-width: 1.5; fill: none; }
.sgm  { stroke: #0284C7; stroke-width: 2; fill: none; }
.sgmd { stroke: #0284C7; stroke-width: 2; fill: none; stroke-dasharray: 7 6; }
.sgw  { stroke: #D97706; stroke-width: 2; fill: none; stroke-dasharray: 7 6; }
.sgmf { fill: #0284C7; }
.sgwf { fill: #D97706; }
.sggf { fill: var(--linie-dunkel); }
.sgtrack { fill: var(--panel-tief); stroke: var(--linie); }

/* Fakten */
.ak-fakten { list-style: none; padding: 0; margin: 0 0 1rem; }
.ak-fakten li { position: relative; padding: 0.3rem 0 0.3rem 1.55rem; }
.ak-fakten li::before {
  content: "";
  position: absolute; left: 0.15rem; top: 0.82em;
  width: 0.5em; height: 0.5em;
  background: var(--blau-hell);
  border-radius: 50%;
}
.ak-quellen {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  border-top: 1px dashed var(--linie-dunkel);
  padding-top: 0.6rem; margin: 0.2rem 0 1.4rem;
}

/* Schritt-für-Schritt / Verfahren */
.ak-schritte { list-style: none; counter-reset: schritt; padding: 0; margin: 0 0 1.2rem; }
.ak-schritte li {
  counter-increment: schritt;
  position: relative;
  padding: 0.55rem 0 0.55rem 3rem;
  border-bottom: 1px solid var(--linie);
}
.ak-schritte li:last-child { border-bottom: none; }
.ak-schritte li::before {
  content: counter(schritt);
  position: absolute; left: 0; top: 0.62rem;
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  background: var(--blau-tint); color: var(--blau);
  border: 1px solid var(--blau-hell);
  border-radius: 50%;
  font-family: var(--mono); font-weight: 700; font-size: 0.9rem;
}

.ak-chips { list-style: none; padding: 0; margin: 0 0 1.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ak-chips a {
  display: inline-block;
  background: var(--panel);
  border: 1.5px solid var(--linie-dunkel); border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-size: 0.92rem; font-weight: 550;
  color: var(--text); text-decoration: none;
}
.ak-chips a:hover { border-color: var(--blau-hell); background: var(--blau-tint); color: var(--blau); }

.ak-hinweis {
  border: 1.5px dashed var(--linie-dunkel); border-radius: 12px;
  background: var(--panel);
  padding: 1rem 1.3rem;
  margin: 2.3rem 0 0;
  font-size: 0.96rem; color: var(--muted);
}
.ak-hinweis p { margin: 0; }
.ak-hinweis strong { color: var(--text); }

.ak-stand {
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--muted); margin-top: 1.6rem;
}

/* ---------- Recht & 404 ---------- */
.ak-prosa h2 { font-size: 1.15rem; margin-top: 2rem; }
.ak-prosa address { font-style: normal; }
.ak-404 { text-align: center; padding: 4.5rem 0 2rem; }
.ak-404-code {
  font-family: var(--mono);
  font-size: clamp(3rem, 11vw, 5.5rem); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1; margin: 0 0 0.8rem; color: var(--text);
}
.ak-404-code .ak-punkt { color: var(--amber-hell); }

/* ---------- Footer ---------- */
.ak-footer {
  border-top: 1px solid var(--linie-dunkel);
  background: var(--panel-tief);
  margin-top: 3.5rem;
  font-size: 0.93rem; color: var(--muted);
}
.ak-footer-in { max-width: 49rem; margin-inline: auto; padding: 1.9rem 1.25rem 2.3rem; }
.ak-footer-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 0.7rem 0; }
.ak-footer a { color: var(--muted); }
.ak-footer a:hover { color: var(--blau); }
.ak-footer-note { font-family: var(--mono); font-size: 0.76rem; margin: 0.9rem 0 0; }

/* ---------- Klein ---------- */
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .ak-hero { padding-top: 2rem; }
  .ak-eintrag { flex-wrap: wrap; gap: 0.15rem 0.9rem; }
  .ak-eintrag-teaser { flex-basis: 100%; }
  .ak-eintrag-pfeil { display: none; }
  .ak-antwort { padding: 1.05rem 1.1rem 0.5rem; border-radius: 10px; }
  .ak-antwort-text { font-size: 1.09rem; }
  .ak-fig { padding: 0.8rem 0.8rem 0.6rem; }
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
