/* VelinStyle Showcase #08 — Build Beyond the Interface
   Prefix: bb- · Unbounded + Figtree · electric coral on graphite */

:root {
  --bb-coral: oklch(70% 0.17 35);
  --bb-coral-dim: oklch(70% 0.17 35 / 0.18);
  --bb-coral-glow: oklch(70% 0.17 35 / 0.35);
  --bb-ink: oklch(12% 0.01 260);
  --bb-graphite: oklch(16% 0.012 260);
  --bb-panel: oklch(20% 0.014 260);
  --bb-line: oklch(38% 0.02 260);
  --bb-text: oklch(94% 0.01 90);
  --bb-muted: oklch(72% 0.02 90);
  --bb-faint: oklch(55% 0.015 90);
  --bb-font-display: "Unbounded", system-ui, sans-serif;
  --bb-font-body: "Figtree", system-ui, sans-serif;
  --bb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --bb-nav-h: 3.5rem;
  --bb-max: 72rem;
  --bb-p: 0;
  --bb-token-primary: #f07167;
  --bb-token-radius: 10px;
  --bb-token-space: 1;
  --bb-token-font: 1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bb-nav-h) + 0.75rem);
}

html.bb-reduce-motion {
  scroll-behavior: auto;
}

html.bb-reduce-motion *,
html.bb-reduce-motion *::before,
html.bb-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .bb-hero__stage [data-parallax],
  .bb-system__word,
  .bb-chip,
  .bb-alive__panel {
    transition: none !important;
  }
}

body.bb-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--bb-font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--bb-text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--bb-coral-dim), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, oklch(25% 0.04 260 / 0.5), transparent 50%),
    linear-gradient(180deg, var(--bb-ink), var(--bb-graphite) 40%, var(--bb-ink));
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

.bb-skip:focus {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
}

/* ——— Progress ——— */
.bb-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.bb-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--bb-coral);
  transform-origin: left center;
  box-shadow: 0 0 12px var(--bb-coral-glow);
}

/* ——— Nav ——— */
.bb-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: var(--bb-nav-h);
  padding: 0.65rem clamp(1rem, 3vw, 2rem);
  background: oklch(12% 0.01 260 / 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(38% 0.02 260 / 0.45);
}

.bb-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--bb-font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.bb-nav__mark {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.45rem;
  background: linear-gradient(145deg, var(--bb-coral), oklch(62% 0.16 25));
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.25);
  flex-shrink: 0;
}

.bb-nav__brand-text {
  display: grid;
  line-height: 1.1;
}

.bb-nav__name {
  display: block;
}

.bb-nav__tag {
  display: block;
  margin-top: 0.1rem;
  font-family: var(--bb-font-body);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bb-faint);
  font-weight: 700;
}

.bb-nav__brand:hover {
  color: var(--bb-coral);
}

.bb-nav__mobile-only {
  display: none !important;
}

.bb-nav__cta {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--bb-coral);
  color: oklch(12% 0.01 260) !important;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.bb-nav__cta:hover {
  filter: brightness(1.06);
}

.bb-nav__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
}

.bb-nav__links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bb-muted);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--bb-ease), border-color 160ms var(--bb-ease);
}

.bb-nav__links a:hover,
.bb-nav__links a.is-active {
  color: var(--bb-text);
  border-bottom-color: var(--bb-coral);
}

.bb-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bb-nav__ext {
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--bb-muted);
}

.bb-nav__ext:hover {
  color: var(--bb-coral);
}

.bb-nav__menu {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--bb-line);
  border-radius: 0.35rem;
  background: transparent;
  cursor: pointer;
}

.bb-nav__menu span {
  display: block;
  width: 1rem;
  height: 1.5px;
  margin: 0.28rem auto;
  background: var(--bb-text);
}

/* ——— Label ——— */
.bb-label {
  margin: 1.25rem clamp(1rem, 3vw, 2rem) 0;
  font-family: var(--bb-font-display);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--bb-coral);
}

/* ——— Buttons ——— */
.bb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.65rem;
  padding: 0.55rem 1.25rem;
  font-family: var(--bb-font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 180ms var(--bb-ease),
    background 180ms var(--bb-ease),
    border-color 180ms var(--bb-ease),
    box-shadow 180ms var(--bb-ease),
    color 180ms var(--bb-ease);
}

.bb-btn--primary {
  background: var(--bb-coral);
  color: oklch(12% 0.01 260);
  box-shadow: 0 0 0 0 transparent;
}

.bb-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 24px var(--bb-coral-glow),
    0 8px 20px oklch(0% 0 0 / 0.35);
}

.bb-btn--ghost {
  background: transparent;
  color: var(--bb-text);
  border-color: var(--bb-line);
}

.bb-btn--ghost:hover {
  border-color: var(--bb-coral);
  color: var(--bb-coral);
}

.bb-btn--sm {
  min-height: 2.1rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
}

/* ——— Hero ——— */
.bb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  min-height: calc(100svh - var(--bb-nav-h) - 2.5rem);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem) 4rem;
  max-width: var(--bb-max);
  margin-inline: auto;
}

