/* ============================================================
   Course lesson = ARTICLE format: one continuous vertical column,
   no dashboard boxes. Linked ONLY on lesson content pages, after the
   page's inline <style>, so these win. Dashboard and intro pages keep
   their cards and do NOT link this file.
   ============================================================ */

/* reading column, centered inside the course: page ~820px, text ~680px */
.content { max-width: 820px; margin-left: auto; margin-right: auto; }

/* flatten section cards into plain article sections */
.block {
  background: none !important; border: none !important; border-radius: 0 !important;
  box-shadow: none !important; padding: 0 !important; margin: 0 0 30px !important;
}
.block__head { margin-bottom: 12px !important; }
.block__eyebrow { font-size: 11px; letter-spacing: 0.08em; }
.block__title { font-size: 21px; line-height: 1.3; }
.block__sub { font-size: 14.5px; max-width: 680px; }

/* prose: a touch larger, comfortable measure */
.prose { font-size: 15.5px; line-height: 1.75; max-width: 680px; }
.prose + .prose { margin-top: 14px; }

/* charts as inline figures, no frame; always fit the column width */
.chartwrap { margin: 16px 0 6px !important; }
.chartbox { border: none !important; background: none !important; padding: 0 !important; max-width: 100%; }
.chartbox canvas { max-width: 100% !important; }
.chartcap { text-align: left; }

/* data tables: fit fully inside the column (no horizontal scroll), even if small */
.tablewrap { border-radius: 10px; overflow-x: visible; }
.ftable { min-width: 0 !important; width: 100% !important; font-size: 12px !important; }
.ftable thead th, .ftable tbody td { padding: 8px 7px !important; white-space: normal !important; }
.ftable tbody td:not(:first-child) { white-space: nowrap !important; }
.ftable tbody td { font-variant-numeric: tabular-nums; }
.ftable tbody td:first-child { min-width: 110px; }
@media (max-width: 600px) {
  .ftable { font-size: 9.5px !important; }
  .ftable thead th, .ftable tbody td { padding: 5px 4px !important; }
  .ftable tbody td:first-child { min-width: 78px; }
}

/* fund / metric highlight -> article passage with an inline stat line */
.fund, .fund--best {
  background: none !important; border: none !important; box-shadow: none !important;
  border-radius: 0 !important; padding: 22px 0 4px !important; margin-top: 0 !important;
  border-top: 1px solid var(--bg-border) !important;
}
.fund__tag { background: none !important; color: var(--accent-text) !important; padding: 0 !important; margin-bottom: 6px !important; font-size: 11px; }
.fund__title { font-size: 19px; margin-bottom: 10px; }
.mstrip { display: flex !important; flex-wrap: wrap; gap: 4px 18px !important; background: none; margin: 0 0 14px !important; }
.mstat { display: inline-flex !important; align-items: baseline; gap: 5px; background: none !important; border: none !important; padding: 0 !important; border-radius: 0 !important; }
.mstat__k { font-size: 11px; }
.mstat__v { font-size: 13.5px; margin-top: 0 !important; }

/* summary blocks (two-up) -> stacked, no boxes */
.summary-grid { display: block !important; }
.note-box { background: none !important; border: none !important; border-radius: 0 !important; padding: 14px 0 0 !important; }
.note-box + .note-box { border-top: 1px solid var(--bg-border); margin-top: 10px; }

/* equity-funds fund cards -> article passages with an inline stat line */
.fundcard {
  background: none !important; border: none !important; box-shadow: none !important;
  border-radius: 0 !important; padding: 22px 0 6px !important; margin: 0 !important;
  border-top: 1px solid var(--bg-border) !important;
}
.fundcard__name { font-size: 18px; }
.fundcard__stats { display: flex !important; flex-wrap: wrap; gap: 6px 18px !important; margin-top: 12px !important; }
.fstat {
  background: none !important; border: none !important; border-radius: 0 !important;
  padding: 0 !important; display: inline-flex !important; align-items: baseline; gap: 5px;
}
.fstat__k { margin-bottom: 0 !important; }

/* custom-layout lessons (Introduction / System) already use .lh2 + .lbody:
   no boxes to flatten, the centered .content above is enough. */

@media (max-width: 560px) {
  .block__title { font-size: 19px; }
}

/* ------------------------------------------------------------
   Article prose rhythm. Lives here so every lesson that links
   this file reads with proper spacing, regardless of which
   template its static shell was cloned from.
   ------------------------------------------------------------ */
