/* Kieselwerk – Stylesheet
   Gilt für alle Seiten und Bausteine. Farben sind Variablen: helles + dunkles Farbschema,
   und jeder Abschnitt kann über .bg-hell / .bg-sand / .bg-petrol seine eigene Palette setzen. */

/* ---------- Schriften (lokal, keine Verbindung zu Google) ---------- */
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* ---------- Farben & Maße ---------- */
:root {
  --paper: #FBFAF7;
  --sand: #EFEBE4;
  --graphit: #1F2422;
  --petrol: #256C70;

  --bg: var(--paper);
  --surface: var(--sand);
  --fg: var(--graphit);
  --muted: #5A605C;
  --line: #D9D4CC;
  --kiesel: #A8A196;
  --accent: var(--petrol);
  --accent-hover: #1C5558;
  --on-accent: #EFEBE4;
  --ocker: #B5793A;
  --todo-bg: #F6E7D4;
  --todo-fg: #6B4413;

  --petrol-bg: #256C70;
  --petrol-surface: #2D777B;
  --petrol-fg: #EFEBE4;
  --petrol-muted: #BFD3D2;
  --petrol-line: rgba(239, 235, 228, 0.25);

  --font-sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2.25rem, 1.6rem + 3vw, 4rem);

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161A19; --sand: #1F2422;
    --bg: #161A19; --surface: #1F2422; --fg: #EFEBE4; --muted: #A8A196; --line: #343B38; --kiesel: #6E6A62;
    --accent: #6DB1B4; --accent-hover: #8CC4C6; --on-accent: #161A19; --ocker: #D39A5C; --todo-bg: #3A2E20; --todo-fg: #F1D2AC;
    --petrol-bg: #1B3B3D; --petrol-surface: #22484A; --petrol-muted: #9FBDBC;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161A19; --sand: #1F2422;
  --bg: #161A19; --surface: #1F2422; --fg: #EFEBE4; --muted: #A8A196; --line: #343B38; --kiesel: #6E6A62;
  --accent: #6DB1B4; --accent-hover: #8CC4C6; --on-accent: #161A19; --ocker: #D39A5C; --todo-bg: #3A2E20; --todo-fg: #F1D2AC;
  --petrol-bg: #1B3B3D; --petrol-surface: #22484A; --petrol-muted: #9FBDBC;
  color-scheme: dark;
}

/* Abschnitts-Paletten */
.bg-hell { --bg: var(--paper); --surface: var(--sand); background: var(--bg); color: var(--fg); }
.bg-sand { --bg: var(--sand); --surface: var(--paper); background: var(--bg); color: var(--fg); }
.bg-petrol {
  --bg: var(--petrol-bg); --surface: var(--petrol-surface); --fg: var(--petrol-fg); --muted: var(--petrol-muted);
  --line: var(--petrol-line); --kiesel: var(--petrol-muted); --accent: var(--petrol-fg); --accent-hover: #FFFFFF;
  --on-accent: var(--petrol-bg); --ocker: #E2B27F;
  background: var(--bg); color: var(--fg);
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--fg);
  font-family: var(--font-sans); font-size: var(--step-0); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--ocker); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.label {
  font-family: var(--font-mono); font-weight: 500; font-size: var(--step--1);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--bg); padding: 8px 12px; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Fehlende Angaben (Platzhalter ohne Wert) */
.todo { background: var(--todo-bg); color: var(--todo-fg); padding: 0 0.35em; border-radius: 3px; font-style: normal; font-size: 0.92em; }

/* Formatierter Text */
.prose { display: grid; gap: 14px; max-width: 65ch; }
.prose h2 { font-size: var(--step-1); margin-top: 24px; }
.prose h3 { font-size: 1.0625rem; margin-top: 12px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.prose > :first-child { margin-top: 0; }
.prose strong { font-weight: 600; }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; color: var(--fg); }
.brand svg { height: 30px; width: auto; display: block; }
.logo-mark { fill: var(--accent); }
.logo-word { fill: var(--fg); }
.nav { display: flex; align-items: center; gap: 28px; font-size: 0.9375rem; }
.nav a { color: var(--fg); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav .btn { padding: 8px 16px; }
@media (max-width: 720px) { .nav .nav-link { display: none; } }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font: inherit; font-weight: 500; line-height: 1.2;
  padding: 13px 22px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-accent); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.nav a.btn, .btn:hover { color: var(--on-accent); }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--kiesel); }
