/* ==========================================================================
   kalkulatorpeptydow.com — style
   Styl bazuje 1:1 na kalkulatorze białka (Sroka.Dietcoach):
   Lora 600 + Nunito Sans 400/700, głęboka zieleń, złoto, kremowe karty.
   ========================================================================== */

/* === FONTY (self-hosted, licencja SIL OFL) === */
@font-face { font-family: "Lora"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/Lora-600.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/NunitoSans-400.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/NunitoSans-700.woff2") format("woff2"); }

/* === TOKENY === */
:root {
  /* z kalkulatora białka */
  --green: #1D3E36;
  --dark: #163129;
  --darkest: #12261F;
  --warm: #2A3B24;
  --gold: #A5884A;          /* dekoracje, obramowania, duże cyfry */
  --gold-d: #B79F69;        /* złoto na ciemnym tle */
  --cream: #F8F6F0;
  --card: #FCFBF8;
  --line: #EBE7DD;
  --mut: #A6A29A;
  --placeholder: #C9C4B8;

  /* dostępność (WCAG AA na kremowym tle) */
  --gold-ink: #866C3B;      /* złoto dla małego tekstu na jasnym tle — 4.6:1 */
  --gray: #6E6B64;          /* tekst pomocniczy — 4.9:1 */

  --page: #FFFFFF;
  --white: #FFFFFF;
  --line-strong: #DCD5C5;
  --warn-light: #F1B9A5;    /* ostrzeżenia na ciemnym tle */
  --liquid-light: #DCC796;

  --radius-card: 18px;
  --radius: 12px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(18, 38, 31, 0.03), 0 12px 32px -12px rgba(18, 38, 31, 0.10);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-synthesis: none;
  color: var(--green);
  background: var(--page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img, svg { display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--green); color: var(--white); text-decoration: none;
  font-weight: 700; font-size: 14px; padding: 10px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* === TYPOGRAFIA WSPÓLNA === */
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold-ink);
}
h1, h2, h3 { font-weight: 600; }
h1 {
  font-family: var(--serif); font-size: 30px; line-height: 1.12; letter-spacing: -0.3px;
  margin-top: 8px; text-wrap: balance;
}
h2 { font-family: var(--serif); font-size: 26px; line-height: 1.15; letter-spacing: -0.2px; margin-top: 6px; text-wrap: balance; }
.lead { font-size: 14px; line-height: 1.5; color: var(--gray); margin-top: 8px; max-width: 60ch; }

/* === WORDMARK === */
.site-header { padding: 20px 16px 14px; text-align: center; }
.wordmark {
  display: inline-flex; align-items: baseline;
  font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -0.2px; line-height: 1.2;
  color: var(--green); text-decoration: none; border-radius: 6px;
}
.wordmark .wm-b { color: var(--gold-ink); }
.wordmark .wm-c { color: var(--mut); }
.wordmark--sm { font-size: 17px; }

/* === KARTA === */
main { padding: 0 8px; }
.card {
  max-width: 560px; margin: 0 auto;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px 22px 20px;
  box-shadow: var(--shadow-card);
}

.trust { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin-top: 12px; }
.trust li {
  position: relative; padding-left: 13px;
  font-size: 12.5px; font-weight: 700; color: var(--gray);
}
.trust li::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 5px; height: 5px; margin-top: -2.5px;
  background: var(--gold); transform: rotate(45deg);
}

.nojs {
  margin-top: 16px; padding: 12px 14px; font-size: 14px; line-height: 1.5;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
}

/* === KROKI FORMULARZA === */
.step { margin-top: 22px; border: 0; min-width: 0; }
.label {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 14.5px; font-weight: 700; color: var(--green);
}
.label-opt { font-weight: 400; font-size: 13px; color: var(--gray); }
.num { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--gold-ink); line-height: 1; }
.hint { font-size: 12.5px; line-height: 1.45; color: var(--gray); margin-top: 8px; }
.hint strong { color: var(--green); }

