:root {
    --bg-deep: #030305;
    --bg-card: rgba(22, 22, 26, 0.65);
    --bg-card-solid: #101014;
    --bg-elevated: rgba(34, 34, 40, 0.6);
    --primary: #5578a8;
    --primary-rgb: 85, 120, 168;
    --success: #10b981;
    --success-rgb: 16, 185, 129;
    --warning: #f59e0b;
    --warning-rgb: 245, 158, 11;
    --danger: #ef4444;
    --danger-rgb: 239, 68, 68;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.10);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-lift: 0 8px 28px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button, input, select, textarea { font-family: inherit; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg-deep);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

.ambient {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 0;
    background:
        radial-gradient(60rem 32rem at 50% -14rem,
            rgba(var(--primary-rgb), 0.16), transparent 70%);
}

.shell {
    position: relative; z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

.back-btn {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem; font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    transition: all 0.25s;
    margin-bottom: 28px;
}
.back-btn:hover {
    color: var(--text);
    background: var(--bg-elevated);
    transform: translateX(-4px);
}
.back-btn svg { width: 16px; height: 16px; }

.hero {
    text-align: center;
    margin-bottom: 48px;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(var(--primary-rgb), 0.10);
    color: var(--text-muted);
    font-size: 0.72rem; font-weight: 600;
    padding: 5px 13px;
    border-radius: 100px;
    border: 1px solid rgba(var(--primary-rgb), 0.22);
    margin-bottom: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.hero-badge svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--primary); }
.hero h1 {
    font-size: clamp(1.9rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.12;
    margin-bottom: 14px;
    text-wrap: balance;
}
.hero h1 span {
    color: var(--text);
    box-shadow: inset 0 -0.12em 0 rgba(var(--primary-rgb), 0.75);
}
.hero-sub {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.65;
    max-width: 34rem;
    margin: 0 auto 30px;
    text-wrap: pretty;
}
.hero-stats {
    display: flex; justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.hero-stat {
    text-align: center;
    padding: 0 22px;
    border-left: 1px solid var(--border);
}
.hero-stat:first-child { border-left: 0; }
.hero-stat-num {
    font-size: 1.35rem; font-weight: 600;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--text);
    line-height: 1.3;
}
.hero-stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.search-wrap {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 50;
}
.search-wrap > svg {
    position: absolute; left: 16px; top: 50%;
    transform: translateY(-50%);
    width: 20px; height: 20px;
    color: var(--text-dim);
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font);
    backdrop-filter: blur(12px);
    transition: all 0.3s;
    outline: none;
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus {
    border-color: rgba(var(--primary-rgb), 0.4);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.search-hint {
    position: absolute;
    top: calc(100% + 8px);
    left: 18px; right: 18px;
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.search-hint[hidden] { display: none; }
.search-hint button {
    background: none; border: 0; padding: 0;
    font: inherit; font-weight: 600;
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.cat-filters {
    display: flex; flex-wrap: wrap;
    justify-content: center; gap: 8px;
    margin-bottom: 36px;
}
.cat-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 15px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease,
                color 0.2s ease;
    user-select: none;
}
.cat-pill svg {
    width: 14px; height: 14px;
    flex-shrink: 0;
    opacity: 0.75;
}
.cat-pill:hover {
    border-color: var(--border-strong);
    background: var(--bg-elevated);
    color: var(--text);
}
.cat-pill:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.cat-pill.active {
    background: rgba(var(--primary-rgb), 0.16);
    border-color: rgba(var(--primary-rgb), 0.45);
    color: var(--text);
    font-weight: 600;
}
.cat-pill.active svg { opacity: 1; color: var(--primary); }

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}
.scenario-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.22s ease,
                box-shadow 0.22s ease;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
}
.scenario-card:hover,
.scenario-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: var(--shadow-lift);
}
.scenario-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.detail-permalink {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.detail-permalink:hover { color: var(--text); }
.scenario-link { color: inherit; outline: none; }
.scenario-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.scenario-card:has(.scenario-link:focus-visible) {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-color: rgba(var(--primary-rgb), 0.35);
}
.scenario-card-inner {
    padding: 20px 20px 18px;
}
.scenario-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.68rem; font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 11px;
}
.scenario-tag svg {
    width: 13px; height: 13px;
    flex-shrink: 0;
    color: var(--text-dim);
}

