/* ══════════════════════════════════════════════════════════════════════════
   OPERACJA TURKUS - system wizualny SIGNAGE
   Przeniesiony 1:1 z pliku Paper "OPERACJA ZAKALEC - Redesign".
   Wszystkie wartości (kolory, stopnie pisma, interlinie, światła, ramki,
   cienie, obroty) pochodzą z artboardów 01-15. Zero zasobów z sieci.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── pismo (lokalne pliki, bez CDN) ─────────────────────────────────────── */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Bitter - pismo prowadzące całego projektu (2026-08-16).
   Zainstalowana odmiana statyczna ma tylko 400 i 700, więc rozciągamy zakresy:
   500/600 biorą Regular, 800/900 biorą Bold. Dzięki temu przeglądarka nie
   dorabia sztucznego pogrubienia, tylko sięga po prawdziwy krój. */
@font-face {
  font-family: 'Bitter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('/static/fonts/bitter-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Bitter'; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url('/static/fonts/bitter-bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Bitter'; font-style: italic; font-weight: 400 600; font-display: swap;
  src: url('/static/fonts/bitter-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Bitter'; font-style: italic; font-weight: 700 900; font-display: swap;
  src: url('/static/fonts/bitter-bolditalic.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/static/fonts/plexmono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/static/fonts/plexmono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/static/fonts/plexmono-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/static/fonts/plexmono-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/plexmono-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/plexmono-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── tokeny (1:1 z Paper) ───────────────────────────────────────────────── */

:root {
  --bg:      #FFFFFF;   /* tło stron */
  --surface: #F2F1EC;   /* powierzchnia wtórna, rubryki */
  --line:    #E0DED6;   /* linie pomocnicze */
  --ink:     #141412;   /* atrament, tekst główny */
  --ink-2:   #3C3B36;   /* tekst drugorzędny */
  --mut:     #8A8880;   /* etykiety wyciszone */
  --brand:   #FFC400;   /* żółty szyldowy, jedyny akcent marki */
  --ok:      #1E6B45;   /* zieleń emaliowana, sukces */
  --alarm:   #C8271D;   /* czerwień plombowa, wyłącznie alarm */

  /* warstwy na ciemnym (raport, sterownik, panel lewy) */
  --d-2:   #22211E;
  --d-3:   #2A2925;
  --d-line:#3C3B36;
  --d-mut: #6F6E66;
  --d-txt: #9A988F;
  --d-txt2:#C9C7BE;
  --d-txt3:#E6E4DC;

  --font-display: 'Bitter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --tr-tight: -0.02em;
  --tr-wide:   0.08em;
  --tr-caps:   0.14em;
}

/* ── podstawy ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

/* atrybut hidden MUSI wygrywać z każdym display ustawionym klasą,
   inaczej kroki blokady i stany finału renderują się naraz */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  line-height: 23px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 900; letter-spacing: var(--tr-tight); }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.karta-ciemna :focus-visible, .raport-strona :focus-visible { outline-color: var(--brand); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 90;
  background: var(--ink); color: #FFF; padding: 12px 16px;
  font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: var(--tr-caps);
}
.skip:focus { left: 0; }

body.busy { cursor: progress; }

/* ── typografia pomocnicza ──────────────────────────────────────────────── */

.mono { font-family: var(--font-mono); font-weight: 600; }
.mut  { color: var(--mut); }
.maly { font-size: 12px; line-height: 17px; }

.h-mala {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.22em; color: var(--mut);
  text-transform: uppercase;
}
.h-linia {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.22em; color: var(--mut);
}
.akta-linia {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: var(--tr-caps); color: var(--mut);
  text-transform: uppercase;
}
.blad {
  font-family: var(--font-mono); font-weight: 600; font-size: 12px;
  color: var(--alarm); border-left: 4px solid var(--alarm);
  padding: 9px 12px; background: #FBEDEC;
}
.hint-linia {
  font-family: var(--font-display); font-weight: 500; font-size: 13px; line-height: 19px;
  color: var(--ink-2); background: var(--surface);
  border-left: 4px solid var(--brand); padding: 11px 13px;
}

/* ── chrome: topbar ─────────────────────────────────────────────────────── */

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px 12px;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-seal {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--brand); border: 2px solid var(--ink);
}
.brand-seal::after {
  content: 'HG';
  font-family: var(--font-display); font-weight: 900;
  font-size: 13px; letter-spacing: 0.02em; color: var(--ink);
}
.brand-txt { display: flex; flex-direction: column; gap: 1px; }
.brand-txt b {
  font-family: var(--font-display); font-weight: 800;
  font-size: 13px; letter-spacing: 0.1em; color: var(--ink);
}
.brand-txt small {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 8px; letter-spacing: 0.22em; color: var(--mut);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.brand-txt b, .brand-txt small { white-space: nowrap; }
/* na telefonie topbar ma tylko markę i DZIENNIK (jak w projekcie);
   zegar wraca dopiero na desktopie, gdzie jest na niego miejsce */
.clock { display: none; align-items: center; gap: 7px; }
.clock::before {
  content: ''; width: 8px; height: 8px; border-radius: 999px;
  background: var(--ok); flex-shrink: 0;
}
.clock-label { display: none; }
.clock-val {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 12px; letter-spacing: 0.06em; color: var(--ink);
}

.topbar .btn-ghost {
  display: flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 9px 12px;
  background: var(--bg); border: 2px solid var(--ink);
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: var(--tr-caps); color: var(--ink);
  cursor: pointer;
}
.topbar .btn-ghost:hover { background: var(--brand); }

/* pasek postępu */
.postep-bar {
  display: flex; height: 6px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.postep-bar i {
  display: block; width: 0; height: 100%;
  background: var(--brand); border-right: 2px solid var(--ink);
  transition: width .3s ease;
}

.offline {
  padding: 13px 16px; background: var(--alarm); color: #FFF;
  font-family: var(--font-display); font-weight: 700;
  font-size: 12px; line-height: 17px;
}

.stopka {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 28px 28px; border-top: 1px dashed var(--line); text-align: center;
}
.stopka > span:first-child {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 9px; letter-spacing: 0.2em; color: var(--mut);
}
.stopka-tip {
  font-family: var(--font-display); font-weight: 400;
  font-size: 12px; line-height: 17px; color: var(--mut);
}

.page { padding: 24px 20px 28px; }

/* ── prymitywy: przyciski ───────────────────────────────────────────────── */

.btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 18px; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 800;
  font-size: 14px; letter-spacing: 0.12em; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-czerwony { background: var(--ink); color: #FFF; box-shadow: 4px 4px 0 0 var(--brand); }
.btn-czerwony:hover { background: #000; }
.btn-czerwony:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 0 var(--brand); }
.btn-zloty {
  background: var(--brand); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 0 var(--ink);
}
.btn-zloty:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 0 var(--ink); }
.btn-ghost {
  background: var(--bg); color: var(--ink); border: 2px solid var(--ink);
  font-size: 12px; letter-spacing: var(--tr-wide);
}
.btn-ghost:hover { background: var(--surface); }
.btn-duzy { min-height: 58px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

.btn-mini {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 0 12px; cursor: pointer;
  background: var(--bg); color: var(--ink); border: 2px solid var(--ink);
  font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: 0.04em;
}
.btn-mini:hover { background: var(--brand); }
.btn-mini-czerwony { border-color: var(--alarm); color: var(--alarm); }
.btn-mini-czerwony:hover { background: var(--alarm); color: #FFF; }

/* ── prymitywy: pola ────────────────────────────────────────────────────── */

.pole {
  display: flex; align-items: center; width: 100%;
  min-height: 56px; padding: 0 16px;
  background: var(--bg); border: 2px solid var(--ink);
  font-family: var(--font-mono); font-weight: 600;
  font-size: 18px; letter-spacing: 0.24em; color: var(--ink);
}
.pole::placeholder { color: var(--mut); font-weight: 500; letter-spacing: 0.24em; }
.pole:focus { outline: 3px solid var(--brand); outline-offset: -1px; border-color: var(--ink); }
.pole-haslo { text-align: center; font-size: 22px; letter-spacing: 0.3em; }
.pole-litera { text-align: center; font-size: 26px; letter-spacing: 0; width: 72px; min-width: 72px; }
.pole-mini {
  min-height: 42px; font-size: 13px; letter-spacing: 0.02em;
  font-family: var(--font-display); font-weight: 500;
}
textarea.pole { padding: 12px 16px; line-height: 20px; resize: vertical; }
.pole-label {
  display: flex; flex-direction: column; gap: 5px;
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.14em; color: var(--mut);
}

/* kratki na kody */
.kratki { display: flex; gap: 5px; }
.kratka {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 48px; padding: 0; flex: 0 0 auto;
  background: var(--bg); border: 2px solid var(--line);
  font-family: var(--font-mono); font-weight: 700; font-size: 22px;
  color: var(--ink); text-align: center; caret-color: var(--brand);
}
.kratka.pelna { background: var(--surface); border-color: var(--ink); }
.kratka::placeholder { color: var(--line); font-weight: 500; }
.kratka:focus { outline: 0; border-color: var(--brand); border-width: 2px; background: var(--bg); }
.kratki-duze { gap: 10px; justify-content: center; }
.kratki-duze .kratka {
  width: 64px; height: 76px; border-width: 3px; font-size: 36px;
}

/* ── prymitywy: chipy, stemple, karty ───────────────────────────────────── */

.chip {
  display: inline-flex; align-items: center; padding: 5px 9px;
  background: var(--surface); border: 1px solid var(--line);
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.1em; color: var(--ink-2);
}
.chip-ok     { background: var(--ok); border-color: var(--ok); color: #FFF; }
.chip-tok    { background: var(--brand); border-color: var(--ink); color: var(--ink); }
.chip-awaria { background: var(--alarm); border-color: var(--alarm); color: #FFF; }

.stempel {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 10px; border: 2.5px solid var(--alarm);
  font-family: var(--font-display); font-weight: 800;
  font-size: 11px; letter-spacing: 0.18em; color: var(--alarm);
  transform: rotate(-3deg);
}
.stempel-zielony { border-color: var(--ok); color: var(--ok); }
.stempel-czerwony { border-color: var(--alarm); color: var(--alarm); }
.st-duzy {
  font-size: 11px; letter-spacing: 0.12em; padding: 8px 12px; border-width: 2.5px;
  max-width: 100%;
}

.karta { background: var(--bg); border: 2px solid var(--ink); padding: 18px 16px; }
.karta-papier { background: var(--bg); }
.karta-alarm { border: 2px dashed var(--alarm); }

.okruszki {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.12em; color: var(--mut);
  margin-bottom: 20px;
}
.okruszki a { color: var(--mut); }
.okruszki a:hover { color: var(--ink); }
.okruszki b { color: var(--ink); font-weight: 700; }
.okruszki span { color: var(--line); }

.link-cichy {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 10px; letter-spacing: 0.1em; color: var(--mut);
  border-bottom: 2px solid var(--brand); padding-bottom: 2px;
}
.link-cichy:hover { color: var(--ink); }

/* ── toasty ─────────────────────────────────────────────────────────────── */

.toasty {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  padding: 13px 16px; background: var(--ink); color: #FFF;
  border-left: 4px solid var(--brand);
  font-family: var(--font-display); font-weight: 500;
  font-size: 13px; line-height: 19px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.in { opacity: 1; transform: none; }
.toast-blad { border-left-color: var(--alarm); }
.toast-narrator { border-left-color: var(--brand); }

/* ── dialogi ────────────────────────────────────────────────────────────── */

dialog {
  padding: 0; border: 0; background: transparent;
  max-width: 100%; max-height: 100%;
}
dialog::backdrop { background: rgba(20, 20, 18, .55); }
.dlg {
  width: min(420px, calc(100vw - 32px));
  background: var(--bg); border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 0 rgba(0, 0, 0, .45);
}
.dlg-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px; background: var(--ink);
}
.dlg-head h2 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 16px; letter-spacing: 0.04em; color: #FFF;
}
.dlg-x {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0; cursor: pointer;
  background: transparent; border: 2px solid var(--d-line); color: #FFF;
  font-size: 20px; line-height: 1;
}
.dlg-x:hover { border-color: var(--brand); color: var(--brand); }
.dlg-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; }
.dlg-body p { font-size: 14px; line-height: 21px; color: var(--ink); }
.dlg-akcje { display: flex; gap: 10px; margin-top: 4px; }
.dlg-akcje .btn { flex: 1; }

.dlg-dziennik { width: min(460px, calc(100vw - 24px)); }
.dziennik-lista {
  display: flex; flex-direction: column;
  max-height: 60vh; overflow-y: auto;
}
.dziennik-lista li {
  display: flex; gap: 12px; padding: 12px 16px;
  border-bottom: 1px dashed var(--line);
  font-size: 13px; line-height: 18px; color: var(--ink-2);
}
.dziennik-lista li .mono {
  flex-shrink: 0; width: 40px;
  font-weight: 700; font-size: 11px; color: var(--ink);
}

#konfetti {
  position: fixed; inset: 0; z-index: 80;
  width: 100%; height: 100%;   /* bufor rysowania = innerWidth, więc bez rozciągania */
  pointer-events: none; display: none;
}

/* ══ 01 · BLOKADA ═══════════════════════════════════════════════════════ */

.page-lock { padding: 0; }
.lock {
  display: flex; flex-direction: column;
  min-height: calc(100vh - 200px);
}
.lock-szyld { display: none; }
.lock-karta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; gap: 28px; padding: 32px 28px; border: 0;
}
.pole-etykieta {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.2em; color: var(--mut);
}
.lock-form .pole-etykieta { margin-bottom: -8px; }
.seal-duzy {
  display: flex; align-items: center; justify-content: center;
  width: 88px; height: 88px; flex-shrink: 0;
  background: var(--ink); border-radius: 999px; transform: rotate(-6deg);
}
/* pieczęć otwiera scenę: górny auto-margines równoważy stopkę,
   więc treść siedzi na środku, a stopka na dole (artboard 01) */
body[data-page="lock"] .seal-duzy { margin-top: auto; }
/* widok wejściowy: zostaje sama nazwa operacji (decyzja 2026-08-14) */
body[data-page="lock"] .brand-txt small { display: none; }
body[data-page="lock"] .stopka { display: none; }
.seal-duzy span {
  font-family: var(--font-display); font-weight: 900; line-height: 1;
  font-size: 26px; letter-spacing: 0.02em; color: var(--brand);
}
.seal-szary { background: var(--mut); }
.lock-status {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 11px; letter-spacing: 0.24em; color: var(--mut); text-align: center;
}
.lock-status.ok { color: var(--ok); }
.lock-krok { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.lock-h {
  font-family: var(--font-display); font-weight: 900;
  font-size: 33px; line-height: 36px; letter-spacing: -0.01em;
  color: var(--ink); text-align: center;
}
.lock-krok > .mut {
  font-family: var(--font-display); font-weight: 400;
  font-size: 15px; line-height: 23px; color: var(--ink-2);
  text-align: center; max-width: 310px; margin-top: 4px;
}
.lock-krok .lock-h + .mut { margin-top: 8px; }
.lock-h::after {
  content: ''; display: block; width: 56px; height: 4px;
  background: var(--brand); margin: 12px auto 0;
}
.lock-form {
  display: flex; flex-direction: column; gap: 14px;
  width: 100%; max-width: 320px; margin-top: 8px;
}
.lock-form .pole { min-height: 58px; }
.lock-form .btn { min-height: 58px; font-size: 15px; letter-spacing: var(--tr-caps); }
.lock-stopka {
  align-self: stretch; margin-top: auto;
  padding: 16px 0 0; border-top: 1px dashed var(--line);
  font-family: var(--font-display); font-weight: 400;
  font-size: 12px; line-height: 17px; color: var(--mut); text-align: center;
}
.tab-rozdzielnik {
  width: 100%; max-width: 320px; border-collapse: collapse;
  border: 2px solid var(--ink); margin: 4px 0;
}
.tab-rozdzielnik td {
  padding: 9px 12px; border-bottom: 1px dashed var(--line);
  font-family: var(--font-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.06em;
}
.tab-rozdzielnik tr:last-child td { border-bottom: 0; }
.tab-rozdzielnik td.mono {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 11px; letter-spacing: 0; color: var(--mut); text-align: right;
}
#krok-rozdzielnik .kratki { justify-content: center; }

/* ══ 02 · BRIEFING ══════════════════════════════════════════════════════ */

.briefing { display: flex; justify-content: center; }
.brief-karta {
  display: flex; flex-direction: column; gap: 22px;
  width: 100%; max-width: 760px; border: 0; padding: 4px 0 0;
}
.brief-head { display: flex; flex-direction: column; gap: 14px; }
.brief-head .stempel { align-self: flex-start; }
.brief-head .akta-linia {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 9px; letter-spacing: 0.16em; color: var(--mut);
  order: -1; align-self: flex-end; margin-top: -26px;
}
/* w briefingu stempel i metka siedzą w jednym wierszu (artboard 02) */
.briefing .brief-head {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 14px 12px;
}
.briefing .brief-head .stempel { grid-column: 1; grid-row: 1; justify-self: start; }
.briefing .brief-head .akta-linia {
  grid-column: 2; grid-row: 1; order: 0; align-self: center; margin: 0;
}
.briefing .brief-head h1 { grid-column: 1 * -1; }
.brief-head h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 38px; line-height: 40px; letter-spacing: var(--tr-tight); color: var(--ink);
}
.brief-head h1::after {
  content: ''; display: block; width: 72px; height: 5px;
  background: var(--brand); margin-top: 14px;
}
.brief-tresc { display: flex; flex-direction: column; gap: 16px; counter-reset: akapit; }
.brief-akapit {
  display: flex; gap: 12px;
  font-family: var(--font-display); font-weight: 400;
  font-size: 15px; line-height: 22px; color: var(--ink);
}
.brief-akapit::before {
  counter-increment: akapit;
  content: '0' counter(akapit);
  flex-shrink: 0; width: 22px;
  font-family: var(--font-mono); font-weight: 600;
  font-size: 11px; line-height: 22px; color: var(--mut);
}
/* puenta briefingu: ostatni akapit jako wyróżniony blok (artboard 02) */
.brief-puenta {
  padding: 16px 18px; background: var(--surface); border-left: 4px solid var(--ink);
  font-family: var(--font-display); font-weight: 800;
  font-size: 17px; line-height: 22px; letter-spacing: 0.01em; color: var(--ink);
}
.brief-stopka { display: flex; flex-direction: column; gap: 16px; }
.pieczec-mala {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--ink); border-radius: 999px; transform: rotate(-6deg);
  font-family: var(--font-display); font-weight: 900; line-height: 1;
  font-size: 15px; color: var(--brand);
}
.kod-chip b, .kafel-postep, #final-pary, .stat b, .st-para b, .ma-ok b { line-height: 1.2; }
.kod-klodki { line-height: 1.1; }
.brief-stopka .btn { min-height: 58px; }

/* ══ 03 · TABLICA AGENTEK ═══════════════════════════════════════════════ */

.tablica { display: flex; flex-direction: column; gap: 20px; }
/* na telefonie kolumny rozpuszczone: dzieci układają się w kolejności z projektu */
.tab-kol { display: contents; }
.tablica .sekcja-head   { order: 1; }
.tablica .co-teraz      { order: 2; }
.tablica .portrety      { order: 3; }
.tablica .sygnatura     { order: 4; }
.tablica .sekcje-panel  { order: 5; }
.tablica .kody-panel    { order: 6; }
.tablica .legenda       { order: 7; }
.notatka-centrali { display: none; }

/* nagłówek tablicy: licznik po lewej, link po prawej, jeden wiersz */
.tablica .sekcja-head {
  display: grid; grid-template-columns: 1fr auto;
  align-items: baseline; gap: 6px 12px;
}
.tablica .sekcja-head h1 { grid-column: 1 * -1; }
.tablica .sekcja-head .link-cichy { justify-self: end; align-self: baseline; margin: 0; }

.sekcja-head { display: flex; flex-direction: column; gap: 6px; }
.sekcja-head h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 30px; line-height: 32px; letter-spacing: -0.015em; color: var(--ink);
}
.sekcja-head p {
  font-family: var(--font-display); font-weight: 400;
  font-size: 14px; color: var(--ink-2);
}
.sekcja-head .link-cichy { align-self: flex-start; margin-top: 2px; }

/* karteczka CO TERAZ */
.co-teraz {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; background: var(--brand);
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 0 var(--ink);
}
.co-teraz b {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 10px; letter-spacing: 0.2em; color: var(--ink);
}
.co-teraz p {
  font-family: var(--font-display); font-weight: 500;
  font-size: 14px; line-height: 20px; color: var(--ink);
}

/* siatka akt */
.portrety { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.portret {
  display: flex; flex-direction: column; padding: 0; cursor: pointer;
  background: var(--bg); border: 2px solid var(--line); text-align: left;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.portret:hover { box-shadow: 4px 4px 0 0 var(--brand); }
.portret.solved { border-color: var(--ink); }

.portret-foto {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  height: 118px; background: var(--surface); overflow: hidden;
}
.portret.solved .portret-foto { background: var(--ink); }
.portret-inicjal {
  font-family: var(--font-display); font-weight: 900;
  font-size: 56px; line-height: 1; color: var(--line);
}
.portret.solved .portret-inicjal { color: var(--brand); }
.portret-rubryka {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 7px; letter-spacing: 0.2em; color: var(--mut); text-align: center;
}
.portret.solved .portret-rubryka { display: none; }
.portret-foto img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.portret-foto.ma-foto .portret-inicjal,
.portret-foto.ma-foto .portret-rubryka { display: none; }
/* styl AKTA: zdjęcie zabarwione kolorem kolekcji */
.portret-foto.foto-duo::after {
  content: ''; position: absolute; inset: 0;
  background: var(--akcent, var(--ink)); mix-blend-mode: color; opacity: .85;
}
.portret-foto.foto-duo img { filter: grayscale(1) contrast(1.08); }
.portret:not(.solved) .portret-foto.ma-foto img { filter: grayscale(1) opacity(.45); }

.portret-litera {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: var(--brand); border: 2px solid var(--ink);
  font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--ink);
}
.portret-moj {
  position: absolute; top: 12px; left: -6px; z-index: 2;
  padding: 5px 10px; background: var(--ink); transform: rotate(-3deg);
  font-family: var(--font-mono); font-weight: 700;
  font-size: 10px; letter-spacing: var(--tr-caps); color: var(--brand);
}
.portret-meta { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; }
.portret-meta b {
  font-family: var(--font-display); font-weight: 800;
  font-size: 13px; letter-spacing: 0.06em; color: var(--ink);
}
.portret-meta i {
  font-style: normal; font-family: var(--font-display); font-weight: 400;
  font-size: 11px; color: var(--mut);
}
.portret-meta small {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 8px; letter-spacing: var(--tr-caps); color: var(--mut);
}
.portret.solved .portret-meta i { color: var(--ink-2); }
.portret.solved .portret-meta small { color: var(--ok); }
.portret.nowy { animation: wbicie .4s ease; }
@keyframes wbicie {
  0%   { transform: scale(.94); }
  60%  { transform: scale(1.02); }
  100% { transform: none; }
}

/* brama sygnatury */
.sygnatura {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 16px 20px; border: 2px solid var(--ink);
}
.sygnatura h2 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 17px; letter-spacing: 0.02em; color: var(--ink);
}
.sygnatura > .mut {
  font-family: var(--font-display); font-weight: 400;
  font-size: 13px; line-height: 18px; color: var(--ink-2);
}
.sygnatura form { display: flex; flex-direction: column; gap: 12px; }
.sygnatura .kratki { gap: 5px; justify-content: space-between; }
.sygnatura .kratka { width: 38px; height: 48px; font-size: 22px; border-width: 2px; }
.sygnatura .btn { min-height: 52px; }

/* wariant główny: sygnatura siedzi pod portretami i jest największym elementem strony */
.sygnatura-duza { margin-top: 20px; padding: 26px 22px 24px; gap: 16px; }
.sygnatura-duza h2 { font-size: 26px; line-height: 1.1; }
.sygnatura-duza > .mut { font-size: 15px; line-height: 22px; }
.sygnatura-duza .kratka { width: 54px; height: 66px; font-size: 30px; }
.sygnatura-duza .btn { min-height: 62px; font-size: 16px; }
.apel-fair {
  padding: 14px 16px; border: 3px solid var(--alarm); background: #FFF;
  font-family: var(--font-display); font-weight: 700;
  font-size: 17px; line-height: 24px; color: var(--alarm);
}
@media (max-width: 520px) {
  .sygnatura-duza .kratka { width: 100%; height: 56px; font-size: 24px; }
  .sygnatura-duza .kratki { gap: 4px; }
  .apel-fair { font-size: 15px; line-height: 21px; }
}
#sygnatura-odliczanie {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 10px; letter-spacing: 0.06em; color: var(--mut);
}

/* pytanie kontrolne przed wysłaniem hasła */
.haslo-pytanie {
  font-family: var(--font-display); font-weight: 400;
  font-size: 18px; line-height: 26px; color: var(--ink);
}
.haslo-pytanie b { font-weight: 800; }

/* ── strona TECZKI: rozdroże po przyjęciu hasła ─────────────────────────── */
.teczki-strona { display: flex; flex-direction: column; gap: 22px; }
.teczki-head { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.teczki-head h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 40px; line-height: 1; letter-spacing: -0.01em; color: var(--ink);
}
.teczki-lead {
  font-family: var(--font-display); font-weight: 400;
  font-size: 17px; line-height: 25px; color: var(--ink);
}
.teczki-lead b { font-weight: 800; }
.teczki-grid { display: grid; gap: 14px; }
.teczka-btn {
  display: flex; flex-direction: column; gap: 6px;
  padding: 24px 22px; background: var(--ink); color: #FFF;
  border: 3px solid var(--ink); box-shadow: 6px 6px 0 0 var(--akcent);
  text-decoration: none; transition: transform .12s, box-shadow .12s;
}
.teczka-btn:hover { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 0 var(--akcent); }
.teczka-kicker {
  font-weight: 600; font-size: 10px;
  letter-spacing: var(--tr-wide); color: var(--akcent);
}
.teczka-nazwa {
  font-family: var(--font-display); font-weight: 900;
  font-size: 32px; line-height: 1.05; color: #FFF;
}
.teczka-opis {
  font-family: var(--font-display); font-weight: 400;
  font-size: 14px; line-height: 20px; color: #C9C6BE;
}
.teczka-stopka {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; padding-top: 10px; border-top: 2px solid #3A3A36;
}
.teczka-stopka i {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 15px; font-style: normal; color: var(--akcent);
}
.teczka-stopka em {
  font-family: var(--font-display); font-weight: 800;
  font-size: 14px; font-style: normal; letter-spacing: 0.08em; color: #FFF;
}
.teczka-gotowa { opacity: 0.62; }
.teczka-gotowa .teczka-stopka em::after { content: ' ✓'; color: var(--akcent); }
@media (min-width: 720px) {
  .teczki-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .teczki-head h1 { font-size: 54px; }
}

/* zadania ostateczne: 4 kafle + panel kompletnego kodu kłódki */
.zadania-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .zadania-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.zadanie-btn .zadanie-cyfra { font-size: 17px; letter-spacing: 0.06em; }
.zadanie-gotowe { opacity: 0.78; }
.zadanie-gotowe .teczka-stopka em::after { content: ' ✓'; color: var(--akcent); }
.kod-panel { display: flex; flex-direction: column; gap: 14px; padding: 24px 22px; }
.kod-cyfry {
  display: flex; gap: 10px; justify-content: center;
  font-weight: 700; font-size: 44px; letter-spacing: 0.04em; color: var(--brand);
}
.kod-cyfry span {
  min-width: 64px; padding: 8px 0; text-align: center;
  border: 3px solid var(--brand); background: #1E1E1C;
}

/* teczki sekcji */
.sekcje-panel { display: flex; flex-direction: column; gap: 10px; }
.sekcje-grid { display: flex; flex-direction: column; gap: 10px; }
.sekcja-kafel {
  position: relative; display: grid;
  grid-template-columns: 1fr auto; align-items: center;
  gap: 2px 10px; padding: 16px; border: 2px solid var(--ink); background: var(--bg);
}
.kafel-nazwa {
  grid-column: 1; font-family: var(--font-display); font-weight: 900;
  font-size: 19px; letter-spacing: 0.02em; color: var(--ink);
}
.kafel-opis {
  grid-column: 1; font-family: var(--font-display); font-weight: 400;
  font-size: 12px; color: var(--mut);
}
.kafel-postep {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--ink);
}
.kafel-klodka {
  grid-column: 2; grid-row: 1 / span 2; justify-self: end;
  display: none; align-items: center; justify-content: center;
  padding: 5px 8px; border: 2.5px solid var(--alarm); transform: rotate(4deg);
  font-family: var(--font-display); font-weight: 800;
  font-size: 9px; letter-spacing: 0.12em; color: var(--alarm);
}
.sekcja-kafel.zamknieta { pointer-events: none; }
.sekcja-kafel.zamknieta .kafel-klodka { display: flex; }
.sekcja-kafel.zamknieta .kafel-postep { display: none; }
.sekcja-kafel:not(.zamknieta):hover { box-shadow: 4px 4px 0 0 var(--brand); }
#kafel-laboratorium .kafel-klodka { transform: rotate(-3deg); }