/* Pole liczbowe — jak "masa ciała" w kalkulatorze białka */
.field { display: flex; align-items: stretch; gap: 10px; margin-top: 10px; }
.field > input {
  width: 150px; min-width: 0;
  font-size: 24px; font-weight: 700; color: var(--green);
  background: var(--card);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  font-variant-numeric: lining-nums;
}
.field > input::placeholder { color: var(--placeholder); font-weight: 400; opacity: 1; }
.field > input:hover { border-color: var(--line-strong); }
.field > input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(165, 136, 74, 0.18); }
.field > input[aria-invalid="true"] { border-color: #C98B76; box-shadow: 0 0 0 3px rgba(201, 139, 118, 0.16); }
.unit { align-self: center; font-size: 17px; font-weight: 700; color: var(--gray); }

/* Select peptydu */
.select { position: relative; margin-top: 10px; }
.select select {
  appearance: none; -webkit-appearance: none;
  width: 100%; min-height: 52px;
  font-size: 17px; font-weight: 700; color: var(--green);
  background: var(--card);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 46px 12px 14px;
  cursor: pointer;
  text-overflow: ellipsis;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.select.is-empty select { font-weight: 400; color: var(--gray); }
.select select option, .select select optgroup { color: var(--green); font-weight: 400; }
.select select:hover { border-color: var(--line-strong); }
.select select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(165, 136, 74, 0.18); }
.select-chevron { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--gold); pointer-events: none; }

/* Szybkie wartości */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips:empty { display: none; }
.chip {
  min-height: 36px; padding: 6px 13px;
  font-size: 14px; font-weight: 700; color: var(--gray);
  background: var(--card);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background-color 0.15s var(--ease);
  font-variant-numeric: lining-nums;
}
.chip:hover { border-color: var(--line-strong); color: var(--green); }
.chip[aria-pressed="true"] { color: var(--green); background: var(--white); border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }

/* Przełącznik jednostek — jak "posiłki" w kalkulatorze białka */
.seg {
  display: inline-flex; flex-shrink: 0;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--card);
}
.seg label { position: relative; cursor: pointer; display: flex; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span {
  display: flex; align-items: center; justify-content: center;
  min-width: 60px; padding: 0 12px;
  font-weight: 700; font-size: 15px; color: var(--gray);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.seg label + label span { border-left: 1.5px solid var(--line); }
.seg input:checked + span { background: var(--green); color: var(--white); }
.seg input:focus-visible + span { outline: 3px solid rgba(165, 136, 74, 0.5); outline-offset: -3px; }

/* Strzykawka — dwa pola: pojemność + liczba kresek */
.syringe-fields { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 10px; }
.pair-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--gray); }
.field--pair { margin-top: 6px; gap: 8px; }

/* === WYNIK === */
.result {
  position: relative; overflow: hidden;
  scroll-margin-top: 16px;
  margin-top: 22px;
  border-radius: 14px;
  padding: 18px 18px 16px;
  background: linear-gradient(158deg, var(--darkest) 0%, var(--dark) 52%, var(--warm) 100%);
  color: var(--white);
  isolation: isolate;
}
.result::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 100% 0%, rgba(183, 159, 105, 0.16), transparent 55%);
}
.result .eyebrow { color: var(--gold-d); }
.big {
  font-family: var(--serif); font-weight: 600;
  font-size: 46px; line-height: 1.05; letter-spacing: -0.5px;
  color: var(--gold-d); margin-top: 6px;
  font-variant-numeric: lining-nums;
  min-height: 48px;
}
.big small { font-size: 22px; color: var(--white); margin-left: 8px; letter-spacing: 0; }
.big .approx { font-size: 22px; color: rgba(255, 255, 255, 0.7); margin-right: 6px; letter-spacing: 0; }
.result[data-state="warn"] .big,
.result[data-state="over"] .big { color: var(--warn-light); }
.result-sub { font-size: 14.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.82); margin-top: 8px; }
.result-sub b { color: var(--white); font-weight: 700; }

/* Strzykawka */
.syringe { margin: 14px -6px 0; }
.syringe-svg { width: 100%; height: auto; overflow: hidden; }
.syringe-caption { margin-top: 2px; font-size: 12px; line-height: 1.35; text-align: center; color: rgba(255, 255, 255, 0.58); }
.syringe-caption.is-user { color: rgba(255, 255, 255, 0.8); }
.sy-labels { fill: rgba(255, 255, 255, 0.62); font-family: var(--sans); font-weight: 700; font-size: 11px; }
.sy-marker { opacity: 0; transition: opacity 0.2s var(--ease); }
.result[data-state="ok"] .sy-marker,
.result[data-state="warn"] .sy-marker,
.result[data-state="over"] .sy-marker { opacity: 1; }
.sy-bubble-bg { fill: var(--liquid-light); }
.sy-bubble-text { fill: var(--darkest); font-family: var(--sans); font-weight: 700; font-size: 12.5px; }
.result[data-state="over"] .sy-bubble-bg,
.result[data-state="warn"] .sy-bubble-bg { fill: var(--warn-light); }
.sy-liquid { transition: fill-opacity 0.2s var(--ease); }
.result[data-state="over"] .sy-liquid { fill-opacity: 0.75; }