.bb-hero__eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--bb-font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--bb-coral);
}

.bb-hero__title {
  margin: 0;
  font-family: var(--bb-font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.bb-hero__title span {
  display: block;
}

.bb-hero__lede {
  margin: 1.15rem 0 1.75rem;
  max-width: 28rem;
  color: var(--bb-muted);
  font-size: 1.05rem;
}

.bb-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.bb-hero__stage {
  position: relative;
  min-height: min(58vh, 30rem);
  border: 1px solid oklch(38% 0.02 260 / 0.55);
  border-radius: 1rem;
  background: oklch(14% 0.01 260);
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 oklch(100% 0 0 / 0.04),
    0 24px 60px oklch(0% 0 0 / 0.35);
}

.bb-hero__visual {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  display: block;
  z-index: 0;
}

.bb-hero__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(105deg, oklch(12% 0.01 260 / 0.55) 0%, transparent 42%),
    linear-gradient(0deg, oklch(10% 0.01 260 / 0.45), transparent 40%);
}

.bb-hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.bb-frag {
  position: absolute;
  will-change: transform;
  transition: transform 80ms linear;
}

.bb-frag--panel {
  top: 10%;
  left: 8%;
  width: 44%;
  padding: 0.9rem;
  border-radius: 0.65rem;
  background: oklch(18% 0.015 260 / 0.82);
  border: 1px solid var(--bb-line);
  backdrop-filter: blur(10px);
}

.bb-frag__bar {
  display: block;
  width: 38%;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--bb-coral);
  margin-bottom: 0.65rem;
}

.bb-frag__line {
  display: block;
  height: 0.28rem;
  width: 88%;
  margin-bottom: 0.4rem;
  border-radius: 999px;
  background: oklch(55% 0.02 260 / 0.45);
}

.bb-frag__line--short {
  width: 55%;
}

.bb-frag__meta {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.68rem;
  color: var(--bb-muted);
  letter-spacing: 0.04em;
}

.bb-frag--btn {
  top: 52%;
  left: 12%;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--bb-coral);
  color: oklch(12% 0.01 260);
  cursor: default;
  pointer-events: none;
  box-shadow: 0 8px 24px var(--bb-coral-glow);
}

.bb-frag--badge {
  top: 18%;
  right: 12%;
  padding: 0.35rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--bb-coral-dim);
  color: var(--bb-coral);
  border: 1px solid oklch(70% 0.17 35 / 0.4);
}

.bb-frag--badge-alt {
  top: 30%;
  right: 18%;
  background: oklch(25% 0.02 260);
  color: var(--bb-text);
  border-color: var(--bb-line);
}

.bb-frag--card {
  top: 42%;
  right: 8%;
  width: min(42%, 11.5rem);
  padding: 0.85rem;
  border-radius: 0.65rem;
  background: oklch(18% 0.015 260 / 0.86);
  border: 1px solid var(--bb-line);
  backdrop-filter: blur(10px);
}

.bb-frag--card strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.bb-frag--card p {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  color: var(--bb-muted);
}

.bb-frag__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.bb-frag__pills span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--bb-line);
  color: var(--bb-muted);
}

.bb-frag--meter {
  left: 8%;
  bottom: 22%;
  width: 28%;
  height: 0.4rem;
  border-radius: 999px;
  background: oklch(30% 0.02 260 / 0.85);
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.bb-frag--meter span {
  display: block;
  height: 100%;
  width: var(--v, 70%);
  background: var(--bb-coral);
  border-radius: inherit;
}

.bb-frag--node {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--bb-coral);
  top: 36%;
  right: 38%;
  box-shadow: 0 0 14px var(--bb-coral-glow);
}

.bb-frag--node-2 {
  top: 72%;
  left: 48%;
  background: var(--bb-text);
  box-shadow: none;
  opacity: 0.55;
}

.bb-frag--lines {
  width: 70%;
  height: auto;
  top: 28%;
  left: 22%;
  color: var(--bb-coral);
  opacity: 0.85;
  pointer-events: none;
}

.bb-frag--chip {
  bottom: 10%;
  right: 10%;
  left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: oklch(12% 0.01 260 / 0.85);
  border: 1px solid var(--bb-line);
  backdrop-filter: blur(8px);
}

.bb-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--bb-coral);
  animation: bb-pulse 1.8s var(--bb-ease) infinite;
}

@keyframes bb-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

/* ——— Sections shared ——— */
.bb-section {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 3vw, 2rem);
  max-width: var(--bb-max);
  margin-inline: auto;
  border-top: 1px solid oklch(38% 0.02 260 / 0.35);
}

.bb-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.bb-section__num {
  font-family: var(--bb-font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--bb-coral);
}

