/* ==========================================================================
   KEMLER — Szkolenia ADR
   System: papier dokumentu przewozowego + pomarańcz tablicy ADR (RAL 2008)
   + oficjalne kolory nalepek jako kolory kategorii.
   Fonty: Archivo (oś szerokości 62–125) + IBM Plex Mono (kody, dane).
   ========================================================================== */

/* ---------- Tokeny ---------- */
:root {
  --paper: #EEEFEB;
  --paper-2: #E3E4DF;
  --paper-3: #D7D9D3;
  --white: #FBFBF9;
  --ink: #111213;
  --ink-2: #393C40;
  --muted: #5B6066;
  --line: rgba(17, 18, 19, .14);
  --line-strong: rgba(17, 18, 19, .3);

  --orange: #F26A1B;
  --orange-deep: #D4560C;
  --orange-tint: #FBD7BF;

  --asphalt: #17191B;
  --asphalt-2: #222528;
  --on-dark: #EDEEEA;
  --on-dark-muted: #A2A7AC;
  --line-dark: rgba(237, 238, 234, .14);

  --h-red: #D52B1E;
  --h-green: #10884A;
  --h-blue: #1F5FBF;
  --h-yellow: #F5D000;

  --ok: #0F7A42;
  --bad: #C0261B;

  --f-sans: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --w-cond: 68%;
  --w-semi: 85%;
  --w-wide: 118%;

  --container: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 10vw, 140px);

  --r-s: 3px;
  --r-m: 6px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 160ms;
  --t-med: 320ms;
  --t-slow: 700ms;

  --z-header: 50;
  --z-menu: 60;
  --z-bar: 40;
  --z-dialog: 100;

  --hdr-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 16px); }
body {
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--orange); color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
.dark :focus-visible, .on-orange :focus-visible { outline-color: var(--ink); }
.dark :focus-visible { outline-color: var(--orange); }
[hidden] { display: none !important; }

.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;
}
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: var(--r-s);
  transform: translateY(-160%); transition: transform var(--t-fast);
}
.skip:focus { transform: none; }

/* ---------- Typografia ---------- */
.display, .h1, .h2, .h3 {
  font-stretch: var(--w-cond);
  font-weight: 800;
  letter-spacing: -.01em;
}
.h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: .94; }
.h2 { font-size: clamp(2.05rem, 3.7vw, 3.2rem); line-height: .98; }
.h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.05; }
.h4 { font-size: 1.125rem; font-weight: 700; line-height: 1.25; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono);
  font-size: .78rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 18px; height: 12px; flex: none;
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 1px;
  box-shadow: inset 0 -5px 0 -3px var(--ink);
}
.dark .eyebrow { color: var(--on-dark-muted); }
.dark .eyebrow::before { border-color: var(--on-dark); box-shadow: inset 0 -5px 0 -3px var(--on-dark); }

.lede { font-size: clamp(1.08rem, 1.35vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.dark .lede { color: var(--on-dark-muted); }
.mono { font-family: var(--f-mono); }
.wide { font-stretch: var(--w-wide); }
.muted { color: var(--muted); }
.mark {
  background: linear-gradient(transparent 62%, var(--orange) 62%, var(--orange) 92%, transparent 92%);
  padding: 0 .06em;
  margin-left: -.06em;
}
.prose p + p { margin-top: 1em; }
.prose { color: var(--ink-2); max-width: 64ch; }
.prose strong { color: var(--ink); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: clamp(56px, 7vw, 96px); }
.dark { background: var(--asphalt); color: var(--on-dark); }
.on-orange { background: var(--orange); color: var(--ink); }
.panel { background: var(--paper-2); }

.sec-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head--split { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .sec-head--split { grid-template-columns: 1.1fr .9fr; gap: 48px; } }
.sec-head .lede { margin: 0; }

/* Taśma ostrzegawcza */
.tape {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 14px, var(--orange) 14px 28px);
  background-size: 39.6px 39.6px;
}
.tape--anim { animation: tape 2.4s linear infinite; }
@keyframes tape { to { background-position: 39.6px 0; } }

/* ---------- Przyciski ---------- */
.btn {
  --bg: var(--ink); --fg: var(--white); --bd: var(--ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 24px;
  font-stretch: var(--w-wide); font-weight: 650; font-size: .95rem; letter-spacing: .005em;
  color: var(--fg); background: var(--bg);
  border: 2px solid var(--bd); border-radius: var(--r-s);
  transition: color var(--t-med) var(--ease-out), transform var(--t-fast), border-color var(--t-med);
  touch-action: manipulation; white-space: nowrap;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--fill, var(--orange));
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--t-med) var(--ease-out);
}
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn:hover { color: var(--fill-fg, var(--ink)); }
.btn:active { transform: scale(.98); }
.btn .ico { width: 18px; height: 18px; transition: transform var(--t-med) var(--ease-out); }
.btn:hover .ico--arrow { transform: translateX(4px); }

/* Przycisk-tablica: pomarańcz z czarną ramką jak tablica ADR */
.btn--plate { --bg: var(--orange); --fg: var(--ink); --bd: var(--ink); --fill: var(--ink); --fill-fg: var(--orange); }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line-strong); --fill: var(--ink); --fill-fg: var(--white); }
.dark .btn--ghost { --fg: var(--on-dark); --bd: var(--line-dark); --fill: var(--on-dark); --fill-fg: var(--ink); }
.dark .btn--plate { --bd: var(--orange); --fill: var(--on-dark); --fill-fg: var(--ink); }
.on-orange .btn { --bg: var(--ink); --fg: var(--orange); --fill: var(--white); --fill-fg: var(--ink); }
.btn--sm { min-height: 42px; padding: 0 16px; font-size: .85rem; }
.btn--block { width: 100%; }

.link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 650; font-stretch: var(--w-wide); font-size: .92rem;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  padding-bottom: 3px;
  transition: background-size var(--t-med) var(--ease-out);
}
.link:hover { background-size: 0 2px; background-position: 100% 100%; }
.link .ico { width: 16px; height: 16px; }

.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Nagłówek ---------- */
.hdr {
  position: sticky; top: 0; z-index: var(--z-header);
  height: var(--hdr-h);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med), background var(--t-med);
  view-transition-name: site-header;
}
.hdr.is-scrolled { border-bottom-color: var(--line); }
.hdr__in { height: 100%; display: flex; align-items: center; gap: 28px; }

