/* ============================================================================
   elogowanie.pl - arkusz glowny

   Zasady:
   - jedna szerokosc tresci (.shell), jeden rytm pionowy (.section)
   - naglowek sekcji i tresc zaczynaja sie w tej samej kolumnie
   - karta ma obrys 1px i krok na rampie --bg-*, nigdy cienia
   - kolor niesie znaczenie (status, marka), nigdy dekoracje
   - ruch tylko na wejsciu; hover zmienia kolor, nie polozenie
   ========================================================================= */

/* ------------------------------- fonty ---------------------------------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/geistmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/geistmono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------- tokeny --------------------------------- */

:root {
  --bg-900: #0c0c12;
  --bg-800: #111118;
  --bg-700: #16161e;
  --bg-600: #1c1c26;
  --bg-500: #24242e;

  --line: #2a2a36;
  --line-soft: #22222c;

  --ink-100: #f0f0f5;
  --ink-300: #c0c0cc;
  --ink-400: #8f8fa0; /* 5.9:1 na bg-900 - podloga dla tekstu z trescia */
  --ink-500: #5c5c6e; /* placeholdery i obrysy, nigdy tekst */

  --brand: #79ee5f;
  --brand-hover: #8ff573;
  --brand-dim: #5bc247;
  --brand-ink: #06180a;
  --brand-wash: rgba(121, 238, 95, 0.1);

  --emerald: #34d399;
  --emerald-wash: rgba(16, 185, 129, 0.12);
  --amber: #fbbf24;
  --amber-wash: rgba(245, 158, 11, 0.12);
  --rose: #fb7185;
  --rose-wash: rgba(244, 63, 94, 0.12);
  --sky: #7dd3fc;
  --sky-wash: rgba(14, 165, 233, 0.15);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-hover: 180ms;
  --t-enter: 520ms;

  --shell: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --sec: clamp(52px, 6vw, 84px);
  --head: 36rem;

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: dark;
}

/* --------------------------------- baza ---------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Glebia to obrys i krok na rampie bg-*, nigdy cien. */
* {
  box-shadow: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background: var(--bg-900);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

body {
  margin: 0;
  background: var(--bg-900);
  color: var(--ink-100);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--brand);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--t-hover) var(--ease);
}
a:hover {
  text-decoration: underline;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--brand);
  color: var(--brand-ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--r-md);
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 14px;
  font-weight: 600;
  transition: top var(--t-hover) var(--ease);
}
.skip-link:focus {
  top: 12px;
  text-decoration: none;
}

/* ----------------------------- typografia -------------------------------- */

h1,
h2,
h3,
h4 {
  margin: 0 0 0.4em;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}
h2 {
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
}
h3 {
  font-size: 1.0625rem;
}
h4 {
  font-size: 0.9375rem;
}

p {
  margin: 0 0 0.9em;
}
p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-300);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-400);
}

.muted {
  color: var(--ink-400);
}
.small {
  font-size: 13px;
}
.hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-400);
}
.desc {
  color: var(--ink-300);
}
/* W komorce tabeli .desc jest podpisem pod wartoscia, nie jej dalszym ciagiem.
   Bez tego "Baza danych" i "PostgreSQL 17" skleja sie w jedno slowo. */
td .desc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.num {
  font-variant-numeric: tabular-nums;
}
.ellipsis {
  display: block;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.middot {
  color: var(--ink-500);
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
:not(pre) > code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg-600);
  color: var(--ink-300);
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-800);
  font-size: 13px;
  line-height: 1.6;
}
pre code {
  padding: 0;
  background: none;
  color: var(--ink-300);
}

.rule {
  height: 1px;
  margin: 20px 0;
  border: 0;
  background: var(--line);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12px;
  color: var(--ink-400);
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* --------------------------------- uklad --------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--sec);
}
.section--band {
  border-block: 1px solid var(--line);
  background: var(--bg-800);
}

/* Naglowek sekcji i tresc pod nim zaczynaja sie w tej samej kolumnie. */
.section-head {
  max-width: var(--head);
  margin-bottom: 28px;
}
.section-head p {
  margin: 0;
  color: var(--ink-400);
}

.page {
  padding-block: clamp(28px, 4vw, 44px) clamp(48px, 6vw, 72px);
}

.page-header {
  max-width: 60ch;
  margin-bottom: 24px;
}
.page-header h1 {
  margin: 0;
}
.page-header p {
  margin: 6px 0 0;
  color: var(--ink-400);
}

.narrow {
  max-width: 520px;
  margin-inline: auto;
}
.readable {
  max-width: 720px;
}
.center {
  margin-inline: auto;
}

/* Tryb strony: widoczna jest tylko galaz wybrana w pasku. Obie sa w HTML-u,
   wiec przelacznik dziala bez JS i czytnik ma pelna tresc. */
[data-tryb='osoba'] [data-mode='firma'],
[data-tryb='firma'] [data-mode='osoba'] {
  display: none;
}

.stack > * + * {
  margin-top: 16px;
}
.mt-xs {
  margin-top: 8px;
}
.mt-sm {
  margin-top: 12px;
}
.mt-md {
  margin-top: 20px;
}
.mt-lg {
  margin-top: 32px;
}

/* Jedna siatka na cala strone. --min decyduje, ile kolumn sie zmiesci. */
.grid {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 260px)), 1fr));
}
.grid--2 {
  --min: 320px;
}
.grid--4 {
  --min: 210px;
}

