/* site/public/lib/learn.css: the explainer pages under /learn (feat/explainer-market-regime, 2026-10-02; the rules
   were /learn/risk-on-vs-risk-off's own until there was a second page). Each page keeps its page frame inline (fonts,
   the grid texture, main's column: site/test/header.test.mjs reads main there); everything an explainer adds to that
   frame is here, once. Colours: tokens.css only. Linked after lib/range-chart.css, which draws the chart itself. */

/* The title block, the answer-first pattern (/returns' rules): the title, ONE answer sentence, then the chart. */
.hist-head { margin: 36px 0 18px; }
.page-title {
  padding-left: 16px; border-left: 3px solid var(--green);
  font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.02em; line-height: 1.1; color: var(--text);
}
.stock-answer { margin-top: 12px; padding-left: 19px; max-width: 70ch; font-family: 'Inter Tight', sans-serif; font-size: 16px; line-height: 1.55; color: var(--text2); }
.stock-answer strong { color: var(--text); font-weight: 600; }
.stock-answer .regime-word { font-weight: 600; }

/* The S&P 500 chart: its frame here; the chart itself (rows, bars, tags, legend) is lib/range-chart.css.
   Every mono line above the fold carries its own line-height: with line-height normal its height follows the
   font's metrics, so the web font swapping in moved the chart a few pixels (CLS 0.007 at 1280px, measured). */
.section-label {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 400; letter-spacing: 0.22em; line-height: 1.4;
  color: var(--text2); text-transform: uppercase; margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px;
}
.section-label::before { content: ''; display: inline-block; flex: 0 0 auto; width: 4px; height: 4px; background: var(--section-dot); border-radius: 50%; }
.lrn-figure { margin-top: 10px; scroll-margin-top: calc(var(--hdr-offset, 0px) + 16px); }
.lrn-figure .range-legend { margin: 0 0 12px; line-height: 1.4; }
/* The chart slot's one line when the figures did not arrive: a pointer to /returns, never an error. */
.lrn-pending { padding: 16px 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg2); font-size: 15px; line-height: 1.6; color: var(--text2); }
.lrn-pending a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.lrn-pending a:hover, .lrn-pending a:focus-visible { color: var(--green); }

/* The explainer's prose: the comparison page's article rules. */
.lrn h2 {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: 0.16em; line-height: 1.4;
  text-transform: uppercase; color: var(--text); margin: 38px 0 12px;
}
.lrn h3 { font-family: 'Inter Tight', sans-serif; font-size: 15px; font-weight: 600; color: var(--text); margin: 18px 0 6px; }
.lrn p { font-size: 15px; line-height: 1.65; color: var(--text2); margin-bottom: 12px; max-width: 68ch; }
.lrn ul { margin: 0 0 12px; padding: 0 0 0 20px; max-width: 68ch; }
.lrn li { font-size: 15px; line-height: 1.6; color: var(--text2); margin-bottom: 8px; }
.lrn a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.lrn a:hover, .lrn a:focus-visible { color: var(--green); }
.lrn strong { color: var(--text); font-weight: 600; }
.lrn .regime-word { font-weight: 600; }
.lrn .signals li { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--text); }
.lrn .signals li span { color: var(--text3); }
/* The five regimes: the name in its own colour (lib/range-chart.css .b-*), then its one-line definition. */
.lrn .regimes { list-style: none; padding: 0; }
.lrn .regimes li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 4px 16px; padding: 8px 0; margin: 0; border-top: 1px solid var(--border); }
.lrn .regimes .regime-name { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; line-height: 1.6; padding-top: 2px; }

@media (max-width: 600px) {
  .hist-head { margin-bottom: 14px; }
  .section-label { font-size: 11px; letter-spacing: 0.14em; }
  .lrn .regimes li { grid-template-columns: 1fr; }
}
