@tempoxyz/ds 0.3.16 → 0.3.18

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 (47) hide show
  1. package/dist/docs/AGENTS.md +4 -2
  2. package/dist/docs/marketing.md +699 -0
  3. package/dist/docs/product/documents.md +248 -0
  4. package/dist/docs/product/foundations.md +1 -1
  5. package/dist/document/Document.d.ts +46 -0
  6. package/dist/document/Document.d.ts.map +1 -0
  7. package/dist/document/Document.js +190 -0
  8. package/dist/document/Document.js.map +1 -0
  9. package/dist/document/Enhance.d.ts +13 -0
  10. package/dist/document/Enhance.d.ts.map +1 -0
  11. package/dist/document/Enhance.js +511 -0
  12. package/dist/document/Enhance.js.map +1 -0
  13. package/dist/document/bin.d.ts +3 -0
  14. package/dist/document/bin.d.ts.map +1 -0
  15. package/dist/document/bin.js +38 -0
  16. package/dist/document/bin.js.map +1 -0
  17. package/dist/document/document.css +388 -0
  18. package/dist/document/index.d.ts +3 -0
  19. package/dist/document/index.d.ts.map +1 -0
  20. package/dist/document/index.js +3 -0
  21. package/dist/document/index.js.map +1 -0
  22. package/dist/document/internal/Cli.d.ts +43 -0
  23. package/dist/document/internal/Cli.d.ts.map +1 -0
  24. package/dist/document/internal/Cli.js +87 -0
  25. package/dist/document/internal/Cli.js.map +1 -0
  26. package/dist/document/internal/Template.d.ts +21 -0
  27. package/dist/document/internal/Template.d.ts.map +1 -0
  28. package/dist/document/internal/Template.js +15 -0
  29. package/dist/document/internal/Template.js.map +1 -0
  30. package/dist/document/script.d.ts +2 -0
  31. package/dist/document/script.d.ts.map +1 -0
  32. package/dist/document/script.js +452 -0
  33. package/dist/document/templates/brief.html +96 -0
  34. package/dist/document/templates/essay.html +70 -0
  35. package/dist/document/templates/post.html +69 -0
  36. package/package.json +19 -1
  37. package/src/document/Document.ts +277 -0
  38. package/src/document/Enhance.ts +532 -0
  39. package/src/document/bin.ts +38 -0
  40. package/src/document/document.css +388 -0
  41. package/src/document/index.ts +2 -0
  42. package/src/document/internal/Cli.ts +132 -0
  43. package/src/document/internal/Template.ts +25 -0
  44. package/src/document/script.ts +8 -0
  45. package/src/document/templates/brief.html +96 -0
  46. package/src/document/templates/essay.html +70 -0
  47. package/src/document/templates/post.html +69 -0
