/*
  zupan.tech, Variante Studio
  Neutrale Flächen, Systemschrift, getönte Karten in der Farbwelt der App-Symbole.
  Kein JavaScript, keine Webfonts, keine Scroll-Animationen.
*/

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Flächen und Text */
  --bg: #ffffff;
  --text: #1d1d1f;
  --text-2: #5c5c62;
  --line: rgba(29, 29, 31, 0.11);
  --surface: #f2f2f4;
  --link: #0060c0;
  --link-hover: #004a94;
  --focus: #0a63d1;

  /* Farbwelten der App-Symbole */
  --ps-surface: #edf3fc;
  --gid-surface: #fbeff0;
  --tint-ring: rgba(16, 24, 40, 0.05);
  --tint-light: rgba(255, 255, 255, 0.7);

  /* Knopf, abgeleitet vom Dunkelblau des PortfolioSpiel-Symbols */
  --btn-bg: #1b283d;
  --btn-bg-hover: #26385a;
  --btn-bg-active: #121c2c;
  --btn-text: #ffffff;
  --btn-icon-bg: rgba(255, 255, 255, 0.15);
  --btn-shadow: 0 1px 2px rgba(16, 24, 40, 0.14), 0 4px 10px -4px rgba(16, 24, 40, 0.24);
  --btn-sheen: rgba(255, 255, 255, 0.1);

  /* Statusplakette */
  --pill-bg: #ffffff;
  --pill-ring: rgba(29, 29, 31, 0.1);

  /* Symbole */
  --icon-shadow: drop-shadow(0 1px 1px rgba(16, 24, 40, 0.06)) drop-shadow(0 5px 8px rgba(16, 24, 40, 0.09));
  --icon-shadow-lg: drop-shadow(0 2px 3px rgba(16, 24, 40, 0.08)) drop-shadow(0 22px 28px rgba(16, 24, 40, 0.16));

  /* Geräte */
  --bezel: #0b0b0d;
  --bezel-rim: rgba(255, 255, 255, 0.15);
  --device-edge: rgba(16, 24, 40, 0.16);
  --device-shadow:
    0 1px 2px rgba(16, 24, 40, 0.08),
    0 14px 26px -12px rgba(16, 24, 40, 0.26),
    0 38px 64px -30px rgba(16, 24, 40, 0.36);
  --base-shadow: 0 1px 1px rgba(16, 24, 40, 0.1), 0 16px 24px -14px rgba(16, 24, 40, 0.4);
  --base-hi: #f4f5f7;
  --base-1: #dfe1e5;
  --base-2: #c5c8ce;
  --base-3: #a2a5ac;
  --base-notch: rgba(16, 24, 40, 0.13);

  /* Bewegung: nur Rückmeldung auf Druck und Zeiger */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur-press: 120ms;
  --dur-hover: 160ms;

  /* Maße */
  --max: 1120px;
  --gutter: 16px;
  --radius-xl: 24px;
  --section-space: clamp(88px, 12vw, 160px);
}

@media (min-width: 48em) {
  :root {
    --gutter: 32px;
    --radius-xl: 32px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161618;
    --text: #f5f5f7;
    --text-2: #a8a8af;
    --line: rgba(245, 245, 247, 0.13);
    --surface: #242427;
    --link: #5ea8ff;
    --link-hover: #8cc1ff;
    --focus: #5ea8ff;

    /* Von oben leicht aufgehellt, damit die Karten im Dunkeln Tiefe haben */
    --ps-surface: linear-gradient(180deg, #1d2739 0%, #182030 100%);
    --gid-surface: linear-gradient(180deg, #291f25 0%, #211b1f 100%);
    --tint-ring: rgba(255, 255, 255, 0.07);
    --tint-light: rgba(255, 255, 255, 0.06);

    --btn-bg: #f5f5f7;
    --btn-bg-hover: #ffffff;
    --btn-bg-active: #e3e3e8;
    --btn-text: #121b2b;
    --btn-icon-bg: rgba(18, 27, 43, 0.08);
    --btn-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 14px -6px rgba(0, 0, 0, 0.55);
    --btn-sheen: rgba(255, 255, 255, 0.6);

    --pill-bg: rgba(255, 255, 255, 0.07);
    --pill-ring: rgba(255, 255, 255, 0.13);

    --icon-shadow: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3)) drop-shadow(0 5px 10px rgba(0, 0, 0, 0.35));
    --icon-shadow-lg: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)) drop-shadow(0 22px 30px rgba(0, 0, 0, 0.45));

    --bezel: #050506;
    --bezel-rim: rgba(255, 255, 255, 0.2);
    --device-edge: rgba(255, 255, 255, 0.06);
    --device-shadow:
      0 1px 2px rgba(0, 0, 0, 0.4),
      0 14px 26px -12px rgba(0, 0, 0, 0.6),
      0 38px 64px -30px rgba(0, 0, 0, 0.8);
    --base-shadow: 0 1px 1px rgba(0, 0, 0, 0.4), 0 16px 24px -14px rgba(0, 0, 0, 0.8);
    --base-hi: #6a6c72;
    --base-1: #45474d;
    --base-2: #303236;
    --base-3: #1d1e21;
    --base-notch: rgba(0, 0, 0, 0.4);
  }
}