.bb-section__title {
  margin: 0;
  font-family: var(--bb-font-display);
  font-size: clamp(1.35rem, 3.2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.bb-section__lede {
  margin: 0 0 1.75rem;
  color: var(--bb-muted);
  max-width: 36rem;
}

/* ——— 01 System ——— */
.bb-system {
  min-height: 160vh;
}

.bb-system__stage {
  position: sticky;
  top: calc(var(--bb-nav-h) + 1.5rem);
  display: grid;
  place-items: start;
  min-height: 55vh;
  padding: 2rem 0 4rem;
}

.bb-system__lead {
  margin: 0;
  font-family: var(--bb-font-display);
  font-size: clamp(2rem, 7vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-transform: uppercase;
}

.bb-system__word {
  display: inline-block;
  color: var(--bb-coral);
  clip-path: inset(0 0 0 0);
  transition: opacity 220ms var(--bb-ease), transform 220ms var(--bb-ease);
}

.bb-system__rest {
  display: inline;
  color: var(--bb-text);
}

.bb-system__hint {
  margin: 1.25rem 0 0;
  color: var(--bb-faint);
  font-size: 0.9rem;
}

.bb-system__blocks {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.65rem;
  width: min(100%, 40rem);
}

.bb-system__blocks li {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 0.55rem;
  border: 1px solid var(--bb-line);
  background: oklch(18% 0.015 260 / 0.85);
  color: var(--bb-text);
  opacity: 0.72;
  transform: translateY(4px);
  transition: opacity 200ms var(--bb-ease), transform 200ms var(--bb-ease), border-color 200ms var(--bb-ease), background 200ms var(--bb-ease), color 200ms var(--bb-ease);
}

.bb-system__blocks li strong {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bb-system__blocks li span {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--bb-muted);
}

.bb-system__blocks li.is-on {
  opacity: 1;
  transform: none;
  border-color: color-mix(in oklch, var(--bb-coral) 45%, var(--bb-line));
}

.bb-system.is-assembled .bb-system__blocks li {
  background: var(--bb-coral-dim);
  border-color: color-mix(in oklch, var(--bb-coral) 50%, transparent);
}

.bb-system.is-assembled .bb-system__blocks li strong {
  color: var(--bb-coral);
}

/* ——— 02 Components ——— */
.bb-comps {
  min-height: 110vh;
}

.bb-comps__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, minmax(2.4rem, auto));
  gap: 0.65rem;
  min-height: 22rem;
  margin-bottom: 1rem;
}

.bb-chip {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.15rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 0.55rem;
  background: var(--bb-panel);
  border: 1px solid var(--bb-line);
  color: var(--bb-text);
  transition: grid-area 320ms var(--bb-ease), transform 320ms var(--bb-ease), opacity 220ms ease;
}

.bb-chip strong {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bb-chip > span:not(.bb-chip__bar):not(.bb-chip__lines) {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--bb-muted);
}

.bb-chip--fill {
  /* legacy no-op — content lives in markup */
}

.bb-chip--panel {
  align-content: start;
  justify-items: stretch;
  gap: 0.4rem;
}

.bb-chip__bar {
  display: block;
  height: 0.3rem;
  width: 40%;
  border-radius: 999px;
  background: var(--bb-coral);
}

.bb-chip__lines {
  display: block;
  height: 2.2rem;
  border-radius: 0.3rem;
  background: linear-gradient(
    180deg,
    oklch(55% 0.02 260 / 0.35),
    oklch(55% 0.02 260 / 0.12)
  );
}

.bb-chip--ghost {
  background: transparent;
}

.bb-chip--accent {
  border-color: oklch(70% 0.17 35 / 0.5);
  color: var(--bb-coral);
}

.bb-chip--sm {
  font-size: 0.7rem;
}

.bb-chip__label {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.bb-comps__mode {
  margin: 0;
  font-family: var(--bb-font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bb-coral);
}

/* layouts via data-layout on section */
.bb-comps[data-layout="website"] .bb-chip[data-chip="0"] { grid-area: 1 / 1 / 2 / 3; }
.bb-comps[data-layout="website"] .bb-chip[data-chip="1"] { grid-area: 1 / 3 / 2 / 5; }
.bb-comps[data-layout="website"] .bb-chip[data-chip="2"] { grid-area: 2 / 1 / 5 / 7; }
.bb-comps[data-layout="website"] .bb-chip[data-chip="3"] { grid-area: 2 / 7 / 3 / 10; }
.bb-comps[data-layout="website"] .bb-chip[data-chip="4"] { grid-area: 2 / 10 / 3 / 13; }
.bb-comps[data-layout="website"] .bb-chip[data-chip="5"] { grid-area: 1 / 5 / 2 / 9; }
.bb-comps[data-layout="website"] .bb-chip[data-chip="6"] { grid-area: 1 / 9 / 2 / 13; }
.bb-comps[data-layout="website"] .bb-chip[data-chip="7"] { grid-area: 3 / 7 / 4 / 9; }
.bb-comps[data-layout="website"] .bb-chip[data-chip="8"] { grid-area: 3 / 9 / 5 / 13; }
.bb-comps[data-layout="website"] .bb-chip[data-chip="9"] { grid-area: 5 / 1 / 6 / 4; }
.bb-comps[data-layout="website"] .bb-chip[data-chip="10"] { grid-area: 5 / 4 / 6 / 7; }
.bb-comps[data-layout="website"] .bb-chip[data-chip="11"] { grid-area: 5 / 7 / 6 / 13; }

.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="0"] { grid-area: 1 / 3 / 2 / 5; }
.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="1"] { grid-area: 1 / 5 / 2 / 7; }
.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="2"] { grid-area: 2 / 3 / 6 / 8; }
.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="3"] { grid-area: 2 / 8 / 3 / 13; }
.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="4"] { grid-area: 3 / 8 / 4 / 11; }
.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="5"] { grid-area: 1 / 1 / 6 / 3; }
.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="6"] { grid-area: 4 / 8 / 5 / 13; }
.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="7"] { grid-area: 5 / 8 / 6 / 10; }
.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="8"] { grid-area: 5 / 10 / 6 / 13; }
.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="9"] { grid-area: 1 / 7 / 2 / 10; }
.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="10"] { grid-area: 1 / 10 / 2 / 13; }
.bb-comps[data-layout="dashboard"] .bb-chip[data-chip="11"] { grid-area: 3 / 11 / 4 / 13; }

