inkpen 0.7.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.
Files changed (95) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.rubocop.yml +8 -0
  4. data/.yardopts +11 -0
  5. data/CLAUDE.md +141 -0
  6. data/README.md +409 -0
  7. data/Rakefile +19 -0
  8. data/app/assets/javascripts/inkpen/controllers/editor_controller.js +2050 -0
  9. data/app/assets/javascripts/inkpen/controllers/sticky_toolbar_controller.js +667 -0
  10. data/app/assets/javascripts/inkpen/controllers/toolbar_controller.js +693 -0
  11. data/app/assets/javascripts/inkpen/export/html.js +637 -0
  12. data/app/assets/javascripts/inkpen/export/index.js +30 -0
  13. data/app/assets/javascripts/inkpen/export/markdown.js +697 -0
  14. data/app/assets/javascripts/inkpen/export/pdf.js +372 -0
  15. data/app/assets/javascripts/inkpen/extensions/advanced_table.js +640 -0
  16. data/app/assets/javascripts/inkpen/extensions/block_commands.js +300 -0
  17. data/app/assets/javascripts/inkpen/extensions/block_gutter.js +338 -0
  18. data/app/assets/javascripts/inkpen/extensions/callout.js +303 -0
  19. data/app/assets/javascripts/inkpen/extensions/columns.js +403 -0
  20. data/app/assets/javascripts/inkpen/extensions/database.js +990 -0
  21. data/app/assets/javascripts/inkpen/extensions/document_section.js +352 -0
  22. data/app/assets/javascripts/inkpen/extensions/drag_handle.js +407 -0
  23. data/app/assets/javascripts/inkpen/extensions/embed.js +629 -0
  24. data/app/assets/javascripts/inkpen/extensions/enhanced_image.js +566 -0
  25. data/app/assets/javascripts/inkpen/extensions/export_commands.js +271 -0
  26. data/app/assets/javascripts/inkpen/extensions/file_attachment.js +593 -0
  27. data/app/assets/javascripts/inkpen/extensions/inkpen_table/index.js +58 -0
  28. data/app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table.js +638 -0
  29. data/app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table_cell.js +100 -0
  30. data/app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table_header.js +100 -0
  31. data/app/assets/javascripts/inkpen/extensions/inkpen_table/table_constants.js +152 -0
  32. data/app/assets/javascripts/inkpen/extensions/inkpen_table/table_helpers.js +254 -0
  33. data/app/assets/javascripts/inkpen/extensions/inkpen_table/table_menu.js +282 -0
  34. data/app/assets/javascripts/inkpen/extensions/preformatted.js +239 -0
  35. data/app/assets/javascripts/inkpen/extensions/section.js +281 -0
  36. data/app/assets/javascripts/inkpen/extensions/section_title.js +126 -0
  37. data/app/assets/javascripts/inkpen/extensions/slash_commands.js +439 -0
  38. data/app/assets/javascripts/inkpen/extensions/table_of_contents.js +474 -0
  39. data/app/assets/javascripts/inkpen/extensions/toggle_block.js +332 -0
  40. data/app/assets/javascripts/inkpen/index.js +87 -0
  41. data/app/assets/stylesheets/inkpen/advanced_table.css +514 -0
  42. data/app/assets/stylesheets/inkpen/animations.css +626 -0
  43. data/app/assets/stylesheets/inkpen/block_gutter.css +265 -0
  44. data/app/assets/stylesheets/inkpen/callout.css +359 -0
  45. data/app/assets/stylesheets/inkpen/columns.css +314 -0
  46. data/app/assets/stylesheets/inkpen/database.css +658 -0
  47. data/app/assets/stylesheets/inkpen/document_section.css +305 -0
  48. data/app/assets/stylesheets/inkpen/drag_drop.css +220 -0
  49. data/app/assets/stylesheets/inkpen/editor.css +652 -0
  50. data/app/assets/stylesheets/inkpen/embed.css +468 -0
  51. data/app/assets/stylesheets/inkpen/enhanced_image.css +453 -0
  52. data/app/assets/stylesheets/inkpen/export.css +499 -0
  53. data/app/assets/stylesheets/inkpen/file_attachment.css +347 -0
  54. data/app/assets/stylesheets/inkpen/footnotes.css +136 -0
  55. data/app/assets/stylesheets/inkpen/inkpen_table.css +608 -0
  56. data/app/assets/stylesheets/inkpen/preformatted.css +215 -0
  57. data/app/assets/stylesheets/inkpen/search_replace.css +58 -0
  58. data/app/assets/stylesheets/inkpen/section.css +236 -0
  59. data/app/assets/stylesheets/inkpen/slash_menu.css +252 -0
  60. data/app/assets/stylesheets/inkpen/sticky_toolbar.css +314 -0
  61. data/app/assets/stylesheets/inkpen/toc.css +386 -0
  62. data/app/assets/stylesheets/inkpen/toggle.css +260 -0
  63. data/app/helpers/inkpen/editor_helper.rb +114 -0
  64. data/app/views/inkpen/_editor.html.erb +139 -0
  65. data/config/importmap.rb +170 -0
  66. data/docs/.DS_Store +0 -0
  67. data/docs/CHANGELOG.md +571 -0
  68. data/docs/FEATURES.md +436 -0
  69. data/docs/ROADMAP.md +3029 -0
  70. data/docs/VISION.md +235 -0
  71. data/docs/extensions/INKPEN_TABLE.md +482 -0
  72. data/docs/thinking/CORRECTED_NO_VUE.md +756 -0
  73. data/docs/thinking/EXECUTIVE_SUMMARY.md +403 -0
  74. data/docs/thinking/INKPEN_CODE_SAMPLES.md +1479 -0
  75. data/docs/thinking/INKPEN_MASTER_GUIDE.md +891 -0
  76. data/docs/thinking/README_START_HERE.md +341 -0
  77. data/lib/inkpen/configuration.rb +175 -0
  78. data/lib/inkpen/editor.rb +204 -0
  79. data/lib/inkpen/engine.rb +32 -0
  80. data/lib/inkpen/extensions/base.rb +109 -0
  81. data/lib/inkpen/extensions/code_block_syntax.rb +177 -0
  82. data/lib/inkpen/extensions/document_section.rb +111 -0
  83. data/lib/inkpen/extensions/forced_document.rb +183 -0
  84. data/lib/inkpen/extensions/mention.rb +155 -0
  85. data/lib/inkpen/extensions/preformatted.rb +111 -0
  86. data/lib/inkpen/extensions/section.rb +139 -0
  87. data/lib/inkpen/extensions/slash_commands.rb +100 -0
  88. data/lib/inkpen/extensions/table.rb +182 -0
  89. data/lib/inkpen/extensions/task_list.rb +145 -0
  90. data/lib/inkpen/sticky_toolbar.rb +157 -0
  91. data/lib/inkpen/toolbar.rb +145 -0
  92. data/lib/inkpen/version.rb +5 -0
  93. data/lib/inkpen.rb +101 -0
  94. data/sig/inkpen.rbs +4 -0
  95. metadata +165 -0