.scenario-title {
    font-size: 0.98rem; font-weight: 650;
    letter-spacing: -0.008em;
    margin-bottom: 7px;
    line-height: 1.35;
    text-wrap: pretty;
}
.scenario-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
    text-wrap: pretty;
}
.scenario-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 11px 20px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.18);
}
.scenario-law {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
    font-weight: 500;
}
.scenario-severity {
    display: inline-flex; align-items: center;
    flex-shrink: 0;
}
.severity-label {
    font-size: 0.68rem; font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.sev-no  .severity-label { color: var(--danger); }
.sev-mid .severity-label { color: var(--warning); }
.sev-ok  .severity-label { color: var(--success); }

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}
.no-results-icon {
    display: flex; justify-content: center;
    margin-bottom: 14px; color: var(--text-dim);
}
.no-results-icon svg { width: 34px; height: 34px; stroke-width: 1.5; }
.no-results h3 { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 8px; }

.detail-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}
.detail-overlay.active {
    display: flex;
    opacity: 1;
}
.detail-modal {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
    animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.detail-header {
    padding: 28px 28px 0;
    position: relative;
}
.detail-close {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.1rem;
}
.detail-close:hover {
    background: rgba(var(--danger-rgb), 0.15);
    color: var(--danger);
    border-color: rgba(var(--danger-rgb), 0.3);
}
.detail-category {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.7rem; font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 14px;
}
.detail-category svg { width: 14px; height: 14px; flex-shrink: 0; }
.detail-title {
    font-size: 1.4rem; font-weight: 800;
    line-height: 1.25;
    margin-bottom: 8px;
}
.detail-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.detail-body {
    padding: 0 28px 28px;
}

.verdict-box {
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid;
}
.verdict-box.nein {
    background: rgba(var(--danger-rgb), 0.08);
    border-color: rgba(var(--danger-rgb), 0.2);
}
.verdict-box.jein {
    background: rgba(var(--warning-rgb), 0.08);
    border-color: rgba(var(--warning-rgb), 0.2);
}
.verdict-box.ja {
    background: rgba(var(--success-rgb), 0.08);
    border-color: rgba(var(--success-rgb), 0.2);
}
.verdict-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.verdict-box.nein .verdict-label { color: var(--danger); }
.verdict-box.jein .verdict-label { color: var(--warning); }
.verdict-box.ja .verdict-label { color: var(--success); }
.verdict-text {
    font-size: 1.05rem; font-weight: 700;
    margin-bottom: 8px;
}
.verdict-box.nein .verdict-text { color: var(--danger); }
.verdict-box.jein .verdict-text { color: var(--warning); }
.verdict-box.ja .verdict-text { color: var(--success); }
.verdict-detail {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.law-ref {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
    display: flex; gap: 14px;
    align-items: flex-start;
}
.law-ref-icon {
    flex-shrink: 0;
    margin-top: 2px;
}
.law-ref-icon svg { display: block; width: 18px; height: 18px; color: var(--primary); }
.law-ref-content { flex: 1; }
.law-ref-title {
    font-size: 0.9rem; font-weight: 700;
    margin-bottom: 4px;
    color: var(--primary);
}
.law-ref-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.tips-section {
    margin-bottom: 24px;
}
.tips-title {
    font-size: 0.85rem; font-weight: 700;
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.tip-item {
    display: flex; gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.tip-item:last-child { border-bottom: none; }
.tip-num {
    flex-shrink: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
    font-family: var(--font-mono);
}

.email-section { margin-bottom: 10px; }
.email-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-rgb), 0.1));
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.25s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.email-btn:hover {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2), rgba(var(--secondary-rgb), 0.2));
    border-color: rgba(var(--primary-rgb), 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.2);
}
.email-output {
    margin-top: 16px;
    display: none;
}
.email-output.active { display: block; }
.email-output-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.email-output-title {
    font-size: 0.8rem; font-weight: 600;
    color: var(--text-muted);
}
.email-copy-btn {
    padding: 5px 12px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}
