/* BeFluent shared design system — 2026 console refined
 * Tokens, layout shell, sidebar, top bar, profile, cards
 */

:root {
  /* Brand */
  --bf-charcoal: #0A0A0A;
  --bf-charcoal-soft: #1A1A1A;
  --bf-lime: #E8FF47;
  --bf-lime-soft: #F2FF8E;

  /* Neutrals (zinc-leaning, warmer) */
  --bf-text: #18181B;
  --bf-text-muted: #52525B;
  --bf-text-subtle: #A1A1AA;
  --bf-line: #E4E4E7;
  --bf-line-soft: #F4F4F5;

  /* Surfaces */
  --bf-surface: rgba(255,255,255,.72);
  --bf-surface-solid: #FFFFFF;
  --bf-bg-grad: radial-gradient(at 0% 0%, #F1ECF9 0px, transparent 60%),
               radial-gradient(at 100% 0%, #FFE9E2 0px, transparent 50%),
               radial-gradient(at 50% 100%, #E1EFFF 0px, transparent 60%),
               #FAFAFB;

  /* Pastel cards */
  --bf-card-lavender: #ECE8FF;
  --bf-card-mint: #DBF3E1;
  --bf-card-peach: #FFE6D1;
  --bf-card-sky: #DCEEFF;
  --bf-card-rose: #FFE0E9;
  --bf-card-yellow: #FFF4C2;
  --bf-card-cream: #FFF1E1;
  --bf-card-stone: #F4F4F5;

  /* Effects */
  --bf-shadow-sm: 0 1px 2px rgba(13,13,13,.04), 0 4px 12px rgba(13,13,13,.04);
  --bf-shadow-md: 0 6px 20px rgba(13,13,13,.06), 0 12px 32px rgba(13,13,13,.05);
  --bf-shadow-lg: 0 12px 32px rgba(13,13,13,.10);

  /* Radius */
  --bf-r-sm: 10px;
  --bf-r-md: 14px;
  --bf-r-lg: 18px;
  --bf-r-xl: 22px;
  --bf-r-2xl: 28px;

  /* Type */
  --bf-font-sans: 'Pretendard', 'Apple SD Gothic Neo', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --bf-font-mono: 'JetBrains Mono', 'SF Mono', 'IBM Plex Mono', 'Roboto Mono', ui-monospace, monospace;
}

/* Reset basics */
.bf * { box-sizing: border-box; }
.bf html, body.bf, .bf body { margin: 0; padding: 0; }
body.bf {
  background: var(--bf-bg-grad);
  background-attachment: fixed;
  color: var(--bf-text);
  font-family: var(--bf-font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.bf a { color: inherit; text-decoration: none; }
body.bf button { font-family: inherit; cursor: pointer; }

/* ─── Layout: sidebar + main ─────────────────────────────── */
.bf-layout {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 100vh;
  gap: 0;
  padding: 14px 14px 14px 0;
  transition: grid-template-columns .25s cubic-bezier(.4,0,.2,1);
}
/* Expand only when mouse is over sidebar (CSS-only via :has) */
.bf-layout:has(.bf-sidebar:hover) { grid-template-columns: 220px 1fr; }
/* Manual override (e.g., pinned via JS) */
.bf-layout.expanded { grid-template-columns: 220px 1fr; }

.bf-sidebar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 14px;
  gap: 12px;
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  width: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Subtle darker gradient — enough to separate from main bg, not too heavy */
  background: linear-gradient(180deg, rgba(232, 226, 244, .55) 0%, rgba(220, 213, 235, .45) 60%, rgba(232, 226, 244, .35) 100%);
  border-radius: var(--bf-r-2xl);
  border: 1px solid rgba(13, 13, 13, .04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
.bf-sidebar::-webkit-scrollbar { display: none; }

/* Logo: 44px mark column + word column. Mark X never moves. */
.bf-logo, body.bf a.bf-logo {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  height: 44px;
  width: 44px;                       /* collapsed */
  overflow: hidden;
  text-decoration: none;
  transition: width .25s cubic-bezier(.4,0,.2,1);
  background: transparent;            /* the mark element holds the bg */
  color: inherit;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  flex-shrink: 0;
  font-size: 0;
}
body.bf a.bf-logo:hover { color: inherit; }
.bf-logo > .bf-logo-mark {
  width: 44px; height: 44px;
  background: var(--bf-charcoal);
  color: var(--bf-lime);
  border-radius: var(--bf-r-md);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 22px; letter-spacing: -.05em;
  box-shadow: var(--bf-shadow-sm);
}
.bf-logo > .bf-logo-word {
  padding-left: 12px;
  font-size: 16px; font-weight: 800; letter-spacing: -.02em;
  color: var(--bf-text);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s;
}
.bf-layout.expanded .bf-logo,
.bf-layout:has(.bf-sidebar:hover) .bf-logo { width: 192px; }
.bf-layout.expanded .bf-logo > .bf-logo-word,
.bf-layout:has(.bf-sidebar:hover) .bf-logo > .bf-logo-word { opacity: 1; }

.bf-nav {
  display: flex; flex-direction: column; gap: 2px;
  width: 44px;
  align-items: flex-start;
  background: transparent;
  padding: 0;
  border: 0;
}
.bf-layout.expanded .bf-nav,
.bf-layout:has(.bf-sidebar:hover) .bf-nav { width: 192px; }

/* Each nav link: 44px icon column + label column. Icon X is constant. */
.bf-nav a {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  height: 44px;
  width: 44px;                                /* collapsed */
  overflow: hidden;
  border-radius: var(--bf-r-md);
  color: var(--bf-text-muted);
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  transition: width .25s cubic-bezier(.4,0,.2,1), background .15s, color .15s;
  text-decoration: none;
}
.bf-layout.expanded .bf-nav a,
.bf-layout:has(.bf-sidebar:hover) .bf-nav a { width: 192px; }
.bf-nav a > svg {
  width: 20px; height: 20px; stroke-width: 1.8;
  justify-self: center;
}
.bf-nav a > .bf-nav-label {
  opacity: 0;
  transition: opacity .18s;
  padding-right: 12px;
}
.bf-layout.expanded .bf-nav a > .bf-nav-label,
.bf-layout:has(.bf-sidebar:hover) .bf-nav a > .bf-nav-label { opacity: 1; }
.bf-nav a:hover { background: rgba(13,13,13,.05); color: var(--bf-charcoal); }
.bf-nav a.active { background: var(--bf-charcoal); color: var(--bf-lime); }

.bf-sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; width: 100%; }

/* Sidebar foot items use the same 44px icon-column pattern as nav */
.bf-icon-btn, .bf-version-chip, body.bf a.bf-version-chip {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  height: 40px;
  width: 44px;                                 /* collapsed */
  overflow: hidden;
  border-radius: var(--bf-r-md);
  background: transparent;
  border: 0;
  color: var(--bf-text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: width .25s cubic-bezier(.4,0,.2,1), background .15s, color .15s;
  font-family: inherit;
  font-size: 12px;
  padding: 0;
}
.bf-icon-btn:hover, .bf-version-chip:hover { background: rgba(13,13,13,.05); color: var(--bf-charcoal); }
.bf-icon-btn > svg { justify-self: center; width: 16px; height: 16px; stroke-width: 1.8; }
.bf-layout.expanded .bf-icon-btn,
.bf-layout.expanded .bf-version-chip,
.bf-layout:has(.bf-sidebar:hover) .bf-icon-btn,
.bf-layout:has(.bf-sidebar:hover) .bf-version-chip { width: 192px; }

/* Version chip — dot in icon column, version + type label in label column */
.bf-version-chip > .bf-version-dot {
  justify-self: center;
  width: 8px; height: 8px; border-radius: 999px; background: #94a3b8;
}
.bf-version-dot.major { background: #f97316; }
.bf-version-dot.minor { background: #2563eb; }
.bf-version-dot.patch { background: #22c55e; }
.bf-version-chip > .bf-version-text {
  display: flex; align-items: baseline; gap: 6px;
  opacity: 0; transition: opacity .2s;
  white-space: nowrap;
}
.bf-version-text > .bf-version-num { font-family: var(--bf-font-mono); font-size: 11px; font-weight: 700; color: var(--bf-text); }
.bf-version-text > .bf-version-label { font-size: 10px; color: var(--bf-text-subtle); text-transform: capitalize; }
.bf-layout.expanded .bf-version-chip > .bf-version-text,
.bf-layout:has(.bf-sidebar:hover) .bf-version-chip > .bf-version-text { opacity: 1; }
/* In collapsed mode, the dot acts as the version indicator */

/* ─── Main ─────────────────────────────────────────────── */
.bf-main {
  background: var(--bf-surface);
  backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: var(--bf-r-2xl);
  padding: 26px 32px 36px;
  box-shadow: var(--bf-shadow-sm);
  min-width: 0;
}

/* ─── Topbar ───────────────────────────────────────────── */
.bf-topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.bf-topbar-left .bf-eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--bf-text-subtle);
  margin-bottom: 4px;
}
.bf-topbar-left h1 {
  margin: 0; font-size: 32px; font-weight: 800;
  letter-spacing: -.025em; color: var(--bf-text);
  line-height: 1.1;
}

.bf-topbar-right { display: flex; gap: 8px; align-items: center; }
/* Unified topbar-right control height for visual rhythm */
.bf-topbar-right > * { height: 38px; box-sizing: border-box; }
.bf-search-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 14px; background: var(--bf-surface-solid);
  border-radius: 999px; border: 1px solid var(--bf-line);
  color: var(--bf-text-muted); font-size: 13px;
  transition: all .15s;
}
.bf-search-btn:hover { color: var(--bf-text); border-color: var(--bf-text-muted); }
.bf-search-btn kbd { font-family: var(--bf-font-mono); font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--bf-line-soft); color: var(--bf-text-muted); }

.bf-bell {
  width: 38px; border-radius: 999px;
  background: var(--bf-surface-solid); border: 1px solid var(--bf-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--bf-text-muted); position: relative;
}
.bf-bell:hover { color: var(--bf-text); }
.bf-bell svg { width: 16px; height: 16px; stroke-width: 1.8; }
.bf-bell-dot {
  position: absolute; top: 8px; right: 9px;
  width: 7px; height: 7px; background: var(--bf-charcoal);
  border-radius: 999px; border: 2px solid var(--bf-surface-solid);
}

.bf-profile {
  display: flex; align-items: center;
  position: relative;
  width: 38px; height: 38px;
}
.bf-avatar {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ECE8FF, #FFE0E9);
  border: 1px solid var(--bf-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--bf-charcoal); font-weight: 800; font-size: 14px;
  cursor: pointer; transition: all .15s;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
}
.bf-avatar:hover { box-shadow: var(--bf-shadow-sm); }
.bf-profile-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 240px; background: var(--bf-surface-solid);
  border: 1px solid var(--bf-line); border-radius: var(--bf-r-lg);
  box-shadow: var(--bf-shadow-md);
  padding: 12px; z-index: 100;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.bf-profile.open .bf-profile-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.bf-profile-head { padding: 8px 8px 12px; border-bottom: 1px solid var(--bf-line-soft); margin-bottom: 8px; }
.bf-profile-name { font-weight: 800; font-size: 14px; color: var(--bf-text); }
.bf-profile-code { font-family: var(--bf-font-mono); font-size: 11px; color: var(--bf-text-muted); margin-top: 4px; }
.bf-profile-menu a, .bf-profile-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 8px; border-radius: var(--bf-r-sm);
  font-size: 13px; color: var(--bf-text); border: 0; background: transparent;
  text-align: left;
}
.bf-profile-menu a:hover, .bf-profile-menu button:hover { background: var(--bf-line-soft); }
.bf-profile-menu svg { width: 16px; height: 16px; stroke-width: 1.8; color: var(--bf-text-muted); }

/* ─── Streak + achievement chips (gamification) ──────────── */
.bf-streak {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 12px;
  background: linear-gradient(135deg, #FFE6D1 0%, #FFE0E9 100%);
  border-radius: 999px;
  font-size: 12px; font-weight: 800;
  color: var(--bf-charcoal);
  border: 1px solid rgba(13,13,13,.04);
  cursor: default;
}
.bf-streak .bf-streak-icon { font-size: 14px; line-height: 1; animation: bf-flame 1.6s ease-in-out infinite; }
@keyframes bf-flame { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15) rotate(-3deg); } }
.bf-streak .bf-streak-num { font-family: var(--bf-font-mono); font-size: 13px; }

/* ─── Goal modal ─────────────────────────────────────── */
.bf-goal-backdrop {
  position: fixed; inset: 0;
  background: rgba(13,13,13,.5); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 2147483600;
}
.bf-goal-backdrop.open { display: flex; }
.bf-goal-modal {
  background: #fff; border-radius: var(--bf-r-2xl);
  padding: 28px; max-width: 440px; width: 100%;
  box-shadow: var(--bf-shadow-lg);
}
.bf-goal-head { margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.bf-goal-mark { width: 36px; height: 36px; border-radius: var(--bf-r-md); background: var(--bf-charcoal); color: var(--bf-lime); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900; }
.bf-goal-title-wrap { flex: 1; }
.bf-goal-title { font-size: 17px; font-weight: 800; color: var(--bf-text); margin: 0; }
.bf-goal-sub { font-size: 12px; color: var(--bf-text-muted); margin-top: 2px; }
.bf-goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.bf-goal-field { display: flex; flex-direction: column; gap: 6px; }
.bf-goal-field label { font-size: 12px; font-weight: 700; color: var(--bf-text); }
.bf-goal-field .bf-goal-hint { font-size: 11px; color: var(--bf-text-subtle); }
.bf-goal-field input { padding: 10px 12px; border-radius: var(--bf-r-sm); border: 1px solid var(--bf-line); font-family: var(--bf-font-mono); font-size: 14px; font-weight: 700; color: var(--bf-text); background: var(--bf-line-soft); transition: border-color .12s, background .12s; }
.bf-goal-field input:focus { outline: none; background: #fff; border-color: var(--bf-charcoal); }
.bf-goal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.bf-goal-btn { padding: 10px 18px; border-radius: var(--bf-r-sm); border: 1px solid var(--bf-line); background: #fff; font-size: 13px; font-weight: 700; color: var(--bf-text); cursor: pointer; }
.bf-goal-btn:hover { background: var(--bf-line-soft); }
.bf-goal-btn.primary { background: var(--bf-charcoal); color: var(--bf-lime); border-color: var(--bf-charcoal); }
.bf-goal-btn.primary:hover { background: var(--bf-charcoal-soft); }

/* ─── Mascot (topbar belly indicator) ────────────────── */
.bf-mascot {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px;
  background: var(--bf-surface-solid);
  border: 1px solid var(--bf-line);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
}
.bf-mascot:hover { box-shadow: var(--bf-shadow-sm); border-color: var(--bf-text-subtle); }
.bf-mascot-svg { width: 28px; height: 28px; flex-shrink: 0; }
.bf-mascot-pct {
  font-family: var(--bf-font-mono); font-size: 12px; font-weight: 800;
  color: var(--bf-text);
  letter-spacing: -.02em;
}
.bf-mascot.full {
  background: linear-gradient(135deg, #FFFEEB 0%, #FFFEEB 100%);
  border-color: var(--bf-lime);
  box-shadow: 0 0 0 2px rgba(232,255,71,.18);
}
.bf-mascot.full .bf-mascot-svg { animation: bf-drop-bob 1.6s ease-in-out infinite; }
@keyframes bf-drop-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

/* ─── Daily progress hero (mascot card next to KPIs) ─────── */
.bf-daily {
  display: grid;
  grid-template-columns: minmax(240px, 280px) 1fr;
  gap: 12px;
  margin-bottom: 22px;
}
@media (max-width: 760px) { .bf-daily { grid-template-columns: 1fr; } }

.bf-droplet, body.bf a.bf-droplet {
  background: var(--bf-surface-solid);
  border: 1px solid var(--bf-line);
  border-radius: var(--bf-r-lg);
  padding: 16px 18px;
  display: flex; gap: 14px; align-items: center;
  position: relative; overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  color: inherit;
}
.bf-droplet:hover { transform: translateY(-1px); box-shadow: var(--bf-shadow-sm); border-color: var(--bf-text-subtle); }
.bf-droplet-svg-wrap { width: 76px; height: 84px; flex-shrink: 0; }
.bf-droplet-svg { width: 100%; height: 100%; display: block; }
.bf-droplet-info { min-width: 0; flex: 1; }
.bf-droplet-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bf-text-subtle); margin-bottom: 4px; }
.bf-droplet-pct { font-family: var(--bf-font-mono); font-size: 26px; font-weight: 800; color: var(--bf-text); line-height: 1; letter-spacing: -.02em; }
.bf-droplet-msg { font-size: 12px; color: var(--bf-text-muted); margin-top: 6px; line-height: 1.4; }
.bf-droplet.full {
  background: linear-gradient(135deg, #FFFEEB 0%, #FFFEEB 100%);
  border-color: var(--bf-lime);
  box-shadow: 0 0 0 3px rgba(232,255,71,.18);
}
.bf-droplet.full .bf-droplet-pct { color: var(--bf-charcoal); }
@keyframes bf-drop-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.bf-droplet.full .bf-droplet-svg { animation: bf-drop-bob 1.6s ease-in-out infinite; }

/* ─── KPI strip ─────────────────────────────────────────── */
.bf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.bf-kpi { padding: 16px 18px; background: var(--bf-surface-solid); border: 1px solid var(--bf-line); border-radius: var(--bf-r-lg); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.bf-kpi-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bf-text-subtle); }
.bf-kpi-value { font-family: var(--bf-font-mono); font-size: 22px; font-weight: 700; color: var(--bf-text); letter-spacing: -.02em; }
.bf-kpi-sub { font-size: 11px; color: var(--bf-text-muted); }
/* Mini progress bar inside KPI for goal progress */
.bf-kpi-bar { height: 4px; background: var(--bf-line-soft); border-radius: 999px; overflow: hidden; margin-top: 2px; }
.bf-kpi-bar > span { display: block; height: 100%; background: var(--bf-charcoal); border-radius: 999px; transition: width .5s cubic-bezier(.4,0,.2,1); }
.bf-kpi.goal-met .bf-kpi-bar > span { background: linear-gradient(90deg, var(--bf-charcoal), var(--bf-lime)); }
.bf-kpi.goal-met::after {
  content: '✓'; position: absolute; top: 12px; right: 14px;
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--bf-lime); color: var(--bf-charcoal);
  font-size: 12px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  animation: bf-pop .3s ease-out;
}
@keyframes bf-pop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ─── Cards grid ─────────────────────────────────────────── */
.bf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.bf-grid-bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }

.bf-card {
  padding: 22px;
  border-radius: var(--bf-r-xl);
  transition: transform .22s cubic-bezier(.4,0,.2,1), box-shadow .22s;
  position: relative; overflow: hidden;
  min-height: 152px; display: flex; flex-direction: column;
  justify-content: space-between;
  border: 1px solid transparent;
}
.bf-card:hover { transform: translateY(-3px); box-shadow: var(--bf-shadow-md); }
.bf-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.bf-card-icon {
  width: 38px; height: 38px; border-radius: var(--bf-r-md);
  background: rgba(13,13,13,.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--bf-charcoal);
}
.bf-card-icon svg { width: 18px; height: 18px; stroke-width: 1.8; }
.bf-card h3 { margin: 18px 0 4px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--bf-text); }
.bf-card p { margin: 0; color: var(--bf-text-muted); font-size: 13px; line-height: 1.45; }
.bf-tag { display: inline-flex; align-items: center; padding: 3px 9px; background: rgba(13,13,13,.06); border-radius: 999px; font-size: 10px; font-weight: 700; color: var(--bf-charcoal); letter-spacing: .04em; text-transform: uppercase; }

.bf-card.lavender { background: var(--bf-card-lavender); }
.bf-card.mint { background: var(--bf-card-mint); }
.bf-card.peach { background: var(--bf-card-peach); }
.bf-card.sky { background: var(--bf-card-sky); }
.bf-card.rose { background: var(--bf-card-rose); }
.bf-card.yellow { background: var(--bf-card-yellow); }
.bf-card.cream { background: var(--bf-card-cream); }
.bf-card.stone { background: var(--bf-card-stone); }

.bf-card.cta { background: var(--bf-charcoal); color: #fff; }
.bf-card.cta h3 { color: var(--bf-lime); }
.bf-card.cta p { color: rgba(255,255,255,.65); }
.bf-card.cta .bf-card-icon { background: rgba(255,255,255,.08); color: var(--bf-lime); }
.bf-card.cta .bf-tag { background: rgba(232,255,71,.18); color: var(--bf-lime); }

/* Bento sizes */
.bf-card.span-6 { grid-column: span 6; }
.bf-card.span-4 { grid-column: span 4; }
.bf-card.span-3 { grid-column: span 3; }
.bf-card.span-12 { grid-column: span 12; }

/* ─── Section header & filter chips ─────────────────────── */
.bf-section { margin-top: 28px; }
.bf-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.bf-section-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: var(--bf-text); margin: 0; }
.bf-section-sub { font-size: 12px; color: var(--bf-text-muted); margin-top: 2px; }
.bf-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.bf-chip {
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.7); border: 1px solid var(--bf-line);
  font-size: 12px; font-weight: 700; color: var(--bf-text-muted);
  cursor: pointer; transition: all .15s;
}
.bf-chip:hover { color: var(--bf-text); border-color: var(--bf-text-muted); }
.bf-chip.active { background: var(--bf-charcoal); color: var(--bf-lime); border-color: var(--bf-charcoal); }

/* ─── Continue learning hero card ─────────────────────── */
.bf-hero-card {
  background: linear-gradient(135deg, #ECE8FF 0%, #FFE0E9 100%);
  border-radius: var(--bf-r-2xl);
  padding: 24px 28px;
  display: flex; flex-direction: column; gap: 18px;
  border: 1px solid rgba(13,13,13,.04);
  transition: transform .22s, box-shadow .22s;
}
.bf-hero-card:hover { transform: translateY(-2px); box-shadow: var(--bf-shadow-md); }
.bf-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}
@media (max-width: 720px) {
  .bf-hero-top { grid-template-columns: 1fr; }
}
.bf-hero-info { min-width: 0; }
.bf-hero-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bf-charcoal); opacity: .55; margin-bottom: 4px; }
.bf-hero-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--bf-text); margin: 0; }
.bf-hero-meta { font-size: 12px; color: var(--bf-text-muted); margin-top: 4px; }

