/* ============================================================
   PORA NA BALANS — SYSTEM WIZUALNY (jedyny arkusz części publicznej)

   Ten plik jest kompletnym systemem: reset, tokeny, typografia,
   komponenty i moduły stron. Aktywne strony publiczne nie ładują już
   żadnej innej warstwy CSS — nie ma drugiego, równoległego systemu
   i nie ma nadpisań przez `!important`.

   Język marki: grafit, czerń, ciepłe drewno/orzech, ciemne złoto,
   jasne neutralne tła. Czerwony wyłącznie dla błędu, zielony wyłącznie
   dla sukcesu. Bez petrolu i dekoracyjnego niebieskiego.

   Geometria: prostokąt. Promienie 0–4 px, pigułka tylko tam, gdzie ma
   znaczenie semantyczne (tag, filtr, status).
   ============================================================ */

/* ---------- 1. FONTY (self-hosted, CSP font-src 'self') ---------- */

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/SourceSans3Var-Upright.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/SourceSerif4Var-Roman.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Var.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-display: swap;
}

/* ---------- 2. TOKENY ---------- */

:root {
  /* Barwy źródłowe zaakceptowanej identyfikacji */
  --pnb-graphite: #252725;
  --pnb-black: #161716;
  --pnb-walnut: #3a2d27;
  --pnb-wood: #6b5344;
  --pnb-paper: #f5f0e8;
  --pnb-gold: #c39a52;

  --font-sans: "Source Sans 3", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Geometria */
  --r-0: 0px;
  --r-1: 2px;
  --r-2: 3px;
  --r-3: 4px;
  --r-pill: 999px;

  /* Rytm */
  --gap-1: 4px;
  --gap-2: 8px;
  --gap-3: 12px;
  --gap-4: 16px;
  --gap-5: 24px;
  --gap-6: 32px;
  --gap-7: 48px;
  --gap-8: 64px;

  --max: 1200px;
  /* Nagłówek jest szerszy od kolumny treści: branding stoi bliżej lewej
     krawędzi ekranu, a nawigacja ma miejsce na środku. */
  --max-header: 1400px;
  --max-text: 68ch;
  --header-h: 76px;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur: 180ms;
}

/* Motyw jasny — domyślny nośnik treści */
:root,
html[data-theme="light"] {
  --bg: #f5f0e8;
  --bg-soft: #ece4d7;
  --surface: #ffffff;
  --surface-2: #faf6ef;
  --surface-3: #efe7db;

  --ink: #1f211f;
  --ink-muted: #554c43;
  --ink-soft: #6d6157;

  --line: rgba(37, 39, 37, 0.16);
  --line-soft: rgba(37, 39, 37, 0.09);
  --line-strong: rgba(37, 39, 37, 0.34);

  --accent: #6b5344;
  --accent-ink: #fdfaf5;
  --accent-hover: #533f33;
  --accent-soft: rgba(107, 83, 68, 0.1);

  --gold: #6f5626;
  --gold-line: rgba(111, 86, 38, 0.4);
  --gold-soft: rgba(111, 86, 38, 0.11);

  --success: #205d3b;
  --success-soft: rgba(32, 93, 59, 0.12);
  --danger: #8e3520;
  --danger-soft: rgba(142, 53, 32, 0.11);

  --shadow: 0 1px 2px rgba(37, 39, 37, 0.06);
  --shadow-lift: 0 6px 22px rgba(58, 45, 39, 0.12);

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #1c1e1c;
  --bg-soft: #232522;
  --surface: #26241f;
  --surface-2: #2e2a24;
  --surface-3: #38312a;

  --ink: #f5f0e8;
  --ink-muted: #cabdae;
  --ink-soft: #a6988a;

  --line: rgba(245, 240, 232, 0.16);
  --line-soft: rgba(245, 240, 232, 0.08);
  --line-strong: rgba(245, 240, 232, 0.34);

  --accent: #c9a68d;
  --accent-ink: #201c18;
  --accent-hover: #ddbda6;
  --accent-soft: rgba(201, 166, 141, 0.14);

  --gold: #d9b56f;
  --gold-line: rgba(217, 181, 111, 0.42);
  --gold-soft: rgba(217, 181, 111, 0.14);

  --success: #7cc296;
  --success-soft: rgba(124, 194, 150, 0.14);
  --danger: #e39c85;
  --danger-soft: rgba(227, 156, 133, 0.14);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 8px 26px rgba(0, 0, 0, 0.45);

  color-scheme: dark;
}

/* ---------- 3. RESET I PODSTAWA ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

html {
  background: var(--bg);
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

img {
  height: auto;
}

a {
  color: var(--ink);
  text-decoration-color: var(--gold-line);
  text-underline-offset: 0.18em;
}

button {
  cursor: pointer;
  font: inherit;
  color: inherit;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

hr {
  height: 1px;
  margin: var(--gap-6) 0;
  border: 0;
  background: var(--line);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--gap-3);
  font-weight: 640;
  letter-spacing: -0.014em;
  line-height: 1.18;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 1.3rem + 1.7vw, 2.5rem);
  font-weight: 680;
  line-height: 1.12;
}

h2 {
  font-size: clamp(1.3rem, 1.12rem + 0.7vw, 1.7rem);
}

h3 {
  font-size: 1.08rem;
}

h4 {
  font-size: 0.98rem;
}

p {
  margin: 0 0 var(--gap-4);
  text-wrap: pretty;
}

ul,
ol {
  margin: 0 0 var(--gap-4);
  padding-left: 1.2em;
}

li {
  margin-bottom: var(--gap-1);
}

::selection {
  background: var(--gold-soft);
  color: var(--ink);
}

/* ---------- 4. UKŁAD I NARZĘDZIA ---------- */

.container {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.narrow {
  max-width: 760px;
  margin-inline: auto;
}

/* Podwójny atrybut podnosi swoistość ponad reguły komponentów ustawiające
   `display`, dzięki czemu `hidden` działa bez `!important`. */
.hidden,
[hidden][hidden] {
  display: none;
}

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 120;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink);
  font-weight: 620;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.section {
  padding: clamp(40px, 5vw, 68px) 0;
}

.section.compact {
  padding: clamp(28px, 3.4vw, 40px) 0;
}

.section.tint {
  background: var(--bg-soft);
}

.section.framed {
  border-top: 1px solid var(--line-soft);
}

/* Nagłówek sekcji jest jednokolumnowy. Nie stawiamy obok tytułu ogólnego
   komentarza — jeżeli zdanie nie pomaga podjąć decyzji, nie ma go wcale. */
.section-head {
  display: grid;
  gap: var(--gap-2);
  margin-bottom: var(--gap-5);
  padding-bottom: var(--gap-3);
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  max-width: 24ch;
  margin: 0;
}