.cols {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.cols--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.cols--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.split {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .split--flip > :first-child {
    order: 2;
  }
}

.tiles {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ------------------------------- fundament ------------------------------- */

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-700);
}
.card > h2,
.card > h3 {
  margin-top: 0;
}
.card--link {
  display: block;
  color: inherit;
  transition:
    border-color var(--t-hover) var(--ease),
    background-color var(--t-hover) var(--ease);
}
.card--link:hover {
  border-color: var(--ink-500);
  background: var(--bg-600);
  text-decoration: none;
}

.icon-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: var(--bg-600);
  color: var(--ink-300);
  font-size: 14px;
  font-weight: 600;
}
.icon-tile--lg {
  width: 44px;
  height: 44px;
}
.icon-tile--success {
  background: var(--emerald-wash);
  color: var(--emerald);
}
.icon-tile--warn {
  background: var(--amber-wash);
  color: var(--amber);
}
.icon-tile--error {
  background: var(--rose-wash);
  color: var(--rose);
}

/* ------------------------------- przyciski ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  /* Bez tego <button> bierze szare tlo od przegladarki i kazdy przycisk bez
     wlasnego wariantu wyglada jak wylaczony. Linki tego nie mialy, wiec blad
     bylo widac tylko w kilku miejscach - np. na "Kontynuuj passkeyem". */
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition:
    background-color var(--t-hover) var(--ease),
    border-color var(--t-hover) var(--ease),
    color var(--t-hover) var(--ease);
}
.btn:hover {
  text-decoration: none;
}
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}
.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--brand-hover);
}
.btn-ghost {
  background: var(--bg-600);
  color: var(--ink-300);
}
.btn-ghost:hover {
  background: var(--bg-500);
  color: var(--ink-100);
}
.btn-outline {
  border-color: var(--line);
  color: var(--ink-300);
}
.btn-outline:hover {
  border-color: var(--ink-500);
  color: var(--ink-100);
}
.btn-danger {
  background: var(--bg-600);
  color: var(--rose);
}
.btn-danger:hover {
  background: var(--rose-wash);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--brand);
  cursor: pointer;
}
.btn-link:hover {
  text-decoration: underline;
}
.btn-link--muted {
  color: var(--ink-400);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 600;
  transition:
    background-color var(--t-hover) var(--ease),
    border-color var(--t-hover) var(--ease);
}
.cta:hover {
  text-decoration: none;
}
.cta-primary {
  background: var(--brand);
  color: var(--brand-ink);
}
.cta-primary:hover {
  background: var(--brand-hover);
}
.cta-secondary {
  border-color: var(--line);
  color: var(--ink-100);
}
.cta-secondary:hover {
  border-color: var(--ink-500);
}

/* --------------------------------- pola ---------------------------------- */

/* Natywne pole wyboru, tylko w kolorach serwisu. Wlasny checkbox z diva
   wygladalby tak samo, a przestalby dzialac z klawiatura i czytnikiem ekranu. */
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
}

.field {
  margin-bottom: 16px;
}
.field:last-of-type {
  margin-bottom: 0;
}
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.field label,
.label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-300);
}
.field-head label {
  margin-bottom: 0;
}
.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-400);
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='tel'],
input[type='url'],
input[type='number'],
input[type='date'],
input[type='search'],
select,
textarea,
.input {
  width: 100%;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-800);
  font: inherit;
  font-size: 15px;
  color: var(--ink-100);
  transition: border-color var(--t-hover) var(--ease);
}
input::placeholder,
textarea::placeholder {
  color: var(--ink-500);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
}
select {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-400) 50%),
    linear-gradient(135deg, var(--ink-400) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 1px),
    calc(100% - 13px) calc(50% + 1px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
textarea {
  min-height: 96px;
  resize: vertical;
}

.input-code {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  letter-spacing: 0.3em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-300);
}
.checkline input {
  margin-top: 3px;
  flex: none;
}
.checkline .hint {
  display: block;
  margin-top: 2px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.form-actions .hint {
  margin: 0 auto 0 0;
  max-width: 46ch;
}
.form-actions--sticky {
  position: sticky;
  bottom: 0;
  margin-inline: -20px;
  margin-bottom: -20px;
  padding: 20px;
  background: var(--bg-700);
}

/* Karta wyboru: radio schowane, cala karta jest celem. */
.choice {
  display: block;
  position: relative;
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-700);
  cursor: pointer;
  transition:
    background-color var(--t-hover) var(--ease),
    border-color var(--t-hover) var(--ease);
}
.choice:last-child {
  margin-bottom: 0;
}
.choice:hover {
  background: var(--bg-600);
}
.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-wash);
}
.choice:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.choice strong {
  display: block;
  font-size: 15px;
  color: var(--ink-100);
}
.choice .hint {
  margin-top: 2px;
}

.setting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.setting-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.setting-row:first-child {
  padding-top: 0;
}
.setting-row .grow {
  min-width: 0;
  flex: 1;
}

/* ------------------------------- znaczniki ------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--bg-600);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-300);
  white-space: nowrap;
}
.chip-on {
  background: var(--emerald-wash);
  color: var(--emerald);
}
.chip-warn {
  background: var(--amber-wash);
  color: var(--amber);
}
.chip-off {
  background: var(--rose-wash);
  color: var(--rose);
}
.chip-info {
  background: var(--brand-wash);
  color: var(--brand);
}
.chip-muted {
  background: var(--bg-600);
  color: var(--ink-400);
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-500);
}
.dot--on {
  background: var(--emerald);
}

/* ------------------------------ komunikaty ------------------------------- */

.alert {
  padding: 12px 16px;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-700);
  font-size: 14px;
  color: var(--ink-300);
}
.alert--ok {
  border-color: color-mix(in srgb, var(--emerald) 35%, var(--line));
  background: var(--emerald-wash);
  color: var(--emerald);
}
.alert--error {
  border-color: color-mix(in srgb, var(--rose) 35%, var(--line));
  background: var(--rose-wash);
  color: var(--rose);
}

