/* ==========================================================================
   supcode: gemeinsames Stylesheet
   Farben, Abstände und Schriftgrößen zentral in :root ändern.

   Aufbau:
   1. Variablen, Reset, Basis, Abschnittsrhythmus
   2. Topbar, Header, Navigation, Megamenü
   3. Buttons, Sektionen, Hero
   4. Raster & Kacheln (.grid--auto + .tile wachsen automatisch mit)
   5. Inhaltskomponenten (Listen, Preis, FAQ, CTA, Formular, Tabellen)
   6. Footer
   7. Breakpoints (mobil zuerst: 640px, 900px)

   Abstandsregel: Für Layout-Abstände nur die --space-Stufen verwenden.
   Karten haben innen --card-pad (große Karten --card-pad-l), Raster --grid-gap.
   ========================================================================== */

/* Poppins liegt lokal in assets/fonts (Quelle: Fontsource, Lizenz SIL OFL 1.1, siehe fonts/LICENSE).
   Bitte nicht wieder von Google Fonts laden, die Datenschutzerklärung sagt: keine Verbindung zu Google. */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/poppins-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/poppins-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/poppins-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/poppins-latin-700-normal.woff2") format("woff2");
}

:root {
  /* Farbwelt */
  --color-primary: #4A3AA8;
  --color-secondary: #6C5CE7;
  --color-text: #1C1B2B;
  --color-accent: #C3BCEF;
  --color-border: #E6E4F2;
  --color-lighter: #7F7C96;
  --color-dark: #0F0E1A;
  --color-highlight: #9B8CFF;
  --color-mist: #F4F3FA;

  /* Typografie */
  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Consolas", "Menlo", monospace;

  /* Schriftgrößen: feste Stufen statt Einzelwerte */
  --text-2xs: 0.6875rem;  /* 11px: Badges, Mini-Tabellen */
  --text-xs: 0.75rem;     /* 12px: Labels in Versalien, Kleingedrucktes */
  --text-sm: 0.875rem;    /* 14px: Hinweise, Metadaten, Links in Karten */
  --text-md: 0.9375rem;   /* 15px: Kartentexte, Buttons, Navigation */
  --text-base: 1rem;      /* 16px: Fließtext */
  --text-lg: 1.125rem;    /* 18px: h3, Einleitungen */
  --text-xl: 1.25rem;     /* 20px: Kennzahlen */
  --text-2xl: 1.5rem;     /* 24px: h2 in Fließtext und Doku */
  --text-price: 2rem;     /* 32px: Preise */

  /* Abstände: ein Raster in 4er-Schritten, Name = Vielfaches von 4px */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Rhythmus der Seite (wächst an den Breakpoints mit) */
  --section-space: var(--space-16);  /* oben und unten in jeder Sektion */
  --hero-space: var(--space-12);     /* Kopfbereich der Unterseiten */
  --head-gap: var(--space-8);        /* Sektionskopf bis Inhalt */
  --block-gap: var(--space-8);       /* zwischen Blöcken einer Sektion */
  --grid-gap: var(--space-6);        /* zwischen Karten im Raster */
  --col-gap: var(--space-8);         /* zwischen zwei Spalten */
  --card-pad: var(--space-6);        /* Innenabstand aller Karten */
  --card-pad-l: var(--space-6);      /* große Karten: Preise, Kaufbox */

  /* Layout */
  --container-width: 1140px;
  --container-pad: var(--space-4);
  --header-height: 72px;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --shadow-soft: 0 16px 40px -24px rgba(15, 14, 26, 0.25);

  /* Kachel-Raster: Mindestbreite einer Kachel, steuert, wie viele Spalten entstehen */
  --tile-min: 250px;
}

/* --------------------------------------------------------------------------
   Reset & Basis
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

/* Ankerziele unter dem klebenden Header freihalten (Headerhöhe + Luft) */
[id] {
  scroll-margin-top: calc(var(--header-height) + var(--space-6));
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-4);
  line-height: 1.15;
  font-weight: 700;
  color: var(--color-primary);
  /* Lange deutsche Wörter auf schmalen Handys trennen statt überlaufen lassen */
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.25rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  letter-spacing: -0.01em;
}

/* Eine h3-Größe für alle Karten, Schritte und Funktionen */
h3 {
  font-size: var(--text-lg);
  line-height: 1.3;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-secondary);
}

ul,
ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.25em;
}

