/* ==========================================================================
   ksef-poradnik.pl — arkusz stylów (statyczny, bez CDN i zewnętrznych fontów)
   Paleta: atrament + papier + amber (ostrzeżenie) + zieleń (sprawdzone).
   ========================================================================== */

@font-face {
  font-family: "Barlow SC";
  src: url("/assets/fonts/barlow-sc-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow SC";
  src: url("/assets/fonts/barlow-sc-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url("/assets/fonts/source-sans-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url("/assets/fonts/source-sans-600.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f5f0e4;
  --paper-2: #ebe4d3;
  --card: #fffdf6;
  --ink: #132029;
  --ink-soft: #2b3a42;
  --muted: #4f5f61;
  --line: #c7bda8;
  --line-dark: #8f8674;
  --navy: #0d2537;
  --navy-2: #16384f;
  --amber: #a45f0a;
  --amber-bright: #e3a33c;
  --amber-pale: #f8e8c8;
  --red: #8d2f22;
  --red-pale: #f6ddd6;
  --teal: #175a4c;
  --teal-pale: #dce9e1;
  --focus: #0b57d0;
  --shadow: 5px 5px 0 var(--ink);
  --font-body: "Source Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Barlow SC", "Arial Narrow", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(19, 32, 41, .035) 1px, transparent 1px),
    linear-gradient(rgba(19, 32, 41, .025) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: .75rem 1.25rem;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.wrap {
  width: min(1140px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ---------- pasek statusu ---------- */
.statusbar {
  background: var(--navy);
  color: #f3ecdc;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .02em;
  border-bottom: 1px solid #31536b;
}
.statusbar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: .45rem 0;
}
.statusbar strong { color: #ffd28a; font-weight: 700; }
.statusbar .dot {
  display: inline-block;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #6fd2a7;
  margin-right: .35rem;
  vertical-align: .05em;
}

/* ---------- nagłówek ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 0;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: .01em;
  line-height: 1;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  background: var(--amber-bright);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: -.05em;
}
.brand-text { display: flex; flex-direction: column; gap: .15rem; }
.brand-text small {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand-tld { color: var(--amber); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .15rem;
  align-items: center;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: .86rem;
  font-weight: 600;
  padding: .45rem .55rem;
  border: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-color: var(--ink);
  background: var(--card);
}
.site-nav a.nav-cta {
  background: var(--ink);
  color: var(--card);
  border-color: var(--ink);
  margin-left: .25rem;
}
.site-nav a.nav-cta:hover { background: var(--amber); color: var(--ink); }

/* ---------- typografia ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.005em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 6vw, 4.35rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); margin-top: 0; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.35em; }
li { margin-bottom: .4em; }
strong { font-weight: 600; }
small { font-size: .85rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 .8rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: var(--amber);
}
.lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
}
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }

.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.8rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul li::marker { color: var(--amber); font-weight: 700; }

/* ---------- hero ---------- */
.hero {
  padding: clamp(2.2rem, 5vw, 4.2rem) 0 clamp(2rem, 4vw, 3.2rem);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: clamp(1.6rem, 4vw, 3.5rem);
  align-items: start;
}
.hero h1 { margin-bottom: .5rem; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 58%, var(--amber-bright) 58%, var(--amber-bright) 92%, transparent 92%);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 1.5rem 0 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .72rem 1.1rem;
  border: 2px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); color: var(--ink); }
.btn-primary { background: var(--amber-bright); }
.btn-dark { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: 3px 3px 0 var(--amber); }
.btn-dark:hover { color: #fff; }

.hero-note {
  font-size: .82rem;
  color: var(--muted);
  border-left: 3px solid var(--line-dark);
  padding-left: .8rem;
  max-width: 58ch;
}

/* karta terminów */
.term-card {
  background: var(--card);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem 1.25rem;
  position: relative;
}
.term-card::before {
  content: "TERMINARZ";
  position: absolute;
  top: -0.72rem;
  left: 1rem;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .16em;
  padding: .18rem .5rem;
}
.term-card ol { list-style: none; margin: 0; padding: 0; }
.term-card li {
  display: grid;
  grid-template-columns: 5.1rem 1fr;
  gap: .6rem;
  padding: .62rem 0;
  border-bottom: 1px dashed var(--line);
  margin: 0;
  align-items: start;
}
.term-card li:last-child { border-bottom: 0; }
.term-date {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  color: var(--amber);
  padding-top: .1rem;
}
.term-body { font-size: .88rem; line-height: 1.4; }
.term-body strong { display: block; margin-bottom: .1rem; }
.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .1rem .38rem;
  border: 1px solid currentColor;
  margin-top: .2rem;
}
.pill-done { color: var(--teal); background: var(--teal-pale); }
.pill-next { color: var(--red); background: var(--red-pale); }

/* ---------- sekcje ---------- */
.section { padding: clamp(2.2rem, 5vw, 4rem) 0; border-bottom: 1px solid var(--line); }
.section-alt { background: rgba(255, 253, 246, .55); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.5rem 2.5rem;
  align-items: end;
  margin-bottom: 2rem;
}
.section-head h2 { margin-bottom: 0; }
.section-head p { margin-bottom: 0; color: var(--muted); }
.section-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber);
  border-top: 2px solid var(--ink);
  padding-top: .45rem;
  display: block;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line-dark);
  padding: 1.25rem 1.3rem;
  position: relative;
}
.card h3 { margin-bottom: .45rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card-index {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--amber);
  font-weight: 700;
  letter-spacing: .1em;
  display: block;
  margin-bottom: .45rem;
}
.card-accent { border-top: 5px solid var(--amber-bright); }
.card-dark { background: var(--navy); color: #eef2ef; border-color: var(--navy); }
.card-dark h3 { color: #fff; }
.card-dark a { color: #ffd28a; }

/* statystyki */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 2px solid var(--ink);
  background: var(--card);
  margin: 1.6rem 0;
}
.stat { padding: 1rem 1.1rem; border-right: 2px solid var(--ink); }
.stat:last-child { border-right: 0; }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.85rem;
  line-height: 1;
  margin-bottom: .25rem;
}
.stat span { font-size: .8rem; color: var(--muted); line-height: 1.35; display: block; }

/* alerty */
.alert {
  border: 2px solid var(--ink);
  border-left: 8px solid var(--red);
  background: var(--red-pale);
  padding: 1rem 1.15rem;
  margin: 1.3rem 0;
}
.alert h3, .alert h2 { font-size: 1.15rem; margin-bottom: .35rem; }
.alert p:last-child { margin-bottom: 0; }
.alert-info { border-left-color: var(--teal); background: var(--teal-pale); }
.alert-warn { border-left-color: var(--amber); background: var(--amber-pale); }

/* ---------- tabela ---------- */
.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--ink);
  background: var(--card);
  margin: 1.4rem 0;
}
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
caption {
  caption-side: top;
  text-align: left;
  font-size: .8rem;
  color: var(--muted);
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--line);
}
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  background: var(--navy);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 0;
}
tbody tr:nth-child(even) { background: rgba(235, 228, 211, .45); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { font-family: var(--font-mono); white-space: nowrap; }
.tick { color: var(--teal); font-weight: 700; }
.cross { color: var(--red); font-weight: 700; }
.dash { color: var(--muted); }

/* ---------- oś czasu ---------- */
.timeline { list-style: none; margin: 1.5rem 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6.6rem;
  top: .4rem;
  bottom: .4rem;
  width: 2px;
  background: var(--line-dark);
}
.timeline li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1.6rem;
  margin: 0 0 1.3rem;
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 6.28rem;
  top: .55rem;
  width: .7rem;
  height: .7rem;
  background: var(--amber-bright);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
}
.timeline time {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  color: var(--amber);
  text-align: right;
  padding-top: .25rem;
}
.timeline div { padding-left: .2rem; }
.timeline h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.timeline p { margin-bottom: .3rem; font-size: .93rem; }

