iso-explainer 0.0.0-stage → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +119 -2
  3. package/README.pt-BR.md +89 -0
  4. package/bin/iso-explainer.mjs +75 -0
  5. package/package.json +37 -4
  6. package/skills/iso-explainer/SKILL.md +99 -0
  7. package/skills/iso-explainer/assets/figure/figure.mjs +93 -0
  8. package/skills/iso-explainer/assets/fonts/OFL.txt +93 -0
  9. package/skills/iso-explainer/assets/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
  10. package/skills/iso-explainer/assets/fonts/jetbrains-mono-latin-500-normal.woff2 +0 -0
  11. package/skills/iso-explainer/assets/fonts/jetbrains-mono-latin-600-normal.woff2 +0 -0
  12. package/skills/iso-explainer/assets/fonts/jetbrains-mono-latin-700-normal.woff2 +0 -0
  13. package/skills/iso-explainer/assets/fonts/jetbrains-mono-latin-800-normal.woff2 +0 -0
  14. package/skills/iso-explainer/assets/runtime/ANATOMY-LICENSE.txt +21 -0
  15. package/skills/iso-explainer/assets/runtime/LUCIDE-LICENSE.txt +43 -0
  16. package/skills/iso-explainer/assets/runtime/app.js +727 -0
  17. package/skills/iso-explainer/assets/runtime/engine.js +1224 -0
  18. package/skills/iso-explainer/assets/runtime/icons.js +205 -0
  19. package/skills/iso-explainer/assets/runtime/kit.js +676 -0
  20. package/skills/iso-explainer/assets/runtime/looks-core.js +162 -0
  21. package/skills/iso-explainer/assets/runtime/looks.js +508 -0
  22. package/skills/iso-explainer/assets/runtime/styles.css +461 -0
  23. package/skills/iso-explainer/assets/runtime/template.html +29 -0
  24. package/skills/iso-explainer/assets/templates/starter.course.json +134 -0
  25. package/skills/iso-explainer/examples/arquitetura-pedidos.docs.json +1745 -0
  26. package/skills/iso-explainer/examples/catalogo-looks.course.json +599 -0
  27. package/skills/iso-explainer/examples/engenharia-na-pratica.course.json +2079 -0
  28. package/skills/iso-explainer/examples/figures/token-bucket.build.mjs +111 -0
  29. package/skills/iso-explainer/examples/figures/token-bucket.html +962 -0
  30. package/skills/iso-explainer/examples/historia-pedidos.story.json +1874 -0
  31. package/skills/iso-explainer/references/architecture-mode.md +82 -0
  32. package/skills/iso-explainer/references/design-system.md +58 -0
  33. package/skills/iso-explainer/references/engine.md +64 -0
  34. package/skills/iso-explainer/references/entities.md +72 -0
  35. package/skills/iso-explainer/references/figure-craft.md +62 -0
  36. package/skills/iso-explainer/references/flows.md +67 -0
  37. package/skills/iso-explainer/references/inside.md +74 -0
  38. package/skills/iso-explainer/references/layout.md +134 -0
  39. package/skills/iso-explainer/references/looks.md +60 -0
  40. package/skills/iso-explainer/references/schema.md +157 -0
  41. package/skills/iso-explainer/references/story-mode.md +72 -0
  42. package/skills/iso-explainer/references/storytelling.md +56 -0
  43. package/skills/iso-explainer/scripts/build.mjs +82 -0
  44. package/skills/iso-explainer/scripts/harvest.mjs +240 -0
  45. package/skills/iso-explainer/scripts/lib/layout.mjs +111 -0
  46. package/skills/iso-explainer/scripts/lib/resolve.mjs +269 -0
  47. package/skills/iso-explainer/scripts/snapshot.mjs +159 -0
  48. package/skills/iso-explainer/scripts/validate.mjs +58 -0