@@ -0,0 +1,386 @@
1
+ /**
2
+ * Table of Contents Styles
3
+ *
4
+ * Auto-generated navigation from document headings.
5
+ *
6
+ * @since 0.6.0
7
+ */
8
+
9
+ /* ============================================
10
+ Main Container
11
+ ============================================ */
12
+
13
+ .inkpen-toc {
14
+ margin: 1.5rem 0;
15
+ padding: 1rem 1.25rem;
16
+ background: var(--inkpen-color-bg-subtle);
17
+ border-radius: var(--inkpen-radius);
18
+ border: 1px solid var(--inkpen-color-border);
19
+ }
20
+
21
+ .inkpen-toc--sticky {
22
+ position: sticky;
23
+ top: 1rem;
24
+ max-height: calc(100vh - 2rem);
25
+ overflow-y: auto;
26
+ z-index: 40;
27
+ }
28
+
29
+ /* ============================================
30
+ Header
31
+ ============================================ */
32
+
33
+ .inkpen-toc__header {
34
+ display: flex;
35
+ align-items: center;
36
+ gap: 0.5rem;
37
+ margin-bottom: 0.75rem;
38
+ }
39
+
40
+ .inkpen-toc__title {
41
+ flex: 1;
42
+ font-weight: 600;
43
+ font-size: 0.8125rem;
44
+ text-transform: uppercase;
45
+ letter-spacing: 0.05em;
46
+ color: var(--inkpen-color-text-muted);
47
+ }
48
+
49
+ .inkpen-toc__toggle,
50
+ .inkpen-toc__settings {
51
+ display: flex;
52
+ align-items: center;
53
+ justify-content: center;
54
+ width: 24px;
55
+ height: 24px;
56
+ padding: 0;
57
+ border: none;
58
+ border-radius: var(--inkpen-radius-sm, 4px);
59
+ background: transparent;
60
+ color: var(--inkpen-color-text-muted);
61
+ font-size: 0.75rem;
62
+ cursor: pointer;
63
+ transition: background 150ms ease, color 150ms ease;
64
+ }
65
+
66
+ .inkpen-toc__toggle:hover,
67
+ .inkpen-toc__settings:hover {
68
+ background: var(--inkpen-color-border);
69
+ color: var(--inkpen-color-text);
70
+ }
71
+
72
+ .inkpen-toc__toggle {
73
+ transition: transform 150ms ease;
74
+ }
75
+
76
+ .inkpen-toc.is-collapsed .inkpen-toc__toggle {
77
+ transform: rotate(-90deg);
78
+ }
79
+
80
+ /* ============================================
81
+ Navigation
82
+ ============================================ */
83
+
84
+ .inkpen-toc__nav {
85
+ transition: max-height 200ms ease, opacity 200ms ease;
86
+ }
87
+
88
+ .inkpen-toc.is-collapsed .inkpen-toc__nav {
89
+ max-height: 0;
90
+ opacity: 0;
91
+ overflow: hidden;
92
+ }
93
+
94
+ .inkpen-toc__list {
95
+ margin: 0;
96
+ padding: 0;
97
+ list-style: none;
98
+ }
99
+
100
+ /* Numbered style */
101
+ .inkpen-toc__list--numbered {
102
+ counter-reset: toc;
103
+ }
104
+
105
+ .inkpen-toc__list--numbered .inkpen-toc__item::before {
106
+ counter-increment: toc;
107
+ content: counters(toc, ".") ".";
108
+ color: var(--inkpen-color-text-muted);
109
+ font-size: 0.75rem;
110
+ margin-right: 0.5rem;
111
+ min-width: 1.5rem;
112
+ display: inline-block;
113
+ }
114
+
115
+ /* Bulleted style */
116
+ .inkpen-toc__list--bulleted .inkpen-toc__item::before {
117
+ content: "•";
118
+ color: var(--inkpen-color-text-muted);
119
+ margin-right: 0.5rem;
120
+ }
121
+
122
+ /* Plain style - no markers */
123
+ .inkpen-toc__list--plain .inkpen-toc__item::before {
124
+ content: none;
125
+ }
126
+
127
+ /* ============================================
128
+ List Items
129
+ ============================================ */
130
+
131
+ .inkpen-toc__item {
132
+ padding: 0.375rem 0;
133
+ padding-left: var(--toc-indent, 0);
134
+ display: flex;
135
+ align-items: baseline;
136
+ }
137
+
138
+ .inkpen-toc__link {
139
+ color: var(--inkpen-color-text);
140
+ text-decoration: none;
141
+ font-size: 0.875rem;
142
+ line-height: 1.4;
143
+ transition: color 150ms ease;
144
+ }
145
+
146
+ .inkpen-toc__link:hover {
147
+ color: var(--inkpen-color-primary);
148
+ }
149
+
150
+ .inkpen-toc__link:active {
151
+ opacity: 0.7;
152
+ }
153
+
154
+ /* Level-specific styling */
155
+ .inkpen-toc__item--level-1 .inkpen-toc__link {
156
+ font-weight: 600;
157
+ font-size: 0.9375rem;
158
+ }
159
+
160
+ .inkpen-toc__item--level-2 .inkpen-toc__link {
161
+ font-weight: 500;
162
+ }
163
+
164
+ .inkpen-toc__item--level-3 .inkpen-toc__link,
165
+ .inkpen-toc__item--level-4 .inkpen-toc__link,
166
+ .inkpen-toc__item--level-5 .inkpen-toc__link,
167
+ .inkpen-toc__item--level-6 .inkpen-toc__link {
168
+ font-size: 0.8125rem;
169
+ color: var(--inkpen-color-text-muted);
170
+ }
171
+
172
+ .inkpen-toc__item--level-3 .inkpen-toc__link:hover,
173
+ .inkpen-toc__item--level-4 .inkpen-toc__link:hover,
174
+ .inkpen-toc__item--level-5 .inkpen-toc__link:hover,
175
+ .inkpen-toc__item--level-6 .inkpen-toc__link:hover {
176
+ color: var(--inkpen-color-primary);
177
+ }
178
+
179
+ /* ============================================
180
+ Empty State
181
+ ============================================ */
182
+
183
+ .inkpen-toc__empty {
184
+ font-size: 0.875rem;
185
+ color: var(--inkpen-color-text-muted);
186
+ font-style: italic;
187
+ padding: 0.5rem 0;
188
+ }
189
+
190
+ /* ============================================
191
+ Settings Dropdown
192
+ ============================================ */
193
+
194
+ .inkpen-toc__dropdown {
195
+ min-width: 160px;
196
+ padding: 0.5rem;
197
+ background: var(--inkpen-toolbar-bg);
198
+ border: 1px solid var(--inkpen-color-border);
199
+ border-radius: var(--inkpen-radius);
200
+ box-shadow: var(--inkpen-shadow-lg, 0 4px 12px rgba(0, 0, 0, 0.15));
201
+ animation: inkpen-toc-dropdown-in 150ms ease;
202
+ }
203
+
204
+ @keyframes inkpen-toc-dropdown-in {
205
+ from {
206
+ opacity: 0;
207
+ transform: translateY(-4px);
208
+ }
209
+ to {
210
+ opacity: 1;
211
+ transform: translateY(0);
212
+ }
213
+ }
214
+
215
+ .inkpen-toc__dropdown-section {
216
+ padding: 0.375rem 0;
217
+ }
218
+
219
+ .inkpen-toc__dropdown-section + .inkpen-toc__dropdown-section {
220
+ border-top: 1px solid var(--inkpen-color-border);
221
+ margin-top: 0.375rem;
222
+ padding-top: 0.5rem;
223
+ }
224
+
225
+ .inkpen-toc__dropdown-label {
226
+ font-size: 0.6875rem;
227
+ font-weight: 600;
228
+ text-transform: uppercase;
229
+ letter-spacing: 0.05em;
230
+ color: var(--inkpen-color-text-muted);
231
+ padding: 0.25rem 0.5rem;
232
+ margin-bottom: 0.25rem;
233
+ }
234
+
235
+ .inkpen-toc__dropdown-row {
236
+ display: flex;
237
+ gap: 0.25rem;
238
+ padding: 0 0.25rem;
239
+ }
240
+
241
+ .inkpen-toc__dropdown-btn {
242
+ flex: 1;
243
+ padding: 0.375rem 0.5rem;
244
+ border: 1px solid var(--inkpen-color-border);
245
+ border-radius: var(--inkpen-radius-sm, 4px);
246
+ background: transparent;
247
+ color: var(--inkpen-color-text);
248
+ font-size: 0.75rem;
249
+ cursor: pointer;
250
+ transition: background 150ms ease, border-color 150ms ease;
251
+ }
252
+
253
+ .inkpen-toc__dropdown-btn:hover {
254
+ background: var(--inkpen-color-bg-subtle);
255
+ }
256
+
257
+ .inkpen-toc__dropdown-btn.is-active {
258
+ background: var(--inkpen-color-primary);
259
+ border-color: var(--inkpen-color-primary);
260
+ color: white;
261
+ }
262
+
263
+ .inkpen-toc__dropdown-item {
264
+ display: block;
265
+ width: 100%;
266
+ padding: 0.5rem 0.75rem;
267
+ border: none;
268
+ border-radius: var(--inkpen-radius-sm, 4px);
269
+ background: transparent;
270
+ color: var(--inkpen-color-text);
271
+ font-size: 0.875rem;
272
+ text-align: left;
273
+ cursor: pointer;
274
+ transition: background 150ms ease;
275
+ }
276
+
277
+ .inkpen-toc__dropdown-item:hover {
278
+ background: var(--inkpen-color-bg-subtle);
279
+ }
280
+
281
+ .inkpen-toc__dropdown-item.is-active {
282
+ position: relative;
283
+ background: rgba(var(--inkpen-color-primary-rgb, 59, 130, 246), 0.1);
284
+ }
285
+
286
+ .inkpen-toc__dropdown-item.is-active::after {
287
+ content: "✓";
288
+ position: absolute;
289
+ right: 0.75rem;
290
+ color: var(--inkpen-color-primary);
291
+ }
292
+
293
+ /* ============================================
294
+ Dark Mode
295
+ ============================================ */
296
+
297
+ @media (prefers-color-scheme: dark) {
298
+ .inkpen-toc {
299
+ background: var(--inkpen-color-bg-subtle);
300
+ }
301
+
302
+ .inkpen-toc__dropdown-btn.is-active {
303
+ background: var(--inkpen-color-primary);
304
+ }
305
+ }
306
+
307
+ /* ============================================
308
+ Mobile Optimizations
309
+ ============================================ */
310
+
311
+ @media (max-width: 768px) {
312
+ .inkpen-toc {
313
+ padding: 0.875rem 1rem;
314
+ margin: 1rem 0;
315
+ }
316
+
317
+ .inkpen-toc--sticky {
318
+ position: static;
319
+ max-height: none;
320
+ }
321
+
322
+ .inkpen-toc__toggle,
323
+ .inkpen-toc__settings {
324
+ width: 32px;
325
+ height: 32px;
326
+ }
327
+
328
+ .inkpen-toc__link {
329
+ padding: 0.25rem 0;
330
+ }
331
+
332
+ .inkpen-toc__item {
333
+ padding: 0.5rem 0;
334
+ }
335
+ }
336
+
337
+ /* ============================================
338
+ Print Styles
339
+ ============================================ */
340
+
341
+ @media print {
342
+ .inkpen-toc {
343
+ break-inside: avoid;
344
+ page-break-inside: avoid;
345
+ background: none;
346
+ border: 1px solid #ccc;
347
+ }
348
+
349
+ .inkpen-toc--sticky {
350
+ position: static;
351
+ }
352
+
353
+ .inkpen-toc__toggle,
354
+ .inkpen-toc__settings,
355
+ .inkpen-toc__dropdown {
356
+ display: none !important;
357
+ }
358
+
359
+ .inkpen-toc__link {
360
+ color: #000;
361
+ }
362
+
363
+ .inkpen-toc__link::after {
364
+ content: " (p. " attr(data-page) ")";
365
+ font-size: 0.75rem;
366
+ color: #666;
367
+ }
368
+ }
369
+
370
+ /* ============================================
371
+ Reduced Motion
372
+ ============================================ */
373
+
374
+ @media (prefers-reduced-motion: reduce) {
375
+ .inkpen-toc__toggle,
376
+ .inkpen-toc__nav,
377
+ .inkpen-toc__link,
378
+ .inkpen-toc__dropdown {
379
+ transition: none;
380
+ }
381
+
382
+ @keyframes inkpen-toc-dropdown-in {
383
+ from { opacity: 1; transform: none; }
384
+ to { opacity: 1; transform: none; }
385
+ }
386
+ }
@@ -0,0 +1,260 @@
1
+ /**
2
+ * Toggle Block Styles for Inkpen Editor
3
+ *
4
+ * Collapsible/expandable blocks with smooth animations.
5
+ *
6
+ * @since 0.3.3
7
+ */
8
+
9
+ /* ==========================================================================
10
+ CSS Custom Properties
11
+ ========================================================================== */
12
+
13
+ :root {
14
+ --inkpen-toggle-border: #e5e7eb;
15
+ --inkpen-toggle-bg: transparent;
16
+ --inkpen-toggle-bg-hover: #f9fafb;
17
+ --inkpen-toggle-indicator: #6b7280;
18
+ --inkpen-toggle-indicator-hover: #374151;
19
+ --inkpen-toggle-summary-font: inherit;
20
+ --inkpen-toggle-radius: 6px;
21
+ --inkpen-toggle-padding: 0.75rem 1rem;
22
+ --inkpen-toggle-content-padding: 0 1rem 1rem 2.25rem;
23
+ }
24
+
25
+ /* Dark mode */
26
+ [data-theme="dark"],
27
+ .dark {
28
+ --inkpen-toggle-border: #374151;
29
+ --inkpen-toggle-bg: transparent;
30
+ --inkpen-toggle-bg-hover: #1f2937;
31
+ --inkpen-toggle-indicator: #9ca3af;
32
+ --inkpen-toggle-indicator-hover: #d1d5db;
33
+ }
34
+
35
+ /* ==========================================================================
36
+ Toggle Block Container
37
+ ========================================================================== */
38
+
39
+ .inkpen-toggle {
40
+ position: relative;
41
+ margin: 0.75rem 0;
42
+ border: 1px solid var(--inkpen-toggle-border);
43
+ border-radius: var(--inkpen-toggle-radius);
44
+ background: var(--inkpen-toggle-bg);
45
+ }
46
+
47
+ .inkpen-toggle:hover {
48
+ background: var(--inkpen-toggle-bg-hover);
49
+ }
50
+
51
+ /* Remove default marker */
52
+ .inkpen-toggle::-webkit-details-marker,
53
+ .inkpen-toggle::marker {
54
+ display: none;
55
+ }
56
+
57
+ /* ==========================================================================
58
+ Toggle Indicator (Arrow)
59
+ ========================================================================== */
60
+
61
+ .inkpen-toggle__indicator {
62
+ position: absolute;
63
+ top: 0.875rem;
64
+ left: 0.75rem;
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ width: 20px;
69
+ height: 20px;
70
+ color: var(--inkpen-toggle-indicator);
71
+ cursor: pointer;
72
+ border-radius: 4px;
73
+ transition: transform 150ms ease, color 150ms ease, background 150ms ease;
74
+ z-index: 1;
75
+ }
76
+
77
+ .inkpen-toggle__indicator:hover {
78
+ color: var(--inkpen-toggle-indicator-hover);
79
+ background: rgba(0, 0, 0, 0.05);
80
+ }
81
+
82
+ .inkpen-toggle__indicator svg {
83
+ transition: transform 150ms ease;
84
+ }
85
+
86
+ /* Rotate arrow when open */
87
+ .inkpen-toggle[open] .inkpen-toggle__indicator svg {
88
+ transform: rotate(90deg);
89
+ }
90
+
91
+ /* Dark mode hover */
92
+ [data-theme="dark"] .inkpen-toggle__indicator:hover,
93
+ .dark .inkpen-toggle__indicator:hover {
94
+ background: rgba(255, 255, 255, 0.1);
95
+ }
96
+
97
+ /* ==========================================================================
98
+ Toggle Summary (Header)
99
+ ========================================================================== */
100
+
101
+ .inkpen-toggle__summary {
102
+ display: block;
103
+ padding: var(--inkpen-toggle-padding);
104
+ padding-left: 2.25rem;
105
+ font-weight: 500;
106
+ cursor: text;
107
+ outline: none;
108
+ min-height: 1.5em;
109
+ }
110
+
111
+ /* Remove default summary styling */
112
+ .inkpen-toggle__summary::-webkit-details-marker {
113
+ display: none;
114
+ }
115
+
116
+ .inkpen-toggle__summary::marker {
117
+ display: none;
118
+ }
119
+
120
+ /* Placeholder for empty summary */
121
+ .inkpen-toggle__summary:empty::before {
122
+ content: "Toggle heading...";
123
+ color: #9ca3af;
124
+ pointer-events: none;
125
+ }
126
+
127
+ [data-theme="dark"] .inkpen-toggle__summary:empty::before,
128
+ .dark .inkpen-toggle__summary:empty::before {
129
+ color: #6b7280;
130
+ }
131
+
132
+ /* ==========================================================================
133
+ Toggle Content
134
+ ========================================================================== */
135
+
136
+ .inkpen-toggle__content {
137
+ padding: var(--inkpen-toggle-content-padding);
138
+ }
139
+
140
+ /* Hide content when collapsed */
141
+ .inkpen-toggle:not([open]) .inkpen-toggle__content > *:not(.inkpen-toggle__summary) {
142
+ display: none;
143
+ }
144
+
145
+ /* Content blocks spacing */
146
+ .inkpen-toggle__content > * + * {
147
+ margin-top: 0.75rem;
148
+ }
149
+
150
+ /* First paragraph after summary */
151
+ .inkpen-toggle__content > .inkpen-toggle__summary + * {
152
+ margin-top: 0;
153
+ }
154
+
155
+ /* ==========================================================================
156
+ Nested Toggles
157
+ ========================================================================== */
158
+
159
+ .inkpen-toggle .inkpen-toggle {
160
+ margin: 0.5rem 0;
161
+ }
162
+
163
+ /* ==========================================================================
164
+ Focus States
165
+ ========================================================================== */
166
+
167
+ .inkpen-toggle:focus-within {
168
+ border-color: var(--inkpen-color-primary, #3b82f6);
169
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
170
+ }
171
+
172
+ /* ==========================================================================
173
+ Animations
174
+ ========================================================================== */
175
+
176
+ /* Content reveal animation */
177
+ .inkpen-toggle[open] .inkpen-toggle__content > *:not(.inkpen-toggle__summary) {
178
+ animation: inkpen-toggle-reveal 150ms ease-out;
179
+ }
180
+
181
+ @keyframes inkpen-toggle-reveal {
182
+ from {
183
+ opacity: 0;
184
+ transform: translateY(-8px);
185
+ }
186
+ to {
187
+ opacity: 1;
188
+ transform: translateY(0);
189
+ }
190
+ }
191
+
192
+ /* ==========================================================================
193
+ Mobile Optimizations
194
+ ========================================================================== */
195
+
196
+ @media (max-width: 768px) {
197
+ .inkpen-toggle__indicator {
198
+ width: 24px;
199
+ height: 24px;
200
+ top: 0.75rem;
201
+ }
202
+
203
+ .inkpen-toggle__summary {
204
+ padding: 0.875rem 1rem 0.875rem 2.5rem;
205
+ }
206
+
207
+ .inkpen-toggle__content {
208
+ padding: 0 1rem 1rem 2.5rem;
209
+ }
210
+ }
211
+
212
+ /* Touch-friendly: larger tap targets */
213
+ @media (pointer: coarse) {
214
+ .inkpen-toggle__indicator {
215
+ width: 28px;
216
+ height: 28px;
217
+ }
218
+ }
219
+
220
+ /* ==========================================================================
221
+ Reduced Motion
222
+ ========================================================================== */
223
+
224
+ @media (prefers-reduced-motion: reduce) {
225
+ .inkpen-toggle__indicator svg,
226
+ .inkpen-toggle__indicator {
227
+ transition: none;
228
+ }
229
+
230
+ .inkpen-toggle[open] .inkpen-toggle__content > *:not(.inkpen-toggle__summary) {
231
+ animation: none;
232
+ }
233
+ }
234
+
235
+ /* ==========================================================================
236
+ Print Styles
237
+ ========================================================================== */
238
+
239
+ @media print {
240
+ /* Always show content when printing */
241
+ .inkpen-toggle {
242
+ border: 1px solid #ccc;
243
+ }
244
+
245
+ .inkpen-toggle:not([open]) .inkpen-toggle__content > *:not(.inkpen-toggle__summary) {
246
+ display: block !important;
247
+ }
248
+
249
+ .inkpen-toggle__indicator {
250
+ display: none;
251
+ }
252
+
253
+ .inkpen-toggle__summary {
254
+ padding-left: 1rem;
255
+ }
256
+
257
+ .inkpen-toggle__content {
258
+ padding-left: 1rem;
259
+ }
260
+ }