@charset "UTF-8";
/* ==========================================================================
   dellmont.org.pl — arkusz stylów

   Kierunek: REJESTR TARYF. Serwis jest zestawieniem liczb, więc wygląda jak
   rocznik danych, nie jak strona reklamowa: ciepły papier (negatyw w motywie
   ciemnym), szeryf redakcyjny w nagłówkach, monospace w KAŻDEJ liczbie,
   włosowe linie zamiast pasków zebry.

   Kolor niesie znaczenie i nic poza tym:
     --brand  pomarańcz marki (#FE8020 ze starej strony) = farba i krawędź;
              nigdy jako tekst na jasnym tle, nigdy z białym napisem na sobie
     --free   zero, stawka 0,00 €, „TAK”, darmowy kierunek
     --alert  brak: „NIE”, „brak usług”
     --amber  zastrzeżenie redakcyjne i prawne
     --deep   płyta ciemna w OBU motywach (panel odczytu, pasek CTA)

   Kolejność sekcji: reset → tokeny → typografia → układ → komponenty →
   sekcje → proza → rysunki → responsywność → druk.
   ========================================================================== */

/* ==========================================================================
   1. Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

h1, h2, h3, h4, p, dl, dd, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
table { border-collapse: separate; border-spacing: 0; width: 100%; }
[hidden] { display: none !important; }

a { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }

:focus-visible {
  outline: 2px solid var(--brand-ink);
  outline-offset: 2px;
  border-radius: 2px;
}

.sprite { display: none; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 90;
  padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--brand); color: var(--on-brand);
  font: 600 0.875rem/1 var(--f-mono); letter-spacing: 0.04em;
  text-decoration: none; transition: top 140ms ease;
}
.skip-link:focus { top: 12px; color: var(--on-brand); }

/* ==========================================================================
   2. Tokeny
   ========================================================================== */
:root {
  /* Marka — pomarańcz z nagłówka tabeli poprzedniej wersji serwisu. */
  --brand: #fe8020;
  --brand-2: #fd8423;
  --on-brand: #1a0e04;
  --brand-ink: #8f3a02;
  --brand-deep: #6d2b02;
  --brand-soft: #fff1e4;
  --brand-line: #f0c59a;
  --brand-deep-line: #c25c09;

  /* Znaczenia */
  --free: #0c6a4e;
  --free-soft: #e2f1eb;
  --free-line: #a6d2c0;
  --alert: #9a3820;
  --alert-soft: #fbe9e4;
  --alert-line: #e6bfb3;
  --amber: #755608;
  --amber-soft: #fcf2da;
  --amber-line: #e8d3a0;

  /* Papier i tusz */
  --bg: #faf7f2;
  --bg-soft: #f2ebe1;
  --card: #fffefb;
  --ink: #16130f;
  --text: #3a342c;
  --muted: #62594b;
  --hair: #ebe3d6;
  --line: #ded4c4;
  --line-strong: #c3b6a1;

  /* Płyta ciemna — identyczna w obu motywach */
  --deep: #17130f;
  --deep-2: #211b15;
  --deep-line: #342a20;
  --deep-ink: #f8f3ea;
  --deep-muted: #a89b8c;
  --free-on-deep: #4fd3a4;

  /* Geometria */
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(22, 19, 15, .07);
  --shadow-md: 0 12px 30px -16px rgba(22, 19, 15, .22);
  --shadow-lg: 0 32px 64px -34px rgba(22, 19, 15, .34);
  --header-h: 68px;

  /* Kroje */
  --f-serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-ink: #ff9d52;
    --brand-deep: #ffb884;
    --brand-soft: #2b1c0f;
    --brand-line: #4d3520;

    --free: #4fd3a4;
    --free-soft: #11271f;
    --free-line: #2b5745;
    --alert: #f79d82;
    --alert-soft: #2b1711;
    --alert-line: #56291d;
    --amber: #e2be66;
    --amber-soft: #2a2211;
    --amber-line: #55431c;

    --bg: #12100d;
    --bg-soft: #191612;
    --card: #1c1814;
    --ink: #f6f1e7;
    --text: #cdc3b4;
    --muted: #a09585;
    --hair: #241f1a;
    --line: #2f2922;
    --line-strong: #4a4137;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 12px 30px -16px rgba(0, 0, 0, .66);
    --shadow-lg: 0 32px 64px -34px rgba(0, 0, 0, .8);
  }
}

:root[data-theme="dark"] {
  --brand-ink: #ff9d52;
  --brand-deep: #ffb884;
  --brand-soft: #2b1c0f;
  --brand-line: #4d3520;

  --free: #4fd3a4;
  --free-soft: #11271f;
  --free-line: #2b5745;
  --alert: #f79d82;
  --alert-soft: #2b1711;
  --alert-line: #56291d;
  --amber: #e2be66;
  --amber-soft: #2a2211;
  --amber-line: #55431c;

  --bg: #12100d;
  --bg-soft: #191612;
  --card: #1c1814;
  --ink: #f6f1e7;
  --text: #cdc3b4;
  --muted: #a09585;
  --hair: #241f1a;
  --line: #2f2922;
  --line-strong: #4a4137;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 12px 30px -16px rgba(0, 0, 0, .66);
  --shadow-lg: 0 32px 64px -34px rgba(0, 0, 0, .8);
}