.section-head p {
  max-width: var(--max-text);
  margin: 0;
  color: var(--ink-muted);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--gap-4);
}

@media (min-width: 700px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-3);
  align-items: center;
}

.stack > * + * {
  margin-top: var(--gap-4);
}

/* ---------- 5. TYPOGRAFIA POMOCNICZA ---------- */

.lead {
  max-width: var(--max-text);
  color: var(--ink-muted);
  font-size: clamp(1.02rem, 0.98rem + 0.2vw, 1.14rem);
  line-height: 1.55;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.88rem;
}

.label {
  display: inline-block;
  margin-bottom: var(--gap-2);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.num,
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* Wyróżnienie pojedynczego słowa kluczowego — ciemne złoto, nie całe zdanie. */
.key {
  color: var(--gold);
  font-weight: 640;
}

.said {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
}

.text-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
  text-decoration-thickness: 1px;
}

.text-link:hover {
  text-decoration-color: currentcolor;
}

.prose > :last-child,
.card > :last-child,
p:last-child {
  margin-bottom: 0;
}

/* ---------- 6. FOCUS ---------- */

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

html[data-theme="dark"] :focus-visible {
  outline-color: var(--gold);
}

a:not(.button):not(.brand-link):focus-visible {
  outline-offset: 3px;
}

/* ---------- 7. PRZYCISKI ---------- */

.button {
  display: inline-flex;
  gap: var(--gap-2);
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  font-size: 0.95rem;
  font-weight: 620;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button.secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.button.secondary:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--accent-soft);
}

.button.ghost {
  padding-inline: 12px;
  background: transparent;
  border-color: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
  text-underline-offset: 0.25em;
}

.button.ghost:hover:not(:disabled) {
  background: var(--accent-soft);
  text-decoration-color: currentcolor;
}

.button.danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.button.small {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 0.88rem;
}

.button.full {
  width: 100%;
}

.button:disabled,
.button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ---------- 8. POWIERZCHNIE ---------- */

.card {
  padding: var(--gap-5);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.card.flat {
  box-shadow: none;
}

.card.quiet {
  background: var(--surface-2);
}

.notice {
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-2);
  background: var(--surface-2);
}

.notice strong {
  display: block;
  margin-bottom: var(--gap-1);
}

.notice.warning {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.notice.positive {
  border-left-color: var(--success);
  background: var(--success-soft);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag.gold {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold);
}

.status-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 640;
}

.status-pill[data-state="success"] {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill[data-state="error"] {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill[data-state="waiting"] {
  background: var(--gold-soft);
  color: var(--gold);
}

/* ---------- 9. TABELE ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--surface-2);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: 0;
}

.spec-table th {
  width: 42%;
  color: var(--ink-muted);
  font-weight: 600;
}

/* ---------- 10. FORMULARZE ---------- */

fieldset {
  margin: 0 0 var(--gap-5);
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

legend {
  padding-inline: 6px;
  font-weight: 640;
}

label {
  display: block;
  font-weight: 600;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: var(--gap-4);
}

.field > label {
  display: grid;
  gap: 6px;
}

.field .help,
.help-text {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 400;
}

.required {
  color: var(--danger);
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: var(--gap-4);
}

@media (min-width: 700px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid .wide {
    grid-column: 1 / -1;
  }
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="date"],
input[type="url"],
input:not([type]),
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink);
  font-weight: 400;
  transition: border-color var(--dur) var(--ease);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

select {
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, currentcolor 50%),
    linear-gradient(135deg, currentcolor 50%, transparent 50%);
  background-repeat: no-repeat;
  background-position:
    calc(100% - 18px) calc(50% + 1px),
    calc(100% - 13px) calc(50% + 1px);
  background-size:
    5px 5px,
    5px 5px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink-soft);
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-soft);
  opacity: 0.75;
}

input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  font-size: 0.9rem;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  display: block;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
}

.check-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--gap-3);
  align-items: start;
  margin-bottom: var(--gap-3);
  font-size: 0.93rem;
  font-weight: 400;
  line-height: 1.5;
}

.check-row input[type="checkbox"],
.check-row input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.choice-grid {
  display: grid;
  gap: var(--gap-3);
  margin-bottom: var(--gap-4);
}

@media (min-width: 640px) {
  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.choice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--gap-3);
  align-items: start;
  padding: var(--gap-3) var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}

.choice:hover {
  border-color: var(--ink-soft);
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choice input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.choice strong {
  display: block;
}

.choice span span,
.choice small {
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 400;
}

.form-status {
  margin: var(--gap-3) 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.form-status.error {
  color: var(--danger);
  font-weight: 600;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-3);
  justify-content: space-between;
  margin-top: var(--gap-5);
}

/* ---------- 11. KONTEKSTOWA POMOC ---------- */

.help-tip {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.help-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.help-trigger:hover,
.help-trigger[aria-expanded="true"] {
  border-color: var(--ink);
  color: var(--ink);
}

.help-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 40;
  width: max-content;
  max-width: min(280px, 76vw);
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  translate: -50% 0;
}

@media (max-width: 560px) {
  .help-bubble {
    position: fixed;
    right: 12px;
    bottom: auto;
    left: 12px;
    width: auto;
    max-width: none;
    margin-top: 8px;
    translate: none;
  }
}

/* ---------- 12. NAGŁÓWEK ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
}

/* Nagłówek desktop ma trzy świadome strefy. Boczne kolumny mają tę samą
   szerokość bazową (1fr), więc środkowa nawigacja jest wycentrowana względem
   całego nagłówka, a nie względem miejsca, które zostało po logo. */
.site-header > .container {
  width: min(100% - 40px, var(--max-header));
}

.header-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--gap-4);
  align-items: center;
  min-height: var(--header-h);
}

.header-bar > .brand-link {
  justify-self: start;
}

.header-bar > .nav-links {
  justify-self: center;
}

.header-bar > .nav-actions {
  justify-self: end;
}

.brand-link {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  padding: 4px 2px;
  border-radius: var(--r-2);
  text-decoration: none;
}

/* Znak marki: skalujemy wyłącznie wysokość, szerokość dobiera się z proporcji
   pliku. Bez filtrów, cieni, obrysów i przycinania. */
.brand-mark {
  width: auto;
  height: 34px;
  object-fit: contain;
}

/* Nagłówek: pełny logotyp w rozmiarze, w którym napis marki jest czytelny
   bez przybliżania. Bezpieczna przestrzeń pochodzi z marginesu komponentu,
   nie ze zmiany kompozycji pliku. */
.header-bar .brand-link .brand-mark {
  height: 48px;
}

/* Wąski desktop: pełne trzy strefy nadal się mieszczą, ale zaciskamy je
   świadomie — mniejszy logotyp, ciaśniejsze menu i sam koszyk bez etykiety. */
