/* ============================================================
   leichtlernbar.de — Dachseite
   Design-Tokens 1:1 aus der SQL-Werkbank-Landingpage (Handoff).
   ============================================================ */

:root {
  color-scheme: light;
  --ll-canvas:        #E4EAE8;
  --ll-surface:       #FFFFFF;
  --ll-surface-2:     #EEF3F1;
  --ll-border:        #C2CFCA;
  --ll-border-strong: #AEBCB8;
  --ll-text:          #0F1A17;
  --ll-text-muted:    #566460;
  --ll-brand:         #0C8A5E;
  --ll-brand-hover:   #0A7550;
  --ll-brand-ink:     #FFFFFF;
  --ll-brand-soft:    #D6F0E4;
  --ll-pk:            #B77B14;
  --ll-pk-text:       #9A6710;
  --ll-fk:            #2E6BD6;
  --ll-col:           #64756F;
  --ll-danger:        #C0453E;
  /* Arena-Familienfarbe (nur als Akzent-Badge) */
  --ll-arena:         #D9541E;
  --ll-arena-soft:    #FBE3D7;
  --joule-bot-bg:     rgba(46, 107, 214, 0.14);

  --bg: var(--ll-canvas);
  --surface: var(--ll-surface);
  --ink: var(--ll-text);
  --muted: var(--ll-text-muted);
  --line: var(--ll-border);
  --accent: var(--ll-brand);
  --accent-strong: var(--ll-brand-hover);
  --accent-soft: var(--ll-brand-soft);
  --pk: var(--ll-pk-text);
  --fk: var(--ll-fk);
  --grid: rgba(15, 26, 23, 0.04);
  --shadow-sm: 0 2px 10px rgba(15, 26, 23, 0.05);
  --shadow-md: 0 14px 40px rgba(12, 60, 50, 0.12);
  --display: 'Space Grotesk', 'Hanken Grotesk', sans-serif;
  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: 'JetBrains Mono', "SFMono-Regular", "Consolas", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ll-canvas:        #090C0E;
  --ll-surface:       #1A2226;
  --ll-surface-2:     #212C31;
  --ll-border:        #33424A;
  --ll-border-strong: #45545B;
  --ll-text:          #EAEFEF;
  --ll-text-muted:    #8F9C9C;
  --ll-brand:         #16C08A;
  --ll-brand-hover:   #12A56E;
  --ll-brand-ink:     #04211B;
  --ll-brand-soft:    #123329;
  --ll-pk:            #E7A93C;
  --ll-pk-text:       #F0BE63;
  --ll-fk:            #6E9BF5;
  --ll-col:           #7C8A90;
  --ll-danger:        #F0837E;
  --ll-arena:         #F07B45;
  --ll-arena-soft:    #3A2117;
  --joule-bot-bg:     rgba(110, 155, 245, 0.22);

  --accent-strong: var(--ll-brand);
  --grid: rgba(180, 200, 195, 0.05);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 30px 30px,
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Kopf ---------- */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-logo { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}
.wm-leicht { color: var(--ll-text); }
.wm-lernbar { color: var(--ll-brand); }
.wm-de { color: var(--ll-text-muted); }

.logo-g1 { stop-color: #12A56E; }
.logo-g2 { stop-color: #0A7550; }
.logo-detail { fill: #0C8A5E; }
:root[data-theme="dark"] .logo-g1 { stop-color: #16C08A; }
:root[data-theme="dark"] .logo-g2 { stop-color: #16C08A; }
:root[data-theme="dark"] .logo-detail { fill: #16C08A; }
.logo-card { fill: #FFFFFF; }
:root[data-theme="dark"] .logo-card { fill: #0D1113; }

nav.anchors { display: flex; gap: 4px; margin-left: auto; }
nav.anchors a {
  padding: 8px 13px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 140ms ease, background 140ms ease;
}
nav.anchors a:hover { color: var(--ink); background: var(--ll-surface-2); }
@media (max-width: 860px) { nav.anchors { display: none; } }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: 0 0 auto;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 140ms ease, transform 140ms ease;
  color: var(--ll-fk);
}
:root[data-theme="dark"] .theme-toggle { color: var(--ll-pk); }
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 0.98fr;
  gap: 48px;
  align-items: center;
  padding: 46px 0 64px;
}
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(33px, 4.8vw, 50px);
  line-height: 1.08;
  letter-spacing: -1px;
  margin: 0 0 20px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p.lead {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 32em;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--ll-brand-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-md);
  transition: transform 140ms ease;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 22px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
  transition: transform 140ms ease, border-color 140ms ease;
}
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn-primary svg, .btn-secondary svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Hero-Collage ---------- */
.collage {
  position: relative;
  min-height: 730px;
}
.collage .piece {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.piece-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}
.piece-label svg { width: 13px; height: 13px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ER-Diagramm: zwei Tabellen mit 1:n-Beziehung, wie in der Werkbank.
   Die Szene wird vom Hero-Orchestrator choreografiert:
   .step-a bestellungen erscheint, .step-b Linie zeichnet sich, .step-c FK klappt auf. */
.p-er { left: 0; top: 0; width: 380px; transform: rotate(-1.5deg); z-index: 2; }
.er-scene {
  position: relative;
  height: 214px;
  background:
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--ll-surface-2);
}
.er-table {
  position: absolute;
  z-index: 2; /* Karten liegen vor der Beziehungslinie: sie beginnt sichtbar exakt an der Kante */
  width: 132px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  font-size: 10.5px;
}
.t-kunden { left: 10px; top: 12px; }
.t-best {
  right: 12px;
  top: 100px;
  width: 150px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 400ms ease, transform 400ms ease;
}
#heroEr.step-a .t-best { opacity: 1; transform: none; }
.fk-add {
  max-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0;
  overflow: hidden;
  transition: max-height 320ms ease, padding 320ms ease, opacity 320ms ease;
}
#heroEr.step-c .fk-add { max-height: 30px; padding-top: 4px !important; padding-bottom: 4px !important; opacity: 1; }
.er-table .h {
  padding: 4px 10px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-bottom: 1px solid var(--line);
}
.er-table .r {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--line);
}
.er-table .r:last-child { border-bottom: 0; }
.er-table .r .t { margin-left: auto; color: var(--muted); font-size: 8.5px; }
.ki { width: 12px; height: 12px; display: inline-flex; flex: none; }
.ki svg { width: 100%; height: 100%; display: block; }
.ki.pk { color: var(--pk); }
.ki.pk svg { fill: currentColor; stroke: none; }
.ki.fk { color: var(--fk); }
.ki.fk svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.er-diamond { width: 5px; height: 5px; border: 1.3px solid var(--ll-col); transform: rotate(45deg); flex: none; }
.er-conn-v { position: absolute; z-index: 1; left: 74px; top: 58px; height: 0; width: 2px; background: var(--accent); transition: height 400ms ease; }
#heroEr.step-b .er-conn-v { height: 128px; }
.er-conn-h { position: absolute; z-index: 1; left: 74px; top: 184px; width: 0; height: 2px; background: var(--accent); transition: width 400ms ease 380ms; }
#heroEr.step-b .er-conn-h { width: 136px; }
.er-arrow {
  position: absolute; z-index: 1; left: 208px; top: 179px; width: 0; height: 0;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 8px solid var(--accent);
  opacity: 0;
  transition: opacity 250ms ease 760ms;
}
#heroEr.step-b .er-arrow { opacity: 1; }
.er-num { position: absolute; font-family: var(--mono); font-weight: 700; font-size: 11px; color: var(--ink); opacity: 0; transition: opacity 300ms ease 820ms; }
#heroEr.step-b .er-num { opacity: 1; }
.er-num1 { left: 82px; top: 92px; }
.er-numn { left: 182px; top: 160px; }
/* Struktogramm-Fragment */
.p-strukto { right: 0; top: 244px; width: 300px; transform: rotate(1.6deg); z-index: 1; }
.strukto { font-family: var(--mono); font-size: 10.5px; line-height: 1.5; padding: 10px; }
.strukto .s-row {
  border: 1px solid var(--ink);
  border-bottom: 0;
  padding: 4px 8px;
  white-space: nowrap;
  overflow: hidden;
}
.strukto .s-row:last-child { border-bottom: 1px solid var(--ink); }
.strukto .s-loop {
  border: 1px solid var(--ink);
  border-bottom: 0;
  background: var(--accent-soft);
}
.strukto .s-loop .s-head { padding: 4px 8px; }
.strukto .s-loop .s-body { margin-left: 18px; background: var(--surface); border-left: 1px solid var(--ink); }
.strukto .s-body .s-row { border-left: 0; border-right: 0; }

/* Zeile, die die Choreografie nachträglich ergänzt */
.strukto .s-add {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 350ms ease, padding 350ms ease, opacity 350ms ease;
}
#heroStrukto.grow .s-add { max-height: 30px; padding: 4px 8px; opacity: 1; border-top-width: 1px; }

/* Verzweigung: Bedingung im Dreieckskopf, darunter zwei Zweige */
.s-if { border: 1px solid var(--ink); border-bottom: 0; background: var(--accent-soft); }
.s-cond { position: relative; height: 36px; }
.s-cond svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.s-cond svg line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.s-cond .s-q { position: absolute; top: 2px; left: 0; right: 0; text-align: center; }
.s-cond .s-wahr { position: absolute; left: 6px; bottom: 1px; font-size: 8.5px; color: var(--muted); }
.s-cond .s-falsch { position: absolute; right: 6px; bottom: 1px; font-size: 8.5px; color: var(--muted); }
.s-branches { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); }
.s-branches .s-cell { border-top: 1px solid var(--ink); padding: 4px 8px; white-space: nowrap; overflow: hidden; }
.s-branches .s-cell:first-child { border-right: 1px solid var(--ink); }

/* SQL-Panel (tippt sich selbst) */
.p-sql { left: 6px; top: 532px; width: 296px; z-index: 4; }
.sql-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}
.run-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border: 0;
  font-family: var(--sans);
  cursor: default;
}
.run-chip svg { width: 8px; height: 8px; fill: currentColor; }
.sql-code {
  padding: 11px 13px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  min-height: 3.4em;
  white-space: nowrap;
  overflow: hidden;
}
.sql-code .kw { color: var(--fk); font-weight: 600; }
.caret {
  display: inline-block;
  width: 7px; height: 13px;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.sql-result { border-top: 1px solid var(--line); }
.sql-result .rr {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 10px;
  padding: 5px 13px;
  font-family: var(--mono);
  font-size: 10.5px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 300ms ease, transform 300ms ease;
}
.sql-result .rr.show { opacity: 1; transform: none; }
.sql-result .rr + .rr { border-top: 1px solid var(--line); }
.sql-result .rh { font-weight: 700; color: var(--muted); }

/* Joule-Streifen */
.p-joule { right: 0; top: 566px; width: 216px; transform: rotate(-1.4deg); z-index: 5; }
/* Joule-Welt: Felder dicht an dicht, nur schmale Fugen */
.joule-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  padding: 2px;
  background: var(--line);
}
.joule-field {
  position: relative;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--surface);
}
.joule-bot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: transform 420ms ease;
  z-index: 2;
  background: var(--joule-bot-bg);
  border-radius: 3px;
}
.joule-bot svg { width: 84%; height: 84%; display: block; }
.joule-wall, .joule-cabinet {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.joule-wall svg, .joule-cabinet svg { width: 86%; height: 86%; display: block; }
/* Energiezelle als kleine Münze mit Blitz */
.joule-energy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 220ms ease, transform 220ms ease;
}
.joule-energy svg { width: 78%; height: 78%; display: block; }
.joule-energy.collected { opacity: 0; transform: scale(0.5); }

