/* Hilfe-Website help.agency-flow.de (T420). Erzeugt von scripts/hilfe-website.mjs,
   hier nur Stil. Farben als Token, Dunkel über prefers-color-scheme oder den
   Knopf im Kopf (data-thema). Seitenrand 16 px, Tippflächen ab 44 px. */

:root {
  --bg: #f8fafc;
  --flaeche: #ffffff;
  --text: #0f172a;
  --leise: #475569;
  --rand: #e2e8f0;
  --rand-stark: #cbd5e1;
  --primaer: #2563eb;
  --primaer-text: #ffffff;
  --primaer-weich: #eff6ff;
  --hinweis-bg: #fffbeb;
  --hinweis-rand: #fcd34d;
  --hinweis-text: #78350f;
  --code-bg: #f1f5f9;
  --schatten: 0 10px 30px rgba(15, 23, 42, 0.12);
  --radius: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) {
    --bg: #0b1120;
    --flaeche: #111827;
    --text: #e5e7eb;
    --leise: #9ca3af;
    --rand: #1f2937;
    --rand-stark: #374151;
    --primaer: #3b82f6;
    --primaer-text: #ffffff;
    --primaer-weich: #172554;
    --hinweis-bg: #2a2110;
    --hinweis-rand: #a16207;
    --hinweis-text: #fde68a;
    --code-bg: #1f2937;
    --schatten: 0 10px 30px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-thema="dunkel"] {
  --bg: #0b1120;
  --flaeche: #111827;
  --text: #e5e7eb;
  --leise: #9ca3af;
  --rand: #1f2937;
  --rand-stark: #374151;
  --primaer: #3b82f6;
  --primaer-text: #ffffff;
  --primaer-weich: #172554;
  --hinweis-bg: #2a2110;
  --hinweis-rand: #a16207;
  --hinweis-text: #fde68a;
  --code-bg: #1f2937;
  --schatten: 0 10px 30px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 140px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.6 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  overflow-x: hidden;
}
a {
  color: var(--primaer);
}
img {
  max-width: 100%;
  height: auto;
}
:focus-visible {
  outline: 2px solid var(--primaer);
  outline-offset: 2px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Kopf ─────────────────────────────────────────────────────────────── */
.kopf {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--flaeche);
  border-bottom: 1px solid var(--rand);
  padding-top: env(safe-area-inset-top);
}
.kopf-innen {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px max(16px, env(safe-area-inset-right)) 8px
    max(16px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo suche aktionen";
  align-items: center;
  gap: 8px 16px;
}
.logo {
  grid-area: logo;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}
.logo img {
  height: 32px;
  width: auto;
}
.logo-dunkel {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) .logo-hell {
    display: none;
  }
  :root:not([data-thema="hell"]) .logo-dunkel {
    display: block;
  }
}
:root[data-thema="dunkel"] .logo-hell {
  display: none;
}
:root[data-thema="dunkel"] .logo-dunkel {
  display: block;
}
.logo-zusatz {
  font-weight: 600;
  font-size: 15px;
  color: var(--leise);
  padding-inline-start: 8px;
  border-inline-start: 1px solid var(--rand-stark);
}

.suche {
  grid-area: suche;
  position: relative;
  max-width: 520px;
  width: 100%;
  justify-self: center;
}
.suche > svg {
  position: absolute;
  inset-inline-start: 12px;
  top: 12px;
  width: 20px;
  height: 20px;
  color: var(--leise);
  pointer-events: none;
}
.suche input {
  width: 100%;
  height: 44px;
  font-size: 16px;
  padding: 0 12px;
  padding-inline-start: 42px;
  border: 1px solid var(--rand-stark);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}
.suche input::placeholder {
  color: var(--leise);
}
.treffer {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 6px);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 6px;
}
.treffer[hidden] {
  display: none;
}
.treffer a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
}
.treffer a:hover,
.treffer a:focus-visible,
.treffer a[aria-selected="true"] {
  background: var(--primaer-weich);
  outline: none;
}
.treffer b {
  display: block;
  font-weight: 600;
}
.treffer small {
  display: block;
  color: var(--leise);
  font-size: 14px;
  line-height: 1.4;
}
.treffer p {
  margin: 8px 12px;
  color: var(--leise);
}