@media (min-width: 1000px) and (max-width: 1199px) {
  .header-bar .brand-link .brand-mark {
    height: 40px;
  }

  .nav-main-link {
    padding: 6px 10px;
  }

  .nav-cart span {
    display: none;
  }

  .nav-cart {
    width: 42px;
    justify-content: center;
    padding-inline: 0;
  }

  .nav-actions {
    gap: 6px;
  }
}

.footer-brand .brand-mark {
  height: 38px;
}

/* Ekrany bez wspólnego shellu (logowanie personelu, panel operacyjny)
   przełączają wariant znaku samym CSS, bez filtrów i bez JavaScriptu. */
.brand-swap-dark {
  display: none;
}

html[data-theme="dark"] .brand-swap-light {
  display: none;
}

html[data-theme="dark"] .brand-swap-dark {
  display: block;
}

.nav-links {
  display: flex;
  flex: 1;
  gap: var(--gap-1);
  align-items: center;
}

.mobile-nav-head,
.mobile-nav-account,
.nav-backdrop {
  display: none;
}

.nav-item {
  position: relative;
}

.nav-main-link {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-main-link:hover {
  background: var(--accent-soft);
}

.nav-main-link[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--gold);
}

.nav-chevron {
  width: 14px;
  height: 14px;
  transition: rotate var(--dur) var(--ease);
}

.nav-item.open .nav-chevron {
  rotate: 180deg;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 70;
  display: none;
  width: 268px;
  margin-top: 10px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

/* Most nad odstępem: kursor przechodzi z pozycji menu do panelu bez
   przekraczania martwej szczeliny, więc submenu nie znika w połowie drogi. */
.submenu::before {
  position: absolute;
  top: -12px;
  right: 0;
  left: 0;
  height: 12px;
  content: "";
}

.nav-item.open .submenu,
.nav-item:hover .submenu,
.nav-item:focus-within .submenu {
  display: block;
}

/* Na dotyku otwiera wyłącznie kliknięcie — bez „przyklejonego” hoveru. */
@media (hover: none) {
  .nav-item:hover .submenu {
    display: none;
  }

  .nav-item.open .submenu {
    display: block;
  }
}

.submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r-2);
  text-decoration: none;
}

.submenu a:hover {
  background: var(--accent-soft);
}

.submenu strong {
  display: block;
  font-size: 0.95rem;
}

.submenu small {
  color: var(--ink-soft);
  font-size: 0.83rem;
}

.nav-actions {
  display: flex;
  gap: var(--gap-2);
  align-items: center;
  margin-left: auto;
}

.nav-cart {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 42px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-actions .account-button {
  min-height: 42px;
}

.nav-cart svg {
  width: 18px;
  height: 18px;
}

.nav-cart:hover {
  border-color: var(--ink);
}

.nav-cart[aria-current="page"] {
  border-color: var(--gold);
}

/* Jeden kompaktowy przycisk motywu. Ikona mówi wprost, jaki wygląd jest
   aktywny: słońce, księżyc albo znak „zgodnie z systemem”. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: transparent;
  color: var(--ink-muted);
  transition:
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.theme-toggle:hover {
  border-color: var(--ink);
  background: var(--accent-soft);
  color: var(--ink);
}

.theme-icon {
  display: none;
  width: 20px;
  height: 20px;
}

.theme-toggle[data-theme-state="system"] .theme-icon-system,
.theme-toggle[data-theme-state="light"] .theme-icon-light,
.theme-toggle[data-theme-state="dark"] .theme-icon-dark {
  display: block;
}

/* Wybór inny niż systemowy jest sygnalizowany złotą krawędzią — użytkownik
   widzi, że ustawił wygląd ręcznie. */
.theme-toggle[data-theme-state="light"],
.theme-toggle[data-theme-state="dark"] {
  border-color: var(--gold-line);
  color: var(--gold);
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: transparent;
}

.menu-button span[aria-hidden] {
  width: 18px;
  height: 1.6px;
  background: currentcolor;
}

@media (max-width: 999px) {
  /* Poniżej progu nawigacja wychodzi z układu (panel boczny), więc nagłówek
     wraca do prostego układu: marka po lewej, akcje po prawej. */
  .site-header > .container {
    width: min(100% - 32px, var(--max-header));
  }

  .header-bar {
    display: flex;
    justify-content: space-between;
    min-height: 66px;
  }

  .header-bar .brand-link .brand-mark {
    height: 38px;
  }

  .menu-button {
    display: flex;
  }

  .account-button,
  .nav-cart span {
    display: none;
  }

  .nav-cart {
    width: 40px;
    justify-content: center;
    padding-inline: 0;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    background: rgba(20, 18, 16, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
  }

  .nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: stretch;
    width: min(340px, 88vw);
    padding: var(--gap-4);
    overflow-y: auto;
    border-left: 1px solid var(--line-strong);
    background: var(--surface);
    translate: 100% 0;
    transition: translate var(--dur) var(--ease);
  }

  .nav-links.open {
    translate: 0 0;
  }

  .mobile-nav-head {
    display: flex;
    gap: var(--gap-3);
    align-items: center;
    padding-bottom: var(--gap-4);
    margin-bottom: var(--gap-3);
    border-bottom: 1px solid var(--line);
  }

  .mobile-nav-head .brand-mark {
    height: 28px;
  }

  .menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-2);
    background: transparent;
  }

  .menu-close svg {
    width: 18px;
    height: 18px;
  }

  .nav-main-link {
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }

  .submenu {
    position: static;
    display: none;
    width: auto;
    padding: 0 0 var(--gap-2) var(--gap-4);
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-item:hover .submenu {
    display: none;
  }

  .nav-item.open .submenu {
    display: block;
  }

  .mobile-nav-account {
    display: grid;
    gap: var(--gap-2);
    margin-top: auto;
    padding-top: var(--gap-4);
    border-top: 1px solid var(--line);
  }
}

@media (min-width: 1000px) {
  .mobile-nav-account {
    display: none;
  }
}

/* Pasek zamkniętej wersji testowej — jeden, dyskretny, bez języka technicznego. */
.trial-strip {
  padding: 10px 20px;
  border-bottom: 1px solid var(--gold-line);
  background: var(--gold-soft);
  color: var(--ink-muted);
  font-size: 0.88rem;
  text-align: center;
}

/* ---------- 13. STOPKA ---------- */

.site-footer {
  margin-top: clamp(48px, 6vw, 80px);
  padding: clamp(36px, 4vw, 56px) 0 var(--gap-5);
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.footer-grid {
  display: grid;
  gap: var(--gap-6);
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .footer-grid {
    grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr));
    gap: var(--gap-5);
  }
}

