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 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
/* ============================================================================ */
/* Layout – 3-column grid (Table of Contents / Article / Aside) */
/* ============================================================================ */

.content-grid {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding-x);
  margin-top: 40px;
  display: grid;
  grid-template-columns:
    var(--layout-toc-width)
    minmax(0, var(--layout-content-width))
    var(--layout-sidenote-width);
  gap: var(--layout-gap);
  align-items: start;
}

.content-grid>main {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.content-grid>main>*:first-child {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .content-grid {
    overflow: hidden;
    display: block;
    margin-top: var(--spacing-2);
    grid-template-columns: 1fr;
  }

  /* Hide only the desktop TOC (the one rendered inside .content-grid).
     We must NOT match the editor's mobile drawer, which renders the same
     React TableOfContents component inside .toc-mobile-sidebar - matching
     it here would empty the hamburger menu on narrow viewports. */
  .content-grid .table-of-contents {
    position: static;
    display: none;
  }

  /* Footer responsive styles live in components/_footer.css to keep all
     footer-related selectors in one place (the heading selectors need to
     descend past `display: contents` wrappers, so they cannot use a direct
     child combinator). */
}



/* ============================================================================ */
/* Width helpers – slightly wider than main column, and full-width to viewport */
/* ---------------------------------------------------------------------------- */

.wide,
.full-width {
  box-sizing: border-box;
  position: relative;
  z-index: var(--z-elevated);
  background-color: var(--page-bg);
}

.wide {
  /* Target up to ~1100px while staying within viewport minus page gutters */
  width: min(1100px, 100vw - var(--content-padding-x) * 4);
  margin-left: 50%;
  transform: translateX(-50%);
  padding: calc(var(--content-padding-x)*4);
  border-radius: calc(var(--button-radius)*4);
  background-color: var(--page-bg);
  -webkit-mask:
    linear-gradient(to right, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%),
    linear-gradient(to bottom, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%);
  -webkit-mask-composite: intersect;
  mask:
    linear-gradient(to right, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%),
    linear-gradient(to bottom, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%);
  mask-composite: intersect;
}

.wide>* {
  margin-bottom: 0 !important;
}

.full-width {
  /* Span the full viewport width and center relative to viewport */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: calc(var(--content-padding-x)*4);
  border-radius: calc(var(--button-radius)*4);
  background-color: var(--page-bg);
  -webkit-mask:
    linear-gradient(to bottom, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%);
  mask:
    linear-gradient(to bottom, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%);
}

.full-width figure figcaption {
  text-align: center !important;
}

@media (max-width: 1100px) {
  .wide,
  .full-width {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    transform: none;
  }
}

/* ============================================================================ */
/* Theme toggle placement                                                       */
/* ============================================================================ */

#theme-toggle {
  position: absolute;
  top: var(--spacing-4);
  left: var(--spacing-4);
  margin: 0;
  z-index: var(--z-overlay);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--page-bg);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  color: var(--text-color);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
#theme-toggle:active {
  transform: scale(0.92);
}

/* Editor quick-access pill (published page only). The element ships
   with `hidden` and the inline script in the published page reveals
   it only when /api/auth/status returns canEdit=true, after also
   filling in the avatar / handle. We split the rules across the
   element + a class so the JS can target the id (it's stable across
   page exports) while the styles live on the class. */
#edit-link.edit-pill {
  position: absolute;
  top: var(--spacing-4);
  right: var(--spacing-4);
  margin: 0;
  z-index: var(--z-overlay);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 4px 6px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--page-bg);
  color: var(--text-color);
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  font-size: 13px;
  line-height: 1.2;
  transition: transform 150ms ease, box-shadow 150ms ease,
    border-color 150ms ease;
}
#edit-link.edit-pill:hover {
  border-color: color-mix(in srgb, var(--primary-color) 50%, var(--border-color));
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
#edit-link.edit-pill:active {
  transform: scale(0.98);
}
#edit-link.edit-pill[hidden] {
  display: none;
}

.edit-pill__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-bg);
}

.edit-pill__text {
  color: var(--muted-color);
  white-space: nowrap;
}
.edit-pill__name {
  color: var(--text-color);
  font-weight: 600;
}

.edit-pill__cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.edit-pill__cta svg {
  stroke: currentColor;
}

@media (max-width: 1100px) {
  #theme-toggle,
  #edit-link.edit-pill {
    display: none;
  }
}

