/* TOLSoft — ARK. 05 Realizacje: case studies jako rysunki złożeniowe. */

.rz { --rz-dark: #0c0d11; --rz-dark-2: #17181d; --rz-dark-line: rgba(236, 235, 228, .12); --rz-amber: #ffb224; --rz-bad: #c3282d; }
.rz-k { margin: 0 0 12px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.rz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Licznik warsztatu ---------- */
.rz-ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 28px; border: 1px solid var(--ink); background: var(--paper); }
.rz-ledger > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: 20px; border-right: 1px solid var(--line); }
.rz-ledger > div:last-child { border-right: 0; }
.rz-ledger dt { font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.rz-ledger dd { margin: 0; font-family: var(--font); font-size: clamp(40px, 4.8vw, 72px); line-height: 1; font-weight: 800; font-stretch: 88%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rz-ledger > div:nth-child(2) dd { color: var(--accent-ink); }

.rz-index { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(48px, 8vh, 88px); }
.rz-index a { display: inline-flex; gap: 10px; align-items: baseline; padding: 9px 14px; border: 1px solid var(--ink); text-decoration: none; font-size: 13px; transition: background .2s, color .2s; }
.rz-index a span { font-size: 10px; color: var(--ink-3); transition: color .2s; }
.rz-index a:hover { background: var(--ink); color: var(--paper); }
.rz-index a:hover span { color: var(--accent); }

/* ---------- Karta realizacji ---------- */
.rz-case { position: relative; padding-top: 28px; margin-bottom: clamp(72px, 12vh, 140px); border-top: 2px solid var(--ink); scroll-margin-top: 90px; }
.rz-head { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 24px; align-items: start; margin-bottom: 32px; }
.rz-no { font-size: 13px; color: var(--ink-3); padding-top: 14px; }
.rz-head h2, .rz-head h3 { margin: 0 0 8px; font-size: clamp(48px, 7vw, 112px); line-height: .9; font-weight: 900; font-stretch: 75%; letter-spacing: -.04em; }
.rz-head p { margin: 0; max-width: 640px; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); }
.rz-status { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12px; padding-top: 14px; }
.rz-status li { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.rz-status i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rz-status .is-live { background: var(--ok); box-shadow: 0 0 0 3px rgba(31, 122, 70, .18); animation: blink 1.6s steps(2) infinite; }
.rz-status .is-wip { background: var(--accent); }

/* ---------- Pokaz ekranów ---------- */
.rz-show { background: var(--rz-dark); color: var(--paper); padding: clamp(16px, 3vw, 36px); position: relative; overflow: hidden;
  background-image: linear-gradient(var(--rz-dark-line) 1px, transparent 1px), linear-gradient(90deg, var(--rz-dark-line) 1px, transparent 1px);
  background-size: calc(var(--mm) * 10) calc(var(--mm) * 10); background-position: -1px -1px; }
.rz-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; position: relative; z-index: 2; }
.rz-tabs button { font: 500 14px/1 var(--font); color: rgba(236, 235, 228, .7); background: var(--rz-dark-2); border: 1px solid var(--rz-dark-line); padding: 10px 14px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.rz-tabs button:hover { color: var(--paper); border-color: rgba(236, 235, 228, .4); }
.rz-tabs button[aria-selected="true"] { background: var(--rz-amber); border-color: var(--rz-amber); color: #15161a; font-weight: 700; }
.rz-stage { position: relative; padding-right: clamp(0px, 14%, 190px); }
.rz-browser { border: 1px solid rgba(236, 235, 228, .18); background: #0b0c10; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.rz-browser__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid rgba(236, 235, 228, .1); }
.rz-browser__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(236, 235, 228, .2); }
.rz-browser__bar span { margin-left: 10px; font-size: 11px; color: rgba(236, 235, 228, .45); }
.rz-browser__view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0c0d11; }
.rz-browser__view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; animation: rz-in .45s ease; }
.rz-browser__view img[hidden] { display: none; }
@keyframes rz-in { from { opacity: 0; transform: translateY(6px); } }
.rz-phone { position: absolute; right: 0; bottom: -8%; width: clamp(150px, 22%, 270px); margin: 0; padding: 7px; background: #1c1d22; border-radius: 34px; border: 1px solid rgba(236, 235, 228, .2); box-shadow: -24px 30px 60px rgba(0, 0, 0, .6); transform: rotate(3deg); transition: transform .5s cubic-bezier(.2, .7, .1, 1); }
.rz-phone img { width: 100%; height: auto; border-radius: 28px; }
.rz-show:hover .rz-phone { transform: rotate(0deg) translateY(-8px); }
.rz-cap { margin: 22px 0 0; font-size: 11px; letter-spacing: .04em; color: rgba(236, 235, 228, .55); position: relative; z-index: 2; max-width: 70%; }

/* ---------- Tolsa 1 → 2 ---------- */
.rz-evolve { display: grid; grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr); margin-top: 40px; border: 1px solid var(--ink); background: var(--paper); }
.rz-evolve__col { padding: 24px; }
.rz-evolve__col--next { background: var(--paper-2); }
.rz-evolve h3, .rz-evolve h4 { margin: 0 0 12px; font-size: clamp(20px, 2vw, 26px); line-height: 1.15; font-stretch: 105%; }
.rz-evolve ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.rz-evolve li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: 16px; }
.rz-evolve li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 1px; background: var(--accent); }
.rz-evolve__arrow { position: relative; border-left: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.rz-evolve__arrow::before { content: ""; position: absolute; left: 16px; right: 16px; top: 50%; height: 1px; background: var(--accent); }
.rz-evolve__arrow::after { content: ""; position: absolute; right: 14px; top: calc(50% - 5px); border: 5px solid transparent; border-left: 8px solid var(--accent); border-right: 0; }
.rz-evolve__arrow span { position: relative; z-index: 1; background: var(--paper); padding: 2px 4px; font-size: 10px; color: var(--accent-ink); transform: translateY(-14px); }

/* ---------- Rozstrzelenie ---------- */
.rz-explode { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; margin-top: clamp(56px, 9vh, 100px); }
.rz-iso { width: 100%; height: auto; overflow: visible; }
.rz-iso .pl-top { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; transition: fill .25s; }
.rz-iso .pl-side { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.4; }
.rz-iso .pl-side2 { fill: #d6d5cc; stroke: var(--ink); stroke-width: 1.4; }
.rz-iso .pl-detail { fill: none; stroke: var(--ink-3); stroke-width: 1; }
.rz-iso .pl-leader { stroke: var(--ink-2); stroke-width: 1; fill: none; }
.rz-iso .pl-dot { fill: var(--ink); }
.rz-iso .pl-label { font: 600 12px var(--mono); fill: var(--ink); }
.rz-iso .pl-pos { font: 500 10px var(--mono); fill: var(--ink-3); letter-spacing: .08em; }
.rz-iso .pl-dim { stroke: var(--accent); stroke-width: 1; fill: none; }
.rz-iso .pl-dim-t { font: 600 11px var(--mono); fill: var(--accent-ink); }
.rz-iso g.is-on .pl-top { fill: var(--accent); }
.rz-iso g.is-on .pl-detail { stroke: rgba(255, 255, 255, .7); }
.rz-iso g.is-on .pl-label { fill: var(--accent-ink); }
.rz-parts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.rz-parts li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2px 12px; padding: 14px 8px; border-bottom: 1px solid var(--line); cursor: default; transition: background .2s; }
.rz-parts li span { grid-row: span 2; font-size: 11px; color: var(--ink-3); padding-top: 4px; }
.rz-parts li b { font-size: 17px; }
.rz-parts li em { font-style: normal; font-size: 14px; color: var(--ink-2); }
.rz-parts li.is-on { background: var(--paper-2); box-shadow: inset 3px 0 0 var(--accent); }

/* ---------- Laboratoria (wspólne) ---------- */
.rz-lab { margin-top: clamp(56px, 9vh, 100px); border: 1px solid var(--ink); background: var(--paper); padding: clamp(18px, 3vw, 32px); position: relative; }
.rz-lab::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line); pointer-events: none; }
.rz-lab__head { max-width: 720px; margin-bottom: 24px; position: relative; z-index: 1; }
.rz-lab__head h3, .rz-lab__head h4 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 40px); line-height: 1.02; font-weight: 800; font-stretch: 90%; letter-spacing: -.02em; }
.rz-lab__head p:not(.rz-k) { margin: 0; color: var(--ink-2); }
.rz-lab > *:not(.rz-lab__head) { position: relative; z-index: 1; }
.rz-note { margin: 18px 0 0; font-size: 13px; color: var(--ink-2); max-width: 820px; }