.logo { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.logo__plate {
  position: relative; width: 40px; height: 30px; flex: none;
  background: var(--orange); border: 3px solid var(--ink); border-radius: 2px;
  transition: transform var(--t-med) var(--ease-spring);
}
.logo__plate::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: var(--ink); }
.logo:hover .logo__plate { transform: rotate(-6deg) scale(1.06); }
.logo__word { display: grid; line-height: 1; }
.logo__word b { font-stretch: var(--w-wide); font-weight: 850; font-size: 1.12rem; letter-spacing: .06em; text-transform: uppercase; }
.logo__word small { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.dark .logo__word small { color: var(--on-dark-muted); }

.nav { display: none; gap: 4px; margin-inline: auto; }
.nav a {
  position: relative; padding: 10px 12px; font-weight: 550; font-size: .95rem;
  border-radius: var(--r-s); transition: background var(--t-fast);
}
.nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 3px;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { font-weight: 700; }

.hdr__tel { display: none; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: .86rem; font-weight: 500; }
.hdr__tel .ico { width: 16px; height: 16px; }
.hdr__cta { display: none; }
.burger { margin-left: auto; width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--r-s); }
.burger span { position: relative; width: 24px; height: 2px; background: var(--ink); transition: background var(--t-fast); }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: var(--ink);
  transition: transform var(--t-med) var(--ease-out);
}
.burger span::before { transform: translateY(-7px); }
.burger span::after { transform: translateY(7px); }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: rotate(-45deg); }

@media (min-width: 1100px) {
  .nav { display: flex; }
  .burger { display: none; }
  .hdr__cta { display: inline-flex; }
}
@media (min-width: 1240px) { .hdr__tel { display: inline-flex; } }

/* Menu mobilne */
.menu {
  position: fixed; inset: var(--hdr-h) 0 0; z-index: var(--z-menu);
  background: var(--paper); overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 16px var(--gutter) 32px;
}
.menu.is-open { animation: menu-in .45s var(--ease-out) both; }
@keyframes menu-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.menu nav { display: grid; }
.menu nav a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(2rem, 9vw, 2.8rem); font-stretch: var(--w-cond); font-weight: 800; line-height: 1;
  opacity: 0; transform: translateY(16px);
}
.menu nav a small { font-family: var(--f-mono); font-size: .75rem; font-weight: 500; color: var(--muted); letter-spacing: .06em; }
.menu nav a[aria-current="page"] { color: var(--orange-deep); }
.menu.is-open nav a { animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--i) * 45ms + 80ms); }
.menu__foot { margin-top: auto; padding-top: 28px; display: grid; gap: 12px; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Tablica ADR ---------- */
.plate {
  --tilt-x: 0deg; --tilt-y: 0deg;
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  perspective: 1200px;
}
.plate__face {
  position: absolute; inset: 0;
  display: grid; grid-template-rows: 1fr 1fr;
  background:
    radial-gradient(120% 90% at 30% 10%, rgba(255,255,255,.22), transparent 55%),
    var(--orange);
  border: 3.75cqi solid var(--ink);
  border-radius: 1.6cqi;
  box-shadow:
    0 1px 0 rgba(255,255,255,.4) inset,
    0 2.5cqi 5cqi -1.5cqi rgba(17,18,19,.35),
    0 8cqi 14cqi -6cqi rgba(17,18,19,.4);
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease-out);
  overflow: hidden;
}
.plate__face::before {
  /* pozioma linia dzieląca — 15 mm na 400 mm */
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 3.75cqi; transform: translateY(-50%); background: var(--ink); z-index: 2;
}
.plate__face::after {
  /* odblask folii odblaskowej */
  content: ""; position: absolute; inset: -20%;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.38) 47%, rgba(255,255,255,.08) 53%, transparent 60%);
  transform: translateX(-70%);
  animation: sheen 7s var(--ease-in-out) 1.6s infinite;
  pointer-events: none; z-index: 3; mix-blend-mode: soft-light;
}
@keyframes sheen { 0% { transform: translateX(-70%); } 30%, 100% { transform: translateX(70%); } }
.plate__row {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-stretch: 78%; font-weight: 700;
  font-size: 28cqi; line-height: 1; letter-spacing: .01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
.plate__row--top { padding-bottom: 1cqi; }
.plate__row--bottom { padding-top: 1cqi; }
.plate__bolt {
  position: absolute; width: 2.6cqi; height: 2.6cqi; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9ba0a5, #3b3e42 70%);
  box-shadow: 0 0 0 .5cqi rgba(17,18,19,.5);
  z-index: 4;
}
.plate__bolt:nth-of-type(1) { top: 1.6cqi; left: 1.6cqi; }
.plate__bolt:nth-of-type(2) { top: 1.6cqi; right: 1.6cqi; }
.plate__bolt:nth-of-type(3) { bottom: 1.6cqi; left: 1.6cqi; }
.plate__bolt:nth-of-type(4) { bottom: 1.6cqi; right: 1.6cqi; }

/* Rolki cyfr */
.reel { display: inline-block; overflow: hidden; height: 1em; line-height: 1; }
.reel > span { display: block; }
.reel.in > span { animation: reel-in .62s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms); }
.reel.out > span { animation: reel-out .28s cubic-bezier(.5,0,.75,0) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes reel-in { from { transform: translateY(105%); filter: blur(3px); } to { transform: none; filter: none; } }
@keyframes reel-out { to { transform: translateY(-105%); filter: blur(2px); } }

/* Pusta tablica (bez numerów) */
.plate--blank .plate__row { visibility: hidden; }

/* ---------- Nalepki ---------- */
.hz { display: inline-block; width: 56px; aspect-ratio: 1; flex: none; }
.hz svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(17,18,19,.18)); }
.hz--sm { width: 34px; }
.hz--lg { width: 96px; }

/* ---------- HERO ---------- */
.hero { position: relative; padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(48px, 6vw, 88px); overflow: hidden; }
.hero__grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1.05fr .95fr; } }
.hero__copy { display: grid; gap: 26px; align-content: start; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; }
.js .hero h1 .line > span { transform: translateY(105%); animation: line-up .9s var(--ease-out) forwards; animation-delay: calc(var(--i) * 90ms + 150ms); }
@keyframes line-up { to { transform: none; } }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__next {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; margin-top: 6px;
  border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--white);
  font-size: .95rem;
  transition: border-color var(--t-fast), transform var(--t-med) var(--ease-out);
  max-width: 560px;
}
.hero__next:hover { border-color: var(--ink); }
.hero__next .pulse {
  width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: none;
  box-shadow: 0 0 0 0 rgba(242,106,27,.6); animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(242,106,27,0); } 100% { box-shadow: 0 0 0 0 rgba(242,106,27,0); } }