/* ---------- Grundlage ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

/* Keine einzelnen Wörter in der letzten Zeile */
p,
li,
dt,
dd {
  text-wrap: pretty;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* Beim Durchtabben bleibt der ganze Fokusring im Bild, auch am Fensterrand */
a,
summary {
  scroll-margin-block: 16px;
}

/* Textlinks: Fokusring mit runden Ecken statt scharfem Rechteck */
.wordmark,
.site-nav a,
.more,
.footer-nav a,
.back a,
.toc a,
.legal-block a {
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.nowrap {
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: var(--gutter);
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
}

/* ---------- Kopf ---------- */

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.wordmark {
  padding-block: 8px;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.022em;
  text-decoration: none;
}

.wordmark-tld {
  color: var(--text-2);
  font-weight: 600;
}

.site-nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 10px;
  color: var(--text-2);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color var(--dur-hover) ease;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover {
    color: var(--text);
  }
}

/* Rückmeldung beim Tippen, auch ohne Zeiger */
.site-nav a:active {
  color: var(--text);
}

@media (min-width: 48em) {
  .site-header-inner {
    min-height: 76px;
  }

  .site-nav ul {
    gap: 32px;
  }
}

/* ---------- Einstieg mit beiden Apps ---------- */

.hero {
  padding-top: clamp(28px, 6vw, 80px);
}

.hero-title {
  margin-inline: auto;
  max-width: 20ch;
  font-size: clamp(2rem, 1.1rem + 4.2vw, 4.5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.032em;
  text-align: center;
  text-wrap: balance;
}

.app-cards {
  display: grid;
  gap: 12px;
  margin-top: clamp(28px, 5vw, 64px);
  list-style: none;
}

/* Getönte Fläche: gemeinsame Grundlage von Karten und Bühnen */
.app-card,
.stage {
  border-radius: var(--radius-xl);
  box-shadow: inset 0 1px 0 var(--tint-light), inset 0 0 0 1px var(--tint-ring);
}

.app-card--ps,
.stage--ps {
  background: var(--ps-surface);
}

.app-card--gid,
.stage--gid {
  background: var(--gid-surface);
}

/* Handy: kompakte Zeile mit Symbol links, damit beide Apps im ersten Bildschirm stehen */
.app-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  column-gap: 14px;
  padding: 20px 20px 18px;
}

/* Das Symbolbild hat rund 10 % transparenten Rand: oben und links ausgleichen */
.app-card-icon {
  grid-row: 1 / span 2;
  margin: -4px 0 0 -7px;
}

.app-card-icon img {
  width: 76px;
  filter: var(--icon-shadow);
}

.app-card-title {
  grid-column: 2;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.022em;
}

.app-card-text {
  grid-column: 2;
  margin-top: 4px;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.42;
  text-wrap: pretty;
}

.app-card-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  min-height: 44px;
  margin-top: 16px;
}

.app-card-meta {
  grid-column: 1 / -1;
  margin-top: 10px;
  color: var(--text-2);
  font-size: 0.8125rem;
}

/* Sehr schmale Handys: Text unter Symbol und Titel, damit die Zeilen nicht zerfallen */
@media (max-width: 22.4375em) {
  .app-card {
    grid-template-columns: 60px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
  }

  .app-card-icon {
    grid-row: auto;
    margin: -5px 0 -5px -6px;
  }

  .app-card-icon img {
    width: 60px;
  }

  .app-card-text {
    grid-column: 1 / -1;
    margin-top: 12px;
  }
}

