/* Website Check – DBM Webdesign & Online-Marketing. Nur Systemschriften, keine externen Ressourcen. */

/* Dunkel ist Standard; Hell nur, wenn der Besucher umschaltet (data-theme="light"). */
/* Markenfarben DBM: Navy #002549 und Lime #96a722.
   Dunkel: Karten in Navy, Akzent Lime (Buttons mit Navy-Schrift – Weiß auf Lime wäre zu kontrastarm). */
:root {
  --bg: #001a35;
  --surface: #002549;
  --surface-2: #0a345e;
  --row: #052e56;
  --border: #1b4775;
  --text: #eef3fb;
  --desc: #b7c6da;
  --muted: #9fb2cb;
  --brand: #96a722;
  --brand-hover: #b6c83a;
  --brand-ink: #002549;
  --brand-soft: rgba(150, 167, 34, .16);
  --focus: #b6c83a;
  --accent: #96a722;        /* Lime für Schmuck-Elemente (Logo-Symbol) */
  --accent-text: #96a722;   /* Lime als Schrift (Logo "Check", Überzeilen) */
  --link: #8ec5f2;          /* normale Text-Links und Aufklapper: ruhiges Hellblau statt Lime überall */
  --link-hover: #b5dafa;
  --pass: #4ade80;  --pass-bg: rgba(74, 222, 128, .12);
  --warn: #fbbf24;  --warn-bg: rgba(251, 191, 36, .13);
  --fail: #f87171;  --fail-bg: rgba(248, 113, 113, .13);
  --info: #a3b3c8;  --info-bg: rgba(163, 179, 200, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .18);
  --radius: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --content: 1400px;   /* Boxed: maximale Inhaltsbreite */
  --scheme: dark;
}
/* Hell: weiße Flächen auf weißem Grund – Karten, Kacheln und Tabellen trennen sich über Rahmen und Schatten.
   Alle Text-/Hintergrund-Paare haben mindestens 5:1 Kontrast (WCAG AA verlangt 4,5:1). */
