/* ============================================================
   PUBLIC NCERT CHAPTER PAGES (001 DEC-8) — /maths, /maths/class-N,
   /maths/class-N/<chapter>. "Bright Sky" like the homepage (001 DEC-6):
   always light, loaded after theme.css. The first block repeats the
   homepage's base rules (tokens, nav, buttons, footer), which index.html
   keeps inline; change them in both places. Colour rules hold: green =
   correct only, red = marks only (never used here), saffron = warmth.
   ============================================================ */
:root {
  color-scheme: light;
  --hp-sky-top:   #F3FAFF;
  --hp-sky-mid:   #DDF0FF;
  --hp-blue:      #1A6FE0;
  --hp-blue-hover:#135BC0;
  --hp-blue-ink:  #0E4A9E;
  --hp-blue-wash: #E4F2FF;
  --hp-ink:       #14305A;
  --hp-soft:      #3A5279;   /* body text on the sky */
  --hp-quiet:     #6A7E9E;   /* metadata */
  --hp-line:      #E1ECF7;
  --hp-radius:    18px;
  --hp-shadow:    0 2px 6px rgba(20,48,90,.06), 0 18px 40px rgba(26,111,224,.12);
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--hp-ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif; line-height: 1.6;
  -webkit-font-smoothing: antialiased; background: #fff;
}
h1, h2, h3 { font-family: "Baloo 2", "IBM Plex Sans", sans-serif; line-height: 1.08; margin: 0; color: var(--hp-ink); text-wrap: balance; }
a { color: inherit; }
.wrap { width: min(1160px, 92vw); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--hp-blue-ink); background: var(--hp-blue-wash);
  padding: .3rem .75rem; border-radius: 99px;
}
.btn {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 12px;
  padding: .72rem 1.25rem; border: 1.5px solid var(--hp-blue);
  background: #fff; color: var(--hp-blue-ink); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--hp-ink); outline-offset: 2px; }
.btn-primary { background: var(--hp-blue); color: #fff; box-shadow: 0 8px 18px rgba(26,111,224,.28); }
.btn-primary:hover { background: var(--hp-blue-hover); border-color: var(--hp-blue-hover); }
.btn-sm { padding: .45rem .9rem; font-size: .92rem; border-radius: 10px; }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.05rem; }
.nav { position: sticky; top: 0; z-index: 30; background: rgba(243,250,255,.88); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(26,111,224,.12); }
.nav-in { display: flex; align-items: center; gap: 1.4rem; padding: .8rem 0; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 1.45rem; text-decoration: none; color: var(--hp-ink); }
/* the Clay C (logo, 2026-11-15: the same mark everywhere) */
.kite-dot { display: inline-block; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M49.81 31.22 A20 20 0 1 1 32.78 14.19' fill='none' stroke='%23EFA63B' stroke-width='12' stroke-linecap='round'/%3E%3Crect x='45' y='5' width='13' height='13' rx='2.6' transform='rotate(45 51.5 11.5)' fill='%231A6FE0'/%3E%3C/svg%3E") center / contain no-repeat; }
.brand .kite-dot { width: 1.35rem; height: 1.35rem; }
.nav-links { display: flex; gap: 1.3rem; margin-left: .8rem; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--hp-soft); }
.nav-links a:hover { color: var(--hp-blue-ink); }
.nav-spacer { flex: 1; }
@media (max-width: 960px) { .nav-links { display: none; } }
/* 008 DEC-19: Log in + Start free stay on one row on a phone; below 370px
   Start free goes (every public page repeats it in its body). */
@media (max-width: 480px) {
  .nav-in { gap: .55rem; }
  .nav-in .brand { font-size: 1.2rem; white-space: nowrap; }
  .nav-in .btn-sm { white-space: nowrap; padding: .4rem .7rem; font-size: .88rem; }
}
@media (max-width: 370px) { .nav-in .nav-start { display: none; } }
footer { padding: 2.4rem 0 3rem; border-top: 1px solid var(--hp-line); background: #fff; }
.foot-in { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; color: var(--hp-quiet); font-size: .9rem; }
.foot-in a { text-decoration: none; }

/* ---- page head ---- */
.cp-hero { background: linear-gradient(180deg, var(--hp-sky-top), var(--hp-sky-mid)); padding: 1.6rem 0 2.2rem; }
.crumbs { font-size: .88rem; color: var(--hp-soft); margin: 0 0 1rem; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; }
.crumbs li + li::before { content: "›"; margin-right: .3rem; }
.crumbs a { color: var(--hp-blue-ink); }
.cp-hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); font-weight: 800; margin-top: .8rem; }
.cp-sub { font-family: "Baloo 2", sans-serif; font-weight: 700; font-size: clamp(1.15rem, 2.4vw, 1.45rem); color: var(--hp-blue-ink); margin: .2rem 0 .6rem; }
.cp-lede { max-width: 62ch; font-size: 1.06rem; color: var(--hp-soft); margin: .6rem 0 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-top: 1.4rem; max-width: 820px; }
.stats div { background: #fff; border-radius: 14px; padding: .75rem .9rem; box-shadow: 0 1px 3px rgba(20,48,90,.06); }
.stats b { display: block; font-family: "Baloo 2", sans-serif; font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats span { display: block; font-size: .84rem; line-height: 1.35; color: var(--hp-soft); }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr 1fr; } }

