/* =============================================================================
   otocrm.pl — „Kalibracja”
   Strona zbudowana jak instrukcja precyzyjnego przyrządu: wszystko na widocznej
   siatce, każdy rozdział z numerem i blokiem tytułowym, pomarańcz „oto” tylko tam,
   gdzie przyrząd wskazuje wynik. Materiał: anodowane aluminium (jasny) / grafit (ciemny).
   Kolejność: fonty → tokeny → reset → typografia → układ → nagłówek → hero → sekcje →
   komponenty → stopka → 404 → ruch → responsywność → druk.
   Zakazy (żeby nie zjechać w szablon): brak kart z cieniem, gradientów, pigułek,
   blobów, glow, izometrii; pomarańcz #F37021 nigdy jako tekst w motywie jasnym.
   ========================================================================== */

/* --- Fonty (self-hosted, latin + latin-ext) --------------------------------- */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/archivo-normal-400-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: "Archivo"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/archivo-normal-400-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; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-mono-normal-400-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: 400; font-display: swap; src: url(../fonts/ibm-plex-mono-normal-400-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: 500; font-display: swap; src: url(../fonts/ibm-plex-mono-normal-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(../fonts/ibm-plex-mono-normal-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; }
/* Zastępniki z dopasowaną metryką — mniejszy skok układu przy podmianie fontu. */
@font-face { font-family: "Archivo Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 99%; ascent-override: 92%; descent-override: 22%; line-gap-override: 0%; }
@font-face { font-family: "Plex Mono Fallback"; src: local("Consolas"), local("Courier New"); size-adjust: 100%; }

/* --- Tokeny ------------------------------------------------------------------- */
:root {
  color-scheme: light dark;
  /* materiał: aluminium */
  --bg: #F0F0EE;
  --surface: #FFFFFF;
  --surface-2: #E7E7E4;
  --ink: #111111;
  --ink-2: #4A4A48;
  --ink-3: #6B6B6D;        /* etykiety mono ≥ 13 px: 4,6:1 na --bg */
  --line: #D6D6D3;         /* hairline dekoracyjny */
  --line-strong: #111111;  /* linie znaczące: ramki, focus */
  --line-ui: #83838A;      /* obrysy UI ≥ 3:1 */
  /* pomarańcz „oto”: znacznik (nigdy tekst w jasnym) i jego wersja tekstowa */
  --oto: #F37021;
  --oto-ink: #A8460A;
  --on-oto: #111111;
  /* Tablica — jedyny stale ciemny komponent */
  --tab-bg: #141416;
  --tab-ink: #F2F2F0;
  --tab-muted: #A9AEB6;
  --tab-line: #2E2E33;
  --tab-border: transparent;
  /* kroje */
  --font: "Archivo", "Archivo Fallback", Arial, Helvetica, sans-serif;
  --mono: "IBM Plex Mono", "Plex Mono Fallback", Consolas, "Courier New", monospace;
  /* rytm */
  --header-h: 56px;
  --gutter: clamp(16px, 4vw, 40px);
  --container: 1280px;
  --gap: 24px;
  --section-y: clamp(72px, 6vw + 40px, 128px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 400ms;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141416; --surface: #1C1C1F; --surface-2: #232326;
    --ink: #F2F2F0; --ink-2: #B4B4B2; --ink-3: #8A8A8C;
    --line: #2A2A2E; --line-strong: #F2F2F0; --line-ui: #6E6E74;
    --oto: #F37021; --oto-ink: #F37021; --on-oto: #111111;
    --tab-bg: #0C0C0E; --tab-ink: #F2F2F0; --tab-muted: #A9AEB6; --tab-line: #2E2E33; --tab-border: #3A3A3F;
  }
}
:root[data-theme="dark"] {
  --bg: #141416; --surface: #1C1C1F; --surface-2: #232326;
  --ink: #F2F2F0; --ink-2: #B4B4B2; --ink-3: #8A8A8C;
  --line: #2A2A2E; --line-strong: #F2F2F0; --line-ui: #6E6E74;
  --oto: #F37021; --oto-ink: #F37021; --on-oto: #111111;
  --tab-bg: #0C0C0E; --tab-ink: #F2F2F0; --tab-muted: #A9AEB6; --tab-line: #2E2E33; --tab-border: #3A3A3F;
}

/* --- Reset -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; font-variant-numeric: tabular-nums; }
img, svg, video { display: block; max-width: 100%; }
svg { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--oto-ink); }
strong { font-weight: 600; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --- Typografia ----------------------------------------------------------------- */
h1, h2, h3 { font-weight: 500; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 1.6rem + 3vw, 4rem); line-height: 1.02; letter-spacing: -.025em; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); line-height: 1.08; letter-spacing: -.02em; }
h3 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); line-height: 1.25; letter-spacing: -.01em; }
.lead { font-size: clamp(1.125rem, 1rem + .5vw, 1.3125rem); line-height: 1.5; }
.mono { font-family: var(--mono); font-size: 13px; line-height: 1.4; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.mono-sm { font-size: 12px; }
.muted { color: var(--ink-2); }
.text p + p { margin-top: 1.25em; }
.text { max-width: 66ch; }
.text h3 { margin-top: 2.25em; margin-bottom: .6em; }
.text h3:first-child { margin-top: 0; }
.text ol, .text ul { list-style: none; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Kwadrat 8×8 — jedyny marker strony */
.sq { display: inline-block; width: 8px; height: 8px; background: var(--oto); flex: none; vertical-align: middle; }
.sq-out { display: inline-block; width: 8px; height: 8px; border: 1.5px solid currentColor; flex: none; }

/* --- Układ ------------------------------------------------------------------------ */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.c-margin { grid-column: 1 / 4; }
.c-text { grid-column: 4 / 11; }
.c-side { grid-column: 11 / 13; }
.c-full { grid-column: 1 / -1; }
.c-body { grid-column: 4 / 13; }
.c-margin.sticky { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; max-height: calc(100vh - var(--header-h) - 64px); overflow: auto; }
/* Widoczna siatka: hairline'y na krawędziach kolumn 1, 4, 7, 10 — tylko w hero i głowicach. */
.gridlines { position: relative; }
.gridlines::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--line), var(--line)), linear-gradient(var(--line), var(--line)); background-size: 1px 100%, 1px 100%; background-position: 0 0, calc(25% - var(--gap) / 4) 0; background-repeat: no-repeat; }
/* Linie leżą w środku odstępu między kolumnami (3|4 i 6|7), nie na krawędzi tekstu. */
.hero .gridlines::before { background-position: 0 0, 50% 0; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 16px; background: var(--ink); color: var(--bg); text-decoration: none; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.skip-link:focus { top: 12px; }

/* Linia kalibracyjna: 2 px pomarańcz z podziałką co 1/12 szerokości */
.calib { position: relative; height: 2px; background: var(--oto); margin-top: 10px; }
.calib::before { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 8px; background: repeating-linear-gradient(90deg, var(--oto) 0 1px, transparent 1px calc(100% / 12)); }
.calib::after { content: ""; position: absolute; right: 0; bottom: 2px; width: 1px; height: 8px; background: var(--oto); }

/* --- Przyciski i etykiety ------------------------------------------------------- */
.btn-mono { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line-ui); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); text-decoration: none; background: transparent; white-space: nowrap; transition: border-color .15s, background-color .15s; }
.btn-mono:hover { border-color: var(--ink); color: var(--ink); }
.btn-mono .ic { width: 14px; height: 14px; }
[data-toc-toggle] .lbl-short { display: none; }
@media (max-width: 480px) { [data-toc-toggle] .lbl-short { display: inline; } }
.link-mono { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.link-mono:hover { color: var(--oto-ink); border-color: var(--oto-ink); }
.link-mono .ic { width: 14px; height: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.chip .sq { width: 6px; height: 6px; }
.chips { display: flex; flex-direction: column; gap: 10px; }

/* --- Nagłówek strony -------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 100%; }
.wordmark { display: inline-flex; align-items: center; gap: 0; font-weight: 600; font-size: 19px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.wordmark:hover { color: var(--ink); }
.wordmark .tld { color: var(--ink-3); font-weight: 400; }
.wordmark .sq { margin-right: 10px; }
.nav-num { display: none; }
.nav-num ol { list-style: none; display: flex; gap: 4px; }
.nav-num a { display: grid; place-items: center; width: 28px; height: 28px; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink-3); text-decoration: none; transition: color .15s, background-color .15s; }
.nav-num a:hover { color: var(--ink); }
.nav-num a[aria-current] { background: var(--oto); color: var(--on-oto); }
.nav-current { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); min-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle .t-dark, :root[data-theme="dark"] .theme-toggle .t-light { display: none; }
:root[data-theme="dark"] .theme-toggle .t-dark { display: inline; }
:root[data-theme="dark"] .theme-toggle .sq-out { background: currentColor; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--oto); transform: scaleX(0); transform-origin: left; }
html:not(.js) .progress { display: none; }

/* Spis treści — panel pod nagłówkiem */
.toc-panel { position: fixed; left: 0; right: 0; top: var(--header-h); z-index: 49; max-height: calc(100vh - var(--header-h)); overflow: auto; background: var(--surface); border-bottom: 1px solid var(--line-strong); }
.toc-inner { display: grid; grid-template-columns: 1fr; padding: 20px 0 24px; }
.toc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.toc-list { list-style: none; display: grid; grid-template-columns: 1fr; }
.toc-list a { display: flex; align-items: baseline; gap: 16px; min-height: 48px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 17px; }
.toc-list a:hover { color: var(--oto-ink); }
.toc-list a .n { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink-3); width: 28px; flex: none; }
.toc-list a[aria-current] .n { color: var(--on-oto); background: var(--oto); text-align: center; }

/* --- Hero -------------------------------------------------------------------------- */
.hero { padding-top: clamp(40px, 6vw, 88px); }
.hero-grid { align-items: start; row-gap: 40px; }
.hero-copy { grid-column: 1 / 7; padding-bottom: clamp(24px, 4vw, 56px); }
.hero-copy .mono { margin-bottom: 28px; display: flex; align-items: center; gap: 12px; }
.hero-copy h1 { max-width: 12ch; }
.hero-copy .lead { margin-top: 32px; max-width: 30em; }
.hero-copy .lead + .lead { margin-top: 20px; color: var(--ink-2); }
.hero-hint { margin-top: 36px; }
.hero-art { grid-column: 7 / 13; align-self: center; display: flex; flex-direction: column; padding-bottom: clamp(24px, 4vw, 56px); }
.hero-art figcaption { margin-top: 12px; display: flex; justify-content: space-between; gap: 16px; }
.hero .calib { margin-top: 28px; }

/* --- Sekcje ------------------------------------------------------------------------- */
.sec { padding-top: var(--section-y); }
.sec-head { position: relative; padding-bottom: 18px; margin-bottom: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.sec-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 240px; height: 1px; background: var(--oto); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.sec.is-current .sec-head::after { transform: scaleX(1); }
.sec-meta { display: flex; flex-wrap: wrap; gap: 0 12px; margin-bottom: 20px; }
.sec-meta .sep::before { content: "—"; color: var(--line-ui); }
.sec-title { align-items: baseline; }
.sec-num { grid-column: 1 / 4; font-family: var(--mono); font-weight: 400; font-size: clamp(56px, 6vw, 88px); line-height: .9; color: var(--ink-3); letter-spacing: -.02em; }
.sec-title h2 { grid-column: 4 / 11; max-width: 18ch; }
.sec-lead { grid-column: 4 / 11; margin-top: 8px; max-width: 34em; }

/* Zastrzeżenie: „UWZGLĘDNIJ” z rozjazdem — nota w instrukcji serwisowej, nie ramka */
.note { position: relative; padding-left: 20px; border-left: 1px solid var(--line-strong); color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.note .note-label { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--oto-ink); }
.note .note-label .ic { width: 22px; height: 14px; }
.note p + p { margin-top: .8em; }

/* Podstawowy blok sekcji: margines + tekst + wstawka */
.sec-body { row-gap: 32px; }
.c-body > * + * { margin-top: 36px; }
.c-body > .check-block, .faq > details { margin-top: 0; }
.margin-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.margin-list a { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; text-decoration: none; font-size: 15px; color: var(--ink-2); border-left: 2px solid transparent; padding-left: 12px; margin-left: -14px; transition: color .15s, border-color .15s; }
.margin-list a .n { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink-3); flex: none; }
.margin-list a:hover, .margin-list a[aria-current] { color: var(--ink); border-left-color: var(--oto); }
.margin-list a[aria-current] .n { color: var(--oto-ink); }
.margin-note { font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 24em; }
.margin-block + .margin-block { margin-top: 28px; }
.margin-block .mono { margin-bottom: 10px; display: block; }
.side-glyph { display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); }
.side-glyph svg { width: 100%; max-width: 160px; height: auto; }
.side-glyph .cap { font-size: 12px; line-height: 1.4; color: var(--ink-3); font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; }