/* ------------------------------------------------------------------------- */
/* Hero meta bar responsiveness                                               */
/* Two columns at md breakpoint, then one column on very small screens.       */
/* ------------------------------------------------------------------------- */
@media (max-width: 768px) {
  header.meta .meta-container {
    display: flex;
    flex-wrap: wrap;
    row-gap: 12px;
    column-gap: 8px;
    max-width: 100%;
    padding: 0 var(--spacing-4);
  }

  header.meta .meta-container .meta-container-cell {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }
}

@media (max-width: 320px) {
  header.meta .meta-container .meta-container-cell {
    flex-basis: 100%;
    text-align: center;
  }

  header.meta .affiliations {
    list-style-position: inside;
    padding-left: 0;
    margin-left: 0;
  }

  header.meta .affiliations li {
    text-align: center;
  }
}


/* ------------------------------------------------------------------------- */
/* D3 neural embed responsiveness                                             */
/* Stack canvas (left) over network (right) on small screens.                 */
/* ------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .d3-neural .panel {
    flex-direction: column;
  }

  .d3-neural .panel .left,
  .d3-neural .panel .right {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }
}

/* ============================================================================ */
/* Auto figure numbering                                                        */
/* Applies a CSS counter across all figure-bearing components:                  */
/* Reference (.reference-wrapper), Image (.image-wrapper figure),               */
/* and HtmlEmbed (.html-embed)                                                  */
/* ============================================================================ */

.content-grid > main {
  counter-reset: figure;
}

/* Increment on every figure-like component */
.content-grid > main .reference-wrapper,
.content-grid > main .image-wrapper > figure,
.content-grid > main figure.html-embed {
  counter-increment: figure;
}

/* Display "Figure N · " before each figcaption */
.content-grid > main .reference-wrapper .reference__caption::before,
.content-grid > main .image-wrapper > figure > figcaption::before,
.content-grid > main figure.html-embed > .html-embed__desc::before {
  content: "Figure " counter(figure) " · ";
  font-weight: 600;
}

/* ============================================================================ */
/* "paper" template - academic project-page layout (single centered column)     */
/* Activated by frontmatter `template: "paper"` -> data-template="paper"        */
/* Reference: academic project pages like diffusion-cot.github.io               */
/* ============================================================================ */

/* ---- Paper hero banner: placed between meta and content in index.astro ---- */

.paper-hero-banner {
  max-width: 920px;
  margin: 32px auto 0;
  padding: 0 16px;
}

.paper-hero-banner :global(.html-embed) {
  border-radius: 8px;
  overflow: hidden;
}

.paper-hero-banner :global(.html-embed__card) {
  border-radius: 8px;
}

/* Thin separator between banner area and content */
[data-template="paper"] .paper-hero-banner + .content-grid {
  margin-top: 48px;
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
}

/* When no banner, separator is directly below meta */
[data-template="paper"] .meta + .content-grid,
[data-template="paper"] .hero-paper-meta + .content-grid {
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
}

/* ---- Content grid: single centered column, no TOC ---- */

[data-template="paper"] .content-grid {
  grid-template-columns: minmax(0, 780px);
  justify-content: center;
  margin-top: 0;
}

[data-template="paper"] .table-of-contents {
  display: none;
}

/* ---- Typography: clean left-aligned headings ---- */

[data-template="paper"] .content-grid > main h2 {
  text-align: left;
  font-size: 1.75em;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 0.8em;
  border-bottom: none;
  padding-bottom: 0;
}

[data-template="paper"] .content-grid > main h2 a {
  background: none;
}

[data-template="paper"] .content-grid > main h2:first-child,
[data-template="paper"] .content-grid > main > *:first-child h2 {
  margin-top: 0;
}

[data-template="paper"] .content-grid > main h3 {
  font-size: 1.3em;
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.6em;
}

/* ---- No figure numbering ---- */

[data-template="paper"] .content-grid > main {
  counter-reset: none;
}

[data-template="paper"] .content-grid > main .reference-wrapper .reference__caption::before,
[data-template="paper"] .content-grid > main .image-wrapper > figure > figcaption::before,
[data-template="paper"] .content-grid > main figure.html-embed > .html-embed__desc::before {
  content: none;
}

/* ---- Footer: simple single-column block layout ---- */

[data-template="paper"] .footer-inner {
  display: block;
  max-width: 780px;
}

[data-template="paper"] .references-block > .footer-heading,
[data-template="paper"] .reuse-block > .footer-heading {
  text-align: left;
  padding-right: 0;
  margin-top: 16px;
  margin-bottom: 8px;
}

[data-template="paper"] .template-credit p {
  margin-top: 32px;
}