/* aicam – Stylesheet. Schriften lokal, keine externen Ressourcen. */

@font-face {
  font-family: "Anybody";
  src: url("fonts/anybody-latin-standard-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-standard-normal.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  /* Ladenlicht: kühles Grau, Tinte, Erkennungs-Magenta */
  --ground: #eceef2;
  --ground-2: #e1e4eb;
  --paper: #ffffff;
  --ink: #16182e;
  --muted: #565b74;
  --line: rgb(22 24 46 / 0.13);
  --det: #e8336d;        /* Rahmen, Flächen */
  --det-text: #b8184f;   /* Text auf hellem Grund */
  --ok: #0b7d63;
  --feed: #16182e;       /* Kamerabild bleibt immer dunkel */
  --feed-ink: #f1f2f7;

  --display: "Anybody", "Arial Narrow", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  --r-lg: 28px;
  --r-md: 14px;
  --r-sm: 8px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #10122a;
    --ground-2: #181b37;
    --paper: #1d2142;
    --ink: #e9ebf3;
    --muted: #a0a6c0;
    --line: rgb(233 235 243 / 0.13);
    --det: #ff4f84;
    --det-text: #ff7aa3;
    --ok: #3fcca2;
    --feed: #070816;
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--det); }

:focus-visible { outline: 2.5px solid var(--det); outline-offset: 3px; border-radius: 4px; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 50;
  background: var(--ink); color: var(--ground); padding: 0.6rem 1rem; border-radius: var(--r-sm);
}
.skip:focus { top: 0.75rem; }

.proto {
  background: var(--det); color: #fff; text-align: center;
  font-size: 0.875rem; padding: 0.45rem var(--gutter);
  padding-top: calc(0.45rem + env(safe-area-inset-top, 0px));
}

/* Kopfzeile */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem var(--gutter);
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.bar.is-scrolled { border-bottom-color: var(--line); }

.mark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--display); font-weight: 750; font-stretch: 120%;
  font-size: 1.2rem; letter-spacing: -0.01em; text-decoration: none;
}
.mark svg { width: 1.7rem; height: 1.1rem; fill: none; stroke: var(--det); stroke-width: 2.6; }
.mark svg circle { fill: var(--ink); stroke: none; }

.bar nav { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); font-size: 0.95rem; }
.bar nav a { text-decoration: none; color: var(--muted); }
.bar nav a:hover { color: var(--ink); }
.bar nav .nav-cta {
  color: var(--ink); padding: 0.45rem 0.9rem; border-radius: 999px;
  border: 1.5px solid var(--ink);
}
.bar nav .nav-cta:hover { background: var(--ink); color: var(--ground); }
@media (max-width: 40rem) {
  .bar nav a:not(.nav-cta) { display: none; }
}

main { padding-inline: var(--gutter); }

/* Hero */
.hero {
  max-width: var(--max); margin: clamp(0.75rem, 2vw, 1.5rem) auto 0;
  display: grid; gap: clamp(1.75rem, 4vw, 3rem);
}

.frame {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--feed); color: var(--feed-ink);
  border-radius: var(--r-lg);
  padding: clamp(3.75rem, 9vw, 7rem) clamp(1.25rem, 5vw, 4.5rem) clamp(3.5rem, 8vw, 6rem);
  min-height: min(78vh, 46rem);
  display: flex; align-items: center;
  container-type: inline-size;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07);
}
/* Sensorrauschen und Ablageraster: das Bild von oben auf die Kasse */
.frame::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.55;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgb(0 0 0 / 0.55) 100%),
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.035) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.035) 0 1px, transparent 1px 64px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Sucherecken */
.frame::after {
  content: ""; position: absolute; inset: clamp(0.75rem, 2vw, 1.25rem); z-index: -1; pointer-events: none;
  --c: rgb(241 242 247 / 0.5);
  background:
    linear-gradient(var(--c) 0 0) top left / 22px 1.5px no-repeat,
    linear-gradient(var(--c) 0 0) top left / 1.5px 22px no-repeat,
    linear-gradient(var(--c) 0 0) top right / 22px 1.5px no-repeat,
    linear-gradient(var(--c) 0 0) top right / 1.5px 22px no-repeat,
    linear-gradient(var(--c) 0 0) bottom left / 22px 1.5px no-repeat,
    linear-gradient(var(--c) 0 0) bottom left / 1.5px 22px no-repeat,
    linear-gradient(var(--c) 0 0) bottom right / 22px 1.5px no-repeat,
    linear-gradient(var(--c) 0 0) bottom right / 1.5px 22px no-repeat;
}