/* odzyskane kody */
.kody-panel { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; }
.kody-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.kod-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--bg);
  border: 2px solid var(--ink); border-left: 2px dashed var(--ink);
  font-family: var(--font-mono); font-weight: 500;
  font-size: 10px; letter-spacing: var(--tr-wide); color: var(--ink-2);
}
.kod-chip b {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 16px; letter-spacing: 0; color: var(--ink);
}
.kod-chip-syg { background: var(--brand); }
.kod-chip-pusty, .kody-lista > .mut {
  display: inline-flex; align-items: center; padding: 8px 12px;
  border: 2px dashed var(--line);
  font-family: var(--font-mono); font-weight: 500; font-size: 10px; color: var(--mut);
}

/* legenda */
.legenda { border: 1px dashed var(--mut); background: var(--surface); }
.legenda summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.06em; color: var(--ink);
}
.legenda summary::-webkit-details-marker { display: none; }
.legenda summary::after {
  content: ''; width: 12px; height: 12px; flex-shrink: 0;
  border-right: 2.2px solid var(--ink); border-bottom: 2.2px solid var(--ink);
  transform: rotate(45deg) translate(-2px, -2px);
}
.legenda[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.legenda ul {
  display: flex; flex-direction: column; gap: 10px;
  padding: 0 16px 16px; border-top: 1px dashed var(--line); padding-top: 14px;
}
.legenda li { font-size: 13px; line-height: 19px; color: var(--ink-2); }
.legenda li b { font-weight: 800; color: var(--ink); }

/* ── modal akt agentki ──────────────────────────────────────────────────── */

.dlg-agentka { width: min(400px, calc(100vw - 32px)); }
.dlg-agentka .dlg-head { gap: 10px; }
.dlg-agentka .dlg-head::before {
  content: ''; width: 12px; height: 12px; flex-shrink: 0; background: var(--brand);
}
.dlg-agentka .dlg-head h2 { flex: 1; font-size: 16px; letter-spacing: 0.04em; }
.dlg-agentka .dlg-body { gap: 0; padding: 0; }
.ma-pas {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--surface); border-bottom: 2px solid var(--ink);
}
.ma-pas-txt { display: flex; flex-direction: column; gap: 4px; }
.ma-pas-txt > b {
  font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--ink);
}
.ma-status {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: var(--tr-wide); color: var(--ink-2);
}
.ma-status::before {
  content: ''; width: 8px; height: 8px; flex-shrink: 0;
  border-radius: 999px; background: var(--brand);
}
.ma-status.ok { color: var(--ok); }
.ma-status.ok::before { background: var(--ok); }
.ma-portret {
  display: flex; align-items: center; justify-content: center;
  width: 72px; height: 90px; flex-shrink: 0;
}
.ma-portret .portret-foto { width: 72px; height: 90px; background: var(--ink); }
.ma-portret .portret-inicjal { font-size: 40px; color: var(--brand); }
.ma-portret .portret-rubryka { display: none; }
.dlg-agentka .akta-linia {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.1em; color: var(--ink-2);
}
.ma-naglowek {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.22em; color: var(--mut);
  padding: 18px 16px 0;
}
.ma-zadanie {
  padding: 18px 16px 0; margin-top: 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: 14px; line-height: 21px; color: var(--ink);
}
.dlg-agentka .ma-pas {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--surface); border-bottom: 2px solid var(--ink);
}
#form-litera { padding: 16px 16px 22px; }
.litera-rzad { display: flex; gap: 10px; }
.litera-rzad .btn { flex: 1; min-height: 52px; }
.dlg-agentka #ma-blad { margin: 12px 16px 0; }
/* nota jak w projekcie: rubryka z żółtą belką (artboard 03B) */
.dlg-agentka .maly {
  margin: 12px 16px 18px; padding: 11px 13px;
  background: var(--surface); border-left: 4px solid var(--brand);
  font-family: var(--font-display); font-weight: 500;
  font-size: 12px; line-height: 17px; color: var(--ink-2);
}
.ma-ok {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  margin: 18px 16px; padding: 16px; background: var(--surface); border-left: 4px solid var(--ok);
}
.ma-ok p { font-size: 13px; line-height: 19px; color: var(--ink-2); }
.ma-ok b { font-family: var(--font-mono); font-weight: 700; font-size: 18px; color: var(--ink); }

