/*! Online-Berater */
.hit-berater { --b-navy: #001D6E; --b-sky: #7FB5FF; --b-glow: #CFE5FF; --b-ink: #0B1533; --b-muted: #46526F; --b-line: #DDE4F0; --b-paper: #F4F7FC; --b-ok: #B86D4A; --b-warn: #8A4B00; --b-err: #B4232A; max-width: 1120px; margin-inline: auto; color: var(--b-ink) }
.hit-berater * { box-sizing: border-box }
.hit-berater [hidden]:not(.hb-back) { display: none !important }
.hit-berater:not(.is-js) .hb-shell { display: none }
.hb-noscript { padding: 1.2rem; border-radius: 14px; background: #FFF6E6; color: var(--b-warn); font-weight: 600 }
.hb-shell { position: relative; background: #fff; border: 1px solid var(--b-line); border-radius: 26px; padding: clamp(1.1rem, 3.5vw, 2.4rem); box-shadow: 0 50px 90px -50px rgba(0,29,110,.6); overflow: clip; container-type: inline-size; container-name: hb }
.hb-shell::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--b-navy), var(--b-sky), var(--b-navy)); background-size: 200% 100%; animation: hb-flow 4s linear infinite }
@keyframes hb-flow { from { opacity: .7 } to { opacity: 1 } }