.hud {
  position: absolute; font-family: var(--mono); font-size: clamp(0.66rem, 0.6rem + 0.25vw, 0.8rem);
  letter-spacing: 0.02em; color: rgb(241 242 247 / 0.72); font-variant-numeric: tabular-nums;
}
.hud-tl { top: clamp(1.4rem, 3vw, 2.1rem); left: clamp(1.6rem, 3.4vw, 2.5rem); display: flex; align-items: center; gap: 0.5em; }
.hud-tr { top: clamp(1.4rem, 3vw, 2.1rem); right: clamp(1.6rem, 3.4vw, 2.5rem); }
.hud-bl { bottom: clamp(1.4rem, 3vw, 2.1rem); left: clamp(1.6rem, 3.4vw, 2.5rem); }
.hud-br { bottom: clamp(1.4rem, 3vw, 2.1rem); right: clamp(1.6rem, 3.4vw, 2.5rem); color: var(--det); }
.rec { width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--det); }
@media (prefers-reduced-motion: no-preference) {
  .rec { animation: blink 1.6s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0.15; } }
@media (max-width: 30rem) { .hud-bl { display: none; } }

.headline {
  margin: 0; width: 100%;
  font-family: var(--display); font-weight: 800;
  font-size: min(10.4cqi, 8.4rem);
  line-height: 0.98; letter-spacing: -0.015em;
}
.headline .line { display: block; white-space: nowrap; }
.headline .line:nth-child(1) { font-stretch: 64%; }
.headline .line:nth-child(2) { font-stretch: 112%; font-weight: 500; font-size: 0.86em; }
.headline .line:nth-child(3) { font-stretch: 84%; }
.headline .line + .line { margin-top: 0.12em; }
@media (max-width: 40rem) {
  .frame { min-height: 0; padding-block: 5rem 4.25rem; }
  .headline { font-size: 17cqi; line-height: 1.02; }
  .headline .line { white-space: normal; }
  .headline .line:nth-child(2) { font-size: 0.7em; font-stretch: 96%; white-space: nowrap; }
  .headline .line + .line { margin-top: 0.42em; }
}

/* Erkennungsrahmen */
.det { position: relative; display: inline-block; }
.det::before {
  content: ""; position: absolute; inset: -0.02em -0.09em -0.06em;
  border: max(2px, 0.03em) solid var(--det); border-radius: 3px;
  clip-path: inset(0 100% 100% 0);
}
.det::after {
  content: attr(data-label);
  position: absolute; left: -0.09em; bottom: calc(100% + 0.02em);
  font: 500 clamp(0.62rem, 0.5rem + 0.45vw, 0.95rem) / 1 var(--mono);
  font-stretch: normal; letter-spacing: 0.01em; white-space: nowrap;
  background: var(--det); color: #fff; padding: 0.3em 0.45em 0.32em;
  border-radius: 3px 3px 0 0;
  opacity: 0;
}
.det-ask::before { border-style: dashed; }

.is-on .det::before { clip-path: inset(0 0 0 0); }
.is-on .det::after { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .det::before { transition: clip-path 0.42s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
  .det::after { transition: opacity 0.2s var(--dl, 0.3s); }
  .det:nth-of-type(1) { --d: 0s; }
}

.scan {
  position: absolute; left: 0; right: 0; top: 0; height: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgb(232 51 109 / 0.0) 40%, rgb(232 51 109 / 0.22) 98%, rgb(255 140 175 / 0.9) 100%);
  transform: translateY(-110%);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .frame.is-scanning .scan { animation: sweep 1.5s cubic-bezier(.55,.1,.35,1) forwards; }
}
@keyframes sweep {
  0% { transform: translateY(-110%); opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translateY(360%); opacity: 0; }
}

.lede {
  display: grid; gap: 1.1rem;
  grid-template-columns: minmax(0, 1fr);
  max-width: 46rem;
}
.lede p { margin: 0; font-size: clamp(1.08rem, 1rem + 0.4vw, 1.3rem); line-height: 1.5; }
.lede p + p { color: var(--muted); font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: 0.6rem 1.25rem; border-radius: 999px;
  font: 600 1rem/1.2 var(--text); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  transition: background-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--ground); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--det)); }

