/* ==========================================================================
   signal.njytech.pl — arkusz stylów

   Świat wizualny odziedziczony z njytech.pl („Liquid Glass"): tło z kości,
   pod spodem trzy pływające zielone poświaty, treść na półprzezroczystych
   taflach szkła. Ta powierzchnia dokłada jeden własny język: PRZYRZĄD —
   odczyty w komórkach cyfrowych z bębnami, które fizycznie się cofają.

   Kolejność: zmienne → reset → tło → typografia → layout → nav → przyciski
   → hero/przyrząd → odometr → rewind → wykresy → lupa → projekty → metoda
   → autor → zamknięcie → stopka → animacje → RWD → a11y → druk
   ========================================================================== */

:root {
  /* ------------------------------------------- paleta marki (z njytech.pl) */
  --kosc:     #F6F2EA;
  --zielen:   #0E3B2E;
  --szmaragd: #22B573;
  --szalwia:  #A8BFA5;
  --bez:      #E7DCC9;
  --grafit:   #111111;

  --em-100: #9BF0CB;
  --em-300: #3FD68E;
  --em-mint:#74DDAC;
  --em-600: #14804F;
  --em-800: #0C5636;

  --text:       #1C1B18;
  --text-muted: #56544C;
  /* przyciemnione względem landingu: te same tokeny niosą tu podpisy przy
     liczbach, więc muszą trzymać 4.5:1 na tle kości, nie tylko 3:1 */
  --text-faint: #6A6860;
  --white:      #FFFFFF;

  /* tekst na ciemnym tle — tintowany z zieleni, nigdy szary */
  --on-dark:        #EFEBE2;
  --on-dark-muted:  #B9CFC2;
  --on-dark-faint:  #8FAA9C;

  /* ---------------------------------------------------------------- szkło */
  --blur-soft:   16px;
  --blur-card:   20px;
  --blur-strong: 24px;

  --glass:        rgba(255, 255, 255, 0.5);
  --glass-soft:   rgba(255, 255, 255, 0.4);
  --glass-strong: rgba(255, 255, 255, 0.58);
  --glass-hover:  rgba(255, 255, 255, 0.75);
  --glass-line:   rgba(255, 255, 255, 0.7);
  --glass-line-hi:rgba(255, 255, 255, 0.85);
  --glass-sheen:  inset 0 1px 0 rgba(255, 255, 255, 0.9);

  --glass-dark:      rgba(246, 242, 234, 0.07);
  --glass-dark-line: rgba(246, 242, 234, 0.18);
  --glass-dark-hi:   rgba(246, 242, 234, 0.28);

  /* ------------------------------------------------------------ gradienty */
  --grad-cta:  linear-gradient(135deg, rgba(34, 181, 115, 0.95), rgba(20, 128, 79, 0.95));
  --grad-dark: linear-gradient(160deg, #0E3B2E, #0C5636 130%);
  --grad-fill: linear-gradient(90deg, #3FD68E, #22B573);

  /* --------------------------------------------------------------- cienie */
  --sh-nav:   0 10px 34px rgba(14, 59, 46, 0.12);
  --sh-nav-s: 0 14px 40px rgba(14, 59, 46, 0.18);
  --sh-card:  0 14px 40px rgba(14, 59, 46, 0.10);
  --sh-lift:  0 22px 52px rgba(14, 59, 46, 0.16);
  --sh-inst:  0 28px 64px rgba(14, 59, 46, 0.16);
  --sh-panel: 0 30px 70px rgba(14, 59, 46, 0.35);
  --sh-cta:   0 12px 30px rgba(34, 181, 115, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  --sh-cta-h: 0 16px 38px rgba(34, 181, 115, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);

  /* ----------------------------------------------------------- typografia */
  --font-display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --wrap: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* skok bębna odometru — nadpisywany przez JS przy zmianie cyfry */
  --odo-step: 0;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--kosc);
  font-family: var(--font-body);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { height: auto; border: 0; }

a { color: var(--em-600); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--em-800); }

::selection { background: rgba(155, 240, 203, 0.6); }

:focus-visible {
  outline: 3px solid rgba(34, 181, 115, 0.55);
  outline-offset: 3px;
  border-radius: 6px;
}

button { font: inherit; color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px; left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--sh-card);
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ------------------------------------------------------------------- tło */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  filter: blur(72px);
}
.aurora__wrap { position: absolute; inset: 0; will-change: transform; }
.aurora__a, .aurora__b, .aurora__c {
  position: absolute;
  display: block;
  border-radius: 50%;
}
.aurora__a {
  width: 46vw; height: 46vw;
  min-width: 380px; min-height: 380px;
  top: -8vh; left: -6vw;
  background: radial-gradient(circle, rgba(63, 214, 142, 0.34), rgba(63, 214, 142, 0) 68%);
}
.aurora__b {
  width: 52vw; height: 52vw;
  min-width: 420px; min-height: 420px;
  top: 34vh; right: -14vw;
  background: radial-gradient(circle, rgba(20, 128, 79, 0.26), rgba(20, 128, 79, 0) 68%);
}
.aurora__c {
  width: 38vw; height: 38vw;
  min-width: 320px; min-height: 320px;
  bottom: -6vh; left: 24vw;
  background: radial-gradient(circle, rgba(155, 240, 203, 0.4), rgba(155, 240, 203, 0) 66%);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, -5vh, 0) scale(1.12); }
}

