:root {
  --bh-bg: #f4efe4;
  --bh-bg-deep: #ebe3d3;
  --bh-surface: rgba(255, 252, 247, 0.88);
  --bh-surface-strong: #fffdf9;
  --bh-ink: #14110d;
  --bh-muted: #6f665b;
  --bh-honey: #e5a93b;
  --bh-honey-deep: #c48922;
  --bh-border: rgba(40, 32, 22, 0.12);
  --bh-glow: rgba(229, 169, 59, 0.3);
  --bh-danger: #8a2f1d;
  --bh-ok: #2f6a3a;
  --bh-radius: 22px;
  --bh-shadow: 0 24px 60px rgba(40, 28, 10, 0.08);
  --bh-font: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --bh-sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --bh-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.bh-body {
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(229, 169, 59, 0.16), transparent 50%),
    radial-gradient(900px 500px at 110% 10%, rgba(196, 137, 34, 0.1), transparent 45%),
    var(--bh-bg);
  color: var(--bh-ink);
  font-family: var(--bh-sans);
  line-height: 1.5;
}

.bh-skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.bh-skip:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  background: #111;
  color: #fff;
  padding: 8px 12px;
}

.bh-app { min-height: 100vh; }
.bh-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--bh-border);
  backdrop-filter: blur(16px);
}
.bh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.bh-brand-mark {
  width: 22px;
  height: 24px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, #f3d27a, var(--bh-honey) 55%, var(--bh-honey-deep));
  box-shadow: 0 0 18px var(--bh-glow);
}
.bh-brand-tag {
  margin: 0;
  color: var(--bh-muted);
  font-size: 0.92rem;
}
.bh-top-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.bh-menu-btn, .bh-account-btn, .bh-btn, .bh-ghost {
  font: inherit;
  border: 0;
  cursor: pointer;
}
.bh-menu-btn, .bh-account-btn, .bh-ghost {
  background: transparent;
  color: var(--bh-ink);
  border: 1px solid var(--bh-border);
  border-radius: 999px;
  padding: 8px 14px;
}
.bh-menu-btn { display: none; }
.bh-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 73px); }
.bh-sidebar {
  padding: 28px 18px;
  border-right: 1px solid var(--bh-border);
}
.bh-nav { display: flex; flex-direction: column; gap: 6px; }
.bh-nav-link {
  color: var(--bh-ink);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
}
.bh-nav-link[aria-current="page"], .bh-nav-link:hover {
  background: rgba(229, 169, 59, 0.14);
}
.bh-main { padding: 32px 36px 64px; }
.bh-view { max-width: 1100px; }

.bh-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 36px;
  align-items: center;
}
.bh-kicker { color: var(--bh-honey-deep); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.76rem; }
.bh-display { font-family: var(--bh-font); font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 0.95; margin: 8px 0 16px; }
.bh-lede { color: var(--bh-muted); font-size: 1.08rem; max-width: 36rem; }

.bh-panel, .bh-card, .bh-metric, .bh-empty {
  background: var(--bh-surface);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius);
  box-shadow: var(--bh-shadow);
}
.bh-panel { padding: 28px; }
.bh-card { padding: 22px; }
.bh-label { display: block; font-weight: 600; margin-bottom: 8px; }
.bh-input, .bh-otp {
  width: 100%;
  border: 1px solid var(--bh-border);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  background: var(--bh-surface-strong);
}
.bh-input:focus, .bh-otp:focus, .bh-btn:focus-visible, .bh-nav-link:focus-visible, .bh-ghost:focus-visible {
  outline: 3px solid rgba(229, 169, 59, 0.55);
  outline-offset: 2px;
}
.bh-btn {
  background: var(--bh-ink);
  color: #fff8ee;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 650;
}
.bh-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.bh-btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.bh-note, .bh-error, .bh-status { margin-top: 12px; }
.bh-error { color: var(--bh-danger); }
.bh-status { color: var(--bh-ok); }
.bh-grid { display: grid; gap: 16px; }
.bh-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 24px 0; }
.bh-metric { padding: 18px; }
.bh-metric strong { display: block; font-size: 1.6rem; font-family: var(--bh-font); }
.bh-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.bh-hex-frame {
  width: 52px;
  height: 58px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, #f6d889, var(--bh-honey));
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 12px;
}
.bh-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  background: rgba(229, 169, 59, 0.16);
}
.bh-table { width: 100%; border-collapse: collapse; }
.bh-table th, .bh-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--bh-border); }
.bh-empty { padding: 32px; text-align: center; color: var(--bh-muted); }
.bh-switcher { display: flex; gap: 8px; flex-wrap: wrap; }
.bh-switcher button {
  border: 1px solid var(--bh-border);
  background: var(--bh-surface-strong);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
}
.bh-switcher button[aria-pressed="true"] { background: var(--bh-ink); color: #fff; }

.bh-body.is-business .bh-display {
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
}
.bh-body.is-business .bh-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.bh-body.is-business .bh-table {
  font-variant-numeric: tabular-nums;
  background: var(--bh-surface);
  border-radius: 18px;
  overflow: hidden;
}
.bh-body.is-business .bh-card h3 {
  margin-top: 0;
}

.bh-honey-scene {
  height: 420px;
  perspective: 1000px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.bh-honey-cluster {
  position: relative;
  width: 320px;
  height: 320px;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  will-change: transform;
}
.bh-hex-cell {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 96px;
  margin: -48px 0 0 -43px;
  transform: translate3d(calc(var(--hx) * 78px), calc(var(--hy) * 72px), calc(var(--hi) * 4px));
}
.bh-hex-face {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background:
    linear-gradient(160deg, rgba(255, 248, 230, 0.95), rgba(229, 169, 59, 0.72));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 10px 24px rgba(90, 60, 10, 0.12);
  color: var(--bh-ink);
  font-weight: 700;
}

.bh-otp-wrap { display: flex; gap: 8px; }
.bh-otp { width: 48px; text-align: center; font-size: 1.3rem; font-family: var(--bh-mono); }
.bh-otp-single { letter-spacing: 0.4em; text-align: center; font-size: 1.4rem; }

.bh-unknown { max-width: 40rem; margin: 12vh auto; padding: 24px; }

@media (max-width: 960px) {
  .bh-hero { grid-template-columns: 1fr; }
  .bh-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bh-layout { grid-template-columns: 1fr; }
  .bh-menu-btn { display: inline-flex; }
  .bh-sidebar { display: none; }
  .bh-sidebar.is-open { display: block; position: absolute; inset: 73px 12px auto; background: var(--bh-surface-strong); z-index: 5; border-radius: 18px; }
  .bh-honey-scene { height: 220px; }
  .bh-brand-tag { display: none; }
}

@media (max-width: 640px) {
  .bh-main { padding: 20px 16px 48px; }
  .bh-metrics { grid-template-columns: 1fr 1fr; }
  .bh-honey-scene { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bh-honey-cluster { transform: none !important; }
  * { scroll-behavior: auto !important; }
}
