/* Kolory z packages/ui/src/tokens.ts aplikacji (księga znaku v1.1, kierunek „Las i miód”).
   Tło strony = fillMuted (ciepłe), ramki = surface. Miód (--accent) tylko jako ozdoba, nigdy tekst ani stan; dwa miejsca: tło pod jednym słowem nagłówka (.hl) i linia nad krokami (.steps li).
   Jeden styl ramki (.box). Bez gradientów, emoji i czerwieni. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque_800ExtraBold.pl.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --text: #1d2a20;
  --text-muted: #545f57;
  --page: #f3f1ea;
  --surface: #ffffff;
  --primary: #2e5a3c;
  --on-primary: #ffffff;
  --divider: #dcdcd3;
  --fill-none: #e3e2da;
  --selected: #e2ece4;
  --accent: #e3a33b;
  --border: #7b867e;
  --tier-minimum: #285487;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6ebe5;
    --text-muted: #a6b0a8;
    --page: #101511;
    --surface: #182019;
    --primary: #8fcb9f;
    --on-primary: #0c2414;
    --divider: #2b332c;
    --fill-none: #27302a;
    --selected: #1f3a29;
    --accent: #f0b85a;
    --border: #6e7a71;
    --tier-minimum: #8fb6e8;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 66rem; margin: 0 auto; padding: 0 1.25rem; }
p, li, dd { max-width: 70ch; }

h1, h2, h3, .task-title, .w-num {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.12;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); letter-spacing: -0.03em; margin: 0 0 1.1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); letter-spacing: -0.02em; margin: 0 0 1rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.35rem; }

a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

/* Miód jako tło pod jednym słowem nagłówka (drugie miejsce: linia nad krokami); napis na miodzie zawsze onAccent. */
.hl { background: var(--accent); color: #1d2a20; padding: 0 0.14em; border-radius: 0.12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.muted { color: var(--text-muted); font-size: 0.95rem; }

section.wrap { margin-top: 4.5rem; }

.top { padding-top: 1.5rem; padding-bottom: 0.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.5rem; color: var(--text-muted); font-size: 0.98rem; }
.brand { display: inline-block; }
.brand img { display: block; height: 45px; width: auto; }

/* Góra strony: tekst i koło */
section.hero { margin-top: 2rem; display: grid; gap: 2rem; align-items: center; }
@media (min-width: 54rem) {
  section.hero { grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; margin-top: 3rem; }
}
.lead { font-size: 1.2rem; color: var(--text-muted); margin: 0 0 1.75rem; max-width: 34rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.1rem; margin: 0; }
.cta-note { color: var(--text-muted); font-size: 0.98rem; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 12px;
  padding: 0.7rem 1.4rem;
  font-weight: 650;
  text-decoration: none;
}
.button:hover { background: var(--text); color: var(--page); }
.lang:hover { color: var(--text); }

.wheel { margin: 0; justify-self: center; width: min(100%, 30rem); }
.wheel svg { display: block; width: 100%; height: auto; }
.wheel figcaption { margin-top: 0.9rem; text-align: center; color: var(--text-muted); font-size: 0.95rem; }
.w-done { fill: var(--primary); }
.w-prog { fill: var(--primary); fill-opacity: 0.4; }
.w-none { fill: var(--fill-none); }
.w-num { fill: var(--text); font-size: 15px; letter-spacing: -0.4px; }
.w-cap { fill: var(--text-muted); font-size: 6.5px; font-family: system-ui, sans-serif; }
/* Koło wypełnia się przy wejściu: pola zapalają się obszar po obszarze, od środka. Sam CSS. */
@keyframes zapal { from { fill: var(--fill-none); fill-opacity: 1; } }
.w-done, .w-prog { animation: zapal 0.45s ease-out backwards; animation-delay: calc(0.25s + var(--s, 0) * 70ms + var(--r, 0) * 90ms); }
.s0 { --s: 0; } .s1 { --s: 1; } .s2 { --s: 2; } .s3 { --s: 3; } .s4 { --s: 4; }
.s5 { --s: 5; } .s6 { --s: 6; } .s7 { --s: 7; } .s8 { --s: 8; } .s9 { --s: 9; }
.r0 { --r: 0; } .r1 { --r: 1; } .r2 { --r: 2; } .r3 { --r: 3; }
@media (prefers-reduced-motion: reduce) { .w-done, .w-prog { animation: none; } }
.w-ico * { fill: none; stroke: var(--text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Pasy na całą szerokość: jasny (surface) i ciemny (kawałek ciemnej palety, jak karta „hero” w aplikacji:
   tło = text jasnej palety, w ciemnym motywie fillNone ciemnej). */
.band { margin-top: 4.5rem; padding-bottom: 4.5rem; display: flow-root; }
.band + section.wrap, .band + .band { margin-top: 4.5rem; }
.band + .band { margin-top: 0; }
.band-light { background: var(--surface); }
.band-dark {
  --text: #e6ebe5; --text-muted: #a6b0a8; --primary: #8fcb9f; --divider: #6e7a71;
  background: #1d2a20; color: var(--text);
}
@media (prefers-color-scheme: dark) { .band-dark { background: #27302a; } }

/* Układy */
.cols, .pair { display: grid; gap: 3.5rem 3rem; }
.cols { row-gap: 1rem; }
@media (min-width: 54rem) { .cols, .pair { grid-template-columns: 1fr 1fr; } }
.cols p { margin: 0; }
.pair > div > :first-child { margin-top: 0; }
.pair { align-items: start; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem 2.5rem; counter-reset: krok; }
@media (min-width: 54rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: krok; border-top: 3px solid var(--accent); padding-top: 0.9rem; }
.steps li::before {
  content: counter(krok);
  display: block;
  font: 800 2.2rem/1 "Bricolage Grotesque", system-ui, sans-serif;
  color: var(--primary);
  margin-bottom: 0.6rem;
}
.steps p { margin: 0; color: var(--text-muted); }

/* Jedyny styl ramki */
.box { background: var(--surface); border-radius: 16px; padding: 1.4rem 1.5rem; }
.task p { margin: 0 0 0.8rem; }
.task p:last-child { margin-bottom: 0; }
.task-row { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; }
.check { width: 26px; height: 26px; margin-top: 0.15rem; border: 2px solid var(--border); border-radius: 7px; }
.task-note { color: var(--text-muted); font-style: italic; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { border: 1.5px solid var(--border); border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.9rem; }
.chip-tier { border-color: var(--tier-minimum); }
.task-label { color: var(--text-muted); font-size: 0.9rem; letter-spacing: 0.03em; text-transform: uppercase; }
.task-title { font-size: 1.35rem; letter-spacing: -0.01em; }
.note { margin: 0; max-width: none; font-weight: 600; }

.lines { list-style: none; margin: 0; padding: 0; }
.lines li { position: relative; padding: 0.75rem 0 0.75rem 1.9rem; border-top: 1px solid var(--divider); }
/* Punktor: odcinek pierścienia ze znaku, w kolorze marki (maska, żeby kolor szedł z palety pasa). */
.lines li::before {
  content: ""; position: absolute; left: 0; top: 1.22rem; width: 1.15rem; height: 0.6rem;
  background: var(--primary);
  -webkit-mask: url("img/punkt.svg") center / contain no-repeat; mask: url("img/punkt.svg") center / contain no-repeat;
}
.lines li:last-child { border-bottom: 1px solid var(--divider); }

.faq { margin: 0; display: grid; gap: 0 3rem; }
@media (min-width: 54rem) { .faq { grid-template-columns: 1fr 1fr; } }
.faq > div { padding: 1rem 0; border-top: 1px solid var(--divider); }
.faq dt { font-weight: 700; margin-bottom: 0.3rem; }
.faq dd { margin: 0; color: var(--text-muted); }

/* Podstrony tekstowe */
.text { padding-top: 2rem; }
.text h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.text h2 { font-size: 1.25rem; margin-top: 2.2rem; }

footer {
  margin-top: 4.5rem;
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--divider);
  color: var(--text-muted);
  font-size: 0.95rem;
}
footer.wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
footer a { color: inherit; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; margin-bottom: 0.75rem; }
.foot p { margin: 0; }
.foot-brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 650; }
/* Znak w stopce: mały znak (bez drzwi) wprost w stronie, kolor z palety przez currentColor — czytelny w obu
   motywach, działa też przy otwarciu pliku bez serwera; nie ściska się, gdy napis się zawija. */
.foot-mark { flex-shrink: 0; width: 28px; height: 28px; color: var(--primary); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
@media (prefers-reduced-motion: no-preference) { .button, a { transition: background-color 0.15s, color 0.15s; } }

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