/* ============================================================
   Kranówka - design system "Woda mineralna"
   Paleta dobrana do tematu (woda, instalacje, mineraly):
   - petrol / mineralna zieleń: woda glebinowa, zaufanie, technika
   - miedz: instalacje, mosiadz, armatura - akcent CTA
   - wapien biel o chlodnym odcieniu: kamien, filtry, laboratorium
   - atrament: gleboka petrol-czerń dla tekstu (kontrast > 12:1)
   Typografia: Bricolage Grotesque (naglowki, nawigacja)
                Source Serif 4 (tresc artykulow)
   ============================================================ */

:root {
  --brand: #0d4f4a;
  --brand-deep: #072e2b;
  --brand-soft: #dcebe5;
  --accent: #b0562c;
  --accent-hover: #96441f;
  --accent-soft: #f6e6dc;
  --bg: #f1f5f2;
  --bg-alt: #e6eeea;
  --surface: #ffffff;
  --text: #0e2422;
  --muted: #4a615c;
  --line: #d5e0da;
  --line-strong: #b9c9c1;

  --blue-soft: #dcecf4;
  --red-soft: #f8e3e0;
  --amber-soft: #f8eed6;
  --green-soft: #dfeee1;

  --on-brand: #f4faf7;
  --on-brand-muted: #b6d3ca;

  --shadow-sm: 0 1px 2px rgba(14, 36, 34, 0.06);
  --shadow-lift: 0 10px 24px rgba(14, 36, 34, 0.10);

  --radius: 10px;
  --radius-sm: 6px;
  --header-height: 68px;
  --sidebar-width: 296px;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #3fae9c;
    --brand-deep: #051715;
    --brand-soft: #0f2a26;
    --accent: #e08a5c;
    --accent-hover: #eda578;
    --accent-soft: #2c1a12;
    --bg: #07110f;
    --bg-alt: #0c1a17;
    --surface: #101e1a;
    --text: #e9f1ed;
    --muted: #a6bcb5;
    --line: #1e322c;
    --line-strong: #2b453d;

    --blue-soft: #102a36;
    --red-soft: #2e1715;
    --amber-soft: #2b2211;
    --green-soft: #13291a;

    --on-brand: #eaf7f3;
    --on-brand-muted: #9fc6bb;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lift: 0 12px 28px rgba(0, 0, 0, 0.5);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 17px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.72;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 55vw 34vh at -8% -6%, var(--brand-soft) 0%, transparent 62%),
    radial-gradient(ellipse 45vw 30vh at 108% 104%, var(--accent-soft) 0%, transparent 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--brand); color: var(--on-brand);
  padding: 10px 18px; font-family: var(--font-display); font-weight: 600;
}
.skip-link:focus { left: 12px; top: 10px; }

/* ------------------------------------------------------------
   Naglowek
   ------------------------------------------------------------ */
.app-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .app-header { background: var(--bg); }
}

.read-progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px; width: 0;
  background: var(--accent);
  transition: width 90ms linear;
}

.header-inner {
  max-width: 1480px;
  margin: 0 auto;
  height: 100%;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { color: var(--text); }
.brand-mark {
  align-self: center;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  flex-shrink: 0;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 2px;
}

.search-box {
  position: relative;
  margin-left: auto;
  width: min(360px, 42vw);
}
.search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.86rem;
}
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.search-box input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 6px;
  z-index: 200;
}
.search-results a {
  display: block;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
}
.search-results a:hover, .search-results a:focus { background: var(--brand-soft); color: var(--text); }
.search-results a strong { font-weight: 600; }
.search-empty { padding: 12px; font-family: var(--font-display); font-size: 0.86rem; color: var(--muted); }

.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  padding: 11px 10px;
  flex-direction: column;
  justify-content: space-between;
}
.menu-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--text);
  transition: transform 180ms var(--ease-out), opacity 140ms linear;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ------------------------------------------------------------
   Uklad: staly lewy sidebar + tresc
   ------------------------------------------------------------ */
.layout {
  max-width: 1480px;
  margin: 0 auto;
  padding-top: var(--header-height);
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 30px 20px 56px 28px;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

.nav-section { margin-bottom: 26px; }
.nav-section-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
  padding-left: 10px;
}
.sidebar-link {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.sidebar-link:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
  transform: translateX(2px);
}
@media (prefers-color-scheme: dark) {
  .sidebar-link:hover { color: var(--text); }
}
.sidebar-link.active {
  background: var(--brand);
  color: var(--on-brand);
}
.sidebar-link.active:hover { background: var(--brand-deep); color: var(--on-brand); }

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(7, 23, 21, 0.5);
  z-index: 109;
}

