/* Hilfe – the handbook. Uses the colours of the Managed Hub (hub.css: light and dark). */
body.hb { overflow: hidden; }
.hb-app { display: grid; grid-template-columns: 320px minmax(0, 1fr) 250px; height: 100vh; }
.hb-side { display: flex; flex-direction: column; min-height: 0; background: var(--bg2); border-right: 1px solid var(--line); }
.hb-brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; }
.hb-brand img { width: 32px; height: 32px; }
.hb-brand b { display: block; font-size: 17px; }
.hb-brand small { color: var(--muted); font-size: 12.5px; }
.hb-close { margin-left: auto; display: none; }
.hb-search { position: relative; margin: 6px 14px 10px; }
.hb-search > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.hb-search input { width: 100%; height: 44px; padding: 0 40px 0 38px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); font-size: 15px; }
.hb-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hb-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 12px/1 ui-monospace, Consolas, monospace; color: var(--muted);
  border: 1px solid var(--line2); border-radius: 5px; padding: 3px 6px; }
.hb-toc, .hb-results { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.hb-toc-head { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 9px 10px; border-radius: 8px; text-align: left; font-weight: 600; }
.hb-toc-head:hover { background: var(--card2); }
.hb-toc-ch.open > .hb-toc-head { color: var(--accent); }
.hb-chev { margin-left: auto; display: flex; transition: transform .15s; color: var(--muted); }
.hb-toc-ch.open .hb-chev { transform: rotate(180deg); }
.hb-toc-subs { display: none; padding: 0 0 6px 10px; }
.hb-toc-ch.open .hb-toc-subs { display: block; }
.hb-toc-subs a { display: flex; gap: 8px; padding: 6px 10px; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 14px; }
.hb-toc-subs a:hover { background: var(--card2); }
.hb-num { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; flex: none; min-width: 32px; }
.hb-side-foot { padding: 12px 14px; border-top: 1px solid var(--line); }
.hb-side-foot .btn { width: 100%; justify-content: center; }
.hb-support { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.hb-contact { display: inline-block; margin-top: 6px; font-size: 13px; }

.hb-hit { display: flex; flex-direction: column; gap: 2px; width: 100%; border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 10px; }
.hb-hit:hover, .hb-hit.sel { background: var(--accent-soft); }
.hb-hit-t { font-weight: 700; display: flex; gap: 6px; }
.hb-hit-c { font-size: 12.5px; color: var(--muted); }
.hb-hit-x { font-size: 13.5px; color: var(--text); opacity: .85; }
.hb-hit mark { background: color-mix(in srgb, var(--warn) 40%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.hb-none { padding: 14px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.hb-none b { color: var(--text); }

.hb-main { display: block; height: 100%; overflow-y: auto; min-width: 0; scroll-behavior: auto; }   /* hub.css makes <main> a flex column */
.hb-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hb-menu { display: none; }
.hb-crumbs { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-crumb { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 600; }
.hb-crumbs b { overflow: hidden; text-overflow: ellipsis; }
.hb-article { max-width: 860px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 48px) 24px; font-size: 16px; line-height: 1.65; }
.hb-article p { margin: 0 0 14px; }
.hb-h1 { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15; margin: 8px 0 18px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.hb-h2 { font-size: 23px; margin: 40px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; scroll-margin-top: 70px; }
.hb-h3 { font-size: 18.5px; margin: 26px 0 10px; display: flex; gap: 10px; align-items: baseline; scroll-margin-top: 70px; }
.hb-h1 .hb-num, .hb-h2 .hb-num, .hb-h3 .hb-num { color: var(--accent); min-width: 0; }
.hb-anchor { opacity: 0; color: var(--muted); text-decoration: none; font-size: .8em; margin-left: auto; }
h1:hover .hb-anchor, h2:hover .hb-anchor, h3:hover .hb-anchor { opacity: 1; }
.hb-h2.flash, .hb-h3.flash { animation: flash 1.6s; }
@keyframes flash { 0%, 40% { background: var(--accent-soft); box-shadow: 0 0 0 8px var(--accent-soft); border-radius: 6px; } 100% { background: transparent; box-shadow: 0 0 0 8px transparent; } }
.hb-article code { font: 600 .9em ui-monospace, Consolas, monospace; background: var(--card2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.hb-article kbd { font: 600 .85em ui-monospace, Consolas, monospace; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--card); }
.hb-ui { display: inline-block; font-weight: 700; font-size: .92em; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line2); background: var(--card); white-space: nowrap; }
.hb-list, .hb-steps { margin: 0 0 16px; padding-left: 0; list-style: none; }
.hb-list li { position: relative; padding-left: 22px; margin: 6px 0; }
.hb-list li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hb-steps { counter-reset: step; }
.hb-steps > li { position: relative; padding: 2px 0 10px 46px; margin: 0; counter-increment: step; }
.hb-steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; }
.hb-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.hb-steps ul { margin: 6px 0 0; padding-left: 18px; }
.hb-fig { margin: 14px 0 22px; }
.hb-fig img { display: block; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in; background: var(--card); }
.hb-fig.small img { max-width: min(100%, 560px); }
.hb-fig.missing img { display: none; }
.hb-fig.missing::before { content: "Bild folgt"; display: grid; place-items: center; height: 120px; border-radius: 10px; border: 1px dashed var(--line2); color: var(--muted); background: var(--card2); font-size: 14px; }
.hb-fig figcaption { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.hb-inline-img { height: 1.3em; vertical-align: middle; }
.hb-box { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; border: 1px solid var(--line); background: var(--card); }
.hb-box-ic { flex: none; display: flex; padding-top: 2px; }
.hb-box-t { display: block; margin-bottom: 2px; }
.hb-box.tip { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: color-mix(in srgb, var(--ok) 9%, var(--card)); }
.hb-box.tip .hb-box-ic { color: var(--ok-text); }
.hb-box.important, .hb-box.info { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.hb-box.important .hb-box-ic, .hb-box.info .hb-box-ic { color: var(--info-text); }
.hb-box.warn { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 8%, var(--card)); }
.hb-box.warn .hb-box-ic { color: var(--err-text); }
.hb-box.support { border-style: dashed; }
.hb-table { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; }
.hb-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.hb-table th, .hb-table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.hb-table th { background: var(--card2); font-size: 13px; }
.hb-table tr:last-child td { border-bottom: 0; }
.hb-pager { max-width: 860px; margin: 0 auto 60px; padding: 0 clamp(16px, 4vw, 48px); display: flex; justify-content: space-between; gap: 12px; }
.hb-page { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line2); background: var(--card); border-radius: 12px; padding: 12px 16px; min-width: 0; max-width: 48%; text-align: left; }
.hb-page.next { text-align: right; margin-left: auto; }
.hb-page small { color: var(--muted); }
.hb-page:hover { border-color: var(--accent); }
.hb-onpage { border-left: 1px solid var(--line); padding: 22px 16px; overflow-y: auto; font-size: 13.5px; display: flex; flex-direction: column; gap: 2px; }
.hb-onpage b { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.hb-onpage a { color: var(--muted); text-decoration: none; padding: 4px 8px; border-radius: 6px; border-left: 2px solid transparent; }
.hb-onpage a.l3 { padding-left: 20px; font-size: 13px; }
.hb-onpage a:hover { color: var(--text); }
.hb-onpage a.on { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
.hb-scrim { display: none; }
.hb-zoom { position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 16, .88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.hb-zoom img { max-width: 100%; max-height: 86vh; border-radius: 8px; background: #fff; }
.hb-zoom p { color: #fff; margin: 10px 0 0; text-align: center; }

@media (max-width: 1240px) { .hb-app { grid-template-columns: 300px minmax(0, 1fr); } .hb-onpage { display: none; } }
@media (max-width: 860px) {
  .hb-app { grid-template-columns: minmax(0, 1fr); }
  .hb-side { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); transform: translateX(-102%); transition: transform .25s; box-shadow: 10px 0 40px rgba(0, 0, 0, .25); }
  .hb-app.side-open .hb-side { transform: none; }
  .hb-scrim.show { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .4); }
  .hb-menu, .hb-close { display: inline-flex; }
  .hb-search kbd { display: none; }
  .hb-steps > li { padding-left: 40px; }
  .hb-page { max-width: 100%; }
  .hb-pager { flex-direction: column; }
}

/* ---- print: only the text and pictures ------------------------------------------------------------------------- */
@media print {
  body.hb { overflow: visible; background: #fff; color: #111; }
  .hb-side, .hb-top, .hb-pager, .hb-onpage, .hb-anchor, .hb-scrim, .hb-zoom { display: none !important; }
  .hb-app { display: block; height: auto; }
  .hb-main { overflow: visible; }
  .hb-article { max-width: none; padding: 0; font-size: 11pt; }
  .hb-print-ch { break-before: page; }
  .hb-print-ch:first-child { break-before: auto; }
  .hb-h2 { break-after: avoid; }
  .hb-fig, .hb-box, .hb-table { break-inside: avoid; }
  .hb-fig img { max-height: 120mm; width: auto; box-shadow: none; }
}
