/* Study With Me — Bihar Board Class 9–10 */
@font-face {
  font-family: "Noto Sans Devanagari";
  src: url("../fonts/NotoSansDevanagari-Regular.woff2") format("woff2"), url("../fonts/NotoSansDevanagari-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Devanagari";
  src: url("../fonts/NotoSansDevanagari-SemiBold.woff2") format("woff2"), url("../fonts/NotoSansDevanagari-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Devanagari";
  src: url("../fonts/NotoSansDevanagari-Bold.woff2") format("woff2"), url("../fonts/NotoSansDevanagari-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fff8f0;
  --card: #ffffff;
  --ink: #1a1a2e;
  --muted: #5a5a7a;
  --science: #0d9488;
  --science-soft: #ccfbf1;
  --math: #7c3aed;
  --math-soft: #ede9fe;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --ok: #16a34a;
  --ok-soft: #dcfce7;
  --bad: #dc2626;
  --bad-soft: #fee2e2;
  --border: #e8e0d5;
  --shadow: 0 4px 14px rgba(26, 26, 46, 0.08);
  --radius: 16px;
  --max: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans Devanagari", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #0d9488 55%, #7c3aed 100%);
  color: #fff;
  padding: 1rem 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.site-header .wrap { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.logo {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700; font-size: 1.15rem;
}
.logo-badge {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.2);
  display: grid; place-items: center;
  font-size: 1.25rem;
  backdrop-filter: blur(4px);
}
.logo span.sub { display: block; font-weight: 400; font-size: .75rem; opacity: .9; }
.header-meta {
  margin-left: auto;
  font-size: .8rem;
  opacity: .95;
  background: rgba(255,255,255,.15);
  padding: .35rem .7rem;
  border-radius: 999px;
}
.nav-home {
  color: #fff;
  font-size: .85rem;
  background: rgba(255,255,255,.18);
  padding: .35rem .75rem;
  border-radius: 999px;
}
.nav-home:hover { background: rgba(255,255,255,.28); }

/* Hero */
.hero {
  padding: 1.5rem 0 1rem;
}
.hero h1 {
  margin: 0 0 .4rem;
  font-size: clamp(1.45rem, 5vw, 1.9rem);
  line-height: 1.25;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}
.pill-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: #92400e;
}

/* Sections */
.section { margin: 1.25rem 0 1.75rem; }
.section-head {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: .75rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.25rem;
}
.dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0;
}
.dot.science { background: var(--science); }
.dot.math { background: var(--math); }

.class-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: .9rem;
  overflow: hidden;
}
.class-label {
  padding: .65rem 1rem;
  font-weight: 700;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
}
.class-label.science { background: var(--science-soft); color: #0f766e; }
.class-label.math { background: var(--math-soft); color: #5b21b6; }

.chapter-list { list-style: none; margin: 0; padding: 0; }
.chapter-list li { border-bottom: 1px solid var(--border); }
.chapter-list li:last-child { border-bottom: none; }
.chapter-list a {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .75rem 1rem;
  transition: background .15s;
}
.chapter-list a:hover { background: #faf6f0; }
.ch-num {
  flex-shrink: 0;
  width: 2.1rem; height: 2.1rem;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 700; font-size: .8rem;
  background: #f3f0ea;
  color: var(--muted);
}
.ch-num.ready { background: var(--ok-soft); color: var(--ok); }
.ch-body { flex: 1; min-width: 0; }
.ch-body strong { display: block; font-size: .95rem; }
.ch-body small {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  margin-top: .15rem;
}
.badge {
  font-size: .68rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 6px;
  white-space: nowrap;
  align-self: center;
}
.badge.ready { background: var(--ok-soft); color: var(--ok); }
.badge.soon { background: #f3f0ea; color: var(--muted); }

/* Chapter page */
.breadcrumb {
  font-size: .8rem;
  color: var(--muted);
  margin: 1rem 0 .5rem;
}
.breadcrumb a { color: var(--science); font-weight: 600; }
.chapter-title {
  margin: 0 0 .35rem;
  font-size: clamp(1.3rem, 4.5vw, 1.7rem);
  line-height: 1.3;
}
.chapter-meta {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-bottom: 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.card h2, .card h3 {
  margin: 0 0 .75rem;
  font-size: 1.1rem;
  display: flex; align-items: center; gap: .45rem;
}
.card h2 .emoji, .card h3 .emoji { font-size: 1.2rem; }

.video-slot {
  background: #0f172a;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  color: #cbd5e1;
  text-align: center;
  padding: 1rem;
  margin-bottom: .75rem;
  position: relative;
  overflow: hidden;
}
.video-slot iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}
.video-slot .placeholder-icon { font-size: 2rem; margin-bottom: .4rem; }
.video-slot .placeholder-text { font-size: .9rem; line-height: 1.4; }
.video-label {
  font-weight: 600;
  font-size: .85rem;
  margin: 0 0 .4rem;
  color: var(--muted);
}

/* Notes */
.notes-grid {
  display: grid;
  gap: .75rem;
}
.note-block {
  background: linear-gradient(135deg, #fffbeb, #f0fdf4);
  border: 1px solid #e8e0d5;
  border-radius: 12px;
  padding: .85rem 1rem;
}
.note-block h4 {
  margin: 0 0 .4rem;
  font-size: .95rem;
  color: #0f766e;
}
.note-block ul { margin: .35rem 0 0; padding-left: 1.15rem; }
.note-block li { margin: .25rem 0; }
.note-block p { margin: .35rem 0 0; font-size: .92rem; }
.lock-callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: .7rem .9rem;
  margin: .75rem 0;
  font-size: .9rem;
}
.lock-callout strong { color: #92400e; }
.eq {
  font-family: "Noto Sans Devanagari", ui-monospace, monospace;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: .45rem .65rem;
  display: inline-block;
  margin: .25rem 0;
  font-size: .9rem;
}

/* Quiz */
.quiz-q {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .9rem 1rem;
  margin-bottom: .85rem;
  background: #fff;
}
.quiz-q.answered-ok { border-color: var(--ok); background: #f0fdf4; }
.quiz-q.answered-bad { border-color: #fca5a5; background: #fff7f7; }
.q-head {
  display: flex; gap: .5rem; align-items: flex-start;
  margin-bottom: .65rem;
}
.q-num {
  flex-shrink: 0;
  background: var(--science);
  color: #fff;
  width: 1.7rem; height: 1.7rem;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: .75rem; font-weight: 700;
}
.q-text { font-weight: 600; font-size: .95rem; flex: 1; }
.q-tag {
  font-size: .65rem;
  font-weight: 700;
  background: #e0e7ff;
  color: #3730a3;
  padding: .15rem .4rem;
  border-radius: 5px;
  white-space: nowrap;
}
.q-tag.model { background: var(--accent-soft); color: #92400e; }
.options { display: grid; gap: .4rem; }
.opt {
  display: flex; align-items: flex-start; gap: .55rem;
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--border);
  background: #fafafa;
  border-radius: 10px;
  padding: .6rem .75rem;
  font-size: .9rem;
  transition: border-color .12s, background .12s;
}
.opt:hover:not(:disabled) { border-color: var(--science); background: var(--science-soft); }
.opt:disabled { cursor: default; opacity: 1; }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); font-weight: 600; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt-letter {
  flex-shrink: 0;
  width: 1.4rem; height: 1.4rem;
  border-radius: 6px;
  background: #e8e0d5;
  display: grid; place-items: center;
  font-size: .75rem; font-weight: 700;
}
.opt.correct .opt-letter { background: var(--ok); color: #fff; }
.opt.wrong .opt-letter { background: var(--bad); color: #fff; }
.feedback {
  margin-top: .55rem;
  font-size: .85rem;
  padding: .45rem .6rem;
  border-radius: 8px;
  display: none;
}
.feedback.show { display: block; }
.feedback.ok { background: var(--ok-soft); color: #166534; }
.feedback.bad { background: var(--bad-soft); color: #991b1b; }

.score-bar {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, var(--bg) 30%);
  padding: 1rem 0 .85rem;
  margin-top: 1rem;
}
.score-card {
  background: linear-gradient(135deg, #1e3a8a, #0d9488);
  color: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  box-shadow: 0 8px 24px rgba(30, 58, 138, .35);
}
.score-card .label { font-size: .85rem; opacity: .9; }
.score-card .value { font-size: 1.4rem; font-weight: 700; }
.score-card button {
  background: #fff;
  color: #1e3a8a;
  border: 0;
  border-radius: 999px;
  padding: .5rem 1rem;
  font-weight: 700;
  font-size: .85rem;
}

.stub-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 12px;
  padding: .75rem 1rem;
  font-size: .88rem;
  margin-bottom: 1rem;
}

.site-footer {
  margin-top: 2rem;
  padding: 1.25rem 0 2rem;
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  border-top: 1px solid var(--border);
}
.site-footer a { color: var(--science); font-weight: 600; }

@media (min-width: 640px) {
  body { font-size: 17px; }
  .notes-grid { grid-template-columns: 1fr 1fr; }
  .notes-grid .note-block.wide { grid-column: 1 / -1; }
}

/* v2 additions */
.class-cards{display:grid;grid-template-columns:1fr 1fr;gap:.8rem;margin:1rem 0}
.class-card{display:flex;flex-direction:column;padding:1.1rem;border-radius:14px;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.08);text-decoration:none;color:inherit}
.class-card strong{font-size:1.4rem}
.pdf-list{list-style:none;padding:0;margin:0}
.pdf-item{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.4rem;padding:.6rem 0;border-bottom:1px solid #eee}
.video-el,.video-slot.yt iframe{width:100%;aspect-ratio:16/9;border:0;border-radius:10px;background:#000}
.dl{font-size:.85rem;margin:.3rem 0 1rem}
.pager{display:flex;justify-content:space-between;margin:1.2rem 0}

/* ===== 2026-10-08 shared additions (additive only): footer legal links, subscribe CTA,
   AdSense-ready reserved slots, premium card, legal pages ===== */
.site-footer p { margin: .35rem 0; }
.site-footer .fsub { margin-bottom: .7rem; }
.ytsub, .ytbtn { display: inline-flex; align-items: center; gap: .45rem; background: #cc0000; color: #fff !important; border-radius: 999px;
  padding: .55rem 1.1rem; font-weight: 700; text-decoration: none; min-height: 40px; box-shadow: 0 2px 6px rgba(204,0,0,.25); border: 0; }
.ytsub:hover, .ytbtn:hover { background: #b00000; }
.ytsub-i { font-size: .8em; }
.flegal { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .4rem; margin: .5rem 0 .2rem; }
.flegal a { padding: .25rem .2rem; }
.flegal .sep { color: #c9c2b8; }
.flegal-en, .fsmall { font-size: .74rem; color: var(--muted); }
.flegal-en a { font-weight: 500; }
.subline { background: #fff5f5; border: 1px solid #fecaca; border-radius: 12px; padding: .7rem .9rem; font-size: .9rem; margin: 1rem 0; }
.subline a { color: #b00000; font-weight: 700; }
.subcta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; border-left: 5px solid #cc0000; }
.subcta-l { display: flex; align-items: center; gap: .75rem; min-width: 0; flex: 1 1 260px; }
.subcta-l b { display: block; line-height: 1.35; }
.subcta-l small { color: var(--muted); }
.subcta-logo { flex: 0 0 44px; height: 44px; border-radius: 12px; background: #cc0000; color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.subcta-r { display: flex; gap: .5rem; flex-wrap: wrap; }
/* reserved ad space — placeholder only, never inside quizzes */
.adslot { margin: 1.25rem auto; max-width: 970px; text-align: center; contain: layout; }
.adslot .adlab { display: block; font-size: .66rem; letter-spacing: .06em; color: #9a93a8; text-transform: uppercase; margin-bottom: .2rem; }
.adslot-in { min-height: 100px; border: 1px dashed #d6cfc4; border-radius: 10px; background: repeating-linear-gradient(45deg, #faf8f4, #faf8f4 10px, #f4f1ea 10px, #f4f1ea 20px);
  display: grid; place-items: center; overflow: hidden; }
.adph { font-size: .75rem; color: #aaa3b5; }
.adslot.side { display: none; }
@media (min-width: 700px) { .adslot.inline .adslot-in { min-height: 120px; } }
@media (min-width: 940px) { .adslot.side { display: block; margin: 1rem 0 0; max-width: 300px; } .adslot.side .adslot-in { min-height: 250px; } }
@media print { .adslot, .subcta, .subline, .premium, .site-footer .fsub { display: none !important; } }
/* premium pack (coming soon) */
.premium { border: 1.5px solid #f2d27a; background: linear-gradient(180deg, #fffbeb, #fff); }
.prem-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.prem-tag { background: #f59e0b; color: #fff; font-weight: 700; font-size: .78rem; padding: .2rem .65rem; border-radius: 999px; }
.prem-soon { font-size: .78rem; color: #92400e; background: #fef3c7; padding: .2rem .6rem; border-radius: 999px; }
.premium h2 { margin-top: .6rem; }
.prem-list { list-style: none; padding: 0; margin: .6rem 0 1rem; display: grid; gap: .55rem; }
.prem-list li { display: flex; gap: .6rem; align-items: flex-start; }
.prem-list li > span:first-child { font-size: 1.2rem; line-height: 1.2; }
.prem-list b { display: block; }
.prem-list small { color: var(--muted); }
@media (min-width: 700px) { .prem-list { grid-template-columns: 1fr 1fr; } }
.prem-cta { display: flex; flex-wrap: wrap; gap: .5rem; }
/* legal pages */
.legal .chapter-title small { font-size: .55em; }
.lmeta { font-size: .8rem; color: var(--muted); }
.lcard h2 { font-size: 1.1rem; margin-top: 1.1rem; }
.lcard h3 { font-size: 1rem; margin-top: 1rem; }
.lcard li { margin: .3rem 0; }
.lcard code { background: #f3f0ea; padding: 0 .3rem; border-radius: 4px; }
.lnav { display: flex; flex-wrap: wrap; gap: .4rem .8rem; font-size: .9rem; }
.lnav a[aria-current] { font-weight: 700; text-decoration: none; color: var(--text, #222); }
.todo { background: #fef3c7; color: #92400e; padding: 0 .35rem; border-radius: 4px; }
