@mafianacho/nacholens 0.0.0-stage → 0.3.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 (69) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +13 -0
  3. package/README.de.md +46 -0
  4. package/README.fr.md +46 -0
  5. package/README.ja.md +46 -0
  6. package/README.ko.md +46 -0
  7. package/README.md +45 -2
  8. package/README.zh.md +46 -0
  9. package/demo/shop/v1/README.md +7 -0
  10. package/demo/shop/v1/api.js +78 -0
  11. package/demo/shop/v1/db.js +38 -0
  12. package/demo/shop/v1/gateway.js +50 -0
  13. package/demo/shop/v1/mock-external.js +17 -0
  14. package/demo/shop/v1/public/app.js +32 -0
  15. package/demo/shop/v1/public/format.js +2 -0
  16. package/demo/shop/v1/public/index.html +13 -0
  17. package/demo/shop/v1/public/styles.css +4 -0
  18. package/demo/shop/v2/README.md +7 -0
  19. package/demo/shop/v2/api.js +88 -0
  20. package/demo/shop/v2/db.js +38 -0
  21. package/demo/shop/v2/gateway.js +50 -0
  22. package/demo/shop/v2/mock-external.js +17 -0
  23. package/demo/shop/v2/public/app.js +33 -0
  24. package/demo/shop/v2/public/format.js +3 -0
  25. package/demo/shop/v2/public/index.html +13 -0
  26. package/demo/shop/v2/public/styles.css +5 -0
  27. package/docs/guide.ko.md +97 -0
  28. package/docs/guide.md +142 -0
  29. package/docs/model-schema.md +137 -0
  30. package/docs/review.md +78 -0
  31. package/examples/demo-shop.artifact.html +1535 -0
  32. package/examples/demo-shop.artifact.json +7 -0
  33. package/examples/demo-shop.html +1535 -0
  34. package/examples/external/README.md +12 -0
  35. package/examples/external/full-stack-fastapi-template/LICENSE +21 -0
  36. package/examples/external/full-stack-fastapi-template/changes.json +56 -0
  37. package/examples/external/full-stack-fastapi-template/full-stack-fastapi-template-backend.html +1535 -0
  38. package/models/demo-shop/changes.auto.json +121 -0
  39. package/models/demo-shop/changes.example.json +16 -0
  40. package/models/demo-shop/intent.example.json +75 -0
  41. package/models/demo-shop/model.json +3151 -0
  42. package/package.json +60 -4
  43. package/skills/nacholens/SKILL.md +235 -0
  44. package/src/cli.js +377 -0
  45. package/src/demo.js +42 -0
  46. package/src/diff.js +254 -0
  47. package/src/gitio.js +67 -0
  48. package/src/install.js +94 -0
  49. package/src/model.js +434 -0
  50. package/src/page.js +87 -0
  51. package/src/player/fonts/FONTLOG.md +30 -0
  52. package/src/player/fonts/OFL-Anton.txt +93 -0
  53. package/src/player/fonts/OFL-IBMPlex.txt +94 -0
  54. package/src/player/fonts/anton-400.woff2 +0 -0
  55. package/src/player/fonts/nacho-mono-500.woff2 +0 -0
  56. package/src/player/fonts/nacho-mono-600.woff2 +0 -0
  57. package/src/player/fonts/nacho-sans-400.woff2 +0 -0
  58. package/src/player/fonts/nacho-sans-500.woff2 +0 -0
  59. package/src/player/fonts/nacho-sans-600.woff2 +0 -0
  60. package/src/player/fonts/nacho-sans-700.woff2 +0 -0
  61. package/src/player/player.css +318 -0
  62. package/src/player/player.js +872 -0
  63. package/src/player/review.css +49 -0
  64. package/src/player/review.js +230 -0
  65. package/src/player/template.html +58 -0
  66. package/src/review.js +321 -0
  67. package/src/scan.js +255 -0
  68. package/src/template.js +36 -0
  69. package/src/verify.js +90 -0
