:root {
  --bg: #070b14;
  --bg-elevated: #0d1424;
  --bg-card: #111a2e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #eef2fb;
  --text-muted: #93a1bf;
  --text-faint: #5f6d8c;

  --accent: #3aa0ff;
  --accent-2: #6f6bff;
  --accent-glow: rgba(58, 160, 255, 0.35);

  --gradient-brand: linear-gradient(135deg, #3aa0ff 0%, #6f6bff 55%, #7ee0ff 100%);
  --gradient-bg: radial-gradient(circle at 15% 0%, rgba(58, 160, 255, 0.16), transparent 45%),
                 radial-gradient(circle at 85% 20%, rgba(111, 107, 255, 0.14), transparent 40%),
                 var(--bg);

  /* Tło nawigacji (paski) — osobne zmienne, bo .site-nav używa
     przezroczystości nad zmiennym tłem strony, nie samego --bg. */
  --nav-bg: rgba(7, 11, 20, 0.72);
  --nav-bg-scrolled: rgba(7, 11, 20, 0.92);
  --nav-menu-bg: rgba(7, 11, 20, 0.97);

  /* Gradient tekstu dużych nagłówków — jasny (biel → błękit) na ciemnym
     tle; w jasnym motywie musi się odwrócić na ciemny, inaczej tekst
     zniknąłby na białym tle. */
  --heading-gradient: linear-gradient(180deg, #ffffff, #c7d2f2 140%);

  /* Kolor kropek subtelnej siatki w tle — jasne kropki widoczne na
     ciemnym tle, w jasnym motywie muszą być ciemne. */
  --dot-color: rgba(255, 255, 255, 0.05);

  --aurora-bg:
    radial-gradient(38% 30% at 20% 15%, rgba(58, 160, 255, 0.16), transparent 70%),
    radial-gradient(32% 26% at 82% 12%, rgba(111, 107, 255, 0.14), transparent 70%),
    radial-gradient(40% 34% at 55% 92%, rgba(126, 224, 255, 0.08), transparent 70%);

  --flash-error-bg: rgba(255, 90, 90, 0.12);
  --flash-error-text: #ff9d9d;
  --flash-error-border: rgba(255, 90, 90, 0.3);
  --flash-success-bg: rgba(90, 255, 160, 0.1);
  --flash-success-text: #8bffc4;
  --flash-success-border: rgba(90, 255, 160, 0.28);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, "Liberation Mono", monospace;

  /* Kolory bloków kodu / terminala — patrz sekcja "Code block" niżej. */
  --code-bg: #0a1020;
  --code-bar-bg: #0d1424;
  --code-comment: #5f6d8c;
  --code-keyword: #6f9dff;
  --code-string: #7ee0b8;
  --code-func: #7ec8ff;
  --code-builtin: #b79dff;
  --code-class: #7ee0ff;
  --code-number: #ffb86c;
  --code-operator: #93a1bf;
}

/* ---------- Jasny motyw ----------
   Aktywowany atrybutem data-theme="light" na <html>, ustawianym przez
   site.js (i, PRZED pierwszym renderem, małym inline-skryptem w
   <head> base.html — żeby uniknąć "mignięcia" złym motywem przy
   ładowaniu strony). Nadpisuje WSZYSTKIE zmienne z :root — reszta CSS
   w całym pliku korzysta wyłącznie z var(...), więc automatycznie
   dziedziczy jasny motyw bez dodatkowych reguł, poza kilkoma miejscami
   z zahardkodowanymi kolorami (gradient tekstu, tło nawigacji, siatka
   kropek) — te teraz też korzystają ze zmiennych powyżej. */
:root[data-theme="light"] {
  --bg: #f5f7fc;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);

  --text: #101828;
  --text-muted: #4b5875;
  --text-faint: #7c8aa8;

  --accent: #1f7ae0;
  --accent-2: #6355e0;
  --accent-glow: rgba(31, 122, 224, 0.22);

  --gradient-brand: linear-gradient(135deg, #1f7ae0 0%, #6355e0 55%, #17a6d8 100%);
  --gradient-bg: radial-gradient(circle at 15% 0%, rgba(31, 122, 224, 0.10), transparent 45%),
                 radial-gradient(circle at 85% 20%, rgba(99, 85, 224, 0.08), transparent 40%),
                 var(--bg);

  --nav-bg: rgba(255, 255, 255, 0.78);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.94);
  --nav-menu-bg: rgba(255, 255, 255, 0.97);

  --heading-gradient: linear-gradient(180deg, #101828, #33456e 140%);
  --dot-color: rgba(16, 24, 40, 0.055);

  /* Kolory kodu w jasnym motywie — jasne tło i wyraźnie ciemniejsze
     tokeny, inaczej kod byłby nieczytelny (te same zmienne, inne
     wartości — reszta CSS bloków kodu nie wie o istnieniu motywów). */
  --code-bg: #f7f9fd;
  --code-bar-bg: #eef2fa;
  --code-comment: #8592ad;
  --code-keyword: #1f56c4;
  --code-string: #0f7a5a;
  --code-func: #0b6ba8;
  --code-builtin: #6b3fc9;
  --code-class: #0a7490;
  --code-number: #b45309;
  --code-operator: #4b5875;

  --aurora-bg:
    radial-gradient(38% 30% at 20% 15%, rgba(31, 122, 224, 0.09), transparent 70%),
    radial-gradient(32% 26% at 82% 12%, rgba(99, 85, 224, 0.08), transparent 70%),
    radial-gradient(40% 34% at 55% 92%, rgba(23, 166, 216, 0.05), transparent 70%);

  --flash-error-bg: rgba(220, 38, 38, 0.08);
  --flash-error-text: #b91c1c;
  --flash-error-border: rgba(220, 38, 38, 0.25);
  --flash-success-bg: rgba(22, 163, 74, 0.08);
  --flash-success-text: #15803d;
  --flash-success-border: rgba(22, 163, 74, 0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--gradient-bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Animowana warstwa "aurora" — trzy rozmyte, wolno dryfujące plamy
   światła za całą treścią strony. `fixed`, więc nie przesuwa się przy
   scrollu i nie wpływa na layout ani wysokość strony. Wyłączona
   całkowicie dla osób z prefers-reduced-motion (patrz media query
   niżej), bo to czysto dekoracyjny ruch. */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -2;
  pointer-events: none;
  background: var(--aurora-bg);
  animation: aurora-drift 26s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes aurora-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-2%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(2%, -1%, 0) scale(1.02); }
}

/* Subtelna siatka kropek — daje "techniczny" charakter tła bez
   odciągania uwagi od treści (bardzo niska nieprzezroczystość). */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

/* Subtelne cząsteczki w tle — canvas rysowany przez site.js (funkcja
   initParticles). Świadomie bardzo stonowane (mało cząsteczek, niska
   nieprzezroczystość, powolny ruch) — mają dawać wrażenie "żywego" tła
   na wszystkich stronach (nie tylko hero), a nie przyciągać uwagę same
   w sobie. Wyłączane całkowicie przy prefers-reduced-motion (patrz
   site.js — tam jest właściwy warunek, tu tylko warstwa/pozycja). */
#particles-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  #particles-bg { display: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-nav.is-scrolled {
  background: var(--nav-bg-scrolled);
  border-color: var(--border-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand__logo {
  height: 40px;
  width: auto;
  display: block;
}

.footer-logo {
  height: 28px;
  width: auto;
  opacity: 0.85;
}

/* Dwa warianty logo (dla ciemnego i jasnego tła) — pokazujemy tylko
   jeden naraz, zależnie od aktywnego motywu. Domyślnie (brak
   data-theme, czyli ciemny motyw) widoczny jest wariant --dark. */
.brand__logo--light,
.footer-logo--light { display: none; }

:root[data-theme="light"] .brand__logo--dark,
:root[data-theme="light"] .footer-logo--dark { display: none; }
:root[data-theme="light"] .brand__logo--light,
:root[data-theme="light"] .footer-logo--light { display: block; }
:root[data-theme="light"] .footer-logo--light { opacity: 0.85; }

/* Przycisk hamburgera — ukryty na desktopie, pokazywany dopiero w
   media query poniżej dla wąskich ekranów. */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* ---------- Rozwijane menu (strony-dzieci) ---------- */

.nav-dropdown { position: relative; }
.nav-dropdown > a { display: inline-flex; align-items: center; gap: 5px; }
.nav-dropdown__chevron { transition: transform 0.2s ease; margin-top: 1px; }
.nav-dropdown:hover .nav-dropdown__chevron,
.nav-dropdown:focus-within .nav-dropdown__chevron { transform: rotate(180deg); }

/* top: 100% bez odstępu — przerwa między linkiem a menu zrywa hover
   w drodze kursora do listy; "oddech" robi padding wewnątrz menu. */
.nav-dropdown__menu {
  position: absolute;
  top: 100%;
  left: -12px;
  min-width: 210px;
  list-style: none;
  margin: 0;
  padding: 10px 8px 8px;
  background: var(--nav-menu-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 120;
}
.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown__menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.nav-dropdown__menu a:hover { background: var(--bg-elevated); }

.nav-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.nav-utility-row { display: flex; align-items: center; gap: 10px; }

.lang-switch { display: flex; gap: 6px; font-size: 0.8rem; }
.lang-switch a {
  padding: 3px 7px;
  border-radius: 6px;
  color: var(--text-faint);
  border: 1px solid transparent;
}
.lang-switch a.active {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-card);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }

/* Domyślnie (ciemny motyw, brak data-theme) pokazujemy słońce — kliknięcie
   oferuje przejście NA jasny motyw. W jasnym motywie pokazujemy księżyc —
   kliknięcie oferuje powrót do ciemnego. Obie ikony siedzą w tym samym
   miejscu (position:absolute w obrębie przycisku), przełączane samym CSS. */
.theme-toggle { position: relative; }
.theme-toggle__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.theme-toggle__icon--moon { display: none; }
:root[data-theme="light"] .theme-toggle__icon--sun { display: none; }
:root[data-theme="light"] .theme-toggle__icon--moon { display: block; }

/* ---------- Mobile nav ----------
   Próg 1180px (nie 880px) — polskie etykiety w menu ("Strona główna",
   "Dołącz do projektu", "Zarejestruj się"...) są zauważalnie dłuższe niż
   angielskie i przy niższym progu potrafiły się nie zmieścić w jednej
   linii na typowych szerokościach okna desktopowego (rozjeżdżające się
   zawijanie). Wyższy próg = pewność, że pełne poziome menu pokazuje się
   tylko tam, gdzie faktycznie jest na nie miejsce, niezależnie od języka. */

@media (max-width: 1180px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--nav-menu-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-strong);
    padding: 12px 24px 26px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
  }

  .nav-menu.is-open {
    max-height: 80vh;
    opacity: 1;
    overflow-y: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 0;
  }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 13px 6px; font-size: 1.05rem; }

  /* W mobilnym menu (pionowa lista) dzieci są ZAWSZE widoczne, wcięte
     pod rodzicem — na dotyku nie ma hovera, a rozwijanie na tap
     wymagałoby rozstrzygania "tap = otwórz menu czy przejdź do
     strony?". Płaska lista z wcięciem jest jednoznaczna. */
  .nav-dropdown > a { display: flex; }
  .nav-dropdown__chevron { display: none; }
  .nav-dropdown__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: 0;
    padding: 0 0 4px 18px;
  }
  .nav-dropdown__menu a { font-size: 0.98rem; padding: 10px 6px; color: var(--text-faint); }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
  }
  .nav-actions .btn { width: 100%; justify-content: center; padding: 13px 20px; }
  .nav-actions form { width: 100%; }
  .nav-actions form .btn { width: 100%; }

  .lang-switch { order: -1; align-self: flex-start; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #05070d;
  box-shadow: 0 8px 30px var(--accent-glow);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 14px 36px var(--accent-glow); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }

