/* ===========================================================================
   System wizualny wg DESIGN-elevenlabs.md.
   Zasady, ktorych sie trzymamy:
   - off-white plotno, ciepla prawie-czern; zadnego nasyconego koloru akcji
   - jedyne CTA to atramentowa pigulka; drugorzedne to obrys
   - kolor wnosza wylacznie pastelowe gradientowe orby - czysta atmosfera,
     nigdy tlo komponentu, nigdy wypelnienie przycisku
   - display w wadze 300 (serif), tekst Inter 400/500 z lekko luzniejszym
     trackingiem; rytm sekcji co 96px
   =========================================================================== */

:root {
  /* Atrament i tekst */
  --primary: #292524;
  --primary-active: #0c0a09;
  --ink: #0c0a09;
  --body: #4e4e4e;
  --body-strong: #292524;
  --muted: #777169;
  --muted-soft: #a8a29e;

  /* Powierzchnie */
  --canvas: #f5f5f5;
  --canvas-soft: #fafafa;
  --surface-card: #ffffff;
  --surface-strong: #f0efed;
  --surface-dark: #0c0a09;
  --surface-dark-elevated: #1c1917;
  --on-primary: #ffffff;
  --on-dark: #ffffff;
  --on-dark-soft: #a8a29e;

  /* Linie wlosowe */
  --hairline: #e7e5e4;
  --hairline-soft: #f0efed;
  --hairline-strong: #d6d3d1;

  /* Orby atmosferyczne - tylko dekoracja */
  --mint: #a7e5d3;
  --peach: #f4c5a8;
  --lavender: #c8b8e0;
  --sky: #a8c8e8;
  --rose: #e8b8c4;

  --error: #dc2626;
  --success: #16a34a;

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-xxl: 24px;
  --r-pill: 9999px;

  --display: "EB Garamond", "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, sans-serif;

  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.16px;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--primary-active); }

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

/* --- typografia: display zawsze w wadze 300 ------------------------------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 300;
  color: var(--ink);
}

h1 {
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -1.92px;
  margin: 0 0 24px;
}
h2 {
  font-size: 36px;
  line-height: 1.17;
  letter-spacing: -0.36px;
  margin: 0 0 20px;
}
h3 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  margin: 0 0 8px;
  color: var(--ink);
}
main.contained h1 { font-size: 48px; letter-spacing: -0.96px; }
.card h2 { font-size: 24px; letter-spacing: 0; }

.lead {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body);
  margin: 0 0 32px;
  max-width: 54ch;
}
.tile-center .lead { margin-left: auto; margin-right: auto; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

.fineprint { font-size: 14px; line-height: 1.5; letter-spacing: 0; color: var(--muted); }
.big { font-family: var(--display); font-size: 32px; font-weight: 300; letter-spacing: -0.32px; margin: 0 0 8px; color: var(--ink); }
.big small { font-family: var(--sans); font-size: 16px; color: var(--muted); }

strong { color: var(--body-strong); font-weight: 500; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  background: var(--surface-strong);
  padding: 2px 6px;
  border-radius: var(--r-xs, 4px);
  color: var(--ink);
}

/* --- nawigacja ------------------------------------------------------------ */

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
  padding: 0 32px;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
  font-weight: 500;
}
.topbar a { color: var(--ink); text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
/* Znak słowny stoi poza skalą typograficzną strony: ciężki, zaokrąglony,
   wersaliki. Nagłówki pozostają editorialowe w wadze 300. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; opacity: 0.78; }
.brand-mark { width: 21px; height: 24px; flex: none; }
.brand-text {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.4px;
}
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.topbar .who { color: var(--muted); font-weight: 400; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; }
.link:hover { text-decoration: underline; }

/* --- uklad ---------------------------------------------------------------- */

main.contained { max-width: 1200px; margin: 0 auto; padding: 48px 32px 96px; }
main.bleed { padding: 0; }

.tile { padding: 96px 32px; position: relative; overflow: hidden; }
.tile .wrap { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.tile-narrow .wrap { max-width: 820px; }
.tile-canvas { background: var(--canvas); }
.tile-soft { background: var(--canvas-soft); }
.tile-center { text-align: center; }

.tile-dark { background: var(--surface-dark); color: var(--on-dark-soft); }
.tile-dark h1, .tile-dark h2, .tile-dark h3 { color: var(--on-dark); }
.tile-dark .lead, .tile-dark p { color: var(--on-dark-soft); }
.tile-dark strong { color: var(--on-dark); }
.tile-dark a { color: var(--on-dark); }
.tile-dark .eyebrow { color: var(--on-dark-soft); }

/* --- orby: jedyny kolor w systemie, czysta atmosfera ---------------------- */

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.orb-mint { background: var(--mint); }
.orb-peach { background: var(--peach); }
.orb-lavender { background: var(--lavender); }
.orb-sky { background: var(--sky); }
.orb-rose { background: var(--rose); }

/* Powolny dryf. Pętle mają różną długość i ujemne opóźnienia, żeby orby
   nigdy nie wróciły do wspólnego rytmu i ruch pozostał niezauważalny. */
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(26px, -20px, 0) scale(1.04); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}
.orb { animation: drift 30s ease-in-out infinite; }
.orb-peach    { animation-duration: 38s; animation-delay: -7s; }
.orb-lavender { animation-duration: 44s; animation-delay: -15s; }
.orb-sky      { animation-duration: 34s; animation-delay: -4s; }
.orb-rose     { animation-duration: 41s; animation-delay: -11s; }

/* --- oś czasu w nagłówku --------------------------------------------------
   Słupki pokazują czas wysyłki ogłaszany każdego dnia urlopu. Po osi
   przesuwa się światło, a pod aktywnym dniem wędruje rozmyta poświata.
   Wszystko jest widoczne od razu; ruch tylko prowadzi wzrok.             */

.viz {
  position: relative;
  margin: 44px auto 0;
  max-width: 620px;
  padding: 26px 28px 20px;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xxl);
  text-align: left;
}