.footer-brand p {
  max-width: 42ch;
  margin: var(--gap-3) 0 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.footer-contact a {
  font-weight: 600;
}

.site-footer h2 {
  margin-bottom: var(--gap-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.footer-links {
  display: grid;
  gap: 6px;
}

.footer-links a {
  color: var(--ink-muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-3);
  justify-content: space-between;
  margin-top: var(--gap-6);
  padding-top: var(--gap-4);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.84rem;
}

/* ---------- 14. ELEMENTY GLOBALNE ---------- */

.pnb-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  gap: var(--gap-4);
  place-content: center;
  justify-items: center;
  background: var(--bg);
  transition:
    opacity 240ms var(--ease),
    visibility 240ms var(--ease);
}

.pnb-loader .brand-mark {
  height: 44px;
}

.pnb-loader span {
  width: 110px;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}

.pnb-loader span::after {
  display: block;
  width: 40%;
  height: 100%;
  content: "";
  background: var(--gold);
  animation: pnb-load 1.1s var(--ease) infinite;
}

@keyframes pnb-load {
  0% {
    translate: -100% 0;
  }

  100% {
    translate: 275% 0;
  }
}

.pnb-loader.is-ready {
  opacity: 0;
  visibility: hidden;
}

/* Powrót na górę — nad asystentem, nigdy na nim. */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 96px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  translate: 0 8px;
  transition:
    opacity var(--dur) var(--ease),
    translate var(--dur) var(--ease),
    visibility var(--dur) var(--ease);
}

.to-top svg {
  width: 18px;
  height: 18px;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
}

.to-top:hover {
  border-color: var(--ink);
}

.essential-notice {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 130;
  max-width: 460px;
  margin-inline: auto;
  padding: var(--gap-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.essential-notice p {
  margin: var(--gap-2) 0 var(--gap-4);
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.essential-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-2);
}

@media (min-width: 700px) {
  .essential-notice {
    right: 20px;
    left: auto;
  }
}

body.has-essential-notice .to-top {
  bottom: 176px;
}

.toast-box {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 210;
  display: grid;
  gap: var(--gap-2);
  max-width: 340px;
}

.toast {
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--success);
  border-radius: var(--r-2);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  font-size: 0.9rem;
}

.toast.error {
  border-left-color: var(--danger);
}

/* ---------- 15. DIALOGI ---------- */

.pnb-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  background: var(--surface);
  color: var(--ink);
}

.pnb-dialog::backdrop {
  background: rgba(18, 16, 14, 0.6);
}

.pnb-dialog-card {
  display: grid;
  gap: var(--gap-3);
  padding: var(--gap-5);
}

.pnb-dialog-card h2 {
  margin: 0;
}

.pnb-dialog-message {
  margin: 0;
  color: var(--ink-muted);
}

.pnb-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-2);
  justify-content: flex-end;
  margin-top: var(--gap-2);
}

.pnb-dialog-checkbox {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--gap-3);
  align-items: start;
  font-weight: 400;
}

.pnb-recovery-codes {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 1.4em;
  font-family: var(--font-mono);
}

/* ---------- 16. MIEJSCE NA PRAWDZIWE ZDJĘCIE ---------- */

/* Slot jest jawnym placeholderem: nie udaje gotowego materiału i podaje
   nazwę pliku oraz wymagany kadr. Po dostarczeniu zdjęcia wystarczy
   wstawić <img> w to samo miejsce. */
.media-slot {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: end;
  padding: var(--gap-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-3);
  margin: 0;
  background:
    repeating-linear-gradient(-45deg, var(--surface-2) 0 10px, transparent 10px 20px), var(--surface);
  aspect-ratio: 4 / 3;
}

.media-slot b {
  font-size: 0.92rem;
}

.media-slot span {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.4;
}

.media-slot.portrait {
  aspect-ratio: 3 / 4;
}

.media-slot.square {
  aspect-ratio: 1 / 1;
}

.media-slot.wide {
  aspect-ratio: 16 / 9;
}

.media-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-3);
}

/* ---------- 17. STRONA GŁÓWNA ---------- */

.home-hero {
  padding: clamp(32px, 4.5vw, 64px) 0 clamp(36px, 4.5vw, 60px);
  border-bottom: 1px solid var(--line-soft);
}

.home-hero-grid {
  display: grid;
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}

@media (min-width: 900px) {
  .home-hero-grid {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  }
}

.home-hero h1 {
  max-width: 18ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-3);
  margin-top: var(--gap-5);
}

.hero-note {
  margin-top: var(--gap-4);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Kompozycja trzech kadrów: jeden wiodący pion i dwa kadry wspierające.
   Kolumna wspierająca jest świadomie przesunięta w górę, więc układ czyta się
   jak kompozycja, a nie jak automatyczna siatka. Proporcje są ustalone, więc
   nic się nie zawija i nie zderza przy zmianie szerokości. */
.hero-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  grid-template-rows: auto auto;
  gap: var(--gap-3);
  align-items: start;
  padding-bottom: 34px;
}

.hero-gallery .media-slot {
  margin: 0;
}

.hero-gallery .media-slot:first-child {
  grid-row: 1 / span 2;
  margin-top: 34px;
  aspect-ratio: 3 / 4;
}

.hero-gallery .media-slot:nth-child(2),
.hero-gallery .media-slot:nth-child(3) {
  aspect-ratio: 4 / 3;
}

@media (max-width: 899px) {
  .hero-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 0;
  }

  .hero-gallery .media-slot:first-child {
    grid-row: auto;
    grid-column: 1 / -1;
    margin-top: 0;
    aspect-ratio: 16 / 10;
  }

  .hero-gallery .media-slot:nth-child(2),
  .hero-gallery .media-slot:nth-child(3) {
    aspect-ratio: 1 / 1;
  }
}

/* Delikatny ruch kompozycji, bez karuzeli i bez chaosu. */
@media (prefers-reduced-motion: no-preference) {
  .hero-gallery .media-slot {
    animation: hero-drift 9s var(--ease) infinite alternate;
  }

  .hero-gallery .media-slot:nth-child(2) {
    animation-delay: 1.4s;
  }

  .hero-gallery .media-slot:nth-child(3) {
    animation-delay: 2.8s;
  }
}

@keyframes hero-drift {
  from {
    translate: 0 0;
  }

  to {
    translate: 0 -6px;
  }
}

/* Dwie drogi — nierówny podział zamiast dwóch identycznych kafelków. */
.paths {
  display: grid;
  gap: var(--gap-4);
}

@media (min-width: 900px) {
  .paths {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}

.path-card {
  display: flex;
  flex-direction: column;
  padding: var(--gap-5);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease);
}

.path-card:hover {
  border-color: var(--ink);
}

.path-card.lead {
  border-color: var(--gold-line);
  background: var(--surface-2);
}

.path-card ul {
  display: grid;
  gap: 6px;
  margin: 0 0 var(--gap-4);
  padding: 0;
  list-style: none;
}

