/* aegisgrid.de – Stylesheet. Keine externen Ressourcen. Farben aus dem Logo (Cyan, Blau, Petrol, Navy),
   WCAG 2.2 AA (hell und dunkel) geprüft. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Erweitertes Latein (u. a. č, ć, š, ž, đ für Kroatisch); lädt nur, wenn eine Seite solche Zeichen enthält. */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --surface: #f3f8fb;
  --surface-2: #eaf2f7;
  --card: #ffffff;
  --text: #0c2333;
  --muted: #46596a;
  --border: #d6e2ea;
  --primary: #0369a1;
  --primary-hover: #075985;
  --on-primary: #ffffff;
  --link: #0369a1;
  --accent: #0f766e;
  --accent-soft: #e0f5f3;
  --primary-soft: #e0f2fe;
  --error: #b42318;
  --error-soft: #fdecea;
  --ok: #0f766e;
  --navy: #08202e;
  --navy-2: #0c3852;
  --on-navy: #ffffff;
  --on-navy-muted: #b4c9d6;
  --on-navy-accent: #38bdf8;
  --shadow: 0 1px 2px rgba(12, 35, 51, .06), 0 8px 24px rgba(12, 35, 51, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  /* Partnerstufen: Kante der Karte (Grafik, mind. 3:1 zum Hintergrund) und Verlauf der Plakette */
  --tier-bronze: #a0602c;
  --tier-silber: #8a9099;
  --tier-gold: #b8860b;
  --tier-platin: #4f7397;
  --tier-bronze-a: #e0a46d; --tier-bronze-b: #8a4f22;
  --tier-silber-a: #f4f5f6; --tier-silber-b: #878d95;
  --tier-gold-a: #f6d977; --tier-gold-b: #b8860b;
  --tier-platin-a: #e6f0fa; --tier-platin-b: #4f7397;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #061620;
    --surface: #0a1e2a;
    --surface-2: #0f2a3a;
    --card: #0b1f2c;
    --text: #e3eef5;
    --muted: #9fb6c5;
    --border: #1d3a4c;
    --primary: #38bdf8;
    --primary-hover: #7dd3fc;
    --on-primary: #04141d;
    --link: #7dd3fc;
    --accent: #2dd4bf;
    --accent-soft: #0b2f2e;
    --primary-soft: #0c2f45;
    --error: #f97066;
    --error-soft: #3a1714;
    --ok: #2dd4bf;
    --navy: #04121b;
    --navy-2: #0a2c40;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --tier-bronze: #d08a4f;
    --tier-silber: #b3b8be;
    --tier-gold: #e2b33a;
    --tier-platin: #8db4dc;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.8vw, 3.4rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.3rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li + li { margin-top: .35em; }
strong { font-weight: 650; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }

/* ---------- Kopf ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 12px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
/* Alles nach der Marke rechtsbündig: Navigation, Sprachwahl, CTA, Menü – auch wenn Teile ausgeblendet sind */
.header-inner .brand { margin-right: auto; }
.brand-mark { width: 40px; height: 40px; display: block; }
/* Wortmarke wie im Logo: AEGIS kräftig, GRID darunter heller und weiter gesperrt. */
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.bn-aegis { font-size: 1.12rem; font-weight: 800; letter-spacing: .19em; }
.bn-grid { font-size: .76rem; font-weight: 600; letter-spacing: .36em; color: var(--primary); margin-top: 4px; }
.nav-main ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-main li + li { margin: 0; }
.nav-main a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 500; white-space: nowrap;
}
.nav-main a:hover { background: var(--surface-2); }
.nav-main a[aria-current="page"], .nav-main a.active { color: var(--primary); background: var(--primary-soft); }
.header-cta { flex: none; }
.nav-mobile { display: none; }
.nav-mobile summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem;
  user-select: none;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile .icon-close { display: none; }