.btn-sm { padding: 7px 14px; font-size: 0.82rem; }

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 88px;
  position: relative;
  overflow: hidden;
  /* z-index (nawet 0) w połączeniu z position:relative TWORZY własny,
     lokalny kontekst warstw — bez tego dzieci z ujemnym z-index
     (.hero__bg, .hero::before) "uciekały" i konkurowały bezpośrednio z
     tłem strony (body::before/::after, też na ujemnym z-index), zamiast
     zostać zamknięte wewnątrz samego hero. To była właściwa przyczyna
     znikającego obrazka tła. */
  z-index: 0;
}

/* Tło hero (jeśli wgrane w edytorze) — CELOWO osobny element od
   .container, pozycjonowany na całą szerokość sekcji (`inset: 0`), a
   nie ograniczony do wąskiego kontenera tekstu. Wcześniej tło i tekst
   dzieliły jeden element z klasą "container", więc obraz wychodził
   ucięty do ~1200px i wyglądał jak zaokrąglony kafelek zamiast
   pełnoszerokiego tła — patrz dyskusja przy zrzucie ekranu. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
}

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 18px;
  text-transform: uppercase;
}

.hero__heading {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  max-width: 780px;
  background: var(--heading-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subheading {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 0 34px;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Hero — znak marki (tylko strona główna) ---------- */