.aktionen {
  grid-area: aktionen;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sprachwahl {
  position: relative;
}
.sprachwahl summary,
.thema {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--rand-stark);
  border-radius: 10px;
  background: var(--flaeche);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.sprachwahl summary::-webkit-details-marker {
  display: none;
}
.thema svg {
  width: 20px;
  height: 20px;
}
.sprachwahl ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  width: 200px;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 30;
}
.sprachwahl a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.sprachwahl a:hover {
  background: var(--primaer-weich);
}
.sprachwahl a[aria-current] {
  font-weight: 700;
  color: var(--primaer);
}
.zum-crm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--primaer);
  color: var(--primaer-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.zum-crm svg {
  width: 16px;
  height: 16px;
}
[dir="rtl"] .zum-crm svg {
  transform: scaleX(-1);
}

@media (max-width: 767px) {
  .kopf-innen {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "logo aktionen"
      "suche suche";
  }
  .suche {
    max-width: none;
  }
}
@media (max-width: 479px) {
  .logo img {
    height: 28px;
  }
  .logo-zusatz {
    display: none;
  }
  .zum-crm {
    padding: 0 12px;
  }
}

/* ── Inhalt ───────────────────────────────────────────────────────────── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px max(16px, env(safe-area-inset-right)) 48px
    max(16px, env(safe-area-inset-left));
}
h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 8px;
}
.start-kopf {
  max-width: 760px;
  margin-bottom: 24px;
}
.start-kopf p {
  margin: 0;
  color: var(--leise);
  font-size: 17px;
}
.knopf {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--primaer);
  color: var(--primaer-text);
  text-decoration: none;
  font-weight: 600;
}
.gruppe {
  margin-top: 32px;
}
.gruppe h2 {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--leise);
  margin: 0 0 12px;
}
.karten {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.karte {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 14px 16px;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}
.karte:hover {
  border-color: var(--primaer);
}
.karte-titel {
  font-weight: 600;
}
.karte-text {
  color: var(--leise);
  font-size: 14px;
  line-height: 1.45;
}

/* Artikel */
.spalten {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}
.leiste {
  display: none;
}
@media (min-width: 1024px) {
  .spalten {
    grid-template-columns: 260px minmax(0, 760px);
  }
  .leiste {
    display: block;
    position: sticky;
    top: 84px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-inline-end: 8px;
    font-size: 14px;
  }
  .blaettern {
    margin-inline-start: 292px;
  }
}
.leiste details {
  margin-bottom: 8px;
}
.leiste summary {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--leise);
  padding: 6px 8px;
}
.leiste ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.leiste a {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
}
.leiste a:hover {
  background: var(--primaer-weich);
}
.leiste a[aria-current] {
  background: var(--primaer-weich);
  color: var(--primaer);
  font-weight: 600;
}

.artikel {
  min-width: 0;
  max-width: 760px;
}
.pfad {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--leise);
}
.pfad a {
  color: var(--leise);
  text-decoration: none;
  display: inline-block;
  padding: 10px 0;
  margin: -10px 0;
}
.pfad a:hover {
  color: var(--primaer);
}
.unterzeile {
  color: var(--leise);
  font-size: 17px;
  margin: 0 0 16px;
}
.hinweis {
  background: var(--hinweis-bg);
  border: 1px solid var(--hinweis-rand);
  color: var(--hinweis-text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
}
.fliesstext {
  border-top: 1px solid var(--rand);
  padding-top: 8px;
  overflow-wrap: anywhere;
}
.fliesstext h2 {
  font-size: 22px;
  margin: 32px 0 8px;
}
.fliesstext h3 {
  font-size: 19px;
  margin: 28px 0 8px;
}
.fliesstext h4 {
  font-size: 17px;
  margin: 20px 0 6px;
}
.fliesstext ul,
.fliesstext ol {
  padding-inline-start: 24px;
}
.fliesstext li {
  margin: 6px 0;
}
.fliesstext code {
  background: var(--code-bg);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.fliesstext kbd {
  display: inline-block;
  min-width: 1.6em;
  text-align: center;
  border: 1px solid var(--rand-stark);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0 6px;
  font-size: 0.85em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--flaeche);
}
.fliesstext blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--primaer-weich);
  border-inline-start: 4px solid var(--primaer);
  border-radius: 8px;
}
.fliesstext blockquote p {
  margin: 0;
}
.tabelle {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
}
.tabelle table {
  border-collapse: collapse;
  width: 100%;
  min-width: 600px;
  font-size: 14px;
}
.tabelle th,
.tabelle td {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  text-align: start;
  vertical-align: top;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rand);
}
.tabelle th {
  background: var(--code-bg);
}
.tabelle tr:last-child td {
  border-bottom: 0;
}

.bildreihe {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  margin: 20px 0;
}
.bild {
  margin: 0;
  min-width: 0;
}
.bild.quer {
  flex: 1 1 320px;
}
.bild.hoch {
  flex: 1 1 140px;
  max-width: 230px;
}
.bild a {
  display: block;
}
.bild img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--flaeche);
}
.bild figcaption {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--leise);
}

.blaettern {
  max-width: 760px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--rand);
}
.blaettern h2 {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--leise);
  margin: 0 0 12px;
}
.blaettern-reihe {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.blaettern-reihe a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--flaeche);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.blaettern-reihe a:hover {
  border-color: var(--primaer);
}
.blaettern-reihe .nach {
  justify-content: space-between;
  text-align: end;
}
.blaettern-reihe span[aria-hidden] {
  font-size: 22px;
  color: var(--leise);
}
[dir="rtl"] .blaettern-reihe span[aria-hidden] {
  transform: scaleX(-1);
}
.zur-gruppe {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  font-size: 14px;
}

/* ── Fuß ──────────────────────────────────────────────────────────────── */
.fuss {
  border-top: 1px solid var(--rand);
  background: var(--flaeche);
  padding-bottom: env(safe-area-inset-bottom);
}
.fuss-innen {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px max(16px, env(safe-area-inset-right)) 24px
    max(16px, env(safe-area-inset-left));
  color: var(--leise);
  font-size: 14px;
}
.fuss p {
  margin: 0 0 8px;
}
.fuss nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}
.fuss nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--leise);
}