/* ==========================================================================
   3. Typografia
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--f-serif);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.12;
  font-variant-numeric: lining-nums;
}

h1 {
  font-size: clamp(2.05rem, 1.35rem + 2.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); }
h4 { font-size: 1.0625rem; }

.h1-ogon {
  display: block;
  font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.6rem);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: -0.005em;
  margin-top: 0.35em;
}

.serif-italic { font-style: italic; font-weight: 500; }

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.6;
  color: var(--text);
  max-width: 62ch;
}

.eyebrow {
  font: 500 0.6875rem/1.2 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-ink);
}

/* Każda liczba w serwisie stoi w monospace z cyfrą tabelaryczną — dzięki temu
   przecinki dziesiętne w kolumnie układają się jeden pod drugim. */
.wart, .jedn, .nr-wiersza, .gauge dd, .rank-wartosc, .kraje-liczba, .spis-liczba,
.znacznik, .card-liczba, .licznik, .licznik-wart, .odczyt-data, .acc-nr,
.section-nr, .blad-kod, .k-jedn, .blok-licznik, .sasiad-etykieta, .kolofon-linia {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ==========================================================================
   4. Układ
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3.5vw, 40px);
}

.section { padding: clamp(48px, 6vw, 88px) 0; }
.section-tight { padding: clamp(32px, 3.5vw, 52px) 0; }
.section-soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}

/* Nagłówek sekcji: numer w monospace, tytuł szeryfowy, a od tytułu do prawej
   krawędzi biegnie włosowa linia — rytm powtarzany na wszystkich podstronach. */
.section-head { margin-bottom: clamp(24px, 3vw, 38px); }
.section-nr {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--brand-ink);
  margin-bottom: 10px;
}
.section-head h2 {
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-head h2::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}
.section-head h2 .ic { flex: none; color: var(--brand-ink); }
.section-lead {
  margin-top: 12px;
  max-width: 66ch;
  color: var(--muted);
  font-size: 1rem;
}

/* ==========================================================================
   5. Nagłówek serwisu
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
}
.header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.brand-mark { flex: none; width: 42px; height: 42px; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--f-serif);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.brand-sub {
  font: 500 0.625rem/1.3 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-list a {
  display: block;
  padding: 9px 13px;
  border-radius: var(--r-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav-list a:hover { background: var(--bg-soft); color: var(--ink); }
.nav-list a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.header-akcje { display: flex; align-items: center; gap: 10px; flex: none; }

.theme-toggle {
  width: 40px; height: 40px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--muted);
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--ink); }
.theme-toggle .ic-moon { display: none; }
.theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-sun,
.theme-toggle[aria-pressed="true"] .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-moon,
.theme-toggle[aria-pressed="true"] .ic-moon { display: block; }

.nav-toggle {
  display: none;
  width: 42px; height: 40px;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  position: relative;
}
.nav-toggle-belka,
.nav-toggle-belka::before,
.nav-toggle-belka::after {
  position: absolute;
  left: 50%;
  width: 18px; height: 1.5px;
  margin-left: -9px;
  background: var(--ink);
  content: "";
  transition: transform 160ms ease, opacity 160ms ease;
}
.nav-toggle-belka { top: 50%; margin-top: -0.75px; }
.nav-toggle-belka::before { top: -6px; margin-left: 0; left: 0; }
.nav-toggle-belka::after { top: 6px; margin-left: 0; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-belka { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-belka::before { transform: translateY(6px) rotate(45deg); opacity: 1; }
.nav-toggle[aria-expanded="true"] .nav-toggle-belka::after { transform: translateY(-6px) rotate(-45deg); opacity: 1; }

/* ==========================================================================
   6. Przyciski i odnośniki
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font: 500 0.9375rem/1.2 var(--f-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.btn-sm { padding: 9px 14px; font-size: 0.875rem; }

.btn-primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-2); color: var(--on-brand); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--ink); }

/* Przycisk na płycie ciemnej. */
.btn-jasny { background: transparent; color: var(--deep-ink); border-color: rgba(248, 243, 234, .28); }
.btn-jasny:hover { background: rgba(248, 243, 234, .1); color: var(--deep-ink); border-color: var(--deep-ink); }

.btn-widmo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: 500 0.6875rem/1 var(--f-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-ink);
  text-decoration: none;
  white-space: nowrap;
}
.btn-widmo:hover { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-deep); }

.ic { width: 20px; height: 20px; flex: none; }
.ic-sm { width: 15px; height: 15px; flex: none; }

/* ==========================================================================
   7. Hero i nagłówek podstrony
   ========================================================================== */