/* Rysunki: jeden język — kreska 1,5 px currentColor, kratka punktowa tylko wewnątrz SVG */
.fig { color: var(--ink); }
.fig svg { width: 100%; height: auto; }
.fig .cap { margin-top: 12px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fig text { font-family: var(--mono); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; fill: var(--ink-3); }
.fig text.k { fill: var(--ink); }
.fig .st { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fig .st-thin { fill: none; stroke: var(--line-ui); stroke-width: 1; }
.fig .st-dash { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 3 4; stroke-linecap: round; }
.fig .fill-s { fill: var(--surface); }
.fig .fill-b { fill: var(--bg); }
.fig .fill-2 { fill: var(--surface-2); }
.fig .fill-i { fill: var(--ink); }
.fig .fill-l { fill: var(--line); }
.fig .oto { fill: var(--oto); }
.fig .dots { fill: var(--line-ui); }

/* --- Sekcja 1: skala zakresu i para wymagań ------------------------------------------- */
.scale { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 18px; margin: 40px 0 8px; }
.scale-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; }
.scale-row .lbl { grid-column: 1 / 4; }
.scale-row .bar { grid-column: 4 / 13; position: relative; height: 18px; }
.scale-row .bar::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 1px; background: var(--line); }
.scale-row .bar i { position: absolute; left: 0; top: 8px; height: 2px; background: var(--ink); width: var(--w); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease); }
.scale-row .bar i::after { content: ""; position: absolute; right: -1px; top: -5px; width: 1px; height: 12px; background: var(--ink); }
.scale-row .bar .ret { position: absolute; top: 12px; left: 0; width: var(--w); height: 6px; border-left: 0; }
.scale-row .bar .ret::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 0; border-top: 1px dashed var(--line-ui); }
.scale-row .bar .ret::after { content: ""; position: absolute; left: 0; top: 0; width: 8px; height: 8px; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); }
.is-in .scale-row .bar i, html:not(.js) .scale-row .bar i { transform: scaleX(1); }
.scale-row .bar .sq { position: absolute; right: -4px; top: 5px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); margin-top: 40px; border-top: 1px solid var(--line); }
.pair > div { padding: 20px 0 4px; }
.pair > div + div { border-left: 1px solid var(--line); padding-left: var(--gap); }
.pair .mono { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pair q { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); font-weight: 500; line-height: 1.2; letter-spacing: -.015em; color: var(--ink); quotes: "„" "”"; }