::selection {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* Nur für Screenreader sichtbar */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Info-Leiste ganz oben
   -------------------------------------------------------------------------- */

.topbar {
  background-color: var(--color-dark);
  color: #ffffff;
  font-size: var(--text-xs);
  text-align: center;
  padding: var(--space-2) var(--container-pad);
}

.topbar strong {
  font-weight: 600;
}

.topbar .sep {
  color: var(--color-highlight);
  margin: 0 var(--space-2);
}

/* Auf schmalen Screens nur den ersten Hinweis zeigen */
.topbar span:nth-child(n+2) {
  display: none;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--header-height);
  position: relative;
}

/* Logo: Bilddatei assets/logo.png (aus assets/supcode-full-transparent.png erzeugt) */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo__img {
  display: block;
  height: 54px;
  width: auto;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.main-nav a {
  display: block;
  padding: var(--space-3) var(--container-pad);
  text-decoration: none;
  color: var(--color-text);
  font-size: var(--text-md);
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--color-primary);
}

.main-nav a.is-active {
  color: var(--color-primary);
}

/* Mobile: Menü über Checkbox-Hack ein-/ausblenden */
.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--space-2);
  cursor: pointer;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  content: "";
}

.nav-toggle-label span {
  position: relative;
}

.nav-toggle-label span::before {
  position: absolute;
  top: -7px;
}

.nav-toggle-label span::after {
  position: absolute;
  top: 7px;
}

.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.nav-toggle:checked ~ .main-nav {
  display: block;
}

.nav-toggle:checked ~ .nav-toggle-label span {
  background-color: transparent;
}

.nav-toggle:checked ~ .nav-toggle-label span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle:checked ~ .nav-toggle-label span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Zwei Klassen, damit die Regel gegen .btn { display: inline-flex } gewinnt */
.site-header__inner .site-header__cta {
  display: none;
}

/* --------------------------------------------------------------------------
   Megamenü (unter "Plugins")
   Mobil: Aufklappbereich per Checkbox. Desktop: Panel bei Hover/Fokus.
   -------------------------------------------------------------------------- */

.has-mega {
  position: relative;
}

/* Pfeil hinter dem Menüpunkt */
.has-mega__link::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: var(--space-2);
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}

.mega-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Mobil: eigener Aufklapp-Button rechts neben "Plugins" */
.mega-toggle-label {
  position: absolute;
  top: 6px;
  right: var(--space-3);
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: var(--radius-s);
}

.mega-toggle-label::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 15px;
  width: 9px;
  height: 9px;
  border-right: 1.6px solid var(--color-text);
  border-bottom: 1.6px solid var(--color-text);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.mega-toggle:checked ~ .mega-toggle-label::after {
  transform: translateY(5px) rotate(225deg);
}

/* Auf Mobil bleibt der Pfeil am Link selbst weg, der Aufklapp-Button übernimmt */
.has-mega .has-mega__link::after {
  display: none;
}

.mega {
  display: none;
  background-color: var(--color-mist);
  padding: var(--space-1) 0 var(--space-3);
}

.mega-toggle:checked ~ .mega {
  display: block;
}

.mega__group {
  padding: var(--space-3) var(--container-pad) var(--space-1);
}

.mega__title {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-lighter);
}

/* Höhere Spezifität als .main-nav ul, damit die Liste nicht zur Flex-Zeile wird */
.main-nav .mega__list {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav .mega__list a {
  padding: var(--space-2) 0;
  font-weight: 500;
  border-radius: 0;
}

.main-nav .mega__list a strong {
  display: block;
  font-weight: 500;
}

.main-nav .mega__list a span {
  display: block;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-lighter);
}

.main-nav .mega__list a.mega__all {
  color: var(--color-primary);
}

.main-nav .mega__list a.mega__all::after {
  content: "\00a0→";
}

/* Hervorgehobene Karte im Megamenü, nur auf Desktop sichtbar */
.mega__feature {
  display: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-s);
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn--primary:hover {
  background-color: var(--color-secondary);
  color: #ffffff;
}