@@ -0,0 +1,94 @@
1
+ Modified Version (Nacho Sans, Nacho Mono: subset, WOFF2, renamed) Copyright 2026 Mafianacho.
2
+ Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
3
+
4
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
5
+
6
+ This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
7
+
8
+
9
+ -----------------------------------------------------------
10
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11
+ -----------------------------------------------------------
12
+
13
+ PREAMBLE
14
+ The goals of the Open Font License (OFL) are to stimulate worldwide
15
+ development of collaborative font projects, to support the font creation
16
+ efforts of academic and linguistic communities, and to provide a free and
17
+ open framework in which fonts may be shared and improved in partnership
18
+ with others.
19
+
20
+ The OFL allows the licensed fonts to be used, studied, modified and
21
+ redistributed freely as long as they are not sold by themselves. The
22
+ fonts, including any derivative works, can be bundled, embedded,
23
+ redistributed and/or sold with any software provided that any reserved
24
+ names are not used by derivative works. The fonts and derivatives,
25
+ however, cannot be released under any other type of license. The
26
+ requirement for fonts to remain under this license does not apply
27
+ to any document created using the fonts or their derivatives.
28
+
29
+ DEFINITIONS
30
+ "Font Software" refers to the set of files released by the Copyright
31
+ Holder(s) under this license and clearly marked as such. This may
32
+ include source files, build scripts and documentation.
33
+
34
+ "Reserved Font Name" refers to any names specified as such after the
35
+ copyright statement(s).
36
+
37
+ "Original Version" refers to the collection of Font Software components as
38
+ distributed by the Copyright Holder(s).
39
+
40
+ "Modified Version" refers to any derivative made by adding to, deleting,
41
+ or substituting -- in part or in whole -- any of the components of the
42
+ Original Version, by changing formats or by porting the Font Software to a
43
+ new environment.
44
+
45
+ "Author" refers to any designer, engineer, programmer, technical
46
+ writer or other person who contributed to the Font Software.
47
+
48
+ PERMISSION & CONDITIONS
49
+ Permission is hereby granted, free of charge, to any person obtaining
50
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
51
+ redistribute, and sell modified and unmodified copies of the Font
52
+ Software, subject to the following conditions:
53
+
54
+ 1) Neither the Font Software nor any of its individual components,
55
+ in Original or Modified Versions, may be sold by itself.
56
+
57
+ 2) Original or Modified Versions of the Font Software may be bundled,
58
+ redistributed and/or sold with any software, provided that each copy
59
+ contains the above copyright notice and this license. These can be
60
+ included either as stand-alone text files, human-readable headers or
61
+ in the appropriate machine-readable metadata fields within text or
62
+ binary files as long as those fields can be easily viewed by the user.
63
+
64
+ 3) No Modified Version of the Font Software may use the Reserved Font
65
+ Name(s) unless explicit written permission is granted by the corresponding
66
+ Copyright Holder. This restriction only applies to the primary font name as
67
+ presented to the users.
68
+
69
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70
+ Software shall not be used to promote, endorse or advertise any
71
+ Modified Version, except to acknowledge the contribution(s) of the
72
+ Copyright Holder(s) and the Author(s) or with their explicit written
73
+ permission.
74
+
75
+ 5) The Font Software, modified or unmodified, in part or in whole,
76
+ must be distributed entirely under this license, and must not be
77
+ distributed under any other license. The requirement for fonts to
78
+ remain under this license does not apply to any document created
79
+ using the Font Software.
80
+
81
+ TERMINATION
82
+ This license becomes null and void if any of the above conditions are
83
+ not met.
84
+
85
+ DISCLAIMER
86
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94
+ OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file
@@ -0,0 +1,318 @@
1
+ /* nacholens player — design tokens, components, layout.
2
+ Rule: every colour, size and duration comes from a token below; components use tokens only.
3
+ The palette and type roles are the Nacho Combo design system (github.com/mafianacho/nachocombo, Brand.swift):
4
+ section 1a holds its raw tokens for light and dark, section 1b maps the player's roles onto them. */
5
+
6
+ /* ═════════════════ 1a. Nacho Combo tokens (light, then dark) ═════════════════ */
7
+ :root {
8
+ color-scheme: light dark;
9
+ --paper: #FFFFFF; /* the ground: window and page background */
10
+ --paper2: #FFF7E1; /* tinted surfaces on paper: cards, table heads */
11
+ --line: #EBDDBF; /* hairlines, card borders, dashed rules */
12
+ --ink: #24180D; /* primary text, strong borders */
13
+ --ink2: #66553F; /* secondary text and metadata */
14
+ --nacho: #FFC43D; /* the box yellow: fills only, never text on paper */
15
+ --nacho-deep: #E48A0C; /* "you have to do something" as a fill */
16
+ --nacho-ink: #9A5A00; /* "you have to do something" as text or an outline; the focus ring */
17
+ --on-nacho: #2A1A0B; /* text and icons on nacho and nacho-deep fills */
18
+ --guac: #377F33; /* success and running */
19
+ --salsa: #BE3B24; /* danger, errors, "not doing" */
20
+ --board: #1E1610; --board2: #2B2017; --board-line: #45352A; --board-ink: #FFF1D2; --board-mute: #BFA889; --board-pick: #3A2A14;
21
+ --board-salsa: #F38069; --board-guac: #7FCB72;
22
+ --status-off: #8E8E93; /* status dot of something that is off */
23
+ }
24
+ @media (prefers-color-scheme: dark) {
25
+ :root {
26
+ --paper: #15100B; --paper2: #211810; --line: #3A2C1F; --ink: #F8EFDF; --ink2: #C7B59C;
27
+ --nacho-deep: #F5A53A; --nacho-ink: #F5A53A; --guac: #7FCB72; --salsa: #F38069;
28
+ }
29
+ }
30
+
31
+ /* ═════════════════ 1b. Player tokens (roles mapped onto 1a) ═════════════════ */
32
+ :root {
33
+ /* neutral surfaces and text. Cards are paper2 with a line hairline and no shadow. */
34
+ --bg: var(--paper); --surface: var(--paper); --card: var(--paper2);
35
+ --hover: color-mix(in srgb, var(--paper2) 60%, var(--paper)); --sunken: var(--paper2); --canvas-dot: var(--line);
36
+ --border: var(--line); --border-strong: color-mix(in srgb, var(--line) 45%, var(--ink2));
37
+ --trail-grey: color-mix(in srgb, var(--ink2) 70%, var(--paper));
38
+ --text: var(--ink); --text-2: var(--ink2); --text-3: var(--ink2); --text-4: color-mix(in srgb, var(--ink2) 90%, var(--paper));
39
+ --on-ink: var(--paper);
40
+ /* accent: the nacho fill marks the current thing and the one main action; outlines and links use ink;
41
+ the focus ring is nacho-ink */
42
+ --accent: var(--nacho); --on-accent: var(--on-nacho); --accent-hover: color-mix(in srgb, var(--nacho) 85%, var(--on-nacho));
43
+ --accent-line: var(--ink); --accent-soft: var(--paper2); --accent-text: var(--ink);
44
+ --accent-done: color-mix(in srgb, var(--nacho) 45%, var(--paper2)); --focus-ring: var(--nacho-ink);
45
+ /* status tones: every status in the product maps to one of these. Tinted fills are paper2 (no pastel). */
46
+ --success: var(--guac); --success-bg: var(--paper2); --success-border: var(--guac);
47
+ --warning: var(--nacho-ink); --warning-bg: var(--paper2); --warning-border: var(--nacho-ink);
48
+ --danger: var(--salsa); --danger-bg: var(--paper2); --danger-border: var(--salsa);
49
+ --info: var(--ink2); --info-bg: var(--paper2); --info-border: var(--border-strong);
50
+ --neutral: var(--ink2); --neutral-bg: var(--paper2); --neutral-border: var(--line);
51
+ /* data in motion (stage only): request = nacho-deep, response = ink, inside a component = guac (running) */
52
+ --req: var(--nacho-deep); --res: var(--ink); --int: var(--guac);
53
+ --req-text: var(--nacho-ink); /* nacho-deep is a fill; as text the request colour is nacho-ink */
54
+ --req-soft: color-mix(in srgb, var(--req) 16%, var(--paper2)); --res-soft: color-mix(in srgb, var(--res) 10%, var(--paper2));
55
+ --int-soft: color-mix(in srgb, var(--int) 16%, var(--paper2));
56
+ /* type: Nacho Sans (IBM Plex Sans) for text and headings, Nacho Mono (IBM Plex Mono) for code and paths, Anton
57
+ (capitals) for the one loud line. They are embedded (fonts/, SIL OFL 1.1) as a Latin subset; Hangul and any
58
+ other script fall back, glyph by glyph, to the system stack. Headings never use the mono face or wide
59
+ tracking: Hangul set that way reads as loose letters. */
60
+ --font: "Nacho Sans", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
61
+ --mono: "Nacho Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
62
+ --sign: Anton, var(--font);
63
+ --fs-xs: 11.5px; --fs-sm: 12.5px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 18px;
64
+ /* space (4px grid) */
65
+ --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
66
+ /* shape: no shadows, no pill shapes (r-full is for round dots and switches only) */
67
+ --r-sm: 4px; --r-md: 6px; --r-lg: 10px; --r-full: 999px;
68
+ --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus-ring);
69
+ /* motion: UI transitions (the stage's travel timing lives in player.js) */
70
+ --t-fast: 120ms; --t-base: 200ms; --t-slow: 320ms; --ease-out: cubic-bezier(.2, .8, .2, 1);
71
+ /* layout */
72
+ --topbar-h: 52px; --foot-h: 24px; --side-w: 280px; --insp-w: 344px; --dock-h: clamp(170px, 32vh, 300px);
73
+ }
74
+
75
+ /* ═════════════════ 2. Base ═════════════════ */
76
+ * { box-sizing: border-box; }
77
+ html, body { height: 100%; margin: 0; }
78
+ body { background: var(--bg); color: var(--text); font: var(--fs-md)/1.5 var(--font); -webkit-font-smoothing: antialiased; }
79
+ button, input { font: inherit; color: inherit; }
80
+ button { cursor: pointer; }
81
+ :focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
82
+ [hidden] { display: none !important; }
83
+ .mono { font-family: var(--mono); }
84
+ .kr { word-break: keep-all; overflow-wrap: anywhere; }
85
+ .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
86
+ svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
87
+
88
+ /* ═════════════════ 3. Components ═════════════════ */
89
+ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 var(--s3); border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface); font-size: var(--fs-sm); font-weight: 500; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
90
+ .btn:hover { background: var(--hover); }
91
+ .btn:disabled { opacity: .4; cursor: default; background: var(--surface); }
92
+ .btn.icon { width: 32px; padding: 0; }
93
+ .btn.primary { background: var(--accent); border-color: var(--on-accent); color: var(--on-accent); font-weight: 600; min-width: 96px; }
94
+ .btn.primary:hover { background: var(--accent-hover); }
95
+ .btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
96
+ .btn.ghost:hover { background: var(--hover); color: var(--text); }
97
+ [data-tone="success"] { --t: var(--success); --t-bg: var(--success-bg); --t-bd: var(--success-border); }
98
+ [data-tone="warning"] { --t: var(--warning); --t-bg: var(--warning-bg); --t-bd: var(--warning-border); }
99
+ [data-tone="danger"] { --t: var(--danger); --t-bg: var(--danger-bg); --t-bd: var(--danger-border); }
100
+ [data-tone="info"] { --t: var(--info); --t-bg: var(--info-bg); --t-bd: var(--info-border); }
101
+ [data-tone="neutral"] { --t: var(--neutral); --t-bg: var(--neutral-bg); --t-bd: var(--neutral-border); }
102
+ .badge { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid var(--t-bd, var(--neutral-border)); background: var(--t-bg, var(--neutral-bg)); color: var(--t, var(--neutral)); }
103
+ .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--t, var(--status-off)); flex: none; }
104
+ .dot[data-tone="neutral"] { background: var(--status-off); }
105
+ .seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--sunken); border-radius: var(--r-md); }
106
+ .seg button { height: 24px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); }
107
+ .seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); border-color: var(--border); }
108
+ .switch { display: inline-flex; align-items: center; gap: var(--s2); background: none; border: 0; padding: 0; font-size: var(--fs-sm); color: var(--text-2); }
109
+ .switch .track { width: 30px; height: 18px; border-radius: var(--r-full); background: var(--border-strong); position: relative; transition: background var(--t-base) var(--ease-out); }
110
+ .switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-strong); transition: transform var(--t-base) var(--ease-out); }
111
+ .switch[aria-checked="true"] .track { background: var(--accent); }
112
+ .switch[aria-checked="true"] .track::after { transform: translateX(12px); }
113
+ .check { width: 18px; height: 18px; flex: none; border: 1.5px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); display: inline-grid; place-items: center; padding: 0; transition: background var(--t-fast), border-color var(--t-fast); }
114
+ .check svg.i { width: 12px; height: 12px; stroke-width: 2.8; color: var(--on-accent); opacity: 0; transition: opacity var(--t-fast); }
115
+ .check[aria-checked="true"] { background: var(--accent); border-color: var(--on-accent); }
116
+ .check[aria-checked="true"] svg.i { opacity: 1; }
117
+ .code { font-family: var(--mono); font-size: 12px; line-height: 1.6; background: var(--sunken); border-radius: var(--r-md); padding: var(--s2) var(--s3); margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
118
+ .link { border: 0; background: none; padding: 0; color: var(--accent-text); font-size: inherit; font-weight: 500; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
119
+ .link:hover { text-decoration-color: var(--accent-line); }
120
+ .steplink { border: 0; background: var(--sunken); color: var(--text-2); font-size: 11px; font-weight: 600; height: 18px; padding: 0 6px; border-radius: var(--r-sm); transition: background var(--t-fast), color var(--t-fast); }
121
+ .steplink:hover { background: var(--accent); color: var(--on-accent); }
122
+ .empty { padding: var(--s6) var(--s4); text-align: center; color: var(--text-3); font-size: var(--fs-sm); }
123
+ .search { display: flex; align-items: center; gap: var(--s2); height: 34px; padding: 0 var(--s3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--hover); color: var(--text-3); transition: border-color var(--t-fast), background var(--t-fast); }
124
+ .search:focus-within { background: var(--surface); border-color: var(--border-strong); box-shadow: var(--focus); }
125
+ .search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: var(--fs-sm); color: var(--text); }
126
+ .note { display: flex; gap: var(--s2); padding: var(--s3); border-radius: var(--r-md); background: var(--card); border: 1px solid var(--border); font-size: var(--fs-sm); }
127
+ .note svg.i { color: var(--t); margin-top: 2px; }
128
+
129
+ /* ═════════════════ 4. Shell ═════════════════
130
+ top bar / [ flows | stage + transport + review dock | current step ]. Each piece of information has one home. */
131
+ .app { height: 100vh; display: grid; grid-template-rows: var(--topbar-h) minmax(0, 1fr) var(--foot-h); }
132
+ .topbar { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); border-bottom: 1px solid var(--border); min-width: 0; }
133
+ .brand { display: flex; align-items: center; gap: var(--s2); font-family: var(--sign); font-weight: 800; font-synthesis: none; text-transform: uppercase; letter-spacing: .02em; font-size: 15px; flex: none; }
134
+ .brand .logo { width: 22px; height: 22px; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); border: 1.5px solid var(--on-accent); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
135
+ .topbar .sep { width: 1px; height: 18px; background: var(--border); flex: none; }
136
+ .topbar .product { margin: 0; font-size: var(--fs-md); font-weight: 600; flex: none; }
137
+ .topbar .ref { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2); padding: 2px 6px; border-radius: var(--r-sm); background: var(--sunken); flex: none; }
138
+ .topbar .commit { color: var(--text-2); font-size: var(--fs-sm); min-width: 0; }
139
+ .topbar .grow { flex: 1; }
140
+ .foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); padding: 0 var(--s4); border-top: 1px solid var(--border); background: var(--surface); font-size: 11px; line-height: 1; color: var(--text-3); min-width: 0; }
141
+ .foot a { color: inherit; text-decoration: none; }
142
+ .foot a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
143
+ .body { display: grid; min-height: 0; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--insp-w); grid-template-rows: minmax(240px, 1fr) auto auto;
144
+ grid-template-areas: "side stage insp" "side transport insp" "side dock insp"; }
145
+ .side { grid-area: side; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
146
+ .stage { grid-area: stage; }
147
+ .transport { grid-area: transport; }
148
+ .dock { grid-area: dock; height: var(--dock-h); }
149
+ .insp { grid-area: insp; border-left: 1px solid var(--border); min-height: 0; overflow-y: auto; overflow-x: hidden; }
150
+
151
+ /* ═════════════════ 5. Sidebar: flows and their steps ═════════════════ */
152
+ .side-tools { padding: var(--s3); }
153
+ .side-list { flex: 1; min-height: 0; overflow: auto; padding: 0 var(--s2) var(--s3); }
154
+ .gh { display: flex; align-items: center; gap: 6px; width: 100%; padding: var(--s2) var(--s2) var(--s1); border: 0; background: none; color: var(--text-3); font-size: var(--fs-xs); font-weight: 600; text-align: left; }
155
+ .gh svg.i { width: 14px; height: 14px; transition: transform var(--t-base) var(--ease-out); }
156
+ .gh[aria-expanded="false"] svg.i { transform: rotate(-90deg); }
157
+ .gh .n { color: var(--text-4); }
158
+ .uc { display: flex; align-items: flex-start; gap: var(--s2); width: 100%; padding: var(--s2); border: 0; border-radius: var(--r-md); background: none; text-align: left; transition: background var(--t-fast); }
159
+ .uc:hover { background: var(--hover); }
160
+ .uc[aria-current="true"] { background: var(--sunken); }
161
+ .uc .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
162
+ .uc .t { font-weight: 600; }
163
+ .uc .m { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
164
+ .steps { list-style: none; margin: 2px 0 6px; padding: 0 0 0 10px; position: relative; }
165
+ .steps::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 1px; background: var(--border); }
166
+ .st { display: flex; align-items: center; gap: var(--s2); min-height: 30px; padding: 3px 6px; border-radius: var(--r-md); font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; position: relative; transition: background var(--t-fast), color var(--t-fast); }
167
+ .st:hover { background: var(--hover); color: var(--text); }
168
+ .st[aria-current="step"] { color: var(--text); font-weight: 600; background: var(--accent-soft); }
169
+ .st .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--text-3); background: var(--surface); border: 1px solid var(--border-strong); flex: none; position: relative; z-index: 1; font-variant-numeric: tabular-nums; transition: background var(--t-base), color var(--t-base), border-color var(--t-base); }
170
+ .st.done .n { background: var(--sunken); }
171
+ .st[aria-current="step"] .n { background: var(--accent); border-color: var(--on-accent); color: var(--on-accent); }
172
+ .st .lbl { flex: 1; min-width: 0; }
173
+ .st .chg { font-size: 11px; font-weight: 600; color: var(--t); flex: none; }
174
+ .st .check { width: 16px; height: 16px; }
175
+
176
+ /* ═════════════════ 6. Stage ═════════════════ */
177
+ .stage { position: relative; min-height: 0; overflow: hidden; background-color: var(--bg); background-image: radial-gradient(var(--canvas-dot) 1px, transparent 1px); background-size: 20px 20px; }
178
+ .stage svg.canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
179
+ .caption { position: absolute; top: var(--s4); left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); display: flex; align-items: center; gap: var(--s2); padding: 6px 12px 6px 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); font-size: var(--fs-sm); z-index: 2; transition: opacity var(--t-base) var(--ease-out); }
180
+ .caption .leg { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 700; color: var(--lc); background: var(--surface); border: 1px solid var(--lc); flex: none; white-space: nowrap; }
181
+ .caption .leg.req { --lc: var(--req-text); --lc-soft: var(--req-soft); }
182
+ .caption .leg.res { --lc: var(--res); --lc-soft: var(--res-soft); }
183
+ .caption .leg.int { --lc: var(--int); --lc-soft: var(--int-soft); }
184
+ .caption .leg.idle { --lc: var(--text-3); --lc-soft: var(--sunken); }
185
+ .caption .txt { min-width: 0; }
186
+ .caption .txt.mono { font-size: 12px; }
187
+ .caption.swap { opacity: 0; }
188
+ .stage.in-detail .caption { left: auto; right: var(--s4); transform: none; max-width: calc(100% - 330px); }
189
+ .crumbs { position: absolute; top: var(--s4); left: var(--s4); z-index: 3; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 4px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); font-size: var(--fs-sm); }
190
+ .crumbs .back { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 6px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); transition: background var(--t-fast), color var(--t-fast); }
191
+ .crumbs .back:hover { background: var(--accent); border-color: var(--on-accent); color: var(--on-accent); }
192
+ .crumbs .back svg.i { width: 14px; height: 14px; }
193
+ .crumbs .here { font-weight: 700; }
194
+ .crumbs .sub { color: var(--text-3); }
195
+ .hidden-note { position: absolute; left: var(--s4); bottom: var(--s3); font-size: var(--fs-xs); color: var(--text-3); background: var(--card); padding: 2px 8px; border-radius: var(--r-sm); border: 1px solid var(--border); }
196
+ /* architecture nodes */
197
+ .nd .box { fill: var(--card); stroke: var(--border-strong); stroke-width: 1.25; transition: stroke var(--t-base), stroke-width var(--t-base); }
198
+ .nd .ibox { fill: var(--surface); stroke: var(--border); stroke-width: 1; transition: fill var(--t-base); }
199
+ .nd .ico { fill: none; stroke: var(--text-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke var(--t-base); }
200
+ .nd .nm { font-size: 14px; font-weight: 600; fill: var(--text); }
201
+ .nd .kd { font-size: 11px; fill: var(--text-3); }
202
+ .nd.has-detail { cursor: pointer; }
203
+ .nd.has-detail:hover .box { stroke: var(--accent-line); }
204
+ .nd .open { fill: none; stroke: var(--text-4); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke var(--t-fast); }
205
+ .nd.has-detail:hover .open { stroke: var(--accent-line); }
206
+ /* not on this flow: dimmed by colour (text stays >= 4.5:1), not by opacity */
207
+ .nd.off .box, .it.off .box { fill: var(--surface); stroke: var(--border); }
208
+ .nd.off .ibox { fill: var(--surface); } .nd.off .ico, .nd.off .open { stroke: var(--text-4); }
209
+ .nd.off .nm, .it.off .t1 { fill: var(--text-3); font-weight: 500; } .nd.off .kd, .it.off .t2 { fill: var(--text-4); }
210
+ .nd.visited .box, .it.visited .box { stroke: var(--trail-grey); }
211
+ .nd.active .box, .it.active .box, .it.hitcard .box { stroke: var(--text); stroke-width: 2; }
212
+ .nd.active .ibox { fill: var(--accent); stroke: var(--on-accent); } .nd.active .ico { stroke: var(--on-accent); }
213
+ .nd.working .box, .it.working .box { stroke: var(--int); stroke-width: 2; }
214
+ .nd.working .ibox { fill: var(--int-soft); } .nd.working .ico { stroke: var(--int); }
215
+ .nd:focus-visible, .it:focus-visible { box-shadow: none; }
216
+ .nd:focus-visible .box, .it:focus-visible .box { stroke: var(--focus-ring); stroke-width: 2.25; }
217
+ /* change tags (opaque, one style everywhere) */
218
+ .tagbg { fill-opacity: 1; stroke-width: 1; }
219
+ .tagtx { font-size: 11px; font-weight: 700; text-anchor: middle; }
220
+ .chg-added .tagbg { fill: var(--success-bg); stroke: var(--success-border); } .chg-added .tagtx { fill: var(--success); }
221
+ .chg-modified .tagbg { fill: var(--warning-bg); stroke: var(--warning-border); } .chg-modified .tagtx { fill: var(--warning); }
222
+ .chg-removed .tagbg { fill: var(--danger-bg); stroke: var(--danger-border); } .chg-removed .tagtx { fill: var(--danger); }
223
+ /* links and wires */
224
+ .lk, .wr { fill: none; stroke: var(--border-strong); stroke-width: 1.5; transition: stroke var(--t-slow), stroke-width var(--t-slow), opacity var(--t-slow); }
225
+ .lk.off, .wr.off { opacity: .32; }
226
+ .lk.visited, .wr.visited { stroke: var(--trail-grey); stroke-width: 2; }
227
+ .wr.stubwire { stroke-dasharray: 3 4; }
228
+ .wr.chg-added:not(.visited) { stroke: var(--success-border); stroke-width: 2; }
229
+ .wr.chg-modified:not(.visited) { stroke: var(--warning-border); stroke-width: 2; }
230
+ /* inside a component */
231
+ .it .box { fill: var(--card); stroke: var(--border-strong); stroke-width: 1.25; transition: stroke var(--t-base), stroke-width var(--t-base); }
232
+ .it.part, .it.table, .it.endpoint, .it.stub.nav { cursor: pointer; }
233
+ .it.part:hover .box, .it.table:hover .box, .it.endpoint:hover .box, .it.stub.nav:hover .box { stroke: var(--accent-line); }
234
+ .it.stub .box { fill: var(--surface); stroke-dasharray: 4 3; }
235
+ .it.sel .box { stroke: var(--focus-ring); stroke-width: 2.25; }
236
+ .it .t1 { font-size: 14px; font-weight: 600; fill: var(--text); }
237
+ .it .t2 { font-size: 11px; fill: var(--text-3); }
238
+ .it.stub .t1 { font-size: 14px; text-anchor: middle; } .it.stub .t2 { text-anchor: middle; }
239
+ .it .t1.mono { font-family: var(--mono); }
240
+ .it .hr { stroke: var(--border); }
241
+ .it .colname { font-size: 11.5px; fill: var(--text-2); font-family: var(--mono); }
242
+ .it .coltype { font-size: 11px; fill: var(--text-4); font-family: var(--mono); text-anchor: end; }
243
+ .it .collab { font-size: 11px; fill: var(--text-4); font-family: var(--mono); }
244
+ .it .colname.col-hit { fill: var(--accent-text); font-weight: 700; }
245
+ .it .mth rect { fill: var(--surface); stroke: var(--border); } .it .mth text { font-size: 11px; font-weight: 700; fill: var(--text-2); text-anchor: middle; font-family: var(--mono); }
246
+ .it .opb rect { fill: var(--board); } .it .opb text { fill: var(--board-ink); font-size: 11px; font-weight: 700; text-anchor: middle; }
247
+ .colh { font-size: 11px; font-weight: 700; fill: var(--text-4); text-anchor: middle; }
248
+ .xchip rect { fill: var(--card); stroke: var(--int); stroke-width: 1; } .xchip text { font-size: 11px; fill: var(--int); font-family: var(--mono); text-anchor: middle; }
249
+ /* data in motion */
250
+ .flowline { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1 9; animation: march .5s linear infinite; }
251
+ .trail { fill: none; stroke-width: 2.5; stroke-linecap: round; }
252
+ .flowline.req, .trail.req { stroke: var(--req); } .flowline.res, .trail.res { stroke: var(--res); } .flowline.int, .trail.int { stroke: var(--int); }
253
+ .trail.past { opacity: .28; }
254
+ @keyframes march { from { stroke-dashoffset: 10; } to { stroke-dashoffset: 0; } }
255
+ .pk .core { stroke: var(--surface); stroke-width: 2.5; }
256
+ .pk .halo { opacity: .25; animation: halo 1.1s var(--ease-out) infinite; }
257
+ .pk.req .core, .pk.req .halo { fill: var(--req); } .pk.res .core, .pk.res .halo { fill: var(--res); } .pk.int .core, .pk.int .halo { fill: var(--int); }
258
+ @keyframes halo { from { r: 7px; opacity: .35; } to { r: 18px; opacity: 0; } }
259
+ .ring { fill: none; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ring .55s var(--ease-out) forwards; }
260
+ .ring.req { stroke: var(--req); } .ring.res { stroke: var(--res); } .ring.int { stroke: var(--int); }
261
+ @keyframes ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.14); } }
262
+ .wbar-bg { fill: var(--int-soft); } .wbar { fill: var(--int); }
263
+ .zoom { fill: var(--surface); stroke: var(--accent-line); stroke-width: 1.5; }
264
+ .canvas.fade-in { animation: stagein var(--t-slow) var(--ease-out); }
265
+ @keyframes stagein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
266
+
267
+ /* ═════════════════ 7. Transport ═════════════════ */
268
+ .transport { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); border-top: 1px solid var(--border); background: var(--surface); min-width: 0; }
269
+ .scrub { flex: 1; display: flex; gap: 3px; min-width: 120px; height: 28px; align-items: center; }
270
+ .seg-step { flex: 1; height: 6px; border-radius: 1px; background: var(--sunken); border: 0; padding: 0; position: relative; overflow: hidden; transition: height var(--t-fast); }
271
+ .seg-step:hover { height: 10px; }
272
+ .seg-step i { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--accent); border-radius: 1px; }
273
+ .seg-step.done i { width: 100%; background: var(--accent-done); }
274
+ .counter { font-size: var(--fs-sm); color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
275
+
276
+ /* ═════════════════ 8. Inspector: the current step (or the item picked inside a component) ═════════════════ */
277
+ .ih { padding: var(--s5) var(--s5) var(--s3); }
278
+ .eyebrow { font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); margin: 0 0 6px; }
279
+ .lead { font-size: 15px; line-height: 1.65; color: var(--text); margin: 0; }
280
+ .isec { padding: var(--s3) var(--s5); }
281
+ .isec h2 { margin: 0 0 var(--s2); font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); }
282
+ .isec p { margin: 0; }
283
+ .ev { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 12px; }
284
+ .ev li { display: flex; align-items: flex-start; gap: var(--s2); padding: 4px 0; border-bottom: 1px dashed var(--border); color: var(--text-2); }
285
+ .ev li:last-child { border-bottom: 0; }
286
+ .ev li span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
287
+ .ev li.hit { color: var(--text); }
288
+ .kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px var(--s3); font-size: var(--fs-sm); margin: 8px 0 0; }
289
+ .kv dt { color: var(--text-3); font-family: var(--mono); }
290
+ .kv dd { margin: 0; min-width: 0; font-family: var(--mono); overflow-wrap: anywhere; }
291
+ .rel { list-style: none; margin: 0; padding: 0; }
292
+ .rel li { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px dashed var(--border); }
293
+ .rel li:last-child { border-bottom: 0; }
294
+ .rel .who { font-size: var(--fs-sm); color: var(--text); }
295
+ .rel .how { font-size: 12px; color: var(--text-3); overflow-wrap: anywhere; }
296
+ .xf { margin: 0 0 var(--s2); }
297
+ .xf .at { font-size: var(--fs-sm); font-weight: 600; }
298
+ .xf .io { font-family: var(--mono); font-size: 12px; color: var(--int); }
299
+ .xf .map { font-family: var(--mono); font-size: 12px; color: var(--text-2); margin: 2px 0 0; padding: 0; list-style: none; }
300
+ .before { font-size: var(--fs-sm); }
301
+ .before dt { font-family: var(--font); }
302
+ .legend { display: grid; grid-template-columns: 28px 1fr; gap: 10px var(--s3); align-items: center; font-size: var(--fs-sm); color: var(--text-2); }
303
+ .legend svg { display: block; }
304
+ .gone { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
305
+ .gone li { padding: 4px 0; color: var(--text-2); }
306
+
307
+ /* ═════════════════ 9. Responsive and reduced motion ═════════════════ */
308
+ @media (max-width: 1280px) { :root { --side-w: 248px; --insp-w: 304px; } }
309
+ @media (max-width: 1100px) {
310
+ .app { height: auto; min-height: 100vh; }
311
+ .body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 460px auto auto auto; grid-template-areas: "side" "stage" "transport" "insp" "dock"; }
312
+ .side { border-right: 0; border-bottom: 1px solid var(--border); }
313
+ .side-list { max-height: 260px; }
314
+ .insp { border-left: 0; border-top: 1px solid var(--border); overflow: visible; }
315
+ .stage.in-detail .caption { max-width: calc(100% - 32px); top: 64px; }
316
+ .topbar .commit { display: none; }
317
+ }
318
+ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }