/* Shrutam unified chapter page — Lokmat Editorial typography (variant A
   pick 2026-06-03). Scoped to .ch-wrap so it does not bleed into nav/
   homepage. Reading body = Tiro Devanagari Marathi serif; UI chrome
   (buttons, eyebrow, tabs) = Mukta sans. */

/* ─── Typography tokens (scoped) ───────────────────────────────── */
.ch-wrap {
  /* fonts */
  --sh-body-stack: "Tiro Devanagari Marathi", "Tiro Telugu",
                   "Noto Serif Devanagari", Georgia, "Times New Roman", serif;
  --sh-heading-stack: "Mukta", "Baloo Tammudu 2", "Noto Sans Devanagari",
                     "Nunito", system-ui, sans-serif;

  /* scale */
  --sh-body-size:   1.125rem;       /* 18px — min legible Indic */
  --sh-body-lh:     1.7;            /* matras + Telugu loops breathe */
  --sh-body-weight: 400;
  --sh-h1: 2.2rem;
  --sh-h2: 1.55rem;
  --sh-h3: 1.2rem;
  --sh-h-weight: 700;

  /* colors — softer off-whites on softer dark, kills halation */
  --sh-body-color:    #E9ECF1;
  --sh-heading-color: #FFFFFF;
  --sh-card-bg:       #1a2433;
  --sh-card-top:      #1f2a3d;
  --sh-soft-border:   rgba(255,255,255,.06);
  --sh-mark-bg:       rgba(245,176,67,.18);

  max-width: 880px;                 /* wider stage for quiz + notes */
  margin: 1.5rem auto 4rem;
  padding: 0 1rem;
  color: var(--sh-body-color);
  font-family: var(--sh-body-stack);
  font-size: var(--sh-body-size);
  line-height: var(--sh-body-lh);
  font-weight: var(--sh-body-weight);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ─── Breadcrumb ───────────────────────────────────────────────── */
.ch-bc {
  color: #cbd5e1;
  font-family: var(--sh-heading-stack);
  font-size: .92rem;
  margin-bottom: 1rem;
  letter-spacing: 0;
}
.ch-bc a { color: inherit; text-decoration: none; }
.ch-bc a:hover { text-decoration: underline; }

/* ─── Hero card ───────────────────────────────────────────────── */
.ch-hero {
  background: linear-gradient(160deg, var(--sh-card-bg) 60%, var(--sh-card-top) 100%);
  border: 1px solid var(--sh-soft-border);
  border-radius: 22px;
  padding: 1.8rem 1.6rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1.4rem;
  align-items: center;
}
.ch-hero > img {
  flex: 0 0 200px;
  width: 200px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
  background: var(--sh-card-bg);
}
.ch-hero > img[style*="display:none"],
.ch-hero > img[hidden] { display: none !important; }
.ch-hero-body { flex: 1 1 auto; min-width: 0; }
.ch-hero:has(> img[style*="display:none"]) > .ch-hero-body,
.ch-hero:has(> img[hidden]) > .ch-hero-body { flex: 1 1 100%; }

.ch-eyebrow {
  color: var(--accent);
  font-family: var(--sh-heading-stack);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
  margin-bottom: .6rem;
}
.ch-eyebrow:lang(hi), .ch-eyebrow:lang(mr), .ch-eyebrow:lang(te) {
  letter-spacing: 0;
}

.ch-hero h1 {
  font-family: var(--sh-heading-stack);
  font-size: var(--sh-h1);
  font-weight: var(--sh-h-weight);
  line-height: 1.25;
  margin: 0 0 .85rem;
  color: var(--sh-heading-color);
  letter-spacing: 0;
}

.ch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .8rem 0 .9rem;
}
.ch-chip {
  background: rgba(255,255,255,.04);
  color: var(--sh-body-color);
  border: 0;                              /* drop border — softer feel */
  border-radius: 999px;
  padding: .3rem .75rem;
  font-family: var(--sh-body-stack);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: 0;
}

.ch-about {
  color: var(--sh-body-color);
  font-family: var(--sh-body-stack);
  font-size: var(--sh-body-size);
  line-height: var(--sh-body-lh);
  margin: 0;
  letter-spacing: 0;
}

@media (max-width: 600px) {
  .ch-hero { flex-direction: column; align-items: stretch; padding: 1.4rem 1.3rem; }
  .ch-hero > img { flex: none; width: 100%; }
}


/* ─── Tab strip — Mukta UI sans ───────────────────────────────── */
.tab-strip {
  display: flex;
  gap: .4rem;
  background: var(--sh-card-bg);
  border: 1px solid var(--sh-soft-border);
  border-radius: 999px;
  padding: .4rem;
  margin: 0 0 1.5rem;
  position: sticky;
  top: 1rem;
  z-index: 30;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-strip::-webkit-scrollbar { display: none; }

.tab-btn {
  background: transparent;
  color: var(--sh-body-color);
  border: 0;
  border-radius: 999px;
  padding: .65rem 1.25rem;
  font-family: var(--sh-heading-stack);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  letter-spacing: 0;
  transition: background .15s ease, color .15s ease, transform .1s ease;
}
.tab-btn:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tab-btn.active {
  background: var(--accent);
  color: var(--accent-on, #0f172a);
}
.tab-btn:active { transform: scale(.97); }


/* ─── Tab content ─────────────────────────────────────────────── */
.tab-content-wrap { position: relative; }
.tab-content { display: none; animation: tabFade .25s ease both; }
.tab-content.active { display: block; }
@keyframes tabFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .tab-content { animation: none; }
}

/* quiz-app inside tab — kill double zoom + max-width inherits from ch-wrap */
.tab-content .quiz-app {
  animation: none;
  margin-top: 0;
  max-width: 100%;
}