/* ------------------------------------------------------------ typografia */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 1.5rem + 3.2vw, 4.15rem); }
h2 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); letter-spacing: -0.025em; }

p { margin: 0; }

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.62;
  color: var(--text-muted);
  max-width: 62ch;
  text-wrap: pretty;
}

/* liczby zawsze na stałej szerokości znaku — to są odczyty pomiarowe */
.num, .odo, dd, th, td, .readout__value, .stat__value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------------------------------------------------------------- layout */
.wrap {
  width: min(100% - 44px, var(--wrap));
  margin-inline: auto;
}

section { position: relative; }

/* ------------------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 9px 10px 9px 16px;
  background: var(--glass);
  backdrop-filter: blur(var(--blur-soft)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-soft)) saturate(150%);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  box-shadow: var(--sh-nav), var(--glass-sheen);
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.nav.is-stuck .nav__inner {
  background: var(--glass-strong);
  box-shadow: var(--sh-nav-s), var(--glass-sheen);
}

.nav__brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.nav__brand:hover { color: var(--text); }
.nav__mark { display: block; }
.nav__brandtext { display: flex; flex-direction: column; line-height: 1.15; }
.nav__parent {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.nav__surface {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav__links a {
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav__links a:hover { background: var(--glass-hover); color: var(--text); }
.nav__links a.is-current { color: var(--em-800); background: rgba(155, 240, 203, 0.32); }

.nav__end { display: flex; align-items: center; gap: 10px; }
.nav__lang {
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.nav__lang:hover { background: var(--glass-hover); color: var(--text); }

/* -------------------------------------------------------------- przyciski */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 0;
  border-radius: 13px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease);
}
.btn--sm { padding: 10px 17px; font-size: 0.875rem; border-radius: 11px; }
.btn--lg { padding: 17px 34px; font-size: 1.0625rem; border-radius: 15px; }

.btn--primary {
  background: var(--grad-cta);
  color: var(--white);
  box-shadow: var(--sh-cta);
}
.btn--primary:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--sh-cta-h);
}
.btn--primary:active { transform: translateY(0); }

.btn--glass {
  background: var(--glass);
  backdrop-filter: blur(var(--blur-soft));
  -webkit-backdrop-filter: blur(var(--blur-soft));
  border: 1px solid var(--glass-line);
  color: var(--text);
  box-shadow: var(--sh-card), var(--glass-sheen);
}
.btn--glass:hover {
  background: var(--glass-hover);
  color: var(--text);
  transform: translateY(-2px);
}
.btn__icon { flex: none; }

/* ============================================================== HERO ==== */
.hero {
  padding: clamp(48px, 6vw, 96px) 0 clamp(64px, 7vw, 112px);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__headline {
  max-width: 13ch;
  overflow-wrap: break-word;
}
.hero__lede {
  margin-top: 26px;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.62;
  color: var(--text-muted);
  max-width: 46ch;
  text-wrap: pretty;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* ------------------------------------------------------------- przyrząd */
.instrument {
  margin: 0;
  padding: clamp(20px, 2.4vw, 30px);
  background: var(--glass-strong);
  backdrop-filter: blur(var(--blur-strong)) saturate(155%);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(155%);
  border: 1px solid var(--glass-line-hi);
  border-radius: 26px;
  box-shadow: var(--sh-inst), var(--glass-sheen);
}
.instrument__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(14, 59, 46, 0.1);
}
.instrument__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}
.instrument__glyph { color: var(--em-600); flex: none; }
.instrument__date {
  font-size: 0.8125rem;
  color: var(--text-faint);
  letter-spacing: 0.005em;
}