.callout {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--ink-500);
  border-radius: var(--r-md);
  background: var(--bg-800);
  font-size: 14px;
  color: var(--ink-300);
}
.callout--warn {
  border-left-color: var(--amber);
}

.banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: min(560px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-700);
  font-size: 14px;
}
.banner p {
  margin: 0 auto 0 0;
}
.banner--warn {
  border-color: color-mix(in srgb, var(--amber) 35%, var(--line));
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 40px 20px;
  text-align: center;
}
.empty-state p {
  margin: 0;
  max-width: 42ch;
  color: var(--ink-400);
}
.empty-state .btn-row {
  margin-top: 12px;
  justify-content: center;
}

/* --------------------------------- listy --------------------------------- */

.list-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Wiersz listy dziala tez jako link do podstrony - stad wariant <a>. */
.list-rows > li,
.list-rows > .list-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.list-rows > li:last-child,
.list-rows > .list-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.list-rows > li:first-child,
.list-rows > .list-row:first-child {
  padding-top: 0;
}

/* Caly wiersz jest klikalny, wiec i strzalka, i podswietlenie na hover. */
.list-row {
  align-items: center;
  color: inherit;
  transition: color var(--t-hover) var(--ease);
}
.list-row > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.list-row strong {
  font-weight: 500;
  color: var(--ink-100);
}
.list-row::after {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid var(--ink-500);
  border-right: 1.5px solid var(--ink-500);
  transform: rotate(45deg);
  transition: border-color var(--t-hover) var(--ease);
}
.list-row:hover {
  text-decoration: none;
}
.list-row:hover::after {
  border-color: var(--brand);
}
.list-rows h3 {
  margin: 0 0 2px;
}
.list-rows p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-400);
}
.list-rows .grow {
  min-width: 0;
  flex: 1;
}

.dots {
  margin: 0;
  padding: 0;
  list-style: none;
}
.dots li {
  position: relative;
  padding: 3px 0 3px 18px;
  font-size: 14px;
  color: var(--ink-300);
}
.dots li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-500);
}

.dots + p {
  margin-top: 12px;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ink-400);
}
.stepper li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stepper .num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 11px;
}
.stepper .bar {
  width: 28px;
  height: 1px;
  background: var(--line);
}
.stepper [aria-current='step'] {
  color: var(--ink-100);
}
.stepper [aria-current='step'] .num {
  border-color: var(--brand);
  background: var(--brand-wash);
  color: var(--brand);
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 22px;
  list-style: none;
  border-left: 1px solid var(--line);
}
.timeline li {
  position: relative;
  padding-bottom: 24px;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--bg-900);
  background: var(--ink-500);
}
.timeline .when {
  margin: 0;
  font-size: 12px;
  color: var(--ink-400);
}
.timeline h2 {
  margin: 2px 0 8px;
  font-size: 1.0625rem;
}

.accordion details {
  border-bottom: 1px solid var(--line);
}
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 0;
  list-style: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-100);
}
.accordion summary::-webkit-details-marker {
  display: none;
}
.accordion summary::after {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--ink-400);
  border-bottom: 1.5px solid var(--ink-400);
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--t-hover) var(--ease);
}
.accordion details[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}
.accordion details > *:not(summary) {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--ink-400);
}

/* -------------------------------- tabele --------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
caption {
  text-align: left;
}
th,
td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead th {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-400);
  white-space: nowrap;
}
tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}
tbody th {
  font-weight: 500;
  color: var(--ink-300);
}

.stat-tile {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-700);
}
.stat-tile .label {
  margin: 0;
  font-size: 12px;
  color: var(--ink-400);
}
.stat-tile .value {
  display: block;
  margin-top: 6px;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-100);
}
.stat-tile .stat-foot {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--ink-400);
}

.progress {
  height: 6px;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-full);
  background: var(--bg-600);
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: var(--r-full);
  background: var(--brand);
}
.progress--warn > span {
  background: var(--amber);
}

.code-card {
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: var(--r-lg);
  background: var(--bg-800);
  font-size: 14px;
}
.code-card .value {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--bg-900);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brand);
  word-break: break-all;
}

/* ------------------------------ przelaczniki ----------------------------- */

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--bg-800);
}
.segmented a,
.segmented button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-full);
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-400);
  cursor: pointer;
  transition:
    background-color var(--t-hover) var(--ease),
    color var(--t-hover) var(--ease);
}
.segmented a:hover,
.segmented button:hover {
  color: var(--ink-100);
  text-decoration: none;
}
.segmented [aria-current='true'],
.segmented [aria-selected='true'] {
  background: var(--bg-600);
  color: var(--ink-100);
}

.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.tabs a,
.tabs button {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-400);
  cursor: pointer;
  transition: color var(--t-hover) var(--ease);
}
.tabs a:hover,
.tabs button:hover {
  color: var(--ink-100);
  text-decoration: none;
}
.tabs [aria-current='page'],
.tabs [aria-selected='true'] {
  color: var(--ink-100);
}
.tabs [aria-current='page']::after,
.tabs [aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
}
.tabs .tally {
  padding: 1px 6px;
  border-radius: var(--r-full);
  background: var(--bg-600);
  font-size: 11px;
  color: var(--ink-400);
}