@@ -0,0 +1,461 @@
1
+ /* iso-explainer · styles.css — warm-paper, ink-outline, hard-shadow design system */
2
+ :root {
3
+ --paper: #f4ebe0; --paper-2: #f7efe4; --sheet: #f9f2e8; --card: #f8f0e6; --stage: #faf3e9; --raised: #fbf7f1;
4
+ --line: #ddd3c5; --line-soft: #e6ddd0; --line-strong: #c6bbac; --field: #b6ac9f;
5
+ --ink: #1d1b18; --ink-2: #34302b; --muted: #6f6961; --muted-2: #8b847a;
6
+ --green: #cfe3b2; --green-ink: #24521c; --green-dot: #4caf50; --mint: #dff0de; --done: #e7efd9;
7
+ --violet: #e7ddf5; --violet-ink: #47306f; --sand: #f6e6c9; --amber: #fbe5bd; --amber-ink: #6d4a0c; --amber-dot: #e8a33a;
8
+ --red: #f8d5cf; --red-ink: #8f2a22; --red-dot: #e5534b; --blue: #dbe8f7; --blue-ink: #1f4f80; --rose: #f9d0d8; --rose-ink: #8a2440;
9
+ --hl: rgba(178, 212, 145, .8);
10
+ --drop: var(--ink); --drop-2: var(--ink-2);
11
+ --pop-shadow: 1.5px 2.5px 0 var(--drop);
12
+ --card-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 0 rgba(80,60,35,.08), 0 10px 22px -16px rgba(80,60,35,.45);
13
+ --radius: 12px;
14
+ --font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
15
+ color-scheme: light;
16
+ }
17
+ :root[data-theme="dark"] {
18
+ --paper: #211e1a; --paper-2: #25211c; --sheet: #28241f; --card: #26231e; --stage: #2a2621; --raised: #2e2a24;
19
+ --line: #342f28; --line-soft: #2c2822; --line-strong: #4f473d; --field: #5a5247;
20
+ --ink: #efe6d6; --ink-2: #ddd3c2; --muted: #a3998b; --muted-2: #8d7f6c;
21
+ --green: #3f4c2b; --green-ink: #cfe6bc; --mint: #34472f; --done: #344029;
22
+ --violet: #3e3152; --violet-ink: #ddd0f2; --sand: #4a3d2a; --amber: #4d3c1d; --amber-ink: #f3d79c;
23
+ --red: #4e2a25; --red-ink: #f6c4bb; --blue: #263a52; --blue-ink: #c7dcf3; --rose: #4c2731; --rose-ink: #f6c5d1;
24
+ --hl: rgba(110, 150, 70, .55); --drop: #050403; --drop-2: #050403;
25
+ --card-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 1px 0 rgba(0,0,0,.3), 0 10px 22px -16px rgba(0,0,0,.8);
26
+ color-scheme: dark;
27
+ }
28
+ *, :before, :after { box-sizing: border-box; }
29
+ html, body { height: 100%; margin: 0; }
30
+ body { background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 13px; line-height: 1.4; -webkit-font-smoothing: antialiased; font-feature-settings: "calt" 0, "liga" 0; overflow: hidden; }
31
+ :root[data-booting] .window { visibility: hidden; }
32
+ button, input { font: inherit; color: inherit; }
33
+ button { cursor: pointer; background: none; border: 0; padding: 0; }
34
+ button:disabled { cursor: default; }
35
+ ul, ol { margin: 0; padding: 0; list-style: none; }
36
+ h1, h2, p { margin: 0; }
37
+ a { color: inherit; }
38
+ .i { flex: none; display: block; }
39
+ kbd { font-family: var(--font); font-size: 10.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-strong); background: var(--paper-2); border-radius: 5px; padding: 1px 5px; }
40
+ :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
41
+
42
+ /* ── primitives ── */
43
+ .btn-pop { background: var(--green); border: 1.5px solid var(--ink); border-radius: 8px; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), var(--pop-shadow); transition: transform .12s, box-shadow .12s; }
44
+ .btn-pop:hover { transform: translate(-.5px, -.5px); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 2px 3px 0 var(--drop); }
45
+ .btn-pop:active { transform: translate(1px, 1.5px); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), .5px 1px 0 var(--drop); }
46
+ .btn-ghost { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1.3px solid var(--ink-2); border-radius: 8px; background: var(--raised); box-shadow: 0 1.5px 0 var(--drop-2); font-weight: 600; }
47
+ .btn-ghost:hover:not(:disabled) { background: #fff; }
48
+ :root[data-theme="dark"] .btn-ghost:hover:not(:disabled) { background: var(--line-strong); }
49
+ .btn-ghost:disabled { opacity: .45; box-shadow: none; }
50
+ .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--card-shadow); }
51
+ .eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
52
+ .icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1.3px solid var(--line-strong); border-radius: 9px; background: rgba(250,245,238,.7); }
53
+ :root[data-theme="dark"] .icon-btn { background: var(--raised); }
54
+ .icon-btn:hover { border-color: var(--muted-2); }
55
+
56
+ /* ── window & topbar ── */
57
+ .window { position: relative; padding-top: env(safe-area-inset-top, 0px); display: grid; grid-template-rows: 54px minmax(0, 1fr); width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.35), transparent 60%), var(--paper); }
58
+ .window:after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .05; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .18 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
59
+ :root[data-theme="dark"] .window:after { mix-blend-mode: screen; opacity: .035; }
60
+ .topbar { position: relative; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 0 18px 0 25px; border-bottom: 1px solid var(--line-strong); background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,0)); box-shadow: 0 1px 0 rgba(255,255,255,.6), 0 8px 18px -16px rgba(80,60,35,.45); }
61
+ :root[data-theme="dark"] .topbar { background: linear-gradient(rgba(255,255,255,.03), rgba(255,255,255,0)); box-shadow: 0 8px 18px -16px #000; }
62
+ .brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); flex: none; }
63
+ .logo { color: var(--ink); flex: none; filter: drop-shadow(1px 1.5px 0 rgba(29,27,24,.9)); }
64
+ :root[data-theme="dark"] .logo { filter: none; }
65
+ .brand__name { font-size: 19px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
66
+ .brand__name span { background: linear-gradient(transparent 56%, var(--hl) 56%); padding: 0 1px; }
67
+ .nav { display: flex; gap: 14px; margin-inline-start: auto; }
68
+ .nav__item { display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 16px; border: 1.5px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
69
+ .nav__item:not(.is-active):hover { background: rgba(255,255,255,.45); }
70
+ :root[data-theme="dark"] .nav__item:not(.is-active):hover { background: var(--raised); }
71
+ .nav__item.is-active { color: var(--ink); padding: 0 22px; }
72
+ .search { display: flex; align-items: center; gap: 10px; width: 330px; height: 34px; margin-inline-start: auto; padding: 0 7px 0 12px; border: 1.3px solid var(--field); border-radius: 9px; background: rgba(250,245,238,.7); color: var(--ink-2); text-align: start; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 0 rgba(80,60,35,.08); transition: background .15s, border-color .15s; }
73
+ :root[data-theme="dark"] .search { background: var(--raised); box-shadow: none; }
74
+ .nav + .search { margin-inline-start: 28px; }
75
+ .search:hover { border-color: var(--muted-2); }
76
+ .search__hint { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted-2); font-size: 13px; }
77
+ .search-btn, .menu-btn, .drawer-close { display: none; }
78
+ .credit { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-inline-start: 4px; }
79
+ .credit__icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; background: var(--ink); color: var(--paper); }
80
+ .credit__text { display: flex; flex-direction: column; line-height: 1.05; }
81
+ .credit__text small { font-size: 9px; color: var(--muted); }
82
+ .credit__text b { font-size: 11.5px; background: linear-gradient(transparent 56%, var(--hl) 56%); }
83
+
84
+ /* ── body grid ── */
85
+ .body { position: relative; min-width: 0; display: grid; grid-template-columns: 296px minmax(0, 1fr) 376px; min-height: 0; }
86
+ .sidebar { display: flex; flex-direction: column; min-height: 0; padding: 26px 13px 14px 25px; }
87
+ .drawer-nav { display: none; }
88
+ .tree-root { display: flex; align-items: center; gap: 9px; padding-inline-end: 6px; font-size: 15px; font-weight: 700; }
89
+ .tree-root__meta { margin-inline-start: auto; color: var(--muted); font-size: 11.5px; font-weight: 500; }
90
+ .course { flex: 1; min-height: 0; overflow: auto; margin: 14px -6px 12px 0; padding-inline-end: 6px; scrollbar-width: thin; }
91
+ .mod__head { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 6px 7px 0; border-radius: 7px; text-align: start; }
92
+ .mod__head:hover .mod__title { text-decoration: underline; text-underline-offset: 3px; }
93
+ .mod__chev { color: var(--ink-2); transition: transform .2s; }
94
+ .mod.is-open .mod__chev { transform: rotate(90deg); }
95
+ .folder { flex: none; }
96
+ .folder path { stroke: var(--ink); stroke-width: 1; fill: #c9b089; }
97
+ .folder .folder__lip { fill: none; stroke-opacity: .35; }
98
+ .folder--sand path { fill: #d9bf93; } .folder--green path { fill: #6cbf68; } .folder--violet path { fill: #8f76d6; } .folder--orange path { fill: #ec8c4f; }
99
+ .folder--blue path { fill: #4a93d6; } .folder--teal path { fill: #2aa596; } .folder--rose path { fill: #e0587d; } .folder--slate path { fill: #6b7a94; } .folder--olive path { fill: #9aab45; }
100
+ .folder .folder__lip { fill: none; }
101
+ .mod__title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; font-weight: 600; }
102
+ .mod__count { color: var(--muted-2); font-size: 11px; font-variant-numeric: tabular-nums; }
103
+ .mod__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s cubic-bezier(.2,.7,.2,1); }
104
+ .mod.is-open .mod__body { grid-template-rows: 1fr; }
105
+ .mod__clip { overflow: hidden; }
106
+ .mod__lessons { position: relative; margin: 2px 0 6px 13px; padding-inline-start: 12px; }
107
+ .mod__lessons:before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 12px; border-inline-start: 1px solid var(--line-strong); }
108
+ .lesson { position: relative; }
109
+ .lesson:before { content: ""; position: absolute; inset-inline-start: -12px; top: 50%; width: 9px; border-top: 1px solid var(--line-strong); }
110
+ .lesson > a { display: flex; align-items: center; gap: 8px; padding: 5px 8px; margin: 1px 0; border: 1.5px solid transparent; border-radius: 7px; text-decoration: none; font-size: 12.5px; color: var(--ink-2); }
111
+ .lesson > a:hover .lesson__title { text-decoration: underline; text-underline-offset: 3px; }
112
+ .lesson__markbox { width: 16px; display: grid; place-items: center; }
113
+ .lesson__mark { color: var(--muted-2); }
114
+ .lesson__mark--done { color: #3f8f4e; }
115
+ .lesson__title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
116
+ .lesson.is-current > a { background: var(--green); border-color: var(--ink); box-shadow: var(--pop-shadow); font-weight: 700; color: var(--ink); }
117
+ .lesson.is-current .lesson__mark { color: var(--ink); }
118
+ .lesson.is-soon > a { color: var(--muted-2); }
119
+ .soon { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 5px; color: var(--muted); }
120
+ .progress[hidden] { display: none; }
121
+ .progress { padding: 12px 14px 14px; background: var(--paper-2); }
122
+ .progress__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
123
+ .progress__head .eyebrow { font-size: 12.5px; }
124
+ .progress__pct { font-weight: 700; font-variant-numeric: tabular-nums; }
125
+ .bar { height: 8px; border-radius: 6px; background: var(--line-soft); border: 1px solid var(--line-strong); overflow: hidden; }
126
+ .bar span { display: block; height: 100%; background: var(--green-dot); transition: width .6s cubic-bezier(.65,0,.35,1); }
127
+
128
+ /* ── sheet (centre) ── */
129
+ .sheet { position: relative; display: flex; flex-direction: column; min-height: 0; margin: 12px 0 14px 2px; padding: 0 16px 16px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,0) 220px), var(--sheet); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 0 rgba(80,60,35,.05), 0 18px 40px -30px rgba(80,60,35,.45); }
130
+ :root[data-theme="dark"] .sheet { background: var(--sheet); box-shadow: 0 18px 40px -30px #000; }
131
+ .lesson-head { padding: 18px 2px 0 18px; }
132
+ .crumb { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
133
+ .crumb span { margin: 0 6px; color: var(--muted-2); }
134
+ .lesson-head__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 6px; }
135
+ .title { flex: 1 1 16ch; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; text-wrap: balance; font-size: 30px; font-weight: 800; letter-spacing: -.015em; line-height: 1.12; }
136
+ .subtitle { margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; color: var(--muted); font-size: 13px; }
137
+ .tags { display: flex; gap: 9px; flex: none; }
138
+ .tag { display: inline-flex; align-items: center; gap: 7px; height: 25px; padding: 0 11px 0 10px; border: 1.3px solid var(--ink-2); border-radius: 13px; font-size: 11.5px; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1.5px 0 var(--drop-2); white-space: nowrap; }
139
+ .tag--sand { background: var(--sand); } .tag--violet { background: var(--violet); } .tag--mint { background: var(--mint); }
140
+
141
+ /* ── stage ── */
142
+ .stage { position: relative; flex: 1; min-height: 0; margin-top: 12px; overflow: hidden; background: var(--stage); }
143
+ .stage__canvas { position: absolute; inset: 58px 14px 34px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
144
+ .stage__canvas.is-zoomed { touch-action: none; cursor: grab; }
145
+ .stage__canvas.is-dragging { cursor: grabbing; }
146
+ .stage-svg { display: block; width: 100%; height: 100%; overflow: visible; font-family: var(--font); }
147
+ .stage-svg text { white-space: pre; }
148
+ .stage-svg.is-magnified :is(.look [stroke-width], .prism-outline, .prism-bevel, .layer-over .pill > rect[stroke], .inspect-badge > circle) { vector-effect: non-scaling-stroke; }
149
+ .stage-grid, .layer-links, .layer-packets { pointer-events: none; }
150
+ .stage__hud { position: absolute; top: 12px; inset-inline: 12px 290px; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none; }
151
+ .chip { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 84px; padding: 6px 10px 7px 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(251,247,241,.92); box-shadow: 0 1px 0 rgba(80,60,35,.08); }
152
+ :root[data-theme="dark"] .chip { background: rgba(46,42,36,.92); }
153
+ .chip:before { content: ""; position: absolute; inset-inline-start: -1px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; transition: background .4s; }
154
+ .chip[data-level="good"]:before { background: var(--green-dot); } .chip[data-level="warn"]:before { background: var(--amber-dot); } .chip[data-level="bad"]:before { background: var(--red-dot); }
155
+ .chip__label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
156
+ .chip__value { overflow: hidden; white-space: nowrap; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; transition: color .4s; }
157
+ .chip[data-level="warn"] .chip__value { color: #a5650c; } .chip[data-level="bad"] .chip__value { color: #c0392b; }
158
+ :root[data-theme="dark"] .chip[data-level="warn"] .chip__value { color: #f0b85a; } :root[data-theme="dark"] .chip[data-level="bad"] .chip__value { color: #f08a80; }
159
+ .chip__value.is-swap { animation: value-in .42s cubic-bezier(.2,.7,.2,1); }
160
+ .chip.is-changed { animation: chip-flash 1.5s ease-out; }
161
+ @keyframes value-in { from { opacity: 0; transform: translateY(4px); } }
162
+ @keyframes chip-flash { 0% { box-shadow: 0 0 0 0 rgba(127,194,120,0); transform: translateY(0); } 15% { box-shadow: 0 0 0 4px rgba(127,194,120,.55); transform: translateY(-2px); } to { box-shadow: 0 0 0 10px rgba(127,194,120,0); transform: none; } }
163
+ .stage__tools { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3; display: flex; gap: 8px; }
164
+ .tool { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border: 1.3px solid var(--ink-2); border-radius: 8px; background: var(--raised); box-shadow: 0 1.5px 0 var(--drop-2); font-size: 12px; font-weight: 600; }
165
+ .tool:hover { background: #fff; } :root[data-theme="dark"] .tool:hover { background: var(--line-strong); }
166
+ .tool:active { transform: translateY(1px); box-shadow: 0 .5px 0 var(--drop-2); }
167
+ .tool.is-on { background: var(--green); }
168
+ .tool[hidden] { display: none !important; }
169
+ .tool--expand { padding: 0 8px; }
170
+ .tools-compact .tool span { display: none; }
171
+ .tools-compact .tool { width: 32px; padding: 0; justify-content: center; }
172
+ .stage__legend { position: absolute; bottom: 10px; inset-inline-start: 14px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 11px; }
173
+ .stage__legend span { display: inline-flex; align-items: center; gap: 6px; }
174
+ :root.stage-full .stage.is-full { position: fixed; inset: 10px; z-index: 60; height: auto; margin: 0; }
175
+
176
+ /* legend swatches & packets share colours */
177
+ .lg { display: inline-grid; place-items: center; width: 10px; height: 10px; border: 1.4px solid var(--ink); border-radius: 50%; background: #f3b47f; font-style: normal; }
178
+ .lg--res, .lg--push { background: #9fd28f; } .lg--slow, .lg--retry { background: #efb041; } .lg--mine { background: #b79ce6; } .lg--event { background: #7fb6e6; }
179
+ .lg--heavy { width: 12px; height: 12px; border-radius: 3px; background: #e8834d; }
180
+ .lg--write { border-radius: 2px; background: #5d5466; } .lg--msg { border-radius: 2.5px; background: #efb041; } .lg--poison { border-radius: 2.5px; background: #e5534b; }
181
+ .lg--empty { background: #fbf6ef; } .lg--kill { background: #fde3df; border: 2px solid #c0392b; } .lg--ping { background: #f4fbef; border: 2px solid #2f8a43; }
182
+ .lg--fail { width: 13px; height: 13px; color: #fff; background: #e5534b; border-color: #8f2a22; font-size: 11px; font-weight: 800; line-height: 1; }
183
+ .link { fill: none; stroke: var(--muted); stroke-width: 1.4px; stroke-linecap: round; stroke-linejoin: round; transition: stroke .5s; }
184
+ .link--dashed { stroke-dasharray: 5 4.5; }
185
+ .link--off { stroke: #b0a698; stroke-width: 1.6px; stroke-dasharray: 4 5; }
186
+ .link--beat { stroke: #3fa456; stroke-width: 2px; stroke-dasharray: 1.5 5.5; }
187
+ .link--cut { stroke: #c0392b; stroke-width: 2px; stroke-dasharray: 7 6; }
188
+ .link--hot { stroke: #d0683a; stroke-width: 2.4px; }
189
+ :root[data-theme="dark"] .link--off { stroke: #6c6357; }
190
+ .link-label { pointer-events: none; }
191
+ .link.is-dim { opacity: .22 !important; } .link-label.is-dim { opacity: .3 !important; }
192
+ .ent, .layer-over > g { transition: opacity .45s ease; }
193
+ .pkt { transition: opacity .25s; }
194
+ .pkt circle, .pkt rect { fill: #f3b47f; stroke: var(--ink); stroke-width: 1.5px; }
195
+ .pkt--req.pkt--back circle, .pkt--slow.pkt--back circle, .pkt--mine.pkt--back circle, .pkt--push circle, .pkt--ping.pkt--back circle, .pkt--res circle { fill: #9fd28f; }
196
+ .pkt--heavy rect { fill: #e8834d; stroke-width: 1.7px; }
197
+ .pkt--ping circle { fill: #f4fbef; stroke: #2f8a43; stroke-width: 2.1px; }
198
+ .pkt--slow circle, .pkt--retry circle { fill: #efb041; }
199
+ .pkt--mine circle { fill: #b79ce6; stroke-width: 1.7px; }
200
+ .pkt--event circle { fill: #7fb6e6; } .pkt--event.pkt--back circle { fill: #9fd28f; }
201
+ .pkt--write rect { fill: #5d5466; }
202
+ .pkt--kill circle { fill: #fde3df; stroke: #c0392b; stroke-width: 2.1px; }
203
+ .pkt--msg rect { fill: #efb041; }
204
+ .pkt--poison rect { fill: #e5534b; stroke: #5e1b16; stroke-width: 1.6px; }
205
+ .pkt--empty circle { fill: #fbf6ef; } .pkt--empty.pkt--back circle { fill: #d9d0c4; }
206
+ .pkt--held circle, .pkt--held rect { animation: held .8s ease-in-out infinite; }
207
+ .pkt--leave { opacity: 0; }
208
+ @keyframes held { 50% { stroke-width: 3.4px; } }
209
+ .fx-ring, .fx-x, .spot, .moved { transform-box: fill-box; transform-origin: 50%; }
210
+ .fx--fail .fx-ring { fill: #e5534b; stroke: #8f2a22; stroke-width: 1.4px; animation: fx-burst .65s ease-out forwards; }
211
+ .fx--fail .fx-x { fill: none; stroke: #fff; stroke-width: 1.9px; stroke-linecap: round; animation: fx-fade .65s ease-out forwards; }
212
+ .fx--ok .fx-ring { fill: none; stroke: #3fa456; stroke-width: 1.6px; animation: fx-pop .45s ease-out forwards; }
213
+ @keyframes fx-burst { 0% { opacity: 1; transform: scale(.7); } 45% { opacity: 1; transform: scale(1.25); } to { opacity: 0; transform: scale(2.3); } }
214
+ @keyframes fx-fade { 0%, 45% { opacity: 1; } to { opacity: 0; } }
215
+ @keyframes fx-pop { 0% { opacity: .9; transform: scale(.8); } to { opacity: 0; transform: scale(2); } }
216
+ .spot { fill: rgba(127,194,120,.12); stroke: #5fae57; stroke-width: 2.4px; animation: spot 1.5s ease-out forwards; }
217
+ @keyframes spot { 0% { opacity: 0; transform: scale(.75); } 20% { opacity: 1; } to { opacity: 0; transform: scale(1.4); } }
218
+ .pulse { animation: pulse 1.3s ease-in-out infinite; }
219
+ @keyframes pulse { 0%, to { opacity: .4; } 50% { opacity: 1; } }
220
+
221
+ /* ── timeline ── */
222
+ .timeline { margin-top: 12px; padding: 10px 14px; }
223
+ .timeline__head { display: flex; justify-content: space-between; align-items: baseline; }
224
+ .timeline__head .eyebrow { font-size: 13px; }
225
+ .timeline__count { color: var(--muted); font-size: 11.5px; font-weight: 600; }
226
+ .timeline__track { position: relative; margin-top: 6px; }
227
+ .timeline__rail { position: absolute; top: 13px; height: 1.3px; background: var(--line-strong); inset-inline: calc(100% / var(--n) / 2); }
228
+ .timeline__rail span { position: absolute; inset-block: -1px; inset-inline-start: 0; background: var(--ink); transition: width .7s cubic-bezier(.65,0,.35,1); }
229
+ .timeline__steps { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
230
+ .timeline__steps button { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 0 2px; }
231
+ .timeline__dot { display: grid; place-items: center; width: 26px; height: 26px; border: 1.3px solid var(--muted); border-radius: 50%; background: var(--card); font-size: 11.5px; font-weight: 700; transition: background .3s, transform .3s; }
232
+ .timeline__steps button:hover .timeline__dot { background: var(--raised); transform: translateY(-1px); }
233
+ .timeline__steps li.is-done .timeline__dot { background: var(--done); border-color: var(--ink-2); }
234
+ .timeline__steps li.is-current .timeline__dot { background: var(--green); border: 1.5px solid var(--ink); box-shadow: 1px 1.5px 0 var(--drop); transform: scale(1.08); }
235
+ /* many steps in a narrow column: the label font shrinks with the slot (≈ 9 mono chars per slot) so a long
236
+ word doesn't run into the next label; below 9 px it breaks instead */
237
+ .timeline__steps { container-type: inline-size; }
238
+ .timeline__label { max-width: 100%; min-height: 2.6em; margin-top: 5px; overflow-wrap: anywhere; color: var(--muted); font-size: clamp(9px, 100cqi / var(--n) / 5.6, 11.5px); line-height: 1.3; text-align: center; }
239
+ .timeline__steps li.is-done .timeline__label { color: var(--ink-2); }
240
+ .timeline__steps li.is-current .timeline__label { color: var(--ink); font-weight: 700; }
241
+
242
+ /* ── rail: guide & goals ── */
243
+ .rail { display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 12px 14px 14px; }
244
+ .rail .card { background: var(--paper-2); }
245
+ .guide { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 15px 16px 12px; }
246
+ .guide__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
247
+ .guide__meta .eyebrow { font-size: 12.5px; }
248
+ .guide__meta-end { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
249
+ .chapter { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border: 1.3px solid var(--ink); border-radius: 11px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 1.5px 0 var(--drop); animation: chip-in .35s cubic-bezier(.2,.7,.2,1); }
250
+ @keyframes chip-in { from { opacity: 0; transform: translateY(-3px) scale(.96); } }
251
+ .chapter--red { background: var(--red); color: var(--red-ink); } .chapter--blue { background: var(--blue); color: var(--blue-ink); } .chapter--green { background: var(--green); color: var(--green-ink); }
252
+ .chapter--amber { background: var(--amber); color: var(--amber-ink); } .chapter--violet { background: var(--violet); color: var(--violet-ink); } .chapter--sand { background: var(--sand); color: var(--ink); }
253
+ .chapter--ink { background: var(--ink); color: var(--paper); } .chapter--teal { background: #d3eee8; color: #1d5a50; }
254
+ :root[data-theme="dark"] .chapter--teal { background: #1f403a; color: #c4ebe2; } .chapter--rose { background: var(--rose); color: var(--rose-ink); }
255
+ .speak { width: 26px; height: 24px; display: grid; place-items: center; border: 1.3px solid var(--ink-2); border-radius: 8px; background: var(--raised); box-shadow: 0 1.5px 0 var(--drop-2); }
256
+ .speak.is-on { background: var(--green); }
257
+ .guide__content { flex: 1; min-height: 0; overflow: auto; margin: 14px -8px 0 0; padding-inline-end: 8px; scrollbar-width: thin; opacity: 0; transform: translateX(var(--slide, 0)); }
258
+ .guide__content.is-in { opacity: 1; transform: none; transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.2,1); }
259
+ .guide__content.no-slide { transition: opacity .35s ease; }
260
+ .guide__title { font-size: 17px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
261
+ .guide__body { margin-top: 10px; color: var(--ink-2); font-size: 12.5px; line-height: 1.65; }
262
+ .guide__body p + p, .guide__body p + ul, .guide__body ul + p { margin-top: 10px; }
263
+ .guide__body ul { padding-inline-start: 2px; } .guide__body li { position: relative; padding-inline-start: 14px; } .guide__body li:before { content: "›"; position: absolute; inset-inline-start: 0; color: var(--muted-2); font-weight: 800; }
264
+ .guide__body b, .guide__body strong { color: var(--ink); }
265
+ .guide__body code, .callout code, .chg code { padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); font-size: 11.5px; }
266
+ .guide__body em { font-style: normal; background: linear-gradient(transparent 60%, var(--hl) 60%); }
267
+ .term { border-bottom: 1.5px dotted var(--muted); font-weight: 700; color: var(--ink); position: relative; }
268
+ .term[data-tip] { cursor: help; }
269
+ .term[data-tip]:hover:after, .term[data-tip]:focus:after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 5; width: 240px; padding: 8px 10px; border: 1.3px solid var(--ink); border-radius: 8px; background: var(--raised); box-shadow: var(--pop-shadow); font-weight: 500; font-size: 11.5px; line-height: 1.5; color: var(--ink-2); }
270
+ .guide__body table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 11.5px; }
271
+ .guide__body th, .guide__body td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: start; }
272
+ .guide__body th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
273
+ .guide__card { display: none; margin: 12px 0 0; }
274
+ .cards-inline .guide__card { display: block; }
275
+ .guide__card svg { display: block; max-width: 100%; height: auto; font-family: var(--font); }
276
+ .callout { display: flex; gap: 11px; margin-top: 12px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 10px; }
277
+ .callout__icon { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 1.3px solid var(--ink); border-radius: 7px; background: var(--raised); }
278
+ .callout__title { margin-bottom: 3px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
279
+ .callout p { font-size: 12px; line-height: 1.55; color: var(--ink-2); }
280
+ .callout--insight { background: var(--violet); border-color: #d5c8e2; } .callout--tip { background: #e8efd9; border-color: #c9d6b3; }
281
+ .callout--warn { background: #fbebe7; border-color: #ebbcb3; } .callout--next { background: var(--sand); border-color: #e2cca5; }
282
+ :root[data-theme="dark"] .callout--insight { background: #3a2f4a; border-color: #4f3f63; } :root[data-theme="dark"] .callout--tip { background: #33402a; border-color: #46573a; }
283
+ :root[data-theme="dark"] .callout--warn { background: #452823; border-color: #63362f; } :root[data-theme="dark"] .callout--next { background: #43372a; border-color: #5c4b38; }
284
+ .guide__date { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: 10px; padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; vertical-align: 1px; }
285
+ .timeline__label small { display: block; margin-top: 1px; color: var(--muted-2); font-size: 10px; font-weight: 500; }
286
+ .adr { margin-top: 12px; border: 1.3px solid var(--ink-2); border-radius: 10px; background: var(--raised); box-shadow: 0 1.5px 0 var(--drop-2); overflow: hidden; }
287
+ .adr__head { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-bottom: 1px solid var(--line); background: var(--amber); color: var(--amber-ink); font-size: 11.5px; }
288
+ .adr__head b { color: var(--ink); }
289
+ .adr__date { color: var(--amber-ink); opacity: .8; font-size: 10.5px; }
290
+ .adr__status { margin-inline-start: auto; padding: 1px 7px; border: 1.2px solid var(--ink); border-radius: 9px; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
291
+ .adr__status--green { background: var(--green); color: var(--green-ink); } .adr__status--blue { background: var(--blue); color: var(--blue-ink); } .adr__status--amber { background: var(--sand); color: var(--ink); } .adr__status--red { background: var(--red); color: var(--red-ink); } .adr__status--gray { background: var(--line-soft); color: var(--muted); }
292
+ .adr__row { display: grid; gap: 2px; padding: 8px 11px; border-top: 1px solid var(--line-soft); }
293
+ .adr__row:first-of-type { border-top: 0; }
294
+ .adr__k { color: var(--muted); font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
295
+ .adr__v { color: var(--ink-2); font-size: 12px; line-height: 1.55; }
296
+ .adr__alts { display: grid; gap: 4px; margin-top: 2px; } .adr__alts li { position: relative; padding-inline-start: 14px; } .adr__alts li:before { content: "×"; position: absolute; inset-inline-start: 0; color: var(--red-dot); font-weight: 800; }
297
+ .adr__cons { display: grid; gap: 4px; margin-top: 3px; }
298
+ .sources { margin-top: 14px; }
299
+ .sources .eyebrow { font-size: 10.5px; color: var(--muted); }
300
+ .sources ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
301
+ .sources a, .sources__item { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--paper); font-size: 11px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
302
+ .sources a:hover { border-color: var(--ink-2); background: var(--raised); }
303
+ .sources small { color: var(--muted-2); font-weight: 500; }
304
+ .sources span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
305
+ .changes { margin-top: 14px; }
306
+ .changes .eyebrow { font-size: 10.5px; color: var(--muted); }
307
+ .changes ul { margin-top: 7px; display: grid; gap: 5px; }
308
+ .chg { display: flex; gap: 8px; font-size: 11.5px; line-height: 1.45; color: var(--ink-2); }
309
+ .chg b { flex: none; display: grid; place-items: center; width: 15px; height: 15px; margin-top: 1px; border-radius: 4px; font-size: 11px; line-height: 1; }
310
+ .chg--add b { background: var(--green); color: var(--green-ink); } .chg--mod b { background: var(--amber); color: var(--amber-ink); } .chg--del b { background: var(--red); color: var(--red-ink); }
311
+ .guide__nav { display: flex; gap: 9px; margin-top: 12px; padding-top: 12px; }
312
+ .btn-next { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; height: 38px; padding: 0 14px; }
313
+ .btn-next__label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
314
+ .guide__hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; color: var(--muted-2); font-size: 10.5px; }
315
+ .guide__hint kbd { font-size: 9.5px; padding: 0 4px; }
316
+ .goals { padding: 13px 16px 14px; }
317
+ .goals .eyebrow { font-size: 12.5px; }
318
+ .goals ul { display: grid; gap: 7px; margin-top: 10px; }
319
+ .goals li { display: flex; gap: 9px; color: var(--muted); font-size: 11.5px; line-height: 1.45; transition: color .3s; }
320
+ .goals li.is-hit { color: var(--ink-2); }
321
+ .check { flex: none; display: grid; place-items: center; width: 15px; height: 15px; margin-top: 1px; border: 1.3px solid var(--muted-2); border-radius: 4px; color: transparent; transition: background .3s, color .3s; }
322
+ .check.is-on { background: var(--green); border-color: var(--ink); color: var(--ink); }
323
+
324
+ /* ── inside: drill-down ── */
325
+ .ent.is-inspectable, .layer-over > g.is-inspectable { cursor: pointer; outline: none; }
326
+ .ent.is-inspectable:hover, .ent.is-inspectable:focus-visible { filter: brightness(1.05) drop-shadow(0 0 5px rgba(95,174,87,.6)); }
327
+ .inspect-badge__ring { opacity: 0; transform-box: fill-box; transform-origin: 50%; }
328
+ .is-inspectable:is(:hover, :focus-visible) .inspect-badge__ring { animation: badge-ping 1.35s ease-out infinite; }
329
+ @keyframes badge-ping { 0% { opacity: .55; transform: scale(1); } 75%, to { opacity: 0; transform: scale(1.4); } }
330
+ .inside-list { margin-top: 14px; }
331
+ .inside-list .eyebrow { font-size: 10.5px; color: var(--muted); }
332
+ .inside-list > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
333
+ .inside-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1.3px solid var(--ink-2); border-radius: 8px; background: var(--green); box-shadow: 0 1.5px 0 var(--drop-2); font-size: 11.5px; font-weight: 700; }
334
+ .inside-chip:hover { transform: translateY(-1px); }
335
+ .inspect { position: absolute; inset: 12px 12px 14px 2px; z-index: 30; display: grid; grid-template-columns: minmax(0, 1fr); padding: 0; border-radius: 14px; background: rgba(29,27,24,.16); backdrop-filter: blur(1.5px); opacity: 0; transition: opacity .25s ease; }
336
+ .inspect[hidden] { display: none; }
337
+ .inspect.is-on { opacity: 1; }
338
+ .inspect__box { display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: 0; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--sheet); box-shadow: 3px 4px 0 var(--drop); overflow: hidden; transform: scale(.965) translateY(6px); transition: transform .32s cubic-bezier(.2,.7,.2,1); }
339
+ .inspect.is-on .inspect__box { transform: none; }
340
+ .inspect__head { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; padding: 9px 10px 9px 16px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
341
+ .inspect__crumb { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
342
+ .inspect__crumb b { color: var(--ink); } .inspect__crumb span { color: var(--muted-2); }
343
+ .inspect__title { flex: 1; min-width: 0; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 16px; font-weight: 800; }
344
+ .inspect__head .icon-btn { width: 32px; height: 32px; flex: none; }
345
+ .inspect__body { min-height: 0; }
346
+ .inspect__body--scene { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
347
+ .inspect__stage { position: relative; min-height: 0; overflow: hidden; background: var(--stage); border-inline-end: 1px solid var(--line); }
348
+ /* overflow: hidden is required: Chrome hit-tests an overflow-visible SVG outside its box, and the
349
+ stage grid (12000 px) would swallow clicks on the close button and the step arrows */
350
+ .inspect__canvas { position: absolute; inset: 46px 10px 32px; overflow: hidden; touch-action: pan-y; user-select: none; }
351
+ .inspect__chips { position: absolute; top: 10px; inset-inline: 10px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
352
+ .mini-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--raised); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
353
+ .mini-chip b { color: var(--ink); font-size: 12px; letter-spacing: 0; text-transform: none; }
354
+ .mini-chip[data-level="good"] { box-shadow: inset 3px 0 0 var(--green-dot); } .mini-chip[data-level="warn"] { box-shadow: inset 3px 0 0 var(--amber-dot); } .mini-chip[data-level="bad"] { box-shadow: inset 3px 0 0 var(--red-dot); }
355
+ .inspect__legend { bottom: 8px; }
356
+ .inspect__text { display: flex; flex-direction: column; min-height: 0; overflow: auto; padding: 14px 16px; background: var(--paper-2); }
357
+ .inspect__content { margin-top: 12px; animation: ins-in .4s cubic-bezier(.2,.7,.2,1); }
358
+ @keyframes ins-in { from { opacity: 0; transform: translateX(var(--slide, 0)); } }
359
+ .inspect__nav { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; }
360
+ .inspect__nav .btn-ghost, .inspect__nav .btn-pop { width: 40px; height: 36px; display: grid; place-items: center; padding: 0; }
361
+ .inspect__nav .btn-pop:disabled { opacity: .45; box-shadow: none; }
362
+ .inspect__dots { flex: 1; display: flex; justify-content: center; }
363
+ .inspect__dots button { display: grid; place-items: center; width: 24px; height: 32px; padding: 0; }
364
+ .inspect__dots button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--muted); background: var(--card); }
365
+ .inspect__dots button.is-done::before { background: var(--done); border-color: var(--ink-2); }
366
+ .inspect__dots button.is-current::before { width: 20px; border-radius: 5px; background: var(--green); border-color: var(--ink); }
367
+ .inspect__body--html, .inspect__body--svg { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
368
+ .inspect__frame { display: block; width: 100%; height: 100%; border: 0; background: var(--paper); }
369
+ .inspect__svg { display: grid; place-items: center; min-height: 0; padding: 16px; overflow: auto; background: var(--stage); }
370
+ .inspect__svg svg { max-width: 100%; max-height: 100%; height: auto; }
371
+ .inspect__caption { padding: 10px 16px; border-top: 1px solid var(--line); background: var(--paper-2); color: var(--ink-2); font-size: 12px; line-height: 1.55; }
372
+ :root[data-layout="desktop"] .inspect { inset-inline-start: 298px; }
373
+ :root[data-layout="tablet"] .inspect { inset-inline-start: 12px; }
374
+ :root[data-layout="tablet"] .inspect__body--scene { grid-template-columns: minmax(0, 1fr) 270px; }
375
+ :root[data-layout="stack"] .inspect { position: fixed; inset: 0; z-index: 75; padding: 0; border-radius: 0; }
376
+ :root[data-layout="stack"] .inspect__box { border-radius: 0; border: 0; box-shadow: none; overflow: auto; }
377
+ :root[data-layout="stack"] .inspect__head { flex-wrap: wrap; row-gap: 4px; padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px 14px; }
378
+ :root[data-layout="stack"] .inspect__title { order: 3; flex-basis: 100%; white-space: normal; }
379
+ :root[data-layout="stack"] .inspect__crumb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
380
+ :root[data-layout="stack"] .inspect__body--scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(300px, 52vh) auto; }
381
+ :root[data-layout="stack"] .inspect__stage { border-inline-end: 0; border-bottom: 1px solid var(--line); }
382
+ :root[data-layout="stack"] .inspect__text { overflow: visible; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
383
+
384
+ /* ── overlays ── */
385
+ .toast { position: fixed; left: 50%; top: 66px; z-index: 80; display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 9px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--raised); box-shadow: var(--pop-shadow); transform: translate(-50%, -12px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s cubic-bezier(.2,.7,.2,1); }
386
+ .toast.is-on { opacity: 1; transform: translate(-50%, 0); }
387
+ .toast__icon { width: 26px; height: 26px; display: grid; place-items: center; border: 1.3px solid var(--ink); border-radius: 7px; background: var(--green); }
388
+ .toast__text { font-size: 12.5px; }
389
+ .palette { position: fixed; inset: 0; z-index: 90; display: grid; justify-items: center; align-items: start; padding-top: 12vh; background: rgba(29,27,24,.28); backdrop-filter: blur(2px); }
390
+ .palette[hidden] { display: none; }
391
+ .palette__box { width: min(620px, calc(100vw - 24px)); padding: 8px; background: var(--raised); border: 1.5px solid var(--ink); box-shadow: 3px 4px 0 var(--drop); }
392
+ .palette__field { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px; border-bottom: 1px solid var(--line); }
393
+ .palette__field input { flex: 1; border: 0; outline: 0; background: none; font-size: 14px; }
394
+ .palette__list { max-height: 52vh; overflow: auto; padding-top: 6px; }
395
+ .palette__list li { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
396
+ .palette__list li span { display: flex; flex-direction: column; min-width: 0; }
397
+ .palette__list li b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
398
+ .palette__list li small { color: var(--muted); font-size: 11px; }
399
+ .palette__list li.is-sel, .palette__list li:hover { background: var(--green); }
400
+ .palette__list li.is-empty { color: var(--muted); cursor: default; background: none; }
401
+ .mobile-nav { display: none; }
402
+ .drawer-backdrop { display: none; }
403
+ .is-fresh { animation: fresh-in .45s cubic-bezier(.2,.7,.2,1); }
404
+ @keyframes fresh-in { from { opacity: 0; transform: translateY(4px); } }
405
+
406
+ /* ── tablet: sidebar becomes a drawer ── */
407
+ :root[data-layout="tablet"] .body { grid-template-columns: minmax(0, 1fr) 340px; }
408
+ :root[data-layout="tablet"] .menu-btn, :root[data-layout="stack"] .menu-btn { display: inline-grid; margin-inline-end: 4px; }
409
+ :root[data-layout="tablet"] .sidebar, :root[data-layout="stack"] .sidebar { position: fixed; z-index: 70; top: 0; bottom: 0; inset-inline-start: 0; width: min(320px, 86vw); background: var(--paper); border-inline-end: 1.5px solid var(--ink); box-shadow: 6px 0 0 rgba(29,27,24,.12); transform: translateX(-104%); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
410
+ :root[dir="rtl"] .sidebar { transform: translateX(104%); }
411
+ :root.drawer-open .sidebar { transform: none !important; }
412
+ :root[data-layout="tablet"] .drawer-close, :root[data-layout="stack"] .drawer-close { display: inline-grid; margin-inline-start: 8px; width: 32px; height: 32px; }
413
+ :root[data-layout="tablet"] .drawer-backdrop, :root[data-layout="stack"] .drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(29,27,24,.3); opacity: 0; pointer-events: none; transition: opacity .25s; }
414
+ :root.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
415
+ :root[data-layout="tablet"] .sheet { margin-inline-start: 12px; }
416
+ :root[data-layout="tablet"] .search { width: 240px; }
417
+ :root[data-layout="tablet"] .nav, :root[data-layout="tablet"] .credit__text { display: none; }
418
+ :root[data-layout="tablet"] .search { margin-inline-start: auto; }
419
+
420
+ /* ── stack (phones, small windows): one scrolling column ── */
421
+ :root[data-layout="stack"] body { overflow: auto; }
422
+ :root[data-layout="stack"] .window { height: auto; min-height: 100dvh; overflow: visible; grid-template-rows: 64px auto; grid-template-columns: minmax(0, 1fr); }
423
+ :root[data-layout="stack"] .body, :root[data-layout="stack"] .sheet, :root[data-layout="stack"] .rail { min-width: 0; }
424
+ :root[data-layout="stack"] .topbar { position: sticky; top: env(safe-area-inset-top, 0px); padding: 0 12px; background: var(--paper); }
425
+ :root[data-layout="stack"] .nav, :root[data-layout="stack"] .search, :root[data-layout="stack"] .credit { display: none; }
426
+ :root[data-layout="stack"] .search-btn { display: inline-grid; margin-inline-start: auto; }
427
+ :root[data-layout="stack"] .icon-btn { width: 40px; height: 40px; border-radius: 10px; }
428
+ :root[data-layout="stack"] .drawer-nav { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
429
+ :root[data-layout="stack"] .body { display: block; padding: 10px 10px 84px; }
430
+ :root[data-layout="stack"] .sheet { margin: 0; padding: 0 10px 12px; }
431
+ :root[data-layout="stack"] .lesson-head { padding: 14px 4px 0; }
432
+ :root[data-layout="stack"] .lesson-head__row { flex-direction: column; align-items: flex-start; gap: 8px; }
433
+ :root[data-layout="stack"] .title { flex: none; white-space: normal; font-size: 24px; }
434
+ :root[data-layout="stack"] .tags { flex-wrap: wrap; }
435
+ :root[data-layout="stack"] .subtitle { white-space: normal; display: block; -webkit-line-clamp: unset; line-clamp: none; }
436
+ :root[data-layout="stack"] .stage { flex: none; height: clamp(340px, 62vh, 560px); }
437
+ :root[data-layout="stack"] .stage__hud { inset-inline: 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; pointer-events: auto; }
438
+ :root[data-layout="stack"] .chip { flex: none; }
439
+ :root[data-layout="stack"] .stage__canvas { inset: 64px 6px 46px; }
440
+ :root[data-layout="stack"] .stage__tools { top: auto; bottom: 8px; }
441
+ :root[data-layout="stack"] .tool span { display: none; }
442
+ :root[data-layout="stack"] .tool { width: 34px; justify-content: center; padding: 0; }
443
+ :root[data-layout="stack"] .stage__legend { inset-inline-end: 140px; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; white-space: nowrap; mask-image: linear-gradient(90deg, #000 82%, transparent); }
444
+ :root[data-layout="stack"] .stage:has(#fit:not([hidden])) #legend { inset-inline-end: 182px; }
445
+ :root[data-layout="stack"] .inspect__legend { inset-inline-end: 14px; mask-image: none; }
446
+ :root[data-layout="stack"] .timeline__label { display: none; }
447
+ :root[data-layout="stack"] .timeline__steps li.is-current .timeline__label { display: block; white-space: nowrap; }
448
+ :root[data-layout="stack"] .rail { padding: 12px 0 0; }
449
+ :root[data-layout="stack"] .guide__content { overflow: visible; }
450
+ :root[data-layout="stack"] .guide__nav, :root[data-layout="stack"] .guide__hint { display: none; }
451
+ :root[data-layout="stack"] .mobile-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line-strong); }
452
+ :root[data-layout="stack"] .mobile-nav .btn-ghost { height: 44px; }
453
+ :root[data-layout="stack"] .mobile-nav .btn-next { height: 44px; font-size: 14px; }
454
+ :root[data-layout="stack"] .toast { top: 74px; max-width: calc(100vw - 24px); }
455
+
456
+ :root.stage-full:not(.drawer-open) .drawer-backdrop { display: block; opacity: 1; pointer-events: none; z-index: 55; }
457
+ :root.stage-full .inspect { z-index: 75; }
458
+
459
+ @media (prefers-reduced-motion: reduce) {
460
+ *, :before, :after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
461
+ }
@@ -0,0 +1,29 @@
1
+ <!doctype html>
2
+ <html lang="{{LANG}}" data-booting>
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
+ <title>{{TITLE}}</title>
7
+ <meta name="description" content="{{DESCRIPTION}}" />
8
+ <meta name="theme-color" content="#f4ebe0" />
9
+ <link rel="icon" type="image/svg+xml" href="{{FAVICON}}" />
10
+ {{OG}}
11
+ <script>
12
+ // pre-paint: theme + layout, so the page never flashes or reflows
13
+ try {
14
+ var th = JSON.parse(localStorage.getItem('isx:{{COURSE_ID}}:theme'));
15
+ if (th === 'dark' || (!th && matchMedia('(prefers-color-scheme: dark)').matches)) document.documentElement.dataset.theme = 'dark';
16
+ } catch (e) {}
17
+ var w = innerWidth, h = innerHeight;
18
+ document.documentElement.dataset.layout = w >= 1200 && h >= 560 ? 'desktop' : w >= 960 && h >= 600 ? 'tablet' : 'stack';
19
+ </script>
20
+ <style>{{FONTS}}</style>
21
+ <style>{{CSS}}</style>
22
+ </head>
23
+ <body>
24
+ <div id="app"></div>
25
+ <noscript><div style="max-width:560px;margin:15vh auto;padding:0 24px;font:15px/1.5 ui-monospace,Menlo,monospace"><h1 style="font-size:24px">{{TITLE}}</h1><p>{{DESCRIPTION}}</p><p>This interactive course needs JavaScript.</p></div></noscript>
26
+ <script>window.__COURSE__ = {{COURSE_JSON}};</script>
27
+ <script>{{JS}}</script>
28
+ </body>
29
+ </html>