.instrument__readout { padding: 26px 0 22px; }
.instrument__caption {
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------- odometr */
.odo {
  display: flex;
  align-items: stretch;
  gap: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.odo--hero { font-size: clamp(3rem, 2rem + 3.4vw, 4.75rem); }
.odo--rewind { font-size: clamp(3.25rem, 2rem + 4.6vw, 6rem); }

.odo__cell {
  position: relative;
  display: block;
  width: 0.68em;
  height: 1em;
  overflow: hidden;
  border-radius: 0.1em;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.28));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(14, 59, 46, 0.07),
    0 2px 8px rgba(14, 59, 46, 0.06);
  color: var(--zielen);
}
/* Wiodące zero gaśnie, ale komórka trzyma szerokość — odczyt nigdy nie skacze
   w bok, gdy liczba traci cyfrę przy cofaniu. */
.odo__cell.is-off {
  opacity: 0;
  transition: opacity .32s var(--ease);
}
.odo__reel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transform: translate3d(0, calc(var(--d, 0) * -1em), 0);
  transition: transform .62s var(--ease-out);
  will-change: transform;
}
.odo__reel > i {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1em;
  flex: none;
  font-style: normal;
}
/* Separator tysięcy to ODSTĘP, nie znak — kropka w tym miejscu czyta się jak
   separator dziesiętny i psuje odczyt („11.908" zamiast „11 908"). */
.odo__sep {
  display: block;
  width: 0.2em;
  flex: none;
}

/* ----------------------------------------------------------- trajektoria */
.trajectory { padding-top: 20px; border-top: 1px solid rgba(14, 59, 46, 0.1); }
.trajectory__label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.trajectory__svg { display: block; width: 100%; height: auto; overflow: visible; }
.trajectory__line {
  fill: none;
  stroke: var(--em-600);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trajectory__area { fill: url(#traj-fill); }
.trajectory__dot { fill: var(--szmaragd); stroke: var(--white); stroke-width: 2.5; }
.trajectory__dot--start { fill: var(--text-faint); }

.trajectory__ends {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-faint);
}
.trajectory__end { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.trajectory__end b { font-size: 0.9375rem; font-weight: 600; color: var(--text-muted); }
.trajectory__end--now { text-align: right; }
.trajectory__end--now b { color: var(--em-800); }

/* -------------------------------------------------------------- scrollhint */
.scrollhint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: clamp(40px, 5vw, 72px);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-faint);
}
.scrollhint:hover { color: var(--em-800); }
.scrollhint svg { animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge {
  0%, 62%, 100% { transform: translateY(0); }
  76%           { transform: translateY(5px); }
}

/* ============================================================ REWIND ==== */
.rewind { padding-top: clamp(56px, 7vw, 104px); }
.rewind__intro { max-width: 720px; }
.rewind__headline { max-width: 14ch; }
.rewind__intro .lede { margin-top: 22px; }

/* wysokość nadaje JS (data-steps × wysokość kroku); bez JS sekcja jest zwykła */
.rewind__scroller { position: relative; margin-top: clamp(36px, 4vw, 56px); }
.rewind__stage {
  position: sticky;
  top: 84px;
  /* scena musi wypełnić ekran — inaczej pod przyklejonym odczytem zostaje
     martwe pole, a cofanie wygląda jak urwana sekcja */
  min-height: calc(100vh - 104px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 3vh, 40px);
  padding: 8px 0 20px;
}

.rewind__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.rewind__readout { min-width: 0; }
.rewind__counterlabel {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.rewind__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  margin: 26px 0 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(14, 59, 46, 0.08);
  border: 1px solid var(--glass-line);
  box-shadow: var(--sh-card);
}
.rewind__metaitem {
  padding: 14px 16px;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--blur-card));
  -webkit-backdrop-filter: blur(var(--blur-card));
}
.rewind__metaitem dt {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 5px;
  line-height: 1.3;
}
.rewind__metaitem dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  transition: color .3s var(--ease);
}
.rewind__metaitem dd .up { color: var(--em-600); }