.hero__inner { min-width: 0; }

.hero__inner--with-mark {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 40px;
}
/* min-width: 0 na obu kolumnach — bez tego domyślne min-width: auto
   pozwoliłoby dużemu SVG-owi rozepchnąć siatkę (ten sam gotcha co przy
   .split__media — patrz komentarz tam). */
.hero__inner--with-mark > * { min-width: 0; }

.hero__content { min-width: 0; }

.hero__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Pierścień blasku — pulsuje w NIESKOŃCZONOŚĆ (co 4s), niezależny od
   tego, jak ażurowa jest sama grafika SVG (drzewo ma dużo pustych
   miejsc, więc próba "odsłaniania" go samą maską była praktycznie
   niewidoczna — stąd osobny, zawsze wyraźnie widoczny element). */
.hero__mark::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 160, 255, 0.55), rgba(111, 107, 255, 0.24) 55%, transparent 72%);
  transform: translate(-50%, -50%) scale(0);
  animation: hero-mark-ring 6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}
:root[data-theme="light"] .hero__mark::before {
  background: radial-gradient(circle, rgba(31, 122, 224, 0.4), rgba(99, 85, 224, 0.18) 55%, transparent 72%);
}

@keyframes hero-mark-ring {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.5; }
  55% { opacity: 0.2; }
  100% { transform: translate(-50%, -50%) scale(9); opacity: 0; }
}

/* Sam znak "rozwija się" w tym samym rytmie co pierścień — rośnie z
   nieco skurczonego stanu do pełnego rozmiaru, po czym cofa się i cykl
   zaczyna od nowa. Świadomie stonowane (mały zakres skali, wolne tempo)
   — ma być subtelnym "oddechem", nie czymś rzucającym się w oczy. */
.hero__mark-img {
  width: min(100%, 420px);
  height: auto;
  transform-origin: center;
  animation:
    hero-mark-unfold 6s ease-in-out infinite,
    hero-mark-glow 6s ease-in-out infinite alternate;
}

/* Ciemny wariant znaku domyślnie (ciemny motyw); jasny wariant tylko
   gdy data-theme="light" — dokładnie ten sam wzorzec co logo w
   nawigacji/stopce. */
.hero__mark-img--light { display: none; }
:root[data-theme="light"] .hero__mark-img--dark { display: none; }
:root[data-theme="light"] .hero__mark-img--light { display: block; }

@keyframes hero-mark-unfold {
  0%   { transform: scale(0.97); opacity: 0.92; }
  50%  { transform: scale(1.015); opacity: 1; }
  100% { transform: scale(0.97); opacity: 0.92; }
}
@keyframes hero-mark-glow {
  0% { filter: drop-shadow(0 0 22px rgba(58, 160, 255, 0.14)); }
  100% { filter: drop-shadow(0 0 48px rgba(111, 107, 255, 0.4)); }
}

:root[data-theme="light"] .hero__mark-img {
  animation-name: hero-mark-unfold, hero-mark-glow-light;
}
@keyframes hero-mark-glow-light {
  0% { filter: drop-shadow(0 0 16px rgba(31, 122, 224, 0.1)); }
  100% { filter: drop-shadow(0 0 36px rgba(99, 85, 224, 0.24)); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__mark-img { animation: none; }
  .hero__mark::before { display: none; }
}

@media (max-width: 880px) {
  .hero__inner--with-mark {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .hero__mark-img { width: min(70%, 260px); }
  .hero__eyebrow, .hero__actions { justify-content: center; }
  .hero__actions { display: flex; }
}

/* ---------- Sections ---------- */

.section { padding-top: 72px; padding-bottom: 72px; }
.section--tight { padding-top: 48px; padding-bottom: 48px; }

.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section__heading {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  max-width: 700px;
}

.section__body {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 680px;
}
.section__body p { margin: 0 0 14px; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(58, 160, 255, 0.12);
}

.card__title { font-weight: 700; font-size: 1.02rem; margin: 0 0 10px; }
.card__body { color: var(--text-muted); font-size: 0.94rem; margin: 0; }

/* ---------- Split image/text ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
/* Obraz po lewej stronie. MUSI być ujemny (-1), nie dodatni: w HTML
   obraz jest już DRUGIM dzieckiem (.split__media po divie z tekstem),
   a oba mają domyślnie order: 0. Ustawienie order: 2 na obrazie nic nie
   zmieniało — tekst zostawał na 0, więc obraz i tak lądował za nim, po
   prawej (czyli klasa --reverse nie robiła absolutnie nic). Dopiero
   order: -1 wysuwa obraz PRZED tekst. */
.split--reverse .split__media { order: -1; }

/* min-width: 0 na obu kolumnach siatki — bez tego domyślne
   min-width: auto na elementach grid pozwala zawartości (zwłaszcza
   szerokim zdjęciom w .split__media) rozepchnąć kolumnę poza
   przydzielone 1fr, "wylewając" obraz poza kontener zamiast dopasować
   go do dostępnej szerokości. Klasyczny gotcha CSS Grid + obrazy. */
.split > * { min-width: 0; }

.split__media {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.split__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.split__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  background: var(--gradient-bg);
}

.split__points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; }
.split__points li { display: flex; gap: 12px; }
.split__points .dot {
  width: 8px; height: 8px; margin-top: 7px; border-radius: 50%;
  background: var(--gradient-brand); flex-shrink: 0;
}
.split__point-title { font-weight: 600; font-size: 0.94rem; }
.split__point-body { color: var(--text-muted); font-size: 0.88rem; margin: 2px 0 0; }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  /* Na mobile (jedna kolumna) kasujemy order: -1 z --reverse, żeby
     nagłówek zawsze był NAD obrazem — przy pionowym układzie "obraz po
     lewej" nie ma sensu, a tekst na górze czyta się naturalniej. */
  .split--reverse .split__media { order: 0; }
}

/* ---------- CTA banner ---------- */