.main {
  min-width: 0;
  padding: 34px 52px 96px;
}

/* ------------------------------------------------------------
   Hero na stronie glownej - jedna kompozycja
   ------------------------------------------------------------ */
.home-hero {
  position: relative;
  display: block;
  min-height: 470px;
  background: var(--brand-deep);
  color: var(--on-brand);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 60% 52%;
  filter: saturate(0.85) contrast(1.04);
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(96deg,
    rgba(7, 46, 43, 0.97) 0%,
    rgba(7, 46, 43, 0.9) 30%,
    rgba(7, 46, 43, 0.28) 56%,
    rgba(7, 46, 43, 0.02) 86%,
    rgba(7, 46, 43, 0) 100%);
  pointer-events: none;
}
.hero-copy {
  position: relative; z-index: 2;
  max-width: 660px;
  min-height: 470px;
  padding: 60px 54px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 17px;
}
.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--on-brand);
}
.hero-brand .dot { color: var(--accent); }
.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.45vw, 2.08rem);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -0.015em;
  color: var(--on-brand);
  max-width: 24ch;
  text-wrap: balance;
}
.home-hero p {
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--on-brand-muted);
  max-width: 46ch;
}
.hero-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 13px 22px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.hero-cta:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.hero-cta:active { transform: scale(0.98); }
.hero-cta svg { width: 16px; height: 16px; }

@media (prefers-color-scheme: dark) {
  .hero-media img { filter: saturate(0.6) brightness(0.9); }
}

/* ------------------------------------------------------------
   Strona glowna: sekcje i lista artykulow (bez kart)
   ------------------------------------------------------------ */
.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  padding: 34px 0 10px;
  border-bottom: 1px solid var(--line);
}
.home-intro p {
  max-width: 66ch;
  color: var(--muted);
  font-size: 1rem;
}
.home-intro p + p { margin-top: 12px; }
.intro-note {
  border-top: 2px solid var(--accent);
  padding-top: 12px;
  font-family: var(--font-display);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text);
}
.intro-note span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.home-section { padding: 42px 0 6px; border-bottom: 1px solid var(--line); }
.home-section:last-of-type { border-bottom: 0; }
.home-section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 4px;
}
.home-section h2 {
  font-family: var(--font-display);
  font-size: 1.34rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.section-desc {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 18px;
}

.art-list { list-style: none; }
.art-list li { border-top: 1px solid var(--line); }
.art-list li:first-child { border-top: 0; }
.art-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 20px;
  padding: 15px 2px 15px 0;
  text-decoration: none;
  color: var(--text);
  transition: transform 180ms var(--ease-out), padding-left 180ms var(--ease-out);
}
.art-list a:hover { color: var(--text); padding-left: 8px; }
.art-list .art-title {
  font-family: var(--font-display);
  font-size: 1.03rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.art-list a:hover .art-title { color: var(--brand); }
.art-list .art-excerpt {
  grid-column: 1;
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 70ch;
}
.art-arrow {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--line-strong);
  transition: transform 200ms var(--ease-out), color 200ms var(--ease-out);
}
.art-arrow svg { width: 18px; height: 18px; display: block; }
.art-list a:hover .art-arrow { color: var(--accent); transform: translateX(4px); }

/* ------------------------------------------------------------
   Podstrona artykulu
   ------------------------------------------------------------ */
.article-header { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.72rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 30ch;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.trust-badge {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand);
}
.trust-badge svg { width: 14px; height: 14px; }

.toc {
  margin: 30px 0 34px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.toc-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.toc ol { margin-left: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; position: relative; padding-left: 30px; }
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent);
}
.toc li { margin: 4px 0; }
.toc a {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
}
.toc a { transition: color 160ms var(--ease-out), padding-left 160ms var(--ease-out); }
.toc a:hover { color: var(--accent); text-decoration: underline; padding-left: 3px; }
.toc a.is-active { color: var(--accent); font-weight: 600; }

/* Figury i podpisy */
.content-article figure { margin: 30px 0 34px; }
.content-article figure img {
  width: 100%; height: auto; display: block;
  background: var(--surface-2);
}
.content-article figcaption {
  font-family: var(--font-mono); font-size: 0.7rem; line-height: 1.5;
  color: var(--muted); padding-top: 9px; border-top: 1px solid var(--line);
  margin-top: 10px;
}

