/* Ślad Cyfrowy — system wizualny v6 (2026-09-29): jeden, ciemny motyw.
   Space Grotesk (nagłówki) + IBM Plex Sans (tekst i interfejs) + JetBrains Mono (etykiety, wyciąg z logu),
   wszystkie hostowane u siebie (CSP: font-src 'self').
   Zaokrąglenia 4–16 px, karty z jaśniejszą górną krawędzią, pływający nagłówek (inspiracja: Raycast).
   Motyw marki: „ślady” — krótkie linie na siatce hero, które przebiegają i gasną.
   Bez stylów inline (CSP: style-src-attr 'none'). Źródło: src/site.css → tools/build-assets.mjs. */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("/assets/space-grotesk-latin.0640890476fc.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: "Space Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("/assets/space-grotesk-latin-ext.952dddb45d2f.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: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  src: url("/assets/plex-sans-latin.e2291e842cf5.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: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  src: url("/assets/plex-sans-latin-ext.d160e20920ae.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: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/assets/jetbrains-mono-latin.18be452724bf.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: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/assets/jetbrains-mono-latin-ext.79bfdab9ba46.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;
}
/* Zastępcze kroje dopasowane metrycznie — podmiana fontu nie przesuwa układu (CLS). */
@font-face {
  font-family: "Grotesk Fallback";
  src: local("Arial"), local("Segoe UI");
  size-adjust: 104%;
  ascent-override: 95%;
  descent-override: 28%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Mono Fallback";
  src: local("Consolas"), local("Menlo"), local("Courier New");
  size-adjust: 109%;
  ascent-override: 94%;
  descent-override: 28%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Plex Fallback";
  src: local("Segoe UI"), local("Arial");
  size-adjust: 101%;
  ascent-override: 101%;
  descent-override: 27%;
  line-gap-override: 0%;
}

/* ── Tokeny ─────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  --paper: #1b1826;        /* tło strony: grafit z fioletem (v5 × ok. 1,2 jaśniej) */
  --paper-2: #201c2d;      /* pas wyróżniony, stopka */
  --sheet: #262234;        /* karty */
  --sheet-2: #2d2940;      /* karta pod kursorem */
  --ink: #f1eef8;
  --ink-2: #c4bed4;
  --ink-3: #a39db7;
  --line: #312c42;
  --line-strong: #463f5c;
  --violet: #b39ef8;       /* purple team: akcent */
  --violet-hover: #c8b9ff;
  --violet-soft: #2f2752;
  --violet-line: #574c86;
  --on-violet: #15121e;
  --no: #eca4b3;
  --grid: rgba(179, 158, 248, .07);
  --grid-faint: rgba(179, 158, 248, .032);  /* siatka w tle całej strony: ledwo widoczna */
  --edge: rgba(255, 255, 255, .11);      /* górna krawędź karty (jak w Raycast) */
  --edge-soft: rgba(255, 255, 255, .03);
  --header-bg: rgba(32, 28, 45, .78);

  --shadow-sheet: 0 24px 48px -24px rgba(0, 0, 0, .6);
  --shadow-float: 0 18px 50px -12px rgba(0, 0, 0, .7);

  --display: "Space Grotesk", "Grotesk Fallback", "Segoe UI", system-ui, Arial, sans-serif;
  --sans: "IBM Plex Sans", "Plex Fallback", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", "Mono Fallback", ui-monospace, "Cascadia Mono", "SF Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --t-body: 1.0625rem;
  --t-small: .9375rem;
  --t-xs: .8125rem;
  --t-h3: 1.125rem;
  --t-h2: clamp(2rem, 1.45rem + 2.1vw, 3.125rem);
  --t-h1: clamp(2.75rem, 1.55rem + 4.9vw, 5.5rem);

  --gut: clamp(1.25rem, 4.5vw, 3rem);
  --maxw: 74rem;
  --section: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --header-h: 4rem;
  --header-top: .75rem;
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ── Baza ───────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-top) + var(--header-h) + 1rem); }
body {
  /* Siatka 3rem od początku dokumentu — pokrywa się z mocniejszą siatką w hero. */
  background:
    linear-gradient(var(--grid-faint) 1px, transparent 1px) 0 0 / 3rem 3rem,
    linear-gradient(90deg, var(--grid-faint) 1px, transparent 1px) 0 0 / 3rem 3rem,
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; text-wrap: balance; }
h3 { font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
main p { max-width: 70ch; }
::selection { background: var(--violet); color: var(--on-violet); }
[id] { scroll-margin-top: calc(var(--header-top) + var(--header-h) + 1.5rem); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: var(--r-xs); }
main:focus, section:focus { outline: none; }

.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gut) * 2); margin-inline: auto; padding-inline: var(--gut); }