.cta-banner {
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  background: linear-gradient(135deg, rgba(58,160,255,0.14), rgba(111,107,255,0.14));
  border: 1px solid var(--border-strong);
}
.cta-banner__heading { font-size: 1.7rem; font-weight: 800; margin: 0 0 12px; }
.cta-banner__body { color: var(--text-muted); margin: 0 0 26px; }

/* ---------- Contact ---------- */

.contact-block { text-align: center; }
.contact-block__email {
  display: inline-block;
  margin-top: 18px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- Quote ---------- */

.quote-block {
  margin: 0 auto;
  max-width: 760px;
  text-align: center;
  padding: 10px 0;
}
.quote-block__text {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 18px;
  background: var(--heading-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.quote-block__author { color: var(--text-muted); font-size: 0.9rem; font-style: normal; }
.quote-block__role { color: var(--text-faint); }

/* ---------- Stats row ---------- */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  margin-top: 28px;
  text-align: center;
}
.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  margin-top: 8px;
}

/* ---------- Full-width image ---------- */

.image-full { margin: 0; }
.image-full img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  cursor: zoom-in;
}
.image-full figcaption {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.84rem;
  margin-top: 12px;
}

/* =====================================================================
   Tech animations — czysty SVG + CSS, bez JS i bez plików graficznych.
   Kształty żyją w templates/public/_tech_animations.html, tu są kolory
   i ruch. Wszystko na zmiennych motywu, więc działa na jasnym i ciemnym
   tle bez osobnych wariantów.
   ===================================================================== */

.tech-anim-wrap { margin: 0; }
.tech-anim {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
}

/* Szerokość dobrana do PROPORCJI konkretnej animacji — wspólny
   max-width nie zadziała, bo radar jest kwadratowy (wyszedłby jako
   ogromne koło), a pipeline szeroki i płaski. */
.tech-anim--scan     { max-width: 520px; }
.tech-anim--pipeline { max-width: 620px; }
.tech-anim--neural   { max-width: 460px; }
.tech-anim--radar    { max-width: 300px; }
.tech-anim--grid     { max-width: 520px; }
.tech-anim--probe    { max-width: 380px; }
.tech-anim--ecg      { max-width: 560px; }
.tech-anim--seg      { max-width: 400px; }
.tech-anim--training { max-width: 520px; }
.tech-anim--anon     { max-width: 460px; }
.tech-anim-wrap figcaption {
  text-align: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-top: 16px;
}

.tech-anim text { font-family: var(--font-mono); }

/* --- 1. Skan USG + detekcja --- */

.ta-frame { fill: var(--code-bg); stroke: var(--border-strong); stroke-width: 1; }
.ta-tissue { fill: var(--accent); opacity: 0.07; }
.ta-lesion { fill: var(--accent-2); opacity: 0.22; }

.ta-scanline { animation: ta-scan 4.5s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.ta-scanline__bar { fill: var(--accent); }
.ta-scanline__glow { fill: var(--accent); opacity: 0.1; }

@keyframes ta-scan {
  0%   { transform: translateY(20px); opacity: 0; }
  6%   { opacity: 1; }
  62%  { transform: translateY(280px); opacity: 1; }
  70%  { transform: translateY(280px); opacity: 0; }
  100% { transform: translateY(280px); opacity: 0; }
}

.ta-bbox {
  transform-box: fill-box;
  transform-origin: center;
  animation: ta-bbox-in 4.5s ease-out infinite;
}
.ta-bbox__rect {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  animation: ta-ants 1.2s linear infinite;
}
.ta-bbox__tag { fill: var(--accent); }
.ta-bbox__label { fill: var(--code-bg); font-size: 10px; font-weight: 700; }

@keyframes ta-bbox-in {
  0%, 30%  { opacity: 0; transform: scale(0.94); }
  38%      { opacity: 1; transform: scale(1); }
  88%      { opacity: 1; transform: scale(1); }
  100%     { opacity: 0; transform: scale(1); }
}
@keyframes ta-ants { to { stroke-dashoffset: -20; } }

/* --- 2. Pipeline --- */

.ta-link { stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 4 4; }
.ta-stage__box {
  fill: var(--bg-card);
  stroke: var(--border);
  stroke-width: 1.5;
  animation: ta-stage-on 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.7s);
}
.ta-stage__title {
  fill: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
}
.ta-stage__sub {
  fill: var(--text-faint);
  font-size: 9px;
  text-anchor: middle;
}

@keyframes ta-stage-on {
  0%, 22%   { stroke: var(--accent); }
  30%, 100% { stroke: var(--border); }
}

.ta-packet {
  fill: var(--accent);
  animation: ta-packet-move 2.8s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}
@keyframes ta-packet-move {
  0%        { transform: translateX(67px);  opacity: 0; }
  8%        { opacity: 1; }
  25%       { transform: translateX(222px); }
  50%       { transform: translateX(377px); }
  75%       { transform: translateX(532px); opacity: 1; }
  85%, 100% { transform: translateX(532px); opacity: 0; }
}

/* --- 3. Sieć neuronowa --- */

.ta-edge {
  stroke: var(--border-strong);
  stroke-width: 1;
  animation: ta-edge-pulse 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.16s);
}
@keyframes ta-edge-pulse {
  0%, 100% { stroke: var(--border-strong); opacity: 0.5; }
  50%      { stroke: var(--accent); opacity: 1; }
}

.ta-neuron {
  fill: var(--bg-card);
  stroke: var(--accent);
  stroke-width: 1.5;
  animation: ta-neuron-pulse 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.16s);
}
.ta-neuron--out { stroke: var(--accent-2); }
@keyframes ta-neuron-pulse {
  0%, 100% { r: 8; opacity: 0.75; }
  50%      { r: 9.5; opacity: 1; }
}

/* --- 4. Radar --- */

.ta-ring { fill: none; stroke: var(--border-strong); stroke-width: 1; opacity: 0.5; }
.ta-sweep {
  transform-origin: 130px 130px;
  animation: ta-rotate 4s linear infinite;
}
@keyframes ta-rotate { to { transform: rotate(360deg); } }

.ta-blip {
  fill: var(--accent);
  animation: ta-blip-flash 4s ease-out infinite;
  animation-delay: calc(var(--i) * 1.1s);
}
@keyframes ta-blip-flash {
  0%   { opacity: 1; r: 5; }
  30%  { opacity: 0.35; r: 4; }
  100% { opacity: 0; r: 4; }
}

/* --- 5. Siatka danych --- */

