/* ==========================================================================
   BeBrainer academic design system (Dec 2026 proposal)
   Loaded after theme-base.css / theme-parts.css, so it only overrides tokens and a few shapes.
   Fonts: Plus Jakarta Sans (self-hosted, one 27 KB variable file) draws English letters and 0-9 only,
   through unicode-range; every Bangla glyph, ০-৯ and ৳ stay in Kalpurush, which app.css already loads.
   ========================================================================== */
@font-face { font-family: "BB Jakarta"; font-weight: 400 800; font-display: swap; src: url("../fonts/plus-jakarta-latin-var.woff2") format("woff2"); unicode-range: U+0021-007E, U+00A0-00FF, U+2010-2027, U+20AC, U+2190-2193; }
:root, :root[data-theme="light"] {
  --bb-ink: #0F172A;          /* text */
  --bb-muted: #475569;        /* second lines */
  --bb-primary: #532CEB;      /* BeBrainer purple: buttons, links, active states */
  --bb-primary-hover: #4321C4;
  --bb-primary-soft: #EEEAFD; /* the one quiet tint (selected chip, icon well) */
  --bb-action: #D97706;       /* warm accent: offers, "নতুন" */
  --bb-urgent: #DC2626;       /* live / urgent only */
  --bb-page: #F8FAFC;
  --bb-surface: #FFFFFF;
  --bb-line: #E2E8F0;

  --g-bg: var(--bb-page);
  --g-text: var(--bb-ink);
  --g-muted: var(--bb-muted);
  --g-brand: var(--bb-primary);
  --g-accent: var(--bb-primary);
  --g-accent-hover: var(--bb-primary-hover);
  --g-grad: var(--bb-primary);
  --g-year: var(--bb-primary);
  --g-panel: var(--bb-surface);
  --g-panel-line: var(--bb-line);
  --g-panel-shadow: none;
  --g-tile: var(--bb-surface);
  --g-tile-line: var(--bb-line);
  --g-tile-hover: var(--bb-surface);
  --g-bar: var(--bb-surface);
  --g-icon-bg: var(--bb-primary-soft);
  --g-line: var(--bb-line);
  --g-field: var(--bb-surface);
  --g-grid-line: transparent;
  --g-r-panel: 8px;
  --g-r-tile: 8px;
  --g-r-small: 6px;
  /* One icon colour instead of six pastel families. */
  --g-purple: var(--bb-primary); --g-green: var(--bb-primary); --g-orange: var(--bb-primary); --g-blue: var(--bb-primary); --g-magenta: var(--bb-primary); --g-pink: var(--bb-urgent);
  --g-purple-text: var(--bb-primary); --g-green-text: var(--bb-primary); --g-orange-text: var(--bb-primary); --g-blue-text: var(--bb-primary); --g-magenta-text: var(--bb-primary); --g-pink-text: var(--bb-urgent);
}

/* ---- Type ---- */
body, button, input, select, textarea {
  font-family: "BB Jakarta", "Kalpurush", "Noto Sans Bengali", system-ui, sans-serif;
  letter-spacing: 0;
  font-feature-settings: "tnum" 1; /* numbers line up in prices and counts */
}
body { line-height: 1.7; color: var(--bb-ink); background: var(--bb-page) !important; }
h1, h2, h3, h4 { letter-spacing: 0; line-height: 1.35; font-weight: 700; }
h1 { font-weight: 700; }
small, .g-sub, .cc-sub { line-height: 1.6; }