.hero { padding: clamp(40px, 5vw, 76px) 0 clamp(36px, 4vw, 64px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
}
.hero-copy > * + * { margin-top: 18px; }
.hero-copy h1 { margin-top: 14px; }

.hero-akcje { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 60ch;
}
.hero-note .ic { color: var(--brand-ink); margin-top: 2px; }

.pagehead {
  padding: clamp(22px, 2.5vw, 34px) 0 clamp(34px, 4vw, 56px);
  border-bottom: 1px solid var(--hair);
}
.pagehead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: clamp(26px, 4vw, 56px);
  align-items: center;
}
.pagehead-copy > * + * { margin-top: 16px; }
.pagehead-copy-szeroka { max-width: 74ch; }
/* Spis krajów nie ma panelu odczytu, więc nagłówek podstrony może stać bliżej
   treści niż na podstronach usługi i kraju. */
.strona-krajow .pagehead { padding-bottom: clamp(24px, 2.5vw, 36px); }

.crumbs { margin-bottom: clamp(20px, 2.5vw, 30px); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crumbs li { display: flex; align-items: center; gap: 6px; }
.crumbs li + li::before {
  content: "/";
  color: var(--line-strong);
  font-family: var(--f-mono);
  font-size: 0.75rem;
}
.crumbs a, .crumbs span {
  font: 500 0.75rem/1 var(--f-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand-ink); }
.crumbs span { color: var(--ink); }

/* ==========================================================================
   8. Panel odczytu (płyta ciemna w obu motywach)
   ========================================================================== */
/* Płyta ciemna jest ciemna w OBU motywach, więc wewnątrz niej przestawiamy
   tokeny na warianty czytelne na ciemnym tle. Dzięki temu każdy komponent
   (znacznik „darmowe”, cena zerowa, kreska rysunku) działa tu bez osobnych
   reguł i bez ryzyka, że w motywie jasnym zieleń zniknie na grafitowym tle. */
.odczyt, .cta-band {
  --ink: var(--deep-ink);
  --text: var(--deep-ink);
  --muted: var(--deep-muted);
  --line: var(--deep-line);
  --line-strong: rgba(248, 243, 234, .32);
  --hair: var(--deep-line);
  --bg-soft: rgba(248, 243, 234, .1);
  --card: var(--deep-2);
  --free: var(--free-on-deep);
  --free-soft: rgba(79, 211, 164, .14);
  --free-line: rgba(79, 211, 164, .42);
  --brand-ink: var(--brand);
  --brand-deep: #ffb884;
}

.odczyt {
  position: relative;
  overflow: hidden;
  background: var(--deep);
  border: 1px solid var(--deep-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  color: var(--deep-ink);
}
.odczyt::before {
  /* Krawędź pomiaru — jedyny element „chromu” w barwie marki. */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2) 62%, transparent);
}

.odczyt-pasek {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--deep-line);
  background: var(--deep-2);
}
.odczyt-zrodlo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 500 0.625rem/1 var(--f-mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--deep-muted);
}
.odczyt-data {
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--deep-muted);
}
.dioda {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(254, 128, 32, .16);
  animation: dm-dioda 2.6s ease-in-out infinite;
}
@keyframes dm-dioda {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.gauges {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gauge {
  padding: 18px 20px;
  border-bottom: 1px solid var(--deep-line);
}
.gauge:nth-child(odd) { border-right: 1px solid var(--deep-line); }
.gauge dt {
  font: 500 0.625rem/1.35 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deep-muted);
  min-height: 2.7em;
}
.gauge dd {
  margin-top: 6px;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.95rem);
  font-weight: 500;
  line-height: 1;
  color: var(--deep-ink);
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.gauge-j, .gauge-z {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deep-muted);
}
.gauge-drugie {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  margin-left: 6px;
}
.gauge .pasek { margin-top: 12px; }
.dd-znacznik { font-size: 1rem; }