.nav-mobile[open] .icon-open { display: none; }
.nav-mobile[open] .icon-close { display: block; }
.nav-mobile nav {
  position: absolute; left: 0; right: 0; top: 68px;
  background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 8px var(--gutter) 20px; max-height: calc(100vh - 68px); overflow-y: auto;
}
.nav-mobile ul { list-style: none; margin: 0 0 12px; padding: 0; }
.nav-mobile li + li { margin: 0; border-top: 1px solid var(--border); }
.nav-mobile ul a { display: block; padding: 14px 4px; color: var(--text); text-decoration: none; font-weight: 500; }
.nav-mobile ul a[aria-current="page"], .nav-mobile ul a.active { color: var(--primary); }
.nav-mobile .btn { width: 100%; }
/* Sprachwahl: Kürzel im Kopf, Liste der Sprachen klappt nach unten auf */
.lang-choice { position: relative; flex: none; }
.lang-choice summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  min-height: 40px; padding: 8px 10px; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; color: var(--text);
}
.lang-choice summary::-webkit-details-marker { display: none; }
.lang-choice summary:hover { background: var(--surface-2); }
.lang-choice summary .icon { width: 18px; height: 18px; }
.lang-choice ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 160px; list-style: none; margin: 0;
  padding: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.lang-choice li + li { margin: 0; }
.lang-choice a { display: block; padding: 10px 12px; border-radius: 6px; color: var(--text); text-decoration: none; }
.lang-choice a:hover { background: var(--surface-2); }
.lang-choice a[aria-current="true"] { color: var(--primary); font-weight: 600; }
@media (max-width: 1139px) {
  .nav-main { display: none; }
  .nav-mobile { display: block; }
}
/* Spanish and French labels are longer: the menu folds up earlier */
@media (max-width: 1239px) {
  html:lang(es) .nav-main, html:lang(fr) .nav-main { display: none; }
  html:lang(es) .nav-mobile, html:lang(fr) .nav-mobile { display: block; }
}
@media (max-width: 639px) {
  .header-inner .header-cta { display: none; }
}
/* Sehr schmal: Menüknopf nur mit Symbol, der Text bleibt für Screenreader */
@media (max-width: 419px) {
  .nav-mobile summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-mobile summary { padding: 8px 10px; }
}

/* Hinweis auf eine andere Sprachfassung (site.js), nie eine Umleitung */
.lang-notice { background: var(--primary-soft); border-bottom: 1px solid var(--border); color: var(--text); font-size: .95rem; }
.lang-notice .wrap { display: flex; align-items: center; gap: 12px; min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
.lang-notice p { margin: 0; flex: 1; }
.lang-notice button {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); cursor: pointer;
}
.lang-notice button:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.lang-notice .icon { width: 20px; height: 20px; }

/* ---------- Schaltflächen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  border: 1px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.btn .icon { width: 20px; height: 20px; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .95rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-light { background: #ffffff; color: var(--navy); }
.btn-light:hover { background: #e0f2fe; }
.btn-ghost-light { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .6); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row { justify-content: center; }

/* ---------- Hero ---------- */
.hero, .page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(1200px 500px at 85% -10%, var(--navy-2), transparent 70%), var(--navy);
  color: var(--on-navy);
}
.hero::before, .page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 95%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 95%);
}
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
}
.hero .eyebrow, .page-hero .eyebrow, .band-dark .eyebrow { color: var(--on-navy-accent); }
.hero h1 { color: #ffffff; max-width: 15ch; }
.hero h1 em, .page-hero h1 em { font-style: normal; color: var(--on-navy-accent); }
.hero .lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); color: var(--on-navy-muted); max-width: 40em; margin-bottom: 32px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin: 36px 0 0; padding: 0; color: var(--on-navy-muted); font-size: .95rem; }
.trust-row li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.trust-row .icon { width: 20px; height: 20px; color: var(--on-navy-accent); }

.hero-panel {
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px; padding: 24px; box-shadow: 0 30px 60px rgba(0, 0, 0, .25);
}
.hero-panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 16px; font-size: .9rem; color: var(--on-navy-muted); }
.status-dot { display: inline-flex; align-items: center; gap: 8px; color: var(--on-navy-accent); font-weight: 600; white-space: nowrap; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-navy-accent); box-shadow: 0 0 0 4px rgba(56, 189, 248, .18); }
.run-list { list-style: none; margin: 0; padding: 0; }
.run-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .08); margin: 0; font-size: .95rem; }
.run-list .icon { width: 20px; height: 20px; color: var(--on-navy-accent); }
.run-list .run-name { color: #ffffff; font-weight: 500; }
.run-list .run-meta { color: var(--on-navy-muted); font-size: .85rem; white-space: nowrap; }
.hero-panel-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; color: var(--on-navy-muted); }

