/* Shrutam chapter notes — Lokmat Editorial typography (variant A pick 2026-06-03).
   Reading body = Tiro Devanagari Marathi serif. Headings = Mukta sans.
   Scoped to .notes-wrap + .tab-panel.notes-panel + .note-* classes. */

/* Standalone notes page container (older /notes/ URL).
   For the unified /study/ chapter pages, .ch-wrap drives the typography
   tokens and the notes panel inherits via .tab-panel scope below. */
.notes-wrap {
  --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;
  --sh-body-color:    #E9ECF1;
  --sh-heading-color: #FFFFFF;
  --sh-card-bg:       #1a2433;
  --sh-soft-border:   rgba(255,255,255,.06);
  --sh-mark-bg:       rgba(245,176,67,.18);

  max-width: 880px;
  margin: 1.5rem auto 4rem;
  padding: 0 1rem;
  color: var(--sh-body-color);
  font-family: var(--sh-body-stack);
  font-size: 1.125rem;
  line-height: 1.7;
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.notes-bc {
  color: #cbd5e1;
  font-family: var(--sh-heading-stack, "Mukta", system-ui, sans-serif);
  font-size: .92rem;
  margin-bottom: 1rem;
  letter-spacing: 0;
}
.notes-bc a { color: inherit; text-decoration: none; }
.notes-bc a:hover { text-decoration: underline; }


/* ─── Standalone-notes hero (matches chapter hero) ─────────────── */
.notes-head {
  background: linear-gradient(160deg, #1a2433 60%, #1f2a3d 100%);
  border: 1px solid var(--sh-soft-border, rgba(255,255,255,.06));
  border-radius: 22px;
  padding: 1.8rem 1.6rem;
  margin-bottom: 1.5rem;
}
.notes-head .num {
  color: var(--accent);
  font-family: var(--sh-heading-stack, "Mukta", system-ui, sans-serif);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
  margin-bottom: .5rem;
}
.notes-head h1 {
  font-family: var(--sh-heading-stack, "Mukta", system-ui, sans-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 1rem;
  color: #FFFFFF;
  letter-spacing: 0;
}
.notes-head .head-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.notes-head .btn-primary,
.notes-head .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .6rem 1.2rem;
  border-radius: 999px;
  font-family: var(--sh-heading-stack, "Mukta", system-ui, sans-serif);
  font-weight: 700; font-size: 1rem; text-decoration: none;
  letter-spacing: 0;
}
.notes-head .btn-primary { background: var(--accent); color: var(--accent-on, #0f172a); }
.notes-head .btn-ghost {
  background: transparent; color: #E9ECF1;
  border: 1px solid rgba(255,255,255,.15);
}


/* ─── Topic sections (works for BOTH /notes/ + /study/ tab) ───── */
.note-topic { margin-top: 2.75rem; }
.note-topic h2 {
  font-family: var(--sh-heading-stack, "Mukta", "Noto Sans Devanagari", system-ui, sans-serif);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: #FFFFFF;
  letter-spacing: 0;
}
.note-topic h3 {
  font-family: var(--sh-heading-stack, "Mukta", "Noto Sans Devanagari", system-ui, sans-serif);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 1.8rem 0 .6rem;
  color: #FFFFFF;
  letter-spacing: 0;
}


/* ─── Body text ───────────────────────────────────────────────── */
.note-body {
  color: #E9ECF1;
  font-family: var(--sh-body-stack, "Tiro Devanagari Marathi", "Tiro Telugu",
                                    "Noto Serif Devanagari", Georgia, serif);
  font-size: 1.125rem;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0;
}
.note-body p {
  margin: .95rem 0;
  color: #E9ECF1;
  line-height: 1.7;
}
.note-body strong, .note-body b { color: #FFFFFF; font-weight: 700; }
.note-body em, .note-body i { font-style: italic; }
.note-body mark {
  background: var(--sh-mark-bg, rgba(245,176,67,.18));
  color: #F5B043;
  padding: 0 .25em;
  border-radius: 3px;
  font-weight: 600;
}
.note-body code {
  background: rgba(255,255,255,.06);
  padding: .12em .35em;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .92em;
  color: #FFFFFF;
}

/* Inline markdown headings produced by render_md_block */
.note-body .md-h1, .note-body .md-h2,
.note-body .md-h3, .note-body .md-h4 {
  font-family: var(--sh-heading-stack, "Mukta", "Noto Sans Devanagari", system-ui, sans-serif);
  color: #FFFFFF;
  margin: 1.7rem 0 .55rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}
.note-body .md-h1 { font-size: 1.25rem; }
.note-body .md-h2 { font-size: 1.18rem; }
.note-body .md-h3 { font-size: 1.12rem; }
.note-body .md-h4 { font-size: 1.05rem; }


/* ─── Lists with hanging indent + colored markers ─────────────── */
.note-body ul, .note-body ol {
  margin: .95rem 0;
  padding-left: 1.5rem;
}
.note-body ul li, .note-body ol li {
  margin: .5rem 0;
  padding-left: .25rem;
  line-height: 1.7;
}
.note-body ul li::marker { color: var(--accent); }
.note-body ol li::marker { color: var(--accent); font-weight: 700; }
.note-body ul ul, .note-body ol ol,
.note-body ul ol, .note-body ol ul { margin: .4rem 0; }


/* ─── Overview card (chapter intro) ───────────────────────────── */
.note-overview {
  background: #1a2433;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.75rem;
}
.note-overview h2 {
  font-family: var(--sh-heading-stack, "Mukta", system-ui, sans-serif);
  margin: 0 0 .6rem;
  font-size: 1.25rem;
  color: #FFFFFF;
  font-weight: 700;
  letter-spacing: 0;
}
.note-overview p {
  color: #E9ECF1;
  margin: .55rem 0;
  line-height: 1.7;
  font-size: 1.125rem;
}


/* ─── Visual aids ─────────────────────────────────────────────── */
.note-fig {
  margin: 1.25rem 0;
  background: #1a2433;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
}
.note-fig img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16/9; object-fit: contain; padding: .5rem;
}
.note-fig figcaption {
  text-align: center; padding: .7rem .9rem;
  font-family: var(--sh-heading-stack, "Mukta", system-ui, sans-serif);
  font-size: .95rem; color: #cbd5e1;
  border-top: 1px solid rgba(255,255,255,.06);
}


/* ─── Callouts (definition / example / important_fact / etc.) ── */
.callout {
  margin: 1.4rem 0;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: #1f2a3d;
  border-left: 4px solid var(--accent);
}
.callout-head {
  display: flex; gap: .55rem; align-items: center;
  margin-bottom: .6rem;
  font-family: var(--sh-heading-stack, "Mukta", system-ui, sans-serif);
  font-weight: 700; font-size: .98rem;
  letter-spacing: 0;
  color: var(--accent);
}
.callout-icon { font-size: 1.18rem; }
.callout-body {
  color: #E9ECF1;
  line-height: 1.7;
  font-family: var(--sh-body-stack, "Tiro Devanagari Marathi", "Tiro Telugu",
                                    "Noto Serif Devanagari", Georgia, serif);
}
.callout-body p { margin: .45rem 0; line-height: 1.7; }
.callout-body p:first-child { margin-top: 0; }
.callout-body p:last-child  { margin-bottom: 0; }
.callout-body strong, .callout-body b { color: #FFFFFF; font-weight: 700; }
.callout-body ul, .callout-body ol { margin: .55rem 0; padding-left: 1.4rem; }
.callout-body li { margin: .35rem 0; padding-left: .2rem; line-height: 1.7; }

/* Type-specific accent colors */
.callout-definition { border-left-color: #60a5fa; background: color-mix(in srgb, #60a5fa 10%, #1f2a3d); }
.callout-definition .callout-head { color: #93c5fd; }
.callout-example    { border-left-color: #34d399; background: color-mix(in srgb, #34d399 10%, #1f2a3d); }
.callout-example .callout-head    { color: #6ee7b7; }
.callout-exam_tip   { border-left-color: #34d399; background: color-mix(in srgb, #34d399 10%, #1f2a3d); }
.callout-exam_tip .callout-head   { color: #6ee7b7; }
.callout-formula    { border-left-color: #fbbf24; background: color-mix(in srgb, #fbbf24 10%, #1f2a3d); }
.callout-formula .callout-head    { color: #fcd34d; }
.callout-theorem    { border-left-color: #c084fc; background: color-mix(in srgb, #c084fc 10%, #1f2a3d); }
.callout-theorem .callout-head    { color: #d8b4fe; }
.callout-warning    { border-left-color: #f87171; background: color-mix(in srgb, #f87171 10%, #1f2a3d); }
.callout-warning .callout-head    { color: #fca5a5; }
.callout-misconception      { border-left-color: #f87171; background: color-mix(in srgb, #f87171 10%, #1f2a3d); }
.callout-misconception .callout-head      { color: #fca5a5; }
.callout-common_mistake     { border-left-color: #f87171; background: color-mix(in srgb, #f87171 10%, #1f2a3d); }
.callout-common_mistake .callout-head     { color: #fca5a5; }
.callout-remember           { border-left-color: #60a5fa; background: color-mix(in srgb, #60a5fa 10%, #1f2a3d); }
.callout-remember .callout-head           { color: #93c5fd; }
.callout-remember_this      { border-left-color: #60a5fa; background: color-mix(in srgb, #60a5fa 10%, #1f2a3d); }
.callout-remember_this .callout-head      { color: #93c5fd; }
.callout-important_fact     { border-left-color: #fbbf24; background: color-mix(in srgb, #fbbf24 10%, #1f2a3d); }
.callout-important_fact .callout-head     { color: #fcd34d; }
.callout-key_point          { border-left-color: #fde047; background: color-mix(in srgb, #fde047 10%, #1f2a3d); }
.callout-key_point .callout-head          { color: #fef08a; }


/* ─── Footer CTA ──────────────────────────────────────────────── */
.notes-foot {
  margin-top: 3rem;
  padding-top: 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.06);
}
.notes-foot .btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.75rem;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-on, #0f172a);
  font-family: var(--sh-heading-stack, "Mukta", system-ui, sans-serif);
  font-weight: 700; font-size: 1.1rem;
  letter-spacing: 0; text-decoration: none;
}