/* Nagłówki: biel przechodząca w lawendę, jak w Raycast. Bez obsługi — zwykły kolor tekstu. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1, .section h2, .contact h2, .not-found h1 {
    padding-bottom: .12em; margin-bottom: -.12em; /* ogonki „ę”, „j” mieszczą się w tle */
    background: linear-gradient(180deg, #ffffff 25%, #c2b9da);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
  }
}

/* Karta: górna krawędź jaśniejsza, gaśnie ku dołowi. */
.finding, .principles li, .protocol, .contact-list {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--sheet), var(--sheet)) padding-box,
    linear-gradient(180deg, var(--edge), var(--edge-soft) 60%) border-box;
}

.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 100;
  padding: .75rem 1.25rem; border-radius: var(--r-sm);
  background: var(--violet); color: var(--on-violet); font-weight: 600; font-size: var(--t-small);
  transform: translateY(-200%); transition: transform .2s var(--ease);
}
.skip-link:focus-visible { transform: none; }

.text-link {
  color: var(--violet);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: var(--violet-line);
  transition: text-decoration-color .2s var(--ease);
}
.text-link:hover { text-decoration-color: currentColor; }

/* ── Przyciski ──────────────────────────────────────────────────────────── */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3rem; padding: 0 1.4rem;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-family: var(--mono); font-size: .8125rem; font-weight: 600; line-height: 1.2;
  text-transform: uppercase; letter-spacing: .05em;
  cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
/* Jasny przycisk z lekką poświatą i fazą krawędzi (wzór: przycisk „Download” w Raycast). */
.button-primary {
  background: linear-gradient(180deg, #f7f4ff, #ddd6f7);
  color: var(--on-violet);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .45),
    0 0 18px rgba(179, 158, 248, .28),
    inset 0 -1px .4px rgba(0, 0, 0, .22),
    inset 0 1px .4px #ffffff;
}
.button-primary:hover {
  background: linear-gradient(180deg, #ffffff, #e7e1fb);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .45),
    0 0 26px rgba(179, 158, 248, .42),
    inset 0 -1px .4px rgba(0, 0, 0, .22),
    inset 0 1px .4px #ffffff;
}
.button-ghost { border-color: var(--line-strong); color: var(--ink); background: rgba(255, 255, 255, .04); }
.button-ghost:hover { border-color: var(--ink-3); background: rgba(255, 255, 255, .07); }
.button-sm { min-height: 2.5rem; padding: 0 1rem; font-size: .75rem; }

.quiet-link {
  display: inline-flex; align-items: center; min-height: 3rem;
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color .2s var(--ease);
}
.quiet-link:hover { text-decoration-color: var(--violet); }

/* ── Nagłówek: pływająca belka ──────────────────────────────────────────── */

.site-header { position: sticky; top: 0; z-index: 20; padding-top: var(--header-top); }
.header-inner {
  position: relative; height: var(--header-h);
  display: flex; align-items: center; gap: 2rem;
  width: calc(100% - 2 * var(--gut) + 2rem); max-width: calc(var(--maxw) + 2.5rem);
  padding-inline: 1.25rem;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  backdrop-filter: saturate(1.3) blur(16px);
  box-shadow: inset 0 1px 0 var(--edge-soft), 0 12px 32px -20px rgba(0, 0, 0, .8);
}

.brand { display: inline-flex; align-items: center; gap: .7rem; min-height: 2.75rem; font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em; }
.brand span { white-space: nowrap; }
@media (max-width: 360px) { .brand span { white-space: normal; } }
.brand-mark { width: 1.75rem; height: 1.75rem; flex: none; }
.brand-mark .m-frame { stroke: var(--line-strong); }
.brand-mark .m-lines { stroke: var(--violet); }
.brand-mark .m-core { fill: var(--paper); stroke: var(--ink); }

.nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; font-size: .9375rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 2.5rem; padding-inline: .8rem;
  color: var(--ink-2); border-radius: var(--r-sm);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.nav a[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, .06); }