.hero__next b { font-weight: 700; }
.hero__next .mono { font-size: .8rem; color: var(--muted); }
.hero__next .ico { margin-left: auto; width: 18px; height: 18px; }

/* Stage z tablicą */
.stage { position: relative; display: grid; gap: 22px; }
.stage__plate { width: var(--stage-w); margin-inline: auto; position: relative; }
.js .stage__plate { animation: plate-in 1.1s var(--ease-spring) .25s both; }
@keyframes plate-in { from { opacity: 0; transform: translateY(30px) rotate(-4deg) scale(.94); } to { opacity: 1; transform: none; } }

.stage__info {
  width: var(--stage-w); margin-inline: auto;
  display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center;
}
.stage__info .hz { grid-row: span 2; width: 64px; }
.stage__name { font-stretch: var(--w-cond); font-weight: 800; font-size: clamp(1.6rem, 2.5vw, 2.1rem); line-height: 1; }
.stage__meta { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.stage__legend { width: var(--stage-w); margin-inline: auto; display: grid; gap: 0; border-top: 1px solid var(--line); }
.stage__legend div { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.stage__legend dt { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.stage__legend dd { color: var(--ink-2); }
.stage__legend dd b { color: var(--ink); font-family: var(--f-mono); margin-right: 6px; }
.stage__ctrl { width: var(--stage-w); margin-inline: auto; display: flex; align-items: center; gap: 10px; }
.stage__dots { display: flex; gap: 6px; flex: 1; }
.stage__dots button { flex: 1; height: 24px; position: relative; }
.stage__dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: var(--line-strong); border-radius: 2px; }
.stage__dots button::after { content: ""; position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; width: 0; background: var(--ink); border-radius: 2px; }
.stage__dots button[aria-current="true"]::after { animation: dot-fill var(--dur, 4200ms) linear forwards; }
.stage.is-paused .stage__dots button[aria-current="true"]::after { animation: none; width: 100%; }
@keyframes dot-fill { to { width: 100%; } }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line-strong); border-radius: var(--r-s);
  transition: background var(--t-fast), color var(--t-fast);
}
.icon-btn:hover { background: var(--ink); color: var(--white); }
.icon-btn .ico { width: 18px; height: 18px; }

/* ---------- Pasek nalepek (marquee) ---------- */
.ribbon { background: var(--asphalt); color: var(--on-dark); overflow: hidden; border-block: 1px solid var(--ink); }
.ribbon__track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.ribbon:hover .ribbon__track { animation-play-state: paused; }
.ribbon__item { display: flex; align-items: center; gap: 14px; padding: 18px 30px 18px 0; white-space: nowrap; }
.ribbon__item .hz { width: 46px; transition: transform var(--t-med) var(--ease-spring); }
.ribbon__item:hover .hz { transform: rotate(-12deg) scale(1.12); }
.ribbon__item b { font-family: var(--f-mono); font-size: .76rem; font-weight: 500; color: var(--orange); letter-spacing: .06em; display: block; }
.ribbon__item span { font-stretch: var(--w-semi); font-weight: 600; font-size: .98rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Manifest kursów ---------- */
.manifest { border-top: 2px solid var(--ink); }
.manifest__head, .manifest__row {
  display: grid; align-items: center;
  grid-template-columns: 64px 1fr 40px;
  gap: 16px 24px;
}
.manifest__head {
  display: none;
  padding: 12px 0; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
}
.manifest__row {
  position: relative; isolation: isolate;
  padding: 22px 0; border-bottom: 1px solid var(--line-strong);
  transition: color var(--t-med);
}
.manifest__row::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1;
  background: var(--orange);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .45s var(--ease-out);
}
.manifest__row:hover::before, .manifest__row:focus-visible::before { transform: scaleY(1); transform-origin: top; }
.manifest__row:focus-visible { outline: none; }
.manifest__badge { width: 64px; display: grid; place-items: center; }
.manifest__title { font-stretch: var(--w-cond); font-weight: 800; font-size: clamp(1.45rem, 2.3vw, 1.9rem); line-height: 1; }
.manifest__lead { color: var(--ink-2); font-size: .95rem; margin-top: 6px; max-width: 52ch; }
.manifest__cell { font-family: var(--f-mono); font-size: .86rem; }
.manifest__cell small { display: block; font-size: .7rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.manifest__row:hover .manifest__cell small { color: var(--ink-2); }
.manifest__meta { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.manifest__go {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--ink); grid-row: 1; grid-column: 3;
  transition: transform var(--t-med) var(--ease-out), background var(--t-med), color var(--t-med);
}
.manifest__row:hover .manifest__go { background: var(--ink); color: var(--orange); transform: rotate(-45deg); }
@media (min-width: 900px) {
  .manifest__head, .manifest__row { grid-template-columns: 72px minmax(0, 1fr) 150px 110px 120px 44px; }
  .manifest__head { display: grid; }
  .manifest__meta { display: contents; }
  .manifest__go { grid-row: auto; grid-column: auto; }
  .manifest__cell small { display: none; }
}

/* Plakietki kursów (nie-nalepkowe) */
.badge-plate { width: 52px; aspect-ratio: 4/3; background: var(--orange); border: 3px solid var(--ink); border-radius: 2px; position: relative; }
.badge-plate::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: var(--ink); }
.badge-ico {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--orange);
}
.badge-ico .ico { width: 26px; height: 26px; stroke-width: 1.8; }
.manifest__row:hover .badge-plate { background: var(--white); }

/* ---------- Droga do zaświadczenia ---------- */
.road-sec { overflow: hidden; }
.road { position: relative; margin-top: 12px; }
.road__lane {
  position: relative; height: 120px;
}
.road__asphalt {
  position: absolute; left: 0; right: 0; bottom: 6px; height: 34px;
  background: var(--asphalt-2); border-radius: 2px;
}
.road__asphalt::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px;
  background: repeating-linear-gradient(90deg, var(--on-dark) 0 28px, transparent 28px 56px);
  opacity: .8;
}
.road__progress { position: absolute; left: 0; bottom: 0; height: 6px; width: calc(var(--p, 0) * 100%); background: var(--orange); }
.truck {
  position: absolute; left: 0; bottom: 18px; width: 220px;
  transform: translateX(var(--tx, 0px));
  will-change: transform;
}
.truck .wheel { transform-box: fill-box; transform-origin: center; transform: rotate(var(--rot, 0deg)); }
.steps { display: grid; gap: 0; margin-top: 28px; counter-reset: step; }
.step {
  position: relative; padding: 22px 0 22px 64px; border-top: 1px solid var(--line-dark);
  transition: opacity var(--t-slow) var(--ease-out);
}
.dark .step { color: var(--on-dark); }
.step__n {
  position: absolute; left: 0; top: 22px;
  width: 44px; height: 33px; display: grid; place-items: center;
  font-family: var(--f-mono); font-weight: 600; font-size: .9rem;
  border: 2px solid currentColor; border-radius: 2px;
  transition: background var(--t-med), color var(--t-med), border-color var(--t-med);
}
.step.is-on .step__n { background: var(--orange); color: var(--ink); border-color: var(--orange); }
.step h3 { font-stretch: var(--w-cond); font-size: 1.6rem; margin-bottom: 8px; }
.step p { color: var(--on-dark-muted); font-size: .96rem; max-width: 40ch; }
.step .mono { display: block; margin-top: 10px; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .step { padding: 64px 0 0; border-top: 0; opacity: .45; }
  .step.is-on { opacity: 1; }
  .step__n { top: 0; }
}
@media (max-width: 899px) {
  .road__lane { height: 96px; }
  .truck { width: 170px; }
}