.ta-cell {
  fill: var(--accent);
  animation: ta-cell-pulse 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.13s);
}
@keyframes ta-cell-pulse {
  0%, 100% { opacity: 0.06; }
  50%      { opacity: 0.42; }
}

/* --- 6. Głowica USG z wiązką --- */

.ta-probe-body { fill: var(--bg-card); stroke: var(--border-strong); stroke-width: 1.5; }
.ta-probe-face { fill: var(--accent); animation: ta-face-pulse 2.4s ease-in-out infinite; }
@keyframes ta-face-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

.ta-beam { animation: ta-beam-pulse 2.4s ease-in-out infinite; }
@keyframes ta-beam-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

.ta-wave {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  animation: ta-wave-down 2.4s ease-out infinite;
  animation-delay: calc(var(--i) * 0.8s);
}
@keyframes ta-wave-down {
  0%   { transform: translateY(0);     opacity: 0.75; }
  100% { transform: translateY(190px); opacity: 0; }
}

.ta-probe-sweep {
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0.7;
  transform-origin: 210px 62px;
  animation: ta-probe-swing 3.2s ease-in-out infinite alternate;
}
@keyframes ta-probe-swing {
  0%   { transform: rotate(-26deg); }
  100% { transform: rotate(26deg); }
}

/* --- 7. EKG --- */

.ta-ecg-base { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 5; opacity: 0.6; }
.ta-ecg-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  /* dasharray z zapasem ponad realną długość ścieżki — nie musimy jej
     liczyć co do piksela, efekt "rysowania" wygląda tak samo. */
  stroke-dasharray: 1100;
  animation: ta-ecg-draw 3.4s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
@keyframes ta-ecg-draw {
  0%       { stroke-dashoffset: 1100; }
  70%      { stroke-dashoffset: 0; }
  90%      { stroke-dashoffset: 0; opacity: 1; }
  100%     { stroke-dashoffset: 0; opacity: 0; }
}

/* --- 8. Segmentacja --- */

.ta-seg-fill {
  fill: var(--accent);
  animation: ta-seg-fill-in 5s ease-out infinite;
}
@keyframes ta-seg-fill-in {
  0%, 45%   { opacity: 0; }
  62%, 88%  { opacity: 0.2; }
  100%      { opacity: 0; }
}

.ta-seg-outline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-dasharray: 900;
  animation: ta-seg-draw 5s ease-in-out infinite;
}
@keyframes ta-seg-draw {
  0%        { stroke-dashoffset: 900; }
  45%, 88%  { stroke-dashoffset: 0; opacity: 1; }
  100%      { stroke-dashoffset: 0; opacity: 0; }
}

.ta-seg-point {
  fill: var(--accent-2);
  animation: ta-seg-point-in 5s ease-out infinite;
  animation-delay: calc(var(--i) * 0.18s);
}
@keyframes ta-seg-point-in {
  0%, 40%  { opacity: 0; }
  50%, 88% { opacity: 1; }
  100%     { opacity: 0; }
}

.ta-seg-tag { fill: var(--accent); animation: ta-seg-point-in 5s ease-out infinite; }
.ta-seg-label {
  fill: var(--code-bg);
  font-size: 10px;
  font-weight: 700;
  animation: ta-seg-point-in 5s ease-out infinite;
}

/* --- 9. Krzywa uczenia --- */

.ta-grid-line { stroke: var(--border); stroke-width: 1; opacity: 0.5; }
.ta-axis { stroke: var(--border-strong); stroke-width: 1.5; }
.ta-axis-label { fill: var(--text-faint); font-size: 10px; }

.ta-curve {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 600;
  animation: ta-curve-draw 4.5s ease-in-out infinite;
}
.ta-curve--train { stroke: var(--accent); }
.ta-curve--val {
  stroke: var(--text-faint);
  stroke-dasharray: 5 4;
  animation: none;
  opacity: 0.7;
}
@keyframes ta-curve-draw {
  0%        { stroke-dashoffset: 600; }
  60%, 88%  { stroke-dashoffset: 0; opacity: 1; }
  100%      { stroke-dashoffset: 0; opacity: 0; }
}

/* --- 10. Anonimizacja --- */

.ta-anon-text { fill: var(--text-muted); font-size: 11px; }
.ta-anon-bar {
  fill: var(--accent);
  transform-box: fill-box;
  transform-origin: left center;
  animation: ta-anon-cover 5s ease-out infinite;
  animation-delay: calc(var(--i) * 0.35s);
}
@keyframes ta-anon-cover {
  0%, 8%    { transform: scaleX(0); opacity: 0.9; }
  24%, 88%  { transform: scaleX(1); opacity: 0.9; }
  100%      { transform: scaleX(1); opacity: 0; }
}

.ta-anon-badge { animation: ta-anon-badge-in 5s ease-out infinite; }
@keyframes ta-anon-badge-in {
  0%, 36%  { opacity: 0; }
  46%, 88% { opacity: 1; }
  100%     { opacity: 0; }
}
.ta-anon-badge__bg { fill: var(--accent); opacity: 0.16; stroke: var(--accent); stroke-width: 1; }
.ta-anon-badge__label { fill: var(--accent); font-size: 10px; font-weight: 700; }
.ta-anon-check { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Bez animacji zostaje czytelny, STATYCZNY diagram — nie pusty kadr.
   Stąd jawne wartości docelowe, a nie samo animation: none. */
@media (prefers-reduced-motion: reduce) {
  .tech-anim * { animation: none !important; }
  .ta-scanline { opacity: 0; }
  .ta-bbox { opacity: 1; }
  .ta-cell { opacity: 0.25; }
  .ta-blip { opacity: 0.9; }
  .ta-ecg-line, .ta-seg-outline, .ta-curve { stroke-dashoffset: 0; }
  .ta-seg-fill { opacity: 0.2; }
  .ta-anon-bar { transform: scaleX(1); }
  .ta-wave { opacity: 0; }
}

/* ---------- Obrazy bez ramki (styl "plain") ----------
   Dla logo, ikon i diagramów z przezroczystym tłem: bez ramki, bez
   zaokrąglenia, bez tła i BEZ przycinania (object-fit: contain zamiast
   cover) — przy przezroczystej grafice przycinanie do sztywnych
   proporcji zwykle obcina to, co najważniejsze. */

.image-full--plain img {
  border: none;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  max-height: 460px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

/* Animacja zamiast obrazu obok tekstu — bez ramki i sztywnych proporcji,
   bo SVG ma własne, ustalone (patrz .tech-anim--* wyżej). */
.split__media--anim {
  border: none;
  background: transparent;
  aspect-ratio: auto;
  border-radius: 0;
}
.split__media--anim .tech-anim { max-width: 100%; }

.split__media--plain {
  border: none;
  border-radius: 0;
  background: transparent;
  aspect-ratio: auto;
}
.split__media--plain img {
  object-fit: contain;
  width: 100%;
  height: auto;
  max-height: 380px;
}

.gallery-grid--plain .gallery-grid__item {
  border: none;
  background: transparent;
}
.gallery-grid--plain .gallery-grid__item img {
  object-fit: contain;
  aspect-ratio: 4/3;
  background: transparent;
}

/* ---------- Code block ---------- */

.code-block {
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--code-bg);
}

.code-block__bar,
.terminal-block__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--code-bar-bg);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.code-block__dots { display: flex; gap: 6px; }
.code-block__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  display: block;
}