.bb-comps[data-layout="mobile"] .bb-chip[data-chip="0"] { grid-area: 1 / 4 / 2 / 7; }
.bb-comps[data-layout="mobile"] .bb-chip[data-chip="1"] { grid-area: 1 / 7 / 2 / 10; }
.bb-comps[data-layout="mobile"] .bb-chip[data-chip="2"] { grid-area: 2 / 4 / 5 / 10; }
.bb-comps[data-layout="mobile"] .bb-chip[data-chip="3"] { grid-area: 5 / 4 / 6 / 10; }
.bb-comps[data-layout="mobile"] .bb-chip[data-chip="4"] { grid-area: 6 / 4 / 7 / 7; }
.bb-comps[data-layout="mobile"] .bb-chip[data-chip="5"] { grid-area: 6 / 7 / 7 / 10; }
.bb-comps[data-layout="mobile"] .bb-chip[data-chip="6"] { grid-area: 7 / 4 / 8 / 10; }
.bb-comps[data-layout="mobile"] .bb-chip[data-chip="7"] { grid-area: 2 / 10 / 3 / 12; opacity: 0.35; }
.bb-comps[data-layout="mobile"] .bb-chip[data-chip="8"] { grid-area: 3 / 2 / 5 / 4; opacity: 0.35; }
.bb-comps[data-layout="mobile"] .bb-chip[data-chip="9"] { grid-area: 5 / 10 / 6 / 12; opacity: 0.25; }
.bb-comps[data-layout="mobile"] .bb-chip[data-chip="10"] { grid-area: 6 / 2 / 7 / 4; opacity: 0.25; }
.bb-comps[data-layout="mobile"] .bb-chip[data-chip="11"] { grid-area: 7 / 10 / 8 / 12; opacity: 0.25; }

.bb-comps[data-layout="commerce"] .bb-chip[data-chip="0"] { grid-area: 1 / 1 / 2 / 3; }
.bb-comps[data-layout="commerce"] .bb-chip[data-chip="1"] { grid-area: 1 / 10 / 2 / 13; }
.bb-comps[data-layout="commerce"] .bb-chip[data-chip="2"] { grid-area: 2 / 1 / 6 / 5; }
.bb-comps[data-layout="commerce"] .bb-chip[data-chip="3"] { grid-area: 2 / 5 / 3 / 9; }
.bb-comps[data-layout="commerce"] .bb-chip[data-chip="4"] { grid-area: 3 / 5 / 4 / 7; }
.bb-comps[data-layout="commerce"] .bb-chip[data-chip="5"] { grid-area: 1 / 3 / 2 / 7; }
.bb-comps[data-layout="commerce"] .bb-chip[data-chip="6"] { grid-area: 4 / 5 / 5 / 9; }
.bb-comps[data-layout="commerce"] .bb-chip[data-chip="7"] { grid-area: 2 / 9 / 3 / 11; }
.bb-comps[data-layout="commerce"] .bb-chip[data-chip="8"] { grid-area: 3 / 9 / 6 / 13; }
.bb-comps[data-layout="commerce"] .bb-chip[data-chip="9"] { grid-area: 5 / 5 / 6 / 7; }
.bb-comps[data-layout="commerce"] .bb-chip[data-chip="10"] { grid-area: 5 / 7 / 6 / 9; }
.bb-comps[data-layout="commerce"] .bb-chip[data-chip="11"] { grid-area: 1 / 7 / 2 / 10; }