.btn--secondary {
  background-color: #ffffff;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--secondary:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

/* Für dunkle Flächen (CTA-Panel, Footer) */
.btn--light {
  background-color: #ffffff;
  color: var(--color-primary);
}

.btn--light:hover {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

.btn--ghost-light {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--ghost-light:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.btn--small {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

/* --------------------------------------------------------------------------
   Sektionen & Überschriften
   -------------------------------------------------------------------------- */

.section {
  padding: var(--section-space) 0;
}

.section--mist {
  background-color: var(--color-mist);
}

/* Zwei Sektionen mit gleichem Hintergrund direkt hintereinander:
   kein doppelter Abstand, sondern genau einer */
.section:not(.section--mist) + .section:not(.section--mist),
.section--mist + .section--mist {
  padding-top: 0;
}

/* Fester Rhythmus innerhalb einer Sektion:
   Kopf bis Inhalt --head-gap, Block bis Block --block-gap, Hinweis eng darunter */
.section > .container:not(.doc-layout) > * {
  margin-top: 0;
  margin-bottom: 0;
}

.section > .container:not(.doc-layout) > * + * {
  margin-top: var(--block-gap);
}

.section > .container:not(.doc-layout) > .section-head + * {
  margin-top: var(--head-gap);
}

.section > .container:not(.doc-layout) > .note {
  margin-top: var(--space-4);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--head-gap);
}

.section-head > :last-child {
  margin-bottom: 0;
}

.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head p {
  color: var(--color-lighter);
}

/* Variante: Text links, Link rechts ("Alle Plugins →") */
.section-head--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-8);
}

.section-head--row .section-head__text {
  max-width: 640px;
}

.section-head--row .section-head__text > :last-child {
  margin-bottom: 0;
}

.section-head--row .section-link {
  margin-bottom: var(--space-1);
}

.eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-lighter);
}

.section-link {
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.section-link::after {
  content: "\00a0→";
}

/* Überschrift + Statusbadge nebeneinander (z. B. Plattform-Abschnitte) */
.heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.heading-row h2 {
  margin-bottom: 0;
}

/* Breadcrumb (Unterseiten) */
.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
  padding: 0;
  font-size: var(--text-sm);
  color: var(--color-lighter);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--color-accent);
}

.breadcrumb a {
  color: var(--color-lighter);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Hero (Startseite)
   -------------------------------------------------------------------------- */

.hero {
  background: linear-gradient(180deg, var(--color-mist) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--color-border);
  padding: var(--section-space) 0;
}

.hero__inner {
  display: grid;
  gap: var(--col-gap);
  align-items: center;
}

.hero__copy > p {
  max-width: 540px;
  font-size: var(--text-lg);
  color: var(--color-text);
}

/* Text bis Buttons: immer 32px (Absatz 16 + 16) */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* Illustrative Karte rechts im Hero (rein dekorativ) */
.hero-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
  padding: var(--card-pad-l);
  max-width: 400px;
}

.hero-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-2);
}

.hero-card__title {
  font-weight: 600;
  font-size: var(--text-md);
}

.hero-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
}

.hero-card__row dt {
  color: var(--color-lighter);
}

.hero-card__row dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

.hero-card dl {
  margin: 0;
}

.hero-card__foot {
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-lighter);
}

/* Kleine Häkchen-Chips, z. B. unter dem Hero */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  padding: var(--space-4) 0;
  margin: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

.chip::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-size: var(--text-2xs);
  font-weight: 700;
}

.chip-bar {
  border-bottom: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   Kleiner Hero für Unterseiten
   -------------------------------------------------------------------------- */

.page-hero {
  background: linear-gradient(180deg, var(--color-mist) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--color-border);
  padding: var(--hero-space) 0;
}

.page-hero p {
  max-width: 640px;
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: 0;
}

.page-hero .hero__actions {
  margin-top: var(--space-8);
}

/* Badges oberhalb/unterhalb der H1 */
.page-hero .badge-row {
  margin-bottom: var(--space-4);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* --------------------------------------------------------------------------
   Raster & Karten
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--grid-gap);
}

/* Wächst automatisch: neue Kacheln einfach anhängen, Spaltenzahl ergibt sich
   aus --tile-min und der verfügbaren Breite (1 Spalte mobil, bis 4 am Desktop) */
.grid--auto {
  grid-template-columns: repeat(auto-fill, minmax(min(var(--tile-min), 100%), 1fr));
}

.card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: var(--card-pad);
}

.card--mist {
  background-color: var(--color-mist);
  border-color: transparent;
}

.card p {
  color: var(--color-lighter);
  font-size: var(--text-md);
}

.card > :last-child {
  margin-bottom: 0;
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-m);
  background-color: var(--color-mist);
  border: 1px solid var(--color-border);
  color: var(--color-primary);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

/* Status- und Plattform-Badges.
   Alle Varianten haben einen 1px-Rand (bei gefüllten unsichtbar), damit sie gleich hoch sind. */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-size: var(--text-2xs);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--outline {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-lighter);
}

/* Status: verfügbar (Standard), in Entwicklung, geplant */
.badge--soon {
  background-color: #ffffff;
  border-color: var(--color-highlight);
  color: var(--color-primary);
}

.badge--planned {
  background-color: var(--color-mist);
  border-color: var(--color-border);
  color: var(--color-lighter);
}

