@allons-y/course-kit 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +90 -2
  3. package/assets/fonts/instrument-sans-italic-var.woff2 +0 -0
  4. package/assets/fonts/instrument-sans-var.woff2 +0 -0
  5. package/assets/fonts/pt-mono.woff2 +0 -0
  6. package/assets/scripts/copy.js +99 -0
  7. package/assets/scripts/deck.js +161 -0
  8. package/assets/scripts/email.js +19 -0
  9. package/assets/scripts/practice.js +545 -0
  10. package/assets/scripts/theme-panel.js +647 -0
  11. package/assets/scripts/theme-restore.js +17 -0
  12. package/assets/styles/base.css +2091 -0
  13. package/assets/styles/deck.css +968 -0
  14. package/assets/styles/font.css +36 -0
  15. package/assets/styles/notes.css +137 -0
  16. package/assets/styles/print.css +428 -0
  17. package/assets/styles/semantics.css +101 -0
  18. package/components/practice/check-controls.webc +50 -0
  19. package/components/practice/choice-list.webc +86 -0
  20. package/components/practice/cite-panel.webc +108 -0
  21. package/components/practice/practice-figure.webc +47 -0
  22. package/components/practice/practice-fill.webc +154 -0
  23. package/components/practice/practice-grid.webc +82 -0
  24. package/components/practice/practice-judge.webc +165 -0
  25. package/components/practice/practice-match.webc +178 -0
  26. package/components/practice/practice-question.webc +141 -0
  27. package/components/practice/practice-selfcheck.webc +40 -0
  28. package/components/practice/practice-terms.webc +95 -0
  29. package/components/practice/practice-tree.webc +91 -0
  30. package/components/practice/practice-worksheet.webc +369 -0
  31. package/components/site/copyright.webc +13 -0
  32. package/components/site/course-documents.webc +27 -0
  33. package/components/site/course-now.webc +393 -0
  34. package/components/site/course-summary.webc +136 -0
  35. package/components/site/demo-weeks.webc +91 -0
  36. package/components/site/glossary-entry.webc +31 -0
  37. package/components/site/glossary-panel.webc +1482 -0
  38. package/components/site/glossary.webc +45 -0
  39. package/components/site/grading.webc +50 -0
  40. package/components/site/instructor.webc +432 -0
  41. package/components/site/masthead.webc +147 -0
  42. package/components/site/nav-links.webc +174 -0
  43. package/components/site/policies.webc +17 -0
  44. package/components/site/practice-index.webc +31 -0
  45. package/components/site/schedule-overview.webc +145 -0
  46. package/components/site/schedule-weeks.webc +589 -0
  47. package/components/site/site-footer.webc +119 -0
  48. package/components/site/slide-timetable.webc +152 -0
  49. package/components/site/syllabus.webc +370 -0
  50. package/components/ui/arrow-link.webc +19 -0
  51. package/components/ui/assigned-list.webc +101 -0
  52. package/components/ui/callout.webc +11 -0
  53. package/components/ui/card-list.webc +124 -0
  54. package/components/ui/codepen-embed.webc +123 -0
  55. package/components/ui/download-button.webc +49 -0
  56. package/components/ui/eyebrow.webc +18 -0
  57. package/components/ui/icons/github.webc +6 -0
  58. package/components/ui/icons/google.webc +9 -0
  59. package/components/ui/link-list.webc +130 -0
  60. package/components/ui/link-section.webc +40 -0
  61. package/components/ui/meeting-card.webc +73 -0
  62. package/components/ui/meeting-decks.webc +38 -0
  63. package/components/ui/table-rubric.webc +251 -0
  64. package/components/ui/today-link.webc +43 -0
  65. package/components/ui/today-marker.webc +149 -0
  66. package/components/ui/week-block.webc +53 -0
  67. package/examples/starter/_data/course.json +20 -0
  68. package/examples/starter/_data/dates.json +16 -0
  69. package/examples/starter/_data/grading.json +6 -0
  70. package/examples/starter/_data/instructor.json +7 -0
  71. package/examples/starter/_data/policies.json +9 -0
  72. package/examples/starter/_data/scale.json +8 -0
  73. package/examples/starter/_data/schedule.json +22 -0
  74. package/examples/starter/_data/theme.json +17 -0
  75. package/examples/starter/content/index.webc +12 -0
  76. package/examples/starter/content/schedule.webc +12 -0
  77. package/examples/starter/content/slides/index.11tydata.js +5 -0
  78. package/examples/starter/content/slides/index.webc +12 -0
  79. package/examples/starter/content/slides/week-1-day-1.md +40 -0
  80. package/examples/starter/eleventy.config.js +8 -0
  81. package/glue/deck-notes.data.js +41 -0
  82. package/glue/deck-notes.webc +32 -0
  83. package/glue/lesson-day.data.js +17 -0
  84. package/glue/lesson-day.webc +0 -0
  85. package/glue/lesson-plans.data.js +13 -0
  86. package/glue/lesson-plans.webc +2 -0
  87. package/index.js +6 -0
  88. package/layouts/base.webc +79 -0
  89. package/layouts/deck.webc +46 -0
  90. package/layouts/demo.webc +16 -0
  91. package/layouts/document.webc +10 -0
  92. package/layouts/lesson-detail.webc +109 -0
  93. package/layouts/lesson.webc +71 -0
  94. package/layouts/notes.webc +23 -0
  95. package/layouts/worksheet.webc +52 -0
  96. package/lib/assets.js +42 -0
  97. package/lib/bundles.js +79 -0
  98. package/lib/check.js +110 -0
  99. package/lib/components.js +19 -0
  100. package/lib/copy.js +656 -0
  101. package/lib/data/build.js +22 -0
  102. package/lib/data/fonts.js +16 -0
  103. package/lib/data/glossary.js +304 -0
  104. package/lib/data/index.js +8 -0
  105. package/lib/data/lessons.js +173 -0
  106. package/lib/data/project.js +22 -0
  107. package/lib/data/read.js +61 -0
  108. package/lib/data/site.js +70 -0
  109. package/lib/data/term.js +80 -0
  110. package/lib/extensions.js +70 -0
  111. package/lib/files.js +14 -0
  112. package/lib/filters.js +584 -0
  113. package/lib/fit.js +106 -0
  114. package/lib/glue.js +26 -0
  115. package/lib/lesson-materials.js +66 -0
  116. package/lib/markdown.js +568 -0
  117. package/lib/minify.js +53 -0
  118. package/lib/paths.js +5 -0
  119. package/lib/pdf.js +134 -0
  120. package/lib/plugin.js +231 -0
  121. package/lib/plugins.js +34 -0
  122. package/lib/postcss.js +93 -0
  123. package/lib/theme-server.js +88 -0
  124. package/lib/theme.js +185 -0
  125. package/lib/worksheet-dialect.js +415 -0
  126. package/lib/worksheets.js +276 -0
  127. package/package.json +119 -4
  128. package/schemas/course.schema.json +161 -0
  129. package/schemas/dates.schema.json +165 -0
  130. package/schemas/grading.schema.json +59 -0
  131. package/schemas/instructor.schema.json +76 -0
  132. package/schemas/policies.schema.json +90 -0
  133. package/schemas/project.schema.json +209 -0
  134. package/schemas/scale.schema.json +68 -0
  135. package/schemas/schedule.schema.json +260 -0
  136. package/schemas/theme.schema.json +704 -0
  137. package/schemas/worksheet.schema.json +449 -0