/* Sabotaż */
.rz-lab__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.1fr); gap: 20px; align-items: stretch; }
.rz-slip { border: 1px solid var(--ink); background: #fff; padding: 16px 18px; }
.rz-slip__head { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .06em; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 2px solid var(--ink); }
.rz-slip dl { margin: 0; }
.rz-slip dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.rz-slip dt small { display: block; font-size: 11px; color: var(--ink-3); }
.rz-slip dd { margin: 0; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; transition: color .2s, background .2s; }
.rz-slip dd.is-changed { color: var(--rz-bad); background: rgba(195, 40, 45, .08); text-decoration: underline wavy rgba(195, 40, 45, .5); text-underline-offset: 3px; }
.rz-slip__sum { font-weight: 600; }
.rz-slip__pay { border-bottom: 0 !important; padding-top: 12px !important; font-size: 16px !important; font-weight: 700; }
.rz-slip__pay dd { font-size: 20px; color: var(--accent-ink); }
.rz-faults { display: flex; flex-direction: column; gap: 14px; }
.rz-faults fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.rz-faults legend { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.rz-faults label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); cursor: pointer; font-size: 15px; transition: border-color .15s, background .15s; }
.rz-faults label:hover { border-color: var(--ink); }
.rz-faults input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.rz-faults label:has(input:checked) { border-color: var(--ink); background: var(--paper-2); }
.rz-faults label:has(input[value="none"]:checked) { box-shadow: inset 3px 0 0 var(--ok); }
.rz-faults label:has(input:not([value="none"]):checked) { box-shadow: inset 3px 0 0 var(--rz-bad); }
.rz-faults .btn { margin-top: auto; }
.rz-tests { list-style: none; margin: 0; padding: 14px 16px; background: var(--rz-dark); color: var(--paper); font-size: 12px; display: grid; gap: 4px; align-content: start; }
.rz-tests::before { content: "$ pnpm --filter @tolsa/payroll test"; display: block; color: rgba(236, 235, 228, .45); margin-bottom: 8px; }
.rz-tests li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 0 6px; padding: 6px 0; border-bottom: 1px solid var(--rz-dark-line); opacity: .45; transition: opacity .2s; }
.rz-tests li i { font-style: normal; }
.rz-tests li i::before { content: "·"; color: rgba(236, 235, 228, .5); }
.rz-tests li em { grid-column: 2; font-style: normal; font-size: 11px; color: #ff8f7a; }
.rz-tests li em:empty { display: none; }
.rz-tests li.is-run { opacity: 1; }
.rz-tests li.is-run i::before { content: "◌"; color: var(--rz-amber); }
.rz-tests li.is-pass { opacity: 1; }
.rz-tests li.is-pass i::before { content: "✓"; color: #4fd18b; }
.rz-tests li.is-fail { opacity: 1; }
.rz-tests li.is-fail i::before { content: "✗"; color: #ff6b5a; }
.rz-tests li.is-fail span { color: #ffb4a8; }
.rz-tests[data-summary]::after { content: attr(data-summary); display: block; margin-top: 10px; padding-top: 8px; font-weight: 600; }
.rz-tests[data-state="pass"]::after { color: #4fd18b; }
.rz-tests[data-state="fail"]::after { color: #ff6b5a; }

/* Protokół odbioru */
.rz-protocol { margin-top: clamp(56px, 9vh, 100px); }
.rz-table { border: 1px solid var(--ink); background: var(--paper); }
.rz-tr { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 132px; border-bottom: 1px solid var(--line); }
.rz-tr:last-child { border-bottom: 0; }
.rz-tr > span { padding: 14px 16px; border-right: 1px solid var(--line); }
.rz-tr > span:last-child { border-right: 0; white-space: nowrap; }
.rz-tr:not(.rz-tr--h) > span:nth-child(2) { font-size: 14px; }
.rz-tr--h > span { font: 600 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); background: var(--paper-2); padding-top: 10px; padding-bottom: 10px; }
.rz-ok { color: var(--ok); font-weight: 600; }
.rz-ok::before { content: "✓ "; }
.rz-src { margin: 10px 0 0; font-size: 11px; color: var(--ink-3); }

/* ---------- Archiv: bramki ---------- */
.rz-req { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.rz-req button { font: 500 14px/1.2 var(--font); padding: 10px 14px; background: transparent; color: var(--ink); border: 1px solid var(--ink); cursor: pointer; transition: background .15s, color .15s; }
.rz-req button:hover { background: var(--ink); color: var(--paper); }
.rz-req button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.rz-gates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.rz-gates::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--line); }
.rz-gates::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: var(--rz-flow, 0%); background: var(--ok); transition: width .35s linear, background .2s; }
.rz-gates.is-denied::after { background: var(--rz-bad); }
.rz-gates li { position: relative; padding: 18px 12px 14px 0; display: flex; flex-direction: column; gap: 4px; border-right: 1px dashed var(--line); padding-left: 12px; transition: background .25s; }
.rz-gates li:last-child { border-right: 0; }
.rz-gates li::before { content: ""; position: absolute; top: -5px; left: 12px; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink-3); transition: background .2s, border-color .2s; }
.rz-gates span { font-size: 11px; color: var(--ink-3); }
.rz-gates b { font-size: 16px; line-height: 1.2; }
.rz-gates em { font-style: normal; font-size: 13px; color: var(--ink-2); }
.rz-gates li.is-pass::before { background: var(--ok); border-color: var(--ok); }
.rz-gates li.is-deny { background: rgba(195, 40, 45, .07); }
.rz-gates li.is-deny::before { background: var(--rz-bad); border-color: var(--rz-bad); box-shadow: 0 0 0 5px rgba(195, 40, 45, .18); }
.rz-gates li.is-deny b { color: var(--rz-bad); }
.rz-log { margin-top: 20px; background: var(--rz-dark); color: var(--paper); padding: 14px 16px; font-size: 12px; min-height: 120px; max-height: 210px; overflow: auto; }
.rz-log p { margin: 0; padding: 3px 0; }
.rz-log__idle { color: rgba(236, 235, 228, .45); }
.rz-log .t { color: rgba(236, 235, 228, .4); }
.rz-log .ok { color: #4fd18b; }
.rz-log .no { color: #ff6b5a; }
.rz-log .dim { color: rgba(236, 235, 228, .6); }

.rz-facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
.rz-facts:has(> li:nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rz-facts li { padding: 18px 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.rz-facts b { display: block; font-size: 18px; color: var(--ink); margin-bottom: 6px; font-stretch: 105%; }

/* ---------- tolaccount: księga ---------- */
.rz-ledgerform { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.rz-entry { border: 1px solid var(--ink); background: #fff; }
.rz-entry__row { display: grid; grid-template-columns: minmax(0, 1fr) 44px 150px; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.rz-entry__row--h { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); background: var(--paper-2); padding-top: 8px; padding-bottom: 8px; }
.rz-entry input { font: 600 17px/1.2 var(--mono); text-align: right; width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-bottom: 1px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 0; font-variant-numeric: tabular-nums; }
.rz-entry input:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.rz-entry__actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
.rz-entry__actions .btn { padding: 12px 16px; font-size: 14px; }
.rz-console { background: var(--rz-dark); color: var(--paper); padding: 14px 16px; font-size: 12.5px; line-height: 1.55; min-height: 220px; max-height: 300px; overflow: auto; }
.rz-console__l { margin: 0 0 8px; }
.rz-console__l--dim { color: rgba(236, 235, 228, .45); }
.rz-console .ok { color: #4fd18b; }
.rz-console .no { color: #ff6b5a; }
.rz-console .warn { color: var(--rz-amber); }
.rz-console b { color: #fff; }

/* ---------- Strony ---------- */
.rz-sites { border-top: 2px solid var(--ink); padding-top: 28px; scroll-margin-top: 90px; }
.rz-sites > ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rz-site { position: relative; display: flex; flex-direction: column; gap: 8px; }
.rz-site__shots { position: relative; margin-bottom: 14px; padding-right: 18%; }
.rz-site__shots img:first-child { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--ink); transition: transform .4s cubic-bezier(.2, .7, .1, 1); }
.rz-site__m { position: absolute; right: 0; bottom: -10px; width: 30%; height: auto; aspect-ratio: 390 / 700; object-fit: cover; object-position: top; border: 4px solid var(--ink); border-radius: 14px; background: var(--ink); transition: transform .4s cubic-bezier(.2, .7, .1, 1); }
.rz-site:hover .rz-site__shots img:first-child { transform: translateY(-4px); }
.rz-site:hover .rz-site__m { transform: translateY(-10px) rotate(-2deg); }
.rz-site .rz-no { padding: 0; font-size: 11px; }
.rz-site h3 { margin: 0; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.05; font-weight: 800; font-stretch: 92%; letter-spacing: -.02em; }
.rz-site h3 a { text-decoration: none; }
.rz-site h3 a::after { content: ""; position: absolute; inset: 0; }
.rz-site h3 a:hover { color: var(--accent-ink); }
.rz-site p { margin: 0; font-size: 15px; color: var(--ink-2); }

/* ---------- Responsywność ---------- */
@media (max-width: 1100px) {
  .rz-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rz-ledger > div:nth-child(2) { border-right: 0; }
  .rz-ledger > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .rz-head { grid-template-columns: 1fr; gap: 8px; }
  .rz-no { padding-top: 0; }
  .rz-status { padding-top: 6px; }
  .rz-lab__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rz-tests { grid-column: 1 / -1; }
  .rz-explode { grid-template-columns: 1fr; }
  .rz-explode__draw { max-width: 640px; }
  .rz-gates { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .rz-gates li:nth-child(3) { border-right: 0; }
  .rz-sites > ul { grid-template-columns: 1fr 1fr; }
  .rz-facts, .rz-facts:has(> li:nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .rz-stage { padding-right: 0; padding-bottom: 46%; }
  .rz-phone { width: 42%; bottom: 0; right: 4%; }
  .rz-cap { max-width: none; }
  .rz-evolve { grid-template-columns: 1fr; }
  .rz-evolve__arrow { height: 48px; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .rz-lab__grid, .rz-ledgerform { grid-template-columns: 1fr; }
  .rz-gates { grid-template-columns: 1fr 1fr; }
  .rz-gates li:nth-child(3) { border-right: 1px dashed var(--line); }
  .rz-gates li:nth-child(2n) { border-right: 0; }
  .rz-tr { grid-template-columns: minmax(0, 1fr) 96px; }
  .rz-tr > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; padding-top: 0; border-right: 0; color: var(--ink-2); }
  .rz-tr > span:first-child { grid-row: 1; }
  .rz-tr--h > span:nth-child(2) { display: none; }
  .rz-sites > ul { grid-template-columns: 1fr; gap: 36px; }
  .rz-entry__row { grid-template-columns: minmax(0, 1fr) 30px 120px; gap: 8px; font-size: 14px; }
}
@media (max-width: 480px) {
  .rz-ledger { grid-template-columns: 1fr; }
  .rz-ledger > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .rz-ledger > div:last-child { border-bottom: 0; }
  .rz-gates { grid-template-columns: 1fr; }
  .rz-facts, .rz-facts:has(> li:nth-child(5)) { grid-template-columns: 1fr; }
  .rz-gates li { border-right: 0 !important; border-bottom: 1px dashed var(--line); }
  .rz-tabs button { flex: 1 1 calc(50% - 6px); }
}
@media (prefers-reduced-motion: reduce) {
  .rz-phone, .rz-site__shots img { transition: none !important; }
}

/* =========================================================
   Zwiastun na stronie głównej (ARK. 05)
   ========================================================= */
.rzt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto; gap: 16px; }
.rzt { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--ink); background: var(--paper); text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.rzt:hover, .rzt:focus-visible { transform: translate(-4px, -4px); box-shadow: 4px 4px 0 var(--ink); }
.rzt h3 { margin: 0; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.08; font-weight: 800; font-stretch: 92%; letter-spacing: -.02em; }
.rzt p { margin: 0; color: var(--ink-2); font-size: 15px; }
.rzt__no { font-size: 11px; letter-spacing: .08em; color: var(--ink-3); }
.rzt__hook { margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--accent-ink); display: inline-flex; gap: 8px; align-items: center; }
.rzt__hook i { font-style: normal; transition: transform .25s; }
.rzt:hover .rzt__hook i { transform: translateX(5px); }

/* Tolsa: duża karta z ekranem i telefonem */
.rzt--tolsa { grid-column: 1 / 3; grid-row: 1 / 3; padding: 0; background: var(--rz-dark); color: var(--paper); border-color: var(--rz-dark); }
.rzt--tolsa:hover, .rzt--tolsa:focus-visible { box-shadow: 4px 4px 0 var(--accent); }
.rzt__shot { position: relative; flex: 1; min-height: 300px; overflow: hidden;
  background-image: linear-gradient(var(--rz-dark-line) 1px, transparent 1px), linear-gradient(90deg, var(--rz-dark-line) 1px, transparent 1px);
  background-size: calc(var(--mm) * 10) calc(var(--mm) * 10); }
.rzt__shot img:first-child { position: absolute; left: 22px; top: 22px; width: 88%; height: auto; border: 1px solid rgba(236, 235, 228, .18); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); transition: transform .6s cubic-bezier(.2, .7, .1, 1); }
.rzt__phone { position: absolute; right: 22px; top: 44px; width: 24%; height: auto; border-radius: 22px; border: 5px solid #1c1d22; box-shadow: -18px 20px 50px rgba(0, 0, 0, .6); transform: rotate(4deg); transition: transform .6s cubic-bezier(.2, .7, .1, 1); }
.rzt--tolsa:hover .rzt__shot img:first-child { transform: translate(-6px, -6px); }
.rzt--tolsa:hover .rzt__phone { transform: rotate(0deg) translateY(-28px); }
.rzt--tolsa .rzt__body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; padding: 22px; background: linear-gradient(transparent, var(--rz-dark) 30%); margin-top: -40px; padding-top: 52px; }
.rzt--tolsa h3 { font-size: clamp(26px, 2.8vw, 40px); max-width: 640px; }
.rzt--tolsa p { color: rgba(236, 235, 228, .7); }
.rzt--tolsa .rzt__no { color: rgba(236, 235, 228, .5); }
.rzt--tolsa .rzt__hook { color: var(--rz-amber); }

/* Archiv: bramki z kropką, która zatrzymuje się na czwartej */
.rzt__gates { position: relative; display: flex; justify-content: space-between; height: 56px; margin-bottom: 6px; border-bottom: 1px dashed var(--line); }
.rzt__gates i { width: 2px; height: 34px; margin-top: 12px; background: var(--ink); position: relative; }
.rzt__gates i::after { content: ""; position: absolute; left: -4px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); box-sizing: border-box; }
.rzt__gates i:nth-child(4)::after { animation: rzt-deny 4s infinite; }
.rzt__gates::before { content: ""; position: absolute; top: 25px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); animation: rzt-run 4s cubic-bezier(.5, 0, .5, 1) infinite; }
@keyframes rzt-run { 0% { left: 0; background: var(--ok); opacity: 0; } 8% { opacity: 1; } 50% { left: calc(60% - 6px); background: var(--ok); } 56%, 92% { left: calc(60% - 6px); background: var(--rz-bad); opacity: 1; } 100% { left: calc(60% - 6px); background: var(--rz-bad); opacity: 0; } }
@keyframes rzt-deny { 0%, 52% { background: var(--paper); border-color: var(--ink); } 56%, 92% { background: var(--rz-bad); border-color: var(--rz-bad); } 100% { background: var(--paper); } }

/* tolaccount: dekret, który się nie bilansuje */
.rzt__ledger { display: grid; grid-template-columns: auto auto auto; justify-content: start; align-items: baseline; gap: 4px 10px; padding: 12px 14px; margin-bottom: 6px; background: var(--rz-dark); color: var(--paper); font-size: 14px; }
.rzt__ledger b { color: var(--rz-bad); font-size: 18px; }
.rzt__ledger em { grid-column: 1 / -1; font-style: normal; font-size: 11px; color: #ff6b5a; letter-spacing: .08em; animation: blink 1.6s steps(2) infinite; }

/* Strony: trzy miniatury w rzędzie */
.rzt--sites { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 24px; }
.rzt__thumbs { display: flex; flex: 0 0 auto; width: min(52%, 560px); }
/* Wachlarz: stała kolejność warstw (środek na wierzchu), żeby transformacja nie zmieniała nakładania. */
.rzt__thumbs { position: relative; isolation: isolate; padding: 10px 14px; }
.rzt__thumbs img { position: relative; width: 40%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--ink); box-shadow: 0 10px 24px rgba(20, 21, 24, .22); transform-origin: 50% 100%; transition: transform .45s cubic-bezier(.2, .7, .1, 1), box-shadow .45s; }
.rzt__thumbs img + img { margin-left: -10%; }
.rzt__thumbs img:nth-child(1) { z-index: 1; transform: rotate(-3deg); }
.rzt__thumbs img:nth-child(2) { z-index: 3; transform: translateY(-4px); }
.rzt__thumbs img:nth-child(3) { z-index: 2; transform: rotate(3deg); }
.rzt--sites:hover .rzt__thumbs img:nth-child(1), .rzt--sites:focus-visible .rzt__thumbs img:nth-child(1) { transform: translateX(-12px) rotate(-6deg); }
.rzt--sites:hover .rzt__thumbs img:nth-child(2), .rzt--sites:focus-visible .rzt__thumbs img:nth-child(2) { transform: translateY(-10px) scale(1.04); box-shadow: 0 18px 36px rgba(20, 21, 24, .32); }
.rzt--sites:hover .rzt__thumbs img:nth-child(3), .rzt--sites:focus-visible .rzt__thumbs img:nth-child(3) { transform: translateX(12px) rotate(6deg); }
.rzt--sites .rzt__body { display: flex; flex-direction: column; gap: 8px; }

.rzt-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }
.rzt-cta p { margin: 0; font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }

@media (max-width: 1100px) {
  .rzt-grid { grid-template-columns: 1fr 1fr; }
  .rzt--tolsa { grid-column: 1 / -1; grid-row: auto; }
  .rzt__shot { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  .rzt-grid { grid-template-columns: 1fr; }
  .rzt__shot img:first-child { left: 14px; top: 14px; width: 92%; }
  .rzt__phone { width: 30%; right: 14px; top: 28px; }
  .rzt--sites { flex-direction: column; align-items: stretch; }
  .rzt__thumbs { width: 100%; }
  .rzt-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rzt__gates::before { animation: none; left: calc(60% - 6px); background: var(--rz-bad); }
  .rzt__gates i:nth-child(4)::after { animation: none; background: var(--rz-bad); border-color: var(--rz-bad); }
}

/* =========================================================
   Podstrona realizacje.html
   ========================================================= */
.rz-page .rz-intro { padding-top: clamp(120px, 18vh, 180px); }
.rz-page .rz-intro .sheet__head { max-width: 1180px; }
.rz-page .rz-h1 { font-size: clamp(40px, 6.4vw, 96px); }
.rz-page .rz-case, .rz-page .rz-sites { margin-bottom: 0; }
.rz-page .rz-index { margin-bottom: 0; }
.rz-sites__h { margin: 0 0 6px; font-size: clamp(34px, 4.6vw, 64px); line-height: .98; font-weight: 800; font-stretch: 88%; letter-spacing: -.025em; }
.nav nav a[aria-current="page"]::after { transform: scaleX(1); }
.rz-end__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.rz-end__ghost { color: var(--paper); border-color: rgba(236, 235, 228, .5); }
.rz-end__ghost:hover { background: var(--paper); color: var(--ink); }
.footer a { color: inherit; }