/* --------------------------------------------------------------------------
   Kacheln (.tile) für Plugins UND Plattformen
   Aufbau: .tile > .tile__top (Icon/Mark + Badge) > h3 > p > .tile__meta (Badge + Link)
   .tile__meta steht immer unten und ist immer eine Zeile, damit die Trennlinien
   aller Kacheln einer Reihe auf gleicher Höhe liegen.
   Die ganze Kachel ist klickbar, sobald sie einen .tile__link enthält.
   -------------------------------------------------------------------------- */

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: var(--card-pad);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tile:hover {
  border-color: var(--color-highlight);
  transform: translateY(-2px);
}

.tile__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.tile__top .card__icon {
  margin-bottom: 0;
}

/* Plattform-Kürzel als farbige Marke ("JTL", "S", "W") */
.tile__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-m);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tile__mark--soft {
  background: var(--color-mist);
  border: 1px solid var(--color-border);
  color: var(--color-primary);
}

.tile__sub {
  font-size: var(--text-sm);
  color: var(--color-lighter);
  margin-bottom: var(--space-3);
}

.tile p {
  color: var(--color-lighter);
  font-size: var(--text-md);
}

.tile .check-list {
  margin-bottom: var(--space-4);
}

.tile .check-list li {
  font-size: var(--text-sm);
}

.tile__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.tile__meta .badge-row {
  gap: var(--space-2);
}

.tile__link {
  font-weight: 500;
  font-size: var(--text-sm);
  text-decoration: none;
  white-space: nowrap;
}

.tile__link::after {
  content: "\00a0→";
}

/* Klickfläche der ganzen Kachel */
.tile__link::before {
  content: "";
  position: absolute;
  inset: 0;
}

/* Platzhalter-Kachel: "Nächstes Plugin folgt", "Plattform anfragen".
   Transparent mit gestricheltem Rand, damit sie auf Weiß und Pastell gleich wirkt. */
.tile--placeholder {
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: transparent;
  border: 1.5px dashed var(--color-accent);
}

.tile--placeholder:hover {
  transform: none;
}

.tile--placeholder .card__icon {
  background-color: #ffffff;
}

.tile--placeholder .tile__link::before {
  content: none;
}

/* --------------------------------------------------------------------------
   Häkchen-Liste (Funktionslisten)
   -------------------------------------------------------------------------- */

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
  display: grid;
  gap: var(--space-3);
}

.check-list li {
  position: relative;
  padding-left: var(--space-8);
  font-size: var(--text-base);
}

/* Häkchen mittig zur ersten Textzeile, egal welche Schriftgröße */
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: calc((1.6em - 20px) / 2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-size: var(--text-2xs);
  font-weight: 700;
}

.check-list strong {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Zweispaltiges Layout (Text + Karte)
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  gap: var(--col-gap);
  align-items: start;
}

/* Mobil einspaltig. minmax(0, 1fr) verhindert, dass breite Inhalte
   (Tabellen, Codeblöcke, Mockups) die Seite seitlich aufschieben. */
.hero__inner,
.split,
.doc-layout,
.product-hero__inner {
  grid-template-columns: minmax(0, 1fr);
}

/* --------------------------------------------------------------------------
   Preisblock
   -------------------------------------------------------------------------- */

.price-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--card-pad-l);
  max-width: 420px;
}

.price-card .badge {
  margin-bottom: var(--space-4);
}

.price-card--featured {
  border-color: var(--color-primary);
}

.price-card__price {
  font-size: var(--text-price);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}

.price-card__price span {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--color-lighter);
}

.price-card__note {
  font-size: var(--text-sm);
  color: var(--color-lighter);
}

.price-card .btn {
  width: 100%;
  margin-top: var(--space-4);
}

.price-card .check-list {
  margin: var(--space-6) 0;
}

/* --------------------------------------------------------------------------
   FAQ (details/summary)
   -------------------------------------------------------------------------- */

.faq {
  display: grid;
  gap: var(--space-3);
  max-width: 760px;
}

.faq details {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: 0;
  overflow: hidden;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4) var(--space-12) var(--space-4) var(--space-6);
  font-weight: 500;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--color-primary);
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details[open] summary {
  border-bottom: 1px solid var(--color-border);
}

.faq details p {
  padding: var(--space-4) var(--space-6);
  margin: 0;
  color: var(--color-lighter);
  font-size: var(--text-md);
}

/* --------------------------------------------------------------------------
   CTA-Panel (dunkle Fläche)
   -------------------------------------------------------------------------- */

.cta-panel {
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 100%);
  border-radius: var(--radius-l);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  color: #ffffff;
}

