:root {
  --bg: #0f0f0f; --surface: #1a1a1a; --border: #2c2c2c; --text: #ececec; --muted: #9a9a9a;
  --accent: #22c55e; --accent-ink: #052e16; --link: #4ade80;
  --crit: #f85149; --high: #ff9b3d; --med: #e3b341; --low: #58a6ff;
  --radius: 10px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa; --surface: #fff; --border: #dcdcdc; --text: #171717; --muted: #5c5c5c;
    --accent: #15803d; --accent-ink: #fff; --link: #15803d;
    --crit: #b4231c; --high: #b85c00; --med: #8a6500; --low: #0a64a8;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
a { color: var(--link); }
code { font: 0.9em ui-monospace, Consolas, monospace; background: var(--surface); border: 1px solid var(--border); padding: 0 .3em; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }

.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.mark { display: block; width: 34px; height: 34px; border-radius: 9px; }
.wordmark { font: 700 1.3rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: -.03em; }
.wordmark .tld { color: var(--accent); }
.caret { display: inline-block; width: .5em; height: 1.05em; margin-left: 3px; vertical-align: -.15em; background: var(--accent); border-radius: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
nav .lang-switch { display: inline-flex; align-self: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-left: 4px; font: 600 .78rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .04em; }
nav .lang-switch > * { display: block; padding: 7px 9px; border: 0; border-radius: 0; }
nav .lang-switch a { color: var(--muted); }
nav .lang-switch a:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
nav .lang-switch .on { color: var(--text); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.banner { background: var(--med); color: #000; text-align: center; padding: 6px 16px; font-size: .9rem; }

main { padding: 0 0 64px; }
main > .wrap { padding-top: 40px; }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.15; margin: 0 0 16px; }
h2 { margin: 40px 0 12px; font-size: 1.4rem; }
h3 { margin: 0 0 6px; font-size: 1.1rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.hero { position: relative; isolation: isolate; padding: 72px 0 56px; border-bottom: 1px solid var(--border); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero.has-photo::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(15,15,15,.9) 0%, rgba(15,15,15,.6) 50%, rgba(15,15,15,.15) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 30%); }
.hero.has-photo { padding: clamp(72px, 14vw, 150px) 0 clamp(56px, 10vw, 110px); }
.hero.has-photo h1, .hero.has-photo .lead { color: #f3f3f3; }
.hero.has-photo .lead { color: #c9c9c9; }
.hero.has-photo .eyebrow { color: #4ade80; }
.hero.has-photo .btn.ghost { color: #f3f3f3; border-color: rgba(255,255,255,.35); }
@media (prefers-color-scheme: light) { .hero.has-photo::after { background: linear-gradient(90deg, rgba(15,15,15,.9) 0%, rgba(15,15,15,.6) 50%, rgba(15,15,15,.2) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 18%); } }
.photo { position: relative; margin: 24px 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.photo.wide { aspect-ratio: 21 / 8; }
.photo.dim img { filter: brightness(.7) saturate(.85); }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; margin: 56px 0 8px; }
.split .photo { margin: 0; aspect-ratio: 4 / 3; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } .photo.wide { aspect-ratio: 16 / 9; } }
.cta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 10px 20px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 1px solid var(--accent); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn:hover { filter: brightness(1.1); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 40px 0; }
.stats div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stats strong { display: block; font-size: 1.8rem; line-height: 1.1; }
.stats span { color: var(--muted); font-size: .875rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid.one { grid-template-columns: 1fr; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 6px 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 48px; }

.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.id { font: .85rem ui-monospace, Consolas, monospace; color: var(--muted); }
.badge { font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.sev-critical { color: var(--crit); border-color: var(--crit); }
.sev-high { color: var(--high); border-color: var(--high); }
.sev-medium { color: var(--med); border-color: var(--med); }
.sev-low { color: var(--low); border-color: var(--low); }
.st-fixed, .st-published { color: var(--accent); border-color: var(--accent); }
.st-reported, .st-coordinating { color: var(--muted); }
.badge.avail { color: var(--link); border-color: var(--link); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 16px 0; }
.facts div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.facts dt { color: var(--muted); font-size: .8rem; }
.facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.note { border-left: 3px solid var(--accent); background: var(--surface); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; }

.steps { list-style: none; counter-reset: s; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px 16px 60px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.steps p { margin: 0; }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 4px 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Modernisierung ---------- */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Header: sticky mit Glas-Effekt */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); }
nav a { border-radius: 8px; padding: 6px 10px; border-bottom: 0; transition: background .2s, color .2s; }
nav a:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
nav a[aria-current] { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }

/* Typografie */
h1 { letter-spacing: -.025em; }
h2 { letter-spacing: -.015em; }
.grad { background: linear-gradient(100deg, #86efac 0%, #22c55e 55%, #16a34a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow::before { content: ''; display: inline-block; width: 22px; height: 2px; background: currentColor; vertical-align: middle; margin-right: 10px; }

/* Buttons */
.btn { border-radius: 10px; transition: transform .15s ease, box-shadow .2s ease, filter .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px var(--accent); filter: none; }
.btn.ghost:hover { box-shadow: none; background: color-mix(in srgb, var(--text) 8%, transparent); }

/* Kennzahlen */
.stats strong { font: 700 2.2rem/1.1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: -.04em; color: var(--accent); }
.stats div { background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--surface) 80%, var(--accent) 6%)); }

/* Karten */
.card { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; position: relative; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .6); }

/* Filter */
.filters { display: grid; gap: 12px; margin: 24px 0 20px; }
.filters input[type="search"] { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 12px 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9a9a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; background-size: 18px; }
.filters input[type="search"]:focus-visible { outline: 2px solid var(--accent); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .875rem; color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; cursor: pointer; transition: all .15s; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* Zeitstrahl */
.track { list-style: none; margin: 20px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.track li { position: relative; display: flex; flex-direction: column; gap: 2px; padding-top: 28px; }
.track li::before { content: ''; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: var(--border); }
.track li.done::before { background: var(--accent); }
.track li:last-child::before { display: none; }
.track .dot { position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); z-index: 1; }
.track .done .dot { background: var(--accent); border-color: var(--accent); }
.track .next .dot { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
@media (max-width: 560px) {
  .track { grid-template-columns: 1fr; gap: 14px; }
  .track li { padding: 0 0 0 34px; }
  .track li::before { top: 20px; bottom: -14px; left: 9px; right: auto; width: 2px; height: auto; }
  .track li:last-child::before { display: none; }
}

/* Kontaktbereich vor dem Footer */
.cta-band { border-top: 1px solid var(--border); background: radial-gradient(900px 260px at 85% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%), var(--surface); }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; padding-top: 44px; padding-bottom: 44px; }
.cta-band h2 { margin: 0 0 4px; }
.cta-band p { margin: 0; color: var(--muted); }

/* Hero: weicher Übergang und mehr Tiefe */
.hero.has-photo .hero-inner { max-width: 960px; }
.hero h1 { font-size: clamp(2.2rem, 6.2vw, 3.8rem); }

/* Einblenden (nur aktiv, wenn app.js läuft) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease, border-color .2s, box-shadow .2s; }
.reveal.in { opacity: 1; transform: none; }
.card.reveal.in:hover { transform: translateY(-3px); }

/* ---------- Register-Ansicht für Findings ---------- */
.ledger { border-top: 1px solid var(--border); margin-top: 8px; }
.row { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto 28px; gap: 6px 24px; align-items: center; padding: 22px 12px; border-bottom: 1px solid var(--border); transition: background .25s ease; }
.row:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%); }
.row .id { font: 600 .85rem ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--muted); letter-spacing: .02em; }
.row h3 { margin: 0 0 4px; font-size: 1.08rem; letter-spacing: -.01em; }
.row h3 a { color: var(--text); text-decoration: none; }
.row h3 a::after { content: ''; position: absolute; inset: 0; }
.row .main p { margin: 0; color: var(--muted); font-size: .92rem; max-width: 70ch; }
.row .main .tags { margin-top: 6px; font-size: .8rem; color: var(--muted); opacity: .8; }
.row-meta { display: flex; align-items: center; gap: 22px; white-space: nowrap; }
.row .go { color: var(--muted); font-size: 1.2rem; transition: transform .25s ease, color .25s; justify-self: end; }
.row:hover .go { transform: translateX(6px); color: var(--accent); }
.row:hover h3 a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* Schweregrad als 4-stufige Skala */
.meter { display: inline-flex; align-items: center; gap: 3px; min-width: 110px; }
.meter i { width: 6px; height: 18px; border-radius: 2px; background: color-mix(in srgb, var(--muted) 35%, transparent); transform-origin: bottom; }
.meter b { margin-left: 8px; font-size: .8rem; font-weight: 600; color: var(--text); }
.m-low i:nth-child(-n+1) { background: var(--low); }
.m-medium i:nth-child(-n+2) { background: var(--med); }
.m-high i:nth-child(-n+3) { background: var(--high); }
.m-critical i:nth-child(-n+4) { background: var(--crit); }
.meter i:nth-child(2) { height: 22px; } .meter i:nth-child(3) { height: 26px; } .meter i:nth-child(4) { height: 30px; }
.meter { align-items: flex-end; } .meter b { align-self: center; }

/* Status als Punkt */
.stat { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); min-width: 130px; }
.stat .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.stat[data-status="coordinating"] .dot { background: var(--med); box-shadow: 0 0 0 3px color-mix(in srgb, var(--med) 25%, transparent); }
.stat[data-status="reported"] .dot { background: var(--low); }
.stat[data-status="fixed"] .dot, .stat[data-status="published"] .dot { background: var(--accent); }
.row .date { font: .82rem ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--muted); min-width: 84px; }
.more { margin-top: 18px; }

@media (max-width: 820px) {
  .row { grid-template-columns: minmax(0, 1fr) 28px; padding: 20px 4px; }
  .row .id { grid-column: 1; }
  .row .go { grid-column: 2; grid-row: 1; }
  .row .main, .row-meta { grid-column: 1 / -1; }
  .row-meta { flex-wrap: wrap; gap: 8px 18px; }
  .meter, .stat { min-width: 0; }
}

/* Zusammenarbeit: nummerierte Spalten statt Kästen */
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin: 40px 0 8px; }
.panel { border-top: 1px solid var(--border); padding-top: 18px; position: relative; transition: border-color .25s; }
.panel::before { content: ''; position: absolute; top: -1px; left: 0; width: 0; height: 2px; background: var(--accent); transition: width .35s ease; }
.panel:hover::before { width: 100%; }
.panel .num { display: block; font: 700 2.4rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: -.05em; color: color-mix(in srgb, var(--accent) 55%, transparent); margin-bottom: 14px; }
.panel h3 { font-size: 1.15rem; }
.panel p { color: var(--muted); margin: 8px 0 0; }

/* Feinschliff Register: Meta-Spalte gestapelt, Titel bekommt Platz */
.row { align-items: start; }
.row .id { padding-top: .35em; }
.row .go { align-self: center; }
.row-meta { flex-direction: column; align-items: flex-start; gap: 10px; min-width: 150px; }
.row-meta .meter { min-width: 0; }
.row-meta .stat { min-width: 0; }
.row-meta .date { min-width: 0; }
@media (max-width: 820px) {
  .row-meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 18px; min-width: 0; }
  .row { align-items: center; }
}