/* ---------- Sektionen ---------- */
section.block { padding: 44px 0; }
.section-title {
  font-family: var(--display);
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}
.section-sub { color: var(--muted); margin: 0 0 30px; font-size: 15.5px; max-width: 46em; }
.section-title.solo { margin-bottom: 30px; }
.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  vertical-align: 3px;
  margin-left: 10px;
}
.badge.arena { background: var(--ll-arena-soft); color: var(--ll-arena); }

/* Tool-Karten (Werkbänke + Plattformen) */
.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.tool {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.tool:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tool-visual {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--ll-surface-2);
  padding: 18px;
  /* Einheitliche Höhe, damit alle Kartenköpfe einer Reihe bündig sitzen */
  min-height: 240px;
  display: grid;
  place-items: center;
}
.tool-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; flex: 1; }
.tool-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.tool-head svg { width: 20px; height: 20px; flex: none; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool-body p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.tool-link {
  margin-top: auto;
  padding-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
}
.tool-link:hover { text-decoration: underline; }
.tool-link svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.tool-status { margin-top: auto; padding-top: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* Duo-Visual: Modell und SQL nebeneinander in der Werkbank-Karte */
.tool-visual.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}
.mini-er { position: relative; height: 168px; max-width: 240px; width: 100%; margin: 0 auto; }
.mini-er .er-table { font-size: 9.5px; width: 106px; opacity: 1; transform: none; }
.mini-er .me-a { left: 0; top: 4px; }
.mini-er .me-b { left: 104px; top: 92px; width: 118px; right: auto; }
.mini-er .me-b .fk-add,
.mini-er .r { max-height: none; }
.mini-er .mc-v { position: absolute; z-index: 1; left: 52px; top: 50px; height: 82px; width: 2px; background: var(--accent); }
.mini-er .mc-h { position: absolute; z-index: 1; left: 52px; top: 130px; width: 44px; height: 2px; background: var(--accent); }
.mini-er .mc-a {
  position: absolute; z-index: 1; left: 96px; top: 125px; width: 0; height: 0;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 8px solid var(--accent);
}

/* Joule-Welt-Karte (statisch) */
.mock-world { width: 100%; max-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }

/* Mini-SQL-Panel in der Werkbank-Karte (klickbar) */
.mini-sql { width: 100%; max-width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.mini-sql .run-chip { cursor: pointer; }
.mini-sql .run-chip:hover { background: var(--accent-strong); }

/* Mini-Struktogramm in der Werkbank-Karte */
.mini-strukto { width: 100%; max-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); padding: 12px; }
.mini-strukto .strukto { padding: 0; font-size: 11px; }
.mini-strukto .s-row, .mini-strukto .s-loop { opacity: 0; transform: translateY(6px); }
.mini-strukto.play .s-row, .mini-strukto.play .s-loop {
  animation: rise 0.45s cubic-bezier(0.2,0.7,0.2,1) forwards;
}
.mini-strukto.play .b1 { animation-delay: 0.05s; }
.mini-strukto.play .b2 { animation-delay: 0.25s; }
.mini-strukto.play .b3 { animation-delay: 0.45s; }
.mini-strukto.play .b4 { animation-delay: 0.65s; }

/* Plattform-Mockups */
.mock-progress { width: 100%; max-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; font-size: 12px; }
.mock-progress .mp-head { padding: 8px 13px; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--muted); font-size: 11.5px; display: flex; justify-content: space-between; align-items: center; }
.mp-points { color: var(--pk); font-family: var(--mono); font-weight: 700; }
.mock-progress .mp-item { display: flex; align-items: center; gap: 9px; padding: 7px 13px; border-bottom: 1px solid var(--line); color: var(--ink); }
.mock-progress .mp-item:last-child { border-bottom: 0; }
.mp-check { width: 15px; height: 15px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 10px; flex: none; }
.mp-open { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; }
.mp-item.dim { color: var(--muted); }