.cta-panel h2 {
  color: #ffffff;
}

.cta-panel p {
  max-width: 560px;
  margin: 0 auto var(--space-8);
  color: var(--color-accent);
}

.cta-panel .hero__actions {
  justify-content: center;
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Formulare (Kontakt)
   -------------------------------------------------------------------------- */

.form {
  display: grid;
  gap: var(--space-4);
}

.form-field {
  display: grid;
  gap: var(--space-2);
}

.form-field label {
  font-size: var(--text-sm);
  font-weight: 500;
}

.form-field .hint {
  font-size: var(--text-xs);
  color: var(--color-lighter);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  background-color: #ffffff;
  font-family: inherit;
  font-size: var(--text-md);
  color: var(--color-text);
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 0;
  border-color: var(--color-secondary);
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-lighter);
}

.form-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--color-primary);
}

.form-row {
  display: grid;
  gap: var(--space-4);
}

/* --------------------------------------------------------------------------
   Fließtext-Seiten (Impressum, Datenschutz, Über uns)
   -------------------------------------------------------------------------- */

.prose {
  max-width: 760px;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-12);
}

.prose h3 {
  margin-top: var(--space-6);
}

.prose p,
.prose li {
  color: var(--color-text);
}

.prose .placeholder {
  color: var(--color-lighter);
  background-color: var(--color-mist);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-s);
  padding: 2px var(--space-2);
}

/* --------------------------------------------------------------------------
   Tabellen: Kompatibilität (zwei Spalten) und Vergleich
   Beide sitzen in .table-wrap bzw. .compare-wrap und teilen sich die Zellabstände.
   -------------------------------------------------------------------------- */

.compat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-md);
}

.compat-table th,
.compat-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.compat-table th {
  font-weight: 600;
  color: var(--color-lighter);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background-color: var(--color-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-16) 0 var(--space-8);
}

.site-footer .logo {
  margin-bottom: var(--space-4);
}

/* Gleiche Datei auf dunklem Grund: per Filter in Weiß umgewandelt */
.site-footer .logo__img {
  height: 64px;
  filter: brightness(0) invert(1);
}

.footer-grid {
  display: grid;
  gap: var(--space-8);
  padding-bottom: var(--space-12);
}

.footer-brand p {
  max-width: 280px;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.65);
}

.footer-col h2 {
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: var(--text-sm);
}

.footer-col a:hover {
  color: var(--color-highlight);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Responsiv: ab Tablet
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  :root {
    --container-pad: var(--space-6);
    --card-pad-l: var(--space-8);
  }

  .topbar span:nth-child(n+2) {
    display: inline;
  }

  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-panel {
    padding: var(--space-16) var(--space-12);
  }
}

/* --------------------------------------------------------------------------
   Responsiv: ab Desktop
   -------------------------------------------------------------------------- */

@media (min-width: 900px) {
  :root {
    --section-space: var(--space-24);
    --hero-space: var(--space-16);
    --head-gap: var(--space-12);
    --col-gap: var(--space-12);
    --header-height: 80px;
  }

  .hero__inner {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .hero-card {
    justify-self: end;
    width: 100%;
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .split {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .footer-grid {
    grid-template-columns: 1.4fr repeat(4, 1fr);
  }

  /* Navigation als horizontale Leiste */
  .nav-toggle,
  .nav-toggle-label {
    display: none;
  }

  .main-nav {
    display: block;
    position: static;
    max-height: none;
    overflow: visible;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .main-nav ul {
    flex-direction: row;
    gap: var(--space-1);
  }

  .main-nav a {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-s);
  }

  .main-nav a:hover {
    background-color: var(--color-mist);
  }

  .main-nav a.is-active {
    background-color: var(--color-mist);
  }

  .site-header__inner .site-header__cta {
    display: inline-flex;
  }

  .logo__img {
    height: 60px;
  }

  /* Megamenü auf Desktop: Panel in Containerbreite unter dem Header */
  .has-mega {
    position: static;
  }

  .has-mega .has-mega__link::after {
    display: inline-block;
  }

  .mega-toggle,
  .mega-toggle-label {
    display: none;
  }

  .mega {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 60;
    padding: var(--space-8);
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    border-top: 0;
    border-radius: 0 0 var(--radius-l) var(--radius-l);
    box-shadow: var(--shadow-soft);
  }

  /* Unsichtbare Brücke zwischen Menüpunkt und Panel, damit Hover nicht abreißt */
  .mega::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -22px;
    height: 22px;
  }

  .has-mega:hover > .mega,
  .has-mega:focus-within > .mega {
    display: block;
  }

  .mega__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
    gap: var(--space-12);
  }

  .mega__group {
    padding: 0;
  }

  .mega__title {
    margin-bottom: var(--space-3);
  }

  .main-nav .mega__list a {
    padding: var(--space-2) var(--space-3);
    margin-left: calc(var(--space-3) * -1);
    border-radius: var(--radius-s);
  }

  .main-nav .mega__list a:hover {
    background-color: var(--color-mist);
  }

  .mega__feature {
    display: block;
    background-color: var(--color-mist);
    border-radius: var(--radius-m);
    padding: var(--card-pad);
  }

  .mega__feature .mega__title {
    color: var(--color-primary);
  }

  .mega__feature-title {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-lg);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
  }

  .mega__feature p {
    font-size: var(--text-sm);
    color: var(--color-lighter);
    margin-bottom: var(--space-4);
  }
}