.menu-button {
  display: none; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 .9rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-size: .9375rem; font-weight: 600; cursor: pointer; background: rgba(255, 255, 255, .04);
}
.menu-button svg { width: 1.125rem; height: 1.125rem; }
.menu-button .i-close { display: none; }
.menu-button[aria-expanded="true"] .i-open { display: none; }
.menu-button[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 900px) {
  .menu-button { display: inline-flex; margin-left: auto; }
  .header-inner { gap: .6rem; padding-inline: .75rem; width: calc(100% - 1.5rem); }
  .nav {
    position: absolute; top: calc(100% + .5rem); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: .125rem;
    margin: 0; padding: .5rem;
    background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--shadow-float);
    font-size: 1.0625rem;
  }
  .nav.nav-open { display: flex; }
  .nav a { min-height: 3rem; padding-inline: .9rem; }
}
@media (max-width: 380px) {
  .brand span { font-size: 1rem; }
  .header-cta { padding-inline: .8rem; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: hidden;
  margin-top: calc(-1 * (var(--header-top) + var(--header-h)));
  padding-block: calc(var(--header-top) + var(--header-h) + clamp(3rem, 1.5rem + 6vw, 7rem)) clamp(3.5rem, 2rem + 5vw, 6.5rem);
  background: radial-gradient(ellipse 55% 60% at 80% 25%, rgba(140, 108, 240, .16), transparent 70%), var(--paper);
}
/* Siatka, która gaśnie ku brzegom. */
.hero::before, .traces {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 55% 40%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 55% 40%, #000 25%, transparent 78%);
}
.hero::before {
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 3rem 3rem,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 3rem 3rem;
}
.hero > .wrap { position: relative; }

/* Ślady: krótkie linie biegną po siatce i znikają (motyw marki „Ślad Cyfrowy”). */
.traces i { position: absolute; display: block; opacity: 0; }
.traces i:nth-child(odd) { height: 1px; width: 7rem; background: linear-gradient(90deg, transparent, var(--violet)); }
.traces i:nth-child(even) { width: 1px; height: 7rem; background: linear-gradient(180deg, transparent, var(--violet)); }
.traces i:nth-child(1) { top: 9rem; left: 6rem; }
.traces i:nth-child(2) { top: 3rem; left: 39rem; }
.traces i:nth-child(3) { top: 24rem; left: 48rem; }
.traces i:nth-child(4) { top: 6rem; left: 75rem; }
@media (prefers-reduced-motion: no-preference) {
  .traces i:nth-child(odd) { animation: slad-x 12s linear infinite; }
  .traces i:nth-child(even) { animation: slad-y 13s linear infinite; }
  .traces i:nth-child(2) { animation-delay: 3s; }
  .traces i:nth-child(3) { animation-delay: 6.5s; }
  .traces i:nth-child(4) { animation-delay: 9s; }
}
@keyframes slad-x {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 1; }
  30%, 100% { transform: translateX(21rem); opacity: 0; }
}
@keyframes slad-y {
  0% { transform: translateY(0); opacity: 0; }
  6% { opacity: 1; }
  30%, 100% { transform: translateY(15rem); opacity: 0; }
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: clamp(2.5rem, 5vw, 5.5rem); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 {
  max-width: 13ch;
  font-size: var(--t-h1); line-height: 1.02; letter-spacing: -.024em;
}
.lead { max-width: 54ch; margin-top: 1.6rem; color: var(--ink-2); font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; margin-top: 2.25rem; }

.facts {
  display: flex; flex-wrap: wrap; gap: .6rem 2rem;
  margin-top: clamp(2.75rem, 2rem + 2.5vw, 4rem); padding-top: 1.4rem;
  background: linear-gradient(90deg, var(--line-strong), transparent 85%) top left / 100% 1px no-repeat;
  color: var(--ink-2); font-family: var(--mono); font-size: .875rem;
}
.facts li { display: flex; align-items: center; gap: .55rem; }
.facts svg { width: 1rem; height: 1rem; flex: none; color: var(--violet); }

.crumb { margin-bottom: 1.75rem; color: var(--ink-3); font-family: var(--mono); font-size: var(--t-xs); letter-spacing: .02em; }
.crumb a { display: inline-block; padding-block: .65rem; text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--line-strong); }
.crumb a:hover { color: var(--ink); }

