/* Netscraper session replay: light, on cream paper (drksci labs article tokens, with fallbacks). */
:root {
  --ns-paper: var(--paper, #f4f3f0);
  --ns-ink: var(--ink, #0c0c0b);
  --ns-mute: var(--mute, #46443f);
  --ns-faint: var(--faint, #8a8780);
  --ns-hair: var(--hair, #cbc7be);
  --ns-card: #fbfaf7;
  --ns-well: #efede8;
  --ns-sans: var(--sans, 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif);
  --ns-mono: var(--mono, 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace);
  --ns-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ns-accent: #fe2c55;
  --ns-ok: #10b981;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ns-paper); color: var(--ns-ink); }
body { font: 12px/1.45 var(--ns-sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }

/* fills its iframe: the article sizes the frame (≈ viewport height), the player flexes to it */
.ns { position: relative; width: 100%; height: 100%; min-height: 420px; container-type: size; container-name: ns; outline: none; }
.ns-frame {
  position: relative; width: 100%; height: 100%; display: grid;
  /* the stage is sized so the browser view lands near 4:3–1:1; the chat takes the rest */
  grid-template-columns: clamp(240px, 30%, 340px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px 12px; padding: 4px 2px; background: transparent; overflow: hidden;
}

/* ------------------------------------------------------------------ header */
.ns-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-width: 0; height: 22px; }
.ns-brand { display: flex; align-items: center; gap: 7px; font: 600 10.5px/1 var(--ns-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.ns-brand i { width: 14px; height: 14px; display: inline-grid; place-items: center; border: 1px solid var(--ns-ink); border-radius: 3px; font: 700 9px/1 var(--ns-mono); font-style: normal; box-shadow: 1.5px 1.5px 0 var(--ns-ink); }
.ns-brand span { color: var(--ns-faint); font-weight: 500; }
.ns-chapter { font: 500 10.5px/1 var(--ns-mono); color: var(--ns-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-chapter b { color: var(--ns-ink); font-weight: 600; }
.ns-grow { flex: 1; }
.ns-clock { display: flex; align-items: center; gap: 6px; font: 500 10px/1 var(--ns-mono); color: var(--ns-faint); white-space: nowrap; }
.ns-speed { padding: 3px 6px; border: 1px solid var(--ns-hair); border-radius: 99px; color: var(--ns-mute); transition: color .2s, border-color .2s, background .2s; }
.ns-speed.fast { color: var(--ns-ink); border-color: var(--ns-ink); }
.ns-speed .ff { display: inline-block; margin-right: 2px; letter-spacing: -2px; }

/* ------------------------------------------------------------------ chat */
.ns-chat { grid-row: 2; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--ns-hair); overflow: hidden; }
.ns-chat-head { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 2px; font: 500 10px/1 var(--ns-mono); color: var(--ns-faint); text-transform: uppercase; letter-spacing: .06em; flex: none; }
.ns-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ns-faint); flex: none; }
.ns-dot.live { background: var(--ns-ok); box-shadow: 0 0 0 3px #10b98122; }
.ns-log { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 6px 2px 10px; display: flex; flex-direction: column; gap: 7px; mask-image: linear-gradient(to bottom, transparent 0, #000 22px); scroll-behavior: auto; }
.ns-log > :first-child { margin-top: auto; }
.ns-msg { animation: ns-in .28s var(--ns-ease) both; min-width: 0; }
.ns-msg.user { align-self: flex-end; max-width: 92%; padding: 6px 9px; border-radius: 10px 10px 3px 10px; background: var(--ns-ink); color: var(--ns-paper); font-size: 11.5px; }
.ns-msg.text { font-size: 11.5px; color: var(--ns-ink); overflow-wrap: anywhere; }
.ns-msg.text p { margin: 0 0 4px; }
.ns-msg.text p:last-child { margin: 0; }
.ns-msg.text ul { margin: 2px 0 4px; padding-left: 14px; }
.ns-msg code, .ns-pane code { font: 10.5px/1.3 var(--ns-mono); background: var(--ns-well); padding: 0 3px; border-radius: 3px; }
.ns-msg.think { display: flex; gap: 6px; font-size: 10.5px; color: var(--ns-faint); font-style: italic; }
.ns-msg.think .t { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ns-msg.think.done .t { -webkit-line-clamp: 1; }
.ns-msg.think .k { font: 500 9.5px/1.6 var(--ns-mono); font-style: normal; text-transform: uppercase; letter-spacing: .05em; flex: none; }
.ns-msg.think:not(.done) .k::after { content: '…'; animation: ns-blink 1s steps(2) infinite; }
.ns-tool { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 7px 3px 5px; border: 1px solid var(--ns-hair); border-radius: 6px; background: var(--ns-paper); font: 500 10px/1.3 var(--ns-mono); color: var(--ns-mute); }
.ns-tool svg { width: 11px; height: 11px; flex: none; }
.ns-tool b { color: var(--ns-ink); font-weight: 600; white-space: nowrap; }
.ns-tool s { text-decoration: none; color: var(--ns-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ns-tool.run { border-color: var(--ns-ink); }
.ns-caret::after { content: ''; display: inline-block; width: 5px; height: 11px; margin-left: 1px; vertical-align: -1px; background: var(--ns-ink); animation: ns-blink .9s steps(2) infinite; }

/* ------------------------------------------------------------------ stage */
.ns-stage { grid-row: 2; grid-column: 2; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.ns-win { position: relative; flex: 1 1 0; min-height: 180px; display: flex; flex-direction: column; border: 1px solid var(--ns-hair); border-radius: 10px; background: var(--ns-card); overflow: hidden; }
.ns-bar { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-bottom: 1px solid var(--ns-hair); flex: none; }
.ns-lights { display: flex; gap: 4px; }
.ns-lights i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ns-hair); background: var(--ns-paper); }
.ns-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; height: 18px; padding: 0 8px; border-radius: 5px; background: var(--ns-well); font: 500 10px/1 var(--ns-mono); color: var(--ns-mute); overflow: hidden; white-space: nowrap; }
.ns-url svg { width: 9px; height: 9px; flex: none; color: var(--ns-faint); }
.ns-url .spin { width: 8px; height: 8px; border: 1.5px solid var(--ns-hair); border-top-color: var(--ns-ink); border-radius: 50%; animation: ns-spin .7s linear infinite; display: none; }
.ns-url.loading .spin { display: block; }
.ns-seg { display: inline-flex; padding: 1px; border: 1px solid var(--ns-hair); border-radius: 6px; background: var(--ns-paper); flex: none; }
.ns-seg button { border: 0; background: none; padding: 2px 7px; border-radius: 4px; font: 500 9.5px/1.2 var(--ns-mono); color: var(--ns-faint); cursor: pointer; }
.ns-seg button[aria-pressed="true"] { background: var(--ns-ink); color: var(--ns-paper); }
.ns-view { position: relative; flex: 1; min-height: 0; container-type: size; background: var(--ns-well); }
/* cover, top-aligned: the 16:11 screencast fills the near-square view (sides crop), overlay + ripple ride along */
.ns-view { overflow: hidden; }
.ns-page { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: max(100cqw, 100cqh * 1.4222); height: max(100cqh, 100cqw / 1.4222); overflow: hidden; background: #fff; }
.ns-page img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .16s linear; image-rendering: pixelated; }
.ns-page img.on { opacity: 1; }
.ns-page img.now { transition: none; }
.ns-status { display: flex; align-items: center; gap: 8px; height: 20px; padding: 0 8px; border-top: 1px solid var(--ns-hair); font: 500 9.5px/1 var(--ns-mono); color: var(--ns-faint); flex: none; white-space: nowrap; overflow: hidden; }
.ns-status b { color: var(--ns-mute); font-weight: 600; }
.ns-strip { flex: 1; position: relative; height: 3px; border-radius: 2px; background: var(--ns-well); overflow: hidden; min-width: 30px; }
.ns-strip i { position: absolute; inset: 0 auto 0 0; background: var(--ns-ink); }
.ns-strip u { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ns-ok); }

/* lo-fi A2UI overlay */
.ns-lofi { position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: opacity .25s; }
.ns-lofi.off { opacity: 0; }
.ns-cov { position: absolute; overflow: hidden; border-radius: 3px; background: #fff; }
.ns-cov > .hl { position: absolute; inset: 0; border: 1px solid; border-radius: 3px; }
.ns-blk { position: absolute; overflow: hidden; background: #fff; display: flex; flex-direction: column; justify-content: center; gap: 1px; line-height: 1.2; color: var(--ns-ink); }
.ns-blk.media { background: #eeece7; justify-content: flex-start; }
.ns-blk.media > .img { position: absolute; inset: 0; display: grid; place-items: center; color: #b9b6ad; }
.ns-blk .ln { position: relative; display: flex; align-items: center; gap: 3px; min-width: 0; white-space: nowrap; }
.ns-blk .ln span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ns-blk .ln svg { flex: none; color: var(--ns-faint); }
.ns-blk .ln.count span { font-weight: 600; font-variant-numeric: tabular-nums; }
.ns-blk .ln.text span { color: var(--ns-mute); }
.ns-blk .bar { height: .5em; border-radius: 2px; background: #e4e1da; width: 70%; }

/* action HUD */
.ns-hud { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 16px; background: #fbfaf7d9; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 0 0 1px var(--ns-hair), 0 8px 24px #0c0c0b14; opacity: 0; transform: scale(.94); transition: opacity .15s, transform .15s var(--ns-ease); pointer-events: none; z-index: 5; }
.ns-hud.on { opacity: 1; transform: none; }
.ns-hud svg { width: 26px; height: 26px; }
.ns-hud span { font: 500 9.5px/1 var(--ns-mono); color: var(--ns-mute); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-hud .steps { display: flex; gap: 2px; width: 70px; }
.ns-hud .steps i { flex: 1; height: 3px; border-radius: 1px; background: #0c0c0b1a; }
.ns-hud .steps i.on { background: var(--ns-ink); }
.ns-ripple { position: absolute; width: 0; height: 0; z-index: 6; pointer-events: none; }
.ns-ripple::before, .ns-ripple::after { content: ''; position: absolute; border-radius: 50%; transform: translate(-50%, -50%); }
.ns-ripple::before { width: 6px; height: 6px; background: var(--ns-ink); }
.ns-ripple::after { width: 26px; height: 26px; border: 1.5px solid var(--ns-ink); animation: ns-ping .7s var(--ns-ease) both; }

/* interrupt modal */
.ns-int { position: absolute; inset: 0; display: grid; place-items: center; background: #f4f3f080; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 4; }
.ns-int.on { opacity: 1; }
.ns-int .card { width: min(62%, 230px); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--ns-hair); border-radius: 8px; background: var(--ns-card); text-align: center; box-shadow: 0 10px 30px #0c0c0b1f; transform: scale(.96); transition: transform .2s var(--ns-ease); }
.ns-int.on .card { transform: none; }
.ns-int .k { font: 500 8.5px/1 var(--ns-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ns-faint); }
.ns-int .k::before { content: '⚑ '; color: var(--ns-accent); }
.ns-int p { margin: 0; font-weight: 600; font-size: 12px; }
.ns-int .ph { width: 70%; height: 4px; border-radius: 9px; background: var(--ns-well); }
.ns-int .ph + .ph { width: 45%; }
.ns-int .btn { padding: 2px 12px; border: 1px solid var(--ns-hair); border-radius: 5px; font-size: 10.5px; background: #fff; transition: background .15s, color .15s; }
.ns-int .btn.hit { background: var(--ns-ink); color: var(--ns-paper); border-color: var(--ns-ink); }

/* ------------------------------------------------------------------ panes */
.ns-pane { position: relative; flex: 0 1 var(--pane, 0%); min-height: 28px; display: flex; flex-direction: column; border: 1px solid var(--ns-hair); border-radius: 10px; background: var(--ns-card); overflow: hidden; transition: flex-basis .5s var(--ns-ease); }
.ns-tabs { display: flex; align-items: center; gap: 2px; height: 28px; padding: 0 6px; border-bottom: 1px solid var(--ns-hair); flex: none; }
.ns-tabs button { display: flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border: 0; border-radius: 5px; background: none; font: 500 10px/1 var(--ns-mono); color: var(--ns-faint); cursor: pointer; }
.ns-tabs button:disabled { opacity: .45; cursor: default; }
.ns-tabs button[aria-selected="true"] { background: var(--ns-well); color: var(--ns-ink); }
.ns-tabs button .ns-dot { width: 5px; height: 5px; display: none; }
.ns-tabs button.live .ns-dot { display: block; background: var(--ns-ok); }
.ns-tabs .sub { margin-left: auto; font: 500 9.5px/1 var(--ns-mono); color: var(--ns-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-body { position: relative; flex: 1; min-height: 0; }
.ns-p { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
.ns-p.on { opacity: 1; visibility: visible; transition: opacity .2s; }

/* code */
/* labs PHOSPHOR palette (payload/src/components/labs/Code.tsx): keys keyword, strings builtin, numbers number,
   true/false/null symbol, punctuation punct, folds comment */
.ns-code { position: absolute; inset: 0; overflow: auto; scrollbar-width: thin; padding: 8px 14px; font: 11px/1.7 var(--ns-mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ns-ink); }
.ns-code .k { color: #b8339b; }
.ns-code .s { color: #1d8296; }
.ns-code .n { color: #c2700f; }
.ns-code .b { color: #6a4cc4; }
.ns-code .p { color: #8a8780; }
.ns-code .f { border-radius: 2px; box-shadow: inset 0 -2px 0 var(--c); background: var(--w); }
.ns-code .fold { color: #8a9a86; font-style: italic; }
.ns-code.prose { white-space: pre-wrap; font: 11px/1.55 var(--ns-sans); color: var(--ns-ink); }
.ns-code.prose .h { font-weight: 600; }
.ns-code::after { content: ''; display: inline-block; width: 6px; height: 11px; margin-left: 1px; vertical-align: -1px; background: var(--ns-ink); opacity: 0; }
.ns-code.streaming::after { opacity: 1; animation: ns-blink .9s steps(2) infinite; }

/* machine */
.ns-mach { position: absolute; inset: 0; display: flex; flex-direction: column; }
.ns-crumbs { display: flex; align-items: center; gap: 4px; height: 22px; padding: 0 10px; font: 500 9.5px/1 var(--ns-mono); color: var(--ns-faint); white-space: nowrap; overflow: hidden; flex: none; mask-image: linear-gradient(to right, transparent 0, #000 16px); }
.ns-crumbs > :first-child { margin-left: auto; }
.ns-crumbs b { color: var(--ns-mute); font-weight: 500; }
.ns-crumbs b:last-child { color: var(--ns-ink); font-weight: 600; }
.ns-crumbs sup { font-size: 8.5px; color: var(--ns-faint); margin-left: 1px; }
.ns-mach svg { flex: 1; min-height: 0; width: 100%; }
.ns-mach .nd rect { fill: #fff; stroke: var(--ns-hair); transition: fill .2s, stroke .2s; }
.ns-mach .nd text { font: 500 10px var(--ns-mono); fill: var(--ns-mute); transition: fill .2s; }
.ns-mach .nd .src { font-size: 7.5px; fill: var(--ns-faint); }
.ns-mach .nd.final rect { stroke-width: 2; stroke: var(--ns-mute); }
.ns-mach .nd.failure rect { stroke: #ef444466; fill: #ef44440d; }
.ns-mach .nd.failure text { fill: #b4413c; }
.ns-mach .nd.visited rect { stroke: var(--ns-mute); }
.ns-mach .nd.on rect { fill: var(--ns-ink); stroke: var(--ns-ink); }
.ns-mach .nd.on text { fill: var(--ns-paper); }
.ns-mach .nd .cnt { font: 600 8px var(--ns-mono); fill: var(--ns-ink); }
.ns-mach .nd .cntbg { fill: var(--ns-paper); stroke: var(--ns-hair); }
.ns-mach .eg { fill: none; stroke: #b9b6ad; stroke-width: 1; transition: stroke .2s; }
.ns-mach .eg.back { stroke-dasharray: 3 3; }
.ns-mach .eg.err { stroke: #ef444455; }
.ns-mach .eg.hot { stroke: var(--ns-ink); stroke-width: 1.6; stroke-dasharray: 4 3; animation: ns-flow .5s linear infinite; }
.ns-mach .init { fill: var(--ns-ink); }

/* records */
.ns-rec { position: absolute; inset: 0; display: flex; flex-direction: column; }
.ns-rechead { display: flex; align-items: baseline; gap: 8px; padding: 6px 10px 4px; flex: none; }
.ns-rechead .big { font: 600 20px/1 var(--ns-mono); font-variant-numeric: tabular-nums; }
.ns-rechead .lbl { font: 500 9.5px/1 var(--ns-mono); color: var(--ns-faint); }
.ns-rechead .route { margin-left: auto; font: 500 9.5px/1 var(--ns-mono); padding: 2px 6px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--c, var(--ns-hair)); color: var(--ns-ink); }
.ns-table { flex: 1; min-height: 0; overflow: hidden; mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent); }
.ns-table table { width: 100%; border-collapse: collapse; table-layout: fixed; font: 10px/1.2 var(--ns-mono); }
.ns-table th { position: sticky; top: 0; background: var(--ns-card); text-align: left; font-weight: 500; color: var(--ns-faint); padding: 3px 6px; border-bottom: 1px solid var(--ns-hair); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-table th .sw { display: inline-block; width: 6px; height: 6px; border-radius: 1px; margin-right: 4px; vertical-align: 0; }
.ns-table td { padding: 3px 6px; border-bottom: 1px solid #0c0c0b0d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ns-mute); }
.ns-table td .bar { display: inline-block; height: 6px; border-radius: 2px; background: #e4e1da; vertical-align: 0; }
.ns-table td.num { text-align: right; color: var(--ns-ink); font-variant-numeric: tabular-nums; }
.ns-table th.num { text-align: right; }
.ns-table tr.new td { animation: ns-row 1.1s ease-out both; }
.ns-prod { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); }
.ns-prod > div { position: relative; min-width: 0; }
.ns-prod > div + div { border-left: 1px solid var(--ns-hair); }

/* closing card */
.ns-result { position: absolute; inset: 0; overflow: hidden; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 6px 18px; align-content: start; }
.ns-result h3 { grid-column: 1 / -1; margin: 0 0 2px; display: flex; align-items: center; gap: 8px; font: 600 13px/1.2 var(--ns-sans); }
.ns-result h3 .ok { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--ns-ok); color: #fff; font-size: 10px; }
.ns-result h3 small { margin-left: auto; font: 500 9.5px/1 var(--ns-mono); color: var(--ns-faint); }
.ns-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; align-content: start; }
.ns-stat { min-width: 0; animation: ns-in .4s var(--ns-ease) both; }
.ns-stat b { display: block; font: 600 17px/1.1 var(--ns-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ns-stat span { font: 500 9px/1.2 var(--ns-mono); color: var(--ns-faint); text-transform: uppercase; letter-spacing: .04em; }
.ns-costs { min-width: 0; }
.ns-costs table { width: 100%; border-collapse: collapse; font: 10px/1.25 var(--ns-mono); }
.ns-costs th { text-align: right; font-weight: 500; color: var(--ns-faint); padding: 2px 4px 4px; border-bottom: 1px solid var(--ns-hair); white-space: nowrap; }
.ns-costs th:first-child { text-align: left; }
.ns-costs td { padding: 3px 4px; border-bottom: 1px solid #0c0c0b0d; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; animation: ns-in .4s var(--ns-ease) both; }
.ns-costs td:first-child { text-align: left; color: var(--ns-mute); overflow: hidden; text-overflow: ellipsis; max-width: 0; width: 55%; }
.ns-costs td:first-child em { font-style: normal; color: var(--ns-faint); font-size: 8.5px; margin-left: 4px; }
.ns-costs tr.apify td { color: var(--ns-faint); }
.ns-costs caption { caption-side: bottom; text-align: left; font: 9px/1.3 var(--ns-sans); color: var(--ns-faint); padding-top: 5px; }
.ns-art { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font: 500 10px/1 var(--ns-mono); color: var(--ns-mute); padding-top: 4px; }
.ns-art i { font-style: normal; padding: 2px 6px; border: 1px solid var(--ns-hair); border-radius: 4px; background: var(--ns-paper); }

.ns-empty { position: absolute; inset: 0; display: grid; place-items: center; font: 500 10px/1 var(--ns-mono); color: var(--ns-faint); }

/* caption (lower third over the page) */
.ns-caption { position: absolute; left: 50%; bottom: 8%; z-index: 7; max-width: 86%; transform: translate(-50%, 6px); padding: 5px 10px; border-radius: 6px; background: #0c0c0bdd; color: #f4f3f0; font: 500 11px/1.35 var(--ns-sans); text-align: center; opacity: 0; transition: opacity .25s, transform .25s var(--ns-ease); pointer-events: none; }
.ns-caption.on { opacity: 1; transform: translate(-50%, 0); }

/* WASM actor console */
.ns-wasm { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; padding: 9px 12px 8px; background: #0c0c0b; color: #d9d6cf; font: 10.5px/1.4 var(--ns-mono); }
.ns-wasm .wh { display: flex; gap: 6px; align-items: baseline; white-space: nowrap; overflow: hidden; color: #a19e96; }
.ns-wasm .wh b { color: #f4f3f0; letter-spacing: .06em; }
.ns-wasm .wh i { font-style: normal; color: #a78bfa; }
.ns-wasm .wt { margin-left: auto; color: #f4f3f0; font-variant-numeric: tabular-nums; }
.ns-wasm .wc { display: flex; flex-wrap: wrap; gap: 3px 5px; align-items: center; color: #6f6c66; font-size: 10px; }
.ns-wasm .wc u { text-decoration: none; }
.ns-wasm .wc span { padding: 0 5px; border: 1px solid #2e2d2a; border-radius: 4px; transition: background .15s, color .15s; }
.ns-wasm .wc span.on { background: #f4f3f0; color: #0c0c0b; border-color: #f4f3f0; }
.ns-wasm .wr { flex: 1; min-height: 0; overflow: hidden; border-top: 1px solid #2e2d2a; border-bottom: 1px solid #2e2d2a; }
.ns-wasm table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ns-wasm th { position: sticky; top: 0; background: #0c0c0b; color: #6f6c66; font-weight: 500; text-align: left; padding: 3px 6px; }
.ns-wasm th:first-child, .ns-wasm td:first-child { width: 26px; color: #6f6c66; }
.ns-wasm td { padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-wasm .num { text-align: right; font-variant-numeric: tabular-nums; color: #f4f3f0; }
.ns-wasm td .bar { display: inline-block; height: 5px; border-radius: 2px; background: #3a3935; }
.ns-wasm tr.new td { animation: ns-wrow .9s ease-out both; }
.ns-wasm .wp { display: flex; align-items: center; gap: 8px; }
.ns-wasm .blk { flex: 1; display: flex; gap: 2px; }
.ns-wasm .blk i { flex: 1; height: 8px; background: #23221f; transition: background .15s; }
.ns-wasm .blk i.on { background: #10b981; }
.ns-wasm .cnt { color: #f4f3f0; font-variant-numeric: tabular-nums; }
.ns-wasm .wl { color: #8a8780; font-size: 9.5px; line-height: 1.45; min-height: 4.4em; display: flex; flex-direction: column; justify-content: flex-end; }
.ns-wasm .wl div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: ns-in .25s var(--ns-ease) both; }
@keyframes ns-wrow { from { background: #10b98133; } to { background: transparent; } }

/* Win95 accents (@react95/icons, 16px pixel art; never rescaled) */
.r95 { width: 16px; height: 16px; flex: none; image-rendering: pixelated; vertical-align: -3px; }
.ns-tool .r95 { margin: -2px 0; }
.ns-tick .r95 { opacity: .55; transition: opacity .2s; }
.ns-tick.past .r95, .ns-tick.cur .r95 { opacity: 1; }
.ns-tabs .r95 { margin-left: -2px; }
.ns-brand svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ controls */
.ns-ctl { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; height: 26px; }
.ns-btn { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--ns-hair); border-radius: 7px; background: var(--ns-card); cursor: pointer; flex: none; transition: border-color .15s; }
.ns-btn:hover { border-color: var(--ns-ink); }
.ns-btn svg { width: 12px; height: 12px; }
.ns-scrub { position: relative; flex: 1; height: 26px; cursor: pointer; touch-action: none; }
.ns-track { position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 2px; background: #0c0c0b14; overflow: hidden; }
.ns-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ns-ink); }
.ns-ticks { position: absolute; inset: 0; pointer-events: none; }
.ns-tick { position: absolute; top: 9px; height: 8px; width: 1px; background: var(--ns-paper); box-shadow: 0 0 0 .5px var(--ns-faint); }
.ns-tick span { position: absolute; top: 10px; left: 0; transform: translateX(-6px); display: flex; align-items: center; gap: 3px; font: 500 8.5px/1 var(--ns-mono); color: var(--ns-faint); white-space: nowrap; transition: color .2s; }
.ns-tick.tight:not(.cur) span { visibility: hidden; }
.ns-tick.past span { color: var(--ns-mute); }
.ns-tick.cur span { color: var(--ns-ink); font-weight: 600; }
.ns-knob { position: absolute; top: 7px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--ns-ink); box-shadow: 0 0 0 2px var(--ns-paper); }
.ns-scrub:focus-visible { outline: 2px solid var(--ns-ink); outline-offset: 2px; border-radius: 4px; }
.ns-time { font: 500 10px/1 var(--ns-mono); color: var(--ns-mute); white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.ns-ctl .ns-tick span { top: 11px; }
.ns-ctl { height: 40px; align-items: flex-start; padding-top: 0; }
.ns-ctl .ns-btn, .ns-ctl .ns-time { margin-top: 0; }
.ns-ctl .ns-time { line-height: 26px; }

/* ------------------------------------------------------------------ poster */
.ns-poster { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: var(--ns-paper); transition: opacity .35s, visibility 0s .35s; }
.ns-poster.gone { opacity: 0; visibility: hidden; }
.ns-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.5) contrast(.9); opacity: .55; image-rendering: pixelated; }
.ns-poster .go { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border: 1px solid var(--ns-ink); border-radius: 99px; background: var(--ns-card); font: 600 12px/1 var(--ns-sans); cursor: pointer; box-shadow: 2px 2px 0 var(--ns-ink); transition: transform .15s var(--ns-ease), box-shadow .15s; }
.ns-poster .go:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ns-ink); }
.ns-poster .go svg { width: 14px; height: 14px; }
.ns-poster .go[disabled] { opacity: .6; cursor: progress; }
.ns-poster .cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font: 500 10px/1.4 var(--ns-mono); color: var(--ns-mute); padding: 0 16px; }

/* ------------------------------------------------------------------ narrow */
@container ns (max-width: 680px) {
  .ns-frame { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) minmax(80px, 0.38fr) auto; padding: 4px 0; gap: 6px; }
  .ns-stage { grid-row: 2; grid-column: 1; gap: 6px; }
  .ns-win { flex: 0 0 auto; min-height: 0; }
  .ns-view { flex: none; aspect-ratio: 1 / 0.92; max-height: calc(100cqh * 0.5); width: 100%; margin: 0 auto; }
  .ns-stage:has(.ns-pane.collapsed) .ns-win { flex: 1 1 auto; }
  .ns-stage:has(.ns-pane.collapsed) .ns-view { flex: 1; max-height: none; aspect-ratio: auto; }
  .ns-pane { flex: 1 1 0 !important; min-height: 90px; }
  .ns-pane.collapsed { flex: none !important; min-height: 28px; }
  .ns-body { overflow: auto; }
  .ns-chat { grid-row: 3; }
  .ns-ctl { grid-row: 4; }
  .ns-chapter, .ns-clock .lbl { display: none; }
  .ns-tick span { display: none; }
  .ns-prod { grid-template-columns: minmax(0, 1fr); }
  .ns-prod > div:first-child { display: none; }
  .ns-prod > div + div { border-left: 0; }
  .ns-result { grid-template-columns: minmax(0, 1fr); overflow: auto; }
  .ns-seg { display: none; }
  .ns-tabs button:not([aria-selected="true"]) { font-size: 0; gap: 0; padding: 0 5px; }
  .ns-tabs .sub { display: none; }
}
@container ns (max-width: 420px) {
  .ns-brand span { display: none; }
  .ns-time .tot { display: none; }
}

@keyframes ns-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes ns-blink { 50% { opacity: 0; } }
@keyframes ns-spin { to { transform: rotate(360deg); } }
@keyframes ns-ping { from { opacity: .9; width: 6px; height: 6px; } to { opacity: 0; width: 34px; height: 34px; } }
@keyframes ns-row { from { background: #10b98122; } to { background: transparent; } }
@keyframes ns-flow { to { stroke-dashoffset: -7; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
}

.ns-pane:not(.collapsed) { min-height: 110px; }