/* Ranking stawek — dane, nie ozdoba: te same wartości co w tabeli poniżej. */
.rank { position: relative; z-index: 1; padding: 18px 20px 20px; }
.rank-tytul {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font: 500 0.625rem/1.3 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deep-muted);
  margin-bottom: 12px;
}
.rank-jedn { color: var(--brand); }
.rank-lista { display: grid; gap: 7px; }
.rank-poz {
  display: grid;
  grid-template-columns: minmax(84px, 1.1fr) minmax(0, 2.4fr) auto;
  align-items: center;
  gap: 12px;
}
.rank-nazwa {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--deep-ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-nazwa:hover { color: var(--brand); text-decoration: underline; }
.rank-tor {
  display: block;
  height: 8px;
  background: rgba(248, 243, 234, .08);
  border-radius: 1px;
  overflow: hidden;
}
.rank-slupek {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 1px;
}
.rank-wartosc { font-size: 0.8125rem; color: var(--deep-ink); }
.rank-wartosc.jest-zero { color: var(--free); }

.odczyt-art {
  position: absolute;
  right: -34px;
  bottom: -40px;
  width: 268px;
  opacity: .55;
  pointer-events: none;
}
.anim-pulse { animation: dm-puls 3.2s ease-in-out infinite; }
.anim-pulse-2 { animation-delay: .5s; }
.anim-pulse-3 { animation-delay: 1s; }
@keyframes dm-puls {
  0%, 100% { opacity: .35; }
  50% { opacity: 1; }
}
.anim-fala {
  transform-origin: center;
  animation: dm-fala 3.6s ease-out infinite;
}
@keyframes dm-fala {
  0% { opacity: .7; transform: scale(.45); }
  100% { opacity: 0; transform: scale(1.25); }
}

/* ==========================================================================
   9. Metryka podstrony usługi
   ========================================================================== */
.metryka {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
}
.metryka-pierscien {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-right: 1px solid var(--deep-line);
  border-bottom: 1px solid var(--deep-line);
}
.metryka-podpis {
  font: 500 0.625rem/1.3 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.metryka-pierscien svg { width: 100%; max-width: 148px; }
.gauges-usluga { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ==========================================================================
   10. Paski wartości (skala bez stylów w znacznikach)
   ========================================================================== */
.pasek {
  display: block;
  height: 4px;
  margin-top: 8px;
  background: var(--bg-soft);
  border-radius: 1px;
  overflow: hidden;
}
.pasek-fill {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 1px;
}
.w0 { width: 0; }
.w5 { width: 5%; }
.w10 { width: 10%; }
.w15 { width: 15%; }
.w20 { width: 20%; }
.w25 { width: 25%; }
.w30 { width: 30%; }
.w35 { width: 35%; }
.w40 { width: 40%; }
.w45 { width: 45%; }
.w50 { width: 50%; }
.w55 { width: 55%; }
.w60 { width: 60%; }
.w65 { width: 65%; }
.w70 { width: 70%; }
.w75 { width: 75%; }
.w80 { width: 80%; }
.w85 { width: 85%; }
.w90 { width: 90%; }
.w95 { width: 95%; }
.w100 { width: 100%; }

/* ==========================================================================
   11. Narzędzia nad tabelą
   ========================================================================== */
.tabela-narzedzia {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.pole-szukaj {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  max-width: 320px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
}
.pole-szukaj:focus-within {
  border-color: var(--brand-ink);
  outline: 2px solid var(--brand-ink);
  outline-offset: 2px;
}
.pole-szukaj .ic { color: var(--muted); width: 17px; height: 17px; }
.pole-szukaj input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 400 0.9375rem/1.2 var(--f-sans);
}
/* Obwódkę fokusu niesie cała obudowa pola (reguła wyżej), więc samo <input>
   jej nie potrzebuje — ale nie wolno jej zdjąć bez zastąpienia. */
.pole-szukaj input:focus { outline: none; }
.pole-szukaj input::placeholder { color: var(--muted); }

.pole-tylko { display: flex; align-items: center; gap: 9px; }
.pole-tylko input {
  width: 17px; height: 17px;
  accent-color: var(--brand);
  flex: none;
}
.pole-tylko label { font-size: 0.9375rem; color: var(--text); cursor: pointer; }

.licznik {
  margin-left: auto;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.brak-wynikow {
  margin-top: 18px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: var(--r);
}

/* ==========================================================================
   12. Tabela porównania
   ========================================================================== */
.table-wrap {
  position: relative;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

table.data { min-width: 940px; }

/* Pas nagłówka w dokładnej barwie poprzedniej wersji serwisu (#FE8020),
   identyczny w obu motywach. Napis NIE jest biały — biel na tym pomarańczu
   daje 2,5:1; ciemny tusz --on-brand daje 7,5:1. */
table.data thead th {
  position: relative;
  padding: 11px 14px;
  background: var(--brand);
  color: var(--on-brand);
  text-align: left;
  vertical-align: bottom;
  font-weight: 500;
  border-bottom: 2px solid var(--brand-deep-line);
  white-space: nowrap;
}
table.data thead th:first-child { border-top-left-radius: 7px; }
table.data thead th:last-child { border-top-right-radius: 7px; }
.k-tytul {
  display: block;
  font: 500 0.6875rem/1.3 var(--f-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: normal;
}
.k-jedn {
  display: block;
  margin-top: 3px;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-brand);
  opacity: .72;
  white-space: normal;
}

/* Sortowanie dokłada przycisk w nagłówku — bez JS zostaje sam napis. */
.k-sort {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 8px;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.k-sort .k-tytul, .k-sort .k-jedn { grid-column: 1; }
.k-sort .ic-sm { grid-column: 2; grid-row: 1 / -1; align-self: end; }
.k-sort:hover { color: var(--on-brand); text-decoration: underline; text-underline-offset: 3px; }
.k-sort .ic-sm { opacity: .38; margin-bottom: 2px; }
.k-sort:hover .ic-sm { opacity: .8; }
table.data th[aria-sort="ascending"] .k-sort .ic-sm,
table.data th[aria-sort="descending"] .k-sort .ic-sm { opacity: 1; color: var(--on-brand); }
table.data th[aria-sort="descending"] .k-sort .ic-sm { transform: scaleY(-1); }

table.data tbody td,
table.data tbody th {
  padding: 14px;
  border-bottom: 1px solid var(--hair);
  vertical-align: middle;
  text-align: left;
  font-weight: 400;
}
/* Rytm linijki: co piąty wiersz mocniejsza kreska. */
table.data tbody tr:nth-child(5n) td,
table.data tbody tr:nth-child(5n) th { border-bottom-color: var(--line); }
table.data tbody tr:last-child td,
table.data tbody tr:last-child th { border-bottom: 0; }

table.data tbody tr:hover { background: var(--brand-soft); }
table.data tbody tr:hover .k-nr { box-shadow: inset 3px 0 0 var(--brand); }

.k-nr { width: 52px; padding-right: 0 !important; }
.nr-wiersza {
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.k-nazwa { width: 210px; }
.usluga-link { display: inline-block; vertical-align: top; text-decoration: none; }
.usluga-marka {
  display: block;
  font-family: var(--f-serif);
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.usluga-link:hover .usluga-marka { color: var(--brand-ink); text-decoration-color: var(--brand); }
.usluga-ident {
  display: block;
  margin-top: 3px;
  font: 400 0.625rem/1 var(--f-mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.odsylacz {
  display: inline-block;
  vertical-align: top;
  margin: 2px 0 0 4px;
  font-family: var(--f-serif);
  font-size: 1rem;
  line-height: 1;
  color: var(--brand-ink);
  text-decoration: none;
}
.odsylacz:hover { color: var(--brand-deep); }

.wart { font-size: 1rem; font-weight: 500; color: var(--ink); }
.jedn {
  font-size: 0.6875rem;
  color: var(--muted);
  margin-left: 4px;
  letter-spacing: 0.04em;
}
.wart-brak { color: var(--muted); }

.k-dni { width: 150px; }
.k-limit { width: 130px; }
.k-polska { width: 118px; }
.k-kraje { width: 118px; }
.k-cena { width: 136px; }
.k-konto { width: 140px; }

/* Znacznik stanu: informacja nigdy nie zależy wyłącznie od koloru — obok
   barwy stoi wypełniony albo konturowy kwadracik i słowo. */
.znacznik {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.kwadrat { width: 8px; height: 8px; flex: none; border: 1px solid currentColor; }
.jest-tak { color: var(--free); }
.jest-tak .kwadrat { background: currentColor; }
.jest-nie { color: var(--muted); }
.jest-nie .kwadrat { background: transparent; }

.kraje-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.kraje-para { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.kraje-liczba { font-size: 0.9375rem; font-weight: 500; color: var(--ink); }
.kraje-link:hover .kraje-liczba { color: var(--brand-ink); }
.kraje-link:hover .kraje-para { color: var(--brand-ink); }

.konto-akcje { display: flex; flex-wrap: wrap; gap: 6px; }

/* ==========================================================================
   13. Legenda i przypisy
   ========================================================================== */
.legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.legenda li { display: flex; align-items: center; gap: 8px; }
.legenda .ic-sm { color: var(--muted); }

.przypisy { margin-top: clamp(22px, 3vw, 32px); display: grid; gap: 14px; max-width: 86ch; }
.przypis {
  display: flex;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text);
}
.przypis-znak {
  font-family: var(--f-serif);
  color: var(--brand-ink);
  flex: none;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--r-sm);
  background: var(--card);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
}
.notice .ic { flex: none; margin-top: 2px; }
.notice-amber { background: var(--amber-soft); border-color: var(--amber-line); border-left-color: var(--amber); }
.notice-amber .ic { color: var(--amber); }
.notice-alert { background: var(--alert-soft); border-color: var(--alert-line); border-left-color: var(--alert); }
.notice-alert .ic { color: var(--alert); }

/* ==========================================================================
   14. Akordeon pytań
   ========================================================================== */
.acc { display: grid; gap: 10px; max-width: 92ch; }
.acc details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.acc details[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.acc summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { background: var(--bg-soft); }
.acc-nr {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--brand-ink);
  flex: none;
}
.acc-tytul {
  flex: 1 1 auto;
  font-family: var(--f-serif);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.acc-strzalka { color: var(--muted); transition: transform 160ms ease; }
.acc details[open] .acc-strzalka { transform: rotate(180deg); }
.acc-tresc { padding: 0 18px 20px; }
.acc-tresc > * + * { margin-top: 14px; }

/* ==========================================================================
   15. Rysunki
   ========================================================================== */
.fig { margin-top: 20px; }
.fig-art {
  padding: 20px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow-x: auto;
}
.fig-art svg { width: 100%; min-width: 520px; }
.fig-cap {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 68ch;
}

.trasa {
  position: relative;
  z-index: 1;
  padding: 22px 20px 18px;
  overflow-x: auto;
}
.trasa svg { width: 100%; min-width: 480px; }

/* Kolory rysunków wyłącznie przez klasy — inaczej nie zadziałają w motywie
   ciemnym. Wyjątek: .odczyt-art i wnętrze .cta-band leżą zawsze na płycie
   ciemnej i mają barwy wpisane wprost. */
.fl-plyta { fill: var(--bg-soft); }
.fl-brand { fill: var(--brand); }
.fl-free-tlo { fill: var(--free-soft); }
.st-line { stroke: var(--line); }
.st-line-mocna { stroke: var(--line-strong); }
.st-brand { stroke: var(--brand); }
.st-brand-grubo { stroke: var(--brand); }
.st-free { stroke: var(--free); }
.st-tor { stroke: var(--bg-soft); }
.tx { fill: var(--ink); font-size: 12px; }
.tx-mono { font-family: var(--f-mono); letter-spacing: 0.06em; }
.tx-mini { font-size: 10px; }
.tx-muted { fill: var(--muted); }
.tx-brand { fill: var(--brand-ink); }
.tx-free { fill: var(--free); }
.tx-duza { font-size: 27px; font-weight: 500; }
.tx-kraj { font-size: 13px; fill: var(--ink); letter-spacing: 0.04em; }
.ramka-okna { stroke-width: 2; }

/* Rysunek na płycie ciemnej ma własne, stałe barwy napisów. */
/* Rysunek na płycie ciemnej: tło figur i tor pierścienia są jedynym, czego
   nie da się wziąć z przemapowanych tokenów. */
.odczyt .fl-plyta { fill: rgba(248, 243, 234, .06); }
.odczyt .st-tor { stroke: rgba(248, 243, 234, .12); }

/* ==========================================================================
   16. Bloki krajów, plakietki, karty
   ========================================================================== */
.blok-krajow + .blok-krajow { margin-top: clamp(34px, 4vw, 52px); }
.blok-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.blok-head h3 { display: flex; align-items: center; gap: 10px; }
.blok-head h3 .ic { color: var(--brand-ink); }
.blok-licznik {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.licznik-wart { font-size: 1.125rem; font-weight: 500; color: var(--ink); margin-right: 4px; }

.blok-zdanie { margin: 16px 0; color: var(--text); }

.blok-brak {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: var(--r);
  color: var(--muted);
  font-size: 0.9375rem;
}
.blok-brak-duzy { margin-bottom: clamp(30px, 4vw, 48px); }

.chipy { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-block;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--text);
  font-size: 0.875rem;
  text-decoration: none;
  transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
}
a.chip:hover {
  border-color: var(--free-line);
  background: var(--free-soft);
  color: var(--free);
}
.chip-bez-linku .chip { color: var(--muted); border-style: dashed; }

.grid { display: grid; gap: 14px; }
.grid-uslugi { grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); }

.card {
  position: relative;
  display: block;
  height: 100%;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.card-link { text-decoration: none; transition: border-color 140ms ease, box-shadow 140ms ease; }
.card-link:hover { border-color: var(--brand-line); box-shadow: var(--shadow-md); }
.card-marka {
  display: block;
  font-family: var(--f-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.card-link:hover .card-marka { color: var(--brand-ink); }
.card-dane {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hair);
  font-size: 0.8125rem;
  color: var(--muted);
}
.card-para { display: inline-flex; align-items: baseline; gap: 5px; }
.card-liczba {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
}
.card-strzalka {
  position: absolute;
  right: 16px; top: 18px;
  color: var(--line-strong);
}
.card-link:hover .card-strzalka { color: var(--brand); }

/* ==========================================================================
   17. Spis krajów
   ========================================================================== */
.alfabet {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: clamp(22px, 3vw, 32px);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hair);
}
.alfabet a {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: 500 0.8125rem/1 var(--f-mono);
  color: var(--text);
  text-decoration: none;
}
.alfabet a:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }

.spis { display: grid; gap: clamp(26px, 3vw, 38px); }
.spis-grupa { break-inside: avoid; }
.spis-litera {
  font-family: var(--f-mono);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--brand-ink);
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.spis-lista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 2px 20px;
}
.spis-poz {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--hair);
}
.spis-poz:hover { background: var(--brand-soft); color: var(--ink); }
.spis-nazwa { font-size: 0.9375rem; }
.spis-liczby { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.spis-para { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.spis-para.jest-free { color: var(--free); }
.spis-liczba { font-size: 0.8125rem; font-weight: 500; }
.spis-poz-bez .spis-nazwa { color: var(--muted); }

.sasiedzi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.sasiad {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-decoration: none;
}
.sasiad:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.sasiad-etykieta {
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sasiad-nazwa {
  font-family: var(--f-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}
.sasiad-prawy { text-align: right; }
.sasiad-spis { text-align: center; }

/* ==========================================================================
   18. Pasek wezwania
   ========================================================================== */
.cta-band {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(26px, 3.5vw, 40px);
  background: var(--deep);
  border: 1px solid var(--deep-line);
  border-radius: var(--r-lg);
  color: var(--deep-ink);
}
.cta-band::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--brand);
}
.cta-tresc { max-width: 56ch; }
.cta-tresc h2 { color: var(--deep-ink); }
.cta-tresc p { margin-top: 10px; color: var(--deep-muted); }
.cta-akcje { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   19. Proza
   ========================================================================== */
.prose { color: var(--text); }
.prose > * + * { margin-top: 16px; }
.prose p { max-width: 74ch; }
.prose-waska { max-width: 76ch; }
.prose a { color: var(--brand-ink); }
.prose code,
.blad-nota code {
  font: 400 0.875em/1.4 var(--f-mono);
  padding: 2px 6px;
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: 3px;
  color: var(--ink);
}

/* ==========================================================================
   20. Strony błędów
   ========================================================================== */
.section-blad { padding: clamp(56px, 8vw, 120px) 0; }
.blad { max-width: 62ch; }
.blad-kod {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.blad-kod span {
  display: grid;
  place-items: center;
  width: 54px; height: 62px;
  background: var(--deep);
  border-radius: var(--r-sm);
  color: var(--deep-ink);
  font-size: 1.75rem;
  font-weight: 500;
}
.blad-kod span:first-child { background: var(--brand); color: var(--on-brand); }
/* Para barw wpisana wprost i identyczna w obu motywach: bursztyn z tokenu
   jest w motywie ciemnym jasny, więc ciemny tusz dawałby tu 2,79:1. */
.blad-kod-maly span:first-child { background: #7a5a0b; color: #fdf6e6; }
.blad h1 { margin-bottom: 16px; }
.blad .lead { margin-bottom: 22px; }
.blad-nota {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font-size: 0.875rem;
  color: var(--muted);
}

/* ==========================================================================
   21. Stopka
   ========================================================================== */
.footer {
  margin-top: clamp(40px, 5vw, 72px);
  padding: clamp(40px, 5vw, 64px) 0 26px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 3vw, 44px);
}
.footer-o .brand { margin-bottom: 16px; }
.footer-opis { font-size: 0.9375rem; color: var(--text); max-width: 46ch; }
.footer-nota {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 46ch;
}
.footer-kol h2 {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-kol ul { display: grid; gap: 8px; }
.footer-kol a {
  display: inline;
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
}
.footer-kol a:hover { color: var(--brand-ink); text-decoration: underline; }
.footer-kol .ic-sm {
  display: inline-block;
  vertical-align: -2px;
  margin-left: 5px;
  width: 13px; height: 13px;
  color: var(--muted);
}
.footer-uslugi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }

.kolofon {
  margin-top: clamp(30px, 4vw, 48px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.kolofon-linia {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.kolofon-odczyt { color: var(--brand-ink); }

.to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 40;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  background: var(--deep);
  color: var(--deep-ink);
  border: 1px solid var(--deep-line);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}
/* Sam opacity zostawiłby przycisk w kolejności tabulacji i łapiący kliknięcia
   w rogu ekranu przez cały czas, zanim strona zostanie przewinięta. */
.to-top:not(.is-on) { visibility: hidden; pointer-events: none; }
.to-top.is-on { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   22. Responsywność
   ========================================================================== */

/* Sticky nagłówek tabeli działa tylko tam, gdzie tabela nie przewija się
   w poziomie: przy przewijaniu poziomym kontener staje się własnym portem
   przewijania i „position: sticky” przestaje mieć sens. */
@media (min-width: 1140px) {
  .table-wrap { overflow: visible; }
  table.data thead th {
    position: sticky;
    top: var(--header-h);
    z-index: 3;
  }
}

@media (max-width: 1139.98px) {
  .hero-grid, .pagehead-grid { grid-template-columns: minmax(0, 1fr); }
  .odczyt { max-width: 620px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1023.98px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    margin: 0;
    padding: 10px clamp(16px, 3.5vw, 40px) 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list a { padding: 12px 10px; font-size: 1rem; }
  .nav-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); }
  .header-inner { position: relative; }
  /* Menu jest tu pozycjonowane bezwzględnie, więc jego `margin-left: auto`
     nie odsuwa już przycisków od logo — robi to teraz pasek akcji. */
  .header-akcje { order: 3; margin-left: auto; }
  .nav-toggle { order: 4; }
  .header-cta { display: none; }
}

@media (max-width: 759.98px) {
  /* Tabela przestaje być tabelą: ten sam znacznik staje się kartami,
     bez drugiego zestawu znaczników i bez JavaScriptu. */
  .table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
  }
  table.data { min-width: 0; display: block; }
  /* W widoku kart nagłówek nie jest już powiązany z komórkami (etykiety biorą
     się z data-kolumna), a sr-only zostawiłoby przyciski sortowania w kolejności
     tabulacji jako niewidoczne elementy. */
  table.data thead { display: none; }
  table.data tbody { display: grid; gap: 12px; }
  table.data tbody tr {
    position: relative;
    display: block;
    padding: 16px 16px 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 3px solid var(--brand);
    border-radius: var(--r);
  }
  table.data tbody tr:hover { background: var(--card); }
  table.data tbody td,
  table.data tbody th {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 6px;
    width: auto !important;
    padding: 9px 0;
    border-bottom: 1px solid var(--hair);
  }
  /* Wartość i jednostka mają trzymać się razem przy prawej krawędzi karty,
     a nie rozjeżdżać się po całej szerokości. */
  table.data tbody td > .wart,
  table.data tbody td > .wart-brak,
  table.data tbody td > .znacznik,
  table.data tbody td > .kraje-link,
  table.data tbody td > .konto-akcje { margin-left: auto; }
  table.data tbody td::before {
    content: attr(data-kolumna);
    flex: none;
    max-width: 48%;
    font: 500 0.625rem/1.3 var(--f-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  table.data tbody th.k-nazwa {
    display: block;
    padding: 0 60px 12px 0;
    border-bottom: 1px solid var(--line);
  }
  table.data tbody td.k-nr {
    position: absolute;
    right: 14px; top: 14px;
    padding: 0 !important;
    border: 0;
  }
  table.data tbody tr:hover .k-nr { box-shadow: none; }
  table.data tbody td.k-cena .wart { font-size: 1.375rem; }
  table.data tbody td.k-konto { display: block; padding-bottom: 0; border-bottom: 0; }
  table.data tbody td.k-konto::before { display: block; margin-bottom: 8px; }
  .konto-akcje { gap: 8px; }
  .konto-akcje .btn-widmo { flex: 1 1 auto; justify-content: center; padding: 11px 9px; }
  .k-dni .pasek { display: none; }
  table.data tbody td.k-dni { flex-wrap: wrap; }

  .gauges, .gauges-usluga { grid-template-columns: minmax(0, 1fr); }
  .gauge:nth-child(odd) { border-right: 0; }
  .gauge dt { min-height: 0; }
  .metryka { grid-template-columns: minmax(0, 1fr); }
  .metryka-pierscien { border-right: 0; }

  .spis-lista { grid-template-columns: minmax(0, 1fr); }
  .sasiedzi { grid-template-columns: minmax(0, 1fr); }
  .sasiad-prawy, .sasiad-spis { text-align: left; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-uslugi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .licznik { margin-left: 0; width: 100%; }
  .blad-kod span { width: 46px; height: 54px; font-size: 1.5rem; }
  .to-top { right: 14px; bottom: 14px; }
}

@media (max-width: 479.98px) {
  .odczyt-art { display: none; }
  .legenda { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ==========================================================================
   23. Druk — zestawienie taryf ludzie drukują
   ========================================================================== */
@media print {
  /* Selektor musi objąć oba warianty ręcznego przełącznika. Samo `:root`
     (0,1,0) przegrywa specyficznością z `:root[data-theme="dark"]` (0,2,0),
     więc przy włączonym motywie ciemnym cały blok wydruku byłby martwy
     i strona drukowałaby się na czarno. */
  :root,
  :root[data-theme="dark"],
  :root[data-theme="light"] {
    --bg: #fff; --bg-soft: #fff; --card: #fff;
    --ink: #000; --text: #1a1a1a; --muted: #4a4a4a;
    --line: #999; --line-strong: #555; --hair: #ccc;
    --brand-ink: #8f3a02; --brand-soft: #fff; --brand-line: #999;
    --free: #0c6a4e; --free-soft: #fff; --free-line: #999;
    --alert: #7a2c18; --alert-soft: #fff; --alert-line: #999;
    --amber: #5c440a; --amber-soft: #fff; --amber-line: #999;
    /* Płyty ciemne też muszą zbieleć — razem z tokenami, które przestawiają
       na sobie (.odczyt, .cta-band). */
    --deep: #fff; --deep-2: #fff; --deep-ink: #000;
    --deep-muted: #444; --deep-line: #999;
    --free-on-deep: #0c6a4e;
  }
  body { font-size: 10.5pt; background: #fff; }
  .header, .nav, .to-top, .theme-toggle, .tabela-narzedzia, .alfabet,
  .odczyt-art, .cta-band, .skip-link, .sasiedzi, .footer-kol { display: none !important; }
  .hero, .pagehead, .section { padding: 12pt 0; }
  .container { max-width: none; padding: 0; }
  .odczyt { box-shadow: none; border: 1pt solid #999; break-inside: avoid; }
  .odczyt::before { display: none; }
  .table-wrap { overflow: visible; border: 0; }
  table.data { min-width: 0; }
  table.data thead th {
    position: static;
    background: #fff;
    color: #000;
    border-bottom: 1.5pt solid #000;
  }
  .k-jedn { color: #333; opacity: 1; }
  table.data tbody tr { break-inside: avoid; }
  .pasek, .rank-tor { display: none; }
  .btn, .btn-widmo { border: 1pt solid #999; color: #000; background: #fff; }
  a { color: #000; }
  .acc details { break-inside: avoid; border: 1pt solid #ccc; }
  .acc-tresc { display: block !important; }
  .footer { background: #fff; border-top: 1pt solid #999; }
}