.bb-comps[data-layout="application"] .bb-chip[data-chip="0"] { grid-area: 1 / 3 / 2 / 5; }
.bb-comps[data-layout="application"] .bb-chip[data-chip="1"] { grid-area: 1 / 5 / 2 / 7; }
.bb-comps[data-layout="application"] .bb-chip[data-chip="2"] { grid-area: 2 / 3 / 7 / 9; }
.bb-comps[data-layout="application"] .bb-chip[data-chip="3"] { grid-area: 2 / 9 / 3 / 13; }
.bb-comps[data-layout="application"] .bb-chip[data-chip="4"] { grid-area: 3 / 9 / 4 / 12; }
.bb-comps[data-layout="application"] .bb-chip[data-chip="5"] { grid-area: 1 / 1 / 8 / 3; }
.bb-comps[data-layout="application"] .bb-chip[data-chip="6"] { grid-area: 7 / 3 / 8 / 6; }
.bb-comps[data-layout="application"] .bb-chip[data-chip="7"] { grid-area: 4 / 9 / 5 / 11; }
.bb-comps[data-layout="application"] .bb-chip[data-chip="8"] { grid-area: 5 / 9 / 7 / 13; }
.bb-comps[data-layout="application"] .bb-chip[data-chip="9"] { grid-area: 1 / 7 / 2 / 10; }
.bb-comps[data-layout="application"] .bb-chip[data-chip="10"] { grid-area: 1 / 10 / 2 / 13; }
.bb-comps[data-layout="application"] .bb-chip[data-chip="11"] { grid-area: 7 / 6 / 8 / 9; }

/* ——— 03 Motion ——— */
.bb-motion__lab {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.bb-motion__states {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.bb-state-btn {
  appearance: none;
  text-align: left;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--bb-muted);
  background: transparent;
  border: 1px solid var(--bb-line);
  border-radius: 0.45rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.bb-state-btn:hover,
.bb-state-btn.is-active {
  color: var(--bb-text);
  border-color: var(--bb-coral);
  background: var(--bb-coral-dim);
}

.bb-motion__stage {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: 0.85rem;
  border: 1px solid var(--bb-line);
  background: oklch(14% 0.012 260 / 0.85);
  min-height: 12rem;
  align-content: center;
  justify-items: start;
}

.bb-motion__demo-btn {
  transition: transform 200ms var(--bb-ease), box-shadow 200ms var(--bb-ease), filter 200ms ease;
}

.bb-motion__card {
  width: min(100%, 22rem);
  padding: 1rem 1.1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--bb-line);
  background: var(--bb-panel);
  border-left: 3px solid transparent;
  transition: border-color 200ms ease, transform 200ms var(--bb-ease), opacity 200ms ease;
}

.bb-motion__card-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.bb-motion__card-body {
  margin: 0;
  font-size: 0.88rem;
  color: var(--bb-muted);
}

.bb-motion__stage[data-state="hover"] .bb-motion__demo-btn {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px oklch(0% 0 0 / 0.35);
}

.bb-motion__stage[data-state="hover"] .bb-motion__card {
  border-left-color: var(--bb-coral);
  transform: translateY(-2px);
}

.bb-motion__stage[data-state="focus"] .bb-motion__demo-btn {
  outline: 2px solid var(--bb-coral);
  outline-offset: 3px;
}

.bb-motion__stage[data-state="focus"] .bb-motion__card {
  border-color: var(--bb-coral);
}

.bb-motion__stage[data-state="loading"] .bb-motion__demo-btn {
  opacity: 0.65;
  pointer-events: none;
}

.bb-motion__stage[data-state="loading"] .bb-motion__demo-btn::after {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-left: 0.45rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.1rem;
  animation: bb-spin 0.7s linear infinite;
}

.bb-motion__stage[data-state="success"] .bb-motion__card {
  border-left-color: oklch(70% 0.14 145);
}

.bb-motion__stage[data-state="error"] .bb-motion__card {
  border-left-color: oklch(62% 0.18 25);
}

.bb-motion__stage[data-state="error"] .bb-motion__demo-btn {
  filter: saturate(0.7);
}

@keyframes bb-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ——— 04 Tokens ——— */
.bb-tokens__grid {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.bb-tokens__controls {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border-radius: 0.75rem;
  border: 1px solid var(--bb-line);
  background: oklch(14% 0.01 260 / 0.8);
}

.bb-field {
  display: grid;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bb-muted);
}

.bb-field input[type="color"] {
  width: 100%;
  height: 2.4rem;
  padding: 0.15rem;
  border: 1px solid var(--bb-line);
  border-radius: 0.4rem;
  background: var(--bb-panel);
  cursor: pointer;
}

.bb-field input[type="range"] {
  width: 100%;
  accent-color: var(--bb-coral);
}

.bb-tokens__preview {
  --bb-local-primary: var(--bb-token-primary);
  --bb-local-radius: var(--bb-token-radius);
  --bb-local-space: var(--bb-token-space);
  --bb-local-font: var(--bb-token-font);
  padding: calc(1.25rem * var(--bb-local-space));
  border-radius: var(--bb-local-radius);
  border: 1px solid var(--bb-line);
  background: var(--bb-panel);
  font-size: calc(1rem * var(--bb-local-font));
}

.bb-tokens__preview-label {
  margin: 0 0 calc(0.85rem * var(--bb-local-space));
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bb-faint);
}

.bb-tokens__btn {
  appearance: none;
  border: 0;
  padding: calc(0.65rem * var(--bb-local-space)) calc(1.1rem * var(--bb-local-space));
  border-radius: var(--bb-local-radius);
  background: var(--bb-local-primary);
  color: oklch(12% 0.01 260);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: calc(1rem * var(--bb-local-space));
}

.bb-tokens__card {
  padding: calc(1rem * var(--bb-local-space));
  border-radius: var(--bb-local-radius);
  border: 1px solid var(--bb-line);
  background: oklch(12% 0.01 260 / 0.55);
}