.line-nav {
  position: relative;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.line-nav a {
  display: block;
  padding: 7px 0;
  font-size: 14px;
  color: var(--ink-400);
  transition: color var(--t-hover) var(--ease);
}
.line-nav a:hover,
.line-nav [aria-current='page'] {
  color: var(--ink-100);
  text-decoration: none;
}

/* ------------------------------- pasek gorny ----------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-900) 88%, transparent);
  backdrop-filter: blur(8px);
}
.topbar--hero {
  border-bottom-color: transparent;
  background: transparent;
  backdrop-filter: none;
  transition:
    background-color var(--t-hover) var(--ease),
    border-color var(--t-hover) var(--ease);
}
.topbar--hero.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg-900) 88%, transparent);
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  font-size: 15px;
  color: var(--ink-100);
}
.brand:hover {
  text-decoration: none;
}
.brand b {
  font-weight: 600;
}
.brand .suffix {
  color: var(--ink-400);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-item {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink-400);
  transition: color var(--t-hover) var(--ease);
}
.nav-item:hover,
.nav-item[aria-current='page'] {
  color: var(--ink-100);
  text-decoration: none;
}

/* Przelacznik trybu ma sens tylko tam, gdzie jest miejsce na oba slowa. */
.nav-mode {
  display: none;
}
@media (min-width: 560px) {
  .nav-mode {
    display: inline-flex;
  }
}

.nav-end {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.nav-email {
  max-width: 20ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Menu mobilne dziala bez JS: <details> zamiast hamburgera w skrypcie. */
.nav-menu {
  position: relative;
  margin-left: auto;
}
.nav-menu > summary {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  list-style: none;
  cursor: pointer;
  color: var(--ink-300);
}
.nav-menu > summary::-webkit-details-marker {
  display: none;
}
.nav-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  width: min(280px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-800);
}
.nav-panel .nav-item {
  min-height: 42px;
  padding-inline: 10px;
  font-size: 15px;
}
.nav-panel .btn-row {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.nav-panel .btn-row > * {
  flex: 1;
}

@media (min-width: 900px) {
  .nav-links,
  .nav-end {
    display: flex;
  }
  .nav-menu {
    display: none;
  }
}

/* --------------------------------- hero ---------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(48px, 8vw, 88px) clamp(40px, 6vw, 72px);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-bg .grid {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0.3;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 10%, transparent 70%);
}
.hero-bg .glow {
  position: absolute;
  inset-inline: 0;
  top: -80px;
  height: 320px;
  background: radial-gradient(ellipse 55% 70% at 50% 0%, rgba(121, 238, 95, 0.14), transparent 70%);
}
.hero-inner {
  position: relative;
  max-width: 44rem;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.hero-note {
  margin: 16px 0 0;
  max-width: 46ch;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-300);
}
.hero .btn-row {
  margin-top: 26px;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--ink-400);
}

.type-line {
  color: var(--ink-100);
}
.caret {
  display: inline-block;
  width: 2px;
  height: 0.82em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--brand);
  animation: caret 1.05s steps(2) infinite;
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}

.closing {
  padding: clamp(32px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-800);
  text-align: center;
}
.closing h2 {
  margin: 0;
}
.closing p {
  margin: 10px auto 0;
  max-width: 46ch;
  color: var(--ink-400);
}
.closing .btn-row {
  margin-top: 22px;
  justify-content: center;
}

/* --------------------------------- stopka -------------------------------- */

.foot {
  border-top: 1px solid var(--line);
  background: var(--bg-800);
  padding-block: 40px 28px;
}
.foot-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.foot-blurb {
  margin: 12px 0 0;
  max-width: 32ch;
  font-size: 13px;
  color: var(--ink-400);
}
.foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot ul a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  font-size: 14px;
  color: var(--ink-400);
}
.foot ul a:hover {
  color: var(--ink-100);
  text-decoration: none;
}
.foot-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-400);
}
.foot-note a {
  color: var(--ink-400);
}
.foot-note a:hover {
  color: var(--ink-100);
}

/* ------------------------------ ekrany decyzji --------------------------- */

.auth {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 16px var(--gutter) 40px;
  overflow: hidden;
}
.auth-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.auth-bg .grid {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 10%, transparent 70%);
}
.auth-bg .glow {
  position: absolute;
  inset-inline: 0;
  top: -100px;
  height: 300px;
  background: radial-gradient(ellipse 50% 70% at 50% 0%, rgba(121, 238, 95, 0.12), transparent 70%);
}
.auth-top {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
}
.auth-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  font-size: 14px;
  color: var(--ink-400);
}
.auth-home:hover {
  color: var(--ink-100);
  text-decoration: none;
}
.auth-inner {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding-block: 24px;
}
/* Szerzej, zeby dwie karty wyboru konta stanely obok siebie na monitorze.
   Przy 560 px miescila sie jedna kolumna i wybor czytalo sie jako liste. */
.auth--wide .auth-inner {
  max-width: 760px;
}
.auth-inner > h1 {
  text-align: center;
}
.auth-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.auth-card {
  padding: clamp(20px, 4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-700);
}
.auth-card h1 {
  margin: 0;
  font-size: 1.5rem;
}
.auth-sub {
  margin: 8px auto 22px;
  max-width: 40ch;
  text-align: center;
  font-size: 14px;
  color: var(--ink-400);
}
.auth-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-400);
}
.auth-home {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
}

.consent-app {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.consent-logo {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--r-md);
  object-fit: cover;
}
/* Zastepnik, gdy firma nie wgrala logo: pierwsza litera nazwy. */
.consent-logo--litera {
  display: grid;
  place-items: center;
  background: var(--bg-600);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-300);
}
.consent-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.consent-actions .btn-primary {
  margin-left: auto;
}