:root[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --row: #f6f8fb;
  --border: #cbd4e1;
  --text: #172133;
  --desc: #3d4859;
  --muted: #536072;
  /* Hell: Buttons und Links in Navy; Lime als Schrift nur abgedunkelt (reines Lime auf Hell: 2,4:1 – unlesbar). */
  --brand: #002549;
  --brand-hover: #0b3d6e;
  --brand-ink: #ffffff;
  --brand-soft: #d8e1ec;
  --focus: #002549;
  --accent: #96a722;
  --accent-text: #5d6b0c;
  --link: #0b4a8a;
  --link-hover: #002549;
  --pass: #126b37;  --pass-bg: #d6ecdf;
  --warn: #8f4d00;  --warn-bg: #f3e3c7;
  --fail: #b1232a;  --fail-bg: #f5dadb;
  --info: #536072;  --info-bg: #dfe5ee;
  --shadow: 0 1px 2px rgba(16, 32, 56, .05);
  --scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
/* scrollbar-gutter: Platz für den Scrollbalken immer reservieren → kein seitliches Springen beim Auf-/Zuklappen */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
/* Farbschema nur für den Inhalt (Eingabefelder, Häkchen …). Die oberste Ebene bleibt beim Browser-Standard,
   damit der Scrollbalken des Fensters Chromes normales Aussehen behält. */
body { color-scheme: var(--scheme); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ───────── Kopf, Inhalt & Fuß: boxed, max. 1400 px Inhalt, mittig ───────── */
.topbar, main, .footer {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-left: auto;
  margin-right: auto;
}
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px var(--gutter);
}
/* Text-Logo links: "Website Check" groß, darunter klein "by DBM Webdesign & Online-Marketing" */
.wc-logo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wc-logo-name { color: var(--text); text-decoration: none; font-size: clamp(21px, 2.4vw, 27px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; }
.wc-logo-accent { color: var(--accent-text); }
.wc-logo-by { color: var(--muted); text-decoration: none; font-size: 12.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-logo-name:hover { color: var(--text); }
.wc-logo-by:hover { color: var(--brand); }
/* DBM-Logo (im Kontaktbereich): weiß im Dunkelmodus (Standard), blau im hellen Modus */
.logo-for-light { display: none !important; }
:root[data-theme="light"] .logo-for-light { display: block !important; }
:root[data-theme="light"] .logo-for-dark { display: none !important; }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.pill-btn {
  height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.icon-btn svg { width: 18px; height: 18px; }
.pill-btn:hover, .icon-btn:hover { border-color: var(--brand); }
.lang-short { display: none; }

.footer {
  margin-top: auto; padding: 28px var(--gutter); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px;
  color: var(--muted); font-size: 13px; text-align: center;
}
.footer a { color: var(--muted); }
.noscript { text-align: center; padding: 16px; }

main { padding: 0 var(--gutter); }

/* Bericht per Referenz-Code (Dialog hinter der Lupe) */
.ref-dialog {
  padding: 0; border: 1px solid var(--border); border-radius: var(--radius);
  width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.ref-dialog::backdrop { background: rgba(0, 18, 38, .7); }
.ref-dialog form { padding: 20px; display: grid; gap: 12px; }
.ref-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ref-head h2 { margin: 0; font-size: 17px; }
.ref-hint { margin: 0; color: var(--desc); font-size: 14px; }
.ref-row { display: flex; gap: 10px; }
.ref-row input {
  min-width: 0; font-size: 20px; letter-spacing: .25em; text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
.ref-row input::placeholder { letter-spacing: normal; text-transform: none; font-family: inherit; font-size: 16px; }
.ref-row .btn { flex: none; }
@media (max-width: 420px) {
  .ref-row { flex-direction: column; }
  .ref-row .btn { width: 100%; }
}

/* Nach oben */
.to-top {
  position: fixed; z-index: 50;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--brand-hover); }
.to-top svg { width: 24px; height: 24px; }

/* ───────── Bausteine ───────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  border: 0; border-radius: 8px; padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
  transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-small { min-height: 38px; padding: 8px 14px; font-size: 14px; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 120px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; text-align: left; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.form-error { margin: 0; color: var(--fail); font-size: 14px; font-weight: 600; }
.form-ok { margin: 0; color: var(--pass); font-weight: 600; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.field .opt { color: var(--muted); font-weight: 400; }

/* ───────── Startseite ───────── */
.hero { text-align: center; max-width: 760px; margin: clamp(16px, 5vw, 48px) auto 0; }
.hero h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.02em; }
.lead { font-size: clamp(15px, 2.2vw, 17px); color: var(--desc); margin: 0 auto 28px; max-width: 640px; }
.scan-form { padding: 16px; display: grid; gap: 14px; text-align: left; }
.scan-row { display: flex; gap: 10px; }
.scan-row input { font-size: 17px; padding: 14px 16px; min-width: 0; }
.scan-row .btn { flex: none; padding: 14px 24px; font-size: 16px; }
.trust { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
/* Kacheln: PC 3 Spalten (3 + 3), Tablet 2 Spalten (2 + 2 + 2), Handy 1 Spalte */
/* --tile-overflow: setzt app.js, wenn eine aufgeklappte Infokarte über das Raster hinausragt → Footer rutscht nach unten */
.tiles { list-style: none; padding: 0; margin: clamp(28px, 5vw, 48px) 0 calc(8px + var(--tile-overflow, 0px)); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1024px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tiles { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.tile {
  position: relative;   /* Bezugspunkt für die aufgeklappte Infokarte */
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: grid; gap: 4px; align-content: start; grid-template-rows: auto auto 1fr auto;
}
.tile-icon { display: block; width: 26px; height: 26px; margin-bottom: 8px; color: var(--accent-text); }
.tile-icon svg { display: block; width: 100%; height: 100%; }
.tile { transition: border-color .15s; }
.tile:hover { border-color: var(--muted); }
.tile-desc { color: var(--desc); font-size: 14px; }

/* "Was wir prüfen" */
.tile-more {
  justify-self: start; align-self: end; margin-top: 10px; padding: 6px 0;
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; color: var(--link); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
}
.tile-more:hover span { text-decoration: underline; }
.tile-more svg { width: 18px; height: 18px; }

/* Aufgeklappt: liegt ÜBER der Kachel (und ragt über die Kacheln darunter) – das Raster bewegt sich nicht. */
.tile-panel {
  position: absolute; z-index: 30; top: -1px; left: -1px; right: -1px; min-height: calc(100% + 2px);
  padding: 16px 18px 18px; background: var(--surface); border: 1px solid var(--brand); border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  animation: tile-in .16s ease-out;
}
:root[data-theme="light"] .tile-panel { box-shadow: 0 18px 50px rgba(16, 32, 56, .18); }
@keyframes tile-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tile-panel-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.tile-panel-head strong { flex: 1; min-width: 0; font-size: 15px; }
.tile-panel-head .tile-icon { width: 22px; height: 22px; margin: 0; }
.tile-close { width: 36px; height: 36px; flex: none; }
.tile-panel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.tile-panel li { position: relative; padding-left: 28px; color: var(--desc); font-size: 14.5px; line-height: 1.5; }
.tile-panel li::before {
  content: "✓"; position: absolute; left: 0; top: 2px; width: 19px; height: 19px; border-radius: 50%;
  background: none; color: var(--pass); font-size: 12px; font-weight: 800; display: grid; place-items: center;
}
.tile-note { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }

/* ───────── Bericht (volle Breite) ───────── */
/* minmax(0, 1fr): Die Spalte darf nie breiter als der Bildschirm werden – sonst würde breiter Inhalt
   (z. B. lange Adressen) das ganze Raster aufblähen und auf dem Handy rechts abschneiden. */
.report { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 8px 0 0; }
.back { font-size: 14px; text-decoration: none; justify-self: start; padding: 4px 0; }
.summary { padding: clamp(18px, 3vw, 28px); display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 3vw, 32px); align-items: center; }
.eyebrow { margin: 0 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.summary h1 { margin: 0; font-size: clamp(20px, 4vw, 30px); line-height: 1.2; overflow-wrap: anywhere; }
.summary .meta { color: var(--muted); font-size: 14px; margin: 4px 0 4px; }
.ref-line { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.ref-code { color: var(--text); font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 15px; letter-spacing: .12em; user-select: all; }
.summary .label { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.summary .text { margin: 0; color: var(--desc); }
.summary .risk { margin-top: 8px; }
.risk-lead { color: var(--warn); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }
.summary-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 14px; }
.summary-actions .form-error { flex-basis: 100%; }

/* Vorschau der Startseite rechts im Ergebnis-Kasten (kleiner Browser-Rahmen) */
.summary:has(> .site-shot) { grid-template-columns: auto minmax(0, 1fr) auto; }
.site-shot { margin: 0; width: clamp(280px, 28vw, 440px); justify-self: end; }
.shot-frame { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.shot-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.shot-dots { flex: none; width: 8px; height: 8px; margin-right: 26px; border-radius: 50%; background: #ff5f57; box-shadow: 13px 0 0 #febc2e, 26px 0 0 #28c840; }
.shot-url { flex: 1; min-width: 0; padding: 3px 10px; border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-view { aspect-ratio: 16 / 10; display: grid; place-items: center; background: var(--bg); }
.shot-view img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot-wait { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.site-shot figcaption { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }
/* Schmaler: Vorschau unter das Ergebnis */
@media (max-width: 1024px) {
  .summary:has(> .site-shot) { grid-template-columns: auto minmax(0, 1fr); }
  .site-shot { grid-column: 1 / -1; justify-self: center; width: min(100%, 560px); }
}
.print-only { display: none; }
/* Zähler: Farbpunkt + Text statt farbiger Pillen */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 2px 0; background: none; border: 0; color: var(--text); font-size: 14px; font-weight: 600; }
.chip::before { content: ''; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--info); }
.chip.fail::before { background: var(--fail); }
.chip.warn::before { background: var(--warn); }
.chip.pass::before { background: var(--pass); }
/* Klickbare Zähler (springen zum nächsten Problem/Hinweis) */
.chip-btn { font-family: inherit; line-height: inherit; cursor: pointer; }
.chip-btn:hover > span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.chip-arrow { color: var(--muted); font-weight: 700; }

.ring { width: 128px; height: 128px; position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-2); }
.ring .bar { transition: stroke-dashoffset .8s ease; }
.ring .num { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1; }
.ring .num b { font-size: 36px; display: block; }
.ring .num small { font-size: 12px; color: var(--muted); display: block; margin-top: 4px; }
/* Lade-Kreis: gleichmäßige Drehung + Bogen, der sanft wächst und schrumpft. Beide Schleifen sind nahtlos
   (Anfang = Ende), und app.js stellt beim Neuaufbau die Phase passend zur Uhr ein → kein Springen. */
.ring.spin svg { animation: ring-rotate 1.4s linear infinite; will-change: transform; }
.ring.spin .bar { transition: none; animation: ring-arc 2.8s ease-in-out infinite; }
@keyframes ring-rotate { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
/* Umfang 2·π·52 ≈ 327: Offset 290 = kurzer Bogen (≈ 11 %), 110 = langer Bogen (≈ 66 %) */
@keyframes ring-arc { 0%, 100% { stroke-dashoffset: 290; } 50% { stroke-dashoffset: 110; } }

/* Konfetti bei voller Punktzahl (app.js celebrate). Klickt nicht mit – liegt nur sichtbar darüber. */
.confetti { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -14px; width: 8px; height: 13px; border-radius: 2px; opacity: .95; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { 0% { transform: translate(0, 0) rotate(0); } 100% { transform: translate(var(--dx), 108vh) rotate(var(--rot)); opacity: .85; } }

.tone-pass { color: var(--pass); }
.tone-warn { color: var(--warn); }
.tone-fail { color: var(--fail); }
.tone-info { color: var(--info); }

.progress-note { margin: 6px 0 0; color: var(--desc); font-size: 14px; }

.top3 { padding: clamp(16px, 3vw, 24px); }
.top3 h2, .section-title { font-size: 16px; margin: 0 0 12px; }
.top3 ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.top3 a { display: grid; grid-template-columns: 24px 1fr auto; gap: 4px 14px; align-items: center; text-decoration: none; color: var(--text); padding: 13px 0; border-top: 1px solid var(--border); font-weight: 600; }
.top3 a:hover { color: var(--link); }
.top3 .cat { color: var(--muted); font-size: 13px; font-weight: 400; text-align: right; }

.cta-banner { padding: 18px clamp(16px, 3vw, 24px); display: flex; gap: 12px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; box-shadow: none; }
.cta-banner p { margin: 0; font-weight: 600; flex: 1 1 320px; }

.cats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cat-card { padding: 0; }
.cat-head { display: flex; align-items: center; gap: 12px; padding: clamp(14px, 2.5vw, 20px) clamp(16px, 3vw, 24px); }
.cat-icon { width: 22px; height: 22px; flex: none; color: var(--muted); }
.cat-icon svg { display: block; width: 100%; height: 100%; }
.cat-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cat-head h2 { font-size: 16px; margin: 0; }
.cat-short { font-size: 13px; font-weight: 600; }
.cat-short.fail { color: var(--fail); }
.cat-short.warn { color: var(--warn); }
.cat-short.pass { color: var(--pass); }
.cat-body { padding: 0 clamp(16px, 3vw, 24px) clamp(16px, 3vw, 24px); }
.cat-card > .skeleton { padding: 0 clamp(16px, 3vw, 24px) clamp(16px, 3vw, 24px); }

/* Ganze Kopfzeile ist der Aufklapper; Pfeil (30 px) rechts neben der Punktzahl */
details.cat-card > summary { list-style: none; cursor: pointer; user-select: none; border-radius: var(--radius); }
details.cat-card > summary::-webkit-details-marker { display: none; }
details.cat-card > summary:hover { background: none; }
details.cat-card > summary:hover h2 { color: var(--brand); }
details.cat-card[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }
.cat-chev { width: 30px; height: 30px; flex: none; color: var(--muted); transition: transform .2s; }
details.cat-card[open] > summary .cat-chev { transform: rotate(180deg); }
details.cat-card > summary:hover .cat-chev { color: var(--brand); }

/* Bestandene Prüfungen innerhalb einer Kategorie: gebündelt, grün hinterlegte Leiste mit 30-px-Pfeil */
.checks + .passed { margin-top: 0; }
.passed > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: grid; grid-template-columns: 24px 1fr 30px; gap: 14px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--border);
  font-weight: 600; color: var(--desc);
}
.passed > summary::-webkit-details-marker { display: none; }
.passed > summary:hover { color: var(--text); }
.passed > summary .chev { width: 30px; height: 30px; display: block; transition: transform .2s; }
.passed[open] > summary .chev { transform: rotate(180deg); }
.passed > .checks { margin-top: 0; }
.score-badge { min-width: 36px; padding: 0; font-size: 18px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.score-badge.pass { color: var(--pass); }
.score-badge.warn { color: var(--warn); }
.score-badge.fail { color: var(--fail); }
.score-badge.info { color: var(--info); }
.cat-intro { color: var(--muted); font-size: 14px; margin: 8px 0 14px; max-width: 110ch; }
.cat-note { margin: 0 0 12px; padding: 2px 0 2px 12px; border-left: 2px solid var(--border); color: var(--desc); font-size: 14px; }

/* Einzelne Ergebnisse: eigene Zeile, farbiger Rand nach Status, Titel und Beschreibung farblich getrennt */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.check-item {
  display: grid; grid-template-columns: 24px 1fr; gap: 14px;
  padding: 16px 0; border-top: 1px solid var(--border); scroll-margin-top: 16px;
}
.check-item.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: var(--brand-soft); } 100% { background: transparent; } }
/* Status: dünner Ring mit Zeichen (✓ ! ✕) – Bedeutung auch ohne Farbe erkennbar */
.status-dot { width: 22px; height: 22px; margin-top: 1px; border: 1.5px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; line-height: 1; flex: none; }
.status-dot.pass { color: var(--pass); }
.status-dot.warn { color: var(--warn); }
.status-dot.fail { color: var(--fail); }
.status-dot.info, .status-dot.error { color: var(--info); }
.check-body { min-width: 0; }
.check-title { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; color: var(--text); font-weight: 650; font-size: 15px; line-height: 1.4; }
.check-title > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.check-value { font-weight: 700; font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.check-text { margin: 6px 0 0; color: var(--desc); font-size: 14.5px; line-height: 1.6; max-width: 110ch; overflow-wrap: anywhere; }

/* Erklärung unter jedem Ergebnis ("Wofür ist das gut?") */
.explain { margin-top: 8px; }
.explain > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 0;
  color: var(--link); font-size: 14px; font-weight: 600;
}
.explain > summary::-webkit-details-marker { display: none; }
.explain > summary:hover span { text-decoration: underline; }
.explain summary .chev { width: 18px; height: 18px; transition: transform .2s; }
.explain[open] > summary .chev { transform: rotate(180deg); }
.explain-body {
  margin-top: 6px; padding: 4px 0 4px 14px; border-left: 2px solid var(--border); max-width: 110ch;
}
.explain-body p { margin: 0; color: var(--desc); font-size: 14px; line-height: 1.6; }
.explain-body p + p { margin-top: 8px; }
.explain-body strong { color: var(--text); }

/* Technische Details (für Profis) */
.tech { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.tech-title { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tech-list { margin: 0; display: grid; gap: 10px; }
.tech-row { display: grid; grid-template-columns: minmax(200px, 36%) minmax(0, 1fr); gap: 4px 16px; align-items: start; }
.tech-row dt { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; color: var(--text); font-weight: 650; font-size: 13.5px; line-height: 1.4; }
.tech-mark { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid currentColor; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; }
.tech-mark.pass { color: var(--pass); }
.tech-mark.fail { color: var(--fail); }
.tech-desc { flex-basis: 100%; color: var(--muted); font-weight: 400; font-size: 12.5px; line-height: 1.45; }
.tech-row dd { margin: 0; min-width: 0; }
.tech-row code, .tech-row li {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 12.5px; line-height: 1.5;
  color: var(--desc); overflow-wrap: anywhere; word-break: break-word;
}
.tech-row code { display: inline-block; max-width: 100%; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; }
.tech-row ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.tech-row li { padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; }
.tech-row li.tech-more { background: none; border: 0; color: var(--muted); font-family: inherit; }
@media (max-width: 640px) {
  .tech-row { grid-template-columns: minmax(0, 1fr); }
}


.skeleton { display: grid; gap: 10px; padding: 6px 0; }
.skeleton span { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton span:nth-child(2) { width: 85%; }
.skeleton span:nth-child(3) { width: 65%; }
.pending-label { color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.mini-spin { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin2 .8s linear infinite; }
@keyframes spin2 { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Vorschau beim Teilen */
.og-wrap { margin-top: 12px; }
.og-caption { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.og-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface-2); width: 100%; max-width: 480px; }
.og-img { aspect-ratio: 1.91 / 1; background: var(--border); display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.og-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.og-body { padding: 10px 12px; display: grid; gap: 2px; }
.og-domain { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.og-title { font-weight: 650; font-size: 15px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.og-desc { font-size: 13px; color: var(--desc); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Kontakt: Logo über der Überschrift, alles mittig; Formularfelder selbst linksbündig */
.contact { padding: clamp(18px, 3vw, 32px); text-align: center; }
.contact-logo { margin: 0 0 18px; }
.contact-logo img { display: block; width: 260px; max-width: 100%; height: auto; margin: 0 auto; }
.contact h2 { margin: 0 0 8px; font-size: clamp(18px, 3vw, 24px); line-height: 1.25; }
.contact .intro { margin: 0 auto 12px; color: var(--desc); max-width: 70ch; }
.contact-phone { margin: 0 0 18px; color: var(--desc); }
.contact-phone a { font-weight: 650; white-space: nowrap; }
.contact .intro + form { margin-top: 18px; }
.contact .form-grid { margin: 0 auto; text-align: left; }
.contact .form-grid .check { justify-content: center; }
.contact .form-actions { justify-content: center; flex-direction: column; }
.contact .thanks { max-width: 640px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 980px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.thanks { padding: 4px 0 4px 16px; border-left: 3px solid var(--pass); text-align: left; }
.thanks strong { color: var(--pass); display: block; margin-bottom: 4px; font-size: 16px; }

.mail-box { padding: clamp(16px, 3vw, 24px); display: grid; gap: 12px; justify-items: center; text-align: center; }
.mail-box p { margin: 0; color: var(--desc); }
.mail-row { display: flex; gap: 10px; width: 100%; max-width: 720px; }
.mail-box .check { justify-content: center; }
.mail-row input { min-width: 0; }
.mail-row .btn { flex: none; }

.share { display: grid; gap: 12px; padding: 18px clamp(16px, 3vw, 24px); }
.share p { margin: 0; color: var(--desc); font-size: 14px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.disclaimer { color: var(--muted); font-size: 13px; text-align: center; margin: 4px auto 0; max-width: 760px; }

.failed { padding: clamp(24px, 5vw, 40px) clamp(16px, 3vw, 24px); text-align: center; display: grid; gap: 12px; justify-items: center; }
.failed .big { font-size: 40px; }
.failed h1 { margin: 0; font-size: clamp(18px, 3.5vw, 24px); overflow-wrap: anywhere; }
.failed p { margin: 0; color: var(--desc); max-width: 560px; }
.failed .form-actions { justify-content: center; }
.failed .form-actions .form-error { flex-basis: 100%; text-align: center; }

/* ───────── Informationsteil der Startseite (SEO) ───────── */
/* Startseite steht für Suchmaschinen sichtbar im HTML – auf Berichtsseiten gar nicht erst zeichnen (theme.js) */
.route-report #view-start { display: none; }
.h1-sub { display: block; margin-top: 10px; color: var(--desc); font-size: clamp(18px, 2.6vw, 24px); font-weight: 600; letter-spacing: 0; line-height: 1.3; }

/* minmax(0, 1fr) ist hier entscheidend: Ohne feste Spaltenbreite richtet sich das Raster nach dem breitesten Inhalt
   (Vergleichstabelle, mind. 780 px) – dann wäre der GANZE Infoteil auf dem Handy ~800 px breit und rechts abgeschnitten.
   So scrollt nur die Tabelle in ihrem Rahmen. */
.seo { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(56px, 8vw, 104px); margin: clamp(48px, 8vw, 96px) 0 clamp(24px, 4vw, 48px); }
.seo h2 { margin: 0 0 14px; font-size: clamp(22px, 3vw, 30px); line-height: 1.25; letter-spacing: -.01em; overflow-wrap: break-word; hyphens: auto; }
.seo p { margin: 0 0 14px; color: var(--desc); line-height: 1.7; }
.seo .small-note { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.seo-intro { max-width: 880px; margin: 0 auto; text-align: center; }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.facts li { display: grid; gap: 4px; padding: 6px 12px; border-left: 1px solid var(--border); }
.facts li:first-child { border-left: 0; }
.facts strong { color: var(--accent-text); font-size: clamp(24px, 3vw, 32px); line-height: 1.1; }
.facts span { color: var(--muted); font-size: 14px; }

/* Zick-Zack: Text und Illustration abwechselnd links/rechts (1. Abschnitt im #seo ist die Einleitung) */
.zz { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.zz:nth-of-type(odd) .zz-media { order: -1; }
.zz-media { display: flex; justify-content: center; }
.ill { display: block; width: 100%; max-width: 420px; height: auto; }
.checklist { list-style: none; padding: 0; margin: 18px 0 20px; display: grid; gap: 9px; }
.checklist li { position: relative; padding-left: 30px; color: var(--text); line-height: 1.5; }
.checklist li::before { content: '✓'; position: absolute; left: 2px; top: 0; color: var(--accent-text); font-size: 14px; font-weight: 800; }
.zz-cta { font-weight: 700; text-decoration: none; }

/* Illustrationen: Farben aus den Variablen → passen sich Hell/Dunkel an */
.il-bg { fill: var(--surface-2); stroke: var(--border); stroke-width: 1.5; }
.il-soft { fill: var(--surface); }
.il-line { fill: var(--border); }
.il-acc, .il-cookie { fill: var(--accent); }
.il-navy { fill: #002549; }
.il-red { fill: #ff5f57; } .il-yellow { fill: #febc2e; } .il-green { fill: #28c840; }
.il-navy-s, .il-mini-s, .il-acc-s, .il-acc-s2, .il-green-s, .il-soft-s, .il-track, .il-acc-arc, .il-needle { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.il-navy-s { stroke: #002549; stroke-width: 6; }
.il-mini-s { stroke: var(--accent); stroke-width: 2.5; }
.il-acc-s { stroke: var(--accent); stroke-width: 12; }
.il-acc-s2 { stroke: var(--accent); stroke-width: 5; }
.il-green-s { stroke: #28c840; stroke-width: 7; }
.il-soft-s { stroke: var(--border); stroke-width: 5; }
.il-track { stroke: var(--border); stroke-width: 16; }
.il-acc-arc { stroke: var(--accent); stroke-width: 16; }
.il-needle { stroke: var(--text); stroke-width: 6; }
.il-navy-dot { fill: var(--text); }
.il-ring { fill: var(--surface); stroke: var(--accent); stroke-width: 10; }
.il-para { fill: var(--accent-text); font: 700 58px/1 "Segoe UI", system-ui, sans-serif; }

/* So funktioniert's */
.steps-block { text-align: center; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; text-align: left; }
.steps li { counter-increment: step; display: grid; gap: 6px; align-content: start; padding: 20px 0 0; border-top: 1px solid var(--border); }
.steps li::before { content: counter(step); width: 30px; height: 30px; margin-bottom: 6px; border: 1.5px solid var(--border); border-radius: 50%; display: grid; place-items: center; color: var(--accent-text); font-size: 14px; font-weight: 800; }
.steps strong { font-size: 17px; }
.steps span { color: var(--desc); line-height: 1.6; }

/* Vergleichstabelle */
.compare > h2, .compare > p { max-width: 880px; margin-left: auto; margin-right: auto; text-align: center; }
.compare > .small-note { text-align: left; max-width: none; }
.table-wrap { max-width: 100%; margin: 22px 0 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.compare table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 14.5px; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle; }
.compare thead th { background: var(--surface-2); font-size: 14px; line-height: 1.35; }
.compare thead small, .compare td small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.compare tbody th { text-align: left; font-weight: 600; color: var(--text); background: var(--surface); }
.compare tbody tr:last-child > * { border-bottom: 0; }
/* erste Spalte bleibt beim seitlichen Scrollen (Handy) stehen */
.compare th:first-child { position: sticky; left: 0; z-index: 1; }
.compare .ours { background: var(--brand-soft); }
.compare .yes { color: var(--pass); font-size: 17px; font-weight: 800; }
.compare .part { color: var(--warn); font-size: 17px; font-weight: 800; }
.compare .no { color: var(--muted); }

/* Vorteile */
.why h2 { text-align: center; }
.why-grid { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; }
.why-grid li { display: grid; gap: 6px; align-content: start; padding: 18px 0 0; border-top: 1px solid var(--border); }
.why-grid strong { font-size: 16.5px; }
.why-grid span { color: var(--desc); font-size: 15px; line-height: 1.6; }

/* FAQ */
.faq { width: 100%; max-width: 900px; margin: 0 auto; }
.faq h2 { margin-bottom: 22px; text-align: center; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary { position: relative; padding: 18px 44px 18px 0; cursor: pointer; list-style: none; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--accent-text); font-size: 22px; font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0; padding: 0 0 18px; }

/* Abschluss */
.final-cta { padding: clamp(24px, 4vw, 40px); text-align: center; }
.final-cta .btn { margin: 6px 0 16px; }
.seo .more-tools { margin: 0; font-size: 14px; }
.seo .share-row { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.share-row a { display: inline-block; margin: 2px 8px; font-weight: 600; text-decoration: none; }
.share-row a:hover { text-decoration: underline; }

@media (max-width: 1024px) {
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .zz { grid-template-columns: minmax(0, 1fr); }
  .zz .zz-media { order: -1; }
  .ill { max-width: 300px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .compare table { min-width: 640px; font-size: 13.5px; }
  .compare th, .compare td { padding: 10px; }
  .seo p, .checklist li { hyphens: auto; }
  .facts li:nth-child(odd) { border-left: 0; }
  .steps, .why-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ───────── Responsiv ───────── */
@media (max-width: 640px) {
  /* Kopf: Sprache nur als Kürzel, Logo nimmt den restlichen Platz */
  .topbar { gap: 12px; }
  .lang-long { display: none; }
  .lang-short { display: inline; }
  .pill-btn { padding: 0 12px; }

  .scan-row, .mail-row { flex-direction: column; }
  .scan-row .btn, .mail-row .btn { width: 100%; }

  .summary { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .summary:has(> .site-shot) { grid-template-columns: minmax(0, 1fr); }
  .ring { width: 112px; height: 112px; }
  .ring .num b { font-size: 32px; }
  .chips, .summary-actions { justify-content: center; }

  .top3 a { grid-template-columns: 24px 1fr; align-items: start; }
  .top3 .cat { grid-column: 2; text-align: left; }

  .cta-banner .btn { width: 100%; }
  .share-actions .btn { flex: 1 1 calc(50% - 4px); }

  .check-item { gap: 12px; padding: 14px 0; }
  .passed > summary { gap: 12px; }
  .check-text { font-size: 14px; }

  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-actions .btn { width: 100%; }
  .failed .form-actions .btn { width: auto; flex: 1 1 200px; }
}
@media (max-width: 380px) {
  .cat-head { gap: 8px; }
  .cat-head h2 { font-size: 15px; }
  .cat-icon { width: 20px; height: 20px; }
  .cat-chev { width: 26px; height: 26px; }
  .score-badge { min-width: 30px; font-size: 16px; }
  .wc-logo-name { font-size: 18px; }
  .wc-logo-by { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ───────── PDF / Druck ─────────
   Immer hell (Papier), ohne Bedienelemente und Formulare; Farben der Ampeln bleiben erhalten. */
@media print {
  :root, :root[data-theme="light"] {
    --bg: #ffffff; --surface: #ffffff; --surface-2: #f1f4f9; --row: #f8fafc; --border: #d9e0ea;
    --text: #121b2b; --desc: #3f4a5b; --muted: #5a6475;
    --brand: #002549; --brand-soft: #d8e1ec; --accent: #96a722; --accent-text: #5d6b0c; --link: #0b4a8a;
    --pass: #157a3c;  --pass-bg: #e6f5ec;
    --warn: #a85a00;  --warn-bg: #fdf1df;
    --fail: #c0262d;  --fail-bg: #fdeaea;
    --info: #5f6b7d;  --info-bg: #edf1f6;
    --shadow: none;
    --gutter: 0px;
    color-scheme: light;
    --scheme: light;
  }
  @page { margin: 14mm 12mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; transition: none !important; }
  html, body { background: #ffffff !important; }
  body { font-size: 11pt; display: block; }
  .logo-for-light { display: block !important; }
  .logo-for-dark { display: none !important; }
  .print-only { display: block; }

  .topbar { padding: 0 0 10px; }
  .top-actions, .to-top, .back, .summary-actions, .site-shot, .confetti, .cta-banner, .mail-box, .share, dialog,
  .contact form, .contact-phone, .footer a, #view-start, noscript { display: none !important; }
  .footer { padding: 12px 0 0; }

  .card { box-shadow: none; }
  .report { gap: 12px; }
  .summary { grid-template-columns: auto 1fr; text-align: left; justify-items: start; }
  .chips { justify-content: flex-start; }
  .print-link { margin: 0 0 8px; font-size: 10pt; color: var(--muted); overflow-wrap: anywhere; }

  .summary, .top3, .check-item, .cat-head, .passed > summary, .contact { break-inside: avoid; }
  .cat-head, .cat-intro { break-after: avoid; }
  .cat-chev, .explain .chev, .passed > summary .chev, .chip-arrow { display: none; }
  .passed > summary { grid-template-columns: 28px 1fr; }
  details.cat-card > summary:hover { background: none; }
  .explain:not([open]) { display: none; }   /* zugeklappte Erklärungen nicht ins PDF */
  .explain > summary { padding: 0; }
  .check-text { font-size: 10.5pt; max-width: none; }
  a { color: inherit; text-decoration: none; }
}