/* Abschnitte */
.section {
  max-width: var(--max); margin: clamp(5rem, 12vw, 9rem) auto 0;
}
.section-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem;
}
.section h2 {
  margin: 0; max-width: 22ch; text-wrap: balance;
  font-family: var(--display); font-weight: 760; font-stretch: 78%;
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4.2rem); line-height: 0.98; letter-spacing: -0.012em;
}
.section-intro { max-width: 40rem; margin: 1.25rem 0 0; color: var(--muted); }

/* Zähler */
.tally {
  display: flex; align-items: baseline; gap: 0.6rem;
  font-family: var(--display); font-stretch: 100%;
}
.tally b { font-weight: 800; font-size: clamp(2.4rem, 1.8rem + 2.6vw, 4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.tally span { color: var(--muted); font-family: var(--text); font-size: 0.95rem; max-width: 9rem; line-height: 1.25; }

/* Fragen */
.questions {
  list-style: none; margin: clamp(2rem, 4vw, 3rem) 0 0; padding: 0;
  counter-reset: q;
  border-top: 1.5px solid var(--ink);
}
.q {
  counter-increment: q;
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 0.5rem 1.25rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem) 0;
  border-bottom: 1px solid var(--line);
}
.q::before {
  content: counter(q);
  font-family: var(--display); font-weight: 600; font-stretch: 100%;
  font-size: 1.05rem; color: var(--muted); padding-top: 0.35rem; font-variant-numeric: tabular-nums;
}
.q-title {
  margin: 0; font-family: var(--text); font-weight: 600; font-stretch: 92%;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.8rem); line-height: 1.18; letter-spacing: -0.018em;
  max-width: 34ch; text-wrap: balance;
}
.q-hint { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.95rem; max-width: 52ch; }

.chip {
  align-self: start; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  border: 1.5px solid currentColor;
}
.chip::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.chip-open { color: var(--det-text); }
.chip-draft { color: var(--muted); }
.chip-draft::before { background: transparent; border: 1.5px solid currentColor; }
.chip-answered { color: var(--ok); }
.chip-evasive, .chip-refused { color: var(--ink); }

.q-body { grid-column: 2 / -1; }
.conflict {
  display: inline-block; margin-top: 0.7rem; position: relative;
  font-size: 0.85rem; font-weight: 600; color: var(--det-text);
  padding: 0.2rem 0.55rem;
}
/* Rahmenecken wie ein Erkennungsrahmen */
.conflict::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  --c: var(--det);
  background:
    linear-gradient(var(--c) 0 0) top left / 8px 1.5px no-repeat,
    linear-gradient(var(--c) 0 0) top left / 1.5px 8px no-repeat,
    linear-gradient(var(--c) 0 0) top right / 8px 1.5px no-repeat,
    linear-gradient(var(--c) 0 0) top right / 1.5px 8px no-repeat,
    linear-gradient(var(--c) 0 0) bottom left / 8px 1.5px no-repeat,
    linear-gradient(var(--c) 0 0) bottom left / 1.5px 8px no-repeat,
    linear-gradient(var(--c) 0 0) bottom right / 8px 1.5px no-repeat,
    linear-gradient(var(--c) 0 0) bottom right / 1.5px 8px no-repeat;
}

.known { margin-top: 0.85rem; }
.known summary {
  cursor: pointer; display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.95rem; font-weight: 600; color: var(--ink); list-style: none;
  padding: 0.2rem 0;
}
.known summary::-webkit-details-marker { display: none; }
.known summary::before {
  content: ""; width: 0.55rem; height: 0.55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.18s; margin-right: 0.15rem;
}
.known[open] summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.known ul { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.75rem; max-width: 60ch; }
.known li { padding-left: 1rem; border-left: 2px solid var(--line); }
.known.is-conflict li { border-left-color: var(--det); }
.known li p { margin: 0; }
.src { display: block; margin-top: 0.2rem; font-size: 0.85rem; color: var(--muted); }