/* Sciezka startowa na stronie glownej */
.start-path { padding: 38px 0 6px; border-bottom: 1px solid var(--line); }
.start-path h2 {
  font-family: var(--font-display); font-size: 1.34rem; font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 4px;
}
.start-path > p { color: var(--muted); font-size: 0.98rem; margin-bottom: 20px; max-width: 62ch; }
.start-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding-bottom: 34px; }
.start-grid a {
  display: block; padding-top: 14px; border-top: 2px solid var(--brand);
  text-decoration: none; color: var(--text);
  transition: border-color 160ms var(--ease-out);
}
.start-grid a:hover { border-color: var(--accent); }
.start-grid .sp-step {
  display: block; font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.start-grid .sp-title {
  display: block; font-family: var(--font-display); font-size: 1.02rem;
  font-weight: 600; line-height: 1.3; margin-bottom: 6px;
}
.start-grid a:hover .sp-title { color: var(--accent); }
.start-grid .sp-desc { display: block; font-size: 0.88rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 900px) {
  .home-hero { min-height: 0; }
  .hero-copy { min-height: 520px; padding: 42px 24px 44px; max-width: none; }
  .hero-media::after {
    background: linear-gradient(180deg,
      rgba(7, 46, 43, 0.96) 0%,
      rgba(7, 46, 43, 0.92) 55%,
      rgba(7, 46, 43, 0.78) 100%);
  }
  .home-hero h1 { font-size: 1.62rem; max-width: none; } .start-grid { grid-template-columns: 1fr; gap: 18px; } }

.content-article { max-width: 72ch; }
.content-article > * { max-width: 72ch; }
.content-article p { margin: 0 0 1.1em; }
.content-article strong { font-weight: 600; }
.content-article a { color: var(--brand); }
.content-article a:hover { color: var(--accent); }

.content-article h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 2.1em 0 0.55em;
  padding-top: 0.75em;
  border-top: 1px solid var(--line);
  text-wrap: balance;
  scroll-margin-top: calc(var(--header-height) + 18px);
}
.content-article h3 {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 1.6em 0 0.45em;
  text-wrap: balance;
}
.content-article h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 1.4em 0 0.35em;
}
.content-article ul, .content-article ol { margin: 0 0 1.15em 1.35em; }
.content-article li { margin-bottom: 0.4em; }
.content-article li::marker { color: var(--accent); }
.content-article blockquote {
  margin: 1.5em 0;
  padding: 4px 0 4px 22px;
  border-left: 1px solid var(--line-strong);
  font-style: italic;
  color: var(--muted);
}
.content-article hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.content-article img { margin: 1.6em 0; border-radius: var(--radius-sm); }
.content-article figure { margin: 1.6em 0; }
.content-article figcaption {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
}

/* Boksy informacyjne - zmienne tla w obu motywach */
.info-box, .tip-box, .warning-box, .key-takeaways {
  margin: 1.7em 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.62;
}
.info-box { background: var(--blue-soft); }
.tip-box { background: var(--green-soft); }
.warning-box { background: var(--red-soft); }
.key-takeaways { background: var(--brand-soft); }
.info-box p:last-child, .tip-box p:last-child, .warning-box p:last-child,
.key-takeaways p:last-child, .info-box ul:last-child, .tip-box ul:last-child,
.warning-box ul:last-child, .key-takeaways ul:last-child { margin-bottom: 0; }
.info-box strong:first-child, .tip-box strong:first-child,
.warning-box strong:first-child, .key-takeaways strong:first-child {
  font-family: var(--font-display);
  display: block;
  margin-bottom: 6px;
}
.key-takeaways ul { margin-left: 1.2em; }
.key-takeaways li { margin-bottom: 0.35em; }

