/* ==========================================================================
   cad-agents.de — Design System
   Technisch-nüchtern: Stahlblau-Akzent auf kühlem Grau, Anthrazit-Footer.
   Struktur an holistech_ai_website angelehnt, eigenes Farbschema.
   ========================================================================== */

:root {
    --color-bg-primary: #eef1f5;
    --color-bg-alt: #e5e9f0;
    --color-bg-card: #e2e7ef;
    --color-bg-footer: #0f1620;
    --color-text-primary: #131a22;
    --color-text-secondary: #47535f;
    --color-accent-primary: #1c5f96;
    --color-accent-strong: #12466f;
    --color-btn-primary-bg: #131a22;
    --color-btn-primary-text: #ffffff;
    --color-border: #ccd4de;
    --color-white: #ffffff;

    --color-pass: #1f7a4d;
    --color-pass-bg: #d5eadd;
    --color-fail: #9a4b2a;
    --color-fail-bg: #f0e0d3;
    --color-anchor: #7a5b12;
    --color-anchor-bg: #f2e9c9;

    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', ui-monospace, monospace;

    --max-width: 1120px;
    --nav-height: 72px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 999px;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 1rem);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-stack);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

a { color: var(--color-accent-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; color: var(--color-text-primary); }
h1 { font-size: 2.6rem; letter-spacing: -0.03em; }
h2 { font-size: 1.9rem; letter-spacing: -0.02em; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

p { color: var(--color-text-secondary); }

code, .mono { font-family: var(--font-mono); }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.container-narrow { max-width: 780px; }
.section { padding: var(--space-xl) 0; }
.section-alt { background-color: var(--color-bg-alt); }
.section-tight { padding: var(--space-md) 0; }

/* --- Campaign Banner (Pflicht auf jeder Seite) --- */
.campaign-banner {
    background-color: var(--color-accent-strong);
    color: #eaf3fb;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem var(--space-md);
    line-height: 1.4;
}
.campaign-banner strong { color: #ffffff; }

/* --- Navigation --- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-bg-primary);
    border-bottom: 1px solid var(--color-border);
    height: var(--nav-height);
}
/* `gap` zusaetzlich zu space-between: gemessen beruehrten sich Wortmarke und erste Verlinkung bei
   1048 px Viewport auf 0 px Abstand — space-between allein garantiert keinen Mindestabstand, es
   verteilt nur den UEBRIGEN Platz, und bei vollem Balken ist der null. */
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: var(--space-md); }
.nav-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    /* Die Wortmarke darf NICHT umbrechen: als Flex-Kind schrumpft sie sonst und wird am
       Bindestrich getrennt („CAD-" / „Agents") — eine zweizeilige Wortmarke in der Kopfzeile.
       flex-shrink:0, damit die Nav-Links den Platz hergeben, nicht der Name. */
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo img { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: var(--space-md); }
.nav-links a { font-size: 0.9rem; color: var(--color-text-secondary); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--color-text-primary); text-decoration: none; }
.nav-contact-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background-color: var(--color-btn-primary-bg);
    color: var(--color-btn-primary-text) !important;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    transition: opacity 0.2s;
}
.nav-contact-btn:hover { opacity: 0.85; text-decoration: none !important; }

.nav-lang {
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--color-border, #ccd4de);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

/* Hamburger */
.nav-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background-color: var(--color-text-primary); transition: transform 0.3s, opacity 0.3s; }
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 500;
    transition: opacity 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background-color: var(--color-btn-primary-bg); color: var(--color-btn-primary-text); }
