/* kalkulatorwhr.pl — clinical-wellness theme: mint/teal + coral, hourglass motif */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6faf8;
  --bg-alt: #eef7f4;
  --surface: #ffffff;
  --surface-2: #f1f7f5;
  --ink: #16211f;
  --muted: #56685f;
  --border: #dfe9e4;
  --primary: #0f9b8e;
  --primary-dark: #0b7a70;
  --primary-light: #d7f2ec;
  --accent: #ff6f5e;
  --accent-dark: #e2503f;
  --accent-light: #ffe3de;
  --amber: #e8a63b;
  --amber-light: #fbecd0;
  --danger: #d64545;
  --danger-light: #fbe1e1;
  --success: #22a06b;
  --success-light: #ddf3e7;
  --shadow-sm: 0 2px 8px rgba(22, 33, 31, 0.06);
  --shadow-md: 0 8px 24px rgba(22, 33, 31, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 155, 142, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

:root[data-theme="dark"] {
  --bg: #0d1917;
  --bg-alt: #0a1413;
  --surface: #142723;
  --surface-2: #182f2a;
  --ink: #eaf6f2;
  --muted: #9fb8b0;
  --border: #234139;
  --primary: #2dd4bf;
  --primary-dark: #1fb3a0;
  --primary-light: #17352f;
  --accent: #ff8a75;
  --accent-dark: #ff6f5e;
  --accent-light: #2e211d;
  --amber: #f0bc5e;
  --amber-light: #332911;
  --danger: #f07171;
  --danger-light: #2f1a1a;
  --success: #4cc990;
  --success-light: #14302279;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 48px rgba(45, 212, 191, 0.12);
}

* { box-sizing: border-box; }
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

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

a { color: var(--primary-dark); }
:root[data-theme="dark"] a { color: var(--primary); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--muted); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 820px; margin: 0 auto; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1140px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(155deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}
:root[data-theme="dark"] .main-nav a.active,
:root[data-theme="dark"] .main-nav a:hover { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  flex-shrink: 0;
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.hamburger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.hamburger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(300px, 80vw);
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    padding: 90px 20px 20px;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  html.nav-open { overflow-x: hidden; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 14px 16px; font-size: 1.05rem; }
  .hamburger { display: flex; }
  .nav-scrim {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 90;
  }
  .nav-scrim.open { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 56px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -160px; right: -120px;
  width: 460px; height: 460px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -180px; left: -140px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
:root[data-theme="dark"] .eyebrow { color: var(--primary); }
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.hero-stat b { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--primary-dark); }
:root[data-theme="dark"] .hero-stat b { color: var(--primary); }
.hero-stat span { font-size: 0.85rem; color: var(--muted); }

/* ---------- Calculator card ---------- */
.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.calc-card h2 { font-size: 1.3rem; margin-bottom: 4px; }
.calc-sub { font-size: 0.9rem; margin-bottom: 20px; }

.segmented {
  display: flex;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 18px;
}
.segmented button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.2s;
}
.segmented button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%;
  padding: 13px 52px 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
}
.input-wrap input:focus {
  outline: none;
  border-color: var(--primary);
}
.input-wrap .unit {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  width: 100%;
  box-shadow: 0 10px 24px rgba(15, 155, 142, 0.3);
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(15, 155, 142, 0.4); }
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 111, 94, 0.3);
}
.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border: 1.5px solid var(--primary);
}
:root[data-theme="dark"] .btn-outline { color: var(--primary); }