.code-block__title { color: var(--text-muted); }
.code-block__lang {
  margin-left: auto;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

/* .code-block__pre to klasa nadawana przez Pygments (cssclass w
   HtmlFormatter, patrz textformat.py::render_code) — stąd zagnieżdżony
   <pre> w środku. */
.code-block__pre {
  margin: 0;
  overflow-x: auto;
}
.code-block__pre pre {
  margin: 0;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text);
}
.code-block figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.8rem;
}

/* ---------- Terminal block ---------- */

.terminal-block {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--code-bg);
}
.terminal-block__body {
  margin: 0;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.7;
  overflow-x: auto;
}
.terminal-block__cmd { color: var(--text); display: block; }
.terminal-block__prompt { color: var(--accent); margin-right: 8px; user-select: none; }
.terminal-block__out { color: var(--text-muted); display: block; }

/* ---------- Kolory składni (Pygments) ----------
   Nazwy klas (.k, .s2, .nf ...) są narzucone przez Pygments — trzymamy
   je krótkie zgodnie z jego konwencją. Zmienne --code-* definiowane są
   przy motywach na górze pliku, żeby kod czytał się dobrze zarówno na
   ciemnym, jak i jasnym tle. */

.code-block__pre .c, .code-block__pre .c1, .code-block__pre .cm,
.code-block__pre .cs { color: var(--code-comment); font-style: italic; }
.code-block__pre .k, .code-block__pre .kd, .code-block__pre .kn,
.code-block__pre .kc, .code-block__pre .kr, .code-block__pre .kt { color: var(--code-keyword); }
.code-block__pre .s, .code-block__pre .s1, .code-block__pre .s2,
.code-block__pre .sb, .code-block__pre .sd, .code-block__pre .se,
.code-block__pre .sh, .code-block__pre .si, .code-block__pre .sx,
.code-block__pre .sr, .code-block__pre .ss { color: var(--code-string); }
.code-block__pre .nf, .code-block__pre .fm { color: var(--code-func); }
.code-block__pre .nb, .code-block__pre .bp { color: var(--code-builtin); }
.code-block__pre .nc, .code-block__pre .nn { color: var(--code-class); }
.code-block__pre .m, .code-block__pre .mi, .code-block__pre .mf,
.code-block__pre .mh, .code-block__pre .mo, .code-block__pre .il { color: var(--code-number); }
.code-block__pre .o, .code-block__pre .ow { color: var(--code-operator); }
.code-block__pre .p { color: var(--text-muted); }
.code-block__pre .nd { color: var(--code-func); }
.code-block__pre .err { color: inherit; border: none; }

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.gallery-grid__item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.gallery-grid__item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}
.gallery-grid__item:hover img { transform: scale(1.04); }
.gallery-grid__caption {
  padding: 10px 14px;
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* ---------- Lightbox (powiększanie zdjęć po kliknięciu) ---------- */

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(3, 5, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  animation: lightbox-fade-in 0.2s ease both;
}
@keyframes lightbox-fade-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox-backdrop img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  color: var(--text-muted);
  text-align: center;
  font-size: 0.88rem;
  margin-top: 16px;
  max-width: 640px;
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.16); }
.lightbox-figure { display: flex; flex-direction: column; align-items: center; max-width: 100%; }

/* ---------- Two-column text ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 24px;
}
.two-col__item { min-width: 0; }
.two-col__heading { font-size: 1.1rem; font-weight: 700; margin: 0 0 12px; }

@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Big statement ---------- */

