/* Visual system shared by the IA-DeepLearning decks: a logic notebook.
   Notation carries the design — one warm accent (amber) is reserved for conclusions. */
:root {
    --paper: #f3f5fa;
    --dot: #d3d9ea;
    --ink: #151a33;
    --muted: #5a627f;
    --cobalt: #1f4fd8;
    --amber: #d98e04;
    --wash: #e6ebfa;
    --line: #c9d1e6;
    --white: #ffffff;
    --code: #151a33;
    --code-key: #9fe0c8;
    --code-str: #ffd68a;
    --code-cmt: #8c94ad;
    --sans: "Instrument Sans", "Segoe UI", system-ui, Arial, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
    --fs: clamp(17px, 1.65vw, 26px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--fs); line-height: 1.4; }
a { color: var(--cobalt); text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
img { max-width: 100%; }

/* ---- deck chrome ---- */
.bar { position: sticky; top: 0; z-index: 5; height: 46px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 20px; font-size: 13px; background: var(--paper); border-bottom: 1px solid var(--line); }
.bar b { font-weight: 600; }
.bar a { text-decoration: none; }
.bar .keys { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.bar button { font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 5px; padding: 5px 10px; cursor: pointer; }
.bar button[aria-pressed=true] { background: var(--cobalt); color: var(--white); border-color: var(--cobalt); }
.skip { position: fixed; left: 10px; top: -100px; z-index: 20; background: var(--white); padding: 10px; }
.skip:focus { top: 8px; }

/* ---- slide skeleton: rail + stage ---- */
.slide { display: grid; grid-template-columns: 180px 1fr; min-height: calc(100vh - 46px); border-bottom: 1px solid var(--line); background: var(--paper); }
.presenting .slide { display: none; }
.presenting .slide.active { display: grid; }
.rail { padding: 36px 0 24px 22px; border-right: 1px solid var(--line); font-size: 13px; display: flex; flex-direction: column; gap: 18px; background: var(--paper); }
.rail .course { font-family: var(--mono); color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.rail a { display: block; color: var(--muted); text-decoration: none; line-height: 1.25; padding-left: 12px; border-left: 2px solid transparent; }
.rail a b { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .06em; }
.rail a[aria-current] { color: var(--ink); font-weight: 600; border-left-color: var(--cobalt); }
.rail .pos { margin-top: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.stage { padding: 32px 5vw 20px 4vw; display: flex; flex-direction: column; min-width: 0; background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 26px 26px; }
.eyebrow { margin: 0 0 12px; font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); }
.slide h1 { margin: 0 0 18px; font-size: clamp(28px, 3.1vw, 48px); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; max-width: 22ch; }
.visual { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 1360px; width: 100%; }
.visual p { margin: 0; }
.visual h2 { margin: 0; font-size: 1.05em; line-height: 1.15; }
.takeaway { margin: 22px 0 0; padding: 10px 0 10px 20px; border-left: 4px solid var(--amber); font-size: clamp(16px, 1.5vw, 24px); line-height: 1.35; }
.takeaway b { color: var(--amber); font-family: var(--mono); font-weight: 600; font-size: .8em; letter-spacing: .08em; text-transform: uppercase; margin-right: 10px; }
.notes { margin-top: 10px; font-size: 15px; line-height: 1.55; }
.notes summary { font-size: 12px; color: var(--muted); cursor: pointer; width: max-content; font-family: var(--mono); letter-spacing: .06em; }
.notes > div { margin-top: 8px; padding: 16px 22px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; max-width: 78ch; }
.notes ul, .notes ol { margin: 0 0 8px; padding-left: 1.2em; }
.notes p { margin: 0 0 8px; }
.notes h3 { margin: 10px 0 4px; font-size: 1em; }
.notes pre { font-size: 13px; }
.notes code { font-family: var(--mono); font-size: .9em; }
.presenting .notes[open] { position: fixed; right: 18px; top: 56px; bottom: 18px; width: min(600px, 90vw); z-index: 10; background: var(--white); border: 1px solid var(--line); box-shadow: 0 10px 40px #151a3340; border-radius: 8px; padding: 16px; overflow: auto; }
.presenting .notes[open] > div { border: 0; padding: 0; max-width: none; }
.reading .visual { min-height: 380px; }

/* ---- notation ---- */
.m { font-family: var(--mono); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { display: inline-flex; align-items: baseline; gap: 10px; padding: 8px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 4px; font-size: .92em; }
.chip .m { color: var(--cobalt); }
.formula { font-family: var(--mono); font-weight: 600; font-size: clamp(28px, 3.6vw, 56px); letter-spacing: -.02em; line-height: 1.2; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.formula .op { color: var(--cobalt); }
.formula .key { color: var(--amber); }
.formula small { display: block; font-family: var(--sans); font-weight: 400; font-size: .42em; color: var(--muted); margin-top: 10px; letter-spacing: 0; }
.formulas { display: grid; gap: 14px; }
.formulas .row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.formulas .row:first-child { border-top: 1px solid var(--line); }
.formulas .f { font-family: var(--mono); font-weight: 600; font-size: clamp(18px, 2vw, 32px); }
.formulas .f .op { color: var(--cobalt); }
.formulas .f .key { color: var(--amber); }
.formulas .why { font-size: .85em; color: var(--muted); text-align: right; }
.verdicts { display: grid; grid-template-columns: auto 1fr; gap: 10px 28px; align-items: baseline; font-size: .95em; }
.verdicts .m { color: var(--cobalt); }
.verdicts .no { color: var(--muted); }

/* ---- truth table ---- */
.truth { border-collapse: collapse; font-family: var(--mono); font-size: clamp(15px, 1.5vw, 24px); width: 100%; max-width: 1100px; background: var(--white); border: 1px solid var(--line); }
.truth th, .truth td { padding: .45em .6em; text-align: center; border-bottom: 1px solid var(--line); }
.truth th { font-weight: 600; color: var(--cobalt); border-bottom: 2px solid var(--cobalt); }
.truth th small { display: block; font-family: var(--sans); font-weight: 400; font-size: .6em; color: var(--muted); letter-spacing: 0; }
.truth td.v { color: var(--ink); font-weight: 600; }
.truth td.f { color: var(--muted); }
.truth td.in { background: var(--wash); }
.truth th.in { background: var(--wash); color: var(--ink); }

/* ---- code and its output ---- */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center; }
.split.even { grid-template-columns: 1fr 1fr; }
.split.wide { grid-template-columns: 1.7fr 1fr; }
pre { margin: 0; background: var(--code); color: #eef1f7; padding: 22px 24px; border-radius: 8px; font: clamp(13px, 1.15vw, 19px)/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
pre .k { color: var(--code-key); }
pre .s { color: var(--code-str); }
pre .c { color: var(--code-cmt); }
pre.small { font-size: clamp(12px, 1vw, 17px); }
.out { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 20px 24px; font-size: .9em; box-shadow: 6px 6px 0 var(--wash); }
.out .label, .label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.verdict { display: inline-block; font-family: var(--mono); font-weight: 600; padding: 4px 12px; border-radius: 4px; background: var(--amber); color: var(--ink); margin-bottom: 14px; }
.out table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: .85em; }
.out td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.out td:last-child { text-align: right; color: var(--cobalt); }
.out p { margin: 14px 0 0; font-size: .85em; color: var(--muted); }
.out .m { color: var(--cobalt); }
.snips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.snip { display: flex; flex-direction: column; gap: 12px; }
.snip pre { font-size: clamp(12px, 1.05vw, 17px); }
.snip p { font-size: .82em; color: var(--muted); }
.snip .m { color: var(--cobalt); }
.map { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px 20px; align-items: center; }
.map .f { font-family: var(--mono); font-weight: 600; font-size: clamp(15px, 1.45vw, 23px); }
.map .f .op { color: var(--cobalt); }
.map .f .key { color: var(--amber); }
.map .arrow { color: var(--amber); font-family: var(--mono); font-size: 1.3em; }
.map code { font-family: var(--mono); font-size: clamp(13px, 1.15vw, 18px); background: var(--code); color: #eef1f7; padding: 8px 14px; border-radius: 6px; display: block; overflow-wrap: anywhere; }
.map code .k { color: var(--code-key); }

/* ---- flows, cards, ladders ---- */
.flow { display: flex; gap: 0; list-style: none; padding: 0; margin: 0; }
.flow li { flex: 1; min-width: 0; padding: 18px 18px 16px; background: var(--white); border: 1px solid var(--line); border-right: 0; position: relative; display: flex; flex-direction: column; gap: 6px; }
.flow li:last-child { border-right: 1px solid var(--line); }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -10px; top: 14px; z-index: 1; color: var(--amber); font-family: var(--mono); font-weight: 600; background: var(--paper); padding: 0 2px; }
.flow li .m { color: var(--cobalt); font-size: .8em; }
.flow li strong { font-size: 1em; line-height: 1.15; }
.flow li p { font-size: .78em; color: var(--muted); line-height: 1.35; }
.flow li.hot { background: var(--ink); color: var(--white); border-color: var(--ink); }
.flow li.hot p { color: var(--line); }
.flow li.hot .m { color: var(--code-key); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.card p { font-size: .8em; color: var(--muted); }
.card svg { width: 100%; height: auto; display: block; }
.card .tag { font-family: var(--mono); font-size: .68em; color: var(--cobalt); letter-spacing: .06em; }
.card .sym { font-family: var(--mono); font-weight: 600; font-size: 2.2em; line-height: 1; color: var(--cobalt); }
.card.hot .sym { color: var(--amber); }
.card .ex { font-family: var(--mono); font-size: .72em; color: var(--ink); margin-top: auto; }
.ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.ladder .rung { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--cobalt); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 190px; }
.ladder .rung:nth-child(1) { border-top-color: #b8c6f5; }
.ladder .rung:nth-child(2) { border-top-color: #8aa3ee; }
.ladder .rung:nth-child(3) { border-top-color: #5b7fe6; }
.ladder .rung:nth-child(5) { border-top-color: var(--amber); }
.rung strong { font-size: 1.02em; line-height: 1.15; }
.rung p { font-size: .78em; color: var(--muted); line-height: 1.35; }
.rung .ex { margin-top: auto; font-family: var(--mono); font-size: .68em; color: var(--ink); }
.axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); border-top: 1px solid var(--cobalt); padding-top: 8px; }

/* ---- quadrants (two axes) ---- */
.quad { display: grid; grid-template-columns: auto 1fr 1fr; grid-template-rows: auto 1fr 1fr; gap: 10px; }
.quad .ax { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); display: flex; align-items: center; justify-content: center; }
.quad .ax.v { writing-mode: vertical-rl; transform: rotate(180deg); }
.quad .cell { background: var(--white); border: 1px solid var(--line); padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.quad .cell strong { font-size: 1.02em; }
.quad .cell p { font-size: .8em; color: var(--muted); }
.quad .cell .ex { font-family: var(--mono); font-size: .72em; color: var(--ink); margin-top: auto; }

/* ---- matrices, stats, refs, photos ---- */
.matrix { width: 100%; border-collapse: collapse; font-size: .85em; background: var(--white); border: 1px solid var(--line); }
.matrix th { text-align: left; font-family: var(--mono); font-weight: 600; font-size: .8em; letter-spacing: .08em; text-transform: uppercase; color: var(--cobalt); padding: 12px 16px; border-bottom: 2px solid var(--cobalt); }
.matrix td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.matrix td:first-child { font-weight: 600; white-space: nowrap; }
.matrix td .m { color: var(--cobalt); font-weight: 600; }
.matrix td.muted { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.stat { background: var(--white); border: 1px solid var(--line); padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat .n { font-family: var(--mono); font-weight: 600; font-size: clamp(40px, 5vw, 76px); line-height: 1; letter-spacing: -.04em; color: var(--cobalt); }
.stat .n small { font-size: .38em; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 6px; }
.stat.hot .n { color: var(--amber); }
.stat strong { font-size: 1em; }
.stat p { font-size: .78em; color: var(--muted); }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.photos figure { margin: 0; background: var(--white); border: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.photos img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 10; max-height: 36vh; object-fit: cover; }
.photos figcaption { display: flex; flex-wrap: wrap; gap: 8px; font-size: .78em; }
.photos figcaption .m { color: var(--cobalt); }
.photos figcaption .off { color: var(--muted); text-decoration: line-through; }
.refs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 36px; font-size: .74em; line-height: 1.45; margin: 0; padding-left: 1.2em; }
.refs li { padding-left: 4px; overflow-wrap: anywhere; }
.refs.three { grid-template-columns: 1fr 1fr 1fr; }
.refgroups { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.refgroups h2 { font-family: var(--mono); font-size: .75em; letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); margin: 0 0 8px; font-weight: 600; }
.refgroups ul { margin: 0; padding-left: 1.2em; font-size: .74em; line-height: 1.45; }
.refgroups li { overflow-wrap: anywhere; margin-bottom: 4px; }

/* ---- diagrams ---- */
.diagram { width: 100%; max-height: 52vh; height: auto; display: block; }
.diagram text { font-family: var(--sans); fill: var(--ink); }
.diagram .mono { font-family: var(--mono); font-weight: 600; }
.nest { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.nest svg { width: 100%; height: auto; display: block; }
.nest dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; align-items: baseline; font-size: .92em; }
.nest dt { font-family: var(--mono); font-weight: 600; color: var(--cobalt); white-space: nowrap; }
.nest dd { margin: 0; color: var(--muted); }
.nest dd b { color: var(--ink); font-weight: 600; }

/* ---- title slide ---- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero .sub { font-size: clamp(20px, 2vw, 32px); line-height: 1.2; font-weight: 500; margin-bottom: 22px; }
.hero .by { font-size: .78em; color: var(--muted); line-height: 1.7; }
.hero .formula { border: 0; padding: 0; font-size: clamp(26px, 3vw, 46px); color: var(--ink); }
.hero .formula small { font-size: .4em; }


/* ---- short screens (720p projectors, laptops) ---- */
@media screen and (min-width: 821px) and (max-height: 800px) {
    .stage { padding-top: 20px; padding-bottom: 14px; }
    .eyebrow { margin-bottom: 8px; }
    .slide h1 { font-size: clamp(26px, 2.7vw, 40px); margin-bottom: 12px; max-width: 30ch; }
    .visual { gap: 14px; }
    .takeaway { margin-top: 12px; padding-top: 6px; padding-bottom: 6px; }
    .notes { margin-top: 6px; }
    pre { line-height: 1.45; padding: 16px 20px; }
    .matrix td { padding: 9px 14px; }
    .matrix th { padding: 9px 14px; }
    .stat { padding: 14px 20px 12px; }
    .stat .n { font-size: clamp(36px, 4.2vw, 60px); }
    .flow li { padding: 14px 16px 12px; }
    .card { padding: 14px 16px; }
    .ladder .rung { min-height: 160px; padding: 12px 14px; }
    .out { padding: 16px 20px; }
    .formula { padding: 18px 0; }
    .photos img { max-height: 32vh; }
    .diagram { max-height: 48vh; }
}

/* ---- small screens ---- */
@media screen and (max-width: 820px) {
    .slide { grid-template-columns: 1fr; }
    .rail { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
    .rail .course, .rail .pos { width: 100%; }
    .rail a { padding-left: 0; border-left: 0; border-bottom: 2px solid transparent; }
    .rail a[aria-current] { border-bottom-color: var(--cobalt); }
    .stage { padding: 20px 16px; }
    .slide h1 { max-width: none; }
    .split, .split.even, .split.wide, .nest, .hero, .refgroups, .photos, .map { grid-template-columns: 1fr; }
    .map .arrow { transform: rotate(90deg); justify-self: start; }
    .ladder, .cards, .cards.four, .stats, .snips { grid-template-columns: 1fr 1fr; }
    .cards, .snips { grid-template-columns: 1fr; }
    .refs, .refs.three { grid-template-columns: 1fr; }
    .flow { flex-direction: column; }
    .flow li { border-right: 1px solid var(--line); border-bottom: 0; }
    .flow li:last-child { border-bottom: 1px solid var(--line); }
    .flow li:not(:last-child)::after { content: "↓"; right: 14px; top: auto; bottom: -12px; }
    .quad { grid-template-columns: 1fr; grid-template-rows: none; }
    .quad .ax { display: none; }
    .axis { display: none; }
    .truth { font-size: 13px; }
    .presenting .notes[open] { top: 100px; }
}

/* ---- print: one slide per A4 landscape page ---- */
@media print {
    @page { size: A4 landscape; margin: 0; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    html, body { width: 297mm; background: var(--paper); }
    .bar, .skip, .notes { display: none !important; }
    .slide, .presenting .slide { display: grid !important; width: 297mm; height: 210mm; min-height: 0; break-after: page; break-inside: avoid; border: 0; }
    .slide:last-child { break-after: auto; }
    /* Repeated gradients can balloon PDFs in browser print engines. */
    .stage { padding: 8mm 14mm 6mm 10mm; background-image: none; }
    .slide h1 { font-size: 32px; margin-bottom: 14px; }
    .visual { font-size: 21px; gap: 14px; }
    .takeaway { font-size: 19px; margin-top: 12px; }
    pre { font-size: 15px; }
    .diagram { max-height: 110mm; }
}

/* ---- definition rows: symbol · name · sentence ---- */
.defs { display: grid; grid-template-columns: auto auto 1fr; gap: 12px 26px; align-items: baseline; }
.defs .sym { font-family: var(--mono); font-weight: 600; color: var(--cobalt); font-size: 1.25em; }
.defs b { font-weight: 600; white-space: nowrap; }
.defs span { color: var(--muted); font-size: .92em; }
.defs span .m { color: var(--ink); font-weight: 600; }
.cards .card .body { font-size: .84em; color: var(--ink); line-height: 1.4; }
.cards .card .body p { font-size: 1em; color: var(--ink); }
.cards .card .body p + p { margin-top: 6px; color: var(--muted); }
@media screen and (min-width: 821px) and (max-height: 800px) { .defs { gap: 8px 22px; } .cards .card .body { font-size: .78em; } .card p { font-size: .76em; } .chips.dense .chip { font-size: .8em; padding: 5px 12px; } }
.chips.dense { gap: 8px; }
@media screen and (max-width: 820px) { .defs { grid-template-columns: auto 1fr; } .defs span { grid-column: 1 / -1; } }

/* ---- equations (MathJax), plots, figures ---- */
.eq { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 14px 22px; font-size: 1.05em; line-height: 1.5; }
.eq .label { margin-bottom: 6px; }
.eq p { margin: 0; }
.eq + .eq { margin-top: 0; }
.eqs { display: grid; gap: 14px; }
.eqs.two { grid-template-columns: 1fr 1fr; }
.eq.hot { border-left: 4px solid var(--amber); }
mjx-container { margin: .2em 0 !important; }
.visual .row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.plot { width: 100%; height: auto; max-height: 52vh; display: block; }
.figure { margin: 0; display: grid; grid-template-columns: 1fr; justify-items: center; gap: 10px; }
.figure img { max-height: 54vh; width: auto; max-width: 100%; background: var(--white); border: 1px solid var(--line); padding: 8px; }
.figure figcaption { font-size: .78em; color: var(--muted); text-align: center; max-width: 70ch; }
.figure figcaption a { color: var(--muted); }
.split .figure img { max-height: 48vh; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; row-gap: 2px; align-items: start; background: var(--white); border: 1px solid var(--line); padding: 12px 18px; }
.steps li > * { grid-column: 2; }
.steps li::before { grid-column: 1; grid-row: 1 / span 12; counter-increment: step; content: counter(step); font-family: var(--mono); font-weight: 600; color: var(--white); background: var(--cobalt); border-radius: 4px; width: 32px; height: 32px; display: grid; place-items: center; font-size: .85em; }
.steps li.hot::before { background: var(--amber); color: var(--ink); }
.steps li strong { display: block; }
.steps li p { font-size: .85em; color: var(--muted); }
.steps li .m { color: var(--cobalt); }
@media screen and (min-width: 821px) and (max-height: 800px) { .eq { padding: 10px 18px; font-size: 1em; } .steps li { padding: 8px 14px; } .plot { max-height: 46vh; } .figure img { max-height: 48vh; } }
@media screen and (max-width: 820px) { .visual .row, .eqs.two { grid-template-columns: 1fr; } }
.defs.math { grid-template-columns: minmax(0, 42%) 1fr; font-size: .92em; row-gap: 8px; }
.defs.math .sym { font-size: .95em; }
.steps.two { grid-template-columns: 1fr 1fr; }
.steps li p { line-height: 1.35; }
@media screen and (min-width: 821px) and (max-height: 800px) { .steps { gap: 8px; } .steps li p { font-size: .8em; } .steps.two { grid-template-columns: 1fr 1fr; } }
@media screen and (max-width: 820px) { .steps.two { grid-template-columns: 1fr; } }
.steps.tight { gap: 8px; }
.steps.tight li { padding: 8px 14px; }
.steps.tight li p { font-size: .78em; }
.cards.tight .card { padding: 12px 16px; gap: 6px; }
.cards.tight .card p { font-size: .78em; }
.rail.dense { gap: 9px; font-size: 12px; padding-top: 24px; }
.rail.dense a b { font-size: 10px; }
.rail.dense .course { margin-bottom: 2px; }
.ents { background: var(--white); border: 1px solid var(--line); padding: 18px 22px; line-height: 2.2; font-size: 1.05em; }
.ent { display: inline-block; padding: 2px 10px; border-radius: 4px; margin: 0 2px; }
.ent b { font-family: var(--mono); font-size: .6em; letter-spacing: .08em; margin-left: 6px; color: var(--muted); }
.ent.gpe { background: var(--wash); } .ent.date { background: #fff4dc; } .ent.card { background: #e6f4ee; }
.steps.small { gap: 6px; }
.steps.small li { padding: 6px 12px; }
.steps.small li strong { font-size: .9em; }
.steps.small li::before { width: 28px; height: 28px; font-size: .75em; }