.viz-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.viz-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--muted);
}
.viz-label b { color: var(--ink); font-variant-numeric: tabular-nums; }
.viz-value {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.3px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.viz-value.swap { animation: swap 0.42s cubic-bezier(.22,.61,.36,1); }
@keyframes swap {
  0%   { opacity: 1; transform: translateY(0); }
  45%  { opacity: 0; transform: translateY(-10px); }
  46%  { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Poświata pod aktywnym dniem: atmosfera, nie tło komponentu. */
.viz-glow {
  position: absolute;
  bottom: 26px;
  width: 120px;
  height: 120px;
  margin-left: -60px;
  border-radius: 50%;
  background: var(--mint);
  filter: blur(34px);
  opacity: 0.6;
  pointer-events: none;
  transition: left 0.62s cubic-bezier(.4,0,.2,1), background 0.62s ease;
  z-index: 0;
}

.viz-bars {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 128px;
}
.viz-col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.viz-bar {
  border-radius: var(--r-pill);
  background: var(--surface-strong);
  transition: background 0.45s ease, transform 0.45s cubic-bezier(.22,.61,.36,1);
  transform-origin: bottom center;
}
.viz-col.done .viz-bar { background: var(--muted-soft); }
.viz-col.now .viz-bar { background: var(--ink); transform: scaleX(1.25); }

.viz-axis {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted-soft);
}

@media (max-width: 640px) {
  .viz { padding: 20px 18px 16px; }
  .viz-bars { height: 96px; gap: 5px; }
  .viz-value { font-size: 24px; }
}

/* --- wejście nagłówka ----------------------------------------------------- */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.hero-in > * { animation: rise 0.75s cubic-bezier(.22,.61,.36,1) both; }
.hero-in > :nth-child(2) { animation-delay: 0.06s; }
.hero-in > :nth-child(3) { animation-delay: 0.14s; }
.hero-in > :nth-child(4) { animation-delay: 0.22s; }
.hero-in > :nth-child(5) { animation-delay: 0.3s; }
.hero-in > :nth-child(6) { animation-delay: 0.38s; }

@media (prefers-reduced-motion: reduce) {
  .orb, .hero-in > *, .viz-value { animation: none !important; }
  .viz-glow, .viz-bar { transition: none !important; }
}

/* --- przyciski: atramentowa pigulka + obrys ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 9px 19px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: var(--ink); text-decoration: none; }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  padding: 10px 20px;
}
.btn-primary:hover { background: var(--primary-active); border-color: var(--primary-active); color: var(--on-primary); }
.btn-lg { height: 48px; padding: 14px 28px; font-size: 16px; }
.btn-danger { color: var(--error); border-color: var(--hairline-strong); }
.btn-danger:hover { border-color: var(--error); }

.tile-dark .btn { color: var(--on-dark); border-color: rgba(255, 255, 255, 0.28); }
.tile-dark .btn-primary { background: #fff; border-color: #fff; color: var(--ink); }

.inline { display: inline; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.tile-center .actions { justify-content: center; }

/* --- karty ---------------------------------------------------------------- */

.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 24px;
  margin: 0 0 24px;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card.muted { background: transparent; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.card-head h2, .card-head h3 { margin-bottom: 0; }

.grid-cards {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 48px;
}
.feature {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 24px;
  transition: box-shadow 0.2s ease;
}
.feature:hover { box-shadow: var(--shadow-soft); }
.feature p { margin: 0; font-size: 16px; color: var(--body); }
.tile-dark .feature { background: var(--surface-dark-elevated); border-color: rgba(255, 255, 255, 0.1); }

.num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}
.tile-dark .num { background: rgba(255, 255, 255, 0.1); color: var(--on-dark); }

/* Karta z orbem - jedyne miejsce, gdzie gradient dotyka tresci */
.orb-card {
  position: relative;
  overflow: hidden;
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xxl);
  padding: 32px;
}
/* :not(.orb) jest konieczne - bez tego ta regula nadpisalaby orbom
   position: absolute i dekoracja zaczelaby zajmowac miejsce w ukladzie. */
.orb-card > :not(.orb) { position: relative; z-index: 1; }

/* --- makieta panelu ------------------------------------------------------- */

.demo { margin-top: 32px; }

.demo-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.demo-step {
  padding: 9px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.demo-step:hover { border-color: var(--ink); color: var(--ink); }
.demo-step.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-primary);
}