/* --- Sekcja 2: wiersze arkusza ------------------------------------------------------- */
.sheet { border-top: 1px solid var(--line); }
.sheet-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 16px; padding: 36px 0 40px; border-bottom: 1px solid var(--line); }
.sheet-row .r-num { grid-column: 1 / 4; display: flex; flex-direction: column; gap: 18px; }
.sheet-row .r-num .n { font-family: var(--mono); font-size: clamp(28px, 2.6vw, 40px); font-weight: 400; color: var(--ink-3); line-height: 1; letter-spacing: -.02em; transition: color .3s; }
.sheet-row.is-current .r-num .n { color: var(--oto-ink); }
.sheet-row .r-num .pict { width: 40px; height: 40px; color: var(--ink); }
.sheet-row .r-main { grid-column: 4 / 8; }
.sheet-row .r-main h3 { margin-bottom: 12px; }
.sheet-row .r-note { grid-column: 8 / 13; }

/* --- Sekcja 3: Tablica ----------------------------------------------------------------- */
.tablica { margin-top: 8px; background: var(--tab-bg); color: var(--tab-ink); border: 1px solid var(--tab-border); padding: 0 clamp(16px, 2.5vw, 32px) 8px; }
.tablica-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0 14px; border-bottom: 1px solid var(--tab-line); color: var(--tab-muted); }
.tablica-head .mono { color: var(--tab-muted); }
.tablica-head .sq { width: 8px; height: 8px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 20px 20px 22px 0; border-bottom: 1px solid var(--tab-line); font-size: 16px; line-height: 1.5; }
.tbl thead th { position: sticky; top: var(--header-h); background: var(--tab-bg); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--tab-muted); padding: 14px 20px 12px 0; z-index: 2; }
.tbl tbody th { font-weight: 500; font-size: 17px; color: var(--tab-ink); width: 26%; }
.tbl tbody td { color: var(--tab-ink); width: 37%; }
.tbl tbody tr { position: relative; }
.tbl tbody tr:hover th::before, .tbl tbody tr:focus-within th::before { content: ""; position: absolute; left: -12px; top: 22px; width: 3px; height: 20px; background: var(--oto); }
.tbl tbody th { position: relative; }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .rownum { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--tab-muted); margin-bottom: 8px; text-decoration: none; }
.tbl .rownum:hover { color: var(--oto); }
.tbl td .lbl { display: none; }
.tablica :focus-visible { outline-color: var(--tab-ink); }
.tablica-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 0 10px; color: var(--tab-muted); font-size: 14px; }
.tablica-foot .mono { color: var(--tab-muted); }