.path-card ul li {
  padding-left: 20px;
  color: var(--ink-muted);
  font-size: 0.92rem;
  position: relative;
}

.path-card ul li::before {
  position: absolute;
  top: 0.62em;
  left: 2px;
  width: 8px;
  height: 1.5px;
  content: "";
  background: var(--gold);
}

.path-price {
  display: flex;
  gap: 6px;
  align-items: baseline;
  margin-top: auto;
  padding-top: var(--gap-3);
  border-top: 1px solid var(--line-soft);
}

.path-price b {
  font-family: var(--font-mono);
  font-size: 1.24rem;
}

.path-price span {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.path-card .button {
  margin-top: var(--gap-4);
}

/* Zespół */
.team-grid {
  display: grid;
  gap: clamp(24px, 3vw, 44px);
}

@media (min-width: 900px) {
  .team-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
  }
}

.team-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-3);
}

.team-rules {
  display: grid;
  gap: var(--gap-2);
  margin: var(--gap-4) 0 0;
  padding: 0;
  list-style: none;
}

.team-rules li {
  padding-left: 22px;
  position: relative;
  color: var(--ink-muted);
}

.team-rules li::before {
  position: absolute;
  top: 0.6em;
  left: 0;
  width: 10px;
  height: 1.5px;
  content: "";
  background: var(--gold);
}

/* Narzędzia bez konta */
.tool-card {
  display: flex;
  flex-direction: column;
  gap: var(--gap-2);
  padding: var(--gap-5);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  text-decoration: none;
}

.tool-card:hover {
  border-color: var(--ink);
}

.tool-card p {
  flex: 1;
  color: var(--ink-muted);
}

/* ---------- 18. KALKULATOR ---------- */

.calc-layout {
  display: grid;
  gap: clamp(20px, 2.6vw, 36px);
  align-items: start;
}