.bb-tokens__card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.bb-tokens__card p {
  margin: 0 0 calc(0.75rem * var(--bb-local-space));
  color: var(--bb-muted);
  font-size: 0.92em;
}

.bb-tokens__row {
  display: flex;
  flex-wrap: wrap;
  gap: calc(0.45rem * var(--bb-local-space));
}

.bb-tokens__pill {
  padding: 0.25rem 0.55rem;
  border-radius: calc(var(--bb-local-radius) * 0.7);
  background: color-mix(in oklab, var(--bb-local-primary) 22%, transparent);
  color: var(--bb-local-primary);
  font-size: 0.75em;
  font-weight: 700;
}

/* ——— 05 Surfaces ——— */
.bb-surfaces__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.bb-tab {
  appearance: none;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bb-muted);
  background: transparent;
  border: 1px solid var(--bb-line);
  border-radius: 999px;
  cursor: pointer;
}

.bb-tab.is-active,
.bb-tab:hover {
  color: var(--bb-text);
  border-color: var(--bb-coral);
  background: var(--bb-coral-dim);
}

.bb-surfaces__panels {
  border: 1px solid var(--bb-line);
  border-radius: 0.85rem;
  background: oklch(14% 0.012 260 / 0.9);
  min-height: 11rem;
  padding: 1.25rem;
}

.bb-surface[hidden] {
  display: none !important;
}

.bb-ui-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--bb-muted);
}

.bb-ui-nav__brand {
  font-family: var(--bb-font-display);
  font-weight: 600;
  color: var(--bb-text);
}

.bb-ui-hero-line {
  margin: 0;
  font-family: var(--bb-font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  letter-spacing: -0.02em;
}

.bb-ui-app {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  min-height: 8rem;
}

.bb-ui-app__side {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: var(--bb-panel);
  border: 1px solid var(--bb-line);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--bb-muted);
}

.bb-ui-app__main {
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--bb-line);
}

.bb-ui-app__main p {
  margin: 0.35rem 0 0.75rem;
  color: var(--bb-muted);
  font-size: 0.9rem;
}

.bb-ui-shop {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  align-items: center;
}

.bb-ui-shop__img {
  aspect-ratio: 1;
  border-radius: 0.5rem;
  background:
    radial-gradient(circle at 30% 28%, oklch(78% 0.12 55 / 0.9), transparent 42%),
    linear-gradient(145deg, var(--bb-coral-dim), oklch(22% 0.04 260) 55%, var(--bb-panel));
  border: 1px solid var(--bb-line);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 0.06);
}

.bb-ui-shop__meta h3 {
  margin: 0;
  font-size: 1rem;
}

.bb-ui-shop__swatches {
  display: flex;
  gap: 0.35rem;
  margin: 0.45rem 0 0.55rem;
}

.bb-ui-shop__swatches span {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--bb-line);
}

.bb-ui-shop__swatches span:nth-child(1) {
  background: var(--bb-coral);
}
.bb-ui-shop__swatches span:nth-child(2) {
  background: oklch(65% 0.12 230);
}
.bb-ui-shop__swatches span:nth-child(3) {
  background: oklch(72% 0.08 95);
}

.bb-ui-price {
  margin: 0.25rem 0 0.65rem;
  font-family: var(--bb-font-display);
  color: var(--bb-coral);
}

.bb-ui-dash {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: end;
}

.bb-ui-metric {
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--bb-line);
  background: var(--bb-panel);
}

.bb-ui-metric span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bb-faint);
}

.bb-ui-metric strong {
  font-family: var(--bb-font-display);
  font-size: 1.45rem;
}

.bb-ui-bars {
  display: flex;
  align-items: end;
  gap: 0.35rem;
  height: 4.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--bb-line);
}

.bb-ui-bars i {
  flex: 1;
  display: block;
  border-radius: 0.2rem 0.2rem 0 0;
  background: var(--bb-coral);
  opacity: 0.75;
}

.bb-ui-bars i:nth-child(1) { height: 35%; }
.bb-ui-bars i:nth-child(2) { height: 62%; }
.bb-ui-bars i:nth-child(3) { height: 48%; }
.bb-ui-bars i:nth-child(4) { height: 80%; }
.bb-ui-bars i:nth-child(5) { height: 55%; }

.bb-ui-docs {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
}

.bb-ui-docs aside {
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--bb-muted);
  padding: 0.5rem 0;
  border-right: 1px solid var(--bb-line);
}

.bb-ui-docs h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.bb-ui-docs p {
  margin: 0 0 0.75rem;
  color: var(--bb-muted);
  font-size: 0.9rem;
}

.bb-ui-code {
  display: inline-block;
  padding: 0.35rem 0.55rem;
  border-radius: 0.35rem;
  background: oklch(10% 0.01 260);
  border: 1px solid var(--bb-line);
  font-size: 0.8rem;
}

.bb-ui-play {
  display: grid;
  gap: 1rem;
  max-width: 18rem;
}