/* Karta ustalenia — wzór zapisu z raportu, w podwójnej ramce. */
.finding {
  position: relative;
  padding: 2.1rem 1.75rem 1.5rem;
  border-radius: var(--r-lg);
  box-shadow: 0 0 0 .5rem rgba(255, 255, 255, .025), 0 0 0 calc(.5rem + 1px) var(--line), var(--shadow-sheet);
}
/* Podziałka jak na miarce do fotografii dowodów: co 4 px kreska, co 20 px dłuższa. */
.finding::before {
  content: ""; position: absolute; top: 0; left: 1.75rem; right: 1.75rem; height: .6rem;
  background:
    repeating-linear-gradient(90deg, var(--ink-3) 0 1px, transparent 1px 20px) top left / 100% .6rem no-repeat,
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 4px) top left / 100% .35rem no-repeat;
  opacity: .55;
}
/* Wyciąg z raportu jako wyblakła kartka: jasny, przygaszony papier z pożółkłymi brzegami.
   Tokeny nadpisane tylko w obrębie karty — tagi, pewność i log dziedziczą ciemny „atrament”. */
.finding.log {
  --ink: #221e2b;
  --ink-2: #413b4c;
  --ink-3: #5a5364;
  --line: rgba(60, 50, 40, .16);
  --line-strong: rgba(60, 50, 40, .3);
  --violet: #5a3fc0;
  --violet-soft: rgba(90, 63, 192, .12);
  --violet-line: rgba(90, 63, 192, .45);
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(150, 120, 70, .16)) padding-box,
    linear-gradient(170deg, #e9e5da, #dcd6c8 70%, #d6cfbf) padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(120, 100, 70, .25)) border-box;
  box-shadow: 0 0 0 .5rem rgba(255, 255, 255, .025), 0 0 0 calc(.5rem + 1px) #312c42, var(--shadow-sheet);
}
.finding.log .log-cmd { background: rgba(40, 30, 20, .07); }
.finding.log .confidence span.off { background: rgba(60, 50, 40, .22); }

.finding-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; color: var(--ink-3); font-family: var(--mono); font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.finding-status { display: inline-flex; align-items: center; gap: .45rem; color: var(--violet); }
.finding-status::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--violet-soft); }
/* Wyciąg z logu: oś czasu zdarzeń → wniosek. Kolumny: czas, źródło, zdarzenie. */
.log-cmd {
  margin-top: 1rem; padding: .55rem .75rem; border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .28); color: var(--ink-2);
  font-family: var(--mono); font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere;
}
.log-cmd span { color: var(--violet); }
.log-lines {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); column-gap: .85rem;
  margin-top: .9rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line);
  list-style: none; font-family: var(--mono); font-size: .75rem; line-height: 1.45; font-variant-numeric: tabular-nums;
}
.log-lines li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; padding-block: .28rem; }
.log-lines time { color: var(--ink-3); white-space: nowrap; }
.log-src { color: var(--violet); font-weight: 600; }
.log-msg { color: var(--ink); }
.log-lines .log-delta { margin-top: .35rem; padding-top: .55rem; border-top: 1px dashed var(--line-strong); }
.log-sum { grid-column: 1 / -1; color: var(--ink-2); }
.log-sum strong { color: var(--violet); font-weight: 700; }
@media (max-width: 30rem) {
  .log-lines li { grid-template-columns: auto minmax(0, 1fr); column-gap: .6rem; }
  .log-msg { grid-column: 1 / -1; }
}