.mock-py { width: 100%; max-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
.mock-py .run-chip { cursor: pointer; }
.mock-py .run-chip:hover { background: var(--accent-strong); }
.py-code {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  padding: 10px 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}
.py-code .kw { color: var(--fk); font-weight: 600; }
.py-code .st { color: var(--accent-strong); }
.py-console {
  border-top: 1px solid var(--line);
  background: var(--ll-surface-2);
  font-family: var(--mono);
  font-size: 11px;
  padding: 8px 13px;
  min-height: 2.3em;
}
.py-console .pc { color: var(--muted); font-weight: 700; }
.py-console .py-out { opacity: 0; transition: opacity 300ms ease; }
.py-console .py-out.show { opacity: 1; }

/* ---------- Arena ---------- */
.arena-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 34px;
}
.arena-copy p { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.arena-copy p strong { color: var(--ink); }
.games { display: grid; gap: 10px; margin: 20px 0; }
.game {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ll-surface-2);
  font-size: 13.5px;
}
.game b { font-family: var(--display); font-size: 14.5px; white-space: nowrap; }
.game span { color: var(--muted); }

/* Arena-Demo */
.arena-demo {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--ll-surface-2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
}
.ad-q {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.ad-q code { font-family: var(--mono); font-size: 12px; color: var(--fk); font-weight: 600; }
.ad-options { display: grid; gap: 8px; }
.ad-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13.5px;
  font-family: var(--sans);
  cursor: pointer;
  text-align: left;
  transition: border-color 120ms ease, transform 120ms ease;
}
.ad-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.ad-opt .lbl {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex: none;
}
.ad-bars { display: grid; gap: 10px; }
.ad-bar { display: grid; grid-template-columns: 26px 1fr 34px; align-items: center; gap: 9px; font-size: 12.5px; }
.ad-bar .lbl { font-weight: 700; color: var(--muted); }
.ad-bar .track { height: 18px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.ad-bar .fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 5px;
  background: var(--ll-border-strong);
  transition: width 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ad-bar.mine .fill { background: var(--accent); }
.ad-bar.correct .fill { background: var(--accent); }
.ad-bar .n { font-family: var(--mono); font-weight: 700; text-align: right; color: var(--muted); }
.ad-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; min-height: 2.4em; }
.ad-note b { color: var(--ink); }
.ad-actions { margin-top: auto; display: flex; gap: 10px; align-items: center; }
.ad-btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: var(--ll-brand-ink);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform 120ms ease;
}
.ad-btn:hover { transform: translateY(-1px); }
.ad-btn.ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 600;
}
.ad-hidden { display: none !important; }