.bb-ui-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.bb-ui-play input[type="range"] {
  width: 100%;
  accent-color: var(--bb-coral);
}

/* ——— 06 A11y ——— */
.bb-a11y__toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bb-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--bb-line);
  border-radius: 0.55rem;
  background: oklch(14% 0.01 260 / 0.7);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.bb-toggle input {
  accent-color: var(--bb-coral);
  width: 1.05rem;
  height: 1.05rem;
}

.bb-a11y__note {
  margin: 0;
  color: var(--bb-faint);
  font-size: 0.88rem;
}

.bb-a11y__demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--bb-line);
  background: oklch(16% 0.012 260 / 0.8);
}

.bb-a11y__input {
  min-width: min(100%, 12rem);
  flex: 1;
  min-height: 2.1rem;
  padding: 0.4rem 0.7rem;
  border-radius: 0.45rem;
  border: 1px solid var(--bb-line);
  background: oklch(12% 0.01 260);
  color: var(--bb-text);
  font: inherit;
}

html.bb-force-focus *:focus {
  outline: 2px solid var(--bb-coral) !important;
  outline-offset: 3px !important;
}

html[data-bb-contrast="high"] {
  --bb-text: oklch(99% 0.01 90);
  --bb-muted: oklch(88% 0.02 90);
  --bb-line: oklch(72% 0.03 90);
  --bb-coral: oklch(78% 0.18 35);
}

html[data-bb-contrast="high"] body.bb-body {
  background: oklch(8% 0.01 260);
}

/* ——— 07 Responsive ——— */
.bb-resp__control {
  display: grid;
  gap: 0.5rem;
  max-width: 28rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bb-muted);
}

.bb-resp__control input {
  width: 100%;
  accent-color: var(--bb-coral);
}

.bb-resp__frame-wrap {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.bb-resp__frame {
  container-type: inline-size;
  container-name: bbframe;
  margin-inline: auto;
  max-width: 100%;
  border: 1px solid var(--bb-line);
  border-radius: 0.75rem;
  background: oklch(14% 0.012 260);
  padding: 0.85rem;
  transition: width 120ms linear;
}

.bb-resp__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--bb-line);
}

.bb-resp__brand {
  font-family: var(--bb-font-display);
  font-weight: 600;
  font-size: 0.85rem;
}

.bb-resp__links {
  display: none;
  gap: 0.85rem;
  margin-left: auto;
  font-size: 0.8rem;
}

.bb-resp__links a {
  text-decoration: none;
  color: var(--bb-muted);
}

.bb-resp__burger {
  margin-left: auto;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--bb-line);
  border-radius: 0.3rem;
  background:
    linear-gradient(var(--bb-text), var(--bb-text)) center 30% / 55% 1.5px no-repeat,
    linear-gradient(var(--bb-text), var(--bb-text)) center / 55% 1.5px no-repeat,
    linear-gradient(var(--bb-text), var(--bb-text)) center 70% / 55% 1.5px no-repeat;
  cursor: default;
}

.bb-resp__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.bb-resp__cell {
  min-height: 4.2rem;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.45rem;
  border: 1px solid var(--bb-line);
  background: var(--bb-panel);
  color: var(--bb-text);
}

