@allons-y/course-kit 0.0.0-stage → 0.1.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 +17 -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 +2090 -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 +269 -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 +217 -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 +653 -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 +46 -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 +228 -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 +118 -4
  128. package/schemas/course.schema.json +156 -0
  129. package/schemas/dates.schema.json +165 -0
  130. package/schemas/grading.schema.json +59 -0
  131. package/schemas/instructor.schema.json +68 -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,2090 @@
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 an outline and a tools rail beside
986
+ a lesson plan. Nothing is sticky, and each falls to one column on a narrow
987
+ screen, the side columns first. */
988
+ .rail-label {
989
+ margin: 0 0 0.5em;
990
+ color: var(--color-text-muted);
991
+ font-family: var(--sans-font, inherit);
992
+ font-size: var(--font-size-6);
993
+ font-weight: var(--font-weight--medium);
994
+ letter-spacing: 0.08em;
995
+ text-transform: uppercase;
996
+ }
997
+
998
+ body:has(.doc-layout[data-contents="true"], .lesson-layout) {
999
+ --page-column: min(var(--container-max), 95%);
1000
+ }
1001
+
1002
+ .doc-layout[data-contents="true"],
1003
+ .lesson-layout {
1004
+ display: grid;
1005
+ align-items: start;
1006
+ gap: 0 calc(var(--content-space) * 3);
1007
+
1008
+ @media print {
1009
+ display: block;
1010
+ }
1011
+ }
1012
+
1013
+ .doc-layout[data-contents="true"] {
1014
+ grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
1015
+
1016
+ @media screen and (width <= 900px) {
1017
+ grid-template-columns: minmax(0, 1fr);
1018
+ }
1019
+ }
1020
+
1021
+ .lesson-layout {
1022
+ grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) minmax(0, 16rem);
1023
+
1024
+ @media screen and (width <= 1100px) {
1025
+ grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
1026
+
1027
+ .lesson-rail {
1028
+ grid-column: 2;
1029
+ }
1030
+ }
1031
+
1032
+ @media screen and (width <= 900px) {
1033
+ grid-template-columns: minmax(0, 1fr);
1034
+
1035
+ .lesson-rail {
1036
+ grid-column: auto;
1037
+ }
1038
+ }
1039
+ }
1040
+
1041
+ .doc-contents,
1042
+ .lesson-outline,
1043
+ .lesson-rail {
1044
+ padding-block: calc(var(--section-space) / 2) 0;
1045
+ font-size: max(var(--base-font-size), 0.95em);
1046
+
1047
+ @media print {
1048
+ display: none;
1049
+ }
1050
+ }
1051
+
1052
+ :is(.doc-contents nav, .lesson-outline, .lesson-rail nav) > :is(ol, ul) {
1053
+ margin: 0;
1054
+ padding: 0;
1055
+ list-style: none;
1056
+ border-inline-start: var(--border-width) solid var(--color-border);
1057
+
1058
+ :is(ol, ul) {
1059
+ margin: 0 0 0 0.9em;
1060
+ padding: 0;
1061
+ list-style: none;
1062
+ }
1063
+
1064
+ li a[href] {
1065
+ display: block;
1066
+ margin-inline-start: calc(var(--border-width) * -1);
1067
+ padding: 0.35em 0.9em;
1068
+ border-inline-start: var(--border-width) solid transparent;
1069
+ color: var(--color-text-muted);
1070
+ text-decoration: none;
1071
+
1072
+ &:is(:hover, :focus-visible) {
1073
+ color: var(--color-text);
1074
+ text-decoration: underline;
1075
+ }
1076
+
1077
+ &[aria-current] {
1078
+ border-inline-start-color: var(--color-accent-secondary);
1079
+ color: var(--color-text);
1080
+ font-weight: var(--font-weight--semi-bold);
1081
+ }
1082
+
1083
+ }
1084
+ }
1085
+
1086
+ .lesson-rail {
1087
+ display: grid;
1088
+ gap: var(--section-space);
1089
+ inline-size: auto;
1090
+ margin: 0;
1091
+ padding-inline: 0;
1092
+ border: 0;
1093
+ background: none;
1094
+
1095
+ @media screen and (width <= 900px) {
1096
+ padding-block-end: var(--section-space);
1097
+ }
1098
+ }
1099
+
1100
+ /* ---- Lesson plans (instructor) ---- */
1101
+ .lesson-nav {
1102
+ display: flex;
1103
+ gap: calc(var(--content-space) * 2);
1104
+ justify-content: space-between;
1105
+ margin-block-end: var(--section-space);
1106
+
1107
+ header & a {
1108
+ margin: 0;
1109
+ }
1110
+
1111
+ @media print {
1112
+ display: none;
1113
+ }
1114
+ }
1115
+
1116
+ .lesson-plan {
1117
+ .lesson-when {
1118
+ font-size: 1.1em;
1119
+ margin-block: 0;
1120
+ display: flex;
1121
+ gap: calc(var(--gutter) * 2);
1122
+ }
1123
+
1124
+ .lesson-heading {
1125
+ margin-block-end: 0;
1126
+ }
1127
+ }
1128
+
1129
+ .separators {
1130
+ display: flex;
1131
+ flex-wrap: wrap;
1132
+ gap: calc(var(--gutter) * 2);
1133
+
1134
+ > *:not(:last-child)::after {
1135
+ content: "⏺";
1136
+ padding-inline-start: calc(var(--gutter) * 2);
1137
+ font-size: 50%;
1138
+ vertical-align: middle;
1139
+ }
1140
+ }
1141
+
1142
+ .lesson-list {
1143
+ td {
1144
+ font-size: max(var(--base-font-size), 0.95em);
1145
+ }
1146
+
1147
+ .no-class {
1148
+ font-style: italic;
1149
+ }
1150
+ }
1151
+
1152
+ :where(dialog) {
1153
+ background-color: var(--color-page);
1154
+ max-inline-size: 40rem;
1155
+ margin: auto;
1156
+
1157
+ &::backdrop {
1158
+ background-color: rgb(0 0 0 / 50%);
1159
+ backdrop-filter: blur(2px);
1160
+ }
1161
+
1162
+ @media only screen and (width <= 720px) {
1163
+ max-inline-size: calc(100vw - 2rem);
1164
+ }
1165
+ }
1166
+
1167
+ :where(details) {
1168
+ background-color: var(--color-surface-subtle);
1169
+
1170
+ > *:not(summary) {
1171
+ padding-inline-start: 1em;
1172
+ }
1173
+
1174
+ @media print {
1175
+ &::details-content {
1176
+ content-visibility: visible;
1177
+ }
1178
+ }
1179
+ }
1180
+
1181
+ :where(tbody tr:nth-child(even)) {
1182
+ background-color: var(--color-surface-subtle);
1183
+ }
1184
+
1185
+ /* ---- Table baseline (formerly simple.css) ---- */
1186
+ /* Tables read like a printed table: a heavy rule above and below, a light
1187
+ rule under the header and between rows, and no boxes. */
1188
+ :where(table) {
1189
+ border-collapse: collapse;
1190
+ margin-block: 1.5rem;
1191
+ border-block: var(--border-width) solid var(--color-text-muted);
1192
+ font-variant-numeric: tabular-nums;
1193
+
1194
+ > :where(caption) {
1195
+ font-weight: var(--font-weight--bold);
1196
+ margin-block-end: 0.5rem;
1197
+ }
1198
+
1199
+ :is(th, td).center {
1200
+ text-align: center;
1201
+ }
1202
+ }
1203
+
1204
+ /* ---- Lightweight table styles ---- */
1205
+ .table-light {
1206
+ border-collapse: collapse;
1207
+
1208
+ th,
1209
+ td {
1210
+ border-inline: none;
1211
+ }
1212
+ }
1213
+
1214
+ figure > :where(table) {
1215
+ inline-size: max-content;
1216
+ margin: 0;
1217
+ }
1218
+
1219
+ :where(td, th) {
1220
+ border: 0;
1221
+ border-block-end: var(--thin-border-width) solid var(--color-border);
1222
+ text-align: start;
1223
+ padding: 0.55rem 0.75rem;
1224
+ }
1225
+
1226
+ :where(tbody tr:last-child > :is(td, th)) {
1227
+ border-block-end: 0;
1228
+ }
1229
+
1230
+ :where(thead th) {
1231
+ border-block-end: var(--thin-border-width) solid var(--color-text-muted);
1232
+ background-color: var(--color-table-header);
1233
+ color: var(--color-text-muted);
1234
+ font-size: var(--font-size-6);
1235
+ font-weight: var(--font-weight--semi-bold);
1236
+ letter-spacing: 0.06em;
1237
+ text-transform: uppercase;
1238
+ }
1239
+
1240
+ :where(tbody th) {
1241
+ font-weight: var(--font-weight--semi-bold);
1242
+ }
1243
+
1244
+ /* ---- Prompt figures (```prompt fences — prose to say to an assistant) ---- */
1245
+ .prompt {
1246
+ position: relative;
1247
+ margin-block: var(--content-space);
1248
+ margin-inline: 0;
1249
+ padding: 1em 1.25em;
1250
+ background-color: var(--color-surface);
1251
+ border: var(--thin-border-width) solid var(--color-border);
1252
+ border-radius: var(--standard-border-radius);
1253
+ color: var(--color-text);
1254
+
1255
+ p {
1256
+ margin: 0;
1257
+ font-size: var(--font-size-5);
1258
+
1259
+ + p {
1260
+ margin-block-start: 0.75em;
1261
+ }
1262
+ }
1263
+
1264
+ &[data-copyable] {
1265
+ padding-inline-end: 3.2em;
1266
+ }
1267
+
1268
+ /* The examples to recognize and not use: same shape, dashed and muted,
1269
+ and copy.js gives them no copy control. */
1270
+ &.prompt-avoid {
1271
+ border-style: dashed;
1272
+ background-color: transparent;
1273
+ color: var(--color-text-muted);
1274
+ }
1275
+
1276
+ &.prompt--avoid {
1277
+ background-color: color-mix(in sRGB, var(--color-error) 7%, transparent);
1278
+ border: var(--thin-border-width) dashed color-mix(in sRGB, var(--color-error) 55%, transparent);
1279
+ color: var(--color-text-muted);
1280
+
1281
+ user-select: none;
1282
+ }
1283
+ }
1284
+
1285
+ .prompt-copy {
1286
+ position: absolute;
1287
+ inset-block-start: 0.5em;
1288
+ inset-inline-end: 0.5em;
1289
+ display: flex;
1290
+ align-items: center;
1291
+ justify-content: center;
1292
+ inline-size: 2.2em;
1293
+ block-size: 2.2em;
1294
+ padding: 0.4em;
1295
+ margin-block: 0.85em 0;
1296
+ margin-inline-start: auto;
1297
+ background: transparent;
1298
+ color: var(--color-text-muted);
1299
+ border: var(--thin-border-width) solid var(--color-border);
1300
+ border-radius: var(--standard-border-radius);
1301
+ cursor: pointer;
1302
+ font-size: max(var(--base-font-size), 0.85em);
1303
+
1304
+ &:is(:hover, :focus-visible) {
1305
+ border-color: var(--color-accent);
1306
+ color: var(--color-accent);
1307
+ background-color: var(--color-surface-accent);
1308
+ }
1309
+
1310
+ :where(svg) {
1311
+ inline-size: auto;
1312
+ min-block-size: 0;
1313
+ fill: none;
1314
+ stroke: currentColor;
1315
+ }
1316
+
1317
+ @media print {
1318
+ display: none;
1319
+ }
1320
+ }
1321
+
1322
+ /* ---- Blockquote ---- */
1323
+ blockquote {
1324
+ margin-block: calc(var(--content-space) * 2);
1325
+ margin-inline: 0;
1326
+ padding: 0;
1327
+ border: none;
1328
+
1329
+ color: var(--color-text);
1330
+ font-size: 1.15em;
1331
+ font-style: normal;
1332
+ line-height: 1.45;
1333
+ text-wrap: pretty;
1334
+
1335
+ &::before {
1336
+ content: "";
1337
+ display: block;
1338
+ inline-size: 2.5rem;
1339
+ block-size: 3px;
1340
+ margin-block-end: 0.9rem;
1341
+ background-color: var(--color-accent);
1342
+ }
1343
+
1344
+ > :first-child {
1345
+ margin-block-start: 0;
1346
+ }
1347
+
1348
+ > :last-child {
1349
+ margin-block-end: 0;
1350
+ }
1351
+
1352
+
1353
+ @media print {
1354
+ &::before {
1355
+ background-color: var(--color-text);
1356
+ }
1357
+ }
1358
+
1359
+ &:is(.quote, :has(cite)) {
1360
+ position: relative;
1361
+ padding-inline-start: 2.25rem;
1362
+
1363
+ color: var(--color-text-muted);
1364
+ font-size: 1em;
1365
+ line-height: var(--font-height--spacious);
1366
+
1367
+ &::before {
1368
+ content: "\201C";
1369
+ content: "\201C" / "";
1370
+ position: absolute;
1371
+ inset-inline-start: 0;
1372
+ inset-block-start: -0.3em;
1373
+ display: block;
1374
+ inline-size: auto;
1375
+ block-size: auto;
1376
+ margin: 0;
1377
+
1378
+ background: none;
1379
+ color: var(--color-accent);
1380
+ font-size: 2.75rem;
1381
+ line-height: 1;
1382
+ }
1383
+
1384
+ cite {
1385
+ display: block;
1386
+ margin-block-start: 0.75em;
1387
+
1388
+ color: var(--color-text-muted);
1389
+ font-size: max(var(--base-font-size), 0.9em);
1390
+ font-style: normal;
1391
+
1392
+ &::before {
1393
+ content: "— ";
1394
+ }
1395
+ }
1396
+ }
1397
+ }
1398
+
1399
+ /* ---- Callout ---- */
1400
+ .callout {
1401
+ --color-callout: var(--color-accent);
1402
+
1403
+ border-inline-start: var(--thick-border-width) solid var(--color-callout);
1404
+ background-color: color-mix(in sRGB, var(--color-callout) 10%, var(--color-page));
1405
+ border-radius: var(--standard-border-radius);
1406
+ padding: 1em 1.25em;
1407
+
1408
+ &:is(.success, [type="success"]) {
1409
+ --color-callout: var(--color-success);
1410
+ }
1411
+
1412
+ &:is(.warn, [type="warn"]) {
1413
+ --color-callout: var(--color-warning-edge);
1414
+ }
1415
+
1416
+ &:is(.error, [type="error"]) {
1417
+ --color-callout: var(--color-error);
1418
+ }
1419
+
1420
+ > :first-child {
1421
+ margin-block-start: 0;
1422
+ }
1423
+
1424
+ > :last-child {
1425
+ margin-block-end: 0;
1426
+ }
1427
+
1428
+ /* The type in words, so it is never told by color alone. */
1429
+ > .callout-label {
1430
+ margin-block-end: 0.35em;
1431
+ color: var(--color-text);
1432
+ font-size: var(--font-size-6);
1433
+ font-weight: var(--font-weight--semi-bold);
1434
+ letter-spacing: 0.06em;
1435
+ text-transform: uppercase;
1436
+
1437
+ + * {
1438
+ margin-block-start: 0;
1439
+ }
1440
+ }
1441
+
1442
+ @media print {
1443
+ background-color: transparent;
1444
+ }
1445
+ }
1446
+
1447
+ /* ---- Disclosure list ---- */
1448
+ .disclosures {
1449
+ --disclosure-gutter: 1.6em;
1450
+
1451
+ border-block-start: var(--thin-border-width) solid var(--color-border);
1452
+
1453
+ /* A reading measure inside the wide page column. */
1454
+ p {
1455
+ max-inline-size: 80ch;
1456
+ }
1457
+
1458
+ details {
1459
+ margin-block: 0;
1460
+ padding: 0;
1461
+ /* The summary is 44px tall (WCAG 2.5.5), so the rows need little more space. */
1462
+ padding-block: 0.25em;
1463
+
1464
+ background: none;
1465
+ border: none;
1466
+ border-block-end: var(--thin-border-width) solid var(--color-border);
1467
+ border-radius: 0;
1468
+
1469
+ > :not(summary) {
1470
+ margin-block: 0 1.15em;
1471
+ padding-inline-start: var(--disclosure-gutter);
1472
+ }
1473
+
1474
+ /* The answer belongs to the question above it, so it sits close. */
1475
+ > :not(summary):first-of-type {
1476
+ margin-block-start: 0;
1477
+ }
1478
+ }
1479
+
1480
+ summary {
1481
+ display: flex;
1482
+ align-items: center;
1483
+ min-block-size: var(--target-min);
1484
+ margin: 0;
1485
+ padding: 0;
1486
+
1487
+ background: none;
1488
+ border: none;
1489
+ color: var(--color-text);
1490
+ font-weight: var(--font-weight--semi-bold);
1491
+ list-style: none;
1492
+ text-wrap: pretty;
1493
+
1494
+ &::-webkit-details-marker {
1495
+ display: none;
1496
+ }
1497
+
1498
+ &::before {
1499
+ content: "+";
1500
+ content: "+" / "";
1501
+ flex: none;
1502
+ inline-size: var(--disclosure-gutter);
1503
+
1504
+ color: var(--color-accent-text);
1505
+ font-weight: var(--font-weight);
1506
+ }
1507
+
1508
+ &:hover {
1509
+ color: var(--color-link-hover);
1510
+ cursor: pointer;
1511
+ }
1512
+ }
1513
+
1514
+ /* Open: the question tightens onto its answer, and the marker flips. */
1515
+ details[open] > summary {
1516
+ padding-block-end: 0.4em;
1517
+ margin-block-end: 0.5rem;
1518
+
1519
+ &::before {
1520
+ content: "\2212";
1521
+ content: "\2212" / "";
1522
+ }
1523
+ }
1524
+ }
1525
+
1526
+ /* ---- Misc baseline elements (formerly simple.css) ---- */
1527
+ :where(p, h1, h2, h3, h4, h5, h6) {
1528
+ overflow-wrap: break-word;
1529
+ }
1530
+
1531
+ :where(abbr)[title] {
1532
+ cursor: help;
1533
+ text-decoration-line: underline;
1534
+ text-decoration-style: dotted;
1535
+ }
1536
+
1537
+ :where(pre) {
1538
+ padding-block: 1rem;
1539
+ padding-inline: 1.4rem;
1540
+ max-inline-size: 100%;
1541
+ overflow: auto;
1542
+ }
1543
+
1544
+ /* ---- Code blocks ----
1545
+ A fenced sample (lib/markdown.js): a bar in the language's color inside the
1546
+ top border, a title bar (language, then file name, then the copy button
1547
+ added by /js/copy.js), and the lines. Line numbers are CSS counters, so
1548
+ selecting or copying never takes them. */
1549
+ .code-block {
1550
+ --code-edge: var(--color-code-edge-neutral);
1551
+
1552
+ position: relative;
1553
+ margin-block: 0 1rem;
1554
+ margin-inline: 0;
1555
+ max-inline-size: 100%;
1556
+ border: var(--thin-border-width) solid var(--color-border);
1557
+ border-radius: 3px;
1558
+ background-color: var(--color-code-surface);
1559
+ color: var(--color-code-text);
1560
+ overflow: hidden;
1561
+
1562
+ &::before {
1563
+ content: "";
1564
+ display: block;
1565
+ block-size: 4px;
1566
+ background-color: var(--code-edge);
1567
+ }
1568
+
1569
+ &[data-edge="css"] { --code-edge: var(--color-code-edge-css); }
1570
+ &[data-edge="js"] { --code-edge: var(--color-code-edge-js); }
1571
+ &[data-edge="html"] { --code-edge: var(--color-code-edge-html); }
1572
+ &[data-edge="shell"] { --code-edge: var(--color-code-edge-shell); }
1573
+
1574
+ .code-block-head {
1575
+ display: flex;
1576
+ align-items: center;
1577
+ gap: 0.75em;
1578
+ min-block-size: var(--target-min);
1579
+ padding-inline: 1rem 3.25rem;
1580
+ border-block-end: var(--thin-border-width) solid var(--color-border);
1581
+ font-size: 0.875rem;
1582
+ max-inline-size: none;
1583
+ }
1584
+
1585
+ .code-block-lang {
1586
+ font-family: var(--sans-font);
1587
+ font-weight: var(--font-weight--semi-bold);
1588
+ color: var(--color-text);
1589
+ }
1590
+
1591
+ .code-block-file {
1592
+ font-family: var(--mono-font);
1593
+ color: var(--color-text-muted);
1594
+ overflow: hidden;
1595
+ text-overflow: ellipsis;
1596
+ white-space: nowrap;
1597
+ }
1598
+
1599
+ .code-copy {
1600
+ position: absolute;
1601
+ inset-block-start: 4px;
1602
+ inset-inline-end: 0;
1603
+ display: grid;
1604
+ place-items: center;
1605
+ inline-size: var(--target-min);
1606
+ block-size: var(--target-min);
1607
+ padding: 0;
1608
+ border: 0;
1609
+ border-radius: 50%;
1610
+ background: none;
1611
+ color: var(--color-code-keyword);
1612
+ cursor: pointer;
1613
+
1614
+ svg { inline-size: 1.2em; block-size: 1.2em; }
1615
+
1616
+ @media print { display: none; }
1617
+ }
1618
+
1619
+ pre {
1620
+ margin: 0;
1621
+ border: 0;
1622
+ border-radius: 0;
1623
+ background: none;
1624
+ padding-inline: 0;
1625
+ }
1626
+
1627
+ code {
1628
+ display: block;
1629
+ min-inline-size: max-content;
1630
+ counter-reset: line;
1631
+ }
1632
+
1633
+ br { display: none; }
1634
+
1635
+ .highlight-line {
1636
+ display: block;
1637
+ padding-inline: 1.25rem;
1638
+ border-inline-start: 3px solid transparent;
1639
+ }
1640
+
1641
+ &[data-line-numbers] .highlight-line::before {
1642
+ counter-increment: line;
1643
+ content: counter(line);
1644
+ display: inline-block;
1645
+ inline-size: 2.5em;
1646
+ margin-inline: -0.5rem 1.25em;
1647
+ text-align: end;
1648
+ color: var(--color-code-comment);
1649
+ user-select: none;
1650
+ }
1651
+
1652
+ /* The 3px start edge carries the signal; the wash stays faint enough for every token to keep 7:1. */
1653
+ .highlight-line-active {
1654
+ background: var(--color-highlight-line);
1655
+ border-inline-start: 3px solid var(--color-accent-secondary);
1656
+ }
1657
+
1658
+ .token:is(.keyword, .atrule, .rule, .important, .selector) { color: var(--color-code-keyword); }
1659
+ .token:is(.string, .attr-value, .char, .regex, .url) { color: var(--color-code-string); }
1660
+ .token:is(.function, .class-name, .tag, .property, .attr-name, .builtin) { color: var(--color-code-function); }
1661
+ .token:is(.number, .boolean, .constant, .unit) { color: var(--color-code-number); }
1662
+ .token:is(.comment, .prolog, .doctype) { color: var(--color-code-comment); font-style: italic; }
1663
+ }
1664
+
1665
+ :where(kbd) {
1666
+ font-family: var(--mono-font);
1667
+ color: var(--color-code);
1668
+ border: var(--border-width) solid var(--color-code);
1669
+ border-block-end-width: 3px;
1670
+ border-radius: var(--standard-border-radius);
1671
+ padding-block: 0.1rem;
1672
+ padding-inline: 0.4rem;
1673
+ }
1674
+
1675
+ :where(hr) {
1676
+ border: none;
1677
+ block-size: var(--border-width);
1678
+ background: var(--color-border);
1679
+ margin-block: 1rem;
1680
+ margin-inline: auto;
1681
+ }
1682
+
1683
+ :where(mark) {
1684
+ padding-block: 2px;
1685
+ padding-inline: 5px;
1686
+ border-radius: var(--standard-border-radius);
1687
+ background-color: var(--color-highlight);
1688
+ color: black;
1689
+
1690
+ a {
1691
+ color: var(--color-link);
1692
+ }
1693
+ }
1694
+
1695
+ :where(img, video) {
1696
+ max-inline-size: 100%;
1697
+ block-size: auto;
1698
+ border-radius: var(--standard-border-radius);
1699
+ }
1700
+
1701
+ :where(figure) {
1702
+ margin: 0;
1703
+ display: block;
1704
+ overflow-x: auto;
1705
+
1706
+ > :where(img),
1707
+ > picture > :where(img) {
1708
+ display: block;
1709
+ margin-inline: auto;
1710
+ }
1711
+ }
1712
+
1713
+ :where(figcaption) {
1714
+ position: sticky;
1715
+ inset-inline-start: 0;
1716
+ text-align: center;
1717
+ font-size: 0.9rem;
1718
+ color: var(--color-text-muted);
1719
+ margin-block: 1rem;
1720
+ }
1721
+
1722
+ :where(sup, sub) {
1723
+ vertical-align: baseline;
1724
+ position: relative;
1725
+ }
1726
+
1727
+ :where(sup) {
1728
+ inset-block-start: -0.4em;
1729
+ }
1730
+
1731
+ :where(sub) {
1732
+ inset-block-start: 0.3em;
1733
+ }
1734
+
1735
+ /* ---- Form controls (formerly simple.css) ---- */
1736
+ :where(textarea, select, input, button),
1737
+ .button {
1738
+ font-size: inherit;
1739
+ font-family: inherit;
1740
+ padding: 0.5em;
1741
+ margin-block-end: 0.5rem;
1742
+ border-radius: var(--standard-border-radius);
1743
+ box-shadow: none;
1744
+ max-inline-size: 100%;
1745
+ display: inline-block;
1746
+ }
1747
+
1748
+ :where(button, input[type="submit"], input[type="reset"], input[type="button"]),
1749
+ .button {
1750
+ line-height: normal;
1751
+ }
1752
+
1753
+ :where(textarea, select, input) {
1754
+ color: var(--color-text);
1755
+ background-color: var(--color-page);
1756
+ border: var(--border-width) solid var(--color-border);
1757
+
1758
+ @media only screen and (width <= 720px) {
1759
+ inline-size: 100%;
1760
+ }
1761
+ }
1762
+
1763
+ :where(label) {
1764
+ display: block;
1765
+ }
1766
+
1767
+ :where(textarea:not([cols])) {
1768
+ inline-size: 100%;
1769
+ }
1770
+
1771
+ :where(select:not([multiple])) {
1772
+ background-image: linear-gradient(45deg, transparent 49%, var(--color-text) 51%),
1773
+ linear-gradient(135deg, var(--color-text) 51%, transparent 49%);
1774
+ background-position: calc(100% - 15px), calc(100% - 10px);
1775
+ background-size: 5px 5px, 5px 5px;
1776
+ background-repeat: no-repeat;
1777
+ padding-inline-end: 25px;
1778
+
1779
+ *[dir="rtl"] & {
1780
+ background-position: 10px, 15px;
1781
+ }
1782
+ }
1783
+
1784
+ :where(input[type="checkbox"], input[type="radio"]) {
1785
+ vertical-align: middle;
1786
+ position: relative;
1787
+ inline-size: min-content;
1788
+
1789
+ + label {
1790
+ display: inline-block;
1791
+ }
1792
+
1793
+ &:checked {
1794
+ background-color: var(--color-accent);
1795
+ }
1796
+ }
1797
+
1798
+ :where(input[type="radio"]) {
1799
+ border-radius: var(--circle-border-radius);
1800
+
1801
+ &:checked::after {
1802
+ content: " ";
1803
+ inline-size: 0.3em;
1804
+ block-size: 0.3em;
1805
+ border-radius: var(--circle-border-radius);
1806
+ position: absolute;
1807
+ inset-block-start: 0.125em;
1808
+ background-color: var(--color-page);
1809
+ inset-inline-start: 0.125em;
1810
+ font-size: 1.8em;
1811
+ }
1812
+ }
1813
+
1814
+ :where(input[type="checkbox"]:checked::after) {
1815
+ content: " ";
1816
+ inline-size: 0.2em;
1817
+ block-size: 0.4em;
1818
+ border-radius: 0;
1819
+ position: absolute;
1820
+ inset-block-start: 0.04em;
1821
+ inset-inline-start: 0.18em;
1822
+ background-color: transparent;
1823
+ border-inline-end: solid var(--color-page) 0.08em;
1824
+ border-block-end: solid var(--color-page) 0.08em;
1825
+ font-size: 1.8em;
1826
+ transform: rotate(45deg);
1827
+ }
1828
+
1829
+ :where(input[type="color"]) {
1830
+ block-size: 2.5rem;
1831
+ padding: 0.2rem;
1832
+ }
1833
+
1834
+ :where(input[type="file"]) {
1835
+ border: 0;
1836
+ }
1837
+
1838
+ /* ---- Progress bars ---- */
1839
+ :where(progress) {
1840
+ inline-size: 100%;
1841
+
1842
+ &:indeterminate {
1843
+ background-color: var(--color-surface-accent);
1844
+
1845
+ &::-moz-progress-bar {
1846
+ background-color: var(--color-surface-accent);
1847
+ }
1848
+ }
1849
+
1850
+ &::-webkit-progress-bar {
1851
+ border-radius: var(--standard-border-radius);
1852
+ background-color: var(--color-surface-accent);
1853
+ }
1854
+
1855
+ &::-webkit-progress-value {
1856
+ border-radius: var(--standard-border-radius);
1857
+ background-color: var(--color-accent-secondary);
1858
+ }
1859
+
1860
+ &::-moz-progress-bar {
1861
+ border-radius: var(--standard-border-radius);
1862
+ background-color: var(--color-accent-secondary);
1863
+ transition-property: inline-size;
1864
+ transition-duration: 0.3s;
1865
+ }
1866
+ }
1867
+
1868
+
1869
+ /* ---- Due chips and their key ----
1870
+ A deadline's kind as a pill: tests outlined in the accent, graded work on
1871
+ an accent wash, readings on a strong outline, practice dashed (not graded).
1872
+ The word carries the meaning; the shape only reinforces it. Used by
1873
+ schedule-weeks, assigned-list and course-now. */
1874
+ .due-chip {
1875
+ display: inline-block;
1876
+ padding-inline: 0.5em;
1877
+ border: var(--thin-border-width) solid transparent;
1878
+ border-radius: var(--radius-pill);
1879
+ color: var(--color-text);
1880
+ font-size: max(var(--base-font-size), 0.875em);
1881
+ font-weight: var(--font-weight--semi-bold);
1882
+ line-height: 1.4;
1883
+ vertical-align: 0.05em;
1884
+
1885
+ &[data-kind="test"] { border: var(--border-width) solid var(--color-accent); }
1886
+ &[data-kind="graded"] { background-color: var(--color-surface-accent); border-color: var(--color-accent); }
1887
+ &[data-kind="reading"] { border-color: var(--color-border-strong); }
1888
+ &[data-kind="practice"] { border: var(--thin-border-width) dashed var(--color-border-strong); font-weight: var(--font-weight); }
1889
+ }
1890
+
1891
+ .due-key {
1892
+ display: flex;
1893
+ flex-wrap: wrap;
1894
+ gap: 0.5em 1.25em;
1895
+ margin: 0;
1896
+ padding: 0;
1897
+ list-style: none;
1898
+ font-size: max(var(--base-font-size), 0.875em);
1899
+ color: var(--color-text-muted);
1900
+ }
1901
+
1902
+ /* ---- The switch ----
1903
+ One pill track holding two to four options: native radios for a choice that
1904
+ filters (Group by), tabs for one that swaps a panel (Review / Flashcards).
1905
+ Selected is `:has(:checked)` or `[aria-selected="true"]`, nothing else.
1906
+ Where anchor positioning exists one pill slides to the selected option and
1907
+ squishes on the way (it jumps under reduced motion). The squish keyframes
1908
+ cover up to 4 options; a fifth would still slide, without the squish. */
1909
+ .switch {
1910
+ display: flow-root;
1911
+ margin: 0;
1912
+ padding: 0;
1913
+ border: 0;
1914
+ min-inline-size: 0;
1915
+ }
1916
+
1917
+ .switch-label {
1918
+ display: inline-block;
1919
+ margin-inline-end: 0.75em;
1920
+ color: var(--color-text-muted);
1921
+ font-size: var(--font-size-6);
1922
+ font-weight: var(--font-weight--semi-bold);
1923
+ letter-spacing: 0.08em;
1924
+ line-height: calc(var(--target-min) + var(--gutter) * 2 + 2px);
1925
+ text-transform: uppercase;
1926
+ vertical-align: middle;
1927
+ }
1928
+
1929
+ legend.switch-label {
1930
+ float: inline-start;
1931
+ padding: 0;
1932
+ margin-inline-end: 0.75em;
1933
+ }
1934
+
1935
+ .switch-track {
1936
+ display: inline-flex;
1937
+ flex-wrap: wrap;
1938
+ gap: var(--gutter);
1939
+ padding: var(--gutter);
1940
+ border: var(--thin-border-width) solid var(--color-border-strong);
1941
+ border-radius: var(--radius-pill);
1942
+ vertical-align: middle;
1943
+ }
1944
+
1945
+ .switch-option {
1946
+ position: relative;
1947
+ display: inline-flex;
1948
+ align-items: center;
1949
+ justify-content: center;
1950
+ gap: 0;
1951
+ min-block-size: var(--target-min);
1952
+ min-inline-size: var(--target-min);
1953
+ margin: 0;
1954
+ padding: 0.3em 0.9em;
1955
+ border: 0;
1956
+ border-radius: var(--radius-pill);
1957
+ background: none;
1958
+ color: var(--color-text);
1959
+ font-size: max(var(--base-font-size), 0.875em);
1960
+ font-weight: var(--font-weight);
1961
+ line-height: var(--font-height--dense);
1962
+ cursor: pointer;
1963
+
1964
+ &:hover { background-color: var(--color-surface-accent); }
1965
+
1966
+ /* The radio is the option's whole hit area, drawn by the label. */
1967
+ input[type="radio"] {
1968
+ position: absolute;
1969
+ inset: 0;
1970
+ inline-size: 100%;
1971
+ block-size: 100%;
1972
+ margin: 0;
1973
+ opacity: 0;
1974
+ cursor: pointer;
1975
+ }
1976
+
1977
+ &:has(:focus-visible) {
1978
+ outline: var(--focus-ring-width) solid var(--color-focus-ring);
1979
+ outline-offset: var(--focus-ring-offset);
1980
+ }
1981
+
1982
+ &:is(:has(:checked), [aria-selected="true"]) {
1983
+ background-color: var(--color-accent);
1984
+ color: var(--color-on-accent);
1985
+ font-weight: var(--font-weight--semi-bold);
1986
+
1987
+ &:hover { background-color: var(--color-accent-fill-hover); }
1988
+ }
1989
+ }
1990
+
1991
+ @supports (anchor-name: --switch-on) {
1992
+ .switch-track {
1993
+ position: relative;
1994
+ isolation: isolate;
1995
+ anchor-scope: --switch-on;
1996
+ }
1997
+
1998
+ .switch-option {
1999
+ z-index: 1;
2000
+
2001
+ &:is(:has(:checked), [aria-selected="true"]) {
2002
+ anchor-name: --switch-on;
2003
+ background-color: transparent;
2004
+ }
2005
+ }
2006
+
2007
+ .switch-track::before {
2008
+ content: "";
2009
+ position: absolute;
2010
+ z-index: 0;
2011
+ position-anchor: --switch-on;
2012
+ inset-block-start: anchor(start);
2013
+ inset-block-end: anchor(end);
2014
+ inset-inline-start: anchor(start);
2015
+ inline-size: anchor-size(inline);
2016
+ border-radius: var(--radius-pill);
2017
+ background-color: var(--color-accent);
2018
+ }
2019
+
2020
+ @media (prefers-reduced-motion: no-preference) {
2021
+ .switch-track {
2022
+ --squish: cubic-bezier(0.65, 0, 0.35, 1);
2023
+
2024
+ &::before {
2025
+ transform-origin: center;
2026
+ transition:
2027
+ inset-inline-start 300ms var(--squish),
2028
+ inline-size 340ms var(--squish) 90ms;
2029
+ }
2030
+
2031
+ .switch-option { transition: color 200ms ease-out; }
2032
+
2033
+ /* A keyframes copy per option, so each change restarts the squish. */
2034
+ &:has(.switch-option:nth-child(1):is(:has(:checked), [aria-selected="true"]))::before { animation: switch-squish-a 340ms var(--squish); }
2035
+ &:has(.switch-option:nth-child(2):is(:has(:checked), [aria-selected="true"]))::before { animation: switch-squish-b 340ms var(--squish); }
2036
+ &:has(.switch-option:nth-child(3):is(:has(:checked), [aria-selected="true"]))::before { animation: switch-squish-c 340ms var(--squish); }
2037
+ &:has(.switch-option:nth-child(4):is(:has(:checked), [aria-selected="true"]))::before { animation: switch-squish-d 340ms var(--squish); }
2038
+ }
2039
+
2040
+ @keyframes switch-squish-a { 45% { scale: 0.88 0.8; } }
2041
+ @keyframes switch-squish-b { 45% { scale: 0.88 0.8; } }
2042
+ @keyframes switch-squish-c { 45% { scale: 0.88 0.8; } }
2043
+ @keyframes switch-squish-d { 45% { scale: 0.88 0.8; } }
2044
+ }
2045
+ }
2046
+
2047
+ /* On a phone each switch takes its own row, with its label above it. */
2048
+ @media (width <= 600px) {
2049
+ .switch { display: block; }
2050
+
2051
+ .switch-label,
2052
+ legend.switch-label {
2053
+ display: block;
2054
+ float: none;
2055
+ margin-block-end: 0.25em;
2056
+ line-height: var(--font-height);
2057
+ }
2058
+ }
2059
+
2060
+ @media (forced-colors: active) {
2061
+ .switch-option:has(:checked),
2062
+ .switch-option[aria-selected="true"] {
2063
+ forced-color-adjust: none;
2064
+ background: SelectedItem;
2065
+ color: SelectedItemText;
2066
+ }
2067
+
2068
+ .switch::before,
2069
+ .switch-track::before { display: none; }
2070
+
2071
+ .due-chip { border-color: CanvasText; }
2072
+ }
2073
+
2074
+ /* 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. */
2075
+ pre[class*="language-"],
2076
+ code[class*="language-"] {
2077
+ color: var(--color-code-text);
2078
+ text-shadow: none;
2079
+ }
2080
+
2081
+ pre[class*="language-"] {
2082
+ background: var(--color-code-surface);
2083
+ }
2084
+
2085
+ pre .token:is(.keyword, .atrule, .rule, .important, .selector) { color: var(--color-code-keyword); }
2086
+ pre .token:is(.string, .attr-value, .char, .regex, .url) { color: var(--color-code-string); }
2087
+ pre .token:is(.function, .class-name, .tag, .property, .attr-name, .builtin) { color: var(--color-code-function); }
2088
+ pre .token:is(.number, .boolean, .constant, .unit) { color: var(--color-code-number); }
2089
+ pre .token:is(.comment, .prolog, .doctype) { color: var(--color-code-comment); font-style: italic; }
2090
+ pre .token:is(.punctuation, .operator) { color: var(--color-code-text); }