/* ---------- Dekoder ---------- */
.decoder { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 900px) { .decoder { grid-template-columns: minmax(280px, 420px) 1fr; } }
.decoder__plate { width: min(100%, 420px); }
.plate input {
  width: 100%; height: 100%; text-align: center;
  background: transparent; border: 0; outline: none;
  font-stretch: 78%; font-weight: 700; font-size: 28cqi; line-height: 1;
  color: var(--ink); text-transform: uppercase; letter-spacing: .01em;
  caret-color: var(--ink); padding: 0;
}
.plate input::placeholder { color: rgba(17,18,19,.28); }
.plate__row:focus-within { background: rgba(255,255,255,.18); }
.decoder__hint { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); margin-top: 14px; display: flex; gap: 8px; align-items: center; }
.dark .decoder__hint { color: var(--on-dark-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-family: var(--f-mono); font-size: .82rem; font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.dark .chip { border-color: var(--line-dark); }
.dark .chip:hover { border-color: var(--on-dark); }
.dark .chip[aria-pressed="true"] { background: var(--orange); color: var(--ink); border-color: var(--orange); }
.chip .count { opacity: .6; }

.decode { display: grid; gap: 0; }
.decode__row {
  display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  animation: decode-in .5s var(--ease-out) both; animation-delay: calc(var(--i) * 80ms);
}
.dark .decode__row { border-color: var(--line-dark); }
@keyframes decode-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.decode__ch {
  width: 64px; height: 64px; display: grid; place-items: center;
  font-stretch: 78%; font-weight: 800; font-size: 2.5rem; line-height: 1;
  background: var(--orange); color: var(--ink); border: 3px solid var(--ink); border-radius: 3px;
}
.decode__row--x .decode__ch { background: var(--h-blue); color: var(--white); }
.decode__row--zero .decode__ch, .decode__row--double .decode__ch { background: transparent; color: inherit; border-color: currentColor; }
.decode__txt b { display: block; font-family: var(--f-mono); font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.dark .decode__txt b { color: var(--on-dark-muted); }
.decode__note { margin-top: 18px; padding: 16px 18px; border-left: 4px solid var(--orange); background: rgba(242,106,27,.1); font-size: .95rem; }
.decode__empty, .decode__err { padding: 18px 0; color: var(--muted); }
.dark .decode__empty { color: var(--on-dark-muted); }
.decode__err { color: var(--bad); }
.dark .decode__err { color: #FF8A7A; }
.decode__match { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.decode__match .hz { width: 40px; }

/* ---------- Cechy ---------- */
.features { display: grid; gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { background: var(--paper); padding: 30px 26px 34px; display: grid; gap: 14px; align-content: start; transition: background var(--t-med); }
.feature:hover { background: var(--white); }
.feature__ill { width: 72px; height: 72px; }
.feature__ill svg { width: 100%; height: 100%; }
.feature h3 { font-stretch: var(--w-cond); font-size: 1.5rem; }
.feature p { color: var(--ink-2); font-size: .96rem; }

/* ---------- Terminy (tablica odjazdów) ---------- */
.board { display: grid; gap: 0; }
.board__month {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 36px 0 12px; border-bottom: 2px solid var(--ink);
}
.board__month:first-child { padding-top: 0; }
.board__month h2 { font-stretch: var(--w-cond); font-size: clamp(1.8rem, 3vw, 2.4rem); text-transform: capitalize; }
.board__month span { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.slot {
  display: grid; gap: 14px 22px; align-items: center;
  grid-template-columns: 74px 1fr;
  padding: 20px 0; border-bottom: 1px solid var(--line-strong);
  animation: decode-in .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms);
}
.slot__date {
  width: 74px; height: 80px; display: grid; align-content: center; justify-items: center;
  border: 2px solid var(--ink); border-radius: var(--r-s); background: var(--white);
  line-height: 1;
}
.slot__date b { font-stretch: var(--w-cond); font-weight: 800; font-size: 2.2rem; }
.slot__date span { font-family: var(--f-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; color: var(--muted); }
.slot__main { display: grid; gap: 6px; min-width: 0; }
.slot__title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slot__title strong { font-stretch: var(--w-cond); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.slot__info { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.slot__info span { display: inline-flex; align-items: center; gap: 6px; }
.slot__info .ico { width: 14px; height: 14px; }
.slot__seats { grid-column: 1 / -1; display: grid; gap: 8px; }
.slot__act { grid-column: 1 / -1; }
.seats { display: flex; gap: 3px; }
.seats i { flex: 1; max-width: 14px; height: 14px; border-radius: 2px; background: var(--ink); }
.seats i.free { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.seats-label { font-family: var(--f-mono); font-size: .78rem; font-weight: 500; }
.seats-label.low { color: var(--orange-deep); }
.seats-label.full { color: var(--bad); }
.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px;
  font-family: var(--f-mono); font-size: .7rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
  border-radius: 2px; background: var(--paper-3); color: var(--ink);
}
.tag--orange { background: var(--orange); }
.tag--ink { background: var(--ink); color: var(--white); }
@media (min-width: 900px) {
  .slot { grid-template-columns: 74px minmax(0, 1fr) 210px minmax(170px, auto); }
  .slot__seats, .slot__act { grid-column: auto; }
  .slot__act { justify-self: end; }
}
.board__empty { padding: 48px 0; display: grid; gap: 16px; justify-items: start; }

.filters { display: grid; gap: 14px; padding-block: 18px 22px; }
.filters__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters__label { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 8px; min-width: 72px; }
.sticky-filters { position: sticky; top: var(--hdr-h); z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }

/* ---------- Nagłówki podstron ---------- */
.phero { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line-strong); position: relative; }
.phero__grid { display: grid; gap: 36px; align-items: end; }
@media (min-width: 980px) { .phero__grid { grid-template-columns: 1.3fr .7fr; gap: 64px; } }
.phero__copy { display: grid; gap: 22px; }
.crumbs { display: flex; gap: 8px; font-family: var(--f-mono); font-size: .76rem; color: var(--muted); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.docmeta { border-top: 2px solid var(--ink); font-size: .92rem; }
.docmeta div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line-strong); }
.docmeta dt { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.docmeta dd { font-weight: 600; text-align: right; }
.js .phero .phero__copy > * { opacity: 0; animation: rise .8s var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); transform: translateY(14px); }
.js .phero .docmeta { opacity: 0; animation: rise .8s var(--ease-out) .35s forwards; transform: translateY(14px); }

/* ---------- Kursy (podstrona) ---------- */
.picker { display: grid; gap: 28px; padding: clamp(24px, 4vw, 44px); background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--r-m); }
@media (min-width: 1000px) { .picker { grid-template-columns: 1fr 1fr; gap: 48px; } }
.picker fieldset { border: 0; padding: 0; display: grid; gap: 12px; }
.picker legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; }
.picker legend .mono { display: block; font-size: .74rem; font-weight: 500; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-s);
  cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast);
}
.opt:hover { border-color: var(--ink); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt__box {
  width: 22px; height: 22px; flex: none; border: 2px solid var(--ink); border-radius: 2px;
  display: grid; place-items: center; transition: background var(--t-fast);
}
.opt input[type="radio"] + .opt__box { border-radius: 50%; }
.opt__box::after { content: ""; width: 10px; height: 10px; background: var(--ink); border-radius: inherit; transform: scale(0); transition: transform var(--t-fast) var(--ease-spring); }
.opt input:checked + .opt__box { background: var(--orange); }
.opt input:checked + .opt__box::after { transform: scale(1); }
.opt:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.opt input:focus-visible + .opt__box { outline: 3px solid var(--orange); outline-offset: 3px; }
.opt__txt { display: grid; gap: 2px; }
.opt__txt small { color: var(--muted); font-size: .85rem; }
.opt .hz { width: 34px; margin-left: auto; }
.result { background: var(--asphalt); color: var(--on-dark); border-radius: var(--r-m); padding: clamp(22px, 3vw, 32px); display: grid; gap: 18px; align-content: start; }
.result__list { display: grid; gap: 0; }
.result__item { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-dark); animation: decode-in .4s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
.result__item b { font-stretch: var(--w-semi); }
.result__item span { font-family: var(--f-mono); font-size: .85rem; color: var(--on-dark-muted); white-space: nowrap; }
.result__sum { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--f-mono); font-size: .85rem; color: var(--on-dark-muted); }
.result__sum b { font-family: var(--f-sans); font-stretch: var(--w-cond); font-size: 2.2rem; color: var(--orange); font-weight: 800; }
.result__note { font-size: .9rem; color: var(--on-dark-muted); border-left: 3px solid var(--orange); padding-left: 12px; }

.courses-layout { display: grid; gap: 48px; }
@media (min-width: 1100px) { .courses-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 64px; } }
.toc { display: none; }
@media (min-width: 1100px) {
  .toc { display: block; position: sticky; top: calc(var(--hdr-h) + 32px); align-self: start; }
  .toc ol { display: grid; gap: 2px; border-left: 2px solid var(--line); }
  .toc a { display: block; padding: 8px 0 8px 16px; margin-left: -2px; border-left: 2px solid transparent; font-size: .95rem; color: var(--muted); transition: color var(--t-fast), border-color var(--t-fast); }
  .toc a:hover { color: var(--ink); }
  .toc a.is-active { color: var(--ink); font-weight: 700; border-left-color: var(--orange); }
}
.course { padding: 56px 0; border-top: 2px solid var(--ink); display: grid; gap: 28px; }
.course:first-child { padding-top: 0; border-top: 0; }
.course__head { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.course__head .hz, .course__head .badge-plate, .course__head .badge-ico { width: 76px; }
.course__head .badge-ico { height: 76px; }
.course__head .badge-ico .ico { width: 36px; height: 36px; }
.course__head .badge-plate { width: 76px; border-width: 4px; }
.course__facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); }
@media (min-width: 700px) { .course__facts { grid-template-columns: repeat(4, 1fr); } }
.course__facts div { background: var(--paper); padding: 16px 18px; }
.course__facts dt { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.course__facts dd { font-weight: 700; font-size: 1.05rem; margin-top: 4px; }
.course__cols { display: grid; gap: 32px; }
@media (min-width: 800px) { .course__cols { grid-template-columns: 1.2fr .8fr; gap: 48px; } }
.checklist { display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; color: var(--ink-2); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 16px; height: 12px;
  background: var(--orange); border: 2px solid var(--ink); border-radius: 1px;
  box-shadow: inset 0 -5px 0 -3px var(--ink);
}
.course__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Accordion (details) */
.acc { border-top: 1px solid var(--line-strong); }
.acc details { border-bottom: 1px solid var(--line-strong); }
.acc summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 20px 0; font-weight: 700; font-size: 1.08rem;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary .pm { position: relative; width: 28px; height: 28px; flex: none; border: 1.5px solid var(--ink); border-radius: 50%; transition: background var(--t-fast), transform var(--t-med) var(--ease-out); }
.acc summary .pm::before, .acc summary .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: currentColor; transition: transform var(--t-med) var(--ease-out); }
.acc summary .pm::after { transform: rotate(90deg); }
.acc details[open] summary .pm { background: var(--orange); }
.acc details[open] summary .pm::after { transform: rotate(0); }
.acc summary:hover .pm { transform: rotate(90deg); }
.acc__body { padding: 0 0 24px; color: var(--ink-2); max-width: 70ch; }
.acc__body p + p, .acc__body p + ul { margin-top: 10px; }
.acc details[open] .acc__body { animation: acc-in .45s var(--ease-out); }
@keyframes acc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.dark .acc, .dark .acc details { border-color: var(--line-dark); }
.dark .acc summary .pm { border-color: var(--on-dark); }
.dark .acc__body { color: var(--on-dark-muted); }

/* ---------- Quiz ---------- */
.quiz { background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--r-m); overflow: hidden; }
.quiz__top { display: flex; align-items: center; gap: 18px; padding: 18px clamp(18px, 3vw, 32px); border-bottom: 1px solid var(--line); }
.quiz__count { display: inline-grid; grid-template-rows: 1fr 1fr; width: 64px; height: 48px; background: var(--orange); border: 3px solid var(--ink); border-radius: 2px; position: relative; font-stretch: 78%; font-weight: 800; font-size: 1.05rem; line-height: 1; text-align: center; flex: none; }
.quiz__count::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: var(--ink); }
.quiz__count span { display: grid; place-items: center; }
.quiz__bar { flex: 1; display: flex; gap: 4px; }
.quiz__bar i { flex: 1; height: 6px; border-radius: 2px; background: var(--paper-3); transition: background var(--t-med); }
.quiz__bar i.ok { background: var(--ok); }
.quiz__bar i.bad { background: var(--bad); }
.quiz__bar i.cur { background: var(--ink); }
.quiz__body { padding: clamp(22px, 4vw, 44px) clamp(18px, 3vw, 32px); display: grid; gap: 24px; }
.quiz__q { font-stretch: var(--w-semi); font-weight: 700; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.25; max-width: 40ch; }
.quiz__visual { display: flex; gap: 14px; align-items: center; }
.quiz__answers { display: grid; gap: 10px; }
.ans {
  display: grid; grid-template-columns: 40px 1fr 24px; gap: 14px; align-items: center;
  width: 100%; text-align: left; padding: 14px 16px; min-height: 60px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-s); background: var(--paper);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.ans:hover:not([disabled]) { border-color: var(--ink); transform: translateX(4px); }
.ans__k { width: 40px; height: 40px; display: grid; place-items: center; font-family: var(--f-mono); font-weight: 600; border: 1.5px solid var(--ink); border-radius: 2px; }
.ans[disabled] { cursor: default; }
.ans.is-ok { border-color: var(--ok); background: #E3F3EA; }
.ans.is-ok .ans__k { background: var(--ok); border-color: var(--ok); color: var(--white); }
.ans.is-bad { border-color: var(--bad); background: #FBE5E2; animation: shake .4s; }
.ans.is-bad .ans__k { background: var(--bad); border-color: var(--bad); color: var(--white); }
.ans .ico { width: 22px; height: 22px; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.quiz__explain { padding: 16px 18px; border-left: 4px solid var(--ink); background: var(--paper); font-size: .96rem; color: var(--ink-2); animation: acc-in .4s var(--ease-out); }
.quiz__explain b { color: var(--ink); }
.quiz__explain .mono { display: block; font-size: .74rem; color: var(--muted); margin-top: 8px; }
.quiz__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px clamp(18px, 3vw, 32px); border-top: 1px solid var(--line); background: var(--paper); }
.quiz__foot .muted { font-size: .85rem; font-family: var(--f-mono); }
.quiz__result { display: grid; gap: 28px; justify-items: start; }
@media (min-width: 800px) { .quiz__result { grid-template-columns: 280px 1fr; align-items: center; gap: 48px; } }
.quiz__result .plate { width: min(100%, 280px); }

/* ---------- Wiedza ---------- */
.subnav { position: sticky; top: var(--hdr-h); z-index: 6; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.subnav__in { display: flex; gap: 6px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.subnav__in::-webkit-scrollbar { display: none; }
.subnav a { flex: none; padding: 8px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; border: 1px solid transparent; transition: border-color var(--t-fast), background var(--t-fast); }
.subnav a:hover { border-color: var(--line-strong); }
.subnav a.is-active { background: var(--ink); color: var(--white); }

.classes { display: grid; gap: 32px; }
@media (min-width: 1000px) { .classes { grid-template-columns: 1fr 420px; gap: 56px; align-items: start; } }
.cgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 560px) { .cgrid { grid-template-columns: repeat(5, 1fr); } }
.ccard {
  position: relative; display: grid; justify-items: center; gap: 10px;
  padding: 16px 8px 14px; border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--white);
  transition: border-color var(--t-fast), transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.ccard .hz { width: 70%; max-width: 84px; transition: transform .6s var(--ease-spring); }
.ccard:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -14px rgba(17,18,19,.4); }
.ccard:hover .hz { transform: rotate(-8deg) scale(1.06); }
.ccard[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ccard[aria-pressed="true"] .hz { transform: rotateY(360deg); }
.ccard span { font-family: var(--f-mono); font-size: .76rem; font-weight: 500; }
.cdetail { position: sticky; top: calc(var(--hdr-h) + 80px); background: var(--asphalt); color: var(--on-dark); border-radius: var(--r-m); padding: clamp(22px, 3vw, 32px); display: grid; gap: 18px; }
.cdetail__head { display: flex; gap: 18px; align-items: center; }
.cdetail__head .hz { width: 96px; }
.cdetail h3 { font-stretch: var(--w-cond); font-size: 1.9rem; }
.cdetail p { color: var(--on-dark-muted); }
.cdetail dl div { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line-dark); }
.cdetail dt { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); }
.cdetail.swap > * { animation: acc-in .45s var(--ease-out) both; }

.tunnels { display: grid; gap: 28px; }
@media (min-width: 900px) { .tunnels { grid-template-columns: 1fr 1fr; gap: 56px; } }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tile {
  aspect-ratio: 3 / 4; display: grid; align-content: space-between; padding: 10px;
  border: 2px solid var(--ink); border-radius: var(--r-s); background: var(--white);
  transition: background var(--t-med), color var(--t-med), transform var(--t-med) var(--ease-spring);
}
.tile b { font-stretch: var(--w-cond); font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.tile span { font-family: var(--f-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; }
.tile.is-closed { background: var(--h-red); color: var(--white); border-color: var(--h-red); transform: translateY(-4px); }
.tile.is-open span::after { content: "przejazd"; }
.tile.is-closed span::after { content: "zakaz"; }
.tile span::after { display: block; }

.gloss { display: grid; gap: 0; border-top: 2px solid var(--ink); }
@media (min-width: 800px) { .gloss { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.gloss div { padding: 18px 0; border-bottom: 1px solid var(--line-strong); display: grid; gap: 4px; }
.gloss dt { font-stretch: var(--w-semi); font-weight: 750; font-size: 1.1rem; }
.gloss dd { color: var(--ink-2); font-size: .96rem; }

/* Schemat oznakowania pojazdu */
.vehicle { position: relative; }
.vehicle svg { width: 100%; height: auto; }
.hotspot {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: var(--ink); color: var(--orange); display: grid; place-items: center;
  font-family: var(--f-mono); font-weight: 600; font-size: .82rem;
  box-shadow: 0 0 0 0 rgba(17,18,19,.4); animation: pulse-ink 2.4s infinite;
  transition: transform var(--t-fast);
}
.hotspot:hover, .hotspot[aria-expanded="true"] { transform: scale(1.15); background: var(--orange); color: var(--ink); }
@keyframes pulse-ink { 70% { box-shadow: 0 0 0 12px rgba(17,18,19,0); } 100% { box-shadow: 0 0 0 0 rgba(17,18,19,0); } }
.marking-list { display: grid; gap: 0; counter-reset: m; }
.marking-list li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-strong); transition: background var(--t-fast); }
.marking-list li.is-active { background: rgba(242,106,27,.12); }
.marking-list li > span { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--orange); display: grid; place-items: center; font-family: var(--f-mono); font-weight: 600; font-size: .82rem; }
.marking-list b { display: block; }
.marking-list p { color: var(--ink-2); font-size: .94rem; }

/* ---------- Firmy ---------- */
.cards { display: grid; gap: 16px; }
@media (min-width: 800px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; display: grid; gap: 16px; align-content: start;
  padding: 28px; background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--r-m);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -24px rgba(17,18,19,.45); }
.card h3 { font-stretch: var(--w-cond); font-size: 1.75rem; }
.card p { color: var(--ink-2); font-size: .97rem; }
.card .checklist { font-size: .95rem; }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card__ref { font-family: var(--f-mono); font-size: .74rem; color: var(--muted); letter-spacing: .06em; }

.who { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
@media (min-width: 900px) { .who { grid-template-columns: repeat(4, 1fr); } }
.who div { background: var(--asphalt); padding: 22px 20px; display: grid; gap: 8px; }
.who b { font-stretch: var(--w-semi); font-size: 1.05rem; }
.who span { color: var(--on-dark-muted); font-size: .9rem; }

/* ---------- Formularze ---------- */
.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 600; font-size: .92rem; }
.field label .req { color: var(--orange-deep); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  background: var(--white); border: 1.5px solid var(--line-strong); border-radius: var(--r-s);
  font-size: 1rem; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.textarea { min-height: 110px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23111213' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--orange); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--bad); }
.field__err { color: var(--bad); font-size: .85rem; font-weight: 500; display: none; }
.field.has-error .field__err { display: block; }
.field__help { color: var(--muted); font-size: .84rem; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--orange); flex: none; margin-top: 1px; }
.form__ok { display: grid; gap: 14px; padding: 22px; border: 2px solid var(--ok); border-radius: var(--r-m); background: #E3F3EA; }
.form__ok h3 { font-stretch: var(--w-cond); font-size: 1.6rem; }
.form__summary { padding: 14px 16px; border-left: 4px solid var(--bad); background: #FBE5E2; color: var(--ink); font-size: .92rem; }

/* Dialog zapisu */
.dlg {
  width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  margin: auto; padding: 0; border: 0; border-radius: var(--r-m); background: var(--paper); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
}
.dlg::backdrop { background: rgba(17,18,19,.55); backdrop-filter: blur(4px); }
.dlg[open] { animation: dlg-in .45s var(--ease-out); }
.dlg[open]::backdrop { animation: fade .3s ease; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
.dlg__head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px 18px; background: var(--paper); border-bottom: 1px solid var(--line); }
.dlg__head h2 { font-stretch: var(--w-cond); font-size: 1.9rem; }
.dlg__head p { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); margin-top: 6px; }
.dlg__body { padding: 22px 24px 26px; }
.dlg .tape { height: 8px; }

/* ---------- Kontakt ---------- */
.contact { display: grid; gap: 40px; }
@media (min-width: 1000px) { .contact { grid-template-columns: .9fr 1.1fr; gap: 64px; } }
.cinfo { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.cinfo > div { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line-strong); align-items: start; }
.cinfo .ico-wrap { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--orange); display: grid; place-items: center; }
.cinfo .ico-wrap .ico { width: 20px; height: 20px; }
.cinfo dt { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cinfo dd { font-weight: 600; font-size: 1.05rem; }
.cinfo dd a:hover { color: var(--orange-deep); }
.cinfo dd small { display: block; font-weight: 400; color: var(--ink-2); font-size: .9rem; }
.map { position: relative; border: 2px solid var(--ink); border-radius: var(--r-m); overflow: hidden; aspect-ratio: 16/10; background: var(--paper-2); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); transition: filter var(--t-slow); }
.map:hover iframe { filter: none; }
.map__pin { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--orange); border: 2px solid var(--ink); border-radius: var(--r-s); font-weight: 650; font-size: .9rem; }
.map__load { position: absolute; inset: 0; display: grid; place-items: center; gap: 12px; text-align: center; padding: 24px; background: repeating-linear-gradient(0deg, transparent 0 39px, var(--line) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, var(--line) 39px 40px), var(--paper-2); }
.hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-family: var(--f-mono); font-size: .86rem; }
.hours tr.is-today td { font-weight: 700; }
.hours tr.is-today td:first-child::after { content: " · dziś"; color: var(--orange-deep); font-weight: 600; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; }
.cta__in { display: grid; gap: 32px; align-items: center; padding-block: clamp(56px, 8vw, 104px); }
@media (min-width: 900px) { .cta__in { grid-template-columns: 1.2fr .8fr; } }
.cta h2 { max-width: 16ch; }
.cta__tel { display: inline-flex; align-items: baseline; gap: 12px; font-stretch: var(--w-cond); font-weight: 800; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1; border-bottom: 4px solid var(--ink); padding-bottom: 6px; transition: gap var(--t-med) var(--ease-out); }
.cta__tel:hover { gap: 20px; }
.cta__side { display: grid; gap: 18px; justify-items: start; }
.cta__side p { font-size: 1.02rem; max-width: 40ch; }

