.hbsc-root {
  --hbsc-ink: #102236;
  --hbsc-muted: #526277;
  --hbsc-line: #d8e1ea;
  --hbsc-surface: #ffffff;
  --hbsc-soft: #f4f8fb;
  --hbsc-brand: #176b87;
  --hbsc-brand-dark: #0e5269;
  --hbsc-brand-soft: #e8f5f9;
  --hbsc-success: #207a52;
  --hbsc-success-soft: #eaf6ef;
  --hbsc-warning: #8a5700;
  --hbsc-warning-soft: #fff5d9;
  --hbsc-danger: #a22d2d;
  --hbsc-danger-soft: #fff0ef;
  --hbsc-focus: #f5a623;
  color: var(--hbsc-ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.55;
  margin: 2rem auto;
  max-width: 820px;
}

.hbsc-root *,
.hbsc-root *::before,
.hbsc-root *::after {
  box-sizing: border-box;
}

.hbsc-shell {
  background: var(--hbsc-surface);
  border: 1px solid var(--hbsc-line);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(16, 34, 54, 0.12);
  overflow: hidden;
}

.hbsc-topbar {
  align-items: center;
  background: #0d263a;
  color: #fff;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 52px;
  padding: 0.65rem 1.25rem;
}

.hbsc-brand {
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hbsc-exit {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 38px;
  padding: 0.38rem 0.85rem;
}

.hbsc-exit:hover { background: rgba(255, 255, 255, 0.1); }

.hbsc-progress-wrap {
  background: #e8eef3;
  height: 6px;
  overflow: hidden;
}

.hbsc-progress {
  background: linear-gradient(90deg, #19a2ba, #46b879);
  height: 100%;
  transition: width 220ms ease;
  width: 0;
}

.hbsc-panel { padding: clamp(1.3rem, 4vw, 2.6rem); }

.hbsc-eyebrow {
  color: var(--hbsc-brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin: 0 0 0.55rem;
  text-transform: uppercase;
}

.hbsc-root h1,
.hbsc-root h2,
.hbsc-root h3 {
  color: var(--hbsc-ink);
  font-family: inherit;
  line-height: 1.18;
  margin-top: 0;
}

.hbsc-root h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin-bottom: 0.8rem; }
.hbsc-root h2 { font-size: clamp(1.45rem, 3.8vw, 2rem); margin-bottom: 0.7rem; }
.hbsc-root h3 { font-size: 1.08rem; margin-bottom: 0.5rem; }

.hbsc-lede {
  color: var(--hbsc-muted);
  font-size: 1.05rem;
  margin: 0 0 1.35rem;
  max-width: 66ch;
}

.hbsc-meta {
  align-items: center;
  color: var(--hbsc-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.88rem;
  gap: 0.45rem 1rem;
  margin-bottom: 1.25rem;
}

.hbsc-meta span::before { color: var(--hbsc-success); content: "✓"; font-weight: 800; margin-right: 0.35rem; }

.hbsc-privacy {
  background: var(--hbsc-brand-soft);
  border-left: 4px solid var(--hbsc-brand);
  border-radius: 10px;
  color: #24475b;
  font-size: 0.9rem;
  margin: 1.2rem 0;
  padding: 0.9rem 1rem;
}

.hbsc-emergency {
  background: var(--hbsc-danger-soft);
  border: 1px solid #f1c0bc;
  border-radius: 12px;
  color: #6f2323;
  margin: 1rem 0;
  padding: 0.95rem 1rem;
}

.hbsc-emergency strong { display: block; margin-bottom: 0.15rem; }

.hbsc-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.hbsc-button {
  align-items: center;
  background: var(--hbsc-brand);
  border: 2px solid var(--hbsc-brand);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.hbsc-button:hover { background: var(--hbsc-brand-dark); border-color: var(--hbsc-brand-dark); color: #fff; transform: translateY(-1px); }
.hbsc-button--secondary { background: #fff; color: var(--hbsc-brand); }
.hbsc-button--secondary:hover { background: var(--hbsc-brand-soft); color: var(--hbsc-brand-dark); }
.hbsc-button--quiet { background: transparent; border-color: transparent; color: var(--hbsc-muted); padding-inline: 0.55rem; }
.hbsc-button--quiet:hover { background: var(--hbsc-soft); border-color: var(--hbsc-soft); color: var(--hbsc-ink); }
.hbsc-button--danger { background: var(--hbsc-danger); border-color: var(--hbsc-danger); }

.hbsc-button:focus-visible,
.hbsc-exit:focus-visible,
.hbsc-choice:focus-within,
.hbsc-card:focus-within,
.hbsc-details summary:focus-visible,
.hbsc-link:focus-visible {
  outline: 3px solid var(--hbsc-focus);
  outline-offset: 3px;
}

.hbsc-step-label { color: var(--hbsc-muted); font-size: 0.85rem; margin-bottom: 1rem; }

.hbsc-options,
.hbsc-card-grid {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.hbsc-fieldset {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.hbsc-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.hbsc-choice,
.hbsc-card {
  background: #fff;
  border: 2px solid var(--hbsc-line);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.85rem 1rem;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.hbsc-card { align-items: flex-start; }
.hbsc-choice { align-items: center; }
.hbsc-choice:hover,
.hbsc-card:hover { background: var(--hbsc-soft); border-color: #9cb3c4; }
.hbsc-choice:has(input:checked),
.hbsc-card:has(input:checked) { background: var(--hbsc-brand-soft); border-color: var(--hbsc-brand); box-shadow: 0 0 0 1px var(--hbsc-brand); }

.hbsc-choice input,
.hbsc-card input {
  accent-color: var(--hbsc-brand);
  flex: 0 0 auto;
  height: 20px;
  margin: 0.14rem 0 0;
  width: 20px;
}

.hbsc-choice-copy { display: block; }
.hbsc-choice-copy strong { display: block; font-weight: 750; }
.hbsc-choice-copy small { color: var(--hbsc-muted); display: block; margin-top: 0.12rem; }

.hbsc-suboptions {
  background: var(--hbsc-soft);
  border: 1px solid var(--hbsc-line);
  border-radius: 12px;
  margin: 0.75rem 0 1.15rem;
  padding: 1rem;
}

.hbsc-suboptions[hidden] { display: none; }
.hbsc-suboptions legend { font-weight: 750; padding: 0 0.25rem; }
.hbsc-suboptions .hbsc-options { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0.7rem 0 0; }

.hbsc-error {
  color: var(--hbsc-danger);
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 0.7rem;
}

.hbsc-details {
  border-top: 1px solid var(--hbsc-line);
  margin-top: 1rem;
  padding-top: 0.8rem;
}

.hbsc-details summary { color: var(--hbsc-brand-dark); cursor: pointer; font-weight: 700; }
.hbsc-details p { color: var(--hbsc-muted); font-size: 0.9rem; margin-bottom: 0; }

.hbsc-result-banner {
  border: 1px solid var(--hbsc-line);
  border-left-width: 7px;
  border-radius: 14px;
  margin: 1rem 0 1.4rem;
  padding: 1.1rem 1.2rem;
}

.hbsc-result-banner--low { background: var(--hbsc-success-soft); border-left-color: var(--hbsc-success); }
.hbsc-result-banner--caution { background: var(--hbsc-warning-soft); border-left-color: #d68b00; }
.hbsc-result-banner--high,
.hbsc-result-banner--very-high,
.hbsc-result-banner--safety { background: var(--hbsc-danger-soft); border-left-color: var(--hbsc-danger); }
.hbsc-result-banner--identity { background: #f2edff; border-left-color: #7048b7; }
.hbsc-result-banner h2 { margin-bottom: 0.45rem; }
.hbsc-result-banner p { margin: 0; }

.hbsc-badges { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.85rem 0 0; }
.hbsc-badge { background: rgba(255, 255, 255, 0.74); border: 1px solid currentColor; border-radius: 999px; display: inline-flex; font-size: 0.78rem; font-weight: 750; padding: 0.25rem 0.6rem; }

.hbsc-section { border-top: 1px solid var(--hbsc-line); margin-top: 1.5rem; padding-top: 1.35rem; }
.hbsc-section > p { color: var(--hbsc-muted); }

.hbsc-list { margin: 0.65rem 0 0; padding-left: 1.25rem; }
.hbsc-list li { margin-bottom: 0.55rem; padding-left: 0.2rem; }

.hbsc-action-group {
  background: var(--hbsc-soft);
  border: 1px solid var(--hbsc-line);
  border-radius: 12px;
  margin-top: 0.8rem;
  padding: 1rem;
}

.hbsc-action-group h3 { margin-bottom: 0.45rem; }
.hbsc-action-group ol { margin: 0; padding-left: 1.3rem; }
.hbsc-action-group li { margin-bottom: 0.4rem; }

.hbsc-report-list { display: grid; gap: 0.65rem; list-style: none; margin: 0.8rem 0 0; padding: 0; }
.hbsc-report-list li { border: 1px solid var(--hbsc-line); border-radius: 10px; padding: 0.8rem 0.9rem; }
.hbsc-report-list strong { display: block; }
.hbsc-link { color: var(--hbsc-brand-dark); font-weight: 750; overflow-wrap: anywhere; }

.hbsc-cta {
  background: #0d263a;
  border-radius: 14px;
  color: #fff;
  margin-top: 1.5rem;
  padding: 1.2rem;
}
.hbsc-cta h3 { color: #fff; }
.hbsc-cta p { color: #dce9f1; }
.hbsc-cta .hbsc-button { background: #fff; border-color: #fff; color: #0d5268; }

.hbsc-disclaimer {
  color: var(--hbsc-muted);
  font-size: 0.82rem;
  margin-top: 1.4rem;
}

.hbsc-loading,
.hbsc-notice {
  background: var(--hbsc-soft);
  border: 1px solid var(--hbsc-line);
  border-radius: 12px;
  padding: 1rem;
}
.hbsc-notice--warning { background: var(--hbsc-warning-soft); }

.hbsc-visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 640px) {
  .hbsc-root { margin: 1rem 0; }
  .hbsc-shell { border-radius: 14px; }
  .hbsc-panel { padding: 1.2rem; }
  .hbsc-card-grid,
  .hbsc-suboptions .hbsc-options { grid-template-columns: 1fr; }
  .hbsc-actions { align-items: stretch; flex-direction: column; }
  .hbsc-button { width: 100%; }
  .hbsc-button--quiet { order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .hbsc-root *,
  .hbsc-root *::before,
  .hbsc-root *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .hbsc-topbar,
  .hbsc-progress-wrap,
  .hbsc-actions,
  .hbsc-exit,
  .hbsc-cta .hbsc-button { display: none !important; }
  .hbsc-root { max-width: none; }
  .hbsc-shell { border: 0; box-shadow: none; }
  .hbsc-panel { padding: 0; }
  .hbsc-result-banner,
  .hbsc-action-group,
  .hbsc-cta { break-inside: avoid; }
}
