/* ==========================================================================
   BeBrainer new look (Nov 2026): green, red, yellow · Anek Bangla + Bricolage · light glass.
   Loaded LAST on the student site, only when the preview switch is on (cookie bb_newlook=1).
   It only changes tokens and a few shapes, so every page follows without its own edit.
   Low-end phones (html.bb-lite): no blur, no animation.
   ========================================================================== */

/* ---- Fonts: self-hosted, two weights each. Bangla glyphs from Anek, English and 0-9 from Bricolage. ---- */
@font-face { font-family: "BB Anek"; font-weight: 400; font-display: swap; src: url("../fonts/anek-bangla-400.woff2") format("woff2"); unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+200C-200D, U+25CC; }
@font-face { font-family: "BB Anek"; font-weight: 600 700; font-display: swap; src: url("../fonts/anek-bangla-600.woff2") format("woff2"); unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+200C-200D, U+25CC; }
@font-face { font-family: "BB Brico"; font-weight: 400; font-display: swap; src: url("../fonts/bricolage-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027, U+20AC, U+2190-2193, U+2212; }
@font-face { font-family: "BB Brico"; font-weight: 600 700; font-display: swap; src: url("../fonts/bricolage-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027, U+20AC, U+2190-2193, U+2212; }

body, button, input, select, textarea {
  font-family: "BB Brico", "BB Anek", "Noto Sans Bengali", system-ui, sans-serif !important;
}
body { line-height: 1.6; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 600; }
/* Anek is a real two-weight font, so headings and buttons can be properly bold (Kalpurush could not). */
.hm-stage__opt { font-weight: 400 !important; }
b, strong, .g-btn, .btn, .cc-btn { font-weight: 600; }

/* ---- Colour tokens ---- */
:root, :root[data-theme="light"] {
  --bb-ink: #16181A;
  --bb-muted: #5B6160;
  --bb-primary: #0E8A4D;        /* green: buttons, links, selected */
  --bb-primary-hover: #096B3B;
  --bb-primary-soft: #E4F4EA;
  --bb-action: #FFC928;         /* yellow: offers, free books, new */
  --bb-urgent: #E03131;         /* red: live, admission open, deadlines */
  --bb-page: #F7F8F5;
  --bb-surface: #FFFFFF;
  --bb-line: #DCE5DF;

  --brand-primary: #0E8A4D;
  --border-brand-subtle: #DCE5DF;
  --border-brand-input: #A9C9B6;
  --border-brand-strong: #0E8A4D;
  --surface-brand-tint: #F7F8F5;

  --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-icon-bg: var(--bb-primary-soft);
  --g-bg: var(--bb-page); --g-line: var(--bb-line); --g-tile-line: var(--bb-line); --g-panel-line: var(--bb-line);
  --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);
  --bb-glass: rgba(255, 255, 255, .72);
  --bb-glass-edge: rgba(255, 255, 255, .85);
}
:root[data-theme="dark"] {
  --bb-ink: #ECF1EE;
  --bb-muted: #A3ADA8;
  --bb-primary: #0E8A4D;
  --bb-primary-hover: #12A35C;
  --bb-primary-soft: rgba(95, 216, 150, .14);
  --bb-page: #0F1311;
  --bb-surface: #18201C;
  --bb-line: #26312B;
  --brand-primary: #0E8A4D;
  --border-brand-subtle: #26312B;
  --border-brand-input: #355243;
  --border-brand-strong: #5FD896;
  --surface-brand-tint: #0F1311;
  --g-accent: #5FD896; --g-accent-hover: #8BE6B2;
  --g-bg: var(--bb-page); --g-line: var(--bb-line); --g-tile-line: var(--bb-line); --g-panel-line: var(--bb-line); --g-tile-hover: #1E2823;
  --g-purple-text: #5FD896; --g-green-text: #5FD896; --g-orange-text: #5FD896; --g-blue-text: #5FD896; --g-magenta-text: #5FD896; --g-pink-text: #FF8A8A;
  --card: var(--bb-surface); --deep: #131A16;
  --bb-glass: rgba(24, 32, 28, .72);
  --bb-glass-edge: rgba(255, 255, 255, .10);
}

/* ---- Red admission bar on top ---- */
.ticker { background: var(--bb-urgent) !important; }
.ticker a { color: #FFE48A !important; }
:root[data-theme="dark"] .ticker { background: #A61E1E !important; }

/* ---- Badges: red for hot and live, yellow for offers and free books ---- */
.cc-tag--hot, .livenow, .rd-live, .hx-dot { background: var(--bb-urgent) !important; color: #fff !important; }
.cc-off, .cc-tag--book { background: var(--bb-action) !important; color: #16181A !important; border: 0 !important; }
.cc-tag--free { background: var(--bb-primary) !important; color: #fff !important; }

/* ---- Light glass on the floating parts only: header and phone tab bar ---- */
.top .wrap, .tabbar {
  background: var(--bb-glass) !important;
  -webkit-backdrop-filter: blur(16px) saturate(170%) !important;
  backdrop-filter: blur(16px) saturate(170%) !important;
  border: 1px solid var(--bb-line) !important;
  border-radius: 14px !important;
}
.tabbar { box-shadow: 0 6px 24px rgba(16, 40, 28, .10) !important; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top .wrap, .tabbar { background: var(--bb-surface) !important; }
}

/* ---- Cards: calm white, 10px corners, no purple tints left over ---- */
.cc, .sb-card, .hm-tool, .tl-tool, .g-tile, .hx-card, .hm-fr__tile, .hm-lang__card, .g-panel, .card, .box, .panel, .person, .sp-item { border-radius: 10px !important; }
.cc-stats, .hm-svc__name { background: var(--bb-page) !important; border-color: var(--bb-line) !important; }
.g-panel.g-panel--band { background: var(--bb-primary) !important; border-color: var(--bb-primary) !important; }

/* ---- Preview chip (only in preview mode) ---- */
.bb-prev { white-space: nowrap; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); font-size: 12px !important; animation: bbPrevOut .4s ease-out 6s forwards; z-index: 9999; display: flex; gap: 8px; align-items: center; background: #16181A; color: #fff; font-size: 13px; padding: 5px 6px 5px 12px; border-radius: 20px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.bb-prev a { color: #16181A; background: #FFC928; border-radius: 14px; padding: 2px 10px; text-decoration: none; font-weight: 600; }

/* ---- Low-end phones: no blur, no motion ---- */
html.bb-lite .top .wrap, html.bb-lite .tabbar { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--bb-surface) !important; }
html.bb-lite *, html.bb-lite *::before, html.bb-lite *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; }

/* ---- Leftover purple and pink spots found on the home page (29 Nov sweep) ---- */
.treels { background: var(--bb-primary) !important; color: #fff !important; border-color: var(--bb-primary) !important; }
.bbc-ico, .hx-ico { background: var(--bb-primary-soft) !important; color: var(--bb-primary) !important; }
.hx-ico svg { color: var(--bb-primary) !important; stroke: currentColor; }
.hx-num { color: var(--bb-urgent) !important; }
.hm-fr__go, .hm-lang__native { color: var(--g-accent) !important; }
.due-dot, .tbell-num, .tab-due { background: var(--bb-urgent) !important; }
.sp-pop { border-color: var(--bb-line) !important; }
.ig-ring { stroke: var(--bb-primary) !important; }
.ig-app { fill: var(--bb-primary) !important; }
.hm-reel { background: linear-gradient(160deg, #0E8A4D, #075C32) !important; }
.hm-reel:nth-child(3n+2) { background: linear-gradient(160deg, #E03131, #9B1C1C) !important; }
.hm-reel:nth-child(3n) { background: linear-gradient(160deg, #E8A400, #9A6400) !important; }
.hm-reel--more { background: var(--bb-ink) !important; }

/* ---- Student dashboard (/profile): compact course rows, today's tasks first, old courses folded ---- */
.dash-main { display: flex; flex-direction: column; gap: 12px; }
.dash-main > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.dash-main > .dash-duo { order: 0; } .dash-main > .cm-hi { order: 1; } .dash-main > .dt-card { order: 2; } .dash-main > .cm-tiles { order: 3; }
.dash-main > .cm-lbl { order: 4; } .dash-main > .mc-grid:not(.mc-grid--past) { order: 5; } .dash-main > .mc-missing { order: 6; }
.dash-main > .dtips { order: 7; } .dash-main > .mc-past-title { order: 8; } .dash-main > .mc-grid--past { order: 9; } .dash-main > .bb-more { order: 10; }
.mc-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important; gap: 10px !important; }
.mc-card { display: grid !important; grid-template-columns: 104px 1fr 44px; gap: 6px 12px; padding: 10px !important; align-items: center; }
.mc-card > * { margin: 0 !important; }
.mc-card .mc-cover { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: 16 / 9; height: auto !important; border-radius: 8px; overflow: hidden; align-self: start; }
.mc-card .mc-cover img { width: 100%; height: 100%; object-fit: cover; }
.mc-card .mc-stats { display: none !important; }
.mc-card .mc-title { grid-column: 2 / 4; grid-row: 1; font-size: 15.5px !important; line-height: 1.35 !important; }
.mc-card .mc-rt { grid-column: 2 / 4; grid-row: 2; font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mc-card .mc-rt a { min-height: 0 !important; padding: 0 !important; font-size: 13px; }
.mc-card .mc-progress { grid-column: 1 / 4; grid-row: 3; }
.mc-card .mc-progress p { font-size: 12.5px; margin: 2px 0 0 !important; }
.mc-card .cs-btn--card { grid-column: 3; grid-row: 4; width: 44px; height: 44px; min-height: 44px; padding: 0 !important; justify-content: center; }
.mc-card .cs-btn--card span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mc-card .mc-go { grid-column: 1 / 3; grid-row: 4; min-height: 44px; padding-top: 9px !important; padding-bottom: 8px !important; }
/* Old courses: slim rows, no picture */
.mc-grid--past .mc-card { grid-template-columns: 1fr auto; padding: 8px 12px !important; }
.mc-grid--past .mc-cover { display: none !important; }
.mc-grid--past .mc-title { grid-column: 1; grid-row: 1; font-size: 14.5px !important; }
.mc-grid--past .mc-state { grid-column: 1; grid-row: 2; font-size: 12.5px; }
.mc-grid--past .mc-go { grid-column: 2; grid-row: 1 / span 2; min-height: 36px; font-size: 13.5px; padding: 6px 12px !important; width: auto !important; }
.bb-more { width: 100%; }

/* ---- Course page (/my-courses/...): slimmer subject and lesson rows ---- */
.ls-list { gap: 6px !important; }
.cd-row.ls-subject { grid-template-columns: 46px minmax(0, 1fr) 18px !important; padding: 9px 12px !important; gap: 10px !important; min-height: 0 !important; align-items: center !important; }
.ls-subject .cd-ico { width: 46px !important; height: auto !important; min-height: 0 !important; padding: 4px 0 !important; gap: 0 !important; flex: none; }
.ls-subject .cd-ico svg { width: 20px !important; height: 20px !important; }
.ls-subject .cd-ico small { font-size: 10.5px !important; line-height: 1.2; white-space: nowrap; }
.ls-subject .cd-main { gap: 2px !important; min-width: 0; }
.ls-subject .cd-main b { font-size: 15px !important; line-height: 1.35 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ls-subject .cd-main small { font-size: 12.5px !important; line-height: 1.3 !important; }
.ls-subject .cd-act span { font-size: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; min-height: 0 !important; }
.ls-subject .cd-act span::after { content: "›"; font-size: 24px; line-height: 1; color: var(--g-accent); }
.cd-quick { padding: 10px 12px !important; }
.cd-head--v2 { padding-bottom: 8px !important; }

/* ---- Course page lesson rows (class, PDF, exam, link): one line, no wrapped button ---- */
.cd-row:not(.ls-subject) { grid-template-columns: 42px minmax(0, 1fr) auto !important; padding: 8px 12px !important; gap: 10px !important; min-height: 0 !important; align-items: center !important; }
.cd-row:not(.ls-subject) .cd-ico { width: 42px !important; height: auto !important; min-height: 0 !important; padding: 3px 0 !important; gap: 0 !important; }
.cd-row:not(.ls-subject) .cd-ico svg { width: 19px !important; height: 19px !important; }
.cd-row:not(.ls-subject) .cd-ico small { font-size: 10.5px !important; line-height: 1.2; }
.cd-row:not(.ls-subject) .cd-main { gap: 1px !important; min-width: 0; }
.cd-row:not(.ls-subject) .cd-main b { font-size: 15px !important; line-height: 1.35 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cd-row:not(.ls-subject) .cd-main small { font-size: 12.5px !important; line-height: 1.3 !important; }
.cd-row:not(.ls-subject) .cd-act { gap: 6px !important; align-items: center; }
.cd-row:not(.ls-subject) .cd-act > span { font-size: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; min-height: 0 !important; width: auto !important; }
.cd-row:not(.ls-subject) .cd-act > span::after { content: "›"; font-size: 24px; line-height: 1; color: var(--g-accent); }
.cd-row:not(.ls-subject) .cd-tick { width: 20px !important; height: 20px !important; font-size: 12px !important; }
.ls-head { padding-top: 6px !important; padding-bottom: 4px !important; min-height: 0 !important; }

/* ---- Home: install block (was 2,000px on a phone) ---- */
@media (max-width: 760px) { .hm-install .ig-phone { display: none !important; } }
.hm-install .ig-phone video { max-height: 320px; }
html.bb-android .hm-install .ig-ios { display: none !important; }
html.bb-ios .hm-install .ig-steps { display: none !important; }
.hm-install .ig-steps li { padding-top: 2px !important; padding-bottom: 2px !important; }
.bb-fold > :not(h3) { display: none !important; }
.ig-old h3 { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px !important; margin: 0 !important; }
.ig-old h3::after { content: "⌄"; font-size: 20px; line-height: 1; color: var(--g-accent); transition: transform .2s; }
.ig-old:not(.bb-fold) h3::after { transform: rotate(180deg); }
.ig-old { padding: 12px 14px !important; }


/* ==== 29 Nov, round 2: no overlaps, one yellow main button per page ==== */
/* Hero on phones: the four floating cards overlapped each other; now two calm proof cards under the poster. */
@media (max-width: 760px) {
  .hx-stage { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 !important; margin-top: 4px; }
  .hx-photo { grid-column: 1 / -1; }
  .hx-card { position: static !important; inset: auto !important; transform: none !important; width: auto !important; max-width: none !important; margin: 0 !important; min-width: 0; }
  .hx-card * { min-width: 0; }
  .hx-live, .hx-book { display: none !important; }
  .hm-hero__actions { flex-direction: column; align-items: stretch !important; gap: 10px !important; }
  .hm-hero__actions .g-btn { width: 100%; justify-content: center; }
}
/* The one main action on a page: yellow, so the student always knows where to tap. Marked by brand-2027.js. */
.bb-main, a.bb-main, button.bb-main, .g-btn.bb-main, .btn.bb-main {
  background: #FFC928 !important; border-color: #FFC928 !important; color: #16181A !important;
  font-weight: 700 !important; box-shadow: 0 4px 14px rgba(200, 150, 0, .35) !important;
}
.bb-main:hover { background: #FFD54F !important; }
.bb-main svg { color: #16181A !important; stroke: currentColor; }
/* Everything else that repeats (each course, each book, each test) becomes a quiet outline button. */
.bb-quiet { background: transparent !important; color: var(--g-accent) !important; border: 1.5px solid var(--g-accent) !important; box-shadow: none !important; }
/* Long words never spill out of their box */
.cc-title, .mc-title, .cd-main b, .hx-card b, .hx-card small, .g-head h2 { overflow-wrap: anywhere; }
@keyframes bbPrevOut { to { opacity: 0; visibility: hidden; } }
@media (max-width: 760px) { .hm-hero__actions { display: flex !important; flex-direction: column !important; align-items: stretch !important; } .hm-hero__actions > .g-btn { width: 100% !important; display: flex !important; justify-content: center !important; } }
.cd-now-btn.bb-main { border-radius: 8px; padding: 6px 12px !important; }
/* Lesson page: its own row already has "সূচিপত্র", so the floating one (which covered the PDF card) is hidden. */
body:has(.lnav) .cmap-fab { display: none !important; }
/* Course page: the floating index button is smaller and leaves room under the last row. */
.cmap-fab { padding: 6px 12px !important; min-height: 38px !important; font-size: 14px !important; }
.dash-main:has(.cmap-fab) { padding-bottom: 64px !important; }

/* ---- Violet tint (Nov 2026): the old brand violet stays as a quiet background, never as a button.
   Light: page, header glass, tab bar and tab strips get a pale violet; cards stay white.
   Dark: violet-black page and violet-dark cards. Yellow and green keep their jobs. ---- */
:root, :root[data-theme="light"] {
  --bb-page: #F5F2FA;
  --bb-line: #E3DCEE;
  --border-brand-subtle: #E3DCEE;
  --surface-brand-tint: #F5F2FA;
  --bb-glass: rgba(247, 243, 253, .80);
  --bb-glass-edge: rgba(255, 255, 255, .85);
  --bb-tint: #F7F3FD;
}
:root[data-theme="dark"] {
  --bb-ink: #EEEBF4;
  --bb-muted: #ABA4B8;
  --bb-primary: #1E9E5A;
  --bb-primary-hover: #27B067;
  --brand-primary: #1E9E5A;
  --bb-urgent: #FF6B6B;
  --bb-page: #14111B;
  --bb-surface: #1F1B29;
  --bb-line: #322B40;
  --border-brand-subtle: #322B40;
  --border-brand-input: #4A3F5E;
  --surface-brand-tint: #14111B;
  --g-tile-hover: #282236;
  --deep: #17131F;
  --bb-glass: rgba(28, 24, 37, .82);
  --bb-tint: #1C1825;
}
.tabbar { box-shadow: 0 6px 24px rgba(40, 20, 70, .10) !important; }
:root[data-theme="dark"] .tabbar { box-shadow: 0 6px 24px rgba(0, 0, 0, .45) !important; }
/* Cheap phones (no blur): flat tint instead of glass, so the header still reads as BeBrainer. */
html.bb-lite .top .wrap, html.bb-lite .tabbar { background: var(--bb-tint) !important; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top .wrap, .tabbar { background: var(--bb-tint) !important; }
}
/* Yellow buttons keep dark text in both themes. */
.bb-main, .bb-main * { color: #16181A !important; }
/* Dark: selected filter chips were light green with white text (hard to read). */
:root[data-theme="dark"] .cs-chip.on, :root[data-theme="dark"] .chip.on, :root[data-theme="dark"] [class*="chip"].on, :root[data-theme="dark"] [class*="chip"].is-active { background: var(--bb-primary) !important; border-color: var(--bb-primary) !important; color: #fff !important; }

/* ==== Course page, new look (29 Nov 2026): learn.blade.php renders .cp-* only when the preview cookie is on.
   One yellow button (whole course index, its own page), a small green resume button, two tabs. ==== */
:root, :root[data-theme="light"] { --bb-track: #ECE5F6; }
:root[data-theme="dark"] { --bb-track: #2A2437; }
.dash-main:has(.cp-head) { display: flex; flex-direction: column; gap: 10px; }
.cp-head { display: grid; gap: 6px; }
.cp-top { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.cp-back { color: var(--bb-muted); font-size: 14px; text-decoration: none; }
.cp-back--strong { color: var(--bb-ink); font-size: 15px; font-weight: 600; }
.cp-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cp-resume { display: inline-flex; align-items: center; gap: 5px; background: var(--bb-primary); color: #fff !important; border-radius: 20px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.cp-head h1 { margin: 2px 0 0; font-size: 19px; line-height: 1.3; color: var(--bb-ink); overflow-wrap: anywhere; }
.cp-prog { height: 7px; background: var(--bb-line); border-radius: 6px; overflow: hidden; margin-top: 4px; }
.cp-prog i { display: block; height: 100%; background: var(--bb-primary); border-radius: 6px; }
.cp-count { margin: 0; font-size: 13.5px; color: var(--bb-muted); }
.cp-all { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; margin-top: 8px; padding: 8px 14px; background: #FFC928 !important; color: #16181A !important; border-radius: 12px; font-size: 17.5px; font-weight: 600; text-decoration: none; text-align: center; box-shadow: 0 4px 14px rgba(200, 150, 0, .28); }
:root[data-theme="dark"] .cp-all { box-shadow: none; }
.cp-group:empty { display: none; }
.cp-or { margin: 4px 0 0; text-align: center; font-size: 14px; color: var(--bb-muted); }
.cp-tabs { display: flex; gap: 4px; padding: 4px; background: var(--bb-track); border-radius: 12px; }
.cp-tabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 4px; border-radius: 9px; font-size: 16px; color: var(--bb-muted); text-decoration: none; }
.cp-tabs a svg { width: 18px; height: 18px; }
.cp-tabs a.on { background: var(--bb-surface); color: var(--bb-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.chat-courselink { min-height: 0 !important; padding: 8px 12px !important; }
.chat-courselink .g-ico { width: 30px !important; height: 30px !important; }
.dash-main:has(.ls-subject) > .lc-chips { display: none !important; }
.ls-head { border-bottom: 0 !important; }
/* Index page */
.cp-head.cd-head { padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; border-radius: 0 !important; display: grid !important; gap: 6px !important; }
.cp-ixh { margin: 2px 0 0; font-size: 22px; line-height: 1.3; color: var(--bb-ink); }
.cp-cs .cs-icon { width: 38px; height: 38px; }
.cp-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.cp-chips button { flex: none; border: 1.5px solid var(--bb-line); background: var(--bb-surface); color: var(--bb-ink); border-radius: 20px; padding: 5px 12px; font-size: 14px; cursor: pointer; }
.cp-chips button i { font-style: normal; color: var(--bb-muted); font-size: 12.5px; }
.cp-chips button.on { background: var(--bb-primary); border-color: var(--bb-primary); color: #fff; }
.cp-chips button.on i { color: rgba(255, 255, 255, .85); }
.cp-ix { display: grid; gap: 8px; }
.cp-sec { background: var(--bb-surface); border: 1px solid var(--bb-line); border-radius: 12px; overflow: hidden; }
.cp-sec summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; cursor: pointer; list-style: none; }
.cp-sec summary::-webkit-details-marker { display: none; }
.cp-sec summary b { font-size: 15px; line-height: 1.35; color: var(--bb-ink); overflow-wrap: anywhere; }
.cp-sec summary small { flex: none; font-size: 12.5px; color: var(--bb-muted); }
.cp-sec summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 3px 2px; border-right: 2px solid var(--bb-muted); border-bottom: 2px solid var(--bb-muted); transform: rotate(-45deg); transition: transform .15s; }
.cp-sec[open] summary::after { transform: rotate(45deg); }
.cp-sec summary small { margin-left: auto; }
.cp-it { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--bb-line); font-size: 14.5px; line-height: 1.4; color: var(--bb-ink); text-decoration: none; }
.cp-it[hidden], .cp-sec[hidden] { display: none; }
.cp-it em { flex: none; font-style: normal; font-size: 11px; background: var(--bb-primary-soft); color: var(--g-accent, var(--bb-primary)); border-radius: 6px; padding: 1px 6px; }
.cp-it span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cp-it i { flex: none; font-style: normal; color: var(--bb-muted); font-size: 18px; }
.cp-it.done i { color: var(--bb-primary); font-size: 14px; font-weight: 700; }
.cp-it.next { background: var(--bb-primary-soft); }
/* Red count badges (pending tasks, notifications): always a white number, with a white ring so the red stays clear on the green active tab. */
.due-dot, .tbell-num, .tab-due, .dm-list a.on .due-dot, .tabbar a.on .due-dot { background: var(--bb-urgent) !important; color: #fff !important; box-shadow: 0 0 0 2px #fff !important; }
:root[data-theme="dark"] .due-dot, :root[data-theme="dark"] .tbell-num, :root[data-theme="dark"] .tab-due { box-shadow: 0 0 0 2px var(--bb-surface) !important; }
:root[data-theme="dark"] .tabbar a.on .due-dot, :root[data-theme="dark"] .dm-list a.on .due-dot { box-shadow: 0 0 0 2px #fff !important; }

/* ==== Topic rows (29 Nov 2026): class, PDF and exam of one topic in one row (student.partials.topic-rows) ==== */
.cp-tp { padding: 10px 12px; border-top: 1px solid var(--bb-line); }
.cp-tp[hidden] { display: none; }
.cp-tp > b { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--bb-ink); }
.cp-tp > b .n { flex: none; min-width: 26px; height: 24px; padding: 0 4px; border-radius: 7px; background: var(--bb-track); color: var(--bb-muted); font-size: 12.5px; display: grid; place-items: center; }
.cp-tp > b .t { min-width: 0; overflow-wrap: anywhere; }
.cp-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 34px; }
.cp-tp > b:not(:has(.n)) + .cp-acts { margin-left: 0; }
.cp-acts .cp-it { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px; border: 1.5px solid var(--bb-line); border-top: 1.5px solid var(--bb-line); border-radius: 9px; background: var(--bb-surface); color: var(--bb-ink); font-size: 14px; text-decoration: none; }
.cp-acts .cp-it svg { width: 15px; height: 15px; flex: none; }
.cp-acts .cp-it i { font-style: normal; font-weight: 700; font-size: 12px; color: inherit; }
.cp-acts .cp-it.done { background: var(--bb-primary-soft); border-color: transparent; color: var(--g-accent, var(--bb-primary)); }
.cp-acts .cp-it.next { border-color: var(--bb-primary); color: var(--g-accent, var(--bb-primary)); font-weight: 600; background: var(--bb-surface); }
.cp-acts .cp-it[hidden] { display: none; }
.cp-tplist { background: var(--bb-surface); border: 1px solid var(--bb-line); border-radius: 12px; overflow: hidden; margin-top: 6px; }
.cp-tplist > .cp-tp:first-child { border-top: 0; }
.cp-chap { margin: 0; padding: 8px 12px 2px; border-top: 1px solid var(--bb-line); font-size: 13px; font-weight: 600; color: var(--bb-muted); }
.cp-chap + .cp-tp { border-top: 0; }
.cp-tp--one { padding: 0; }
.cp-tp--one .cp-one { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 0; font-size: 14.5px; line-height: 1.4; color: var(--bb-ink); text-decoration: none; background: none; }
.cp-tp--one .cp-one em { flex: none; font-style: normal; font-size: 11px; background: var(--bb-primary-soft); color: var(--g-accent, var(--bb-primary)); border-radius: 6px; padding: 1px 6px; }
.cp-tp--one .cp-one span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cp-tp--one .cp-one i { flex: none; font-style: normal; color: var(--bb-muted); font-size: 18px; }
.cp-tp--one .cp-one.done i { color: var(--g-accent, var(--bb-primary)); font-size: 14px; font-weight: 700; }
.cp-tp--one .cp-one.next { background: var(--bb-primary-soft); }
.cp-tp--one .cp-one[hidden] { display: none; }
.cp-acts { gap: 5px !important; margin-left: 32px !important; }
.cp-acts .cp-it { padding: 0 9px !important; font-size: 13.5px !important; gap: 4px !important; }
@media (max-width: 360px) { .cp-acts { margin-left: 0 !important; } }
/* Watched share of a class video that is not finished yet (video_progress), on the topic's ক্লাস button. */
.cp-acts .cp-it .cp-pc { font-size: 11.5px; font-weight: 700; color: var(--g-accent, var(--bb-primary)); }

/* ==== রুটিন tab, new look (29 Nov 2026): student.partials.routine-days-new and routine-row ==== */
.rtn { display: grid; gap: 8px; margin-top: 4px; }
.rtn-sub { display: flex; gap: 6px; }
.rtn-sub a { flex: 1; text-align: center; padding: 8px 6px; border: 1.5px solid var(--bb-line); border-radius: 20px; background: var(--bb-surface); color: var(--bb-muted); font-size: 14.5px; font-weight: 600; text-decoration: none; }
.rtn-sub a.on { background: var(--bb-primary); border-color: var(--bb-primary); color: #fff; }
.rtn-today { background: var(--bb-surface); border: 2px solid var(--bb-primary); border-radius: 14px; padding: 12px; display: grid; gap: 4px; }
.rtn-kick { margin: 0; font-size: 13px; font-weight: 600; color: var(--bb-urgent); }
.rtn-live { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 6px; background: var(--bb-urgent); color: #fff; font-size: 12px; }
.rtn-today h3 { margin: 0; font-size: 18px; line-height: 1.3; color: var(--bb-ink); overflow-wrap: anywhere; }
.rtn-go { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; margin-top: 6px; border-radius: 10px; background: var(--bb-primary); color: #fff !important; font-size: 16.5px; font-weight: 600; text-decoration: none; }
.rtn-go svg { width: 18px; height: 18px; }
.rtn-wait { margin: 6px 0 0; padding: 10px; border: 1.5px dashed var(--bb-line); border-radius: 10px; text-align: center; font-size: 14px; color: var(--bb-muted); }
.rtn-lbl { margin: 8px 2px 0; font-size: 14px; font-weight: 600; color: var(--bb-muted); }
.rtn-list { background: var(--bb-surface); border: 1px solid var(--bb-line); border-radius: 12px; overflow: hidden; }
.rtn-row { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-top: 1px solid var(--bb-line); }
.rtn-row:first-child { border-top: 0; }
.rtn-dt { text-align: center; line-height: 1.1; }
.rtn-dt b { display: block; font-size: 20px; font-weight: 600; color: var(--bb-ink); }
.rtn-dt small { font-size: 11.5px; color: var(--bb-muted); }
.rtn-main { min-width: 0; }
.rtn-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 0; font-size: 12.5px; color: var(--bb-muted); }
.rtn-tag { padding: 0 7px; border-radius: 6px; background: var(--bb-primary-soft); color: var(--g-accent, var(--bb-primary)); font-weight: 600; }
.rtn-tag.ex { background: #FFF1C7; color: #8A5A00; }
:root[data-theme="dark"] .rtn-tag.ex { background: rgba(255, 201, 40, .15); color: #FFD666; }
.rtn-t { margin: 2px 0 0; font-size: 15.5px; font-weight: 600; line-height: 1.35; color: var(--bb-ink); overflow-wrap: anywhere; }
.rtn-acts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.rtn-b { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 10px; border: 1.5px solid var(--bb-line); border-radius: 9px; background: var(--bb-surface); color: var(--bb-ink); font-size: 13.5px; text-decoration: none; }
.rtn-b svg { width: 14px; height: 14px; flex: none; }
.rtn-b i { font-style: normal; font-weight: 700; font-size: 12px; }
.rtn-b.done { background: var(--bb-primary-soft); border-color: transparent; color: var(--g-accent, var(--bb-primary)); }
.rtn-b.wait { border-style: dashed; color: var(--bb-muted); opacity: .8; }
.rtn-b.old { border-color: transparent; background: var(--bb-track); color: var(--bb-muted); }
.rtn-pc { font-size: 11.5px; font-weight: 700; color: var(--g-accent, var(--bb-primary)); }
.rtn-row--off { align-items: center; padding-top: 7px; padding-bottom: 7px; }
.rtn-offtxt { margin: 0; font-size: 13.5px; color: var(--bb-muted); }
.rtn-more { display: block; padding: 10px; border: 1px dashed var(--bb-line); border-radius: 12px; text-align: center; color: var(--g-accent, var(--bb-primary)); font-size: 14.5px; font-weight: 600; text-decoration: none; }
.rtn-months { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.rtn-months a { flex: none; padding: 5px 12px; border: 1.5px solid var(--bb-line); border-radius: 20px; background: var(--bb-surface); color: var(--bb-ink); font-size: 14px; text-decoration: none; }
.rtn-months a i { font-style: normal; font-size: 12px; color: var(--bb-muted); }
.rtn-months a.on { background: var(--bb-ink); border-color: var(--bb-ink); color: var(--bb-surface); }
.rtn-months a.on i { color: inherit; opacity: .75; }
.rtn-note { margin: 2px; font-size: 13px; color: var(--bb-muted); }
.rtn-note a { color: var(--g-accent, var(--bb-primary)); font-weight: 600; }
.rtn-months a i { margin-left: 3px; }