/* ---- sections ---- */
.sec { padding: 2rem 0 .6rem; }
.sec h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); font-weight: 800; }
.sec-lede { color: var(--hp-soft); margin: .35rem 0 0; max-width: 62ch; }

/* ---- the example question ---- */
.qcard { margin-top: 1rem; max-width: 760px; background: #fff; border-radius: var(--hp-radius); box-shadow: var(--hp-shadow); padding: clamp(1rem, 3vw, 1.6rem); }
.qtags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { font-size: .76rem; font-weight: 600; color: var(--hp-blue-ink); background: var(--hp-blue-wash); padding: .18rem .6rem; border-radius: 99px; }
.qstem { font-size: 1.08rem; margin: .8rem 0; max-width: 65ch; }
.qfig { display: block; width: 100%; max-width: 560px; height: auto; border: 1px solid var(--hp-line); border-radius: 12px; background: #fff; }
.qopts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; max-width: 560px; }
@media (max-width: 360px) { .qopts { grid-template-columns: 1fr; } }
.qopt { font: inherit; font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; gap: .6rem; text-align: left; cursor: pointer;
  border: 1.5px solid #D2E2F5; border-radius: 12px; padding: .6rem .8rem; background: #fff; color: var(--hp-ink); }
.qopt:hover { border-color: var(--hp-blue); }
.qopt:focus-visible { outline: 3px solid var(--hp-ink); outline-offset: 2px; }
.qopt:disabled { cursor: default; }
.qletter { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; background: var(--hp-blue-wash); color: var(--hp-blue-ink); flex: none; }
.qopt.right { border-color: var(--ok); background: var(--ok-wash); color: var(--ok-deep); }
.qopt.right .qletter { background: var(--ok); color: #fff; }
.qopt.tried { border-style: dashed; color: var(--hp-quiet); }
.qfb:empty { display: none; }
.qfb { margin-top: .9rem; max-width: 560px; border-radius: 12px; padding: .7rem .9rem; font-size: .95rem; background: #F2F6FB; color: var(--hp-ink); }
.qfb.ok { background: var(--ok-wash); color: var(--ok-deep); }
.qfb p { margin: 0; }
.qfb p + p { margin-top: .35rem; }
.qans { margin-top: 1rem; max-width: 640px; font-size: .95rem; }
.qans summary { cursor: pointer; font-weight: 600; color: var(--hp-blue-ink); }
.qans p { margin: .5rem 0 0; }

/* ---- topics and mistakes ---- */
.topics { margin: .9rem 0 0; padding: 0; list-style: none; display: grid; gap: .5rem; max-width: 640px; }
.topics li { position: relative; padding-left: 1.4rem; }
.topics li::before { content: ""; position: absolute; left: .15rem; top: .55em; width: .55rem; height: .55rem; background: var(--kite); transform: rotate(45deg); border-radius: 2px; }
.mistakes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin-top: 1rem; }
@media (max-width: 760px) { .mistakes { grid-template-columns: 1fr; } }
.mk { background: #fff; border: 1px solid var(--hp-line); border-radius: 14px; padding: 1rem 1.1rem; }
.mk h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.25; }
.mk p { margin: .4rem 0 0; font-size: .93rem; color: var(--hp-soft); }

/* ---- 001 DEC-14: the About page's facts list (label | answer; stacked on phones) ---- */
.facts { margin: 1rem 0 0; display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; max-width: 880px;
  background: #fff; border: 1px solid var(--hp-line); border-radius: 14px; overflow: hidden; }
.facts dt, .facts dd { margin: 0; padding: .8rem 1.1rem; border-top: 1px solid var(--hp-line); }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top: 0; }
.facts dt { font-weight: 600; color: var(--hp-ink); background: #F7FBFF; }
.facts dd { color: var(--hp-soft); }
.facts a { color: var(--hp-blue-ink); }
@media (max-width: 600px) {
  .facts { grid-template-columns: 1fr; }
  .facts dd { border-top: 0; padding-top: 0; background: #F7FBFF; }
  .facts dt { padding-bottom: .2rem; }
}

/* ---- the teacher band ---- */
.cta { margin-top: 2.4rem; background: linear-gradient(135deg, #1A6FE0, #135BC0); color: #fff; }
.cta-in { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: center; justify-content: space-between; padding: 2rem 0; }
.cta h2 { color: #fff; font-size: clamp(1.45rem, 3vw, 1.9rem); font-weight: 800; }
.cta p { margin: .4rem 0 0; max-width: 58ch; color: #E4F2FF; }
.cta-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.cta .btn-primary { background: #fff; color: var(--hp-blue-ink); border-color: #fff; box-shadow: none; }
.cta .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }

/* ---- chapter and class lists ---- */
.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; margin: 1rem 0 2.4rem; }
.chcard { display: grid; gap: .15rem; align-content: start; text-decoration: none; background: #fff; border: 1px solid var(--hp-line); border-radius: 14px; padding: .85rem 1rem; }
.chcard:hover { border-color: var(--hp-blue); }
.chno { font-size: .78rem; font-weight: 600; color: var(--kite-ink); }
.chname { font-family: "Baloo 2", sans-serif; font-weight: 700; font-size: 1.12rem; line-height: 1.2; }
.chmeta { font-size: .84rem; color: var(--hp-quiet); }
.clrow { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 2rem; }
.clchip { display: grid; text-decoration: none; padding: .55rem .9rem; border-radius: 12px; background: #fff; border: 1px solid var(--hp-line); }
.clchip b { font-family: "Baloo 2", sans-serif; font-size: 1.05rem; }
.clchip span { font-size: .78rem; color: var(--hp-quiet); }
.clchip[aria-current="page"] { border: 2px solid var(--hp-blue); }

/* 001 DEC-15: the free worksheet card (picture of page 1 | what it is, Download, where to get the book) */
.ws-card { display: grid; grid-template-columns: 150px 1fr; gap: 1.4rem; align-items: center; max-width: 880px;
  background: #fff; border: 1px solid var(--hp-line); border-radius: var(--hp-radius); padding: 1.2rem 1.4rem;
  box-shadow: var(--hp-shadow); }
.ws-thumb { display: block; border: 1px solid var(--hp-line); border-radius: 6px; overflow: hidden; background: #fff;
  box-shadow: 0 2px 6px rgba(20,48,90,.10); }
.ws-thumb img { display: block; width: 100%; height: auto; }
.ws-what { margin: 0 0 .35rem; font-weight: 600; color: var(--hp-ink); }
.ws-body p { margin: 0 0 .8rem; color: var(--hp-soft); }
.ws-body .btn { margin: .1rem 0 .9rem; }
.ws-body p.ws-book { margin: 0; font-size: .93rem; }
@media (max-width: 600px) {
  .ws-card { grid-template-columns: 92px 1fr; gap: .9rem; padding: 1rem; }
  .ws-body .btn { display: block; text-align: center; }
}

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }
