@memorysmithapp/markdown-renderer 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,998 @@
1
+ /*
2
+ * The default theme: MemorySmith's reading surface, every rule of MemorySmith's
3
+ * own stylesheet that draws the body of a note, and nothing else.
4
+ *
5
+ * Every selector is under `.markdown`, so the package styles the note and
6
+ * never the page. The root of a note — the `.markdown` element `NoteBody`
7
+ * draws, which carries `data-theme` with the scheme — is where the values are
8
+ * set, from the public custom properties `--markdown-*`. A theme's
9
+ * `properties` are written there by the renderer, and a host may set them on
10
+ * the root or on any ancestor too; each one left unset takes MemorySmith's
11
+ * value, in the light or the dark scheme. Every value a rule here reads is one
12
+ * of them, metrics included, so a theme of properties alone needs no CSS.
13
+ *
14
+ * `structure.css` holds what every theme needs whatever it looks like;
15
+ * `styles.css` is the two together.
16
+ *
17
+ * The faces are Inter (400, 600) and Space Grotesk (500, 700), which the host
18
+ * loads; KaTeX's own stylesheet, `katex/dist/katex.min.css`, is the host's to
19
+ * import beside this one.
20
+ */
21
+
22
+ /* ── The values, at the root of a note ──────────────────────────────────────
23
+ Brand tokens from the MemorySmith.app brand book. Palette: Azul cofre
24
+ #0F56D7 (structure) · Laranja sinal #FF8A2B (capture) · Verde nó #16A34A
25
+ (connection) · Tinta #0E1526 (text) · Fundo escuro #0B1220 (dark mode) ·
26
+ Papel #EDEFEC (background). The dark theme draws in the light tones of the
27
+ version "Cor escuro". */
28
+ .markdown[data-theme] {
29
+ --ms-bg: var(--markdown-bg, #edefec);
30
+ --ms-surface: var(--markdown-surface, #ffffff);
31
+ --ms-border: var(--markdown-border, #dce0da);
32
+ --ms-text: var(--markdown-text, #0e1526);
33
+ --ms-text-soft: var(--markdown-text-soft, #545d73);
34
+ --ms-accent: var(--markdown-accent, #0f56d7);
35
+ --ms-pending: var(--markdown-pending, #a6ab9f);
36
+ --ms-code-bg: var(--markdown-code-bg, #f4f5f2);
37
+ /* Muted, as the default theme sets inline code: the soft text of the
38
+ surface. Inline code has no fill, so it sits on the paper or on the tint
39
+ of a callout, and the soft text holds 4.86:1 on the palest of those. */
40
+ --ms-code-color: var(--markdown-code-color, var(--ms-text-soft));
41
+ /* Syntax tokens, drawn from the brand palette rather than from a theme
42
+ somebody else shipped: the blue of structure for what a language reserves,
43
+ the green of connection for a literal value, and the orange of capture for
44
+ the one thing an eye should catch in a block, which is a string. A comment
45
+ is the soft text of the surface. All four are checked against the code
46
+ background for 4.5:1, because a token nobody can read is decoration. */
47
+ --ms-token-keyword: var(--markdown-token-keyword, #0f56d7);
48
+ --ms-token-string: var(--markdown-token-string, #b4541a);
49
+ --ms-token-number: var(--markdown-token-number, #157a3a);
50
+ --ms-token-comment: var(--markdown-token-comment, #646c7f);
51
+ --ms-token-punctuation: var(--markdown-token-punctuation, #4e566b);
52
+ /* The callout hues, as RGB triplets so a tint can be laid at any alpha. They
53
+ are semantic and not decorative: blue informs, green confirms, amber
54
+ warns, red stops. They start from the brand's own, and each is taken down
55
+ in lightness, at its own hue and saturation, until the title clears 4.5:1
56
+ against the tinted field it sits on. */
57
+ --ms-callout-info: var(--markdown-callout-info, 15, 86, 215);
58
+ --ms-callout-idea: var(--markdown-callout-idea, 14, 109, 102);
59
+ --ms-callout-done: var(--markdown-callout-done, 15, 111, 51);
60
+ --ms-callout-warn: var(--markdown-callout-warn, 158, 71, 0);
61
+ --ms-callout-stop: var(--markdown-callout-stop, 180, 35, 24);
62
+ --ms-callout-aside: var(--markdown-callout-aside, 109, 40, 217);
63
+ --ms-callout-quote: var(--markdown-callout-quote, 84, 93, 115);
64
+ --ms-font-sans: var(--markdown-font-sans, 'Inter', 'Segoe UI', system-ui, sans-serif);
65
+ --ms-font-display: var(--markdown-font-display, 'Space Grotesk', 'Segoe UI', system-ui, sans-serif);
66
+ --ms-font-mono: var(--markdown-font-mono, ui-monospace, 'Cascadia Code', Consolas, monospace);
67
+ --ms-radius: var(--markdown-radius, 8px);
68
+ --ms-radius-large: var(--markdown-radius-large, 12px);
69
+
70
+ --ms-font-heading: var(--markdown-font-heading, var(--ms-font-sans));
71
+
72
+ /* The metrics of the reading surface: the default theme of the desktop vault
73
+ editors. 700px of text is its readable line length. */
74
+ --ms-font-size: var(--markdown-font-size, 1rem);
75
+ --ms-p-spacing: var(--markdown-paragraph-spacing, 1rem);
76
+ --ms-heading-spacing: var(--markdown-heading-spacing, calc(var(--ms-p-spacing) * 2.5));
77
+ --ms-list-indent: var(--markdown-list-indent, 2em);
78
+ --ms-list-spacing: var(--markdown-list-spacing, 0.075em);
79
+ --ms-line-height-normal: var(--markdown-line-height, 1.5);
80
+ --ms-line-height-tight: var(--markdown-line-height-tight, 1.3);
81
+ --ms-root-line-height: var(--markdown-root-line-height, 1.45);
82
+ --ms-heading-weight: var(--markdown-heading-weight, 600);
83
+ --ms-heading-color: var(--markdown-heading-color, currentcolor);
84
+ --ms-h1-size: var(--markdown-h1-size, 1.802em);
85
+ --ms-h2-size: var(--markdown-h2-size, 1.602em);
86
+ --ms-h3-size: var(--markdown-h3-size, 1.424em);
87
+ --ms-h4-size: var(--markdown-h4-size, 1.266em);
88
+ --ms-h5-size: var(--markdown-h5-size, 1.125em);
89
+ --ms-h6-size: var(--markdown-h6-size, 1em);
90
+ --ms-h1-weight: var(--markdown-h1-weight, 700);
91
+ --ms-h6-color: var(--markdown-h6-color, var(--ms-text-soft));
92
+
93
+ /* Code, quotations, tables and embeds, each from the palette above unless a
94
+ theme names its own. */
95
+ --ms-code-border: var(--markdown-code-border, var(--ms-border));
96
+ --ms-inline-code-bg: var(--markdown-inline-code-bg, transparent);
97
+ --ms-inline-code-padding: var(--markdown-inline-code-padding, 0);
98
+ --ms-quote-border-color: var(--markdown-quote-border-color, var(--ms-border));
99
+ --ms-quote-border-width: var(--markdown-quote-border-width, 2px);
100
+ --ms-quote-color: var(--markdown-quote-color, currentcolor);
101
+ --ms-table-border: var(--markdown-table-border, var(--ms-border));
102
+ --ms-table-cell-padding: var(--markdown-table-cell-padding, 4px 8px);
103
+ --ms-table-header-bg: var(--markdown-table-header-bg, transparent);
104
+ --ms-table-header-rule: var(--markdown-table-header-rule, 2px solid var(--ms-text-soft));
105
+ --ms-table-stripe-bg: var(--markdown-table-stripe-bg, transparent);
106
+ --ms-table-hover-bg: var(--markdown-table-hover-bg, var(--ms-code-bg));
107
+ --ms-embed-rule: var(--markdown-embed-rule, var(--ms-accent));
108
+
109
+ /* The frontmatter, drawn above the body as MemorySmith's note page draws it:
110
+ the name as the title, in the face and at the size of a first heading, and
111
+ the properties in a block that folds, under a rule. */
112
+ --ms-title-font: var(--markdown-title-font, var(--ms-font-heading));
113
+ --ms-title-size: var(--markdown-title-size, var(--ms-h1-size));
114
+ --ms-title-weight: var(--markdown-title-weight, 700);
115
+ --ms-title-color: var(--markdown-title-color, currentcolor);
116
+ --ms-properties-rule: var(--markdown-properties-rule, 1px solid var(--ms-border));
117
+ --ms-properties-label-font: var(--markdown-properties-label-font, var(--ms-font-display));
118
+ --ms-properties-label-color: var(--markdown-properties-label-color, var(--ms-text-soft));
119
+ --ms-properties-key-color: var(--markdown-properties-key-color, var(--ms-text-soft));
120
+ --ms-chip-font: var(--markdown-chip-font, var(--ms-font-display));
121
+ --ms-chip-bg: var(--markdown-chip-bg, var(--ms-border));
122
+ --ms-chip-color: var(--markdown-chip-color, var(--ms-text));
123
+ /* The icon of a property's key, by the shape of its value: the Lucide set
124
+ MemorySmith's page draws them with. */
125
+ --ms-icon-property-text: var(--markdown-icon-property-text, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 12H3'/%3E%3Cpath d='M17 18H3'/%3E%3Cpath d='M21 6H3'/%3E%3C/svg%3E"));
126
+ --ms-icon-property-list: var(--markdown-icon-property-list, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13'/%3E%3Cpath d='M8 12h13'/%3E%3Cpath d='M8 18h13'/%3E%3Cpath d='M3 6h.01'/%3E%3Cpath d='M3 12h.01'/%3E%3Cpath d='M3 18h.01'/%3E%3C/svg%3E"));
127
+ --ms-icon-property-date: var(--markdown-icon-property-date, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E"));
128
+ --ms-icon-property-boolean: var(--markdown-icon-property-boolean, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"));
129
+
130
+ /* The line icons a callout wears, as masks rather than images: one file per
131
+ shape, tinted at use by whatever colour the element already carries. They
132
+ are the Lucide set the reference theme draws with; a theme names its own
133
+ per family, as the icon properties, or draws them as elements. */
134
+ --ms-icon-pencil: var(--markdown-icon-note, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E"));
135
+ --ms-icon-info: var(--markdown-icon-info, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E"));
136
+ --ms-icon-clipboard: var(--markdown-icon-summary, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M8 11h8'/%3E%3Cpath d='M8 16h6'/%3E%3C/svg%3E"));
137
+ --ms-icon-flame: var(--markdown-icon-tip, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.07-2.14-.22-4.05 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.15.43-2.29 1-3a2.5 2.5 0 0 0 2.5 2.5Z'/%3E%3C/svg%3E"));
138
+ --ms-icon-check: var(--markdown-icon-success, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"));
139
+ --ms-icon-question: var(--markdown-icon-question, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E"));
140
+ --ms-icon-alert: var(--markdown-icon-warning, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E"));
141
+ --ms-icon-cross: var(--markdown-icon-failure, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E"));
142
+ --ms-icon-zap: var(--markdown-icon-danger, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14Z'/%3E%3C/svg%3E"));
143
+ --ms-icon-list: var(--markdown-icon-example, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13'/%3E%3Cpath d='M8 12h13'/%3E%3Cpath d='M8 18h13'/%3E%3Cpath d='M3 6h.01'/%3E%3Cpath d='M3 12h.01'/%3E%3Cpath d='M3 18h.01'/%3E%3C/svg%3E"));
144
+ --ms-icon-quote: var(--markdown-icon-quote, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21c3 0 7-1 7-8V5c0-1.25-.76-2.02-2-2H4c-1.25 0-2 .75-2 1.97V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .01-1 1.03V20c0 1 0 1 1 1Z'/%3E%3Cpath d='M15 21c3 0 7-1 7-8V5c0-1.25-.76-2.02-2-2h-4c-1.25 0-2 .75-2 1.97V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1Z'/%3E%3C/svg%3E"));
145
+
146
+ /* The note is drawn on the paper, in the text face, as MemorySmith's page
147
+ draws it. */
148
+ background: var(--ms-bg);
149
+ color: var(--ms-text);
150
+ font-family: var(--ms-font-sans);
151
+ }
152
+
153
+ /* Dark: brand "Fundo escuro" #0B1220, Papel as text. */
154
+ .markdown[data-theme='dark'] {
155
+ --ms-bg: var(--markdown-bg, #0b1220);
156
+ --ms-surface: var(--markdown-surface, #111a2c);
157
+ --ms-border: var(--markdown-border, #24304a);
158
+ --ms-text: var(--markdown-text, #edefec);
159
+ --ms-text-soft: var(--markdown-text-soft, #93a0ba);
160
+ --ms-accent: var(--markdown-accent, #4c8dff);
161
+ --ms-pending: var(--markdown-pending, #5d6880);
162
+ --ms-code-bg: var(--markdown-code-bg, #0e1728);
163
+ --ms-token-keyword: var(--markdown-token-keyword, #4c8dff);
164
+ --ms-token-string: var(--markdown-token-string, #f0a05a);
165
+ --ms-token-number: var(--markdown-token-number, #4fc07f);
166
+ --ms-token-comment: var(--markdown-token-comment, #7c89a3);
167
+ --ms-token-punctuation: var(--markdown-token-punctuation, #93a0ba);
168
+ --ms-callout-info: var(--markdown-callout-info, 76, 141, 255);
169
+ --ms-callout-idea: var(--markdown-callout-idea, 45, 212, 191);
170
+ --ms-callout-done: var(--markdown-callout-done, 74, 222, 128);
171
+ --ms-callout-warn: var(--markdown-callout-warn, 251, 191, 36);
172
+ --ms-callout-stop: var(--markdown-callout-stop, 248, 113, 113);
173
+ --ms-callout-aside: var(--markdown-callout-aside, 167, 139, 250);
174
+ --ms-callout-quote: var(--markdown-callout-quote, 147, 160, 186);
175
+ /* MemorySmith's track: the paper itself is the fill of a chip in the dark. */
176
+ --ms-chip-bg: var(--markdown-chip-bg, #1c2640);
177
+ }
178
+
179
+ /* ── What the page around a note gave it ────────────────────────────────────
180
+ On MemorySmith's page these came from the document; here they are scoped to
181
+ the note.
182
+
183
+ The root of a note is where MemorySmith's page had the document: the runs of
184
+ text are each a `.markdown` inside it, and an embed, a pending embed and the
185
+ notice of remote images sit beside them, outside any `.markdown`, under the
186
+ body's line height and with a paragraph's own margins. The root draws them
187
+ the same, which the rules on `.markdown[data-theme]` below are for. */
188
+ .markdown[data-theme] {
189
+ line-height: var(--ms-root-line-height);
190
+ overflow-wrap: normal;
191
+ }
192
+ .markdown[data-theme] > p,
193
+ .markdown .embed-body > p.embed-missing {
194
+ margin-block: 1em;
195
+ }
196
+ .markdown a {
197
+ color: var(--ms-accent);
198
+ text-decoration: none;
199
+ }
200
+ .markdown a:hover {
201
+ text-decoration: underline;
202
+ }
203
+
204
+ /* ── The reading surface ────────────────────────────────────────────────────
205
+ A note is read here the way the notebook that wrote it is read, so the
206
+ rendered Markdown follows the metrics of the default theme of the desktop
207
+ vault editors: its heading scale, its paragraph and list spacing, its quiet
208
+ blockquote, its code and table treatment and its callouts. What it does NOT
209
+ take is the palette: every colour comes from the brand book, wired into the
210
+ role the theme gives it. Headings are set in the text face, because what is
211
+ drawn here is the notebook's content, not the product's chrome. */
212
+ .markdown {
213
+ font-size: var(--ms-font-size);
214
+ line-height: var(--ms-line-height-normal);
215
+ overflow-wrap: break-word;
216
+ }
217
+
218
+ .markdown :is(h1, h2, h3, h4, h5, h6) {
219
+ font-family: var(--ms-font-heading);
220
+ font-weight: var(--ms-heading-weight);
221
+ color: var(--ms-heading-color);
222
+ line-height: var(--ms-line-height-tight);
223
+ letter-spacing: normal;
224
+ border: 0;
225
+ padding: 0;
226
+ }
227
+ .markdown h1 {
228
+ font-size: var(--ms-h1-size);
229
+ font-weight: var(--ms-h1-weight);
230
+ }
231
+ .markdown h2 {
232
+ font-size: var(--ms-h2-size);
233
+ }
234
+ .markdown h3 {
235
+ font-size: var(--ms-h3-size);
236
+ }
237
+ .markdown h4 {
238
+ font-size: var(--ms-h4-size);
239
+ }
240
+ .markdown h5 {
241
+ font-size: var(--ms-h5-size);
242
+ }
243
+ .markdown h6 {
244
+ font-size: var(--ms-h6-size);
245
+ color: var(--ms-h6-color);
246
+ }
247
+
248
+ /* The rhythm is prose's own: a heading stands two and a half paragraphs clear
249
+ of what came before and sits right on top of what follows. */
250
+ .markdown :is(h1, h2, h3, h4, h5, h6) {
251
+ margin-block: var(--ms-heading-spacing) 0;
252
+ }
253
+ .markdown:not([data-theme], .footnotes-run) > :first-child {
254
+ margin-block-start: 0;
255
+ }
256
+
257
+ .markdown p {
258
+ margin-block: var(--ms-p-spacing);
259
+ }
260
+ .markdown ul,
261
+ .markdown ol {
262
+ margin-block: var(--ms-p-spacing);
263
+ padding-inline-start: var(--ms-list-indent);
264
+ }
265
+ .markdown li {
266
+ margin-block: var(--ms-list-spacing);
267
+ }
268
+ /* A list inside a list, and a paragraph inside an item, are the same breath. */
269
+ .markdown li > p,
270
+ .markdown li :is(ul, ol) {
271
+ margin-block: 0;
272
+ }
273
+ .markdown li[class~='task-list-item'] {
274
+ list-style: none;
275
+ }
276
+ .markdown ul[class~='contains-task-list'] {
277
+ padding-inline-start: 0.4em;
278
+ }
279
+ .markdown input[type='checkbox'] {
280
+ margin-inline-end: 0.45em;
281
+ accent-color: var(--ms-accent);
282
+ }
283
+
284
+ /* A blockquote is a quotation and nothing more: a hairline and an indent, no
285
+ tint, no rounding, no italic. */
286
+ .markdown blockquote {
287
+ margin: var(--ms-p-spacing) 0;
288
+ padding: 0 0 0 1.5em;
289
+ border: 0;
290
+ border-inline-start: var(--ms-quote-border-width) solid var(--ms-quote-border-color);
291
+ border-radius: 0;
292
+ background: none;
293
+ font-style: normal;
294
+ color: var(--ms-quote-color);
295
+ }
296
+
297
+ /* Footnotes (§7.12): the reference is a small raised number, and the notes are
298
+ gathered at the end of the note under a hairline, smaller and softer than the
299
+ text they serve. The label is a heading a reader sees, in their language. */
300
+ .markdown sup:has(> a[data-footnote-ref]) {
301
+ line-height: 0;
302
+ }
303
+ .markdown a[data-footnote-ref] {
304
+ padding-inline: 0.1em;
305
+ font-size: 0.8em;
306
+ text-decoration: none;
307
+ }
308
+ .markdown section.footnotes {
309
+ margin-top: 2.5em;
310
+ padding-top: 0.75em;
311
+ border-top: 1px solid var(--ms-border);
312
+ font-size: 0.875em;
313
+ color: var(--ms-text-soft);
314
+ }
315
+ .markdown .footnotes-label {
316
+ margin: 0 0 0.5em;
317
+ font-size: 0.8rem;
318
+ font-weight: 600;
319
+ letter-spacing: 0.04em;
320
+ text-transform: uppercase;
321
+ color: var(--ms-text-soft);
322
+ }
323
+ .markdown section.footnotes li p {
324
+ margin-block: 0.25em;
325
+ }
326
+ .markdown a.data-footnote-backref {
327
+ margin-inline-start: 0.35em;
328
+ text-decoration: none;
329
+ }
330
+
331
+ /* Inline code is told apart by its face and its colour, and nothing else: in
332
+ a sentence a fill only spots the paragraph. */
333
+ .markdown code {
334
+ font-family: var(--ms-font-mono);
335
+ font-size: 0.875em;
336
+ color: var(--ms-code-color);
337
+ background: var(--ms-inline-code-bg);
338
+ padding: var(--ms-inline-code-padding);
339
+ }
340
+ /* A fenced block needs an edge, because the face alone does not say where it
341
+ starts and ends: a frame around a `pre` that scrolls and never wraps, and
342
+ the Copy button in its corner, which stays put while the content scrolls
343
+ under it. */
344
+ .markdown .code-block {
345
+ position: relative;
346
+ margin-block: var(--ms-p-spacing);
347
+ border: 1px solid var(--ms-code-border);
348
+ border-radius: var(--ms-radius);
349
+ background: var(--ms-code-bg);
350
+ }
351
+ .markdown pre {
352
+ margin-block: var(--ms-p-spacing);
353
+ padding: 0.75rem 1rem;
354
+ overflow-x: auto;
355
+ font-size: 0.875em;
356
+ line-height: 1.45;
357
+ }
358
+ .markdown .code-block > pre {
359
+ margin: 0;
360
+ /* Room for the button, so the first line is never under it. */
361
+ padding-right: 6.5rem;
362
+ }
363
+ .markdown pre code {
364
+ background: none;
365
+ color: var(--ms-text);
366
+ padding: 0;
367
+ border-radius: 0;
368
+ font-size: inherit;
369
+ }
370
+
371
+ /* The button that copies a block: MemorySmith's small button, on the surface. */
372
+ .markdown .button {
373
+ display: inline-flex;
374
+ align-items: center;
375
+ justify-content: center;
376
+ gap: 0.45rem;
377
+ min-height: 2.25rem;
378
+ padding: 0 0.95rem;
379
+ border: 1px solid transparent;
380
+ border-radius: var(--ms-radius);
381
+ background: none;
382
+ font-family: var(--ms-font-display);
383
+ font-weight: 500;
384
+ font-size: 0.875rem;
385
+ line-height: 1;
386
+ text-decoration: none;
387
+ white-space: nowrap;
388
+ cursor: pointer;
389
+ transition:
390
+ background-color 120ms ease,
391
+ border-color 120ms ease,
392
+ color 120ms ease;
393
+ }
394
+ .markdown .button.is-small {
395
+ min-height: 32px;
396
+ padding: 0 11px;
397
+ font-size: 0.78rem;
398
+ }
399
+ /* A button does not inherit the colour of its text, so the verb says its own. */
400
+ .markdown .copy-action {
401
+ color: var(--ms-text);
402
+ }
403
+ .markdown .code-copy {
404
+ position: absolute;
405
+ top: 0.4rem;
406
+ right: 0.4rem;
407
+ border-color: var(--ms-border);
408
+ background: var(--ms-surface);
409
+ }
410
+
411
+ .markdown table {
412
+ margin-block: var(--ms-p-spacing);
413
+ border-collapse: collapse;
414
+ display: block;
415
+ overflow-x: auto;
416
+ line-height: var(--ms-line-height-tight);
417
+ }
418
+ .markdown :is(th, td) {
419
+ border: 1px solid var(--ms-table-border);
420
+ padding: var(--ms-table-cell-padding);
421
+ text-align: start;
422
+ }
423
+ /* The header is told apart by the type and by a heavier rule, and not by a
424
+ fill; the only tint a table has is the row under the pointer. */
425
+ .markdown th {
426
+ font-weight: 600;
427
+ color: var(--ms-text);
428
+ border-bottom: var(--ms-table-header-rule);
429
+ background: var(--ms-table-header-bg);
430
+ }
431
+ .markdown tbody tr:nth-child(even) {
432
+ background: var(--ms-table-stripe-bg);
433
+ }
434
+ .markdown tbody tr:hover {
435
+ background: var(--ms-table-hover-bg);
436
+ }
437
+ /* Inside a callout the rules are drawn in the colour of the callout: the
438
+ neutral border is almost the colour of the tint a callout lays under it. */
439
+ .markdown .callout :is(th, td) {
440
+ border-color: rgba(var(--callout-color), 0.35);
441
+ }
442
+ .markdown .callout th {
443
+ border-bottom-color: rgba(var(--callout-color), 0.7);
444
+ }
445
+ .markdown .callout tbody tr:hover {
446
+ background: rgba(var(--callout-color), 0.08);
447
+ }
448
+
449
+ .markdown hr {
450
+ margin-block: calc(var(--ms-p-spacing) * 2);
451
+ border: 0;
452
+ border-top: 2px solid var(--ms-border);
453
+ }
454
+
455
+ /* ── The frontmatter ───────────────────────────────────────────────────────
456
+ As MemorySmith's note page draws it (*observed* at 4b67c7e): the name as the
457
+ title, and the properties not in a card but in the flow of the page, under
458
+ the title and above the prose, parted from it by a single rule. The block
459
+ opens by default and folds under its summary. Each key wears a line icon by
460
+ the shape of its value; a list is chips, neutral and never blue, which
461
+ would read as a link. */
462
+ .markdown .note-title {
463
+ margin: 0 0 0.6rem;
464
+ font-family: var(--ms-title-font);
465
+ font-size: var(--ms-title-size);
466
+ font-weight: var(--ms-title-weight);
467
+ line-height: var(--ms-line-height-tight);
468
+ letter-spacing: normal;
469
+ color: var(--ms-title-color);
470
+ }
471
+ .markdown .properties-box {
472
+ margin: 0 0 1.5rem;
473
+ padding: 0 0 0.85rem;
474
+ border-bottom: var(--ms-properties-rule);
475
+ }
476
+ .markdown .properties-box summary {
477
+ cursor: pointer;
478
+ font-family: var(--ms-properties-label-font);
479
+ font-weight: 500;
480
+ font-size: 0.7rem;
481
+ letter-spacing: 0.08em;
482
+ text-transform: uppercase;
483
+ color: var(--ms-properties-label-color);
484
+ }
485
+ .markdown .metadata-container {
486
+ display: grid;
487
+ grid-template-columns: minmax(6rem, max-content) 1fr;
488
+ gap: 0.15rem 1rem;
489
+ margin-top: 0.6rem;
490
+ font-size: 0.875rem;
491
+ line-height: 1.6;
492
+ }
493
+ .markdown .metadata-property {
494
+ display: contents;
495
+ }
496
+ .markdown .metadata-property-key {
497
+ display: flex;
498
+ align-items: baseline;
499
+ gap: 0.4rem;
500
+ color: var(--ms-properties-key-color);
501
+ overflow-wrap: anywhere;
502
+ /* Its own height, not its row's: stretched to a value that wraps, the key
503
+ centred its icon on the whole row while its text stayed on the first line.
504
+ MemorySmith's page has that defect; this surface does not carry it. */
505
+ align-self: start;
506
+ }
507
+ .markdown .metadata-property-key::before {
508
+ content: '';
509
+ flex: 0 0 auto;
510
+ align-self: center;
511
+ width: 0.95em;
512
+ height: 0.95em;
513
+ background-color: currentcolor;
514
+ -webkit-mask: var(--property-icon, var(--ms-icon-property-text)) center / contain no-repeat;
515
+ mask: var(--property-icon, var(--ms-icon-property-text)) center / contain no-repeat;
516
+ }
517
+ .markdown .metadata-property[data-property-type='list'] .metadata-property-key {
518
+ --property-icon: var(--ms-icon-property-list);
519
+ }
520
+ .markdown .metadata-property[data-property-type='date'] .metadata-property-key {
521
+ --property-icon: var(--ms-icon-property-date);
522
+ }
523
+ .markdown .metadata-property[data-property-type='checkbox'] .metadata-property-key {
524
+ --property-icon: var(--ms-icon-property-boolean);
525
+ }
526
+ .markdown .metadata-property-value {
527
+ min-width: 0;
528
+ overflow-wrap: anywhere;
529
+ }
530
+ .markdown .prop-tags {
531
+ display: flex;
532
+ flex-wrap: wrap;
533
+ gap: 0.3rem;
534
+ }
535
+ .markdown .prop-tag {
536
+ display: inline-flex;
537
+ align-items: center;
538
+ height: 22px;
539
+ padding: 0 8px;
540
+ border-radius: 5px;
541
+ background: var(--ms-chip-bg);
542
+ color: var(--ms-chip-color);
543
+ font-size: 0.72rem;
544
+ font-family: var(--ms-chip-font);
545
+ font-weight: 500;
546
+ white-space: nowrap;
547
+ }
548
+ /* A notebook held in one hand has no room for two columns, so the key takes its
549
+ own line and the value follows under it. */
550
+ @media (max-width: 560px) {
551
+ .markdown .metadata-container {
552
+ grid-template-columns: 1fr;
553
+ gap: 0 0;
554
+ }
555
+ .markdown .metadata-property-value {
556
+ margin-bottom: 0.45rem;
557
+ }
558
+ }
559
+
560
+ /* ── Callouts ───────────────────────────────────────────────────────────────
561
+ The element the notebook meant when it wrote `> [!warning]`, drawn the way
562
+ the default theme draws it: a tinted field, a coloured title and a line
563
+ icon, which is a mask so it takes the colour of the callout. */
564
+ .markdown .callout {
565
+ --callout-color: var(--ms-callout-info);
566
+ --callout-icon: var(--ms-icon-pencil);
567
+ margin-block: var(--ms-p-spacing);
568
+ padding: 0.75rem 0.9rem 0.75rem 1.1rem;
569
+ border-radius: var(--ms-radius);
570
+ background: rgba(var(--callout-color), 0.1);
571
+ overflow-x: auto;
572
+ }
573
+ .markdown .callout-title {
574
+ display: flex;
575
+ align-items: flex-start;
576
+ gap: 0.45rem;
577
+ margin: 0;
578
+ color: rgb(var(--callout-color));
579
+ font-weight: 600;
580
+ line-height: var(--ms-line-height-tight);
581
+ }
582
+ .markdown .callout-title::before {
583
+ content: '';
584
+ flex: 0 0 auto;
585
+ width: 1.1em;
586
+ height: 1.1em;
587
+ margin-top: 0.1em;
588
+ background-color: currentcolor;
589
+ -webkit-mask: var(--callout-icon) center / contain no-repeat;
590
+ mask: var(--callout-icon) center / contain no-repeat;
591
+ }
592
+ /* The body opens under the title and closes flush with the field. */
593
+ .markdown .callout > :not(.callout-title) {
594
+ margin-block: 0.4rem 0;
595
+ }
596
+ .markdown .callout > :last-child {
597
+ margin-block-end: 0;
598
+ }
599
+ /* A quotation inside a callout borrows the callout's own colour for its rule,
600
+ which is what keeps a nested quote from reading as a second callout. */
601
+ .markdown .callout blockquote {
602
+ border-inline-start-color: rgba(var(--callout-color), 0.4);
603
+ }
604
+ /* A block of code keeps a tint of the callout's colour, and takes its edge in
605
+ the tone of a quotation there. */
606
+ .markdown .callout .code-block {
607
+ background: rgba(var(--callout-color), 0.1);
608
+ border-color: rgba(var(--callout-color), 0.4);
609
+ }
610
+
611
+ .markdown .callout:is([data-callout='note']) {
612
+ --callout-color: var(--ms-callout-info);
613
+ --callout-icon: var(--ms-icon-pencil);
614
+ }
615
+ .markdown .callout:is([data-callout='info'], [data-callout='todo']) {
616
+ --callout-color: var(--ms-callout-info);
617
+ --callout-icon: var(--ms-icon-info);
618
+ }
619
+ .markdown .callout:is([data-callout='abstract'], [data-callout='summary'], [data-callout='tldr']) {
620
+ --callout-color: var(--ms-callout-idea);
621
+ --callout-icon: var(--ms-icon-clipboard);
622
+ }
623
+ .markdown .callout:is([data-callout='tip'], [data-callout='hint'], [data-callout='important']) {
624
+ --callout-color: var(--ms-callout-idea);
625
+ --callout-icon: var(--ms-icon-flame);
626
+ }
627
+ .markdown .callout:is([data-callout='success'], [data-callout='check'], [data-callout='done']) {
628
+ --callout-color: var(--ms-callout-done);
629
+ --callout-icon: var(--ms-icon-check);
630
+ }
631
+ .markdown .callout:is([data-callout='question'], [data-callout='help'], [data-callout='faq']) {
632
+ --callout-color: var(--ms-callout-warn);
633
+ --callout-icon: var(--ms-icon-question);
634
+ }
635
+ .markdown .callout:is([data-callout='warning'], [data-callout='caution'], [data-callout='attention']) {
636
+ --callout-color: var(--ms-callout-warn);
637
+ --callout-icon: var(--ms-icon-alert);
638
+ }
639
+ .markdown .callout:is([data-callout='failure'], [data-callout='fail'], [data-callout='missing']) {
640
+ --callout-color: var(--ms-callout-stop);
641
+ --callout-icon: var(--ms-icon-cross);
642
+ }
643
+ .markdown .callout:is([data-callout='danger'], [data-callout='error'], [data-callout='bug']) {
644
+ --callout-color: var(--ms-callout-stop);
645
+ --callout-icon: var(--ms-icon-zap);
646
+ }
647
+ .markdown .callout:is([data-callout='example']) {
648
+ --callout-color: var(--ms-callout-aside);
649
+ --callout-icon: var(--ms-icon-list);
650
+ }
651
+ .markdown .callout:is([data-callout='quote'], [data-callout='cite']) {
652
+ --callout-color: var(--ms-callout-quote);
653
+ --callout-icon: var(--ms-icon-quote);
654
+ }
655
+
656
+ /* ── Diagrams ─────────────────────────────────────────────────────────────── */
657
+ .markdown .mermaid-diagram {
658
+ margin: 1rem 0;
659
+ overflow-x: auto;
660
+ }
661
+ .markdown .mermaid-loading {
662
+ min-height: 3rem;
663
+ }
664
+ .markdown pre:has(> .mermaid-diagram) {
665
+ background: none;
666
+ border: 0;
667
+ padding: 0;
668
+ }
669
+
670
+ /* ── Links ────────────────────────────────────────────────────────────────── */
671
+ .markdown .wikilink {
672
+ font-weight: 600;
673
+ }
674
+ .markdown .wikilink-pending {
675
+ color: var(--ms-pending);
676
+ border-bottom: 1px dashed var(--ms-pending);
677
+ cursor: pointer;
678
+ }
679
+
680
+ /* The choice a link to several notes opens. A dialog opened with showModal()
681
+ lives in the top layer, which no ancestor clips and no stacking context
682
+ reaches; it is still under `.markdown` in the document, so it takes the
683
+ note's values. */
684
+ .markdown .link-choice-dialog {
685
+ border: 0;
686
+ padding: 0;
687
+ background: none;
688
+ max-width: none;
689
+ max-height: none;
690
+ width: 100%;
691
+ height: 100%;
692
+ color: var(--ms-text);
693
+ }
694
+ .markdown .link-choice-dialog::backdrop {
695
+ background: rgb(14 21 38 / 0.45);
696
+ }
697
+ .markdown .link-choice-card {
698
+ position: absolute;
699
+ top: 50%;
700
+ left: 50%;
701
+ transform: translate(-50%, -50%);
702
+ width: min(32rem, calc(100vw - 2rem));
703
+ max-height: min(85vh, 40rem);
704
+ display: flex;
705
+ flex-direction: column;
706
+ background: var(--ms-surface);
707
+ border: 1px solid var(--ms-border);
708
+ border-radius: var(--ms-radius-large);
709
+ box-shadow: 0 18px 48px rgb(0 0 0 / 0.28);
710
+ }
711
+ .markdown .link-choice-header {
712
+ display: flex;
713
+ align-items: flex-start;
714
+ gap: 0.75rem;
715
+ padding: 1rem 1rem 0.5rem;
716
+ }
717
+ .markdown .link-choice-header h2 {
718
+ margin: 0;
719
+ font-family: var(--ms-font-display);
720
+ font-size: 1.05rem;
721
+ font-weight: 700;
722
+ line-height: 1.3;
723
+ }
724
+ .markdown .link-choice-close {
725
+ margin-left: auto;
726
+ border: 0;
727
+ background: none;
728
+ color: var(--ms-text-soft);
729
+ font-size: 1rem;
730
+ line-height: 1;
731
+ cursor: pointer;
732
+ min-width: 2.75rem;
733
+ min-height: 2.75rem;
734
+ }
735
+ .markdown .link-choice-close:hover {
736
+ color: var(--ms-text);
737
+ }
738
+ .markdown .link-choice-body {
739
+ overflow-y: auto;
740
+ padding: 0 1rem;
741
+ }
742
+ .markdown .link-choice-explanation {
743
+ margin: 0 0 0.75rem;
744
+ color: var(--ms-text-soft);
745
+ font-size: 0.88rem;
746
+ line-height: 1.5;
747
+ }
748
+ .markdown .link-choice-options {
749
+ list-style: none;
750
+ margin: 0;
751
+ padding: 0;
752
+ display: flex;
753
+ flex-direction: column;
754
+ gap: 0.4rem;
755
+ }
756
+ .markdown .link-choice-option {
757
+ display: flex;
758
+ flex-direction: column;
759
+ gap: 0.15rem;
760
+ /* A comfortable target on a phone, where this is a sheet under a thumb. */
761
+ min-height: 2.75rem;
762
+ padding: 0.6rem 0.75rem;
763
+ border: 1px solid var(--ms-border);
764
+ border-radius: var(--ms-radius);
765
+ color: var(--ms-text);
766
+ text-decoration: none;
767
+ /* The trail of a deep folder wraps instead of being cut. */
768
+ overflow-wrap: anywhere;
769
+ }
770
+ .markdown .link-choice-option:hover,
771
+ .markdown .link-choice-option:focus-visible {
772
+ background: var(--ms-border);
773
+ outline: none;
774
+ }
775
+ .markdown .link-choice-option.is-placeholder {
776
+ min-height: 3.25rem;
777
+ background: var(--ms-border);
778
+ opacity: 0.45;
779
+ }
780
+ /* What the folder holding this note is for, under the path: the one line on
781
+ the row that says which of two notes of one name was meant. */
782
+ .markdown .link-choice-about {
783
+ font-size: 0.78rem;
784
+ line-height: 1.4;
785
+ color: var(--ms-text-soft);
786
+ }
787
+ .markdown .link-choice-lead {
788
+ font-family: var(--ms-font-display);
789
+ font-weight: 500;
790
+ font-size: 0.95rem;
791
+ }
792
+ .markdown .link-choice-under {
793
+ color: var(--ms-text-soft);
794
+ font-size: 0.82rem;
795
+ }
796
+ .markdown .link-choice-footer {
797
+ display: flex;
798
+ justify-content: flex-end;
799
+ padding: 0.75rem 1rem 1rem;
800
+ }
801
+ .markdown .link-choice-cancel {
802
+ border: 1px solid var(--ms-border);
803
+ border-radius: var(--ms-radius);
804
+ background: none;
805
+ color: var(--ms-text);
806
+ font-family: var(--ms-font-display);
807
+ font-size: 0.9rem;
808
+ min-height: 2.75rem;
809
+ padding: 0 1.1rem;
810
+ cursor: pointer;
811
+ }
812
+ .markdown .link-choice-cancel:hover {
813
+ background: var(--ms-border);
814
+ }
815
+
816
+ /* A file of the notebook the notebook does not keep: not an error, said the
817
+ way a pending link is, in the monospace a file name is given. */
818
+ .markdown .attachment-missing {
819
+ font-family: ui-monospace, monospace;
820
+ font-size: 0.92em;
821
+ color: var(--ms-text-soft);
822
+ border-bottom: 1px dashed var(--ms-text-soft);
823
+ cursor: help;
824
+ }
825
+ /* An address this surface does not follow. The text is the author's and stays
826
+ exactly as they wrote it; what it loses is the affordance. The dotted rule
827
+ is the only sign, and the title says why. */
828
+ .markdown .link-refused {
829
+ border-bottom: 1px dotted var(--ms-text-soft);
830
+ cursor: help;
831
+ }
832
+
833
+ /* ── Embeds ─────────────────────────────────────────────────────────────────
834
+ A passage brought from another note is the SAME passage: same paper, same
835
+ spacing, same tints. What an embed has to say is a rule down the side, in
836
+ the blue of structure, and the note it came from named underneath. */
837
+ .markdown .embed {
838
+ margin: 1.2rem 0;
839
+ padding-inline-start: 1rem;
840
+ border-inline-start: 2px solid var(--ms-embed-rule);
841
+ }
842
+ .markdown .embed-body > .markdown > :first-child {
843
+ margin-top: 0;
844
+ }
845
+ .markdown .embed-body > .markdown > :last-child {
846
+ margin-bottom: 0.35rem;
847
+ }
848
+ .markdown .embed-source {
849
+ font-size: 0.82rem;
850
+ color: var(--ms-text-soft);
851
+ padding: 0;
852
+ }
853
+ .markdown .embed-source a {
854
+ color: var(--ms-text-soft);
855
+ text-decoration: none;
856
+ border-bottom: 1px dotted var(--ms-text-soft);
857
+ }
858
+ .markdown .embed-missing,
859
+ .markdown .embed-pending {
860
+ color: var(--ms-text-soft);
861
+ font-size: 0.9rem;
862
+ }
863
+
864
+ /* ── Highlighted code ───────────────────────────────────────────────────────
865
+ Prism token classes, mapped onto the palette. Every token not named here
866
+ inherits the code colour, which is what a block looked like before
867
+ highlighting existed. */
868
+ .markdown .token.comment,
869
+ .markdown .token.prolog,
870
+ .markdown .token.doctype,
871
+ .markdown .token.cdata {
872
+ color: var(--ms-token-comment);
873
+ font-style: italic;
874
+ }
875
+ .markdown .token.punctuation,
876
+ .markdown .token.operator {
877
+ color: var(--ms-token-punctuation);
878
+ }
879
+ .markdown .token.keyword,
880
+ .markdown .token.atrule,
881
+ .markdown .token.rule,
882
+ .markdown .token.important,
883
+ .markdown .token.tag,
884
+ .markdown .token.selector {
885
+ color: var(--ms-token-keyword);
886
+ }
887
+ .markdown .token.string,
888
+ .markdown .token.char,
889
+ .markdown .token.attr-value,
890
+ .markdown .token.regex {
891
+ color: var(--ms-token-string);
892
+ }
893
+ .markdown .token.number,
894
+ .markdown .token.boolean,
895
+ .markdown .token.constant,
896
+ .markdown .token.symbol,
897
+ .markdown .token.inserted {
898
+ color: var(--ms-token-number);
899
+ }
900
+ .markdown .token.property,
901
+ .markdown .token.attr-name,
902
+ .markdown .token.function,
903
+ .markdown .token.class-name,
904
+ .markdown .token.variable {
905
+ color: var(--ms-code-color);
906
+ font-weight: 500;
907
+ }
908
+ /* A diff is the one grammar whose meaning is the line and not the token. */
909
+ .markdown .token.deleted {
910
+ color: var(--ms-token-string);
911
+ }
912
+
913
+ /* What this note asked the browser to fetch (§7.10). A disclosure and not a
914
+ warning: it reads as a footnote of the note, in the soft text. */
915
+ .markdown[data-theme] > .remote-notice {
916
+ margin-top: 2rem;
917
+ padding-top: 0.75rem;
918
+ border-top: 1px solid var(--ms-border);
919
+ color: var(--ms-text-soft);
920
+ font-size: 0.85rem;
921
+ line-height: 1.5;
922
+ }
923
+
924
+ /* A task box that can be ticked. Disabled is the default. */
925
+ .markdown li.task-item {
926
+ list-style: none;
927
+ margin-left: -1.2rem;
928
+ }
929
+ .markdown li.task-item input[type='checkbox'] {
930
+ margin-right: 0.5rem;
931
+ accent-color: var(--ms-accent);
932
+ }
933
+ .markdown li.task-item input[type='checkbox']:not(:disabled) {
934
+ cursor: pointer;
935
+ }
936
+
937
+ /* ── Skeletons ──────────────────────────────────────────────────────────────
938
+ The shape of an embed that is coming, in the position it will occupy. */
939
+ .markdown .skeleton {
940
+ display: block;
941
+ border-radius: 4px;
942
+ background-color: rgba(128, 128, 128, 0.16);
943
+ background-image: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
944
+ background-size: 200% 100%;
945
+ background-repeat: no-repeat;
946
+ animation: markdown-skeleton-sheen 1.4s ease-in-out infinite;
947
+ }
948
+ @keyframes markdown-skeleton-sheen {
949
+ from {
950
+ background-position: -120% 0;
951
+ }
952
+ to {
953
+ background-position: 220% 0;
954
+ }
955
+ }
956
+ .markdown .skeleton-text {
957
+ display: flex;
958
+ flex-direction: column;
959
+ gap: 0.5rem;
960
+ }
961
+ .markdown .skeleton-region {
962
+ display: block;
963
+ }
964
+
965
+
966
+ /* ── At phone width ─────────────────────────────────────────────────────── */
967
+ @media (max-width: 40rem) {
968
+ /* Copy keeps its icon, and the word is in its label. */
969
+ .markdown .copy-action-label {
970
+ display: none;
971
+ }
972
+ .markdown .code-block > pre {
973
+ padding-right: 3rem;
974
+ }
975
+ }
976
+ @media (max-width: 600px) {
977
+ /* The choice rises from the bottom, within reach of a thumb. */
978
+ .markdown .link-choice-card {
979
+ top: auto;
980
+ bottom: 0;
981
+ left: 0;
982
+ transform: none;
983
+ width: 100%;
984
+ max-height: 85vh;
985
+ border-radius: 14px 14px 0 0;
986
+ border-bottom: 0;
987
+ }
988
+ .markdown .link-choice-footer .link-choice-cancel {
989
+ width: 100%;
990
+ }
991
+ }
992
+ @media (prefers-reduced-motion: reduce) {
993
+ /* The placeholder still holds the frame; only the sheen stops. */
994
+ .markdown .skeleton {
995
+ animation: none;
996
+ background-image: none;
997
+ }
998
+ }