/* ---------- listy definicji / kroki ---------- */
.steps { list-style: none; counter-reset: step; margin: 1.5rem 0; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 1rem 0 1rem 3.4rem;
  border-top: 1px solid var(--line);
  margin: 0;
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .95rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 700;
  color: var(--amber);
  border: 2px solid var(--ink);
  padding: .1rem .3rem;
  background: var(--card);
  box-shadow: 2px 2px 0 var(--ink);
}
.steps h3 { font-size: 1.08rem; margin-bottom: .25rem; }
.steps p:last-child { margin-bottom: 0; }

.checks { list-style: none; padding: 0; margin: 1rem 0; }
.checks li { padding-left: 1.7rem; position: relative; margin-bottom: .55rem; }
.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal);
  font-weight: 700;
}
.checks-x li::before { content: "×"; color: var(--red); }

/* ---------- CTA afiliacyjne ---------- */
.cta-box {
  border: 2px solid var(--ink);
  background: var(--amber-pale);
  padding: 1.2rem 1.25rem 1.3rem;
  margin: 1.6rem 0;
  box-shadow: var(--shadow);
  position: relative;
}
.cta-box h3 { margin-bottom: .35rem; }
.cta-box p { font-size: .93rem; }
.cta-box .aff-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--ink);
  color: #fff;
  padding: .15rem .45rem;
  margin-bottom: .55rem;
}
.cta-box .aff-note { font-size: .75rem; color: var(--muted); margin: .55rem 0 0; }
.cta-inline { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .8rem; }