.answer {
  margin-top: 1rem; padding: 1rem 1.25rem; border-radius: var(--r-md);
  background: var(--paper); border-left: 3px solid var(--ok);
}
.answer blockquote { margin: 0; font-size: 1.05rem; }
.answer .src { margin-top: 0.5rem; }

@media (max-width: 40rem) {
  .q { grid-template-columns: 1.75rem minmax(0, 1fr); }
  .q .chip { grid-column: 2; justify-self: start; }
}

/* Vergleich */
.compare-wrap { margin-top: clamp(2rem, 4vw, 3rem); overflow-x: auto; }
.compare {
  width: 100%; min-width: 34rem; border-collapse: separate; border-spacing: 0;
}
.compare th, .compare td { text-align: left; vertical-align: top; padding: 1.1rem 1.25rem 1.1rem 0; }
.compare thead th {
  font-family: var(--display); font-weight: 700; font-stretch: 100%; font-size: 1.15rem;
  border-bottom: 1.5px solid var(--ink); padding-bottom: 0.75rem;
}
.compare tbody th { font-weight: 500; color: var(--muted); width: 34%; font-size: 0.98rem; }
.compare tbody td, .compare tbody th { border-bottom: 1px solid var(--line); }
.compare td { width: 33%; font-family: var(--text); font-stretch: 92%; font-weight: 600; letter-spacing: -0.012em; font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem); line-height: 1.2; }
.compare .empty {
  display: inline-flex; align-items: center; min-height: 2.2rem; padding: 0.25rem 0.7rem;
  border: 1.5px dashed var(--det); border-radius: 4px; color: var(--det-text);
  font-family: var(--text); font-weight: 600; font-size: 0.95rem; font-stretch: normal;
}
.compare .sub { display: block; margin-top: 0.3rem; font-family: var(--text); font-weight: 400; font-size: 0.85rem; color: var(--muted); font-stretch: normal; }
.fineprint { margin-top: 1.25rem; max-width: 60ch; color: var(--muted); font-size: 0.9rem; }
.fineprint a { color: var(--muted); }

/* Chronik */
.timeline { list-style: none; margin: clamp(2rem, 4vw, 3rem) 0 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 7.25rem; top: 0.6rem; bottom: 0.6rem; width: 1.5px; background: var(--line);
}
.t {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.5rem;
  padding: 0.85rem 0; position: relative;
}
.t::after {
  content: ""; position: absolute; left: calc(7.25rem - 4.5px); top: 1.35rem;
  width: 10.5px; height: 10.5px; border-radius: 50%; background: var(--ground); border: 2px solid var(--ink);
}
.t time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); padding-top: 0.15rem; font-size: 0.95rem; }
.t p { margin: 0 0 0 1.25rem; max-width: 52ch; }
.t .src { margin-left: 1.25rem; }
.t.is-next::after { background: var(--det); border-color: var(--det); }
.t.is-next p { font-weight: 600; }
@media (max-width: 34rem) {
  .timeline::before { left: 0.3rem; }
  .t { grid-template-columns: 1fr; gap: 0.15rem; padding-left: 1.6rem; }
  .t::after { left: calc(0.3rem - 4.5px); top: 1.1rem; }
  .t p, .t .src { margin-left: 0; }
}

/* Briefgenerator */
.tool-intro { display: grid; gap: 1rem 3rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); margin-top: 1.5rem; }
.tool-intro p { margin: 0; max-width: 42ch; }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.facts li { color: var(--muted); }
.facts strong { color: var(--ink); }
@media (max-width: 52rem) { .tool-intro { grid-template-columns: 1fr; } }

