/* ═══════════════════════════════════════════════════════════
   BrickBrands Training Portal — Design System v3 "Precision"
   Crisp premium SaaS: ink-on-paper, hairline borders, brand
   green→teal accents, Bricolage Grotesque display, mono labels.
   Light only.
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700;12..96,800&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ─── Tokens ────────────────────────────────────────────── */
:root {
  /* Ink scale */
  --ink: #14181f;
  --ink-2: #353b47;
  --muted: #646b78;
  --faint: #9aa1ac;

  /* Surfaces */
  --paper: #f7f8f7;
  --surface: #ffffff;
  --surface-2: #fbfcfb;
  --line: rgba(20, 24, 31, 0.10);
  --line-soft: rgba(20, 24, 31, 0.06);
  --line-strong: rgba(20, 24, 31, 0.16);

  /* Brand (from logo: emerald → teal) */
  --brand: #119d70;
  --brand-2: #10ab97;
  --brand-deep: #0b6b4c;
  --brand-ink: #0a2018;
  --brand-ink-2: #0e2b20;
  --brand-tint: #e9f6f0;
  --brand-tint-2: #f2faf6;
  --brand-grad: linear-gradient(99deg, #2fbe8f, #11b0a0);
  --brand-glow: rgba(17, 157, 112, 0.16);

  /* Training types */
  --live: #0e9d6e;
  --live-tint: #e7f6ef;
  --self: #3d6fe0;
  --self-tint: #ecf1fc;
  --guided: #8a55d6;
  --guided-tint: #f2ecfb;

  /* Status */
  --warn: #c07c10;
  --warn-tint: #fbf3e3;
  --danger: #cf4444;
  --danger-tint: #fbeded;

  /* Geometry & depth */
  --card-radius: 12px;
  --r-sm: 8px;
  --shadow-xs: 0 1px 2px rgba(20, 24, 31, 0.05);
  --shadow-sm: 0 1px 2px rgba(20, 24, 31, 0.04), 0 4px 12px -6px rgba(20, 24, 31, 0.08);
  --shadow-md: 0 1px 2px rgba(20, 24, 31, 0.04), 0 12px 32px -16px rgba(20, 24, 31, 0.18);
  --shadow-lg: 0 2px 4px rgba(20, 24, 31, 0.05), 0 24px 56px -24px rgba(20, 24, 31, 0.28);

  /* Fonts */
  --font-display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Section accents (dashboard) */
  --sec-intro: #119d70;
  --sec-intro-deep: #0b6b4c;
  --sec-intro-tint: #e9f6f0;
  --sec-intro-grad: linear-gradient(99deg, #2fbe8f, #11b0a0);

  --sec-software: #3d8fd4;
  --sec-software-deep: #2a6aad;
  --sec-software-tint: #ecf4fc;
  --sec-software-grad: linear-gradient(99deg, #5eb8e8, #3d8fd4);

  --sec-security: #c07c10;
  --sec-security-deep: #9a6310;
  --sec-security-tint: #fbf3e3;
  --sec-security-grad: linear-gradient(99deg, #e8b04a, #c07c10);

  --sec-policies: #8a55d6;
  --sec-policies-deep: #6f42b8;
  --sec-policies-tint: #f2ecfb;
  --sec-policies-grad: linear-gradient(99deg, #a878e8, #8a55d6);

  /* Legacy variable names (kept for older inline styles) */
  --bb-green: var(--brand);
  --bb-green-light: #2fbe8f;
  --bb-green-glow: var(--brand-glow);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-bg-solid: #ffffff;
  --glass-border: var(--line);
  --glass-inner-light: rgba(255, 255, 255, 0);
  --glass-shadow: var(--shadow-sm);
  --spot-color: transparent;
  --hairline: linear-gradient(90deg, transparent, rgba(17, 157, 112, 0.35), transparent);
}

/* ─── Base ──────────────────────────────────────────────── */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background: var(--paper) !important;
  color: var(--ink);
  position: relative;
  font-feature-settings: 'ss01';
}

/* Kill the old grain + aurora layers */
body::before, body::after { display: none !important; }

/* Override compiled Tailwind font + base colors */
.font-sans { font-family: var(--font-body); }
.bg-slate-50 { background-color: var(--paper); }
.text-slate-800 { color: var(--ink-2); }
.text-slate-900 { color: var(--ink); }
.text-slate-700 { color: var(--ink-2); }
.text-slate-600 { color: var(--muted); }
.text-slate-500 { color: var(--muted); }
.text-slate-400 { color: var(--faint); }

h1, h2, h3, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

main { position: relative; z-index: 10; }

/* Mono micro-label utility */
.bb-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─── Tailwind brand re-tint (compiled classes → new palette) ── */
.text-emerald-600, .text-emerald-700 { color: var(--brand); }
.text-emerald-500 { color: var(--brand); }
.bg-emerald-600 { background-color: var(--brand); }
.bg-emerald-500 { background-color: var(--brand); }
.bg-emerald-700, .hover\:bg-emerald-700:hover { background-color: var(--brand-deep); }
.hover\:bg-emerald-600:hover { background-color: var(--brand-deep); }
.bg-emerald-50 { background-color: var(--brand-tint-2); }
.bg-emerald-100 { background-color: var(--brand-tint); }
.border-emerald-200 { border-color: rgba(17, 157, 112, 0.25); }
.border-emerald-300, .hover\:border-emerald-300:hover { border-color: rgba(17, 157, 112, 0.45); }
.border-emerald-500 { border-color: var(--brand); }
.hover\:text-emerald-600:hover, .hover\:text-emerald-700:hover,
.group:hover .group-hover\:text-emerald-600, .group:hover .group-hover\:text-emerald-700 { color: var(--brand); }

/* ─── Navbar ───────────────────────────────────────────── */
.glass-nav {
  position: relative;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line) !important;
}

#main-nav { animation: nav-slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes nav-slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.bb-nav-inner {
  max-width: 84rem;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bb-nav-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.bb-back-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  transition: all 0.18s ease;
}
.bb-back-btn:hover { border-color: var(--brand); color: var(--brand); transform: translateX(-1px); }
.bb-back-btn svg { width: 14px; height: 14px; }

.bb-nav-logo { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.bb-nav-logo img { height: 22px; display: block; }

.bb-nav-divider { width: 1px; height: 18px; background: var(--line); flex-shrink: 0; }

.bb-crumb {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  font-size: 12px; color: var(--muted);
}
.bb-crumb .sep { color: var(--faint); flex-shrink: 0; opacity: 0.6; }
.bb-crumb .crumb-section {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
  white-space: nowrap;
}
.bb-crumb .crumb-title {
  font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
}

.bb-nav-center { display: none; align-items: center; gap: 6px; }
@media (min-width: 768px) { .bb-nav-center { display: flex; } }

.bb-nav-step {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; color: var(--muted);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.bb-nav-step:hover { border-color: var(--line); background: var(--surface); color: var(--ink); }
.bb-nav-step svg { width: 13px; height: 13px; }

.bb-nav-count {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--ink);
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  white-space: nowrap;
}
.bb-nav-count span { color: var(--faint); }

.bb-nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.bb-nav-progress { display: flex; align-items: center; gap: 8px; }
.bb-nav-progress .bar {
  width: 72px; height: 4px; border-radius: 99px;
  background: rgba(20, 24, 31, 0.08);
  overflow: hidden;
}
.bb-nav-progress .bar i {
  display: block; height: 100%; border-radius: 99px;
  background: var(--brand-grad);
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.bb-nav-progress .pct {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--brand); min-width: 34px; text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ─── Cards (legacy .glass-card → crisp card) ──────────── */
.glass-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-xs);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card::before { display: none; }
.glass-card:hover {
  border-color: rgba(17, 157, 112, 0.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.glass-card.completed {
  border-color: rgba(17, 157, 112, 0.35);
  background: linear-gradient(180deg, var(--brand-tint-2), var(--surface) 55%);
}
.glass-card.completed::after { display: none; }

.linear-border { border: 1px solid var(--line); }

/* ─── Hero helpers (legacy names, re-themed) ───────────── */
.hero-gradient {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
.aurora-orbs { display: none; }
.dot-grid { background-image: none; -webkit-mask-image: none; mask-image: none; }
.hero-gradient.dot-grid { background: var(--paper); }

/* ─── Gradient text ────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(95deg, #1cae7e, #10ab97 60%, #0e9d8e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: none;
}

/* ─── Deep hero panel (dashboard) ──────────────────────── */
.bb-hero {
  position: relative;
  background:
    radial-gradient(56% 90% at 78% 0%, rgba(18, 176, 144, 0.22), transparent 65%),
    radial-gradient(40% 70% at 12% 100%, rgba(16, 171, 151, 0.12), transparent 70%),
    linear-gradient(180deg, #0b231b, #0a1d16);
  color: #f4faf7;
  overflow: hidden;
}
.bb-hero::before {
  /* fine engineering grid */
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 100% 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 56px 100%;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, black 35%, transparent 85%);
  mask-image: radial-gradient(120% 100% at 50% 0%, black 35%, transparent 85%);
  pointer-events: none;
}
.bb-hero::after {
  /* hairline at base */
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 190, 143, 0.5), transparent);
}

.bb-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: #57d6a8;
}
.bb-hero-eyebrow .tick {
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--brand-grad);
  box-shadow: 0 0 12px rgba(47, 190, 143, 0.8);
  animation: tick-pulse 2.4s ease-in-out infinite;
}
@keyframes tick-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.bb-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: #ffffff;
}
.bb-hero .hero-grad {
  background: linear-gradient(95deg, #4fd6a4, #19c4ad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bb-hero p.lede { color: rgba(222, 238, 231, 0.78); }

/* ─── Brick wall progress (hero showpiece) ─────────────── */
.brick-wall { display: flex; flex-direction: column; gap: 5px; }
.brick-row { display: flex; gap: 5px; }
.brick-row.offset { padding-left: 26px; }
.brick {
  position: relative;
  width: 46px; height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.brick:hover {
  border-color: rgba(79, 214, 164, 0.8);
  background: rgba(47, 190, 143, 0.14);
  transform: translateY(-1px);
}
.brick.filled {
  background: var(--brand-grad);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(18, 176, 144, 0.45);
}
.brick.filled.just-laid {
  animation: brick-lay 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes brick-lay {
  from { transform: translateY(-8px) scale(0.85); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.brick-wall-caption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(222, 238, 231, 0.5);
  display: flex; align-items: center; justify-content: space-between;
}

/* ─── Stat strip (overlaps hero) ───────────────────────── */
.bb-stat-strip {
  position: relative;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
}
@media (min-width: 640px) { .bb-stat-strip { grid-template-columns: repeat(4, 1fr) auto; } }

.bb-stat {
  padding: 18px 22px;
  border-right: 1px solid var(--line-soft);
  min-width: 0;
}
.bb-stat:last-of-type { border-right: none; }
.bb-stat .num {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.bb-stat .num .unit { font-size: 16px; color: var(--muted); font-weight: 600; }
.bb-stat .num.brand { color: var(--brand); }
.bb-stat .lbl {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--faint);
}

.bb-stat-action {
  display: none;
  align-items: center;
  padding: 0 18px;
  border-left: 1px solid var(--line-soft);
  background: var(--surface-2);
}
@media (min-width: 640px) { .bb-stat-action { display: flex; } }

/* ─── Buttons ──────────────────────────────────────────── */
.bb-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  font-family: var(--font-body);
}
.bb-btn svg { width: 15px; height: 15px; }

.bb-btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.bb-btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.bb-btn-brand {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(20, 24, 31, 0.08), 0 6px 18px -8px rgba(17, 157, 112, 0.6);
}
.bb-btn-brand:hover { background: var(--brand-deep); transform: translateY(-1px); }

.bb-btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-2);
}
.bb-btn-ghost:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }

.bb-kbd {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--faint);
  box-shadow: 0 1px 0 var(--line);
}

/* ─── Section headers (dashboard) ──────────────────────── */
.bb-section-head {
  display: flex; align-items: baseline; gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.bb-section-num {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700;
  color: var(--brand);
}
.bb-section-head h2 {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 700; letter-spacing: -0.015em;
  color: var(--ink);
}
.bb-section-head .sub { font-size: 12.5px; color: var(--muted); }
.bb-section-meta {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.bb-section-meta .frac {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bb-section-meta .mini-bar {
  width: 64px; height: 3px; border-radius: 99px;
  background: rgba(20, 24, 31, 0.08); overflow: hidden;
}
.bb-section-meta .mini-bar i {
  display: block; height: 100%;
  background: var(--section-grad, var(--brand-grad));
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section accent mapping */
[data-section="intro"] { --section-accent: var(--sec-intro); --section-deep: var(--sec-intro-deep); --section-tint: var(--sec-intro-tint); --section-grad: var(--sec-intro-grad); }
[data-section="software"] { --section-accent: var(--sec-software); --section-deep: var(--sec-software-deep); --section-tint: var(--sec-software-tint); --section-grad: var(--sec-software-grad); }
[data-section="security"] { --section-accent: var(--sec-security); --section-deep: var(--sec-security-deep); --section-tint: var(--sec-security-tint); --section-grad: var(--sec-security-grad); }
[data-section="policies"] { --section-accent: var(--sec-policies); --section-deep: var(--sec-policies-deep); --section-tint: var(--sec-policies-tint); --section-grad: var(--sec-policies-grad); }

#section-intro .bb-section-num,
#section-intro .bb-section-head { --section-accent: var(--sec-intro); --section-grad: var(--sec-intro-grad); }
#section-software .bb-section-num,
#section-software .bb-section-head { --section-accent: var(--sec-software); --section-grad: var(--sec-software-grad); }
#section-security .bb-section-num,
#section-security .bb-section-head { --section-accent: var(--sec-security); --section-grad: var(--sec-security-grad); }
#section-policies .bb-section-num,
#section-policies .bb-section-head { --section-accent: var(--sec-policies); --section-grad: var(--sec-policies-grad); }

.bb-section-num { color: var(--section-accent, var(--brand)); }
.bb-section-head { border-bottom-color: color-mix(in srgb, var(--section-accent, var(--brand)) 18%, var(--line)); }

/* legacy section badge */
.section-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  color: var(--muted) !important;
  backdrop-filter: none;
}

/* ─── Module cards (dashboard) ─────────────────────────── */
.bb-module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--surface) 72%, var(--section-tint, var(--brand-tint-2)) 100%);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.bb-module-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--section-grad, var(--brand-grad));
  opacity: 0.72;
  transition: opacity 0.2s ease, width 0.2s ease;
}
.bb-module-card:hover {
  border-color: color-mix(in srgb, var(--section-accent, var(--brand)) 38%, transparent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.bb-module-card:hover::before {
  opacity: 1;
  width: 4px;
}
.bb-module-card.completed {
  border-color: color-mix(in srgb, var(--section-accent, var(--brand)) 28%, transparent);
}
.bb-module-card.completed .bb-card-glyph {
  background: var(--section-tint, var(--brand-tint));
  border-color: color-mix(in srgb, var(--section-accent, var(--brand)) 28%, transparent);
  color: var(--section-accent, var(--brand));
}

.bb-card-link {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.bb-card-top { display: flex; align-items: center; gap: 10px; padding-right: 30px; }

.bb-card-glyph {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  transition: all 0.2s ease;
}
.bb-card-glyph svg { width: 16px; height: 16px; }
.bb-module-card:hover .bb-card-glyph {
  background: var(--section-tint, var(--brand-tint));
  border-color: color-mix(in srgb, var(--section-accent, var(--brand)) 32%, transparent);
  color: var(--section-accent, var(--brand));
}

.bb-card-num {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.bb-card-duration {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 4px;
}
.bb-card-duration svg { width: 11px; height: 11px; }

.bb-card-title {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.35;
  transition: color 0.18s ease;
  padding-right: 26px;
}
.bb-module-card:hover .bb-card-title { color: var(--section-deep, var(--brand-deep)); }

.bb-card-desc {
  font-size: 12px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.bb-card-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex; align-items: center; gap: 8px;
}

.bb-type {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
}
.bb-type .dot { width: 5px; height: 5px; border-radius: 50%; }
.bb-type-live { background: var(--live-tint); color: var(--live); }
.bb-type-live .dot { background: var(--live); }
.bb-type-self { background: var(--self-tint); color: var(--self); }
.bb-type-self .dot { background: var(--self); }
.bb-type-guided { background: var(--guided-tint); color: var(--guided); }
.bb-type-guided .dot { background: var(--guided); }

.bb-card-arrow {
  margin-left: auto;
  color: var(--faint);
  transition: all 0.2s ease;
}
.bb-card-arrow svg { width: 14px; height: 14px; }
.bb-module-card:hover .bb-card-arrow { color: var(--section-accent, var(--brand)); transform: translateX(2px); }

/* Card completion animation — never touch card opacity (conflicts with animate-fade-in-up) */
@keyframes card-shimmer {
  0% { transform: translateX(-120%); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}
@keyframes accent-pulse {
  0%, 100% { filter: brightness(1); }
  45% { filter: brightness(1.45); box-shadow: 3px 0 16px color-mix(in srgb, var(--section-accent, var(--brand)) 45%, transparent); }
}
@keyframes check-burst {
  0% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--section-accent, var(--brand)) 50%, transparent); }
  45% { transform: scale(1.14); box-shadow: 0 0 0 7px transparent; }
  100% { transform: scale(1); box-shadow: 0 2px 8px color-mix(in srgb, var(--section-accent, var(--brand)) 42%, transparent); }
}
@keyframes check-tick {
  0% { transform: scale(0.55) rotate(-18deg); }
  65% { transform: scale(1.12) rotate(6deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes glyph-celebrate {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.07); }
}

.bb-module-card.just-completed {
  opacity: 1;
}
.bb-module-card.just-completed::after {
  content: '';
  position: absolute; inset: 0; z-index: 2;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 38%,
    color-mix(in srgb, var(--section-accent, var(--brand)) 14%, transparent) 50%,
    transparent 62%
  );
  animation: card-shimmer 0.7s ease-out;
  pointer-events: none;
}
.bb-module-card.just-completed::before {
  animation: accent-pulse 0.65s ease-out;
  opacity: 1;
  width: 4px;
}
.bb-module-card.just-completed .bb-card-glyph {
  animation: glyph-celebrate 0.55s cubic-bezier(0.34, 1.4, 0.64, 1);
  background: var(--section-tint, var(--brand-tint));
  border-color: color-mix(in srgb, var(--section-accent, var(--brand)) 32%, transparent);
  color: var(--section-accent, var(--brand));
}

/* Completion check */
.bb-check {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}
.bb-check:hover { border-color: var(--section-accent, var(--brand)); }
.bb-check .ring {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid rgba(20, 24, 31, 0.28);
  transition: border-color 0.2s ease;
}
.bb-check:hover .ring { border-color: var(--section-accent, var(--brand)); }
.bb-check.done {
  background: var(--section-accent, var(--brand));
  border-color: var(--section-accent, var(--brand));
  box-shadow: 0 2px 8px color-mix(in srgb, var(--section-accent, var(--brand)) 42%, transparent);
}
.bb-check.just-checked {
  animation: check-burst 0.55s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.bb-check.done svg { width: 13px; height: 13px; color: #fff; }
.bb-check.just-checked svg {
  animation: check-tick 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* legacy type badges (used on module page headers) */
.badge-live, .badge-self, .badge-guided {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px !important; font-weight: 600 !important;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  border: none !important;
}
.badge-live { background: var(--live-tint) !important; color: var(--live) !important; }
.badge-self { background: var(--self-tint) !important; color: var(--self) !important; }
.badge-guided { background: var(--guided-tint) !important; color: var(--guided) !important; }
.badge-live::before, .badge-self::before, .badge-guided::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}

/* ─── Module page header glyph ─────────────────────────── */
.module-glyph {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 11px;
  background: var(--brand-ink-2);
  color: #4fd6a4;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.module-glyph svg { width: 20px; height: 20px; }

.bb-rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(17, 157, 112, 0.45), rgba(17, 157, 112, 0.1) 50%, transparent);
  border: none;
}

/* ─── Filter chips ─────────────────────────────────────── */
.filter-tab {
  padding: 5px 12px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.filter-tab:hover { color: var(--ink); background: var(--surface); border-color: var(--line); }
.filter-tab.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ─── Agenda sidebar ───────────────────────────────────── */
.agenda-sidebar { position: sticky; top: 5rem; }
.agenda-section { position: relative; padding-left: 22px; padding-bottom: 4px; }
.agenda-section::before {
  content: ''; position: absolute; left: 6px; top: 24px; bottom: -2px;
  width: 1px;
  background: color-mix(in srgb, var(--section-accent, var(--brand)) 22%, var(--line));
}
.agenda-section:last-child::before { display: none; }
.agenda-dot {
  position: absolute; left: 0; top: 5px;
  width: 13px; height: 13px; border-radius: 4px;
  border: 1.5px solid color-mix(in srgb, var(--section-accent, var(--brand)) 35%, var(--line-strong));
  background: var(--surface); z-index: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.agenda-dot.complete { border-color: var(--section-accent, var(--brand)); background: var(--section-accent, var(--brand)); }
.agenda-dot.complete svg { display: block; }
.agenda-dot.in-progress { border-color: var(--section-accent, var(--brand)); background: var(--section-tint, var(--brand-tint)); }
.agenda-dot svg { display: none; width: 7px; height: 7px; color: white; }

.agenda-bar {
  flex: 1; height: 3px;
  background: rgba(20, 24, 31, 0.08);
  border-radius: 99px; overflow: hidden;
}
.agenda-bar-fill {
  display: block; height: 100%;
  background: var(--section-grad, var(--brand-grad));
  border-radius: 99px;
  transition: width 0.5s ease;
}

.agenda-link {
  display: block;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  text-decoration: none;
  margin-bottom: 4px;
  transition: color 0.15s ease;
}
.agenda-link:hover { color: var(--section-accent, var(--brand)); }

/* ─── Command palette ──────────────────────────────────── */
.cmd-palette-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10, 22, 17, 0.4);
  backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 18vh;
}
.cmd-palette-overlay.open { display: flex; }
.cmd-palette {
  width: 100%; max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cmd-result {
  padding: 9px 16px; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  transition: background 0.12s;
}
.cmd-result:hover, .cmd-result.active { background: var(--section-tint, var(--brand-tint-2)); }
.cmd-result:hover .cmd-icon, .cmd-result.active .cmd-icon {
  border-color: color-mix(in srgb, var(--section-accent, var(--brand)) 28%, transparent);
  color: var(--section-accent, var(--brand));
  background: var(--section-tint, var(--brand-tint));
}
.cmd-result .cmd-icon {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
}
.cmd-result .cmd-icon svg { width: 13px; height: 13px; }
.cmd-result .cmd-title { font-size: 13px; font-weight: 500; color: var(--ink); }
.cmd-result .cmd-section {
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--section-accent, var(--faint)); margin-left: auto; flex-shrink: 0;
  opacity: 0.85;
}

/* ─── Search glow (legacy) ─────────────────────────────── */
.search-glow:focus-within {
  box-shadow: 0 0 0 3px var(--brand-glow);
  border-color: var(--brand);
}

/* ─── Progress ring (legacy, used on subpages) ─────────── */
.progress-ring { transform: rotate(-90deg); }
.progress-ring-circle { transition: stroke-dashoffset 0.7s cubic-bezier(0.4, 0, 0.2, 1); }

/* ─── Carousel ─────────────────────────────────────────── */
.carousel-container { position: relative; overflow: hidden; border-radius: var(--card-radius); }
.carousel-track { display: flex; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.carousel-slide { min-width: 100%; position: relative; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.carousel-btn:hover { border-color: var(--brand); color: var(--brand); }
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

/* ─── TOC ──────────────────────────────────────────────── */
.toc-link {
  display: block;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--muted);
  border-left: 1.5px solid transparent;
  transition: all 0.18s;
  text-decoration: none;
}
.toc-link:hover { color: var(--brand); }
.toc-link.active {
  color: var(--brand-deep);
  font-weight: 600;
  border-left-color: var(--brand);
  background: linear-gradient(90deg, var(--brand-tint-2), transparent);
}

/* ─── Accordion ────────────────────────────────────────── */
.accordion-content {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-content.open { max-height: 2000px; }
.accordion-chevron { transition: transform 0.3s; }
.accordion-trigger[aria-expanded="true"] .accordion-chevron { transform: rotate(180deg); }

/* ─── Callouts ─────────────────────────────────────────── */
.callout {
  position: relative;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
  border: 1px solid;
  border-left-width: 3px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.callout-info {
  background: var(--self-tint);
  border-color: rgba(61, 111, 224, 0.2);
  border-left-color: var(--self);
  color: #2a4b96;
}
.callout-warning {
  background: var(--warn-tint);
  border-color: rgba(192, 124, 16, 0.22);
  border-left-color: var(--warn);
  color: #7a4e08;
}
.callout-important {
  background: var(--danger-tint);
  border-color: rgba(207, 68, 68, 0.2);
  border-left-color: var(--danger);
  color: #8e2f2f;
}
.callout-tip {
  background: var(--brand-tint-2);
  border-color: rgba(17, 157, 112, 0.22);
  border-left-color: var(--brand);
  color: var(--brand-deep);
}

/* ─── Knowledge check ──────────────────────────────────── */
.knowledge-check {
  background: var(--brand-tint-2);
  border: 1px dashed rgba(17, 157, 112, 0.35);
  border-radius: var(--card-radius);
  padding: 28px;
  text-align: center;
}

/* ─── Redirect card ────────────────────────────────────── */
.redirect-card {
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 28rem;
  margin: 0 auto;
  padding: 44px 36px;
  text-align: center;
}

/* ─── Scrollbar / selection / focus ────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(20, 24, 31, 0.16); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(17, 157, 112, 0.45); }

::selection { background: rgba(17, 157, 112, 0.22); }

:focus-visible {
  outline: 2px solid rgba(17, 157, 112, 0.6);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Animations ───────────────────────────────────────── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.animate-fade-in-up { animation: fade-in-up 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.animate-fade-in { animation: fade-in 0.5s ease forwards; opacity: 0; }
.animate-scale-in { animation: scale-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }

.stagger-1 { animation-delay: 0.04s; }
.stagger-2 { animation-delay: 0.08s; }
.stagger-3 { animation-delay: 0.12s; }
.stagger-4 { animation-delay: 0.16s; }
.stagger-5 { animation-delay: 0.2s; }
.stagger-6 { animation-delay: 0.24s; }
.stagger-7 { animation-delay: 0.28s; }
.stagger-8 { animation-delay: 0.32s; }
.stagger-9 { animation-delay: 0.36s; }

/* ─── Complete button (floating) ───────────────────────── */
.bb-complete-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-radius: 11px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.bb-complete-btn:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.bb-complete-btn .box {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--line-strong);
  transition: all 0.2s ease;
}
.bb-complete-btn:hover .box { border-color: var(--brand); }
.bb-complete-btn.done {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 4px rgba(20, 24, 31, 0.08), 0 12px 32px -12px rgba(17, 157, 112, 0.7);
}
.bb-complete-btn.done .box { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.15); }
.bb-complete-btn.done .box svg { width: 11px; height: 11px; color: #fff; }

/* ─── Footer module nav ────────────────────────────────── */
.bb-foot-nav {
  margin-top: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex; align-items: stretch; justify-content: space-between; gap: 14px;
}
.bb-foot-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  max-width: 48%;
  min-width: 0;
  transition: all 0.2s ease;
}
.bb-foot-link:hover {
  border-color: rgba(17, 157, 112, 0.45);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.bb-foot-link.next { margin-left: auto; text-align: right; flex-direction: row-reverse; }
.bb-foot-link .dir {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 2px;
}
.bb-foot-link .ttl {
  display: block;
  font-size: 13px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.15s ease;
}
.bb-foot-link:hover .ttl { color: var(--brand-deep); }
.bb-foot-link .arr { color: var(--faint); flex-shrink: 0; }
.bb-foot-link .arr svg { width: 15px; height: 15px; }
.bb-foot-link:hover .arr { color: var(--brand); }

/* ─── Mini hero (module sub-pages) ─────────────────────── */
.bb-mini-hero {
  position: relative;
  margin-top: 56px;
  background:
    radial-gradient(48% 120% at 82% 0%, rgba(18, 176, 144, 0.2), transparent 68%),
    radial-gradient(36% 90% at 8% 100%, rgba(16, 171, 151, 0.1), transparent 72%),
    linear-gradient(180deg, #0b231b, #0a1d16);
  color: #f4faf7;
  overflow: hidden;
  border-bottom: 1px solid rgba(47, 190, 143, 0.22);
}
.bb-mini-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 100% 40px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 40px 100%;
  -webkit-mask-image: linear-gradient(180deg, black 30%, transparent 100%);
  mask-image: linear-gradient(180deg, black 30%, transparent 100%);
  pointer-events: none;
}
.bb-mini-hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 190, 143, 0.45), transparent);
}

.bb-mini-hero-inner {
  position: relative; z-index: 1;
  max-width: 84rem; margin: 0 auto;
  padding: 22px 24px 24px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 28px 40px;
}
@media (min-width: 1024px) {
  .bb-mini-hero-inner { padding: 24px 32px 26px; }
}
@media (max-width: 767px) {
  .bb-mini-hero-inner { flex-direction: column; align-items: stretch; gap: 20px; }
}

.bb-mini-hero-main { min-width: 0; flex: 1; }

.bb-mini-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: #57d6a8;
}
.bb-mini-hero-eyebrow .tick {
  width: 6px; height: 6px; border-radius: 2px;
  background: var(--brand-grad);
  box-shadow: 0 0 10px rgba(47, 190, 143, 0.75);
  flex-shrink: 0;
}

.bb-mini-hero-title-row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 10px 12px; margin-top: 10px;
}
.bb-mini-hero-glyph {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #9ee8cc;
}
.bb-mini-hero-glyph svg { width: 18px; height: 18px; }