/* ══ 04 · SEKCJA ════════════════════════════════════════════════════════ */

.sekcja-strona { display: flex; flex-direction: column; }
.sekcja-strona .sekcja-head { gap: 8px; margin-bottom: 20px; }
.sekcja-strona .sekcja-head h1 {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 44px; line-height: 44px; letter-spacing: var(--tr-tight);
}
.akcent-pasek { display: none; }
.sekcja-licznik {
  font-family: var(--font-mono); font-weight: 700; font-size: 15px;
  letter-spacing: 0; color: var(--mut);
}
.sekcja-strona .sekcja-head p {
  font-size: 14px; line-height: 20px; color: var(--ink-2);
}
/* notka pod stanowiskami (artboard 04) */
.sekcja-notka {
  margin-top: 20px; padding: 13px 16px;
  background: var(--surface); border-left: 4px solid var(--brand);
  font-family: var(--font-display); font-weight: 400;
  font-size: 13px; line-height: 19px; color: var(--ink-2);
}
.stanowiska-grid { display: flex; flex-direction: column; gap: 12px; }
.stanowisko-kafel {
  display: grid; grid-template-columns: 46px 1fr 30px;
  align-items: center; gap: 2px 14px;
  padding: 16px; background: var(--bg); border: 2px solid var(--ink);
}
.kafel-nr {
  grid-column: 1; grid-row: 1 / span 2;
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex-shrink: 0;
  border: 2px solid var(--ink); background: var(--bg);
  font-family: var(--font-display); font-weight: 900; font-size: 17px; color: var(--ink);
}
.stanowisko-kafel .kafel-nazwa {
  grid-column: 2; grid-row: 1; font-size: 15px; font-weight: 800; letter-spacing: 0.02em;
}
.stanowisko-kafel .chip-status {
  grid-column: 2; grid-row: 2; justify-self: start;
  padding: 0; background: none; border: 0;
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.1em; color: var(--mut);
}
.stanowisko-kafel .chip-status.chip-tok { color: var(--ink-2); }
.stanowisko-kafel .chip-status.chip-ok { color: var(--ok); }
.stanowisko-kafel .chip-status.chip-awaria { color: var(--alarm); }
.kafel-kod {
  grid-column: 2; grid-row: 2; justify-self: start;
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.1em; color: var(--ok);
  margin-left: 92px;
}
.stanowisko-kafel::after {
  content: ''; grid-column: 3; grid-row: 1 / span 2;
  justify-self: center; align-self: center;
  width: 11px; height: 11px;
  border-right: 3px solid var(--ink); border-top: 3px solid var(--ink);
  transform: rotate(45deg);
}
.stanowisko-kafel:hover { box-shadow: 4px 4px 0 0 var(--brand); }
.stanowisko-kafel.rozwiazane { border-color: var(--ok); }
.stanowisko-kafel.rozwiazane .kafel-nr {
  background: var(--ok); border-color: var(--ok); color: #FFF;
}
.stanowisko-kafel.rozwiazane::after {
  width: 16px; height: 9px; transform: rotate(-45deg);
  border-right: 0; border-top: 0;
  border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok);
}

