/* ============================================================
   RushLifeRP V8 — Docs-Rahmen (v8-docs.css)
   Für gesetze.html + ic-regelwerk.html („PAUSE — NACHSCHLAGEWERK").
   Lädt NACH v8.css und doc-hub.css — ersetzt die Rolle von
   rl-docs.css. doc-hub.css + doc-hub.js bleiben UNANTASTBAR,
   hier werden nur Variablen + Optik von außen gesetzt.

   Liefert:
   · doc-hub-Kompat: --accent / --shell-max, .container,
     .eyebrow, .button — im V8-Look (Archivo + IBM Plex Mono)
   · Episoden-Cold-Open (42vh) via --hero-img
     WICHTIG: --hero-img IMMER mit ABSOLUTEM Pfad setzen
     (style="--hero-img:url('/assets/…')") — Chrome löst
     relative URLs in Custom Properties sonst falsch auf!
   · Lila-Vereinheitlichung (Laws-Rot → Marke #a855f7)
   · Strafkatalog-Tabellen/Badges (vorher in styles.css)
   ============================================================ */

:root {
  /* doc-hub.css Kompatibilität */
  --accent: #a855f7;
  --shell-max: 1200px;
  --ink-2: #cfc6e6;               /* Lesetext auf Near-Black */
  --line: rgba(154, 143, 184, .22);
  --line-soft: rgba(154, 143, 184, .14);
}

/* ---------- Grundstimmung: ruhiges Near-Black ---------- */
body.v8-doc { background: var(--bg); }
body.v8-doc::after { opacity: .05; }              /* Grain dezenter beim Lesen */
body.v8-doc .v8-bar { transform: translateY(0); } /* Letterbox dauerhaft */

/* Fixe UI (Ident · PAUSE/NACHSCHLAGEWERK · MENÜ) braucht auf Scroll-Inhalt
   einen DECKENDEN Hintergrund: oben voll opak bis unter die Labels (~77px),
   dann weicher Auslauf via Mask — kein harter Balkenrand, kein Panel.
   (QA-Fix: vorher lief Fließtext sichtbar unter die Labels.) */
body.v8-doc::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 140px;
  z-index: 48;
  pointer-events: none;
  background: rgba(10, 8, 14, .97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  /* Mask blendet Hintergrund UND Blur gemeinsam aus — nahtloser Verlauf */
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
/* Lokaler Scrim hinter dem TON-AN-Toggle */
body.v8-doc .v8-sound { position: fixed; }
body.v8-doc .v8-sound::before {
  content: '';
  position: absolute;
  inset: -26px -36px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(7, 5, 14, .96), rgba(7, 5, 14, .6) 62%, transparent);
}

/* Studio-Ident ist hier ein Link zurück zur Startseite */
a.v8-ident:hover b { color: var(--brand-2); }

/* Pause-Icon im Timecode (CSS statt ⏸-Glyphe — Font-sicher) */
.v8-pausei {
  display: inline-block;
  width: 12px;
  height: 11px;
  margin: 0 2px;
  border-left: 3.5px solid var(--brand);
  border-right: 3.5px solid var(--brand);
  transform: translateY(1px);
}

/* Menü-Overlay: aktuelle Seite + Live-Stempel */
#v8-overlay .v8-index a.is-here .t { color: var(--brand-2); }
#v8-overlay .v8-index a.is-here .tc::after { content: ' ▸'; }
#v8-overlay .v8-stamp { margin-top: clamp(20px, 4vh, 36px); align-self: flex-start; }

/* ---------- Kompat-Utilities im V8-Look ---------- */
.container { width: min(var(--shell-max), calc(100% - 3rem)); margin: 0 auto; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-m);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: 'EPISODE — '; color: var(--hi); }