.tool {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
@media (max-width: 56rem) { .tool { grid-template-columns: 1fr; } }

.form fieldset { border: 0; margin: 0 0 1.75rem; padding: 0; display: grid; gap: 0.9rem; }
.form legend { font-family: var(--display); font-weight: 700; font-stretch: 100%; font-size: 1.15rem; margin-bottom: 0.5rem; padding: 0; }
.form label { display: grid; gap: 0.35rem; font-size: 0.92rem; font-weight: 500; }
.form input:not([type="radio"]) {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 0.7rem 0.85rem; min-height: 2.9rem; width: 100%;
}
.form input:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.form input:focus-visible { outline: 2.5px solid var(--det); outline-offset: 1px; border-color: transparent; }
.form input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
@media (max-width: 26rem) { .form .row { grid-template-columns: 1fr; } }
.choice { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: 0.92rem; font-weight: 500; }
.choice > span { width: 100%; }
.form .radio { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 400; cursor: pointer; }
.radio input { accent-color: var(--det); width: 1.1rem; height: 1.1rem; margin: 0; }
.privacy { margin: 0; font-size: 0.9rem; color: var(--muted); }

.paper-wrap { position: sticky; top: 5.5rem; }
@media (max-width: 56rem) { .paper-wrap { position: static; } }
.paper {
  background: var(--paper); color: var(--ink);
  border-radius: var(--r-md); padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgb(22 24 46 / 0.35);
  font-size: 0.9rem; line-height: 1.5;
  max-height: 34rem; overflow: auto;
}
.paper p { margin: 0 0 0.8em; }
.paper .addr { margin-bottom: 1.2em; }
.paper h3 { font-size: 1rem; margin: 1em 0 0.8em; }
.paper ol { margin: 0 0 0.8em; padding-left: 1.3em; }
.paper li { margin-bottom: 0.25em; }
.paper .fill { background: color-mix(in srgb, var(--det) 14%, transparent); border-radius: 3px; padding: 0 0.2em; color: var(--det-text); }
.paper-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.status { min-height: 1.5em; margin: 0.6rem 0 0; font-size: 0.92rem; color: var(--ok); }

/* Über */
.about-grid { margin-top: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 3rem; }
.about h3 { font-family: var(--display); font-weight: 700; font-stretch: 100%; font-size: 1.1rem; margin: 0 0 0.5rem; }
.about p { margin: 0; color: var(--muted); max-width: 42ch; }

.foot {
  max-width: var(--max); margin: clamp(5rem, 10vw, 8rem) auto 0;
  padding: 2rem var(--gutter) calc(2rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem;
}
.foot p { margin: 0; }
.noscript { max-width: var(--max); margin: 2rem auto; padding: 0 var(--gutter); }

/* ===== Zeiger-Erfassung im Hero ===== */
.you {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  width: 0; height: 0; opacity: 0; transition: opacity 0.25s;
}
.you::before {
  content: ""; position: absolute; left: -56px; top: -64px; width: 112px; height: 128px;
  border: 1.5px solid var(--det); border-radius: 4px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.25);
}
.you span {
  position: absolute; left: -56px; top: -84px; white-space: nowrap;
  font: 500 0.72rem/1 var(--mono); background: var(--det); color: #fff;
  padding: 0.28em 0.45em; border-radius: 3px 3px 0 0;
}
.you.is-on { opacity: 1; }
.frame:hover { cursor: crosshair; }

/* ===== Segmentleiste: eine Zelle pro Frage ===== */
.segments {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  margin-top: 1.75rem; height: 10px;
}
.segments i { border-radius: 2px; background: color-mix(in srgb, var(--det) 18%, transparent); border: 1px dashed color-mix(in srgb, var(--det) 55%, transparent); }
.segments i.on { background: var(--ok); border: 1px solid var(--ok); }

/* ===== Kette ===== */
.chain-section { scroll-margin-top: 5rem; }
.chain { list-style: none; margin: clamp(2rem, 4vw, 3rem) 0 0; padding: 0; position: relative; }
.node { position: relative; }
.node-btn {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; align-items: center; gap: 1rem; width: 100%;
  border-radius: var(--r-sm);
}
.node-btn:focus-visible { outline: 2.5px solid var(--det); outline-offset: 4px; }
.node-mark {
  flex: none; width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center;
  font: 800 1.35rem/1 var(--display); font-stretch: 100%;
  position: relative; z-index: 1;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}
.is-known .node-mark { background: var(--ink); border: 2px solid var(--ink); }
.is-known .node-mark::after { content: ""; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--ground); }
.is-open .node-mark { background: var(--ground); border: 2px dashed var(--det); color: var(--det-text); }
.node-title { font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.node-text p { margin: 0; }
.node-text .src { margin-top: 0.3rem; }
.ask {
  display: inline-block; margin-top: 0.4rem; font-size: 0.9rem; font-weight: 600; color: var(--det-text);
}

/* Statisch (Handy, reduzierte Bewegung): vertikale Liste */
.chain .node { display: grid; grid-template-columns: 3rem minmax(0, 1fr); column-gap: 1rem; padding-bottom: 1.75rem; }
.chain .node-btn { grid-column: 1 / -1; }
.chain .node-text { grid-column: 2; margin-top: 0.35rem; color: var(--muted); max-width: 52ch; }
.chain-section:not(.is-story) .node:not(:last-child)::after {
  content: ""; position: absolute; left: calc(1.5rem - 1px); top: 3rem; bottom: 0; width: 2px;
  background: var(--ink);
}
.chain-section:not(.is-story) .node.next-open::after {
  background: repeating-linear-gradient(180deg, var(--det) 0 5px, transparent 5px 10px);
}
.chain-detail, .chain-legend { display: none; }

/* Scroll-Erzählung (Desktop) */
.chain-section.is-story { height: 340vh; }
.is-story .chain-sticky {
  position: sticky; top: 4.5rem; min-height: calc(100vh - 5.5rem);
  display: flex; flex-direction: column; justify-content: center; padding-block: 1rem 2rem;
}
.is-story .chain { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); margin-top: clamp(2.5rem, 6vh, 4.5rem); }
.is-story .chain .node { display: block; padding: 0; }
.is-story .node-btn { flex-direction: column; align-items: flex-start; gap: 0.9rem; padding: 0.25rem 0.5rem 0.25rem 0; }
.is-story .node-mark { width: 3.5rem; height: 3.5rem; }
.is-story .node-title { font-size: clamp(1rem, 0.8rem + 0.5vw, 1.25rem); }
.is-story .node-text { display: none; }
.is-story .chain .node + .node::before {
  content: ""; position: absolute; background: var(--ink);
  left: calc(-100% + 3.5rem + 0.6rem); right: calc(100% + 0.6rem); width: auto;
  top: calc(0.25rem + 1.75rem - 1px); height: 2px;
  transform-origin: left; transform: scaleX(0); transition: transform 0.5s cubic-bezier(.3,.7,.2,1);
}
.is-story .chain .node.is-open::before { background: repeating-linear-gradient(90deg, var(--det) 0 6px, transparent 6px 12px); }
.is-story .chain .node.is-lit::before { transform: scaleX(1); }
.is-story .node { opacity: 0.28; transition: opacity 0.35s; }
.is-story .node.is-lit { opacity: 1; }
/* aktiver Schritt bekommt einen Erkennungsrahmen */
.is-story .node.is-active .node-mark::before {
  content: ""; position: absolute; inset: -9px; border-radius: 4px; pointer-events: none;
  --c: var(--det);
  background:
    linear-gradient(var(--c) 0 0) top left / 10px 2px no-repeat,
    linear-gradient(var(--c) 0 0) top left / 2px 10px no-repeat,
    linear-gradient(var(--c) 0 0) top right / 10px 2px no-repeat,
    linear-gradient(var(--c) 0 0) top right / 2px 10px no-repeat,
    linear-gradient(var(--c) 0 0) bottom left / 10px 2px no-repeat,
    linear-gradient(var(--c) 0 0) bottom left / 2px 10px no-repeat,
    linear-gradient(var(--c) 0 0) bottom right / 10px 2px no-repeat,
    linear-gradient(var(--c) 0 0) bottom right / 2px 10px no-repeat;
}
.is-story .chain-detail {
  display: block; margin-top: clamp(2rem, 5vh, 3.5rem); min-height: 9.5rem; max-width: 44rem;
  padding-left: 1.25rem; border-left: 3px solid var(--ink);
}
.is-story .chain-detail.is-open { border-left-color: var(--det); }
.chain-detail .detail-step { display: block; font-weight: 600; color: var(--muted); margin-bottom: 0.35rem; }
.chain-detail p { margin: 0; font-size: clamp(1.2rem, 1rem + 0.7vw, 1.6rem); line-height: 1.35; letter-spacing: -0.012em; }
.chain-detail .src, .chain-detail .ask { margin-top: 0.6rem; }
.is-story .chain-legend { display: flex; gap: 1.5rem; margin: 1.5rem 0 0; font-size: 0.88rem; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 0.5rem; }
.lg::before { content: ""; width: 1.75rem; height: 2px; }
.lg-known::before { background: var(--ink); }
.lg-open::before { background: repeating-linear-gradient(90deg, var(--det) 0 5px, transparent 5px 9px); }