/* ==========================================================================
   Produkt- und Dokumentationsseiten
   Bausteine für Plugin-Detailseiten: Oberflächen-Vorschau, Schrittfolgen,
   Hinweisboxen, Doku-Karten, Changelog, Vergleichstabelle.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Oberflächen-Vorschau (rein dekorativ, zeigt das Backend des Plugins)
   -------------------------------------------------------------------------- */

.mockup {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.mockup__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-mist);
  border-bottom: 1px solid var(--color-border);
}

.mockup__dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.mockup__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-border);
}

.mockup__title {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-lighter);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mockup__body {
  padding: var(--space-4);
}

.mockup__body > :last-child {
  margin-bottom: 0;
}

.mockup__section {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-lighter);
  margin: var(--space-6) 0 var(--space-3);
}

.mockup__section:first-child {
  margin-top: 0;
}

/* Statusfeld: zeigt, ob das Plugin wirklich arbeitet */
.status-panel {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-m);
  background-color: var(--color-mist);
  border-left: 3px solid var(--color-primary);
}

.status-panel__dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: var(--text-2xs);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-panel__text strong {
  display: block;
  font-size: var(--text-md);
  margin-bottom: 2px;
}

.status-panel__text span {
  font-size: var(--text-sm);
  color: var(--color-lighter);
}

.status-panel--warn {
  border-left-color: var(--color-highlight);
}

.status-panel--warn .status-panel__dot {
  background-color: var(--color-highlight);
}

/* Kennzahlen im Mockup */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.stat {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  text-align: center;
}

.stat__value {
  display: block;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.stat__label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-lighter);
  margin-top: var(--space-1);
}

/* Kompakte Tabelle im Mockup */
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.mini-table th,
.mini-table td {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.mini-table th {
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-lighter);
}

.mini-table td:last-child,
.mini-table th:last-child {
  text-align: right;
}

.mini-table tr:last-child td {
  border-bottom: 0;
}

/* Schalter, rein optisch */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

/* Schiene */
.switch::before {
  content: "";
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background-color: var(--color-primary);
  flex-shrink: 0;
}

/* Knopf, rechts wenn an, links wenn aus */
.switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 17px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #ffffff;
  transform: translateY(-50%);
}

.switch--off::before {
  background-color: var(--color-border);
}

.switch--off::after {
  left: 3px;
}

.switch-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

/* --------------------------------------------------------------------------
   Nummerierte Schrittfolge
   -------------------------------------------------------------------------- */

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-6);
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: var(--space-12);
}