/* --- Sekcja 4: słownik i przepływ ------------------------------------------------------- */
.dict { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); row-gap: 32px; }
.dict > div { border-top: 1px solid var(--line-strong); padding-top: 16px; }
.dict .mono { display: block; margin-bottom: 12px; color: var(--ink); }
.dict .fig { margin-top: 20px; max-width: 420px; }
.flow-sentence { margin-top: 40px; }
.flow { margin-top: 24px; padding: 28px 0 8px; border-top: 1px solid var(--line); }
.flow-list { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 40px; }
.flow-list li { position: relative; min-height: 104px; padding: 14px 16px 16px; border: 1px solid var(--line-strong); background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.flow-list li + li::before { content: ""; position: absolute; left: -41px; top: 50%; width: 40px; height: 1px; background: var(--ink); }
.flow-list li + li::after { content: ""; position: absolute; left: -21px; top: calc(50% - 6px); width: 1px; height: 12px; background: var(--line-ui); }
.flow-list .fl-n { font-family: var(--mono); font-size: 22px; line-height: 1; color: var(--ink); }
.flow-list .fl-t { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.flow-list li .sq { position: absolute; left: -5px; top: calc(50% - 4px); }
.flow .cap { margin-top: 18px; display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.exchange .ex-v { display: none; }
.labels-row { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 24px 0 8px; }

/* --- Sekcja 5: wymiana --------------------------------------------------------------- */
.exchange { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.confirm-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.confirm-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.confirm-list li .sq-out { margin-top: 5px; width: 10px; height: 10px; color: var(--line-ui); }

/* --- Sekcja 6: warianty --------------------------------------------------------------- */
.variants { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; border-top: 1px solid var(--line-strong); }
.variant { padding: 28px var(--gap) 8px 0; }
.variant + .variant { border-left: 1px solid var(--line); padding-left: var(--gap); }
.variant .v-letter { font-family: var(--mono); font-size: 40px; font-weight: 400; line-height: 1; color: var(--ink-3); letter-spacing: -.02em; }
.variant .fig { margin: 20px 0 22px; color: var(--ink); max-width: 300px; }
.variant h3 { margin-bottom: 12px; }
.variant .mono { display: block; margin-top: 8px; }
.example { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.example .mono { margin-bottom: 14px; display: block; }

/* --- Sekcja 7: rejestr kontrolny ------------------------------------------------------- */
/* Blok leży już w kolumnach 4–12 (.c-body), więc własna siatka to tylko: tekst + wstawka. */
.check-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 23%); column-gap: calc(var(--gap) * 2); row-gap: 20px; padding: 32px 0 36px; border-top: 1px solid var(--line); }
.check-block:first-of-type { border-top: 0; padding-top: 0; }
.check-block .cb-text { grid-column: 1; max-width: 66ch; }
.check-block .cb-text h3 { display: flex; gap: 14px; align-items: baseline; margin-bottom: 14px; }
.check-block .cb-text h3 .n { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: .04em; flex: none; }
.check-block .cb-side { grid-column: 2; padding-top: 6px; }
.check-block .cb-spacer { display: none; }

/* --- Sekcja 8: wyświetlacz, linia montażowa, kryterium --------------------------------- */
.display { margin: 28px 0 36px; background: var(--surface); border: 1px solid var(--line); padding: 26px clamp(20px, 3vw, 36px) 28px; display: flex; flex-direction: column; }
.display .display-label { order: -1; display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.display .display-text { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); font-weight: 500; line-height: 1.18; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.assembly { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); margin-top: 32px; position: relative; padding-top: 28px; counter-reset: step; }
.assembly::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); }
.assembly::after { content: ""; position: absolute; left: 0; right: 0; top: 1px; height: 8px; background: repeating-linear-gradient(90deg, var(--line-ui) 0 1px, transparent 1px calc(100% / 24)); }
.assembly li { position: relative; padding-top: 8px; }
.assembly li::before { counter-increment: step; content: counter(step); display: block; font-family: var(--mono); font-size: clamp(40px, 4vw, 64px); font-weight: 400; line-height: 1; color: var(--ink-3); letter-spacing: -.02em; margin-bottom: 18px; }
.assembly li::after { content: ""; position: absolute; left: 0; top: -4px; width: 1px; height: 12px; background: var(--ink); }
.assembly li p { font-size: 16px; line-height: 1.5; color: var(--ink-2); padding-right: 8px; }
.assembly li:nth-child(4)::after { background: var(--oto); width: 8px; height: 8px; top: -4px; left: 0; }
.criterion { margin-top: 36px; background: var(--surface); border: 1px solid var(--line); padding: 22px clamp(20px, 3vw, 32px) 24px; }
.criterion .mono { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.criterion ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px var(--gap); margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.criterion li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.criterion li .sq-out { margin-top: 5px; width: 10px; height: 10px; color: var(--line-ui); }

/* --- Sekcja 9: FAQ ---------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 56px 1fr 40px; align-items: baseline; gap: 12px; padding: 22px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .n { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--ink-3); }
.faq summary h3 { font-size: clamp(1.125rem, 1.05rem + .4vw, 1.375rem); }
.faq summary .plus { justify-self: end; font-family: var(--mono); font-size: 22px; line-height: 1; color: var(--ink-3); transition: transform .2s var(--ease); align-self: center; }
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq summary:hover h3 { color: var(--oto-ink); }
.faq .answer { padding: 0 0 26px 68px; max-width: 70ch; color: var(--ink-2); }
.faq .answer p + p { margin-top: 1em; }
.verdict { display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--bg); padding: 4px 8px; margin-right: 8px; vertical-align: 2px; }

/* --- Stopka ------------------------------------------------------------------------------ */
.site-footer { margin-top: var(--section-y); border-top: 1px solid var(--line-strong); padding-top: 40px; }
.footer-grid { row-gap: 32px; }
.footer-brand { grid-column: 1 / 4; }
.footer-brand p { margin-top: 12px; font-size: 15px; color: var(--ink-2); max-width: 22em; }
.footer-toc { grid-column: 4 / 10; }
.footer-toc ol { list-style: none; columns: 2; column-gap: var(--gap); }
.footer-toc li { break-inside: avoid; }
.footer-toc a { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; text-decoration: none; font-size: 15px; color: var(--ink-2); }
.footer-toc a:hover { color: var(--ink); }
.footer-toc a .n { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink-3); width: 24px; flex: none; }
.footer-meta { grid-column: 10 / 13; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.footer-bottom { margin-top: 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 20px; font-size: 14px; color: var(--ink-3); }
.site-footer .calib { margin: 0; }

/* „do góry” */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-ui); background: var(--bg); color: var(--ink); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--ink); }
.to-top .ic { width: 18px; height: 18px; }