@@ -0,0 +1,388 @@
1
+ /* Tempo document mode. Generated by scripts/compile-document.ts from src/web/vars.ts. Do not edit. */
2
+ @font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:100 900;src:url('../fonts/Inter-symbols.woff2') format('woff2');unicode-range:U+02CD-036F,U+0E3F,U+1DC0-1DFF,U+2070-2298,U+2303-232B,U+2380-238B,U+23CE-23CF,U+2423-2468,U+24B6-24EA,U+25A0-26A0,U+2713-2788,U+27EF-27FA,U+2913,U+2A38,U+2B06-2B24,U+2E18,U+A92E,U+E000-E163,U+E1C3-E2DC,U+EE01-EEE1,U+F6C3,U+1F12F-1F16B,U+1F850-1F852;}
3
+ @font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:100 900;src:url('../fonts/Inter-cyrillic-ext.woff2') format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;}
4
+ @font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:100 900;src:url('../fonts/Inter-cyrillic.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
5
+ @font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:100 900;src:url('../fonts/Inter-greek-ext.woff2') format('woff2');unicode-range:U+1F00-1FFF;}
6
+ @font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:100 900;src:url('../fonts/Inter-greek.woff2') format('woff2');unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;}
7
+ @font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:100 900;src:url('../fonts/Inter-vietnamese.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
8
+ @font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:100 900;src:url('../fonts/Inter-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
9
+ @font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:100 900;src:url('../fonts/Inter-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
10
+ @font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url('../fonts/JetBrainsMono-Regular-other.woff2') format('woff2');unicode-range:U+0100-0259,U+02B9-04F5,U+0AEA,U+1E80-1EF9,U+2070-20BF,U+2102-2140,U+218A-2424,U+2500-25F6,U+266D-26A1,U+2713-27F7,U+2916-2988,U+2A00-2A06,U+2B58,U+E0A0-E0B3,U+FE62,U+FF5B-FF5D,U+16910,U+1D538-1D56B;}
11
+ @font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url('../fonts/JetBrainsMono-Regular-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
12
+ @font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:500;src:url('../fonts/JetBrainsMono-Medium-other.woff2') format('woff2');unicode-range:U+0100-0259,U+02B9-04F5,U+0AEA,U+1E80-1EF9,U+2070-20BF,U+2102-2140,U+218A-2424,U+2500-25F6,U+266D-26A1,U+2713-27F7,U+2916-2988,U+2A00-2A06,U+2B58,U+E0A0-E0B3,U+FE62,U+FF5B-FF5D,U+16910,U+1D538-1D56B;}
13
+ @font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:500;src:url('../fonts/JetBrainsMono-Medium-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
14
+ @font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:600;src:url('../fonts/JetBrainsMono-SemiBold-other.woff2') format('woff2');unicode-range:U+0100-0259,U+02B9-04F5,U+0AEA,U+1E80-1EF9,U+2070-20BF,U+2102-2140,U+218A-2424,U+2500-25F6,U+266D-26A1,U+2713-27F7,U+2916-2988,U+2A00-2A06,U+2B58,U+E0A0-E0B3,U+FE62,U+FF5B-FF5D,U+16910,U+1D538-1D56B;}
15
+ @font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:600;src:url('../fonts/JetBrainsMono-SemiBold-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
16
+ @font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:700;src:url('../fonts/JetBrainsMono-Bold-other.woff2') format('woff2');unicode-range:U+0100-0259,U+02B9-04F5,U+0AEA,U+1E80-1EF9,U+2070-20BF,U+2102-2140,U+218A-2424,U+2500-25F6,U+266D-26A1,U+2713-27F7,U+2916-2988,U+2A00-2A06,U+2B58,U+E0A0-E0B3,U+FE62,U+FF5B-FF5D,U+16910,U+1D538-1D56B;}
17
+ @font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:700;src:url('../fonts/JetBrainsMono-Bold-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
18
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:100;src:url('../fonts/Pilat-Thin-other.woff2') format('woff2');unicode-range:U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00;}
19
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:100;src:url('../fonts/Pilat-Thin-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
20
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:300;src:url('../fonts/Pilat-Light-other.woff2') format('woff2');unicode-range:U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00;}
21
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:300;src:url('../fonts/Pilat-Light-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
22
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:400;src:url('../fonts/Pilat-Regular-other.woff2') format('woff2');unicode-range:U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00;}
23
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:400;src:url('../fonts/Pilat-Regular-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
24
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:500;src:url('../fonts/Pilat-Book-other.woff2') format('woff2');unicode-range:U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00;}
25
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:500;src:url('../fonts/Pilat-Book-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
26
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:600;src:url('../fonts/Pilat-Demi-other.woff2') format('woff2');unicode-range:U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00;}
27
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:600;src:url('../fonts/Pilat-Demi-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
28
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:700;src:url('../fonts/Pilat-Bold-other.woff2') format('woff2');unicode-range:U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00;}
29
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:700;src:url('../fonts/Pilat-Bold-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
30
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:800;src:url('../fonts/Pilat-Heavy-other.woff2') format('woff2');unicode-range:U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00;}
31
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:800;src:url('../fonts/Pilat-Heavy-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
32
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:900;src:url('../fonts/Pilat-Black-other.woff2') format('woff2');unicode-range:U+0100-0192,U+01FA-0237,U+02C7-0328,U+03A9-03C0,U+1E80-1E85,U+1EF2-1EF3,U+2070-208E,U+2113-212E,U+2190-2199,U+2202-2265,U+25CA-25CC,U+FB00;}
33
+ @font-face{font-display:swap;font-family:Pilat;font-style:normal;font-weight:900;src:url('../fonts/Pilat-Black-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
34
+
35
+ :root {
36
+ color-scheme: light dark;
37
+ --doc-background-elevated: light-dark(#fff, #1a1a1a);
38
+ --doc-background-primary: light-dark(#f5f5f5, #141414);
39
+ --doc-background-secondary: light-dark(#fff, #141414);
40
+ --doc-border-focus: light-dark(#00000066, #ffffff85);
41
+ --doc-container-regular: light-dark(#0000000a, #ffffff14);
42
+ --doc-content-primary: light-dark(#000, #fff);
43
+ --doc-content-secondary: light-dark(#0000008f, #ffffffa3);
44
+ --doc-content-tertiary: light-dark(#00000066, #ffffff85);
45
+ --doc-line-primary: light-dark(#00000029, #ffffff3d);
46
+ --doc-line-secondary: light-dark(#00000014, #ffffff14);
47
+ --doc-ease-snappy: cubic-bezier(0.23, 1, 0.32, 1);
48
+ --doc-font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
49
+ --doc-font-heading: Pilat, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
50
+ --doc-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
51
+ --doc-radius-2xs: calc(0.5rem * var(--tds-corner-scale, 1));
52
+ --doc-radius-3xs: calc(0.25rem * var(--tds-corner-scale, 1));
53
+ --doc-radius-full: 62.4375rem;
54
+ --doc-radius-sm: calc(1rem * var(--tds-corner-scale, 1));
55
+ --doc-radius-xs: calc(0.75rem * var(--tds-corner-scale, 1));
56
+ --doc-shadow-regular: 0 8px 48px #0000000a, 0 4px 16px #0000000a, 0 2px 8px #0000000a;
57
+ --doc-bar-min: 0.75rem;
58
+ --doc-edge: 1.25rem;
59
+ --doc-hang: 3rem;
60
+ --doc-measure: 40rem;
61
+ --doc-side: 18rem;
62
+ }
63
+
64
+ /* Base */
65
+ *, *::before, *::after { box-sizing: border-box; }
66
+ html { -webkit-text-size-adjust: 100%; scroll-padding-top: 2rem; }
67
+ body {
68
+ margin: 0; padding: 0;
69
+ background: var(--doc-background-secondary); color: var(--doc-content-primary);
70
+ font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 14px; font-weight: 400; letter-spacing: -.09px; line-height: 22px;
71
+ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
72
+ }
73
+ a { color: inherit; text-decoration: underline; text-decoration-color: var(--doc-content-secondary); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
74
+ a:hover { text-decoration-color: currentColor; }
75
+ :focus-visible { outline: 2px solid var(--doc-border-focus); outline-offset: 2px; }
76
+
77
+ /* Grid: four symmetric widths around the text column. l-body is the default. */
78
+ .doc {
79
+ position: relative;
80
+ display: grid;
81
+ grid-template-columns:
82
+ [screen-start] minmax(var(--doc-edge), 1fr)
83
+ [page-start] minmax(0, var(--doc-hang))
84
+ [outset-start] minmax(0, var(--doc-hang))
85
+ [body-start] minmax(0, var(--doc-measure))
86
+ [body-end] minmax(0, var(--doc-hang))
87
+ [outset-end] minmax(0, var(--doc-hang))
88
+ [page-end] minmax(var(--doc-edge), 1fr)
89
+ [screen-end];
90
+ padding-block: 4rem 6rem;
91
+ counter-reset: sn;
92
+ }
93
+ .doc > * { grid-column: body; margin-block: 0 1rem; min-width: 0; }
94
+ .doc > .l-outset { grid-column: outset; }
95
+ .doc > .l-page { grid-column: page; }
96
+ .doc > .l-screen { grid-column: screen; }
97
+ .doc > .l-screen > figcaption { padding-inline: var(--doc-edge); max-width: calc(var(--doc-measure) + 2 * var(--doc-edge)); margin-inline: auto; }
98
+
99
+ /* Title block */
100
+ .doc header, .brief > header { margin-bottom: 2.5rem; }
101
+ h1 { font-family: Pilat, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif; font-size: 24px; font-weight: 500; letter-spacing: -.36px; line-height: 27.6px; margin: 0 0 1rem; color: var(--doc-content-primary); text-wrap: balance; }
102
+ .dek { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 16px; font-weight: 400; letter-spacing: -.18px; line-height: 22px; color: var(--doc-content-secondary); margin: 0 0 1rem; text-wrap: pretty; }
103
+ .byline { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; font-weight: 400; letter-spacing: 0px; line-height: 16px; color: var(--doc-content-secondary); margin: 0; }
104
+
105
+ /* Headings: Pilat for the title, the article's H2s, and big numbers. Inter everywhere else. No H4. */
106
+ h2 { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 14px; font-weight: 500; letter-spacing: -.09px; line-height: 22px; margin: 2.5rem 0 0.75rem; text-wrap: balance; }
107
+ .doc > h2 { font-family: Pilat, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif; font-size: 20px; font-weight: 500; letter-spacing: -.3px; line-height: 23px; color: var(--doc-content-primary); }
108
+ /* A rule opens each section of a Brief after the first, so a section after a long list reads as new. */
109
+ .brief > .doc > * + h2 { margin-top: 1.25rem; padding-top: 1.75rem; border-top: 1px solid var(--doc-line-primary); }
110
+ /* A note ends on its own rule, which already closes the section. */
111
+ .brief > .doc > .note + h2 { margin-top: 0.75rem; padding-top: 0; border-top: 0; }
112
+ /* The section rules frame the big numbers of a Brief, which drop their own. */
113
+ .brief > .doc > .figures { border-block: 0; padding-block: 0.5rem 0.25rem; }
114
+ h3 { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 14px; font-weight: 500; letter-spacing: -.09px; line-height: 22px; margin: 1.5rem 0 0.25rem; }
115
+ p, li { text-wrap: pretty; }
116
+ p { margin: 0 0 1rem; }
117
+ ul, ol { padding-left: 1.25rem; }
118
+ li { margin-bottom: 0.25rem; }
119
+ li::marker { color: var(--doc-content-secondary); }
120
+ strong, b { font-weight: 500; }
121
+
122
+ /* Quote, code, note */
123
+ blockquote { margin-inline: 0; padding-left: 1.5rem; border-left: 1px solid var(--doc-content-primary); }
124
+ blockquote p { margin: 0; }
125
+ blockquote footer { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); margin-top: 0.5rem; }
126
+ blockquote.input { padding: 1rem 1.25rem; border-left: 0; border-radius: var(--doc-radius-xs); background: var(--doc-container-regular); }
127
+ blockquote.input::before { content: attr(data-label); display: block; margin-bottom: 0.25rem; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 500; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); }
128
+ code, kbd, pre { font-family: var(--doc-font-mono); }
129
+ code { font-size: 12px; padding: 0.1em 0.3em; border-radius: var(--doc-radius-3xs); background: var(--doc-container-regular); }
130
+ pre { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; font-weight: 400; letter-spacing: 0px; line-height: 16px; background: var(--doc-container-regular); border-radius: var(--doc-radius-xs); padding: 1rem 1.25rem; overflow-x: auto; tab-size: 2; }
131
+ pre code { background: none; padding: 0; font-size: inherit; border-radius: 0; }
132
+ .note { border-block: 1px solid var(--doc-line-primary); padding-block: 0.75rem; color: var(--doc-content-secondary); }
133
+
134
+ /* Copy button on code blocks, added by the script. The pre's right padding keeps the first line clear. */
135
+ .code-block { position: relative; }
136
+ .code-block > pre { margin: 0; padding-right: 5.5rem; }
137
+ .copy {
138
+ position: absolute; top: 0.5rem; right: 0.5rem;
139
+ font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 500; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary);
140
+ background: var(--doc-background-secondary); border: 1px solid var(--doc-line-secondary); border-radius: var(--doc-radius-2xs);
141
+ padding: 0.25rem 0.5rem; cursor: pointer;
142
+ transition: color 150ms var(--doc-ease-snappy), border-color 150ms var(--doc-ease-snappy), transform 120ms var(--doc-ease-snappy);
143
+ }
144
+ .copy:hover { color: var(--doc-content-primary); border-color: var(--doc-line-primary); }
145
+ .copy:active { transform: scale(0.97); }
146
+ .copy[data-copied] { color: var(--doc-content-primary); }
147
+
148
+ /* Figures, diagrams, and charts */
149
+ figure { margin-inline: 0; }
150
+ figure > svg, figure > img { display: block; width: 100%; height: auto; }
151
+ figcaption { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); margin-top: 0.5rem; }
152
+ svg text { font-family: var(--doc-font-body); }
153
+ svg .ink { stroke: var(--doc-content-primary); fill: none; }
154
+ svg .hair { stroke: var(--doc-line-primary); fill: none; }
155
+ svg .label { fill: var(--doc-content-primary); font-size: 14px; }
156
+ svg .meta { fill: var(--doc-content-secondary); font-size: 12px; }
157
+ svg .fill-ink { fill: var(--doc-content-primary); }
158
+ svg .fill-quiet { fill: var(--doc-content-tertiary); }
159
+ svg .fill-line { fill: var(--doc-line-primary); }
160
+ /* A chart stays inside its block. Bars shrink with it down to --doc-bar-min each, then the plot scrolls. */
161
+ .chart-key { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; padding: 0; margin: 0 0 0.75rem; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); }
162
+ .chart-key > li { display: inline-flex; align-items: center; gap: 0.375rem; margin: 0; }
163
+ .chart-key .swatch { width: 0.625rem; height: 0.625rem; border-radius: 2px; background: var(--doc-content-primary); }
164
+ .chart-key .swatch.fill-quiet { background: var(--doc-content-tertiary); }
165
+ .chart-key .swatch.fill-line { background: var(--doc-line-primary); }
166
+ .chart-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
167
+ .chart-plot { min-width: calc(var(--bars, 0) * var(--doc-bar-min)); }
168
+ .chart-plot > svg { display: block; width: 100%; height: 12rem; }
169
+
170
+ /* Big numbers: two to six, each above its label. A second dd is a line about the number. */
171
+ .figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 1.5rem 2rem; padding-block: 1.25rem; border-block: 1px solid var(--doc-line-primary); }
172
+ .figures:has(dd ~ dd) { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
173
+ .figures > div { display: flex; flex-direction: column; min-width: 0; }
174
+ .figures dt { order: 1; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); }
175
+ .figures dd { margin: 0 0 0.25rem; font-family: Pilat, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif; font-size: 24px; font-weight: 500; letter-spacing: -.36px; line-height: 27.6px; color: var(--doc-content-primary); font-variant-numeric: tabular-nums; }
176
+ .figures dd ~ dd { order: 2; margin: 0.375rem 0 0; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); font-variant-numeric: normal; }
177
+ .figures dd ~ dd b, .figures dd ~ dd strong { color: var(--doc-content-primary); }
178
+
179
+ /* Tables: one size for every cell. Row titles primary and medium, descriptions secondary and regular. */
180
+ table { width: 100%; border-collapse: collapse; }
181
+ caption { caption-side: bottom; text-align: left; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); padding-top: 0.5rem; }
182
+ th, td { text-align: left; padding: 0.5rem 1rem 0.5rem 0; border-bottom: 1px solid var(--doc-line-secondary); vertical-align: baseline; }
183
+ th:last-child, td:last-child { padding-right: 0; }
184
+ thead th { font-weight: 500; color: var(--doc-content-secondary); border-bottom-color: var(--doc-content-primary); }
185
+ tbody td { color: var(--doc-content-secondary); font-weight: 400; }
186
+ tbody th, tbody tr > td:first-child { color: var(--doc-content-primary); font-weight: 500; }
187
+ td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
188
+ tbody tr:last-child > * { border-bottom: 0; }
189
+ table.kv { border-top: 1px solid var(--doc-line-primary); }
190
+ table.kv th[scope="row"] { width: 8rem; padding-right: 1.5rem; white-space: nowrap; }
191
+ table.results td.outcome { white-space: nowrap; }
192
+
193
+ /* Footnotes: span.sn > small. Without the script a note reads inline, in parentheses. */
194
+ .sn { counter-increment: sn; }
195
+ .sn > small { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); }
196
+ .sn > small::before { content: " (" counter(sn) "\2002"; }
197
+ .sn > small::after { content: ")"; }
198
+ .sn-ref {
199
+ all: unset; cursor: pointer; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 500; letter-spacing: .01px; line-height: 16px; vertical-align: super; line-height: 0;
200
+ padding: 0.35em 0.2em; margin: -0.35em 0; color: var(--doc-content-secondary); border-radius: var(--doc-radius-3xs);
201
+ }
202
+ .sn-ref:hover, .sn-ref[aria-expanded="true"] { color: var(--doc-content-primary); text-decoration: underline; text-underline-offset: 0.2em; }
203
+ .sn-ref:focus-visible { outline: 2px solid var(--doc-border-focus); outline-offset: 1px; }
204
+ .js .sn > small { display: none; }
205
+ .js .sn.open > small {
206
+ display: block; position: absolute; z-index: 30; width: min(20rem, calc(100vw - 2.5rem));
207
+ left: var(--pop-x, 0); top: var(--pop-y, 0); padding: 1.25rem; border-radius: var(--doc-radius-sm);
208
+ background: var(--doc-background-elevated); box-shadow: var(--doc-shadow-regular); color: var(--doc-content-primary);
209
+ animation: doc-pop 200ms var(--doc-ease-snappy);
210
+ }
211
+ .js .sn.open > small::before { content: attr(data-note) "\2002"; color: var(--doc-content-secondary); }
212
+ .js .sn.open > small::after { content: none; }
213
+ @keyframes doc-pop { from { opacity: 0; transform: scale(0.96); } }
214
+ .footnotes { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); }
215
+ .doc > .footnotes h2 { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 14px; font-weight: 500; letter-spacing: -.09px; line-height: 22px; font-family: var(--doc-font-body); color: var(--doc-content-primary); margin-top: 2.5rem; }
216
+ .footnotes ol { padding-left: 1.5rem; }
217
+
218
+ /* Heading copy-link anchors, added by the script */
219
+ h2[id], h3[id] { scroll-margin-top: 2rem; }
220
+ .h-tail { white-space: nowrap; }
221
+ .h-anchor {
222
+ all: unset; box-sizing: border-box; cursor: pointer; position: relative;
223
+ display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
224
+ width: 1.5rem; height: 1.5rem; margin-left: 0.25rem; margin-top: -0.25rem; border-radius: var(--doc-radius-full);
225
+ color: var(--doc-content-secondary); opacity: 0;
226
+ transition: opacity 160ms var(--doc-ease-snappy), background-color 160ms var(--doc-ease-snappy);
227
+ }
228
+ .h-anchor svg { width: 1rem; height: 1rem; display: block; }
229
+ h2:hover .h-anchor, h3:hover .h-anchor, .h-anchor:focus-visible, .h-anchor[data-copied] { opacity: 1; }
230
+ .h-anchor:hover { color: var(--doc-content-primary); background: var(--doc-container-regular); }
231
+ .h-anchor:focus-visible { outline: 2px solid var(--doc-border-focus); outline-offset: 0; }
232
+ .h-anchor .tip {
233
+ position: absolute; right: 0; bottom: calc(100% + 4px); white-space: nowrap; pointer-events: none;
234
+ font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; padding: 6px 12px; border-radius: var(--doc-radius-xs);
235
+ background: var(--doc-content-primary); color: var(--doc-background-primary); opacity: 0; transition: opacity 160ms var(--doc-ease-snappy);
236
+ }
237
+ .h-anchor:hover .tip { opacity: 1; transition-delay: 600ms; }
238
+ .h-anchor:focus-visible .tip, .h-anchor[data-copied] .tip { opacity: 1; transition-delay: 0ms; }
239
+ @media (hover: none) {
240
+ .h-anchor { opacity: 1; color: var(--doc-content-tertiary); }
241
+ .h-anchor .tip { display: none; }
242
+ .h-anchor[data-copied] .tip { display: block; }
243
+ }
244
+ .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
245
+
246
+ /* Timeline: Chronology, dates hanging left of the column */
247
+ .chronology { list-style: none; padding: 0; }
248
+ .chronology > li { position: relative; margin: 0 0 1rem; }
249
+ .chronology > li:last-child { margin-bottom: 0; }
250
+ .chronology > li > time { display: block; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; padding-top: 2px; color: var(--doc-content-secondary); font-variant-numeric: tabular-nums; }
251
+ .chronology > li > p { margin: 0; }
252
+
253
+ /* Timeline: Axis. Without the script, and on phones, a vertical list on a thin rule. */
254
+ .axis { list-style: none; padding: 0 0 0 1.25rem; margin: 0; border-left: 1px solid var(--doc-line-primary); }
255
+ .axis > li { position: relative; margin: 0 0 0.5rem; }
256
+ .axis > li::before { content: ""; position: absolute; left: -1.25rem; top: 0.6875rem; width: 0.75rem; border-top: 1px solid var(--doc-content-primary); }
257
+ .axis > li > time { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; font-variant-numeric: tabular-nums; color: var(--doc-content-secondary); margin-right: 0.5rem; }
258
+ .axis > li.minor { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); margin-bottom: 0.25rem; }
259
+ .axis > li.minor::before { top: 0.5rem; width: 0.375rem; border-top-color: var(--doc-line-primary); }
260
+ .axis > li.phase { font-weight: 500; margin-top: 1.25rem; }
261
+ .axis > li.phase:first-child { margin-top: 0; }
262
+ .axis > li.phase::before { left: calc(-1.25rem - 1.5px); top: 0.125rem; width: 0; height: 1.25rem; border-top: 0; border-left: 2px solid var(--doc-content-primary); }
263
+ .axis-scale { display: none; }
264
+ @media (min-width: 768px) {
265
+ .axis[data-placed] {
266
+ --row: 1.625rem;
267
+ position: relative; border: 0; padding: 0; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px;
268
+ height: calc((var(--phase-lanes, 1) + var(--event-lanes, 1)) * var(--row) + 1.5rem);
269
+ }
270
+ .axis[data-placed]::after { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--phase-lanes, 1) * var(--row) + 0.75rem); border-top: 1px solid var(--doc-content-primary); }
271
+ .axis[data-placed] > li { position: absolute; margin: 0; left: calc(var(--x) * 100%); white-space: nowrap; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-primary); }
272
+ .axis[data-placed] > li::before { content: none; }
273
+ .axis[data-placed] > li > time { display: none; }
274
+ .axis[data-placed] > li:not(.phase) {
275
+ top: calc(var(--phase-lanes, 1) * var(--row) + 0.75rem);
276
+ padding: calc(var(--lane, 0) * var(--row) + 0.75rem) 0 0 0.375rem;
277
+ border-left: 1px solid var(--doc-line-primary);
278
+ }
279
+ .axis[data-placed] > li:not(.phase)::after { content: ""; position: absolute; left: -1px; top: -0.3125rem; height: 0.625rem; border-left: 1px solid var(--doc-content-primary); }
280
+ .axis[data-placed] > li[data-flip]:not(.phase) { border-left: 0; border-right: 1px solid var(--doc-line-primary); padding-left: 0; padding-right: 0.375rem; transform: translateX(-100%); }
281
+ .axis[data-placed] > li[data-flip]:not(.phase)::after { left: auto; right: -1px; }
282
+ .axis[data-placed] > li.minor { border: 0; padding: 0; width: 0; height: 0; overflow: visible; font-size: 0; color: transparent; }
283
+ .axis[data-placed] > li.minor::after { left: 0; top: -0.25rem; height: 0.5rem; border-left-color: var(--doc-content-secondary); }
284
+ .axis[data-placed] > li.phase {
285
+ top: calc(var(--lane, 0) * var(--row)); width: calc(var(--w) * 100%); min-width: 2px;
286
+ padding-bottom: 0.125rem; border-bottom: 2px solid var(--doc-content-primary); font-weight: 500;
287
+ }
288
+ .axis-scale { display: block; position: relative; height: 1.25rem; margin-top: 0.25rem; }
289
+ .axis-scale > span { position: absolute; top: 0; transform: translateX(-50%); font-variant-numeric: tabular-nums; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); white-space: nowrap; }
290
+ .axis-scale > span:first-child { transform: none; }
291
+ .axis-scale > span:last-child { transform: translateX(-100%); }
292
+ }
293
+
294
+ /* Essay: reading progress rail, added by the script */
295
+ .rail { position: fixed; z-index: 20; left: 2rem; top: 7.5rem; width: 1.75rem; height: min(calc(100vh - 15rem), 45rem); opacity: 0; visibility: hidden; transition: opacity 240ms var(--doc-ease-snappy), visibility 0s linear 240ms; }
296
+ .rail[data-on] { opacity: 1; visibility: visible; transition: opacity 240ms var(--doc-ease-snappy), visibility 0s; }
297
+ .rail-track, .rail-fill { position: absolute; left: 0.8125rem; top: 0; bottom: 0; width: 1px; }
298
+ .rail-track { background: var(--doc-line-primary); }
299
+ .rail-fill { background: var(--doc-content-primary); transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
300
+ .rail a { position: absolute; left: 0.4375rem; width: 0.8125rem; height: 0.75rem; margin-top: -0.375rem; top: calc(var(--at, 0) * 100%); display: block; }
301
+ .rail a::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--doc-content-primary); }
302
+ .rail a span {
303
+ position: absolute; left: 1.375rem; top: 50%; transform: translateY(-50%); white-space: nowrap; pointer-events: none;
304
+ font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 400; letter-spacing: .01px; line-height: 16px; padding: 6px 12px; border-radius: var(--doc-radius-xs);
305
+ background: var(--doc-content-primary); color: var(--doc-background-primary); opacity: 0; transition: opacity 160ms var(--doc-ease-snappy);
306
+ }
307
+ .rail a:hover span, .rail a:focus-visible span { opacity: 1; }
308
+
309
+ /* Brief: the column with a sticky summary on the right */
310
+ .brief {
311
+ display: grid;
312
+ grid-template-columns: minmax(var(--doc-edge), 1fr) minmax(0, calc(var(--doc-measure) + 2 * var(--doc-hang) + 3rem)) 3rem var(--doc-side) minmax(var(--doc-edge), 1fr);
313
+ grid-template-areas: ". head . side ." ". main . side .";
314
+ grid-template-rows: auto 1fr;
315
+ padding-block: 4rem 6rem;
316
+ }
317
+ .brief > header { grid-area: head; padding-left: calc(2 * var(--doc-hang)); }
318
+ .brief > .doc {
319
+ grid-area: main; padding: 0;
320
+ grid-template-columns:
321
+ [screen-start page-start] minmax(0, var(--doc-hang)) [outset-start] minmax(0, var(--doc-hang))
322
+ [body-start] minmax(0, var(--doc-measure)) [body-end] minmax(0, 1.5rem) [outset-end] minmax(0, 1.5rem)
323
+ [page-end screen-end];
324
+ }
325
+ .brief > .summary { grid-area: side; }
326
+ .summary { position: sticky; top: 2rem; align-self: start; max-height: calc(100vh - 4rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-top: 1px solid var(--doc-content-primary); padding-top: 0.75rem; }
327
+ .summary dl { margin: 0; }
328
+ .summary dd { margin: 0; }
329
+ /* The summary is outside the article that counts the notes, so its inline notes have no number. */
330
+ .summary .sn > small::before { content: " ("; }
331
+ .summary .facts { display: grid; grid-template-columns: fit-content(5.5rem) 1fr; column-gap: 0.75rem; }
332
+ .summary .facts > div { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; padding-block: 0.5rem; border-bottom: 1px solid var(--doc-line-secondary); }
333
+ .summary .facts dt { min-width: 4.5rem; color: var(--doc-content-primary); font-weight: 500; }
334
+ .summary .facts dd { color: var(--doc-content-secondary); }
335
+ .summary nav { margin-top: 1.75rem; }
336
+ .summary nav h2 { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 500; letter-spacing: .01px; line-height: 16px; color: var(--doc-content-secondary); margin: 0 0 0.5rem; }
337
+ .summary nav ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--doc-line-primary); }
338
+ .summary nav li { margin: 0; }
339
+ .summary nav a { display: block; padding: 0.25rem 0 0.25rem 0.875rem; margin-left: -1px; border-left: 1px solid transparent; text-decoration: none; color: var(--doc-content-secondary); }
340
+ .summary nav a:hover { color: var(--doc-content-primary); }
341
+ .summary nav a[aria-current="true"] { color: var(--doc-content-primary); border-left-color: var(--doc-content-primary); }
342
+
343
+ /* Post: numbered steps */
344
+ ol.steps { list-style: none; counter-reset: step; padding: 0; }
345
+ ol.steps > li { counter-increment: step; position: relative; padding-left: 2rem; margin-bottom: 0.75rem; }
346
+ ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.375rem; text-align: center; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 12px; font-weight: 500; letter-spacing: .01px; line-height: 16px; line-height: 1.375rem; border-radius: var(--doc-radius-full); background: var(--doc-container-regular); color: var(--doc-content-primary); }
347
+
348
+ @media (min-width: 1024px) {
349
+ .js .summary .sn.open > small { position: fixed; }
350
+ .chronology > li > time { position: absolute; right: calc(100% + 1.5rem); top: 0; width: calc(2 * var(--doc-hang) - 1.5rem); text-align: right; white-space: nowrap; }
351
+ .doc[data-rail] { --doc-edge: 3.5rem; }
352
+ }
353
+ @media (max-width: 1023.98px) {
354
+ .doc { --doc-hang: 0rem; }
355
+ .rail { left: 0; right: 0; top: 0; width: auto; height: 2px; }
356
+ .rail-track { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 2px; background: transparent; }
357
+ .rail-fill { left: 0; right: 0; width: auto; height: 2px; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
358
+ .rail a { display: none; }
359
+ .brief { grid-template-columns: minmax(var(--doc-edge), 1fr) minmax(0, var(--doc-measure)) minmax(var(--doc-edge), 1fr); grid-template-areas: ". head ." ". side ." ". main ."; grid-template-rows: auto; padding-top: 3rem; }
360
+ .brief > header { padding-left: 0; margin-bottom: 1.5rem; }
361
+ .brief > .doc { grid-template-columns: [screen-start page-start outset-start body-start] minmax(0, 1fr) [body-end outset-end page-end screen-end]; }
362
+ .summary { position: static; max-height: none; overflow: visible; margin-bottom: 1rem; border-bottom: 1px solid var(--doc-line-primary); padding-bottom: 0.5rem; }
363
+ .summary .facts > div:last-child { border-bottom: 0; }
364
+ .summary nav { display: none; }
365
+ }
366
+ @media (min-width: 640px) and (max-width: 1023.98px) {
367
+ .chronology > li { padding-left: 5.5rem; }
368
+ .chronology > li > time { position: absolute; left: 0; top: 0; }
369
+ }
370
+ @media (max-width: 639.98px) {
371
+ .doc { padding-block: 2.5rem 4rem; }
372
+ blockquote { padding-left: 1rem; }
373
+ .figures { gap: 1rem 2rem; }
374
+ th, td { padding-right: 0.5rem; }
375
+ table.kv th[scope="row"] { width: 6.5rem; padding-right: 0.75rem; white-space: normal; }
376
+ table.results td.outcome { white-space: normal; }
377
+ pre { padding: 0.875rem 1rem; }
378
+ }
379
+
380
+ /* Motion and print */
381
+ @media (prefers-reduced-motion: reduce) {
382
+ *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
383
+ .copy:active { transform: none; }
384
+ }
385
+ @media print {
386
+ .rail, .summary nav, .h-anchor, .copy { display: none; }
387
+ .summary { position: static; max-height: none; overflow: visible; }
388
+ }
@@ -0,0 +1,2 @@
1
+ /** Document mode: a stylesheet, a script, and a markup contract for agent-written HTML documents. @module */
2
+ export * as Document from './Document.js'
@@ -0,0 +1,132 @@
1
+ /** The `tempo-document` command line, which writes starter documents and lints documents through injected file operations. @module */
2
+ import * as Document from '../Document.ts'
3
+ import * as Template from './Template.ts'
4
+
5
+ /** The text that `tempo-document help` prints. */
6
+ export const usage = `Usage: tempo-document <command>
7
+
8
+ Commands:
9
+ init <essay|brief|post> [file] Write a starter document that links this version on jsDelivr.
10
+ lint <file.html...> Check whole documents against the document mode contract.
11
+ `
12
+
13
+ /**
14
+ * Runs one command and returns its exit code and output. `init` writes a starter template to a new
15
+ * file, with its links pinned to `version`, and fails when the file exists. `lint` runs
16
+ * `Document.lint` on each whole page and prints one `file:line: rule message` line per diagnostic.
17
+ * The code is 1 when a command fails or a document has a diagnostic, and 0 otherwise.
18
+ *
19
+ * @example
20
+ * await Cli.run({ args: ['lint', 'brief.html'], files, version: '0.3.17' })
21
+ * // { code: 0, stderr: '', stdout: '1 document passes the document mode lint.\n' }
22
+ */
23
+ export async function run(options: run.Options): Promise<run.ReturnType> {
24
+ const { args, files, version } = options
25
+ const [command, ...operands] = args
26
+
27
+ if (command === 'init') return init({ files, operands, version })
28
+ if (command === 'lint') return lint({ files, operands })
29
+ if (command === 'help' || command === '--help' || command === '-h')
30
+ return { code: 0, stderr: '', stdout: usage }
31
+ return {
32
+ code: 1,
33
+ stderr: (command ? `Unknown command "${command}".\n\n` : '') + usage,
34
+ stdout: '',
35
+ }
36
+ }
37
+
38
+ export declare namespace run {
39
+ /** The file operations that the commands perform. Paths are relative to the working directory. */
40
+ type Files = {
41
+ /** Writes a new file. Resolves false, and writes nothing, when the path exists. */
42
+ create: (path: string, text: string) => Promise<boolean>
43
+ /** Reads a file. Resolves undefined when the path does not exist. */
44
+ read: (path: string) => Promise<string | undefined>
45
+ /** Reads the source of a starter template, with its version tokens. */
46
+ template: (name: (typeof Document.templates)[number]) => Promise<string>
47
+ }
48
+
49
+ type Options = {
50
+ /** The arguments after the executable, such as `['lint', 'brief.html']`. */
51
+ args: readonly string[]
52
+ /** The file operations that the commands perform. */
53
+ files: Files
54
+ /** The installed package version, which `init` pins the links to. */
55
+ version: string
56
+ }
57
+
58
+ type ReturnType = {
59
+ /** The exit code: 1 when the command fails or a document has a diagnostic, and 0 otherwise. */
60
+ code: 0 | 1
61
+ /** The text for standard error, empty unless the command fails. */
62
+ stderr: string
63
+ /** The text for standard output. */
64
+ stdout: string
65
+ }
66
+ }
67
+
68
+ /** Writes a starter template to a new file. */
69
+ async function init(options: {
70
+ files: run.Files
71
+ operands: readonly string[]
72
+ version: string
73
+ }): Promise<run.ReturnType> {
74
+ const { files, operands, version } = options
75
+ const [name, file = `${name}.html`] = operands
76
+ const template = Document.templates.find((entry) => entry === name)
77
+ if (!template)
78
+ return {
79
+ code: 1,
80
+ stderr: `init needs a template: ${Document.templates.join(', ')}.\n\n${usage}`,
81
+ stdout: '',
82
+ }
83
+
84
+ const html = Template.render({ source: await files.template(template), version })
85
+ if (!(await files.create(file, html)))
86
+ return {
87
+ code: 1,
88
+ stderr: `${file} already exists, and init does not overwrite files. Pass a new path.\n`,
89
+ stdout: '',
90
+ }
91
+
92
+ return {
93
+ code: 0,
94
+ stderr: '',
95
+ stdout: [
96
+ `Wrote ${file} from the ${template} template, linked to @tempoxyz/ds@${version} on jsDelivr.`,
97
+ 'Replace the content that its comments mark, then check it:',
98
+ ` npx -p @tempoxyz/ds@${version} tempo-document lint ${file}`,
99
+ '',
100
+ ].join('\n'),
101
+ }
102
+ }
103
+
104
+ /** Lints each file as a whole page. */
105
+ async function lint(options: {
106
+ files: run.Files
107
+ operands: readonly string[]
108
+ }): Promise<run.ReturnType> {
109
+ const { files, operands } = options
110
+ if (operands.length === 0)
111
+ return { code: 1, stderr: `lint needs at least one file.\n\n${usage}`, stdout: '' }
112
+
113
+ const lines: string[] = []
114
+ const missing: string[] = []
115
+
116
+ for (const file of operands) {
117
+ const html = await files.read(file)
118
+ if (html === undefined) {
119
+ missing.push(`${file}: no such file.`)
120
+ continue
121
+ }
122
+ for (const diagnostic of Document.lint(html, { page: true }))
123
+ lines.push(`${file}:${diagnostic.line}: ${diagnostic.rule} ${diagnostic.message}`)
124
+ }
125
+
126
+ const stderr = missing.map((line) => `${line}\n`).join('')
127
+ if (lines.length > 0 || missing.length > 0)
128
+ return { code: 1, stderr, stdout: lines.map((line) => `${line}\n`).join('') }
129
+
130
+ const count = operands.length === 1 ? '1 document passes' : `${operands.length} documents pass`
131
+ return { code: 0, stderr, stdout: `${count} the document mode lint.\n` }
132
+ }
@@ -0,0 +1,25 @@
1
+ /** Pins the links in a starter document template to one published version of the package. @module */
2
+
3
+ /**
4
+ * Returns a starter template with each version token replaced, so its stylesheet and script links
5
+ * point at that version on jsDelivr.
6
+ *
7
+ * @example
8
+ * Template.render({ source: '<link href="…/@tempoxyz/ds@{{version}}/…" />', version: '0.3.17' })
9
+ * // '<link href="…/@tempoxyz/ds@0.3.17/…" />'
10
+ */
11
+ export function render(options: render.Options): string {
12
+ return options.source.replaceAll(token, options.version)
13
+ }
14
+
15
+ export declare namespace render {
16
+ type Options = {
17
+ /** The template source, as `src/document/templates` holds it. */
18
+ source: string
19
+ /** The package version to pin, such as `0.3.17`. */
20
+ version: string
21
+ }
22
+ }
23
+
24
+ /** The placeholder that a template source holds in place of the package version. */
25
+ export const token = '{{version}}'
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The document mode script. The build bundles it into one classic script with no imports, so it runs
3
+ * from a CDN and from a page opened as a file. Load it in the head with `<script defer src=".../script.js">`.
4
+ * @module
5
+ */
6
+ import * as Enhance from './Enhance.js'
7
+
8
+ Enhance.run(document)