.rewind__note {
  margin-top: 16px;
  padding: 11px 15px;
  border-radius: 12px;
  background: rgba(231, 220, 201, 0.5);
  border: 1px solid rgba(14, 59, 46, 0.09);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ------------------------------------------------------- wykres wspinaczki */
.climb { position: relative; margin: 0; min-width: 0; }
.climb__svg { display: block; width: 100%; height: auto; overflow: visible; }

/* punkty jako cele — powiększone pole trafienia, punkt rośnie pod kursorem */
.climb__hit { cursor: pointer; outline: none; }
.climb__hitarea { fill: transparent; }
.climb__hit .climb__point {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .2s var(--ease), stroke-width .2s var(--ease), opacity .35s var(--ease);
}
.climb__hit:hover .climb__point,
.climb__hit:focus-visible .climb__point {
  transform: scale(1.55);
  stroke-width: 2.5;
  opacity: 1;
}
.climb__hit:focus-visible .climb__hitarea {
  fill: rgba(34, 181, 115, 0.16);
  stroke: rgba(34, 181, 115, 0.55);
  stroke-width: 2;
}

.climb__tip {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -100%);
  margin-top: -14px;
  padding: 9px 13px;
  border-radius: 12px;
  background: var(--grad-dark);
  color: var(--on-dark);
  box-shadow: 0 14px 34px rgba(14, 59, 46, 0.32);
  font-size: 0.8125rem;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
}
.climb__tip b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--em-100);
  font-variant-numeric: tabular-nums;
}
.climb__tip span { color: var(--on-dark-muted); }