@@ -0,0 +1,2091 @@
1
+ @import "font.css";
2
+
3
+ :root {
4
+ /* ---- Colors ---- */
5
+ /* tokens:site */
6
+
7
+ /* ---- Typography ---- */
8
+ --sans-font: "Instrument Sans", "Instrument Sans Fallback", system-ui, "Helvetica Neue", helvetica, arial, sans-serif;
9
+ --signature-font: cursive;
10
+ --dense-font: "Instrument Sans", "Instrument Sans Fallback", system-ui, sans-serif;
11
+ --mono-font: "PT Mono", monospace;
12
+ /* Headings: a book face every system already has (Charter on Mac, iOS and
13
+ Linux, Sitka on Windows, Cambria as the fallback), so there is nothing
14
+ to download. */
15
+ --display-font: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, serif;
16
+
17
+ --base-font-size: 14px;
18
+ --mono-font-size: max(var(--base-font-size), .8em);
19
+
20
+ --font-size-5: max(var(--base-font-size), 1rem);
21
+ --font-size-4: max(var(--base-font-size), calc(var(--font-size-5) * 1.25));
22
+ --font-size-3: max(var(--base-font-size), calc(var(--font-size-4) * 1.25));
23
+ --font-size-2: max(var(--base-font-size), calc(var(--font-size-3) * 1.25));
24
+ --font-size-1: max(var(--base-font-size), calc(var(--font-size-2) * 1.25));
25
+ --font-size-6: max(var(--base-font-size), calc(var(--font-size-5) / 1.25));
26
+ --font-size-7: max(var(--base-font-size), calc(var(--font-size-6) / 1.25));
27
+
28
+ /* ---- Font weights (Instrument Sans variable axis 400–700) ---- */
29
+ --font-weight--thin: 100;
30
+ --font-weight--extra-light: 200;
31
+ --font-weight--light: 300;
32
+ --font-weight: 400;
33
+
34
+ /* Instrument Sans covers 400–700; Yellowtail + PT Mono are single-weight 400 */
35
+ --font-weight--medium: 500;
36
+ --font-weight--semi-bold: 600;
37
+ --font-weight--bold: 700;
38
+
39
+ --font-weight--extra-bold: 800;
40
+ --font-weight--black: 900;
41
+
42
+ /* ---- Line heights ---- */
43
+ --font-height--dense: 1.1;
44
+ --font-height: 1.5; /* body copy floor; below 1.5 fails WCAG 1.4.12 spacing */
45
+ --font-height--spacious: 1.8;
46
+
47
+ /* ---- Spacing ---- */
48
+ --gutter: 4px;
49
+ --content-space: 1em; /* ~16px at the base type size */
50
+ --container-space: 16px;
51
+ --section-space: 32px;
52
+
53
+ /* ---- Shape ---- */
54
+ --hairline-border-radius: 0.1em;
55
+ --standard-border-radius: 0.2em;
56
+ --squircle-border-radius: 40px;
57
+ --pill-border-radius: 9999px;
58
+ --circle-border-radius: 50%;
59
+
60
+ --thin-border-width: 1px;
61
+ --border-width: 2px;
62
+ --thick-border-width: 4px;
63
+
64
+ /* should never be smaller than 2px for a11y */
65
+ --outline-width: max(var(--border-width), 2px);
66
+ --outline-offset: calc(var(--outline-width) * 1.8);
67
+
68
+ /* Focus, targets and shape shared by every component (WCAG 2.2 AAA). */
69
+ --target-min: 2.75rem; /* 44px */
70
+ --focus-ring-width: max(2px, 0.125rem);
71
+ --focus-ring-offset: 2px;
72
+ --radius-pill: 9999px;
73
+
74
+ /* Composite shadows (color baked in) */
75
+ --box-shadow: 0 10px 15px -10px light-dark(hsl(0deg 0% 60% / 60%), hsl(0deg 0% 30% / 60%));
76
+ --box-shadow-light: 0 5px 5px -10px light-dark(hsl(0deg 0% 80% / 50%), hsl(0deg 0% 50% / 50%));
77
+
78
+ /* ---- Sizing ---- */
79
+ --container-max: 1200px;
80
+ --content-max: 80ch; /* the page column; tables and figures may use all of it */
81
+ --measure: 68ch; /* the longest line of running text: about 80 characters */
82
+
83
+ @media screen and (width <= 768px) {
84
+ --container-space: 10px;
85
+ --container-max: 100%;
86
+ }
87
+ }
88
+
89
+ /* ---- Baseline reset (formerly simple.css) ---- */
90
+ :where(*, *::before, *::after) {
91
+ box-sizing: border-box;
92
+ }
93
+
94
+ :where(textarea, select, input, progress) {
95
+ appearance: none;
96
+ }
97
+
98
+ @media (prefers-color-scheme: dark) {
99
+ :where(img, video) {
100
+ opacity: 0.8;
101
+ }
102
+ }
103
+
104
+ /* Kept at plain tag specificity, not :where(): `:where(section:last-child)`
105
+ below must keep losing to this rule's `margin-block: 0`, exactly as it
106
+ already does in production — moving to :where() here would tie their
107
+ specificity and let source order (not intent) decide which wins. */
108
+ section {
109
+ border-block: none;
110
+ padding: 0;
111
+ margin-block: 0;
112
+ }
113
+
114
+ /* Kept as a separate :where()-wrapped rule, not nested as `&:last-child`
115
+ inside the block above: nesting a bare pseudo-class after `&` does not
116
+ stay at zero specificity the way wrapping the whole compound in :where()
117
+ does (`&` expands to `:is(:where(section))`, which is zero, but the
118
+ trailing `:last-child` outside that :is() still counts). */
119
+ :where(section:last-child) {
120
+ margin-block-end: 80px;
121
+ }
122
+
123
+ /* Consolidate box styling; more specific rules below (like
124
+ `article.content-column` and base.css's own later `details {}`
125
+ on background-color) win by specificity now that this is zero, not just
126
+ by coming later in the cascade. */
127
+ :where(aside, details, pre, progress) {
128
+ background-color: var(--color-surface-accent);
129
+ border: var(--border-width) solid var(--color-border);
130
+ border-radius: var(--standard-border-radius);
131
+ margin-block-end: 1rem;
132
+ }
133
+
134
+ :where(aside) {
135
+ font-size: 1rem;
136
+ inline-size: 30%;
137
+ padding-inline: 15px;
138
+ margin-inline-start: 15px;
139
+ float: inline-end;
140
+
141
+ *[dir="rtl"] & {
142
+ float: inline-start;
143
+ }
144
+
145
+ @media only screen and (width <= 720px) {
146
+ inline-size: 100%;
147
+ float: none;
148
+ margin-inline-start: 0;
149
+ }
150
+ }
151
+
152
+ :where(article, fieldset, dialog) {
153
+ border: var(--border-width) solid var(--color-border);
154
+ padding: 1rem;
155
+ border-radius: var(--standard-border-radius);
156
+ margin-block-end: 1rem;
157
+ }
158
+
159
+ :where(article, section) :where(h2, h3):first-child {
160
+ margin-block-start: 1rem;
161
+ }
162
+
163
+ article {
164
+ &.content-column {
165
+ border: none;
166
+ padding-inline: 0;
167
+ margin-block-end: 0;
168
+ }
169
+
170
+ &:last-child {
171
+ margin-block-end: 0;
172
+ padding-block-end: 0;
173
+ }
174
+ }
175
+
176
+ :where(h1) {
177
+ font-size: var(--font-size-1);
178
+ }
179
+
180
+ :where(h2) {
181
+ font-size: var(--font-size-2);
182
+ }
183
+
184
+ :where(h3) {
185
+ font-size: var(--font-size-3);
186
+ }
187
+
188
+ :where(h4) {
189
+ font-size: var(--font-size-4);
190
+ }
191
+
192
+ :where(h5) {
193
+ font-size: var(--font-size-5);
194
+ }
195
+
196
+ :where(h6) {
197
+ font-size: var(--font-size-6);
198
+ }
199
+
200
+ /* Kept at :is() specificity, not :where(): it must keep outranking
201
+ `:where(p, cite)`'s clamp() formula for a plain, unclassed paragraph,
202
+ exactly as it already does in production. A classed paragraph (.lede,
203
+ .title, …) still wins, since real classes outrank both. */
204
+ :is(p, li) {
205
+ font-size: var(--font-size-5);
206
+ }
207
+
208
+ html {
209
+ backface-visibility: hidden;
210
+ font-family: var(--sans-font);
211
+
212
+ /* Nothing is sticky, so anchor targets only need breathing room. */
213
+ scroll-behavior: smooth;
214
+ scroll-padding-block-start: var(--container-space);
215
+
216
+ @media (prefers-reduced-motion: reduce) {
217
+ scroll-behavior: auto;
218
+ }
219
+ }
220
+
221
+ body {
222
+ --page-column: min(var(--content-max), 90%);
223
+
224
+ display: grid;
225
+ position: relative;
226
+ grid-template-columns: 1fr var(--page-column) 1fr;
227
+ min-block-size: 100dvh;
228
+ grid-template-rows: auto 1fr auto;
229
+ margin: 0;
230
+ color: var(--color-text);
231
+ background-color: var(--color-page);
232
+ font-size: var(--font-size-5);
233
+ line-height: var(--font-height);
234
+
235
+ font-optical-sizing: auto;
236
+ overflow-x: hidden;
237
+ text-wrap: stable;
238
+ -webkit-font-smoothing: subpixel-antialiased;
239
+ -moz-osx-font-smoothing: auto;
240
+ scrollbar-gutter: stable;
241
+ overscroll-behavior: contain;
242
+
243
+ @media print {
244
+ font-size: 16px;
245
+ padding: 0;
246
+ }
247
+
248
+ &:has(.content-column.wide) {
249
+ --page-column: min(var(--container-max), 95%);
250
+ }
251
+
252
+ &:has(.error-page) {
253
+ background-image: url("../images/topography.svg");
254
+ background-position: center;
255
+ background-repeat: repeat;
256
+ }
257
+
258
+ /* Every direct child sits in the center column; the masthead spans full
259
+ width behind it (see masthead.webc, which keeps this dependency local
260
+ by name in its own comment). */
261
+ > * {
262
+ grid-column: 2;
263
+ }
264
+
265
+ > header {
266
+ grid-column: 1 / -1;
267
+ }
268
+
269
+ > footer {
270
+ margin-block-start: 4rem;
271
+ padding-block: 2rem 1.5rem;
272
+ padding-inline: 1rem;
273
+ color: var(--color-text-muted);
274
+ font-size: 0.9rem;
275
+ text-align: center;
276
+ border-block-start: var(--border-width) solid var(--color-border);
277
+ }
278
+ }
279
+
280
+ main {
281
+ padding-block-start: 1.5rem;
282
+ }
283
+
284
+ [id] {
285
+ scroll-margin-block-start: 1.5rlh;
286
+ }
287
+
288
+ ::selection {
289
+ background: color-mix(in hsl, var(--color-surface) 80%, transparent);
290
+ border-radius: 0.25em;
291
+ color: var(--color-text);
292
+ }
293
+
294
+ html {
295
+ /* A sticky element never covers the focused control (2.4.12). */
296
+ scroll-padding-block: 6rem;
297
+ }
298
+
299
+ :focus-visible {
300
+ outline: var(--focus-ring-width) solid var(--color-focus-ring);
301
+ outline-offset: var(--focus-ring-offset);
302
+ }
303
+
304
+ /* On a brand or wayfinding fill the ring takes the fill's text color. */
305
+ :where(.on-accent, .now-card, .switch-option:has(:checked), .switch-option[aria-selected="true"]) {
306
+ --color-focus-ring: var(--color-on-accent);
307
+ }
308
+
309
+ /* Radios and checkboxes are never stretched; their label is the 44px target. */
310
+ :where(textarea, select, input:not([type="radio"], [type="checkbox"], [type="range"], [type="color"])) { min-block-size: var(--target-min); }
311
+ :where(input[type="radio"], input[type="checkbox"]) { inline-size: 1.25em; block-size: 1.25em; min-block-size: 0; flex: none; }
312
+ :where(label:has(> input[type="radio"], > input[type="checkbox"])) { min-block-size: var(--target-min); display: inline-flex; align-items: center; gap: 0.5em; }
313
+
314
+ @media (prefers-reduced-motion: reduce) {
315
+ *, ::before, ::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
316
+ }
317
+
318
+ :where(ul).tags {
319
+ list-style: none;
320
+ padding-inline-start: 0;
321
+ margin-block-start: 0;
322
+ margin-block-end: 0;
323
+ display: grid;
324
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 12em), 1fr));
325
+ gap: var(--gutter);
326
+
327
+ li {
328
+ display: inline-block;
329
+ margin-inline-end: 0.5em;
330
+ padding: 0.25em 0.5em;
331
+ font-size: var(--font-size-6);
332
+ font-weight: var(--font-weight--medium);
333
+ }
334
+ }
335
+
336
+ a {
337
+ text-decoration: none;
338
+ text-underline-offset: .2ex;
339
+ font-weight: var(--font-weight);
340
+ color: var(--color-link);
341
+
342
+ :where(p, li, dd, blockquote, figcaption) &[href]:not(.cta-link, .header-anchor, .listing-item-more) {
343
+ text-decoration: underline;
344
+ text-decoration-color: color-mix(in oklch, currentColor 45%, transparent);
345
+ text-decoration-thickness: 1px;
346
+ }
347
+
348
+ &:has(img, svg) {
349
+ display: flex;
350
+ aspect-ratio: var(--aspect-ratio, 1 / 1);
351
+ inline-size: var(--image-size, 250px);
352
+ line-height: 1;
353
+
354
+ &.circle {
355
+ shape-outside: circle(80px at 40% 50%) margin-box;
356
+ box-sizing: content-box;
357
+ border-radius: var(--circle-border-radius);
358
+ }
359
+ }
360
+
361
+ &:hover {
362
+ text-decoration: underline;
363
+ text-decoration-color: var(--color-link-hover);
364
+ color: var(--color-link-hover);
365
+ }
366
+
367
+ &:is(:focus, :focus-visible) {
368
+ text-decoration: underline;
369
+ text-decoration-color: var(--color-link-focus);
370
+ color: var(--color-link-focus);
371
+ }
372
+
373
+ &[name]:not([href]) {
374
+ color: inherit;
375
+ }
376
+
377
+ &[aria-current="page"] {
378
+ color: inherit;
379
+ font-weight: var(--font-weight--semi-bold);
380
+ text-decoration: underline;
381
+ text-decoration-color: var(--color-accent-secondary);
382
+ }
383
+
384
+ :where(img) {
385
+ cursor: pointer;
386
+ }
387
+
388
+ @container (inline-size > 0) {
389
+ text-decoration: dotted underline;
390
+ }
391
+ }
392
+
393
+ :where(p, li, blockquote) a:not(.cta-button, .cta-link, .navigation-link, :has(img, svg)),
394
+ .header-summary a:not(.cta-button, .cta-link, .navigation-link, :has(img, svg)) {
395
+ text-decoration: underline;
396
+ text-decoration-color: color-mix(in sRGB, currentColor 45%, transparent);
397
+ text-underline-offset: .2ex;
398
+ }
399
+
400
+ :where(iframe) {
401
+ inline-size: min(var(--video--Width, 100%), 100%);
402
+ block-size: auto;
403
+
404
+ &:where([src*="youtube.com"]) {
405
+ aspect-ratio: 16 / 9;
406
+ }
407
+ }
408
+
409
+ /* The 2.5em floor and full width are for a figure or logo that sets no size of its own. An svg with a `width` or `height` keeps it, and one with a `fill` keeps that. */
410
+ :where(svg:not([width], [height])) {
411
+ inline-size: 100%;
412
+ block-size: auto;
413
+ min-block-size: 2.5em;
414
+ align-self: center;
415
+ }
416
+
417
+ :where(svg:not([fill])) {
418
+ fill: currentColor;
419
+ }
420
+
421
+ /* An icon inside a control or an icon component is sized by that component. */
422
+ :where(norn-icon, [data-icon], button, [role="button"]) svg {
423
+ inline-size: auto;
424
+ min-block-size: 0;
425
+ }
426
+
427
+ :where(label) {
428
+ text-wrap: stable;
429
+ padding-block-start: var(--content-space);
430
+ padding-inline: 0;
431
+ font-weight: var(--font-weight--thin);
432
+ line-height: var(--font-height--spacious);
433
+ color: var(--color-text);
434
+
435
+ :is(+ [disabled], [disabled] + &) {
436
+ color: var(--color-text-muted);
437
+ }
438
+
439
+ &:has(:where(input, textarea, select)) {
440
+ position: relative;
441
+ display: grid;
442
+
443
+ &::after {
444
+ position: absolute;
445
+ content: "";
446
+ pointer-events: none;
447
+ inset-inline-end: 0.75em;
448
+ inset-block-start: calc(1em * var(--font-height--spacious) + 0.2em);
449
+ font-weight: var(--font-weight--bold);
450
+ }
451
+
452
+ &:has(:is(input, textarea, select):user-valid:not(:focus-visible, :disabled, :read-only))::after {
453
+ content: "✓";
454
+ content: "✓" / "";
455
+ color: var(--color-success);
456
+ }
457
+
458
+ &:has(:is(input, textarea, select):user-invalid:not(:focus-visible, :disabled, :read-only))::after {
459
+ content: "!";
460
+ content: "!" / "";
461
+ color: var(--color-error);
462
+ }
463
+
464
+ &:has(+ button) {
465
+ margin-block-end: calc((var(--content-space) / 2) + 1cqi);
466
+ }
467
+ }
468
+ }
469
+
470
+ :where(input, textarea, select, button) {
471
+ font: inherit;
472
+ color: inherit;
473
+ }
474
+
475
+ :where(ul, ol) {
476
+ margin: 0;
477
+
478
+ &:not(:last-child) {
479
+ margin-block-end: 1.5em;
480
+ }
481
+ }
482
+
483
+ :where(li) {
484
+ margin: 0;
485
+
486
+ &:not([class]) {
487
+ font-size: inherit;
488
+ line-height: var(--font-height);
489
+ }
490
+
491
+ :is(b, strong) {
492
+ font-weight: var(--font-weight--semi-bold);
493
+ }
494
+
495
+ &:has(b, strong):not(:last-child) {
496
+ margin-block-end: 0.2em;
497
+ }
498
+ }
499
+
500
+ :where(dl) {
501
+ margin: 0;
502
+ }
503
+
504
+ :where(dt) {
505
+ font-family: var(--sans-font);
506
+ font-weight: var(--font-weight--bold);
507
+ font-size: 1.2em;
508
+ color: var(--color-text-muted);
509
+
510
+ + dd {
511
+ margin-block-end: 1em;
512
+ }
513
+ }
514
+
515
+ :where(dd) {
516
+ margin-inline-start: 0;
517
+ }
518
+
519
+ :where(nav) {
520
+ a {
521
+ color: var(--color-text-muted);
522
+ white-space: nowrap;
523
+
524
+ &:hover {
525
+ color: var(--color-text);
526
+ }
527
+
528
+ span {
529
+ text-decoration: dotted underline;
530
+ text-decoration-color: var(--color-accent);
531
+ }
532
+
533
+ b {
534
+ color: var(--color-accent-text);
535
+ font-weight: var(--font-weight--bold);
536
+ margin-inline-end: calc(var(--content-space) * 3);
537
+ }
538
+ }
539
+ }
540
+
541
+ :is([hidden]) {
542
+ display: none;
543
+ }
544
+
545
+ .sr-only {
546
+ position: absolute;
547
+ inset-block-start: 1em;
548
+ inset-inline-start: 1em;
549
+
550
+ &:focus {
551
+ z-index: 100;
552
+ background: var(--color-surface-overlay);
553
+ color: var(--color-text);
554
+ padding: 0.5em 1em;
555
+ border-radius: var(--standard-border-radius);
556
+ box-shadow: var(--box-shadow);
557
+ }
558
+
559
+ &:not(:focus) {
560
+ clip-path: inset(50%);
561
+ overflow: hidden;
562
+ white-space: nowrap;
563
+ inline-size: 1px;
564
+ block-size: 1px;
565
+ border: 0;
566
+ padding: 0;
567
+ margin: -1px;
568
+ }
569
+ }
570
+
571
+ .print-only {
572
+ display: none;
573
+ }
574
+
575
+ @media print {
576
+ .screen-only {
577
+ display: none;
578
+ }
579
+
580
+ .print-only {
581
+ display: revert;
582
+ }
583
+ }
584
+
585
+ .field-group {
586
+ display: grid;
587
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 12em), 1fr));
588
+ gap: calc((var(--content-space) / 2) + 1cqi);
589
+
590
+ &:has(> *:only-child) {
591
+ grid-template-columns: 1fr;
592
+ }
593
+ }
594
+
595
+ .shadow {
596
+ box-shadow: var(--box-shadow), var(--box-shadow-light);
597
+ }
598
+
599
+ :where(p, cite) {
600
+ font-size: clamp(var(--font-size-5), 1rem + 0.3cqi, 1.125rem);
601
+ font-weight: var(--font-weight);
602
+ line-height: var(--font-height);
603
+
604
+ &:is(.extra) {
605
+ font-size: 1.2em;
606
+
607
+ :is(b, strong) {
608
+ font-weight: var(--font-weight--medium);
609
+ }
610
+ }
611
+
612
+ &:is(.muted),
613
+ :is(.muted) {
614
+ color: var(--color-text-muted);
615
+ }
616
+
617
+ &:is(.align-end) {
618
+ text-align: end;
619
+ }
620
+
621
+ :is(b, strong) {
622
+ font-weight: var(--font-weight--semi-bold);
623
+ }
624
+
625
+ &:is(.underline),
626
+ :is(.underline) {
627
+ font-style: normal;
628
+ text-decoration: underline;
629
+ text-decoration-color: var(--color-accent);
630
+ text-decoration-thickness: 0.2ex;
631
+ }
632
+
633
+ &:is(.balance),
634
+ :is(.balance) {
635
+ text-wrap: balance;
636
+ }
637
+ }
638
+
639
+ :where(h1, h2, h3, h4, h5, h6),
640
+ .title,
641
+ .headline,
642
+ .lede {
643
+ font-family: var(--sans-font);
644
+ color: var(--color-text);
645
+ line-height: var(--font-height--dense);
646
+ margin-block: 0 0.4em;
647
+ text-wrap: balance;
648
+
649
+ &:where(:not(:has(+ *))) {
650
+ margin-block-end: 0;
651
+ }
652
+
653
+ &:is(.accent) {
654
+ color: var(--color-accent-text);
655
+ }
656
+
657
+ a {
658
+ color: inherit;
659
+ font-weight: inherit;
660
+ text-decoration: none;
661
+ }
662
+ }
663
+
664
+ /* Running text keeps a comfortable line even in a wide column. Tables, figures
665
+ and the component lists (which carry role="list") use the whole column. */
666
+ :where(p, dd, blockquote, figcaption),
667
+ :where(ul, ol):not([role="list"]) > :where(li) {
668
+ max-inline-size: var(--measure);
669
+ }
670
+
671
+ /* Headings in the display face; the lede and labels stay in the text face. */
672
+ :where(h1, h2, h3, h4) {
673
+ font-family: var(--display-font);
674
+ letter-spacing: -0.01em;
675
+ }
676
+
677
+ main {
678
+ /* A section opens with a rule and a short accent bar, not an underline:
679
+ an underlined heading reads as a link. */
680
+ :where(h2:not([class])) {
681
+ margin-block-start: calc(var(--content-space) * 2.5);
682
+ padding-block-start: calc(var(--content-space) * 0.75);
683
+ border-block-start: var(--thin-border-width) solid var(--color-border);
684
+ background: linear-gradient(var(--color-accent-secondary), var(--color-accent-secondary)) top left / 2.75rem var(--border-width) no-repeat;
685
+ background-origin: border-box;
686
+ }
687
+
688
+ :where(h3:not([class])) {
689
+ margin-block-start: calc(var(--content-space) * 1.75);
690
+ }
691
+
692
+ :where(h4:not([class]), h5:not([class]), h6:not([class])) {
693
+ margin-block-start: calc(var(--content-space) * 1.25);
694
+ }
695
+ }
696
+
697
+ :where(h1, h2, h3, h4, h5, h6):has(> .header-anchor) {
698
+ position: relative;
699
+ }
700
+
701
+ .header-anchor {
702
+ position: absolute;
703
+ inset-inline-start: -0.85em;
704
+ opacity: 0;
705
+ color: var(--color-text-muted);
706
+ text-decoration: none;
707
+ transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
708
+
709
+ &:is(:hover, :focus-visible) {
710
+ color: var(--color-link);
711
+ }
712
+
713
+ @media (prefers-reduced-motion: reduce) {
714
+ transition: none;
715
+ }
716
+ }
717
+
718
+ :where(h1, h2, h3, h4, h5, h6):is(:hover, :focus-within) > .header-anchor,
719
+ .header-anchor:focus-visible {
720
+ opacity: 1;
721
+ }
722
+
723
+ :where(h1:not([class])) {
724
+ font-weight: var(--font-weight--semi-bold);
725
+ }
726
+
727
+ :where(h2:not([class])) {
728
+ font-weight: var(--font-weight--semi-bold);
729
+ }
730
+
731
+ :where(h3:not([class])) {
732
+ font-weight: var(--font-weight--medium);
733
+ }
734
+
735
+ :where(h4:not([class]), h5:not([class]), h6:not([class])) {
736
+ font-weight: var(--font-weight--medium);
737
+ }
738
+
739
+ .no-wrap {
740
+ word-break: keep-all;
741
+ white-space: nowrap;
742
+
743
+ @media screen and (width <= 480px) {
744
+ white-space: normal;
745
+ }
746
+ }
747
+
748
+ .title {
749
+ font-size: calc(var(--title--FontSize, 1em) + 0.1cqi + 0.3cqb);
750
+ font-weight: var(--font-weight);
751
+ text-transform: var(--title--TextTransform, uppercase);
752
+ text-shadow: 0 0 0.1em var(--color-on-accent);
753
+
754
+ &:is(.highlight) {
755
+ color: var(--color-page);
756
+ z-index: 1;
757
+
758
+ inline-size: max-content;
759
+ max-inline-size: 100%;
760
+
761
+ background: var(--color-accent);
762
+ padding-block: 0.12em 0.22em;
763
+ padding-inline: 0.5em;
764
+
765
+ &.from-end {
766
+ transform-origin: right;
767
+ }
768
+
769
+ /* Subtle titles — and linked titles while hovered/focused — drop the fill
770
+ for a simple underline. */
771
+ &.subtle,
772
+ &:not(.subtle):has(a:is(:hover, :focus, :focus-visible)) {
773
+ color: inherit;
774
+
775
+ background: none;
776
+ padding-block-end: 0.1em;
777
+ padding-inline: 0;
778
+ border-block-end: calc(var(--border-width) * 4) solid var(--color-accent);
779
+ }
780
+
781
+ a {
782
+ text-decoration-line: none;
783
+ }
784
+
785
+ &:not(:only-child) {
786
+ margin-block-end: 1em;
787
+ }
788
+ }
789
+ }
790
+
791
+ .headline {
792
+ font-size: max(calc(var(--headline--FontSize, 10px) + 2.5cqi + 1cqb), var(--font-size-5));
793
+ font-weight: var(--font-weight);
794
+
795
+ text-wrap: balance;
796
+
797
+ .band:not(.hero) &:not(.company-name) {
798
+ text-decoration: underline;
799
+ text-decoration-thickness: calc(var(--border-width) * 4);
800
+ text-decoration-color: var(--color-accent);
801
+ }
802
+
803
+ @media (prefers-color-scheme: dark) {
804
+ font-weight: var(--font-weight);
805
+ }
806
+ }
807
+
808
+ .lede {
809
+ text-wrap: balance;
810
+ font-family: var(--sans-font);
811
+ font-size: max(calc(var(--lede--FontSize, 1em) + .2cqi + .2cqb), var(--font-size-5));
812
+ font-weight: var(--font-weight--light);
813
+ line-height: var(--font-height);
814
+
815
+ @media screen and (width <= 612px) {
816
+ --lede--FontSize: .9em;
817
+ }
818
+
819
+ @media screen and (width <= 480px) {
820
+ --lede--FontSize: .8em;
821
+ }
822
+
823
+ @container box (width <= 500px) {
824
+ font-weight: var(--font-weight);
825
+ }
826
+
827
+ &.accent {
828
+ --lede--FontSize: 1.6em;
829
+ line-height: var(--font-height--dense);
830
+ }
831
+ }
832
+
833
+ .signature {
834
+ font-family: var(--signature-font);
835
+ font-size: 1.2em;
836
+ font-weight: var(--font-weight--medium);
837
+ line-height: var(--font-height--dense);
838
+
839
+ :is(b, strong) {
840
+ font-weight: var(--font-weight--bold);
841
+ }
842
+ }
843
+
844
+ @container style(--context: brand) {
845
+ .signature {
846
+ font-size: 2em;
847
+ }
848
+
849
+ .signature .dash {
850
+ color: var(--color-accent);
851
+ }
852
+ }
853
+
854
+ .metadata {
855
+ font-weight: var(--font-weight--light);
856
+ color: var(--color-text-muted);
857
+ font-size: var(--font-size-5);
858
+ }
859
+
860
+ .date {
861
+ font-weight: var(--font-weight--light);
862
+ }
863
+
864
+ .content {
865
+ font-size: var(--font-size-5);
866
+ max-inline-size: min(80ch, 100%);
867
+
868
+ font-optical-sizing: auto;
869
+ -webkit-font-smoothing: antialiased;
870
+ -moz-osx-font-smoothing: grayscale;
871
+
872
+ > *:not(:last-child) {
873
+ margin-block-end: min(1em, calc(var(--content-space) * 2));
874
+ }
875
+
876
+ section:has(+ section) {
877
+ margin-block-end: min(2em, calc(var(--content-space) * 4));
878
+ }
879
+
880
+ &:has(+ .content) {
881
+ margin-block-end: var(--content-space);
882
+ }
883
+ }
884
+
885
+ .stacked {
886
+ display: flex;
887
+ flex-direction: column;
888
+ gap: var(--content-space);
889
+ }
890
+
891
+ eyebrow + :where(h1, h2, h3, h4, h5, h6) {
892
+ margin-block-start: calc(var(--gutter) * 2);
893
+ }
894
+
895
+ /* ---- Reading column ---- */
896
+ .content-column {
897
+ box-sizing: border-box;
898
+ inline-size: 100%;
899
+ padding-block: calc(var(--section-space) / 2) var(--section-space);
900
+
901
+ > section + section {
902
+ margin-block-start: var(--section-space);
903
+ }
904
+
905
+ > section > header {
906
+ margin-block: calc(var(--content-space) * 1.5) calc(var(--content-space) * 1);
907
+ }
908
+
909
+ > header {
910
+ margin-block-end: calc(var(--content-space) * 2);
911
+ }
912
+
913
+ p:has(+ .prompt--avoid) {
914
+ display: flex;
915
+ gap: 0.5em;
916
+
917
+ &::before {
918
+ content: "\2715";
919
+ content: "\2715" / "";
920
+ flex: none;
921
+ color: var(--color-error);
922
+ }
923
+ }
924
+
925
+ @media print {
926
+ max-inline-size: 100%;
927
+ padding: 0;
928
+ }
929
+ }
930
+
931
+ /* ---- Muted text ----
932
+ Global counterpart to typography's paragraph-scoped `.muted`. */
933
+ .muted {
934
+ color: var(--color-text-muted);
935
+ }
936
+
937
+ /* ---- Checklist ---- */
938
+ .checklist {
939
+ list-style: none;
940
+ margin: 0;
941
+ padding-inline-start: 0;
942
+
943
+ li {
944
+ padding-inline-start: 1.6em;
945
+ text-indent: -1.6em;
946
+
947
+ &::before {
948
+ content: "☐" / "";
949
+ display: inline-block;
950
+ inline-size: 1.6em;
951
+ text-indent: 0;
952
+ color: var(--color-accent-text);
953
+ }
954
+ }
955
+
956
+ li + li {
957
+ margin-block-start: calc(var(--content-space) / 3);
958
+ }
959
+ }
960
+
961
+ /* ---- Meta grid ---- */
962
+ .meta-grid {
963
+ display: grid;
964
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 14em), 1fr));
965
+ gap: var(--content-space);
966
+
967
+ dt {
968
+ font-size: var(--font-size-6);
969
+ text-transform: uppercase;
970
+ letter-spacing: 0.05em;
971
+ }
972
+
973
+ dd {
974
+ margin: 0;
975
+ }
976
+
977
+ ul {
978
+ list-style: none;
979
+ margin: 0;
980
+ padding: 0;
981
+ }
982
+ }
983
+
984
+ /* ---- Side columns ----
985
+ A contents column beside a document (and beside the syllabus, whose own
986
+ component sets where it sits), and an outline and a tools rail beside
987
+ a lesson plan. Only the syllabus's list is sticky, and each falls to one
988
+ column on a narrow screen, the side columns first. */
989
+ .rail-label {
990
+ margin: 0 0 0.5em;
991
+ color: var(--color-text-muted);
992
+ font-family: var(--sans-font, inherit);
993
+ font-size: var(--font-size-6);
994
+ font-weight: var(--font-weight--medium);
995
+ letter-spacing: 0.08em;
996
+ text-transform: uppercase;
997
+ }
998
+
999
+ body:has(.doc-layout[data-contents="true"], .lesson-layout) {
1000
+ --page-column: min(var(--container-max), 95%);
1001
+ }
1002
+
1003
+ .doc-layout[data-contents="true"],
1004
+ .lesson-layout {
1005
+ display: grid;
1006
+ align-items: start;
1007
+ gap: 0 calc(var(--content-space) * 3);
1008
+
1009
+ @media print {
1010
+ display: block;
1011
+ }
1012
+ }
1013
+
1014
+ .doc-layout[data-contents="true"] {
1015
+ grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
1016
+
1017
+ @media screen and (width <= 900px) {
1018
+ grid-template-columns: minmax(0, 1fr);
1019
+ }
1020
+ }
1021
+
1022
+ .lesson-layout {
1023
+ grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) minmax(0, 16rem);
1024
+
1025
+ @media screen and (width <= 1100px) {
1026
+ grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
1027
+
1028
+ .lesson-rail {
1029
+ grid-column: 2;
1030
+ }
1031
+ }
1032
+
1033
+ @media screen and (width <= 900px) {
1034
+ grid-template-columns: minmax(0, 1fr);
1035
+
1036
+ .lesson-rail {
1037
+ grid-column: auto;
1038
+ }
1039
+ }
1040
+ }
1041
+
1042
+ .doc-contents,
1043
+ .lesson-outline,
1044
+ .lesson-rail {
1045
+ padding-block: calc(var(--section-space) / 2) 0;
1046
+ font-size: max(var(--base-font-size), 0.95em);
1047
+
1048
+ @media print {
1049
+ display: none;
1050
+ }
1051
+ }
1052
+
1053
+ :is(.doc-contents nav, .lesson-outline, .lesson-rail nav, .syllabus-contents) > :is(ol, ul) {
1054
+ margin: 0;
1055
+ padding: 0;
1056
+ list-style: none;
1057
+ border-inline-start: var(--border-width) solid var(--color-border);
1058
+
1059
+ :is(ol, ul) {
1060
+ margin: 0 0 0 0.9em;
1061
+ padding: 0;
1062
+ list-style: none;
1063
+ }
1064
+
1065
+ li a[href] {
1066
+ display: block;
1067
+ margin-inline-start: calc(var(--border-width) * -1);
1068
+ padding: 0.35em 0.9em;
1069
+ border-inline-start: var(--border-width) solid transparent;
1070
+ color: var(--color-text-muted);
1071
+ text-decoration: none;
1072
+
1073
+ &:is(:hover, :focus-visible) {
1074
+ color: var(--color-text);
1075
+ text-decoration: underline;
1076
+ }
1077
+
1078
+ &[aria-current] {
1079
+ border-inline-start-color: var(--color-accent-secondary);
1080
+ color: var(--color-text);
1081
+ font-weight: var(--font-weight--semi-bold);
1082
+ }
1083
+
1084
+ }
1085
+ }
1086
+
1087
+ .lesson-rail {
1088
+ display: grid;
1089
+ gap: var(--section-space);
1090
+ inline-size: auto;
1091
+ margin: 0;
1092
+ padding-inline: 0;
1093
+ border: 0;
1094
+ background: none;
1095
+
1096
+ @media screen and (width <= 900px) {
1097
+ padding-block-end: var(--section-space);
1098
+ }
1099
+ }
1100
+
1101
+ /* ---- Lesson plans (instructor) ---- */
1102
+ .lesson-nav {
1103
+ display: flex;
1104
+ gap: calc(var(--content-space) * 2);
1105
+ justify-content: space-between;
1106
+ margin-block-end: var(--section-space);
1107
+
1108
+ header & a {
1109
+ margin: 0;
1110
+ }
1111
+
1112
+ @media print {
1113
+ display: none;
1114
+ }
1115
+ }
1116
+
1117
+ .lesson-plan {
1118
+ .lesson-when {
1119
+ font-size: 1.1em;
1120
+ margin-block: 0;
1121
+ display: flex;
1122
+ gap: calc(var(--gutter) * 2);
1123
+ }
1124
+
1125
+ .lesson-heading {
1126
+ margin-block-end: 0;
1127
+ }
1128
+ }
1129
+
1130
+ .separators {
1131
+ display: flex;
1132
+ flex-wrap: wrap;
1133
+ gap: calc(var(--gutter) * 2);
1134
+
1135
+ > *:not(:last-child)::after {
1136
+ content: "⏺";
1137
+ padding-inline-start: calc(var(--gutter) * 2);
1138
+ font-size: 50%;
1139
+ vertical-align: middle;
1140
+ }
1141
+ }
1142
+
1143
+ .lesson-list {
1144
+ td {
1145
+ font-size: max(var(--base-font-size), 0.95em);
1146
+ }
1147
+
1148
+ .no-class {
1149
+ font-style: italic;
1150
+ }
1151
+ }
1152
+
1153
+ :where(dialog) {
1154
+ background-color: var(--color-page);
1155
+ max-inline-size: 40rem;
1156
+ margin: auto;
1157
+
1158
+ &::backdrop {
1159
+ background-color: rgb(0 0 0 / 50%);
1160
+ backdrop-filter: blur(2px);
1161
+ }
1162
+
1163
+ @media only screen and (width <= 720px) {
1164
+ max-inline-size: calc(100vw - 2rem);
1165
+ }
1166
+ }
1167
+
1168
+ :where(details) {
1169
+ background-color: var(--color-surface-subtle);
1170
+
1171
+ > *:not(summary) {
1172
+ padding-inline-start: 1em;
1173
+ }
1174
+
1175
+ @media print {
1176
+ &::details-content {
1177
+ content-visibility: visible;
1178
+ }
1179
+ }
1180
+ }
1181
+
1182
+ :where(tbody tr:nth-child(even)) {
1183
+ background-color: var(--color-surface-subtle);
1184
+ }
1185
+
1186
+ /* ---- Table baseline (formerly simple.css) ---- */
1187
+ /* Tables read like a printed table: a heavy rule above and below, a light
1188
+ rule under the header and between rows, and no boxes. */
1189
+ :where(table) {
1190
+ border-collapse: collapse;
1191
+ margin-block: 1.5rem;
1192
+ border-block: var(--border-width) solid var(--color-text-muted);
1193
+ font-variant-numeric: tabular-nums;
1194
+
1195
+ > :where(caption) {
1196
+ font-weight: var(--font-weight--bold);
1197
+ margin-block-end: 0.5rem;
1198
+ }
1199
+
1200
+ :is(th, td).center {
1201
+ text-align: center;
1202
+ }
1203
+ }
1204
+
1205
+ /* ---- Lightweight table styles ---- */
1206
+ .table-light {
1207
+ border-collapse: collapse;
1208
+
1209
+ th,
1210
+ td {
1211
+ border-inline: none;
1212
+ }
1213
+ }
1214
+
1215
+ figure > :where(table) {
1216
+ inline-size: max-content;
1217
+ margin: 0;
1218
+ }
1219
+
1220
+ :where(td, th) {
1221
+ border: 0;
1222
+ border-block-end: var(--thin-border-width) solid var(--color-border);
1223
+ text-align: start;
1224
+ padding: 0.55rem 0.75rem;
1225
+ }
1226
+
1227
+ :where(tbody tr:last-child > :is(td, th)) {
1228
+ border-block-end: 0;
1229
+ }
1230
+
1231
+ :where(thead th) {
1232
+ border-block-end: var(--thin-border-width) solid var(--color-text-muted);
1233
+ background-color: var(--color-table-header);
1234
+ color: var(--color-text-muted);
1235
+ font-size: var(--font-size-6);
1236
+ font-weight: var(--font-weight--semi-bold);
1237
+ letter-spacing: 0.06em;
1238
+ text-transform: uppercase;
1239
+ }
1240
+
1241
+ :where(tbody th) {
1242
+ font-weight: var(--font-weight--semi-bold);
1243
+ }
1244
+
1245
+ /* ---- Prompt figures (```prompt fences — prose to say to an assistant) ---- */
1246
+ .prompt {
1247
+ position: relative;
1248
+ margin-block: var(--content-space);
1249
+ margin-inline: 0;
1250
+ padding: 1em 1.25em;
1251
+ background-color: var(--color-surface);
1252
+ border: var(--thin-border-width) solid var(--color-border);
1253
+ border-radius: var(--standard-border-radius);
1254
+ color: var(--color-text);
1255
+
1256
+ p {
1257
+ margin: 0;
1258
+ font-size: var(--font-size-5);
1259
+
1260
+ + p {
1261
+ margin-block-start: 0.75em;
1262
+ }
1263
+ }
1264
+
1265
+ &[data-copyable] {
1266
+ padding-inline-end: 3.2em;
1267
+ }
1268
+
1269
+ /* The examples to recognize and not use: same shape, dashed and muted,
1270
+ and copy.js gives them no copy control. */
1271
+ &.prompt-avoid {
1272
+ border-style: dashed;
1273
+ background-color: transparent;
1274
+ color: var(--color-text-muted);
1275
+ }
1276
+
1277
+ &.prompt--avoid {
1278
+ background-color: color-mix(in sRGB, var(--color-error) 7%, transparent);
1279
+ border: var(--thin-border-width) dashed color-mix(in sRGB, var(--color-error) 55%, transparent);
1280
+ color: var(--color-text-muted);
1281
+
1282
+ user-select: none;
1283
+ }
1284
+ }
1285
+
1286
+ .prompt-copy {
1287
+ position: absolute;
1288
+ inset-block-start: 0.5em;
1289
+ inset-inline-end: 0.5em;
1290
+ display: flex;
1291
+ align-items: center;
1292
+ justify-content: center;
1293
+ inline-size: 2.2em;
1294
+ block-size: 2.2em;
1295
+ padding: 0.4em;
1296
+ margin-block: 0.85em 0;
1297
+ margin-inline-start: auto;
1298
+ background: transparent;
1299
+ color: var(--color-text-muted);
1300
+ border: var(--thin-border-width) solid var(--color-border);
1301
+ border-radius: var(--standard-border-radius);
1302
+ cursor: pointer;
1303
+ font-size: max(var(--base-font-size), 0.85em);
1304
+
1305
+ &:is(:hover, :focus-visible) {
1306
+ border-color: var(--color-accent);
1307
+ color: var(--color-accent);
1308
+ background-color: var(--color-surface-accent);
1309
+ }
1310
+
1311
+ :where(svg) {
1312
+ inline-size: auto;
1313
+ min-block-size: 0;
1314
+ fill: none;
1315
+ stroke: currentColor;
1316
+ }
1317
+
1318
+ @media print {
1319
+ display: none;
1320
+ }
1321
+ }
1322
+
1323
+ /* ---- Blockquote ---- */
1324
+ blockquote {
1325
+ margin-block: calc(var(--content-space) * 2);
1326
+ margin-inline: 0;
1327
+ padding: 0;
1328
+ border: none;
1329
+
1330
+ color: var(--color-text);
1331
+ font-size: 1.15em;
1332
+ font-style: normal;
1333
+ line-height: 1.45;
1334
+ text-wrap: pretty;
1335
+
1336
+ &::before {
1337
+ content: "";
1338
+ display: block;
1339
+ inline-size: 2.5rem;
1340
+ block-size: 3px;
1341
+ margin-block-end: 0.9rem;
1342
+ background-color: var(--color-accent);
1343
+ }
1344
+
1345
+ > :first-child {
1346
+ margin-block-start: 0;
1347
+ }
1348
+
1349
+ > :last-child {
1350
+ margin-block-end: 0;
1351
+ }
1352
+
1353
+
1354
+ @media print {
1355
+ &::before {
1356
+ background-color: var(--color-text);
1357
+ }
1358
+ }
1359
+
1360
+ &:is(.quote, :has(cite)) {
1361
+ position: relative;
1362
+ padding-inline-start: 2.25rem;
1363
+
1364
+ color: var(--color-text-muted);
1365
+ font-size: 1em;
1366
+ line-height: var(--font-height--spacious);
1367
+
1368
+ &::before {
1369
+ content: "\201C";
1370
+ content: "\201C" / "";
1371
+ position: absolute;
1372
+ inset-inline-start: 0;
1373
+ inset-block-start: -0.3em;
1374
+ display: block;
1375
+ inline-size: auto;
1376
+ block-size: auto;
1377
+ margin: 0;
1378
+
1379
+ background: none;
1380
+ color: var(--color-accent);
1381
+ font-size: 2.75rem;
1382
+ line-height: 1;
1383
+ }
1384
+
1385
+ cite {
1386
+ display: block;
1387
+ margin-block-start: 0.75em;
1388
+
1389
+ color: var(--color-text-muted);
1390
+ font-size: max(var(--base-font-size), 0.9em);
1391
+ font-style: normal;
1392
+
1393
+ &::before {
1394
+ content: "— ";
1395
+ }
1396
+ }
1397
+ }
1398
+ }
1399
+
1400
+ /* ---- Callout ---- */
1401
+ .callout {
1402
+ --color-callout: var(--color-accent);
1403
+
1404
+ border-inline-start: var(--thick-border-width) solid var(--color-callout);
1405
+ background-color: color-mix(in sRGB, var(--color-callout) 10%, var(--color-page));
1406
+ border-radius: var(--standard-border-radius);
1407
+ padding: 1em 1.25em;
1408
+
1409
+ &:is(.success, [type="success"]) {
1410
+ --color-callout: var(--color-success);
1411
+ }
1412
+
1413
+ &:is(.warn, [type="warn"]) {
1414
+ --color-callout: var(--color-warning-edge);
1415
+ }
1416
+
1417
+ &:is(.error, [type="error"]) {
1418
+ --color-callout: var(--color-error);
1419
+ }
1420
+
1421
+ > :first-child {
1422
+ margin-block-start: 0;
1423
+ }
1424
+
1425
+ > :last-child {
1426
+ margin-block-end: 0;
1427
+ }
1428
+
1429
+ /* The type in words, so it is never told by color alone. */
1430
+ > .callout-label {
1431
+ margin-block-end: 0.35em;
1432
+ color: var(--color-text);
1433
+ font-size: var(--font-size-6);
1434
+ font-weight: var(--font-weight--semi-bold);
1435
+ letter-spacing: 0.06em;
1436
+ text-transform: uppercase;
1437
+
1438
+ + * {
1439
+ margin-block-start: 0;
1440
+ }
1441
+ }
1442
+
1443
+ @media print {
1444
+ background-color: transparent;
1445
+ }
1446
+ }
1447
+
1448
+ /* ---- Disclosure list ---- */
1449
+ .disclosures {
1450
+ --disclosure-gutter: 1.6em;
1451
+
1452
+ border-block-start: var(--thin-border-width) solid var(--color-border);
1453
+
1454
+ /* A reading measure inside the wide page column. */
1455
+ p {
1456
+ max-inline-size: 80ch;
1457
+ }
1458
+
1459
+ details {
1460
+ margin-block: 0;
1461
+ padding: 0;
1462
+ /* The summary is 44px tall (WCAG 2.5.5), so the rows need little more space. */
1463
+ padding-block: 0.25em;
1464
+
1465
+ background: none;
1466
+ border: none;
1467
+ border-block-end: var(--thin-border-width) solid var(--color-border);
1468
+ border-radius: 0;
1469
+
1470
+ > :not(summary) {
1471
+ margin-block: 0 1.15em;
1472
+ padding-inline-start: var(--disclosure-gutter);
1473
+ }
1474
+
1475
+ /* The answer belongs to the question above it, so it sits close. */
1476
+ > :not(summary):first-of-type {
1477
+ margin-block-start: 0;
1478
+ }
1479
+ }
1480
+
1481
+ summary {
1482
+ display: flex;
1483
+ align-items: center;
1484
+ min-block-size: var(--target-min);
1485
+ margin: 0;
1486
+ padding: 0;
1487
+
1488
+ background: none;
1489
+ border: none;
1490
+ color: var(--color-text);
1491
+ font-weight: var(--font-weight--semi-bold);
1492
+ list-style: none;
1493
+ text-wrap: pretty;
1494
+
1495
+ &::-webkit-details-marker {
1496
+ display: none;
1497
+ }
1498
+
1499
+ &::before {
1500
+ content: "+";
1501
+ content: "+" / "";
1502
+ flex: none;
1503
+ inline-size: var(--disclosure-gutter);
1504
+
1505
+ color: var(--color-accent-text);
1506
+ font-weight: var(--font-weight);
1507
+ }
1508
+
1509
+ &:hover {
1510
+ color: var(--color-link-hover);
1511
+ cursor: pointer;
1512
+ }
1513
+ }
1514
+
1515
+ /* Open: the question tightens onto its answer, and the marker flips. */
1516
+ details[open] > summary {
1517
+ padding-block-end: 0.4em;
1518
+ margin-block-end: 0.5rem;
1519
+
1520
+ &::before {
1521
+ content: "\2212";
1522
+ content: "\2212" / "";
1523
+ }
1524
+ }
1525
+ }
1526
+
1527
+ /* ---- Misc baseline elements (formerly simple.css) ---- */
1528
+ :where(p, h1, h2, h3, h4, h5, h6) {
1529
+ overflow-wrap: break-word;
1530
+ }
1531
+
1532
+ :where(abbr)[title] {
1533
+ cursor: help;
1534
+ text-decoration-line: underline;
1535
+ text-decoration-style: dotted;
1536
+ }
1537
+
1538
+ :where(pre) {
1539
+ padding-block: 1rem;
1540
+ padding-inline: 1.4rem;
1541
+ max-inline-size: 100%;
1542
+ overflow: auto;
1543
+ }
1544
+
1545
+ /* ---- Code blocks ----
1546
+ A fenced sample (lib/markdown.js): a bar in the language's color inside the
1547
+ top border, a title bar (language, then file name, then the copy button
1548
+ added by /js/copy.js), and the lines. Line numbers are CSS counters, so
1549
+ selecting or copying never takes them. */
1550
+ .code-block {
1551
+ --code-edge: var(--color-code-edge-neutral);
1552
+
1553
+ position: relative;
1554
+ margin-block: 0 1rem;
1555
+ margin-inline: 0;
1556
+ max-inline-size: 100%;
1557
+ border: var(--thin-border-width) solid var(--color-border);
1558
+ border-radius: 3px;
1559
+ background-color: var(--color-code-surface);
1560
+ color: var(--color-code-text);
1561
+ overflow: hidden;
1562
+
1563
+ &::before {
1564
+ content: "";
1565
+ display: block;
1566
+ block-size: 4px;
1567
+ background-color: var(--code-edge);
1568
+ }
1569
+
1570
+ &[data-edge="css"] { --code-edge: var(--color-code-edge-css); }
1571
+ &[data-edge="js"] { --code-edge: var(--color-code-edge-js); }
1572
+ &[data-edge="html"] { --code-edge: var(--color-code-edge-html); }
1573
+ &[data-edge="shell"] { --code-edge: var(--color-code-edge-shell); }
1574
+
1575
+ .code-block-head {
1576
+ display: flex;
1577
+ align-items: center;
1578
+ gap: 0.75em;
1579
+ min-block-size: var(--target-min);
1580
+ padding-inline: 1rem 3.25rem;
1581
+ border-block-end: var(--thin-border-width) solid var(--color-border);
1582
+ font-size: 0.875rem;
1583
+ max-inline-size: none;
1584
+ }
1585
+
1586
+ .code-block-lang {
1587
+ font-family: var(--sans-font);
1588
+ font-weight: var(--font-weight--semi-bold);
1589
+ color: var(--color-text);
1590
+ }
1591
+
1592
+ .code-block-file {
1593
+ font-family: var(--mono-font);
1594
+ color: var(--color-text-muted);
1595
+ overflow: hidden;
1596
+ text-overflow: ellipsis;
1597
+ white-space: nowrap;
1598
+ }
1599
+
1600
+ .code-copy {
1601
+ position: absolute;
1602
+ inset-block-start: 4px;
1603
+ inset-inline-end: 0;
1604
+ display: grid;
1605
+ place-items: center;
1606
+ inline-size: var(--target-min);
1607
+ block-size: var(--target-min);
1608
+ padding: 0;
1609
+ border: 0;
1610
+ border-radius: 50%;
1611
+ background: none;
1612
+ color: var(--color-code-keyword);
1613
+ cursor: pointer;
1614
+
1615
+ svg { inline-size: 1.2em; block-size: 1.2em; }
1616
+
1617
+ @media print { display: none; }
1618
+ }
1619
+
1620
+ pre {
1621
+ margin: 0;
1622
+ border: 0;
1623
+ border-radius: 0;
1624
+ background: none;
1625
+ padding-inline: 0;
1626
+ }
1627
+
1628
+ code {
1629
+ display: block;
1630
+ min-inline-size: max-content;
1631
+ counter-reset: line;
1632
+ }
1633
+
1634
+ br { display: none; }
1635
+
1636
+ .highlight-line {
1637
+ display: block;
1638
+ padding-inline: 1.25rem;
1639
+ border-inline-start: 3px solid transparent;
1640
+ }
1641
+
1642
+ &[data-line-numbers] .highlight-line::before {
1643
+ counter-increment: line;
1644
+ content: counter(line);
1645
+ display: inline-block;
1646
+ inline-size: 2.5em;
1647
+ margin-inline: -0.5rem 1.25em;
1648
+ text-align: end;
1649
+ color: var(--color-code-comment);
1650
+ user-select: none;
1651
+ }
1652
+
1653
+ /* The 3px start edge carries the signal; the wash stays faint enough for every token to keep 7:1. */
1654
+ .highlight-line-active {
1655
+ background: var(--color-highlight-line);
1656
+ border-inline-start: 3px solid var(--color-accent-secondary);
1657
+ }
1658
+
1659
+ .token:is(.keyword, .atrule, .rule, .important, .selector) { color: var(--color-code-keyword); }
1660
+ .token:is(.string, .attr-value, .char, .regex, .url) { color: var(--color-code-string); }
1661
+ .token:is(.function, .class-name, .tag, .property, .attr-name, .builtin) { color: var(--color-code-function); }
1662
+ .token:is(.number, .boolean, .constant, .unit) { color: var(--color-code-number); }
1663
+ .token:is(.comment, .prolog, .doctype) { color: var(--color-code-comment); font-style: italic; }
1664
+ }
1665
+
1666
+ :where(kbd) {
1667
+ font-family: var(--mono-font);
1668
+ color: var(--color-code);
1669
+ border: var(--border-width) solid var(--color-code);
1670
+ border-block-end-width: 3px;
1671
+ border-radius: var(--standard-border-radius);
1672
+ padding-block: 0.1rem;
1673
+ padding-inline: 0.4rem;
1674
+ }
1675
+
1676
+ :where(hr) {
1677
+ border: none;
1678
+ block-size: var(--border-width);
1679
+ background: var(--color-border);
1680
+ margin-block: 1rem;
1681
+ margin-inline: auto;
1682
+ }
1683
+
1684
+ :where(mark) {
1685
+ padding-block: 2px;
1686
+ padding-inline: 5px;
1687
+ border-radius: var(--standard-border-radius);
1688
+ background-color: var(--color-highlight);
1689
+ color: black;
1690
+
1691
+ a {
1692
+ color: var(--color-link);
1693
+ }
1694
+ }
1695
+
1696
+ :where(img, video) {
1697
+ max-inline-size: 100%;
1698
+ block-size: auto;
1699
+ border-radius: var(--standard-border-radius);
1700
+ }
1701
+
1702
+ :where(figure) {
1703
+ margin: 0;
1704
+ display: block;
1705
+ overflow-x: auto;
1706
+
1707
+ > :where(img),
1708
+ > picture > :where(img) {
1709
+ display: block;
1710
+ margin-inline: auto;
1711
+ }
1712
+ }
1713
+
1714
+ :where(figcaption) {
1715
+ position: sticky;
1716
+ inset-inline-start: 0;
1717
+ text-align: center;
1718
+ font-size: 0.9rem;
1719
+ color: var(--color-text-muted);
1720
+ margin-block: 1rem;
1721
+ }
1722
+
1723
+ :where(sup, sub) {
1724
+ vertical-align: baseline;
1725
+ position: relative;
1726
+ }
1727
+
1728
+ :where(sup) {
1729
+ inset-block-start: -0.4em;
1730
+ }
1731
+
1732
+ :where(sub) {
1733
+ inset-block-start: 0.3em;
1734
+ }
1735
+
1736
+ /* ---- Form controls (formerly simple.css) ---- */
1737
+ :where(textarea, select, input, button),
1738
+ .button {
1739
+ font-size: inherit;
1740
+ font-family: inherit;
1741
+ padding: 0.5em;
1742
+ margin-block-end: 0.5rem;
1743
+ border-radius: var(--standard-border-radius);
1744
+ box-shadow: none;
1745
+ max-inline-size: 100%;
1746
+ display: inline-block;
1747
+ }
1748
+
1749
+ :where(button, input[type="submit"], input[type="reset"], input[type="button"]),
1750
+ .button {
1751
+ line-height: normal;
1752
+ }
1753
+
1754
+ :where(textarea, select, input) {
1755
+ color: var(--color-text);
1756
+ background-color: var(--color-page);
1757
+ border: var(--border-width) solid var(--color-border);
1758
+
1759
+ @media only screen and (width <= 720px) {
1760
+ inline-size: 100%;
1761
+ }
1762
+ }
1763
+
1764
+ :where(label) {
1765
+ display: block;
1766
+ }
1767
+
1768
+ :where(textarea:not([cols])) {
1769
+ inline-size: 100%;
1770
+ }
1771
+
1772
+ :where(select:not([multiple])) {
1773
+ background-image: linear-gradient(45deg, transparent 49%, var(--color-text) 51%),
1774
+ linear-gradient(135deg, var(--color-text) 51%, transparent 49%);
1775
+ background-position: calc(100% - 15px), calc(100% - 10px);
1776
+ background-size: 5px 5px, 5px 5px;
1777
+ background-repeat: no-repeat;
1778
+ padding-inline-end: 25px;
1779
+
1780
+ *[dir="rtl"] & {
1781
+ background-position: 10px, 15px;
1782
+ }
1783
+ }
1784
+
1785
+ :where(input[type="checkbox"], input[type="radio"]) {
1786
+ vertical-align: middle;
1787
+ position: relative;
1788
+ inline-size: min-content;
1789
+
1790
+ + label {
1791
+ display: inline-block;
1792
+ }
1793
+
1794
+ &:checked {
1795
+ background-color: var(--color-accent);
1796
+ }
1797
+ }
1798
+
1799
+ :where(input[type="radio"]) {
1800
+ border-radius: var(--circle-border-radius);
1801
+
1802
+ &:checked::after {
1803
+ content: " ";
1804
+ inline-size: 0.3em;
1805
+ block-size: 0.3em;
1806
+ border-radius: var(--circle-border-radius);
1807
+ position: absolute;
1808
+ inset-block-start: 0.125em;
1809
+ background-color: var(--color-page);
1810
+ inset-inline-start: 0.125em;
1811
+ font-size: 1.8em;
1812
+ }
1813
+ }
1814
+
1815
+ :where(input[type="checkbox"]:checked::after) {
1816
+ content: " ";
1817
+ inline-size: 0.2em;
1818
+ block-size: 0.4em;
1819
+ border-radius: 0;
1820
+ position: absolute;
1821
+ inset-block-start: 0.04em;
1822
+ inset-inline-start: 0.18em;
1823
+ background-color: transparent;
1824
+ border-inline-end: solid var(--color-page) 0.08em;
1825
+ border-block-end: solid var(--color-page) 0.08em;
1826
+ font-size: 1.8em;
1827
+ transform: rotate(45deg);
1828
+ }
1829
+
1830
+ :where(input[type="color"]) {
1831
+ block-size: 2.5rem;
1832
+ padding: 0.2rem;
1833
+ }
1834
+
1835
+ :where(input[type="file"]) {
1836
+ border: 0;
1837
+ }
1838
+
1839
+ /* ---- Progress bars ---- */
1840
+ :where(progress) {
1841
+ inline-size: 100%;
1842
+
1843
+ &:indeterminate {
1844
+ background-color: var(--color-surface-accent);
1845
+
1846
+ &::-moz-progress-bar {
1847
+ background-color: var(--color-surface-accent);
1848
+ }
1849
+ }
1850
+
1851
+ &::-webkit-progress-bar {
1852
+ border-radius: var(--standard-border-radius);
1853
+ background-color: var(--color-surface-accent);
1854
+ }
1855
+
1856
+ &::-webkit-progress-value {
1857
+ border-radius: var(--standard-border-radius);
1858
+ background-color: var(--color-accent-secondary);
1859
+ }
1860
+
1861
+ &::-moz-progress-bar {
1862
+ border-radius: var(--standard-border-radius);
1863
+ background-color: var(--color-accent-secondary);
1864
+ transition-property: inline-size;
1865
+ transition-duration: 0.3s;
1866
+ }
1867
+ }
1868
+
1869
+
1870
+ /* ---- Due chips and their key ----
1871
+ A deadline's kind as a pill: tests outlined in the accent, graded work on
1872
+ an accent wash, readings on a strong outline, practice dashed (not graded).
1873
+ The word carries the meaning; the shape only reinforces it. Used by
1874
+ schedule-weeks, assigned-list and course-now. */
1875
+ .due-chip {
1876
+ display: inline-block;
1877
+ padding-inline: 0.5em;
1878
+ border: var(--thin-border-width) solid transparent;
1879
+ border-radius: var(--radius-pill);
1880
+ color: var(--color-text);
1881
+ font-size: max(var(--base-font-size), 0.875em);
1882
+ font-weight: var(--font-weight--semi-bold);
1883
+ line-height: 1.4;
1884
+ vertical-align: 0.05em;
1885
+
1886
+ &[data-kind="test"] { border: var(--border-width) solid var(--color-accent); }
1887
+ &[data-kind="graded"] { background-color: var(--color-surface-accent); border-color: var(--color-accent); }
1888
+ &[data-kind="reading"] { border-color: var(--color-border-strong); }
1889
+ &[data-kind="practice"] { border: var(--thin-border-width) dashed var(--color-border-strong); font-weight: var(--font-weight); }
1890
+ }
1891
+
1892
+ .due-key {
1893
+ display: flex;
1894
+ flex-wrap: wrap;
1895
+ gap: 0.5em 1.25em;
1896
+ margin: 0;
1897
+ padding: 0;
1898
+ list-style: none;
1899
+ font-size: max(var(--base-font-size), 0.875em);
1900
+ color: var(--color-text-muted);
1901
+ }
1902
+
1903
+ /* ---- The switch ----
1904
+ One pill track holding two to four options: native radios for a choice that
1905
+ filters (Group by), tabs for one that swaps a panel (Review / Flashcards).
1906
+ Selected is `:has(:checked)` or `[aria-selected="true"]`, nothing else.
1907
+ Where anchor positioning exists one pill slides to the selected option and
1908
+ squishes on the way (it jumps under reduced motion). The squish keyframes
1909
+ cover up to 4 options; a fifth would still slide, without the squish. */
1910
+ .switch {
1911
+ display: flow-root;
1912
+ margin: 0;
1913
+ padding: 0;
1914
+ border: 0;
1915
+ min-inline-size: 0;
1916
+ }
1917
+
1918
+ .switch-label {
1919
+ display: inline-block;
1920
+ margin-inline-end: 0.75em;
1921
+ color: var(--color-text-muted);
1922
+ font-size: var(--font-size-6);
1923
+ font-weight: var(--font-weight--semi-bold);
1924
+ letter-spacing: 0.08em;
1925
+ line-height: calc(var(--target-min) + var(--gutter) * 2 + 2px);
1926
+ text-transform: uppercase;
1927
+ vertical-align: middle;
1928
+ }
1929
+
1930
+ legend.switch-label {
1931
+ float: inline-start;
1932
+ padding: 0;
1933
+ margin-inline-end: 0.75em;
1934
+ }
1935
+
1936
+ .switch-track {
1937
+ display: inline-flex;
1938
+ flex-wrap: wrap;
1939
+ gap: var(--gutter);
1940
+ padding: var(--gutter);
1941
+ border: var(--thin-border-width) solid var(--color-border-strong);
1942
+ border-radius: var(--radius-pill);
1943
+ vertical-align: middle;
1944
+ }
1945
+
1946
+ .switch-option {
1947
+ position: relative;
1948
+ display: inline-flex;
1949
+ align-items: center;
1950
+ justify-content: center;
1951
+ gap: 0;
1952
+ min-block-size: var(--target-min);
1953
+ min-inline-size: var(--target-min);
1954
+ margin: 0;
1955
+ padding: 0.3em 0.9em;
1956
+ border: 0;
1957
+ border-radius: var(--radius-pill);
1958
+ background: none;
1959
+ color: var(--color-text);
1960
+ font-size: max(var(--base-font-size), 0.875em);
1961
+ font-weight: var(--font-weight);
1962
+ line-height: var(--font-height--dense);
1963
+ cursor: pointer;
1964
+
1965
+ &:hover { background-color: var(--color-surface-accent); }
1966
+
1967
+ /* The radio is the option's whole hit area, drawn by the label. */
1968
+ input[type="radio"] {
1969
+ position: absolute;
1970
+ inset: 0;
1971
+ inline-size: 100%;
1972
+ block-size: 100%;
1973
+ margin: 0;
1974
+ opacity: 0;
1975
+ cursor: pointer;
1976
+ }
1977
+
1978
+ &:has(:focus-visible) {
1979
+ outline: var(--focus-ring-width) solid var(--color-focus-ring);
1980
+ outline-offset: var(--focus-ring-offset);
1981
+ }
1982
+
1983
+ &:is(:has(:checked), [aria-selected="true"]) {
1984
+ background-color: var(--color-accent);
1985
+ color: var(--color-on-accent);
1986
+ font-weight: var(--font-weight--semi-bold);
1987
+
1988
+ &:hover { background-color: var(--color-accent-fill-hover); }
1989
+ }
1990
+ }
1991
+
1992
+ @supports (anchor-name: --switch-on) {
1993
+ .switch-track {
1994
+ position: relative;
1995
+ isolation: isolate;
1996
+ anchor-scope: --switch-on;
1997
+ }
1998
+
1999
+ .switch-option {
2000
+ z-index: 1;
2001
+
2002
+ &:is(:has(:checked), [aria-selected="true"]) {
2003
+ anchor-name: --switch-on;
2004
+ background-color: transparent;
2005
+ }
2006
+ }
2007
+
2008
+ .switch-track::before {
2009
+ content: "";
2010
+ position: absolute;
2011
+ z-index: 0;
2012
+ position-anchor: --switch-on;
2013
+ inset-block-start: anchor(start);
2014
+ inset-block-end: anchor(end);
2015
+ inset-inline-start: anchor(start);
2016
+ inline-size: anchor-size(inline);
2017
+ border-radius: var(--radius-pill);
2018
+ background-color: var(--color-accent);
2019
+ }
2020
+
2021
+ @media (prefers-reduced-motion: no-preference) {
2022
+ .switch-track {
2023
+ --squish: cubic-bezier(0.65, 0, 0.35, 1);
2024
+
2025
+ &::before {
2026
+ transform-origin: center;
2027
+ transition:
2028
+ inset-inline-start 300ms var(--squish),
2029
+ inline-size 340ms var(--squish) 90ms;
2030
+ }
2031
+
2032
+ .switch-option { transition: color 200ms ease-out; }
2033
+
2034
+ /* A keyframes copy per option, so each change restarts the squish. */
2035
+ &:has(.switch-option:nth-child(1):is(:has(:checked), [aria-selected="true"]))::before { animation: switch-squish-a 340ms var(--squish); }
2036
+ &:has(.switch-option:nth-child(2):is(:has(:checked), [aria-selected="true"]))::before { animation: switch-squish-b 340ms var(--squish); }
2037
+ &:has(.switch-option:nth-child(3):is(:has(:checked), [aria-selected="true"]))::before { animation: switch-squish-c 340ms var(--squish); }
2038
+ &:has(.switch-option:nth-child(4):is(:has(:checked), [aria-selected="true"]))::before { animation: switch-squish-d 340ms var(--squish); }
2039
+ }
2040
+
2041
+ @keyframes switch-squish-a { 45% { scale: 0.88 0.8; } }
2042
+ @keyframes switch-squish-b { 45% { scale: 0.88 0.8; } }
2043
+ @keyframes switch-squish-c { 45% { scale: 0.88 0.8; } }
2044
+ @keyframes switch-squish-d { 45% { scale: 0.88 0.8; } }
2045
+ }
2046
+ }
2047
+
2048
+ /* On a phone each switch takes its own row, with its label above it. */
2049
+ @media (width <= 600px) {
2050
+ .switch { display: block; }
2051
+
2052
+ .switch-label,
2053
+ legend.switch-label {
2054
+ display: block;
2055
+ float: none;
2056
+ margin-block-end: 0.25em;
2057
+ line-height: var(--font-height);
2058
+ }
2059
+ }
2060
+
2061
+ @media (forced-colors: active) {
2062
+ .switch-option:has(:checked),
2063
+ .switch-option[aria-selected="true"] {
2064
+ forced-color-adjust: none;
2065
+ background: SelectedItem;
2066
+ color: SelectedItemText;
2067
+ }
2068
+
2069
+ .switch::before,
2070
+ .switch-track::before { display: none; }
2071
+
2072
+ .due-chip { border-color: CanvasText; }
2073
+ }
2074
+
2075
+ /* Prism code outside a `.code-block` (a worksheet figure, a glossary example) wears the same tokens, so every token keeps 7:1 on the same ground. */
2076
+ pre[class*="language-"],
2077
+ code[class*="language-"] {
2078
+ color: var(--color-code-text);
2079
+ text-shadow: none;
2080
+ }
2081
+
2082
+ pre[class*="language-"] {
2083
+ background: var(--color-code-surface);
2084
+ }
2085
+
2086
+ pre .token:is(.keyword, .atrule, .rule, .important, .selector) { color: var(--color-code-keyword); }
2087
+ pre .token:is(.string, .attr-value, .char, .regex, .url) { color: var(--color-code-string); }
2088
+ pre .token:is(.function, .class-name, .tag, .property, .attr-name, .builtin) { color: var(--color-code-function); }
2089
+ pre .token:is(.number, .boolean, .constant, .unit) { color: var(--color-code-number); }
2090
+ pre .token:is(.comment, .prolog, .doctype) { color: var(--color-code-comment); font-style: italic; }
2091
+ pre .token:is(.punctuation, .operator) { color: var(--color-code-text); }