/* =========================================================
   Zafi sp. z o.o. — arkusz stylów
   Paleta: szaroniebieska na bieli, zgodna z logotypem.
   Fonty hostowane lokalnie (brak zapytań do zewnętrznych CDN).
   ========================================================= */

/* --- Fonty IBM Plex, hostowane lokalnie -------------------- */
/* Podzbiór znaków: łacina + polskie znaki diakrytyczne.       */
/* Licencja SIL OFL 1.1 — patrz assets/fonts/LICENSE-IBM-Plex.txt */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* --- Tokeny ---------------------------------------------- */
:root {
  --paper:       #ffffff;
  --wash:        #f3f7fb;
  --wash-deep:   #e6eef6;
  --rule:        #d7e2ec;
  --ink:         #14232f;
  --steel:       #5b6e80;
  --deep:        #1e3d58;
  --signal:      #2e6fa7;
  --signal-dark: #1b4e7c;
  --signal-soft: #e2edf7;

  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;

  --shell-pad: clamp(20px, 5vw, 48px);
  --block:     clamp(56px, 8vw, 104px);
  --radius:    4px;
}

/* --- Reset ----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--signal-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--signal); }
h1, h2, h3, h4 { color: var(--deep); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
p { margin: 0; }
ul { margin: 0; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.shell { width: min(1180px, 100%); margin-inline: auto; padding-inline: var(--shell-pad); }

.skiplink {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--deep); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: .82rem; text-decoration: none;
  transition: top .18s ease;
}
.skiplink:focus { top: 12px; color: #fff; }

/* --- Typografia użytkowa ---------------------------------- */
.eyebrow {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--signal);
  margin: 0 0 18px;
}
.eyebrow--muted { color: var(--steel); }

.h1 { font-size: clamp(2.05rem, 1.15rem + 3.4vw, 3.5rem); letter-spacing: -0.028em; }
.h2 { font-size: clamp(1.55rem, 1.05rem + 1.8vw, 2.35rem); letter-spacing: -0.022em; }
.h3 { font-size: 1.1rem; letter-spacing: -0.01em; }

.lede { font-size: clamp(1.02rem, .96rem + .3vw, 1.18rem); color: var(--steel); max-width: 62ch; }
.muted { color: var(--steel); }