.result-box {
  margin-top: 22px;
  padding: 22px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: none;
}
.result-box.show { display: block; animation: fadein 0.4s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.result-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.result-value { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--ink); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-amber { background: var(--amber-light); color: var(--amber); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.result-bar {
  margin-top: 16px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--success) 0%, var(--success) 33%, var(--amber) 33%, var(--amber) 66%, var(--danger) 66%, var(--danger) 100%);
  position: relative;
}
.result-bar-marker {
  position: absolute;
  top: -5px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--ink);
  transform: translateX(-50%);
  transition: left 0.5s ease;
  box-shadow: var(--shadow-sm);
}
.result-note { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
.result-note strong { color: var(--ink); }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head .eyebrow { margin-bottom: 14px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--primary-dark);
}
:root[data-theme="dark"] .card-icon { color: var(--primary); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.card p { font-size: 0.92rem; margin-bottom: 0; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.tag-zdrowie { background: var(--primary-light); color: var(--primary-dark); }
.tag-dieta { background: var(--accent-light); color: var(--accent-dark); }
.tag-narzedzia { background: var(--amber-light); color: var(--amber); }
:root[data-theme="dark"] .tag-zdrowie { color: var(--primary); }

.steps { counter-reset: step; }
.step {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step-num {
  counter-increment: step;
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-family: var(--font-head);
}
.step-num::before { content: counter(step); }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.data-table th, table.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
table.data-table th { background: var(--surface-2); font-weight: 700; color: var(--ink); }
table.data-table tr:last-child td { border-bottom: none; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: var(--surface);
  overflow: hidden;
}
.faq-q {
  padding: 18px 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-q svg { flex-shrink: 0; transition: transform 0.25s; width: 18px; height: 18px; color: var(--primary-dark); }
:root[data-theme="dark"] .faq-q svg { color: var(--primary); }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 20px;
}
.faq-item.open .faq-a { max-height: 400px; padding-bottom: 18px; }

.disclaimer-box {
  background: var(--amber-light);
  border: 1px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 0.88rem;
  color: var(--ink);
  display: flex;
  gap: 12px;
  margin: 24px 0;
}
.disclaimer-box svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--amber); margin-top: 2px; }
.disclaimer-box p { margin: 0; color: var(--ink); }

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 18px 0;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary-dark); }

.toc {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 24px 0;
}
.toc h3 { font-size: 1rem; margin-bottom: 10px; }
.toc ul { margin: 0; padding-left: 20px; }
.toc a { color: var(--muted); text-decoration: none; font-size: 0.92rem; line-height: 2; }
.toc a:hover { color: var(--primary-dark); }

.article-body h2 { margin-top: 1.6em; }
.article-body h3 { margin-top: 1.2em; }
.article-body ul, .article-body ol { color: var(--muted); padding-left: 22px; }
.article-body li { margin-bottom: 8px; }

.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); }
.cta-band .btn-accent { margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--primary-dark); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.mini-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .mini-calc-grid { grid-template-columns: 1fr; } }

