/* Migiem: papier i atrament. Ciepła biel, prawie czarny tekst, kolor tylko tam, gdzie coś znaczy. */

@font-face {
  font-family: "Geist";
  src: url("/assets/geist-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f6f5f1;
  --card: #ffffff;
  --text: #161615;
  --text-2: #71706b;
  --text-3: #a8a7a1;
  --border: #e4e2dc;
  --input: #eeede8;
  --primary: #161615;
  --on-primary: #ffffff;
  --soft: #e9e7e1;
  --success: #1d7348;
  --success-bg: #e3f0e7;
  --warning: #94570a;
  --warning-bg: #f5ecda;
  --shadow: rgba(22, 22, 21, 0.14);
  --frame: #161615;

  --display: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --gutter: 20px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0e;
    --card: #191918;
    --text: #f2f1ec;
    --text-2: #a3a19a;
    --text-3: #5e5d58;
    --border: #2a2926;
    --input: #21201e;
    --primary: #f2f1ec;
    --on-primary: #121211;
    --soft: #262522;
    --success: #62c08e;
    --success-bg: #15261c;
    --warning: #e0a54c;
    --warning-bg: #2a2112;
    --shadow: rgba(0, 0, 0, 0.5);
    --frame: #2c2b28;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
.display {
  font-family: var(--display);
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 8vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
}

h2 {
  font-size: clamp(1.625rem, 5vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0 0 6px;
}

p,
ul,
ol {
  margin: 0 0 16px;
}

strong {
  font-weight: 600;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--primary);
  color: var(--on-primary);
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Nagłówek ---------- */

.site-header .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: 68px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.brand img {
  flex: none;
  width: 32px;
  height: 32px;
  max-width: none;
  border-radius: 8px;
}

@media (prefers-color-scheme: dark) {
  .brand img {
    box-shadow: 0 0 0 1px var(--border);
  }
}

.site-header nav {
  display: flex;
  gap: 4px;
  margin-right: -12px;
}

@media (max-width: 359px) {
  .site-header nav {
    margin-left: -12px;
  }
}

.site-header nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: 999px;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--text);
  background: var(--soft);
}

/* ---------- Sekcje ---------- */

main {
  display: block;
}

.section {
  padding-block: 56px;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.lead {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--text);
  max-width: 36em;
}

.muted {
  color: var(--text-2);
}

.small {
  font-size: 0.9375rem;
}

/* ---------- Karty i siatki ---------- */

.grid {
  display: grid;
  gap: 16px;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
}

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

.card h3 {
  margin-bottom: 8px;
}

.card .num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.875rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--on-primary);
  margin-bottom: 14px;
}

.steps {
  list-style: none;
  padding: 0;
  counter-reset: none;
}

.check,
.cross {
  list-style: none;
  padding: 0;
}

.check li,
.cross li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

.check li::before,
.cross li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.check li::before {
  background: var(--success-bg);
  box-shadow: inset 0 0 0 1px var(--success);
}

.check li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: calc(0.32em + 5px);
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--success);
  border-bottom: 2px solid var(--success);
  transform: rotate(-45deg);
}

.cross li::before {
  background: var(--soft);
}

.cross li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: calc(0.32em + 8px);
  width: 8px;
  height: 2px;
  background: var(--text-2);
}

/* ---------- Tabele ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9688rem;
  line-height: 1.5;
}

caption {
  text-align: left;
  padding: 14px 18px 0;
  color: var(--text-2);
  font-size: 0.875rem;
}

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

thead th {
  border-top: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

caption + thead th {
  border-top: 0;
}

tbody th {
  font-weight: 600;
  min-width: 9em;
}

/* Wąski ekran: wiersze tabeli jako karty, bez przewijania w bok. */
@media (max-width: 599px) {
  .stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .stack tr,
  .stack th,
  .stack td {
    display: block;
  }

  .stack tr {
    border-top: 1px solid var(--border);
    padding: 12px 0;
  }

  .stack tbody tr:first-child {
    border-top: 0;
  }

  .stack th,
  .stack td {
    border: 0;
    padding: 2px 18px;
    white-space: normal;
  }

  .stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-2);
    margin-top: 6px;
  }
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 16px;
}

@media (min-width: 820px) {
  .faq {
    grid-template-columns: repeat(2, 1fr);
  }
}

.faq h3 {
  font-size: 1.0625rem;
}

/* ---------- Teksty (poradniki, polityka, wsparcie) ---------- */

.prose {
  max-width: 44rem;
  margin-inline: auto;
  padding-block: 16px 64px;
}

.prose h1 {
  font-size: clamp(2rem, 6.5vw, 3rem);
}

.prose h2 {
  font-size: clamp(1.5rem, 4.5vw, 1.875rem);
  margin-top: 48px;
}

.prose h3 {
  margin-top: 28px;
}

.prose li {
  margin-bottom: 6px;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose .check,
.prose .cross {
  padding-left: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.9375rem;
  color: var(--text-2);
  margin-bottom: 28px;
}

.meta strong {
  color: var(--text);
}

.crumbs {
  font-size: 0.875rem;
  color: var(--text-2);
  margin: 8px 0 24px;
}

.crumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 4px;
  color: var(--text-3);
}

.callout {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin: 0 0 20px;
}

.callout.warn {
  background: var(--warning-bg);
  border-color: var(--warning-bg);
  border-left-color: var(--warning);
}

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

.todo {
  background: var(--warning-bg);
  color: var(--warning);
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.sources {
  font-size: 0.9375rem;
}

.sources li {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.app-note {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin: 24px 0;
}

.app-note p:last-child,
.app-note ol:last-child {
  margin-bottom: 0;
}

.prose .app-note h2 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--input);
  padding: 1px 5px;
  border-radius: 4px;
}

.guide-list,
.prose .guide-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
}

.guide-list a {
  display: block;
  text-decoration: none;
}

.prose .guide-list h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.guide-list p:last-child {
  margin-bottom: 0;
}

.guide-list a:hover h2,
.guide-list a:hover h3 {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ---------- Stopka ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 40px 48px;
  font-size: 0.9375rem;
  color: var(--text-2);
}

.site-footer .cols {
  display: grid;
  gap: 24px;
  margin-bottom: 28px;
}

@media (min-width: 720px) {
  .site-footer .cols {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h2 {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
  margin: 0 0 10px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 2px;
}

.site-footer li a {
  display: inline-block;
  padding-block: 4px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
  color: var(--text);
}

.disclaimer {
  color: var(--text);
  max-width: 34em;
}

.site-footer .disclaimer a {
  text-decoration: underline;
}

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