/*
 * SMARTB4 Website (ersetzt WordPress/Elementor). Baut auf tokens.css auf.
 * Mobile first; Umbruch bei 900px (Navigation) und 720px (Spalten).
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--color-link); text-underline-offset: .15em; }
a:hover { color: var(--color-primary-hover); }
:focus-visible { outline: 3px solid var(--brand-gelb); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-anthrazit);
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
/* Abschnitte */
.section { padding: 64px 0; }
.section-soft { background: var(--color-bg-soft); }
.section-accent { background: var(--color-bg-accent); }
.section-head { max-width: 760px; margin: 0 auto 36px; text-align: center; }
.eyebrow {
  display: inline-block; margin-bottom: .6em;
  font-family: var(--font-heading); font-weight: 600; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--color-primary);
}
.lead { font-size: 1.15rem; color: var(--color-text-muted); }

/* Startbereich */
.hero { background: var(--color-bg-accent); padding: 48px 0 56px; overflow: hidden; }
.hero .container { display: grid; gap: 32px; align-items: center; }
.hero h1 span { color: var(--color-primary); }
.hero .lead { color: var(--brand-anthrazit); }
.hero-visual { position: relative; }
.hero-visual img { display: block; border-radius: var(--radius-l); box-shadow: var(--shadow-m); }
.hero-claim { font-family: var(--font-heading); color: var(--brand-anthrazit); font-weight: 600; margin-top: 1em; }
.check-list { list-style: none; padding: 0; margin: 1.2em 0 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: .5em; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
@media (min-width: 900px) {
  .hero { padding: 72px 0 80px; }
  .hero .container { grid-template-columns: 1.1fr .9fr; gap: 56px; }
}

/* Kacheln mit gelbem Icon (Bildsprache Flyer/Website) */
.tiles { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tile {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-m);
  padding: 22px; box-shadow: var(--shadow-s); display: flex; flex-direction: column;
}
.tile img.icon { width: 64px; height: 64px; border-radius: 14px; margin-bottom: 14px; }
.tile h3 { margin-bottom: .35em; }
.tile p { color: var(--color-text-muted); margin: 0; }
.tile a.more { margin-top: auto; padding-top: 12px; font-weight: 700; text-decoration: none; }
.tile a.more::after { content: " →"; }

/* Zwei Spalten Text/Bild */
.split { display: grid; gap: 32px; align-items: center; }
.split img { border-radius: var(--radius-m); }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split.reverse > :first-child { order: 2; }
}

/* Schritte */
.steps { display: grid; gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { background: #fff; border-radius: var(--radius-m); padding: 24px 24px 24px 76px; position: relative; box-shadow: var(--shadow-s); }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 22px; top: 22px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-gelb); color: var(--brand-anthrazit);
  font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; color: var(--color-text-muted); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Produkte (Karte, Anhänger, Aufkleber) */
.products { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.product { text-align: center; }
.product img { border-radius: var(--radius-m); box-shadow: var(--shadow-s); aspect-ratio: 1097 / 688; object-fit: cover; width: 100%; }
.product h3 { margin: .8em 0 .2em; }
.product p { color: var(--color-text-muted); margin: 0; }

/* Fakten / Vertrauen */
.facts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); list-style: none; padding: 0; margin: 0; }
.facts li { background: #fff; border-left: 4px solid var(--brand-blau); border-radius: var(--radius-s); padding: 16px 18px; box-shadow: var(--shadow-s); }
.facts strong { display: block; font-family: var(--font-heading); color: var(--brand-anthrazit); }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-m); margin-bottom: 12px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; position: relative;
  font-family: var(--font-heading); font-weight: 600; font-size: 1.08rem; color: var(--brand-anthrazit);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; line-height: 1; color: var(--color-primary);
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 20px 18px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* Aufruf */
.cta-band { background: var(--brand-anthrazit); color: #fff; border-radius: var(--radius-l); padding: 40px 28px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #E6E7EA; max-width: 640px; margin-left: auto; margin-right: auto; }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn-outline { background: transparent; border-color: #fff; color: #fff; }
.cta-band .btn-outline:hover { background: rgba(255, 255, 255, .12); }

/* Notfall-Hinweis */
.notice-emergency {
  display: flex; gap: 14px; align-items: flex-start;
  border: 2px solid var(--brand-weinrot); border-radius: var(--radius-m); padding: 16px 18px; background: #fff;
}
.notice-emergency strong { color: var(--brand-weinrot); }

/* Breadcrumb */
.breadcrumb { font-size: .92rem; padding: 14px 0 0; color: var(--color-text-muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--brand-grau); }

/* Fließtext-Seiten (Rechtstexte, Ratgeber) */
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.3em; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
}

/* Seitenkopf der Unterseiten */
.page-hero { background: var(--color-bg-accent); padding: 36px 0 44px; }
.page-hero .container { display: grid; gap: 28px; align-items: center; }
.page-hero .lead { color: var(--brand-anthrazit); max-width: 680px; }
.page-hero img { border-radius: var(--radius-m); }
@media (min-width: 900px) {
  .page-hero { padding: 56px 0 64px; }
  .page-hero.has-visual .container { grid-template-columns: 1.15fr .85fr; gap: 56px; }
}

/* Inhaltsverzeichnis (Sprungmarken) */
.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 1.2em 0 0; }
.toc a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--color-border); text-decoration: none; font-weight: 600; font-size: .95rem; }
.toc a:hover { border-color: var(--color-primary); }