.demo-screen {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.demo-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas-soft);
  font-size: 13px;
  color: var(--muted-soft);
}
.demo-chrome i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--hairline-strong);
  flex: none;
}
.demo-url { margin-left: 8px; font-variant-numeric: tabular-nums; }

/* Stała wysokość: bez niej strona skakałaby przy każdej zmianie etapu. */
.demo-body { position: relative; min-height: 360px; padding: 24px; }
.demo-pane { animation: pane-in 0.4s cubic-bezier(.22,.61,.36,1) both; }
@keyframes pane-in { from { opacity: 0; transform: translateY(8px); } }

.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.demo-title { font-size: 17px; font-weight: 500; color: var(--ink); }
.demo-note { font-size: 14px; color: var(--muted); margin: 0 0 16px; }

.demo-box {
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 18px;
}
.demo-box + .demo-box { margin-top: 12px; }

.demo-empty { text-align: center; padding: 40px 16px; }
.demo-empty .demo-title { margin-bottom: 6px; }

.demo-fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.demo-field { border: 1px solid var(--hairline-strong); border-radius: var(--r-md); padding: 9px 12px; }
.demo-field span { display: block; font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.demo-field b { font-weight: 500; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }

.demo-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.demo-table th {
  text-align: left; padding: 6px 10px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--hairline);
}
.demo-table td { padding: 8px 10px; border-bottom: 1px solid var(--hairline-soft); font-variant-numeric: tabular-nums; }
.demo-table tr:last-child td { border-bottom: 0; }
.demo-table tr.on td { background: var(--surface-strong); color: var(--ink); font-weight: 500; }

.demo-offer { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hairline-soft); font-size: 14px; }
.demo-offer:last-child { border-bottom: 0; }
.demo-offer .av {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: var(--r-pill); background: var(--surface-strong);
  font-size: 11px; font-weight: 600; color: var(--ink);
}
.demo-offer .nm { flex: 1; min-width: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-offer .vl { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.demo-offer .vl b { color: var(--ink); font-weight: 500; }

.demo-btn {
  display: inline-block; padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--on-primary);
  font-size: 14px; font-weight: 500;
}
.demo-btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline-strong); }

@media (max-width: 640px) {
  .demo-body { min-height: 420px; padding: 16px; }
  .demo-step { font-size: 13px; padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-pane { animation: none !important; }
}

/* --- formularze ----------------------------------------------------------- */

.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label { display: block; font-size: 15px; font-weight: 500; color: var(--ink); }
label small { display: block; font-weight: 400; color: var(--muted); margin-top: 6px; font-size: 14px; }

input[type="date"],
input[type="number"],
input[type="text"],
input[type="email"] {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  padding: 12px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  background: var(--surface-card);
  color: var(--ink);
  font: inherit;
}
input:focus { border: 2px solid var(--ink); outline: none; padding: 11px 15px; }

/* --- tabele --------------------------------------------------------------- */

.plan { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 15px; }
.plan th {
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
}
.plan td { padding: 12px; border-bottom: 1px solid var(--hairline-soft); font-variant-numeric: tabular-nums; }
.plan tr:last-child td { border-bottom: 0; }
.plan tr.is-today td { color: var(--ink); font-weight: 500; background: var(--surface-strong); }
.plan tr.is-buffer td { color: var(--muted-soft); }
.tile-dark .plan th { color: var(--on-dark-soft); border-color: rgba(255, 255, 255, 0.14); }
.tile-dark .plan td { color: var(--on-dark-soft); border-color: rgba(255, 255, 255, 0.08); }
.tile-dark .plan tr.is-today td { background: var(--surface-dark-elevated); color: var(--on-dark); }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); }