.bb-mini-hero-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #fff;
  margin: 0;
}

.bb-mini-hero-badge {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}
.bb-mini-hero-badge-live { background: rgba(14, 157, 110, 0.22); color: #7fe0bb; border-color: rgba(127, 224, 187, 0.25); }
.bb-mini-hero-badge-self { background: rgba(61, 111, 224, 0.2); color: #a8c4ff; border-color: rgba(168, 196, 255, 0.22); }
.bb-mini-hero-badge-guided { background: rgba(138, 85, 214, 0.22); color: #d4b8ff; border-color: rgba(212, 184, 255, 0.22); }

.bb-mini-hero-stats {
  display: flex; align-items: center; gap: 16px;
  flex-shrink: 0;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}
@media (max-width: 767px) {
  .bb-mini-hero-stats { flex-wrap: wrap; }
  .bb-mini-hero-stat-grow { flex: 1 1 100%; order: 3; }
}

.bb-mini-hero-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bb-mini-hero-stat-grow { min-width: 140px; }
.bb-mini-hero-stat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.bb-mini-hero-stat .lbl {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(222, 238, 231, 0.48);
  white-space: nowrap;
}
.bb-mini-hero-stat .val {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bb-mini-hero-stat .val span { color: rgba(222, 238, 231, 0.45); font-weight: 600; }
.bb-mini-hero-stat .val.brand { color: #4fd6a4; }
.bb-mini-hero-stat .val.brand span { color: rgba(79, 214, 164, 0.55); }

.bb-mini-hero-bar {
  height: 4px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden; margin-top: 2px;
}
.bb-mini-hero-bar i {
  display: block; height: 100%; border-radius: 99px;
  background: var(--section-grad, var(--brand-grad));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bb-mini-hero-status {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(222, 238, 231, 0.55);
}
.bb-mini-hero-status.done {
  background: rgba(47, 190, 143, 0.18);
  border-color: rgba(79, 214, 164, 0.35);
  color: #7fe0bb;
}
.bb-mini-hero-status svg { width: 14px; height: 14px; }

/* Trim duplicate page header spacing when mini-hero is present */
body.bb-has-mini-hero main {
  padding-top: 2.5rem !important;
}
body.bb-has-mini-hero main > header:first-child {
  margin-bottom: 1.75rem;
}
body.bb-has-mini-hero main > header:first-child .bb-rule {
  margin-top: 1.25rem;
}

/* Section accent on eyebrow */
.bb-mini-hero[data-section="software"] .bb-mini-hero-eyebrow { color: #7ec8f0; }
.bb-mini-hero[data-section="software"] .bb-mini-hero-eyebrow .tick { background: linear-gradient(99deg, #5eb8e8, #3d8fd4); box-shadow: 0 0 10px rgba(94, 184, 232, 0.6); }
.bb-mini-hero[data-section="security"] .bb-mini-hero-eyebrow { color: #f0c06a; }
.bb-mini-hero[data-section="security"] .bb-mini-hero-eyebrow .tick { background: linear-gradient(99deg, #e8b04a, #d4922a); box-shadow: 0 0 10px rgba(232, 176, 74, 0.55); }
.bb-mini-hero[data-section="policies"] .bb-mini-hero-eyebrow { color: #c9a8f0; }
.bb-mini-hero[data-section="policies"] .bb-mini-hero-eyebrow .tick { background: linear-gradient(99deg, #a878e8, #8a55d6); box-shadow: 0 0 10px rgba(168, 120, 232, 0.55); }

/* ─── Confetti ─────────────────────────────────────────── */
@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.confetti-piece {
  position: fixed; top: 0; z-index: 99999;
  width: 7px; height: 11px; border-radius: 2px;
  animation: confetti-fall 3s ease-in forwards;
  pointer-events: none;
}

/* ─── Reduced motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .animate-fade-in-up, .animate-fade-in, .animate-scale-in { opacity: 1; }
  .bb-module-card.just-completed::after,
  .bb-check.just-checked,
  .brick.filled.just-laid { animation: none !important; }
}

/* ─── Print ────────────────────────────────────────────── */
@media print {
  .glass-nav, #main-nav, .carousel-btn, .knowledge-check, .bb-complete-btn { display: none !important; }
  body { background: white !important; color: black !important; }
}