/* Ab Tablet: zwei gleichwertige Karten nebeneinander, zentriert */
@media (min-width: 48em) {
  .app-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 28px 36px;
    text-align: center;
  }

  .app-card-icon {
    margin: 0;
  }

  .app-card-icon img {
    width: 128px;
  }

  .app-card-title {
    margin-top: 18px;
    font-size: clamp(1.75rem, 1.2rem + 1.1vw, 2.125rem);
    line-height: 1.1;
    letter-spacing: -0.024em;
  }

  .app-card-text {
    max-width: 30ch;
    margin-top: 10px;
    font-size: 1.0625rem;
    line-height: 1.45;
    text-wrap: balance;
  }

  /* Hauptaktion und Link untereinander, in beiden Karten gleich hoch */
  .app-card-actions {
    display: grid;
    grid-template-rows: 48px 44px;
    justify-items: center;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 28px;
  }

  .app-card-meta {
    margin-top: 10px;
    font-size: 0.875rem;
  }
}

@media (min-width: 64em) {
  .app-card {
    padding: 52px 40px 40px;
  }

  /* Genug Breite: Hauptaktion und Link in einer Zeile */
  .app-card-actions {
    display: flex;
    grid-template-rows: none;
    justify-content: center;
    gap: 12px 28px;
    min-height: calc(30px + 48px);
    padding-top: 30px;
  }

  .app-card-meta {
    margin-top: 16px;
  }
}

/* ---------- Knopf, Link, Status ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  background: var(--btn-bg);
  box-shadow: inset 0 1px 0 var(--btn-sheen), var(--btn-shadow);
  color: var(--btn-text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;
  transition:
    background-color var(--dur-hover) ease,
    transform var(--dur-press) var(--ease-out);
}

.button:active {
  background: var(--btn-bg-active);
  transform: scale(0.97);
}

.button-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--btn-icon-bg);
}

.button-icon svg {
  transition: transform var(--dur-hover) var(--ease-out);
}

/* Zurück-Knopf: Symbol vorn */
.button--back {
  padding: 6px 18px 6px 6px;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: var(--btn-bg-hover);
  }

  .button:active {
    background: var(--btn-bg-active);
  }

  .button:hover .button-icon svg {
    transform: translateY(2px);
  }

  .button--back:hover .button-icon svg {
    transform: translateX(-2px);
  }
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  color: var(--link);
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-hover) ease;
}

.more svg {
  flex: none;
  margin-top: 1px;
}

@media (hover: hover) and (pointer: fine) {
  .more:hover {
    color: var(--link-hover);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }
}

.more:active {
  color: var(--link-hover);
}