.lbody { max-width: 680px; }
.llede { font-size: 17px; line-height: 1.7; color: var(--text-primary); font-weight: 600; margin-bottom: 22px; }
.lbody > p { font-size: 15px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 11px; }
.lbody > p:last-child { margin-bottom: 0; }
.lbody > p strong { color: var(--text-primary); font-weight: 700; }
.lsub { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 20px 0 6px; }
.lh2 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; color: var(--text-primary); margin: 36px 0 14px; padding-left: 14px; border-left: 3px solid var(--accent); }
.lcallout { background: var(--accent-bg); border: 1px solid #E4D3EF; border-radius: 14px; padding: 20px 22px; margin: 24px 0; }
.lcallout__title { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }
.lcallout p { font-size: 14px; margin: 0; color: var(--text-secondary); line-height: 1.78; }
.lcallout p + p { margin-top: 11px; }
/* Neat bullets (site standard): solid dot, hanging indent, vertically centred on the first line. */
.alist { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.alist li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--text-secondary); line-height: 1.65; }
.alist li::before { content: ""; position: absolute; left: 2px; top: calc(0.825em - 3.5px); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.alist li strong { color: var(--text-primary); }
.chartwrap { margin: 26px 0; }

/* Neat term/definition list (glossaries, roadmaps, labelled points). Term on its
   own line, definition below, hairline-separated. No ring bullets. Use this for
   any labelled list in a lesson instead of .alist. */
.lgloss { margin: 18px 0; }
.lgloss__row { padding: 13px 0; border-top: 1px solid var(--bg-border); }
.lgloss__row:first-child { border-top: none; padding-top: 2px; }
.lgloss__t { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.lgloss__d { font-size: 15px; line-height: 1.7; color: var(--text-secondary); margin: 0; }
.lgloss__d strong { color: var(--text-primary); font-weight: 700; }

/* Formula display block: a clean centred equation set off from the prose. */
.lformula { margin: 20px 0; padding: 18px 20px; background: var(--bg-surface); border: 1px solid var(--bg-border); border-radius: 12px; text-align: center; }
.lformula__eq { font-size: 17px; font-weight: 700; color: var(--text-primary); line-height: 1.5; }
.lformula__eq em { color: var(--accent-text); font-style: normal; }
.lformula__note { font-size: 13px; color: var(--text-tertiary); margin-top: 8px; }

/* Alert callout (amber): the deck's "Alert" lines, a thing to watch / a trap. */
.lcallout--alert { background: #FEF6E7; border-color: #F6D88A; }
.lcallout--alert .lcallout__title { color: #92600A; }

/* Worked example callout (neutral): a step-by-step calculation set off from prose. */
.lcallout--worked { background: #fff; border-color: var(--bg-border); }
.lcallout--worked .lcallout__title { color: var(--accent-text); }

/* ===== video (responsive 16:9), English + Tamil group ===== */
.lvideos { display: flex; flex-direction: column; gap: 18px; margin: 0 0 26px; }
.lvideo { position: relative; padding-bottom: 56.25%; height: 0; border: 1px solid var(--bg-border); border-radius: 14px; overflow: hidden; background: #000; }
.lvideo iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.lvideo[data-lvideo] { position: static; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.lvid__label { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 8px; }
.lvid__label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ===== gated AlgoTest download card ===== */
.dlcard { margin: 28px 0; border: 1px solid #E4D3EF; border-radius: 16px; padding: 22px 24px; background: linear-gradient(120deg, #F9F5FC, #F4ECFA); }
.dlcard__title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.dlcard p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin: 0 0 16px; }
.dlcard__btn { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14.5px; color: #fff; background: var(--accent); border: 1.5px solid var(--accent); border-radius: 50px; padding: 11px 22px; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.dlcard__btn:hover { background: #6D3187; border-color: #6D3187; }
.dlcard__steps { margin-top: 18px; }
.dlcard__steps figure { margin: 12px 0 0; border: 1px solid var(--bg-border); border-radius: 12px; overflow: hidden; background: #fff; }
.dlcard__steps img { width: 100%; height: auto; display: block; }
.dlcard__steps figcaption { font-size: 12.5px; color: var(--text-tertiary); padding: 10px 14px; line-height: 1.55; }
.algtst-data { display: none; }

/* ── Lesson figure animation helpers (scroll-triggered via lessonfx.js) ───────
   Elements are fully visible by default; animations apply only when an ancestor
   stage has .fzplay, so no-JS / reduced-motion readers see the finished chart. */
@keyframes fzfade { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fzrise { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes fzgrowx { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
@keyframes fzgrowy { 0% { transform: scaleY(0); } 100% { transform: scaleY(1); } }
.fz-fade, .fz-gx, .fz-gy, .fz-rise { } /* visible by default */
.fz-gx { transform-box: fill-box; transform-origin: left center; }
.fz-gy { transform-box: fill-box; transform-origin: center bottom; }
.fz-rise { transform-box: fill-box; }
.fzplay .fz-fade { animation: fzfade .8s ease-out both; }
.fzplay .fz-rise { animation: fzrise .8s ease-out both; }
.fzplay .fz-gx  { animation: fzgrowx .9s cubic-bezier(.4,0,.2,1) both; }
.fzplay .fz-gy  { animation: fzgrowy .9s cubic-bezier(.4,0,.2,1) both; }
.fzplay .fz-d1 { animation-delay: .12s; }
.fzplay .fz-d2 { animation-delay: .26s; }
.fzplay .fz-d3 { animation-delay: .40s; }
.fzplay .fz-d4 { animation-delay: .54s; }
.fzplay .fz-d5 { animation-delay: .68s; }
@media (prefers-reduced-motion: reduce) {
  .fzplay .fz-fade, .fzplay .fz-rise, .fzplay .fz-gx, .fzplay .fz-gy { animation: none !important; }
}

/* ===== positioning course: consistent lesson header + back nav ===== */
.lesson-head { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--bg-border); }
.lesson-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-tertiary); text-decoration: none; margin-bottom: 16px; }
.lesson-back:hover { color: var(--accent-text); }
.lesson-back svg { width: 15px; height: 15px; }
.lesson-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.lesson-title { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; color: var(--text-primary); }
.pager-back { margin-top: 18px; text-align: center; }
.pager-back a { font-size: 13px; font-weight: 600; color: var(--text-tertiary); text-decoration: none; }
.pager-back a:hover { color: var(--accent-text); }
@media (max-width: 560px) { .lesson-title { font-size: 23px; } }