.big-statement {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.big-statement__text {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  background: var(--heading-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.big-statement__attribution {
  margin: 18px 0 0;
  color: var(--text-faint);
  font-size: 0.9rem;
}

/* ---------- Callout ---------- */

.callout {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  border-left-width: 4px;
  padding: 22px 26px;
  background: var(--bg-card);
}
.callout__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.callout__body { color: var(--text-muted); font-size: 0.94rem; }
.callout__body p { margin: 0 0 10px; }
.callout__body p:last-child { margin-bottom: 0; }

.callout--info { border-left-color: var(--accent); }
.callout--info .callout__label { color: var(--accent); }

.callout--tip { border-left-color: #22c55e; }
.callout--tip .callout__label { color: #22c55e; }

.callout--warning { border-left-color: #f59e0b; }
.callout--warning .callout__label { color: #f59e0b; }

/* ---------- Accordion (FAQ) ---------- */

.accordion {
  max-width: 780px;
  margin: 28px auto 0;
  display: grid;
  gap: 10px;
}
.accordion__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 22px;
}
.accordion__item[open] { border-color: var(--border-strong); }
.accordion__question {
  cursor: pointer;
  list-style: none;
  padding: 16px 28px 16px 0;
  font-weight: 600;
  font-size: 0.98rem;
  position: relative;
}
.accordion__question::-webkit-details-marker { display: none; }
.accordion__question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 1.3rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.accordion__item[open] .accordion__question::after { transform: rotate(45deg); }
.accordion__answer { color: var(--text-muted); font-size: 0.92rem; padding: 0 0 18px; }
.accordion__answer p { margin: 0 0 10px; }
.accordion__answer p:last-child { margin-bottom: 0; }

/* ---------- Timeline ---------- */

.timeline {
  max-width: 700px;
  margin: 32px auto 0;
  position: relative;
  padding-left: 40px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-strong);
}
.timeline__item { position: relative; padding-bottom: 32px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__marker {
  position: absolute;
  left: -40px;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: var(--font-mono);
  background: var(--gradient-brand);
  color: #05070d;
  font-weight: 700;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px var(--bg);
}
.timeline__title { font-size: 1.02rem; font-weight: 700; margin: 3px 0 6px; }
.timeline__body { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ---------- Video embed ---------- */

.video-embed { margin: 0; }
.video-embed__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.video-embed__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-embed figcaption {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.84rem;
  margin-top: 12px;
}

/* ---------- Long text (markdown-lite) ---------- */

.long-text__body {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 760px;
}
.long-text__body p { margin: 0 0 18px; }
.long-text__body h3 {
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 40px 0 14px;
  scroll-margin-top: 100px;
}
.long-text__body h3:first-child { margin-top: 0; }
.long-text__body h4 {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 28px 0 12px;
  scroll-margin-top: 100px;
}
.long-text__body ul, .long-text__body ol { margin: 0 0 18px; padding-left: 22px; }
.long-text__body li { margin-bottom: 8px; }
.long-text__body strong { color: var(--text); }
.long-text__body a { color: var(--accent); }
.long-text__body a:hover { text-decoration: underline; }

/* ---------- Jump links (spis treści) ---------- */

.jump-links__heading {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.jump-links__list { display: flex; flex-wrap: wrap; gap: 10px; }
.jump-links__pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.86rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.jump-links__pill:hover { border-color: var(--accent); color: var(--text); }

/* ---------- Legal info (Impressum) ---------- */

.legal-info {
  max-width: 640px;
  padding: 26px 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.legal-info__updated { color: var(--text-faint); font-size: 0.82rem; margin-top: 16px !important; }

/* ---------- Custom HTML ---------- */

/* Świadomie BEZ narzucania własnych stylów treści (żadnego "reset" dla
   nagłówków/list wewnątrz) — to blok dla admina, który wie co wkleja;
   niech kod sam decyduje o swoim wyglądzie. container tylko po to, żeby
   trzymał się tej samej szerokości co reszta strony. */
.custom-html-block { padding-top: 24px; padding-bottom: 24px; }

/* ---------- Divider ---------- */

.divider-line {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 0;
}
.divider-space--small { height: 24px; }
.divider-space--large { height: 72px; }

/* ---------- Team grid ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin-top: 32px;
  text-align: center;
}
.team-card__photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  display: block;
  border: 1px solid var(--border-strong);
}
.team-card__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #05070d;
  font-weight: 700;
  font-size: 1.6rem;
}
.team-card__name { font-weight: 700; font-size: 1rem; }
.team-card__role { font-family: var(--font-mono); color: var(--accent); font-size: 0.78rem; margin-top: 4px; }
.team-card__bio { color: var(--text-muted); font-size: 0.86rem; margin: 10px 0 0; line-height: 1.5; }

/* ---------- Comparison table ---------- */

.comparison-table-wrap {
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.comparison-table th, .comparison-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.comparison-table thead th {
  color: var(--text-faint);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  background: var(--bg-card);
}
.comparison-table tbody th {
  color: var(--text);
  font-weight: 600;
  background: var(--bg-elevated);
}
.comparison-table tbody td { color: var(--text-muted); }
.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td { border-bottom: none; }

/* ---------- Logos row ---------- */

.logos-row__heading {
  font-family: var(--font-mono);
  text-align: center;
  color: var(--text-faint);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.logos-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 44px;
}
.logos-row img {
  height: 32px;
  width: auto;
  object-fit: contain;
  opacity: 0.55;
  filter: grayscale(1);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.logos-row img:hover { opacity: 1; filter: grayscale(0); }

/* ---------- Blog ---------- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.blog-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}
.blog-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.blog-card__media { aspect-ratio: 16/10; background: var(--bg-elevated); overflow: hidden; }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card__media--empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 0.85rem; background: var(--gradient-bg);
}

.blog-card__body { padding: 20px 22px 24px; }
.blog-card__date { font-family: var(--font-mono); color: var(--text-faint); font-size: 0.74rem; margin-bottom: 8px; }
.blog-card__title { font-size: 1.08rem; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.blog-card__excerpt { color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; margin: 0; }

.blog-pagination { display: flex; justify-content: space-between; margin-top: 40px; }

.blog-post__meta {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 0.86rem;
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Karty w siatce odsłaniają się z lekkim, narastającym opóźnieniem —
   daje wrażenie "fali", nie wszystkie naraz. Ograniczone do pierwszych
   6 elementów, żeby długie listy nie czekały karta-po-karcie bez końca. */
.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 70ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 140ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 210ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 280ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 350ms; }

/* ---------- Back to top ---------- */

#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
#back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
#back-to-top:hover { border-color: var(--accent); }

/* ---------- Error page ---------- */

.error-page {
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}
.error-page__code {
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 800;
  line-height: 1;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
}
.error-page__title { font-size: 1.4rem; font-weight: 700; margin: 14px 0 10px; }
.error-page__body { color: var(--text-muted); max-width: 440px; margin: 0 0 28px; }

/* ---------- Apply form (Dołącz do projektu) ---------- */

.apply-form-wrap {
  max-width: 560px;
  margin: 0 auto;
}
.apply-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 28px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-faint);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-top: 56px;
  padding-bottom: 36px;
}

.footer-col--brand { padding-right: 20px; }

.footer-tagline {
  color: var(--text-faint);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 300px;
  margin: 14px 0 0;
}

.footer-col h4 {
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: var(--text-faint);
  font-size: 0.9rem;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; padding-top: 44px; padding-bottom: 8px; gap: 32px 24px; }
  .footer-col--brand { grid-column: 1 / -1; padding-right: 0; margin-bottom: 8px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; text-align: left; gap: 6px; padding-top: 22px; padding-bottom: 22px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 4px; gap: 30px; }
  .footer-col--brand { grid-column: auto; margin-bottom: 0; }
  .footer-tagline { max-width: 100%; }
}

/* ---------- Auth forms ---------- */

.auth-shell {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.auth-card h1 { font-size: 1.3rem; margin: 0 0 24px; }

.field { margin-bottom: 16px; }

.footer-link-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr auto;
  gap: 8px;
  margin-bottom: 10px;
}
.footer-link-row input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
}
@media (max-width: 640px) {
  .footer-link-row { grid-template-columns: 1fr; }
}
.field label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  /* Jawne wymuszenie normalnego zaznaczania tekstu. Uchwyt do
     przeciągania bloku (.block-item__title) ma user-select:none (żeby
     przeciąganie nie zaznaczało przypadkiem jego etykiety) — to NIE
     powinno dziedziczyć się do pól formularza w rozwiniętym bloku, bo
     to rodzeństwo, nie potomek, ale wymuszamy to jawnie i tak, żeby
     zaznaczanie tekstu w polach edycji zawsze działało niezawodnie. */
  -webkit-user-select: text;
  user-select: text;
  -webkit-user-drag: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
}

.flash { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.86rem; margin-bottom: 16px; }
.flash-error { background: var(--flash-error-bg); color: var(--flash-error-text); border: 1px solid var(--flash-error-border); }
.flash-success { background: var(--flash-success-bg); color: var(--flash-success-text); border: 1px solid var(--flash-success-border); }

.auth-switch { margin-top: 18px; font-size: 0.86rem; color: var(--text-muted); text-align: center; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.media-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.media-card img { width: 100%; height: 140px; object-fit: cover; background: var(--bg-elevated); }
.media-card__body { padding: 12px; }
.media-card__filename {
  font-size: 0.78rem; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 8px;
}
.media-card input {
  width: 100%; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 8px; color: var(--text); font-size: 0.8rem;
  margin-bottom: 6px;
}

/* ---------- Media picker modal (edytor blokowy) ---------- */

.media-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center; z-index: 200;
}
.media-modal {
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 24px; width: min(720px, 92vw);
  max-height: 80vh; overflow-y: auto;
}
.media-modal h3 { margin-top: 0; }
.media-modal__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px; margin-top: 16px;
}
.media-modal__item {
  cursor: pointer; border: 2px solid transparent; border-radius: 10px; overflow: hidden;
}
.media-modal__item:hover { border-color: var(--accent); }
.media-modal__item img { width: 100%; height: 90px; object-fit: cover; display: block; }
.media-modal__close { float: right; }

.account-list { display: grid; gap: 14px; margin-top: 20px; }
.account-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px 22px;
}
.account-card__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.account-card.is-handled { opacity: 0.55; }
.account-card__motivation {
  margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.92rem; white-space: pre-wrap;
}

.nav-badge {
  background: var(--accent);
  color: #05070d;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 6px;
}

.admin-shell { padding-top: 40px; padding-bottom: 100px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }

.page-list { display: grid; gap: 12px; margin-top: 16px; }
.page-list__item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px 22px;
}
.page-list__item:hover { border-color: var(--border-strong); }
.page-list__item.dragging { opacity: 0.5; }
.page-list__item a { display: block; }
.drag-handle { cursor: grab; color: var(--text-faint); padding: 0 4px; }
.badge-hidden {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-faint); background: var(--bg-elevated);
  padding: 2px 7px; border-radius: 999px; margin-left: 8px;
}

.block-list { display: grid; gap: 14px; margin-top: 24px; }

.block-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.block-item.dragging { opacity: 0.5; }

.block-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}
.block-item__title {
  display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.92rem;
  cursor: grab;
  user-select: none;
}
.block-item__title:active { cursor: grabbing; }
.block-item__type-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(58,160,255,0.12);
  padding: 3px 8px;
  border-radius: 999px;
}
.block-item__actions { display: flex; gap: 8px; }
.block-item__body {
  padding: 0 18px 20px;
  border-top: 1px solid var(--border);
  display: none;
  -webkit-user-select: text;
  user-select: text;
  -webkit-user-drag: none;
}
.block-item__body.open { display: block; padding-top: 16px; }
.block-item.hidden-block { opacity: 0.5; }