/* Statystyki */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.stat {
  padding: 10px 10px 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  min-width: 0;
}
.stat dt { font-size: 10px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); line-height: 1.3; }
.stat dd { font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1.2; color: var(--white); margin-top: 4px; font-variant-numeric: lining-nums; overflow-wrap: anywhere; }
.stat-sub { display: block; font-size: 11.5px; line-height: 1.35; color: rgba(255, 255, 255, 0.6); margin-top: 2px; overflow-wrap: anywhere; }

/* Notatka / ostrzeżenia / podpowiedzi */
.note {
  font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, 0.72);
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.note b { color: var(--white); font-weight: 700; }
.note-row { display: flex; gap: 8px; align-items: flex-start; }
.note-row + .note-row { margin-top: 8px; }
.note-icon { flex-shrink: 0; margin-top: 1px; color: var(--gold-d); }
.note-row.is-warn { color: #F6D2C5; }
.note-row.is-warn .note-icon { color: var(--warn-light); }
.note-text { min-width: 0; }
.note-lead { margin-top: 10px; font-size: 12.5px; color: rgba(255, 255, 255, 0.66); }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sugg-btn {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 6px 11px;
  font-size: 13px; font-weight: 700; color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(183, 159, 105, 0.5); border-radius: var(--radius-sm);
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.sugg-btn:hover { background: rgba(183, 159, 105, 0.2); border-color: var(--gold-d); }
.sugg-btn span { color: var(--gold-d); }
.sugg-btn .sugg-arrow { display: inline-flex; color: rgba(255, 255, 255, 0.55); }

/* Przyciski akcji */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 9px 15px;
  font-size: 14px; font-weight: 700; color: var(--green);
  background: var(--white);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn:hover { border-color: var(--green); }
.btn--primary { background: var(--green); border-color: var(--green); color: var(--white); }
.btn--primary:hover { background: var(--dark); border-color: var(--dark); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--gray); padding-left: 10px; padding-right: 10px; gap: 6px; }
.btn--ghost:hover { border-color: transparent; color: var(--green); }
.btn--ghost:hover .reset-label { text-decoration: underline; text-underline-offset: 3px; }

.foot { font-size: 11.5px; line-height: 1.5; color: var(--gray); margin-top: 16px; }

/* === BANERY === */
.slot:empty { display: none; }

.topbar {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px;
  padding: 9px 16px;
  background: var(--dark); color: rgba(255, 255, 255, 0.88);
  font-size: 13px; line-height: 1.35; text-align: center; text-decoration: none;
}
a.topbar:hover .topbar-text { text-decoration: underline; text-underline-offset: 3px; }
.topbar-badge { font-size: 10.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-d); }
.topbar-sep { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); flex-shrink: 0; }
.topbar-cta { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--gold-d); }

.slot--promo { max-width: 560px; margin: 20px auto 0; }
.promo {
  display: grid; grid-template-columns: 1fr;
  border-radius: var(--radius-card); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--green); text-decoration: none;
  box-shadow: var(--shadow-card);
}
.promo-art {
  position: relative; isolation: isolate;
  display: flex; align-items: center; justify-content: center;
  min-height: 150px; padding: 18px;
  background: linear-gradient(158deg, var(--darkest) 0%, var(--dark) 52%, var(--warm) 100%);
  color: var(--gold-d);
}
.promo-art::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 70% at 50% 45%, rgba(183, 159, 105, 0.22), transparent 70%);
}
.promo-art svg { width: 100%; max-width: 220px; height: auto; }
.promo-body { padding: 20px 22px 22px; }
.promo-badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold-ink);
  border: 1px solid rgba(165, 136, 74, 0.45); border-radius: 999px;
  padding: 3px 10px;
}
.promo-title { font-family: var(--serif); font-weight: 600; font-size: 25px; line-height: 1.15; letter-spacing: -0.2px; margin-top: 10px; text-wrap: balance; }
.promo-title .accent { color: var(--gold-ink); }
.promo-text { font-size: 14px; line-height: 1.5; color: var(--gray); margin-top: 8px; max-width: 52ch; }
.promo-soon {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 14px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--green);
}
.promo-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.promo-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--gold); opacity: 0;
  animation: kp-pulse 2.4s var(--ease) infinite;
}
@keyframes kp-pulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }
.promo .btn { margin-top: 14px; }