.email-copy-btn:hover {
    color: var(--success);
    border-color: rgba(var(--success-rgb), 0.3);
}
.email-text {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
    white-space: pre-wrap;
    font-family: var(--font);
    max-height: 300px;
    overflow-y: auto;
}

.disclaimer {
    text-align: center;
    padding: 32px 20px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}
.disclaimer p {
    font-size: 0.75rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}
.disclaimer a {
    color: var(--primary);
    text-decoration: underline;
}

.fade-in {
    animation: fadeIn 0.6s ease both;
}
.fade-in-d1 { animation-delay: 0.1s; }
.fade-in-d2 { animation-delay: 0.2s; }
.fade-in-d3 { animation-delay: 0.3s; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

@media (max-width: 680px) {
    .scenarios-grid {
        grid-template-columns: 1fr;
    }
    .hero h1 { font-size: 1.6rem; }
    .hero-stats { gap: 8px 20px; }
    .hero-stat { padding: 0; border-left: 0; }
    .detail-modal { max-height: 95vh; }
    .detail-header, .detail-body { padding-left: 20px; padding-right: 20px; }
    .detail-title { font-size: 1.2rem; }
    .cat-filters { gap: 6px; }
    .cat-pill { padding: 6px 14px; font-size: 0.78rem; }
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.rc-stand { margin-top: 10px !important; }

.fall-shell { max-width: 760px; }
.fall-pfad ol {
    list-style: none;
    display: flex; flex-wrap: wrap; gap: 6px;
    font-size: 0.75rem; color: var(--text-dim);
    margin-bottom: 8px;
}
.fall-pfad a { color: var(--text-dim); }
.fall-pfad a:hover { color: var(--text-muted); }
.fall-pfad [aria-current] { color: var(--text-muted); }
.fall-kopf { margin-bottom: 24px; }
.fall-titel {
    font-size: clamp(1.55rem, 4.2vw, 2.1rem);
    font-weight: 750;
    letter-spacing: -0.02em;
    line-height: 1.18;
    margin-bottom: 10px;
    text-wrap: balance;
}
.fall-sub {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 8px;
}
.fall-law {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}
.fall .verdict-box { margin-bottom: 32px; }
.fall .verdict-detail { font-size: 0.92rem; line-height: 1.75; }
.fall-block { margin-bottom: 32px; }
.fall-h2 {
    font-size: 1.05rem; font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}
.fall .law-ref { margin-bottom: 12px; }
.fall-tipps { list-style: none; }
.fall-tipps .tip-item { font-size: 0.9rem; }
.fall-mail {
    margin-bottom: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.fall-mail summary {
    cursor: pointer;
    padding: 14px 16px;
    font-size: 0.9rem; font-weight: 600;
    list-style-position: inside;
}
.fall-mail summary:hover { color: var(--primary); }
.fall-mail summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.fall-mail .email-output { margin: 0; padding: 0 16px 16px; }
.fall-mail .email-text { max-height: none; }
.fall-werbung {
    margin-bottom: 32px;
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    background: rgba(var(--primary-rgb), 0.06);
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.fall-werbung-titel { color: var(--text); font-weight: 650; margin-bottom: 4px; }
.fall-werbung-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.fall-werbung-links a {
    color: var(--text);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(var(--primary-rgb), 0.6);
    text-underline-offset: 3px;
}
.fall-werbung-links a:hover { text-decoration-color: var(--primary); }
.fall-mehr ul { list-style: none; display: grid; gap: 2px; }
.fall-mehr a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    color: var(--text-muted);
}
.fall-mehr a:hover { background: rgba(var(--primary-rgb), 0.08); color: var(--text); }
.fall-stand { margin-top: 10px !important; }
@media (max-width: 680px) {
    .fall-shell { padding-left: 16px; padding-right: 16px; }
    .fall .verdict-box { padding: 16px; }
}