.log { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.log li { padding: 12px 0; border-bottom: 1px solid var(--hairline-soft); }
.log li:last-child { border-bottom: 0; }
.log time { color: var(--muted-soft); font-variant-numeric: tabular-nums; margin-right: 12px; font-size: 14px; }

ul { padding-left: 20px; }
li { margin-bottom: 10px; }
.bare { list-style: none; padding: 0; }
.tight { margin: 12px 0 0; padding-left: 18px; font-size: 15px; }
.tight li { margin-bottom: 6px; }
.tile-dark .tight li { color: var(--on-dark-soft); }

/* --- wiersz oferty (wzorzec voice-row) ------------------------------------ */

.offer-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}
.offer-row:last-child { border-bottom: 0; }
.offer-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--surface-strong);
  font-size: 14px;
  color: var(--ink);
}
.offer-row .name { flex: 1; min-width: 0; color: var(--ink); }
.offer-row .meta { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

/* --- komunikaty i znaczniki ----------------------------------------------- */

.notice {
  padding: 16px 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  background: var(--surface-card);
  margin: 0 0 24px;
  font-size: 15px;
  text-align: left;
}
.notice ul { margin: 0; }
.notice.ok { border-color: var(--success); color: var(--success); }
.notice.warn { border-color: var(--hairline-strong); color: var(--body); }
.notice.err { border-color: var(--error); color: var(--error); }
.notice .btn { margin-left: 8px; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-active { background: var(--ink); color: var(--on-primary); }
.badge-ok, .badge-done { background: var(--surface-strong); color: var(--success); }
.badge-failed, .badge-error { background: var(--surface-strong); color: var(--error); }
.tile-dark .badge { background: rgba(255, 255, 255, 0.12); color: var(--on-dark); }

/* --- dokumentacja --------------------------------------------------------- */

.docs {
  display: grid;
  gap: 48px;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  margin-top: 40px;
}
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; gap: 24px; } }

.docs-toc { position: sticky; top: 24px; }
@media (max-width: 860px) {
  .docs-toc {
    position: static;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    padding: 16px 18px;
  }
}
.docs-toc p {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin: 0 0 10px;
}
.docs-toc ol { list-style: none; margin: 0; padding: 0; }
.docs-toc li { margin: 0; }
.docs-toc a {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--body);
  text-decoration: none;
}
.docs-toc a:hover { color: var(--ink); text-decoration: underline; }

.docs-body > section { margin-bottom: 48px; scroll-margin-top: 20px; }
.docs-body > section:last-child { margin-bottom: 0; }
.docs-body h2 { font-size: 30px; letter-spacing: -0.3px; margin-bottom: 14px; }
.docs-body h3 { margin: 26px 0 8px; font-size: 17px; font-weight: 600; }
.docs-body p { max-width: 68ch; }
.docs-body ul, .docs-body ol { max-width: 68ch; }

/* Karta z ostrzeżeniem. Jedyne miejsce w serwisie z kolorową krawędzią,
   bo te punkty muszą rzucać się w oczy przed wyjazdem. */
.card-flag { border-left: 3px solid var(--warn, #bf4800); }
.card-flag h3 { margin-top: 0; color: #bf4800; }

details {
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface-card);
  padding: 14px 18px;
  margin-bottom: 10px;
}
details[open] { background: var(--canvas-soft); }
summary { cursor: pointer; font-weight: 500; color: var(--ink); }
summary::marker { color: var(--muted-soft); }
details p { margin: 12px 0 0; }

/* --- stopka --------------------------------------------------------------- */

footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  color: var(--body);
  padding: 64px 48px;
  font-size: 15px;
}
footer .wrap { max-width: 1200px; margin: 0 auto; display: flex; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--body); }

/* --- mniejsze ekrany ------------------------------------------------------ */

@media (max-width: 1024px) {
  h1 { font-size: 48px; letter-spacing: -0.96px; }
}
@media (max-width: 640px) {
  h1 { font-size: 32px; letter-spacing: -0.32px; }
  main.contained h1 { font-size: 32px; letter-spacing: -0.32px; }
  h2 { font-size: 28px; }
  .lead { font-size: 17px; }
  .tile { padding: 56px 20px; }
  main.contained { padding: 32px 20px 56px; }
  .topbar { padding: 0 20px; gap: 14px; height: 56px; }
  footer { padding: 48px 20px; }
}