/* Kreis mittig zur ersten Zeile der Überschrift */
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: calc((var(--text-lg) * 1.3 - 32px) / 2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.steps p {
  margin-bottom: 0;
  color: var(--color-lighter);
  font-size: var(--text-md);
}

/* --------------------------------------------------------------------------
   Hinweisbox
   -------------------------------------------------------------------------- */

.callout {
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-highlight);
  border-radius: var(--radius-m);
  background-color: var(--color-mist);
  padding: var(--card-pad);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout__title {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.callout p {
  font-size: var(--text-md);
  color: var(--color-lighter);
}

/* --------------------------------------------------------------------------
   Funktionsblöcke mit Icon
   -------------------------------------------------------------------------- */

.feature {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.feature .card__icon {
  margin-bottom: 0;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.feature .card__icon svg {
  width: 20px;
  height: 20px;
}

.feature p {
  margin-bottom: 0;
  font-size: var(--text-md);
  color: var(--color-lighter);
}

/* --------------------------------------------------------------------------
   Dokumentations-Karten
   -------------------------------------------------------------------------- */

.doc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: var(--card-pad);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.doc-card:hover {
  border-color: var(--color-highlight);
  transform: translateY(-2px);
}

.doc-card__kind {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-lighter);
  margin-bottom: var(--space-2);
}

.doc-card p {
  font-size: var(--text-md);
  color: var(--color-lighter);
}

.doc-card__link {
  margin-top: auto;
  padding-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}

.doc-card__link::after {
  content: "\00a0\2192";
}

.doc-card__link::before {
  content: "";
  position: absolute;
  inset: 0;
}

/* --------------------------------------------------------------------------
   Changelog
   -------------------------------------------------------------------------- */

.changelog {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-4);
  max-width: 760px;
}

.changelog > li {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: var(--card-pad);
}

.changelog__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.changelog__version {
  font-weight: 600;
  font-size: var(--text-base);
}

.changelog__date {
  font-size: var(--text-sm);
  color: var(--color-lighter);
}

.changelog ul {
  margin: 0;
  padding-left: 1.1em;
  font-size: var(--text-md);
  color: var(--color-lighter);
}

.changelog ul li + li {
  margin-top: var(--space-1);
}

/* --------------------------------------------------------------------------
   Vergleichstabelle
   -------------------------------------------------------------------------- */

.compare-wrap,
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  background-color: #ffffff;
}

.table-wrap .compat-table tbody tr:last-child th,
.table-wrap .compat-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--text-md);
}

.compare-table th,
.compare-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.compare-table thead th {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-lighter);
  white-space: nowrap;
}

/* Spaltenköpfe stehen über ihren Werten */
.compare-table thead th:not(:first-child) {
  text-align: center;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table tbody th {
  font-weight: 500;
  color: var(--color-text);
}

.compare-table td {
  text-align: center;
  color: var(--color-lighter);
}

.compare-table .is-yes {
  color: var(--color-primary);
  font-weight: 600;
}

.compare-table .col-own {
  background-color: var(--color-mist);
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   Inhaltsverzeichnis und Fließtext der Dokumentation
   -------------------------------------------------------------------------- */

.doc-layout {
  display: grid;
  gap: var(--col-gap);
  align-items: start;
}

.toc {
  background-color: var(--color-mist);
  border-radius: var(--radius-m);
  padding: var(--card-pad);
}

.toc__title {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-lighter);
  margin-bottom: var(--space-3);
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.toc li {
  counter-increment: toc;
}

.toc a {
  text-decoration: none;
  font-size: var(--text-md);
  font-weight: 500;
}

.toc a::before {
  content: counter(toc) ". ";
  color: var(--color-lighter);
  font-weight: 400;
}

.doc-body > section + section {
  margin-top: var(--space-12);
  padding-top: var(--space-12);
  border-top: 1px solid var(--color-border);
}

.doc-body h2 {
  font-size: var(--text-2xl);
}

.doc-body h3 {
  margin-top: var(--space-8);
}

.doc-body p,
.doc-body li {
  font-size: var(--text-base);
}

.doc-body ul,
.doc-body ol {
  color: var(--color-text);
}

.doc-body ul li + li,
.doc-body ol li + li {
  margin-top: var(--space-2);
}

/* Blöcke im Doku-Text halten denselben Abstand nach oben und unten */
.doc-body .callout,
.doc-body .steps,
.doc-body .table-wrap,
.doc-body .code {
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.doc-body .steps > li + li {
  margin-top: 0;
}

.doc-body .steps h3 {
  margin-top: 0;
}

/* Codeblock, rein zur Darstellung */
.code {
  background-color: var(--color-dark);
  color: #E8E6F5;
  border-radius: var(--radius-m);
  padding: var(--space-4) var(--space-6);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  /* Zeilenumbrüche aus dem HTML behalten, lange Zeilen auf dem Handy umbrechen */
  white-space: pre-wrap;
  margin: 0 0 var(--space-4);
}

.code__comment {
  color: var(--color-highlight);
}

code {
  background-color: var(--color-mist);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.code code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* --------------------------------------------------------------------------
   Responsiv
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .mockup__body {
    padding: var(--space-6);
  }
}

@media (min-width: 900px) {
  .doc-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .toc {
    position: sticky;
    top: calc(var(--header-height) + var(--space-8));
  }

  .compat-table th,
  .compat-table td,
  .compare-table th,
  .compare-table td {
    padding: var(--space-4) var(--space-6);
  }
}

/* Doku-Link in der Megamenü-Karte */
.mega__doc-link {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}

.mega__doc-link::after {
  content: "\00a0\2192";
}

/* Kleiner Hinweistext unter Abbildungen und Tabellen */
.note {
  font-size: var(--text-sm);
  color: var(--color-lighter);
  margin-top: var(--space-4);
}

.note--center {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ==========================================================================
   Kaufbereich
   Produktkopf mit Vorschau und Kaufbox, Preisoptionen zum Umschalten,
   Vertrauenshinweise, Preisangabe auf Kacheln.
   Die Umschaltung läuft rein über CSS, ohne JavaScript.
   ========================================================================== */

.product-hero {
  background: linear-gradient(180deg, var(--color-mist) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--color-border);
  padding: var(--hero-space) 0;
}

.product-hero__inner {
  display: grid;
  gap: var(--col-gap);
  align-items: start;
}

.product-hero__media > :last-child {
  margin-bottom: 0;
}

.product-hero__media > .badge-row {
  margin-bottom: var(--space-4);
}

.product-hero__intro {
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
}

/* --------------------------------------------------------------------------
   Kaufbox: Abschnitte im festen 24er-Takt
   -------------------------------------------------------------------------- */

.buybox {
  position: relative;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
  padding: var(--card-pad-l);
}

.buybox__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-1);
}

.buybox__sub {
  font-size: var(--text-sm);
  color: var(--color-lighter);
  margin-bottom: var(--space-6);
}

/* Versteckte Schalter für die Preisumschaltung */
.lic-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.price-options {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.price-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.price-option:hover {
  border-color: var(--color-highlight);
}

.price-option__dot {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  background-color: #ffffff;
}

.price-option__dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background-color: var(--color-primary);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.price-option__body {
  flex: 1;
}

.price-option__name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--text-base);
}

.price-option__amount {
  color: var(--color-primary);
  white-space: nowrap;
}

.price-option__note {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-lighter);
  margin-top: var(--space-1);
}