.btn-primary:hover { opacity: 0.85; }
.btn-secondary { background-color: var(--color-bg-card); color: var(--color-text-primary); }
.btn-secondary:hover { background-color: var(--color-border); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-arrow::after { content: '\2192'; margin-left: 0.25rem; }

/* --- Hero --- */
.hero { padding: var(--space-2xl) 0 var(--space-xl); text-align: center; }
.hero h1 { max-width: 860px; margin: 0 auto var(--space-md); }
.hero .subtitle { font-size: 1.15rem; color: var(--color-text-secondary); max-width: 680px; margin: 0 auto var(--space-lg); line-height: 1.6; }
.hero-compact { padding: var(--space-lg) 0 0; text-align: left; }
.hero-compact h1 { margin: 0 0 var(--space-xs); }
.hero-compact .subtitle { margin: 0 0 var(--space-sm); text-align: left; max-width: 760px; }

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-primary);
    margin-bottom: var(--space-xs);
}

/* --- Nav Dropdown --- */
.nav-item { position: relative; }
.nav-item > a { display: inline-flex; align-items: center; }
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    padding: 0.5rem 0;
    z-index: 200;
}
.nav-item.has-dropdown::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 8px; display: none; }
.nav-item.has-dropdown:hover::after { display: block; }
.nav-item.has-dropdown:hover .nav-dropdown { display: block; }
.nav-dropdown a { display: block; padding: 0.4rem 1rem; font-size: 0.85rem; color: var(--color-text-secondary); white-space: nowrap; transition: color 0.15s, background-color 0.15s; }
.nav-dropdown a:hover { color: var(--color-text-primary); background-color: var(--color-bg-card); text-decoration: none; }

/* --- Cards --- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
    background-color: var(--color-bg-card);
    border-radius: var(--radius);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}
.card-bordered { border-color: var(--color-border); background-color: var(--color-white); }
.card-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent-primary); margin-bottom: var(--space-sm); }
.card h3 { margin-bottom: var(--space-sm); }
.card p { flex: 1; margin-bottom: var(--space-md); font-size: 0.95rem; }
.card .btn { align-self: flex-start; }
.card p:last-child { margin-bottom: 0; }

/* Value Props */
.value-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.value-item { padding: var(--space-lg); background-color: var(--color-bg-card); border-radius: var(--radius); }
.value-item h3 { margin-bottom: var(--space-xs); }
.value-item p { font-size: 0.95rem; }

/* Stat tiles */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
.stat-tile { background-color: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-md); text-align: center; }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--color-accent-strong); font-family: var(--font-mono); letter-spacing: -0.02em; }
.stat-label { font-size: 0.82rem; color: var(--color-text-secondary); margin-top: 0.25rem; }

/* --- CTA --- */
.cta-section { text-align: center; padding: var(--space-2xl) 0; }
.cta-section h2 { margin-bottom: var(--space-sm); }
.cta-section p { margin-bottom: var(--space-lg); font-size: 1.05rem; }

/* --- Prose blocks --- */
.prose h2 { margin-top: var(--space-lg); margin-bottom: var(--space-sm); }
.prose h3 { margin-top: var(--space-md); margin-bottom: var(--space-xs); }
.prose p { margin-bottom: var(--space-sm); }
.prose ul, .prose ol { margin: 0 0 var(--space-sm) 1.5rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.35rem; color: var(--color-text-secondary); }
.prose code { background-color: var(--color-bg-card); padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.88em; }
.prose strong { color: var(--color-text-primary); }

/* --- Feature / Result Lists --- */
.feature-list li, .result-list li { padding: 0.4rem 0; padding-left: 1.6rem; position: relative; color: var(--color-text-secondary); }
.feature-list li::before { content: '\2022'; position: absolute; left: 0.35rem; color: var(--color-accent-primary); font-weight: 700; font-size: 1.2em; }
.result-list li::before { content: '\2714'; position: absolute; left: 0; color: var(--color-accent-primary); }

/* --- Steps --- */
.steps { counter-reset: step; }
.step { display: flex; gap: var(--space-md); padding: var(--space-md) 0; border-bottom: 1px solid var(--color-border); }
.step:last-child { border-bottom: none; }
.step::before {
    counter-increment: step;
    content: counter(step);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background-color: var(--color-accent-primary);
    color: var(--color-white);
    border-radius: 50%;
    font-weight: 700;
}
.step-content h3 { margin-bottom: 0.25rem; }
.step-content p { font-size: 0.95rem; }