/* ---------- Stopka ---------- */
.ftr { background: var(--asphalt); color: var(--on-dark); }
.ftr__grid { display: grid; gap: 40px; padding-block: 64px 40px; }
@media (min-width: 900px) { .ftr__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 48px; } }
.ftr h3 { font-family: var(--f-mono); font-size: .74rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 16px; }
.ftr ul { display: grid; gap: 10px; }
.ftr ul a { color: var(--on-dark); opacity: .88; transition: opacity var(--t-fast), color var(--t-fast); }
.ftr ul a:hover { opacity: 1; color: var(--orange); }
.ftr__about { display: grid; gap: 18px; align-content: start; }
.ftr__about p { color: var(--on-dark-muted); max-width: 36ch; font-size: .95rem; }
.ftr .logo__plate { border-color: var(--ink); box-shadow: 0 0 0 1px var(--on-dark-muted); }
.ftr__labels { display: flex; flex-wrap: wrap; gap: 6px; padding: 24px 0; border-top: 1px solid var(--line-dark); }
.ftr__labels .hz { width: 34px; opacity: .9; transition: transform var(--t-med) var(--ease-spring), opacity var(--t-fast); }
.ftr__labels .hz:hover { transform: translateY(-4px) rotate(-8deg); opacity: 1; }
.ftr__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px 0 28px; border-top: 1px solid var(--line-dark); font-family: var(--f-mono); font-size: .76rem; color: var(--on-dark-muted); }

