/* FormDialog: Hilfebereich /hilfe/ (seit 23.11.2026). Baut auf base.css, site.css und recht.css auf. */

.hb { --hb-nav: 252px; --hb-marke: #E9B44C; --hb-tinte: #0E2A22; }

/* ------------------------------------------------------------- Kopfband */
.hb-kopf {
  padding: clamp(22px, 4vw, 44px) 0 clamp(22px, 3.5vw, 36px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 92% -40%, rgba(14, 91, 73, .09), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
}
.hb-kopf--start { padding-bottom: clamp(26px, 4.5vw, 48px); }
.hb-pfad {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .2rem .55rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .08em;
  color: var(--ink-soft);
  margin-bottom: .9rem;
}
.hb-pfad a { color: var(--ink-soft); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.hb-pfad a:hover { color: var(--green); }
.hb-pfad [aria-current] { color: var(--ink); }
.hb-kopf h1 {
  font-weight: 760;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  margin: 0 0 .6rem;
  max-width: 22ch;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.hb-lead {
  font-size: clamp(1.03rem, 1.6vw, 1.18rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0;
}

/* ------------------------------------------------- Raster: Leiste + Text */
.hb-raster {
  display: grid;
  grid-template-columns: var(--hb-nav) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  padding-top: clamp(24px, 3.5vw, 40px);
  padding-bottom: clamp(40px, 6vw, 80px);
  align-items: start;
  flex: 1 0 auto;
}
.hb-raster > * { min-width: 0; }

.hb-nav {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 92px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 2px 4px 8px 2px;
}
.hb-nav__kopf {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 .6rem .7rem;
}
.hb-navliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hb-navliste a {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 42px;
  padding: .45rem .7rem;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: .93rem;
  line-height: 1.25;
}
.hb-navliste a:hover { background: rgba(14, 91, 73, .06); color: var(--green-deep); }
.hb-navliste a[aria-current] { background: var(--green-tint); color: var(--green-deep); font-weight: 650; box-shadow: inset 3px 0 0 var(--green); }
.hb-symbol { flex: 0 0 auto; width: 19px; height: 19px; color: var(--green); }
.hb-nav__app { margin: 1rem 0 0 .7rem; }

/* Telefon und Tablet hochkant: Klappliste statt Leiste */
.hb-klapp { display: none; }
@media (max-width: 920px) {
  .hb-raster { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .hb-nav { display: none; }
  .hb-klapp {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  .hb-klapp summary {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 48px;
    padding: .5rem 1rem;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
  }
  .hb-klapp summary::-webkit-details-marker { display: none; }
  .hb-klapp summary::after { content: ''; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
  .hb-klapp[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
  .hb-klapp .hb-navliste { padding: 0 .5rem .6rem; }
}

/* ------------------------------------------------------------- Fließtext */
.hb-inhalt { max-width: 880px; }
.hb-inhalt > h2,
.hb-abschnitt > h2 {
  font-weight: 740;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  line-height: 1.15;
  margin: clamp(2.4rem, 5vw, 3.4rem) 0 .8rem;
  scroll-margin-top: 84px;
}
.hb-inhalt > h2:first-child { margin-top: 0; }
.hb-inhalt h3 {
  font-weight: 700;
  font-size: 1.12rem;
  margin: 1.8rem 0 .5rem;
  scroll-margin-top: 84px;
}
.hb-inhalt p, .hb-inhalt li { line-height: 1.68; }
.hb-inhalt p { max-width: 70ch; }
.hb-inhalt ul:not([class]), .hb-inhalt ol:not([class]) { padding-left: 1.25rem; max-width: 68ch; margin: 0 0 1.1rem; }
.hb-inhalt li + li { margin-top: .3rem; }
.hb-inhalt a { color: var(--green); text-underline-offset: .16em; }
.hb-inhalt a:hover { color: var(--green-deep); }
.hb-inhalt code { font-family: var(--font-mono); font-size: .86em; background: rgba(14, 91, 73, .08); padding: .08em .35em; border-radius: 5px; overflow-wrap: anywhere; }
.hb-inhalt kbd {
  font-family: var(--font-mono);
  font-size: .8em;
  padding: .1em .45em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  white-space: nowrap;
}

/* Bedienelement im Text */
.hb-ui {
  display: inline-block;
  font-weight: 650;
  font-size: .9em;
  line-height: 1.35;
  padding: .02em .6em .06em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(27, 32, 29, .05);
}

/* Inhaltsverzeichnis */
.hb-toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.2rem 1.05rem;
  margin: 0 0 2rem;
}
.hb-toc__kopf { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin: 0 0 .55rem; }
.hb-toc ol { list-style: none; margin: 0; padding: 0; columns: 2 16rem; column-gap: 2rem; counter-reset: toc; }
.hb-toc li { counter-increment: toc; break-inside: avoid; margin: 0 0 .15rem; }
.hb-toc a { display: inline-flex; gap: .55rem; min-height: 32px; align-items: baseline; padding: .2rem 0; color: var(--ink); text-decoration: none; line-height: 1.35; }
.hb-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: .74rem; color: var(--ink-soft); }
.hb-toc a:hover { color: var(--green); }

/* ---------------------------------------------------------------- Bilder */
.hb-bild, .hb-film { margin: 1.4rem 0 1.8rem; }
.hb-bild__lupe {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(27, 32, 29, .05), 0 14px 34px -18px rgba(27, 32, 29, .28);
  transition: box-shadow .2s ease, transform .2s ease;
}
.hb-bild__lupe:hover { box-shadow: 0 1px 2px rgba(27, 32, 29, .06), 0 18px 40px -16px rgba(27, 32, 29, .34); }
.hb-bild img { width: 100%; height: auto; }
.hb-bild__plus {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(14, 42, 34, .78);
  color: #fff;
  opacity: 0;
  transition: opacity .2s ease;
}
.hb-bild__plus svg { width: 18px; height: 18px; }
.hb-bild__lupe:hover .hb-bild__plus, .hb-bild__lupe:focus-visible .hb-bild__plus { opacity: 1; }
@media (hover: none) { .hb-bild__plus { opacity: .9; } }
.hb-bild figcaption, .hb-film figcaption {
  margin-top: .75rem;
  font-size: .92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.hb-bild__text { display: block; margin-bottom: .35rem; }
.hb-bild--schmal { max-width: 360px; }
.hb-bild--mittel { max-width: 620px; }

/* Legende zu den Nummernmarken im Bild */
.hb-legende { list-style: none; counter-reset: marke; margin: .6rem 0 0; padding: 0; display: grid; gap: .45rem; }
.hb-legende li { counter-increment: marke; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: .65rem; align-items: start; color: var(--ink); }
.hb-legende li::before {
  content: counter(marke);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: .05rem;
  border-radius: 50%;
  background: var(--hb-marke);
  color: var(--hb-tinte);
  font: 800 .78rem/1 var(--font-body);
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, .18);
}

/* Text neben einem schmalen Bild */
.hb-paar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: clamp(20px, 3vw, 36px); align-items: start; margin: 1.2rem 0 1.6rem; }
.hb-paar > * { min-width: 0; }
.hb-paar .hb-bild { margin: 0; }
.hb-paar .hb-bild--schmal { max-width: none; }
@media (max-width: 720px) {
  .hb-paar { grid-template-columns: minmax(0, 1fr); }
  .hb-paar .hb-bild { max-width: 360px; }
}

/* Mehrere Bilder nebeneinander */
.hb-galerie { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; align-items: start; margin: 1.4rem 0 1.8rem; }
.hb-galerie .hb-bild { margin: 0; }
.hb-galerie figcaption { font-size: .88rem; }

/* ------------------------------------------------------------ Animationen */
.hb-film__rahmen {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #f3f2ee;
  box-shadow: 0 1px 2px rgba(27, 32, 29, .05), 0 14px 34px -18px rgba(27, 32, 29, .28);
}
.hb-film__video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.hb-film--hoch { max-width: 520px; }
.hb-film__knopf {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 .8rem;
  border: 0;
  border-radius: 999px;
  background: rgba(14, 42, 34, .84);
  color: #fff;
  font: 650 .88rem/1 var(--font-body);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  transition: background-color .15s ease, opacity .2s ease;
}
.hb-film__knopf:hover { background: var(--green); }
.hb-film__ico { display: none; width: 18px; height: 18px; flex: 0 0 auto; }
.hb-film__wort { display: none; }
.hb-film__knopf[data-zustand="start"] .hb-film__ico--play,
.hb-film__knopf[data-zustand="pause"] .hb-film__ico--play,
.hb-film__knopf[data-zustand="laeuft"] .hb-film__ico--pause,
.hb-film__knopf[data-zustand="ende"] .hb-film__ico--nochmal,
.hb-film__knopf[data-zustand="ende"] .hb-film__wort { display: block; }
.hb-film__knopf[data-zustand="laeuft"] { opacity: .35; }
.hb-film__rahmen:hover .hb-film__knopf[data-zustand="laeuft"],
.hb-film__knopf[data-zustand="laeuft"]:focus-visible { opacity: 1; }
.hb-film__dauer {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: var(--ink);
  font: 500 .74rem/1 var(--font-mono);
  letter-spacing: .04em;
  pointer-events: none;
}
.hb-film__rahmen.is-laeuft .hb-film__dauer { opacity: 0; transition: opacity .3s; }
.hb-film__marke {
  display: inline-block;
  margin-right: .35rem;
  padding: .05rem .5rem;
  border-radius: 999px;
  background: var(--green-tint);
  color: var(--green-deep);
  font: 600 .72rem/1.5 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  vertical-align: .08em;
}

/* ---------------------------------------------------------- Hinweiskästen */
.hb-tipp {
  margin: 1.3rem 0 1.6rem;
  padding: .95rem 1.15rem 1rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  max-width: 74ch;
}
.hb-tipp p { margin: 0 0 .5rem; }
.hb-tipp > :last-child { margin-bottom: 0; }
.hb-tipp__kopf { font-family: var(--font-mono); font-size: .72rem !important; letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin-bottom: .35rem !important; }
.hb-tipp--wissen { border-left-color: var(--hb-marke); background: #fffaf0; }
.hb-tipp--wissen .hb-tipp__kopf { color: #8a5a00; }
.hb-tipp--achtung { border-left-color: var(--red); background: var(--red-tint); }
.hb-tipp--achtung .hb-tipp__kopf { color: var(--red); }

/* ------------------------------------------------------------- Schritte */
.hb-schritte { list-style: none; counter-reset: schritt; margin: 1.1rem 0 1.6rem; padding: 0; display: grid; gap: .8rem; max-width: 72ch; }
.hb-schritte li { counter-increment: schritt; position: relative; padding-left: 2.85rem; min-height: 2rem; }
.hb-schritte li::before {
  content: counter(schritt);
  position: absolute;
  left: 0;
  top: -.05rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font: 700 .92rem/1 var(--font-display);
}
.hb-schritte li + li { margin-top: 0; }

/* -------------------------------------------------------------- Tabellen */
.hb-tabelle { width: 100%; overflow-x: auto; margin: 1.1rem 0 1.7rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.hb-tabelle table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.hb-tabelle th, .hb-tabelle td { text-align: left; vertical-align: top; padding: .7rem .95rem; border-bottom: 1px solid var(--line); line-height: 1.5; }
.hb-tabelle tr:last-child td { border-bottom: 0; }
.hb-tabelle th { font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); background: rgba(246, 245, 241, .7); }
.hb-tabelle td:first-child { font-weight: 650; white-space: nowrap; }
.hb-tabelle .hb-gruppe td { background: rgba(14, 91, 73, .05); font-family: var(--font-mono); font-size: .74rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--green); padding-top: .5rem; padding-bottom: .5rem; }
@media (max-width: 560px) { .hb-tabelle td:first-child { white-space: normal; } }

/* ----------------------------------------------------------------- Code */
.hb-code { position: relative; margin: 1rem 0 1.5rem; }
.hb-code__titel { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 .4rem; }
.hb-code pre {
  margin: 0;
  padding: 1rem 1.1rem 3.6rem;
  border-radius: 12px;
  background: #1d2420;
  color: #e9efe9;
  font: 400 .84rem/1.6 var(--font-mono);
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hb-code pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.hb-code__kopie {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 36px;
  padding: 0 .85rem;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: 600 .82rem/1 var(--font-body);
  cursor: pointer;
}
.hb-code__kopie:hover { background: rgba(255, 255, 255, .18); }

/* ------------------------------------------------------------- Übersicht */
.hb-start-film { margin-top: 0; }
.hb-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; margin: 1rem 0 2rem; }
.hb-karte {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas: 'ico nr' 'ico titel' 'ico text';
  column-gap: .9rem;
  align-content: start;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .2s ease, transform .2s ease;
}
.hb-karte:hover { border-color: var(--green); box-shadow: 0 12px 28px -18px rgba(14, 91, 73, .55); transform: translateY(-1px); }
.hb-karte__ico { grid-area: ico; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--green-tint); }
.hb-karte__ico .hb-symbol { width: 21px; height: 21px; color: var(--green-deep); }
.hb-karte__nr { grid-area: nr; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; color: var(--ink-soft); }
.hb-karte__titel { grid-area: titel; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.22; margin: .1rem 0 .3rem; }
.hb-karte__text { grid-area: text; font-size: .9rem; line-height: 1.45; color: var(--ink-soft); }

.hb-faq { display: grid; gap: 10px; margin: 1rem 0 2rem; max-width: 780px; }
.hb-faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.hb-faq summary {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 52px;
  padding: .7rem 1.1rem;
  font-weight: 650;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.hb-faq summary::-webkit-details-marker { display: none; }
.hb-faq summary::after { content: '+'; margin-left: auto; font: 500 1.4rem/1 var(--font-body); color: var(--green); transition: transform .2s ease; }
.hb-faq details[open] summary::after { transform: rotate(45deg); }
.hb-faq details p { margin: 0; padding: 0 1.1rem 1rem; color: var(--ink-soft); }

/* ----------------------------------------------------- Weiter und Kontakt */
.hb-weiter { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: clamp(2.4rem, 5vw, 3.4rem) 0 1.4rem; }
.hb-weiter__link {
  display: grid;
  gap: .2rem;
  padding: .95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.25;
  transition: border-color .15s ease;
}
.hb-weiter__link span { font-family: var(--font-mono); font-weight: 500; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.hb-weiter__link:hover { border-color: var(--green); }
.hb-weiter__link--zurueck span::before { content: '\2190\00a0'; }
.hb-weiter__link--vor { text-align: right; grid-column: 2; }
.hb-weiter__link--vor span::after { content: '\00a0\2192'; }
@media (max-width: 560px) {
  .hb-weiter { grid-template-columns: 1fr; }
  .hb-weiter__link--vor { grid-column: auto; }
}

.hb-kontakt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem 1.5rem;
  margin-top: 1.4rem;
  padding: 1.15rem 1.3rem;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
}
.hb-kontakt .hb-kontakt__h { font-size: 1.15rem; font-weight: 700; margin: 0 0 .2rem; color: #fff; scroll-margin-top: 84px; }
.hb-kontakt p { margin: 0; color: rgba(255, 255, 255, .86); }
.hb-kontakt__wege { display: flex; flex-wrap: wrap; gap: .5rem; }
.hb-kontakt__wege a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.hb-kontakt__wege a:hover { background: rgba(255, 255, 255, .22); }

/* ----------------------------------------------------------------- Lupe */
.hb-lupe {
  width: min(96vw, 1600px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
  overflow: auto;
}
.hb-lupe::backdrop { background: rgba(14, 22, 19, .72); backdrop-filter: blur(3px); }
.hb-lupe img { width: 100%; height: auto; }
.hb-lupe form { position: sticky; top: 0; height: 0; z-index: 2; }
.hb-lupe__zu {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(14, 42, 34, .86);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .hb-karte, .hb-bild__lupe { transition: none; }
}
