:root {
  --bg: #0A1019;        /* granat prawie czarny — tło */
  --sea: #0E1C22;       /* ciemny morski — pas sekwencji i finału */
  --surface: #15212F;   /* powierzchnia Raportu */
  --surface-2: #1A2838; /* nagłówek Raportu, wyróżnione wiersze */
  --grid: #1A2536;      /* kropki siatki */
  --edge: #33445E;      /* krawędzie elementów */
  --edge-2: #3C5068;    /* krawędź karty Raportu */
  --ink: #E6EAE1;       /* tekst */
  --ink-2: #A3AEB0;     /* tekst drugorzędny */
  --step: #B7C0BE;      /* nieaktywne kroki sekwencji */
  --ghost: #5E6E80;     /* przerywane i przekreślenia */
  --line: #24324A;      /* cienkie linie siatki dokumentu */
  --cta: #BFD04A;       /* żywa oliwka — główne działanie, fokus */
  --ok: #8FBF8F;        /* spokojna zieleń — potwierdzone */
  --earth: #62754A;     /* ziemna zieleń — linie Identyfikator → Źródło, nić */
  --leak: #E57E50;      /* wyłącznie Wyciek */

  --display: 'IBM Plex Sans', system-ui, sans-serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gut: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--grid) 1px, transparent 1.4px);
  background-size: 24px 24px;
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
main { overflow-x: clip; } /* rozświetlenia nie mogą poszerzać strony */
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cta); outline-offset: 3px; }
code { font: 500 .92em var(--mono); }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gut); }

.label {
  font: 500 .74rem/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tag {
  display: inline-block;
  font: 500 .68rem/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--edge);
  padding: 4px 6px 3px;
  color: var(--ink);
}
.tag--inline { padding: 2px 5px 1px; }
.muted { color: var(--ink-2); }

.btn {
  display: inline-block;
  background: var(--cta);
  color: var(--bg);
  font: 600 1rem/1 var(--sans);
  padding: 16px 22px;
  border: 1px solid var(--cta);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--cta); }