/* Progress row — full width bar with meta on right */
.bf-hero-progress-row {
  display: flex; align-items: center; gap: 14px;
}
.bf-hero-progress {
  flex: 1;
  height: 6px; border-radius: 999px;
  background: rgba(13,13,13,.08); overflow: hidden;
}
.bf-hero-progress > span { display: block; height: 100%; background: var(--bf-charcoal); border-radius: 999px; transition: width .4s; }
.bf-hero-progress-meta {
  font-family: var(--bf-font-mono); font-size: 11px;
  color: var(--bf-text-muted); white-space: nowrap; flex-shrink: 0;
}

/* Action buttons row — horizontal, scrollable if many */
.bf-hero-actions {
  display: flex; gap: 8px; align-items: center;
  flex-wrap: nowrap; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.bf-hero-actions::-webkit-scrollbar { display: none; }
.bf-hero-cta {
  padding: 10px 16px;
  border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: -.005em;
  border: 1px solid transparent; cursor: pointer;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
  text-decoration: none;
  flex-shrink: 0;
}
.bf-hero-cta:active { transform: scale(.97); }
.bf-hero-cta.primary { background: var(--bf-charcoal); color: var(--bf-lime); }
.bf-hero-cta.primary:hover { background: var(--bf-charcoal-soft); color: var(--bf-lime); }
.bf-hero-cta.ghost { background: rgba(255,255,255,.65); color: var(--bf-charcoal); border-color: rgba(13,13,13,.08); }
.bf-hero-cta.ghost:hover { background: #fff; border-color: var(--bf-charcoal); }

/* Sprint card (smaller, uniform) */
.bf-sprint-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.bf-sprint-card {
  padding: 18px;
  border-radius: var(--bf-r-lg);
  background: var(--bf-surface-solid);
  border: 1px solid var(--bf-line);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 130px;
}
.bf-sprint-card:hover { transform: translateY(-2px); box-shadow: var(--bf-shadow-sm); border-color: var(--bf-text-subtle); }
.bf-sprint-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.bf-sprint-icon { width: 34px; height: 34px; border-radius: var(--bf-r-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bf-sprint-icon svg { width: 16px; height: 16px; stroke-width: 1.8; }
.bf-sprint-icon.lavender { background: var(--bf-card-lavender); color: #5B4DBE; }
.bf-sprint-icon.mint { background: var(--bf-card-mint); color: #1F8A4E; }
.bf-sprint-icon.peach { background: var(--bf-card-peach); color: #D26B17; }
.bf-sprint-icon.sky { background: var(--bf-card-sky); color: #1B6CC9; }
.bf-sprint-icon.rose { background: var(--bf-card-rose); color: #C44569; }
.bf-sprint-card h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--bf-text); letter-spacing: -.01em; }
.bf-sprint-card p { margin: 2px 0 0; color: var(--bf-text-muted); font-size: 12px; line-height: 1.45; }
.bf-sprint-card .bf-tag { font-size: 9px; padding: 2px 7px; }
.bf-sprint-progress { margin-top: auto; }
.bf-sprint-progress-bar { height: 4px; border-radius: 999px; background: var(--bf-line-soft); overflow: hidden; }
.bf-sprint-progress-bar > span { display: block; height: 100%; background: var(--bf-charcoal); border-radius: 999px; }
.bf-sprint-progress-text { font-family: var(--bf-font-mono); font-size: 10px; color: var(--bf-text-subtle); margin-top: 4px; display: flex; justify-content: space-between; }

/* ─── Category page (Critical 1/2/3, OPIc) ──────────── */
.bf-cat-list { display: grid; gap: 8px; margin-top: 6px; }
.bf-cat-row, body.bf a.bf-cat-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(180px, 220px) 100px auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bf-surface-solid);
  border: 1px solid var(--bf-line);
  border-radius: var(--bf-r-lg);
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  color: inherit;
}
.bf-cat-row:hover { transform: translateY(-1px); box-shadow: var(--bf-shadow-sm); border-color: var(--bf-text-subtle); }
.bf-cat-row.done { background: linear-gradient(90deg, rgba(232,255,71,.10) 0%, transparent 70%); border-color: rgba(13,13,13,.12); }
.bf-cat-row.in-progress { border-color: var(--bf-charcoal); }
.bf-cat-num {
  font-family: var(--bf-font-mono); font-size: 13px; font-weight: 700;
  color: var(--bf-text-subtle); letter-spacing: .04em;
}
.bf-cat-title-wrap { min-width: 0; }
.bf-cat-title { font-size: 15px; font-weight: 800; color: var(--bf-text); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-cat-meta { font-size: 11px; color: var(--bf-text-muted); margin-top: 2px; font-family: var(--bf-font-mono); }
.bf-cat-progress-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bf-cat-progress { flex: 1; height: 5px; background: var(--bf-line-soft); border-radius: 999px; overflow: hidden; }
.bf-cat-progress > span { display: block; height: 100%; background: var(--bf-charcoal); border-radius: 999px; transition: width .4s; }
.bf-cat-row.done .bf-cat-progress > span { background: linear-gradient(90deg, var(--bf-charcoal), var(--bf-lime)); }
.bf-cat-pct { font-family: var(--bf-font-mono); font-size: 11px; font-weight: 700; color: var(--bf-text-muted); flex-shrink: 0; min-width: 32px; text-align: right; }
.bf-cat-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: var(--bf-line-soft); color: var(--bf-text-muted);
}
.bf-cat-row.done .bf-cat-status { background: var(--bf-lime); color: var(--bf-charcoal); }
.bf-cat-row.in-progress .bf-cat-status { background: var(--bf-card-lavender); color: var(--bf-charcoal); }
.bf-cat-cta {
  padding: 8px 14px; border-radius: 999px;
  background: var(--bf-charcoal); color: var(--bf-lime);
  font-size: 12px; font-weight: 700; letter-spacing: -.005em;
  border: 0; cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.bf-cat-row:hover .bf-cat-cta { background: var(--bf-charcoal-soft); }
@media (max-width: 980px) {
  .bf-cat-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; }
  .bf-cat-progress-wrap, .bf-cat-status { display: none; }
}

/* ─── Choice page (Rapid vs Vocab vs ...) ────────────── */
.bf-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.bf-choice-card, body.bf a.bf-choice-card {
  display: flex; flex-direction: column;
  padding: 28px 26px 24px;
  background: var(--bf-surface-solid);
  border: 1px solid var(--bf-line);
  border-radius: var(--bf-r-xl);
  text-decoration: none;
  color: inherit;
  transition: transform .22s, box-shadow .22s, border-color .22s;
  min-height: 200px;
  position: relative;
}
.bf-choice-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--bf-shadow-md);
  border-color: var(--bf-charcoal);
}
.bf-choice-card.disabled { opacity: .55; pointer-events: none; }
.bf-choice-chip {
  display: inline-flex; align-self: flex-start;
  padding: 5px 12px; border-radius: 999px;
  background: var(--bf-card-lavender); color: var(--bf-charcoal);
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  margin-bottom: 14px;
}
.bf-choice-card.disabled .bf-choice-chip { background: var(--bf-line-soft); color: var(--bf-text-muted); }
.bf-choice-title { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: var(--bf-text); letter-spacing: -.01em; }
.bf-choice-desc { margin: 0; color: var(--bf-text-muted); font-size: 13px; line-height: 1.55; flex: 1; }
.bf-choice-cta {
  margin-top: 18px;
  display: inline-flex; align-self: flex-start;
  padding: 10px 18px; border-radius: 999px;
  background: var(--bf-charcoal); color: var(--bf-lime);
  font-size: 13px; font-weight: 800;
  transition: background .15s;
}
.bf-choice-card:hover .bf-choice-cta { background: var(--bf-charcoal-soft); }
.bf-choice-card.disabled .bf-choice-cta { background: var(--bf-line); color: var(--bf-text-muted); }

/* ─── Footer ─────────────────────────────────────────── */
.bf-footer { text-align: center; color: var(--bf-text-subtle); font-size: 11px; padding: 22px 0 10px; }
.bf-footer a { color: inherit; text-decoration: underline; }

/* ─── Misc utility ─────────────────────────────────────── */
.bf-hidden { display: none !important; }
.bf-mono { font-family: var(--bf-font-mono); }
.bf-row { display: flex; align-items: center; gap: 8px; }
.bf-spacer { flex: 1; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 880px) {
  .bf-layout { grid-template-columns: 1fr; padding: 12px; }
  .bf-layout.expanded { grid-template-columns: 1fr; }
  .bf-sidebar { flex-direction: row; padding: 0 0 12px; height: auto; position: static; gap: 12px; flex-wrap: wrap; }
  .bf-nav { flex-direction: row; border-radius: var(--bf-r-md); }
  .bf-nav a .bf-nav-label { display: none; }
  .bf-sidebar-foot { margin-top: 0; flex-direction: row; padding: 0; }
  .bf-main { padding: 22px 18px 28px; }
  .bf-topbar-left h1 { font-size: 26px; }
  .bf-grid-bento { grid-template-columns: 1fr; }
  .bf-card.span-6, .bf-card.span-4, .bf-card.span-3, .bf-card.span-12 { grid-column: auto; }
}