/* --- Tables (generic + data) --- */
.table-wrap { overflow-x: auto; margin-bottom: var(--space-md); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data-table th, table.data-table td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
table.data-table th { font-weight: 600; color: var(--color-text-primary); background-color: var(--color-bg-alt); position: sticky; top: 0; }
table.data-table td { color: var(--color-text-secondary); }
table.data-table td.num, table.data-table th.num { text-align: right; font-family: var(--font-mono); }
table.data-table tr:hover td { background-color: var(--color-bg-alt); }
table.data-table caption { text-align: left; font-size: 0.82rem; color: var(--color-text-secondary); margin-bottom: 0.5rem; }

/* Score cell coloring */
.cell-pass { color: var(--color-pass); font-weight: 600; }
.cell-fail { color: var(--color-fail); }
.cell-na { color: var(--color-text-secondary); opacity: 0.6; }

/* Rang / Sortierung / Ablieferung (Aggregat-Tabelle) */
.rank-cell { font-weight: 700; color: var(--color-text-secondary); white-space: nowrap; }
table.data-table tr.row-top td { background-color: #eaf1e6; }
table.data-table tr.row-top td:first-child { box-shadow: inset 3px 0 0 var(--color-pass); }
table.data-table tr.row-top:hover td { background-color: #e2ecdc; }
.cell-sortactive { background-color: rgba(28, 95, 150, 0.06); }
th.sort-th { user-select: none; }
th.sort-th.sort-active { color: var(--color-accent-strong); text-decoration-color: var(--color-accent-strong); }
th.sort-th.sort-active::after { content: ' ▾'; font-size: 0.8em; }
.delivery-warn { color: var(--color-fail); font-weight: 600; cursor: help; white-space: nowrap; }

/* --- Badges --- */
.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: var(--radius-pill); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; }
.badge-pass { background: var(--color-pass-bg); color: var(--color-pass); }
.badge-fail { background: var(--color-fail-bg); color: var(--color-fail); }
.badge-anchor { background: var(--color-anchor-bg); color: var(--color-anchor); }
.badge-neutral { background: var(--color-bg-card); color: var(--color-text-secondary); }

/* --- Inline bar chart (kein externes Lib) --- */
.bar-chart { display: flex; flex-direction: column; gap: 0.5rem; margin: var(--space-sm) 0 var(--space-md); }
.bar-row { display: grid; grid-template-columns: 190px 1fr 56px; align-items: center; gap: 0.75rem; font-size: 0.85rem; }
.bar-row .bar-label { color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background-color: var(--color-bg-card); border-radius: var(--radius-pill); height: 16px; overflow: hidden; position: relative; }
.bar-fill { display: block; height: 100%; border-radius: var(--radius-pill); background-color: var(--color-accent-primary); transition: width 0.4s ease; }
.bar-fill.is-pass { background-color: var(--color-pass); }
.bar-fill.is-fail { background-color: #b98a5a; }
.bar-row .bar-value { text-align: right; font-family: var(--font-mono); color: var(--color-text-primary); font-weight: 600; }
.bar-threshold { position: absolute; top: -2px; bottom: -2px; width: 2px; background-color: var(--color-accent-strong); opacity: 0.55; }

/* --- Dimension definition cards --- */
.dim-card { background-color: var(--color-white); border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent-primary); border-radius: var(--radius-sm); padding: var(--space-md); margin-bottom: var(--space-md); }
.dim-card .dim-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.35rem; }
.dim-card h3 { font-size: 1.15rem; }
.dim-card .dim-thresh { font-family: var(--font-mono); font-size: 0.82rem; color: var(--color-accent-strong); background: var(--color-bg-alt); padding: 0.1rem 0.5rem; border-radius: 4px; }
.dim-card p { font-size: 0.92rem; margin-bottom: 0; }

/* --- Case comparison (Ergebnisse) --- */
.case-card { border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: var(--space-md); overflow: hidden; background-color: var(--color-white); }
.case-summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); cursor: pointer; background-color: var(--color-bg-card); flex-wrap: wrap; }
.case-summary:hover { background-color: var(--color-bg-alt); }
.case-summary .case-id { font-weight: 700; font-family: var(--font-mono); }
.case-summary .case-meta { font-size: 0.82rem; color: var(--color-text-secondary); }
.case-toggle { font-size: 0.8rem; color: var(--color-accent-primary); }
.case-body { display: none; padding: var(--space-md); }
.case-card.open .case-body { display: block; }
.case-card.open .case-toggle::after { content: ' \25B4'; }
.case-toggle::after { content: ' \25BE'; }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); align-items: start; }
.compare-col h4 { font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

/* Video embed (two-click) */
.video-embed { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; background-color: #0f1620; aspect-ratio: 16 / 9; }
.video-embed img { width: 100%; height: 100%; object-fit: cover; }
.video-embed-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-sm); background: rgba(15, 22, 32, 0.66); cursor: pointer; transition: background 0.2s; text-align: center; padding: var(--space-md); }
.video-embed-overlay:hover { background: rgba(15, 22, 32, 0.55); }
.video-embed-play { width: 60px; height: 60px; border-radius: 50%; background-color: var(--color-accent-primary); border: none; display: flex; align-items: center; justify-content: center; }
.video-embed-play svg { width: 24px; height: 24px; fill: var(--color-white); margin-left: 3px; }
.video-embed-notice { font-size: 0.78rem; color: #c5d2df; max-width: 420px; line-height: 1.5; }
.video-embed-notice a { color: #eaf3fb; text-decoration: underline; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.video-empty { display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--space-md); background-color: #0f1620; color: #9fb0c2; border-radius: var(--radius); aspect-ratio: 16 / 9; font-size: 0.85rem; }

/* Render slots (9 Modelle → auto-fill) */
.render-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-sm); }
.render-figure { border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; background-color: var(--color-bg-alt); display: flex; flex-direction: column; }
.render-figure img { width: 100%; height: auto; background-color: #fff; }
.render-placeholder { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: var(--color-text-secondary); font-size: 0.8rem; text-align: center; padding: var(--space-sm); background: repeating-linear-gradient(45deg, #dfe4ec, #dfe4ec 10px, #e7ebf2 10px, #e7ebf2 20px); }
.render-figure figcaption { padding: 0.5rem 0.6rem; font-size: 0.72rem; color: var(--color-text-secondary); line-height: 1.35; }
.render-figure figcaption .render-model { font-weight: 700; color: var(--color-text-primary); font-family: var(--font-mono); }
.render-disclaimer { font-size: 0.7rem; color: var(--color-fail); font-style: italic; display: block; margin-top: 0.2rem; }
.render-metrics { font-family: var(--font-mono); font-size: 0.7rem; color: var(--color-text-secondary); display: block; margin-top: 0.2rem; }

/* --- Tooltip-Hinweis an Tabellenköpfen/Chart-Titeln --- */
.has-tip { cursor: help; }
th.has-tip { text-decoration: underline dotted var(--color-border); text-underline-offset: 3px; }
.chart-sub { font-size: 0.8rem; color: var(--color-text-secondary); margin: -0.15rem 0 0.4rem; }

/* --- Galerie „Beste Rekonstruktionen" (Startseite) --- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.gallery-tile { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; background-color: var(--color-white); transition: transform 0.15s, box-shadow 0.15s; text-decoration: none; }
.gallery-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(15, 22, 32, 0.12); text-decoration: none; }
.gallery-thumb { position: relative; background-color: #fff; }
.gallery-thumb img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background-color: #fff; }
.gallery-badge { position: absolute; top: 8px; right: 8px; background: var(--color-pass); color: #fff; font-size: 0.72rem; font-weight: 700; font-family: var(--font-mono); padding: 0.1rem 0.5rem; border-radius: var(--radius-pill); }
.gallery-cap { padding: 0.6rem 0.8rem 0.8rem; }
.gallery-cap .g-case { font-family: var(--font-mono); font-weight: 700; color: var(--color-text-primary); font-size: 0.95rem; }
.gallery-cap .g-model { font-size: 0.82rem; color: var(--color-text-secondary); display: block; margin-top: 0.1rem; }
.gallery-cap .g-disclaimer { font-size: 0.7rem; color: var(--color-fail); font-style: italic; display: block; margin-top: 0.35rem; line-height: 1.35; }
.gallery-cap .g-link { font-size: 0.78rem; display: inline-block; margin-top: 0.4rem; }

/* --- Live-3D-Viewer --- */
.viewer-card { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; background-color: var(--color-white); }
.viewer-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; background-color: #f3f5f9; overflow: hidden; }
.viewer-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background-color: #fff; }
.viewer-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.viewer-card.viewer-ready .viewer-poster { opacity: 0; transition: opacity 0.3s; }
.viewer-play {
    position: absolute; inset: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
    background: rgba(15, 22, 32, 0.28); border: none; color: #fff; cursor: pointer;
    font-family: var(--font-stack); font-size: 0.9rem; font-weight: 600; transition: background 0.2s;
}
.viewer-play:hover { background: rgba(15, 22, 32, 0.42); }
.viewer-play-icon { font-size: 2rem; line-height: 1; color: #eaf3fb; }
.viewer-play-label { background: var(--color-accent-primary); padding: 0.25rem 0.8rem; border-radius: var(--radius-pill); }
.viewer-card.viewer-live .viewer-play { display: none; }

/* Werkzeuge oben rechts (Maximieren immer, Schließen nur live) */
.viewer-tools { position: absolute; top: 6px; right: 6px; z-index: 4; display: flex; gap: 6px; }
.viewer-tools button { width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(15, 22, 32, 0.55); color: #fff; font-size: 0.95rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.viewer-tools button:hover { background: rgba(15, 22, 32, 0.78); }
.viewer-close { display: none; }
.viewer-card.viewer-live .viewer-close { display: flex; }
.viewer-loading { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 0.75rem; color: var(--color-text-secondary); font-family: var(--font-mono); z-index: 2; }

/* Vollbild-Overlay */
body.viewer-noscroll { overflow: hidden; }
.viewer-overlay { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; }
.viewer-overlay[hidden] { display: none; }
.viewer-overlay-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 20, 0.82); }
.viewer-overlay-dialog { position: relative; width: 95vw; height: 95vh; background: var(--color-white); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 12px 48px rgba(0,0,0,0.5); }
.viewer-overlay-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: 0.6rem var(--space-md); border-bottom: 1px solid var(--color-border); background: var(--color-bg-alt); }
.voh-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; min-width: 0; }
.voh-case { font-family: var(--font-mono); font-weight: 700; color: var(--color-text-primary); }
.voh-model { font-size: 0.9rem; color: var(--color-text-secondary); }
.voh-metric { font-family: var(--font-mono); font-size: 0.82rem; color: var(--color-accent-strong); background: var(--color-white); padding: 0.1rem 0.5rem; border-radius: 4px; }
.viewer-overlay-close { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--color-btn-primary-bg); color: #fff; font-size: 1rem; cursor: pointer; }
.viewer-overlay-close:hover { opacity: 0.85; }
.viewer-overlay .overlay-card { flex: 1; min-height: 0; border: none; border-radius: 0; background: #f3f5f9; }
.viewer-overlay .overlay-card .viewer-stage { width: 100%; height: 100%; aspect-ratio: auto; }

/* Hinweis-Kasten (eine Disclaimer-Nennung pro Seite) */
.disclaimer-note { border-left: 4px solid var(--color-fail); background-color: var(--color-fail-bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: var(--space-sm) var(--space-md); margin: 0 0 var(--space-md); font-size: 0.9rem; color: #6b3a20; }

/* Hinweis-Kasten (eine Disclaimer-Nennung pro Seite) */
.disclaimer-note { border-left: 4px solid var(--color-fail); background-color: var(--color-fail-bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: var(--space-sm) var(--space-md); margin: 0 0 var(--space-md); font-size: 0.9rem; color: #6b3a20; }

/* --- Fall-Vergleich (Ergebnisse): Video oben, Modell-Zellen im 3er-Grid --- */
.case-video { max-width: 720px; margin-bottom: var(--space-md); }
.case-video h4, .cell-grid-head { font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.cell-grid-head { margin-top: var(--space-sm); }
.cell-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); }
.render-cell { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; background-color: var(--color-white); }
.render-cell .cell-cap { padding: 0.5rem 0.6rem; font-size: 0.72rem; line-height: 1.35; }
.cell-cap .cell-model { font-weight: 700; color: var(--color-text-primary); font-family: var(--font-mono); display: block; }
.cell-cap .cell-metrics { font-family: var(--font-mono); font-size: 0.7rem; color: var(--color-text-secondary); display: block; margin-top: 0.2rem; }
.cell-cap .cell-status { display: block; margin-top: 0.35rem; }
.render-missing { opacity: 0.85; }
.render-missing .cell-missing-body { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 0.78rem; color: var(--color-text-secondary); padding: var(--space-sm); background: repeating-linear-gradient(45deg, #eef0f4, #eef0f4 10px, #f5f6f9 10px, #f5f6f9 20px); }

/* --- Callout --- */
.callout { border-left: 4px solid var(--color-accent-primary); padding: var(--space-md) var(--space-md) var(--space-md) var(--space-lg); background-color: var(--color-bg-card); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: var(--space-md) 0; }
.callout p { margin-bottom: 0.5rem; }
.callout p:last-child { margin-bottom: 0; }
.callout.callout-warn { border-color: var(--color-fail); background-color: var(--color-fail-bg); }
.callout.callout-warn p { color: #6b3a20; }

.fingerprint { font-family: var(--font-mono); font-size: 0.82rem; background-color: var(--color-bg-alt); padding: 0.1rem 0.45rem; border-radius: 4px; color: var(--color-accent-strong); }

/* --- FAQ --- */
.faq-item { border-bottom: 1px solid var(--color-border); padding: var(--space-md) 0; }
.faq-item h3 { margin-bottom: 0.4rem; font-size: 1.1rem; }
.faq-item p { margin-bottom: 0.5rem; }
.faq-item p:last-child { margin-bottom: 0; }

/* --- Legal --- */
.legal-content { max-width: 760px; }
.legal-content h1 { margin-bottom: var(--space-lg); }
.legal-content h2 { font-size: 1.3rem; margin-top: var(--space-lg); margin-bottom: var(--space-sm); }
.legal-content p { margin-bottom: var(--space-sm); }
.legal-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: var(--space-sm); }
.legal-content li { color: var(--color-text-secondary); margin-bottom: 0.25rem; }

/* --- Footer --- */
.footer { background-color: var(--color-bg-footer); color: #c5d2df; padding: var(--space-xl) 0 var(--space-md); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: var(--space-xl); margin-bottom: var(--space-xl); }
.footer-mission p { font-size: 0.92rem; line-height: 1.6; color: #90a1b3; }
.footer .nav-logo { color: #eaf3fb; }
.footer-col h4 { color: #eaf3fb; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-sm); }
.footer-col a { display: block; color: #90a1b3; font-size: 0.9rem; padding: 0.2rem 0; }
.footer-col a:hover { color: #eaf3fb; text-decoration: none; }
.footer-bottom { border-top: 1px solid #26313d; padding-top: var(--space-md); font-size: 0.8rem; color: #6b7d90; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.footer-bottom a { color: #6b7d90; }
.footer-bottom a:hover { color: #90a1b3; }

/* --- Scroll Reveal --- */
.fade-in-up { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* --- Loading / Error --- */
.loading { text-align: center; padding: var(--space-lg); color: var(--color-text-secondary); }
.error-msg { text-align: center; padding: var(--space-lg); color: var(--color-fail); background: var(--color-fail-bg); border-radius: var(--radius-sm); }

/* ==========================================================================
   Responsive
   ========================================================================== */
/* Die Desktop-Nav laeuft bis zum Mobil-Umbruch (768 px) durch und wird davor eng: bei 1048 px
   Viewport stand die erste Verlinkung gemessen direkt an der Wortmarke. Ab hier geben die LINKS
   den Platz her — der Name bleibt einzeilig und ungekuerzt. */
@media (max-width: 1150px) {
    .nav-links { gap: 0.85rem; }
    .nav-links a { font-size: 0.82rem; }
}

@media (max-width: 1024px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.65rem; }
    .card-grid, .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .cell-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-mission { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.45rem; }
    .section { padding: var(--space-lg) 0; }
    .hero { padding: var(--space-lg) 0 var(--space-md); }

    .nav-hamburger { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0; right: 0;
        background-color: var(--color-bg-primary);
        flex-direction: column;
        padding: var(--space-md);
        border-bottom: 1px solid var(--color-border);
        gap: var(--space-sm);
    }
    .nav-links.open { display: flex; }
    .nav-links a { font-size: 1rem; padding: 0.5rem 0; }
    .nav-item { width: 100%; }
    .nav-item > a { display: flex; justify-content: space-between; align-items: center; width: 100%; }
    .nav-item.has-dropdown > a::after { content: '\25BE'; font-size: 0.7rem; margin-left: 0.5rem; transition: transform 0.2s; }
    .nav-item.has-dropdown.open > a::after { transform: rotate(180deg); }
    .nav-dropdown { position: static; transform: none; min-width: 0; border: none; box-shadow: none; border-radius: 0; background: transparent; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0; }
    .nav-item.has-dropdown.open .nav-dropdown { display: block; max-height: 600px; padding: 0.25rem 0; }
    .nav-dropdown a { padding: 0.35rem 0 0.35rem 1.25rem; white-space: normal; }

    .card-grid, .card-grid-2, .card-grid-4 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .value-grid { grid-template-columns: 1fr; }
    .compare-grid { grid-template-columns: 1fr; }
    .cell-grid { grid-template-columns: 1fr 1fr; }
    .render-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
    .footer-bottom { flex-direction: column; text-align: center; }
    .step { flex-direction: column; gap: var(--space-sm); }
    .bar-row { grid-template-columns: 120px 1fr 48px; font-size: 0.78rem; }
}

/* --- Workflow-Diagramme (SVG-Schaubilder) --- */
.diagram { margin: var(--space-md) auto var(--space-lg); max-width: 980px; }
.diagram img { display: block; width: 100%; height: auto; }
.diagram figcaption { margin-top: var(--space-xs); font-size: 0.88rem; color: var(--color-text-secondary); text-align: center; }

/* Rang-Hervorhebung Platz 1 (Aggregat-Tabelle) */
.rank-top { display: inline-block; min-width: 1.6em; padding: 0.05em 0.35em; border-radius: 4px; background: var(--color-accent-strong); color: #ffffff; font-weight: 600; }

/* Technische Zeichnung als Vorlage im Fallvergleich (eigener Demo-Fall) */
.drawing-embed { display: block; max-width: 760px; margin: 0 auto; }
.drawing-embed img { display: block; width: 100%; height: auto; background: #ffffff; border: 1px solid var(--color-border); border-radius: 8px; }
