/* Fundament box modelu */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Reset minimum */
* {
  margin: 0;
  padding: 0;
}

/* Fundament czytania */
body {
  font-family: system-ui, sans-serif;

  /* 18px → 26px płynnie od ~320px do 2560px+ */
  font-size: clamp(1.125rem, 0.95rem + 0.8vw, 1.625rem);

  line-height: 1.55;
  text-rendering: optimizeLegibility;
  color: #1a1a1a;
  background: #faf9f5;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Kontener */
.w {
  max-width: 56ch;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  display: grid;
  gap: clamp(1.2rem, 1.4vw, 1.8rem);
}

/* Nawigacja */
nav {
  margin-block: 1lh;
	display: grid;
  gap: 0.1lh;
}

/* Nagłówki */
h1, h2, h3 {
  scroll-margin-top: 1.2em;
  line-height: 1.1;
  margin-top: 2lh;
}

/* odstęp po nagłówku */
h1 + *,
h2 + *,
h3 + * {
  margin-top: 0.5lh;
}


/* Tekst */
p {
  margin-bottom: 1lh;
  hyphens: none;
  }

main p:last-of-type {
  margin-bottom: 3lh;
}

/* Listy */
ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  
}

ul + ul {
  margin-top: 2lh;
}

/* Linki */
a {
  color: inherit;
  text-decoration: none;
  }

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Linki w treści */
p a {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 0.08em;
}

p a:hover {
  text-decoration: none;
}

/* Cytaty */
blockquote {
  margin: 2lh 0;
  padding-left: 1rem;
  font-style: italic;
  border-left: 1px solid #1a1a1a;
}

blockquote footer {
  margin-top: 0.4rem;
  font-size: 0.9em;
  font-style: normal;
}

/* Media */
figure{margin: 2lh 0;
text-align: center}
img{max-width: 100%;
height: auto}
figcaption{font-size: 0.85em;
line-height: 1.4}

footer {
  margin-top: 3lh;
  padding-bottom: 1lh;
}