/* Preise */
.plans { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 900px; margin: 0 auto; }
.plan { background: #fff; border: 2px solid var(--color-border); border-radius: var(--radius-l); padding: 28px; display: flex; flex-direction: column; box-shadow: var(--shadow-s); }
.plan.featured { border-color: var(--brand-gelb); box-shadow: var(--shadow-m); }
.plan h3 { font-size: 1.5rem; margin-bottom: .2em; }
.plan .tag { display: inline-block; align-self: flex-start; background: var(--brand-gelb); color: var(--brand-anthrazit); font-weight: 700; font-size: .8rem; padding: 2px 10px; border-radius: 999px; margin-bottom: 10px; }
.price { font-family: var(--font-heading); font-size: 2.4rem; font-weight: 700; color: var(--brand-anthrazit); line-height: 1; margin: .3em 0 .1em; }
.price small { font-size: 1rem; font-weight: 600; color: var(--color-text-muted); }
.price-note { color: var(--color-text-muted); margin-bottom: 1em; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1em; }
.plan li { padding: 6px 0 6px 28px; position: relative; border-top: 1px solid var(--color-border); }
.plan li::before { content: "✓"; position: absolute; left: 4px; color: var(--color-primary); font-weight: 700; }
.plan .btn { margin-top: auto; }
.plan .sub { font-size: .9rem; color: var(--color-text-muted); text-align: center; margin: .6em 0 0; }

.price-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow-s); }
.price-table th, .price-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.price-table th { background: var(--color-bg-soft); font-family: var(--font-heading); font-weight: 600; }
.price-table td:last-child, .price-table th:last-child { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* Produktliste */
.product-list { display: grid; gap: 28px; }
.product-item { display: grid; gap: 20px; background: #fff; border-radius: var(--radius-l); padding: 22px; box-shadow: var(--shadow-s); border: 1px solid var(--color-border); }
.product-item img { border-radius: var(--radius-m); width: 100%; aspect-ratio: 1097 / 688; object-fit: cover; }
.product-item h2 { font-size: 1.45rem; margin-bottom: .3em; }
.product-item .price { font-size: 1.8rem; }
.product-item dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 1em; }
.product-item dt { font-weight: 700; }
.product-item dd { margin: 0; color: var(--color-text-muted); }
@media (min-width: 800px) {
  .product-item { grid-template-columns: 320px 1fr; gap: 32px; padding: 28px; }
}

/* Notfallpass-Assistent */
.np-choices { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0 0 28px; }
.np-choice {
  cursor: pointer; border: 2px solid var(--brand-blau-hell); background: #fff; border-radius: var(--radius-m);
  padding: 18px 14px; text-align: center; font: inherit; color: var(--brand-anthrazit); text-decoration: none; display: block;
}
.np-choice:hover, .np-choice[aria-pressed="true"] { border-color: var(--color-primary); background: var(--color-bg-soft); color: var(--brand-anthrazit); }
.np-choice svg { width: 40px; height: 40px; fill: var(--color-primary); display: block; margin: 0 auto 8px; }
.np-choice b { display: block; font-size: 1.05rem; }
.np-choice small { color: var(--color-text-muted); }
.np-os { background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-m); padding: 26px 20px; margin-bottom: 28px; }
.np-os h2 { font-size: 1.5rem; }
.js .np-os[hidden] { display: none; }
.np-steps { list-style: none; padding: 0; margin: 0; counter-reset: st; }
.np-steps li { position: relative; padding: 4px 0 20px 56px; counter-increment: st; }
.np-steps li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-blau-hell); color: var(--color-primary); font-family: var(--font-heading); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.np-steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; border-left: 2px dashed var(--brand-gelb); }
.path { display: inline-block; background: var(--color-bg-soft); border: 1px solid var(--brand-blau-hell); border-radius: 6px; padding: 0 8px; font-weight: 700; color: var(--color-primary); }
.hint { background: #FFFBE6; border-left: 4px solid var(--brand-gelb); border-radius: 8px; padding: 14px 18px; margin: 8px 0 0; }
.np-variant { border: 1px dashed var(--color-border); border-radius: var(--radius-s); padding: 10px 14px; margin-top: 8px; }
.np-variant + .np-variant { margin-top: 8px; }
.copy { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.copy code { background: var(--color-bg-soft); border: 1px dashed var(--color-primary); border-radius: 6px; padding: 6px 10px; word-break: break-all; }
.btn-sm { min-height: 36px; padding: .35em .9em; font-size: .9rem; }
@media (min-width: 700px) { .np-os { padding: 32px; } }

/* Prüfhinweis (nur Staging) */
.review-note { background: #FFF4D6; border: 2px dashed #C9A100; border-radius: var(--radius-m); padding: 16px 20px; margin: 0 0 32px; font-size: .95rem; }
.review-note ul { margin: .6em 0 0; }
.review-note li { margin-bottom: .3em; }

/* Rechtstexte */
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.1rem; margin-top: 1.4em; }
.legal .meta { color: var(--color-text-muted); }

/* Formular für Code/Hash */
.code-form { background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-m); padding: 22px; }
.code-form label { display: block; font-weight: 700; margin-bottom: 8px; }
.code-row { display: flex; flex-wrap: wrap; gap: 10px; }
.code-row input {
  flex: 1 1 260px; min-height: 52px; padding: 10px 14px; font: inherit; font-size: 1.15rem; letter-spacing: .04em;
  border: 2px solid var(--color-border); border-radius: var(--radius-s); background: #fff; color: var(--color-text);
}
.code-row input:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 3px var(--brand-blau-hell); }
.code-row .btn { min-height: 52px; }
.form-hint { color: var(--color-text-muted); font-size: .95rem; margin: 12px 0 0; }