@media (min-width: 48em) {
  .button {
    gap: 14px;
    min-height: 48px;
    padding-left: 22px;
    font-size: 1.0625rem;
  }

  .button-icon {
    width: 36px;
    height: 36px;
  }

  .button--back {
    padding: 6px 22px 6px 6px;
  }

  .button--large {
    min-height: 52px;
    padding-left: 24px;
  }

  .button--large .button-icon {
    width: 40px;
    height: 40px;
  }

  .more {
    font-size: 1.0625rem;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 14px 4px 12px;
  border-radius: 999px;
  background: var(--pill-bg);
  box-shadow: inset 0 0 0 1px var(--pill-ring);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
}

/* Halb gefüllter Kreis: in Arbeit, noch nicht verfügbar */
.pill::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

/* ---------- App-Abschnitte ---------- */

main {
  flex: 1 0 auto;
  padding-bottom: var(--section-space);
}

/* Abstand als Außenrand, damit ein Sprung über die Navigation knapp über dem Abschnitt landet */
.app-section {
  margin-top: var(--section-space);
  scroll-margin-top: 32px;
}

.eyebrow {
  color: var(--text-2);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.section-title {
  margin-top: 6px;
  font-size: clamp(2.25rem, 1.45rem + 2.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 30ch;
  margin-top: 14px;
  color: var(--text-2);
  font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
  line-height: 1.4;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

/* Das Symbolbild hat rund 10 % transparenten Rand: links ausgleichen, damit es mit dem Text fluchtet */
.section-icon img {
  width: 64px;
  margin: 0 0 16px -6px;
  filter: var(--icon-shadow);
}

.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 22px;
}

.status-text {
  color: var(--text-2);
  font-size: 0.9375rem;
}

.stage {
  overflow: hidden;
}

/* PortfolioSpiel: Bühne mit dem Symbol, daneben Text und Download */

.ps-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "stage"
    "rest";
  row-gap: 32px;
}

.ps-grid .section-head {
  grid-area: head;
}

.ps-grid .section-rest {
  grid-area: rest;
}

.stage--ps {
  grid-area: stage;
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 40px 24px;
}

.stage-icon img {
  width: 216px;
  filter: var(--icon-shadow-lg);
}

/* Listen und Daten */

.list {
  border-top: 1px solid var(--line);
  list-style: none;
}

.list > li {
  padding-block: 13px;
  border-bottom: 1px solid var(--line);
}

.download {
  margin-top: 32px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin-top: 28px;
}

.facts-wide {
  grid-column: 1 / -1;
}

.facts dt,
.requirements-list dt {
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 500;
}

.facts dd,
.requirements-list dd {
  margin-top: 2px;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.placeholder {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
  white-space: nowrap;
}

/* Installation */

.install {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.install summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  margin-inline: -12px;
  padding-inline: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.install summary:focus-visible {
  outline-offset: -2px;
}

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

.install-chevron {
  flex: none;
  color: var(--text-2);
  transition: transform var(--dur-hover) var(--ease-out), color var(--dur-hover) ease;
}

@media (hover: hover) and (pointer: fine) {
  .install summary:hover .install-chevron {
    color: var(--text);
  }
}

.install[open] .install-chevron {
  transform: rotate(90deg);
}

.steps {
  display: grid;
  gap: 12px;
  padding-block: 4px 20px;
  counter-reset: step;
  list-style: none;
}

.steps > li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  font-size: 0.9375rem;
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Get It Done: Kopf, breite Bühne mit allen Geräten, Funktionen und Voraussetzungen */

.gid-head .lead {
  margin-top: 14px;
}

.stage--gid {
  margin-top: 32px;
  padding: 28px 12px 30px;
}

/*
  Geräte-Komposition. Die Fläche hat ein festes Seitenverhältnis, alle Geräte sitzen in Prozent darauf.
  Rahmenmaße stehen in cqw des jeweiligen Geräts, damit Radien und Ränder in jeder Größe konzentrisch bleiben.
  Handy: Mac oben, davor iPad und iPhone auf einer Linie, das iPhone rechts bündig mit dem Mac.
*/
.devices {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 100 / 101;
}

.device {
  position: absolute;
  container-type: inline-size;
}

.device--mac {
  top: 0;
  left: 6%;
  width: 88%;
}

.device--ipad {
  bottom: 1%;
  left: 2%;
  width: 45%;
}

.device--iphone {
  bottom: 1%;
  width: 24%;
}

.device--lernen {
  left: 70%;
}

.mac-lid,
.device-frame {
  background: var(--bezel);
  box-shadow:
    inset 0 0 0 1px var(--bezel-rim),
    0 0 0 1px var(--device-edge),
    var(--device-shadow);
}

.mac-lid img,
.device-frame img {
  width: 100%;
}

.mac-lid {
  padding: 1.5cqw 1.5cqw 2cqw;
  border-radius: 2.8cqw 2.8cqw 0.8cqw 0.8cqw;
}

.mac-lid img {
  border-radius: 1.3cqw 1.3cqw 0 0;
}

/* Unterteil: etwas breiter als der Deckel, mit Griffmulde */
.mac-base {
  position: relative;
  height: 2.4cqw;
  margin-inline: -3%;
  border-radius: 0.4cqw 0.4cqw 50% 50% / 0.4cqw 0.4cqw 100% 100%;
  background: linear-gradient(180deg, var(--base-hi) 0, var(--base-1) 16%, var(--base-2) 58%, var(--base-3) 100%);
  box-shadow: var(--base-shadow);
}

.mac-base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 15%;
  height: 38%;
  border-radius: 0 0 1cqw 1cqw;
  background: var(--base-notch);
  transform: translateX(-50%);
}

.device--ipad .device-frame {
  padding: 3.4cqw;
  border-radius: 6cqw;
}

.device--ipad .device-frame img {
  border-radius: 2.6cqw;
}

.device--iphone .device-frame {
  padding: 2.8cqw;
  border-radius: 17.3cqw;
}

.device--iphone .device-frame img {
  border-radius: 14.5cqw;
}

/* Funktionen und Voraussetzungen */

.gid-details {
  display: grid;
  gap: 36px;
  margin-top: 36px;
}

.features {
  border-top: 1px solid var(--line);
  list-style: none;
}

.features > li {
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.feature-title {
  display: block;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature-text {
  display: block;
  margin-top: 2px;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.requirements-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.requirements-list {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

@media (min-width: 48em) {
  .section-icon img {
    width: 72px;
    margin-left: -7px;
  }

  .stage--ps {
    min-height: 420px;
  }

  .stage-icon img {
    width: 264px;
  }

  .stage--gid {
    margin-top: 40px;
    padding: 56px 48px 52px;
  }

  /* Ab Tablet: Mac mittig hinten, links das iPad, rechts das iPhone, beide vorn auf einer Linie */
  .devices {
    aspect-ratio: 100 / 52;
  }

  .device--mac {
    left: 19%;
    width: 62%;
  }

  .mac-base {
    margin-inline: -6%;
  }

  .device--ipad {
    bottom: 4%;
    left: 2%;
    width: 28%;
  }

  .device--iphone {
    bottom: 4%;
    width: 14%;
  }

  .device--lernen {
    left: 72.5%;
  }

  .gid-details {
    gap: 48px;
    margin-top: 48px;
  }

  .features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 32px;
    border-top: 0;
  }

  .features > li {
    padding-block: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 0;
  }

  .requirements-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 32px;
    margin-top: 16px;
  }

  .requirements-list > div {
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
}

@media (min-width: 60em) {
  .ps-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "stage head"
      "stage rest";
    column-gap: clamp(48px, 6vw, 96px);
    row-gap: 0;
  }

  /* Die Bühne reicht von der Dachzeile bis zur letzten Linie der Textspalte */
  .stage--ps {
    min-height: 0;
  }

  .ps-grid .section-rest {
    margin-top: 32px;
  }

  .gid-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    column-gap: clamp(48px, 6vw, 96px);
  }

  .gid-head .lead {
    margin-top: 0;
  }
}

@media (min-width: 64em) {
  .features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Vier Spalten wie die Funktionen: Titel in der ersten, die drei Angaben in den übrigen */
  .requirements {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 32px;
  }

  .requirements-title {
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }

  .requirements-list {
    grid-column: 2 / -1;
    margin-top: 0;
  }
}

/* ---------- Fuß ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 28px 40px;
  color: var(--text-2);
  font-size: 0.875rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-nav a {
  display: inline-block;
  padding-block: 10px;
  color: var(--text);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .footer-nav a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }
}

.footer-nav a:active {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.footer-nav a[aria-current="page"] {
  color: var(--text-2);
}

.fine {
  margin-top: 12px;
  font-size: 0.8125rem;
}

/* ---------- Rechtliche Seiten und Fehlerseite ---------- */

.legal {
  padding-top: clamp(40px, 8vw, 104px);
}

/* Eine Textspalte, bündig mit der Wortmarke */
.legal-inner > * {
  max-width: 40rem;
}

.legal-title {
  font-size: clamp(2.25rem, 1.45rem + 2.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* Hinweis „Entwurf“, bis der Text freigegeben ist */
.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 28px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.notice > p:last-child {
  flex: 1 1 16rem;
}

.notice-label {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--pill-ring);
  font-size: 0.8125rem;
  font-weight: 600;
}

.legal-lead {
  margin-top: 32px;
  color: var(--text-2);
  font-size: clamp(1.125rem, 1.06rem + 0.25vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: -0.008em;
}

/* Inhaltsverzeichnis der Datenschutzerklärung */
.toc {
  margin-top: 36px;
  padding-block: 16px 10px;
  border-block: 1px solid var(--line);
}

.toc-title {
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
}

.toc ul {
  margin-top: 6px;
  list-style: none;
}

.toc li {
  break-inside: avoid;
}

.toc a {
  display: inline-block;
  padding-block: 6px;
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.35;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .toc a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }
}

.toc a:active {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (min-width: 40em) {
  .toc ul {
    columns: 2;
    column-gap: 32px;
  }
}

/* Abschnitte */
.legal-block {
  margin-top: 44px;
}

.legal-block h2 {
  font-size: clamp(1.25rem, 1.12rem + 0.45vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.018em;
  text-wrap: balance;
  scroll-margin-top: 24px;
}

.legal-block p,
.legal-block ul {
  margin-top: 12px;
}

.legal-block h2 + p,
.legal-block h2 + ul {
  margin-top: 10px;
}

.legal-block p,
.legal-block li {
  line-height: 1.6;
}

/* Trennen nur auf schmalen Bildschirmen und nur bei langen Wörtern */
@media (max-width: 47.9375em) {
  .legal-block p,
  .legal-block li {
    -webkit-hyphens: auto;
    hyphens: auto;
    -webkit-hyphenate-limit-before: 4;
    -webkit-hyphenate-limit-after: 4;
    hyphenate-limit-chars: 10 4 4;
  }
}

.legal-block ul {
  padding-left: 1.25em;
}

.legal-block li + li {
  margin-top: 4px;
}

.legal-block li::marker {
  color: var(--text-2);
}

.legal-block a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-hover) ease;
}

@media (hover: hover) and (pointer: fine) {
  .legal-block a:hover {
    color: var(--link-hover);
  }
}

.legal-block a:active {
  color: var(--link-hover);
}

/* Widerspruchsrecht: getrennt von den übrigen Informationen (Art. 21 Abs. 4 DSGVO) */
.legal-block--framed {
  padding: 22px 20px 24px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* Beim Sprung aus dem Inhalt bleibt die Oberkante des Rahmens sichtbar */
.legal-block--framed h2 {
  scroll-margin-top: 56px;
}

.legal-stand {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.9375rem;
}

@media (min-width: 48em) {
  .legal-block {
    margin-top: 52px;
  }

  .legal-block--framed {
    padding: 28px 30px 30px;
  }
}

.back {
  margin-top: 48px;
}

.legal-stand + .back {
  margin-top: 24px;
}

.back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--link);
  text-decoration: none;
  transition: color var(--dur-hover) ease;
}

@media (hover: hover) and (pointer: fine) {
  .back a:hover {
    color: var(--link-hover);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }
}

.back a:active {
  color: var(--link-hover);
}

main.not-found {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(48px, 8vw, 96px) clamp(96px, 14vw, 176px);
  text-align: center;
}

.not-found .eyebrow {
  font-variant-numeric: tabular-nums;
}

.not-found .legal-title {
  margin-top: 8px;
}

.not-found .lead {
  margin-inline: auto;
}

.not-found-actions {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

/* ---------- Bewegung nur auf Wunsch ---------- */

@media (prefers-reduced-motion: reduce) {
  .button,
  .button-icon svg,
  .install-chevron {
    transition: none;
  }

  .button:active,
  .button:hover .button-icon svg,
  .button--back:hover .button-icon svg {
    transform: none;
  }
}

/* ---------- Mehr Kontrast auf Wunsch ---------- */

@media (prefers-contrast: more) {
  :root {
    --text-2: #3a3a3f;
    --line: rgba(29, 29, 31, 0.4);
    --tint-ring: rgba(16, 24, 40, 0.32);
    --pill-ring: rgba(29, 29, 31, 0.45);
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --text-2: #d9d9de;
    --line: rgba(245, 245, 247, 0.42);
    --tint-ring: rgba(255, 255, 255, 0.34);
    --pill-ring: rgba(255, 255, 255, 0.45);
  }
}

/* ---------- Erzwungene Farben (Windows-Kontrastdesigns) ---------- */

@media (forced-colors: active) {
  /* Schatten und Flächen entfallen dort, Ränder halten Knöpfe, Plaketten und Karten zusammen */
  .button,
  .pill,
  .notice-label,
  .placeholder {
    border: 1px solid CanvasText;
  }

  .button {
    border-color: LinkText;
  }

  .app-card,
  .stage,
  .notice,
  .legal-block--framed {
    border: 1px solid CanvasText;
  }

  .pill::before {
    forced-color-adjust: none;
    border-color: CanvasText;
    background: linear-gradient(90deg, CanvasText 50%, transparent 50%);
  }
}

/* ---------- Druck ---------- */

@media print {
  /* Immer helle Werte: Browser drucken Hintergründe meist nicht mit */
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --text: #000000;
    --text-2: #3c3c41;
    --line: rgba(0, 0, 0, 0.25);
    --surface: #ffffff;
    --link: #000000;
    --link-hover: #000000;
    --ps-surface: #ffffff;
    --gid-surface: #ffffff;
    --tint-ring: rgba(0, 0, 0, 0.25);
    --tint-light: transparent;
    --pill-bg: #ffffff;
    --pill-ring: rgba(0, 0, 0, 0.4);
  }

  .skip-link,
  .site-nav,
  .back,
  .not-found-actions {
    display: none;
  }

  .button {
    background: none;
    box-shadow: none;
    color: #000000;
    border: 1px solid #000000;
  }

  .button-icon {
    background: none;
  }

  .legal-block h2 {
    break-after: avoid;
  }

  .legal-block--framed,
  .stage,
  .app-card {
    break-inside: avoid;
  }
}
