/* ==========================================================================
   Spürwerk GTM – styles
   Concept „Spürnase“: midnight ink, an amber scent trail, electric violet
   for findings, cool paper for files and forms.
   Order: fonts → tokens → base → components → sections → pages → consent
          → utilities → motion → print
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/syne-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/syne-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  /* Midnight ink */
  --ink: #0d1120;
  --ink-2: #161b2e;
  --ink-3: #252b45;
  --ink-line: #2f3654;
  --on-ink: #e9ecf5;
  --on-ink-muted: #a3abc4;

  /* Cool paper */
  --paper: #eef1f5;
  --paper-2: #e1e6ee;
  --card: #fbfcfe;
  --folder: #d9dfea;
  --folder-back: #c6cedd;
  --line: #c9d0dd;
  --line-strong: #8f98ae;
  --text: #0d1120;
  --muted: #4b5470;

  /* Scent and finding */
  --amber: #f4a63a;
  --amber-soft: #fff3d6;
  --amber-deep: #8f5200;
  --amber-ink: #7a4600;
  --violet: #6a4cff;
  --violet-text: #5b3df0;
  --violet-light: #a48bff;
  --danger: #b3261e;

  --display: 'Syne', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --sans: 'Geist', 'Helvetica Neue', 'Segoe UI', system-ui, sans-serif;

  --fs-h1: clamp(1.75rem, 1.1rem + 3.3vw, 3.75rem);
  --fs-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  --fs-h3: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
  --fs-lead: clamp(1.05rem, 1rem + 0.3vw, 1.22rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wrap: 76rem;
  --section-y: clamp(4rem, 8vw, 7rem);
  --header-h: 4.25rem;

  --radius-s: 8px;
  --radius-m: 14px;
  --shadow: 0 1px 2px rgb(13 17 32 / 0.08), 0 14px 34px -16px rgb(13 17 32 / 0.35);
  --shadow-deep: 0 22px 44px -18px rgb(0 0 0 / 0.6);
  --focus: 3px solid var(--amber);
}

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

html {
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.palette-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
p, li, dd { text-wrap: pretty; }

/* Long German compounds must break on very narrow screens. */
@media (max-width: 21rem) {
  p, li, dd, dt { hyphens: auto; overflow-wrap: break-word; }
}

a { color: var(--violet-text); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

:focus-visible { outline: var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

kbd {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
}

address { font-style: normal; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-s);
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* ---------- Components: buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 700 1rem/1.2 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-icon { width: 1.15rem; height: 1.15rem; flex-shrink: 0; }

.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #ffb95a; }

.btn-ghost { border-color: var(--ink-line); color: var(--on-ink); }
.btn-ghost:hover { border-color: var(--violet-light); background: rgb(164 139 255 / 0.1); }

.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--on-ink); }

/* ---------- Components: evidence tent + section mark ---------- */
.tent { width: 2.5rem; height: 2.2rem; flex-shrink: 0; overflow: visible; }
.tent-num {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
  fill: var(--ink);
}
.tent-lg { width: 3.4rem; height: 3rem; }
.tent-xl { width: 4.6rem; height: 4rem; }

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head h2 { margin: 0 0 0.9rem; font-size: var(--fs-h2); }
.section-lead { margin: 0; color: var(--muted); font-size: var(--fs-lead); }
.section-head-ink .section-lead { color: var(--on-ink-muted); }

/* ---------- Header: brand, search field, chips ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  border-bottom: 1px solid var(--ink-line);
  transition: box-shadow 0.2s ease;
}
.bar.is-scrolled { box-shadow: 0 10px 28px -14px rgb(0 0 0 / 0.75); }

.bar-inner {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  max-width: var(--wrap);
  min-height: var(--header-h);
  margin-inline: auto;
  padding: 0.6rem var(--gutter);
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--on-ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 2.3rem; height: 2.3rem; }
.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-gtm {
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  color: var(--amber);
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

/* The menu button is styled as a search field: it opens the palette. */
.seek {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  max-width: 24rem;
  min-height: 46px;
  margin-left: clamp(0.25rem, 2vw, 2rem);
  padding: 0 0.55rem 0 0.85rem;
  border: 1px solid var(--ink-line);
  border-radius: 12px;
  background: var(--ink-2);
  color: var(--on-ink-muted);
  font: 500 0.98rem/1 var(--sans);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.seek:hover { border-color: var(--violet-light); background: #1b2137; color: var(--on-ink); }
.seek-icon { width: 1.15rem; height: 1.15rem; flex-shrink: 0; color: var(--amber); }
.seek-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.seek-kbd {
  margin-left: auto;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  color: var(--on-ink-muted);
  white-space: nowrap;
}

.chips { display: none; gap: 0.35rem; margin-left: auto; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.95rem;
  border-radius: 999px;
  color: var(--on-ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.chip::before {
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--ink-line);
  content: '';
  transition: background-color 0.2s ease;
}
.chip:hover { background: var(--ink-2); text-decoration: none; }
.chip:hover::before,
.chip[aria-current="true"]::before { background: var(--amber); }

.bar-cta { flex-shrink: 0; min-height: 46px; margin-left: auto; padding-inline: 1.1rem; font-size: 0.95rem; }
.cta-short { display: none; }

@media (min-width: 70rem) {
  .chips { display: flex; }
  .bar-cta { margin-left: 0; }
}
@media (max-width: 42rem) {
  .brand-gtm { display: none; }
  .seek-kbd { display: none; }
}
@media (max-width: 33.75rem) {
  .brand-name { display: none; }
}
@media (max-width: 25rem) {
  .btn { padding-inline: 1rem; }
  .cta-long,
  .seek-more { display: none; }
  .cta-short { display: inline; }
  .bar-cta { padding-inline: 0.9rem; }
}
@media (hover: none) {
  .seek-kbd { display: none; }
}

/* ---------- Command palette ---------- */
.palette:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: start center;
  padding: clamp(0.5rem, 9vh, 6.5rem) var(--gutter) 1rem;
}
.palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(6 8 16 / 0.7);
}
.palette-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 40rem);
  max-height: calc(100dvh - clamp(1.5rem, 12vh, 8rem));
  overflow: hidden;
  border: 1px solid var(--ink-line);
  border-radius: 18px;
  background: var(--ink-2);
  box-shadow: var(--shadow-deep);
  color: var(--on-ink);
}
.palette-field {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem 0.65rem 1rem;
  border-bottom: 1px solid var(--ink-line);
}
.palette-field:focus-within { box-shadow: inset 0 -2px 0 var(--amber); }
.palette-seek { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: var(--amber); }
.palette-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--on-ink);
  font: 500 1.08rem/1.3 var(--sans);
}
.palette-input::placeholder { color: var(--on-ink-muted); opacity: 1; }
.palette-input:focus { outline: none; }
.palette-esc {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.6rem;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--on-ink-muted);
  font: 600 0.78rem/1 var(--sans);
  cursor: pointer;
}
.palette-esc:hover { border-color: var(--violet-light); color: var(--on-ink); }