/* ---------- checklista ---------- */
.tool {
  border: 2px solid var(--ink);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 3vw, 1.8rem);
  margin: 1.5rem 0 2rem;
}
.tool h2, .tool h3 { margin-bottom: .4rem; }
.progress {
  height: 1rem;
  background: var(--paper-2);
  border: 1px solid var(--ink);
  margin: .8rem 0 .3rem;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--teal);
  transition: width .25s ease;
}
.progress-meta { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin-bottom: 1rem; }
.check-phase { border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .9rem; }
.check-phase h3 { font-size: .95rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--amber); }
.check-item {
  display: grid;
  grid-template-columns: 1.35rem 1fr;
  gap: .6rem;
  align-items: start;
  padding: .45rem .2rem;
  border-bottom: 1px dashed rgba(199, 189, 168, .8);
}
.check-item:last-child { border-bottom: 0; }
.check-item input {
  width: 1.15rem;
  height: 1.15rem;
  margin: .2rem 0 0;
  accent-color: var(--teal);
}
.check-item label { font-size: .93rem; line-height: 1.45; cursor: pointer; }
.check-item input:checked + label { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: 1.1rem; }

/* kalkulator */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: 1.5rem; align-items: start; margin-top: 1rem; }
.field { margin-bottom: 1rem; }
.field label, .field legend { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field .hint { font-size: .78rem; color: var(--muted); margin: .25rem 0 0; }
.field input[type="number"], .field select {
  width: 100%;
  padding: .6rem .7rem;
  border: 2px solid var(--ink);
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  border-radius: 0;
}
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.radio-row { display: flex; flex-wrap: wrap; gap: .45rem 1rem; }
.radio-row label { display: inline-flex; align-items: center; gap: .35rem; font-weight: 400; font-size: .9rem; margin: 0; }
.radio-row input { width: 1.1rem; height: 1.1rem; accent-color: var(--teal); }
.result {
  border: 2px solid var(--ink);
  background: var(--navy);
  color: #f4f1e6;
  padding: 1.2rem;
}
.result .result-label {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #ffd28a;
  margin-bottom: .4rem;
}
.result .result-date {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.05;
  color: #fff;
  margin-bottom: .5rem;
}
.result p { font-size: .9rem; color: #e5e2d6; }
.result p:last-child { margin-bottom: 0; }
.result .result-small { font-size: .78rem; color: #c8c6ba; }

/* ---------- FAQ ---------- */
.faq { margin: 1.5rem 0; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.2rem 1rem 0;
  font-weight: 600;
  font-size: 1.02rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: .2rem;
  top: .9rem;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--amber);
}
.faq details[open] summary::after { content: "−"; }
.faq .faq-a { padding: 0 0 1.1rem; max-width: 74ch; }
.faq .faq-a p:last-child { margin-bottom: 0; }
.faq .faq-a ul { margin-bottom: .6rem; }

/* ---------- źródła ---------- */
.sources { list-style: none; padding: 0; margin: 1.2rem 0; counter-reset: src; }
.sources li {
  counter-increment: src;
  position: relative;
  padding: .7rem 0 .7rem 2.2rem;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
  margin: 0;
}
.sources li::before {
  content: "[" counter(src) "]";
  position: absolute;
  left: 0;
  top: .72rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--amber);
  font-weight: 700;
}
.sources a { word-break: break-word; }

/* ---------- nawigacja stron / powiązane ---------- */
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.4rem 0; }
.related a {
  display: block;
  border: 1px solid var(--line-dark);
  background: var(--card);
  padding: 1rem;
  text-decoration: none;
  color: var(--ink);
}
.related a:hover { border-color: var(--ink); background: var(--amber-pale); }
.related strong { display: block; margin-bottom: .2rem; }
.related span { font-size: .82rem; color: var(--muted); }

