/* ---------- maths, and the other schema-v2 blocks ----------
   The chain reads top to bottom as: what we are after, in words; what each
   symbol is in the world; then the steps, one at a time. Section 5b puts
   why_physical above the algebra deliberately -- the event comes first and the
   notation is the shorthand for it, never the other way round. */

.b-math{border:.5px solid var(--panel-line);border-radius:14px;
  padding:16px 18px 14px;background:var(--reveal-bg)}
.b-math .m-goal{font-family:'Fraunces',Georgia,serif;font-size:16.5px;
  font-weight:500;line-height:1.45;color:var(--tx);margin-bottom:9px}
.b-math .m-plain{font-size:14.8px;line-height:1.62;color:var(--tx-2);margin-bottom:14px}
.b-math .m-lbl{font-size:10px;letter-spacing:.13em;text-transform:uppercase;
  font-weight:600;color:var(--tx-3);margin-bottom:8px}

.m-quants{border-top:.5px solid var(--rule);padding-top:12px;margin-bottom:6px}
.qrow{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:baseline;
  padding:5px 0}
.qsym{color:var(--accent);font-size:15px;min-width:34px}
.qis{font-size:14.2px;line-height:1.55;color:var(--tx-2)}

/* Steps exist in the DOM from the start and are revealed by height, so the
   panel does not jump under the reader as they advance. */
.step{max-height:0;opacity:0;overflow:hidden;
  transition:max-height .5s cubic-bezier(.32,.72,0,1),opacity .4s ease,margin .5s}
.step.on{max-height:900px;opacity:1;margin:14px 0 0}
.step+.step.on{border-top:.5px solid var(--rule);padding-top:13px}
.st-say{font-size:14.6px;font-weight:500;color:var(--tx);margin-bottom:6px}
.st-phys{font-size:14.4px;line-height:1.6;color:var(--tx-2);margin-bottom:9px}
.st-expr{margin:4px 0 9px;overflow-x:auto;overflow-y:hidden;padding:2px 0}
.st-math{font-size:13.2px;line-height:1.55;color:var(--tx-3);font-style:italic}

.m-btns{display:flex;gap:9px;margin-top:14px}
.m-btns button{font-family:inherit;font-size:12.5px;font-weight:500;
  padding:7px 15px;border-radius:999px;cursor:pointer;
  border:.5px solid var(--chip-line);background:var(--chip);color:var(--tx-2);
  transition:background .25s,color .25s,transform .2s}
.m-btns button:hover{background:var(--hover);color:var(--tx);transform:translateY(-1px)}

.m-result{margin-top:16px;border-top:.5px solid var(--rule);padding-top:12px}
.m-result .katex-display{margin:0}
.m-reading{margin-top:12px;font-size:14.6px;line-height:1.64;color:var(--tx-2);
  border-left:1.5px solid var(--accent);padding-left:13px}

/* KaTeX inherits the panel's colour rather than shipping its own black. */
.katex{color:inherit;font-size:1.03em}
.katex-display{margin:.35em 0;overflow-x:auto;overflow-y:hidden}
.tex-raw{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12.6px;
  background:var(--chip);border:.5px solid var(--caution-line);
  border-radius:5px;padding:1px 5px;color:var(--caution-ic)}

/* A long expression or a wide reference table gets its own horizontal
   scrollbar (.st-expr, .katex-display, .b-table all set overflow-x:auto), and
   without this they fell back to the browser's bare default -- a grey bar with
   no relation to either theme, sitting in the middle of an otherwise themed
   panel. Same treatment as the panel's own scrollbar, just on the other axis. */
.st-expr::-webkit-scrollbar,.katex-display::-webkit-scrollbar,
.b-table::-webkit-scrollbar{height:5px}
.st-expr::-webkit-scrollbar-track,.katex-display::-webkit-scrollbar-track,
.b-table::-webkit-scrollbar-track{background:transparent}
.st-expr::-webkit-scrollbar-thumb,.katex-display::-webkit-scrollbar-thumb,
.b-table::-webkit-scrollbar-thumb{background:var(--chip-line);border-radius:4px}
.st-expr,.katex-display,.b-table{
  scrollbar-width:thin;scrollbar-color:var(--chip-line) transparent}

/* ---------- analogy ----------
   The lesson is mandatory in the schema, so it is styled as the payload and the
   comparison as the setup, not the reverse. */
.b-analogy{border:.5px solid var(--anchor-line);background:var(--anchor-bg);
  border-radius:13px;padding:15px 17px}
.b-analogy .an-head{font-size:11px;letter-spacing:.1em;text-transform:uppercase;
  font-weight:600;color:var(--tx-3);margin-bottom:8px}
.b-analogy .an-body{font-size:15px;line-height:1.62;color:var(--tx-2)}
.b-analogy .an-mech{font-size:14.3px;line-height:1.58;color:var(--tx-2);margin-top:9px}
.b-analogy .an-lesson{font-size:14.6px;line-height:1.58;color:var(--tx);
  font-weight:500;margin-top:10px;border-left:1.5px solid var(--accent);padding-left:12px}

.b-aside{font-size:13.8px;line-height:1.6;color:var(--tx-3);font-style:italic;
  padding-left:14px;border-left:1px dashed var(--rule)}
.b-mathref{font-size:13.8px;line-height:1.6;color:var(--tx-3);
  padding-left:14px;border-left:1px solid var(--rule)}

.b-figure img{max-width:100%;border-radius:8px;display:block}
.b-figure .fg-cap{font-size:13.4px;color:var(--tx-3);margin-top:7px;line-height:1.55}
.b-figure .fg-warn{font-size:12.6px;color:var(--caution-ic);margin-top:6px}

.b-symbols table.syms,.b-table table.ref{width:100%;border-collapse:collapse;
  font-size:14px}
.b-symbols td,.b-table td,.b-table th{border-bottom:.5px solid var(--rule);
  padding:7px 9px;text-align:left;vertical-align:top;color:var(--tx-2)}
.b-table th{font-size:11px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--tx-3);font-weight:600}
.sy-dom{color:var(--tx-3);font-size:12.5px;white-space:nowrap}
.b-table{overflow-x:auto}
.tb-cap{font-size:13.4px;color:var(--tx-3);margin-bottom:8px}
.tb-rule{font-size:13.6px;color:var(--tx-2);margin-top:9px;
  border-left:1.5px solid var(--accent);padding-left:12px}

.b-problem{border:.5px solid var(--q-line);border-radius:13px;padding:15px 17px}
.b-problem .p-head{font-size:11px;letter-spacing:.1em;text-transform:uppercase;
  font-weight:600;color:var(--tx-3);margin-bottom:8px}
.b-problem .p-prompt{font-size:15px;line-height:1.62;color:var(--tx)}
.b-problem .p-tests{font-size:13px;color:var(--tx-3);margin-top:9px}

/* A link to a node nobody has written yet. It stays visible, because the gap is
   information -- it is the graph telling you what to build next -- but it must
   not look clickable. */
.wl.dead{border-bottom:1px dashed var(--tx-3);color:var(--tx-3);cursor:default}