.palette-list { overflow-y: auto; padding: 0.4rem 0.5rem 0.6rem; overscroll-behavior: contain; }
.palette-group-title {
  margin: 0;
  padding: 0.7rem 0.75rem 0.3rem;
  color: var(--on-ink-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.po:not([hidden]) {
  display: grid;
  grid-template-areas: "icon label kind" "icon hint kind";
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.8rem;
  min-height: 52px;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  color: var(--on-ink);
  text-decoration: none;
}
.po[aria-selected="true"] { background: #232a48; box-shadow: inset 3px 0 0 var(--amber); }
.po-icon { grid-area: icon; width: 1.15rem; height: 1.15rem; color: var(--amber); fill: currentColor; }
.po-label { grid-area: label; font-weight: 600; line-height: 1.3; }
.po-hint { grid-area: hint; overflow: hidden; color: var(--on-ink-muted); font-size: 0.84rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.po[aria-current="page"] .po-hint { color: var(--amber); }
.po-kind {
  grid-area: kind;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  color: var(--on-ink-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.palette-empty { margin: 0; padding: 1.1rem 1.25rem; color: var(--on-ink-muted); }
.palette-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--ink-line);
  color: var(--on-ink-muted);
  font-size: 0.78rem;
}
.palette-foot kbd {
  display: inline-block;
  min-width: 1.5rem;
  margin-right: 0.2rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--ink-line);
  border-radius: 5px;
  text-align: center;
}
@media (max-width: 37.5rem) {
  .po-kind { display: none; }
  .palette-foot { display: none; }
}

/* ---------- Hero: marketplace shelf + scent trail + radar ---------- */
.hero {
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(ellipse 60% 50% at 85% 0%, rgb(106 76 255 / 0.2), transparent 70%),
    radial-gradient(ellipse 40% 40% at 0% 100%, rgb(244 166 58 / 0.08), transparent 70%),
    var(--ink);
  color: var(--on-ink);
}
.hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: end;
  gap: 1.5rem clamp(2rem, 5vw, 4.5rem);
}
.hero-title { margin: 0; font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -0.025em; }
.hero-lead { margin: 0; color: #c9cfe0; font-size: var(--fs-lead); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

.shelf { margin: clamp(2.25rem, 5vw, 3.5rem) 0 0; }
.shelf-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 21rem);
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--ink-line);
  border-radius: 26px;
  background: linear-gradient(180deg, #121729, #0f1323);
}
.shelf-art { display: block; width: 100%; height: auto; padding: clamp(0.5rem, 2vw, 1.5rem) 0 clamp(0.5rem, 2vw, 1.5rem) clamp(0.5rem, 2vw, 1.5rem); }

.shelf-board { fill: none; stroke: var(--ink-line); stroke-width: 3; stroke-linecap: round; }
.tile-bg { fill: var(--ink-2); stroke: var(--ink-line); stroke-width: 1.5; }
.tile-line { fill: var(--ink-3); }
.tile-line-short { opacity: 0.7; }
.glyph-a { color: #3a4266; fill: currentColor; }
.glyph-b { color: #463d78; fill: currentColor; }
.glyph-c { color: #5a4a2e; fill: currentColor; }
.glyph-wave { fill: none; stroke: currentColor; stroke-width: 7; stroke-linecap: round; }

.tile-found .tile-bg { fill: #1d1840; stroke: var(--violet-light); stroke-width: 2.5; }
.tile-found .tile-line { fill: #4a3f86; }
.found-glyph { fill: var(--amber); }
.find-glow { opacity: 1; }
.found-rings circle { fill: none; stroke: var(--violet-light); stroke-width: 2; opacity: 0; }
.found-link { fill: none; stroke: var(--violet-light); stroke-width: 2; stroke-dasharray: 4 5; }

.trail-reveal { fill: none; stroke: #fff; stroke-width: 18; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.trail { fill: none; stroke: var(--amber); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 0 13; }
.scent circle { fill: var(--amber); opacity: 0.45; transform-box: fill-box; transform-origin: center; }

.probe {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 1.4rem;
  border-left: 1px solid var(--ink-line);
  background: linear-gradient(180deg, #1a1838, #141a30);
}
.probe-tag {
  align-self: flex-start;
  margin: 0 0 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.probe-title { margin: 0; font-family: var(--display); font-size: 1.2rem; font-weight: 800; }
.probe-meta { margin: 0.2rem 0 0.5rem; color: var(--on-ink-muted); font-size: 0.85rem; }
.radar { display: block; width: 100%; height: auto; }
.radar-grid path { fill: none; stroke: var(--ink-line); stroke-width: 1.2; }
.radar-shape { fill: rgb(164 139 255 / 0.28); stroke: var(--violet-light); stroke-width: 2.5; stroke-linejoin: round; transform-box: view-box; transform-origin: 170px 140px; }
.radar-dots circle { fill: var(--amber); }
.radar-labels text { fill: var(--on-ink); font-family: var(--sans); font-size: 13px; font-weight: 500; }
.radar-value { fill: var(--amber); font-weight: 700; }
.probe-find { margin: 0.5rem 0 0.4rem; font-size: 0.95rem; }
.probe-find strong { color: var(--amber); }
.probe-note { margin: 0; color: var(--on-ink-muted); font-size: 0.8rem; line-height: 1.45; }

.shelf-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 1.25rem;
}
.fundort-tag { display: inline-flex; align-items: center; gap: 0.85rem; margin: 0; }
.fundort-text { display: grid; color: var(--on-ink); font-size: 0.98rem; line-height: 1.35; }
.fundort-label { color: var(--amber); font-family: var(--sans); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.shelf-caption { max-width: 34rem; color: var(--on-ink-muted); font-size: 0.85rem; }

@media (max-width: 64rem) {
  .shelf-stage { grid-template-columns: minmax(0, 1fr); }
  .shelf-art { padding: clamp(0.5rem, 2vw, 1.25rem); }
  .found-link { display: none; }
  .probe {
    display: grid;
    grid-template-areas: "tag radar" "title radar" "meta radar" "find radar" "note radar";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-rows: auto auto auto 1fr auto;
    column-gap: 1.5rem;
    border-top: 1px solid var(--ink-line);
    border-left: 0;
  }
  .probe-tag { grid-area: tag; justify-self: start; }
  .probe-title { grid-area: title; }
  .probe-meta { grid-area: meta; }
  .radar { grid-area: radar; max-width: 22rem; justify-self: center; }
  .probe-find { grid-area: find; align-self: end; }
  .probe-note { grid-area: note; }
}
@media (max-width: 56rem) {
  .hero-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 37.5rem) {
  .probe { display: flex; padding: 1.25rem 1.1rem; }
  .radar { max-width: 20rem; margin-inline: auto; }
}

/* ---------- Akten: case files with tabs ---------- */
.akten { padding: var(--section-y) 0; }

.folder-tabs:not([hidden]) { display: flex; gap: 0.35rem; padding-left: clamp(0.75rem, 2vw, 1.5rem); }
.folder-tab {
  display: grid;
  min-height: 48px;
  padding: 0.65rem 1.15rem 0.75rem;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: var(--folder-back);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.folder-tab:hover { background: #cfd6e4; }
.folder-tab[aria-selected="true"] { background: var(--folder); }
.folder-tab:focus-visible { outline-offset: -3px; }
.folder-tab-no { color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.folder-tab-name { font-family: var(--display); font-size: 1rem; font-weight: 700; line-height: 1.25; }
.folder-tab[aria-selected="true"] .folder-tab-no { color: var(--violet-text); }

.akte:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(15rem, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 1.5rem;
  padding: clamp(1rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--folder);
  box-shadow: var(--shadow);
}
.is-tabbed .akte:not([hidden]) { margin-bottom: 0; border-top-left-radius: 0; }
.akte:focus-visible { outline-offset: 4px; }

.akte-sheet {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border-radius: 6px;
  background: var(--card);
  box-shadow: 0 1px 0 var(--line), 0 12px 26px -18px rgb(13 17 32 / 0.45);
}
.akte-sheet::before {
  position: absolute;
  inset: 0.5rem -0.4rem -0.4rem 0.5rem;
  z-index: -1;
  border-radius: 6px;
  background: #eef0f6;
  box-shadow: 0 1px 0 var(--line);
  content: '';
}
.akte-ref {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin: 0 0 1.2rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stamp {
  padding: 0.2rem 0.6rem;
  border: 2px solid var(--violet-text);
  border-radius: 6px;
  color: var(--violet-text);
  font-weight: 700;
  transform: rotate(-2deg);
}
.akte-title { margin: 0 0 0.9rem; font-size: var(--fs-h3); line-height: 1.2; }
.akte-lead { margin: 0 0 1.6rem; }
.akte-sub { margin: 0 0 0.8rem; font-size: 1.02rem; font-weight: 700; letter-spacing: 0; }

.akte-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.akte-steps li {
  position: relative;
  padding: 0.6rem 0 0.6rem 2.4rem;
  border-top: 1px solid var(--line);
  counter-increment: step;
}
.akte-steps li::before {
  position: absolute;
  top: 0.6rem;
  left: 0;
  color: var(--amber-deep);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  content: counter(step, decimal-leading-zero);
}

.spuren { margin: 0; }
.spuren div {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}
.spuren dt { display: flex; align-items: baseline; gap: 0.5rem; font-weight: 700; }
.spuren dt::before {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border: 2px solid var(--violet-text);
  border-radius: 50%;
  content: '';
}
.spuren dd { margin: 0; }

.memo {
  position: relative;
  margin-top: 0.75rem;
  padding: 1.6rem 1.3rem 1.3rem;
  border-radius: 4px;
  background: var(--amber-soft);
  box-shadow: 0 14px 26px -18px rgb(13 17 32 / 0.5);
  transform: rotate(0.8deg);
}
.memo::before {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  width: 5.5rem;
  height: 1.4rem;
  border-radius: 3px;
  background: rgb(164 139 255 / 0.45);
  content: '';
  transform: translateX(-50%) rotate(-3deg);
}
.memo-title { margin: 0 0 0.9rem; color: var(--amber-ink); font-family: var(--display); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.memo-list { margin: 0; }
.memo-list div + div { margin-top: 0.95rem; }
.memo-list dt { font-size: 0.85rem; font-weight: 700; }
.memo-list dd { margin: 0.1rem 0 0; font-size: 0.95rem; line-height: 1.55; }

@media (max-width: 56rem) {
  .akte:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
  .memo { transform: none; }
}
@media (max-width: 35rem) {
  .folder-tab-long { display: none; }
  .folder-tabs:not([hidden]) { padding-left: 0; }
  .folder-tab { flex: 1 1 0; padding-inline: 0.75rem; }
  .spuren div { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Fährte: three-step trail ---------- */
.faehrte { padding: var(--section-y) 0; background: var(--ink); color: var(--on-ink); }
.faehrte .mark { color: var(--on-ink); }

.trailway { position: relative; }
.trailway-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
}
.trailway-line path {
  fill: none;
  stroke: var(--amber);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 0 15;
  vector-effect: non-scaling-stroke;
  opacity: 0.85;
}

.stations {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.station { display: flex; flex-direction: column; text-align: center; }
.station-dot {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: 28px auto 1.1rem;
  border: 2px solid var(--amber);
  border-radius: 50%;
  background: var(--ink-2);
  color: var(--amber);
}
.station-dot svg { width: 1.7rem; height: 1.7rem; fill: currentColor; }
.station-dot-found { border-color: var(--violet-light); box-shadow: 0 0 0 8px rgb(164 139 255 / 0.14); }
.station-dot-found svg { width: 2.2rem; height: 2.2rem; }
.station-no { margin: 0; color: var(--amber); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.station-name { margin: 0.2rem 0 0.1rem; font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.4rem); }
.station-verb { margin: 0 0 1rem; color: var(--violet-light); font-weight: 600; }
.station-text { margin: 0 auto 1.4rem; max-width: 24rem; color: #c9cfe0; }
.station-facts {
  display: grid;
  gap: 0.45rem;
  margin: auto 0 0;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-m);
  background: var(--ink-2);
  text-align: left;
}
.station-facts div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }
.station-facts dt { color: var(--on-ink-muted); }
.station-facts dd { margin: 0; font-weight: 600; text-align: right; }

.evidence {
  max-width: 46rem;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--ink-line);
  color: var(--on-ink-muted);
  text-align: center;
}
.evidence strong { color: var(--amber); }

@media (max-width: 56rem) {
  .trailway-line { display: none; }
  .stations { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .station {
    position: relative;
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    column-gap: 1.25rem;
    padding-bottom: 2.25rem;
    text-align: left;
  }
  .station::before {
    position: absolute;
    top: 4.5rem;
    bottom: 0.5rem;
    left: calc(2rem - 2.5px);
    width: 5px;
    background: radial-gradient(circle, var(--amber) 2.5px, transparent 3px) center top / 5px 15px repeat-y;
    content: '';
  }
  .station:last-child::before { display: none; }
  .station:last-child { padding-bottom: 0; }
  .station-dot { grid-row: 1 / span 6; margin: 0; }
  .station-text { margin: 0; max-width: none; }
}

/* ---------- Fallakten: index cards in a drawer ---------- */
.fallakten { padding: var(--section-y) 0; }
.fallakten-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.fallakten-grid .section-head { position: sticky; top: calc(var(--header-h) + 2rem); margin-bottom: 0; }

.karten { margin: 0; padding: 0; list-style: none; }
.karte { margin-bottom: 0.75rem; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.karte-head { margin: 0; font-size: inherit; letter-spacing: 0; }
.karte-pull {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  min-height: 3.6rem;
  padding: 0.9rem 1.1rem;
  border: 0;
  border-radius: inherit;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.karte-pull::after {
  width: 0.6rem;
  height: 0.6rem;
  margin: 0 0.3rem;
  border-top: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  content: '';
  transform: translateY(0.15rem) rotate(-45deg);
  transition: transform 0.25s ease;
}
.karte-pull[aria-expanded="true"]::after { transform: translateY(-0.15rem) rotate(135deg); }
.karte-pull:hover .karte-q { color: var(--violet-text); }
.karte-pull:focus-visible { outline-offset: -3px; }
.karte-no {
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.karte-q { font-family: var(--display); font-size: 1.04rem; font-weight: 700; line-height: 1.3; text-wrap: balance; }
.karte-body { padding: 0 1.25rem 1.3rem; }
.karte-body p { margin: 0; line-height: 1.75; }

/* With JavaScript the cards stand in a drawer; one is pulled out at a time. */
.kartei.is-drawer {
  padding: 1.4rem clamp(0.75rem, 2vw, 1.25rem) 0;
  border-radius: 22px 22px 18px 18px;
  background: linear-gradient(180deg, var(--ink-3), var(--ink));
  box-shadow: var(--shadow);
}
.is-drawer .karte {
  position: relative;
  margin: -0.35rem 0 0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -1px 0 rgb(13 17 32 / 0.18), 0 -8px 16px -12px rgb(0 0 0 / 0.65);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.is-drawer .karte:first-child { margin-top: 0; }
.is-drawer .karte:nth-child(odd) { margin-right: 0.6rem; }
.is-drawer .karte:nth-child(even) { margin-left: 0.6rem; }
.is-drawer .karte.is-pulled {
  z-index: 2;
  margin-bottom: 0.9rem;
  border-top: 4px solid var(--violet);
  border-radius: 10px;
  box-shadow: var(--shadow-deep);
  transform: translateY(-0.4rem) rotate(-0.5deg);
}
.is-drawer .karte.is-pulled .karte-no { background: var(--violet-text); color: #fff; }

.kartei-front { display: none; }
.is-drawer .kartei-front {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 5rem;
  margin: -1.1rem calc(-1 * clamp(0.75rem, 2vw, 1.25rem)) 0;
  border-top: 2px solid #3a4266;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #2a3150, #1c2238);
  box-shadow: 0 -14px 24px -12px rgb(0 0 0 / 0.6);
}
.is-drawer .kartei-front::after {
  width: 5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: inset 0 1px 0 rgb(0 0 0 / 0.6), 0 1px 0 #3a4266;
  content: '';
}
.kartei-label {
  padding: 0.3rem 1rem;
  border: 2px solid #8f98ae;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 64rem) {
  .fallakten-grid { grid-template-columns: minmax(0, 1fr); }
  .fallakten-grid .section-head { position: static; }
}
@media (max-width: 30rem) {
  .karte-pull { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.4rem; }
  .karte-no { justify-self: start; }
  .karte-q { grid-column: 1; }
  .karte-pull::after { grid-row: 1 / span 2; grid-column: 2; }
  .is-drawer .karte:nth-child(odd) { margin-right: 0.3rem; }
  .is-drawer .karte:nth-child(even) { margin-left: 0.3rem; }
}

/* ---------- Marktplatz-Check: form + Fundort ---------- */
.check { padding: var(--section-y) 0; background: var(--paper-2); }
.check-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 0.75fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.seekform {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.field-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.field { min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.25rem; }
.field-label { display: block; margin-bottom: 0.45rem; padding: 0; font-weight: 600; }
.req,
.opt { margin-left: 0.35rem; color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.req { color: var(--amber-deep); }
.field-hint { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.86rem; }
.field-group .field-hint { margin: -0.15rem 0 0.65rem; }
.field-error { margin: 0.45rem 0 0; color: var(--danger); font-size: 0.88rem; font-weight: 600; }
.field-error:empty { display: none; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field select {
  padding-right: 2.5rem;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 1.15rem center / 0.4rem 0.4rem no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 0.8rem center / 0.4rem 0.4rem no-repeat,
    #fff;
  appearance: none;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--muted); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--violet-text);
  outline: 3px solid rgb(91 61 240 / 0.35);
  outline-offset: 1px;
}
.field [aria-invalid="true"] { border-color: var(--danger); }

.picks { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.pick { position: relative; display: inline-flex; }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pick span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.pick span::before {
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  content: '';
}
.pick input[type="radio"] + span::before { border-radius: 50%; }
.pick input:hover + span { border-color: var(--violet-text); }
.pick input:checked + span { border-color: var(--violet-text); background: var(--violet-text); color: #fff; }
.pick input:checked + span::before { border-color: var(--amber); background: var(--amber); box-shadow: inset 0 0 0 2px var(--violet-text); }
.pick input:focus-visible + span { outline: 3px solid var(--amber-deep); outline-offset: 2px; }
.pick input[aria-invalid="true"] + span { border-color: var(--danger); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form-note { flex: 1 1 18rem; margin: 0; color: var(--muted); font-size: 0.88rem; }
.form-status { margin: 0; padding: 0.95rem 1.1rem; border-radius: 12px; }
.form-status:empty { display: none; }
.form-status.is-success { border: 1px solid #9fd3b0; background: #e9f6ee; color: #14532d; }
.form-status.is-error { border: 1px solid #efb1aa; background: #fdecea; color: #8a1c13; }

.fundort {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 22px;
  background: var(--ink);
  color: var(--on-ink);
}
.fundort-title { margin: 1rem 0 0.75rem; color: var(--amber); font-family: var(--sans); font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; }
.fundort-address { font-size: 1.15rem; line-height: 1.5; }
.fundort-lines { display: grid; gap: 0.3rem; margin: 1.1rem 0; padding: 0; list-style: none; }
.fundort-lines li { display: flex; align-items: center; gap: 0.6rem; }
.fundort-lines svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; color: var(--amber); }
.fundort-lines a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-ink); overflow-wrap: anywhere; }
.fundort-lines a:hover { color: var(--amber); }
.fundort-note,
.fundort-reg { margin: 0; color: var(--on-ink-muted); font-size: 0.9rem; }
.fundort-reg { margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px dashed var(--ink-line); }

@media (max-width: 56rem) {
  .check-grid { grid-template-columns: minmax(0, 1fr); }
  .fundort { position: static; }
}
@media (max-width: 40rem) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .btn-submit { width: 100%; }
}

/* ---------- Footer: pawprint trail to the legal links ---------- */
.foot { padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; background: var(--ink); color: var(--on-ink); }
.foot-inner {
  display: grid;
  grid-template-areas: "firm trail" "note note" "reg reg";
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem clamp(2rem, 5vw, 4rem);
}
.foot a { color: var(--on-ink); }
.foot a:hover { color: var(--amber); }
.foot-firm { grid-area: firm; }
.brand-foot { margin-bottom: 1rem; }
.foot-address,
.foot-contact { margin: 0 0 0.75rem; color: var(--on-ink-muted); font-size: 0.95rem; }
.foot-address strong { color: var(--on-ink); }
.foot-contact a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }

.foot-trail { grid-area: trail; display: grid; align-self: center; gap: 0.75rem; }
.trail-lead { display: flex; gap: 1.5rem; margin: 0; padding: 0.5rem 0 0 0.35rem; }
.lead-paw { width: 1.1rem; height: 1.1rem; color: var(--amber); fill: currentColor; transform: rotate(90deg); }
.lead-paw:nth-child(odd) { translate: 0 -0.45rem; }
.lead-paw:nth-child(even) { translate: 0 0.45rem; }
.lead-paw:nth-child(1) { opacity: 0.2; }
.lead-paw:nth-child(2) { opacity: 0.35; }
.lead-paw:nth-child(3) { opacity: 0.5; }
.lead-paw:nth-child(4) { opacity: 0.68; }
.lead-paw:nth-child(5) { opacity: 0.85; }

.steps { display: flex; flex-wrap: wrap; gap: 0.25rem 0.4rem; margin: 0; padding: 0; list-style: none; }
.step { display: flex; align-items: center; gap: 0.35rem; }
.step-paw { width: 1.15rem; height: 1.15rem; color: var(--amber); fill: currentColor; transform: rotate(90deg); }
.step a,
.step button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.4rem;
  border: 0;
  background: none;
  color: var(--on-ink);
  font: 500 0.95rem/1.2 var(--sans);
  text-decoration: underline;
  text-decoration-color: var(--ink-line);
  text-underline-offset: 0.3em;
  cursor: pointer;
}
.step a:hover,
.step button:hover { color: var(--amber); text-decoration-color: var(--amber); }
.step a[aria-current="page"] { color: var(--amber); text-decoration-color: var(--amber); }

.foot-note { grid-area: note; margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--ink-line); color: var(--on-ink-muted); font-size: 0.86rem; }
.foot-reg { grid-area: reg; margin: -1rem 0 0; color: var(--on-ink-muted); font-size: 0.86rem; }

@media (max-width: 56rem) {
  .foot-inner { grid-template-areas: "firm" "trail" "note" "reg"; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 37.5rem) {
  .foot-trail { display: grid; justify-items: start; }
  .trail-lead { flex-direction: column; gap: 0.5rem; margin-left: 0.4rem; }
  .trail-lead .lead-paw { transform: none; }
  .lead-paw:nth-child(odd) { translate: -0.4rem 0; }
  .lead-paw:nth-child(even) { translate: 0.4rem 0; }
  .steps { display: grid; gap: 0.1rem; }
  .step-paw { transform: none; }
  .step:nth-child(even) { translate: 0.8rem 0; }
}

/* ---------- Pages: legal documents ---------- */
.doc { padding: clamp(3rem, 7vw, 5rem) 0 var(--section-y); }
.doc-wrap { max-width: 50rem; }
.doc-head { margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 2px solid var(--ink); }
.doc-head h1 { margin: 0 0 0.6rem; font-size: clamp(1.7rem, 1.1rem + 3vw, 3.4rem); hyphens: manual; overflow-wrap: break-word; }
.doc-stand { margin: 0; color: var(--muted); font-weight: 600; }
.doc-lead { margin: 1rem 0 0; font-size: var(--fs-lead); }

.doc-body h2 { margin: 2.6rem 0 0.8rem; font-family: var(--sans); font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.55rem); font-weight: 800; letter-spacing: -0.01em; hyphens: auto; overflow-wrap: break-word; }
.doc-body h3 { margin: 1.6rem 0 0.4rem; font-family: var(--sans); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
.doc-body p,
.doc-body li { overflow-wrap: break-word; }
.doc-body ol,
.doc-body ul { padding-left: 1.4rem; }
.doc-body li + li { margin-top: 0.45rem; }
.doc-body address { margin: 0 0 1rem; padding: 1rem 1.2rem; border-left: 4px solid var(--amber); border-radius: 0 var(--radius-s) var(--radius-s) 0; background: var(--card); }

.facts { display: grid; gap: 0; margin: 0 0 1rem; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0.25rem 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
@media (max-width: 30rem) {
  .facts div { grid-template-columns: minmax(0, 1fr); }
}

.doc-toc { margin: 0 0 2rem; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--card); }
.doc-toc h2 { margin: 0 0 0.6rem; font-size: 1.1rem; }
.doc-toc ol { columns: 2 15rem; column-gap: 2rem; margin: 0; }
.doc-toc li { break-inside: avoid; }
.doc-toc li + li { margin-top: 0.3rem; }

.callout { margin: 1.5rem 0; padding: 1.2rem 1.35rem; border: 2px solid var(--ink); border-radius: var(--radius-m); background: var(--amber-soft); }
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.cookie-table { width: 100%; margin: 1.25rem 0 1.5rem; border-collapse: collapse; font-size: 0.92rem; line-height: 1.45; }
.cookie-table caption { padding-bottom: 0.6rem; font-family: var(--display); font-weight: 700; text-align: left; }
.cookie-table th,
.cookie-table td { padding: 0.6rem 0.7rem; border: 1px solid var(--line-strong); text-align: left; vertical-align: top; }
.cookie-table thead th { background: var(--paper-2); font-family: var(--display); }
.cookie-table tbody th { background: var(--card); font-weight: 400; }
.cookie-table td { background: var(--card); }
.cookie-table code { font-size: 0.9em; overflow-wrap: anywhere; }

/* Narrow screens: each row becomes a block of "label: value" lines. */
@media (max-width: 47.99rem) {
  .cookie-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .cookie-table tbody,
  .cookie-table tr,
  .cookie-table th,
  .cookie-table td { display: block; }
  .cookie-table tr { margin-bottom: 0.75rem; border: 1px solid var(--line-strong); }
  .cookie-table tbody th,
  .cookie-table td { border: 0; border-top: 1px solid var(--line); }
  .cookie-table tbody th { border-top: 0; background: var(--paper-2); font-weight: 600; }
  .cookie-table td::before { font-family: var(--display); font-weight: 700; content: attr(data-label) ": "; }
}

/* ---------- Pages: 404 ---------- */
.lost { padding: clamp(3rem, 8vw, 6rem) 0 var(--section-y); }
.lost-wrap { max-width: 44rem; text-align: center; }
.lost-art { display: block; width: min(100%, 22rem); height: auto; margin: 0 auto 1.5rem; }
.lost-trail { fill: none; stroke: var(--amber-deep); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 0 14; }
.lost-q circle { fill: var(--ink); }
.lost-q path { fill: none; stroke: var(--amber); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.lost h1 { margin: 0 0 1rem; font-size: clamp(1.7rem, 1.1rem + 3vw, 3.4rem); }
.lost-lead { margin: 0 auto; max-width: 34rem; color: var(--muted); font-size: var(--fs-lead); }
.lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }

/* ---------- Consent banner + dialog ---------- */
.consent {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  width: min(30rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--ink-line);
  border-top: 4px solid var(--amber);
  border-radius: 18px;
  background: var(--ink-2);
  box-shadow: var(--shadow-deep);
  color: var(--on-ink);
}
.consent-title { margin: 0 0 0.5rem; font-size: 1.08rem; }
.consent-text { margin: 0 0 1rem; color: #c9cfe0; font-size: 0.92rem; line-height: 1.55; }
.consent a,
.consent-dialog a { color: var(--violet-light); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.consent-btn {
  flex: 1 1 9rem;
  min-height: 46px;
  padding: 0.6rem 1rem;
  border: 2px solid var(--amber);
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font: 700 0.95rem/1.2 var(--sans);
  cursor: pointer;
}
.consent-btn:hover { border-color: #ffb95a; background: #ffb95a; }
.consent-btn-save { flex-basis: 100%; border-color: var(--violet-light); background: transparent; color: var(--on-ink); }
.consent-btn-save:hover { border-color: var(--violet-light); background: rgb(164 139 255 / 0.15); }
.consent-link {
  flex-basis: 100%;
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--on-ink);
  font: 600 0.92rem/1.2 var(--sans);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  cursor: pointer;
}
.consent-link:hover { color: var(--amber); }

.consent-dialog {
  width: min(36rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--ink-line);
  border-radius: 20px;
  background: var(--ink-2);
  box-shadow: var(--shadow-deep);
  color: var(--on-ink);
}
.consent-dialog::backdrop { background: rgb(6 8 16 / 0.7); }
.consent-dialog-inner { padding: clamp(1.25rem, 3vw, 1.75rem); }
.consent-categories { display: grid; gap: 0.75rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.consent-category { padding: 0.9rem 1rem; border: 1px solid var(--ink-line); border-radius: var(--radius-m); background: var(--ink); }
.consent-category-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.consent-category h3 { margin: 0; font-size: 1rem; }
.consent-category p { margin: 0.4rem 0 0; color: var(--on-ink-muted); font-size: 0.88rem; line-height: 1.5; }
.consent-always { color: var(--amber); font-size: 0.82rem; font-weight: 700; }
.consent-switch { position: relative; display: inline-flex; flex-shrink: 0; align-items: center; min-width: 44px; min-height: 44px; justify-content: flex-end; }
.consent-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.consent-switch-track {
  position: relative;
  width: 3rem;
  height: 1.7rem;
  border: 2px solid var(--on-ink-muted);
  border-radius: 999px;
  background: var(--ink-3);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.consent-switch-track::after {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--on-ink);
  content: '';
  transition: transform 0.2s ease;
}
.consent-switch input:checked + .consent-switch-track { border-color: var(--amber); background: var(--violet); }
.consent-switch input:checked + .consent-switch-track::after { transform: translateX(1.3rem); }
.consent-switch input:focus-visible + .consent-switch-track { outline: var(--focus); outline-offset: 3px; }

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

/* ---------- Motion (only when the visitor allows it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .trail-reveal { animation: trail-draw 2.6s 0.3s ease-in-out backwards; }
  .scent circle { animation: scent-drift 4.5s 2.4s ease-in-out infinite backwards; }
  .scent circle:nth-child(2n) { animation-delay: 2.9s; animation-duration: 5.2s; }
  .scent circle:nth-child(3n) { animation-delay: 3.4s; animation-duration: 3.9s; }
  .find-glow { animation: fade-in 0.8s 2.8s ease-out backwards; }
  .found-rings circle { transform-box: fill-box; transform-origin: center; animation: ring-pulse 2.6s 3s ease-out infinite backwards; }
  .found-rings circle + circle { animation-delay: 3.6s; }
  .found-link { animation: fade-in 0.5s 3s ease-out backwards; }
  .radar-shape { animation: radar-grow 0.9s 3.1s cubic-bezier(0.2, 0.8, 0.2, 1.2) backwards; }
  .radar-dots { animation: fade-in 0.4s 3.7s ease-out backwards; }

  @keyframes trail-draw { from { stroke-dashoffset: 1; } }
  @keyframes fade-in { from { opacity: 0; } }
  @keyframes scent-drift {
    0%, 100% { opacity: 0.15; transform: translateY(0); }
    50% { opacity: 0.7; transform: translateY(-9px); }
  }
  @keyframes ring-pulse {
    from { opacity: 0.7; transform: scale(0.9); }
    to { opacity: 0; transform: scale(1.3); }
  }
  @keyframes radar-grow { from { opacity: 0; transform: scale(0.2); } }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .bar,
  .foot-trail,
  .consent,
  .skip-link { display: none; }
  body { background: #fff; }
  .hero,
  .faehrte,
  .foot { background: #fff; color: #000; }
}
