/* Empire Life – Gesetzbuch & Strafkatalog (öffentlich) */
:root {
  color-scheme: dark;
  --bg: #07070a;
  --surface: #0f0f16;
  --surface-up: #14141d;
  --text: #f6f6fa;
  --text-2: #c9c9d4;
  --muted: #9b9baa;
  --line: #292934;
  --line-soft: rgba(255,255,255,.075);
  --pink: #f2057d;
  --violet: #8d16f5;
  --blue: #1488ff;
  --gradient: linear-gradient(118deg,var(--pink),var(--violet) 53%,var(--blue));
  --max: 1240px;
  font-family: Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; min-width: 320px; overflow-x: hidden; color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -4; opacity: .13; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.32) .55px,transparent .55px); background-size: 5px 5px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
::selection { color: #fff; background: rgba(242,5,125,.72); }
.shell { width: min(var(--max),calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 200; top: 12px; left: 12px; padding: 11px 15px; transform: translateY(-160%); border-radius: 8px; color: #050507; background: #fff; font-weight: 850; }
.skip-link:focus { transform: none; }
.gb-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopfzeile wie auf der Startseite */
.site-header { position: fixed; z-index: 80; inset: 0 0 auto; height: 76px; border-bottom: 1px solid var(--line-soft); background: rgba(7,7,10,.82); backdrop-filter: blur(18px); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-size: .93rem; font-weight: 900; letter-spacing: -.03em; }
.brand b { color: #aaaab7; }
.brand-mark { width: 29px; display: grid; gap: 3px; transform: skewX(-17deg); }
.brand-mark i { display: block; height: 6px; border-radius: 2px; background: var(--gradient); }
.brand-mark i:nth-child(2) { width: 82%; margin-left: 9%; }
.brand-mark i:nth-child(3) { width: 64%; margin-left: 18%; }
.desktop-nav { display: flex; align-items: center; gap: 28px; margin-inline: auto; }
.desktop-nav a { position: relative; padding: 27px 0 24px; color: #aaaab6; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: #fff; }
.desktop-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gradient); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.desktop-nav + .header-actions { margin-left: 0; }
.portal-switcher { position: relative; }
.portal-switcher summary { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 9px; list-style: none; border: 1px solid var(--line); border-radius: 8px; color: #e7e6ed; background: rgba(255,255,255,.035); font-size: .74rem; font-weight: 820; cursor: pointer; user-select: none; }
.portal-switcher summary::-webkit-details-marker { display: none; }
.portal-switcher summary::after { content: "⌄"; color: #92909f; }
.portal-switcher[open] summary { border-color: #575767; background: rgba(255,255,255,.075); }
.portal-switcher-menu { position: absolute; top: calc(100% + 10px); right: 0; width: 236px; padding: 8px; display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 12px; background: rgba(13,13,19,.99); box-shadow: 0 24px 70px rgba(0,0,0,.48); }
.portal-switcher-menu a { min-height: 43px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-radius: 8px; color: #d8d7df; font-size: .74rem; font-weight: 760; }
.portal-switcher-menu a::after { content: "→"; color: #777584; }
.portal-switcher-menu a:hover { color: #fff; background: rgba(255,255,255,.065); }
.portal-switcher-menu a[aria-current="page"] { color: #fff; background: linear-gradient(118deg,rgba(242,5,125,.18),rgba(20,136,255,.14)); }
.eyebrow { margin: 0 0 18px; color: #c9c9d2; font-size: .68rem; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }

/* Kopfbereich */
main { padding-top: 76px; }
.gb-held { padding: 64px 0 34px; border-bottom: 1px solid var(--line-soft); background: radial-gradient(900px 340px at 85% 0%, rgba(20,136,255,.14), transparent 70%); }
.gb-held h1 { margin: 0; font-size: clamp(2.2rem, 6.2vw, 4.4rem); line-height: .92; letter-spacing: -.05em; font-weight: 950; }
.gb-held h1 span { display: block; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gb-held-text { max-width: 640px; margin: 20px 0 6px; color: var(--muted); font-size: 1.02rem; }
.gb-stand { margin: 0; color: var(--text-2); font-size: .84rem; font-weight: 700; }

/* Aufbau */
.gb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; padding: 30px 0 90px; }
.gb-werkzeuge { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gb-eingabe { min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0b0b11; font-size: .9rem; }
.gb-eingabe:focus { outline: 2px solid #7cb2ff; border-color: transparent; }
#gbSuche { flex: 1 1 280px; }
.gb-haken { display: inline-flex; gap: 8px; align-items: center; color: var(--text-2); font-size: .86rem; cursor: pointer; }
.gb-haken input { width: 18px; height: 18px; accent-color: #8d16f5; }
.gb-buecher { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.gb-chip { min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); font-size: .8rem; font-weight: 800; cursor: pointer; }
.gb-chip:hover { border-color: #5b5b6b; }
.gb-chip[aria-pressed="true"] { border-color: transparent; background: linear-gradient(118deg,rgba(242,5,125,.28),rgba(20,136,255,.24)); }
.gb-chip-zahl { min-width: 22px; padding: 0 6px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text-2); font-size: .7rem; text-align: center; }
.gb-vorwort { margin: 0 0 18px; padding: 14px 18px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.gb-vorwort summary { font-weight: 800; cursor: pointer; }
.gb-treffer { min-height: 1.2em; margin: 0 0 8px; color: var(--muted); font-size: .84rem; }
.gb-laden, .gb-leise { color: var(--muted); }
.gb-leer { padding: 44px 20px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; }

/* Gesetze und Paragraphen */
.gb-buch { margin-bottom: 30px; }
.gb-buch-kopf { position: sticky; top: 76px; z-index: 3; padding: 12px 0 10px; border-bottom: 1px solid var(--line-soft); background: var(--bg); box-shadow: 0 10px 18px -12px rgba(0,0,0,.8); }
.gb-buch-kopf h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.02em; }
.gb-buch-kopf p { margin: 2px 0 0; font-size: .86rem; }
.gb-kuerzel { display: inline-block; padding: 1px 9px; border-radius: 7px; background: linear-gradient(118deg, rgba(242,5,125,.24), rgba(20,136,255,.22)); font-size: .9rem; }
.gb-para { margin-top: 10px; padding: 18px 20px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); transition: border-color .3s ease; }
.gb-para-bestimmung { background: #0c0c12; }
.gb-para-aufgehoben { opacity: .62; }
.gb-para-aufgehoben h3 { text-decoration: line-through; text-decoration-thickness: 1px; }
.gb-markiert { border-color: rgba(141,22,245,.75); box-shadow: 0 0 0 3px rgba(141,22,245,.18); }
.gb-para-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.gb-para-kopf h3 { margin: 0; font-size: 1.02rem; }
.gb-nr { color: #c8b5ff; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gb-para-marken { display: flex; gap: 6px; }
.gb-marke { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); font-size: .68rem; font-weight: 800; white-space: nowrap; }
.gb-marke-verbrechen { border-color: rgba(242,5,125,.55); color: #ffd1e8; }
.gb-marke-ordnungswidrigkeit { color: var(--muted); }
.gb-marke-aufgehoben { border-style: dashed; }
.gb-text { color: var(--text-2); font-size: .93rem; }
.gb-text p { margin: 8px 0 0; }
.gb-text ul { margin: 6px 0 0; padding-left: 22px; }
.gb-strafen { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.gb-strafen > div { padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: #12121a; }
.gb-strafen dt { color: var(--muted); font-size: .66rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.gb-strafen dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.gb-neben, .gb-hinweis { margin: 10px 0 0; color: var(--text-2); font-size: .86rem; }
.gb-para-fuss { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.gb-knopf { min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); font-size: .76rem; font-weight: 800; cursor: pointer; }
.gb-knopf:hover { border-color: #5b5b6b; background: rgba(255,255,255,.07); }
.gb-knopf-aktiv { border-color: transparent; background: linear-gradient(118deg,rgba(242,5,125,.32),rgba(20,136,255,.28)); }
.gb-knopf-leise { color: var(--muted); }
.gb-aenderungen { margin-top: 36px; padding: 20px 22px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); }
.gb-aenderungen h2 { margin: 0 0 10px; font-size: 1.05rem; }
.gb-aenderungen ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .88rem; }

/* Strafrechner */
.gb-rechner { position: sticky; top: 96px; }
.gb-rechner-innen { border: 1px solid rgba(141,22,245,.38); border-radius: 16px; background: #100f18; box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden; }
.gb-rechner-kopf { width: 100%; min-height: 54px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border: 0; background: linear-gradient(118deg,rgba(242,5,125,.14),rgba(20,136,255,.1)); font-size: .95rem; font-weight: 900; cursor: default; }
.gb-rechner-anzahl { margin-left: auto; color: var(--text-2); font-size: .76rem; font-weight: 800; }
.gb-rechner-koerper { padding: 14px 18px 18px; max-height: calc(100vh - 190px); overflow: auto; }
.gb-rechner-koerper > p { margin: 0; font-size: .84rem; }
.gb-rechner-liste { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gb-rechner-liste li { display: grid; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); font-size: .84rem; }
.gb-rl-steuer { display: flex; align-items: center; gap: 6px; }
.gb-rl-anzahl { min-width: 32px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.gb-mini { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); font-weight: 900; cursor: pointer; }
.gb-mini:disabled { opacity: .4; cursor: not-allowed; }
.gb-mini:last-child { margin-left: auto; }
.gb-summe { display: grid; gap: 10px; margin: 14px 0 0; }
.gb-summe dt { color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.gb-summe dd { margin: 0; font-size: 1.08rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.gb-summe small { display: block; color: var(--muted); font-size: .74rem; font-weight: 600; }
.gb-rechner-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.gb-toast { position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(520px, calc(100% - 32px)); padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: #15151f; box-shadow: 0 18px 50px rgba(0,0,0,.5); font-size: .88rem; }
.footer { border-top: 1px solid var(--line-soft); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 28px 0 34px; color: var(--muted); font-size: .8rem; }
.footer-inner a:hover { color: #fff; }

@media (max-width: 980px) {
  .gb-layout { grid-template-columns: minmax(0, 1fr); padding-bottom: 120px; }
  .gb-rechner { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; top: auto; }
  .gb-rechner-innen { border-radius: 16px 16px 0 0; border-bottom: 0; }
  .gb-rechner-kopf { cursor: pointer; }
  .gb-rechner-kopf::after { content: ""; width: 8px; height: 8px; margin: 3px 4px 0 14px; border-left: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease; }
  .gb-rechner-offen .gb-rechner-kopf::after { margin-top: -5px; transform: rotate(225deg); }
  .gb-rechner:not(.gb-rechner-offen) .gb-rechner-koerper { display: none; }
  .gb-rechner-koerper { max-height: 60vh; }
  .gb-toast { top: 88px; bottom: auto; }
}
@media (max-width: 760px) {
  .desktop-nav { display: none; }
  .header-inner { gap: 16px; }
  .desktop-nav + .header-actions { margin-left: auto; }
  .gb-para { padding: 16px; }
  .gb-buch-kopf { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
