docnest 0.1.1 → 0.1.3

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,1210 @@
1
+ /*
2
+ * DocNest theme profiles
3
+ *
4
+ * One semantic DOM, five visual systems. The original DocNest rules remain
5
+ * the Slate Modern baseline; this file owns theme tokens and deliberate layout
6
+ * variations without forking templates or client behavior.
7
+ */
8
+
9
+ :root {
10
+ --doc-font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
11
+ "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
12
+ --doc-font-reading: var(--doc-font-ui);
13
+ --doc-font-display: var(--doc-font-ui);
14
+ --doc-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
15
+ --doc-surface-raised: #ffffff;
16
+ --doc-selection: rgba(94, 106, 210, 0.18);
17
+ --doc-rule-strong: #bfc0c5;
18
+ --doc-accent-soft: rgba(94, 106, 210, 0.12);
19
+ --doc-code-bg: #f6f7f8;
20
+ --doc-code-text: #24262b;
21
+ --doc-header-height: auto;
22
+ --doc-reading-width: 1024px;
23
+ }
24
+
25
+ html[data-theme="dark"] {
26
+ --doc-surface-raised: #1c1c1e;
27
+ --doc-selection: rgba(165, 180, 252, 0.24);
28
+ --doc-rule-strong: #48484d;
29
+ --doc-accent-soft: rgba(165, 180, 252, 0.15);
30
+ --doc-code-bg: #171719;
31
+ --doc-code-text: #eff0f2;
32
+ }
33
+
34
+ body {
35
+ font-family: var(--doc-font-ui);
36
+ }
37
+
38
+ ::selection {
39
+ background: var(--doc-selection);
40
+ }
41
+
42
+ .markdown-body {
43
+ font-family: var(--doc-font-reading);
44
+ }
45
+
46
+ .tree-kind-icon {
47
+ margin-right: 0.3em;
48
+ }
49
+
50
+ .brand-fallback-shape {
51
+ display: none;
52
+ }
53
+
54
+ .markdown-body h1,
55
+ .markdown-body h2,
56
+ .markdown-body h3,
57
+ .markdown-body h4,
58
+ .welcome h2,
59
+ .dir-listing-title {
60
+ font-family: var(--doc-font-display);
61
+ }
62
+
63
+ /* Appearance picker */
64
+ .header {
65
+ position: relative;
66
+ z-index: 100;
67
+ }
68
+
69
+ .theme-selector {
70
+ position: relative;
71
+ }
72
+
73
+ .theme-style-toggle {
74
+ min-width: 168px;
75
+ }
76
+
77
+ .theme-swatch {
78
+ width: 12px;
79
+ height: 12px;
80
+ flex: 0 0 auto;
81
+ border: 1px solid currentColor;
82
+ background: var(--linear-accent);
83
+ box-shadow: inset 4px 0 0 var(--linear-bg);
84
+ }
85
+
86
+ .theme-style-text {
87
+ flex: 1;
88
+ overflow: hidden;
89
+ text-align: left;
90
+ text-overflow: ellipsis;
91
+ }
92
+
93
+ .theme-chevron {
94
+ color: var(--linear-text-muted);
95
+ font-size: 0.8rem;
96
+ line-height: 1;
97
+ }
98
+
99
+ .theme-popover[hidden] {
100
+ display: none;
101
+ }
102
+
103
+ .theme-popover {
104
+ position: absolute;
105
+ top: calc(100% + 10px);
106
+ right: 0;
107
+ width: min(360px, calc(100vw - 32px));
108
+ overflow: hidden;
109
+ border: 1px solid var(--linear-border);
110
+ border-radius: max(var(--linear-radius), 8px);
111
+ background: var(--doc-surface-raised);
112
+ color: var(--linear-text);
113
+ box-shadow: 0 18px 50px rgba(17, 17, 17, 0.16);
114
+ }
115
+
116
+ .theme-popover-section {
117
+ padding: 14px;
118
+ }
119
+
120
+ .theme-popover-section + .theme-popover-section {
121
+ border-top: 1px solid var(--linear-border);
122
+ }
123
+
124
+ /* 明暗模式保留在 DOM 与运行时中,暂时只使用顶部的独立切换入口。 */
125
+ .theme-popover .theme-mode-section {
126
+ display: none;
127
+ }
128
+
129
+ .theme-popover-label {
130
+ margin: 0 0 9px;
131
+ color: var(--linear-text-muted);
132
+ font-size: 0.6875rem;
133
+ font-weight: 700;
134
+ letter-spacing: 0.09em;
135
+ text-transform: uppercase;
136
+ }
137
+
138
+ .theme-options {
139
+ display: grid;
140
+ gap: 4px;
141
+ }
142
+
143
+ .theme-option {
144
+ display: grid;
145
+ grid-template-columns: 54px minmax(0, 1fr) 20px;
146
+ width: 100%;
147
+ min-height: 58px;
148
+ padding: 9px;
149
+ gap: 11px;
150
+ align-items: center;
151
+ border: 1px solid transparent;
152
+ border-radius: var(--linear-radius);
153
+ background: transparent;
154
+ color: var(--linear-text);
155
+ cursor: pointer;
156
+ text-align: left;
157
+ }
158
+
159
+ .theme-option:hover {
160
+ border-color: var(--linear-border);
161
+ background: var(--linear-bg-subtle);
162
+ }
163
+
164
+ .theme-option.is-active {
165
+ border-color: var(--linear-accent);
166
+ background: var(--doc-accent-soft);
167
+ }
168
+
169
+ .theme-option-palette {
170
+ display: flex;
171
+ height: 32px;
172
+ overflow: hidden;
173
+ border: 1px solid var(--linear-border);
174
+ }
175
+
176
+ .theme-option-palette i {
177
+ flex: 1;
178
+ }
179
+
180
+ .theme-option-copy {
181
+ display: flex;
182
+ min-width: 0;
183
+ flex-direction: column;
184
+ }
185
+
186
+ .theme-option-copy strong {
187
+ font-size: 0.8125rem;
188
+ font-weight: 680;
189
+ }
190
+
191
+ .theme-option-copy small {
192
+ overflow: hidden;
193
+ color: var(--linear-text-muted);
194
+ font-size: 0.6875rem;
195
+ line-height: 1.45;
196
+ text-overflow: ellipsis;
197
+ white-space: nowrap;
198
+ }
199
+
200
+ .theme-option-check {
201
+ color: var(--linear-accent);
202
+ font-size: 0.875rem;
203
+ opacity: 0;
204
+ }
205
+
206
+ .theme-option.is-active .theme-option-check {
207
+ opacity: 1;
208
+ }
209
+
210
+ .theme-mode-options {
211
+ display: grid;
212
+ grid-template-columns: repeat(3, 1fr);
213
+ gap: 6px;
214
+ }
215
+
216
+ .theme-mode-option {
217
+ min-height: 52px;
218
+ border: 1px solid var(--linear-border);
219
+ border-radius: var(--linear-radius);
220
+ background: var(--linear-bg-subtle);
221
+ color: var(--linear-text);
222
+ cursor: pointer;
223
+ }
224
+
225
+ .theme-mode-option span,
226
+ .theme-mode-option strong {
227
+ display: block;
228
+ }
229
+
230
+ .theme-mode-option span {
231
+ margin-bottom: 2px;
232
+ color: var(--linear-text-muted);
233
+ font: 700 0.6875rem/1 var(--doc-font-mono);
234
+ }
235
+
236
+ .theme-mode-option strong {
237
+ font-size: 0.75rem;
238
+ font-weight: 650;
239
+ }
240
+
241
+ .theme-mode-option:hover,
242
+ .theme-mode-option.is-active {
243
+ border-color: var(--linear-accent);
244
+ }
245
+
246
+ .theme-mode-option.is-active {
247
+ background: var(--doc-accent-soft);
248
+ color: var(--linear-accent);
249
+ }
250
+
251
+ body[data-theme="dark"] .theme-popover,
252
+ body[data-theme="dark"] .theme-option,
253
+ body[data-theme="dark"] .theme-mode-option {
254
+ color: var(--linear-text);
255
+ }
256
+
257
+ /* Normalize hard-coded dark rules so every profile is token-driven. */
258
+ body[data-doc-theme][data-theme="dark"] .header,
259
+ body[data-doc-theme][data-theme="dark"] .main-content {
260
+ background: var(--linear-bg);
261
+ }
262
+
263
+ body[data-doc-theme][data-theme="dark"] .sidebar,
264
+ body[data-doc-theme][data-theme="dark"] .sidebar h2,
265
+ body[data-doc-theme][data-theme="dark"] .sidebar-collapse-toggle {
266
+ background: var(--linear-sidebar);
267
+ }
268
+
269
+ body[data-doc-theme][data-theme="dark"] .header h1,
270
+ body[data-doc-theme][data-theme="dark"] .dir-name,
271
+ body[data-doc-theme][data-theme="dark"] .file-link,
272
+ body[data-doc-theme][data-theme="dark"] .welcome h2 {
273
+ color: var(--linear-text);
274
+ }
275
+
276
+ body[data-doc-theme][data-theme="dark"] .subtitle,
277
+ body[data-doc-theme][data-theme="dark"] .sidebar h2,
278
+ body[data-doc-theme][data-theme="dark"] .welcome {
279
+ color: var(--linear-text-muted);
280
+ }
281
+
282
+ body[data-doc-theme][data-theme="dark"] .header-action-btn,
283
+ body[data-doc-theme][data-theme="dark"] .theme-toggle {
284
+ border-color: var(--linear-border);
285
+ background: var(--linear-bg-subtle);
286
+ color: var(--linear-text);
287
+ }
288
+
289
+ body[data-doc-theme][data-theme="dark"] .header-action-btn:hover,
290
+ body[data-doc-theme][data-theme="dark"] .theme-mode-option:hover,
291
+ body[data-doc-theme][data-theme="dark"] .theme-option:hover {
292
+ background: var(--doc-accent-soft);
293
+ }
294
+
295
+ body[data-doc-theme][data-theme="dark"] .file-link.active,
296
+ body[data-doc-theme][data-theme="dark"] .dir-toggle.active {
297
+ border-color: var(--linear-accent);
298
+ background: var(--doc-accent-soft);
299
+ color: var(--linear-accent);
300
+ }
301
+
302
+ body[data-doc-theme][data-theme="dark"] .file-link:hover,
303
+ body[data-doc-theme][data-theme="dark"] .dir-name-link,
304
+ body[data-doc-theme][data-theme="dark"] .back-link {
305
+ color: var(--linear-accent);
306
+ }
307
+
308
+ body[data-doc-theme][data-theme="dark"] .download-menu-content,
309
+ body[data-doc-theme][data-theme="dark"] .pdf-export-modal__panel {
310
+ border-color: var(--linear-border);
311
+ background: var(--doc-surface-raised);
312
+ color: var(--linear-text);
313
+ }
314
+
315
+ body[data-doc-theme][data-theme="dark"] .download-menu-content button,
316
+ body[data-doc-theme][data-theme="dark"] .pdf-export-modal__option,
317
+ body[data-doc-theme][data-theme="dark"] .pdf-export-modal__watermark-input {
318
+ border-color: var(--linear-border);
319
+ background: var(--linear-bg-subtle);
320
+ color: var(--linear-text);
321
+ }
322
+
323
+ /* Theme 01: Slate Modern — the package's original visual language. */
324
+ body[data-doc-theme="slate-modern"] {
325
+ --doc-font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
326
+ "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
327
+ --doc-font-reading: var(--doc-font-ui);
328
+ --doc-font-display: var(--doc-font-ui);
329
+ }
330
+
331
+ /* Theme 02: Editorial Atlas */
332
+ body[data-doc-theme="editorial-atlas"] {
333
+ --linear-bg: #f3f0e7;
334
+ --linear-bg-subtle: #ebe6da;
335
+ --linear-sidebar: #eee9dd;
336
+ --linear-border: #d1cdc0;
337
+ --linear-text: #171815;
338
+ --linear-text-muted: #686960;
339
+ --linear-accent: #1f5b57;
340
+ --linear-accent-hover: #164742;
341
+ --linear-radius: 2px;
342
+ --doc-surface-raised: #faf8f2;
343
+ --doc-selection: rgba(31, 91, 87, 0.19);
344
+ --doc-rule-strong: #9e9c91;
345
+ --doc-accent-soft: rgba(31, 91, 87, 0.1);
346
+ --doc-code-bg: #e9e5da;
347
+ --doc-code-text: #22241f;
348
+ --doc-font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
349
+ "Microsoft YaHei", sans-serif;
350
+ --doc-font-reading: "Songti SC", SimSun, "Noto Serif CJK SC", serif;
351
+ --doc-font-display: "Songti SC", SimSun, "Noto Serif CJK SC", serif;
352
+ --doc-reading-width: 860px;
353
+ }
354
+
355
+ body[data-doc-theme="editorial-atlas"][data-theme="dark"] {
356
+ --linear-bg: #171915;
357
+ --linear-bg-subtle: #20231e;
358
+ --linear-sidebar: #1d201b;
359
+ --linear-border: #3b3f37;
360
+ --linear-text: #eeece3;
361
+ --linear-text-muted: #a6a89d;
362
+ --linear-accent: #83bdb5;
363
+ --linear-accent-hover: #a6d2cc;
364
+ --doc-surface-raised: #20231e;
365
+ --doc-selection: rgba(131, 189, 181, 0.25);
366
+ --doc-rule-strong: #62675d;
367
+ --doc-accent-soft: rgba(131, 189, 181, 0.13);
368
+ --doc-code-bg: #11130f;
369
+ --doc-code-text: #f0eee5;
370
+ }
371
+
372
+ body[data-doc-theme="editorial-atlas"] .header {
373
+ padding: 0.9rem 1.75rem;
374
+ border-bottom-color: var(--doc-rule-strong);
375
+ background: var(--doc-surface-raised);
376
+ }
377
+
378
+ body[data-doc-theme="editorial-atlas"] .header h1 {
379
+ font-family: var(--doc-font-display);
380
+ font-size: 1.35rem;
381
+ font-weight: 600;
382
+ letter-spacing: 0.02em;
383
+ }
384
+
385
+ body[data-doc-theme="editorial-atlas"] .subtitle,
386
+ body[data-doc-theme="editorial-atlas"] .sidebar h2,
387
+ body[data-doc-theme="editorial-atlas"] .doc-toc-title {
388
+ font-family: var(--doc-font-mono);
389
+ letter-spacing: 0.12em;
390
+ text-transform: uppercase;
391
+ }
392
+
393
+ body[data-doc-theme="editorial-atlas"] .sidebar {
394
+ width: 292px;
395
+ min-width: 248px;
396
+ border-right-color: var(--doc-rule-strong);
397
+ }
398
+
399
+ body[data-doc-theme="editorial-atlas"] .main-content {
400
+ padding: clamp(2rem, 4vw, 4.75rem) clamp(1.5rem, 5vw, 5.5rem);
401
+ background: var(--linear-bg);
402
+ }
403
+
404
+ body[data-doc-theme="editorial-atlas"] .doc-layout {
405
+ width: min(1240px, 100%);
406
+ gap: 42px;
407
+ }
408
+
409
+ body[data-doc-theme="editorial-atlas"] .markdown-body {
410
+ width: min(var(--doc-reading-width), 100%);
411
+ background: transparent;
412
+ font-size: 1rem;
413
+ line-height: 1.9;
414
+ }
415
+
416
+ body[data-doc-theme="editorial-atlas"] .markdown-body h1 {
417
+ padding-bottom: 1.3rem;
418
+ border-bottom: 1px solid var(--doc-rule-strong);
419
+ font-size: clamp(2.25rem, 4vw, 3.75rem);
420
+ font-weight: 600;
421
+ letter-spacing: -0.035em;
422
+ line-height: 1.12;
423
+ }
424
+
425
+ body[data-doc-theme="editorial-atlas"] .markdown-body h2 {
426
+ margin-top: 3rem;
427
+ font-size: 1.65rem;
428
+ font-weight: 600;
429
+ }
430
+
431
+ body[data-doc-theme="editorial-atlas"] .markdown-body blockquote {
432
+ border: 0;
433
+ border-left: 1px solid var(--linear-accent);
434
+ border-radius: 0;
435
+ background: transparent;
436
+ color: var(--linear-text-muted);
437
+ font-style: italic;
438
+ }
439
+
440
+ body[data-doc-theme="editorial-atlas"] .doc-toc {
441
+ border-width: 0 0 0 1px;
442
+ border-radius: 0;
443
+ background: transparent;
444
+ }
445
+
446
+ /* Theme 03: Precision Index */
447
+ body[data-doc-theme="precision-index"] {
448
+ --linear-bg: #eef2f3;
449
+ --linear-bg-subtle: #e4eaec;
450
+ --linear-sidebar: #e9eef0;
451
+ --linear-border: #ccd6d9;
452
+ --linear-text: #14242b;
453
+ --linear-text-muted: #687a82;
454
+ --linear-accent: #007486;
455
+ --linear-accent-hover: #005c6a;
456
+ --linear-radius: 0px;
457
+ --doc-surface-raised: #f8faf9;
458
+ --doc-selection: rgba(0, 116, 134, 0.2);
459
+ --doc-rule-strong: #9dafb5;
460
+ --doc-accent-soft: #dcecef;
461
+ --doc-code-bg: #15262d;
462
+ --doc-code-text: #e8f2f3;
463
+ --doc-font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
464
+ "Microsoft YaHei", sans-serif;
465
+ --doc-font-reading: var(--doc-font-ui);
466
+ --doc-font-display: var(--doc-font-ui);
467
+ --doc-reading-width: 980px;
468
+ }
469
+
470
+ body[data-doc-theme="precision-index"][data-theme="dark"] {
471
+ --linear-bg: #101b20;
472
+ --linear-bg-subtle: #17262c;
473
+ --linear-sidebar: #142229;
474
+ --linear-border: #31444c;
475
+ --linear-text: #e5edef;
476
+ --linear-text-muted: #91a5ad;
477
+ --linear-accent: #65c4cf;
478
+ --linear-accent-hover: #8bd5dd;
479
+ --doc-surface-raised: #142229;
480
+ --doc-selection: rgba(101, 196, 207, 0.26);
481
+ --doc-rule-strong: #526871;
482
+ --doc-accent-soft: rgba(101, 196, 207, 0.12);
483
+ --doc-code-bg: #081114;
484
+ --doc-code-text: #e8f2f3;
485
+ }
486
+
487
+ body[data-doc-theme="precision-index"] .header {
488
+ min-height: 68px;
489
+ padding: 0.6rem 1rem;
490
+ border-bottom: 2px solid var(--linear-text);
491
+ background: var(--linear-bg-subtle);
492
+ }
493
+
494
+ body[data-doc-theme="precision-index"] .header h1,
495
+ body[data-doc-theme="precision-index"] .subtitle,
496
+ body[data-doc-theme="precision-index"] .sidebar h2,
497
+ body[data-doc-theme="precision-index"] .doc-toc-title,
498
+ body[data-doc-theme="precision-index"] .breadcrumbs {
499
+ font-family: var(--doc-font-mono);
500
+ }
501
+
502
+ body[data-doc-theme="precision-index"] .header h1 {
503
+ font-size: 0.875rem;
504
+ letter-spacing: 0.06em;
505
+ text-transform: uppercase;
506
+ }
507
+
508
+ body[data-doc-theme="precision-index"] .subtitle {
509
+ font-size: 0.625rem;
510
+ letter-spacing: 0.08em;
511
+ }
512
+
513
+ body[data-doc-theme="precision-index"] .header-action-btn {
514
+ border-color: var(--doc-rule-strong);
515
+ font-family: var(--doc-font-mono);
516
+ font-size: 0.6875rem;
517
+ text-transform: uppercase;
518
+ }
519
+
520
+ body[data-doc-theme="precision-index"] .sidebar {
521
+ width: 264px;
522
+ min-width: 230px;
523
+ border-right: 1px solid var(--doc-rule-strong);
524
+ }
525
+
526
+ body[data-doc-theme="precision-index"] .sidebar h2 {
527
+ padding-block: 0.75rem;
528
+ border-bottom: 1px solid var(--linear-border);
529
+ font-size: 0.625rem;
530
+ letter-spacing: 0.15em;
531
+ }
532
+
533
+ body[data-doc-theme="precision-index"] .dir-toggle,
534
+ body[data-doc-theme="precision-index"] .file-link {
535
+ border-bottom: 1px solid var(--linear-border);
536
+ font-size: 0.75rem;
537
+ }
538
+
539
+ body[data-doc-theme="precision-index"] .file-link.active {
540
+ border-left-width: 4px;
541
+ background: var(--doc-surface-raised);
542
+ }
543
+
544
+ body[data-doc-theme="precision-index"] .main-content {
545
+ padding: 0;
546
+ background: var(--linear-bg);
547
+ }
548
+
549
+ body[data-doc-theme="precision-index"] .breadcrumbs {
550
+ margin: 0;
551
+ padding: 0.75rem 1.5rem;
552
+ border-bottom: 1px solid var(--doc-rule-strong);
553
+ background: var(--linear-bg-subtle);
554
+ font-size: 0.6875rem;
555
+ }
556
+
557
+ body[data-doc-theme="precision-index"] .doc-layout {
558
+ width: 100%;
559
+ gap: 0;
560
+ background: var(--doc-surface-raised);
561
+ }
562
+
563
+ body[data-doc-theme="precision-index"] .markdown-body {
564
+ width: min(var(--doc-reading-width), 100%);
565
+ padding: clamp(2.5rem, 5vw, 5rem);
566
+ border-right: 1px solid var(--doc-rule-strong);
567
+ font-size: 0.9rem;
568
+ line-height: 1.75;
569
+ }
570
+
571
+ body[data-doc-theme="precision-index"] .markdown-body h1 {
572
+ position: relative;
573
+ margin-bottom: 2rem;
574
+ padding: 0 0 1.25rem 3.25rem;
575
+ border-bottom: 2px solid var(--linear-text);
576
+ font-size: clamp(2rem, 4vw, 3.35rem);
577
+ font-weight: 720;
578
+ letter-spacing: -0.045em;
579
+ }
580
+
581
+ body[data-doc-theme="precision-index"] .markdown-body h1::before {
582
+ content: "";
583
+ position: absolute;
584
+ left: 0;
585
+ top: 0.25em;
586
+ width: 1.6rem;
587
+ height: 0.28rem;
588
+ background: var(--linear-accent);
589
+ }
590
+
591
+ body[data-doc-theme="precision-index"] .markdown-body h2 {
592
+ padding-top: 0.8rem;
593
+ border-top: 1px solid var(--doc-rule-strong);
594
+ font-size: 1.2rem;
595
+ }
596
+
597
+ body[data-doc-theme="precision-index"] .doc-toc {
598
+ top: 0;
599
+ width: 216px;
600
+ flex-basis: 216px;
601
+ max-height: calc(100vh - 54px);
602
+ padding: 1.25rem;
603
+ border: 0;
604
+ border-radius: 0;
605
+ background: var(--linear-bg-subtle);
606
+ }
607
+
608
+ body[data-doc-theme="precision-index"] .doc-toc-title {
609
+ letter-spacing: 0.12em;
610
+ text-transform: uppercase;
611
+ }
612
+
613
+ body[data-doc-theme="precision-index"] .dir-listing-page,
614
+ body[data-doc-theme="precision-index"] .welcome {
615
+ margin: 0;
616
+ padding: clamp(2rem, 5vw, 5rem);
617
+ }
618
+
619
+ /* Theme 04: Archive Room */
620
+ body[data-doc-theme="archive-room"] {
621
+ --linear-bg: #f3efe4;
622
+ --linear-bg-subtle: #e9e2d3;
623
+ --linear-sidebar: #ebe5d8;
624
+ --linear-border: #c9c2b1;
625
+ --linear-text: #262821;
626
+ --linear-text-muted: #5d6055;
627
+ --linear-accent: #6b7150;
628
+ --linear-accent-hover: #535a3d;
629
+ --linear-radius: 1px;
630
+ --doc-surface-raised: #faf8f1;
631
+ --doc-selection: rgba(107, 113, 80, 0.22);
632
+ --doc-rule-strong: #9e9684;
633
+ --doc-accent-soft: rgba(107, 113, 80, 0.12);
634
+ --doc-code-bg: #292b25;
635
+ --doc-code-text: #f5f1e7;
636
+ --doc-font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
637
+ "Microsoft YaHei", sans-serif;
638
+ --doc-font-reading: "Songti SC", SimSun, "Noto Serif CJK SC", serif;
639
+ --doc-font-display: "Songti SC", SimSun, "Noto Serif CJK SC", serif;
640
+ --doc-reading-width: 900px;
641
+ }
642
+
643
+ body[data-doc-theme="archive-room"][data-theme="dark"] {
644
+ --linear-bg: #1e201b;
645
+ --linear-bg-subtle: #282b24;
646
+ --linear-sidebar: #25271f;
647
+ --linear-border: #494b3f;
648
+ --linear-text: #efeadd;
649
+ --linear-text-muted: #aca99d;
650
+ --linear-accent: #b9bd8b;
651
+ --linear-accent-hover: #d1d3a9;
652
+ --doc-surface-raised: #25271f;
653
+ --doc-selection: rgba(185, 189, 139, 0.24);
654
+ --doc-rule-strong: #6a6b5c;
655
+ --doc-accent-soft: rgba(185, 189, 139, 0.12);
656
+ --doc-code-bg: #12130f;
657
+ --doc-code-text: #f5f1e7;
658
+ }
659
+
660
+ body[data-doc-theme="archive-room"] .header {
661
+ padding: 0.8rem 1.5rem;
662
+ border-top: 4px solid #a5523d;
663
+ border-bottom-color: var(--doc-rule-strong);
664
+ background: var(--linear-bg);
665
+ }
666
+
667
+ body[data-doc-theme="archive-room"] .header h1 {
668
+ font-family: var(--doc-font-display);
669
+ font-size: 1.25rem;
670
+ font-weight: 600;
671
+ }
672
+
673
+ body[data-doc-theme="archive-room"] .subtitle,
674
+ body[data-doc-theme="archive-room"] .sidebar h2,
675
+ body[data-doc-theme="archive-room"] .doc-toc-title,
676
+ body[data-doc-theme="archive-room"] .breadcrumbs {
677
+ font-family: var(--doc-font-mono);
678
+ letter-spacing: 0.08em;
679
+ }
680
+
681
+ body[data-doc-theme="archive-room"] .sidebar {
682
+ width: 300px;
683
+ min-width: 250px;
684
+ border-right-color: var(--doc-rule-strong);
685
+ }
686
+
687
+ body[data-doc-theme="archive-room"] .sidebar h2 {
688
+ border-bottom: 1px solid var(--doc-rule-strong);
689
+ text-transform: uppercase;
690
+ }
691
+
692
+ body[data-doc-theme="archive-room"] .dir-children {
693
+ border-left-style: dashed;
694
+ border-left-color: var(--doc-rule-strong);
695
+ }
696
+
697
+ body[data-doc-theme="archive-room"] .file-link.active {
698
+ border-left-color: #a5523d;
699
+ background: var(--doc-surface-raised);
700
+ color: #8d4434;
701
+ }
702
+
703
+ body[data-doc-theme="archive-room"][data-theme="dark"] .file-link.active {
704
+ color: #d99a87;
705
+ }
706
+
707
+ body[data-doc-theme="archive-room"] .main-content {
708
+ padding: clamp(2rem, 4vw, 4.5rem);
709
+ background-color: var(--linear-bg);
710
+ background-image:
711
+ linear-gradient(rgba(93, 96, 85, 0.045) 1px, transparent 1px),
712
+ linear-gradient(90deg, rgba(93, 96, 85, 0.035) 1px, transparent 1px);
713
+ background-size: 24px 24px;
714
+ }
715
+
716
+ body[data-doc-theme="archive-room"] .doc-layout {
717
+ width: min(1280px, 100%);
718
+ gap: 34px;
719
+ }
720
+
721
+ body[data-doc-theme="archive-room"] .markdown-body {
722
+ width: min(var(--doc-reading-width), 100%);
723
+ padding: clamp(1.5rem, 3vw, 3rem);
724
+ border: 1px solid var(--doc-rule-strong);
725
+ background: var(--doc-surface-raised);
726
+ box-shadow: 7px 7px 0 var(--linear-border);
727
+ font-size: 1rem;
728
+ line-height: 1.88;
729
+ }
730
+
731
+ body[data-doc-theme="archive-room"] .markdown-body h1 {
732
+ padding-bottom: 1.25rem;
733
+ border-bottom: 3px double var(--doc-rule-strong);
734
+ font-size: clamp(2.15rem, 4vw, 3.5rem);
735
+ font-weight: 600;
736
+ line-height: 1.14;
737
+ }
738
+
739
+ body[data-doc-theme="archive-room"] .markdown-body h2 {
740
+ margin-top: 2.8rem;
741
+ color: var(--linear-accent-hover);
742
+ font-size: 1.55rem;
743
+ font-weight: 600;
744
+ }
745
+
746
+ body[data-doc-theme="archive-room"][data-theme="dark"] .markdown-body h2 {
747
+ color: var(--linear-accent);
748
+ }
749
+
750
+ body[data-doc-theme="archive-room"] .markdown-body blockquote {
751
+ border-left-color: #a5523d;
752
+ border-radius: 0;
753
+ background: var(--linear-bg-subtle);
754
+ }
755
+
756
+ body[data-doc-theme="archive-room"] .doc-toc {
757
+ border: 1px solid var(--doc-rule-strong);
758
+ border-radius: 0;
759
+ background: var(--linear-bg-subtle);
760
+ }
761
+
762
+ /* Theme 05: Swiss Manual */
763
+ body[data-doc-theme="swiss-manual"] {
764
+ --linear-bg: #f4f3ef;
765
+ --linear-bg-subtle: #e9e7e0;
766
+ --linear-sidebar: #eeece6;
767
+ --linear-border: #c8c6bf;
768
+ --linear-text: #111111;
769
+ --linear-text-muted: #65645f;
770
+ --linear-accent: #e33b27;
771
+ --linear-accent-hover: #b62617;
772
+ --linear-radius: 0px;
773
+ --doc-surface-raised: #ffffff;
774
+ --doc-selection: rgba(227, 59, 39, 0.22);
775
+ --doc-rule-strong: #111111;
776
+ --doc-accent-soft: rgba(227, 59, 39, 0.1);
777
+ --doc-code-bg: #111111;
778
+ --doc-code-text: #f7f5ef;
779
+ --doc-font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
780
+ "Microsoft YaHei", sans-serif;
781
+ --doc-font-reading: var(--doc-font-ui);
782
+ --doc-font-display: var(--doc-font-ui);
783
+ --doc-reading-width: 960px;
784
+ }
785
+
786
+ body[data-doc-theme="swiss-manual"][data-theme="dark"] {
787
+ --linear-bg: #111111;
788
+ --linear-bg-subtle: #1a1a19;
789
+ --linear-sidebar: #171716;
790
+ --linear-border: #44433f;
791
+ --linear-text: #f4f3ef;
792
+ --linear-text-muted: #aaa9a3;
793
+ --linear-accent: #ff5a45;
794
+ --linear-accent-hover: #ff7968;
795
+ --doc-surface-raised: #171716;
796
+ --doc-selection: rgba(255, 90, 69, 0.28);
797
+ --doc-rule-strong: #f4f3ef;
798
+ --doc-accent-soft: rgba(255, 90, 69, 0.14);
799
+ --doc-code-bg: #050505;
800
+ --doc-code-text: #f7f5ef;
801
+ }
802
+
803
+ body[data-doc-theme="swiss-manual"] .header {
804
+ min-height: 72px;
805
+ padding: 0;
806
+ border: 1px solid var(--doc-rule-strong);
807
+ border-top: 0;
808
+ background: var(--doc-surface-raised);
809
+ }
810
+
811
+ body[data-doc-theme="swiss-manual"] .header-content {
812
+ min-height: 72px;
813
+ }
814
+
815
+ body[data-doc-theme="swiss-manual"] .header-title-group {
816
+ align-self: stretch;
817
+ min-width: 250px;
818
+ padding: 0.85rem 1.4rem;
819
+ border-right: 1px solid var(--doc-rule-strong);
820
+ }
821
+
822
+ body[data-doc-theme="swiss-manual"] .header h1 {
823
+ font-size: 1rem;
824
+ font-weight: 800;
825
+ letter-spacing: 0.04em;
826
+ }
827
+
828
+ body[data-doc-theme="swiss-manual"] .subtitle,
829
+ body[data-doc-theme="swiss-manual"] .sidebar h2,
830
+ body[data-doc-theme="swiss-manual"] .doc-toc-title,
831
+ body[data-doc-theme="swiss-manual"] .breadcrumbs {
832
+ font-family: var(--doc-font-mono);
833
+ letter-spacing: 0.1em;
834
+ text-transform: uppercase;
835
+ }
836
+
837
+ body[data-doc-theme="swiss-manual"] .header-meta {
838
+ align-self: stretch;
839
+ justify-content: center;
840
+ padding-right: 1rem;
841
+ }
842
+
843
+ body[data-doc-theme="swiss-manual"] .header-action-btn {
844
+ border-color: var(--doc-rule-strong);
845
+ background: var(--doc-surface-raised);
846
+ font-weight: 700;
847
+ }
848
+
849
+ body[data-doc-theme="swiss-manual"] .header-action-btn:hover {
850
+ border-color: var(--linear-accent);
851
+ background: var(--linear-accent);
852
+ color: #ffffff;
853
+ }
854
+
855
+ body[data-doc-theme="swiss-manual"] .sidebar {
856
+ width: 270px;
857
+ min-width: 236px;
858
+ border-right: 1px solid var(--doc-rule-strong);
859
+ }
860
+
861
+ body[data-doc-theme="swiss-manual"] .sidebar h2 {
862
+ padding: 1rem;
863
+ border-bottom: 1px solid var(--doc-rule-strong);
864
+ background: var(--linear-text);
865
+ color: var(--linear-bg);
866
+ }
867
+
868
+ body[data-doc-theme="swiss-manual"] .tree-nav {
869
+ padding-inline: 0;
870
+ }
871
+
872
+ body[data-doc-theme="swiss-manual"] .dir-toggle,
873
+ body[data-doc-theme="swiss-manual"] .file-link {
874
+ margin: 0;
875
+ padding: 0.55rem 0.75rem;
876
+ border-bottom: 1px solid var(--linear-border);
877
+ }
878
+
879
+ body[data-doc-theme="swiss-manual"] .file-link.active {
880
+ border-left: 6px solid var(--linear-accent);
881
+ background: var(--doc-surface-raised);
882
+ color: var(--linear-text);
883
+ font-weight: 800;
884
+ }
885
+
886
+ body[data-doc-theme="swiss-manual"] .main-content {
887
+ padding: 0;
888
+ background: var(--doc-surface-raised);
889
+ }
890
+
891
+ body[data-doc-theme="swiss-manual"] .breadcrumbs {
892
+ margin: 0;
893
+ padding: 0.85rem 1.5rem;
894
+ border-bottom: 1px solid var(--doc-rule-strong);
895
+ background: var(--linear-bg-subtle);
896
+ font-size: 0.65rem;
897
+ }
898
+
899
+ body[data-doc-theme="swiss-manual"] .doc-layout {
900
+ width: 100%;
901
+ gap: 0;
902
+ }
903
+
904
+ body[data-doc-theme="swiss-manual"] .markdown-body {
905
+ width: min(var(--doc-reading-width), 100%);
906
+ padding: clamp(2.5rem, 6vw, 6rem);
907
+ border-right: 1px solid var(--doc-rule-strong);
908
+ font-size: 0.95rem;
909
+ line-height: 1.72;
910
+ }
911
+
912
+ body[data-doc-theme="swiss-manual"] .markdown-body h1 {
913
+ margin-bottom: 2.5rem;
914
+ padding: 0 0 1.5rem;
915
+ border-bottom: 3px solid var(--linear-text);
916
+ font-size: clamp(2.8rem, 6vw, 5.6rem);
917
+ font-weight: 800;
918
+ letter-spacing: -0.065em;
919
+ line-height: 0.98;
920
+ }
921
+
922
+ body[data-doc-theme="swiss-manual"] .markdown-body h2 {
923
+ display: grid;
924
+ grid-template-columns: 52px 1fr;
925
+ margin-top: 3rem;
926
+ padding-top: 1rem;
927
+ border-top: 2px solid var(--linear-text);
928
+ font-size: 1.35rem;
929
+ }
930
+
931
+ body[data-doc-theme="swiss-manual"] .markdown-body h2::before {
932
+ content: "";
933
+ width: 12px;
934
+ height: 12px;
935
+ margin-top: 0.28em;
936
+ background: var(--linear-accent);
937
+ }
938
+
939
+ body[data-doc-theme="swiss-manual"] .markdown-body blockquote {
940
+ border: 1px solid var(--linear-text);
941
+ border-left: 10px solid var(--linear-accent);
942
+ border-radius: 0;
943
+ background: transparent;
944
+ }
945
+
946
+ body[data-doc-theme="swiss-manual"] .doc-toc {
947
+ top: 0;
948
+ width: 220px;
949
+ flex-basis: 220px;
950
+ max-height: calc(100vh - 72px);
951
+ padding: 1.25rem;
952
+ border: 0;
953
+ border-radius: 0;
954
+ background: var(--linear-bg-subtle);
955
+ }
956
+
957
+ body[data-doc-theme="swiss-manual"] .dir-listing-page,
958
+ body[data-doc-theme="swiss-manual"] .welcome {
959
+ margin: 0;
960
+ padding: clamp(2rem, 6vw, 6rem);
961
+ }
962
+
963
+ /* Shared component refinements for the four independent profiles. */
964
+ body:not([data-doc-theme="slate-modern"]) .markdown-body code:not(pre code) {
965
+ border: 1px solid var(--linear-border);
966
+ border-radius: var(--linear-radius);
967
+ background: var(--linear-bg-subtle);
968
+ color: var(--linear-text);
969
+ }
970
+
971
+ body:not([data-doc-theme="slate-modern"]) .markdown-body pre,
972
+ body:not([data-doc-theme="slate-modern"]) .markdown-body .hljs {
973
+ border: 1px solid var(--doc-rule-strong);
974
+ border-radius: var(--linear-radius);
975
+ background: var(--doc-code-bg);
976
+ color: var(--doc-code-text);
977
+ }
978
+
979
+ body:not([data-doc-theme="slate-modern"]) .markdown-body table {
980
+ border-collapse: collapse;
981
+ }
982
+
983
+ body:not([data-doc-theme="slate-modern"]) .markdown-body th {
984
+ border-color: var(--doc-rule-strong);
985
+ background: var(--linear-bg-subtle);
986
+ color: var(--linear-text);
987
+ }
988
+
989
+ body:not([data-doc-theme="slate-modern"]) .markdown-body td {
990
+ border-color: var(--linear-border);
991
+ color: var(--linear-text);
992
+ }
993
+
994
+ body:not([data-doc-theme="slate-modern"]) .markdown-body tr {
995
+ border-color: var(--linear-border);
996
+ background: transparent;
997
+ }
998
+
999
+ body:not([data-doc-theme="slate-modern"]) .markdown-body tr:nth-child(2n) {
1000
+ background: var(--linear-bg-subtle);
1001
+ }
1002
+
1003
+ body:not([data-doc-theme="slate-modern"]) .markdown-body .mermaid {
1004
+ border-color: var(--doc-rule-strong);
1005
+ border-radius: var(--linear-radius);
1006
+ background: var(--linear-bg-subtle);
1007
+ }
1008
+
1009
+ body:not([data-doc-theme="slate-modern"]) .sidebar-collapse-toggle {
1010
+ border-color: var(--doc-rule-strong);
1011
+ border-radius: var(--linear-radius);
1012
+ box-shadow: none;
1013
+ }
1014
+
1015
+ body:not([data-doc-theme="slate-modern"]) .brand-fallback {
1016
+ display: inline-flex;
1017
+ width: 1.2em;
1018
+ height: 1.2em;
1019
+ margin-right: 0.35em;
1020
+ align-items: center;
1021
+ justify-content: center;
1022
+ vertical-align: -0.18em;
1023
+ }
1024
+
1025
+ body:not([data-doc-theme="slate-modern"]) .brand-fallback-emoji,
1026
+ body:not([data-doc-theme="slate-modern"]) .tree-kind-icon {
1027
+ overflow: hidden;
1028
+ width: 0.72em;
1029
+ height: 0.72em;
1030
+ margin-right: 0.45em;
1031
+ color: transparent;
1032
+ background: currentColor;
1033
+ font-size: 1em;
1034
+ line-height: 0;
1035
+ }
1036
+
1037
+ body:not([data-doc-theme="slate-modern"]) .brand-fallback-emoji {
1038
+ display: none;
1039
+ }
1040
+
1041
+ body:not([data-doc-theme="slate-modern"]) .brand-fallback-shape {
1042
+ display: block;
1043
+ width: 100%;
1044
+ height: 100%;
1045
+ border: 1px solid currentColor;
1046
+ background: linear-gradient(90deg, var(--linear-accent) 0 34%, transparent 34% 100%);
1047
+ }
1048
+
1049
+ body[data-doc-theme="editorial-atlas"] .tree-kind-icon {
1050
+ border-radius: 50%;
1051
+ }
1052
+
1053
+ body[data-doc-theme="archive-room"] .tree-kind-icon-directory {
1054
+ background: #a5523d;
1055
+ }
1056
+
1057
+ body[data-doc-theme="swiss-manual"] .tree-kind-icon {
1058
+ width: 0.55em;
1059
+ height: 0.55em;
1060
+ background: var(--linear-accent);
1061
+ }
1062
+
1063
+ body:not([data-doc-theme="slate-modern"]).not-found-page .not-found-main {
1064
+ padding: clamp(1rem, 4vw, 4rem);
1065
+ background: var(--linear-bg);
1066
+ }
1067
+
1068
+ body:not([data-doc-theme="slate-modern"]).not-found-page .deep-space-404 {
1069
+ --space-card-bg: var(--doc-surface-raised);
1070
+ --space-scene: none;
1071
+ --space-border: var(--doc-rule-strong);
1072
+ --space-card-color: var(--linear-text);
1073
+ --space-card-shadow: none;
1074
+ --space-overlay: none;
1075
+ --space-mobile-overlay: none;
1076
+ --space-vignette: none;
1077
+ --space-eyebrow: var(--linear-text-muted);
1078
+ --space-code: var(--linear-accent);
1079
+ --space-code-shadow: transparent;
1080
+ --space-heading: var(--linear-text);
1081
+ --space-description: var(--linear-text-muted);
1082
+ --space-path-border: var(--linear-border);
1083
+ --space-path-bg: var(--linear-bg-subtle);
1084
+ --space-path-label: var(--linear-text-muted);
1085
+ --space-path-code: var(--linear-text);
1086
+ --space-primary-bg: var(--linear-accent);
1087
+ --space-primary-hover: var(--linear-accent-hover);
1088
+ --space-primary-color: #ffffff;
1089
+ --space-secondary-border: var(--doc-rule-strong);
1090
+ --space-secondary-bg: transparent;
1091
+ --space-secondary-color: var(--linear-text);
1092
+ --space-secondary-hover-bg: var(--linear-bg-subtle);
1093
+ --space-secondary-hover-border: var(--linear-text);
1094
+ --space-focus: var(--linear-accent);
1095
+ --space-caption: var(--linear-text-muted);
1096
+ border-radius: var(--linear-radius);
1097
+ background: var(--doc-surface-raised);
1098
+ animation: none;
1099
+ }
1100
+
1101
+ body:not([data-doc-theme="slate-modern"]).not-found-page .deep-space-404::before,
1102
+ body:not([data-doc-theme="slate-modern"]).not-found-page .deep-space-404::after {
1103
+ display: none;
1104
+ }
1105
+
1106
+ body:not([data-doc-theme="slate-modern"]).not-found-page .deep-space-404__content,
1107
+ body:not([data-doc-theme="slate-modern"]).not-found-page .deep-space-404__code {
1108
+ animation: none;
1109
+ }
1110
+
1111
+ body[data-doc-theme="editorial-atlas"].not-found-page .deep-space-404__content,
1112
+ body[data-doc-theme="archive-room"].not-found-page .deep-space-404__content {
1113
+ font-family: var(--doc-font-reading);
1114
+ }
1115
+
1116
+ body[data-doc-theme="swiss-manual"].not-found-page .deep-space-404 {
1117
+ border-width: 2px;
1118
+ }
1119
+
1120
+ body[data-doc-theme="swiss-manual"].not-found-page .deep-space-404__code {
1121
+ font-family: var(--doc-font-mono);
1122
+ font-weight: 900;
1123
+ }
1124
+
1125
+ @media (max-width: 1320px) {
1126
+ body[data-doc-theme="precision-index"] .markdown-body,
1127
+ body[data-doc-theme="swiss-manual"] .markdown-body {
1128
+ border-right: 0;
1129
+ }
1130
+ }
1131
+
1132
+ @media (max-width: 768px) {
1133
+ .theme-style-toggle {
1134
+ min-width: 44px;
1135
+ }
1136
+
1137
+ .theme-style-text,
1138
+ .theme-chevron {
1139
+ display: none;
1140
+ }
1141
+
1142
+ .theme-popover {
1143
+ position: fixed;
1144
+ top: auto;
1145
+ right: max(12px, env(safe-area-inset-right));
1146
+ bottom: max(12px, env(safe-area-inset-bottom));
1147
+ left: max(12px, env(safe-area-inset-left));
1148
+ width: auto;
1149
+ max-height: min(680px, calc(100vh - 24px));
1150
+ overflow-y: auto;
1151
+ }
1152
+
1153
+ body[data-doc-theme="editorial-atlas"] .main-content,
1154
+ body[data-doc-theme="archive-room"] .main-content {
1155
+ padding: 1.25rem;
1156
+ }
1157
+
1158
+ body[data-doc-theme="archive-room"] .markdown-body {
1159
+ padding: 1.25rem;
1160
+ box-shadow: 4px 4px 0 var(--linear-border);
1161
+ }
1162
+
1163
+ body[data-doc-theme="precision-index"] .main-content,
1164
+ body[data-doc-theme="swiss-manual"] .main-content {
1165
+ padding: 0;
1166
+ }
1167
+
1168
+ body[data-doc-theme="precision-index"] .markdown-body,
1169
+ body[data-doc-theme="swiss-manual"] .markdown-body {
1170
+ padding: 1.25rem;
1171
+ }
1172
+
1173
+ body[data-doc-theme="precision-index"] .markdown-body h1,
1174
+ body[data-doc-theme="swiss-manual"] .markdown-body h1 {
1175
+ font-size: clamp(2rem, 12vw, 3.25rem);
1176
+ }
1177
+
1178
+ body[data-doc-theme="swiss-manual"] .header-title-group {
1179
+ min-width: 0;
1180
+ border-right: 0;
1181
+ }
1182
+
1183
+ body[data-doc-theme="swiss-manual"] .header,
1184
+ body[data-doc-theme="swiss-manual"] .header-content {
1185
+ min-height: 0;
1186
+ }
1187
+ }
1188
+
1189
+ @media (prefers-reduced-motion: reduce) {
1190
+ *,
1191
+ *::before,
1192
+ *::after {
1193
+ scroll-behavior: auto !important;
1194
+ animation-duration: 0.01ms !important;
1195
+ animation-iteration-count: 1 !important;
1196
+ transition-duration: 0.01ms !important;
1197
+ }
1198
+ }
1199
+
1200
+ @media print {
1201
+ .theme-style-toggle,
1202
+ .theme-popover {
1203
+ display: none !important;
1204
+ }
1205
+
1206
+ body[data-doc-theme="archive-room"] .markdown-body {
1207
+ border: 0;
1208
+ box-shadow: none;
1209
+ }
1210
+ }