.link { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

/* Identyfikatory */
.id {
  display: inline-block;
  font: 500 .82rem/1.3 var(--mono);
  border: 1px solid var(--edge);
  padding: 4px 8px;
  border-radius: 2px;
  margin: 2px 4px 2px 0;
}
.id--dashed { border-style: dashed; border-color: var(--ghost); }
.id:not(.id--dashed), .chip:not(.chip--dashed) { border-color: var(--ok); }
.id small, .chip small { font: 400 .68rem var(--mono); color: var(--ink-2); margin-left: 4px; }

/* ---------- Nagłówek ---------- */
.top {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding-block: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font: 500 1.05rem var(--mono); letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.mark { width: 26px; height: 22px; flex: none; }
.foot .mark { width: 21px; height: 18px; }
.top-nav { display: flex; gap: 28px; font-size: .92rem; }
.top-nav a { text-decoration: none; }
.top-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.top-cta { border-bottom: 1px solid var(--cta); color: var(--cta); }

/* ---------- Scena 0 ---------- */
.s-open {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  align-items: start;
  padding-top: clamp(140px, 19vh, 200px);
}
.hero-art { position: absolute; z-index: -1; top: -68px; left: 50%; width: 100vw; height: 1000px; transform: translateX(-50%); overflow: hidden; pointer-events: none; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-network { position: absolute; top: 50%; left: 50%; width: max(100%, 1776.83px); height: max(100%, calc(100vw * 941 / 1672)); transform: translate(-50%, -50%); pointer-events: none; }
.network-paths path { stroke: #d8f9a4; stroke-width: 2; opacity: 0; stroke-dasharray: 7 93; animation: network-travel 8s linear infinite; }
.network-paths path:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.network-paths path:nth-child(3) { animation-delay: -6s; animation-duration: 12s; }
.network-points circle { fill: #e5ffb5; opacity: 0; animation: network-glow 6s ease-in-out infinite; }
.network-points circle:nth-child(3n) { animation-delay: -2s; }
.network-points circle:nth-child(3n + 1) { animation-delay: -4s; }
@keyframes network-travel { 0% { stroke-dashoffset: 100; opacity: 0; } 12%, 75% { opacity: .65; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes network-glow { 0%, 100% { opacity: 0; } 50% { opacity: .7; } }
.open-text { grid-column: 1 / 7; padding-top: 12px; min-height: 740px; }
.open-text h1 {
  font: 600 clamp(2.2rem, 4vw, 3.7rem)/1.04 var(--display);
  letter-spacing: -.03em;
  margin: 22px 0 26px;
  text-wrap: balance;
}
.lead { max-width: 36ch; font-size: 1.15rem; color: var(--ink-2); }
.lead strong { color: var(--ink); font-weight: 500; }
.open-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 36px; }

.open-stats { grid-column: 1 / -1; position: relative; margin-top: clamp(40px, 7vh, 80px); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 24px; padding-top: 26px; border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stat b { display: block; font: 600 clamp(1.9rem, 3vw, 2.6rem)/1 var(--mono); letter-spacing: -.03em; color: var(--ink); }
.stat span { display: block; margin-top: 10px; font: 500 .7rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.stat--you b { color: var(--cta); }
.stats-note { margin-top: 16px; font: 400 .76rem/1.5 var(--mono); color: var(--ink-2); max-width: 90ch; }
.open-card { grid-column: 7 / 13; position: relative; isolation: isolate; margin-left: clamp(0px, 3vw, 48px); }
.sheet {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 160px);
  border: 1px solid var(--edge-2);
  border-radius: 3px;
  padding: 26px 26px 22px;
  box-shadow: inset 0 1px 0 rgba(230, 234, 225, .05), 0 40px 80px -40px rgba(0, 0, 0, .85);
}
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.sheet-title { font: 600 1.7rem/1 var(--display); letter-spacing: -.02em; }
.sheet-meta { padding: 14px 0 6px; display: grid; gap: 10px; }
.sheet-meta div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 8px; align-items: baseline; }
.sheet-meta dt { font: 500 .68rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.sheet-meta dd { font-size: .95rem; }
.sheet-grp {
  display: flex; justify-content: space-between; align-items: baseline;
  border: 1px dashed var(--ghost);
  border-radius: 2px;
  padding: 18px 14px;
  margin-top: 12px;
  font: 500 1.05rem var(--display);
}
.sheet-grp em { font: 400 .7rem var(--mono); font-style: normal; color: var(--ink-2); letter-spacing: .04em; }

.thread { position: absolute; left: 50%; width: 1px; pointer-events: none; }
.thread i { display: block; width: 1px; height: 100%; background: var(--earth); transform-origin: top; transform: scaleY(var(--t, 0)); }
.thread--open { top: 100%; left: 75%; height: clamp(90px, 20vh, 220px); }

/* Rozświetlenie za kartą Raportu: wspiera hierarchię, nie wchodzi pod tekst. */
.open-card::before, .report-grid::before, .s-join::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(110, 170, 150, .2), rgba(110, 170, 150, 0));
}
.open-card::before { inset: -26% -22%; }

/* ---------- Scena 1 ---------- */
.s-seq {
  background: linear-gradient(180deg, rgba(14, 28, 34, 0), rgba(14, 28, 34, .9) 6%, rgba(14, 28, 34, .9) 94%, rgba(14, 28, 34, 0));
  margin-top: clamp(60px, 14vh, 150px); overflow-x: clip; }
.seq-track { height: 460vh; position: relative; overflow-anchor: none; }
.seq-sticky {
  position: sticky; top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(290px, 3fr) 9fr;
  gap: 40px;
  align-items: center;
}
.seq-intro { padding-top: clamp(56px, 10vh, 110px); }
.seq-intro h2 { font: 600 clamp(1.8rem, 3vw, 2.8rem)/1.1 var(--display); letter-spacing: -.025em; margin: 14px 0 12px; max-width: 24ch; text-wrap: balance; }
.seq-hint { font: 400 .8rem/1.5 var(--mono); color: var(--ink-2); }
.seq-steps { display: grid; gap: 16px; }
.seq-steps li { position: relative; display: grid; grid-template-columns: 1.8rem 1fr; font-size: .92rem; color: var(--ink-2); padding-left: 12px; transition: color .3s; }
.seq-steps li::after { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: var(--line); transition: background .3s; }
.seq-steps li.on::after { background: var(--cta); }
.seq-steps li::before { content: attr(data-n); font: 500 .72rem/1.9 var(--mono); color: var(--ink-2); grid-row: span 2; }
.seq-steps li b { font: 500 1.08rem/1.3 var(--display); color: var(--step); transition: color .3s; }
.seq-steps li.on b { color: var(--ink); }
.seq-steps li.on::before { color: var(--cta); }
.seq-steps li.on { color: var(--ink); }

.stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 64px 1fr 64px 1fr 28px 1fr;
  gap: 22px 0;
  align-items: start;
}
.lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lines path { fill: none; stroke: var(--earth); stroke-width: 1.5; }
.lines path.dash { stroke: var(--ghost); stroke-dasharray: 5 4; }
.lines path.fan { stroke: var(--ink-2); stroke-opacity: .5; stroke-width: 1; }
.lines mask path { stroke: #fff; stroke-width: 8; stroke-opacity: 1; }
.lines path.fan.dash { stroke: var(--ghost); }

.col { position: relative; display: grid; gap: 10px; align-content: start; }
.col-ids { grid-column: 1; } .col-src { grid-column: 3; } .col-hits { grid-column: 5; } .col-rep { grid-column: 7; }
.col-h { font: 500 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }

.chip {
  position: relative; z-index: 1;
  background: var(--bg);
  font: 500 .74rem/1.3 var(--mono);
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: 10px 8px;
  overflow-wrap: break-word;
}
.chip--dashed { border-style: dashed; border-color: var(--ghost); }

.src {
  position: relative; z-index: 1;
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: 10px;
  display: grid;
  transition: opacity .4s, border-color .4s;
}
.src b { font: 500 .9rem var(--mono); }
.src small { font-size: .76rem; color: var(--ink-2); }
.stage:not([data-step="0"]) .src { opacity: 1; }
.stage[data-step="0"] .src { opacity: .4; }

.tray { margin-top: 26px; display: grid; gap: 30px; }
.tray .tok { width: calc(100% - 22px); }
.tray > .col-h { margin-bottom: -16px; }
.col-hits > .col-h { transition: opacity .3s; }
.stage.settle .col-hits > .col-h { opacity: .35; }
.tray .col-h { opacity: 0; transition: opacity .3s; }
.stage.sorted .tray .col-h { opacity: 1; }

.slots { display: grid; gap: 10px; }
.slot { display: block; width: calc(100% - 22px); height: var(--tok-h, 46px); border: 1px dashed transparent; border-radius: 2px; transition: border-color .3s; }
.stage[data-step="2"] .slot, .stage[data-step="3"] .slot { border-color: var(--line); }

.rgrp { border: 1px dashed var(--ghost); border-radius: 2px; padding: 10px; display: grid; gap: 8px; background: var(--surface); transition: border-color .4s; }
.rgrp + .rgrp { margin-top: 2px; }
.rgrp-h { font: 500 .95rem var(--display); }
.rgrp-h span { font: 400 .66rem var(--mono); color: var(--ink-2); margin-left: 6px; letter-spacing: .04em; }
.stage.filled .rgrp:not(.rgrp--plan) { border-style: solid; border-color: var(--edge-2); }

.tok {
  position: relative; z-index: 2;
  height: var(--tok-h, 46px);
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: 6px 10px;
  display: grid;
  align-content: center;
  will-change: transform, opacity;
  transition: border-color .25s, color .25s;
}
.tok b { font: 500 .84rem/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok small { font: 400 .72rem/1.2 var(--mono); color: var(--ink-2); }
.tok--leak { border-left: 3px solid var(--leak); }
.tok--leak small { color: var(--leak); }
/* Status Konta znany jest dopiero po odsianiu: do tego czasu Trafienie pokazuje tylko swoje Źródło. */
.tok .s-lvl { display: none; }
.stage.settle .tok .s-src { display: none; }
.stage.settle .tok .s-lvl { display: inline; }
.stage.settle .tok--maybe { border-style: dashed; border-color: var(--ghost); }
.stage.settle .tok--sure { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
.stage.settle .tok--sure small { color: var(--ok); }
.src--wait { border-style: dashed; border-color: var(--ghost); }
.stage:not([data-step="0"]) .src--wait { opacity: .62; }
.lvl { display: inline-block; margin-right: 8px; font: 500 .66rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 3px 5px 2px; border: 1px dashed var(--ghost); color: var(--ink-2); vertical-align: 1px; }
.lvl--sure { border: 1px solid var(--ok); color: var(--ok); }
.report[data-mode="raw"] .lvl { display: none; }
.tok .why { position: absolute; left: 0; top: calc(100% + 4px); white-space: nowrap; font: 400 .68rem/1.25 var(--mono); font-style: normal; color: var(--ink-2); opacity: 0; transition: opacity .3s; }
.tok.is-out { border-style: dashed; border-color: var(--ghost); color: var(--ink-2); }
.tok.is-out b { text-decoration: line-through; text-decoration-color: var(--ink-2); text-decoration-thickness: 1.5px; }
.stage.sorted .tok .why { opacity: 1; }

/* ---------- Scena 2 ---------- */
.s-report { padding-top: clamp(60px, 12vh, 140px); }
.report-head h2 { font: 600 clamp(1.8rem, 3vw, 2.8rem)/1.1 var(--display); letter-spacing: -.025em; margin-top: 14px; max-width: 22ch; text-wrap: balance; }
.report-grid { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; margin-top: 44px; align-items: start; }
.report-grid::before { left: -8%; top: -10%; width: 76%; height: 70%; }
.report {
  grid-column: 1 / 9;
  background: var(--surface);
  border: 1px solid var(--edge-2);
  border-radius: 3px;
  padding: 0 28px 28px;
  overflow: hidden;
  overflow-anchor: none;
  box-shadow: inset 0 1px 0 rgba(230, 234, 225, .05), 0 50px 100px -50px rgba(0, 0, 0, .9);
}
.report-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 0 -28px; padding: 24px 28px 20px; background: var(--surface-2); border-bottom: 1px solid var(--edge); }
.report-title { font: 600 1.55rem/1.1 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.report-ids small { font: 400 .68rem var(--mono); color: var(--ink-2); }
sup { font: 500 .62rem/0 var(--mono); }
sup a { text-decoration: none; padding: 0 2px; }
sup a:hover { text-decoration: underline; }

.toggle { display: inline-flex; border: 1px solid var(--edge); border-radius: 2px; }
.toggle button {
  font: 500 .8rem var(--mono);
  background: transparent; color: var(--ink);
  border: 0; padding: 10px 14px; cursor: pointer;
}
.toggle button + button { border-left: 1px solid var(--edge); }
.toggle button[aria-pressed="true"] { background: var(--cta); color: var(--bg); }
html:not(.js) .toggle { display: none; }

.raw-note { display: none; font: 400 .78rem var(--mono); color: var(--ink-2); margin-top: 18px; }
.raw-list { display: none; }
.report[data-mode="raw"] .raw-note, .report[data-mode="raw"] .raw-list { display: grid; gap: 0; }
.report[data-mode="raw"] .groups { display: none; }

.grp { padding-top: 22px; }
.grp h3 { font: 500 1.25rem var(--display); display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.count { font: 500 .72rem var(--mono); color: var(--ink-2); }
.plan { font: 500 .66rem var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1px dashed var(--ghost); padding: 3px 6px 2px; color: var(--ink-2); }
.grp--leak h3 .count { color: var(--leak); }

.item {
  display: grid;
  grid-template-columns: minmax(10rem, .95fr) 1.45fr minmax(12.5rem, 1fr);
  gap: 4px 18px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.item b { font-weight: 500; }
.item .what { color: var(--ink-2); font-size: .95rem; }
.item .from { font: 400 .74rem var(--mono); color: var(--ink-2); text-align: right; }
.item .why { grid-column: 1 / -1; font: 400 .74rem var(--mono); color: var(--ink-2); }
.item--leak b { color: var(--leak); }
.item--leak { box-shadow: inset 3px 0 0 var(--leak); padding-left: 12px; }
.item--out b { text-decoration: line-through; text-decoration-color: var(--ink-2); text-decoration-thickness: 1.5px; color: var(--ink-2); }
.report[data-mode="raw"] .item b { text-decoration: none; color: var(--ink); }
.report[data-mode="raw"] .item .why { display: none; }
.report[data-mode="raw"] .item--leak b { color: var(--ink); }
.report[data-mode="raw"] .item--leak { box-shadow: none; padding-left: 0; }

.grp--plan .plan-list { border: 1px dashed var(--ghost); border-radius: 2px; padding: 6px 14px; }
.plan-list li { padding: 8px 0; color: var(--ink-2); }
.plan-list li + li { border-top: 1px dashed var(--line); }

.notes { grid-column: 9 / 13; padding-top: 8px; }
.notes ol { display: grid; gap: 18px; counter-reset: n; }
.notes li { counter-increment: n; position: relative; padding-left: 1.6rem; font-size: .9rem; color: var(--ink-2); }
.notes li::before { content: counter(n); position: absolute; left: 0; font: 500 .72rem/1.9 var(--mono); color: var(--ink); }
.notes li b { color: var(--ink); font-weight: 500; }
.notes li a { text-decoration: none; margin-left: 4px; }
.notes li:target { color: var(--ink); }

/* ---------- Scena 3 ---------- */
.s-terms { padding-block: clamp(100px, 20vh, 220px); }
.s-terms h2 { font: 600 clamp(1.8rem, 3vw, 2.8rem)/1.1 var(--display); margin-bottom: 44px; }
.terms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 64px; counter-reset: t 5; }
.terms li { counter-increment: t; display: grid; grid-template-columns: 2.2rem 1fr; color: var(--ink-2); max-width: 46ch; }
.terms li::before { content: counter(t); font: 500 .8rem/2.1 var(--mono); color: var(--ink); grid-row: span 2; }
.terms li b { display: block; font: 500 1.45rem/1.25 var(--display); color: var(--ink); margin-bottom: 6px; }

/* ---------- Scena 4 ---------- */
.s-join { position: relative; isolation: isolate; text-align: center; padding-top: clamp(120px, 22vh, 220px); padding-bottom: clamp(80px, 14vh, 160px); }
.s-join::before { left: 50%; bottom: 4%; width: min(900px, 120%); height: 70%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(191, 208, 74, .13), rgba(191, 208, 74, 0)); }
.thread--end { top: 0; height: clamp(90px, 18vh, 190px); }
.thread--end i { transition: transform 1.1s var(--ease); }
.thread--end.drawn i { transform: scaleY(1); }
.s-join h2 { font: 600 clamp(2rem, 3.6vw, 3.3rem)/1.08 var(--display); letter-spacing: -.01em; max-width: 20ch; margin: 0 auto 36px; text-wrap: balance; }
.join { max-width: 560px; margin: 0 auto; text-align: left; }
.join label { display: block; font: 500 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.join-row { display: flex; gap: 10px; }
.join input {
  flex: 1; min-width: 0;
  font: 500 1rem var(--mono);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: 15px 14px;
}
.join input::placeholder { color: var(--ink-2); opacity: .7; }
.join input[aria-invalid="true"] { border-color: var(--leak); border-width: 2px; padding: 14px 13px; }
.err { color: var(--leak); font-size: .9rem; margin-top: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .86rem; line-height: 1.5; color: var(--ink-2); margin-top: 12px; }
.form-note a { color: var(--ink); }
.join button:disabled { opacity: .6; cursor: progress; }
.state { font: 400 .78rem/1.45 var(--mono); color: var(--ink-2); margin-top: 14px; border-left: 2px dashed var(--ghost); padding-left: 10px; }
.state.after { color: var(--ink); border-left-style: solid; border-left-color: var(--ok); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 28px 40px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .top-nav a:not(.top-cta) { display: none; }
  .s-open { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 28px; }
  .open-text { grid-column: 1 / -1; min-width: 0; min-height: 0; }
  .hero-art { position: relative; grid-column: 1 / -1; grid-row: 2; top: auto; left: 50%; width: 100vw; height: 340px; margin-top: 16px; transform: translateX(-50%); }
  .hero-art img { object-position: 80% center; }
  .hero-network { left: 80%; width: max(100%, 604.12px); transform: translate(-80%, -50%); }
  .open-card { margin-top: 44px; margin-left: 0; }
  .stats { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .thread--open { left: 50%; }
  .thread--open { height: clamp(56px, 9vh, 100px); }
  .s-seq {
  background: linear-gradient(180deg, rgba(14, 28, 34, 0), rgba(14, 28, 34, .9) 6%, rgba(14, 28, 34, .9) 94%, rgba(14, 28, 34, 0));
  margin-top: clamp(90px, 14vh, 140px); }
  .sheet-grp:nth-of-type(n+2) { display: none; }
  .sheet-meta div { grid-template-columns: 1fr; gap: 2px; }

  .seq-track { height: 380vh; }
  .seq-sticky { grid-template-columns: 1fr; align-content: start; gap: 14px; padding-top: 18px; padding-bottom: 12px; }
  .seq-intro { padding-top: 48px; }
  .seq-intro h2 { font-size: 1.6rem; }
  .seq-steps { display: block; min-height: 4.6em; }
  .seq-steps li { display: none; opacity: 1; font-size: .85rem; }
  .seq-steps li.on { display: grid; }
  .seq-steps li b { font-size: 1rem; }

  .stage {
    --tok-h: 32px;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "ids ids" "src src" "zone zone";
    gap: 12px 10px;
  }
  .col-h { font-size: .64rem; margin-bottom: 0; }
  .col { grid-column: auto; }
  .col-ids { grid-area: ids; grid-template-columns: 1fr 1fr; gap: 8px; }
  .col-ids .col-h { grid-column: 1 / -1; }
  .chip { padding: 6px 8px; font-size: .72rem; }
  .chip small { display: block; margin: 0; }
  .col-src { grid-area: src; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .col-src > .col-h { grid-column: 1 / -1; }
  .src { padding: 6px 8px; }
  .src b { font-size: .78rem; }
  .src small { font-size: .66rem; line-height: 1.25; }
  .tray { grid-column: 1 / -1; grid-row: 5; margin-top: 6px; grid-template-columns: 1fr; gap: 4px; }
  .tray > .col-h { margin-bottom: 0; }
  .col-hits, .col-rep { grid-area: zone; }
  .slots { gap: 4px; }
  .slot { width: calc(100% - 18px); }
  .tray .tok { width: 100%; }
  .rgrp { padding: 6px 8px; gap: 4px; }
  .rgrp-h { font-size: .82rem; }
  .col-rep { gap: 6px; }
  .col-rep > .col-h, .rgrp-h { transition: opacity .3s; }
  .stage:not(.settle) .col-rep > .col-h, .stage:not(.settle) .rgrp-h { opacity: 0; }
  .stage:not(.settle) .rgrp { border-color: transparent; background: transparent; }
  .stage.settle .col-hits { opacity: 0; }
  .col-hits { transition: opacity .3s; }
  .tok { padding: 3px 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
  .tok b { font-size: .76rem; }
  .tok small { font-size: .64rem; }
  .tray .tok small { display: none; }
  .tok .why { position: static; white-space: normal; overflow-wrap: anywhere; text-align: right; margin-left: auto; font-size: .75rem; line-height: 1.1; }
  .tray .tok b { flex: 0 0 auto; }

  .report-grid { grid-template-columns: 1fr; margin-top: 28px; }
  .report, .notes { grid-column: 1 / -1; }
  .report { padding: 0 18px 18px; }
  .report-bar { margin: 0 -18px; padding: 18px; }
  .notes { margin-top: 28px; }
  .item { grid-template-columns: 1fr; gap: 2px; }
  .item .from { text-align: left; }

  .terms { grid-template-columns: 1fr; gap: 32px; }
  .s-join { text-align: left; }
  .s-join h2 { margin-left: 0; }
  .thread--end { left: var(--gut); }
  .join-row { flex-direction: column; }
}

/* Ograniczony ruch i brak JS: sekwencja jako statyczne kroki w stanie końcowym */
html.rm .seq-track, html.compact .seq-track, html:not(.js) .seq-track { height: auto; }
html.rm .seq-sticky, html.compact .seq-sticky, html:not(.js) .seq-sticky { position: static; height: auto; padding-block: 40px; }
html.rm .seq-steps li, html.compact .seq-steps li, html:not(.js) .seq-steps li { opacity: 1; display: grid; }
html.rm .seq-steps, html.compact .seq-steps, html:not(.js) .seq-steps { display: grid; }
html.rm .col-hits, html.compact .col-hits, html:not(.js) .col-hits { display: none; }
html.rm .stage, html:not(.js) .stage { grid-template-columns: 1fr 64px 1fr 0 0 64px 1fr; }
html:not(.js) .tok .why { opacity: 1; }
html:not(.js) .tok.is-rej { border-style: dashed; border-color: var(--ghost); color: var(--ink-2); }
html:not(.js) .tok.is-rej b { text-decoration: line-through; text-decoration-color: var(--ink-2); text-decoration-thickness: 1.5px; }
@media (max-width: 860px) {
  html.rm .stage, html.compact .stage, html:not(.js) .stage { grid-template-columns: 1fr 1fr; }
  html:not(.js) .stage .rgrp-h, html:not(.js) .col-rep > .col-h { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-network { display: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media (max-width: 860px) and (max-height: 760px) {
  .stage { --tok-h: 25px; gap: 8px; }
  .seq-sticky { padding-top: 10px; gap: 8px; }
  .seq-steps { min-height: 0; }
  .chip, .src { padding: 4px 6px; }
  .slots, .tray, .col-rep, .rgrp { gap: 3px; }
  .rgrp { padding: 4px 8px; }
  .tok b { font-size: .72rem; }
}
@media (max-width: 860px) {
  html.rm .tray .tok, html.compact .tray .tok, html:not(.js) .tray .tok { height: auto; min-height: 36px; }
}
html:not(.js) .tok .s-src { display: none; }
html:not(.js) .tok .s-lvl { display: inline; }
html:not(.js) .tok--maybe { border-style: dashed; border-color: var(--ghost); }
html:not(.js) .tok--sure { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