/* wariant ciemny — cała karta ciemna */
.promo--ciemny { background: linear-gradient(158deg, var(--darkest) 0%, var(--dark) 52%, var(--warm) 100%); border-color: transparent; color: var(--white); }
.promo--ciemny .promo-art { background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.promo--ciemny .promo-badge { color: var(--gold-d); border-color: rgba(183, 159, 105, 0.5); }
.promo--ciemny .promo-title .accent { color: var(--gold-d); }
.promo--ciemny .promo-text { color: rgba(255, 255, 255, 0.78); }
.promo--ciemny .promo-soon { color: rgba(255, 255, 255, 0.9); }
.promo--ciemny .promo-dot, .promo--ciemny .promo-dot::after { background: var(--gold-d); border-color: var(--gold-d); }
.promo--ciemny .promo-dot::after { background: transparent; }
.promo--ciemny .btn--primary { background: var(--gold-d); border-color: var(--gold-d); color: var(--darkest); }
.promo--ciemny .btn--primary:hover { background: var(--liquid-light); border-color: var(--liquid-light); }

.btn-arrow, .btn-icon { display: inline-flex; }
.topbar-cta .btn-icon svg { width: 15px; height: 15px; }

/* baner-grafika */
.promo-image { display: block; border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); }
.promo-image img { width: 100%; height: auto; }

a.promo { transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
a.promo:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(18, 38, 31, 0.04), 0 18px 40px -14px rgba(18, 38, 31, 0.22); }

/* === SEKCJE === */
.section { max-width: 560px; margin: 48px auto 0; padding: 0 6px; }
.section-head { margin-bottom: 18px; }
.section-lead { font-size: 14px; color: var(--gray); margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.how-tag {
  display: inline-block;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--gold-ink); background: var(--cream);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}
.how-tag.is-live { color: var(--white); background: var(--green); border-color: var(--green); }

.how-steps { list-style: none; display: grid; gap: 10px; }
.how-step {
  position: relative;
  background: var(--cream);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 16px 14px 50px;
}
.how-step .num { position: absolute; left: 18px; top: 16px; font-size: 22px; }
.how-step h3 { font-family: var(--sans); font-size: 15px; font-weight: 700; line-height: 1.3; }
.formula { font-size: 13px; color: var(--gray); margin-top: 2px; }
.example {
  font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1.35; color: var(--green);
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-strong);
  font-variant-numeric: lining-nums; overflow-wrap: anywhere;
}
.example .accent { color: var(--gold-ink); white-space: nowrap; }

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 14px 2px;
  font-size: 15.5px; font-weight: 700; line-height: 1.35; color: var(--green);
  list-style: none; cursor: pointer; border-radius: 6px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--dark); }
.faq-icon { flex-shrink: 0; color: var(--gold); transition: transform 0.25s var(--ease); }
.faq-list details[open] .faq-icon { transform: rotate(45deg); }
.faq-list details p { font-size: 14.5px; line-height: 1.6; color: var(--gray); padding: 0 2px 18px; max-width: 68ch; }