/* ---------- AI advice ---------- */
.ai-advice { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border); }
.ai-advice-btn { width: 100%; }
.ai-advice-body { margin-top: 14px; }
.ai-advice-spinner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
}
.ai-advice-spinner span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: ai-bounce 1s infinite ease-in-out;
}
.ai-advice-spinner span:nth-child(2) { animation-delay: 0.15s; }
.ai-advice-spinner span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ai-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}
.ai-advice-text {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.92rem;
  color: var(--ink);
  white-space: pre-line;
}
.ai-advice-text.error { color: var(--danger); background: var(--danger-light); border-color: var(--danger); }
.ai-advice-disclaimer { margin: 10px 0 0; font-size: 0.76rem; color: var(--muted); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Ilustracje (dodane 2026-08-10) --------------------------------
   Uwaga: te reguly musza stac PRZED dwoma blokami doklejanymi na koncu pliku
   przez automaty (komponenty autopilota i blok "W skrocie"). Oba narzedzia
   podmieniaja tam swoj fragment przy kazdej przebudowie, wiec recznie dopisany
   koniec arkusza jest miejscem najbardziej narazonym na zgubienie.

   Grafika hero jest wycieta z tla (WebP z kanalem alfa), wiec w motywie jasnym
   lezy wprost na stronie. W ciemnym dostaje biala podkladke - sama ilustracja
   jest jasna, a jej bialy postument bez podkladki konczylby sie postrzepiona
   krawedzia na ciemnym tle.                                                 */
.hero-media {
  margin-top: 32px;
  position: relative;
}
/* Ilustracja siedzi w tej samej kolumnie co kalkulator (.hero-side), tuz pod
   nim — wypelnia pustke, ktora zostawala obok dluzszej kolumny z tekstem.
   Osobny element siatki tego nie dawal: auto-placement wrzucal go w drugi
   wiersz, czyli dopiero pod calym tekstem. Przy jednej kolumnie ilustracja
   laduje na koncu sama z siebie, bo jest ostatnia w HTML. */
.hero-grid.has-media { align-items: start; }
.hero-grid.has-media .hero-media { margin-top: 26px; }
@media (max-width: 900px) {
  .hero-grid.has-media .hero-media { max-width: 520px; margin: 26px auto 0; }
}
.hero-media img {
  display: block;
  width: 100%;
  height: auto;
}
:root[data-theme="dark"] .hero-media {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 16px 6px;
  box-shadow: var(--shadow-md);
  filter: brightness(0.95) saturate(1.02);
}

.media-figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.media-figure img {
  display: block;
  width: 100%;
  height: auto;
}
:root[data-theme="dark"] .media-figure img { filter: brightness(0.92) saturate(1.03); }
.media-figure figcaption {
  padding: 13px 18px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.media-split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 44px;
  align-items: center;
}
.media-split.media-right { grid-template-columns: 1.05fr 0.95fr; }
.media-split .steps { padding-top: 0; }
@media (max-width: 860px) {
  .media-split, .media-split.media-right { grid-template-columns: 1fr; gap: 30px; }
  .media-split.media-right .media-figure { order: -1; }
}

/* W tekscie artykulu kwadratowa grafika na cala szerokosc kolumny (820 px)
   zajmowalaby caly ekran — stad wezsza ramka wysrodkowana w kolumnie. */
.article-body .media-figure { margin: 30px auto; max-width: 560px; }


/* ---------- Komponenty autopilota tresci (ac-*) --------------------------
   Uzywane przez podstrony dokladane automatycznie co dwa dni. Kolory,
   typografia i zaokraglenia biora sie ze zmiennych motywu tej witryny,
   wiec komponent wyglada u siebie w kazdym z pieciu serwisow.            */
/* Szerokosc i wysrodkowanie ustawiamy tutaj, a nie liczymy na klase kontenera
   witryny: czesc serwisow uzywa `.container`, czesc `.wrap`, a cwiczwdomu.pl
   nie ma zadnej z nich. Komponent musi wygladac poprawnie wszedzie. */
.ac-page { max-width: 860px; margin-left: auto; margin-right: auto;
           padding: 26px 20px 56px; }
.ac-crumbs { font-size: .86rem; color: var(--muted, #64748b); margin: 0 0 18px; }
.ac-crumbs a { color: inherit; }
.ac-kicker {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: var(--primary, #2563eb); color: #fff;
  font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}
.ac-page h1 { margin: 14px 0 10px; line-height: 1.18; }
.ac-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: .86rem;
           color: var(--muted, #64748b); margin-bottom: 6px; }
.ac-toc { margin: 26px 0; padding: 18px 22px; border: 1px solid var(--border, #e5e7eb);
          border-radius: 12px; background: var(--surface, #fff); }
.ac-toc strong { display: block; margin-bottom: 8px; font-size: .82rem;
                 letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #64748b); }
.ac-toc ol { margin: 0; padding-left: 20px; }
.ac-toc li { margin: 4px 0; }
.ac-page h2 { margin: 34px 0 12px; line-height: 1.28; }
.ac-page p, .ac-page li { line-height: 1.72; }
.ac-note { margin: 22px 0; padding: 16px 20px; border-radius: 12px;
           background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb);
           border-left: 5px solid var(--primary, #2563eb); }
.ac-faq { margin: 10px 0; border: 1px solid var(--border, #e5e7eb); border-radius: 12px;
          background: var(--surface, #fff); overflow: hidden; }
.ac-faq > summary { cursor: pointer; padding: 15px 20px; font-weight: 600;
                    list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.ac-faq > summary::-webkit-details-marker { display: none; }
.ac-faq > summary::after { content: "+"; font-weight: 700; color: var(--primary, #2563eb); }
.ac-faq[open] > summary::after { content: "\2013"; }
.ac-faq > div { padding: 0 20px 16px; color: var(--muted, #4b5563); }
.ac-src { margin-top: 30px; font-size: .84rem; color: var(--muted, #64748b); }

/* rycina, powiazane strony i blok "O tej tresci" */
.ac-fig { margin: 26px 0; }
.ac-fig img { display: block; width: 100%; height: auto; border-radius: 14px;
              border: 1px solid var(--border, #e5e7eb); }
.ac-fig figcaption { margin-top: 8px; font-size: .84rem; color: var(--muted, #64748b); }
.ac-related { margin: 30px 0; padding: 18px 22px; border-radius: 12px;
              background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb); }
.ac-related strong { display: block; margin-bottom: 8px; font-size: .82rem;
                     letter-spacing: .08em; text-transform: uppercase;
                     color: var(--muted, #64748b); }
.ac-related ul { margin: 0; padding-left: 20px; }
.ac-related li { margin: 5px 0; }
.ac-about { margin: 34px 0 0; padding: 20px 22px; border-radius: 12px;
            background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb);
            font-size: .92rem; }
.ac-about h2 { margin: 0 0 10px; font-size: 1.05rem; }
.ac-about p { margin: 0 0 10px; }
.ac-about .ac-about-h { font-weight: 600; margin-top: 14px; }
.ac-about ul { margin: 6px 0 0; padding-left: 20px; }
.ac-about li { margin: 4px 0; }

/* kalkulator */
.ac-calc { margin: 26px 0; padding: 22px; border-radius: 14px;
           border: 1px solid var(--border, #e5e7eb); background: var(--surface, #fff); }
.ac-field { margin-bottom: 14px; }
.ac-field label { display: block; margin-bottom: 5px; font-size: .88rem; font-weight: 600; }
.ac-field input, .ac-field select {
  width: 100%; padding: 11px 13px; font-size: 1rem; font: inherit;
  border: 1px solid var(--border, #cbd5e1); border-radius: 10px;
  background: var(--surface, #fff); color: var(--ink, #111827);
}
.ac-btn { width: 100%; padding: 13px 18px; border: 0; border-radius: 10px; cursor: pointer;
          background: var(--primary, #2563eb); color: #fff; font-size: 1rem; font-weight: 700; }
.ac-out { margin-top: 18px; padding: 18px; border-radius: 12px;
          background: var(--surface, #fff); border: 1px dashed var(--border, #cbd5e1); }
.ac-out-main { font-size: 1.9rem; font-weight: 800; color: var(--primary, #2563eb); line-height: 1.2; }
.ac-out-label { font-size: .8rem; letter-spacing: .07em; text-transform: uppercase;
                color: var(--muted, #64748b); }
.ac-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0;
          border-top: 1px solid var(--border, #e5e7eb); font-size: .95rem; }
.ac-row b { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .ac-calc { padding: 16px; } .ac-out-main { font-size: 1.5rem; } }

/* ---------- GEO: blok "W skrócie" (dodane 2026-08-01) ---------------------
   Odpowiedź podana wprost, na samej górze strony — to ten fragment cytują
   wyszukiwarki generatywne. Styl korzysta ze zmiennych motywu tej witryny,
   więc działa w wersji jasnej i ciemnej bez osobnych reguł.                */
.geo-tldr {
  margin: 26px 0 30px;
  padding: 20px 24px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-left: 5px solid var(--primary, #2563eb);
  border-radius: 12px;
}
.geo-tldr-head {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary, #2563eb);
}
.geo-tldr-answer {
  margin: 0 0 12px;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink, #111827);
}
.geo-tldr-list { margin: 0; padding-left: 20px; }
.geo-tldr-list li {
  margin: 5px 0;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--muted, #4b5563);
}
@media (max-width: 640px) {
  .geo-tldr { padding: 16px 18px; }
  .geo-tldr-answer { font-size: 1rem; }
}
/* ---------- koniec bloku GEO ---------- */