/* --- Nagłówek --------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.topbar.is-stuck { border-bottom-color: var(--rule); box-shadow: 0 6px 20px -18px rgba(20,35,47,.7); }
.topbar__inner { display: flex; align-items: center; gap: 16px; min-height: 72px; }

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand__mark { width: 152px; height: auto; }
.brand__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
.nav__link {
  display: inline-block; padding: 9px 14px; border-radius: var(--radius);
  font-size: .93rem; color: var(--ink); text-decoration: none;
}
.nav__link:hover { background: var(--wash); color: var(--deep); }
.nav__link.is-current { color: var(--signal-dark); box-shadow: inset 0 -2px 0 var(--signal); border-radius: 0; }
.nav__cta {
  display: inline-block; margin-left: 8px; padding: 9px 18px; border-radius: var(--radius);
  background: var(--deep); color: #fff; font-size: .93rem; text-decoration: none;
  transition: background .18s ease;
}
.nav__cta:hover { background: var(--signal-dark); color: #fff; }

.navtoggle {
  display: none; margin-left: auto; align-items: center; gap: 10px;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 8px 14px; cursor: pointer; color: var(--deep);
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
}
.navtoggle__bars { position: relative; width: 16px; height: 2px; background: var(--deep); display: block; }
.navtoggle__bars::before, .navtoggle__bars::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: var(--deep);
}
.navtoggle__bars::before { top: -5px; }
.navtoggle__bars::after { top: 5px; }

/* --- Sekcje ---------------------------------------------- */
.section { padding-block: var(--block); }
.section--wash { background: var(--wash); border-block: 1px solid var(--rule); }
.section--deep { background: var(--deep); color: #cfe0ee; }
.section--deep h2, .section--deep h3 { color: #fff; }
.section__head { max-width: 66ch; margin-bottom: clamp(32px, 4vw, 52px); }
.section__head p { margin-top: 14px; }

/* --- Hero ------------------------------------------------- */
.hero { padding-block: clamp(40px, 6vw, 84px) clamp(48px, 6vw, 88px); }
.hero__grid {
  display: grid; gap: clamp(36px, 5vw, 64px);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
.hero__title { margin-bottom: 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn--solid { background: var(--signal-dark); color: #fff; }
.btn--solid:hover { background: var(--deep); color: #fff; }
.btn--ghost { border-color: var(--rule); color: var(--deep); background: var(--paper); }
.btn--ghost:hover { border-color: var(--signal); color: var(--signal-dark); background: var(--wash); }

/* --- Pasek dowodów ---------------------------------------- */
.proof { border-block: 1px solid var(--rule); background: var(--wash); }
.proof__grid {
  display: grid; gap: 1px; background: var(--rule);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.proof__item { background: var(--wash); padding: 26px 4px 28px; }
.proof__value {
  font-family: var(--font-mono); font-size: 1.05rem; font-weight: 500;
  color: var(--deep); display: block; margin-bottom: 6px;
}
.proof__label { font-size: .88rem; color: var(--steel); display: block; max-width: 30ch; }

/* --- Diagram (element sygnaturowy) ------------------------ */
.fabric { margin: 0; }
.fabric__svg { width: 100%; height: auto; display: block; }
.fabric__spine, .fabric__rail { stroke: var(--rule); stroke-width: 1.5; }
.fabric__rail { stroke-dasharray: 3 4; }
.fabric__stub, .fabric__tick { stroke: var(--rule); stroke-width: 1.5; }
.fabric__chip { fill: var(--paper); stroke: var(--rule); stroke-width: 1.5; }
.fabric__chip--watch { fill: var(--wash); }
.fabric__band--core .fabric__chip { stroke: var(--signal); fill: var(--signal-soft); }
.fabric__name { font-family: var(--font-body); font-size: 13px; font-weight: 600; fill: var(--deep); }
.fabric__meta { font-family: var(--font-mono); font-size: 10px; fill: var(--steel); }
.fabric__step, .fabric__railhead {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; fill: var(--steel);
}
.fabric__railhead { text-anchor: middle; }
.fabric__pulse { fill: var(--signal); transform-box: view-box; animation: fabric-flow 5.5s ease-in-out infinite; }
.fabric__caption {
  font-family: var(--font-mono); font-size: .78rem; line-height: 1.6; color: var(--steel);
  margin-top: 18px; padding-left: 14px; border-left: 2px solid var(--signal); max-width: 48ch;
}
@keyframes fabric-flow {
  0%   { transform: translateY(0);     opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateY(370px); opacity: 0; }
}

/* --- Karty ------------------------------------------------ */
.cards { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--paper); padding: clamp(24px, 3vw, 34px); }
.card__tag {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--signal); display: block; margin-bottom: 14px;
}
.card__title { margin-bottom: 10px; }
.card__text { color: var(--steel); font-size: .95rem; }
.card__list { list-style: none; padding: 0; margin: 16px 0 0; font-size: .9rem; color: var(--steel); }
.card__list li { padding-left: 18px; position: relative; margin-top: 7px; }
.card__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; background: var(--signal); border-radius: 1px;
}

/* --- Tabela mapowania NIS2 -------------------------------- */
.mapwrap { overflow-x: auto; border: 1px solid var(--rule); background: var(--paper); }
.map { width: 100%; border-collapse: collapse; min-width: 720px; }
.map caption { text-align: left; padding: 18px 20px; color: var(--steel); font-size: .9rem; border-bottom: 1px solid var(--rule); }
.map th, .map td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.map thead th {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel);
  background: var(--wash); border-bottom: 1px solid var(--rule);
}
.map tbody th { font-size: .95rem; font-weight: 600; color: var(--deep); width: 30%; }
.map td { font-size: .92rem; color: var(--steel); }
.map tbody tr:last-child th, .map tbody tr:last-child td { border-bottom: none; }
.map .stack { font-family: var(--font-mono); font-size: .8rem; color: var(--signal-dark); }

/* --- Etapy (realna sekwencja, więc numerowane) ------------- */
.steps { display: grid; gap: 1px; background: rgba(255,255,255,.16); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { background: var(--deep); padding: 28px 26px 32px; }
.step__no { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .16em; color: #7fb2dc; display: block; margin-bottom: 14px; }
.step__title { font-size: 1.05rem; color: #fff; margin-bottom: 8px; }
.step__text { font-size: .9rem; color: #b9d0e2; }

/* --- Bloki oferty ----------------------------------------- */
.spec { display: grid; gap: clamp(24px, 4vw, 56px); }
.spec + .spec { margin-top: var(--block); padding-top: var(--block); border-top: 1px solid var(--rule); }
.spec__intro p { margin-top: 14px; color: var(--steel); }
.spec__lists { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.spec__group h3 {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel);
  padding-bottom: 10px; border-bottom: 1px solid var(--rule); margin-bottom: 4px;
}
.spec__group ul { list-style: none; padding: 0; font-size: .92rem; color: var(--steel); }
.spec__group li { padding: 7px 0 7px 18px; position: relative; }
.spec__group li::before {
  content: ""; position: absolute; left: 0; top: 1.05em;
  width: 6px; height: 1.5px; background: var(--signal);
}

/* --- Realizacje ------------------------------------------- */
.cases { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.case { border-bottom: 1px solid var(--rule); padding: clamp(24px, 3vw, 34px) 0; display: grid; gap: 8px 40px; }
.case__when { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; color: var(--signal); padding-top: 4px; }
.case__title { margin-bottom: 8px; }
.case__text { color: var(--steel); font-size: .95rem; max-width: 68ch; }
.case__stack { font-family: var(--font-mono); font-size: .78rem; color: var(--steel); margin-top: 12px; }

/* --- Pasek wezwania --------------------------------------- */
.band { background: var(--deep); color: #cfe0ee; padding-block: clamp(44px, 6vw, 72px); }
.band__grid { display: grid; gap: 24px; align-items: center; }
.band h2 { color: #fff; margin-bottom: 12px; }
.band p { color: #b9d0e2; max-width: 56ch; }
.band .btn--solid { background: #fff; color: var(--deep); }
.band .btn--solid:hover { background: var(--signal-soft); color: var(--deep); }

/* --- Formularz -------------------------------------------- */
.contact__grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field__label {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--steel);
}
.field__req { color: var(--signal); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: .95rem;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--radius);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); outline: none;
}
.field__error { font-size: .84rem; color: #a3341f; }
.field--pair { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.field--check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.field--check input { width: 18px; height: 18px; margin-top: 3px; }
.field--check span { font-size: .86rem; color: var(--steel); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 16px 18px; border-radius: var(--radius); font-size: .92rem; border: 1px solid; }
.notice--ok { background: var(--signal-soft); border-color: var(--signal); color: var(--signal-dark); }
.notice--bad { background: #fdf1ee; border-color: #d9a294; color: #8f2d17; }

.datalist { list-style: none; padding: 0; margin: 0; }
.datalist li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.datalist li:first-child { border-top: 1px solid var(--rule); }
.datalist dt, .datalist__key {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--steel); display: block; margin-bottom: 4px;
}
.datalist__val { font-size: 1rem; color: var(--deep); }
.spacer-top { margin-top: 26px; }

/* --- Treść tekstowa (polityka prywatności) ---------------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.25rem; margin-top: 38px; margin-bottom: 12px; }
.prose p, .prose li { color: var(--steel); font-size: .96rem; }
.prose p { margin-top: 12px; }
.prose ul { padding-left: 20px; margin-top: 12px; }
.prose li { margin-top: 6px; }

/* --- Stopka ----------------------------------------------- */
.foot { background: var(--wash); border-top: 1px solid var(--rule); padding-top: clamp(44px, 5vw, 68px); }
.foot__grid { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding-bottom: 40px; }
.foot__col--brand { grid-column: span 1; }
.foot__mark { width: 140px; margin-bottom: 16px; }
.foot__line { font-size: .9rem; color: var(--steel); }
.foot__head {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--steel); font-weight: 500; margin-bottom: 14px;
}
.foot__list { list-style: none; padding: 0; font-size: .92rem; }
.foot__list li { margin-top: 8px; color: var(--steel); }
.foot__list a { color: var(--deep); text-decoration: none; }
.foot__list a:hover { color: var(--signal); text-decoration: underline; }
.foot__meta {
  border-top: 1px solid var(--rule); padding-block: 20px 26px;
  display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between;
  font-family: var(--font-mono); font-size: .74rem; color: var(--steel);
}
.foot__meta p { margin: 0; }

/* --- Od tabletu w górę ------------------------------------ */
@media (min-width: 860px) {
  .hero__grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
  .case { grid-template-columns: 120px minmax(0, 1fr); }
  .band__grid { grid-template-columns: minmax(0, 1fr) auto; }
  .contact__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .proof__item { padding-inline: 28px; }
  .proof__item:first-child { padding-left: 0; }
  .spec { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; }
}

/* --- Mobile: menu w szufladzie ---------------------------- */
@media (max-width: 859px) {
  .navtoggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    display: none; padding: 10px var(--shell-pad) 20px;
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link, .nav__cta { display: block; margin-left: 0; padding: 12px 4px; }
  .nav__cta { text-align: center; margin-top: 10px; padding: 12px; }
  .nav__link.is-current { box-shadow: inset 2px 0 0 var(--signal); padding-left: 12px; }
  .topbar__inner { position: relative; }
}

/* --- Mniej ruchu ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fabric__pulse { animation: none; opacity: 0; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* --- Druk -------------------------------------------------- */
@media print {
  .topbar, .navtoggle, .band, .skiplink { display: none; }
  body { color: #000; }
  .section { padding-block: 24px; }
}

/* =========================================================
   S19IT — light / dark mode
   ========================================================= */

html {
  color-scheme: light;
}

/* Wartości dark mode są zebrane w jednym miejscu. */
html[data-theme="dark"] {
  color-scheme: dark;
  --paper:       #07101d;
  --wash:        #0c1726;
  --wash-deep:   #122238;
  --rule:        #263a52;
  --ink:         #e9f0f7;
  --steel:       #a9b8c8;
  --signal:      #4aa8ff;
  --signal-dark: #2587df;
  --signal-soft: #102d49;
}

/* Bez JS strona nadal respektuje systemowy dark mode. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --paper:       #07101d;
    --wash:        #0c1726;
    --wash-deep:   #122238;
    --rule:        #263a52;
    --ink:         #e9f0f7;
    --steel:       #a9b8c8;
    --signal:      #4aa8ff;
    --signal-dark: #2587df;
    --signal-soft: #102d49;
  }
}

body,
.topbar,
.nav,
.section,
.card,
.proof,
.proof__item,
.mapwrap,
.map thead th,
.field input,
.field select,
.field textarea,
.foot,
.btn,
.nav__link,
.theme-toggle {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

/* Elementy, które w oryginalnym CSS mają kolory wpisane na sztywno
   lub używają --deep jednocześnie jako koloru tekstu i tła. */
html[data-theme="dark"] .topbar { background: rgba(7,16,29,.92); }
html[data-theme="dark"] .topbar.is-stuck { box-shadow: 0 6px 24px -18px rgba(0,0,0,.95); }
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .proof__value,
html[data-theme="dark"] .map tbody th,
html[data-theme="dark"] .datalist__val { color: #f4f8fc; }
html[data-theme="dark"] .nav__link:hover { color: var(--ink); }
html[data-theme="dark"] .navtoggle { color: var(--ink); }
html[data-theme="dark"] .navtoggle__bars,
html[data-theme="dark"] .navtoggle__bars::before,
html[data-theme="dark"] .navtoggle__bars::after { background: var(--ink); }
html[data-theme="dark"] .btn--ghost { color: var(--ink); background: var(--paper); }
html[data-theme="dark"] .btn--ghost:hover { color: #e2efff; background: var(--wash); }
html[data-theme="dark"] .fabric__name { fill: var(--ink); }
html[data-theme="dark"] .fabric__chip--watch { fill: var(--wash); }
html[data-theme="dark"] .fabric__band--core .fabric__chip { fill: var(--signal-soft); }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea { caret-color: var(--signal); }
html[data-theme="dark"] .foot__list a { color: var(--ink); }
html[data-theme="dark"] .notice--bad { background: #2a1718; border-color: #7f4444; color: #ffb9b1; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .topbar { background: rgba(7,16,29,.92); }
  html:not([data-theme]) .topbar.is-stuck { box-shadow: 0 6px 24px -18px rgba(0,0,0,.95); }
  html:not([data-theme]) h1,
  html:not([data-theme]) h2,
  html:not([data-theme]) h3,
  html:not([data-theme]) h4,
  html:not([data-theme]) .proof__value,
  html:not([data-theme]) .map tbody th,
  html:not([data-theme]) .datalist__val { color: #f4f8fc; }
  html:not([data-theme]) .nav__link:hover { color: var(--ink); }
  html:not([data-theme]) .navtoggle { color: var(--ink); }
  html:not([data-theme]) .navtoggle__bars,
  html:not([data-theme]) .navtoggle__bars::before,
  html:not([data-theme]) .navtoggle__bars::after { background: var(--ink); }
  html:not([data-theme]) .btn--ghost { color: var(--ink); background: var(--paper); }
  html:not([data-theme]) .fabric__name { fill: var(--ink); }
  html:not([data-theme]) .fabric__chip--watch { fill: var(--wash); }
  html:not([data-theme]) .fabric__band--core .fabric__chip { fill: var(--signal-soft); }
  html:not([data-theme]) .foot__list a { color: var(--ink); }
}

/* Przełącznik jest niezależny od układu szablonu i dlatego działa
   bez modyfikacji header.php/layout.php. */
.theme-toggle {
  position: fixed;
  right: clamp(14px, 2vw, 26px);
  bottom: clamp(14px, 2vw, 26px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 30px -16px rgba(20,35,47,.55);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .05em;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--signal);
  color: var(--signal-dark);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: block; }
html[data-theme="dark"] .theme-toggle__moon { display: none; }
html[data-theme="dark"] .theme-toggle__sun { display: block; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .theme-toggle__moon { display: none; }
  html:not([data-theme]) .theme-toggle__sun { display: block; }
}

html[data-theme="dark"] .theme-toggle {
  box-shadow: 0 12px 34px -18px rgba(0,0,0,.95);
}

.theme-toggle__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .theme-toggle {
    width: 46px;
    height: 46px;
    padding: 0;
  }

  .theme-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media print {
  .theme-toggle { display: none !important; }
}
