Repository Public
1@import "tailwindcss";2@import "@fontsource-variable/fraunces/opsz.css";3@import "@fontsource-variable/fraunces/opsz-italic.css";4@import "@fontsource/fira-sans/latin-400.css";5@import "@fontsource/fira-sans/latin-400-italic.css";6@import "@fontsource/fira-sans/latin-500.css";7@import "@fontsource/fira-sans/latin-600.css";8@import "@fontsource/fira-sans/latin-ext-400.css";9@import "@fontsource/fira-sans/latin-ext-500.css";10@import "@fontsource/fira-sans/latin-ext-600.css";11@import "@fontsource/fira-mono/latin-400.css";12@import "@fontsource/fira-mono/latin-500.css";1314@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));1516/* ------------------------------------------------------------------ *17 * Design tokens. Colour carries the same meaning as in the course's18 * slides: blue = information flow, teal = validated, amber = uncertain,19 * coral = error or hazard. Never colour alone: always a label or a shape.20 * ------------------------------------------------------------------ */21:root {22 color-scheme: light;23 --bg: #fbfaf6;24 --surface: #ffffff;25 --panel: #f1f3f8;26 --raised: #ffffff;27 --line: #d9dfea;28 --line-strong: #8a97ad;29 --fg: #0b1426;30 --muted: #45526a;31 --faint: #5d6a82;32 --blue: #1756c2;33 --teal: #0b7a63;34 --amber: #8f5a00;35 --coral: #c2301f;36 --violet: #5b3fc4;37 --blue-soft: #e4edfb;38 --teal-soft: #dff3ee;39 --amber-soft: #fbefd3;40 --coral-soft: #fbe4e0;41 --violet-soft: #ebe6fb;42 --on-accent: #ffffff;43 --shadow: 0 1px 2px rgb(11 20 38 / 0.06), 0 8px 24px -12px rgb(11 20 38 / 0.18);44 --grid: rgb(11 20 38 / 0.045);45}46[data-theme="dark"] {47 color-scheme: dark;48 --bg: #0b1426;49 --surface: #101b32;50 --panel: #16233f;51 --raised: #1a2947;52 --line: #27375a;53 --line-strong: #5b6d93;54 --fg: #f5f1e6;55 --muted: #b4bfd1;56 --faint: #93a0b8;57 --blue: #6aabff;58 --teal: #2fcbaa;59 --amber: #ffb938;60 --coral: #ff8375;61 --violet: #b3a0ff;62 --blue-soft: #15294d;63 --teal-soft: #0f3338;64 --amber-soft: #3a2f17;65 --coral-soft: #3d2029;66 --violet-soft: #261f4d;67 --on-accent: #060b16;68 --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -16px rgb(0 0 0 / 0.6);69 --grid: rgb(245 241 230 / 0.04);70}7172@theme inline {73 --color-bg: var(--bg);74 --color-surface: var(--surface);75 --color-panel: var(--panel);76 --color-raised: var(--raised);77 --color-line: var(--line);78 --color-line-strong: var(--line-strong);79 --color-fg: var(--fg);80 --color-muted: var(--muted);81 --color-faint: var(--faint);82 --color-blue: var(--blue);83 --color-teal: var(--teal);84 --color-amber: var(--amber);85 --color-coral: var(--coral);86 --color-violet: var(--violet);87 --color-blue-soft: var(--blue-soft);88 --color-teal-soft: var(--teal-soft);89 --color-amber-soft: var(--amber-soft);90 --color-coral-soft: var(--coral-soft);91 --color-violet-soft: var(--violet-soft);92 --color-on-accent: var(--on-accent);93 --font-display: "Fraunces Variable", "Iowan Old Style", Georgia, serif;94 --font-sans: "Fira Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;95 --font-mono: "Fira Mono", ui-monospace, "SF Mono", Menlo, monospace;96 --shadow-card: var(--shadow);97 --breakpoint-xs: 26rem;98}99100@layer base {101 html {102 background: var(--bg);103 color: var(--fg);104 font-family: var(--font-sans);105 font-size: 100%;106 line-height: 1.6;107 -webkit-text-size-adjust: 100%;108 text-rendering: optimizeLegibility;109 scroll-padding-top: 5.5rem;110 }111 @media (prefers-reduced-motion: no-preference) {112 html { scroll-behavior: smooth; }113 }114 body { min-height: 100dvh; overflow-x: clip; }115 h1, h2, h3 { font-family: var(--font-display); font-weight: 560; letter-spacing: -0.015em; line-height: 1.12; text-wrap: balance; font-variation-settings: "opsz" 72; }116 h3 { font-variation-settings: "opsz" 28; letter-spacing: -0.005em; line-height: 1.25; }117 p, li { text-wrap: pretty; }118 ::selection { background: var(--blue); color: var(--on-accent); }119 :focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }120 a { text-underline-offset: 0.18em; }121 button, summary, label[for], select { cursor: pointer; }122 button:disabled { cursor: not-allowed; }123 code, kbd, pre { font-family: var(--font-mono); font-size: 0.92em; }124 kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; padding: 0.05em 0.45em; background: var(--surface); white-space: nowrap; }125 mark { background: var(--amber-soft); color: inherit; border-radius: 3px; padding: 0 0.12em; box-shadow: inset 0 -2px 0 var(--amber); }126 /* Reduced motion: every transition and animation is cut short; nothing depends on motion to be understood. */127 @media (prefers-reduced-motion: reduce) {128 *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }129 }130}131132@layer components {133 .shell { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }134 .shell-narrow { width: 100%; max-width: 46rem; margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }135136 .eyebrow { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 500; }137 .display { font-size: clamp(2.5rem, 6.4vw + 0.6rem, 5.4rem); line-height: 0.98; letter-spacing: -0.03em; font-variation-settings: "opsz" 144; font-weight: 520; }138 .h-page { font-size: clamp(2.1rem, 3.6vw + 1rem, 3.5rem); line-height: 1.04; letter-spacing: -0.025em; }139 .h-section { font-size: clamp(1.55rem, 1.6vw + 1.1rem, 2.25rem); }140 .lede { font-size: clamp(1.08rem, 0.5vw + 1rem, 1.3rem); line-height: 1.55; color: var(--muted); }141142 .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.55rem 1.15rem; border-radius: 999px; font-weight: 600; font-size: 0.98rem; line-height: 1.2; border: 1.5px solid transparent; text-decoration: none; transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s; }143 .btn:active { transform: translateY(1px); }144 .btn-primary { background: var(--fg); color: var(--bg); }145 .btn-primary:hover { background: var(--blue); color: var(--on-accent); }146 .btn-accent { background: var(--blue); color: var(--on-accent); }147 .btn-accent:hover { filter: brightness(1.08); }148 .btn-ghost { border-color: var(--line-strong); color: var(--fg); background: transparent; }149 .btn-ghost:hover { border-color: var(--fg); background: var(--panel); }150 .btn-quiet { color: var(--fg); background: var(--panel); }151 .btn-quiet:hover { background: var(--line); }152 .btn-danger { border-color: var(--coral); color: var(--coral); background: transparent; }153 .btn-danger:hover { background: var(--coral-soft); }154 .btn-sm { min-height: 2.25rem; padding: 0.3rem 0.85rem; font-size: 0.88rem; }155 .btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }156157 .card { background: var(--surface); border: 1px solid var(--line); border-radius: 1.1rem; }158 .card-hover { transition: border-color 0.15s, transform 0.2s, box-shadow 0.2s; }159 .card-hover:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }160161 .chip { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.12rem 0.65rem; font-size: 0.8rem; line-height: 1.5; color: var(--muted); background: var(--surface); white-space: nowrap; }162 .chip-blue { color: var(--blue); background: var(--blue-soft); border-color: transparent; }163 .chip-teal { color: var(--teal); background: var(--teal-soft); border-color: transparent; }164 .chip-amber { color: var(--amber); background: var(--amber-soft); border-color: transparent; }165 .chip-coral { color: var(--coral); background: var(--coral-soft); border-color: transparent; }166 .chip-violet { color: var(--violet); background: var(--violet-soft); border-color: transparent; }167168 .link { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; }169 .link:hover { text-decoration-thickness: 2px; }170171 .field { width: 100%; min-height: 2.75rem; border: 1.5px solid var(--line-strong); border-radius: 0.7rem; background: var(--surface); color: var(--fg); padding: 0.5rem 0.85rem; font: inherit; }172 .field::placeholder { color: var(--faint); }173 .field:focus-visible { outline-offset: 0; border-color: var(--blue); }174175 .rule { border: 0; border-top: 1px solid var(--line); }176 .grid-paper { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 2.5rem 2.5rem; }177178 /* Long-form text (lab instructions, scripts, legal pages). */179 .prose { max-width: 68ch; font-size: 1.04rem; line-height: 1.7; }180 .prose > * + * { margin-top: 1.05em; }181 .prose h1 { font-size: 1.9rem; margin-top: 0; }182 .prose h2 { font-size: 1.5rem; margin-top: 2.2em; }183 .prose h3 { font-size: 1.18rem; margin-top: 1.8em; }184 .prose h4 { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; margin-top: 1.6em; }185 .prose h5, .prose h6 { font-weight: 600; font-size: 1.02rem; margin-top: 1.5em; }186 .prose a { color: var(--blue); text-decoration: underline; }187 .prose ul { list-style: disc; padding-left: 1.3em; }188 .prose ol { list-style: decimal; padding-left: 1.5em; }189 .prose li + li { margin-top: 0.35em; }190 .prose li > ul, .prose li > ol { margin-top: 0.35em; }191 .prose blockquote { border-left: 3px solid var(--amber); padding: 0.2em 0 0.2em 1em; color: var(--muted); }192 .prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }193 .prose code { background: var(--panel); border-radius: 5px; padding: 0.1em 0.35em; }194 .prose pre { background: var(--panel); border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.9em 1.1em; overflow-x: auto; line-height: 1.5; font-size: 0.9rem; }195 .prose pre code { background: none; padding: 0; }196 .prose .table-wrap { overflow-x: auto; }197 .prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }198 .prose th, .prose td { border-bottom: 1px solid var(--line); padding: 0.5em 0.8em 0.5em 0; text-align: left; vertical-align: top; }199 .prose th { font-weight: 600; border-bottom-color: var(--line-strong); }200 .prose strong { font-weight: 600; }201202 .sr-only-focusable:not(:focus):not(:focus-within) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }203204 /* Diagram vocabulary shared by the interactive figures. */205 .dg-node { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }206 .dg-node-active { fill: var(--blue-soft); stroke: var(--blue); stroke-width: 2.5; }207 .dg-node-ok { fill: var(--teal-soft); stroke: var(--teal); stroke-width: 2.5; }208 .dg-node-warn { fill: var(--amber-soft); stroke: var(--amber); stroke-width: 2.5; }209 .dg-node-bad { fill: var(--coral-soft); stroke: var(--coral); stroke-width: 2.5; }210 .dg-node-dim { fill: var(--panel); stroke: var(--line); stroke-width: 1.5; }211 .dg-edge { stroke: var(--line-strong); stroke-width: 1.5; fill: none; }212 .dg-edge-active { stroke: var(--blue); stroke-width: 2.5; fill: none; }213 .dg-edge-bad { stroke: var(--coral); stroke-width: 2.5; fill: none; }214 .dg-label { fill: var(--fg); font-family: var(--font-sans); font-size: 13px; font-weight: 500; }215 .dg-sub { fill: var(--muted); font-family: var(--font-sans); font-size: 11px; }216 .dg-boundary { stroke: var(--coral); stroke-width: 2; stroke-dasharray: 7 5; fill: none; }217}218219@media print {220 .no-print { display: none !important; }221 html { background: #fff; color: #000; }222 body { font-size: 11pt; }223 a { color: inherit; text-decoration: none; }224 .card { border-color: #999; break-inside: avoid; }225}226227/* Without JavaScript the inline theme script does not run: follow the system preference in pure CSS. */228@media (prefers-color-scheme: dark) {229 :root:not([data-theme]) {230 color-scheme: dark;231 --bg: #0b1426; --surface: #101b32; --panel: #16233f; --raised: #1a2947; --line: #27375a; --line-strong: #5b6d93;232 --fg: #f5f1e6; --muted: #b4bfd1; --faint: #93a0b8; --blue: #6aabff; --teal: #2fcbaa; --amber: #ffb938; --coral: #ff8375; --violet: #b3a0ff;233 --blue-soft: #15294d; --teal-soft: #0f3338; --amber-soft: #3a2f17; --coral-soft: #3d2029; --violet-soft: #261f4d; --on-accent: #060b16;234 --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -16px rgb(0 0 0 / 0.6); --grid: rgb(245 241 230 / 0.04);235 }236}237238/* Focus mode of the player: the site chrome steps aside. */239[data-focus="1"] .site-chrome { display: none; }240241@layer components {242/* Player seek bar: a native range input (keyboard and screen-reader support for free) drawn over a custom track. */243.seek { -webkit-appearance: none; appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; cursor: pointer; }244.seek::-webkit-slider-runnable-track { background: transparent; height: 100%; }245.seek::-moz-range-track { background: transparent; height: 100%; }246.seek::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #f5f1e6; border: 2px solid #4c9aff; margin-top: 4px; }247.seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #f5f1e6; border: 2px solid #4c9aff; }248.seek:focus-visible { outline: 3px solid #4c9aff; outline-offset: 4px; }249.pbtn { display: inline-grid; place-items: center; min-width: 2.5rem; height: 2.5rem; border-radius: 0.6rem; color: #f5f1e6; padding-inline: 0.4rem; }250.pbtn:hover { background: rgb(245 241 230 / 0.14); }251.pbtn[aria-pressed="true"] { background: rgb(76 154 255 / 0.3); }252.pbtn:focus-visible, .pselect:focus-visible { outline: 3px solid #4c9aff; outline-offset: 1px; }253.pselect { height: 2.5rem; border-radius: 0.6rem; background: transparent; color: #f5f1e6; border: 1px solid rgb(245 241 230 / 0.3); padding-inline: 0.5rem; font-size: 0.85rem; }254.pselect option { color: #0b1426; background: #fff; }255}256257/* Code highlighting (highlight.js class names; colours from the tokens, readable in both themes). */258@layer components {259.hljs-comment, .hljs-quote { color: var(--faint); font-style: italic; }260.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-built_in, .hljs-type { color: var(--violet); }261.hljs-string, .hljs-attr, .hljs-symbol, .hljs-bullet, .hljs-addition { color: var(--teal); }262.hljs-number, .hljs-meta, .hljs-variable, .hljs-template-variable { color: var(--amber); }263.hljs-title, .hljs-section, .hljs-name, .hljs-function { color: var(--blue); }264.hljs-deletion { color: var(--coral); }265.prose .katex-display { overflow-x: auto; overflow-y: hidden; padding-block: 0.3em; }266}267268/* ------------------------------------------------------------------ *269 * Studio (/admin): the same tokens, a denser working surface.270 * ------------------------------------------------------------------ */271@layer components {272.studio { font-size: 0.95rem; }273.studio h1 { font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2rem); letter-spacing: -0.02em; }274.studio h2 { font-size: 1.22rem; font-variation-settings: "opsz" 28; letter-spacing: -0.005em; line-height: 1.25; }275.studio h3 { font-size: 1.02rem; }276.studio .btn { min-height: 2.5rem; font-size: 0.93rem; padding: 0.4rem 0.95rem; }277.studio .btn-sm { min-height: 2.1rem; font-size: 0.86rem; padding: 0.25rem 0.75rem; }278.studio .field { min-height: 2.5rem; padding: 0.4rem 0.7rem; border-radius: 0.6rem; }279.studio textarea.field { line-height: 1.5; resize: vertical; }280.studio .card { border-radius: 0.9rem; }281282.st-shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100dvh; }283.st-side { border-right: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; }284.st-main { min-width: 0; padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 5rem; max-width: 78rem; width: 100%; }285.st-nav a { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; border-radius: 0.6rem; color: var(--muted); font-weight: 500; text-decoration: none; min-height: 2.5rem; }286.st-nav a:hover { background: var(--panel); color: var(--fg); }287.st-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); }288@media (max-width: 62rem) {289 .st-shell { grid-template-columns: minmax(0, 1fr); }290 .st-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; padding: 0.5rem 0.75rem; gap: 0.5rem; }291 .st-nav { display: flex; flex-wrap: wrap; gap: 0.15rem; }292 .st-nav a { padding: 0.35rem 0.6rem; }293 .st-side .st-foot { margin-left: auto; border: 0; padding: 0; }294}295296.st-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 0.3rem; }297.st-help { font-size: 0.82rem; color: var(--faint); margin-top: 0.3rem; }298.st-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }299.st-table th { text-align: left; font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }300.st-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }301.st-table tr:last-child td { border-bottom: 0; }302.st-scroll { overflow-x: auto; }303.st-stat { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; font-variation-settings: "opsz" 72; }304.st-drop { border: 2px dashed var(--line-strong); border-radius: 0.9rem; padding: 1.25rem; text-align: center; background: var(--panel); transition: border-color 0.15s, background-color 0.15s; }305.st-drop[data-over="true"] { border-color: var(--blue); background: var(--blue-soft); }306.st-bar { height: 0.5rem; border-radius: 999px; background: var(--panel); overflow: hidden; border: 1px solid var(--line); }307.st-bar > span { display: block; height: 100%; background: var(--blue); transition: width 0.2s; }308.st-bar[data-tone="teal"] > span { background: var(--teal); }309.st-bar[data-tone="amber"] > span { background: var(--amber); }310.st-bar[data-tone="coral"] > span { background: var(--coral); }311.st-dialog { border: 1px solid var(--line-strong); border-radius: 1rem; background: var(--surface); color: var(--fg); padding: 0; max-width: min(40rem, calc(100vw - 2rem)); width: 100%; box-shadow: var(--shadow); margin: auto; }312.st-dialog::backdrop { background: rgb(11 20 38 / 0.55); }313.st-mono { font-family: var(--font-mono); font-size: 0.82rem; }314.st-pre { font-family: var(--font-mono); font-size: 0.8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.75rem; overflow: auto; max-height: 22rem; white-space: pre-wrap; word-break: break-word; }315.st-split { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }316@media (min-width: 70rem) { .st-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }317}318319/* Slide viewer. No transition between slides: nothing to reduce for reduced motion. */320@layer components {321.deck { scroll-margin-top: 5.5rem; }322.deck:focus-within { border-color: var(--line-strong); }323.deck-edge { position: absolute; top: 0; bottom: 0; width: 14%; display: grid; place-items: center; color: transparent; }324.deck-edge:not(:disabled):hover { color: #f5f1e6; background: linear-gradient(to right, rgb(11 20 38 / 0.35), transparent); }325.deck-edge.right-0:not(:disabled):hover { background: linear-gradient(to left, rgb(11 20 38 / 0.35), transparent); }326.deck-edge:disabled { cursor: default; }327/* Presentation mode: the browser's full screen, or (where it is refused) a layout that fills the page. */328.deck:fullscreen, .deck[data-full="1"] { display: flex; flex-direction: column; border-radius: 0; border: 0; background: var(--bg); }329.deck[data-full="1"]:not(:fullscreen) { position: fixed; inset: 0; z-index: 70; }330.deck:fullscreen .deck-stage, .deck[data-full="1"] .deck-stage { flex: 1 1 0; min-height: 0; aspect-ratio: auto !important; }331.deck:fullscreen .deck-bar, .deck[data-full="1"] .deck-bar { flex: none; }332.deck:fullscreen details, .deck[data-full="1"] details { display: none; }333}334