@polymorphism-tech/morph-spec 10.9.0 → 10.10.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.
@@ -1,47 +1,35 @@
1
+ document.documentElement.classList.add('js');
1
2
  const REFS = JSON.parse(document.getElementById('refs').textContent);
2
3
  const STORE = `morph-view:${document.body.dataset.key}`;
3
4
  const load = () => { try { return JSON.parse(localStorage.getItem(STORE)) ?? {}; } catch { return {}; } };
4
5
  const save = (v) => { try { localStorage.setItem(STORE, JSON.stringify(v)); } catch { /* the page works without it */ } };
5
6
 
7
+ const panels = [...document.querySelectorAll('.panel')];
8
+ const tabs = [...document.querySelectorAll('.tabs a')];
9
+ function openPanel(id) {
10
+ panels.forEach((p) => p.classList.toggle('on', p.id === id));
11
+ tabs.forEach((a) => {
12
+ const on = a.getAttribute('href') === `#${id}`;
13
+ a.classList.toggle('on', on);
14
+ if (on) a.setAttribute('aria-current', 'page'); else a.removeAttribute('aria-current');
15
+ });
16
+ }
6
17
  function jump() {
7
18
  const id = decodeURIComponent(location.hash.slice(1));
8
- const el = id && document.getElementById(id);
19
+ const el = id ? document.getElementById(id) : null;
20
+ const panel = el?.closest('.panel') ?? panels[0];
21
+ openPanel(panel.id);
9
22
  if (!el) return;
23
+ if (el === panel) { document.querySelector('.tabs').scrollIntoView(); return; }
10
24
  if (el.tagName === 'DETAILS') el.open = true;
11
25
  el.closest('details')?.setAttribute('open', '');
12
- clearFilter(el);
26
+ el.scrollIntoView({ block: 'start' });
13
27
  el.classList.remove('flash');
14
28
  void el.offsetWidth;
15
29
  el.classList.add('flash');
16
30
  }
17
31
  addEventListener('hashchange', jump);
18
32
 
19
- const links = [...document.querySelectorAll('.side a')];
20
- const sections = links.map((a) => document.querySelector(a.getAttribute('href'))).filter(Boolean);
21
- const spy = new IntersectionObserver((entries) => {
22
- for (const e of entries) {
23
- if (e.isIntersecting) links.forEach((a) => a.classList.toggle('on', a.getAttribute('href') === `#${e.target.id}`));
24
- }
25
- }, { rootMargin: '-15% 0px -75% 0px' });
26
- sections.forEach((s) => spy.observe(s));
27
-
28
- const run = new IntersectionObserver((entries, o) => {
29
- for (const e of entries) if (e.isIntersecting) { e.target.classList.add('run'); o.unobserve(e.target); }
30
- }, { threshold: 0.4 });
31
- document.querySelectorAll('.machine').forEach((m) => run.observe(m));
32
-
33
- const items = [...document.querySelectorAll('#cenarios .line > li')];
34
- const buttons = [...document.querySelectorAll('[data-filter]')];
35
- function applyFilter(key) {
36
- items.forEach((li) => { li.hidden = key !== 'todos' && !li.dataset.tags.split(' ').includes(key); });
37
- buttons.forEach((b) => b.setAttribute('aria-pressed', String(b.dataset.filter === key)));
38
- }
39
- function clearFilter(el) { if (el.hidden) applyFilter('todos'); }
40
- buttons.forEach((b) => b.addEventListener('click', () => {
41
- applyFilter(b.dataset.filter);
42
- if (b.dataset.jump !== undefined) document.getElementById('cenarios').scrollIntoView();
43
- }));
44
-
45
33
  const peek = document.getElementById('peek');
