/* EDURA Class 9 – notes site. Design system shared with EDURA Class 10 (edura-class10.pages.dev). */
@font-face {
  font-family: "Cinzel";
  src: url("/fonts/Cinzel-Variable.woff2") format("woff2");
  font-weight: 400 900; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat-Variable.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}

:root {
  --bg: #031412;
  --bg-2: #062521;
  --panel: rgba(10, 46, 41, 0.55);
  --panel-2: rgba(255, 255, 255, 0.035);
  --line: rgba(160, 230, 205, 0.12);
  --line-gold: rgba(232, 196, 108, 0.35);
  --emerald: #10b981;
  --emerald-2: #34d399;
  --teal: #14b8a6;
  --gold: #e8c46c;
  --gold-2: #f6dc94;
  --gold-3: #b8923b;
  --ink: #eaf6f1;
  --muted: #9fc4b9;
  --dim: #6e958b;
  --radius: 18px;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.7);
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --ui: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--ui); font-size: 16px; line-height: 1.55;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #1a1405; padding: 8px 14px; border-radius: 10px; z-index: 100; font-weight: 700; }
.skip:focus { left: 12px; }

/* --- starfield --- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(20, 184, 166, 0.16), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(16, 185, 129, 0.10), transparent 60%),
    radial-gradient(1000px 800px at 50% 120%, rgba(232, 196, 108, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #041b18 45%, var(--bg) 100%);
}
.stars { position: absolute; inset: -50%; background-repeat: repeat; opacity: .55; }
.stars.s1 {
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent 60%),
    radial-gradient(1px 1px at 120px 80px, #cfe, transparent 60%),
    radial-gradient(1.5px 1.5px at 200px 160px, #fff, transparent 60%),
    radial-gradient(1px 1px at 260px 40px, #def, transparent 60%),
    radial-gradient(1px 1px at 60px 210px, #fff, transparent 60%),
    radial-gradient(1.2px 1.2px at 330px 250px, #fea, transparent 60%);
  background-size: 360px 300px;
  animation: drift 160s linear infinite;
}
.stars.s2 {
  background-image:
    radial-gradient(1px 1px at 50px 90px, #9fe, transparent 60%),
    radial-gradient(1px 1px at 300px 20px, #fff, transparent 60%),
    radial-gradient(1.6px 1.6px at 420px 300px, #fff, transparent 60%),
    radial-gradient(1px 1px at 180px 380px, #cfe, transparent 60%);
  background-size: 520px 460px; opacity: .35;
  animation: drift 260s linear infinite reverse;
}
.orbit {
  position: absolute; width: 1400px; height: 1400px; right: -700px; top: 260px; border-radius: 50%;
  border: 1px solid rgba(232, 196, 108, 0.07);
  box-shadow: inset 0 0 0 120px rgba(16, 185, 129, 0.015), 0 0 0 220px rgba(16, 185, 129, 0.012);
}
@keyframes drift { to { transform: translate3d(180px, 120px, 0); } }
@media (prefers-reduced-motion: reduce) { .stars { animation: none; } html { scroll-behavior: auto; } }

/* --- top bar --- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(16px, 4vw, 40px); padding-top: max(12px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(3, 20, 18, 0.92), rgba(3, 20, 18, 0.72));
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(16, 185, 129, .35)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--display); font-weight: 700; letter-spacing: .14em; font-size: 1.12rem; }
.brand-text small { color: var(--gold); font-size: .66rem; letter-spacing: .28em; text-transform: uppercase; font-weight: 600; margin-top: 3px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.class-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(232, 196, 108, 0.08); border: 1px solid var(--line-gold); color: var(--gold-2); font-weight: 600; font-size: .86rem;
  transition: background .2s, transform .2s;
}
.class-pill svg { width: 16px; height: 16px; }
.class-pill:hover { background: rgba(232, 196, 108, 0.16); }
.account { display: flex; align-items: center; min-height: 40px; }
.gsi-slot { min-height: 0; }
.user { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; }
.user-btn img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--bg-2); }
.user-btn span { max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: .88rem; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 12px; border-radius: 14px;
  background: #072723; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.user-email { margin: 0 0 10px; color: var(--muted); font-size: .8rem; word-break: break-all; }
.user-menu button { width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-weight: 600; }
.user-menu button:hover { background: rgba(255, 255, 255, .1); }

/* --- hero / landing --- */
.hero { position: relative; overflow: hidden; min-height: calc(100vh - 66px); display: flex; align-items: center; }
.hero.compact { min-height: 0; }
.hero-art { position: absolute; inset: 0; z-index: 0; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; opacity: .78; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(90deg, rgba(3, 20, 18, .96) 0%, rgba(3, 20, 18, .82) 38%, rgba(3, 20, 18, .25) 75%, rgba(3, 20, 18, .45) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 30%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(40px, 8vh, 96px) clamp(18px, 4vw, 40px) clamp(48px, 8vh, 90px); }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 7px 16px 7px 12px; border-radius: 999px;
  border: 1.5px solid var(--gold); color: var(--gold-2); text-transform: uppercase; letter-spacing: .22em; font-weight: 700; font-size: .74rem;
  background: rgba(232, 196, 108, 0.07); box-shadow: 0 0 24px -6px rgba(232, 196, 108, .45);
}
.kicker svg { width: 16px; height: 16px; color: var(--gold); transform: rotate(35deg); }
.hero h1 {
  font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.02; letter-spacing: .02em;
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  background: linear-gradient(180deg, #fff 30%, #cfeee3 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(16, 185, 129, .15);
}
.hero h1 span {
  display: block; font-size: .52em; margin-top: .25em; letter-spacing: .06em;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { max-width: 540px; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.12rem); margin: 18px 0 0; }
.picker { margin-top: clamp(28px, 5vh, 48px); max-width: 720px; }
.picker-q { font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin: 0 0 16px; letter-spacing: .04em; }
.picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.class-card {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 18px; align-items: center; text-align: left;
  padding: 22px 22px 20px; border-radius: 22px; min-height: 150px; overflow: hidden;
  background: linear-gradient(160deg, rgba(16, 185, 129, .14), rgba(6, 37, 33, .7) 60%);
  border: 1px solid rgba(160, 230, 205, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), var(--shadow);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
}
.class-card::before {
  content: ""; position: absolute; width: 220px; height: 220px; right: -90px; top: -90px; border-radius: 50%;
  border: 1px dashed rgba(232, 196, 108, .25); transition: transform .6s ease;
}
.class-card:hover, .class-card:focus-visible { transform: translateY(-4px); border-color: var(--line-gold); box-shadow: 0 24px 60px -20px rgba(16, 185, 129, .45); }
.class-card:hover::before { transform: rotate(60deg) scale(1.08); }
.class-card.is-current { border-color: var(--gold); }
.cc-num {
  grid-row: 1 / 4; font-family: var(--display); font-weight: 800; font-size: 3.6rem; line-height: 1;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cc-label { font-weight: 700; font-size: 1.25rem; }
.cc-sub { color: var(--muted); font-size: .86rem; line-height: 1.4; margin-top: 2px; }
.cc-go { color: var(--gold); font-weight: 700; font-size: .85rem; margin-top: 10px; letter-spacing: .04em; }

/* --- library --- */
.library { max-width: 1180px; margin: 0 auto; padding: clamp(28px, 5vw, 48px) clamp(16px, 4vw, 40px) 72px; }
.lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.eyebrow { margin: 0 0 6px; color: var(--gold); letter-spacing: .2em; text-transform: uppercase; font-size: .72rem; font-weight: 700; }
.lib-head h2 { font-family: var(--display); font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0; letter-spacing: .03em; }
.link-btn { background: none; border: 0; color: var(--emerald-2); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; padding: 6px 2px; }
.link-btn:hover { color: var(--gold-2); }
.tabs {
  display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  margin-bottom: 18px; max-width: 100%; overflow-x: auto;
}
.tabs [role="tab"] {
  border: 0; background: transparent; color: var(--muted); padding: 10px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: background .2s, color .2s;
}
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] {
  color: #10241f; background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: 0 6px 18px -6px rgba(232, 196, 108, .6);
}
.panel:focus-visible { outline-offset: 6px; }
.stat { color: var(--dim); font-size: .86rem; margin: 0 0 14px; }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.ch {
  position: relative; display: flex; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--radius);
  background: var(--panel-2); border: 1px solid var(--line); min-height: 86px;
}
.ch-num {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; color: var(--dim); background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
}
.ch-body { flex: 1; min-width: 0; }
.ch-title { margin: 0; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.ch-meta { margin: 4px 0 0; font-size: .8rem; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.soon {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px dashed rgba(160, 230, 205, .22); text-transform: uppercase;
}
.soon svg { width: 12px; height: 12px; opacity: .8; }
.ch.available {
  grid-column: 1 / -1; padding: 18px; gap: 22px; align-items: stretch;
  background: linear-gradient(135deg, rgba(16, 185, 129, .16), rgba(6, 37, 33, .65) 55%, rgba(232, 196, 108, .07));
  border-color: var(--line-gold); box-shadow: var(--shadow);
}
.ch.available .ch-num { color: #10241f; background: linear-gradient(180deg, var(--gold-2), var(--gold)); border: 0; }
.ch-thumb {
  flex: none; width: 128px; aspect-ratio: 210 / 297; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .8); transform: rotate(-2deg); background: #0a2e29; padding: 0; cursor: zoom-in;
  transition: transform .3s;
}
.ch-thumb:hover { transform: rotate(0) scale(1.03); }
.ch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ch.available .ch-body { display: flex; flex-direction: column; justify-content: center; }
.ch.available .ch-title { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: .02em; }
.ch-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--emerald-2); font-weight: 700; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 6px; }
.ch-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--emerald-2); box-shadow: 0 0 10px var(--emerald-2); }
.ch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ch-note { margin: 10px 0 0; font-size: .78rem; color: var(--dim); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: .92rem;
  border: 1px solid transparent; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-gold { color: #14200f; background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, #d6ae52); box-shadow: 0 10px 24px -10px rgba(232, 196, 108, .7), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold:hover { box-shadow: 0 14px 30px -10px rgba(232, 196, 108, .9), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-ghost { color: var(--ink); background: rgba(255, 255, 255, .05); border-color: rgba(160, 230, 205, .25); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: var(--line-gold); }
.btn[aria-busy="true"] { opacity: .8; cursor: progress; }
.btn-sm { padding: 8px 14px; font-size: .84rem; }
.lock { font-size: .7rem; font-weight: 600; opacity: .75; }

/* --- footer --- */
.footer { border-top: 1px solid var(--line); background: rgba(2, 14, 12, .6); padding: 28px clamp(16px, 4vw, 40px) calc(24px + env(safe-area-inset-bottom)); }
.foot-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; }
.foot-brand { display: flex; gap: 12px; align-items: center; }
.foot-brand strong { font-family: var(--display); letter-spacing: .06em; }
.foot-brand p, .foot-yt p { margin: 2px 0; color: var(--muted); font-size: .88rem; }
.foot-yt strong { color: var(--ink); }
.yt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: #ff3d3d; margin-right: 8px; box-shadow: 0 0 10px rgba(255, 61, 61, .6); }
.fine { max-width: 1180px; margin: 18px auto 0; color: var(--dim); font-size: .76rem; }

/* (reader, modal, toast styles: see the v6 section at the end of this file) */
/* --- responsive --- */
@media (max-width: 760px) {
  .brand-text small { letter-spacing: .18em; }
  .hero { min-height: auto; }
  .hero-art img { object-position: 78% 30%; opacity: .55; }
  .hero::after { background: linear-gradient(180deg, rgba(3, 20, 18, .7) 0%, rgba(3, 20, 18, .9) 55%, var(--bg) 100%); }
  .picker-grid { grid-template-columns: 1fr; }
  .class-card { min-height: 0; padding: 18px; }
  .cc-num { font-size: 3rem; }
  .chapters { grid-template-columns: 1fr; }
  .ch.available { flex-direction: column; align-items: flex-start; }
  .ch.available .ch-num { position: absolute; top: 16px; right: 16px; }
  .ch-thumb { width: 112px; }
  .ch-actions .btn { flex: 1; }
}
@media (max-width: 420px) {
  .brand-text small { display: none; }
  .class-pill { padding: 7px 10px; font-size: .8rem; }
  .tabs [role="tab"] { padding: 9px 14px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.foot-links { max-width: 1180px; margin: 18px auto 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--muted); font-size: .84rem; font-weight: 600; text-decoration: none; }
.foot-links a:hover, .foot-links a:focus-visible { color: var(--gold-2); text-decoration: underline; text-underline-offset: 4px; }
/* legal pages */
.legal { max-width: 820px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) clamp(18px, 4vw, 40px) 72px; }
.legal h1 { font-family: var(--display); font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 6px; letter-spacing: .03em; }
.legal .updated { color: var(--dim); font-size: .85rem; margin: 0 0 28px; }
.legal-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); }
.legal h2 { font-family: var(--display); font-size: 1.2rem; color: var(--gold-2); margin: 28px 0 8px; letter-spacing: .03em; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: #cfe3dc; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 4px 0; }
.legal a:not(.btn) { color: var(--emerald-2); text-underline-offset: 3px; }
.legal .back { display: inline-flex; margin-top: 28px; }
.highlight { border-left: 3px solid var(--gold); padding: 10px 16px; background: rgba(232,196,108,.06); border-radius: 0 12px 12px 0; }


/* --- YouTube --- */
.yt-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 11px; border-radius: 999px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: .86rem; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: background .2s, border-color .2s;
}
.yt-pill svg { width: 22px; height: 22px; }
.yt-pill:hover { background: rgba(255, 0, 51, .1); border-color: rgba(255, 80, 100, .4); }
.yt-link { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(232, 196, 108, .4); }
.yt-link:hover { color: var(--gold-2); }
.btn-yt { margin-top: 10px; color: #fff; background: linear-gradient(180deg, #ff2950, #d4002a); box-shadow: 0 10px 24px -12px rgba(255, 0, 51, .8); }
.btn-yt:hover { filter: brightness(1.08); }
@media (max-width: 760px) { .yt-pill span { display: none; } .yt-pill { width: 40px; padding: 0; justify-content: center; } }

/* ======================================================================
   Class 9 static pages: subject cards, chapter lists, notes
   ====================================================================== */
a.class-card { color: var(--ink); text-decoration: none; }
.picker-grid.subjects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.subject-card { min-height: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-right: 84px; }
.subject-card .cc-num { position: absolute; right: 18px; top: 16px; font-size: 2.3rem; min-width: 56px; text-align: center; }
.subject-card .cc-book { color: var(--gold-2); font-size: .8rem; font-weight: 600; letter-spacing: .04em; }
.home-sec { max-width: 1180px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 56px; }
.home-sec h2 { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 6px; letter-spacing: .03em; }
.home-sec .lead { color: var(--muted); margin: 0 0 18px; max-width: 720px; }
.feature-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.feature { padding: 18px 20px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); }
.feature h3 { margin: 0 0 6px; font-size: 1rem; }
.feature p { margin: 0; color: var(--muted); font-size: .9rem; }
.ch { text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s, background .2s; }
a.ch:hover, a.ch:focus-visible { border-color: var(--line-gold); transform: translateY(-2px); background: rgba(255,255,255,.055); }
.ch.full .ch-num { color: #10241f; background: linear-gradient(180deg, var(--gold-2), var(--gold)); border: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.badge-full { color: #0d2a22; background: linear-gradient(180deg, #6ff0bf, var(--emerald-2)); }
.badge-soon { color: var(--muted); background: rgba(255,255,255,.04); border: 1px dashed rgba(160,230,205,.25); }
.ch-meta .stream { color: var(--muted); }
.crumbs { max-width: 1180px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 40px) 0; font-size: .84rem; color: var(--dim); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold-2); text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 6px; }
.page-head { max-width: 1180px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 40px) 8px; }
.page-head h1 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.12; letter-spacing: .02em; font-size: clamp(1.9rem, 4.6vw, 3rem);
  background: linear-gradient(180deg, #fff 30%, #cfeee3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head .lede { max-width: 760px; }
.page-head .head-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.page-head .head-actions .btn-yt { margin-top: 0; }

/* notes layout */
.notes-wrap { max-width: 1180px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 40px) 64px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.notes { min-width: 0; }
.toc { position: sticky; top: 84px; padding: 16px 18px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); font-size: .88rem; }
.toc p { margin: 0 0 8px; color: var(--gold); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .7rem; }
.toc ol { margin: 0; padding-left: 1.1em; }
.toc li { margin: 5px 0; color: var(--dim); }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--gold-2); }
.n-sec { padding: clamp(18px, 3vw, 28px); margin: 0 0 16px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); scroll-margin-top: 84px; }
.n-sec h2 { font-family: var(--display); color: var(--gold-2); font-size: clamp(1.25rem, 2.6vw, 1.55rem); margin: 0 0 12px; letter-spacing: .02em; line-height: 1.25; }
.n-sec h3 { font-size: 1.05rem; margin: 20px 0 8px; color: var(--ink); }
.n-sec p, .n-sec li { color: #d3e7e0; }
.n-sec p { margin: 0 0 12px; }
.n-list { padding-left: 1.25em; margin: 0 0 12px; }
.n-list li { margin: 6px 0; }
.n-box { margin: 14px 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.n-box > :last-child { margin-bottom: 0; }
.n-box-t { margin: 0 0 6px !important; font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.n-def { border-left: 3px solid var(--emerald-2); } .n-def .n-box-t { color: var(--emerald-2); }
.n-thm { border-left: 3px solid var(--gold); background: rgba(232,196,108,.05); } .n-thm .n-box-t { color: var(--gold-2); }
.n-key { border-left: 3px solid #5ec8ff; background: rgba(94,200,255,.05); } .n-key .n-box-t { color: #8fd8ff; }
.n-tip { border-left: 3px solid #ff9f6b; background: rgba(255,159,107,.05); } .n-tip .n-box-t { color: #ffbe96; }
.n-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.n-grid2 .n-box { margin: 0; }
.n-small { font-size: .9rem; color: var(--muted) !important; }
.n-note { font-size: .92rem; color: var(--muted) !important; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.025); border: 1px dashed rgba(160,230,205,.18); }
.n-formula { font-family: "Cambria Math", "STIX Two Math", Georgia, serif; font-size: 1.12rem; text-align: center; padding: 8px; margin: 8px 0 !important; color: var(--ink) !important; }
.n-ans { display: block; margin-top: 4px; padding: 4px 10px; border-radius: 8px; background: rgba(16,185,129,.08); color: #a8f0d2; font-size: .9rem; }
.n-ans::before { content: "Answer: "; font-weight: 700; color: var(--emerald-2); }
.n-table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: .92rem; display: block; overflow-x: auto; }
.n-table th, .n-table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.n-table th { color: var(--gold-2); font-weight: 700; background: rgba(232,196,108,.05); white-space: nowrap; }
.n-table td { color: #d3e7e0; }
.n-fig { margin: 14px 0; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.18); border: 1px solid var(--line); }
.n-fig svg { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.n-fig figcaption { text-align: center; color: var(--dim); font-size: .82rem; margin-top: 6px; }
.soon-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; margin: 0 0 16px; border: 1px dashed rgba(232,196,108,.45); background: rgba(232,196,108,.06); color: var(--gold-2); }
.soon-banner strong { color: var(--gold-2); }
.soon-banner p { margin: 0; color: #e9dcb6; font-size: .92rem; }

/* watch the video block */
.watch { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 18px 20px; margin: 0 0 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,0,51,.10), rgba(6,37,33,.6) 60%); border: 1px solid rgba(255,80,100,.28); }
.watch > div:nth-child(2) { flex: 1 1 220px; min-width: 0; }
.watch-icon { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,0,51,.14); }
.watch-icon svg { width: 34px; height: 34px; }
.watch h2 { font-family: var(--display); font-size: 1.15rem; margin: 0 0 4px; color: var(--ink); }
.watch p { margin: 0; color: var(--muted); font-size: .9rem; }
.watch .btns { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px; }
.watch .btn-yt { margin-top: 0; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.pager a { flex: 1 1 240px; padding: 14px 16px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pager a:hover { border-color: var(--line-gold); }
.pager small { display: block; color: var(--gold); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; margin-bottom: 2px; }
.pager .next { text-align: right; }
.src-note { color: var(--dim); font-size: .82rem; margin: 18px 0 0; }
.src-note a { color: var(--emerald-2); }
[lang="hi"] { font-family: "Noto Sans Devanagari", "Nirmala UI", "Mangal", var(--ui); }
.sibling { margin-top: 18px; }

@media (max-width: 960px) {
  .notes-wrap { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
}
@media (max-width: 760px) {
  .picker-grid.subjects { grid-template-columns: 1fr; }
  .n-grid2 { grid-template-columns: 1fr; }
  .watch-icon { display: none; }
}
@media (min-width: 761px) and (max-width: 1020px) { .picker-grid.subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print {
  .topbar, .footer, .sky, .watch, .toc, .pager, .crumbs { display: none !important; }
  body { background: #fff; color: #000; }
  .n-sec { border: 0; background: none; padding: 0; }
  .n-sec p, .n-sec li, .n-table td { color: #000; }
}
.picker.picker-wide { max-width: 1100px; }