/* Browser-Test */
.bt-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.bt-list li { background: #fff; border: 1px solid var(--color-border); border-left: 5px solid var(--brand-grau); border-radius: var(--radius-s); padding: 14px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.bt-list li.bt-ok { border-left-color: #2E8B57; }
.bt-list li.bt-ok span::before { content: "✓ "; color: #2E8B57; font-weight: 700; }
.bt-list li.bt-fail { border-left-color: var(--brand-weinrot); }
.bt-list li.bt-fail span { color: var(--brand-weinrot); }

/* Rechtstexte: Inhaltsverzeichnis, Tabellen */
.legal-toc { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-m, 12px); padding: 14px 20px; margin: 1.2em 0 1.6em; }
.legal-toc ol { margin: 0; padding-left: 1.4em; columns: 2 260px; column-gap: 32px; }
.legal-toc li { margin: 2px 0; break-inside: avoid; }
.table-scroll { overflow-x: auto; margin: 1em 0; -webkit-overflow-scrolling: touch; }
.legal table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .95rem; background: #fff; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
.legal th { background: var(--brand-blau-hell); color: var(--brand-anthrazit); font-family: var(--font-heading); }

/* Team */
.team { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.team-member { background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-s, 0 2px 10px rgba(0,0,0,.06)); padding: 18px; display: flex; flex-direction: column; }
.team-member img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 25%; border-radius: var(--radius-m, 12px); margin-bottom: 14px; }
.team-member.team-ai img { object-fit: contain; background: var(--color-bg-soft); }
.team-member h3 { margin: 0 0 .2em; }
.team-role { color: var(--color-primary-hover); font-weight: 700; font-size: .95rem; margin: 0 0 .6em; }
.team-member p { margin: 0 0 .6em; }
.team-member .more, .tile .more { margin-top: auto; font-weight: 700; text-decoration: none; }
a.tile { color: inherit; text-decoration: none; }
a.tile:hover { box-shadow: var(--shadow-m); }
a.tile .more { color: var(--color-link); padding-top: 12px; }