/* .button = unterstrichene Titelzeile (V8: KEINE Button-Pillen) */
.button {
  display: inline-block;
  padding: 6px 2px 10px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  font-family: var(--font-d);
  font-weight: 800;
  font-stretch: 116%;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  background-image: linear-gradient(90deg, var(--brand), var(--brand));
  background-repeat: no-repeat;
  background-size: 100% 2px;
  background-position: 0 100%;
  transition: background-size .35s var(--ease-film), color .25s;
}
.button:hover { color: #fff; background-size: 100% 4px; }
.button::after { content: ' ↗'; color: var(--brand); }

/* ============================================================
   EPISODEN-COLD-OPEN (kompakt, 42vh) — Bild via --hero-img
   ============================================================ */
.doc-hub { padding-top: 0; }

.doc-hub-hero {
  position: relative;
  overflow: hidden;
  min-height: 42vh;
  padding: 130px 0 44px;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid rgba(168, 85, 247, .2);
}
/* Bild-Ebene: Duotone-Pipeline wie auf der Startseite */
.doc-hub-hero::before {
  content: '';
  position: absolute;
  inset: -4% 0;
  z-index: 0;
  background: var(--hero-img, none) center 38% / cover no-repeat;
  filter: saturate(.72) contrast(1.07) brightness(.8);
  animation: v8DocsKb 26s var(--ease-film) infinite alternate;
}
@keyframes v8DocsKb {
  from { transform: scale(1); }
  to { transform: scale(1.06) translateY(-1.2%); }
}
/* Tint + lokaler Scrim am Textanker unten links — NIE Boxen */
.doc-hub-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 100% at 16% 88%, rgba(7, 5, 14, .74), rgba(7, 5, 14, .28) 46%, transparent 68%),
    linear-gradient(180deg, rgba(216, 180, 254, .1), rgba(168, 85, 247, .06) 42%, rgba(7, 5, 14, .58) 84%, var(--bg) 100%);
}
.doc-hub-hero .container { position: relative; z-index: 1; }

.doc-hub-hero h1 {
  margin: 12px 0 0 -4px;
  font-family: var(--font-d);
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: .01em;
  font-size: clamp(40px, 6.5vw, 96px);
  color: var(--ink);
  text-shadow: 0 4px 40px rgba(7, 5, 14, .55);
}
.doc-hub-hero h1 .hl { color: var(--brand); } /* das EINE lila Wort */

.doc-hub-hero__lead {
  margin: 14px 0 0;
  max-width: 52ch;
  color: var(--ink);
  opacity: .82;
  font-size: 15px;
  line-height: 1.7;
}
.doc-hub-linkbar { margin-top: 22px; }
.doc-hub-linkbar .button { font-size: 13.5px; }

/* Meta-Chips → Mono-Fakten rechts unten (Dok-Film, keine Pills) */
.doc-hub-hero__meta {
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  text-align: right;
}
.doc-hub-chip {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--font-m);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
}
.doc-hub-chip strong,
body[data-page="laws"] .doc-hub-chip strong,
body[data-page="rules"] .doc-hub-chip strong { color: var(--brand); font-weight: 600; }

/* ============================================================
   WERKZEUGLEISTE: Suche · Schnellfilter · Legende
   ============================================================ */
.doc-hub-body { padding-top: 34px; }