.scope-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}
.scope-pick {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.scope-pick:last-child {
  border-bottom: 0;
}
.scope-pick input {
  margin-top: 4px;
  flex: none;
}
.scope-pick .grow {
  min-width: 0;
  flex: 1;
}

/* -------------------------------- panel ---------------------------------- */

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.panel-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--bg-800);
}
.panel-menu {
  position: relative;
  margin-left: auto;
}
.panel-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-300);
}
.panel-menu > summary::-webkit-details-marker {
  display: none;
}
.panel-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: min(260px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-800);
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.panel-side {
  display: none;
}
.panel-main {
  min-width: 0;
  padding: clamp(20px, 3vw, 32px) var(--gutter) 56px;
}

@media (min-width: 900px) {
  .panel {
    grid-template-columns: 224px minmax(0, 1fr);
  }
  .panel-topbar {
    display: none;
  }
  .panel-side {
    display: block;
    position: sticky;
    top: 60px;
    align-self: start;
    height: calc(100vh - 60px);
    padding: 24px 12px;
    border-right: 1px solid var(--line);
    background: var(--bg-800);
  }
  .panel-side .eyebrow {
    padding-inline: 10px;
  }
}

/* ------------------------------- weryfikacja ----------------------------- */

.cam {
  position: relative;
  max-width: 560px;
  margin-inline: auto;
}
.cam-frame {
  position: relative;
  aspect-ratio: 1.586;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #000;
}
.cam-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cam-canvas {
  display: none;
}
.cam-hint {
  margin: 12px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-300);
}
.cam-bars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.cam-shoot {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.qr-box {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  padding: 10px;
  border-radius: var(--r-lg);
  background: #fff;
}

/* ------------------------------ dokumentacja ----------------------------- */

.docs {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr);
}
.docs-nav {
  min-width: 0;
}
.docs-body {
  min-width: 0;
}
.docs-body h2 {
  scroll-margin-top: 84px;
}
@media (min-width: 1000px) {
  .docs {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
  }
  .docs-nav {
    position: sticky;
    top: 84px;
    align-self: start;
  }
}

/* ------------------------------ pasek sesji ------------------------------ */

.session-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-800);
  font-size: 12px;
  color: var(--ink-400);
}

/* ------------------------------- wejscia --------------------------------- */

/* Bez JS tresc jest widoczna od razu; wejscie wlacza dopiero enhance.js. */
.reveal {
  opacity: 1;
  transform: none;
}
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--t-enter) var(--ease),
    transform var(--t-enter) var(--ease);
}
html.js .reveal-in {
  opacity: 1;
  transform: none;
}

/* ------------------------------ cennik ----------------------------------- */

.price-card {
  display: flex;
  flex-direction: column;
}
.price-card h2 {
  margin: 2px 0 0;
  font-size: 1.125rem;
}
.price-card .price {
  margin: 12px 0 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-100);
}
.price-card .price span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-400);
}
.price-card .btn-row {
  margin-top: auto;
  padding-top: 20px;
}

.danger-zone {
  border-color: color-mix(in srgb, var(--rose) 30%, var(--line));
}
.danger-zone h2 {
  color: var(--rose);
}

/* ------------------------------- Turnstile ------------------------------- */

.cf-turnstile {
  margin: 16px 0;
  min-height: 65px;
}

/* --------------------------------- dotyk --------------------------------- */

/* Kazdy samodzielny cel ma 40px wysokosci. Linki w akapitach zostaja inline,
   bo tam celem jest zdanie, nie przycisk. */
@media (pointer: coarse) {
  .brand,
  .btn-link,
  .nav-item,
  .segmented a,
  .segmented button,
  .tabs a,
  .tabs button,
  .foot ul a,
  .foot-note a,
  .line-nav a,
  .dots a,
  td a,
  td button {
    min-height: 40px;
  }
  .foot-note a,
  .line-nav a,
  td a,
  td button {
    display: inline-flex;
    align-items: center;
  }
}

/* --------------------------- ograniczenie ruchu -------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.js .reveal {
    opacity: 1;
    transform: none;
  }
  .caret {
    animation: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --ink-400: #c0c0cc;
    --line: #4a4a5a;
  }
}

/* ---------------------- przycisk do osadzenia u firmy --------------------- */

/* Podglad wariantow na /przycisk. Firmy kopiuja wlasny styl, wiec te klasy
   sluza tylko do pokazania, jak to wyglada. */
.elg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--bg-700);
  color: var(--ink-100);
  font-size: 15px;
  font-weight: 500;
}
.elg-btn:hover {
  border-color: var(--brand);
  text-decoration: none;
}
.elg-btn--light {
  border-color: #d5d5dd;
  background: #ffffff;
  color: #16161e;
}
.elg-btn--brand {
  border-color: transparent;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
}

/* ---------------------------- przelacznik jezyka ------------------------- */

.lang-menu {
  position: relative;
  flex: none;
}
.lang-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-400);
}
.lang-menu > summary::-webkit-details-marker {
  display: none;
}
.lang-menu > summary:hover {
  color: var(--ink-100);
}
.lang-code {
  font-weight: 500;
  letter-spacing: 0.04em;
}
.flag {
  font-size: 15px;
  line-height: 1;
}
.lang-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  width: 200px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-800);
}
.lang-panel .nav-item {
  gap: 10px;
  min-height: 40px;
  padding-inline: 10px;
}
.lang-panel [aria-current='true'] {
  color: var(--ink-100);
  background: var(--bg-700);
}

/* -------------------------------- ikony ---------------------------------- */