.log-verdict { display: grid; list-style: none; }
.log-verdict li { display: grid; justify-items: start; gap: .45rem; padding-block: .85rem; border-bottom: 1px solid var(--line); }
.log-verdict p { font-family: var(--display); font-size: 1rem; font-weight: 500; line-height: 1.35; color: var(--ink); }
.log-verdict li:first-child p { font-size: 1.125rem; }
.log-meta { display: flex; margin-top: -.15rem; flex-wrap: wrap; align-items: center; gap: .15rem .5rem; color: var(--ink-3); font-family: var(--mono); font-size: .6875rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.log-meta .confidence { margin-left: .1rem; }
.log-meta .confidence span { width: .35rem; height: .7rem; }
.finding-legend { margin-top: 1rem; color: var(--ink-3); font-size: var(--t-xs); line-height: 1.5; }

.tag {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 1.6rem; padding: 0 .6rem;
  border: 1px solid transparent; border-radius: var(--r-xs);
  font-family: var(--mono); font-size: .75rem; font-weight: 600; line-height: 1; text-transform: uppercase; letter-spacing: .06em;
}
.tag::before { content: ""; width: .45rem; height: .45rem; border-radius: 1px; }
.tag-fact { background: var(--violet-soft); color: var(--violet); }
.tag-fact::before { background: currentColor; }
.tag-hypo { border-color: var(--violet-line); color: var(--ink-2); }
.tag-hypo::before { border: 1.5px solid var(--violet); }
.tag-none { border-color: var(--line-strong); border-style: dashed; color: var(--ink-3); }
.tag-none::before { width: .55rem; height: 1.5px; background: currentColor; }

.confidence { display: inline-flex; gap: 3px; }
.confidence span { width: .45rem; height: .9rem; border-radius: 2px; background: var(--violet); }
.confidence span.off { background: var(--line-strong); }

/* ── Sekcje ─────────────────────────────────────────────────────────────── */

main { counter-reset: sekcja; }
.section, .contact { position: relative; counter-increment: sekcja; }
.section { padding-block: var(--section); }
/* Linia podziału gaśnie na obu końcach. */
.section::before, .contact::before, .site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 25%, var(--line-strong) 75%, transparent);
}
.section-soft { background: rgba(255, 255, 255, .02); }

/* Numer sekcji jak w raporcie („// 01”) z krótką, gasnącą kreską. Pusty tekst zastępczy — czytnik go pomija. */
.split-head::before, .section-head::before {
  content: "// " counter(sekcja, decimal-leading-zero);
  content: "// " counter(sekcja, decimal-leading-zero) / "";
  display: block; width: fit-content; margin-bottom: 1rem; padding-right: 3rem;
  background: linear-gradient(90deg, var(--violet), transparent) right center / 2.25rem 1px no-repeat;
  color: var(--violet); font-family: var(--mono); font-size: .75rem; font-weight: 600; letter-spacing: .14em;
}

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(2.5rem, 6vw, 6rem); }
.split-head { align-self: start; }
@media (min-width: 900px) {
  .split-head { position: sticky; top: calc(var(--header-top) + var(--header-h) + 2.5rem); }
}
@media (max-width: 899px) { .split { grid-template-columns: 1fr; } }
.section h2, .contact h2 { font-size: var(--t-h2); line-height: 1.08; letter-spacing: -.018em; }
.section-intro { max-width: 40ch; margin-top: 1.1rem; color: var(--ink-3); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head .section-intro { max-width: 58ch; }

/* Linia pod wierszem: pełna z lewej, gaśnie w prawo. */
.group-label, .rows > li, .faq details {
  background: linear-gradient(90deg, var(--line-strong), var(--line) 60%, transparent) bottom left / 100% 1px no-repeat;
}

/* Usługi */
.group + .group { margin-top: 3rem; }
.group:first-of-type { counter-reset: pozycja; }
.group-label { max-width: none; padding-bottom: .85rem; color: var(--ink-3); font-family: var(--mono); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.rows > li {
  counter-increment: pozycja;
  display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: .5rem 2.5rem;
  padding-block: 1.6rem;
}
.rows h3 { font-size: var(--t-h3); line-height: 1.4; letter-spacing: -.01em; }
.rows h3::before {
  content: counter(pozycja, decimal-leading-zero);
  content: counter(pozycja, decimal-leading-zero) / "";
  display: block; margin-bottom: .3rem;
  color: var(--violet); font-family: var(--mono); font-size: .75rem; font-weight: 600; letter-spacing: .1em;
}
.rows p { color: var(--ink-2); max-width: 60ch; }
.rows .text-link { display: inline-block; margin-top: .35rem; padding-block: .55rem; }
@media (max-width: 640px) { .rows > li { grid-template-columns: 1fr; padding-block: 1.35rem; } }

/* Kto prowadzi analizy */
.about-lead {
  max-width: 34em;
  font-family: var(--display); font-size: clamp(1.3125rem, 1.1rem + .9vw, 1.75rem); line-height: 1.4; letter-spacing: -.01em;
}
.principles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
  margin-top: 2.75rem;
}
.principles li { padding: 1.25rem 1.25rem 1.4rem; border-radius: var(--r-md); }
.principles h3 { font-size: 1.0625rem; line-height: 1.4; }
.principles p { margin-top: .4rem; color: var(--ink-2); font-size: var(--t-small); line-height: 1.6; }
@media (max-width: 700px) { .principles { grid-template-columns: 1fr; } }

/* Proces — łańcuch od wiadomości do raportu */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.steps li { position: relative; }
.step-n {
  position: relative; z-index: 1;
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 1.25rem;
  border: 1px solid var(--violet-line); border-radius: var(--r-sm); background: var(--violet-soft); color: var(--violet);
  font-family: var(--mono); font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 1.25rem; left: 3.25rem; right: -1.25rem; height: 1px;
  background: linear-gradient(90deg, var(--violet-line), transparent);
}
.steps h3 { font-size: var(--t-h3); line-height: 1.3; }
.steps p { margin-top: .5rem; color: var(--ink-2); }
@media (max-width: 1000px) {
  .steps { grid-template-columns: 1fr; gap: 0; max-width: 40rem; }
  .steps li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0 1.25rem; padding-bottom: 2rem; }
  .steps li:last-child { padding-bottom: 0; }
  .step-n { grid-row: span 2; margin: 0; }
  .steps h3 { padding-top: .45rem; }
  .steps li:not(:last-child)::after {
    top: 3rem; bottom: .5rem; left: 1.25rem; right: auto; width: 1px; height: auto;
    background: linear-gradient(180deg, var(--violet-line), transparent);
  }
}

