/* handbuch.css - Gestaltung des Glieks-Handbuchs (/lernen/handbuch, Y-1660 b, BS-1775).
   Aufbau: Kopfband mit Bild, Kapitel-Kacheln als Inhaltsverzeichnis, je Kapitel Kopf (Nummer, Titel, Kernsatz),
   Text mit Bildschirmfoto, Schrittfolge, Hinweiskasten und passende Lernfilme; Anhang mit den Schritten der Folgen.
   Groessen: Kacheln klein (Symbol 24 px, Titel 17 px), keine grossen Knoepfe; 390 px einspaltig, ab 760 px zwei, ab 1040 px drei Spalten.
   Farben nur aus den Marken-Token von glieks.css (Kontrast >= 4.5:1 fuer Text). */

.hb { width: min(1120px, calc(100% - 32px)); margin-inline: auto; padding-block: 24px 56px; color: var(--g-petrol); }
.hb a { color: var(--g-petrol); text-underline-offset: 3px; }
.hb a:hover { color: var(--g-petrol-hover); }
.hb a:focus-visible, .hb summary:focus-visible { outline: 3px solid var(--g-petrol); outline-offset: 3px; border-radius: 4px; }
.hb-krume { font-size: 15px; color: var(--g-muted); margin: 0 0 16px; }
.hb-nur-leser { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopfband */
.hb-kopf { display: grid; gap: 20px; align-items: center; background: var(--g-sage); border-radius: var(--g-rund-gross); padding: 24px 20px; margin-bottom: 32px; }
.hb-kopf__marke { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--g-muted); margin: 0 0 6px; }
.hb-kopf h1 { font-family: var(--g-marke); font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 12px; }
.hb-kopf__satz { font-size: 19px; line-height: 1.5; margin: 0 0 16px; max-width: 46ch; }
.hb-kopf__fakten { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.hb-kopf__fakten li { background: var(--g-white); border: 1px solid var(--g-line); border-radius: 999px; padding: 4px 12px; font-size: 15px; }
.hb-kopf__bild { margin: 0; display: none; }
.hb-kopf__bild img { width: 100%; height: auto; display: block; border-radius: var(--g-rund); }
.hb-laden { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; font-size: 16px; }
.hb-laden li { display: block; padding-left: 28px; position: relative; line-height: 1.45; }
.hb-laden svg { position: absolute; left: 0; top: 1px; }

/* Kapitel-Kacheln */
.hb-ueberschrift { font-family: var(--g-marke); font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; }
.hb-unterzeile { color: var(--g-muted); margin: 0 0 16px; }
.hb-kacheln { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 10px; grid-template-columns: 1fr; }
.hb-kachel a { display: grid; grid-template-columns: 40px 1fr; gap: 2px 12px; align-items: start; align-content: start; height: 100%; padding: 12px 14px; border: 1px solid var(--g-line); border-radius: var(--g-rund); background: var(--g-white); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.hb-kachel a:hover { border-color: var(--g-petrol); box-shadow: var(--g-schatten-kopf); }
.hb-kachel__symbol { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; background: var(--g-sage); display: grid; place-items: center; }
.hb-kachel__titel { font-weight: 600; font-size: 17px; line-height: 1.3; }
.hb-kachel__nr { color: var(--g-muted); font-weight: 600; margin-right: 4px; }
.hb-kachel__text { font-size: 15px; line-height: 1.4; color: var(--g-muted); }

/* Kapitel */
.hb-kapitel { border-top: 1px solid var(--g-line); padding-top: 32px; margin-top: 40px; }
.hb-kapitel__kopf { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.hb-kapitel__nr { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--g-petrol); color: #fff; display: grid; place-items: center; font-family: var(--g-marke); font-weight: 600; font-size: 20px; }
.hb-kapitel h2 { font-family: var(--g-marke); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -.02em; margin: 4px 0 0; }
.hb-kern { font-size: 19px; line-height: 1.5; margin: 0 0 16px; max-width: 60ch; }
.hb-raster + .hb-raster { margin-top: 24px; }
.hb-kapitel > p { margin: 0 0 12px; line-height: 1.6; }
.hb-raster { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
.hb-text p { margin: 0 0 12px; line-height: 1.6; }
.hb-text h3 { font-size: 19px; margin: 20px 0 8px; }
.hb-text h3:first-child { margin-top: 0; }
.hb-punkte { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.hb-punkte li { position: relative; padding-left: 26px; line-height: 1.5; }
.hb-punkte li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 10px; height: 10px; border-radius: 3px; background: var(--g-apricot); }

/* Bildschirmfotos */
.hb-bild { margin: 0; }
.hb-bild img { display: block; width: 100%; height: auto; border: 1px solid var(--g-line); border-radius: var(--g-rund); box-shadow: var(--g-schatten-kopf); background: var(--g-white); }
.hb-bild figcaption { font-size: 15px; color: var(--g-muted); margin-top: 8px; line-height: 1.4; }

/* Schritte */
.hb-schritte { list-style: none; counter-reset: schritt; padding: 0; margin: 4px 0 16px; display: grid; gap: 10px; }
.hb-schritte li { counter-increment: schritt; position: relative; padding: 10px 14px 10px 52px; background: var(--g-sage-hell); border: 1px solid var(--g-line-weich); border-radius: var(--g-rund-klein); line-height: 1.5; min-height: 44px; }
.hb-schritte li::before { content: counter(schritt); position: absolute; left: 12px; top: 9px; width: 28px; height: 28px; border-radius: 50%; background: var(--g-petrol); color: #fff; font-weight: 600; font-size: 15px; display: grid; place-items: center; }

/* Hinweiskaesten */
.hb-kasten { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 16px; border-radius: var(--g-rund-klein); margin: 0 0 16px; line-height: 1.5; }
.hb-kasten p { margin: 0 0 6px; }
.hb-kasten p:last-child { margin-bottom: 0; }
.hb-kasten--tipp { background: var(--g-apricot-soft); border-left: 6px solid var(--g-apricot); }
.hb-kasten--gut { background: var(--g-success-bg); border-left: 6px solid var(--g-success); }
.hb-kasten--info { background: var(--g-working-bg); border-left: 6px solid var(--g-working); }
.hb-kasten__titel { font-weight: 600; }
.hb-kasten .hb-kachel__symbol { width: 28px; height: 28px; background: transparent; border-radius: 0; }

/* Faehigkeiten (Kapitel 1) */
.hb-zwischen { font-family: var(--g-marke); font-size: 20px; margin: 28px 0 8px; }
.hb-faehig { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 10px; grid-template-columns: 1fr; }
.hb-faehig li { display: grid; grid-template-columns: 36px 1fr; gap: 2px 12px; align-content: start; padding: 12px 14px; border-radius: var(--g-rund); background: var(--g-white); border: 1px solid var(--g-line-weich); }
.hb-faehig .hb-kachel__symbol { width: 36px; height: 36px; grid-row: span 2; }
.hb-faehig strong { font-size: 17px; }
.hb-faehig span { font-size: 15px; color: var(--g-muted); line-height: 1.45; }

/* Lernfilme je Kapitel */
.hb-filme { margin: 8px 0 0; }
.hb-filme__titel { font-size: 16px; font-weight: 600; margin: 0 0 8px; color: var(--g-muted); }
.hb-filme ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
.hb-film a { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 6px; border: 1px solid var(--g-line); border-radius: var(--g-rund-klein); background: var(--g-white); text-decoration: none; }
.hb-film a:hover { border-color: var(--g-petrol); }
.hb-film img { width: 112px; height: 63px; object-fit: cover; border-radius: 6px; display: block; }
.hb-film__titel { font-weight: 600; font-size: 15px; line-height: 1.3; display: block; }
.hb-film__info { font-size: 14px; color: var(--g-muted); display: flex; align-items: center; gap: 4px; margin-top: 2px; }

.hb-hoch { font-size: 15px; margin: 16px 0 0; }
.hb-hoch a { display: inline-block; padding-block: 6px; }

/* Anhang: Folgen Schritt fuer Schritt */
.hb-anhang details { border: 1px solid var(--g-line); border-radius: var(--g-rund-klein); background: var(--g-white); margin-bottom: 8px; }
.hb-anhang summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style-position: inside; }
.hb-anhang .hb-anhang__inhalt { padding: 0 16px 12px; }
.hb-anhang .hb-anhang__inhalt h3 { margin: 16px 0 6px; font-size: 17px; }
.hb-anhang ol.hb-folgenschritte { padding-left: 22px; margin: 0 0 8px; }
.hb-anhang ol.hb-folgenschritte li { margin-bottom: 4px; line-height: 1.5; }
.hb-schloss { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--g-muted); font-weight: 600; }
.hb-fuss { color: var(--g-muted); font-size: 15px; margin-top: 32px; }

@media (min-width: 560px) {
  .hb-kacheln, .hb-faehig { grid-template-columns: repeat(2, 1fr); }
  .hb-filme ul { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 760px) {
  .hb-kopf { grid-template-columns: 1.15fr 1fr; padding: 32px 36px; }
  .hb-kopf__bild { display: block; }
  .hb-raster { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
  .hb-raster--schmal { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}
@media (min-width: 1040px) {
  .hb-kacheln { grid-template-columns: repeat(3, 1fr); }
  .hb-faehig { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .hb-kachel a { transition: none; } }
@media print {
  .hb-kachel a, .hb-film a { box-shadow: none; }
  .hb-kapitel { break-before: page; border-top: 0; margin-top: 0; }
  .hb-schritte li, .hb-kasten, .hb-bild, .hb-film { break-inside: avoid; }
  .hb-anhang details > summary { list-style: none; }
}
