/* ===== Neon — document pages (Regelwerk / Gesetzbuch) ===== */
.doc-main { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 150px clamp(20px, 5vw, 40px) 40px; }

.doc-hero { max-width: 760px; margin-bottom: 56px; }
.doc-hero .eyebrow { display: inline-block; }
.doc-hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(38px, 7vw, 68px); line-height: 1.02; letter-spacing: 1px; margin-top: 14px; }
.doc-hero p { color: var(--muted); font-weight: 300; margin-top: 18px; font-size: 16px; max-width: 620px; }
.doc-hero .updated { margin-top: 18px; font-size: 12.5px; color: var(--faint); letter-spacing: 0.5px; }

/* ---- two-column layout (sticky TOC + content) ---- */
.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.toc { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 2px; }
.toc a { color: var(--muted); font-size: 13.5px; font-weight: 300; padding: 7px 12px; border-left: 1px solid var(--line); transition: color 0.2s, border-color 0.2s; }
.toc a:hover, .toc a.active { color: var(--txt); border-left-color: var(--accent); }

.doc-content { min-width: 0; }
.rule-section { scroll-margin-top: 120px; margin-bottom: 56px; }
.rule-section > h2 { font-family: var(--display); font-weight: 600; font-size: clamp(22px, 3.4vw, 30px); letter-spacing: 0.5px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.rule-section > h2 .num { color: var(--accent); margin-right: 12px; font-weight: 500; }
.rule { padding: 20px 0; border-bottom: 1px solid var(--line); }
.rule:last-child { border-bottom: none; }
.rule h3 { font-family: var(--display); font-weight: 500; font-size: 16.5px; letter-spacing: 0.3px; }
.rule h3 .rid { color: var(--faint); font-weight: 400; margin-right: 10px; font-size: 14px; }
.rule p { color: var(--muted); font-weight: 300; font-size: 14.5px; margin-top: 7px; line-height: 1.7; }
.rule .warn { color: #e6a23c; }
.rule .ban { color: #d6556a; }

/* ---- callout ---- */
.callout { margin: 0 0 48px; padding: 22px 26px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent); }
.callout p { color: var(--muted); font-weight: 300; font-size: 14.5px; }
.callout b { color: var(--txt); font-weight: 500; }

/* ---- Gesetzbuch: search + table ---- */
.law-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 28px; }
.law-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.law-search input { flex: 1; background: none; border: none; outline: none; color: var(--txt); font-family: var(--body); font-size: 15px; }
.law-search input::placeholder { color: var(--faint); }
.law-search svg { width: 18px; height: 18px; color: var(--muted); }
.law-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.law-cats button { font-family: var(--display); font-weight: 500; font-size: 12px; letter-spacing: 0.6px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 9px 15px; border-radius: 99px; cursor: pointer; transition: all 0.2s; text-transform: uppercase; }
.law-cats button:hover { color: var(--txt); border-color: var(--line-2); }
.law-cats button.active { color: #04120f; background: var(--accent); border-color: var(--accent); }

.law-count { color: var(--faint); font-size: 13px; margin-bottom: 16px; }

.law-cat { margin-bottom: 44px; scroll-margin-top: 120px; }
.law-cat h2 { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 3vw, 26px); letter-spacing: 0.5px; margin-bottom: 6px; }
.law-cat .cat-desc { color: var(--muted); font-weight: 300; font-size: 14px; margin-bottom: 18px; }

.law-head, .law-row { display: grid; grid-template-columns: 64px 1fr 130px 120px; gap: 14px; align-items: center; }
.law-head { padding: 0 16px 10px; font-family: var(--display); font-weight: 500; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.law-head .ar { text-align: right; }
.law-row { padding: 15px 16px; border-radius: 10px; border: 1px solid transparent; transition: background 0.18s, border-color 0.18s; }
.law-row:nth-child(odd of .law-row) {}
.law-row + .law-row { border-top: 1px solid var(--line); border-radius: 0; }
.law-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.law-row:hover { background: var(--surface-2); }
.law-row .lp { font-family: var(--display); font-weight: 600; color: var(--accent); font-size: 14px; }
.law-row .lt { font-size: 14.5px; }
.law-row .lt small { display: block; color: var(--faint); font-weight: 300; font-size: 12.5px; margin-top: 2px; }
.law-row .lh, .law-row .lg { text-align: right; font-family: var(--display); font-weight: 500; font-size: 14px; }
.law-row .lh { color: var(--txt); }
.law-row .lg { color: var(--muted); }
.law-row.hidden { display: none; }
.law-empty { color: var(--faint); padding: 30px; text-align: center; }

.back-home { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; margin-bottom: 30px; transition: color 0.2s; }
.back-home:hover { color: var(--accent); }

/* ===== Gesetzbuch als echter Kodex ===== */
.preamble { max-width: 760px; margin-bottom: 8px; padding: 24px 28px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent); }
.preamble h2 { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: 0.5px; margin-bottom: 10px; }
.preamble p { color: var(--muted); font-weight: 300; font-size: 14px; line-height: 1.7; }
.preamble p + p { margin-top: 8px; }

.abschnitt { scroll-margin-top: 120px; margin-bottom: 64px; }
.abschnitt > h2 { font-family: var(--display); font-weight: 600; font-size: clamp(22px, 3.4vw, 30px); letter-spacing: 0.5px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.abschnitt > h2 .rn { color: var(--accent); font-weight: 500; margin-right: 14px; }
.abschnitt > .ab-desc { color: var(--muted); font-weight: 300; font-size: 14px; margin: 14px 0 6px; }

.paragraph { padding: 24px 0; border-bottom: 1px solid var(--line); max-width: 820px; scroll-margin-top: 120px; }
.paragraph:last-child { border-bottom: none; }
.paragraph > h3 { font-family: var(--display); font-weight: 600; font-size: 16.5px; letter-spacing: 0.3px; margin-bottom: 14px; }
.paragraph > h3 .pn { color: var(--accent); margin-right: 10px; }
.abs { display: grid; grid-template-columns: 34px 1fr; gap: 6px; margin-top: 8px; }
.abs .an { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 14px; padding-top: 1px; }
.abs .at { color: #c7cdda; font-weight: 300; font-size: 14.5px; line-height: 1.72; }
.abs .at .strafe { color: var(--txt); }
.abs.head .at { color: var(--txt); font-weight: 400; }
.paragraph.hidden, .abschnitt.hidden { display: none; }

@media (max-width: 860px) {
    .abs { grid-template-columns: 28px 1fr; }
}

/* ===== Gesetze (Kategorisierung nach Gesetzbuch: StGB, StVO, …) ===== */
.gesetz { margin-bottom: 76px; scroll-margin-top: 110px; }
.gesetz.hidden { display: none; }
.gesetz-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 26px; border-bottom: 1px solid var(--line-2); }
.gesetz-head h2 { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 4.2vw, 36px); letter-spacing: 0.5px; }
.gesetz-head .code-badge { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 1.5px; color: var(--accent); border: 1px solid rgba(63, 224, 208, 0.4); padding: 6px 13px; border-radius: 99px; }
.gesetz-head .code-sub { color: var(--faint); font-size: 13px; font-weight: 300; margin-left: auto; }
.gesetz .abschnitt { margin-bottom: 40px; }
.gesetz .abschnitt > h2 { font-family: var(--display); font-weight: 500; font-size: clamp(18px, 2.6vw, 22px); border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.gesetz .abschnitt > h2 .rn { display: none; }

.toc .toc-code { color: var(--txt); font-family: var(--display); font-weight: 600; font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 16px 0 5px; padding-left: 12px; }
.toc .toc-code:first-child { margin-top: 0; }

@media (max-width: 860px) {
    .doc-layout { grid-template-columns: 1fr; }
    .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; margin-bottom: 30px; }
    .toc a { border-left: none; border: 1px solid var(--line); border-radius: 8px; }
    .law-head, .law-row { grid-template-columns: 52px 1fr 92px; }
    .law-head .lg-h, .law-row .lg { display: none; }
}