/* Lista kontrolna (zanim przekażesz urządzenie) */
.protocol { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: var(--r-lg); box-shadow: var(--shadow-sheet); }
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.checklist li { display: grid; grid-template-columns: 1.5rem 1fr; gap: .9rem; }
.checklist svg { width: 1.5rem; height: 1.5rem; margin-top: .05rem; color: var(--violet); }
.checklist h3 { font-size: 1.0625rem; line-height: 1.4; }
.checklist p { margin-top: .3rem; color: var(--ink-2); }
.protocol-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.protocol-cta p { color: var(--ink-3); font-size: var(--t-small); max-width: 40ch; }
@media (max-width: 700px) { .checklist { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Tak / nie (podstrona) */
.yes-no { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.5rem); }
.yes-no > div { padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); border-radius: var(--r-lg); }
.yes-no > .col-yes {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--sheet), var(--sheet)) padding-box,
    linear-gradient(180deg, var(--edge), var(--edge-soft) 60%) border-box;
}
.yes-no > .col-no { border: 1px dashed var(--line-strong); }
.yes-no h3.col-title { display: flex; align-items: center; gap: .6rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line-strong); font-size: 1.0625rem; }
.yes-no .col-title svg { width: 1.25rem; height: 1.25rem; }
.col-yes .col-title svg { color: var(--violet); }
.col-no .col-title svg { color: var(--no); }
.yes-no li { padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.yes-no li:last-child { border-bottom: 0; padding-bottom: 0; }
.yes-no li strong { display: block; font-weight: 600; }
.yes-no li p { margin-top: .3rem; color: var(--ink-2); }
@media (max-width: 760px) { .yes-no { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { position: relative; }
.faq summary {
  position: relative; display: block; list-style: none; cursor: pointer;
  padding: 1.35rem 2.75rem 1.35rem 0;
  font-size: 1.0625rem; font-weight: 600; line-height: 1.45;
  transition: color .2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: .4rem; top: 50%;
  width: .875rem; height: 1.5px; border-radius: 1px; background: var(--ink-3);
  transition: transform .25s var(--ease), background-color .2s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
/* Otwarte pytanie: „+” obraca się o 45° w „×”. */
.faq details[open] summary::before { transform: rotate(45deg); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq summary:hover { color: var(--violet); }
.faq summary:hover::before, .faq summary:hover::after, .faq details[open] summary::before, .faq details[open] summary::after { background: var(--violet); }
.faq details p { max-width: 62ch; padding-bottom: 1.5rem; margin-top: -.25rem; color: var(--ink-2); }

/* ── Kontakt ────────────────────────────────────────────────────────────── */

.contact {
  padding-block: var(--section);
  background: radial-gradient(ellipse 50% 60% at 12% 85%, rgba(140, 108, 240, .12), transparent 70%);
}
.contact .section-intro { max-width: 44ch; }
/* Lista jak w palecie poleceń: wiersze z podświetleniem w środku ramki. */
.contact-list { display: grid; gap: .25rem; padding: .375rem; border-radius: var(--r-lg); box-shadow: var(--shadow-sheet); }
.contact-row {
  display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); align-items: center; gap: 1rem;
  padding: .9rem clamp(.75rem, .5rem + 1vw, 1.1rem); border-radius: var(--r-md);
  transition: background-color .2s var(--ease);
}
.contact-icon {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border-radius: var(--r-sm); background: var(--violet-soft); color: var(--violet);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.contact-icon svg { width: 1.2rem; height: 1.2rem; }
.contact-wa { grid-template-columns: 2.75rem minmax(0, 1fr) auto; }
.contact-wa .contact-icon { background: #157a3f; color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.contact-go {
  display: grid; place-items: center; width: 2rem; height: 2rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  color: var(--ink-2); font-family: var(--mono); font-size: 1rem;
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.contact-wa:hover .contact-go { color: var(--violet); border-color: var(--violet-line); transform: translateX(3px); }
.contact-row small { display: block; color: var(--ink-3); font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.contact-row strong { display: block; font-size: clamp(1.0625rem, 1rem + .45vw, 1.3125rem); font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.contact-row:hover, .contact-item:hover { background: rgba(255, 255, 255, .05); }
.contact-row:active { background: rgba(255, 255, 255, .08); }
/* Wiersz z przyciskiem „Kopiuj” (e-mail) */
.contact-item { display: flex; align-items: center; border-radius: var(--r-md); transition: background-color .2s var(--ease); }
.contact-item .contact-row { flex: 1; min-width: 0; }
.contact-item .contact-row:hover { background: none; }
.copy-button {
  flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; min-width: 2.75rem;
  margin-right: clamp(.6rem, .4rem + 1vw, 1rem); padding: 0 .8rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: rgba(255, 255, 255, .03);
  color: var(--ink-2); font-family: var(--mono); font-size: .75rem; font-weight: 600; cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.copy-button[hidden] { display: none; }
.copy-button svg { width: 1rem; height: 1rem; }
.copy-button:hover { border-color: var(--violet-line); color: var(--violet); }
.copy-button:active { background: var(--violet-soft); }
.copy-button.is-done { border-color: var(--violet-line); color: var(--violet); }
@media (max-width: 420px) { .copy-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.contact-row:hover strong { color: var(--violet); }
.contact-note { margin-top: 1.5rem; max-width: 62ch; color: var(--ink-3); font-size: var(--t-small); line-height: 1.6; }

/* ── Stopka ─────────────────────────────────────────────────────────────── */

.site-footer { position: relative; padding-block: 2.75rem 2.25rem; background: var(--paper-2); color: var(--ink-3); font-size: var(--t-small); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.site-footer .brand { color: var(--ink); }
.site-footer .brand-mark .m-core { fill: var(--paper-2); }
.footer-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.footer-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; min-width: 2.75rem; transition: color .2s var(--ease); }
.footer-nav a:hover { color: var(--ink); }
.footer-bottom {
  flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem;
  padding-top: 1.25rem;
  background: linear-gradient(90deg, var(--line-strong), transparent 85%) top left / 100% 1px no-repeat;
}

/* ── 404 ────────────────────────────────────────────────────────────────── */

.not-found { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; padding-block: 4rem; }
.not-found h1 { font-size: var(--t-h2); line-height: 1.08; letter-spacing: -.018em; }

/* ── Zgoda na pomiar (markup w site.*.js): tylko ikona ciasteczka ───────── */

.consent-root { position: fixed; right: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom)); z-index: 90; }
.consent-toggle {
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: rgba(38, 34, 52, .82); color: var(--ink-2); cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 var(--edge-soft), 0 8px 24px -8px rgba(0, 0, 0, .6);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.consent-toggle:hover, .consent-toggle.is-open { color: var(--violet); border-color: var(--violet-line); }
/* Panel ma własne pozycjonowanie — pojawienie się panelu nie przesuwa ikony (CLS). */
.consent-panel {
  position: fixed; right: 1.25rem; bottom: calc(1.25rem + 2.75rem + .75rem + env(safe-area-inset-bottom));
  width: min(23rem, calc(100vw - 2.5rem));
  max-height: calc(100dvh - 9rem); overflow-y: auto; overscroll-behavior: contain;
  padding: 1.25rem; border-radius: var(--r-lg);
  box-shadow: var(--shadow-float);
  font-size: var(--t-small);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--sheet), var(--sheet)) padding-box,
    linear-gradient(180deg, var(--edge), var(--edge-soft) 60%) border-box;
}
.consent-panel.is-open { animation: consent-in .3s var(--ease) both; }
@keyframes consent-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.consent-panel .section-number { display: block; color: var(--ink-3); font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .06em; }
.consent-panel h2 { margin: .25rem 0 .35rem; font-family: var(--display); font-size: 1.25rem; font-weight: 500; line-height: 1.3; }
.consent-panel p { color: var(--ink-2); line-height: 1.55; }
.consent-options { display: grid; gap: .5rem; margin: .9rem 0; }
.consent-options label {
  display: flex; align-items: flex-start; gap: .75rem; padding: .75rem;
  border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer;
  transition: border-color .2s var(--ease);
}
.consent-options label:hover { border-color: var(--line-strong); }
.consent-options input { flex: none; width: 1rem; height: 1rem; margin-top: .2rem; accent-color: var(--violet); cursor: pointer; }
.consent-options input:disabled, .consent-options input:disabled ~ span { cursor: not-allowed; }
.consent-options strong { display: block; font-weight: 600; }
.consent-options small { display: block; margin-top: .15rem; color: var(--ink-3); font-size: var(--t-xs); line-height: 1.45; }
.consent-options input:disabled + span strong { color: var(--ink-3); }
.consent-details { margin-bottom: .9rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.consent-details summary { color: var(--ink-2); font-weight: 500; cursor: pointer; }
.consent-details p { margin-top: .5rem; font-size: var(--t-xs); }
.consent-panel.is-compact .consent-options,
.consent-panel.is-compact .consent-details,
.consent-panel.is-compact .section-number { display: none; }
.consent-panel.is-compact h2 { margin-top: 0; }
.consent-panel.is-compact #consent-lead { margin-bottom: 1rem; }
.consent-actions {
  position: sticky; bottom: -1.25rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  padding-block: .25rem .75rem; margin-bottom: -.5rem; background: var(--sheet);
}
.consent-actions .button { width: 100%; min-height: 2.75rem; padding: 0 1rem; }
.consent-secondary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: .5rem; }
.consent-link {
  min-height: 1.75rem; padding: .2rem 0; cursor: pointer;
  color: var(--ink-3); font-size: var(--t-xs); font-weight: 500;
  text-decoration: underline; text-underline-offset: .2em;
  transition: color .2s var(--ease);
}
.consent-link:hover { color: var(--violet); }

@media (max-width: 560px) {
  .consent-root { right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); }
  .consent-panel {
    left: .75rem; right: .75rem; bottom: calc(.75rem + 2.75rem + .75rem + env(safe-area-inset-bottom)); width: auto;
    max-height: calc(100dvh - 7rem); padding: 1rem;
  }
  .consent-link { min-height: 2.75rem; }
}

/* ── Ruch, kontrast, druk ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .traces { display: none; }
}
@media (prefers-contrast: more) {
  :root { --ink-2: var(--ink); --ink-3: var(--ink-2); --line: var(--line-strong); }
}
@media print {
  .site-header, .skip-link, .consent-root, .consent-panel, .actions, .protocol-cta, .traces { display: none !important; }
  body, .hero, .contact, .site-footer, .section-soft { background: #fff !important; color: #000 !important; }
  h1, h2 { background: none !important; color: #000 !important; }
  main *, .site-footer * { color: #000 !important; }
  .hero { margin-top: 0; padding-top: 2rem; }
  .split-head { position: static; }
  .section, .contact { padding-block: 1.5rem; }
  .finding, .protocol, .contact-list { box-shadow: none; }
  .rows > li, .steps li, .faq details, .finding { break-inside: avoid; }
}