/* ══ 05 · STANOWISKO ════════════════════════════════════════════════════ */

.stanowisko-strona { display: flex; flex-direction: column; }
.stanowisko-karta {
  display: flex; flex-direction: column; gap: 20px; border: 0; padding: 0;
}
/* badge w kolumnie 1, tytuł + kicker w kolumnie 2 (artboard 05) */
.st-head {
  display: grid; grid-template-columns: auto 1fr;
  align-items: center; gap: 3px 14px;
}
.st-badge {
  grid-column: 1; grid-row: 1 / span 2;
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; flex-shrink: 0; background: var(--ink);
  font-family: var(--font-display); font-weight: 900; line-height: 1;
  font-size: 21px; color: var(--brand);
}
.st-head h1 { grid-column: 2; grid-row: 1; align-self: end; }
.st-head .akta-linia { grid-column: 2; grid-row: 2; align-self: start; }
.st-head .akta-linia {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: var(--tr-caps); color: var(--mut);
}
.st-head h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 25px; line-height: 27px; letter-spacing: -0.01em; color: var(--ink);
}
.st-tekst {
  padding: 16px 18px; background: var(--surface); border-left: 4px solid var(--ink);
  font-family: var(--font-display); font-weight: 400;
  font-size: 15px; line-height: 23px; color: var(--ink);
}
.st-form { display: flex; flex-direction: column; gap: 10px; }
.st-form::before {
  content: 'ODPOWIEDŹ STANOWISKA';
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.22em; color: var(--mut);
}
.st-form .btn { min-height: 56px; font-size: 15px; }
.st-rozwiazane {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 18px 16px; background: var(--surface); border-left: 4px solid var(--ok);
}
.st-para { font-family: var(--font-display); font-size: 13px; color: var(--ink-2); }
.st-para b {
  font-family: var(--font-mono); font-weight: 700; font-size: 18px; color: var(--ink);
}
.st-rozwiazane .btn { align-self: stretch; }
.st-powrot { align-self: stretch; min-height: 50px; margin-top: 4px; }