.page-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 72px); }
.page-hero h1 { color: #ffffff; max-width: 22ch; }
.page-hero .lead { color: var(--on-navy-muted); font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); max-width: 44em; margin: 0; }
.page-hero .btn-row { margin-top: 28px; }
.page-hero .byline { color: var(--on-navy-muted); font-size: .95rem; margin: 20px 0 0; }
.page-hero .byline a { color: #ffffff; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 22px; padding: 0; font-size: .9rem; color: var(--on-navy-muted); }
.breadcrumb li { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "/"; opacity: .5; }
.breadcrumb a { color: var(--on-navy-muted); text-decoration: none; }
.breadcrumb a:hover { color: #ffffff; text-decoration: underline; }
.breadcrumb [aria-current] { color: #ffffff; }

/* ---------- Abschnitte ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section + .section-alt, .section-alt + .section { border-top-color: var(--border); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.section-head h2 { margin-bottom: .4em; }

.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Dreierraster zweispaltig: ein übrig bleibendes letztes Element nimmt die volle Breite ein */
@media (min-width: 640px) and (max-width: 1023px) { .grid-3 > :last-child:nth-child(odd), .steps-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; } }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 30px); display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .45em; }
.card p { color: var(--muted); }
.card > :last-child { margin-bottom: 0; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--primary-soft); color: var(--primary);
}
.card-icon.accent { background: var(--accent-soft); color: var(--accent); }
.card-link { margin-top: auto; padding-top: 12px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.card-link .icon { width: 18px; height: 18px; transition: transform .15s; }
.card-link:hover .icon { transform: translateX(3px); }
a.card { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) { a.card:hover { transform: translateY(-2px); } }
.role-tag { font-size: .8rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%230b7a6d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .check-list li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%235eead4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}

/* Partnerstufen */
.tier { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); white-space: nowrap; }
.tier::before {
  content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--tier-a), var(--tier-b)); box-shadow: inset 0 0 0 1px rgba(15, 27, 45, .25);
}
.tier-bronze { --tier-a: var(--tier-bronze-a); --tier-b: var(--tier-bronze-b); --tier: var(--tier-bronze); }
.tier-silber { --tier-a: var(--tier-silber-a); --tier-b: var(--tier-silber-b); --tier: var(--tier-silber); }
.tier-gold { --tier-a: var(--tier-gold-a); --tier-b: var(--tier-gold-b); --tier: var(--tier-gold); }
.tier-platin { --tier-a: var(--tier-platin-a); --tier-b: var(--tier-platin-b); --tier: var(--tier-platin); }
.tier-card { border-top: 4px solid var(--tier); }
.tier-card .tier { font-size: 1.25rem; margin-bottom: 10px; }
.tier-card .tier::before { width: 22px; height: 22px; }
.tier-card .check-list { margin-top: 4px; }
.compare-table.tier-table { min-width: 760px; }
.tier-table thead th:not(:first-child) { width: 21%; }
.tier-table td { color: var(--muted); }

/* Faktenleiste */
.facts { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--card); padding: 24px; }
.fact-value { display: block; font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; color: var(--text); margin-bottom: 4px; }
.fact-label { color: var(--muted); font-size: .95rem; }

/* Zwei Spalten mit Text und Liste */
.split { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; } .split-wide { grid-template-columns: 1.2fr .8fr; } }
.split > :last-child { margin-bottom: 0; }

/* Schritte */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps-4 { grid-template-columns: repeat(4, 1fr); } .steps-3 { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-weight: 700; margin-bottom: 14px;
}
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--muted); margin: 0; }