.btn-ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }

/* ---------- Einstieg (Hero) ---------- */
.hero { overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: 32px; padding-block: clamp(48px, 8vw, 112px);
}
.hero.no-visual .wrap { grid-template-columns: minmax(0, 1fr); }
.hero.no-visual .hero-text { max-width: 46rem; }
.hero-text { display: grid; gap: 24px; min-width: 0; }
.hero h1 { font-size: var(--step-3); font-weight: 600; letter-spacing: -0.03em; }
.hero h1 .accent { display: block; color: var(--accent); }
.hero .lead { font-size: var(--step-1); color: var(--muted); max-width: 34em; line-height: 1.5; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 20px 0 0; margin: 8px 0 0; list-style: none;
  border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted);
}
.hero-facts li::before { content: "— "; color: var(--kiesel); }
.hero-map { position: relative; min-width: 0; margin-right: calc(var(--gutter) * -1.5); }
.hero-map svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero-image { min-width: 0; }
.hero-image img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.contour { fill: none; stroke: var(--accent); stroke-width: 0.34; stroke-linejoin: round; }
.contour.summit { fill: var(--accent); stroke: none; }
@media (prefers-reduced-motion: no-preference) {
  .contour.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.4,0,.2,1) forwards; animation-delay: calc(var(--i) * 110ms); }
  .contour.summit { animation: fade .6s ease-out .9s backwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-map { margin: 0 auto; max-width: 460px; width: 100%; order: -1; }
}

/* ---------- Abschnitte ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; overflow: hidden; }
.section > .wrap { position: relative; }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 40em; }
.section-head h2 { font-size: var(--step-2); }
.section-head p { color: var(--muted); }
.section-head.no-margin { margin-bottom: 0; }

/* Karten / Leistungen */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.services[data-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 40em; }
.services[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.services[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service { display: grid; gap: 14px; align-content: start; padding-top: 22px; border-top: 2px solid var(--accent); min-width: 0; }
.service h3 { font-size: var(--step-1); }
.service p { color: var(--muted); }
.service ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; font-size: 0.9375rem; }
.service li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: baseline; }
.service li::before { content: ""; width: 9px; height: 8px; border-radius: 50% 46% 52% 44%; background: var(--kiesel); transform: translateY(-1px); }
@media (max-width: 1000px) { .services[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .services, .services[data-count="2"], .services[data-count="4"] { grid-template-columns: 1fr; } }

/* Ablauf */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 0; counter-reset: step; }
.step { position: relative; padding: 0 24px 0 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: var(--step--1); font-weight: 500; color: var(--accent);
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--accent); background: var(--bg); position: relative; z-index: 1;
}
.step::after { content: ""; position: absolute; top: 22px; left: 44px; right: 0; border-top: 1.5px dashed var(--kiesel); }
.step:last-child::after { display: none; }
.step h3 { font-size: var(--step-1); margin-top: 6px; }
.step p { color: var(--muted); font-size: 0.9375rem; max-width: 22em; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step { grid-template-columns: 44px 1fr; column-gap: 18px; padding: 0; }
  .step::before { grid-row: span 2; }
  .step h3 { margin-top: 8px; }
  .step::after { top: 44px; bottom: -28px; left: 22px; right: auto; border-top: 0; border-left: 1.5px dashed var(--kiesel); }
}