/* Ausgewählte Option hervorheben */
.price-option:has(.lic-radio:checked) {
  border-color: var(--color-primary);
  background-color: var(--color-mist);
}

.price-option:has(.lic-radio:checked) .price-option__dot {
  border-color: var(--color-primary);
}

.price-option:has(.lic-radio:checked) .price-option__dot::after {
  opacity: 1;
}

/* Zusammenfassung mit dem gewählten Preis */
.lic-radio:focus-visible + .price-option__dot {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.buy-summary {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.buy-summary__price {
  display: block;
  font-size: var(--text-price);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}

.buy-summary__price span {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--color-lighter);
}

.buy-summary__meta {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-lighter);
  margin-top: var(--space-2);
}

.buy-summary__sub {
  display: none;
}

.buybox:has(#lic-sub:checked) .buy-summary__once {
  display: none;
}

.buybox:has(#lic-sub:checked) .buy-summary__sub {
  display: block;
}

.buy-actions {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.buy-actions .btn {
  width: 100%;
}

.btn--buy {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
}

/* Vertrauenshinweise unter dem Kaufen-Knopf */
.trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-6);
}

.trust-list li {
  position: relative;
  padding-left: var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-lighter);
}

.trust-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: calc((1.6em - 20px) / 2);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-size: var(--text-2xs);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.buybox__legal {
  font-size: var(--text-xs);
  color: var(--color-lighter);
  margin: var(--space-4) 0 0;
}

.buybox__legal a {
  color: var(--color-lighter);
}

/* --------------------------------------------------------------------------
   Preisangabe auf Kacheln
   -------------------------------------------------------------------------- */

.tile__price {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
}

.tile p.tile__price {
  font-size: var(--text-sm);
  color: var(--color-primary);
}

.tile__price span {
  font-weight: 400;
  color: var(--color-lighter);
}

/* --------------------------------------------------------------------------
   Lizenzvergleich weiter unten auf der Seite
   -------------------------------------------------------------------------- */

.license-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  padding: var(--card-pad-l);
}

.license-card--featured {
  border-color: var(--color-primary);
}

.license-card__tag {
  margin-bottom: var(--space-4);
}

.license-card__price {
  font-size: var(--text-price);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
  margin-bottom: var(--space-2);
}

.license-card__price span {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--color-lighter);
}

.license-card__note {
  font-size: var(--text-sm);
  color: var(--color-lighter);
  margin-bottom: var(--space-6);
}

.license-card .check-list {
  margin-bottom: var(--space-6);
}

.license-card .check-list li {
  font-size: var(--text-md);
}

.license-card .btn {
  width: 100%;
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   Responsiv
   -------------------------------------------------------------------------- */

@media (min-width: 900px) {
  .buybox {
    position: sticky;
    top: calc(var(--header-height) + var(--space-8));
  }

  .product-hero__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}