/* Pasek akcji (mobile) */
.mbar { display: none; }
@media (max-width: 759px) {
  .mbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-bar);
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line-strong);
    transform: translateY(110%); transition: transform var(--t-med) var(--ease-out);
  }
  .mbar.is-on { transform: none; }
  .mbar .btn { min-height: 48px; }
  body { padding-bottom: 76px; }
}

/* ---------- 404 ---------- */
.nf { min-height: calc(100dvh - var(--hdr-h)); display: grid; place-items: center; padding-block: 48px; }
.nf__in { display: grid; gap: 28px; justify-items: center; text-align: center; }
.nf .plate { width: min(80vw, 380px); }
.nf .plate__face { animation: swing 3.2s var(--ease-in-out) infinite; transform-origin: 50% -20%; }
@keyframes swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="wipe"] { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease-out); }
.js [data-reveal="wipe"].is-in { clip-path: inset(0); }
.js [data-stagger] > * { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.js [data-stagger].is-in > * { opacity: 1; transform: none; }
.js [data-stagger].is-in > *:nth-child(1) { transition-delay: 0ms; }
.js [data-stagger].is-in > *:nth-child(2) { transition-delay: 60ms; }
.js [data-stagger].is-in > *:nth-child(3) { transition-delay: 120ms; }
.js [data-stagger].is-in > *:nth-child(4) { transition-delay: 180ms; }
.js [data-stagger].is-in > *:nth-child(5) { transition-delay: 240ms; }
.js [data-stagger].is-in > *:nth-child(6) { transition-delay: 300ms; }
.js [data-stagger].is-in > *:nth-child(7) { transition-delay: 360ms; }
.js [data-stagger].is-in > *:nth-child(n+8) { transition-delay: 420ms; }

/* ---------- Przejścia między stronami ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .32s cubic-bezier(.7, 0, .84, 0) both; }
::view-transition-new(root) { animation: vt-in .55s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Druk ---------- */
@media print {
  .hdr, .mbar, .ftr, .ribbon, .cta, .burger { display: none !important; }
  body { background: #fff; }
}

/* ---------- Ograniczony ruch ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; animation-delay: 0ms !important; transition-delay: 0ms !important; }
  .ribbon__track { animation: none; flex-wrap: wrap; width: auto; }
  .ribbon__track > [aria-hidden="true"] { display: none; }
  .plate__face::after { display: none; }
  @view-transition { navigation: none; }
}

/* ---------- Uzupełnienia ---------- */
.on-orange .eyebrow { color: var(--ink); }
.on-orange .eyebrow::before { background: var(--white); }
.board > .slot:first-child { border-top: 2px solid var(--ink); }
.steps--static .step { opacity: 1; }
.steps--light .step { border-color: var(--line-strong); }
.steps--light .step p { color: var(--ink-2); }
.steps--light .step.is-on .step__n { border-color: var(--ink); }
fieldset.field { min-width: 0; }
.nf h1 { max-width: 18ch; }
.nf .lede { margin-inline: auto; }
.result .eyebrow { color: var(--on-dark-muted); }

@media (max-width: 759px) {
  .filters { gap: 10px; padding-block: 12px 14px; }
  .filters__row { flex-wrap: nowrap; }
  .filters__label { min-width: 0; }
  .filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .filters .chips::-webkit-scrollbar { display: none; }
  .filters .chip { flex: none; }
}
@media (min-width: 900px) { .truck { width: 280px; } }
@media (min-width: 560px) and (max-width: 899px) {
  .slot { grid-template-columns: 74px 1fr auto; }
  .slot__main { grid-column: 2 / -1; }
  .slot__seats { grid-column: 2; }
  .slot__act { grid-column: 3; }
}
.hero__next { display: grid; grid-template-columns: 10px minmax(0, 1fr) 18px; }
.hero__ctas .btn { flex: 1 1 auto; }
@media (min-width: 560px) { .hero__ctas .btn { flex: 0 0 auto; } }
@media (max-width: 979px) {
  .hero__grid { gap: 22px; }
  .hero__copy { display: contents; }
  .hero__copy > .eyebrow { order: 1; }
  .hero__copy > h1 { order: 2; }
  .hero .stage { order: 3; margin-block: 12px 8px; }
  .hero__copy > .lede { order: 4; }
  .hero__copy > .hero__ctas { order: 5; }
  .hero__copy > .hero__next { order: 6; }
}
.check.has-error { color: var(--bad); }
.check.has-error input { outline: 2px solid var(--bad); outline-offset: 2px; }
.decoder > *, .tunnels > *, .contact > *, .classes > *, .hero__grid > *, .phero__grid > *, .picker > *, .course__cols > *, .cta__in > * { min-width: 0; }
.filters .chips { min-width: 0; flex: 1; }
.filters > * { min-width: 0; }
.tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 559px) {
  .tile { padding: 8px 6px; }
  .tile span { font-size: .56rem; letter-spacing: .02em; }
}
@media (max-width: 699px) {
  .hotspot { width: 24px; height: 24px; margin: -12px 0 0 -12px; font-size: .7rem; }
  .hotspot::after { content: ""; position: absolute; inset: -10px; }
}

/* ---------- Hero + pasek nalepek = dokładnie jeden ekran (desktop) ---------- */
:root { --ribbon-h: 84px; }
.stage { --stage-w: min(100%, 470px); }
.ribbon__item { height: calc(var(--ribbon-h) - 2px); padding-block: 0; }
@media (min-width: 980px) {
  .hero {
    min-height: calc(100svh - var(--hdr-h) - var(--ribbon-h));
    display: grid; align-items: center;
    padding-block: clamp(20px, 3svh, 72px);
  }
  /* Na niskich ekranach tablica skaluje się proporcjonalnie, zamiast wypychać pasek poza ekran.
     322px = opis ładunku + legenda + sterowanie + odstępy pod tablicą. */
  .stage { --stage-w: clamp(380px, calc((100svh - var(--hdr-h) - var(--ribbon-h) - 2 * clamp(20px, 3svh, 72px) - 322px) * 4 / 3), 470px); }
}