/* ---------- Lehrkräfte + Prinzip ---------- */
.grid3 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature .ic {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 14px;
}
.feature .ic svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin: 0 0 6px; font-size: 16.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.principle {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.principle .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 10px; }
.principle .ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.principle h3 { margin: 0 0 4px; font-size: 14.5px; }
.principle p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.principles-more { text-align: center; color: var(--muted); font-size: 14.5px; margin: 26px 0 0; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 34px 0 48px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.fword { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -0.02em; color: var(--muted); }
.fword .l { color: var(--ink); }
.fword .b { color: var(--accent); }
.legal { font-size: 13px; }
.legal a { color: var(--muted); text-decoration: none; }
.legal a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.reveal.d1 { animation-delay: 0.05s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.27s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .mini-strukto .s-row, .mini-strukto .s-loop { opacity: 1 !important; transform: none !important; animation: none !important; }
  .sql-result .rr { opacity: 1; transform: none; }
  .caret { animation: none; }
  html { scroll-behavior: auto; }
  /* Hero-Choreografie: alles im Endzustand zeigen */
  .t-best { opacity: 1 !important; transform: none !important; }
  .er-conn-v { height: 128px !important; }
  .er-conn-h { width: 136px !important; }
  .er-arrow, .er-num { opacity: 1 !important; }
  .fk-add { max-height: 30px !important; padding-top: 4px !important; padding-bottom: 4px !important; opacity: 1 !important; }
  .strukto .s-add { max-height: 30px !important; padding: 4px 8px !important; opacity: 1 !important; border-top-width: 1px !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 32px 0 46px; }
  .collage { min-height: 430px; max-width: 560px; }
  .arena-stage { grid-template-columns: 1fr; padding: 26px; }
  .principles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .tools { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; }
  header.site { padding: 18px; }
  .collage { min-height: 610px; }
  .p-strukto { display: none; }
  .p-er { left: 0; width: 100%; }
  #heroEr.step-b .er-conn-h { width: 80px; }
  .er-arrow { left: 152px; }
  .er-numn { left: 128px; }
  .p-sql { left: 0; top: 264px; width: min(320px, 100%); }
  .p-joule { right: 0; top: 448px; width: 216px; }
  .tool-visual.duo { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .principles { grid-template-columns: 1fr; }
  .p-joule { top: 448px; width: 206px; }
}