/* --- 404 ------------------------------------------------------------------------------------ */
.err { padding-top: clamp(64px, 10vw, 140px); min-height: 60vh; }
.err .mono { margin-bottom: 24px; display: flex; gap: 12px; align-items: center; }
.err h1 { max-width: 14ch; }
.err .lead { margin-top: 24px; max-width: 30em; }
.err .actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }
.err-num { grid-column: 1 / 4; font-family: var(--mono); font-size: clamp(64px, 8vw, 120px); line-height: .9; color: var(--ink-3); letter-spacing: -.03em; }
.err-copy { grid-column: 4 / 11; }

/* --- Ruch --------------------------------------------------------------------------------------- */
html.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* Hero: sekwencja gra raz — stan spoczynkowy w CSS to stan końcowy. */
.hero-scene .ring { transform-origin: center; transform-box: fill-box; opacity: .3; }
.hero-scene .ring-2 { opacity: .16; }
.hero-scene .pk-1, .hero-scene .pk-2 { opacity: 0; }
.hero-scene .new-row { opacity: 1; }
.hero-scene .new-row-dots { opacity: 0; }
.hero-scene .rule-3 .knob { transform: translateX(0); }
html.js .hero-scene.has-played:not(.is-static) .pk-1 { animation: pk1 1s var(--ease) both; }
html.js .hero-scene.has-played:not(.is-static) .pk-2 { animation: pk2 1s var(--ease) 1.3s both; }
html.js .hero-scene.has-played:not(.is-static) .new-row { animation: rowin .5s var(--ease) 2.3s both; }
html.js .hero-scene.has-played:not(.is-static) .new-row-dots { animation: rowout .4s var(--ease) 2.3s both; }
html.js .hero-scene.has-played:not(.is-static) .rule-3 .knob { animation: knob .6s var(--ease) 1s both; }
html.js .hero-scene.is-live:not(.is-static) .ring { animation: ring 2.6s ease-out infinite; }
html.js .hero-scene.is-live:not(.is-static) .ring-2 { animation-delay: .8s; }
@keyframes pk1 { 0% { opacity: 1; transform: translateX(0); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateX(32px); } }
@keyframes pk2 { 0% { opacity: 1; transform: translateX(0); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateX(32px); } }
@keyframes rowin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rowout { from { opacity: 1; } to { opacity: 0; } }
@keyframes knob { from { transform: translateX(-40px); } to { transform: translateX(0); } }
@keyframes ring { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(1.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .scale-row .bar i { transform: scaleX(1) !important; }
  .hero-scene .ring { opacity: .3 !important; transform: none !important; }
}
html.no-motion { scroll-behavior: auto; }
html.no-motion *, html.no-motion *::before, html.no-motion *::after { animation: none !important; transition: none !important; }
html.no-motion .reveal { opacity: 1 !important; transform: none !important; }
html.no-motion .scale-row .bar i { transform: scaleX(1) !important; }
html.no-motion .sec-head::after { transform: scaleX(1); }

/* --- Responsywność ---------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .nav-num { display: block; }
  .nav-current { display: block; }
  [data-toc-toggle] { display: none; }
  .toc-inner { grid-template-columns: 1fr; }
  .toc-list { grid-template-columns: 1fr 1fr; column-gap: var(--gap); }
}
@media (max-width: 1023px) {
  .nav-current { display: none; }
  .c-margin, .c-text, .c-side, .c-body { grid-column: 1 / -1; }
  .c-margin.sticky { position: static; max-height: none; overflow: visible; }
  .sec-num { grid-column: 1 / -1; font-size: 56px; margin-bottom: 8px; }
  .sec-title h2 { grid-column: 1 / -1; }
  .sec-lead { grid-column: 1 / -1; }
  .hero-copy { grid-column: 1 / -1; }
  .hero-art { grid-column: 1 / -1; }
  .hero-copy h1 { max-width: 16ch; }
  .gridlines::before { display: none; }
  .sheet-row .r-num { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 16px; }
  .sheet-row .r-main { grid-column: 1 / -1; }
  .sheet-row .r-note { grid-column: 1 / -1; }
  .check-block { grid-template-columns: minmax(0, 1fr); }
  .check-block .cb-text { grid-column: 1 / -1; }
  .check-block .cb-side { grid-column: 1 / -1; }
  .side-glyph { flex-direction: row; align-items: center; gap: 16px; }
  .side-glyph svg { max-width: 120px; }
  .scale-row .lbl { grid-column: 1 / -1; }
  .scale-row .bar { grid-column: 1 / -1; }
  .margin-list { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }
  .margin-list a { margin-left: 0; padding-left: 0; border-left: 0; border-bottom: 2px solid transparent; }
  .margin-list a:hover, .margin-list a[aria-current] { border-bottom-color: var(--oto); }
  .footer-brand, .footer-toc, .footer-meta { grid-column: 1 / -1; }
  .footer-meta { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .chips { flex-direction: row; flex-wrap: wrap; gap: 10px 20px; }
  .exchange .ex-v { display: block; max-width: 440px; }
  .exchange .ex-h { display: none; }
}
@media (max-width: 900px) {
  .variants { grid-template-columns: 1fr; }
  .variant + .variant { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .variant { padding-right: 0; }
  .assembly { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .criterion ul { grid-template-columns: 1fr; }
  .dict { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --header-h: 52px; }
  body { font-size: 16px; }
  .tablica { padding-inline: 16px; }
  .tablica-head { flex-wrap: wrap; }
  .tbl, .tbl tbody, .tbl tr, .tbl th, .tbl td, .tbl tbody th, .tbl tbody td { display: block; width: auto; }
  .flow-list { grid-template-columns: 1fr; row-gap: 32px; }
  .flow-list li { min-height: 0; flex-direction: row; align-items: baseline; gap: 16px; }
  .flow-list li + li::before { left: 24px; top: -33px; width: 1px; height: 32px; }
  .flow-list li + li::after { left: 18px; top: -21px; width: 12px; height: 1px; }
  .flow-list li .sq { left: 20px; top: -5px; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl tbody tr { padding: 18px 0 20px; border-bottom: 1px solid var(--tab-line); }
  .tbl tbody th, .tbl tbody td { border-bottom: 0; padding: 0; }
  .tbl tbody th { padding-bottom: 14px; }
  .tbl tbody td { padding-top: 12px; }
  .tbl td .lbl { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--tab-muted); margin-bottom: 4px; }
  .tbl tbody tr:hover th::before { display: none; }
  .pair { grid-template-columns: 1fr; }
  .pair > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .faq summary { grid-template-columns: 40px 1fr 28px; }
  .faq .answer { padding-left: 0; }
  .assembly { grid-template-columns: 1fr; }
  .assembly::after { display: none; }
  .assembly li { display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; padding-top: 0; }
  .assembly li::before { font-size: 36px; margin: 0; }
  .assembly li::after { display: none; }
  .hero-art figcaption { flex-direction: column; gap: 6px; }
  .toc-list a { min-height: 48px; }
  .footer-bottom { padding-bottom: 72px; } /* miejsce na przycisk „do góry” */
}
.hero-scene .lbl-m { display: none; }
@media (max-width: 600px) {
  .hero-scene text { display: none; }
  .hero-scene .lbl-m { display: block; }
  .hero-scene .lbl-m text { display: block; font-size: 22px; }
}
@media (max-width: 480px) {
  .sec-num { font-size: 44px; }
  .theme-toggle .t-light, .theme-toggle .t-dark { display: none !important; }
  .theme-toggle { width: 32px; padding: 0; justify-content: center; }
  [data-toc-toggle] .lbl-long { display: none; }
  .sheet-row .r-num .n { font-size: 28px; }
  .to-top { right: 12px; bottom: 12px; }
}

/* --- Druk ---------------------------------------------------------------------------------------- */
@media print {
  .site-header, .to-top, .toc-panel, .progress, .theme-toggle, .hero-hint { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .sec { padding-top: 24pt; break-inside: avoid-page; }
  .tablica { background: #fff; color: #000; border: 1px solid #000; }
  .tbl th, .tbl td { color: #000 !important; border-color: #ccc; }
  a { color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
