/* ============ Koszt dziecka — styles ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f5f8fc;
  --panel: #ffffff;
  --line: #e2e9f4;
  --ink: #1e2a3d;
  --dim: #64748c;
  --blue: #3d6fb8;
  --blue-dark: #2c5490;
  --yellow: #f4b942;
  --red: #cf4a3c;
  --radius: 20px;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --shadow: 0 10px 34px rgba(30, 42, 61, 0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(700px 340px at 92% -5%, #3d6fb812, transparent 60%),
    radial-gradient(600px 320px at 0% 12%, #f4b94218, transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: clamp(18px, 4vw, 48px); }

/* ---------- hero ---------- */
.hero { text-align: center; max-width: 780px; margin: 0 auto; padding-top: clamp(6px, 2.5vh, 26px); }
.kicker {
  display: inline-block;
  background: #f4b94222;
  border: 1px solid #d9a636;
  color: #8a6a12;
  padding: 6px 16px; border-radius: 999px;
  font-weight: 500; font-size: 0.82rem;
}
.hero h1 {
  margin-top: 18px;
  font-size: clamp(1.9rem, 5.6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.subtitle { margin: 14px auto 0; color: var(--dim); font-size: clamp(0.98rem, 2.3vw, 1.12rem); line-height: 1.6; }

/* ---------- layout ---------- */
.grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 20px;
  margin-top: clamp(28px, 4.5vh, 46px);
  align-items: start;
}
@media (max-width: 880px) { .grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 28px);
}
.panel h2 { font-size: 1.12rem; font-weight: 700; margin-bottom: 16px; }

/* ---------- fields ---------- */
.field { margin-bottom: 16px; }
.label { display: block; font-size: 0.86rem; font-weight: 500; color: var(--dim); margin-bottom: 7px; }
.unit { color: #64748c; font-size: 0.8em; }
input[type="number"] {
  width: 100%;
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="number"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px #3d6fb822; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn {
  font-family: inherit; font-size: 0.86rem; font-weight: 500;
  background: #f8fafd;
  border: 1px solid var(--line);
  color: var(--dim);
  border-radius: 10px;
  padding: 9px 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1 1 auto;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 700;
}

/* ---------- results ---------- */
.result-panel { position: sticky; top: 18px; }
@media (max-width: 880px) { .result-panel { position: static; } }

.big-result {
  text-align: center;
  background: linear-gradient(160deg, var(--blue), var(--blue-dark));
  color: #fff;
  border-radius: 16px;
  padding: 22px 16px;
  box-shadow: 0 14px 36px rgba(44, 84, 144, 0.3);
}
.big-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.85; }
.big-num {
  font-family: var(--mono);
  font-size: clamp(2.2rem, 6.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.big-sub { margin-top: 6px; font-size: 0.92rem; opacity: 0.85; }

.stages { margin-top: 20px; }
.stages h3 { font-size: 0.88rem; color: var(--dim); font-weight: 500; margin-bottom: 10px; }
.stage-row { display: grid; grid-template-columns: 108px 1fr 96px; align-items: center; gap: 10px; padding: 4px 0; font-size: 0.86rem; }
.stage-row .sname { color: var(--dim); text-align: right; }
.stage-row .strack { display: block; background: #eef3fa; border-radius: 999px; height: 18px; overflow: hidden; }
.stage-row .sfill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #d99a17, #a86e00); transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.stage-row .sval { font-family: var(--mono); font-weight: 700; white-space: nowrap; font-size: 0.82rem; }
@media (max-width: 400px) {
  .stage-row { grid-template-columns: 84px 1fr auto; font-size: 0.78rem; }
  .stage-row .sval { font-size: 0.74rem; }
}

.compare { margin-top: 18px; }
.comp-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--dim);
}
.comp-item b { font-family: var(--mono); white-space: nowrap; color: var(--ink); }

.provoke {
  margin-top: 14px;
  background: #fdf2ef;
  border: 1px solid #f0c7bf;
  border-radius: 12px;
  padding: 12px 16px;
  color: #8c3a2e;
  font-size: 0.92rem;
  line-height: 1.55;
}
.provoke b { font-family: var(--mono); }

.btn {
  font-family: inherit; font-weight: 700; font-size: 1rem;
  border: none; border-radius: 999px; cursor: pointer;
  padding: 13px 26px;
  transition: transform 0.15s ease, opacity 0.15s ease;
  width: 100%;
  margin-top: 16px;
}
.btn:active { transform: scale(0.97); }
.btn.share { background: var(--ink); color: #fff; box-shadow: 0 8px 24px rgba(30, 42, 61, 0.3); }
.btn.share:hover { opacity: 0.92; transform: translateY(-1px); }

/* ---------- method ---------- */
.method { margin-top: clamp(44px, 7vh, 70px); }
.method h2 { text-align: center; font-size: clamp(1.4rem, 3.6vw, 2rem); font-weight: 800; margin-bottom: 16px; }
.method ul { list-style: none; max-width: 760px; margin: 0 auto; }
.method li {
  padding: 9px 0 9px 26px;
  position: relative;
  color: var(--dim); font-size: 0.94rem; line-height: 1.6;
}
.method li::before { content: '▸'; position: absolute; left: 6px; color: #b57a00; }
.method strong { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { margin-top: clamp(44px, 7vh, 70px); }
.faq h2 { text-align: center; font-size: clamp(1.4rem, 3.6vw, 2rem); font-weight: 800; margin-bottom: 20px; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 16px 20px;
  font-weight: 700; font-size: 0.98rem;
  list-style: none; position: relative; padding-right: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--blue); font-size: 1.3rem;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 20px 18px; color: var(--dim); line-height: 1.65; font-size: 0.93rem; }

/* ---------- footer / toast ---------- */
.footer {
  margin-top: clamp(44px, 7vh, 70px);
  text-align: center;
  color: var(--dim); font-size: 0.88rem; line-height: 1.8;
  padding-bottom: 30px;
  max-width: 720px; margin-left: auto; margin-right: auto;
}
.footer .muted { color: #7a8aa3; }
.footer a { color: var(--blue-dark); }

.toast {
  position: fixed; bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--ink); color: #fff;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 50;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ==== dodatki SEO/a11y ==== */
.noscript-note { background: #fff3cd; color: #5a4500; padding: 12px 16px; border-radius: 10px; margin: 16px auto; max-width: 720px; font-size: 0.95rem; }
.more-tools { margin-top: 14px; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.more-tools a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.more-tools a:hover { opacity: 0.75; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto !important; }
}