/* Tabele */
.table-responsive { overflow-x: auto; margin: 1.8em 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-display);
  font-size: 0.88rem;
  line-height: 1.45;
  min-width: 460px;
}
caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 8px;
}
th, td {
  padding: 11px 14px 11px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
thead th {
  border-bottom: 2px solid var(--line-strong);
  font-weight: 600;
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}
tbody tr:last-child td { border-bottom: 1px solid var(--line-strong); }
td.num, th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* FAQ */
.faq-item {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  transition: transform 200ms var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { padding-top: 10px; color: var(--text); }
.faq-a p:last-child { margin-bottom: 0; }

/* Slownik */
dl.glossary { margin: 1.4em 0; }
dl.glossary dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1.1em;
  color: var(--brand);
}
dl.glossary dd { margin: 2px 0 0; color: var(--text); }

/* Kroki */
ol.steps { list-style: none; counter-reset: step; margin: 1.6em 0; }
ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  margin-bottom: 1em;
}
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 2px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: grid; place-items: center;
}

/* Skala twardosci - element sygnaturowy */
.hardness-scale {
  margin: 1.8em 0;
  font-family: var(--font-display);
}
.hardness-scale .hs-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-bottom: 8px;
}
.hardness-scale .hs-seg {
  height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0e2422;
  background: #d9ebe2;
}
.hardness-scale .hs-seg.s2 { background: #b6d9c9; }
.hardness-scale .hs-seg.s3 { background: #e8cfa6; }
.hardness-scale .hs-seg.s4 { background: #dca98d; }
.hardness-scale .hs-axis {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}
.hardness-scale figcaption {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
}

/* Nawigacja miedzy artykulami */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}
.article-nav a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  color: var(--text);
  transition: border-color 180ms var(--ease-out), transform 180ms var(--ease-out), background 180ms var(--ease-out);
}
.article-nav a:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-2px);
}
.article-nav .nav-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 400;
}
.article-nav a:last-child { text-align: right; }

/* ------------------------------------------------------------
   Stopka
   ------------------------------------------------------------ */
.app-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  margin-top: 20px;
}
.footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 34px 52px 40px;
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-inner strong { font-family: var(--font-display); color: var(--text); }
.footer-note { max-width: 82ch; font-size: 0.84rem; line-height: 1.55; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 6px; font-family: var(--font-display); font-size: 0.86rem; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

/* ------------------------------------------------------------
   Ruch
   ------------------------------------------------------------ */
.page-enter { animation: pageIn 240ms var(--ease-out) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-media img { animation: heroReveal 700ms var(--ease-out) both; }
@keyframes heroReveal {
  from { clip-path: inset(0 0 100% 0); transform: scale(1.04); }
  to { clip-path: inset(0 0 0 0); transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .page-enter { opacity: 1; transform: none; }
  .hero-media img { clip-path: none; transform: none; }
}

/* ------------------------------------------------------------
   Responsywnosc
   ------------------------------------------------------------ */
@media (max-width: 1180px) {
  .main { padding: 30px 34px 80px; }
  .home-hero { grid-template-columns: 1fr 0.85fr; }
  .hero-copy { padding: 44px 34px; }
  .home-intro { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    height: 100dvh;
    width: min(320px, 86vw);
    background: var(--bg);
    border-right: 1px solid var(--line-strong);
    z-index: 110;
    transform: translateX(-102%);
    transition: transform 260ms var(--ease-out);
    padding: calc(var(--header-height) + 18px) 18px 40px;
    box-shadow: var(--shadow-lift);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: flex; }
  .brand-sub { display: none; }
  .header-inner { padding: 0 16px; gap: 12px; }
  .search-box { width: auto; flex: 1; min-width: 0; }
  .home-hero { min-height: 0; }
  .hero-copy { padding: 34px 22px 38px; gap: 13px; min-height: 486px; }
  .hero-media::after { background: linear-gradient(180deg, rgba(7,46,43,0.95) 0%, rgba(7,46,43,0.9) 58%, rgba(7,46,43,0.78) 100%); }
  .home-hero h1 { max-width: none; }
  .main { padding: 22px 20px 70px; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav a:last-child { text-align: left; }
  .footer-inner { padding: 28px 20px 34px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .brand-text { font-size: 1.24rem; }
  .article-header h1 { font-size: 1.72rem; }
  .content-article h2 { font-size: 1.34rem; }
  .art-list a { grid-template-columns: 1fr; }
  .art-arrow { display: none; }
  .art-list .art-excerpt { grid-column: 1; }
  .hero-brand { font-size: 2.5rem; }
  table { font-size: 0.84rem; }
  .hardness-scale .hs-seg { font-size: 0.64rem; height: 30px; }
}

/* Figure w artykule */
.content-article figure {
  margin: 30px 0 34px;
  padding: 0;
}
.content-article figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.content-article figcaption {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}