@media (min-width: 1000px) {
  .calc-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.calc-intro {
  margin-bottom: var(--gap-5);
}

.calc-intro h1 {
  margin-bottom: var(--gap-2);
}

.calc-shell {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.calc-head {
  display: grid;
  gap: var(--gap-3);
  padding: var(--gap-4) var(--gap-5);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.calc-head-top {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-3);
  align-items: center;
  justify-content: space-between;
}

.mode-switch {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
}

.mode-switch button {
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.88rem;
  font-weight: 620;
}

.mode-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.progress-line {
  display: grid;
  gap: 6px;
}

.progress-line-top {
  display: flex;
  gap: var(--gap-3);
  justify-content: space-between;
  color: var(--ink-muted);
  font-size: 0.86rem;
}

.progress-track {
  height: 3px;
  background: var(--line);
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 260ms var(--ease);
}

.calc-body {
  padding: var(--gap-5);
}

.calc-step {
  display: none;
}

.calc-step.active {
  display: block;
}

.calc-step > h2 {
  margin-bottom: var(--gap-2);
}

.calc-step > p {
  max-width: var(--max-text);
  color: var(--ink-muted);
}

.calc-actions {
  display: flex;
  gap: var(--gap-3);
  justify-content: space-between;
  margin-top: var(--gap-5);
  padding-top: var(--gap-4);
  border-top: 1px solid var(--line-soft);
}

.calc-aside {
  display: grid;
  gap: var(--gap-3);
}

.calc-tip {
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface-2);
}

.calc-tip h3 {
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.calc-tip p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.calc-tip a {
  display: inline-block;
  margin-top: var(--gap-2);
  font-weight: 620;
}

@media (max-width: 999px) {
  .calc-aside {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* Moduły aktywności */
.activity-builder {
  display: grid;
  gap: var(--gap-3);
  margin-bottom: var(--gap-3);
}

.activity-row {
  display: grid;
  gap: var(--gap-3);
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
}

@media (min-width: 720px) {
  .activity-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .activity-impact,
  .activity-actions {
    grid-column: 1 / -1;
  }
}

.activity-row label {
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
}

.activity-impact {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-1);
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.activity-actions {
  display: flex;
  gap: var(--gap-2);
}

.activity-actions button {
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 600;
}

.counting-summary {
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-2);
  background: var(--surface-2);
  font-size: 0.9rem;
}

.counting-summary p {
  margin: 6px 0 0;
  color: var(--ink-muted);
}

.goal-fields {
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  margin-bottom: var(--gap-4);
}

.goal-preview {
  padding: 10px 12px;
  border-left: 3px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.goal-preview[data-level="warning"] {
  border-left-color: var(--danger);
  color: var(--danger);
}

.goal-preview[data-level="attention"] {
  border-left-color: var(--gold);
}

.goal-preview[data-level="realistic"] {
  border-left-color: var(--success);
}

/* Wynik kalkulatora */
.calc-result {
  display: grid;
  gap: var(--gap-4);
  margin-top: var(--gap-5);
}

@media (prefers-reduced-motion: no-preference) {
  .calc-result[data-enter] > * {
    animation: result-in 320ms var(--ease) both;
  }

  .calc-result[data-enter] > *:nth-child(2) {
    animation-delay: 60ms;
  }

  .calc-result[data-enter] > *:nth-child(3) {
    animation-delay: 120ms;
  }

  .calc-result[data-enter] > *:nth-child(4) {
    animation-delay: 180ms;
  }
}

@keyframes result-in {
  from {
    opacity: 0;
    translate: 0 8px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

.calc-counting {
  display: grid;
  gap: var(--gap-3);
  padding: var(--gap-5);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface-2);
  text-align: center;
}

.calc-counting-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.calc-counting-dots span {
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--gold);
  animation: counting 1s var(--ease) infinite;
}

.calc-counting-dots span:nth-child(2) {
  animation-delay: 140ms;
}

.calc-counting-dots span:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes counting {
  0%,
  100% {
    opacity: 0.25;
  }

  50% {
    opacity: 1;
  }
}

.result-headline {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.result-number {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 1.8rem + 3vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.result-number small {
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-3);
  margin-top: var(--gap-4);
}

@media (min-width: 700px) {
  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.metric {
  display: grid;
  gap: 2px;
  padding: var(--gap-3);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
}

.metric small {
  display: flex;
  gap: 4px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.metric strong {
  font-family: var(--font-mono);
  font-size: 1.16rem;
  font-weight: 600;
}

.breakdown {
  display: grid;
  gap: var(--gap-2);
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.9fr) minmax(0, 2fr) auto;
  gap: var(--gap-3);
  align-items: center;
  font-size: 0.88rem;
}

.breakdown-track {
  height: 8px;
  background: var(--line-soft);
}

.breakdown-track span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.breakdown-row strong {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .breakdown-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .breakdown-track {
    grid-column: 1 / -1;
  }
}

/* Wykres prognozy */
.chart-block {
  display: grid;
  gap: var(--gap-3);
}

.forecast-chart {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
}

.chart-grid-line {
  stroke: var(--line-soft);
  stroke-width: 1;
}

.chart-axis {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.chart-tick {
  fill: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
}

.chart-target-line {
  stroke: var(--gold);
  stroke-dasharray: 5 4;
  stroke-width: 1.5;
}

.forecast-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.forecast-point circle {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2;
}

.forecast-point.active circle,
.forecast-point:focus-visible circle {
  fill: var(--gold);
  stroke: var(--gold);
}

.forecast-point:focus-visible {
  outline: none;
}

.forecast-point:focus-visible circle {
  r: 7;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-4);
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.chart-legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.chart-legend i {
  width: 16px;
  height: 3px;
  background: var(--accent);
}

.chart-legend i.start {
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  border-radius: var(--r-pill);
  background: var(--surface);
}

.chart-legend i.target {
  background: repeating-linear-gradient(90deg, var(--gold) 0 5px, transparent 5px 9px);
}

.chart-readout {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* BMI */
.bmi-block {
  display: grid;
  gap: var(--gap-3);
}

.bmi-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--gap-3);
}

.bmi-value {
  display: grid;
  gap: 2px;
  padding: var(--gap-3) var(--gap-4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-2);
  background: var(--surface-2);
}

.bmi-value.target {
  border-left-color: var(--gold);
}

.bmi-value strong {
  font-family: var(--font-mono);
  font-size: 1.5rem;
}

.bmi-value small {
  color: var(--ink-soft);
}

.bmi-scale {
  position: relative;
  display: flex;
  height: 12px;
  margin-top: var(--gap-5);
}

.bmi-scale span {
  flex: 1;
  background: var(--line-soft);
  border-right: 1px solid var(--surface);
}

.bmi-scale span:last-child {
  border-right: 0;
}

.bmi-pointer {
  position: absolute;
  top: -16px;
  width: 2px;
  height: 28px;
  background: var(--accent);
}

.bmi-pointer::after {
  position: absolute;
  top: -16px;
  left: 50%;
  padding: 1px 5px;
  content: attr(data-label);
  border-radius: var(--r-1);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  translate: -50% 0;
  white-space: nowrap;
}

.bmi-pointer.target {
  background: var(--gold);
}

.bmi-pointer.target::after {
  background: var(--gold);
  color: var(--pnb-paper);
}

html[data-theme="dark"] .bmi-pointer.target::after {
  color: var(--pnb-graphite);
}

.bmi-legend {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* Rekomendacja po wyniku */
.recommendation {
  display: grid;
  gap: var(--gap-3);
  padding: var(--gap-5);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface-2);
}

.recommendation-options {
  display: grid;
  gap: var(--gap-3);
}

@media (min-width: 760px) {
  .recommendation-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.recommendation-option {
  display: flex;
  flex-direction: column;
  gap: var(--gap-2);
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
}

.recommendation-option p {
  flex: 1;
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.recommendation-option.suggested {
  border-color: var(--gold-line);
}

/* ---------- 19. JAK LICZYMY ---------- */

.method-steps {
  display: grid;
  gap: 0;
  margin: 0;
  counter-reset: method;
}

.method-step {
  display: grid;
  gap: 6px;
  padding: var(--gap-4) 0;
  border-bottom: 1px solid var(--line-soft);
}

@media (min-width: 760px) {
  .method-step {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: var(--gap-5);
  }
}

.method-step dt {
  counter-increment: method;
  font-weight: 640;
}

.method-step dt::before {
  margin-right: 8px;
  content: counter(method) ".";
  color: var(--gold);
  font-family: var(--font-mono);
}

.method-step dd {
  margin: 0;
  color: var(--ink-muted);
}

.source-grid {
  display: grid;
  gap: var(--gap-3);
}

@media (min-width: 700px) {
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.source-card {
  display: block;
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  text-decoration: none;
}

.source-card:hover {
  border-color: var(--ink);
}

.source-card h3 {
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.source-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* ---------- 20. BIBLIOTEKA WIEDZY ---------- */

.library-toolbar {
  display: grid;
  gap: var(--gap-3);
  margin-bottom: var(--gap-5);
  padding-bottom: var(--gap-4);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 860px) {
  .library-toolbar {
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    align-items: end;
  }
}

.library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.library-filters button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.library-filters button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.library-filters button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.library-feed {
  display: grid;
  gap: var(--gap-3);
}

@media (min-width: 760px) {
  .library-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .library-feed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: var(--gap-2);
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.article-card h3 {
  margin: 0;
}

.article-card p {
  flex: 1;
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.article-card small {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.article-card .button {
  align-self: flex-start;
}

.article-card.featured {
  border-color: var(--gold-line);
  background: var(--surface-2);
}

.library-count {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

/* Artykuł: tytuł i treść od razu, bez górnej sekcji ozdobnej. */
.article-view {
  max-width: var(--max-text);
  margin-inline: auto;
}

.article-back {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-bottom: var(--gap-5);
  font-weight: 620;
}

.article-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-3);
  align-items: center;
  margin-bottom: var(--gap-3);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-4);
  padding-bottom: var(--gap-4);
  margin-bottom: var(--gap-5);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.article-body p {
  font-size: 1.02rem;
  line-height: 1.7;
}

.article-source {
  margin-top: var(--gap-6);
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
}

.article-source strong {
  display: block;
  margin-bottom: 6px;
}

.article-next {
  margin-top: var(--gap-7);
  padding-top: var(--gap-5);
  border-top: 1px solid var(--line);
}

/* ---------- 21. QUIZ ---------- */

.quiz-layout {
  display: grid;
  gap: var(--gap-5);
  align-items: start;
}

@media (min-width: 960px) {
  .quiz-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

.quiz-map {
  display: grid;
  gap: var(--gap-3);
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface-2);
}

.quiz-map ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quiz-map li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: var(--gap-2);
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--r-2);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.quiz-map li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.quiz-map li.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 620;
}

.quiz-map li.active span {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.quiz-map li.done span {
  border-color: var(--success);
  color: var(--success);
}

.quiz-score {
  display: flex;
  gap: var(--gap-2);
  align-items: baseline;
  justify-content: space-between;
  padding-top: var(--gap-3);
  border-top: 1px solid var(--line);
}

.quiz-score strong {
  font-family: var(--font-mono);
  font-size: 1.2rem;
}

.quiz-card {
  display: grid;
  gap: var(--gap-4);
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.quiz-question-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-3);
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.quiz-answers {
  display: grid;
  gap: var(--gap-2);
}

.quiz-answer {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 500;
  text-align: left;
}

.quiz-answer:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--accent-soft);
}

.quiz-answer:disabled {
  cursor: default;
  opacity: 1;
}

.quiz-answer.correct {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--ink);
  font-weight: 640;
}

.quiz-answer.incorrect {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--ink);
  font-weight: 640;
}

/* Wyjaśnienie ma wysoki kontrast i jednoznaczny status — bez czerwonego tła. */
.quiz-explanation {
  display: grid;
  gap: var(--gap-2);
  padding: var(--gap-4);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--success);
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--ink);
}

.quiz-explanation[data-correct="false"] {
  border-left-color: var(--danger);
}

.quiz-explanation strong {
  font-size: 1rem;
}

.quiz-explanation p {
  margin: 0;
  color: var(--ink-muted);
}

.quiz-result {
  display: grid;
  gap: var(--gap-4);
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.quiz-result-score {
  display: flex;
  gap: var(--gap-3);
  align-items: baseline;
}

.quiz-result-score strong {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3rem);
  font-weight: 600;
}

.quiz-result-score span {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 1.1rem;
}

.quiz-result-areas {
  display: grid;
  gap: var(--gap-3);
}

@media (min-width: 620px) {
  .quiz-result-areas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.quiz-result-area {
  padding: var(--gap-3) var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
}

.quiz-result-area small {
  display: block;
  color: var(--ink-soft);
}

.quiz-recommendations {
  display: grid;
  gap: 6px;
}

.quiz-recommendation {
  display: block;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-weight: 600;
  text-decoration: none;
}

.quiz-recommendation:hover {
  border-color: var(--ink);
}

/* ---------- 22. O NAS, KONTAKT, FAQ ---------- */

.about-intro {
  display: grid;
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
}

@media (min-width: 900px) {
  .about-intro {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
}

.about-photos {
  display: grid;
  gap: var(--gap-3);
}

@media (min-width: 520px) {
  .about-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.value-card {
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.value-card h3 {
  margin-bottom: 6px;
}

.value-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.contact-layout {
  display: grid;
  gap: clamp(20px, 2.6vw, 36px);
  align-items: start;
}

@media (min-width: 980px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.contact-form {
  display: grid;
  gap: var(--gap-4);
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.contact-form .field {
  margin-bottom: 0;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-confirmation:not(:empty) {
  padding: var(--gap-4);
  border: 1px solid var(--success);
  border-radius: var(--r-2);
  background: var(--success-soft);
}

.contact-confirmation.error:not(:empty) {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.contact-confirmation p {
  margin: 6px 0 0;
  font-size: 0.9rem;
}

.contact-aside {
  display: grid;
  gap: var(--gap-3);
}

.check-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  padding-left: 22px;
  position: relative;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.check-list li::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 10px;
  height: 1.5px;
  content: "";
  background: var(--gold);
}

/* FAQ — kompaktowy accordion, wysokość rośnie dopiero po otwarciu. */
.faq-group + .faq-group {
  margin-top: var(--gap-6);
}

.faq-group h2 {
  padding-bottom: var(--gap-2);
  margin-bottom: var(--gap-3);
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}

.faq-item {
  border-bottom: 1px solid var(--line-soft);
}

.faq-item summary {
  display: flex;
  gap: var(--gap-3);
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 4px;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  flex-shrink: 0;
  content: "+";
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.faq-item summary:hover {
  color: var(--gold);
}

.faq-answer {
  padding: 0 4px 16px;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
}

/* ---------- 23. DOKUMENTY PRAWNE ---------- */

.legal-layout {
  display: grid;
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

@media (min-width: 960px) {
  .legal-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface-2);
}

.legal-toc h2 {
  margin-bottom: var(--gap-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.legal-toc ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.legal-toc a {
  display: block;
  padding: 4px 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.legal-toc a::before {
  counter-increment: toc;
  content: counter(toc) ". ";
  color: var(--ink-soft);
  font-family: var(--font-mono);
}

.legal-toc a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
}

@media (max-width: 959px) {
  .legal-toc {
    position: static;
  }
}

.legal-doc {
  max-width: var(--max-text);
}

.legal-doc h2 {
  margin-top: var(--gap-7);
  padding-top: var(--gap-4);
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.legal-doc h2:first-of-type {
  margin-top: var(--gap-5);
}

.legal-doc h3 {
  margin-top: var(--gap-5);
}

.legal-doc p,
.legal-doc li {
  color: var(--ink-muted);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-4);
  padding: var(--gap-3) var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.legal-meta dt {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-meta dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-3);
  margin-top: var(--gap-6);
  padding-top: var(--gap-4);
  border-top: 1px solid var(--line);
}

/* ---------- 24. SKLEP ---------- */

.shop-intro {
  max-width: var(--max-text);
  margin-bottom: var(--gap-5);
}

.product-grid {
  display: grid;
  gap: var(--gap-4);
}

@media (min-width: 760px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  overflow: hidden;
}

.product-card > .media-slot {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--gap-2);
  padding: var(--gap-4);
}

.product-card h2,
.product-card h3 {
  margin: 0;
  font-size: 1.16rem;
}

.product-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.product-card ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-card ul li {
  padding-left: 18px;
  position: relative;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.product-card ul li::before {
  position: absolute;
  top: 0.6em;
  left: 0;
  width: 8px;
  height: 1.5px;
  content: "";
  background: var(--gold);
}

.product-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.price-block {
  display: flex;
  gap: 6px;
  align-items: baseline;
  margin-top: auto;
  padding-top: var(--gap-3);
  border-top: 1px solid var(--line-soft);
}

.price-block span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.price-block strong {
  font-family: var(--font-mono);
  font-size: 1.24rem;
  font-weight: 600;
}

/* Trzy linie należą do jednej marki, ale mają własny akcent. */
.product-card[data-line="redukcja"] .product-card-accent {
  background: var(--accent);
}

.product-card[data-line="na-szybko"] .product-card-accent {
  background: var(--gold);
}

.product-card[data-line="aktywni"] .product-card-accent {
  background: var(--pnb-walnut);
}

html[data-theme="dark"] .product-card[data-line="aktywni"] .product-card-accent {
  background: var(--ink-soft);
}

.product-card-accent {
  height: 3px;
  background: var(--line-strong);
}

.variant-form {
  display: grid;
  gap: var(--gap-3);
  padding-top: var(--gap-3);
}

.variant-row {
  display: grid;
  gap: var(--gap-2);
}

@media (min-width: 480px) {
  .variant-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.variant-row label {
  display: grid;
  gap: 4px;
  font-size: 0.84rem;
  font-weight: 600;
}

/* Pakiety indywidualne */
.package-grid {
  display: grid;
  gap: var(--gap-4);
  align-items: start;
}

@media (min-width: 900px) {
  .package-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.package-card {
  display: flex;
  flex-direction: column;
  gap: var(--gap-3);
  padding: var(--gap-5);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  height: 100%;
}

.package-card.wider {
  border-color: var(--gold-line);
  background: var(--surface-2);
}

.package-card h2,
.package-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.package-card > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.package-price {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding-bottom: var(--gap-3);
  border-bottom: 1px solid var(--line-soft);
}

.package-price strong {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
}

.package-price small,
.package-price span {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.feature-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding-left: 20px;
  position: relative;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.feature-list li::before {
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 9px;
  height: 1.5px;
  content: "";
  background: var(--gold);
}

.feature-list.excluded li::before {
  background: var(--line-strong);
}

.package-card .button {
  margin-top: auto;
}

.compare-note {
  margin-top: var(--gap-5);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

/* ---------- 25. SZCZEGÓŁY PRODUKTU I PLANU ---------- */

.detail-top {
  display: grid;
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
  padding-top: clamp(24px, 3vw, 40px);
}

@media (min-width: 980px) {
  .detail-top {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}

.detail-gallery {
  display: grid;
  gap: var(--gap-3);
}

.detail-gallery-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-3);
}

.buy-box {
  display: grid;
  gap: var(--gap-3);
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  background: var(--surface);
}

@media (min-width: 980px) {
  .buy-box.sticky {
    position: sticky;
    top: calc(var(--header-h) + 20px);
  }
}

.buy-price {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  padding: var(--gap-3) 0;
  border-block: 1px solid var(--line-soft);
}

.buy-price strong {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 600;
}

.buy-availability {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.detail-columns {
  display: grid;
  gap: var(--gap-4);
}

@media (min-width: 860px) {
  .detail-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sample-day {
  display: grid;
  gap: 0;
}

.meal-entry {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: var(--gap-3);
  padding: var(--gap-3) 0;
  border-bottom: 1px solid var(--line-soft);
}

.meal-entry time {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.meal-entry strong {
  display: block;
}

.meal-entry small {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.plan-steps {
  display: grid;
  gap: 0;
  margin: 0;
  counter-reset: plan;
}

.plan-step {
  display: grid;
  gap: 4px;
  padding: var(--gap-4) 0 var(--gap-4) 48px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}

.plan-step::before {
  position: absolute;
  top: var(--gap-4);
  left: 0;
  display: grid;
  width: 30px;
  height: 30px;
  place-content: center;
  counter-increment: plan;
  content: counter(plan);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-pill);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.plan-step dt {
  font-weight: 640;
}

.plan-step dd {
  margin: 0;
  color: var(--ink-muted);
}

/* ---------- 26. KOSZYK, ZAMÓWIENIE, STATUS, POBIERANIE ---------- */

.cart-layout,
.checkout-layout {
  display: grid;
  gap: clamp(20px, 2.6vw, 36px);
  align-items: start;
}

@media (min-width: 980px) {
  .cart-layout,
  .checkout-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

.cart-list {
  display: grid;
  gap: var(--gap-3);
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--gap-3);
  align-items: start;
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.cart-item h2,
.cart-item h3 {
  margin: 0 0 2px;
  font-size: 1.02rem;
}

.cart-item p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.cart-item strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

.cart-summary {
  display: grid;
  gap: var(--gap-3);
  padding: var(--gap-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  background: var(--surface-2);
}

@media (min-width: 980px) {
  .cart-summary {
    position: sticky;
    top: calc(var(--header-h) + 20px);
  }
}

.cart-summary h2 {
  margin: 0;
  font-size: 1.1rem;
}

.cart-total {
  display: flex;
  gap: var(--gap-3);
  align-items: baseline;
  justify-content: space-between;
  padding-top: var(--gap-3);
  border-top: 1px solid var(--line);
}

.cart-total strong {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 600;
}

.checkout-form fieldset:last-of-type {
  margin-bottom: var(--gap-4);
}

.checkout-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-2);
  margin-bottom: var(--gap-5);
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.checkout-steps li {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.checkout-steps li::after {
  content: "→";
  margin-left: 6px;
  color: var(--line-strong);
}

.checkout-steps li:last-child::after {
  content: none;
}

.checkout-steps li[aria-current="step"] {
  color: var(--ink);
  font-weight: 640;
}

.order-state {
  display: grid;
  gap: var(--gap-4);
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(24px, 3.4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.order-state[data-tone="success"] {
  border-color: var(--success);
}

.order-state[data-tone="error"] {
  border-color: var(--danger);
}

.order-state[data-tone="waiting"] {
  border-color: var(--gold-line);
}

.order-state .brand-mark {
  height: 46px;
}

.order-details {
  display: grid;
  gap: 6px;
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  font-size: 0.92rem;
}

.order-details p {
  margin: 0;
}

.order-details details summary {
  cursor: pointer;
  font-weight: 600;
}

.download-card {
  display: grid;
  gap: var(--gap-4);
  max-width: 620px;
  margin-inline: auto;
  padding: clamp(24px, 3.4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.download-facts {
  display: grid;
  gap: var(--gap-2);
  padding: var(--gap-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
}

.download-facts div {
  display: flex;
  gap: var(--gap-3);
  justify-content: space-between;
  font-size: 0.92rem;
}

.download-facts dt {
  color: var(--ink-soft);
}

.download-facts dd {
  margin: 0;
  font-weight: 620;
}

/* ---------- 27. STRONA 404 ---------- */

.not-found {
  display: grid;
  gap: clamp(24px, 3vw, 44px);
  align-items: center;
  padding: clamp(40px, 6vw, 80px) 0;
}

@media (min-width: 860px) {
  .not-found {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  }
}

.not-found-code {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: clamp(3rem, 2rem + 6vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.not-found .brand-mark {
  height: clamp(120px, 18vw, 180px);
  margin-inline: auto;
}

/* ---------- 28. RUCH I DOSTĘPNOŚĆ ---------- */

[data-reveal] {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    translate: 0 12px;
    transition:
      opacity 420ms var(--ease),
      translate 420ms var(--ease);
  }

  [data-reveal].visible {
    opacity: 1;
    translate: 0 0;
  }
}

/* Obszary dotykowe: na telefonie każdy element sterujący ma co najmniej 44 px. */
@media (max-width: 760px) {
  .button.small,
  .theme-toggle,
  .nav-cart,
  .library-filters button,
  .mode-switch button,
  .activity-actions button,
  .quiz-recommendation,
  .menu-close {
    min-height: 44px;
  }

  .theme-toggle,
  .nav-cart {
    width: 44px;
  }

  .help-trigger {
    position: relative;
  }

  .help-trigger::after {
    position: absolute;
    inset: -11px;
    content: "";
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
    transition-duration: 0.001ms;
    scroll-behavior: auto;
  }
}

@media print {
  .site-header,
  .site-footer,
  .to-top,
  .essential-notice,
  .legal-toc,
  .legal-actions,
  .pnb-loader,
  .pnb-assistant-launcher,
  .pnb-assistant-panel {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .legal-doc {
    max-width: none;
  }
}
