granite-mem 0.1.1

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,923 @@
1
+ /* ═══════════════════════════════════════════════
2
+ GRANITE — Editorial knowledge interface
3
+ Typography: Instrument Sans + Instrument Serif
4
+ ═══════════════════════════════════════════════ */
5
+
6
+ *, *::before, *::after {
7
+ margin: 0;
8
+ padding: 0;
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ :root {
13
+ /* ── Palette ── */
14
+ --bg-0: #08080a;
15
+ --bg-1: #0e0e11;
16
+ --bg-2: #141418;
17
+ --bg-3: #1a1a1f;
18
+ --bg-hover: #1e1e24;
19
+ --bg-active: #24242b;
20
+ --border: #222228;
21
+ --border-subtle: #1a1a1f;
22
+
23
+ --text-0: #f0f0f3;
24
+ --text-1: #b0b0b8;
25
+ --text-2: #6e6e7a;
26
+ --text-3: #44444f;
27
+
28
+ --accent: #6366f1;
29
+ --accent-soft: rgba(99, 102, 241, 0.12);
30
+ --accent-text: #a5b4fc;
31
+
32
+ --link: #818cf8;
33
+ --link-hover: #a5b4fc;
34
+ --link-broken: #f87171;
35
+
36
+ --tag-bg: rgba(99, 102, 241, 0.08);
37
+ --tag-border: rgba(99, 102, 241, 0.15);
38
+ --tag-text: #a5b4fc;
39
+
40
+ --success: #34d399;
41
+
42
+ /* ── Type ── */
43
+ --font-sans: 'Instrument Sans', -apple-system, sans-serif;
44
+ --font-serif: 'Instrument Serif', Georgia, serif;
45
+ --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
46
+
47
+ /* ── Easing ── */
48
+ --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
49
+ --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
50
+
51
+ /* ── Layout ── */
52
+ --sidebar-rail: 48px;
53
+ --sidebar-panel: 260px;
54
+ --sidebar-total: 308px;
55
+ --content-max: 680px;
56
+ --radius: 8px;
57
+ --radius-sm: 5px;
58
+ }
59
+
60
+ html, body {
61
+ height: 100%;
62
+ font-family: var(--font-sans);
63
+ background: var(--bg-0);
64
+ color: var(--text-1);
65
+ font-size: 13px;
66
+ line-height: 1.5;
67
+ -webkit-font-smoothing: antialiased;
68
+ -moz-osx-font-smoothing: grayscale;
69
+ overflow: hidden;
70
+ }
71
+
72
+ /* ── Scrollbar ── */
73
+ ::-webkit-scrollbar { width: 4px; }
74
+ ::-webkit-scrollbar-track { background: transparent; }
75
+ ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
76
+ ::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
77
+
78
+ /* ── App layout ── */
79
+ #app {
80
+ display: flex;
81
+ height: 100%;
82
+ background: var(--bg-0);
83
+ }
84
+
85
+ /* ═══════════════════════════════════
86
+ SIDEBAR
87
+ ═══════════════════════════════════ */
88
+
89
+ #sidebar {
90
+ display: flex;
91
+ height: 100%;
92
+ flex-shrink: 0;
93
+ border-right: 1px solid var(--border);
94
+ transition: width 0.3s var(--ease-out);
95
+ }
96
+
97
+ #sidebar.expanded { width: var(--sidebar-total); }
98
+ #sidebar.collapsed { width: var(--sidebar-rail); }
99
+
100
+ /* ── Rail ── */
101
+ #sidebar-rail {
102
+ width: var(--sidebar-rail);
103
+ min-width: var(--sidebar-rail);
104
+ display: flex;
105
+ flex-direction: column;
106
+ align-items: center;
107
+ padding: 12px 0;
108
+ gap: 4px;
109
+ background: var(--bg-1);
110
+ border-right: 1px solid var(--border-subtle);
111
+ z-index: 2;
112
+ }
113
+
114
+ #brand-mark {
115
+ width: 32px;
116
+ height: 32px;
117
+ display: flex;
118
+ align-items: center;
119
+ justify-content: center;
120
+ color: var(--accent);
121
+ background: none;
122
+ border: none;
123
+ cursor: pointer;
124
+ border-radius: var(--radius-sm);
125
+ margin-bottom: 12px;
126
+ transition: color 0.15s;
127
+ }
128
+ #brand-mark:hover { color: var(--text-0); }
129
+
130
+ .rail-btn {
131
+ width: 32px;
132
+ height: 32px;
133
+ display: flex;
134
+ align-items: center;
135
+ justify-content: center;
136
+ color: var(--text-2);
137
+ background: none;
138
+ border: none;
139
+ cursor: pointer;
140
+ border-radius: var(--radius-sm);
141
+ transition: all 0.15s;
142
+ }
143
+ .rail-btn:hover { color: var(--text-1); background: var(--bg-hover); }
144
+ .rail-btn.active { color: var(--accent-text); background: var(--accent-soft); }
145
+
146
+ /* ── Panel ── */
147
+ #sidebar-panel {
148
+ width: var(--sidebar-panel);
149
+ display: flex;
150
+ flex-direction: column;
151
+ background: var(--bg-1);
152
+ overflow: hidden;
153
+ transition: width 0.3s var(--ease-out), opacity 0.2s;
154
+ }
155
+
156
+ #sidebar.collapsed #sidebar-panel {
157
+ width: 0;
158
+ opacity: 0;
159
+ pointer-events: none;
160
+ }
161
+
162
+ /* ── Search ── */
163
+ #sidebar-search { padding: 12px 12px 8px; }
164
+
165
+ #search-wrapper {
166
+ display: flex;
167
+ align-items: center;
168
+ gap: 8px;
169
+ padding: 6px 10px;
170
+ background: var(--bg-2);
171
+ border: 1px solid var(--border);
172
+ border-radius: var(--radius-sm);
173
+ transition: border-color 0.15s;
174
+ }
175
+ #search-wrapper:focus-within {
176
+ border-color: var(--accent);
177
+ box-shadow: 0 0 0 2px var(--accent-soft);
178
+ }
179
+
180
+ #search-box {
181
+ flex: 1;
182
+ background: none;
183
+ border: none;
184
+ color: var(--text-0);
185
+ font-family: var(--font-sans);
186
+ font-size: 12.5px;
187
+ outline: none;
188
+ }
189
+ #search-box::placeholder { color: var(--text-3); }
190
+
191
+ #search-wrapper kbd {
192
+ font-family: var(--font-sans);
193
+ font-size: 10px;
194
+ color: var(--text-3);
195
+ background: var(--bg-0);
196
+ border: 1px solid var(--border);
197
+ border-radius: 3px;
198
+ padding: 1px 4px;
199
+ line-height: 1.4;
200
+ }
201
+
202
+ /* ── Type filters ── */
203
+ #type-filters {
204
+ display: flex;
205
+ gap: 4px;
206
+ padding: 4px 12px 8px;
207
+ flex-wrap: wrap;
208
+ }
209
+
210
+ .type-chip {
211
+ padding: 3px 10px;
212
+ font-family: var(--font-sans);
213
+ font-size: 11px;
214
+ font-weight: 500;
215
+ letter-spacing: 0.01em;
216
+ border-radius: 20px;
217
+ border: 1px solid transparent;
218
+ background: transparent;
219
+ color: var(--text-2);
220
+ cursor: pointer;
221
+ transition: all 0.15s;
222
+ }
223
+ .type-chip:hover { color: var(--text-1); background: var(--bg-hover); }
224
+ .type-chip.active {
225
+ color: var(--accent-text);
226
+ background: var(--accent-soft);
227
+ border-color: var(--tag-border);
228
+ }
229
+
230
+ /* ── Note list ── */
231
+ #note-list {
232
+ flex: 1;
233
+ overflow-y: auto;
234
+ padding: 0 8px 8px;
235
+ }
236
+
237
+ .note-item {
238
+ padding: 8px 10px;
239
+ border-radius: var(--radius-sm);
240
+ cursor: pointer;
241
+ transition: background 0.1s;
242
+ margin-bottom: 1px;
243
+ }
244
+ .note-item:hover { background: var(--bg-hover); }
245
+ .note-item.active { background: var(--bg-active); }
246
+ .note-item.keyboard-focus {
247
+ background: var(--bg-hover);
248
+ outline: 1px solid var(--border);
249
+ }
250
+
251
+ .note-item-title {
252
+ font-size: 13px;
253
+ font-weight: 500;
254
+ color: var(--text-0);
255
+ line-height: 1.4;
256
+ margin-bottom: 2px;
257
+ white-space: nowrap;
258
+ overflow: hidden;
259
+ text-overflow: ellipsis;
260
+ }
261
+
262
+ .note-item-meta {
263
+ font-size: 11px;
264
+ color: var(--text-3);
265
+ display: flex;
266
+ align-items: center;
267
+ gap: 6px;
268
+ }
269
+
270
+ .note-item-type {
271
+ font-size: 10px;
272
+ font-weight: 500;
273
+ letter-spacing: 0.03em;
274
+ text-transform: uppercase;
275
+ color: var(--text-2);
276
+ }
277
+ .note-item-type.fleeting { color: #fbbf24; }
278
+ .note-item-type.permanent { color: var(--accent-text); }
279
+ .note-item-type.reference { color: var(--success); }
280
+ .note-item-type.person { color: #f9a8d4; }
281
+ .note-item-type.meeting { color: #93c5fd; }
282
+ .note-item-type.project { color: #c4b5fd; }
283
+ .note-item-type.decision { color: #fca5a5; }
284
+
285
+ .note-item-dot {
286
+ width: 2px;
287
+ height: 2px;
288
+ border-radius: 50%;
289
+ background: var(--text-3);
290
+ }
291
+
292
+ .note-item-snippet {
293
+ font-size: 11px;
294
+ color: var(--text-3);
295
+ margin-top: 3px;
296
+ line-height: 1.4;
297
+ display: -webkit-box;
298
+ -webkit-line-clamp: 2;
299
+ -webkit-box-orient: vertical;
300
+ overflow: hidden;
301
+ }
302
+ .note-item-snippet mark {
303
+ background: var(--accent-soft);
304
+ color: var(--accent-text);
305
+ border-radius: 2px;
306
+ padding: 0 1px;
307
+ }
308
+
309
+ /* ═══════════════════════════════════
310
+ CREATION PANEL
311
+ ═══════════════════════════════════ */
312
+
313
+ #create-panel {
314
+ flex: 1;
315
+ display: flex;
316
+ flex-direction: column;
317
+ overflow-y: auto;
318
+ padding: 0 12px 12px;
319
+ animation: fadeSlideIn 0.25s var(--ease-out);
320
+ }
321
+
322
+ #create-panel-header {
323
+ display: flex;
324
+ align-items: center;
325
+ justify-content: space-between;
326
+ padding: 8px 0 12px;
327
+ }
328
+
329
+ .create-panel-title {
330
+ font-size: 12px;
331
+ font-weight: 600;
332
+ color: var(--text-1);
333
+ letter-spacing: 0.02em;
334
+ }
335
+
336
+ .create-panel-close {
337
+ width: 24px;
338
+ height: 24px;
339
+ display: flex;
340
+ align-items: center;
341
+ justify-content: center;
342
+ color: var(--text-3);
343
+ background: none;
344
+ border: none;
345
+ cursor: pointer;
346
+ border-radius: var(--radius-sm);
347
+ transition: all 0.15s;
348
+ }
349
+ .create-panel-close:hover { color: var(--text-1); background: var(--bg-hover); }
350
+
351
+ .create-label {
352
+ font-size: 10px;
353
+ font-weight: 600;
354
+ color: var(--text-3);
355
+ text-transform: uppercase;
356
+ letter-spacing: 0.06em;
357
+ margin-bottom: 4px;
358
+ margin-top: 10px;
359
+ display: block;
360
+ }
361
+ .create-label:first-of-type { margin-top: 0; }
362
+
363
+ .create-select,
364
+ .create-input {
365
+ width: 100%;
366
+ padding: 6px 10px;
367
+ background: var(--bg-2);
368
+ border: 1px solid var(--border);
369
+ border-radius: var(--radius-sm);
370
+ color: var(--text-0);
371
+ font-family: var(--font-sans);
372
+ font-size: 12.5px;
373
+ outline: none;
374
+ transition: border-color 0.15s;
375
+ }
376
+ .create-select:focus,
377
+ .create-input:focus {
378
+ border-color: var(--accent);
379
+ box-shadow: 0 0 0 2px var(--accent-soft);
380
+ }
381
+ .create-select {
382
+ appearance: none;
383
+ background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236e6e7a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
384
+ background-repeat: no-repeat;
385
+ background-position: right 10px center;
386
+ padding-right: 28px;
387
+ cursor: pointer;
388
+ }
389
+ .create-select option { background: var(--bg-2); color: var(--text-0); }
390
+
391
+ .create-textarea {
392
+ width: 100%;
393
+ min-height: 160px;
394
+ padding: 10px;
395
+ background: var(--bg-2);
396
+ border: 1px solid var(--border);
397
+ border-radius: var(--radius-sm);
398
+ color: var(--text-0);
399
+ font-family: var(--font-mono);
400
+ font-size: 12px;
401
+ line-height: 1.6;
402
+ outline: none;
403
+ resize: vertical;
404
+ transition: border-color 0.15s;
405
+ }
406
+ .create-textarea:focus {
407
+ border-color: var(--accent);
408
+ box-shadow: 0 0 0 2px var(--accent-soft);
409
+ }
410
+ .create-textarea::placeholder { color: var(--text-3); }
411
+
412
+ .create-submit {
413
+ margin-top: 12px;
414
+ width: 100%;
415
+ padding: 8px;
416
+ background: var(--accent);
417
+ color: #fff;
418
+ font-family: var(--font-sans);
419
+ font-size: 12.5px;
420
+ font-weight: 600;
421
+ border: none;
422
+ border-radius: var(--radius-sm);
423
+ cursor: pointer;
424
+ transition: opacity 0.15s, transform 0.1s;
425
+ }
426
+ .create-submit:hover { opacity: 0.9; }
427
+ .create-submit:active { transform: scale(0.98); }
428
+
429
+ /* ═══════════════════════════════════
430
+ MAIN CONTENT
431
+ ═══════════════════════════════════ */
432
+
433
+ #main {
434
+ flex: 1;
435
+ display: flex;
436
+ flex-direction: column;
437
+ overflow: hidden;
438
+ position: relative;
439
+ background: var(--bg-0);
440
+ }
441
+
442
+ #content-wrapper {
443
+ flex: 1;
444
+ display: flex;
445
+ flex-direction: column;
446
+ overflow-y: auto;
447
+ scroll-behavior: smooth;
448
+ }
449
+
450
+ /* ── Note header ── */
451
+ #note-header {
452
+ display: none;
453
+ max-width: var(--content-max);
454
+ width: 100%;
455
+ margin: 0 auto;
456
+ padding: 48px 32px 0;
457
+ animation: fadeSlideIn 0.4s var(--ease-out);
458
+ }
459
+
460
+ #note-breadcrumb {
461
+ font-size: 11px;
462
+ color: var(--text-3);
463
+ margin-bottom: 8px;
464
+ text-transform: uppercase;
465
+ letter-spacing: 0.06em;
466
+ font-weight: 500;
467
+ }
468
+
469
+ #note-title {
470
+ font-family: var(--font-serif);
471
+ font-size: clamp(26px, 4vw, 34px);
472
+ font-weight: 400;
473
+ color: var(--text-0);
474
+ line-height: 1.2;
475
+ letter-spacing: -0.01em;
476
+ margin-bottom: 12px;
477
+ }
478
+
479
+ #note-meta {
480
+ display: flex;
481
+ align-items: center;
482
+ gap: 10px;
483
+ font-size: 12px;
484
+ color: var(--text-2);
485
+ padding-bottom: 28px;
486
+ border-bottom: 1px solid var(--border-subtle);
487
+ }
488
+
489
+ .meta-badge {
490
+ font-size: 10px;
491
+ font-weight: 600;
492
+ letter-spacing: 0.05em;
493
+ text-transform: uppercase;
494
+ padding: 2px 8px;
495
+ border-radius: 3px;
496
+ background: var(--accent-soft);
497
+ color: var(--accent-text);
498
+ border: 1px solid var(--tag-border);
499
+ }
500
+
501
+ .meta-date { color: var(--text-3); }
502
+
503
+ #note-tags { display: flex; gap: 4px; }
504
+
505
+ .tag {
506
+ font-size: 11px;
507
+ color: var(--text-2);
508
+ padding: 1px 7px;
509
+ border-radius: 3px;
510
+ background: var(--bg-3);
511
+ border: 1px solid var(--border);
512
+ }
513
+
514
+ /* ═══════════════════════════════════
515
+ NOTE BODY — Rendered Markdown
516
+ ═══════════════════════════════════ */
517
+
518
+ #note-body {
519
+ display: none;
520
+ max-width: var(--content-max);
521
+ width: 100%;
522
+ margin: 0 auto;
523
+ padding: 28px 32px 40px;
524
+ animation: fadeSlideIn 0.45s var(--ease-out) 0.05s both;
525
+ }
526
+
527
+ /* ── Headings ── */
528
+ #note-body .md-h1 {
529
+ font-family: var(--font-serif);
530
+ font-size: 24px;
531
+ font-weight: 400;
532
+ color: var(--text-0);
533
+ line-height: 1.3;
534
+ margin: 32px 0 12px;
535
+ letter-spacing: -0.01em;
536
+ }
537
+
538
+ #note-body .md-h2 {
539
+ font-family: var(--font-serif);
540
+ font-size: 20px;
541
+ font-weight: 400;
542
+ color: var(--text-0);
543
+ line-height: 1.35;
544
+ margin: 28px 0 10px;
545
+ }
546
+
547
+ #note-body .md-h3 {
548
+ font-family: var(--font-sans);
549
+ font-size: 13px;
550
+ font-weight: 600;
551
+ color: var(--accent-text);
552
+ text-transform: uppercase;
553
+ letter-spacing: 0.04em;
554
+ margin: 24px 0 8px;
555
+ }
556
+
557
+ /* ── Body text ── */
558
+ #note-body .md-body {
559
+ font-family: var(--font-sans);
560
+ font-size: 14px;
561
+ color: var(--text-1);
562
+ line-height: 1.75;
563
+ margin: 0 0 4px;
564
+ }
565
+
566
+ /* ── Lists ── */
567
+ #note-body .md-list {
568
+ padding-left: 20px;
569
+ margin: 4px 0;
570
+ }
571
+
572
+ #note-body .md-list li {
573
+ font-family: var(--font-sans);
574
+ font-size: 14px;
575
+ color: var(--text-1);
576
+ line-height: 1.75;
577
+ margin: 2px 0;
578
+ }
579
+
580
+ #note-body .md-list li::marker {
581
+ color: var(--text-3);
582
+ }
583
+
584
+ #note-body ul.md-list { list-style-type: disc; }
585
+ #note-body ul.md-list li::marker { color: var(--text-3); font-size: 8px; }
586
+
587
+ /* ── Blockquotes ── */
588
+ #note-body .md-blockquote {
589
+ font-family: var(--font-serif);
590
+ font-style: italic;
591
+ font-size: 14px;
592
+ color: var(--text-2);
593
+ line-height: 1.75;
594
+ margin: 12px 0;
595
+ padding: 2px 0 2px 16px;
596
+ border-left: 2px solid var(--border);
597
+ }
598
+
599
+ /* ── Code blocks ── */
600
+ #note-body .code-block {
601
+ margin: 14px 0;
602
+ background: var(--bg-2);
603
+ border: 1px solid var(--border);
604
+ border-radius: 6px;
605
+ position: relative;
606
+ overflow: hidden;
607
+ }
608
+
609
+ #note-body .code-block .code-lang {
610
+ position: absolute;
611
+ top: 0;
612
+ right: 0;
613
+ font-family: var(--font-sans);
614
+ font-size: 10px;
615
+ font-weight: 500;
616
+ color: var(--text-3);
617
+ padding: 4px 10px;
618
+ letter-spacing: 0.02em;
619
+ }
620
+
621
+ #note-body .code-block pre {
622
+ padding: 14px;
623
+ overflow-x: auto;
624
+ }
625
+
626
+ #note-body .code-block code {
627
+ font-family: var(--font-mono);
628
+ font-size: 12.5px;
629
+ line-height: 1.6;
630
+ color: #c4ccda;
631
+ }
632
+
633
+ /* ── Inline code ── */
634
+ #note-body .inline-code {
635
+ font-family: var(--font-mono);
636
+ font-size: 12px;
637
+ color: #c4ccda;
638
+ background: var(--bg-2);
639
+ border: 1px solid var(--border);
640
+ border-radius: 3px;
641
+ padding: 1px 5px;
642
+ }
643
+
644
+ /* ── Horizontal rule ── */
645
+ #note-body .md-hr {
646
+ border: none;
647
+ height: 1px;
648
+ background: var(--border);
649
+ margin: 28px 20%;
650
+ }
651
+
652
+ /* ── Strong / Emphasis ── */
653
+ #note-body strong {
654
+ font-weight: 600;
655
+ color: var(--text-0);
656
+ }
657
+
658
+ #note-body em {
659
+ font-family: var(--font-serif);
660
+ font-style: italic;
661
+ }
662
+
663
+ /* ── External links ── */
664
+ #note-body .external-link {
665
+ color: var(--text-2);
666
+ text-decoration: underline;
667
+ text-decoration-color: var(--border);
668
+ text-underline-offset: 2px;
669
+ transition: color 0.15s, text-decoration-color 0.15s;
670
+ }
671
+ #note-body .external-link:hover {
672
+ color: var(--text-1);
673
+ text-decoration-color: var(--text-2);
674
+ }
675
+
676
+ /* ═══════════════════════════════════
677
+ WIKILINKS
678
+ ═══════════════════════════════════ */
679
+
680
+ .wikilink {
681
+ color: var(--link);
682
+ text-decoration: none;
683
+ border-bottom: 1px solid transparent;
684
+ transition: color 0.15s, border-color 0.2s;
685
+ cursor: pointer;
686
+ }
687
+ .wikilink:hover {
688
+ color: var(--link-hover);
689
+ border-bottom-color: var(--link-hover);
690
+ }
691
+
692
+ .wikilink-broken {
693
+ color: var(--link-broken);
694
+ border-bottom: 1px dashed rgba(248, 113, 113, 0.4);
695
+ }
696
+
697
+ /* ── Wikilink Preview Popup ── */
698
+ .wikilink-preview {
699
+ position: fixed;
700
+ z-index: 100;
701
+ width: 280px;
702
+ background: var(--bg-2);
703
+ border: 1px solid var(--border);
704
+ border-radius: var(--radius);
705
+ padding: 14px 16px;
706
+ pointer-events: none;
707
+ opacity: 0;
708
+ transform: translateY(4px);
709
+ transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
710
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
711
+ }
712
+
713
+ .wikilink-preview.visible {
714
+ opacity: 1;
715
+ transform: translateY(0);
716
+ pointer-events: auto;
717
+ }
718
+
719
+ .wikilink-preview .preview-type {
720
+ font-size: 10px;
721
+ font-weight: 600;
722
+ text-transform: uppercase;
723
+ letter-spacing: 0.05em;
724
+ color: var(--accent-text);
725
+ margin-bottom: 4px;
726
+ }
727
+
728
+ .wikilink-preview .preview-title {
729
+ font-family: var(--font-serif);
730
+ font-size: 16px;
731
+ color: var(--text-0);
732
+ line-height: 1.3;
733
+ margin-bottom: 8px;
734
+ }
735
+
736
+ .wikilink-preview .preview-snippet {
737
+ font-size: 12px;
738
+ color: var(--text-2);
739
+ line-height: 1.5;
740
+ display: -webkit-box;
741
+ -webkit-line-clamp: 3;
742
+ -webkit-box-orient: vertical;
743
+ overflow: hidden;
744
+ }
745
+
746
+ .wikilink-preview .preview-tags {
747
+ display: flex;
748
+ gap: 4px;
749
+ margin-top: 8px;
750
+ }
751
+
752
+ .wikilink-preview .preview-tags:empty { display: none; }
753
+
754
+ .wikilink-preview .preview-tag {
755
+ font-size: 10px;
756
+ color: var(--text-3);
757
+ padding: 1px 6px;
758
+ border-radius: 3px;
759
+ background: var(--bg-3);
760
+ border: 1px solid var(--border);
761
+ }
762
+
763
+ /* ═══════════════════════════════════
764
+ BACKLINKS
765
+ ═══════════════════════════════════ */
766
+
767
+ #backlinks-panel {
768
+ display: none;
769
+ max-width: var(--content-max);
770
+ width: 100%;
771
+ margin: 0 auto;
772
+ padding: 0 32px 48px;
773
+ animation: fadeSlideIn 0.5s var(--ease-out) 0.1s both;
774
+ }
775
+
776
+ #backlinks-header {
777
+ display: flex;
778
+ align-items: center;
779
+ gap: 6px;
780
+ font-size: 11px;
781
+ font-weight: 600;
782
+ color: var(--text-3);
783
+ text-transform: uppercase;
784
+ letter-spacing: 0.06em;
785
+ padding: 20px 0 10px;
786
+ border-top: 1px solid var(--border-subtle);
787
+ }
788
+
789
+ #backlinks-count { color: var(--text-2); }
790
+
791
+ .backlink-item {
792
+ padding: 8px 12px;
793
+ margin: 2px 0;
794
+ border-radius: var(--radius-sm);
795
+ cursor: pointer;
796
+ transition: background 0.1s;
797
+ }
798
+ .backlink-item:hover { background: var(--bg-hover); }
799
+
800
+ .backlink-title {
801
+ font-size: 13px;
802
+ font-weight: 500;
803
+ color: var(--link);
804
+ display: flex;
805
+ align-items: center;
806
+ gap: 6px;
807
+ }
808
+
809
+ .backlink-arrow {
810
+ font-size: 11px;
811
+ color: var(--text-3);
812
+ }
813
+
814
+ .backlink-context {
815
+ font-size: 11.5px;
816
+ color: var(--text-3);
817
+ margin-top: 2px;
818
+ line-height: 1.5;
819
+ }
820
+
821
+ /* ═══════════════════════════════════
822
+ GRAPH VIEW
823
+ ═══════════════════════════════════ */
824
+
825
+ #graph-view {
826
+ flex: 1;
827
+ position: relative;
828
+ overflow: hidden;
829
+ }
830
+
831
+ #graph-canvas {
832
+ display: block;
833
+ width: 100%;
834
+ height: 100%;
835
+ cursor: grab;
836
+ }
837
+ #graph-canvas:active { cursor: grabbing; }
838
+
839
+ #graph-tooltip {
840
+ position: fixed;
841
+ z-index: 50;
842
+ font-family: var(--font-sans);
843
+ font-size: 12px;
844
+ font-weight: 500;
845
+ color: var(--text-0);
846
+ background: var(--bg-2);
847
+ border: 1px solid var(--border);
848
+ border-radius: var(--radius-sm);
849
+ padding: 4px 10px;
850
+ pointer-events: none;
851
+ opacity: 0;
852
+ transition: opacity 0.12s;
853
+ white-space: nowrap;
854
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
855
+ }
856
+
857
+ /* ═══════════════════════════════════
858
+ EMPTY STATE
859
+ ═══════════════════════════════════ */
860
+
861
+ #empty-state {
862
+ flex: 1;
863
+ display: flex;
864
+ flex-direction: column;
865
+ align-items: center;
866
+ justify-content: center;
867
+ gap: 8px;
868
+ color: var(--text-3);
869
+ font-size: 13px;
870
+ animation: fadeIn 0.6s var(--ease-out);
871
+ }
872
+
873
+ #empty-icon {
874
+ margin-bottom: 8px;
875
+ opacity: 0.5;
876
+ }
877
+
878
+ .empty-hint {
879
+ font-size: 12px;
880
+ color: var(--text-3);
881
+ opacity: 0.6;
882
+ }
883
+
884
+ .empty-hint kbd {
885
+ font-family: var(--font-sans);
886
+ font-size: 10px;
887
+ background: var(--bg-2);
888
+ border: 1px solid var(--border);
889
+ border-radius: 3px;
890
+ padding: 1px 5px;
891
+ }
892
+
893
+ /* ═══════════════════════════════════
894
+ ANIMATIONS
895
+ ═══════════════════════════════════ */
896
+
897
+ @keyframes fadeIn {
898
+ from { opacity: 0; }
899
+ to { opacity: 1; }
900
+ }
901
+
902
+ @keyframes fadeSlideIn {
903
+ from {
904
+ opacity: 0;
905
+ transform: translateY(8px);
906
+ }
907
+ to {
908
+ opacity: 1;
909
+ transform: translateY(0);
910
+ }
911
+ }
912
+
913
+ /* ═══════════════════════════════════
914
+ RESPONSIVE
915
+ ═══════════════════════════════════ */
916
+
917
+ @media (max-width: 768px) {
918
+ #sidebar.expanded { width: var(--sidebar-rail); }
919
+ #sidebar.expanded #sidebar-panel { width: 0; opacity: 0; pointer-events: none; }
920
+ #note-header { padding: 32px 20px 0; }
921
+ #note-body { padding: 20px 20px 32px; }
922
+ #backlinks-panel { padding: 0 20px 32px; }
923
+ }