/* Projekte */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.projects[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); min-width: 0; }
.project-visual { aspect-ratio: 16 / 7; max-width: 100%; background: var(--surface); display: grid; place-items: center; border-bottom: 1px solid var(--line); overflow: hidden; }
.project-visual svg { width: auto; height: 56%; max-width: 60%; }
.project-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-body { display: grid; gap: 10px; padding: 24px; align-content: start; }
.project-body h3 { font-size: var(--step-1); }
.project-body p { color: var(--muted); }
.project-body .more { font-weight: 500; }
.tag { justify-self: start; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 3px 10px; }
@media (max-width: 1000px) { .projects[data-count="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .projects, .projects[data-count="3"] { grid-template-columns: 1fr; } }

/* Über mich */
.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-text { display: grid; gap: 18px; max-width: 36em; }
.about-text h2 { font-size: var(--step-2); }
.about-side { display: grid; gap: 24px; min-width: 0; }
.about-side img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); display: block; }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.facts div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--font-mono); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding-top: 2px; }
.facts dd { margin: 0; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* Text */
.text-block { display: grid; gap: 18px; }
.text-block h2 { font-size: var(--step-2); }

/* Bild & Text */
.image-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.image-text.image-right .image-text-media { order: 2; }
.image-text-media img, .image-text-media .placeholder-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.placeholder-image { background: var(--surface); display: grid !important; place-items: center; color: var(--muted); font-family: var(--font-mono); font-size: var(--step--1); }
.image-text-body { display: grid; gap: 18px; min-width: 0; }
.image-text-body h2 { font-size: var(--step-2); }
@media (max-width: 860px) { .image-text { grid-template-columns: 1fr; } .image-text.image-right .image-text-media { order: 0; } }

/* Fragen & Antworten */
.faq { display: grid; border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 24px; padding: 20px 0; font-weight: 500; font-size: var(--step-1); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .prose { padding: 0 0 22px; color: var(--muted); }

/* Kontakt */
.contact .wrap { display: grid; gap: 22px; }
.contact h2 { font-size: var(--step-3); max-width: 14em; }
.contact .lead { color: var(--muted); max-width: 34em; font-size: var(--step-1); line-height: 1.5; }
.section-pattern { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.section-pattern path { fill: none; stroke: var(--fg); stroke-opacity: .12; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 8px; }
.mail { font-size: clamp(1.25rem, 1rem + 1.6vw, 2.25rem); font-weight: 500; color: var(--fg); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; overflow-wrap: anywhere; }
.mail:hover { color: var(--fg); text-decoration-color: var(--muted); }
.copy { font: 500 var(--step--1)/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; background: transparent; color: var(--fg); border: 1px solid var(--muted); border-radius: 999px; padding: 10px 14px; cursor: pointer; }
.copy:hover { border-color: var(--fg); }

/* Rechtstexte */
.legal-page { padding-block: clamp(48px, 7vw, 96px); }
.legal-page .wrap { max-width: 820px; }
.legal-page h1 { font-size: var(--step-3); margin: 12px 0 40px; }
.legal-page .prose h2 { margin-top: 32px; }
.stand { margin-top: 40px; font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }

/* Fußzeile */
.site-footer { border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); background: var(--paper); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 28px; }
.foot-brand { display: inline-flex; align-items: center; gap: 12px; }
.foot-brand svg { width: 22px; height: auto; display: block; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--accent); text-decoration: underline; }

/* 404 */
.notfound { padding-block: clamp(80px, 14vw, 180px); }
.notfound .wrap { display: grid; gap: 20px; justify-items: start; }
.notfound h1 { font-size: var(--step-3); }
.notfound p { color: var(--muted); max-width: 32em; }

/* Brotkrumen (Unterseiten) */
.breadcrumb { border-bottom: 1px solid var(--line); background: var(--paper); }
.breadcrumb ol { list-style: none; margin: 0; padding: 14px 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 10px; color: var(--kiesel); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--fg); }

/* Unterseiten-Übersicht */
.subpages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.subpage-card { display: grid; gap: 10px; align-content: start; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--fg); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.subpage-card:hover { border-color: var(--accent); color: var(--fg); }
.subpage-card h3 { font-size: var(--step-1); }
.subpage-card p { color: var(--muted); }
.subpage-card .more { color: var(--accent); font-weight: 500; margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) { .subpage-card:hover { transform: translateY(-2px); } }

/* Titelgröße je Abschnitt */
.ts-s { --step-2: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); }
.ts-l { --step-2: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); --step-3: clamp(2.75rem, 1.8rem + 4.4vw, 5.25rem); }

