/* Veil Layer app — shared styles (owner E). Brand: greys, black, violet #6600FF only for
   focus / action / state. Archivo (wdth 125) for display, JetBrains Mono for data. */
@font-face { font-family: "Archivo V"; src: url("../assets/fonts/archivo-latin.woff2") format("woff2"); font-weight: 400 700; font-stretch: 100% 125%; font-style: normal; font-display: swap; }

:root {
  --g0: #f0f0f0; --g1: #e6e6e6; --g2: #d4d4d4; --g3: #adadad; --g4: #8a8a8a;
  --ink: #000; --ink-2: #161616; --ink-3: #2a2a2a;
  --v: #6600ff; --v-dk: #a26bff; --v-err: #4b00bd; --v-tint: rgba(102, 0, 255, 0.08);
  --muted: #4a4a4a; --muted-dk: #a6a6a6;
  /* quietest text that still passes WCAG AA 4.5:1: --faint on --g0/--g1/--g2, --faint-dk on #000-#161616 */
  --faint: #5c5c5c; --faint-dk: #858585;
  --line: rgba(0, 0, 0, 0.14); --line-2: rgba(0, 0, 0, 0.26); --line-dk: rgba(255, 255, 255, 0.14);
  --bg: var(--g1); --surface: var(--g0); --well: var(--g2);
  --sans: "Archivo V", "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --rail: 228px; --strip: 60px; --tabbar: 0px;
  --pad: clamp(16px, 2.4vw, 36px);
  --gap: clamp(14px, 1.6vw, 24px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --cut: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; font-stretch: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-variant-numeric: tabular-nums; }
img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, h4, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--v); color: #fff; }
:focus-visible { outline: 3px solid var(--v); outline-offset: 2px; }
.dark :focus-visible, .rail :focus-visible { outline-color: var(--v-dk); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 200; padding: 12px 18px; background: #000; color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.mono { font-family: var(--mono); font-variant-ligatures: none; }
.muted { color: var(--muted); }
.wide { font-stretch: 125%; }

/* boot */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; }
.boot__mark { width: 56px; height: 56px; color: #000; animation: bootpulse 1.4s var(--ease) infinite alternate; }
.boot__t { font-stretch: 125%; font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.boot__s { font-size: 13px; color: var(--muted); }
@keyframes bootpulse { from { opacity: .35; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-rows: var(--strip) minmax(0, 1fr); min-height: 100vh; }
.rail { grid-row: 1 / -1; grid-column: 1; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #000; color: var(--g1); padding: 0 0 18px; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.lockup { display: flex; align-items: center; gap: 10px; height: var(--strip); padding: 0 22px; text-decoration: none; color: #fff; flex: none; border-bottom: 1px solid var(--line-dk); }
.lockup svg { width: 26px; height: 26px; color: #fff; }
.lockup__word { font-stretch: 125%; font-weight: 600; font-size: 23px; letter-spacing: -0.02em; line-height: 1; transform: translateY(-1px); }
.lockup__app { align-self: flex-start; margin-top: 17px; padding: 1px 5px 2px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: var(--v); color: #fff; line-height: 1.3; }
.nav { display: flex; flex-direction: column; padding: 18px 10px 0; gap: 2px; }
.nav__a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; text-decoration: none; color: #8f8f8f; font-weight: 600; font-stretch: 112%; font-size: 15px; letter-spacing: -0.005em; transition: color .2s var(--ease), background-color .2s var(--ease); }
.nav__a svg { width: 20px; height: 20px; flex: none; }
.nav__a:hover { color: #fff; background: #111; }
.nav__a[aria-current="page"] { color: #fff; background: #141414; }
.nav__a[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 9px; background: var(--v); clip-path: polygon(55% 0, 100% 0, 45% 100%, 0 100%); }
.nav__k { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 400; color: #5c5c5c; }
.rail__sim { margin: auto 16px 0; padding: 14px 0 0; border-top: 1px solid var(--line-dk); font-size: 12px; line-height: 1.45; color: var(--muted-dk); }
.rail__sim b { display: block; margin-bottom: 4px; color: #fff; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.rail__sim p + p { margin-top: 8px; }
.rail__reset { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0; border: 0; background: none; color: #fff; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #5c5c5c; }
.rail__reset:hover { text-decoration-color: var(--v-dk); }
.rail__reset svg { width: 15px; height: 15px; }

.main { grid-column: 2; grid-row: 2; min-width: 0; padding: clamp(20px, 2.6vw, 40px) var(--pad) 72px; }
/* main takes focus on route change (tabindex -1, not in the tab order): no page-sized ring */
.main:focus { outline: none; }
.page { max-width: 1480px; margin: 0 auto; animation: pagein .45s var(--ease) both; }
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* status strip */
.strip { grid-column: 2; grid-row: 1; position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 0; height: var(--strip); padding: 0 var(--pad) 0 0; background: var(--g1); border-bottom: 1px solid var(--line-2); }
.strip__sim { display: flex; align-items: center; gap: 10px; height: 100%; padding: 0 18px 0 var(--pad); margin-right: 4px; border-right: 1px solid var(--line); min-width: 0; }
.chip-sim { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 8px; background: #000; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.chip-sim i { width: 6px; height: 6px; background: var(--v-dk); }
.strip__note { font-size: 12.5px; color: var(--muted); line-height: 1.25; white-space: nowrap; }
.metric { position: relative; display: flex; flex-direction: column; justify-content: center; height: 100%; padding: 0 16px; border-right: 1px solid var(--line); flex: none; text-decoration: none; }
.metric__k { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }
.metric__v { font-family: var(--mono); font-size: 14px; font-weight: 500; line-height: 1.35; white-space: nowrap; }
.metric--slot .metric__v { font-size: 15px; font-weight: 600; }
.metric__bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--v); transform-origin: 0 50%; transform: scaleX(0); }
.metric__bar[data-run] { animation: slotbar var(--dur, 800ms) linear forwards; }
@keyframes slotbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tick { display: inline-block; }
.tick[data-flash] { animation: tickflash .5s var(--ease); }
@keyframes tickflash { 0% { color: var(--v); transform: translateY(-3px); } 100% { color: inherit; transform: none; } }
a.metric:hover .metric__v { text-decoration: underline; text-underline-offset: 3px; }
.seq { display: inline-flex; align-items: center; gap: 7px; }
.dot { position: relative; flex: none; width: 8px; height: 8px; background: #000; }
.dot--online { background: var(--v); }
.dot--online::after { content: ""; position: absolute; inset: 0; background: var(--v); opacity: 0; animation: ping 1.8s var(--ease) infinite; }
.dot--offline { background: transparent; box-shadow: inset 0 0 0 1.5px #000; }
.dot--censoring { background: repeating-linear-gradient(135deg, #000 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1.5px #000; }
@keyframes ping { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.strip__end { margin-left: auto; display: flex; align-items: center; gap: 14px; padding-left: 14px; }
.strip .strip__more { display: none; } /* phones only (see the 759px block) */

/* ---------- page furniture ---------- */
.ph { display: grid; gap: 10px 32px; grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding-bottom: clamp(20px, 2.4vw, 32px); }
.ph__eyebrow { grid-column: 1 / -1; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.ph__title { font-stretch: 125%; font-weight: 600; font-size: clamp(34px, 4.2vw, 60px); letter-spacing: -0.035em; line-height: .95; }
.ph__lede { grid-column: 1; max-width: 46em; font-size: 15.5px; color: #262626; }
.ph__actions { grid-column: 2; grid-row: 2 / span 2; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sect { border-top: 2px solid #000; padding-top: 14px; min-width: 0; }
.sect + .sect, .stats + .sect, .stats + *, .ph + .sect, .grid + .sect, .sect + .grid, .stub + .sect { margin-top: clamp(28px, 3vw, 44px); }
.sect__h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sect__t { font-stretch: 118%; font-weight: 600; font-size: 19px; letter-spacing: -0.015em; line-height: 1.2; }
.sect__e { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.sect__a { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.grid { display: grid; gap: clamp(24px, 2.6vw, 40px) var(--gap); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid > * { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 1024px) {
  .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-9 { grid-column: span 9; }
}
@media (min-width: 700px) and (max-width: 1023px) { .md-6 { grid-column: span 6; } }
.dark { background: #000; color: var(--g1); }
.panel-dark { background: #000; color: var(--g1); padding: 18px 20px 20px; clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); }
.panel-dark .muted, .panel-dark .kv dt { color: var(--muted-dk); }
.well { background: var(--g2); padding: 16px 18px; }
.fine { font-size: 13px; line-height: 1.5; color: var(--muted); }
.note-sim { font-family: var(--mono); font-size: 11px; color: var(--muted); }
/* trust model note (TrustNote): a hairline-ruled aside, label column on wide screens */
.trust { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 20px; margin-top: 16px; padding: 12px 0 0; border-top: 1px solid var(--line-2); font-size: 13px; line-height: 1.5; color: #262626; }
.trust__k { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #000; }
.trust__v { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.trust__t { max-width: 62em; }
.trust__t b { font-weight: 600; color: #000; }
.trust__sim { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.trust--dk { border-top-color: var(--line-dk); color: #c9c9c9; }
.trust--dk .trust__k, .trust--dk .trust__t b { color: #fff; }
.trust--dk .trust__v, .trust--dk .trust__sim { color: var(--muted-dk); }
@media (min-width: 900px) { .trust { grid-template-columns: 150px minmax(0, 1fr); } .trust__k { flex-direction: column; } }

/* ---------- buttons: the mark's 45° cut on two corners ---------- */
.btn { --bg: #000; --fg: #fff; --bd: transparent; position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border: 0; background: none; color: var(--fg); font-weight: 600; font-size: 15px; font-stretch: 112%; letter-spacing: 0.005em; text-decoration: none; white-space: nowrap; user-select: none; transition: color .2s var(--ease), transform .12s var(--ease); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--bd); clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.btn::after { content: ""; position: absolute; inset: var(--bw, 0); z-index: -1; background: var(--bg); clip-path: polygon(calc(var(--cut) - 1px) 0, 100% 0, 100% calc(100% - var(--cut) + 1px), calc(100% - var(--cut) + 1px) 100%, 0 100%, 0 calc(var(--cut) - 1px)); transition: background-color .2s var(--ease); }
.btn:hover::after { background: var(--v); }
.btn:active { transform: translateY(1px); }
.btn--primary { --bg: var(--v); }
.btn--primary:hover::after { background: #000; }
.btn--ghost { --bg: var(--g1); --fg: #000; --bd: #000; --bw: 1.5px; }
.btn--ghost:hover { color: #fff; }
.btn--quiet { --bg: transparent; --fg: #000; height: auto; min-height: 36px; padding: 0 2px; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.btn--quiet::after, .btn--quiet::before { content: none; }
.btn--quiet:hover { color: var(--v); }
.btn--danger { --bg: var(--v-err); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; --cut: 7px; }
.btn--lg { height: 56px; padding: 0 30px; font-size: 16px; --cut: 12px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; --bg: var(--g3); --fg: #262626; }
.btn--ghost[disabled] { --bg: var(--g1); --bd: var(--g3); --fg: var(--g4); }
.btn[disabled]:hover::after { background: var(--g3); }
.btn[disabled]:active { transform: none; }
.btn--ghost[disabled]:hover::after { background: var(--g1); }
.btn--ghost[disabled]:hover { color: var(--g4); }
.btn__spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dark .btn--ghost, .panel-dark .btn--ghost { --bg: #000; --fg: #fff; --bd: #fff; }
.iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: none; color: inherit; }
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn:hover { color: var(--v); }

/* toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 0; border: 0; background: none; text-align: left; }
.toggle__track { position: relative; flex: none; width: 34px; height: 18px; background: var(--g3); transition: background-color .2s var(--ease); clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
.toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; background: #fff; transition: transform .25s var(--ease); }
.toggle[aria-checked="true"] .toggle__track { background: var(--v); }
.toggle[aria-checked="true"] .toggle__track::after { transform: translateX(16px); }
.toggle__l { font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.toggle__s { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }

/* segmented / tabs */
.seg { display: inline-flex; max-width: 100%; border: 1.5px solid #000; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; min-height: 36px; padding: 0 14px; border: 0; background: none; font-size: 13.5px; font-weight: 600; font-stretch: 105%; white-space: nowrap; transition: background-color .15s, color .15s; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button:hover { background: var(--g2); }
.seg button[aria-selected="true"], .seg button[aria-checked="true"] { background: #000; color: #fff; }
.seg button:focus-visible { outline-offset: -3px; }
.seg__badge { margin-left: 6px; font-family: var(--mono); font-size: 11px; font-weight: 500; opacity: .7; }
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; flex: none; min-height: 44px; padding: 0; border: 0; background: none; font-weight: 600; font-stretch: 110%; font-size: 15px; color: var(--muted); }
.tabs button[aria-selected="true"] { color: #000; }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--v); }

/* ---------- fields ---------- */
.field { display: block; min-width: 0; }
.field + .field { margin-top: 18px; }
.field__l { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field__l b { font-weight: 600; color: #000; }
.field__hint { margin-top: 6px; font-size: 12.5px; color: var(--muted); min-height: 1.5em; }
.field__err { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--v-err); }
.input, .select { width: 100%; min-height: 44px; padding: 8px 0; border: 0; border-bottom: 1.5px solid #000; border-radius: 0; background: transparent; outline: none; font-size: 15px; }
.input:focus, .select:focus { border-bottom-color: var(--v); box-shadow: 0 1.5px 0 var(--v); }
.input--mono { font-family: var(--mono); font-size: 13.5px; }
.select { appearance: none; padding-right: 26px; background: linear-gradient(45deg, transparent 50%, #000 50%) calc(100% - 9px) 52% / 6px 6px no-repeat, linear-gradient(-45deg, transparent 50%, #000 50%) calc(100% - 3px) 52% / 6px 6px no-repeat; cursor: pointer; }
.textarea { width: 100%; min-height: 120px; padding: 12px 14px; border: 1.5px solid #000; border-radius: 0; background: var(--g0); font-family: var(--mono); font-size: 13px; line-height: 1.6; resize: vertical; outline: none; }
.textarea:focus { border-color: var(--v); box-shadow: inset 0 0 0 1px var(--v); }
.amt { display: flex; align-items: baseline; gap: 10px; padding-bottom: 6px; border-bottom: 2px solid #000; transition: border-color .2s, box-shadow .2s; }
.amt:focus-within { border-bottom-color: var(--v); box-shadow: 0 2px 0 var(--v); }
.amt[data-err] { border-bottom-color: var(--v-err); }
.amt input { flex: 1; min-width: 0; width: 100%; padding: 2px 0; border: 0; border-radius: 0; background: none; outline: none; font-stretch: 112%; font-weight: 600; font-size: clamp(26px, 2.4vw, 36px); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.amt input::placeholder { color: var(--g3); }
.amt__unit { font-size: 14px; font-weight: 600; white-space: nowrap; }
.amt__max { padding: 4px 8px; border: 1.5px solid #000; background: none; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.amt__max:hover { background: #000; color: #fff; }
.amt--sm input { font-size: 22px; }
.presets { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 13px; }
.presets button { min-height: 30px; padding: 0; border: 0; background: none; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.presets button:hover { color: var(--v); }

/* ---------- data ---------- */
.tbl-wrap { overflow-x: auto; min-width: 0; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { padding: 8px 12px 8px 0; border-bottom: 1.5px solid #000; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tbl td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl .r { text-align: right; }
.tbl .m { font-family: var(--mono); font-size: 12.5px; }
.tbl tbody tr { transition: background-color .15s; }
.tbl tbody tr[data-click] { cursor: pointer; }
.tbl tbody tr[data-click]:hover { background: rgba(0, 0, 0, .04); }
.tbl tbody tr[data-new] { animation: rowin .6s var(--ease) both; }
.tbl--dense td { padding-top: 7px; padding-bottom: 7px; }
@keyframes rowin { from { opacity: 0; transform: translateY(-8px); background: var(--v-tint); } 60% { background: var(--v-tint); } to { opacity: 1; transform: none; background: transparent; } }
.dark .tbl th, .panel-dark .tbl th { border-bottom-color: #fff; color: var(--muted-dk); }
.dark .tbl td, .panel-dark .tbl td { border-bottom-color: var(--line-dk); }
.hash { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-family: var(--mono); font-size: 12.5px; font-variant-ligatures: none; white-space: nowrap; }
.hash a, .hash span { overflow: hidden; text-overflow: ellipsis; }
.hash a { text-decoration: none; border-bottom: 1px solid var(--line-2); }
.hash a:hover { color: var(--v); border-bottom-color: var(--v); }
.hash__name { font-family: var(--sans); font-weight: 600; font-size: 13.5px; margin-right: 4px; }
.copy { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; padding: 0; border: 0; background: none; color: var(--g4); }
.copy svg { width: 14px; height: 14px; }
.copy:hover { color: #000; }
.copy[data-done] { color: var(--v); }
.copy--word { width: auto; min-width: 44px; height: 32px; display: inline-flex; gap: 6px; padding: 0 8px; font-size: 12px; font-weight: 600; }
.dark .copy:hover, .panel-dark .copy:hover { color: #fff; }
.amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount__frac { color: var(--muted); }
.amount__unit { margin-left: .3em; font-size: .78em; font-weight: 600; color: var(--muted); }
.stat { min-width: 0; }
.stat__k { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.stat__v { margin-top: 4px; font-stretch: 118%; font-weight: 600; font-size: clamp(24px, 2.2vw, 34px); letter-spacing: -0.02em; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat__v[data-flash] { animation: statflash .8s var(--ease); }
@keyframes statflash { 0% { color: var(--v); } 100% { color: inherit; } }
.stat__u { margin-left: .25em; font-size: .45em; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.stat__s { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.stat--big .stat__v { font-size: clamp(36px, 4vw, 64px); letter-spacing: -0.035em; font-stretch: 125%; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px var(--gap); }
.stats > .stat { padding-top: 12px; border-top: 1px solid var(--line-2); }
.kv { display: grid; grid-template-columns: minmax(8em, 34%) minmax(0, 1fr); }
.kv > dt, .kv > dd { padding: 10px 0; border-top: 1px solid var(--line); }
.kv > dt { font-size: 13px; color: var(--muted); padding-right: 12px; }
.kv > dd { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.panel-dark .kv > dt, .panel-dark .kv > dd { border-top-color: var(--line-dk); }

/* badges: restrained, no pastel soup */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border: 1.5px solid currentColor; line-height: 1; }
.badge::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.badge--ok { color: #000; }
.badge--pending { color: var(--v); }
.badge--pending::before { animation: blink 1s steps(2, start) infinite; }
.badge--fail { color: #fff; background: var(--v-err); border-color: var(--v-err); }
.badge--private { color: #fff; background: #000; border-color: #000; }
.badge--private::before { background: var(--v-dk); }
.badge--sim { color: var(--muted); border-style: dashed; }
.badge--sim::before { content: none; }
.badge--neutral { color: var(--muted); }
.badge--neutral::before { content: none; }
.panel-dark .badge--ok, .dark .badge--ok { color: #fff; }
@keyframes blink { to { visibility: hidden; } }

/* steps / progress */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); counter-reset: st; }
.step { position: relative; padding: 14px 10px 0 0; border-top: 3px solid var(--g3); counter-increment: st; min-width: 0; }
.step__n { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.step__n::before { content: counter(st, decimal-leading-zero) " "; }
.step__l { display: block; margin-top: 2px; font-weight: 600; font-size: 13.5px; font-stretch: 108%; line-height: 1.25; }
.step__s { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.step[data-state="done"] { border-top-color: #000; }
.step[data-state="active"] { border-top-color: var(--v); }
.step[data-state="active"]::before { content: ""; position: absolute; top: -3px; left: 0; height: 3px; width: 40%; background: #fff; opacity: .55; animation: sweep 1.2s var(--ease) infinite; }
.step[data-state="active"] .step__l { color: var(--v); }
.step[data-state="failed"] { border-top-color: var(--v-err); }
.step[data-state="failed"] .step__l { color: var(--v-err); }
.step[data-state="todo"] .step__l { color: var(--faint); }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.progress { position: relative; height: 6px; background: var(--g2); overflow: hidden; }
.progress__bar { position: absolute; inset: 0; background: var(--v); transform-origin: 0 50%; transition: transform .2s linear; }
.progress[data-indet] .progress__bar { width: 35%; animation: sweep 1.1s var(--ease) infinite; }
.progress__l { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12.5px; }
.progress__l span:last-child { font-family: var(--mono); color: var(--muted); }

/* empty */
.empty { display: grid; justify-items: start; gap: 8px; padding: 28px 0; border-top: 1px dashed var(--line-2); }
.empty__t { font-stretch: 112%; font-weight: 600; font-size: 16px; }
.empty__b { font-size: 13.5px; color: var(--muted); max-width: 36em; }
.empty .btn { margin-top: 6px; }

/* menus / popovers */
.pop { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 280px; padding: 6px 0; background: #000; color: var(--g1); box-shadow: 0 18px 40px rgba(0, 0, 0, .25); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%); animation: menuin .18s var(--ease); }
@keyframes menuin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu__h { padding: 8px 16px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dk); }
.menu__i { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 16px; border: 0; background: none; color: inherit; text-align: left; text-decoration: none; }
.menu__i:hover, .menu__i:focus-visible { background: #1a1a1a; outline: none; }
.menu__i[aria-checked="true"] { box-shadow: inset 3px 0 0 var(--v); }
.menu__i b { display: block; font-weight: 600; font-size: 14px; color: #fff; }
.menu__i small { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted-dk); }
.menu__i .menu__r { margin-left: auto; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--g1); }
.menu__sep { height: 1px; margin: 6px 0; background: var(--line-dk); }
.wsw { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 4px; border: 0; background: none; text-align: left; }
.wsw:hover .wsw__n { text-decoration: underline; text-underline-offset: 3px; }
.wsw__av { flex: none; display: grid; place-items: center; width: 30px; height: 30px; background: #000; color: #fff; font-stretch: 125%; font-weight: 600; font-size: 14px; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.wsw__n { display: block; font-weight: 600; font-size: 14px; line-height: 1.2; }
.wsw__a { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); line-height: 1.2; white-space: nowrap; }
.wsw__n { white-space: nowrap; }
.wsw__c { width: 10px; height: 10px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .55); animation: fadein .2s var(--ease); }
.modal__box { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--g1); padding: 22px 24px 24px; clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%); animation: boxin .3s var(--ease); }
.modal__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid #000; margin-bottom: 16px; }
.modal__t { font-stretch: 122%; font-weight: 600; font-size: 22px; letter-spacing: -0.02em; line-height: 1.1; padding-right: 20px; }
.modal__f { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes boxin { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: calc(20px + var(--tabbar) + env(safe-area-inset-bottom)); z-index: 110; display: flex; flex-direction: column-reverse; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { position: relative; pointer-events: auto; padding: 12px 40px 12px 16px; background: #000; color: #fff; font-size: 13.5px; line-height: 1.4; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); animation: toastin .35s var(--ease); overflow: hidden; }
.toast[data-leaving] { animation: toastout .3s var(--ease) forwards; }
.toast__t { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.toast__t::before { content: ""; flex: none; width: 7px; height: 7px; background: #fff; }
.toast--pending .toast__t::before { background: var(--v-dk); animation: blink 1s steps(2, start) infinite; }
.toast--ok .toast__t::before { background: var(--v-dk); }
.toast--fail { background: var(--v-err); }
.toast__b { margin-top: 2px; color: #cfcfcf; font-size: 12.5px; overflow-wrap: anywhere; }
.toast__b a { color: #fff; }
.toast__x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; padding: 0; border: 0; background: none; color: #9a9a9a; }
.toast__x:hover { color: #fff; }
.toast__x svg { width: 14px; height: 14px; margin: auto; }
.toast-more { align-self: flex-end; pointer-events: auto; height: 28px; padding: 0 12px; border: 0; background: #000; color: #fff; font-family: var(--mono); font-size: 11.5px; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); animation: toastin .25s var(--ease); }
.toast-more:hover { background: var(--ink-3); }
.toast__p { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--v-dk); transition: width .2s linear; }
@keyframes toastin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateX(30px); } }

/* phone bar + sheet */
.tabbar { display: none; }
.sheet { position: fixed; inset: auto 0 0 0; z-index: 115; padding: 18px var(--pad) calc(20px + env(safe-area-inset-bottom)); background: #000; color: var(--g1); clip-path: polygon(0 18px, 18px 0, 100% 0, 100% 100%, 0 100%); animation: sheetin .3s var(--ease); }
.sheet__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-dk); font-size: 14px; }
.sheet__row .muted { color: var(--muted-dk); }
.sheet .toggle__s { color: var(--muted-dk); }
.sheet .dot--online { background: var(--v-dk); }
.sheet .dot--online::after { background: var(--v-dk); }
.sheet .dot--offline { background: transparent; box-shadow: inset 0 0 0 1.5px #fff; }
.sheet .dot--censoring { background: repeating-linear-gradient(135deg, #fff 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1.5px #fff; }
.sheet .rail__reset { margin-top: 0; }
.scrim { position: fixed; inset: 0; z-index: 114; background: rgba(0, 0, 0, .4); animation: fadein .2s; }
@keyframes sheetin { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* stub & error pages */
.stub { padding: 18px 20px; border: 1.5px dashed var(--line-2); font-size: 14px; color: var(--muted); }
.stub b { color: #000; }
.err-page pre { margin-top: 12px; padding: 14px; background: #000; color: #fff; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; }

@media (max-width: 1439px) { .strip__note-x { display: none; } }
@media (max-width: 1279px) {
  .strip__note { display: none; }
  .metric--l1 { display: none; }
}
@media (max-width: 1023px) {
  :root { --rail: 72px; }
  .lockup { padding: 0; justify-content: center; }
  .lockup__word, .lockup__app, .nav__a span, .nav__k, .rail__sim p { display: none; }
  .nav { padding: 14px 8px 0; }
  .nav__a { justify-content: center; padding: 0; min-height: 48px; }
  .nav__a[aria-current="page"]::before { left: -8px; }
  .rail__sim { margin: auto 8px 0; text-align: center; }
  .rail__sim b { font-size: 9px; letter-spacing: .06em; }
  .rail .rail__reset span { display: none; }
  .metric--bt { display: none; }
  .ph { grid-template-columns: minmax(0, 1fr); }
  .ph__actions { grid-column: 1; grid-row: auto; justify-content: flex-start; }
}
@media (max-width: 759px) {
  /* --strip is the whole sticky header (band + strip) so panel sticky offsets clear both */
  :root { --band: 28px; --strip-h: 54px; --strip: calc(var(--band) + var(--strip-h)); --tabbar: 62px; --pad: 16px; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--band) var(--strip-h) minmax(0, 1fr); }
  .rail { display: none; }
  .simband { grid-row: 1; grid-column: 1; position: sticky; top: 0; z-index: 41; display: flex; align-items: center; gap: 8px; height: var(--band); padding: 0 var(--pad); background: #000; color: #d9d9d9; font-size: 11.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; }
  .simband b { flex: none; }
  .simband b { color: #fff; letter-spacing: .1em; text-transform: uppercase; font-size: 10px; }
  .strip { grid-column: 1; grid-row: 2; height: var(--strip-h); padding: 0 6px 0 var(--pad); top: var(--band); }
  .strip__sim { display: none; }
  .strip__mark { display: grid; place-items: center; margin-right: 10px; color: #000; }
  .strip__mark svg { width: 24px; height: 24px; }
  .metric { padding: 0 12px; }
  .metric--seq .metric__k, .metric--relayer { display: none; }
  .metric--seq { border-right: 0; padding-left: 4px; }
  .strip__end { gap: 0; padding-left: 4px; }
  .wsw { padding-right: 4px; }
  .wsw__a, .wsw__c { display: none; }
  .strip .strip__more { display: inline-grid; }
  .main { grid-column: 1; grid-row: 3; padding-bottom: calc(var(--tabbar) + 40px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #000; }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #8f8f8f; text-decoration: none; font-size: 10.5px; font-weight: 600; }
  .tabbar a svg { width: 20px; height: 20px; }
  .tabbar a[aria-current="page"] { color: #fff; }
  .tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; background: var(--v); }
  .toasts { right: 16px; left: 16px; width: auto; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv > dd { border-top: 0; padding-top: 0; }
  .steps { grid-auto-flow: row; grid-auto-columns: auto; gap: 0; }
  .step { padding: 10px 0 10px 14px; border-top: 0; border-left: 3px solid var(--g3); }
  .step[data-state="done"] { border-left-color: #000; }
  .step[data-state="active"] { border-left-color: var(--v); }
  .step[data-state="failed"] { border-left-color: var(--v-err); }
  .step[data-state="active"]::before { content: none; }
  .menu { position: fixed; left: 12px; right: 12px; top: calc(var(--strip) + 8px); min-width: 0; }
  .modal { align-items: end; padding: 0; }
  .modal__box { width: 100%; max-height: 88vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
@media (max-width: 359px) {
  :root { --band: 40px; }
  .simband { white-space: normal; }
}
@media (min-width: 760px) { .simband, .strip__mark { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .metric__bar[data-run] { animation: none; transform: scaleX(1); opacity: .35; }
}