/* Ikona idzie w linii z tekstem i bierze jego kolor. Zadnych emoji: te maja
   wlasny kolor, inna wysokosc w kazdym systemie i psuja rytm typografii. */
.ico {
  flex: none;
  display: block;
}
.flag {
  flex: none;
  display: block;
  border-radius: 2px;
}
.icon-tile .ico {
  width: 18px;
  height: 18px;
}
.icon-tile--lg .ico {
  width: 24px;
  height: 24px;
}
.dots li .ico,
.list-rows .ico {
  color: var(--ink-400);
}

/* ------------------------------ kroki przeplywu -------------------------- */

/* Numerowana lista zamiast rysunku ze znakow. Diagram ASCII rozjezdza sie
   na kazdej szerokosci i czytnik ekranu czyta z niego same kreski. */
.flow {
  counter-reset: krok;
  margin: 0;
  padding: 0;
  list-style: none;
}
.flow li {
  position: relative;
  counter-increment: krok;
  padding: 0 0 18px 40px;
  border-left: 1px solid var(--line);
  margin-left: 12px;
}
.flow li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.flow li::before {
  content: counter(krok);
  position: absolute;
  left: -13px;
  top: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-800);
  font-size: 12px;
  color: var(--ink-400);
}
.flow .who {
  margin: 2px 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.flow p:not(.who) {
  margin: 0;
  color: var(--ink-300);
}

/* --------------------------- dostepnosc i awarie ------------------------- */

/* Pasek 90 dni. Jedna kratka to doba, wiec przy 375 px musi umiec sie zwezic
   do wlosa - dlatego 1fr na kolumne, a nie sztywna szerokosc. */
.uptime-bar {
  display: grid;
  grid-template-columns: repeat(90, 1fr);
  gap: 2px;
  align-items: end;
  height: 44px;
  margin-top: 12px;
}
.uptime-day {
  height: 100%;
  border-radius: 2px;
  background: var(--brand);
}
.uptime-day.is-slabo {
  background: #d7c04a;
}
.uptime-day.is-zle {
  background: #d96a5a;
}
/* Doba bez pomiarow. Pusta kratka mowi "nie wiem", a nie "bylo dobrze". */
.uptime-day.is-brak {
  background: var(--bg-600);
}
.uptime-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-400);
}

.awarie {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.awarie li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.awarie li:first-child {
  border-top: 0;
  padding-top: 0;
}
.awaria-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.awarie .desc {
  margin: 2px 0 0;
}

/* Na telefonie 90 kratek zjada wiecej odstepu niz slupka - odstep na wlos. */
@media (max-width: 640px) {
  .uptime-bar {
    gap: 1px;
    height: 36px;
  }
}

/* --------------------------- inne metody logowania ----------------------- */

/* Wybór metody schodzi pod pole na kod: w typowym logowaniu metoda jest jedna
   i pytanie o nia bylo tylko krokiem do wyklikania. Details dziala bez JS. */
.inne-metody {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.inne-metody > summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-400);
  list-style: none;
}
.inne-metody > summary::-webkit-details-marker {
  display: none;
}
.inne-metody > summary::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--t-hover) var(--ease);
}
.inne-metody[open] > summary::after {
  transform: translateY(1px) rotate(-135deg);
}
.inne-metody > summary:hover {
  color: var(--ink-100);
}

/* ---------------------------- wybor rodzaju konta ------------------------ */

/* Dwie karty obok siebie od 700 px. Nizej jedna pod druga - przy dwoch
   opcjach kolumna czyta sie lepiej niz scisniete kafle. */
.wybor-konta {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.choice--karta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  height: 100%;
}
.choice--karta strong {
  font-size: 17px;
  color: var(--ink-100);
}
.choice--karta .hint {
  margin: 0;
}
.choice-lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-300);
}
.choice-lista > span {
  position: relative;
  padding-left: 18px;
}
/* Ptaszek rysowany ramka, zeby nie ciagnac ikony do kazdej pozycji listy. */
.choice-lista > span::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 5px;
  width: 4px;
  height: 8px;
  border-right: 1.5px solid var(--brand);
  border-bottom: 1.5px solid var(--brand);
  transform: rotate(45deg);
}
.choice-akcja {
  margin-top: auto;
  padding-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
}
.choice--karta:hover .choice-akcja {
  text-decoration: underline;
}

/* --------------------------- karta aplikacji w koncie -------------------- */

