/* ============================================================
   vpn-virtual-private-network.de – VPN verständlich erklärt
   Designsystem „Tunnel“: Nachtblau, Signal-Mint (die Farbe einer
   stehenden Verbindung), Monospace für Technik-Werte.
   Dark 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 {
  --nacht: #0B1220;        /* Seitenhintergrund */
  --panel: #111C33;        /* Boxen, Karten */
  --panel-hell: #16233F;
  --text: #E7ECF5;
  --muted: #9DA9BC;        /* AA auf --nacht */
  --linie: #23324F;
  --linie-hell: #31436B;
  --mint: #5EEAD4;         /* Verbindungs-Grün */
  --mint-dunkel: #2DD4BF;
  --mint-tint: rgba(94, 234, 212, 0.13);
  --warn: #FCA5A5;
  --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(--nacht);
  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); border: 1px solid var(--linie);
  border-radius: 6px; padding: 0.08em 0.4em;
}

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

.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;
}
.vp-skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--mint); color: var(--nacht);
  padding: 0.6rem 1rem; border-radius: 0 0 8px 8px; z-index: 100;
  font-weight: 650; transition: top 0.15s ease;
}
.vp-skip:focus { top: 0; color: var(--nacht); }

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

/* ---------- Signatur: Status-Punkt & Mark ---------- */
.vp-punkt { color: var(--mint); }
mark.vp-mark {
  color: var(--text);
  background: var(--mint-tint);
  box-shadow: inset 0 -0.14em 0 0 var(--mint);
  padding: 0.02em 0.16em;
  margin: 0 -0.04em;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.vp-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}
.vp-status {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
}
.vp-status::before {
  content: ""; width: 0.55em; height: 0.55em; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 8px rgba(94, 234, 212, 0.7);
}

/* ---------- Topbar ---------- */
.vp-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--linie);
}
.vp-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;
}
.vp-brand {
  font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 0.15em;
}
.vp-brand .vp-punkt { font-size: 1.15em; line-height: 1; }
.vp-brand:hover { color: var(--text); }
.vp-brand-sub {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.08em; color: var(--muted); align-self: center;
  border-left: 1px solid var(--linie-hell); padding-left: 0.7em; margin-left: 0.4em;
}

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

.vp-burger {
  display: none;
  background: none; border: 1px solid var(--linie-hell); border-radius: 8px;
  padding: 0.55rem 0.6rem; cursor: pointer;
}
.vp-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: 840px) {
  .vp-burger { display: block; }
  .vp-brand-sub { display: none; }
  .vp-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--panel);
    border-bottom: 1px solid var(--linie-hell);
    box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.8);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.4rem 0 0.6rem;
  }
  body.vp-nav-offen .vp-nav { display: flex; }
  .vp-nav a {
    padding: 0.9rem 1.4rem; font-size: 1.05rem;
    border-bottom: 1px solid var(--linie);
  }
  .vp-nav a:last-child { border-bottom-color: transparent; }
  body.vp-nav-offen .vp-burger-balken:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  body.vp-nav-offen .vp-burger-balken:nth-child(2) { opacity: 0; }
  body.vp-nav-offen .vp-burger-balken:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
}

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

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

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

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

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

.vp-verzeichnis { padding-top: 0.6rem; }
.vp-gruppe { margin-top: 1.7rem; }
.vp-buchstabe {
  font-family: var(--mono); font-weight: 700; font-size: 0.95rem;
  color: var(--mint);
  border-bottom: 1px solid var(--linie-hell);
  padding-bottom: 0.3rem; margin: 0 0 0.2rem;
}
.vp-liste { list-style: none; margin: 0; padding: 0; }
.vp-liste li { border-bottom: 1px solid var(--linie); }
.vp-eintrag {
  display: flex; align-items: baseline; gap: 0.9rem;
  padding: 0.85rem 0.3rem;
  text-decoration: none; color: var(--text);
  border-radius: 8px;
}
.vp-eintrag-name {
  font-weight: 650; white-space: nowrap;
  text-decoration: underline; text-decoration-thickness: 2px;
  text-decoration-color: var(--linie-hell); text-underline-offset: 4px;
}
.vp-eintrag:hover { background: var(--panel); }
.vp-eintrag:hover .vp-eintrag-name { text-decoration-color: var(--mint); }
.vp-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;
}
.vp-eintrag-pfeil { color: var(--mint); font-weight: 700; }
#vp-leer { color: var(--muted); padding: 1.4rem 0; }

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

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

.vp-antwort {
  background: var(--panel);
  border: 1px solid var(--linie-hell);
  border-left: 5px solid var(--mint);
  border-radius: 12px;
  padding: 1.25rem 1.5rem 0.6rem;
  margin: 0 0 1.7rem;
}
.vp-antwort-label {
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--mint); margin: 0 0 0.55rem;
}
.vp-antwort-text {
  font-size: 1.17rem; line-height: 1.7; font-weight: 450;
  margin: 0 0 0.7rem;
}

/* Grafiken */
.vp-fig {
  margin: 1.8rem 0;
  background: var(--panel);
  border: 1px solid var(--linie);
  border-radius: 12px;
  padding: 1.1rem 1.1rem 0.75rem;
}
.vp-fig svg { display: block; width: 100%; height: auto; }
.vp-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 */
.sgb  { fill: var(--panel-hell); stroke: var(--linie-hell); stroke-width: 1.5; }
.sgbm { fill: rgba(94, 234, 212, 0.10); stroke: var(--mint); stroke-width: 1.5; }
.sgbw { fill: rgba(252, 165, 165, 0.10); stroke: var(--warn); 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(--mint); font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; }
.sgl  { stroke: var(--linie-hell); stroke-width: 1.5; fill: none; }
.sgm  { stroke: var(--mint); stroke-width: 2; fill: none; }
.sgmd { stroke: var(--mint); stroke-width: 2; fill: none; stroke-dasharray: 7 6; }
.sgw  { stroke: var(--warn); stroke-width: 2; fill: none; stroke-dasharray: 7 6; }
.sgmf { fill: var(--mint); }
.sgwf { fill: var(--warn); }
.sgtrack { fill: var(--nacht); stroke: var(--linie); }

/* Fakten */
.vp-fakten { list-style: none; padding: 0; margin: 0 0 1rem; }
.vp-fakten li { position: relative; padding: 0.3rem 0 0.3rem 1.55rem; }
.vp-fakten li::before {
  content: "";
  position: absolute; left: 0.15rem; top: 0.82em;
  width: 0.5em; height: 0.5em;
  background: var(--mint);
  border-radius: 50%;
}

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

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

.vp-hinweis {
  border: 1.5px dashed var(--linie-hell); border-radius: 12px;
  background: rgba(17, 28, 51, 0.6);
  padding: 1rem 1.3rem;
  margin: 2.3rem 0 0;
  font-size: 0.96rem; color: var(--muted);
}
.vp-hinweis p { margin: 0; }
.vp-hinweis strong { color: var(--text); }

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

/* ---------- Recht & 404 ---------- */
.vp-prosa h2 { font-size: 1.15rem; margin-top: 2rem; }
.vp-prosa address { font-style: normal; }
.vp-404 { text-align: center; padding: 4.5rem 0 2rem; }
.vp-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);
}
.vp-404-code .vp-punkt { color: var(--warn); }

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

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

/* Balken-Fuellung grau */
.sggf { fill: var(--linie-hell); }