/* Dunkles Band (Aufruf) */
.band-dark { background: var(--navy); color: var(--on-navy); position: relative; overflow: hidden; isolation: isolate; }
.band-dark::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.band-dark h2 { color: #ffffff; }
.band-dark p { color: var(--on-navy-muted); }
.cta-band { padding: clamp(56px, 8vw, 96px) 0; }
.cta-band .section-head { margin-bottom: 28px; }
.cta-band .section-head p { color: var(--on-navy-muted); }

/* Hinweis-Kasten */
.note { border: 1px solid var(--border); border-left: 4px solid var(--primary); background: var(--surface); border-radius: var(--radius-sm); padding: 18px 20px; color: var(--text); }
.note p:last-child { margin: 0; }
.note-accent { border-left-color: var(--accent); }

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 4px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-2); font-weight: 650; white-space: nowrap; }
.compare-table thead th { white-space: normal; }
tbody th { font-weight: 600; min-width: 170px; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.compare-table { min-width: 860px; }
.compare-table .col-us { background: var(--primary-soft); }
.table-note { color: var(--muted); font-size: .9rem; margin: 12px 0 0; }
.prose .table-note { color: var(--muted); margin-bottom: 1em; }
.scroll-hint { display: none; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.scroll-hint .icon { width: 18px; height: 18px; }
@media (max-width: 899px) {
  .scroll-hint { display: flex; }
  .compare-table tbody th, .compare-table thead th:first-child {
    position: sticky; left: 0; z-index: 1; min-width: 132px; max-width: 132px; background: var(--card); hyphens: auto; -webkit-hyphens: auto;
    box-shadow: inset -1px 0 0 var(--border);
  }
  .compare-table thead th:first-child { background: var(--surface-2); }
}
@media (min-width: 600px) and (max-width: 899px) {
  .compare-table tbody th, .compare-table thead th:first-child { min-width: 176px; max-width: 176px; }
}
.yes { color: var(--ok); font-weight: 600; }
.part { color: var(--muted); }

/* FAQ */
.faq { max-width: 860px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font-weight: 600; font-size: 1.08rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item summary:hover { color: var(--primary); }
.faq-a { padding: 0 0 22px; color: var(--muted); max-width: 72ch; }
.faq-a p:last-child { margin: 0; }

/* Fließtext (Rechtstexte, lange Abschnitte) */
.prose > * { max-width: 780px; }
.prose h2 { font-size: 1.45rem; margin-top: 2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--text); }
.prose .table-wrap, .prose .note { margin: 1.4em 0; }

/* ---------- Schaubilder ({{schaubild:…}} in build.py) ---------- */
.diagram { margin: 0 0 48px; }
.diagram-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
.diagram-scroll:focus-visible { outline-offset: 4px; }
.diagram img { width: 100%; height: auto; }
.diagram figcaption { margin-top: 14px; font-size: .92rem; color: var(--muted); text-align: center; text-wrap: balance; }
.diagram-hint { display: none; }  /* Hinweis zum Wischen, nur auf schmalen Bildschirmen */
.prose .diagram { margin: 1.6em 0; }
.prose > .diagram { max-width: none; }  /* breiter als die Textspalte, sonst wird die Schrift zu klein */
/* Auf schmalen Bildschirmen bliebe die Schrift im Schaubild zu klein: dann seitlich verschieben. */
@media (max-width: 760px) {
  .diagram img { width: 800px; max-width: none; }
  .diagram-hint { display: block; margin-top: 4px; font-size: .85rem; }
}
.prose address { font-style: normal; margin-bottom: 1em; }
.stand { color: var(--muted); font-size: .9rem; margin-top: 2em; }

/* Kontakt */
.contact-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1.4fr .6fr; } }
.contact-aside .card + .card { margin-top: 20px; }
.contact-line { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 16px; }
.contact-line .icon { color: var(--primary); margin-top: 2px; }
.contact-line address { font-style: normal; }
.form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); }
.form-row { display: grid; column-gap: 20px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field .req { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; min-height: 48px;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%234a5a70' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: .9rem; margin: 6px 0 0; }
.choices { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.choices legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 8px; }
.choice-grid { display: grid; gap: 10px 20px; }
@media (min-width: 640px) { .choice-grid { grid-template-columns: 1fr 1fr; } }
.choices .req, .legend-note { color: var(--muted); font-weight: 400; }
.legend-note { font-size: .9rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px 32px; }
.reveal[hidden] { display: none; }
.choice { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.choice input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--primary); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .9rem; color: var(--muted); margin: 0 0 20px; }
.form-msg { border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 20px; font-weight: 500; }
.form-msg[hidden] { display: none; }
.form-msg.error { background: var(--error-soft); color: var(--error); border: 1px solid var(--error); }
.form-msg.ok { background: var(--accent-soft); color: var(--ok); border: 1px solid var(--ok); }

/* Fuß */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 56px 0 24px; font-size: .95rem; color: var(--muted); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.brand-footer { margin-bottom: 14px; }
.site-footer h2 { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--link); text-decoration: underline; }
.site-footer address { font-style: normal; margin-bottom: 12px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .9rem; }
.footer-bottom p { margin: 0; }
.footer-bottom ul { display: flex; gap: 20px; }
.footer-bottom li + li { margin: 0; }