/* === STOPKA === */
.site-footer {
  margin-top: 56px; padding: 30px 20px calc(36px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-tagline { font-size: 13px; color: var(--gray); margin-top: 8px; }
.footer-legal { font-size: 12px; line-height: 1.5; color: var(--gray); margin: 10px auto 0; max-width: 560px; }
.footer-copy { font-size: 12px; color: var(--gray); margin-top: 10px; }

/* === 404 === */
.error-card { text-align: center; margin-top: 8vh; }
.error-card .lead { margin-left: auto; margin-right: auto; }
.error-card .btn { margin-top: 22px; }

/* === STICKY (mobile) === */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 0 10px calc(10px + env(safe-area-inset-bottom));
  transform: translateY(120%);
  visibility: hidden;
  transition: transform 0.3s var(--ease), visibility 0s linear 0.3s;
  pointer-events: none;
}
.sticky[data-show="true"] {
  transform: none; visibility: visible; pointer-events: auto;
  transition: transform 0.3s var(--ease), visibility 0s;
}
.sticky-in {
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 16px;
  background: linear-gradient(158deg, var(--darkest) 0%, var(--dark) 70%, var(--warm) 100%);
  color: var(--white); text-decoration: none;
  border-radius: 14px;
  box-shadow: 0 12px 32px -8px rgba(18, 38, 31, 0.45);
}
.sticky-txt { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.sticky-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold-d); }
.sticky-val { font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-go {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  min-height: 40px; padding: 0 12px;
  font-size: 13px; font-weight: 700; color: var(--darkest);
  background: var(--gold-d); border-radius: var(--radius-sm);
}

/* === TOAST === */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  background: var(--darkest); color: var(--white);
  font-size: 14px; font-weight: 700; line-height: 1.35; text-align: center;
  border-radius: var(--radius);
  box-shadow: 0 12px 32px -8px rgba(18, 38, 31, 0.45);
  opacity: 0; transform: translate(-50%, 16px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-raised { bottom: calc(92px + env(safe-area-inset-bottom)); }

/* === RESPONSYWNOŚĆ === */
@media (max-width: 959px) {
  /* przyklejony pasek z wynikiem nie zasłoni pola, do którego przewija przeglądarka */
  html { scroll-padding-bottom: 88px; }
}
@media (max-width: 479px) {
  /* statystyki jako lista wierszy — czytelniej na wąskim ekranie */
  .stats {
    grid-template-columns: 1fr; gap: 0;
    padding: 2px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
  }
  .stat {
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center;
    padding: 9px 0; background: none; border: 0; border-radius: 0;
  }
  .stat + .stat { border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .stat dt { grid-column: 1; grid-row: 1 / span 2; }
  .stat dd { grid-column: 2; grid-row: 1; margin-top: 0; text-align: right; font-size: 17px; }
  .stat-sub { grid-column: 2; grid-row: 2; margin-top: 1px; text-align: right; }
  .stat-sub:empty { display: none; }

  /* krok 5: dwa pola obok siebie na całą szerokość */
  .syringe-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .field.field--pair > input { width: 100%; }

  /* przyciski w jednym rzędzie */
  .actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
  .btn--share { padding-left: 10px; padding-right: 10px; }
  .btn--reset { width: 44px; padding: 0; }
  .btn--reset .reset-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 400px) {
  .hide-narrow { display: none; }
}
@media (max-width: 360px) {
  .card { padding: 20px 16px 18px; }
  h1 { font-size: 27px; }
  .field > input { width: 128px; }
  .big { font-size: 40px; }
  .stat dd { font-size: 16px; }
}

@media (pointer: coarse) {
  .chip { min-height: 40px; padding: 8px 12px; }
  .sugg-btn { min-height: 40px; }
}
@media (pointer: coarse) and (max-width: 479px) {
  .chip { padding: 8px 10px; font-size: 13.5px; }
}

@media (min-width: 640px) {
  main { padding: 0 16px; }
  .site-header { padding: 26px 16px 18px; }
  .wordmark { font-size: 23px; }
  .promo { grid-template-columns: 210px 1fr; }
  .promo--ciemny .promo-art { border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, 0.08); }
  .promo-art { min-height: 0; }
}

@media (min-width: 960px) {
  .site-header { padding: 34px 16px 24px; }
  .card.calc { max-width: 1060px; padding: 36px 40px 28px; }
  .calc-head { max-width: 640px; }
  h1 { font-size: 40px; }
  .lead { font-size: 15px; }
  .calc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 0 40px;
    align-items: start;
  }
  .calc-side { position: sticky; top: 20px; margin-top: 22px; }
  .calc-side .result { margin-top: 0; padding: 22px 22px 18px; }
  .big { font-size: 54px; min-height: 58px; }
  .big small { font-size: 24px; }
  .stat dd { font-size: 17px; }
  .foot { margin-top: 24px; max-width: 80ch; }

  .slot--promo, .section { max-width: 1060px; }
  .promo { grid-template-columns: 340px 1fr; }
  .promo-body { padding: 30px 36px; align-self: center; }
  .promo-title { font-size: 30px; }

  .section { margin-top: 64px; }
  h2 { font-size: 32px; }
  .how-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .faq .section-head, .faq-list { max-width: 760px; }

  .sticky { display: none; }
}

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