/* Fortschritt */
.hb-nav { list-style: none; margin: 0 0 1.8rem; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .4rem; counter-reset: hb }
.hb-nav li { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; font: 600 .82rem/1.2 'Barlow Condensed', 'Arial Narrow', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--b-muted); position: relative }
.hb-nav li::before { content: ""; position: absolute; top: 17px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 2px; background: var(--b-line); transition: transform .2s ease, opacity .2s ease}
.hb-nav li:first-child::before { display: none }
.hb-nav span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--b-paper); border: 2px solid var(--b-line); color: var(--b-muted); font: 700 .95rem Montserrat, sans-serif; transition: transform .2s ease, opacity .2s ease; position: relative; z-index: 1 }
.hb-nav li.is-done::before, .hb-nav li.is-on::before { background: var(--b-sky) }
.hb-nav li.is-done span { background: var(--b-glow); border-color: var(--b-sky); color: var(--b-navy) }
.hb-nav li.is-on { color: var(--b-navy) }
.hb-nav li.is-on span { background: var(--b-navy); border-color: var(--b-navy); color: #fff; box-shadow: 0 0 0 6px rgba(127,181,255,.3), 0 0 24px rgba(127,181,255,.7) }

/* Fragen */
.hb-step { display: grid; gap: 1.5rem; animation: hb-in .45s cubic-bezier(.2,.7,.2,1) }
@keyframes hb-in { from { opacity: 0; transform: translateX(24px) } }
.hb-step h2 { margin: 0; font: 800 clamp(1.5rem, 3.2vw, 2.1rem)/1.15 Montserrat, 'Segoe UI', sans-serif; color: var(--b-navy); outline: none }
.hb-intro { margin: -.9rem 0 0; color: var(--b-muted); font-size: 1.05rem }
.hb-q { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: .7rem }
.hb-q legend, .hb-q > label { font: 700 1.08rem/1.35 Barlow, 'Segoe UI', sans-serif; color: var(--b-ink); padding: 0; margin-bottom: .7rem }
.hb-q > label { margin-bottom: 0 }
.hb-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: .6rem }
.hb-opt { position: relative; cursor: pointer; display: block; scroll-margin-top: 110px }
.hit-berater { scroll-margin-top: 90px }
.hb-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer }
.hb-opt span { display: flex; align-items: center; gap: .7rem; min-height: 56px; height: 100%; padding: .75rem 1rem; border-radius: 14px; border: 2px solid var(--b-line); background: var(--b-paper); font-weight: 600; line-height: 1.3; transition: transform .2s ease, opacity .2s ease}
.hb-opt span::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #9AA8C4; background: #fff; transition: transform .2s ease, opacity .2s ease}
.hb-q[data-multi] .hb-opt span::before { border-radius: 6px }
.hb-opt:hover span { border-color: var(--b-sky); transform: translateY(-2px) }
.hb-opt input:checked + span { border-color: var(--b-navy); background: #fff; box-shadow: 0 0 0 4px rgba(127,181,255,.3), 0 14px 26px -18px rgba(0,29,110,.7) }
.hb-opt input:checked + span::before { border-color: var(--b-navy); background: var(--b-navy); box-shadow: inset 0 0 0 4px #fff }
.hb-q[data-multi] .hb-opt input:checked + span::before { box-shadow: none; background: var(--b-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat }
.hb-opt input:focus-visible + span { outline: 3px solid var(--b-navy); outline-offset: 2px }
.hb-plz input { max-width: 220px; font: 600 1.2rem Barlow, sans-serif; letter-spacing: .12em; color: var(--b-ink); background: var(--b-paper); border: 2px solid var(--b-line); border-radius: 14px; padding: .8rem 1rem; min-height: 56px }
.hb-plz input:focus { outline: none; border-color: var(--b-navy); background: #fff; box-shadow: 0 0 0 4px rgba(127,181,255,.35) }
.hb-plz input[aria-invalid="true"] { border-color: var(--b-err) }
.hb-hint, .hb-err { margin: 0; font-size: .95rem; font-weight: 600 }
.hb-hint:empty, .hb-err:empty { display: none }
.hb-hint.is-ok { color: var(--b-ok) } .hb-hint.is-warn { color: var(--b-warn) }
.hb-err { color: var(--b-err) }
.hb-q.has-err .hb-opt span { border-color: #F3C2C5 }

.hb-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--b-line) }
.hb-back { border: 0; background: none; color: var(--b-navy); font: 600 1rem Barlow, sans-serif; padding: .8rem 1rem; border-radius: 10px; cursor: pointer; min-height: 48px }
.hb-back:hover { background: var(--b-paper) }
.hb-back[hidden] { display: block; visibility: hidden }
.hb-next, .hb-cta { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 0; cursor: pointer; text-decoration: none; font: 600 1.05rem/1 Barlow, 'Segoe UI', sans-serif; color: #fff !important; padding: 1.05rem 2rem; min-height: 52px; border-radius: 14px; background: linear-gradient(135deg, #001D6E, #2563D9); box-shadow: 0 14px 30px -12px rgba(0,29,110,.7), 0 0 30px rgba(127,181,255,.45); transition: transform .2s ease, opacity .2s ease}
.hb-next::after { content: "→"; transition: transform .2s ease, opacity .2s ease}
.hb-next:hover, .hb-cta:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(0,29,110,.8), 0 0 50px rgba(127,181,255,.7) }
.hb-next:hover::after { transform: translateX(4px) }
.hb-next:focus-visible, .hb-back:focus-visible, .hb-cta:focus-visible, .hb-tool:focus-visible { outline: 3px solid var(--b-navy); outline-offset: 3px }
.hb-next:disabled { opacity: .7; cursor: progress }
.hb-status { margin: 1rem 0 0; color: var(--b-muted); font-weight: 600 }
.hb-status:empty { display: none }

/* Ergebnis */
.hb-result { outline: none }
.hb-result.is-enter { animation: hb-res .6s cubic-bezier(.2,.7,.2,1) }
@keyframes hb-res { from { opacity: 0; transform: translateY(16px) scale(.99) } }
.hb-r-head { padding: clamp(1.2rem, 3vw, 2rem); border-radius: 20px; background: radial-gradient(120% 140% at 0% 0%, #0A2A8A 0%, #001D6E 45%, #00113A 100%); color: #fff; margin-bottom: 1.4rem; position: relative; overflow: hidden }
.hb-r-head::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(127,181,255,.45), transparent 70%) }
.hb-r-head h2 { margin: .2rem 0 .6rem; font: 800 clamp(1.5rem, 3.4vw, 2.3rem)/1.15 Montserrat, sans-serif; color: #fff }
.hb-r-head p { margin: 0; max-width: 62ch; color: #DCE8FF; font-size: 1.05rem }
.hb-r-kicker { font: 600 .85rem 'Barlow Condensed', sans-serif !important; letter-spacing: .14em; text-transform: uppercase; color: var(--b-sky) !important }
.hb-r-date { margin-top: .8rem !important; font-size: .9rem !important; color: #A9BCE3 !important }
.hb-r-head.is-keine_hardware { background: radial-gradient(120% 140% at 0% 0%, #E7A27C 0%, #B86D4A 45%, #5F3524 100%) }
.hb-r-head.is-keine_hardware .hb-r-kicker { color: #FFE0CE !important }
.hb-r-head.is-passt_nicht, .hb-r-head.is-gebiet { background: linear-gradient(135deg, #3A2A00, #6B4400) }
.hb-r-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start }
.hb-r-main, .hb-r-side { display: grid; gap: 1rem; min-width: 0 }
.hb-r-side { position: sticky; top: 90px }
.hb-box { background: #fff; border: 1px solid var(--b-line); border-radius: 18px; padding: 1.1rem 1.2rem }
.hb-box h3 { margin: 0 0 .7rem; font: 700 1.1rem Montserrat, sans-serif; color: var(--b-navy) }
.hb-box ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem }
.hb-box p { margin: 0 }
.hb-box.is-sec { border-left: 4px solid #2563D9 }
.hb-box.is-bk { border-left: 4px solid var(--b-sky) }
.hb-box.is-tip { background: var(--b-paper) }
.hb-box.is-not { background: #EAF7F0; border-color: #E8B69A }
.hb-box.is-not h3 { color: var(--b-ok) }
.hb-box.is-not ul { list-style: none; padding: 0 }
.hb-box.is-not li { position: relative; padding-left: 1.6rem }
.hb-box.is-not li::before { content: "✕"; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--b-ok) }
.hb-tablewrap { overflow-x: auto; margin: 0 -.2rem }
.hb-bom table { width: 100%; border-collapse: collapse; font-size: .97rem }
.hb-bom th { text-align: left; font: 600 .82rem 'Barlow Condensed', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--b-muted); padding: .4rem .5rem; border-bottom: 2px solid var(--b-line) }
.hb-bom td { padding: .7rem .5rem; border-bottom: 1px solid var(--b-line); vertical-align: top }
.hb-bom td strong { display: block; color: var(--b-ink) }
.hb-bom td small { color: var(--b-muted); font-size: .85rem }
.hb-bom .hb-why { color: var(--b-muted); font-size: .92rem; min-width: 200px }
.hb-bom .hb-qty { font-weight: 700; color: var(--b-navy); white-space: nowrap }
.hb-bom .hb-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600 }
.hb-bom tr.is-service td { background: #F8FAFE }
.hb-sum dl { margin: 0; display: grid; gap: .45rem }
.hb-sum dl div { display: flex; justify-content: space-between; gap: 1rem }
.hb-sum dt { color: var(--b-muted) } .hb-sum dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600 }
.hb-sum .is-total { border-top: 2px solid var(--b-line); padding-top: .6rem; margin-top: .3rem }
.hb-sum .is-total dt, .hb-sum .is-total dd { color: var(--b-navy); font: 800 1.35rem Montserrat, sans-serif }
.hb-small { margin-top: .8rem !important; font-size: .88rem; color: var(--b-muted) }
.hb-go { background: linear-gradient(160deg, #F4F7FC, #E6EEFC); border-color: #C9D8F5; display: grid; gap: .9rem }
.hb-go .hb-cta { width: 100%; text-align: center }
.hb-r-links { margin-top: 1rem }
.hb-r-tools { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--b-line) }
.hb-tool { border: 2px solid var(--b-line); background: #fff; color: var(--b-navy); font: 600 .98rem Barlow, sans-serif; padding: .65rem 1.1rem; border-radius: 12px; cursor: pointer; min-height: 44px; transition: transform .2s ease, opacity .2s ease}
.hb-tool:hover { border-color: var(--b-sky); transform: translateY(-1px) }
.hb-tool.is-quiet { margin-left: auto; border-color: transparent; color: var(--b-muted) }
.hb-note { margin: 1rem auto 0; max-width: 760px; text-align: center; font-size: .9rem; color: var(--b-muted) }
.hb-print-head { display: none }

@container hb (max-width: 900px) {
  .hb-r-grid { grid-template-columns: minmax(0, 1fr) }
  .hb-r-side { position: static; grid-row: 1 }
  .hb-box.is-not { order: 2 }
}
@media (max-width: 640px) {
  .hb-nav { grid-template-columns: repeat(6, 1fr); gap: 0 }
  .hb-nav li { font-size: 0; gap: 0 }
  .hb-nav li.is-on { font-size: .72rem; gap: .3rem }
  .hb-nav span { width: 30px; height: 30px; font-size: .85rem }
  .hb-nav li::before { top: 14px; left: calc(-50% + 16px); right: calc(50% + 16px) }
  .hb-actions { position: sticky; bottom: 0; background: #fff; margin-inline: -1.1rem; padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 2 }
  .hb-next { flex: 1 }
  .hb-q, .hb-opt { scroll-margin-bottom: 110px }
  .hb-bom thead { display: none }
  .hb-bom tr { display: grid; grid-template-columns: auto 1fr auto; column-gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--b-line) }
  .hb-bom td { border: 0; padding: .1rem 0 }
  .hb-bom .hb-why { grid-column: 2 / -1; grid-row: 2; min-width: 0 }
  .hb-tool.is-quiet { margin-left: 0 }
}
@media (prefers-reduced-motion: reduce) {
  .hb-shell::before, .hb-step, .hb-result.is-enter { animation: none }
  .hb-opt span, .hb-next, .hb-cta, .hb-tool { transition: none }
}

/* Druck / PDF: nur der kopierte Ergebnis-Container (siehe berater.js) */
.hb-print { display: none }
@media print {
  @page { size: A4; margin: 14mm 12mm }
  html.hb-printing body > *:not(.hb-print) { display: none !important }
  html.hb-printing body { background: #fff !important }
  .hb-print { display: block; max-width: none; font-size: 10.5pt; color: #000 }
  .hb-print, .hb-print * { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important }
  .hb-print .hb-print-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid #001D6E; padding-bottom: 6px; margin-bottom: 12px; font-size: 9pt }
  .hb-print .hb-print-head strong { color: #001D6E }
  .hb-print .hb-r-head { background: none !important; color: #000; padding: 0 0 8px; border-radius: 0; margin-bottom: 10px }
  .hb-print .hb-r-head::after { display: none }
  .hb-print .hb-r-head h2 { color: #001D6E !important; font-size: 18pt }
  .hb-print .hb-r-head p, .hb-print .hb-r-kicker, .hb-print .hb-r-date { color: #333 !important }
  .hb-print .hb-r-grid { display: block }
  .hb-print .hb-r-main, .hb-print .hb-r-side { display: block; position: static }
  .hb-print .hb-box { break-inside: avoid; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; box-shadow: none }
  .hb-print .hb-bom { break-inside: auto }
  .hb-print .hb-bom tr { break-inside: avoid }
  .hb-print .hb-go .hb-cta { display: none }
  .hb-print-foot { margin-top: 10px; font-size: 8.5pt; color: #444; word-break: break-all }
}