.lang-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.lang-tabs button {
  padding: 5px 12px; font-size: 0.8rem; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer;
}
.lang-tabs button.active { color: var(--text); border-color: var(--accent); background: rgba(58,160,255,0.1); }

.field-list-item {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  position: relative;
}

.add-block-row { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.save-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 100;
}
.save-toast.show { opacity: 1; transform: translateY(0); }

.icon-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  border-radius: 8px; padding: 6px 9px; cursor: pointer; font-size: 0.78rem;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* =====================================================================
   MOBILE — dopracowanie całej strony pod małe ekrany. Nawigacja ma
   własną, bardziej rozbudowaną sekcję @media wyżej (przy .nav-toggle) —
   to tu dotyczy reszty layoutu: odstępów, typografii i układu sekcji.
   ===================================================================== */

@media (max-width: 720px) {
  .container { padding: 0 20px; }

  .brand__logo { height: 32px; }
  .site-nav__inner { padding-top: 14px; padding-bottom: 14px; }

  .hero { padding: 64px 0 52px; }
  .hero__eyebrow { font-size: 0.8rem; }
  .hero__actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero__actions .btn { justify-content: center; padding: 13px 22px; }

  .section { padding-top: 52px; padding-bottom: 52px; }
  .section--tight { padding-top: 34px; padding-bottom: 34px; }
  .section__heading { max-width: 100%; }
  .section__body { max-width: 100%; font-size: 1.02rem; }
  .section__eyebrow { font-size: 0.8rem; }

  .card-grid { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 24px; }
  .card__body { font-size: 0.96rem; }

  .split { gap: 32px; }
  .split__media { aspect-ratio: 16/10; }
  .split__point-body { font-size: 0.92rem; }

  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 24px 18px; }

  .cta-banner { padding: 38px 24px; }
  .cta-banner__heading { font-size: 1.35rem; }

  .quote-block__text { font-size: 1.1rem; }

  .apply-form { padding: 26px 20px; }
  .apply-form .btn { padding: 13px 22px; }

  .auth-card { padding: 28px 24px; }
  .auth-shell { padding: 36px 18px; }

  #back-to-top { right: 18px; bottom: 18px; width: 42px; height: 42px; }

  .admin-shell { padding-top: 24px; padding-bottom: 80px; }
  .admin-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .admin-header > div[style*="display:flex"],
  .admin-header .btn { width: 100%; }

  .block-item__header { flex-wrap: wrap; gap: 10px; }
  .block-item__actions { flex-wrap: wrap; gap: 6px; }

  .media-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  .account-card__header { flex-direction: column; align-items: stretch; }
  .account-card__header > div:last-child { display: flex; gap: 8px; }
}

@media (max-width: 420px) {
  .stats-row { grid-template-columns: 1fr; }
  .hero__heading { font-size: 1.9rem; }
  .error-page__code { font-size: 4.5rem; }
}
