/* Elementor's container offset on live */
@media (min-width: 768px) { .maths-notes { margin-top: -30px; } }
/* ==========================================================================
   Maths Notes — page styles on top of base.css.
   Ported 1:1 from 03 Features/01 Resources/Maths.html. Rules are scoped to .maths-notes (on <main>), the page's
   dark-mode overrides became [data-theme="dark"] and keyframes are prefixed.
   !important is kept: in these pages it decides same-specificity conflicts
   (the .mobile-only / .desktop-only helpers), so dropping it breaks layout.
   ========================================================================== */

.maths-notes-page { overflow-x: hidden; background: #FFFBF5; }
/* The page's own background (the source's body rule) is painted here: fixed,
   behind everything, and inside <main> so it can read the page's tokens. */
.maths-notes::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; }
[data-theme="dark"] .maths-notes-page { background: #0E0E0E; }
.maths-notes { padding: 0px; }   /* the Elementor container's padding on live (0 or 10, per page) */
/* Blocksy wrapped every page's content in a container with overflow: clip, so
   anything wider than the page was trimmed rather than scrollable — Connect's
   directory grid is wider than its box, and its tools dropdown bleeds 100vw.
   clip (not hidden) doesn't make <main> a scroll container. */
.maths-notes { overflow-x: clip; }

/* The element baseline every page sat on in WordPress — measured on live by
   _migration/compare-baseline.py, not guessed. Anything the page doesn't
   style itself falls back to these, exactly as it did on live; the page's own
   rules below override them (same specificity, later in the file). */
/* Blocksy's element layer (its bundle/main.min.css), in its own order and at
   its own selector strength plus the scope — so a page's rules win or lose
   against it exactly as they did on live. Variables resolved to live values;
   sizes measured with _migration/compare-baseline.py. */
.maths-notes :is(p, h1, h2, h3, h4, h5, h6, em, ol, ul, li, tr, th, td, dl, ins, sub, sup, big, cite, form, small, label, table, figure, button, legend, strike, address, caption, fieldset, blockquote) { margin: 0; padding: 0; border: none; font: inherit; }
.maths-notes :is(b, strong) { font-weight: bold; }
.maths-notes small { font-size: 80%; }
.maths-notes hr { height: 1px; border: none; background-color: #E1E8ED; }
.maths-notes img { height: auto; max-width: 100%; vertical-align: middle; }
.maths-notes :is(figure, textarea) { display: block; }
.maths-notes hr { margin: 0; }
.maths-notes table { max-width: 100%; }
.maths-notes :is(code, kbd, samp) { padding: 3px 6px; background: #F2F5F7; border-radius: 3px; }
.maths-notes :is(table, th, td) { border: 1px solid #E1E8ED; }
.maths-notes :is(th, td) { padding: 0.7em 1em; }
.maths-notes th { font-weight: 600; }
.maths-notes h1 { color: #FF6B4A; font-family: "Bricolage Grotesque", sans-serif; font-size: 40px; }
.maths-notes h2 { color: #1A1A1A; font-family: "Bricolage Grotesque", sans-serif; font-size: 35px; }
.maths-notes h3 { color: #1A1A1A; font-family: "Plus Jakarta Sans", sans-serif; font-size: 30px; }
.maths-notes h4 { color: #FFFBF5; font-size: 25px; }
.maths-notes h5 { color: #FFFBF5; font-size: 20px; }
.maths-notes h6 { color: #FFFBF5; font-size: 16px; }
.maths-notes :is(h1, h2, h3, h4, h5, h6) { font-weight: 700; line-height: 1.5; }
.maths-notes p { margin-block-end: 1.5em; }
.maths-notes :is(ul, ol) { padding-inline-start: 2.5em; margin-block-end: 1.5em; }
.maths-notes :is(h1, h2, h3, h4, h5, h6) { margin-block-end: calc(.3em + 10px); }
.maths-notes :is(h1, h2, h3, h4, h5, h6):where(:last-child) { margin-block-end: 0; }
.maths-notes ul:last-child, .maths-notes ol:last-child, .maths-notes ul li:last-child, .maths-notes ol li:last-child, .maths-notes label:last-child { margin-bottom: 0; }
.maths-notes a { color: #FF6B4A; }
.maths-notes select, .maths-notes textarea, .maths-notes input:is([type="url"], [type="tel"], [type="text"], [type="time"], [type="date"], [type="datetime"], [type="datetime-local"], [type="email"], [type="number"], [type="search"], [type="password"]) {
  appearance: none; width: 100%; height: 40px; padding: 0 15px; color: #1A1A1A;
  background-color: transparent; border: 1px solid #E1E8ED; border-radius: 3px;
  font-family: inherit; font-size: 16px; font-weight: 400; line-height: inherit;
  transition: color .12s, outline .12s, border-color .12s, background .12s; }
.maths-notes select { padding-inline-end: 25px; }
.maths-notes textarea { line-height: 1.5; resize: vertical; padding: 12px 15px; }
.maths-notes label { font-size: 15px; line-height: inherit; cursor: pointer; margin: 0 0 0.5em; }
.maths-notes blockquote:where(:not(.is-style-plain):not(.has-text-align-center):not(.has-text-align-right)) { padding-inline-start: 1.5em; border-inline-start: 4px solid #FF6B4A; }
.maths-notes [type="submit"] { appearance: none; height: 40px; padding: 5px 20px; border: 0; border-radius: 3px; color: #fff; background-color: #FF6B4A; font-size: 15px; font-weight: 500; }

.maths-notes { line-height: 1.65; color: #1A1A1A; color-scheme: normal; }
/* Inside Elementor's content area on live: <hr> without the theme's grey fill. */
.maths-notes hr { background-color: transparent; }

/* ─── RESET ─── */
.maths-notes *, .maths-notes *::before, .maths-notes *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* ─── DESIGN TOKENS ─── */
.maths-notes {
  --orange:      #FF6B4A;
  --orange-glow: rgba(255,107,74,0.18);
  --orange-mid:  rgba(255,107,74,0.35);

  /* Light palette */
  --bg:    #FFFBF5;
  --bg-2:  #FFFFFF;
  --bg-3:  #FDF8F2;
  --txt:   #1A1A1A;
  --txt2:  rgba(26,26,26,0.65);
  --txt3:  rgba(26,26,26,0.38);
  --bdr:   rgba(26,26,26,0.06);
  --bdr2:  rgba(26,26,26,0.12);
  --accent-sub: #8B4A0C;

  --card-shadow:       0 8px 24px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04) inset;
  --card-shadow-hover: 0 16px 40px rgba(139,74,12,0.08), 0 0 0 1px rgba(255,107,74,0.08) inset;

  --font-d: 'Bricolage Grotesque', sans-serif;
  --font-b: 'Plus Jakarta Sans', sans-serif;
  --font-s: 'Fraunces', serif;

  --page-pad:  16px;
  --content-max: 1320px;
}
/* ─── DARK MODE TOKENS ─── */
[data-theme="dark"] .maths-notes {
  --bg:    #0C0A07;
  --bg-2:  #171310;
  --bg-3:  #211C17;
  --txt:   #F2EDE6;
  --txt2:  rgba(242,237,230,0.58);
  --txt3:  rgba(242,237,230,0.32);
  --bdr:   rgba(242,237,230,0.06);
  --bdr2:  rgba(242,237,230,0.12);
  --accent-sub: #FF9A78;

  --card-shadow:       0 4px 24px rgba(0,0,0,0.50), 0 0 0 1px rgba(255,255,255,0.03) inset;
  --card-shadow-hover: 0 20px 52px rgba(0,0,0,0.60), 0 0 0 1px rgba(255,107,74,0.10) inset;
}
/* ─── BASE ─── */
html:has(> body.maths-notes-page), body.maths-notes-page { min-height: 100vh; }
.maths-notes {
  font-family: var(--font-b);
  color: var(--txt);
  min-height: 100vh;
  transition: background 0.4s, color 0.4s;
  -webkit-font-smoothing: antialiased;
}
.maths-notes::before { background: var(--bg); }
/* ─── PAGE WRAPPER ─── */
.maths-notes .page-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px var(--page-pad) 64px;
}
/* ═══════════════════════════════════════════
   HERO CARD
═══════════════════════════════════════════ */
.maths-notes .hero-card {
  background: var(--bg-2);
  border: 1px solid var(--bdr);
  border-radius: 24px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
/* Orange shimmer on top edge */
.maths-notes .hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20px; right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange-mid), transparent);
  pointer-events: none;
}
.maths-notes .hero-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.maths-notes .hero-subject-block {
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Icon box — orange tinted */
.maths-notes .subject-icon-box {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, rgba(255,107,74,0.14) 0%, rgba(255,107,74,0.04) 100%);
  border: 1px solid rgba(255,107,74,0.22);
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
  flex-shrink: 0;
  transition: background 0.4s, border-color 0.4s;
}
.maths-notes .subject-icon-box svg { width: 26px; height: 26px; stroke-width: 1.8; }
.maths-notes .hero-subject-name {
  font-family: var(--font-d);
  font-size: 28px;
  font-weight: 800;
  color: var(--txt);
  letter-spacing: -0.035em;
  line-height: 1;
  transition: color 0.4s;
}
.maths-notes .hero-subject-tagline {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-sub);
  margin-top: 5px;
  transition: color 0.4s;
}
/* ─── HERO SEARCH BAR (desktop only) ─── */
.maths-notes .hero-search {
  display: none;
}
/* ─── STAT CELLS ─── */
.maths-notes .hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  flex-shrink: 0;
}
.maths-notes .stat-cell {
  background: var(--bg-3);
  border: 1px solid var(--bdr);
  border-radius: 14px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.4s, border-color 0.4s;
}
.maths-notes .stat-icon { color: var(--orange); flex-shrink: 0; }
.maths-notes .stat-icon svg { width: 22px; height: 22px; stroke-width: 1.9; display: block; }
.maths-notes .stat-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.maths-notes .stat-num {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 800;
  color: var(--txt);
  line-height: 1;
  letter-spacing: -0.03em;
  transition: color 0.4s;
}
.maths-notes .stat-num em {
  font-family: var(--font-s);
  font-style: italic;
  color: var(--orange);
  font-size: 20px;
}
.maths-notes .stat-lbl {
  font-size: 9px;
  font-weight: 700;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.4s;
}
/* ═══════════════════════════════════════════
   TABS
═══════════════════════════════════════════ */
.maths-notes .tabs-section {
  margin-bottom: 20px;
  text-align: center;
}
.maths-notes .tabs-scroll {
  display: block;
  width: 100%;
}
.maths-notes .tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px;
  justify-content: center;
}
.maths-notes .tab {
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 600;
  color: var(--txt2);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  user-select: none;
  background: var(--bg-2);
  border: 1px solid var(--bdr2);
  transition: all 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}
.maths-notes .tab:hover { background: var(--bg-3); color: var(--txt); }
.maths-notes .tab.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 4px 16px rgba(255,107,74,0.28);
}
.maths-notes .tab-count {
  font-size: 10px;
  font-weight: 700;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3);
  color: var(--txt3);
  border: 1px solid var(--bdr);
  transition: all 0.22s;
}
.maths-notes .tab.active .tab-count {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border-color: transparent;
}
/* ═══════════════════════════════════════════
   BENTO CARDS GRID
═══════════════════════════════════════════ */
.maths-notes .cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 360px) {
  .maths-notes .cards-grid { grid-template-columns: 1fr; }
}
/* ─── CHAPTER CARD ─── */
.maths-notes .chapter-card {
  background: var(--bg-2);
  border: 1px solid var(--bdr);
  border-radius: 20px;
  padding: 20px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  min-height: 190px;
  box-shadow: var(--card-shadow);
  transition: transform 0.32s cubic-bezier(0.16,1,0.3,1),
              background 0.28s ease,
              border-color 0.28s ease,
              box-shadow 0.32s ease;
  -webkit-tap-highlight-color: transparent;
  animation: ma-fadeUp 0.4s ease both;
}
@keyframes ma-fadeUp {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.maths-notes .chapter-card.hide { display: none !important; }
/* Top shimmer — only on hover */
.maths-notes .chapter-card::before {
  content: '';
  position: absolute;
  top: 0; left: 18px; right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,107,74,0.55), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 5;
}
/* Corner highlight — only on hover */
.maths-notes .chapter-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.06) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 3;
}
[data-theme="dark"] .maths-notes .chapter-card::after {
  background: radial-gradient(circle at 100% 0%, rgba(255,107,74,0.04) 0%, transparent 60%);
}
/* Hover: odd tilts left, even tilts right — both go orange */
.maths-notes .chapter-card:not(.coming-soon):nth-child(odd):hover {
  transform: translateY(-6px) rotate(-0.6deg);
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  box-shadow: 0 18px 42px rgba(255,107,74,0.28), 0 6px 16px rgba(255,107,74,0.14), 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.maths-notes .chapter-card:not(.coming-soon):nth-child(even):hover {
  transform: translateY(-6px) rotate(0.6deg);
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  box-shadow: 0 18px 42px rgba(255,107,74,0.28), 0 6px 16px rgba(255,107,74,0.14), 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.maths-notes .chapter-card:not(.coming-soon):active {
  transform: scale(0.97) translateY(-2px) !important;
  background: var(--orange) !important;
  border-color: var(--orange) !important;
}
.maths-notes .chapter-card:not(.coming-soon):hover::before, .maths-notes .chapter-card:not(.coming-soon):active::before { opacity: 1; }
.maths-notes .chapter-card:not(.coming-soon):hover::after, .maths-notes .chapter-card:not(.coming-soon):active::after { opacity: 1; }
/* ─── PILL ─── */
.maths-notes .card-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
  position: relative; z-index: 2;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.maths-notes .pill-both {
  background: rgba(255,107,74,0.09);
  color: var(--orange);
  border: 1px solid rgba(255,107,74,0.18);
}
[data-theme="dark"] .maths-notes .pill-both {
  background: rgba(255,107,74,0.13);
  color: #FF9A78;
  border-color: rgba(255,107,74,0.22);
}
.maths-notes .pill-mains {
  background: rgba(99,153,255,0.09);
  color: #6399FF;
  border: 1px solid rgba(99,153,255,0.18);
}
[data-theme="dark"] .maths-notes .pill-mains { color: #93C5FD; border-color: rgba(99,153,255,0.22); }
/* Pill → white on hover */
.maths-notes .chapter-card:not(.coming-soon):hover .card-pill, .maths-notes .chapter-card:not(.coming-soon):active .card-pill {
  background: rgba(255,255,255,0.20) !important;
  color: #fff !important;
  border-color: transparent !important;
}
/* ─── CARD TITLE ─── */
.maths-notes .card-title {
  font-family: var(--font-d);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--txt);
  position: relative; z-index: 2;
  max-width: 85%;
  transition: color 0.25s;
}
.maths-notes .chapter-card:not(.coming-soon):hover .card-title, .maths-notes .chapter-card:not(.coming-soon):active .card-title { color: #fff !important; }
/* ─── RESOURCE TAGS ─── */
.maths-notes .card-bottom {
  margin-top: auto;
  padding-top: 20px;
  width: 100%;
  position: relative; z-index: 2;
}
.maths-notes .resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.maths-notes .res-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--txt2);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  background: var(--bg-3);
  border: 1px solid var(--bdr);
  padding: 4px 10px;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.maths-notes .chapter-card:not(.coming-soon):hover .res-tag, .maths-notes .chapter-card:not(.coming-soon):active .res-tag {
  background: rgba(255,255,255,0.18) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.maths-notes .res-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  transition: background 0.25s;
}
.maths-notes .chapter-card:not(.coming-soon):hover .res-dot, .maths-notes .chapter-card:not(.coming-soon):active .res-dot { background: #fff !important; }
/* ─── FLOATING BENTO ICON ─── */
.maths-notes .card-icon {
  position: absolute;
  bottom: -18px; right: -18px;
  width: 100px; height: 100px;
  background: var(--bg-3);
  border: 1px solid var(--bdr);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-family: var(--font-d);
  font-weight: 700;
  color: var(--txt3);
  z-index: 1;
  transform: rotate(-4deg);
  line-height: 1;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1),
              background 0.25s, color 0.25s,
              border-color 0.25s, box-shadow 0.25s;
}
.maths-notes .card-icon svg {
  width: 52px; height: 52px;
  stroke-width: 1.8;
  opacity: 0.85;
}
/* Icon springs up on hover */
.maths-notes .chapter-card:not(.coming-soon):hover .card-icon, .maths-notes .chapter-card:not(.coming-soon):active .card-icon {
  background: rgba(255,255,255,0.92) !important;
  border-color: transparent !important;
  color: var(--orange) !important;
  transform: scale(1.12) rotate(-12deg) translateY(-8px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.14);
}
/* ─── COMING SOON ─── */
.maths-notes .card-ribbon {
  position: absolute;
  top: 22px; right: -34px;
  width: 130px;
  text-align: center;
  background: var(--orange);
  color: #fff;
  padding: 5px 0;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  transform: rotate(45deg);
  box-shadow: 0 3px 10px rgba(255,107,74,0.35);
  z-index: 10;
  pointer-events: none;
}
.maths-notes .chapter-card.coming-soon {
  border: 1.5px dashed var(--bdr2) !important;
  cursor: not-allowed;
  background: var(--bg-2);
}
.maths-notes .chapter-card.coming-soon > *:not(.card-ribbon) { opacity: 0.40; }
.maths-notes .chapter-card.coming-soon:hover, .maths-notes .chapter-card.coming-soon:active {
  transform: none !important;
  background: var(--bg-2) !important;
  box-shadow: var(--card-shadow) !important;
}
.maths-notes .chapter-card.coming-soon:hover::before, .maths-notes .chapter-card.coming-soon:hover::after { opacity: 0 !important; }
/* ═══════════════════════════════════════════
   STAGGER ANIMATION
═══════════════════════════════════════════ */
.maths-notes .chapter-card:nth-child(1) { animation-delay: 0ms; }
.maths-notes .chapter-card:nth-child(2) { animation-delay: 40ms; }
.maths-notes .chapter-card:nth-child(3) { animation-delay: 80ms; }
.maths-notes .chapter-card:nth-child(4) { animation-delay: 120ms; }
.maths-notes .chapter-card:nth-child(5) { animation-delay: 160ms; }
.maths-notes .chapter-card:nth-child(6) { animation-delay: 200ms; }
.maths-notes .chapter-card:nth-child(7) { animation-delay: 240ms; }
.maths-notes .chapter-card:nth-child(8) { animation-delay: 280ms; }
.maths-notes .chapter-card:nth-child(9) { animation-delay: 320ms; }
.maths-notes .chapter-card:nth-child(10) { animation-delay: 360ms; }
/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE (< 600px)
═══════════════════════════════════════════ */
@media (max-width: 599px) {
  .maths-notes { --page-pad: 12px; }
  .maths-notes .page-content { padding: 16px var(--page-pad) 48px; }
  .maths-notes .hero-card { padding: 16px; margin-bottom: 16px; border-radius: 20px; }
  .maths-notes .hero-top-row { margin-bottom: 14px; flex-wrap: wrap; }
  .maths-notes .hero-subject-block { width: 100%; }
  .maths-notes .subject-icon-box { width: 44px; height: 44px; border-radius: 12px; }
  .maths-notes .subject-icon-box svg { width: 22px; height: 22px; }
  .maths-notes .hero-subject-name { font-size: 24px; }
  .maths-notes .hero-subject-tagline { font-size: 11px; margin-top: 4px; }
  /* Stats: full-width row so cells stretch evenly */
  .maths-notes .hero-stats {
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow: visible;
    width: 100%;
  }
  .maths-notes .stat-cell {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 6px;
    border-radius: 10px;
    gap: 5px;
  }
  .maths-notes .stat-icon svg { width: 18px; height: 18px; }
  .maths-notes .stat-num { font-size: 18px; }
  .maths-notes .stat-num em { font-size: 16px; }
  .maths-notes .stat-lbl { font-size: 7.5px; letter-spacing: 0.06em; }
  /* Tabs — wrap on mobile, centered */
  .maths-notes .tabs-section { margin-bottom: 14px; }
  .maths-notes .tabs-row { justify-content: center; }
  .maths-notes .tab { font-size: 12px; padding: 7px 13px; }
  .maths-notes .tab-count { width: 18px; height: 18px; font-size: 9px; }
  /* Cards: 2-col tight */
  .maths-notes .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .maths-notes .chapter-card { min-height: 165px; padding: 14px; border-radius: 16px; }
  .maths-notes .card-title { font-size: 15px; }
  .maths-notes .card-pill { font-size: 9px; padding: 4px 8px; margin-bottom: 8px; }
  .maths-notes .res-tag { font-size: 10px; padding: 3px 8px; }
  .maths-notes .card-icon {
    width: 82px; height: 82px;
    font-size: 30px;
    bottom: -14px; right: -14px;
    border-radius: 22px;
  }
  .maths-notes .card-icon svg { width: 42px; height: 42px; }
}
/* ═══════════════════════════════════════════
   RESPONSIVE — TABLET (600–959px)
═══════════════════════════════════════════ */
@media (min-width: 600px) and (max-width: 959px) {
  .maths-notes { --page-pad: 28px; }
  .maths-notes .page-content { padding: 24px var(--page-pad) 48px; }
  .maths-notes .hero-subject-name { font-size: 30px; }
  .maths-notes .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
/* ═══════════════════════════════════════════
   RESPONSIVE — DESKTOP (960px+)
═══════════════════════════════════════════ */
@media (min-width: 960px) {
  .maths-notes { --page-pad: 48px; }
  .maths-notes .page-content { padding: 40px var(--page-pad) 64px; }
  .maths-notes .hero-card { padding: 32px 36px; }
  .maths-notes .hero-top-row {
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 0;
    gap: 20px;
  }
  .maths-notes .hero-subject-name { font-size: 36px; }
  .maths-notes .hero-subject-tagline { font-size: 13px; margin-top: 4px; }
  .maths-notes .subject-icon-box { width: 60px; height: 60px; border-radius: 18px; }
  .maths-notes .subject-icon-box svg { width: 30px; height: 30px; }
  /* Search bar — desktop only */
  .maths-notes .hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    background: var(--bg-3);
    border: 1px solid var(--bdr2);
    border-radius: 14px;
    padding: 0 16px;
    height: 48px;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .maths-notes .hero-search:focus-within {
    border-color: rgba(255,107,74,0.4);
    box-shadow: 0 0 0 3px rgba(255,107,74,0.08);
  }
  .maths-notes .hero-search svg {
    width: 18px; height: 18px;
    stroke: var(--txt3);
    flex-shrink: 0;
    transition: stroke 0.2s;
  }
  .maths-notes .hero-search:focus-within svg { stroke: var(--orange); }
  .maths-notes .hero-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-b);
    font-size: 14px;
    font-weight: 500;
    color: var(--txt);
    caret-color: var(--orange);
  }
  .maths-notes .hero-search input::placeholder { color: var(--txt3); }
  /* Stats: icon LEFT, text RIGHT on desktop */
  .maths-notes .hero-stats {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-shrink: 0;
  }
  .maths-notes .stat-cell {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 18px;
    gap: 12px;
    flex: 1;
    min-width: 110px;
  }
  .maths-notes .stat-icon svg { width: 22px; height: 22px; }
  .maths-notes .stat-text { align-items: flex-start; }
  .maths-notes .stat-num { font-size: 24px; }
  .maths-notes .stat-lbl { font-size: 9px; }
  .maths-notes .tabs-section { margin-bottom: 24px; }
  .maths-notes .tab { font-size: 14px; padding: 9px 20px; }
  /* 3-column bento grid */
  .maths-notes .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .maths-notes .chapter-card {
    min-height: 210px;
    padding: 24px;
    border-radius: 22px;
  }
  .maths-notes .card-title { font-size: 20px; }
  .maths-notes .card-icon {
    width: 110px; height: 110px;
    font-size: 44px;
    bottom: -20px; right: -20px;
    border-radius: 32px;
  }
  .maths-notes .card-icon svg { width: 60px; height: 60px; }
}