/* ---------- stopka ---------- */
.site-footer {
  background: var(--navy);
  color: #dfe6e2;
  padding: 2.6rem 0 1.2rem;
  font-size: .88rem;
}
.site-footer a { color: #ffd28a; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr 1.2fr;
  gap: 2rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid #31536b;
}
.footer-brand p { margin-bottom: .7rem; }
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: #fff;
  margin-bottom: .5rem;
  line-height: 1;
}
.footer-logo span { color: var(--amber-bright); }
.footer-h {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9fb6c4;
  margin-bottom: .6rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.footer-data p { font-size: .8rem; color: #c4d1d8; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  padding-top: 1rem;
  font-size: .78rem;
  color: #aebfc9;
}
.footer-bottom p { margin: 0; }
.placeholder { color: #7a3f00; font-family: var(--font-mono); font-size: .78rem; }
.site-footer .placeholder { color: #ffd28a; }

/* ---------- 404 ---------- */
.error-page { padding: clamp(2.5rem, 7vw, 5rem) 0; }
.error-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 13rem);
  line-height: .85;
  color: var(--amber-bright);
  -webkit-text-stroke: 2px var(--ink);
  margin: 0 0 .5rem;
}

/* ---------- drobne ---------- */
.crumbs { font-size: .8rem; margin: 0 0 1.2rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; color: var(--line-dark); margin-right: .3rem; }
.crumbs a { color: var(--muted); }

.page-head { padding: 2rem 0 1.4rem; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: .5rem; }
.page-head .lede { max-width: 68ch; }
.page-meta {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.2rem;
  margin-top: 1rem;
}

.toc {
  border: 1px solid var(--line-dark);
  background: var(--card);
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
}
.toc p { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin-bottom: .5rem; }
.toc ol { margin: 0; padding-left: 1.2rem; font-size: .9rem; }

.compare-note {
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: .7rem;
  margin-top: .6rem;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--line-dark);
  padding: .08rem .35rem;
  color: var(--muted);
  margin-right: .2rem;
}
.tag-free { color: var(--teal); border-color: var(--teal); background: var(--teal-pale); }
.tag-paid { color: var(--amber); border-color: var(--amber); background: var(--amber-pale); }

.quote {
  border-left: 4px solid var(--amber);
  padding: .5rem 0 .5rem 1rem;
  margin: 1.2rem 0;
  font-style: italic;
  color: var(--ink-soft);
}
.quote cite { display: block; font-style: normal; font-size: .78rem; color: var(--muted); margin-top: .4rem; }

/* ---------- responsywność ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; gap: .6rem; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 2px solid var(--ink); }
  .calc-grid { grid-template-columns: 1fr; }
  .related { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 1.02rem; }
  .wrap { width: calc(100% - 1.6rem); }
  .site-nav { width: 100%; gap: 0; }
  .site-nav a { padding: .4rem .45rem; font-size: .8rem; }
  .site-nav a.nav-cta { margin-left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: .8rem; }
  .stat b { font-size: 1.5rem; }
  .timeline::before { left: .42rem; }
  .timeline li { grid-template-columns: 1fr; gap: .15rem; padding-left: 1.6rem; }
  .timeline li::before { left: .05rem; }
  .timeline time { text-align: left; }
  .related { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.3rem; }
  .table-wrap { border-width: 1px; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { border-bottom: 2px solid var(--ink); padding: .45rem 0; }
  tbody tr:last-child { border-bottom: 0; }
  tbody tr:nth-child(even) { background: rgba(235, 228, 211, .45); }
  td, th { border-bottom: 1px dashed var(--line); padding: .5rem .75rem; }
  td:last-child, th:last-child { border-bottom: 0; }
  td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: .12rem;
  }
  td.num { white-space: normal; }
  .term-card li { grid-template-columns: 4.4rem 1fr; }
  h1 { font-size: clamp(2.05rem, 11vw, 3rem); }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  body { background: #fff; color: #000; }
  .statusbar, .site-nav, .site-footer, .cta-box, .tool-actions { display: none; }
  .section { break-inside: avoid; }
}

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