/* Freie Fläche: Elemente frei positioniert, skaliert mit der Breite (Bezug 1040 px) */
.freeform { position: relative; container-type: inline-size; aspect-ratio: 1040 / var(--h, 560); }
.ff-el { position: absolute; min-width: 0; }
.ff-text { font-size: calc(var(--fs, 24) * 100cqw / 1040); line-height: 1.3; }
.ff-inner { display: grid; gap: .45em; }
.ff-inner p, .ff-inner ul, .ff-inner ol, .ff-inner h2, .ff-inner h3 { margin: 0; }
.ff-inner h2 { font-size: 1.4em; } .ff-inner h3 { font-size: 1.15em; }
.ff-inner ul, .ff-inner ol { padding-left: 1.1em; }
.ff-img img, .ff-img .placeholder-image { display: block; width: 100%; height: auto; }
.ff-img .placeholder-image { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.ff-img.rounded img { border-radius: var(--radius); }
.c-fg { color: var(--fg); } .c-accent { color: var(--accent); } .c-muted { color: var(--muted); } .c-ocker { color: var(--ocker); }
.a-center { text-align: center; } .a-right { text-align: right; }
.f-mono { font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.w-strong { font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.ff-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-family: var(--font-mono); font-size: var(--step--1); border: 1.5px dashed var(--line); border-radius: var(--radius); }
@media (max-width: 700px) {
  .freeform { aspect-ratio: auto; display: flex; flex-direction: column; gap: 20px; }
  .ff-el { position: static; width: auto !important; }
  .ff-text { font-size: clamp(16px, calc(var(--fs, 24) * .62px), 44px); }
  .ff-empty { position: static; min-height: 160px; }
}
.image-text.no-image { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }

/* ---------- Hörbeispiel A/B ---------- */
.ab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.ab-body { display: grid; gap: 18px; align-content: start; }
.ab-body h2 { font-size: var(--step-2); }
.ab-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); display: grid; gap: 20px; }
.ab-song { font-size: var(--step-1); font-weight: 600; }
.ab-artist { display: block; font-family: var(--font-mono); font-weight: 500; font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.ab-player { display: grid; gap: 18px; }
.ab-player[hidden], .ab-fallback[hidden] { display: none; }
.ab-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ab-play { width: 56px; height: 56px; flex: none; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; display: grid; place-items: center; }
.ab-play:hover { background: var(--accent-hover); }
.ab-play svg { width: 24px; height: 24px; fill: currentColor; }
.ab-play .i-pause, .is-playing .ab-play .i-play { display: none; }
.is-playing .ab-play .i-pause { display: inline; }
.ab-switch { display: inline-flex; border: 1px solid var(--kiesel); border-radius: 999px; padding: 3px; gap: 2px; }
.ab-switch button { font: inherit; font-size: var(--step--1); border: 0; border-radius: 999px; padding: 9px 16px; background: transparent; color: var(--fg); cursor: pointer; }
.ab-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.ab-key { font-family: var(--font-mono); font-weight: 500; margin-right: 4px; }
.ab-track { display: flex; align-items: center; gap: 14px; }
.ab-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line); cursor: pointer; position: relative; }
.ab-bar::before { content: ""; position: absolute; inset: -10px 0; }
.ab-fill { height: 100%; width: 0; border-radius: 3px; background: var(--accent); }
.ab-time { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); min-width: 9ch; text-align: right; }
.ab-match { display: flex; align-items: center; gap: 10px; font-size: var(--step--1); color: var(--muted); cursor: pointer; }
.ab-match input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.ab-status:empty { display: none; }
.ab-status { font-size: var(--step--1); color: var(--muted); }
.ab-fallback { display: grid; gap: 14px; }
.ab-fallback figure { margin: 0; display: grid; gap: 8px; }
.ab-fallback audio { width: 100%; }
.ab .btn { gap: 10px; }
.svc-icon { width: 20px; height: 20px; flex: none; }
.ab-note { font-size: var(--step--1); color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
@media (max-width: 860px) { .ab { grid-template-columns: minmax(0, 1fr); } }