.doc-search {
  border-radius: 2px;
  border-color: rgba(154, 143, 184, .3);
  background: rgba(242, 238, 252, .03);
  color: var(--ink);
  font-family: var(--font-d);
}
.doc-search::placeholder { color: var(--dim); }
.doc-search:focus,
body[data-page="laws"] .doc-search:focus {
  border-color: rgba(168, 85, 247, .6);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, .14);
}
.doc-search-count {
  font-family: var(--font-m);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

.doc-quickref button {
  border-radius: 2px;
  border-color: rgba(154, 143, 184, .3);
  background: transparent;
  color: var(--dim);
  font-family: var(--font-m);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.doc-quickref button:hover,
.doc-quickref button.is-active {
  background: rgba(168, 85, 247, .12);
  border-color: rgba(168, 85, 247, .45);
  color: #fff;
}

.doc-legend {
  border-radius: 2px;
  border-color: var(--line-soft);
  background: transparent;
  color: var(--dim);
  font-family: var(--font-m);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ============================================================
   TABS · ASIDE · PANELS
   ============================================================ */
.doc-hub-tab {
  border-radius: 2px;
  border-color: rgba(154, 143, 184, .25);
  background: transparent;
  color: var(--dim);
  font-family: var(--font-d);
  font-weight: 700;
  font-stretch: 112%;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
}
.doc-hub-tab span {
  border-radius: 2px;
  background: rgba(168, 85, 247, .08);
  font-family: var(--font-m);
  font-weight: 600;
  color: var(--dim);
}
.doc-hub-tab:hover { color: var(--ink); border-color: rgba(216, 180, 254, .4); }
.doc-hub-tab.is-active,
body[data-page="laws"] .doc-hub-tab.is-active {
  color: #fff;
  border-color: rgba(168, 85, 247, .55);
  background: rgba(168, 85, 247, .12);
}
.doc-hub-tab.is-active span,
body[data-page="laws"] .doc-hub-tab.is-active span,
body[data-page="rules"] .doc-hub-tab.is-active span { color: var(--brand); }

.doc-hub-aside {
  border-radius: 2px;
  border-color: var(--line);
  background: rgba(10, 7, 20, .74);
}
.doc-hub-aside__label {
  font-family: var(--font-m);
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--brand);
}
.doc-hub-aside a { border-radius: 2px; color: var(--dim); font-family: var(--font-d); }
.doc-hub-aside a:hover { color: var(--ink); background: rgba(242, 238, 252, .05); }
.doc-hub-aside a.is-active,
body[data-page="laws"] .doc-hub-aside a.is-active {
  background: rgba(168, 85, 247, .12);
  border-color: rgba(168, 85, 247, .3);
  color: #fff;
}

.doc-panel__header {
  border-radius: 2px;
  border-color: var(--line);
  background: linear-gradient(135deg, rgba(168, 85, 247, .09), transparent 60%);
}
.doc-panel__num,
body[data-page="laws"] .doc-panel__num {
  border-radius: 2px;
  background: rgba(168, 85, 247, .12);
  color: var(--brand);
  font-family: var(--font-m);
  font-weight: 600;
  font-size: .8rem;
}
.doc-panel__header h2 {
  font-family: var(--font-d);
  font-weight: 800;
  font-stretch: 118%;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink);
  font-size: 1.2rem;
}
.doc-panel__header p { color: var(--dim); }

/* ============================================================
   GESETZ-BLÖCKE · REGEL-ZEILEN
   ============================================================ */
.law-block {
  border-radius: 2px;
  border-color: var(--line-soft);
  border-left: 2px solid rgba(168, 85, 247, .5);
  background: rgba(242, 238, 252, .02);
}
.law-block__title,
.law-block h3 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-family: var(--font-d);
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: .92rem;
}
.law-block p { color: var(--ink-2); }

.rule-row {
  border-radius: 2px;
  border-color: var(--line-soft);
  background: rgba(242, 238, 252, .02);
}
.rule-row:hover { background: rgba(168, 85, 247, .05); border-color: rgba(168, 85, 247, .3); }
.rule-row__num {
  border-radius: 2px;
  background: rgba(168, 85, 247, .1);
  color: var(--brand);
  font-family: var(--font-m);
  font-weight: 600;
}
.rule-row__text { color: var(--ink-2); }
.rule-row__text strong { color: #fff; }

.rule-badge {
  border-radius: 2px;
  font-family: var(--font-m);
  font-weight: 600;
  letter-spacing: .08em;
}

.rule-group-label {
  border-radius: 0;
  background: rgba(168, 85, 247, .07);
  border-left: 2px solid var(--brand);
  color: var(--brand);
  font-family: var(--font-m);
  font-weight: 600;
  letter-spacing: .16em;
}

/* Aufzählungen in Gesetzestexten (vorher styles.css) */
.rule-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.rule-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(242, 238, 252, .02);
  color: var(--ink-2);
  font-size: .9rem;
  line-height: 1.6;
}
.rule-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 3px 8px;
  border-radius: 2px;
  background: rgba(168, 85, 247, .1);
  color: var(--brand);
  font-family: var(--font-m);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ============================================================
   STRAFKATALOG: Sub-Tabs · Tabellen · Badges (vorher styles.css)
   ============================================================ */