.climb__grid line { stroke: rgba(14, 59, 46, 0.09); stroke-width: 1; }
.climb__gridlabel {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.climb__area { fill: url(#climb-fill); opacity: 0.9; }
.climb__line {
  fill: none;
  stroke: var(--em-600);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.climb__point {
  fill: var(--white);
  stroke: var(--em-600);
  stroke-width: 2;
  transition: opacity .35s var(--ease), r .35s var(--ease);
}
.climb__point.is-past { opacity: 0.28; }
.climb__head {
  fill: var(--szmaragd);
  stroke: var(--white);
  stroke-width: 3;
  transition: transform .62s var(--ease-out);
}
.climb__headring {
  fill: none;
  stroke: rgba(34, 181, 115, 0.35);
  stroke-width: 2;
  transition: transform .62s var(--ease-out);
}
.climb__cursor {
  stroke: rgba(34, 181, 115, 0.4);
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
  transition: transform .62s var(--ease-out);
}
.climb__axis line { stroke: rgba(14, 59, 46, 0.18); stroke-width: 1; }
.climb__tick {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--text-faint);
}

/* ------------------------------------------------------------------ szyna */
.rail {
  display: flex;
  align-items: stretch;
  gap: 3px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rail__step {
  flex: 1 1 0;
  min-width: 0;
  height: 4px;
  border-radius: 999px;
  background: rgba(14, 59, 46, 0.12);
  overflow: hidden;
}
/* skalowanie zamiast animowania szerokości — dwanaście pasków przelicza się
   przy każdym kroku cofania, a układ nie może się przez to przeliczać */
.rail__fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: var(--grad-fill);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s var(--ease);
}

/* --------------------------------------------------------- tabela odczytów */
.rewind__tablewrap { padding: clamp(28px, 3.5vw, 44px) 0 clamp(56px, 7vw, 104px); }

.readings {
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(var(--blur-card));
  -webkit-backdrop-filter: blur(var(--blur-card));
  border: 1px solid var(--glass-line);
  box-shadow: var(--sh-card), var(--glass-sheen);
  overflow: hidden;
}
.readings__toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 20px;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.readings__toggle::-webkit-details-marker { display: none; }
.readings__toggle:hover { background: var(--glass-hover); color: var(--text); }
.readings__toggle svg { transition: transform .28s var(--ease); flex: none; }
.readings[open] .readings__toggle svg { transform: rotate(180deg); }

.readings__scroll { overflow-x: auto; }
.readings table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.readings caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.readings th, .readings td {
  padding: 11px 20px;
  text-align: right;
  white-space: nowrap;
  border-top: 1px solid rgba(14, 59, 46, 0.08);
}
.readings th:first-child, .readings td:first-child { text-align: left; }
.readings thead th {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-faint);
  background: rgba(231, 220, 201, 0.36);
}
.readings tbody tr:hover td { background: rgba(155, 240, 203, 0.16); }
.readings td .up { color: var(--em-600); font-weight: 500; }
.readings .is-approx { color: var(--text-faint); }

/* ============================================================== LUPA ==== */
.lens {
  padding: clamp(60px, 7vw, 104px) 0;
  background:
    linear-gradient(180deg, rgba(231, 220, 201, 0) 0%, rgba(231, 220, 201, 0.42) 12%, rgba(231, 220, 201, 0.42) 88%, rgba(231, 220, 201, 0) 100%);
}
.lens__head { max-width: 680px; }
.lens__head .lede { margin-top: 20px; }

.lens__switch {
  display: inline-flex;
  gap: 3px;
  margin: clamp(28px, 3.4vw, 40px) 0 clamp(22px, 2.6vw, 32px);
  padding: 4px;
  background: var(--glass);
  backdrop-filter: blur(var(--blur-soft));
  -webkit-backdrop-filter: blur(var(--blur-soft));
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  box-shadow: var(--sh-card), var(--glass-sheen);
}
.lens__tab {
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .24s var(--ease), color .24s var(--ease), box-shadow .24s var(--ease);
}
.lens__tab:hover { color: var(--text); background: var(--glass-hover); }
.lens__tab[aria-selected="true"] {
  background: var(--grad-cta);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(34, 181, 115, 0.32);
}

/* Cztery równorzędne odczyty tego samego pomiaru — siatka jest tu uczciwa,
   bo żaden z nich nie jest ważniejszy od pozostałych. Hierarchię niesie
   kolejność i wielkość samej liczby, nie rozmiar kafla. */
.lens__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.readout {
  position: relative;
  /* kolumna + nota dociśnięta do dołu: karty w jednym rzędzie mają różną
     liczbę wierszy, a ich przypisy muszą leżeć na jednej linii */
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--blur-card)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-card)) saturate(150%);
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  box-shadow: var(--sh-card), var(--glass-sheen);
  overflow: hidden;
}
.readout__figure {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.readout__prefix {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-faint);
  flex: none;
}
.readout__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.readout__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 1.2rem + 2.2vw, 3rem);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--zielen);
  white-space: nowrap;
}
.readout__value.is-swapping { opacity: 0; transform: translateY(-8px); }
.readout__value {
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.readout__sub {
  display: block;
  margin-top: 9px;
  font-size: 0.875rem;
  color: var(--em-800);
  font-weight: 500;
}
.readout__note {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(14, 59, 46, 0.08);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-faint);
}
.readout__bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(14, 59, 46, 0.08);
}
.readout__barfill {
  display: block;
  height: 100%;
  background: var(--grad-fill);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform .7s var(--ease-out);
}

/* ------------------------------------------------------------ pulpit */
.dashboard {
  margin-top: 16px;
  padding: clamp(22px, 2.6vw, 30px);
  background: var(--grad-dark);
  border-radius: 22px;
  box-shadow: var(--sh-panel);
  color: var(--on-dark);
}
.dashboard__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-dark-line);
}
.dashboard__title { color: var(--on-dark); font-size: 1.125rem; }
.dashboard__range {
  font-size: 0.8125rem;
  color: var(--on-dark-faint);
  font-variant-numeric: tabular-nums;
}
.dashboard__figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  padding: 22px 0 4px;
}
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--em-100);
}
.stat__label {
  display: block;
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--on-dark-muted);
}
.dashboard__note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-dark-line);
  font-size: 0.8125rem;
  color: var(--on-dark-faint);
}

/* ========================================================== PROJEKTY ==== */
.projects { padding: clamp(60px, 7vw, 104px) 0; }
.projects__head { max-width: 680px; margin-bottom: clamp(32px, 4vw, 48px); }
.projects__head .lede { margin-top: 20px; }

.project {
  position: relative;
  display: grid;
  gap: clamp(22px, 3vw, 44px);
  padding: clamp(24px, 3vw, 40px);
  border-radius: 26px;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--blur-card)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-card)) saturate(150%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--sh-card), var(--glass-sheen);
}
.project + .project { margin-top: 16px; }