.karta-apki {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.karta-apki h2 {
  margin: 0;
}
.karta-apki .desc {
  margin-top: 2px;
}

/* ------------------------------- stan z ikona ---------------------------- */

/* Ikona plus nazwa stanu i zdanie wyjasnienia. Uzywane tam, gdzie strona ma
   najpierw odpowiedziec "jak jest", a dopiero potem dac formularz. */
.stan-linia {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.stan-linia h2 {
  margin: 0 0 2px;
}
.stan-linia .desc {
  margin: 0;
}

/* --------------------------- wiersz stanu konta -------------------------- */

/* Nazwa, wartosc i znacznik stanu w jednej linii. Na waskim ekranie wartosc
   schodzi pod nazwe, zamiast wypychac chip poza krawedz. */
.stan-wiersz {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.stan-wiersz:first-child {
  padding-top: 0;
}
.stan-wiersz:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.stan-wiersz > span:first-child {
  min-width: 190px;
  flex: 1;
  color: var(--ink-300);
}
.stan-wiersz .desc {
  margin: 0;
}
.stan-wiersz .chip {
  margin-left: auto;
}
@media (max-width: 520px) {
  .stan-wiersz > span:first-child {
    min-width: 100%;
  }
  .stan-wiersz .chip {
    margin-left: 0;
  }
}

/* ------------------------------- zywotnosc ------------------------------- */

/* Kadr pod twarz jest pionowy, a w srodku owal. Prostokat kusi, zeby wlozyc
   w niego zdjecie albo ekran; owal od razu mowi, czego oczekujemy. */
.cam--twarz {
  max-width: 340px;
}
.cam--twarz .cam-frame {
  aspect-ratio: 3 / 4;
}
.cam-owal {
  position: absolute;
  inset: 8% 14%;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: 50% / 40%;
  pointer-events: none;
}
.polecenie {
  margin: 16px 0 0;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  color: var(--ink-100);
}
.kroki-zywotnosci {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.kroki-zywotnosci li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: 13px;
  color: var(--ink-400);
  transition:
    border-color var(--t-hover) var(--ease),
    color var(--t-hover) var(--ease);
}
.kroki-zywotnosci li.teraz {
  border-color: var(--brand);
  color: var(--ink-100);
}
.kroki-zywotnosci li.zrobione {
  color: var(--brand);
}

/* ---------------------------- pasek aktualnosci -------------------------- */

/* Jedna linia nad nawigacja. Na telefonie tekst schodzi pod znacznik, zeby
   nie skracac go wielokropkiem - informacja o awarii ma byc cala. */
.pasek {
  border-bottom: 1px solid var(--line);
  background: var(--bg-700);
  font-size: 13px;
}
.pasek--awaria {
  background: color-mix(in srgb, var(--amber) 12%, var(--bg-700));
  border-bottom-color: color-mix(in srgb, var(--amber) 35%, var(--line));
}
.pasek-tresc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-height: 38px;
  padding-block: 6px;
}
.pasek-znacznik {
  flex: none;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--bg-600);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-300);
}
.pasek--awaria .pasek-znacznik {
  background: var(--amber-wash);
  color: var(--amber);
}
.pasek-tekst {
  flex: 1;
  min-width: 0;
  color: var(--ink-300);
}
.pasek-tekst:hover {
  color: var(--ink-100);
  text-decoration: none;
}
.pasek-wiecej {
  margin-left: 8px;
  color: var(--brand);
  white-space: nowrap;
}

/* Telefon: pasek ma zajmowac jedna linie. Pelna tresc jest pod linkiem, wiec
   skrocenie niczego nie ukrywa - a trzylinijkowy pasek spychal strone w dol. */
@media (max-width: 640px) {
  .pasek-tresc {
    flex-wrap: nowrap;
  }
  .pasek-tekst {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .pasek-wiecej {
    display: none;
  }
}
.pasek-zamknij {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--ink-400);
  cursor: pointer;
}
.pasek-zamknij:hover {
  background: var(--bg-600);
  color: var(--ink-100);
}
/* Bez JS nie ma czym zamknac, wiec przycisk sie nie pokazuje. */
html:not(.js) .pasek-zamknij {
  display: none;
}

/* ------------------------------ ruch w interfejsie ----------------------- */

/* Kaskada: elementy grupy wchodza po kolei, nie wszystkie naraz. Opoznienie
   ustawia skrypt, wiec bez JS nie ma ani chowania, ani czekania. */
html.js .reveal--kaskada {
  transition-delay: var(--opoznienie, 0ms);
}

/* Pola formularza: podswietlenie ramki plus delikatna obwodka. Bez skoku
   ukladu - obwodka rysuje sie cieniem wewnetrznym, nie zmiana grubosci. */
input[type='text'],
input[type='email'],
input[type='password'],
input[type='tel'],
input[type='url'],
input[type='number'],
input[type='date'],
textarea,
select {
  transition:
    border-color var(--t-hover) var(--ease),
    background-color var(--t-hover) var(--ease);
}

/* Zakladki: podkreslenie wjezdza z lewej zamiast pojawiac sie skokiem. */
.tabs a::after,
.tabs button::after {
  transform-origin: left center;
  transition: transform var(--t-hover) var(--ease);
}
.tabs a:not([aria-current='page'])::after,
.tabs button:not([aria-selected='true'])::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
}
.tabs a:hover::after,
.tabs button:hover::after {
  transform: scaleX(1);
}

/* --------------------------------- ikony w ruchu ------------------------- */

/* Kolko ladowania rysowane obrysem, bez GIF-a i bez biblioteki. */
.ico-praca {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: obrot 700ms linear infinite;
}
@keyframes obrot {
  to {
    transform: rotate(360deg);
  }
}

/* Ptaszek po sukcesie: kreska dorysowuje sie, zamiast wskoczyc gotowa. */
.ico-sukces path,
.ico-blad path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: rysuj 420ms var(--ease) forwards;
}
.ico-blad path:nth-child(2) {
  animation-delay: 120ms;
}
@keyframes rysuj {
  to {
    stroke-dashoffset: 0;
  }
}

/* Czekanie: puls, ktory nie miga - migotanie meczy i zwraca uwage na siebie
   zamiast na tresc. */