/* Buttons: Bangla sits low in its box, so a little more room on top centres it to the eye. */
.g-btn, .btn, button.g-btn, .cc-btn, .hm-stage__opt { padding-top: 11px; padding-bottom: 9px; border-radius: 6px; font-weight: 600; letter-spacing: 0; box-shadow: none !important; }
.g-btn:not(.g-btn--line):not(.g-btn--white) { background: var(--bb-primary); border-color: var(--bb-primary); color: #fff; }
.g-btn:not(.g-btn--line):not(.g-btn--white):hover { background: var(--bb-primary-hover); }
.g-btn--line { background: var(--bb-surface); color: var(--g-accent); border: 1px solid var(--g-accent); }

/* ---- Surfaces: flat white on a pale page, one hairline border, 8px corners, no glass ---- */
body::before, body::after { display: none !important; } /* the lavender grid paper */
.g-panel, .g-tile, .panel, .box, .card, .cc, .mc-card, .sb-card, .hm-fr__tile, .hm-tool, .hm-feat__tab, .tl-tool, .person {
  background: var(--bb-surface) !important; border: 1px solid var(--bb-line) !important; border-radius: 8px !important;
  box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.top .wrap, .tabbar { background: var(--bb-surface) !important; border: 1px solid var(--bb-line) !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; border-radius: 8px !important; }
.ticker { background: var(--bb-primary) !important; }

/* Icon wells: one quiet purple tint, monochrome line icons. */
.g-ico-sq, .g-ico, .hm-fr__ico, .dt-ico, .cm-ico, .ico { background: var(--bb-primary-soft) !important; color: var(--g-accent) !important; border-radius: 6px !important; }
.g-ico-sq svg, .g-ico svg, .hm-fr__ico svg { stroke-width: 1.5; }
svg[stroke-width="1.8"], svg[stroke-width="1.800"], svg[stroke-width="2"] { stroke-width: 1.5; }

/* Badges: orange for offers and new things, red only for live and urgent. */
.cc-tag, .g-chip { border-radius: 4px !important; font-weight: 600; letter-spacing: 0; }
.cc-tag--hot, .cc-off { background: var(--bb-action) !important; color: #fff !important; }
.cc-tag--free { background: var(--bb-primary) !important; color: #fff !important; }
.cc-tag--book { background: var(--bb-surface) !important; color: var(--bb-ink) !important; border: 1px solid var(--bb-line); }
.livenow, .rd-live, .hx-dot { background: var(--bb-urgent) !important; }

/* ---- Editorial alignment: headings and the hero start at the left edge ---- */
.g-head--center, .g-head { justify-content: space-between !important; text-align: left !important; }
.g-head h2 { text-align: left; }
.g-sub { text-align: left !important; margin-left: 0 !important; }
.g-accent { color: var(--g-accent) !important; background: none !important; -webkit-text-fill-color: currentColor !important; }

/* ---- Hero: left-aligned, editorial ---- */
.hm-hero { text-align: left !important; background: var(--bb-surface) !important; }
.hm-hero__text { text-align: left !important; align-items: flex-start !important; }
.hm-hero h1 { font-size: clamp(26px, 6.4vw, 44px); line-height: 1.3; font-weight: 700; color: var(--bb-ink); }
.hm-hero h1 .g-accent { color: var(--g-accent) !important; }
.hx__lead { font-size: 16.5px !important; color: var(--bb-muted); line-height: 1.7; }
.hm-hero__actions { justify-content: flex-start !important; }
.hm-stage__q { text-align: left; }
.hm-stage__opt { border: 1px solid var(--bb-line) !important; background: var(--bb-surface) !important; border-radius: 6px !important; }
.hm-stage__opt[aria-pressed="true"] { background: var(--bb-primary) !important; border-color: var(--bb-primary) !important; color: #fff !important; }
.hx-card { animation: none !important; background: var(--bb-surface) !important; border: 1px solid var(--bb-line) !important; box-shadow: none !important; border-radius: 8px !important; }
.hx-photo, .hx-slides, .hx-slide img { border-radius: 8px !important; }
.hx-stage::before { display: none !important; } /* the soft purple glow behind the photo */
.hm-proof { color: var(--g-accent) !important; }

/* ---- Course card: picture, title, one line, plain stats, price and one button ---- */
.cc { overflow: hidden; }
.cc-thumb { border-radius: 0 !important; }
.cc-thumb img { border-radius: 0 !important; }
.cc-body { padding: 14px 16px 16px !important; gap: 6px !important; }
.cc-title { font-size: 17px !important; line-height: 1.4 !important; font-weight: 700 !important; }
.cc-title a { color: var(--bb-ink) !important; }
.cc-sub { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: var(--bb-muted); font-size: 14px; }
.cc-stats { display: flex !important; flex-wrap: wrap; gap: 4px 14px !important; padding: 8px 0 !important; border-top: 1px solid var(--bb-line); border-bottom: 1px solid var(--bb-line); background: none !important; }
.cc-stats li { background: none !important; border: 0 !important; padding: 0 !important; font-size: 13.5px; color: var(--bb-muted); gap: 5px !important; }
.cc-stats li svg { color: var(--g-accent); width: 16px; height: 16px; }
.cc-foot { align-items: center !important; }
.cc-price b { font-size: 20px; font-weight: 700; color: var(--bb-ink) !important; }
.cc-price s { color: var(--bb-muted); }
.cc-btn { background: var(--bb-primary) !important; color: #fff !important; border-radius: 6px !important; }
.hm-stage__opt { font-weight: 400 !important; } /* Kalpurush has one weight; fake bold on eight small boxes looks heavy */

/* ---- Dark theme: same flat system, deep purple-black page, slightly lifted surfaces, no glass, no glow ---- */
:root[data-theme="dark"] {
  --bb-ink: #EEF0FB;
  --bb-muted: #B4B8D4;
  --bb-primary: #532CEB;          /* buttons keep the brand purple with white text */
  --bb-primary-hover: #6A47F0;
  --bb-primary-soft: rgba(185, 166, 255, .14);
  --bb-page: #0E0B1F;
  --bb-surface: #18152F;
  --bb-line: rgba(255, 255, 255, .10);

  --g-bg: var(--bb-page);
  --g-text: var(--bb-ink);
  --g-muted: var(--bb-muted);
  --g-accent: #B9A6FF;            /* links and highlighted words need a lighter purple to read on dark */
  --g-accent-hover: #D6CBFF;
  --g-panel: var(--bb-surface);
  --g-panel-line: var(--bb-line);
  --g-panel-shadow: none;
  --g-tile: var(--bb-surface);
  --g-tile-line: var(--bb-line);
  --g-tile-hover: #1F1B3A;
  --g-bar: var(--bb-surface);
  --g-icon-bg: var(--bb-primary-soft);
  --g-line: var(--bb-line);
  --g-field: rgba(255, 255, 255, .06);
  --g-grid-line: transparent;
  --g-purple-text: #B9A6FF; --g-green-text: #B9A6FF; --g-orange-text: #B9A6FF; --g-blue-text: #B9A6FF; --g-magenta-text: #B9A6FF; --g-pink-text: #FCA5A5;
  --card: var(--bb-surface); --deep: #141128; --field: rgba(255, 255, 255, .06);
  --shadow: none;
  color-scheme: dark;
}
:root[data-theme="dark"] .ticker { background: #3B1FB0 !important; }