46
34
  function showPeek(a) {
47
35
  const text = REFS[a.dataset.ref];
@@ -108,6 +96,11 @@ tray.querySelector('.copy').addEventListener('click', async (e) => {
108
96
  try { await navigator.clipboard.writeText(text); e.target.textContent = 'Copiado'; } catch { prompt('Copie o texto', text); }
109
97
  setTimeout(() => { e.target.textContent = 'Copiar resposta'; }, 1800);
110
98
  });
99
+ document.querySelectorAll('[data-copy]').forEach((b) => b.addEventListener('click', async () => {
100
+ const label = b.textContent;
101
+ try { await navigator.clipboard.writeText(b.dataset.copy); b.textContent = 'Copiado'; } catch { prompt('Copie o texto', b.dataset.copy); }
102
+ setTimeout(() => { b.textContent = label; }, 1800);
103
+ }));
111
104
  tray.querySelector('.clear').addEventListener('click', () => {
112
105
  for (const li of asks) if (li.querySelector('.toggle').getAttribute('aria-pressed') === 'true') li.querySelector('.toggle').click();
113
106
  });
@@ -1,144 +1,240 @@
1
1
  * { box-sizing:border-box; }
2
- html { scroll-behavior:smooth; scroll-padding-top:24px; }
3
- body { margin:0; background:var(--paper); color:var(--ink); font:16px/1.6 var(--text); }
4
- a { color:var(--route); text-underline-offset:2px; }
5
- :focus-visible { outline:2px solid var(--route); outline-offset:2px; border-radius:3px; }
6
- code { font:.88em var(--code); background:color-mix(in srgb, var(--route) 10%, transparent); padding:.08em .32em; border-radius:4px; overflow-wrap:anywhere; }
7
- pre { background:var(--panel); border:1px solid var(--rule); border-radius:8px; padding:12px; overflow-x:auto; }
2
+ html { scroll-padding-top:72px; }
3
+ body { margin:0; background:var(--paper); color:var(--ink); font:17px/1.6 var(--text); -webkit-font-smoothing:antialiased; }
4
+ a { color:var(--route); text-underline-offset:3px; }
5
+ :focus-visible { outline:2px solid var(--route); outline-offset:2px; border-radius:4px; }
6
+ code { font:.86em var(--code); color:var(--dim); background:color-mix(in srgb, var(--ink) 6%, transparent); padding:.1em .34em; border-radius:4px; overflow-wrap:anywhere; }
7
+ .plain code { font:inherit; color:inherit; background:none; padding:0; }
8
+ pre { background:var(--panel); border:1px solid var(--rule); border-radius:6px; padding:14px; overflow-x:auto; }
8
9
  pre code { background:none; padding:0; }
9
- h1, h2, h3 { font-family:var(--display); font-weight:600; line-height:1.15; margin:0; }
10
+ h1, h2, h3, h4 { font-family:var(--display); font-weight:600; font-stretch:82%; line-height:1.15; margin:0; }
10
11
  button { font:inherit; color:inherit; cursor:pointer; }
12
+ p { margin:0; }
13
+ ul, ol { list-style:none; margin:0; padding:0; }
14
+ small { color:var(--faint); font-size:14px; }
11
15
 
12
- .top { padding:40px 24px 28px; max-width:1180px; margin:0 auto; }
13
- .kind { color:var(--faint); font-size:14px; margin:0 0 6px; }
14
- h1 { font-size:clamp(30px, 5.4vw, 54px); letter-spacing:-.01em; overflow-wrap:anywhere; }
15
- .ask { color:var(--dim); max-width:72ch; margin:10px 0 0; }
16
-
17
- .route { list-style:none; margin:30px 0 0; padding:0; display:flex; position:relative; }
18
- .route::before, .route::after { content:""; position:absolute; left:9px; right:9px; top:8px; height:4px; border-radius:2px; background:var(--rule); }
19
- .route::after { background:var(--route); right:auto; width:calc((100% - 18px) * var(--done)); transform-origin:left; animation:draw 1s cubic-bezier(.3,.7,.2,1) both; }
20
- @keyframes draw { from { transform:scaleX(0); } }
21
- .stop { flex:1; position:relative; z-index:1; font-size:14px; color:var(--faint); padding-top:30px; min-width:0; }
22
- .stop:last-child { flex:0 0 auto; text-align:right; }
23
- .stop::before { content:""; position:absolute; top:0; left:0; width:20px; height:20px; border-radius:50%; background:var(--paper); border:4px solid var(--rule); }
24
- .stop:last-child::before { left:auto; right:0; }
25
- .stop.done { color:var(--dim); } .stop.done::before { border-color:var(--route); background:var(--route); }
26
- .stop.now { color:var(--ink); font-weight:600; } .stop.now::before { border-color:var(--route); box-shadow:0 0 0 0 var(--route); animation:pulse 2.4s ease-out 1s 3; }
27
- @keyframes pulse { to { box-shadow:0 0 0 12px transparent; } }
28
- .stop small { display:block; font-weight:400; color:var(--faint); font-size:13px; }
29
-
30
- .shell { display:grid; grid-template-columns:176px minmax(0, 1fr); gap:40px; max-width:1180px; margin:0 auto; padding:0 24px 120px; align-items:start; }
31
- .side { position:sticky; top:16px; }
32
- .side a { display:block; padding:6px 0 6px 12px; color:var(--dim); text-decoration:none; font-size:15px; border-left:3px solid var(--rule); }
33
- .side a.on { color:var(--ink); font-weight:600; border-left-color:var(--route); }
34
- .side a b { float:right; font-family:var(--display); font-weight:600; background:var(--sign); color:var(--on-sign); border-radius:9px; padding:0 7px; font-size:13px; line-height:18px; margin-top:3px; }
35
-
36
- section { padding-top:44px; max-width:860px; }
37
- section:first-child { padding-top:0; }
38
- h2 { font-size:26px; margin-bottom:6px; }
39
- .sub { color:var(--dim); margin:0 0 18px; max-width:68ch; }
40
- h3 { font-size:17px; margin:26px 0 8px; }
41
- .prose p { margin:0 0 10px; max-width:72ch; }
42
- .prose ul { margin:0 0 10px; padding-left:20px; max-width:72ch; }
43
- .prose li { margin:4px 0; }
44
- .empty { color:var(--faint); }
16
+ .top, .tabs > div, main { max-width:880px; margin:0 auto; padding-left:24px; padding-right:24px; }
17
+
18
+ .top { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 400px); gap:20px 40px; align-items:end; padding-top:32px; padding-bottom:22px; }
19
+ .kind { grid-column:1; align-self:end; color:var(--faint); font-size:14px; margin-bottom:-18px; }
20
+ h1 { grid-column:1; font-size:26px; font-stretch:88%; overflow-wrap:anywhere; }
21
+
22
+ .route { grid-column:2; grid-row:1 / span 2; display:flex; }
23
+ .route li { flex:1; position:relative; display:flex; flex-direction:column; align-items:center; gap:7px; text-align:center; font-size:13px; line-height:1.25; color:var(--faint); min-width:0; }
24
+ .route li + li::before { content:""; position:absolute; top:7px; right:50%; width:100%; height:4px; background:var(--rule); }
25
+ .route li.done + li::before { background:var(--route); }
26
+ .route i { position:relative; z-index:1; width:18px; height:18px; border-radius:50%; background:var(--paper); border:4px solid var(--rule); }
27
+ .route .done i { background:var(--route); border-color:var(--route); }
28
+ .route .now i { border-color:var(--route); box-shadow:0 0 0 5px color-mix(in srgb, var(--route) 22%, transparent); }
29
+ .route .done { color:var(--dim); }
30
+ .route .now { color:var(--ink); font-weight:600; }
31
+ .route small { display:block; font-weight:400; font-size:12px; }
32
+
33
+ .tabs { position:sticky; top:0; z-index:10; background:color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter:blur(8px); border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
34
+ .tabs > div { display:flex; gap:26px; overflow-x:auto; scrollbar-width:none; }
35
+ .tabs a { padding:13px 0 10px; color:var(--dim); text-decoration:none; font:600 18px/1.2 var(--display); font-stretch:82%; white-space:nowrap; border-bottom:4px solid transparent; }
36
+ .tabs a:hover { color:var(--ink); }
37
+ .tabs a.on { color:var(--ink); border-bottom-color:var(--route); }
38
+ .tabs a b { margin-left:7px; background:var(--ink); color:var(--paper); border-radius:999px; padding:1px 8px; font:600 13px/1.5 var(--text); vertical-align:2px; }
39
+
40
+ main { padding-top:36px; padding-bottom:140px; }
41
+ .js .panel:not(.on) { display:none; }
42
+ .panel + .panel { margin-top:56px; }
43
+ .js .panel + .panel { margin-top:0; }
44
+ .panel > h2 { font-size:28px; margin:52px 0 14px; scroll-margin-top:72px; }
45
+ .panel > h2:first-child { margin-top:0; }
46
+ .sub { color:var(--dim); font-size:16px; max-width:62ch; margin:-6px 0 18px; }
47
+ .tip { color:var(--faint); font-size:14px; margin-top:12px; }
48
+ .calm { display:flex; gap:12px; align-items:center; color:var(--dim); border-left:4px solid var(--ok); padding:4px 0 4px 16px; }
49
+ .prose { max-width:66ch; }
50
+ .prose p, .prose ul, .prose pre, .prose .scroll-x { margin:0 0 12px; }
51
+ .prose ul { list-style:disc; padding-left:22px; }
52
+ .prose li { margin:6px 0; }
53
+ .prose h4 { font-size:19px; margin:18px 0 6px; }
54
+ .prose code { background:none; padding:0; font-size:.88em; }
55
+ .prose ul.sentences { list-style:none; padding:0; }
56
+ .sentences li { margin:0 0 12px; padding-left:16px; border-left:2px solid var(--rule); line-height:1.6; }
57
+ .sentences li:first-child { border-left-color:var(--route); color:var(--ink); }
58
+ .settled .toggle, .settled .tip { display:none; }
59
+ .settled .live .toggle { display:inline-block; }
60
+
61
+ .origin { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:4px 24px; font-size:14px; color:var(--faint); }
62
+ .origin code { background:none; padding:0; }
63
+ .kind code { background:none; padding:0; margin-left:8px; }
64
+ .status { display:flex; flex-wrap:wrap; gap:14px 24px; align-items:center; justify-content:space-between; }
65
+ .act { flex:none; background:var(--on-sign); color:var(--sign); border:0; border-radius:6px; padding:10px 18px; min-height:44px; font:600 17px var(--display); font-stretch:86%; }
66
+ .act:hover { filter:brightness(1.25); }
67
+ .facts { margin-top:8px; padding-top:12px; border-top:1px solid var(--rule); }
68
+ #andamento > h2 { font-size:28px; margin:52px 0 14px; }
69
+ #andamento > h3 { font-size:20px; margin:24px 0 8px; }
70
+
71
+ article.adr { border-top:1px solid var(--rule); padding:16px 0 6px; scroll-margin-top:72px; }
72
+ article.adr:last-of-type { border-bottom:1px solid var(--rule); }
73
+ article.adr h3 { display:flex; flex-wrap:wrap; gap:6px 12px; align-items:baseline; font-family:var(--text); font-stretch:100%; }
74
+ article.adr dl { display:grid; grid-template-columns:7em minmax(0, 1fr); gap:8px 16px; margin:14px 0 12px; max-width:68ch; }
75
+ article.adr dt { font:600 16px/1.6 var(--display); font-stretch:82%; color:var(--faint); }
76
+ article.adr dd { margin:0; font-size:17px; line-height:1.5; }
77
+ article.adr dd:first-of-type { font-weight:600; }
78
+ article.adr .fold { border:0; }
79
+ article.adr .fold summary { font-weight:400; font-size:15px; color:var(--route); padding:4px 0 10px; }
45
80
  .scroll-x { overflow-x:auto; }
46
81
  table { border-collapse:collapse; width:100%; font-size:15px; }
47
- th { text-align:left; font-weight:600; color:var(--dim); border-bottom:2px solid var(--rule); padding:6px 12px 6px 0; }
48
- td { border-bottom:1px solid var(--rule); padding:8px 12px 8px 0; vertical-align:top; }
49
-
50
- .outcome { font-family:var(--display); font-size:clamp(22px, 3.2vw, 31px); line-height:1.25; margin:0 0 20px; max-width:30em; }
51
- .numbers { display:flex; flex-wrap:wrap; gap:12px 40px; margin:22px 0 28px; padding:0; list-style:none; }
52
- .numbers li { font-size:14px; color:var(--dim); max-width:9.5em; line-height:1.3; }
53
- .numbers a { color:inherit; text-decoration:none; display:block; }
54
- .numbers b { display:block; font:600 42px/1 var(--display); color:var(--ink); margin-bottom:4px; font-variant-numeric:tabular-nums; }
55
- .numbers .alert b { color:var(--bad); }
56
-
57
- .chart { margin:18px 0 0; }
58
- .chart h3 { margin:0 0 8px; font-size:15px; font-family:var(--text); color:var(--dim); font-weight:600; }
59
- .seg { display:flex; gap:2px; height:22px; }
60
- .seg button { flex:var(--n) 1 0; min-width:6px; border:0; padding:0; background:var(--c); transform-origin:left; animation:grow .7s .25s cubic-bezier(.3,.7,.2,1) both; }
61
- .seg button:first-child { border-radius:4px 0 0 4px; } .seg button:last-child { border-radius:0 4px 4px 0; }
62
- @keyframes grow { from { transform:scaleX(0); } }
63
- .legend { list-style:none; display:flex; flex-wrap:wrap; gap:4px 16px; margin:8px 0 0; padding:0; font-size:14px; color:var(--dim); }
64
- .legend i { display:inline-block; width:10px; height:10px; border-radius:2px; background:var(--c); margin-right:6px; }
65
- .bars { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
66
- .bars li { display:grid; grid-template-columns:7.5em 1fr 2em; gap:8px; align-items:center; font-size:14px; color:var(--dim); }
67
- .bars button { all:unset; cursor:pointer; display:contents; }
68
- .bars span.track { height:10px; }
69
- .bars span.fill { display:block; height:100%; width:calc(var(--share) * 100%); min-width:4px; border-radius:0 4px 4px 0; background:var(--route); transform-origin:left; animation:grow .7s .35s cubic-bezier(.3,.7,.2,1) both; }
70
-
71
- .sign { background:var(--sign); color:var(--on-sign); border-radius:6px; padding:20px 22px; margin-bottom:18px; }
72
- .sign h3 { margin:0 0 4px; font-size:21px; }
73
- .sign p { margin:0; max-width:66ch; }
74
- .sign.clear { background:transparent; color:var(--dim); border:2px solid var(--rule); padding:12px 16px; }
75
- .sign.clear h3 { font-size:17px; color:var(--ink); }
76
- .sign code { background:rgba(0,0,0,.09); }
77
-
78
- .asks { list-style:none; margin:0; padding:0; }
79
- .asks > li { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:4px 16px; padding:12px 0; border-bottom:1px solid var(--rule); scroll-margin-top:24px; border-radius:4px; }
80
- .asks p { margin:0; }
81
- .asks .tag { color:var(--faint); font-size:14px; }
82
- .toggle { background:transparent; border:1px solid var(--rule); border-radius:6px; padding:5px 12px; min-height:36px; font-size:14px; color:var(--dim); align-self:start; white-space:nowrap; }
83
- .toggle:hover { border-color:var(--route); color:var(--ink); }
84
- .toggle[aria-pressed="true"] { background:var(--bad); border-color:var(--bad); color:var(--paper); }
85
- .note { grid-column:1 / -1; width:100%; min-height:62px; font:inherit; font-size:15px; color:var(--ink); background:var(--panel); border:1px solid var(--rule); border-radius:6px; padding:8px; }
86
-
87
- .filters { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px; }
88
- .filters button { background:transparent; border:1px solid var(--rule); border-radius:6px; padding:3px 10px; min-height:32px; font-size:14px; color:var(--dim); }
89
- .filters button[aria-pressed="true"] { border-color:var(--route); color:var(--ink); font-weight:600; }
90
-
91
- .line { list-style:none; margin:0; padding:0 0 0 7px; }
92
- .line > li { position:relative; padding:0 0 22px 28px; border-left:3px solid var(--route); scroll-margin-top:24px; }
93
- .line > li:last-child { border-left-color:transparent; padding-bottom:0; }
94
- .line > li::before { content:""; position:absolute; left:-10.5px; top:3px; width:18px; height:18px; border-radius:50%; background:var(--paper); border:3px solid var(--route); }
95
- .line > li[data-state="feito"]::before, .line > li[data-state="provado"]::before { background:var(--ok); border-color:var(--ok); }
96
- .line > li[data-state="bloqueado"]::before, .line > li[data-state="falha"]::before { background:var(--bad); border-color:var(--bad); }
97
- .line .id { font:600 15px var(--display); color:var(--route); margin-right:6px; }
98
- .line p { margin:0; max-width:70ch; }
99
- .tags { display:flex; flex-wrap:wrap; gap:4px 12px; font-size:14px; color:var(--faint); margin-top:4px; }
100
- .tags .warn { color:var(--warn); font-weight:600; } .tags .bad { color:var(--bad); font-weight:600; } .tags .ok { color:var(--ok); font-weight:600; }
101
- .evidence { font-size:14px; color:var(--dim); margin-top:4px; }
102
-
103
- details.adr { border-left:3px solid var(--rule); padding:0 0 0 14px; margin-bottom:12px; scroll-margin-top:24px; }
104
- details.adr[open] { border-left-color:var(--route); }
105
- details.adr summary { cursor:pointer; padding:6px 0; font:600 17px/1.3 var(--display); }
106
- details.adr summary small { font:400 14px var(--text); color:var(--faint); margin-left:6px; }
107
- .fold { margin-top:12px; } .fold summary { cursor:pointer; color:var(--dim); padding:6px 0; }
108
-
109
- .matrix { font-size:14px; }
110
- .matrix th, .matrix td { padding:5px 8px; text-align:center; }
111
- .matrix th:first-child { text-align:left; white-space:nowrap; }
112
- .matrix td a { display:block; width:14px; height:14px; margin:auto; border-radius:50%; background:var(--route); }
113
-
114
- .diagram { background:var(--panel); border:1px solid var(--rule); border-radius:6px; padding:12px; overflow-x:auto; margin-bottom:14px; }
82
+ th { text-align:left; font-weight:600; color:var(--dim); border-bottom:2px solid var(--ink); padding:8px 14px 8px 0; }
83
+ td { border-bottom:1px solid var(--rule); padding:10px 14px 10px 0; vertical-align:top; }
84
+
85
+ .ico { flex:none; width:24px; height:24px; border-radius:50%; display:inline-grid; place-items:center; font:700 13px/1 var(--text); font-style:normal; background:var(--rule); color:var(--dim); }
86
+ .ico.ok { background:var(--ok); color:var(--paper); }
87
+ .ico.warn { background:var(--warn); color:var(--paper); }
88
+ .ico.bad { background:var(--bad); color:var(--paper); }
89
+ .ico.info { background:var(--route); color:var(--paper); }
90
+ .ico.todo { background:var(--paper); border:4px solid var(--route); }
91
+ .pill { display:inline-block; font:600 13px/1.5 var(--text); padding:2px 10px; border-radius:999px; background:color-mix(in srgb, var(--ink) 8%, transparent); color:var(--dim); white-space:nowrap; }
92
+ .pill.ok { background:color-mix(in srgb, var(--ok) 14%, transparent); color:var(--ok); }
93
+ .pill.warn { background:color-mix(in srgb, var(--warn) 16%, transparent); color:var(--warn); }
94
+ .pill.bad { background:var(--bad); color:var(--paper); }
95
+ .pill.todo { background:none; padding-left:0; padding-right:0; color:var(--faint); font-weight:400; }
96
+ .id { font:600 14px var(--display); color:var(--faint); text-decoration:none; }
97
+ a.id { color:var(--route); }
98
+
99
+ .shift { display:grid; gap:0; margin-bottom:32px; }
100
+ .shift > div { display:grid; grid-template-columns:5.2em minmax(0, 1fr); position:relative; }
101
+ .shift .tag { position:relative; padding-left:26px; font:600 16px/1.6 var(--display); font-stretch:82%; color:var(--faint); }
102
+ .shift .tag::before { content:""; position:absolute; left:0; top:.36em; width:14px; height:14px; border-radius:50%; background:var(--paper); border:4px solid var(--rule); z-index:1; }
103
+ .shift .before { padding-bottom:22px; }
104
+ .shift .before::after { content:""; position:absolute; left:5px; top:.9em; bottom:-.9em; width:4px; background:linear-gradient(var(--rule), var(--route)); }
105
+ .shift .before p { color:var(--dim); font-size:18px; line-height:1.5; max-width:52ch; }
106
+ .shift .after .tag { color:var(--route); }
107
+ .shift .after .tag::before { background:var(--route); border-color:var(--route); }
108
+ .shift .after p { font-size:19px; line-height:1.5; font-weight:600; max-width:56ch; }
109
+ .shift.plain .before p { font-size:20px; }
110
+ .shift.plain .after .tag { padding-top:.5em; }
111
+ .shift.plain .after .tag::before { top:calc(.5em + .36em); }
112
+ .shift.plain .after p { font:600 clamp(31px, 5.4vw, 54px)/1.04 var(--display); font-stretch:78%; letter-spacing:-.005em; text-wrap:balance; max-width:17em; animation:arrive .7s cubic-bezier(.2,.7,.2,1) both; }
113
+ @keyframes arrive { from { opacity:0; transform:translateY(10px); } }
114
+
115
+ .status { border-left:4px solid var(--route); padding:2px 0 2px 16px; }
116
+ .status h2 { font-size:21px; }
117
+ .status p { color:var(--dim); font-size:16px; max-width:60ch; }
118
+ .status.ok { border-left-color:var(--ok); }
119
+ .status.wait { background:var(--sign); color:var(--on-sign); border:0; border-radius:6px; padding:20px 24px; outline:2px solid var(--on-sign); outline-offset:-7px; }
120
+ .status.wait h2 { font-size:27px; }
121
+ .status.wait p { color:inherit; font-size:17px; }
122
+ .status.wait .hint { font-weight:600; }
123
+ .status.wait a { color:inherit; }
124
+ .status.wait code { color:inherit; background:rgba(0,0,0,.1); }
125
+
126
+ .board { margin-top:36px; }
127
+ .stops { display:flex; padding-top:20px; overflow-x:auto; scrollbar-width:none; }
128
+ .stop { flex:1 0 44px; position:relative; display:flex; flex-direction:column; align-items:center; gap:8px; color:var(--dim); text-decoration:none; font:600 14px var(--display); }
129
+ .stop + .stop::after { content:""; position:absolute; top:9px; right:50%; width:100%; height:4px; background:color-mix(in srgb, var(--route) 40%, var(--rule)); }
130
+ .stop i { position:relative; z-index:1; width:22px; height:22px; border-radius:50%; background:var(--paper); border:4px solid var(--route); transition:transform .15s; animation:pop .35s cubic-bezier(.3,1.5,.5,1) both; animation-delay:calc(var(--i) * 55ms + 250ms); }
131
+ @keyframes pop { from { transform:scale(0); } }
132
+ .stop:hover i, .stop:focus-visible i { transform:scale(1.25); }
133
+ .stop.ok i { background:var(--ok); border-color:var(--ok); }
134
+ .stop.bad i { background:var(--bad); border-color:var(--bad); }
135
+ .stop.warn i { background:var(--warn); border-color:var(--warn); }
136
+ .stop.rung::before, .legend .rung i { content:""; width:11px; height:11px; background:var(--bad); border-radius:2px; transform:rotate(45deg); }
137
+ .stop.rung::before { position:absolute; top:-18px; }
138
+ .legend { display:flex; flex-wrap:wrap; gap:6px 28px; margin-top:16px; font-size:15px; color:var(--dim); }
139
+ .legend b { font:600 19px var(--display); color:var(--ink); }
140
+ .legend a { color:inherit; }
141
+ .legend .rung { display:flex; align-items:center; gap:8px; }
142
+ .legend .rung i { display:inline-block; }
143
+ .legend .rung b { color:var(--bad); }
144
+
145
+ .groups { display:grid; gap:26px; }
146
+ .group { border-left:4px solid var(--warn); padding-left:18px; }
147
+ .group.bad { border-left-color:var(--bad); }
148
+ .group-head { display:flex; gap:12px; align-items:center; margin-bottom:6px; }
149
+ .group .ico { background:none; position:relative; z-index:0; color:var(--paper); }
150
+ .group .ico::before { content:""; position:absolute; inset:2px; z-index:-1; border-radius:3px; transform:rotate(45deg); background:var(--warn); }
151
+ .group .ico.bad::before { background:var(--bad); }
152
+ .group h3 { font-size:22px; }
153
+ .group h3 .n { margin-left:8px; font:600 13px/1.5 var(--text); font-stretch:100%; background:var(--ink); color:var(--paper); border-radius:999px; padding:1px 8px; vertical-align:3px; }
154
+ .group .why { color:var(--dim); font-size:15px; }
155
+ .items > li { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; gap:4px 12px; align-items:center; padding:9px 0; border-top:1px solid var(--rule); scroll-margin-top:72px; }
156
+ .items .id { min-width:2.2em; }
157
+ .items p { font-size:17px; line-height:1.4; }
158
+ .items > li > p:first-child { grid-column:1 / 3; }
159
+
160
+ .out { columns:2; column-gap:36px; }
161
+ .out li { display:flex; gap:10px; break-inside:avoid; padding:9px 0; border-top:1px solid var(--rule); font-size:15px; line-height:1.45; color:var(--dim); }
162
+ .out li::before { content:"✕"; flex:none; font-weight:700; color:var(--faint); }
163
+
164
+ .fold { border-top:1px solid var(--rule); }
165
+ .fold:last-of-type { border-bottom:1px solid var(--rule); }
166
+ .fold summary { cursor:pointer; padding:12px 0; font-weight:600; color:var(--dim); }
167
+ .fold summary:hover { color:var(--ink); }
168
+ .fold .prose { padding-bottom:12px; font-size:16px; color:var(--dim); }
169
+
170
+ .tally { display:flex; flex-wrap:wrap; gap:8px 22px; margin-bottom:22px; font-size:15px; color:var(--dim); }
171
+ .tally li { display:flex; align-items:center; gap:8px; }
172
+ .tally .ico { width:18px; height:18px; font-size:10px; }
173
+ .line { margin-left:11px; border-left:4px solid color-mix(in srgb, var(--route) 40%, var(--rule)); }
174
+ .line > li { position:relative; padding-left:30px; }
175
+ .row { scroll-margin-top:72px; border-bottom:1px solid var(--rule); }
176
+ .line > li:last-child .row { border-bottom:0; }
177
+ .row summary { display:flex; align-items:center; gap:12px; padding:15px 0; cursor:pointer; list-style:none; }
178
+ .row summary::-webkit-details-marker { display:none; }
179
+ .row summary::after { content:"+"; width:1em; text-align:center; font:400 24px/1 var(--text); color:var(--faint); }
180
+ .row[open] summary::after { content:"−"; }
181
+ .row summary > .ico { position:absolute; left:-14px; top:15px; box-shadow:0 0 0 4px var(--paper); }
182
+ .row .t { flex:1; min-width:0; font-weight:600; font-size:18px; line-height:1.35; }
183
+ .row summary:hover .t { color:var(--route); }
184
+ .row-body { padding:0 0 20px; }
185
+ .steps { display:grid; grid-template-columns:minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.2fr); gap:12px; align-items:stretch; }
186
+ .steps > div { border-top:4px solid var(--rule); padding-top:10px; font-size:15px; line-height:1.5; color:var(--dim); }
187
+ .steps > i { align-self:start; margin-top:10px; font-style:normal; font-weight:700; color:var(--faint); }
188
+ .steps b { display:block; font:600 15px var(--display); color:var(--faint); margin-bottom:2px; }
189
+ .steps .res { border-top-color:var(--route); color:var(--ink); }
190
+ .steps .res b { color:var(--route); }
191
+ .meta { display:flex; flex-wrap:wrap; gap:8px 28px; margin-top:16px; font-size:14px; color:var(--dim); }
192
+ .meta li { max-width:30ch; }
193
+ .meta b, .evidence b { display:block; font-weight:400; color:var(--faint); font-size:13px; }
194
+ .evidence { margin-top:14px; font-size:14px; color:var(--dim); max-width:70ch; }
195
+
196
+ .choices li { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; gap:4px 14px; align-items:center; padding:12px 0; border-top:1px solid var(--rule); scroll-margin-top:72px; }
197
+ .choices li:last-child { border-bottom:1px solid var(--rule); }
198
+ .choices .n { font:600 16px var(--display); width:30px; height:30px; border-radius:50%; display:grid; place-items:center; border:3px solid var(--route); color:var(--route); }
199
+ .choices p { font-size:16px; line-height:1.45; }
200
+ .toggle { background:transparent; border:1px solid var(--rule); border-radius:6px; padding:4px 12px; min-height:34px; font-size:14px; color:var(--dim); white-space:nowrap; }
201
+ .toggle:hover { border-color:var(--ink); color:var(--ink); }
202
+ .toggle[aria-pressed="true"] { background:var(--ink); border-color:var(--ink); color:var(--paper); }
203
+ .note { display:block; grid-column:1 / -1; width:100%; min-height:66px; margin-top:8px; font:inherit; font-size:16px; color:var(--ink); background:var(--panel); border:1px solid var(--rule); border-radius:6px; padding:10px; }
204
+
205
+ details.adr { border-top:1px solid var(--rule); scroll-margin-top:72px; }
206
+ details.adr:last-of-type { border-bottom:1px solid var(--rule); }
207
+ details.adr summary { cursor:pointer; padding:14px 0; display:flex; flex-wrap:wrap; gap:6px 12px; align-items:baseline; list-style:none; }
208
+ details.adr summary::-webkit-details-marker { display:none; }
209
+ details.adr .t { flex:1; font-weight:600; font-size:18px; line-height:1.35; }
210
+ details.adr summary:hover .t { color:var(--route); }
211
+ details.adr summary::after { content:"+"; font:400 24px/1 var(--text); color:var(--faint); }
212
+ details.adr[open] summary::after { content:"−"; }
213
+ details.adr .prose { padding:0 0 4px; font-size:16px; color:var(--dim); }
214
+ .holds { padding:0 0 14px; font-size:14px; color:var(--faint); }
215
+
216
+ .diagram { background:var(--panel); border:1px solid var(--rule); border-radius:6px; padding:14px; overflow-x:auto; }
115
217
  .machine .state rect { fill:var(--paper); stroke:var(--route); stroke-width:2; }
116
218
  .machine .state text { fill:var(--ink); font:600 13px var(--text); }
117
- .machine .edge { fill:none; stroke:var(--faint); stroke-width:1.5; stroke-dasharray:6 5; }
118
- .machine.run .edge { animation:travel 1.1s linear 4; }
119
- @keyframes travel { to { stroke-dashoffset:-22; } }
219
+ .machine .edge { fill:none; stroke:var(--faint); stroke-width:1.5; }
120
220
  .machine .arrow-head { fill:var(--faint); }
121
221
  .machine .edge-label { fill:var(--dim); font:12px var(--text); paint-order:stroke; stroke:var(--panel); stroke-width:4px; }
122
222
 
123
- .gauges { display:flex; flex-wrap:wrap; gap:24px 44px; align-items:center; margin-bottom:16px; }
124
- .ring { width:112px; height:112px; transform:rotate(-90deg); }
125
- .ring circle { fill:none; stroke-width:10; }
126
- .ring .base { stroke:var(--rule); }
127
- .ring .part { stroke:var(--ok); stroke-dasharray:calc(var(--share) * 283) 283; animation:sweep .9s .2s ease-out both; }
128
- @keyframes sweep { from { stroke-dasharray:0 283; } }
129
- .gauge { display:flex; align-items:center; gap:14px; }
130
- .gauge b { display:block; font:600 28px/1 var(--display); }
131
- .status-list { list-style:none; margin:0; padding:0; font-size:15px; }
132
- .status-list li { padding:3px 0; }
133
- .status-list .ok { color:var(--ok); font-weight:600; } .status-list .bad { color:var(--bad); font-weight:600; } .status-list .wait { color:var(--faint); }
134
-
135
- .shots { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:14px; list-style:none; margin:0; padding:0; }
223
+ .timeline { margin-left:11px; border-left:4px solid color-mix(in srgb, var(--route) 40%, var(--rule)); }
224
+ .timeline li { position:relative; padding:0 0 22px 30px; }
225
+ .timeline li:last-child { padding-bottom:0; }
226
+ .timeline .ico { position:absolute; left:-14px; top:1px; box-shadow:0 0 0 4px var(--paper); }
227
+ .timeline b { display:block; font:600 19px var(--display); font-stretch:82%; }
228
+ .timeline span { color:var(--dim); }
229
+ .timeline small { display:block; }
230
+
231
+ .shots { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:14px; }
136
232
  .shots a { display:block; color:var(--ink); text-decoration:none; font-weight:600; font-size:15px; }
137
233
  .shots img { display:block; width:100%; aspect-ratio:16/10; object-fit:cover; object-position:top; border:1px solid var(--rule); border-radius:6px; margin-bottom:6px; background:var(--panel); }
138
234
  iframe.recap { width:100%; height:620px; border:1px solid var(--rule); border-radius:6px; background:var(--panel); }
139
235
 
140
236
  .flash { animation:flash 1.6s ease-out; }
141
- @keyframes flash { from { background:color-mix(in srgb, var(--sign) 55%, transparent); } }
237
+ @keyframes flash { from { background:color-mix(in srgb, var(--sign) 50%, transparent); } }
142
238
 
143
239
  #peek { position:fixed; z-index:20; max-width:340px; background:var(--ink); color:var(--paper); font-size:14px; line-height:1.4; padding:8px 10px; border-radius:6px; pointer-events:none; opacity:0; transition:opacity .12s; }
144
240
  #peek.on { opacity:1; }
@@ -148,22 +244,35 @@ iframe.recap { width:100%; height:620px; border:1px solid var(--rule); border-ra
148
244
  #tray button { background:var(--sign); color:var(--on-sign); border:0; border-radius:6px; padding:8px 16px; font-weight:600; min-height:40px; }
149
245
  #tray .clear { background:transparent; color:var(--paper); border:1px solid currentColor; font-weight:400; }
150
246
 
151
- .source { color:var(--faint); font-size:14px; margin-top:48px; }
152
-
153
- @media (max-width:820px) {
154
- .top { padding:24px 16px 18px; }
155
- .shell { display:block; padding:0 16px 120px; }
156
- .side { top:0; z-index:10; display:flex; gap:14px; overflow-x:auto; scrollbar-width:none; background:var(--paper); padding:8px 0; border-bottom:1px solid var(--rule); }
157
- .side a { border-left:0; border-bottom:3px solid transparent; padding:4px 0; white-space:nowrap; min-height:32px; }
158
- .side a.on { border-bottom-color:var(--route); }
159
- .side a b { float:none; margin-left:6px; }
160
- html { scroll-padding-top:64px; }
161
- .stop { font-size:12px; } .stop small { display:none; }
162
- .numbers { gap:12px 28px; } .numbers b { font-size:34px; }
247
+ .source { color:var(--faint); font-size:14px; margin-top:64px; }
248
+
249
+ @media (max-width:680px) {
250
+ body { font-size:16px; }
251
+ .top, .tabs > div, main { padding-left:16px; padding-right:16px; }
252
+ .top { grid-template-columns:1fr; padding-top:22px; }
253
+ .route { grid-column:1; grid-row:auto; }
254
+ .route small { display:none; }
255
+ .shift > div { grid-template-columns:1fr; padding-left:26px; }
256
+ .shift .tag { position:static; padding-left:0; }
257
+ .shift .tag::before { left:0; top:.36em; }
258
+ .shift.plain .after .tag { padding-top:0; }
259
+ .shift.plain .after .tag::before { top:.36em; }
260
+ article.adr dl { grid-template-columns:1fr; gap:0; }
261
+ article.adr dd { margin-bottom:10px; }
262
+ .steps { grid-template-columns:1fr; }
263
+ .steps > i { display:none; }
264
+ .out { columns:1; }
265
+ .row summary { flex-wrap:wrap; }
266
+ .row .t { flex-basis:70%; }
267
+ .items > li, .choices li { grid-template-columns:auto minmax(0, 1fr); }
268
+ .items .toggle, .choices .toggle { grid-column:2; justify-self:start; }
163
269
  iframe.recap { height:560px; }
164
270
  }
165
271
  @media (prefers-reduced-motion: reduce) {
166
- html { scroll-behavior:auto; }
167
272
  *, *::before, *::after { animation:none !important; transition:none !important; }
168
273
  }
169
- @media print { .side, #tray, .toggle, .filters { display:none; } .shell { display:block; } }
274
+ @media print {
275
+ .tabs, #tray, .toggle { display:none; }
276
+ .js .panel:not(.on) { display:block; }
277
+ .js .panel + .panel { margin-top:56px; }
278
+ }
@@ -29,13 +29,15 @@ function stations({ gates, design, progress, reviews, archived }) {
29
29
  const approved = (g) => gates[g]?.approved === true || gates[g] === true;
30
30
  const hasReview = Object.values(reviews).some((r) => r.status !== 'missing');
31
31
  const built = hasReview || (progress?.total > 0 && progress.done === progress.total);
32
- const list = [
32
+ const reached = [
33
33
  { id: 'plan', label: 'Plano', done: approved('plan') },
34
34
  ...(design ? [{ id: 'uiux', label: 'Design', done: approved('uiux') }] : []),
35
35
  { id: 'implement', label: 'Implementação', done: built, note: progress?.total ? `${progress.done} de ${progress.total}` : null },
36
36
  { id: 'review', label: 'Revisão', done: approved('review') },
37
37
  { id: 'ship', label: 'Entrega', done: archived },
38
38
  ];
39
+ // The archive keeps neither the report nor the reviews: a later station done proves the earlier ones.
40
+ const list = reached.map((s, i) => ({ ...s, done: s.done || reached.slice(i + 1).some((later) => later.done) }));
39
41
  const now = list.findIndex((s) => !s.done);
40
42
  return list.map((s, i) => ({ ...s, state: s.done ? 'done' : i === now ? 'now' : 'next' }));
41
43
  }
@@ -56,7 +58,7 @@ export function collectFeatureView(featureDir, feature, { changes = null, archiv
56
58
  const reviews = reviewReportsFromDir(featureDir);
57
59
  const progress = implementProgressFrom(readText(join(featureDir, '2-plan', 'checks.json')), readText(join(featureDir, '3-implement', 'report.md')));
58
60
  const design = collectDesign(featureDir);
59
- const hasDesign = design.length > 0 || fj.approvalGates?.uiux !== undefined || existsSync(join(featureDir, '1-design'));
61
+ const hasDesign = design.length > 0 || fj.approvalGates?.uiux?.approved === true || existsSync(join(featureDir, '1-design'));
60
62
  const proved = new Map([
61
63
  ...(recap?.scenarios ?? []).filter((c) => c.status).map((c) => [c.id, c]),
62
64
  ...(reviews.verifier?.checks ?? []).map((c) => [c.id, c]),
@@ -69,6 +71,13 @@ export function collectFeatureView(featureDir, feature, { changes = null, archiv
69
71
  feature,
70
72
  description: fj.description ?? null,
71
73
  workType: fj.workType ?? null,
74
+ origin: {
75
+ link: /https?:\/\/[^\s)>\]]+/.exec(fj.description ?? '')?.[0] ?? null,
76
+ branch: fj.branch ?? fj.worktree?.branch ?? null,
77
+ startedAt: fj.createdAt ?? null,
78
+ endedAt: fj.archivedAt ?? null,
79
+ },
80
+ tokens: recap?.tokens ?? null,
72
81
  plan: { ...plan, scenarios },
73
82
  planHash: planText ? planHash(planText) : null,
74
83
  gate: currentGate(fj),
@@ -79,7 +88,7 @@ export function collectFeatureView(featureDir, feature, { changes = null, archiv
79
88
  reviews,
80
89
  critique: readText(join(featureDir, '2-plan', 'critica.md')),
81
90
  design: archived ? [] : design,
82
- changes,
91
+ changes: changes ?? recap?.changes ?? null,
83
92
  recap,
84
93
  };
85
94
  }