/* 404 */
.error-page { padding: clamp(72px, 12vw, 140px) 0; text-align: center; }
.error-page .code { font-size: .9rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

@media print {
  .site-header, .site-footer, .cta-band, .btn { display: none !important; }
  .hero, .page-hero { background: none; color: #000; }
  .hero h1, .page-hero h1, .page-hero .lead { color: #000; }
}
.more-link { margin: 36px 0 0; }
.feature-note { margin: 32px 0 0; }
.error-page .card-icon { margin: 0 auto 20px; }
.error-page .btn-row { justify-content: center; }
.error-page .lead { font-size: 1.15rem; }
.h3 { font-size: 1.2rem; letter-spacing: -.01em; }
.contact-line a { font-weight: 600; }

/* Datentabellen: gleiche Breite der Merkmal-Spalte in allen Tabellen einer Seite */
@media (min-width: 640px) {
  .spec-table tbody th { width: 15rem; }
  .prose .spec-table tbody th { width: auto; }
}
/* Datentabellen: auf schmalen Bildschirmen Merkmal über Wert statt nebeneinander */
@media (max-width: 639px) {
  .spec-table th, .spec-table td { display: block; }
  .spec-table tbody th { min-width: 0; padding-bottom: 2px; border-bottom: 0; }
  .spec-table tbody td { padding-top: 0; }
  .spec-table tbody tr:last-child th { border-bottom: 0; }
}

/* Fußzeile unter einer Tabelle (Technische Daten) */
.table-foot { margin: 20px 0 0; color: var(--muted); }

/* Glossar: Begriff und Erklärung */
.glossary { margin: 0; }
.glossary dt { font-weight: 650; font-size: 1.1rem; margin: 1.6em 0 .3em; scroll-margin-top: 96px; }
.glossary dt:first-child { margin-top: 0; }
.glossary dd { margin: 0; color: var(--text); }
.glossary dt:target { color: var(--primary); }

/* ---------- Online-Handbuch (/handbuch/<sprache>/, erzeugt von docs/handbuch/build_handbuch_html.js) ---------- */
:root { --warn: #b45309; }
@media (prefers-color-scheme: dark) { :root { --warn: #fbbf24; } }
.page-hero-compact { padding: clamp(28px, 4vw, 48px) 0 clamp(28px, 4vw, 44px); }
.page-hero-compact h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); max-width: 30ch; }
.manual-meta { color: var(--on-navy-muted); font-size: .92rem; margin: 18px 0 0; }
.manual.section { padding-top: clamp(32px, 5vw, 56px); }
.manual-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
.manual-grid > * { min-width: 0; }
.manual-body code.nw { white-space: nowrap; }
@media (min-width: 1024px) {
  .manual-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
  .manual-side { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
  .manual-skip { display: none; }
}
@media (max-width: 1023px) { .manual-side { border-top: 1px solid var(--border); padding-top: 32px; } }
.manual-skip { font-size: .95rem; margin-bottom: 1.6em; }
.manual-body h2, .manual-body h3 { scroll-margin-top: 96px; }
.manual-skip + h2 { margin-top: 0; }
.manual-num { color: var(--muted); font-weight: 600; margin-right: .25em; font-variant-numeric: tabular-nums; }
.manual-anchor { margin-left: .35em; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
.manual-body h2:hover .manual-anchor, .manual-body h3:hover .manual-anchor, .manual-anchor:focus-visible { opacity: 1; }
.manual-body :target { color: var(--primary); }
.manual-caption { color: var(--muted); font-size: .9rem; font-style: italic; margin: 1.2em 0 .4em; }
.manual-body pre {
  max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.4em; padding: 12px 16px;
  font-family: var(--mono); font-size: .84rem; line-height: 1.5; white-space: pre; tab-size: 4;
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius-sm);
}
.manual-body pre.manual-out { background: var(--card); border-left-color: var(--border); }
.manual-body pre code { background: none; padding: 0; font-size: inherit; border-radius: 0; }
.manual-body pre:focus-visible { outline-offset: 2px; }
.manual-body .table-wrap { max-width: 100%; }
.manual-table { font-size: .9rem; }
.manual-table thead th { white-space: normal; }
.manual-table th, .manual-table td { padding: 10px 12px; }
.manual-table code { overflow-wrap: anywhere; }
@media (max-width: 639px) { .manual-table { min-width: 540px; } }
.manual-note { margin: 1.4em 0; }
.manual-note-tipp { border-left-color: var(--accent); }
.manual-note-warnung { border-left-color: var(--warn); }
.manual-note-gefahr { border-left-color: var(--error); background: var(--error-soft); }
.manual-note-warnung > p:first-child strong:first-child { color: var(--warn); }
.manual-note-gefahr > p:first-child strong:first-child { color: var(--error); }
.manual-figure { margin: 1.6em 0; }
.manual-figure img { height: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 0 auto; }
.manual-figure figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); text-align: center; }
.manual-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 3em; padding-top: 24px; border-top: 1px solid var(--border); }
.manual-pager a { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-weight: 600; background: var(--card); }
.manual-pager a:hover { border-color: var(--primary); }
.manual-pager span { display: block; color: var(--muted); font-size: .85rem; font-weight: 400; }
.manual-next { text-align: right; }
@media (max-width: 479px) { .manual-pager { grid-template-columns: 1fr; } .manual-next { text-align: left; } }
.manual-side h2 { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 24px 0 10px; }
.manual-toc { list-style: none; margin: 0; padding: 0; font-size: .93rem; }
.manual-toc li + li { margin-top: 2px; }
.manual-toc a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--text); text-decoration: none; line-height: 1.35; }
.manual-toc a:hover { background: var(--surface-2); }
.manual-toc a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.manual-toc ul { list-style: none; margin: 4px 0 8px; padding: 0 0 0 14px; border-left: 2px solid var(--border); font-size: .88rem; }
.manual-toc ul a { color: var(--muted); padding: 3px 8px; }
.manual-search { display: flex; gap: 8px; max-width: 640px; }
.manual-search input {
  flex: 1; min-width: 0; font: inherit; font-size: 1rem; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; min-height: 40px;
}
.manual-search input:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
.manual-side .manual-search .btn { padding-left: 12px; padding-right: 12px; }
.manual-results:empty { display: none; }
.manual-results { margin: 24px 0 8px; max-width: 860px; }
.manual-results > p { color: var(--muted); }
.manual-results ol { list-style: none; margin: 0; padding: 0; }
.manual-results li { padding: 14px 0; border-top: 1px solid var(--border); margin: 0; }
.manual-results a { font-weight: 600; }
.manual-results .manual-hit-chapter { display: block; color: var(--muted); font-size: .85rem; }
.manual-results .manual-hit-text { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.manual-results mark { background: var(--primary-soft); color: var(--text); border-radius: 3px; padding: 0 .1em; }
.manual-index-head { font-size: 1.45rem; margin: 2em 0 1em; }
.manual-index { list-style: none; margin: 0; padding: 0; column-gap: 56px; }
@media (min-width: 800px) { .manual-index { columns: 2; } }
.manual-index > li { margin: 0 0 26px; break-inside: avoid; }
.manual-index > li + li { margin-top: 0; }
.manual-chapter { font-weight: 650; font-size: 1.05rem; text-decoration: none; color: var(--text); }
.manual-chapter:hover { color: var(--link); text-decoration: underline; }
.manual-index ul { list-style: none; margin: 6px 0 0; padding: 0 0 0 1.6em; font-size: .93rem; }
.manual-index ul li + li { margin-top: 2px; }
.manual-index ul a { text-decoration: none; }
.manual-index ul a:hover { text-decoration: underline; }
@media print { .manual-side, .manual-pager, .manual-skip, .manual-anchor { display: none !important; } .manual-grid { display: block; } }