.st-hinty { display: flex; flex-direction: column; border: 2px solid var(--ink); }
.st-hinty .h-mala {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--ink);
  font-family: var(--font-display); font-weight: 800;
  font-size: 12px; letter-spacing: 0.12em; color: #FFF;
}
#st-hinty-licznik {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 11px; letter-spacing: 0; color: var(--brand);
  text-transform: none;
}
.hinty-lista { display: flex; flex-direction: column; }
.hinty-lista li {
  display: flex; gap: 12px; padding: 14px 16px;
  border-bottom: 1px dashed var(--line);
  font-family: var(--font-display); font-weight: 400;
  font-size: 13px; line-height: 19px; color: var(--ink-2);
}
.hinty-lista li b {
  flex-shrink: 0; width: 20px;
  font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: var(--ink);
}
.hinty-lista li.mut {
  background: var(--surface); color: var(--mut);
  font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.04em;
}
.st-hinty > .maly {
  padding: 12px 16px; background: var(--surface);
  font-family: var(--font-mono); font-weight: 500;
  font-size: 11px; letter-spacing: 0.04em; color: var(--mut);
}
#st-odliczanie {
  padding: 14px 16px; background: var(--surface);
  font-family: var(--font-mono); font-weight: 500;
  font-size: 11px; letter-spacing: 0.04em; color: var(--mut);
}

/* nota zamiast dawnego panelu wsparcia (koła ratunkowe wycięte) */
.st-nota {
  padding: 13px 16px; background: var(--surface); border-left: 4px solid var(--brand);
  font-family: var(--font-display); font-weight: 400;
  font-size: 13px; line-height: 19px; color: var(--ink-2);
}
.st-akcje { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.awaria-box { border: 2px dashed var(--alarm); }
.awaria-box summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 800;
  font-size: 12px; letter-spacing: 0.06em; color: var(--alarm);
}
.awaria-box summary::-webkit-details-marker { display: none; }
.awaria-box summary::after {
  content: 'AW'; font-family: var(--font-mono); font-weight: 700;
  font-size: 12px; letter-spacing: 0.06em; color: var(--alarm);
}
.awaria-box form { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 12px; }
.awaria-box .maly {
  padding: 0 16px 14px;
  font-family: var(--font-display); font-weight: 400;
  font-size: 12px; line-height: 17px; color: var(--ink-2);
}

/* ══ 06 · FINAŁ ════════════════════════════════════════════════════════ */