/* ===== Variable Schriftbreite beim Scrollen ===== */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section h2 {
      animation: widen linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 35%;
    }
    @keyframes widen {
      from { font-stretch: 56%; letter-spacing: 0.01em; }
      to { font-stretch: 78%; letter-spacing: -0.012em; }
    }
  }
}

/* ===== Bilder im Kamerabild-Look =====
   Jedes Bild wird entsättigt und in die Tinte der Seite eingefärbt,
   damit unterschiedliche Quellen wie ein Kamerasystem wirken. */
.feed-img {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
  object-fit: cover; object-position: center 60%;
  filter: grayscale(1) contrast(1.25) brightness(0.85);
  mix-blend-mode: luminosity; opacity: 0;
  transition: opacity 1.2s ease;
}
.feed-img.is-loaded { opacity: 0.5; }
/* Lesbarkeit der Headline über dem Bild */
.frame:has(.feed-img.is-loaded)::before {
  background:
    linear-gradient(90deg, rgb(22 24 46 / 0.86) 0%, rgb(22 24 46 / 0.55) 55%, rgb(22 24 46 / 0.25) 100%),
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgb(0 0 0 / 0.55) 100%),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.04) 0 1px, transparent 1px 3px);
  opacity: 1;
}

.shot { max-width: var(--max); margin: clamp(4.5rem, 10vw, 8rem) auto 0; }
.section-tool .shot { margin: clamp(2rem, 4vw, 3rem) 0 0; max-width: none; }
.shot-media {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-lg); background: var(--feed);
  aspect-ratio: 21 / 9;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
}
.shot-strip .shot-media { aspect-ratio: 16 / 5; border-radius: var(--r-md); }
@media (max-width: 40rem) {
  .shot-media { aspect-ratio: 4 / 3; }
  .shot-strip .shot-media { aspect-ratio: 16 / 9; }
}
.shot-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1;
  filter: grayscale(1) contrast(1.2) brightness(0.95);
  mix-blend-mode: luminosity; opacity: 0.88;
}
/* Zeilenraster und Vignette wie ein Überwachungsbild */
.shot-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(130% 100% at 50% 50%, transparent 55%, rgb(0 0 0 / 0.45) 100%),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.035) 0 1px, transparent 1px 3px);
}
.sbox {
  position: absolute; z-index: 2; border: 2px solid var(--det); border-radius: 3px;
  clip-path: inset(0 100% 100% 0);
}
.sbox::after {
  content: attr(data-label); position: absolute; left: -2px; bottom: 100%;
  font: 500 clamp(0.6rem, 0.5rem + 0.3vw, 0.78rem) / 1 var(--mono); white-space: nowrap;
  background: var(--det); color: #fff; padding: 0.3em 0.45em; border-radius: 3px 3px 0 0;
  opacity: 0;
}
.shot.is-on .sbox { clip-path: inset(0 0 0 0); }
.shot.is-on .sbox::after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .sbox { transition: clip-path 0.5s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
  .sbox::after { transition: opacity 0.2s calc(var(--d, 0s) + 0.4s); }
}
.shot figcaption {
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; align-items: baseline;
  margin-top: 0.85rem; font-size: 0.9rem; color: var(--muted); max-width: 60rem;
}
.credit { font-weight: 600; color: var(--ink); }

/* Fehlt die Datei, zeigt die Fläche einen klaren Platzhalter */
.shot.is-missing img { display: none; }
.shot.is-missing .shot-media::before {
  content: attr(data-missing); position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center; padding: 1rem; text-align: center;
  font: 500 0.8rem/1.4 var(--mono); color: rgb(241 242 247 / 0.6);
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.035) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.035) 0 1px, transparent 1px 64px);
}
/* Labels, die am Bildrand sonst abgeschnitten würden */
.sbox.lb-below::after { bottom: auto; top: 100%; border-radius: 0 0 3px 3px; }
.sbox.lb-inside::after { bottom: auto; top: -2px; border-radius: 3px 0 3px 0; }

.noanswer { margin-top: 2rem; }

.chain-note { margin: 1rem 0 0; max-width: 60ch; font-size: 0.88rem; color: var(--muted); }
.hud-tl { color: rgb(241 242 247 / 0.9); }
