/* Die 55 Gesetze der KI — Website
   Zwei Welten: die NACHT (Cover: Schwarz, Lime-Kontur, Effra) und das NOTIZBUCH
   (Scribbles: Punktraster, blaue Tinte, Magenta). Effra nie in 600. */

@font-face { font-family: "Effra"; src: url("/fonts/effra-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Effra"; src: url("/fonts/effra-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Effra"; src: url("/fonts/effra-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Effra"; src: url("/fonts/effra-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Effra"; src: url("/fonts/effra-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Effra"; src: url("/fonts/effra-heavy.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --black: #070707;
  --night: #0d0d0d;
  --night-2: #151515;
  --line: #262626;
  --white: #ffffff;
  --mist: #bdbdbd;
  --gray: #8a8a8a;
  --lime: #c4d600;
  --lime-ink: #9fae00;
  --lime-glow: rgba(196, 214, 0, 0.35);
  --pink: #e6007e;
  --paper: #f3f1ec;
  --paper-2: #ebe8e0;
  --paper-dot: #cfcabd;
  --blue: #1f3a93;
  --ink: #1b1b1b;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font: "Effra", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --read: 68ch;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
body {
  margin: 0; background: var(--black); color: var(--white);
  font: 400 18px/1.6 var(--font); overflow-x: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--lime); color: var(--black); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.read { max-width: var(--read); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typo ---------- */
.kicker { font-weight: 700; font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--mist); }
.kicker.lime { color: var(--lime); }
.display { font-weight: 900; text-transform: uppercase; line-height: 0.95; letter-spacing: 0.005em; margin: 0; }
.h1 { font-size: clamp(40px, 7.4vw, 104px); }
.h2 { font-size: clamp(32px, 5vw, 64px); }
.h3 { font-size: clamp(22px, 2.6vw, 30px); }
.lead { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.5; color: var(--mist); font-weight: 300; }
.outline-num {
  font-weight: 900; line-height: 0.8; color: transparent;
  -webkit-text-stroke: 2px var(--lime); paint-order: stroke fill; letter-spacing: -0.02em;
}
.bar { display: block; width: 92px; height: 7px; background: var(--lime); border: 0; margin: 28px 0; }
.prose p { margin: 0 0 1.05em; }
.prose strong { font-weight: 700; }
.prose h3 { font-size: 15px; letter-spacing: 0.24em; text-transform: uppercase; margin: 2em 0 0.8em; color: var(--lime); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--lime); --fg: var(--black);
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 2px solid var(--bg);
  background: var(--bg); color: var(--fg); font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer; transition: transform 0.25s var(--spring), box-shadow 0.25s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -10px var(--lime-glow); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn.ghost { --bg: transparent; --fg: var(--white); border-color: #3a3a3a; }
.btn.ghost:hover { border-color: var(--lime); color: var(--lime); box-shadow: none; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn.ink { --bg: var(--ink); --fg: var(--paper); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid #333; background: transparent; color: var(--mist); font-size: 14px; cursor: pointer; transition: all 0.2s;
}
.chip:hover, .chip[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gutter);
  background: linear-gradient(var(--black) 30%, rgba(7, 7, 7, 0)); transition: background 0.3s;
}
.topbar.solid { background: rgba(7, 7, 7, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid #1c1c1c; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: 0.04em; }
.brand-55 { font-weight: 900; font-size: 30px; line-height: 1; color: transparent; -webkit-text-stroke: 1.4px var(--lime); }
.brand span:last-child { white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.progress-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px;
  border: 1px solid #2a2a2a; font-size: 13px; color: var(--mist); text-decoration: none; white-space: nowrap;
}
.progress-pill svg { width: 26px; height: 26px; }
.progress-pill b { color: var(--white); font-weight: 700; }
.ki-toggle {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px;
  border: 1px solid #2a2a2a; background: transparent; font: 600 13px/1 var(--mono); color: var(--mist); cursor: pointer;
}
.ki-toggle i { width: 30px; height: 18px; border-radius: 99px; background: #2a2a2a; position: relative; transition: background 0.2s; }
.ki-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); transition: transform 0.25s var(--spring); }
.ki-toggle[aria-pressed="true"] { color: var(--lime); border-color: var(--lime); }
.ki-toggle[aria-pressed="true"] i { background: var(--lime); }
.ki-toggle[aria-pressed="true"] i::after { transform: translateX(12px); background: var(--black); }
@media (max-width: 720px) {
  .brand span:last-child { display: none; }
  .top-buy { display: none; }
  .progress-pill span.lbl { display: none; }
}

/* ---------- Reveal ---------- */
.rv { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 0.08s; } .rv.d2 { transition-delay: 0.16s; } .rv.d3 { transition-delay: 0.24s; }

/* ================= HOME ================= */
.hero { position: relative; height: 260vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.hero-frame { position: absolute; inset: 18px; border: 2px solid var(--lime); border-radius: 10px; pointer-events: none; opacity: 0; transition: opacity 1.2s 0.2s; }
.hero-frame::after { content: ""; position: absolute; inset: 14px; border: 1px solid #1e1e1e; border-radius: 4px; }
.hero.ready .hero-frame { opacity: 1; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: relative; z-index: 2; text-align: center; pointer-events: none; display: grid; justify-items: center; }
.hero-author { font-weight: 700; letter-spacing: 0.32em; font-size: clamp(12px, 1.4vw, 17px); opacity: 0; transition: opacity 1s 0.4s; }
.hero-die { font-weight: 700; letter-spacing: 0.6em; color: var(--mist); font-size: clamp(16px, 2vw, 26px); margin-top: 6vh; padding-left: 0.6em; opacity: 0; transition: opacity 1s 0.7s; }
.hero-55-space { height: min(40vh, 52vw); }
.hero-title { font-size: clamp(34px, 6.4vw, 92px); opacity: 0; transform: translateY(20px); transition: all 1s var(--ease) 1.9s; }
.hero-claim { max-width: 660px; margin: 22px auto 0; color: var(--mist); font-weight: 300; font-size: clamp(16px, 1.6vw, 21px); opacity: 0; transition: opacity 1s 2.3s; padding: 0 var(--gutter); }
.hero.ready .hero-author, .hero.ready .hero-die, .hero.ready .hero-claim { opacity: 1; }
.hero.ready .hero-title { opacity: 1; transform: none; }
.hero-hint { position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%); z-index: 3; display: grid; justify-items: center; gap: 10px; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gray); opacity: 0; transition: opacity 1s 3s; }
.hero.ready .hero-hint { opacity: 1; }
.hero-hint i { width: 1px; height: 38px; background: linear-gradient(var(--lime), transparent); animation: drip 1.8s infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.hero-matrix-copy { position: absolute; inset: auto 0 9vh 0; z-index: 3; text-align: center; opacity: 0; transform: translateY(20px); transition: all 0.6s var(--ease); pointer-events: none; padding: 0 var(--gutter); }
.hero-matrix-copy.on { opacity: 1; transform: none; }
.hero-matrix-copy .display { font-size: clamp(26px, 3.6vw, 48px); }
.hero-tip {
  position: absolute; z-index: 5; pointer-events: none; max-width: 300px; padding: 12px 14px; border-radius: 10px;
  background: var(--white); color: var(--black); font-size: 14px; line-height: 1.35; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, calc(-100% - 18px)); opacity: 0; transition: opacity 0.15s;
}
.hero-tip b { display: block; font-size: 12px; letter-spacing: 0.2em; color: var(--lime-ink); }
.hero-tip.on { opacity: 1; }
.part-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.part-labels span { position: absolute; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gray); white-space: nowrap; transform: translateY(-50%); opacity: 0; transition: opacity 0.4s; }
.part-labels.on span { opacity: 1; }

/* sections */
.sec { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.sec-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head .lead { max-width: 720px; }

/* manifesto */
.manifest { font-size: clamp(26px, 3.8vw, 52px); line-height: 1.15; font-weight: 300; max-width: 1050px; margin: 0; }
.manifest em { font-style: normal; color: var(--lime); font-weight: 700; }
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 64px; counter-reset: st; }
.ladder > div { background: var(--night); padding: 28px 24px; border-top: 3px solid #2a2a2a; counter-increment: st; }
.ladder > div::before { content: "0" counter(st); font: 700 13px var(--mono); color: var(--gray); }
.ladder h3 { margin: 14px 0 8px; font-size: 22px; font-weight: 900; text-transform: uppercase; }
.ladder p { margin: 0; color: var(--mist); font-size: 15px; line-height: 1.5; }
.ladder > div:nth-child(3) { border-top-color: var(--lime); }
.ladder > div:nth-child(4) { border-top-color: var(--pink); }
@media (max-width: 860px) { .ladder { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ladder { grid-template-columns: 1fr; } }

/* index */
.idx-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 36px; }
.idx-search { flex: 1 1 260px; min-height: 48px; border-radius: 999px; border: 1px solid #333; background: var(--night); padding: 0 20px; font-size: 16px; outline: none; }
.idx-search:focus { border-color: var(--lime); }
.part { margin-bottom: 72px; }
.part-head { display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 4px; }
.part-head .roman { grid-row: span 2; font-weight: 900; font-size: clamp(64px, 9vw, 120px); line-height: 0.8; color: transparent; -webkit-text-stroke: 1.5px #3c3c3c; }
.part-head p { margin: 0; color: var(--mist); max-width: 760px; font-size: 16px; }
.laws { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 0 32px; }
.law-row {
  position: relative; display: grid; grid-template-columns: 76px 1fr 22px; gap: 18px; align-items: center;
  padding: 22px 6px; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding 0.3s var(--ease), background 0.3s;
}
.law-row .num { font-weight: 900; font-size: 54px; line-height: 0.8; color: transparent; -webkit-text-stroke: 1.3px #4a4a4a; transition: all 0.3s; }
.law-row h3 { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700; }
.law-row p { margin: 6px 0 0; font-size: 14px; color: var(--gray); line-height: 1.4; }
.law-row .st { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #444; justify-self: end; }
.law-row[data-st="read"] .st { border-color: var(--mist); }
.law-row[data-st="understood"] .st { border-color: var(--lime); }
.law-row[data-st="force"] .st { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 14px var(--lime-glow); }
.law-row[data-st="force"] .num { color: var(--lime); -webkit-text-stroke-color: var(--lime); }
.law-row:hover { background: linear-gradient(90deg, rgba(196, 214, 0, 0.07), transparent); padding-left: 16px; }
.law-row:hover .num { -webkit-text-stroke-color: var(--lime); }
.law-row .peek {
  position: absolute; right: 0; top: 50%; width: 300px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; z-index: 4;
  transform: translate(10%, -50%) rotate(3deg) scale(0.9); opacity: 0; pointer-events: none; transition: all 0.35s var(--spring);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.law-row:hover .peek { opacity: 1; transform: translate(0, -50%) rotate(-2deg) scale(1); }
.law-row .peek img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none) { .law-row .peek { display: none; } }
.law-row.hide { display: none; }

/* feature split */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* game teaser */
.game-teaser { background: var(--lime); color: var(--black); overflow: hidden; }
.game-teaser .kicker { color: rgba(0, 0, 0, 0.6); }
.game-teaser .lead { color: rgba(0, 0, 0, 0.75); }
.game-teaser .btn { --bg: var(--black); --fg: var(--lime); }
.big-timer { font-weight: 900; font-size: clamp(180px, 30vw, 420px); line-height: 0.78; color: transparent; -webkit-text-stroke: 3px var(--black); text-align: center; position: relative; }
.big-timer small { display: block; font-size: 15px; letter-spacing: 0.4em; -webkit-text-stroke: 0; color: var(--black); margin-top: 24px; font-weight: 700; }

/* ask */
.ask-box { background: var(--night); border: 1px solid #262626; border-radius: 18px; padding: clamp(18px, 3vw, 30px); }
.ask-box textarea {
  width: 100%; min-height: 128px; resize: vertical; background: transparent; border: 0; outline: none;
  font-size: clamp(18px, 1.8vw, 22px); line-height: 1.45; color: var(--white);
}
.ask-box textarea::placeholder { color: #5c5c5c; }
.ask-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border-top: 1px solid #222; padding-top: 16px; margin-top: 8px; }
.ask-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ask-out { margin-top: 28px; display: grid; gap: 14px; }
.ask-intro { font-size: 20px; line-height: 1.45; color: var(--white); font-weight: 300; }
.ask-card {
  display: grid; grid-template-columns: 90px 1fr; gap: 20px; padding: 22px; border-radius: 14px; background: var(--night-2);
  border: 1px solid #262626; text-decoration: none; animation: rise 0.6s var(--ease) both;
}
.ask-card:nth-child(3) { animation-delay: 0.12s; } .ask-card:nth-child(4) { animation-delay: 0.24s; }
.ask-card .num { font-weight: 900; font-size: 64px; line-height: 0.8; color: transparent; -webkit-text-stroke: 1.5px var(--lime); }
.ask-card h4 { margin: 0 0 6px; font-size: 20px; }
.ask-card p { margin: 0 0 8px; color: var(--mist); font-size: 16px; }
.ask-card .step { color: var(--lime); font-size: 15px; }
.ask-card:hover { border-color: var(--lime); }
.ask-note { font-size: 13px; color: var(--gray); }
.thinking { display: flex; align-items: center; gap: 14px; color: var(--mist); }
.thinking .dots { display: flex; gap: 6px; }
.thinking .dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--lime); animation: pulse 1.2s infinite; }
.thinking .dots i:nth-child(2) { animation-delay: 0.15s; } .thinking .dots i:nth-child(3) { animation-delay: 0.3s; }
.thinking .dots i:nth-child(4) { animation-delay: 0.45s; } .thinking .dots i:nth-child(5) { animation-delay: 0.6s; }
@keyframes pulse { 0%, 100% { background: transparent; transform: scale(0.8); } 50% { background: var(--lime); transform: scale(1.1); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* book */
.book-stage { perspective: 1800px; display: grid; place-items: center; padding: 30px 0; }
.book3d { position: relative; width: min(330px, 70vw); aspect-ratio: 2/3; transform-style: preserve-3d; transform: rotateY(-28deg) rotateX(6deg); transition: transform 0.9s var(--ease); }
.book3d:hover { transform: rotateY(-10deg) rotateX(2deg); }
.book3d .front { position: absolute; inset: 0; border-radius: 2px 6px 6px 2px; overflow: hidden; box-shadow: 30px 40px 80px rgba(0, 0, 0, 0.7), 0 0 120px -30px var(--lime-glow); }
.book3d .front img { width: 100%; height: 100%; object-fit: cover; }
.book3d .spine { position: absolute; top: 0; left: 0; width: 38px; height: 100%; background: linear-gradient(90deg, #000, #1a1a1a); transform: rotateY(-90deg); transform-origin: left; }
.book3d .pages { position: absolute; top: 3px; right: 0; width: 36px; height: calc(100% - 6px); background: repeating-linear-gradient(90deg, #eee 0 1px, #cfcfcf 1px 2px); transform: rotateY(90deg) translateZ(-1px); transform-origin: right; }
.buy-list { display: grid; gap: 12px; margin-top: 28px; }
.buy {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 14px;
  border: 1px solid #2a2a2a; text-decoration: none; transition: all 0.25s var(--ease);
}
.buy:hover { border-color: var(--lime); transform: translateX(6px); }
.buy b { display: block; font-size: 18px; }
.buy span { color: var(--gray); font-size: 14px; }
.buy em { font-style: normal; font-weight: 700; color: var(--lime); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.dl {
  display: grid; gap: 10px; align-content: start; padding: 26px; border-radius: 16px; background: var(--night); border: 1px solid #222;
  text-decoration: none; transition: all 0.25s var(--ease); position: relative; overflow: hidden;
}
.dl:hover { border-color: var(--lime); transform: translateY(-4px); }
.dl .ext { font: 700 13px var(--mono); color: var(--lime); letter-spacing: 0.08em; }
.dl b { font-size: 20px; line-height: 1.2; }
.dl span { color: var(--gray); font-size: 14px; line-height: 1.45; }

/* personal cover */
.mycover { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
@media (max-width: 820px) { .mycover { grid-template-columns: 1fr; } }
#cover-canvas { width: 100%; aspect-ratio: 2/3; border-radius: 6px; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6); background: #070707; }
.field { display: grid; gap: 8px; margin: 22px 0; }
.field label { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gray); }
.field input, .field textarea {
  min-height: 52px; border-radius: 12px; border: 1px solid #333; background: var(--night); padding: 12px 16px; font-size: 17px; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--lime); }
.stats { display: flex; gap: 32px; flex-wrap: wrap; margin: 26px 0; }
.stats div b { display: block; font-size: 44px; font-weight: 900; line-height: 1; }
.stats div span { font-size: 13px; color: var(--gray); letter-spacing: 0.12em; text-transform: uppercase; }

/* KI-Café / footer */
.cafe { border-top: 1px solid var(--line); }
.footer { border-top: 1px solid var(--line); padding: 56px 0 90px; color: var(--gray); font-size: 14px; }
.footer .cols { display: flex; flex-wrap: wrap; gap: 24px 56px; justify-content: space-between; }
.footer a { color: var(--mist); text-decoration: none; }
.footer a:hover { color: var(--lime); }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ki-logo { display: flex; align-items: center; gap: 14px; color: var(--white); font-weight: 900; line-height: 1.05; letter-spacing: 0.03em; font-size: 18px; }
.ki-logo svg { width: 46px; height: 42px; }

/* ================= LAW PAGE ================= */
.law-hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-content: end; padding: 120px 0 72px; overflow: hidden; }
.law-hero .ghost {
  position: absolute; right: -2vw; top: 50%; transform: translateY(-52%); font-weight: 900; line-height: 0.75;
  font-size: clamp(260px, 58vw, 900px); color: transparent; -webkit-text-stroke: 2px var(--lime); opacity: 0.9; letter-spacing: -0.04em;
  pointer-events: none; user-select: none;
}
.law-hero .ghost .fill { position: absolute; inset: 0; color: var(--lime); -webkit-text-stroke: 0; clip-path: inset(100% 0 0 0); transition: clip-path 1.6s var(--ease); }
.law-hero.inforce .ghost .fill { clip-path: inset(0 0 0 0); }
.law-hero .ghost svg { overflow: visible; }
.law-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-bottom: 26px; position: relative; }
.law-meta a { text-decoration: none; }
.law-title { position: relative; font-size: clamp(38px, 6.6vw, 98px); max-width: 15ch; text-shadow: 0 4px 60px rgba(0, 0, 0, 0.8); }
.law-sub { position: relative; max-width: 640px; margin-top: 28px; font-size: clamp(17px, 1.5vw, 20px); color: var(--mist); font-weight: 300; }
.status-line { position: relative; display: flex; gap: 6px; margin-top: 34px; }
.status-line span { font: 600 12px var(--mono); padding: 6px 10px; border-radius: 99px; border: 1px solid #333; color: var(--gray); }
.status-line span.on { border-color: var(--lime); color: var(--black); background: var(--lime); }

.verdict { padding: clamp(90px, 14vw, 200px) 0; }
.verdict-text { font-size: clamp(26px, 3.5vw, 48px); line-height: 1.22; font-weight: 300; max-width: 26ch; margin: 30px 0 0; }
.verdict-text .w { opacity: 0.16; transition: opacity 0.35s, color 0.35s; }
.verdict-text .w.on { opacity: 1; }
.verdict-text .w.last { color: var(--lime); font-weight: 500; }
.verdict-wide { max-width: 34ch; }

/* switch: missachtet / befolgt */
.case { padding: clamp(70px, 10vw, 140px) 0; transition: background 0.8s var(--ease); }
.case[data-mode="miss"] { background: radial-gradient(1200px 600px at 10% 0%, rgba(230, 0, 126, 0.13), transparent 60%), var(--black); }
.case[data-mode="bef"] { background: radial-gradient(1200px 600px at 90% 0%, rgba(196, 214, 0, 0.14), transparent 60%), var(--black); }
.lever { display: inline-grid; grid-template-columns: 1fr 1fr; position: relative; border-radius: 999px; border: 1px solid #333; padding: 5px; margin: 26px 0 46px; user-select: none; }
.lever button { position: relative; z-index: 2; min-height: 54px; padding: 0 clamp(16px, 3vw, 34px); border: 0; background: none; cursor: pointer; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; font-size: clamp(13px, 1.4vw, 16px); color: var(--gray); transition: color 0.3s; }
.lever .knob { position: absolute; z-index: 1; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: var(--pink); transition: transform 0.55s var(--spring), background 0.4s; }
.case[data-mode="bef"] .lever .knob { transform: translateX(100%); background: var(--lime); }
.case[data-mode="miss"] .lever button[data-v="miss"], .case[data-mode="bef"] .lever button[data-v="bef"] { color: var(--black); }
.case-stack { display: grid; }
.case-pane { grid-area: 1 / 1; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), filter 0.5s; }
.case-pane[hidden] { display: block; opacity: 0; transform: translateX(-40px); filter: blur(6px); pointer-events: none; visibility: hidden; }
.case-pane.bef[hidden] { transform: translateX(40px); }
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr); gap: clamp(28px, 5vw, 80px); }
@media (max-width: 900px) { .case-grid { grid-template-columns: 1fr; } }
.scene { font-size: 19px; }
.scene p:first-child::first-letter { font-weight: 900; font-size: 3.2em; float: left; line-height: 0.82; padding: 6px 10px 0 0; }
.case-pane.miss .scene p:first-child::first-letter { color: var(--pink); }
.case-pane.bef .scene p:first-child::first-letter { color: var(--lime); }
.deutung { position: sticky; top: 96px; align-self: start; padding: 28px; border-radius: 16px; background: var(--night); border-left: 4px solid var(--pink); font-size: 17px; color: var(--mist); }
.case-pane.bef .deutung { border-left-color: var(--lime); }
.deutung .kicker { display: block; margin-bottom: 14px; }
.lever-hint { font-size: 14px; color: var(--gray); margin-top: -30px; margin-bottom: 40px; }

/* notebook world */
.notebook {
  background-color: var(--paper); color: var(--ink);
  background-image: radial-gradient(var(--paper-dot) 1.1px, transparent 1.3px); background-size: 22px 22px;
  color-scheme: light;
}
.notebook .kicker { color: #8a8371; }
.notebook .kicker.lime, .notebook .prose h3 { color: var(--blue); }
.bild { padding: clamp(80px, 12vw, 160px) 0; }
.bild-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 70px); align-items: center; }
@media (max-width: 900px) { .bild-grid { grid-template-columns: 1fr; } }
.scribble { position: relative; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 0 #d8d3c6, 0 30px 70px -30px rgba(0, 0, 0, 0.35); transform: rotate(-1deg); }
.scribble img { width: 100%; clip-path: inset(0 100% 0 0); transition: clip-path 1.8s cubic-bezier(0.6, 0.05, 0.3, 1); }
.scribble.in img { clip-path: inset(0 0 0 0); }
.bild-text { font-size: clamp(19px, 1.8vw, 23px); line-height: 1.55; color: var(--blue); font-style: italic; }
.keys { padding: 0 0 clamp(80px, 12vw, 160px); }
.keys .prose { font-size: 19px; color: #262626; }
.keys .prose p:first-child { font-size: 22px; line-height: 1.5; }
.prompt-card { margin: 34px 0; border-radius: 14px; background: #141414; color: #e8e8e8; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5); }
.prompt-card header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #262626; font: 600 12px var(--mono); color: var(--lime); letter-spacing: 0.08em; }
.prompt-card pre { margin: 0; padding: 20px; white-space: pre-wrap; font: 15px/1.6 var(--mono); }
.prompt-card pre mark { background: rgba(196, 214, 0, 0.18); color: var(--lime); border-radius: 3px; padding: 0 3px; }
.prompt-card footer { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.prompt-card .btn.small { min-height: 36px; font-size: 13px; }

/* voice */
.voice { padding: clamp(100px, 14vw, 200px) 0; text-align: center; position: relative; overflow: hidden; }
.voice blockquote { margin: 0 auto; max-width: 22ch; font-size: clamp(30px, 4.6vw, 66px); line-height: 1.12; font-weight: 700; }
.voice .qm { color: var(--lime); font-weight: 900; }
.voice cite { display: block; margin-top: 34px; font-style: normal; color: var(--gray); letter-spacing: 0.24em; text-transform: uppercase; font-size: 13px; font-weight: 700; }

/* umkehrung: flip card */
.flip-sec { padding: clamp(70px, 10vw, 140px) 0; }
.flip { perspective: 2200px; cursor: pointer; }
.flip-inner { display: grid; transform-style: preserve-3d; transition: transform 1.1s var(--spring); }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 22px; padding: clamp(28px, 5vw, 64px); min-height: 380px; }
.flip-front { background: var(--lime); color: var(--black); display: grid; align-content: space-between; gap: 30px; position: relative; overflow: hidden; }
.flip-front .q { font-weight: 900; text-transform: uppercase; font-size: clamp(32px, 5vw, 70px); line-height: 0.95; max-width: 13ch; }
.flip-front .turn { display: inline-flex; gap: 10px; align-items: center; font-weight: 700; }
.flip-front .upside { position: absolute; right: -2%; bottom: -12%; font-weight: 900; font-size: clamp(200px, 30vw, 420px); line-height: 0.8; color: transparent; -webkit-text-stroke: 2px rgba(0, 0, 0, 0.35); transform: rotate(180deg); }
.flip-back { transform: rotateY(180deg); background: var(--night); border: 1px solid #2a2a2a; }
.flip-back .prose { font-size: 18px; color: var(--mist); max-width: 70ch; }
.flip-back .prose p:first-child { color: var(--white); font-size: 21px; }

/* punkt */
.points { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 2px; counter-reset: p; }
.points li { counter-increment: p; display: grid; grid-template-columns: 70px 1fr; gap: 20px; align-items: baseline; padding: 28px 0; border-top: 1px solid var(--line); font-size: clamp(21px, 2.4vw, 32px); line-height: 1.25; font-weight: 500; }
.points li::before { content: counter(p); font-weight: 900; font-size: 54px; line-height: 0.7; color: transparent; -webkit-text-stroke: 1.5px var(--lime); }

/* in kraft setzen */
.enact { padding: clamp(80px, 12vw, 160px) 0; background: radial-gradient(900px 500px at 50% 0%, rgba(196, 214, 0, 0.1), transparent 70%); border-top: 1px solid var(--line); }
.task { font-size: clamp(20px, 2vw, 25px); line-height: 1.5; max-width: 34em; font-weight: 300; margin: 26px 0 40px; }
.enact-card { background: var(--paper); color: var(--ink); border-radius: 20px; padding: clamp(22px, 4vw, 48px); max-width: 860px; position: relative; color-scheme: light;
  background-image: radial-gradient(var(--paper-dot) 1.1px, transparent 1.3px); background-size: 22px 22px; box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.8); }
.enact-card .field label { color: #7c7563; }
.enact-card .field input, .enact-card .field textarea { background: rgba(255, 255, 255, 0.75); border-color: #d6d0c1; color: var(--ink); }
.enact-card .field input:focus, .enact-card .field textarea:focus { border-color: var(--blue); }
.enact-card .field textarea { min-height: 110px; resize: vertical; font-size: 18px; color: var(--blue); }
.sig-wrap { position: relative; border-bottom: 2px solid var(--ink); height: 150px; background: rgba(255, 255, 255, 0.55); border-radius: 12px 12px 0 0; touch-action: none; }
.sig-wrap canvas { width: 100%; height: 100%; cursor: crosshair; }
.sig-wrap .ph { position: absolute; left: 16px; bottom: 10px; font-size: 14px; color: #9b9483; pointer-events: none; transition: opacity 0.2s; }
.sig-wrap.signed .ph { opacity: 0; }
.sig-clear { position: absolute; right: 10px; top: 10px; font-size: 13px; background: none; border: 0; color: #8a8371; cursor: pointer; }
.enact-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.enact-card .btn { --bg: var(--ink); --fg: var(--lime); }
.stamp {
  position: absolute; z-index: 10; right: clamp(10px, 5vw, 60px); top: clamp(10px, 4vw, 40px); pointer-events: none;
  border: 6px double var(--lime-ink); color: var(--lime-ink); border-radius: 12px; padding: 10px 22px; text-align: center;
  font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; transform: rotate(-12deg) scale(3); opacity: 0;
  background: rgba(243, 241, 236, 0.4); mix-blend-mode: multiply;
}
.stamp b { display: block; font-size: clamp(30px, 5vw, 54px); line-height: 1; }
.stamp small { display: block; font-size: 13px; letter-spacing: 0.2em; margin-top: 4px; }
.stamp.hit { animation: stamp 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-12deg) scale(3); } 60% { opacity: 1; transform: rotate(-12deg) scale(0.92); } 100% { opacity: 0.95; transform: rotate(-12deg) scale(1); } }
.shake { animation: shake 0.4s; }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -3px); } 60% { transform: translate(-3px, 2px); } 80% { transform: translate(2px, -1px); } }
.done-panel { display: none; margin-top: 30px; padding-top: 26px; border-top: 1px dashed #c9c2b0; }
.enact-card.done .done-panel { display: block; }
.enact-card.done .enact-form { display: none; }
.done-panel p { margin: 0 0 18px; font-size: 18px; }
.done-commit { font-size: 22px; color: var(--blue); font-style: italic; margin: 10px 0 18px; }

/* law nav */
.law-nav { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.law-nav a { display: grid; gap: 10px; padding: clamp(28px, 5vw, 60px) var(--gutter); text-decoration: none; transition: background 0.3s; min-width: 0; }
.law-nav a + a { border-left: 1px solid var(--line); text-align: right; justify-items: end; }
.law-nav a:hover { background: var(--night); }
.law-nav .n { font-weight: 900; font-size: clamp(60px, 9vw, 120px); line-height: 0.8; color: transparent; -webkit-text-stroke: 1.5px var(--lime); }
.law-nav b { font-size: clamp(17px, 2vw, 24px); line-height: 1.2; }
@media (max-width: 640px) { .law-nav { grid-template-columns: 1fr; } .law-nav a + a { border-left: 0; border-top: 1px solid var(--line); text-align: left; justify-items: start; } }

/* reading progress */
.readbar { position: fixed; left: 0; top: 0; height: 3px; background: var(--lime); z-index: 60; width: 0; box-shadow: 0 0 12px var(--lime-glow); }

/* ================= KI-SICHT ================= */
.ki-view { position: fixed; inset: 64px 0 0 0; z-index: 40; background: #050505; overflow: auto; display: none; }
html.ki .ki-view { display: block; }
html.ki body { overflow: hidden; }
@keyframes scan { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.ki-view .bar2 { position: sticky; top: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px var(--gutter); background: #0b0b0b; border-bottom: 1px solid #1d1d1d; font: 13px var(--mono); color: var(--gray); }
.ki-view .bar2 b { color: var(--lime); font-weight: 600; }
.ki-view pre { margin: 0 auto; max-width: 980px; padding: 34px var(--gutter) 120px; white-space: pre-wrap; font: 15px/1.7 var(--mono); color: #d7d7d7; }
.ki-view pre .h { color: var(--lime); font-weight: 700; }
.ki-view pre .q { color: #9fb0ff; }
.ki-view pre .c { color: #777; }

/* ================= GAME ================= */
.game { min-height: 100vh; min-height: 100svh; padding: 96px 0 60px; display: grid; }
.game-screen { display: none; }
.game-screen.on { display: grid; animation: rise 0.5s var(--ease) both; }
.game-start { align-content: center; justify-items: center; text-align: center; gap: 14px; }
.game-start .big-timer { -webkit-text-stroke-color: var(--lime); }
.game-start .big-timer small { color: var(--white); }
.game-modes { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.game-rules { display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center; color: var(--gray); font-size: 15px; margin-top: 18px; }
.game-best { font: 13px var(--mono); color: var(--gray); margin-top: 12px; }
.game-play { grid-template-rows: auto 1fr auto; gap: 26px; }
.hud { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hud .t { font-weight: 900; font-size: 64px; line-height: 0.8; color: transparent; -webkit-text-stroke: 2px var(--lime); font-variant-numeric: tabular-nums; min-width: 2ch; }
.hud .t.low { -webkit-text-stroke-color: var(--pink); animation: beat 0.5s infinite; }
@keyframes beat { 50% { transform: scale(1.08); } }
.hud .score { text-align: right; }
.hud .score b { font-size: 40px; font-weight: 900; line-height: 1; }
.hud .score span { display: block; font-size: 12px; letter-spacing: 0.2em; color: var(--gray); text-transform: uppercase; }
.hud .streak { font: 700 14px var(--mono); color: var(--lime); }
.timebar { height: 4px; border-radius: 4px; background: #1e1e1e; overflow: hidden; }
.timebar i { display: block; height: 100%; background: var(--lime); transform-origin: left; }
.case-card { align-self: center; justify-self: center; width: min(100%, 900px); display: grid; gap: 22px; }
.case-card .kicker { display: flex; gap: 12px; align-items: center; }
.case-card .tag { padding: 4px 10px; border-radius: 99px; font: 700 11px var(--mono); letter-spacing: 0.1em; }
.tag.miss { background: var(--pink); color: var(--white); }
.tag.bef { background: var(--lime); color: var(--black); }
.case-card .txt { font-size: clamp(23px, 3vw, 38px); line-height: 1.25; font-weight: 500; margin: 0; min-height: 3.75em; }
.case-card .q { color: var(--gray); font-size: 16px; }
.opts { display: grid; gap: 12px; }
.opt {
  display: grid; grid-template-columns: 70px 1fr 30px; gap: 16px; align-items: center; text-align: left; width: 100%;
  min-height: 74px; padding: 12px 18px; border-radius: 14px; border: 1px solid #2c2c2c; background: var(--night); cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, background 0.2s;
}
.opt:hover { border-color: var(--lime); transform: translateX(4px); }
.opt .n { font-weight: 900; font-size: 42px; line-height: 0.8; color: transparent; -webkit-text-stroke: 1.3px var(--lime); }
.opt .ti { font-size: 18px; font-weight: 700; line-height: 1.25; }
.opt kbd { font: 12px var(--mono); color: var(--gray); border: 1px solid #333; border-radius: 6px; padding: 2px 7px; justify-self: end; }
.opt.right { background: var(--lime); border-color: var(--lime); color: var(--black); }
.opt.right .n { -webkit-text-stroke-color: var(--black); }
.opt.wrong { background: var(--pink); border-color: var(--pink); animation: shake 0.35s; }
.flash { position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: 0; }
.flash.ok { animation: flashok 0.45s; background: radial-gradient(circle, rgba(196, 214, 0, 0.25), transparent 60%); }
.flash.no { animation: flashok 0.45s; background: radial-gradient(circle, rgba(230, 0, 126, 0.25), transparent 60%); }
@keyframes flashok { 30% { opacity: 1; } }
.lesson { min-height: 52px; font-size: 16px; color: var(--mist); display: flex; gap: 12px; align-items: center; justify-content: center; text-align: center; }
.lesson b { color: var(--lime); }
.game-end { align-content: center; gap: 26px; }
.verdict-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 70px); align-items: center; }
@media (max-width: 860px) { .verdict-card { grid-template-columns: 1fr; } }
.end-score { font-weight: 900; font-size: clamp(140px, 22vw, 300px); line-height: 0.8; color: var(--lime); }
.end-rank { font-weight: 900; text-transform: uppercase; font-size: clamp(28px, 4vw, 52px); line-height: 1; margin: 18px 0 10px; }
.grid-share { font-size: 28px; letter-spacing: 4px; margin: 12px 0; }
.review { display: grid; gap: 8px; margin-top: 20px; max-height: 360px; overflow: auto; padding-right: 6px; }
.review a { display: grid; grid-template-columns: 22px 54px 1fr; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--night); text-decoration: none; font-size: 15px; }
.review a .n { font-weight: 900; font-size: 26px; color: transparent; -webkit-text-stroke: 1px var(--lime); line-height: 0.8; }
.review a:hover { outline: 1px solid var(--lime); }

/* ================= SIMPLE PAGES ================= */
.page { padding: 140px 0 100px; }
.page .prose { font-size: 18px; color: var(--mist); }
.page .prose h2 { color: var(--white); font-size: 26px; margin: 2em 0 0.6em; }
.page .prose a { color: var(--lime); }
.codebox { background: #0b0b0b; border: 1px solid #222; border-radius: 12px; padding: 18px; font: 14px/1.6 var(--mono); color: #cfcfcf; white-space: pre-wrap; overflow-wrap: anywhere; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, calc(100% + 60px)); visibility: hidden; z-index: 90; background: var(--white); color: var(--black); padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 15px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); transition: transform 0.4s var(--spring); max-width: calc(100% - 32px); text-align: center; }
.toast.on { transform: translate(-50%, 0); visibility: visible; }

/* Lime-Textmarker (nach Stripe Press): das Urteil wird markiert, sobald das Gesetz in Kraft ist */
.verdict-text.inforce .w { opacity: 1; background: linear-gradient(90deg, rgba(196, 214, 0, 0.32), rgba(196, 214, 0, 0.32)) no-repeat 0 85% / 0% 38%; animation: marker 0.5s var(--ease) forwards; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.verdict-text.inforce .w:nth-child(n) { animation-delay: calc(var(--i, 0) * 12ms); }
@keyframes marker { to { background-size: 100% 38%; } }
.enact-card .btn.ghost { --bg: transparent; }
.law-hero.inforce .law-sub { background: rgba(7, 7, 7, 0.78); padding: 10px 14px; border-radius: 10px; display: inline-block; }
.law-hero.inforce .law-meta .kicker { background: rgba(7, 7, 7, 0.78); padding: 4px 8px; border-radius: 6px; }
.hero-matrix-copy .tap { display: none; }
@media (hover: none) { .hero-matrix-copy .hov { display: none; } .hero-matrix-copy .tap { display: inline; } }
.case, .law-hero, .flip-sec, .voice, .bild, .sec, .enact, main { overflow-x: clip; }
@media (max-width: 420px) { .ki-toggle { padding: 0 10px; font-size: 12px; } .progress-pill { padding-right: 8px; } }
.status-line { flex-wrap: wrap; } .status-line span { white-space: nowrap; }
@media (max-width: 640px) { .law-hero .ghost { top: 34%; right: -4vw; font-size: 88vw; } .law-hero { padding-top: 90px; } }