.straf-tabs { flex-wrap: wrap; }
.straf-tab {
  border-radius: 2px;
  border-color: rgba(154, 143, 184, .3);
  color: var(--dim);
  font-family: var(--font-m);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.straf-tab.is-active {
  color: #fff;
  border-color: rgba(168, 85, 247, .55);
  background: rgba(168, 85, 247, .12);
}

.penalty-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(0, 0, 0, .25);
}
.penalty-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: .84rem;
}
.penalty-table thead th {
  padding: 11px 12px;
  background: rgba(168, 85, 247, .1);
  color: var(--hi);
  font-family: var(--font-m);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid rgba(168, 85, 247, .25);
  white-space: nowrap;
}
.penalty-table tbody tr { border-bottom: 1px solid rgba(242, 238, 252, .05); transition: background .15s ease; }
.penalty-table tbody tr:hover { background: rgba(168, 85, 247, .05); }
.penalty-table tbody td { padding: 10px 12px; color: var(--ink-2); vertical-align: top; line-height: 1.5; }
.penalty-table .para-ref {
  color: var(--brand);
  font-family: var(--font-m);
  font-weight: 600;
  font-size: .78rem;
  white-space: nowrap;
}
.penalty-table .offense-grund { color: var(--ink); font-weight: 700; min-width: 140px; }
.penalty-table .offense-desc,
.penalty-table .offense-info { color: var(--dim); font-size: .8rem; max-width: 240px; }

.badge-jail, .badge-fine, .badge-license {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 2px;
  font-family: var(--font-m);
  font-size: .7rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-jail { background: rgba(239, 68, 68, .14); border: 1px solid rgba(239, 68, 68, .32); color: #f87171; }
.badge-fine { background: rgba(234, 179, 8, .12); border: 1px solid rgba(234, 179, 8, .28); color: #facc15; }
.badge-license { margin: 2px 2px 2px 0; background: rgba(96, 165, 250, .12); border: 1px solid rgba(96, 165, 250, .28); color: #60a5fa; font-size: .66rem; }
.badge-none { color: #584f75; font-size: .8rem; }

.penalty-table-group { margin-top: 22px; }
.penalty-table-group__title {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-left: 2px solid var(--brand);
  background: rgba(168, 85, 247, .07);
  color: var(--hi);
  font-family: var(--font-m);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.penalty-catalog-intro p { color: var(--ink-2); }
.law-subsection--muted { opacity: .55; }

.strafkatalog-loading {
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--dim);
  font-family: var(--font-m);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.strafkatalog-loading--error { color: #f87171; }

/* ---------- Abspann auf den Doc-Seiten ---------- */
body.v8-doc .v8-footer { border-top: 1px solid rgba(168, 85, 247, .14); margin-top: 56px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .penalty-table { font-size: .78rem; }
  .penalty-table thead th:nth-child(3),
  .penalty-table thead th:nth-child(4),
  .penalty-table tbody td:nth-child(3),
  .penalty-table tbody td:nth-child(4) { display: none; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 2.2rem); }
  .doc-hub-hero { min-height: 34vh; padding: 100px 0 32px; }
  .doc-hub-hero__meta { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; text-align: left; }
  .rule-list li { grid-template-columns: 1fr; gap: 6px; }
  .rule-num { width: fit-content; }
}
@media (prefers-reduced-motion: reduce) {
  .doc-hub-hero::before { animation: none; }
  .button, .doc-search, .penalty-table tbody tr { transition: none; }
}