.bb-resp__cell strong {
  font-family: var(--bb-font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bb-resp__cell span {
  font-size: 0.75rem;
  color: var(--bb-muted);
  font-weight: 500;
}

@container bbframe (min-width: 560px) {
  .bb-resp__links {
    display: flex;
  }

  .bb-resp__burger {
    display: none;
  }

  .bb-resp__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@container bbframe (min-width: 900px) {
  .bb-resp__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* data-width fallbacks when CQ unsupported / for clarity */
.bb-resp__frame[data-width="narrow"] .bb-resp__links {
  display: none;
}

.bb-resp__frame[data-width="narrow"] .bb-resp__burger {
  display: block;
}

.bb-resp__frame[data-width="narrow"] .bb-resp__grid {
  grid-template-columns: 1fr;
}

.bb-resp__frame[data-width="mid"] .bb-resp__links {
  display: flex;
}

.bb-resp__frame[data-width="mid"] .bb-resp__burger {
  display: none;
}

.bb-resp__frame[data-width="mid"] .bb-resp__grid {
  grid-template-columns: repeat(2, 1fr);
}

.bb-resp__frame[data-width="wide"] .bb-resp__links {
  display: flex;
}

.bb-resp__frame[data-width="wide"] .bb-resp__burger {
  display: none;
}

.bb-resp__frame[data-width="wide"] .bb-resp__grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ——— 08 Alive ——— */
.bb-demo-tag {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  border: 1px solid oklch(70% 0.17 35 / 0.45);
  color: var(--bb-coral);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: 0.1rem;
}

.bb-alive__play {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(12rem, 0.9fr);
  gap: 0.75rem;
}

.bb-alive__panel {
  appearance: none;
  text-align: left;
  min-height: 8.5rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--bb-line);
  background: var(--bb-panel);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition:
    transform 200ms var(--bb-ease),
    border-color 200ms ease,
    background 200ms ease,
    box-shadow 200ms ease;
}

.bb-alive__panel strong {
  display: block;
  font-family: var(--bb-font-display);
  margin-bottom: 0.35rem;
}

.bb-alive__panel span {
  color: var(--bb-muted);
  font-size: 0.88rem;
}

.bb-alive__panel:hover {
  transform: translateY(-4px);
  border-color: var(--bb-coral);
  box-shadow: 0 12px 28px oklch(0% 0 0 / 0.3);
}

.bb-alive__panel.is-active {
  background: var(--bb-coral-dim);
  border-color: var(--bb-coral);
}

.bb-alive__panel.is-pulse {
  animation: bb-panel-pulse 0.9s var(--bb-ease);
}

@keyframes bb-panel-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
  40% {
    box-shadow: 0 0 0 6px var(--bb-coral-dim);
  }
}

.bb-alive__side {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.bb-alive__progress {
  height: 0.35rem;
  border-radius: 999px;
  background: oklch(30% 0.02 260);
  overflow: hidden;
}

.bb-alive__progress-bar {
  height: 100%;
  width: 18%;
  background: var(--bb-coral);
  transition: width 280ms var(--bb-ease);
}

.bb-alive__list {
  margin: 0;
  padding: 0.65rem 0.75rem;
  list-style: none;
  border: 1px solid var(--bb-line);
  border-radius: 0.55rem;
  background: oklch(12% 0.01 260 / 0.55);
  font-size: 0.8rem;
  color: var(--bb-muted);
  max-height: 7rem;
  overflow: auto;
}

.bb-alive__list li {
  padding: 0.2rem 0;
}

/* ——— Finale ——— */
.bb-finale {
  padding: clamp(4rem, 10vw, 7rem) clamp(1rem, 3vw, 2rem);
  max-width: var(--bb-max);
  margin-inline: auto;
  text-align: center;
  border-top: 1px solid oklch(38% 0.02 260 / 0.35);
}

.bb-finale__kicker {
  margin: 0;
  font-family: var(--bb-font-display);
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-transform: uppercase;
  display: grid;
  gap: 0.15em;
  justify-items: center;
}

.bb-finale__kicker span {
  display: block;
}

.bb-finale__brand {
  margin: 0.85rem 0 1.75rem;
  font-family: var(--bb-font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--bb-coral);
  letter-spacing: -0.03em;
}

.bb-finale__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ——— Footer ——— */
.bb-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 2rem;
  border-top: 1px solid oklch(38% 0.02 260 / 0.35);
  font-size: 0.82rem;
  color: var(--bb-faint);
}

.bb-footer a {
  color: var(--bb-muted);
  text-decoration: none;
  font-weight: 600;
}

.bb-footer a:hover {
  color: var(--bb-coral);
}

/* ——— Mobile ——— */
@media (max-width: 900px) {
  .bb-nav {
    grid-template-columns: 1fr auto;
  }

  .bb-nav__links {
    position: fixed;
    inset: var(--bb-nav-h) 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem 1rem;
    background: oklch(12% 0.01 260 / 0.96);
    border-bottom: 1px solid var(--bb-line);
    justify-content: flex-start;
  }

  .bb-nav.is-open .bb-nav__links {
    display: flex;
  }

  .bb-nav__mobile-only {
    display: block !important;
  }

  .bb-nav__links a {
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid oklch(38% 0.02 260 / 0.35);
  }

  .bb-nav__menu {
    display: inline-grid;
    place-items: center;
  }

  .bb-nav__ext--docs,
  .bb-nav__ext--gh {
    display: none;
  }

  .bb-nav__cta {
    font-size: 0.72rem;
    padding: 0.3rem 0.7rem;
  }

  .bb-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 3rem;
  }

  .bb-hero__stage {
    min-height: 18rem;
  }

  .bb-hero__visual {
    object-position: center 35%;
  }

  .bb-frag--panel {
    width: 52%;
  }

  .bb-frag--card {
    width: min(48%, 10rem);
    top: 48%;
  }

  .bb-comps {
    min-height: auto;
  }

  .bb-comps__grid {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: auto;
    min-height: 0;
  }

  .bb-comps[data-layout] .bb-chip {
    grid-area: auto !important;
    opacity: 1 !important;
  }

  .bb-motion__lab,
  .bb-tokens__grid {
    grid-template-columns: 1fr;
  }

  .bb-motion__states {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .bb-alive__play {
    grid-template-columns: 1fr;
  }

  .bb-ui-dash {
    grid-template-columns: 1fr 1fr;
  }

  .bb-ui-dash .bb-ui-bars {
    grid-column: 1 / -1;
  }

  .bb-comps__grid {
    grid-template-rows: repeat(10, minmax(2.1rem, auto));
    min-height: 18rem;
  }
}

@media (max-width: 560px) {
  .bb-hero__title {
    font-size: clamp(2rem, 11vw, 2.6rem);
  }

  .bb-ui-app,
  .bb-ui-shop,
  .bb-ui-docs {
    grid-template-columns: 1fr;
  }

  .bb-ui-docs aside {
    border-right: 0;
    border-bottom: 1px solid var(--bb-line);
    padding-bottom: 0.65rem;
  }
}