/* asymetria niesie prawdę: projekt główny dostaje pełną wagę… */
.project--lead { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
/* …a zawieszony jest wyraźnie mniejszy i cichszy */
.project--muted {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr);
  align-items: center;
  padding: clamp(20px, 2.2vw, 28px);
  background: var(--glass-soft);
  box-shadow: 0 8px 24px rgba(14, 59, 46, 0.07), var(--glass-sheen);
}
.project--muted .project__name { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); }

.project__name {
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem);
  margin-bottom: 14px;
}
.project__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.project__status--active {
  background: rgba(155, 240, 203, 0.42);
  color: var(--em-800);
}
.project__status--paused {
  background: rgba(231, 220, 201, 0.75);
  color: var(--text-muted);
}
.project__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.project__status--active .project__dot { animation: pulse 2.6s var(--ease) infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.82); }
}

.project__goal {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 48ch;
}
.project__note {
  margin-top: 14px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-faint);
  max-width: 50ch;
}
.project__since {
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--text-faint);
}
.project__since b { font-weight: 600; color: var(--text-muted); }

.channels { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.channel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-sheen);
  transition: background .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
}
.channel:hover {
  background: var(--glass-hover);
  transform: translateY(-2px);
  box-shadow: var(--sh-card), var(--glass-sheen);
}
.channel__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--grad-dark);
  color: var(--em-100);
}
.channel__body { min-width: 0; flex: 1; }
.channel__handle {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel__meta {
  display: block;
  margin-top: 3px;
  font-size: 0.8125rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.channel__count {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  letter-spacing: -0.03em;
  color: var(--zielen);
  white-space: nowrap;
}
.channel__go { flex: none; color: var(--text-faint); transition: color .2s var(--ease), transform .2s var(--ease); }
.channel:hover .channel__go { color: var(--em-600); transform: translate(2px, -2px); }

/* ============================================================ METODA ==== */
.method { padding: clamp(60px, 7vw, 104px) 0; }
.method__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.method__head { position: sticky; top: 104px; }
.method__head .lede { margin-top: 20px; max-width: 40ch; }

.method__list { margin: 0; display: grid; gap: 2px; border-radius: 20px; overflow: hidden; }
.method__row {
  padding: 22px clamp(18px, 2vw, 26px);
  background: var(--glass);
  backdrop-filter: blur(var(--blur-soft));
  -webkit-backdrop-filter: blur(var(--blur-soft));
  border-left: 1px solid var(--glass-line);
  border-right: 1px solid var(--glass-line);
  transition: background .24s var(--ease);
}
.method__row:first-child { border-top: 1px solid var(--glass-line); }
.method__row:last-child { border-bottom: 1px solid var(--glass-line); }
.method__row:hover { background: var(--glass-hover); }
.method__row dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--zielen);
  margin-bottom: 8px;
}
.method__row dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--text-muted);
  max-width: 68ch;
}

/* ============================================================= AUTOR ==== */
.author { padding: 0 0 clamp(60px, 7vw, 104px); }
.author__headline { margin-bottom: clamp(22px, 2.6vw, 32px); max-width: 18ch; }

.author__pending {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 28px);
  align-items: start;
  max-width: 760px;
  padding: clamp(22px, 2.6vw, 30px);
  border-radius: 22px;
  background: var(--glass-soft);
  border: 1px dashed rgba(14, 59, 46, 0.26);
  box-shadow: var(--glass-sheen);
}
.author__frame {
  display: grid;
  place-items: center;
  width: 84px; height: 84px;
  border-radius: 20px;
  background: rgba(231, 220, 201, 0.55);
  border: 1px dashed rgba(14, 59, 46, 0.24);
  color: var(--text-faint);
}
.author__tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(231, 220, 201, 0.8);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.author__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}
.author__body {
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--text-muted);
  max-width: 58ch;
}