.final-strona { display: flex; flex-direction: column; gap: 22px; }
.final-lock, .final-karta { border: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.final-lock h1, .final-karta h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 33px; line-height: 36px; letter-spacing: var(--tr-tight); color: var(--ink);
}
/* kicker finału: żółta belka + etykieta etapu (artboard 06) */
.kicker-pasek {
  display: inline-block; width: 34px; height: 4px; flex-shrink: 0;
  background: var(--brand); margin-right: 10px; vertical-align: middle;
}
.final-strona .st-head .akta-linia {
  display: flex; align-items: center;
  font-size: 11px; letter-spacing: 0.22em; color: var(--ink-2);
}
.final-kody { margin-top: -4px; }
.final-strona .st-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.final-strona .st-head h1, .final-strona .st-head .akta-linia { align-self: flex-start; }
.final-strona .st-head .akta-linia { order: 0; margin: 0; }
.final-strona .st-head h1 { order: 1; }
.final-strona .st-tekst {
  font-size: 14px; line-height: 21px; background: none;
  border: 0; padding: 0; color: var(--ink-2);
}
.final-lock {
  padding: 20px 18px; border: 2px dashed var(--line); background: var(--surface);
}
.final-lock .kafel-klodka {
  display: inline-flex; align-self: flex-start;
  padding: 5px 8px; border: 2.5px solid var(--alarm); transform: rotate(-4deg);
  font-family: var(--font-display); font-weight: 800;
  font-size: 9px; letter-spacing: 0.12em; color: var(--alarm);
}
#final-pary {
  font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--ink);
}
#final-formularz form { display: flex; flex-direction: column; gap: 14px; }
/* ramka z cieniem obejmuje tylko formularz kodu (artboard 06) */
.protokol-box {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 18px; border: 2px solid var(--ink); box-shadow: 6px 6px 0 0 var(--ink);
  background: var(--bg);
}
#final-formularz .btn { min-height: 56px; }
#final-formularz .maly {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 10px; letter-spacing: 0.04em; color: var(--mut); text-align: center;
}
/* kupony z drobnymi obrotami jak w projekcie */
.kody-lista .kod-chip:nth-child(3n+2) { transform: rotate(1deg); }
.kody-lista .kod-chip:nth-child(3n)   { transform: rotate(-1deg); }
.kratki-final-etykieta {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 10px; letter-spacing: 0.22em; color: var(--mut);
}

/* sterownik */
#final-sterownik {
  background: var(--ink); border: 2px solid var(--ink); padding: 0; gap: 0;
}
#final-sterownik .st-head {
  padding: 14px 16px; gap: 4px;
}
#final-sterownik h1 {
  font-size: 17px; line-height: 22px; letter-spacing: 0.02em; color: #FFF;
}
#final-sterownik .akta-linia { color: var(--brand); font-size: 10px; letter-spacing: 0.16em; }
#final-sterownik .stempel {
  border-color: var(--brand); color: var(--brand); transform: rotate(3deg);
  font-size: 9px; letter-spacing: 0.1em; padding: 5px 9px; border-width: 2px;
}
#final-sterownik .st-tekst {
  padding: 0 16px 14px; color: var(--d-txt2); font-size: 13px; line-height: 19px;
}
.sterownik-schemat {
  display: flex; flex-direction: column; gap: 8px; padding: 4px 16px 16px;
}
.przewod {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--d-2);
  font-family: var(--font-mono); font-weight: 600;
  font-size: 12px; letter-spacing: 0.1em; color: #FFF;
}
.przewod::before {
  content: ''; width: 14px; height: 14px; flex-shrink: 0;
  border-radius: 999px; background: var(--c, var(--d-mut));
}
.przewod::after {
  content: 'ODPIĘTY'; margin-left: auto;
  font-family: var(--font-mono); font-weight: 500;
  font-size: 11px; letter-spacing: 0; color: var(--d-txt);
}
.przewod:last-child { background: var(--d-3); border: 1px solid var(--brand); }
.przewod:last-child::after { content: 'TU JEST KIESZEŃ'; font-weight: 600; color: var(--brand); }
#final-sterownik .btn { margin: 0 16px 16px; }