.ico-czeka {
  animation: puls 1.8s ease-in-out infinite;
}
@keyframes puls {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

/* Ponowienie: obrot raz, przy nacisnieciu. */
.btn:active .ico-ponow {
  animation: obrot 500ms var(--ease);
}

/* Wylaczone przy prefers-reduced-motion - regula globalna nizej scina
   wszystkie animacje do zera, wiec te ikony po prostu stoja w miejscu. */

@media (prefers-reduced-motion: reduce) {
  /* Kolko ladowania przestaje sie krecic - zostaje statyczny pierscien,
     ktory dalej mowi "trwa", tylko bez ruchu. */
  .ico-praca {
    border-right-color: currentColor;
    opacity: 0.5;
    animation: none !important;
  }
  .ico-czeka {
    opacity: 1;
    animation: none !important;
  }
  .ico-sukces path,
  .ico-blad path {
    stroke-dashoffset: 0;
    animation: none !important;
  }
  html.js .reveal--kaskada {
    transition-delay: 0ms !important;
  }
}

/* ------------------------------- dokumenty ------------------------------- */

/* W stopce jeden przycisk zamiast listy - reszta jest na /dokumenty. */
.foot-dokumenty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  color: var(--ink-300);
  transition:
    border-color var(--t-hover) var(--ease),
    color var(--t-hover) var(--ease);
}
.foot-dokumenty:hover {
  border-color: var(--ink-500);
  color: var(--ink-100);
  text-decoration: none;
}

.dokumenty {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-700);
}
.dokument {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.dokument:last-child {
  border-bottom: 0;
}
.dokument h3 {
  margin: 0;
}
.dokument .desc {
  margin: 2px 0 0;
}
.dokument .grow {
  flex: 1;
  min-width: 0;
}
@media (max-width: 520px) {
  /* Na waskim ekranie ikona wraca do gory, zeby stala przy tytule, a nie
     posrodku zawinietego opisu. Przycisk PDF schodzi pod spod, pelnej
     szerokosci - latwiej w niego trafic palcem. */
  .dokument {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .dokument .grow {
    min-width: calc(100% - 48px);
  }
  .dokument .btn {
    width: 100%;
    margin-left: 48px;
    width: calc(100% - 48px);
  }
}

/* ------------------------------ grafiki strony --------------------------- */

/* Grafiki sa dodatkiem do tresci, nie warunkiem jej czytelnosci: bez plikow
   szablon ich nie rysuje, klasa `--z-grafika` nie wchodzi i uklad wraca do
   jednej kolumny dokladnie takiej, jaka byla wczesniej. */

.hero-uklad {
  position: relative;
}

.hero-grafika {
  display: block;
}

.hero-grafika img {
  display: block;
  width: 100%;
  height: auto;
  /* `contain` pilnuje, ze zaden modul ani laczenie nie zostanie przyciete. */
  object-fit: contain;
}

@media (max-width: 899px) {
  /* Na telefonie grafika idzie POD przyciski, wysrodkowana i w calosci
     widoczna. Zadnego pozycjonowania bezwzglednego: przy dluzszym tlumaczeniu
     naglowka nachodziloby na wezwanie do dzialania. */
  .hero-grafika {
    margin: clamp(24px, 6vw, 40px) auto 0;
    max-width: min(90vw, 520px);
  }
  .hero-grafika img {
    object-position: center;
  }
}

@media (min-width: 900px) {
  .hero-uklad--z-grafika {
    display: grid;
    grid-template-columns: minmax(0, 53fr) minmax(0, 47fr);
    align-items: center;
    gap: clamp(24px, 3vw, 48px);
  }
  .hero-uklad--z-grafika .hero-inner {
    max-width: none;
  }
  .hero-grafika img {
    /* Limit z proporcji 1672:941, zeby przy bardzo szerokim ekranie pudelko
       dalej przylegalo do obrazu zamiast zostawiac pasy po bokach. */
    max-width: 53rem;
    /* Dostarczona grafika ma wolne pole po lewej - trzymamy ja przy prawej
       krawedzi, zeby nie odjezdzala od tekstu. */
    object-position: right center;
  }
}

/* Sekcja zgody: ilustracja jest cichsza od tej w hero i stoi nad przykladem
   odpowiedzi, ktory zostaje najwazniejszy w tej kolumnie. */
.grafika-zgody img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}
/* Wysokosc ograniczamy przez SZEROKOSC, nie przez max-height.
   Przy max-height ramka zostawala szeroka na cala kolumne, a obraz ma 3:2,
   wiec dopasowanie wpisywalo go w srodek i po bokach zostawaly puste pasy.
   Limit szerokosci policzony z proporcji 1536:1024 daje pudelko dokladnie
   takie jak obraz: 18rem wysokosci to 27rem szerokosci. */
.grafika-zgody {
  display: block;
  margin-bottom: clamp(16px, 2.5vw, 24px);
  max-width: 27rem;
  margin-inline: auto;
}

/* Panel koncowego wezwania na tle siatki. Adres pliku wchodzi zmienna ze stylu
   wpisanego w szablonie, wiec bez pliku ta regula nie ma czego rysowac.

   Warstwa nad obrazem jest kompromisem miedzy widocznoscia grafiki a
   czytelnoscia tekstu. Liczone od najjasniejszego punktu dostarczonej siatki,
   czyli zielonej linii (101,141,69): przy 0.5 akapit ma 5.2:1, a naglowek
   8.3:1. Mocniejsze przyciemnienie gasilo grafike prawie do koloru tla,
   slabsze scinalo akapit ponizej wymaganych 4.5:1. */
.closing--siatka {
  position: relative;
  background-color: var(--bg-800);
  background-image:
    linear-gradient(rgba(10, 11, 16, 0.5), rgba(10, 11, 16, 0.5)),
    var(--tlo-siatki);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-color: rgba(255, 255, 255, 0.12);
}
/* Akapit dostaje jasniejszy odcien tylko na tej karcie.
   Liczone od najgorszego przypadku, czyli bialego miejsca w siatce: przy
   dotychczasowym --ink-400 kontrast spadal do 3.2:1, ponizej wymaganych 4.5.
   Zamiast przyciemniac obraz tak, ze przestaje byc widoczny, podnosimy tekst. */
.closing--siatka p {
  color: var(--ink-300);
}