/* ======================================================== ZAMKNIĘCIE ==== */
.close { padding: 0 0 clamp(56px, 6vw, 88px); }
.close__inner {
  position: relative;
  padding: clamp(44px, 6vw, 88px) clamp(24px, 4vw, 64px);
  border-radius: 30px;
  background: var(--grad-dark);
  box-shadow: var(--sh-panel);
  text-align: center;
  overflow: hidden;
}
.close__inner::before {
  content: "";
  position: absolute;
  top: -40%; left: 50%;
  width: 70%; aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(63, 214, 142, 0.28), rgba(63, 214, 142, 0) 66%);
  pointer-events: none;
}
.close__headline {
  position: relative;
  color: var(--on-dark);
  max-width: 16ch;
  margin-inline: auto;
}
.close__lede {
  position: relative;
  margin: 22px auto 34px;
  max-width: 52ch;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.1875rem);
  line-height: 1.62;
  color: var(--on-dark-muted);
}
.close__inner .btn--primary { position: relative; }
.close__note {
  position: relative;
  margin-top: 18px;
  font-size: 0.8125rem;
  color: var(--on-dark-faint);
}

/* ============================================================ STOPKA ==== */
.foot {
  padding: clamp(28px, 3vw, 44px) 0 clamp(32px, 3.4vw, 48px);
  border-top: 1px solid rgba(14, 59, 46, 0.1);
}
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.foot__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.foot__source {
  flex: 1 1 300px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-faint);
  max-width: 52ch;
}
.foot__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-left: auto;
  font-size: 0.875rem;
}
.foot__updated { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.foot__links a { color: var(--text-muted); font-weight: 500; }
.foot__links a:hover { color: var(--em-800); }

/* ========================================================== ANIMACJE ==== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--rd, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ================================================================ RWD ==== */
@media (max-width: 1080px) {
  .rewind__grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
  .method__inner { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
}

@media (max-width: 940px) {
  .nav__links { display: none; }
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__headline { max-width: 18ch; }
  .hero__lede { max-width: 58ch; }
  .project--lead,
  .project--muted { grid-template-columns: 1fr; }
  .method__inner { grid-template-columns: 1fr; gap: 32px; }
  .method__head { position: static; }
  .method__head .lede { max-width: 62ch; }
}

@media (max-width: 780px) {
  html { scroll-padding-top: 84px; }
  .wrap { width: min(100% - 32px, var(--wrap)); }

  .rewind__grid { grid-template-columns: 1fr; gap: 26px; }
  .rewind__stage { top: 76px; }
  .odo--rewind { font-size: clamp(2.75rem, 1.6rem + 6.6vw, 4rem); }
  .rewind__meta { grid-template-columns: 1fr 1fr; }

  .lens__grid { grid-template-columns: minmax(0, 1fr); }
  .lens__switch { display: flex; width: 100%; }
  .lens__tab { flex: 1; padding: 11px 8px; }

  .foot__inner { flex-direction: column; align-items: flex-start; }
  .foot__links { margin-left: 0; }
}

@media (max-width: 560px) {
  .nav__end .btn--sm { display: none; }
  .nav__parent { display: none; }
  .instrument { padding: 18px; border-radius: 20px; }
  .odo--hero { font-size: clamp(2.5rem, 1.4rem + 8vw, 3.25rem); }
  .rewind__meta { grid-template-columns: 1fr; }
  .trajectory__ends { font-size: 0.75rem; }
  .readings th, .readings td { padding: 10px 14px; }
  .channel { padding: 13px 14px; gap: 11px; }
  .channel__icon { width: 34px; height: 34px; border-radius: 10px; }
}

/* =============================================================== A11Y ==== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .aurora__c { animation: none; }
}

@media (prefers-contrast: more) {
  :root {
    --text-muted: #3D3B34;
    --text-faint: #55534A;
    --glass: rgba(255, 255, 255, 0.82);
    --glass-strong: rgba(255, 255, 255, 0.9);
    --on-dark-muted: #D6E5DC;
    --on-dark-faint: #B9CFC2;
  }
  .aurora { opacity: 0.5; }
}

/* =============================================================== DRUK ==== */
@media print {
  .aurora, .nav, .scrollhint, .rail, .close { display: none !important; }
  body { background: #fff; }
  .rewind__scroller { height: auto !important; }
  .rewind__stage { position: static; }
  .readings[open] .readings__scroll,
  .readings .readings__scroll { overflow: visible; }
  .instrument, .readout, .project, .dashboard {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    backdrop-filter: none;
  }
  .dashboard, .close__inner { color: #000; background: #fff; }
  .stat__value { color: #0E3B2E; }
}