/* baner awaryjny */
.karta-alarm {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; background: var(--alarm); border: 0; color: #FFF;
}
.karta-alarm p { font-family: var(--font-display); font-weight: 500; font-size: 13px; line-height: 19px; }
.karta-alarm .stempel { border-color: #FFF; color: #FFF; align-self: flex-start; }
.karta-alarm .mut { color: rgba(255,255,255,.82); }
.karta-alarm .btn-czerwony { background: #FFF; color: var(--alarm); box-shadow: 4px 4px 0 0 rgba(0,0,0,.35); }
.kod-klodki {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 44px; letter-spacing: 0.16em; color: #FFF;
}

/* ══ 07 · RAPORT ═══════════════════════════════════════════════════════ */

.page-raport { padding: 0; background: var(--ink); }
body[data-page="raport"] { background: var(--ink); }
body[data-page="raport"] .topbar { background: var(--ink); border-bottom-color: var(--d-line); }
body[data-page="raport"] .brand-txt b { color: #FFF; }
body[data-page="raport"] .brand-txt small { color: var(--d-txt); }
body[data-page="raport"] .clock-val { color: #FFF; }
body[data-page="raport"] .topbar .btn-ghost { background: transparent; border-color: var(--d-line); color: #FFF; }
body[data-page="raport"] .postep-bar { background: var(--d-2); border-bottom-color: var(--d-line); }
body[data-page="raport"] .stopka { border-top-color: var(--d-line); }
body[data-page="raport"] .stopka span { color: var(--d-mut); }

.raport-strona { padding: 30px 20px 32px; }
.raport-karta {
  display: flex; flex-direction: column; gap: 26px; border: 0; padding: 0; background: none;
}
/* nagłówek raportu: metka | godzina, werdykt, podtytuł, stempel (artboard 07) */
.raport-head { display: flex; flex-direction: column; gap: 14px; }
.raport-meta { display: flex; align-items: center; justify-content: space-between; }
.raport-meta span {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 11px; letter-spacing: 0.22em; color: var(--d-txt);
}
.raport-meta span + span { letter-spacing: 0.1em; }
.raport-head h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 40px; line-height: 42px; letter-spacing: var(--tr-tight); color: var(--brand);
}
.raport-sub {
  font-family: var(--font-display); font-weight: 500;
  font-size: 17px; line-height: 24px; color: #FFFFFF;
}
.raport-stempel {
  align-self: flex-start; margin-top: 12px;
  padding: 10px 16px; border: 3px solid var(--brand); color: var(--brand);
  font-size: 15px; letter-spacing: var(--tr-caps); transform: rotate(-4deg);
}
.portrety-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.portrety-mini .portret { border-color: var(--d-line); background: var(--d-2); }
.portrety-mini .portret-foto { height: 74px; background: var(--d-2); }
.portrety-mini .portret-inicjal { font-size: 34px; color: var(--brand); }
.portrety-mini .portret-meta { display: none; }
.portrety-mini .portret-rubryka { display: none; }

.raport-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.raport-stats > div {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px; background: var(--d-2);
}
.raport-stats dt {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 10px; letter-spacing: var(--tr-caps); color: var(--d-txt);
  order: 2;
}
.raport-stats dd {
  margin: 0; order: 1;
  font-family: var(--font-display); font-weight: 800;
  font-size: 17px; line-height: 23px; color: #FFF;
  overflow-wrap: anywhere;
}
/* liczby i kody: duży mono jak w projekcie */
.raport-stats dd.mono {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 30px; line-height: 34px;
}
.raport-stats > div:nth-child(2) dd { color: var(--brand); }
.raport-stats dd .mono { font-size: 13px; font-weight: 600; color: var(--d-txt); }
.raport-linia {
  font-family: var(--font-display); font-weight: 500;
  font-size: 17px; line-height: 24px; color: #FFF;
}
/* oś czasu operacji (artboard 07) */
.raport-os { display: flex; flex-direction: column; gap: 10px; }
.raport-os .h-mala { color: var(--d-txt); }
.os-lista { display: flex; flex-direction: column; }
.os-lista li {
  display: flex; gap: 14px; padding: 10px 0;
  border-bottom: 1px dashed var(--d-line);
}
.os-lista li b {
  flex-shrink: 0; width: 44px;
  font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: var(--brand);
}
.os-lista li span {
  flex: 1; font-family: var(--font-display); font-weight: 400;
  font-size: 13px; line-height: 18px; color: var(--d-txt3);
}
.os-lista li:last-child { border-bottom: 0; }
.os-lista li.mut { color: var(--d-mut); font-size: 13px; }

/* nagroda (artboard 07) */
.raport-nagroda {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px; background: var(--brand); box-shadow: 6px 6px 0 0 #000000;
}
.raport-nagroda b {
  font-family: var(--font-display); font-weight: 900;
  font-size: 19px; letter-spacing: 0.01em; line-height: 24px; color: var(--ink);
}
.raport-nagroda span {
  font-family: var(--font-display); font-weight: 500;
  font-size: 13px; line-height: 19px; color: var(--ink);
}

.raport-stopka {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding-top: 4px;
}
.raport-stopka i { display: block; width: 22px; height: 2px; background: var(--d-line); flex-shrink: 0; }
.raport-stopka p {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 9px; letter-spacing: 0.12em; color: var(--d-txt); text-align: center;
}

/* ══ 09 · BŁĄD 404 ═════════════════════════════════════════════════════ */

body[data-page="blad"] .lock { justify-content: flex-start; }
body[data-page="blad"] .lock-karta {
  flex: 0 0 auto; justify-content: flex-start;
  border: 2px solid var(--ink); box-shadow: 6px 6px 0 0 var(--ink);
  padding: 28px 22px; gap: 14px; align-items: flex-start; margin: 20px;
}
body[data-page="blad"] .lock-h { text-align: left; font-size: 20px; line-height: 25px; font-weight: 800; }
body[data-page="blad"] .lock-h::after { display: none; }
body[data-page="blad"] .lock-karta .mut { text-align: left; }
body[data-page="blad"] .seal-duzy {
  width: auto; height: auto; border-radius: 0; background: none; transform: none;
}
body[data-page="blad"] .seal-duzy span {
  font-family: var(--font-display); font-weight: 900;
  font-size: 96px; line-height: 88px; letter-spacing: -0.04em; color: var(--ink);
}
body[data-page="blad"] .lock-karta .btn { align-self: stretch; margin-top: 4px; }
/* belka kartoteki, stempel i stopka (artboard 09) */
.blad-belka {
  display: flex; align-items: center; justify-content: space-between;
  align-self: stretch; margin: -28px -22px 8px; padding: 12px 16px;
  background: var(--brand); border-bottom: 2px solid var(--ink);
}
.blad-belka b {
  font-family: var(--font-display); font-weight: 900;
  font-size: 13px; letter-spacing: 0.1em; color: var(--ink);
}
.blad-belka .mono {
  font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: var(--ink);
}
.blad-stempel {
  border-width: 3px; padding: 7px 12px; transform: rotate(-5deg);
  font-size: 12px; letter-spacing: var(--tr-caps); margin: 4px 0;
}
.blad-stopka {
  padding: 16px 20px 28px; text-align: center;
  font-family: var(--font-mono); font-weight: 500;
  font-size: 10px; letter-spacing: 0.16em; color: var(--mut);
}

/* ══ 08 · PANEL OPERACJI ═══════════════════════════════════════════════ */

.operator { display: flex; flex-direction: column; gap: 18px; }
.op-naglowek {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.op-naglowek h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: 30px; line-height: 32px; letter-spacing: -0.015em; color: var(--ink);
}
.op-pigulki { display: flex; flex-wrap: wrap; gap: 8px; }
.pigulka {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border: 2px solid var(--ink); background: var(--bg);
  font-family: var(--font-mono); font-weight: 500;
  font-size: 10px; letter-spacing: 0.1em; color: var(--ink-2);
}
.pigulka b { font-weight: 700; color: var(--ink); }
.pigulka-zywa { color: var(--mut); border-color: var(--line); }
.pigulka-zywa.ok { color: var(--ok); border-color: var(--ok); }

.op-taby {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 2px solid var(--ink); background: var(--bg);
}
.op-tab-btn {
  flex: 1; min-width: 96px; min-height: 48px; padding: 0 16px;
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.1em; color: var(--ink-2);
}
.op-tab-btn:hover { background: var(--surface); }
.op-tab-btn.aktywna { background: var(--ink); color: var(--brand); font-weight: 800; }
.op-tab-druk {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto; background: var(--brand); color: var(--ink);
  border-left: 2px solid var(--ink);
}
.op-tab-druk:hover { background: var(--ink); color: var(--brand); }

.op-panel { display: none; flex-direction: column; gap: 16px; }
.op-panel.aktywna { display: flex; }
.op-blok { display: flex; flex-direction: column; gap: 12px; }
.op-wstep { font-size: 13px; line-height: 19px; color: var(--ink-2); }
.op-dwie { display: flex; flex-direction: column; gap: 16px; }
.op-akcje { display: flex; flex-wrap: wrap; gap: 8px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); }
.stat small {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 10px; letter-spacing: 0.18em; color: var(--mut);
  order: 2;
}
.stat b {
  order: 1; font-family: var(--font-mono); font-weight: 700; font-size: 24px; color: var(--ink);
}
.stat:first-child { background: var(--ink); }
.stat:first-child small { color: var(--d-txt); }
.stat:first-child b { color: var(--brand); }
/* paski segmentowe pod liczbą (artboard 08) */
.stat-segmenty { display: flex; gap: 3px; order: 3; margin-top: 4px; }
.stat-segmenty i { flex: 1; height: 6px; background: var(--line); }
.stat-segmenty i.peln { background: var(--ink); }
#s-kody-seg i.peln { background: var(--brand); }
.stat-alarm { background: var(--alarm) !important; }
.stat-alarm small { color: rgba(255,255,255,.8) !important; }
.stat-alarm b { color: #FFF !important; }

.wykres {
  display: flex; align-items: flex-end; gap: 4px;
  height: 160px; padding-top: 8px; border-bottom: 2px solid var(--ink);
}
.wykres i {
  flex: 1; height: var(--h, 2%); min-height: 2px; background: var(--brand);
  border-top: 2px solid var(--ink);
}

.op-tab-t { width: 100%; border-collapse: collapse; }
.op-tab-t th {
  padding: 8px 8px; text-align: left; border-bottom: 2px solid var(--ink);
  font-family: var(--font-mono); font-weight: 600;
  font-size: 9px; letter-spacing: 0.14em; color: var(--mut); text-transform: uppercase;
}
.op-tab-t td {
  padding: 9px 8px; border-bottom: 1px dashed var(--line);
  font-family: var(--font-display); font-size: 13px; color: var(--ink-2);
}
.op-tab-t td.mono { font-family: var(--font-mono); font-weight: 600; font-size: 12px; color: var(--ink); }
.op-tab-t tr.ok td { background: #F0F6F2; }
.op-tab-akcje { display: flex; flex-wrap: wrap; gap: 4px; }

.op-feed { display: flex; flex-direction: column; }
.op-feed li {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-family: var(--font-display); font-size: 13px; line-height: 18px; color: var(--ink-2);
}
.op-feed .mono { font-family: var(--font-mono); font-weight: 700; font-size: 11px; color: var(--ink); }
.op-feed b { font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: 0.06em; }
.feed-odp_ok { color: var(--ok); }
.feed-odp_zle { color: var(--alarm); }
.feed-podpowiedz { color: var(--ink-2); }

.foto-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.foto-karta { display: flex; flex-direction: column; gap: 12px; }
.foto-podglad { display: flex; }
.foto-podglad .portret-foto { width: 116px; height: 150px; }
.foto-podglad .portret-inicjal { font-size: 54px; color: var(--brand); }
.foto-podglad .portret-foto { background: var(--ink); }
.foto-podglad .portret-rubryka { display: none; }
.foto-meta { display: flex; align-items: baseline; gap: 10px; }
.foto-meta b { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: 0.04em; }
.foto-meta .mono { font-size: 11px; font-weight: 500; }
.foto-wgraj { cursor: pointer; }
.op-materialy .op-tab-t td { font-family: var(--font-mono); font-size: 12px; }

/* ── animacje ───────────────────────────────────────────────────────────── */

.shake { animation: shake .3s ease; }
@keyframes shake {
  0%, 100% { transform: none; }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.fala { animation: wbicie .4s ease backwards; animation-delay: calc(var(--i, 0) * 60ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   DESKTOP (artboardy 08, 10-14)
   ══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 900px) {

  .topbar { padding: 0 32px; height: 64px; }
  .brand-txt b { font-size: 15px; }
  .topbar-right { gap: 18px; }
  .clock { display: flex; }
  .st-duzy { font-size: 15px; letter-spacing: var(--tr-caps); padding: 10px 16px; border-width: 3px; }
  .clock-val { font-size: 12px; }
  .topbar .btn-ghost { min-height: 40px; padding: 0 16px; font-size: 11px; }

  .page { padding: 40px 32px; }

  /* 10 · Blokada: szyld po lewej, formularz po prawej (artboard 10).
     Uwaga: split TYLKO na ekranie blokady - strona błędu dzieli ten sam markup. */
  body[data-page="lock"] .page-lock { padding: 0; }
  .page-lock { min-height: calc(100vh - 70px); }
  body[data-page="lock"] .lock { flex-direction: row; min-height: calc(100vh - 70px); }
  body[data-page="lock"] .lock-karta {
    flex: 1; padding: 48px; gap: 30px;
  }
  body[data-page="lock"] .lock-szyld {
    display: flex; flex-direction: column; justify-content: space-between;
    width: 620px; flex-shrink: 0; padding: 48px 56px;
    background: var(--ink);
  }
  .szyld-znak {
    display: flex; align-items: center; justify-content: center;
    width: 96px; height: 96px; border-radius: 999px;
    background: var(--brand); transform: rotate(-6deg);
    font-family: var(--font-display); font-weight: 900; line-height: 1;
    font-size: 30px; letter-spacing: -0.02em; color: var(--ink);
  }
  .szyld-tresc { display: flex; flex-direction: column; gap: 18px; }
  .szyld-kicker {
    font-family: var(--font-mono); font-weight: 600;
    font-size: 12px; letter-spacing: 0.3em; color: var(--d-txt);
  }
  .szyld-tytul {
    font-family: var(--font-display); font-weight: 900;
    font-size: 76px; line-height: 76px; letter-spacing: -0.03em; color: #FFF;
  }
  .szyld-podtytul {
    display: flex; align-items: center; gap: 14px;
    font-family: var(--font-mono); font-weight: 600;
    font-size: 13px; letter-spacing: 0.22em; color: var(--brand);
  }
  .szyld-podtytul i { display: block; width: 56px; height: 6px; background: var(--brand); }
  .szyld-stopka {
    display: flex; align-items: center; justify-content: space-between;
    font-family: var(--font-mono); font-weight: 500;
    font-size: 10px; letter-spacing: 0.2em; color: var(--d-mut);
  }
  body[data-page="lock"] .seal-duzy { display: none; }
  .lock-h { font-size: 44px; line-height: 46px; }
  .lock-krok > .mut { font-size: 16px; line-height: 25px; max-width: 460px; }
  .lock-form { max-width: 400px; }
  .lock-form .pole { min-height: 60px; font-size: 24px; }
  .lock-form .btn { min-height: 60px; font-size: 16px; }
  .lock-stopka {
    align-self: center; margin-top: 0; border-top: 0;
    max-width: 400px; font-size: 13px; line-height: 18px;
  }
  .tab-rozdzielnik { max-width: 400px; }

  /* 11 · Briefing */
  .brief-head h1 { font-size: 52px; line-height: 54px; }
  .brief-head h1::after { width: 88px; height: 6px; }
  .brief-karta { gap: 24px; }
  .brief-akapit { gap: 16px; font-size: 17px; line-height: 26px; }
  .brief-akapit::before { width: 26px; font-size: 13px; line-height: 26px; }
  .brief-stopka .btn { max-width: 420px; min-height: 60px; font-size: 16px; }

  /* 12 · Tablica: kolumna główna + boczna 364px (artboard 12) */
  .tablica { flex-direction: row; align-items: flex-start; gap: 24px; }
  .tab-kol { display: flex; flex-direction: column; }
  .tab-glowna { flex: 1; min-width: 0; gap: 20px; }
  .tab-boczna { width: 364px; flex-shrink: 0; gap: 16px; }
  .sekcja-head h1 { font-size: 40px; line-height: 40px; letter-spacing: var(--tr-tight); }
  .sekcja-head p { font-size: 15px; }
  .portrety { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  /* notatka Centrali wypełnia ósme pole siatki (jak w projekcie) */
  .notatka-centrali {
    display: flex; flex-direction: column; justify-content: center; gap: 8px;
    padding: 18px; border: 1px dashed var(--mut); background: var(--bg);
    transform: rotate(1deg);
  }
  .notatka-centrali b {
    font-family: var(--font-mono); font-weight: 600;
    font-size: 10px; letter-spacing: 0.18em; color: var(--mut);
  }
  .notatka-centrali p {
    font-family: var(--font-display); font-weight: 500;
    font-size: 14px; line-height: 20px; color: var(--ink-2);
  }

  .portret-foto { height: 200px; }
  .portret-inicjal { font-size: 84px; }
  .portret-rubryka { font-size: 8px; letter-spacing: 0.18em; }
  .portret-litera { top: 10px; right: 10px; width: 30px; height: 30px; font-size: 15px; }
  .portret-meta { padding: 12px 14px; }
  .portret-meta b { font-size: 16px; letter-spacing: 0.02em; }
  .portret-meta i { font-size: 12px; }
  .portret-meta small { font-size: 9px; letter-spacing: 0.12em; }

  .sygnatura { padding: 16px 18px; }
  .sygnatura h2 { font-size: 16px; }
  .sygnatura > .mut { font-size: 12px; line-height: 17px; }
  .sygnatura .kratka { width: 42px; height: 50px; font-size: 21px; }
  .sygnatura .btn { min-height: 48px; font-size: 13px; }
  .sekcja-kafel { padding: 13px 14px; }
  .kafel-nazwa { font-size: 15px; }
  .kafel-opis { display: none; }
  .kafel-postep { grid-row: 1; font-size: 11px; }

  /* 13 · Sekcja: trzy stanowiska w kolumnach */
  .sekcja-strona, .stanowisko-strona, .final-strona, .briefing {
    max-width: 1120px; margin: 0 auto;
  }
  .sekcja-strona .sekcja-head h1 { font-size: 56px; line-height: 56px; }
  .sekcja-strona .sekcja-head p { font-size: 16px; line-height: 23px; max-width: 720px; }
  .stanowiska-grid { flex-direction: row; gap: 16px; }
  .stanowisko-kafel {
    flex: 1; grid-template-columns: 52px 1fr; grid-template-rows: auto auto auto;
    align-items: start; gap: 8px 14px; padding: 22px;
  }
  .kafel-nr { width: 52px; height: 52px; font-size: 19px; grid-row: 1; }
  .stanowisko-kafel .kafel-nazwa { grid-column: 1 / span 2; grid-row: 2; font-size: 18px; }
  .stanowisko-kafel .chip-status { grid-column: 1 / span 2; grid-row: 3; font-size: 11px; }
  .kafel-kod { grid-column: 1 / span 2; grid-row: 3; margin-left: 0; justify-self: end; }
  .stanowisko-kafel::after { grid-column: 2; grid-row: 1; justify-self: end; }

  /* 14 · Stanowisko: treść + kolumna wsparcia */
  .stanowisko-karta {
    display: grid; grid-template-columns: 1fr 380px;
    align-items: start; gap: 28px;
  }
  .st-head { grid-column: 1; }
  .st-head h1 { font-size: 36px; line-height: 38px; }
  .st-tekst { grid-column: 1; padding: 22px 24px; font-size: 17px; line-height: 27px; }
  .st-form { grid-column: 1; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .st-form::before { width: 100%; }
  .st-form .pole { flex: 1; min-height: 60px; }
  .st-form .btn { min-height: 60px; padding: 0 34px; }
  .st-rozwiazane { grid-column: 1; }
  #st-blad { grid-column: 1; }
  .st-powrot { grid-column: 1; align-self: start; justify-self: start; padding: 0 26px; }
  .st-hinty { grid-column: 2; grid-row: 1 / span 5; }
  .st-akcje { max-width: 380px; margin-left: auto; }

  /* 06 · Finał */
  .final-lock h1, .final-karta h1 { font-size: 44px; line-height: 46px; }
  #final-formularz { max-width: 620px; }
  #final-sterownik { max-width: 620px; }

  /* 07 · Raport */
  .raport-strona { padding: 44px 32px; }
  .raport-karta { max-width: 900px; margin: 0 auto; }
  .raport-karta .brief-head h1 { font-size: 64px; line-height: 64px; }
  .raport-stats { grid-template-columns: repeat(4, 1fr); }
  .portrety-mini { grid-template-columns: repeat(7, 1fr); }

  /* 09 · 404 */
  body[data-page="blad"] .lock { flex-direction: column; align-items: center; }
  body[data-page="blad"] .lock-karta { width: 560px; max-width: 100%; margin: 60px 0 0; }
  body[data-page="blad"] .blad-stopka { max-width: 560px; }

  /* 08 · Panel operacji */
  .operator { max-width: 1440px; margin: 0 auto; }
  .op-dwie { flex-direction: row; }
  .op-dwie > * { flex: 1; min-width: 0; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .stat b { font-size: 24px; }
  .wykres { height: 240px; gap: 10px; }
  .foto-grid { grid-template-columns: repeat(2, 1fr); }
  .op-taby { flex-wrap: nowrap; }
  .op-tab-btn { flex: 0 0 auto; min-height: 56px; padding: 0 22px; }
}

@media (min-width: 1200px) {
  .foto-grid { grid-template-columns: repeat(3, 1fr); }
}