/* Visitenkarte */
.person-photo img { width: 100%; max-height: 640px; object-fit: cover; object-position: 50% 20%; border-radius: var(--radius-l); }
.person-contact { font-style: normal; font-size: 1.1rem; line-height: 1.7; margin: 1em 0; }
.link-list { list-style: none; padding: 0; margin: 1.4em 0 1em; display: flex; flex-wrap: wrap; gap: 8px; }
.link-list a { display: inline-block; padding: 6px 14px; border: 1px solid var(--color-border); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; }

/* News */
article figure { margin: 1.5em 0; }
article figure img { width: 100%; height: auto; border-radius: var(--radius-m, 12px); }
figcaption { color: var(--color-text-muted); font-size: .9rem; margin-top: .5em; }

/* Talk */
.talk-list { display: grid; gap: 40px; }
.talk { display: grid; gap: 24px; align-items: start; scroll-margin-top: 90px; }
@media (min-width: 900px) { .talk { grid-template-columns: 1fr 1fr; } }
.talk-media video, .talk-yt img { display: block; width: 100%; height: auto; border-radius: var(--radius-m, 12px); background: #000; }
.talk-yt { position: relative; display: block; text-decoration: none; }
.talk-yt span { position: absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,.75); color: #fff; padding: 6px 12px; border-radius: 999px; font-weight: 700; }
.talk-yt-empty { aspect-ratio: 16 / 9; border-radius: var(--radius-m, 12px); background: linear-gradient(135deg, var(--brand-anthrazit), var(--color-primary-hover)); }
.talk-text h2 { font-size: 1.4rem; margin-top: 0; }
.talk-text h2 small { color: var(--color-text-muted); font-weight: 400; font-size: .9rem; }
.talk-text details { margin: .8em 0; }
.talk-text summary { cursor: pointer; font-weight: 700; color: var(--color-link); }
.h3 { font-size: 1.25rem; }
main > .review-note { max-width: 1180px; margin: 16px auto; width: calc(100% - 32px); }

/* Video-Kasten auf Themen-/Produktseiten */
.video-block { display: grid; gap: 20px; align-items: center; background: var(--brand-blau-hell); border-radius: var(--radius-l); padding: 20px; margin: 24px 0; }
@media (min-width: 760px) { .video-block { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.video-block h3 { margin: .2em 0 .4em; }
.video-block p { margin: 0 0 .6em; }
.talk-yt-empty { display: flex; flex-direction: column; justify-content: center; padding: 24px 24px 60px; color: #fff; }
.talk-yt-empty strong { font-family: var(--font-heading); font-size: 1.5rem; line-height: 1.2; }
.talk-yt-empty em { font-style: normal; opacity: .85; margin-top: 6px; }

/* Ratgeber */
.lead.answer { border-left: 4px solid var(--brand-gelb); padding-left: 16px; }
.disclaimer { font-size: .92rem; color: var(--color-text-muted); background: var(--color-bg-soft); border-radius: var(--radius-s); padding: 10px 14px; }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; background: #fff; font-size: .97rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
.compare thead th { background: var(--brand-blau-hell); color: var(--brand-anthrazit); font-family: var(--font-heading); }
.compare tbody th { font-weight: 700; white-space: nowrap; }
.checklist-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 1em 0 2em; }
.checklist-group { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-m, 12px); padding: 14px 18px; break-inside: avoid; }
.checklist-group h3 { margin: 0 0 .5em; font-size: 1.1rem; }
.checkbox-list { list-style: none; padding: 0; margin: 0; }
.checkbox-list li { position: relative; padding-left: 28px; margin: .35em 0; }
.checkbox-list li::before { content: ""; position: absolute; left: 0; top: .2em; width: 16px; height: 16px; border: 2px solid var(--color-primary); border-radius: 4px; }

@media print {
  .site-header, .site-footer, .breadcrumb, .cta-band, .review-note, .no-print, .sb4-chat, .legal-toc, .faq, video { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .page-hero { background: none !important; padding: 0 !important; }
  .section { padding: 8px 0 !important; }
  a { color: #000; text-decoration: none; }
  .checklist-grid { grid-template-columns: 1fr 1fr; }
}
