/* @font-face jest w /assets/fonts/fonts.css i wpinany osobnym <link> w <head>,
   żeby ładował się równolegle z tym plikiem, a nie po nim (jak przy @import). */

/* =========================================================================
   kalkulatorbialka.pl — system wizualny „etykieta wartości odżywczych”
   Zasady: linie zamiast cieni, liczby w monospace, brak zaokrągleń > 2 px,
   brak gradientów, brak ikon w zaokrąglonych kwadratach.
   ========================================================================= */

:root {
  --bg:        #eceeed;
  --surface:   #ffffff;
  --surface-2: #f5f6f5;
  --ink:       #101214;
  --ink-2:     #4a5157;
  --ink-3:     #767d83;
  --line:      #c9cdcc;
  --line-soft: #dfe2e1;
  --rule:      #101214;
  --primary:   #2137c9;
  --primary-2: #1a2ca3;
  --primary-bg:#e3e6fb;
  --accent:    #e8412a;
  --accent-bg: #fbe3df;
  --ok:        #0f7a4d;
  --ok-bg:     #dcefe5;
  --warn:      #a8650a;
  --warn-bg:   #f7ebd8;

  --f-head: "Archivo", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", "Consolas", monospace;

  --maxw: 1120px;
  --gut: 20px;
}

:root[data-theme="dark"] {
  --bg:        #101216;
  --surface:   #171a1f;
  --surface-2: #1d2127;
  --ink:       #e8eaee;
  --ink-2:     #a8b0b8;
  --ink-3:     #7b838c;
  --line:      #2a2f35;
  --line-soft: #22262c;
  --rule:      #6d757e;
  --primary:   #8fa0ff;
  --primary-2: #aab6ff;
  --primary-bg:#1c2140;
  --accent:    #ff7a5e;
  --accent-bg: #35201c;
  --ok:        #4cc38a;
  --ok-bg:     #14291f;
  --warn:      #e0a44a;
  --warn-bg:   #2a2013;
}

/* ------------------------------- reset -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--f-body);
  font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 4.4vw, 46px); font-stretch: 118%; letter-spacing: -.5px; }
h2 { font-size: clamp(23px, 2.8vw, 31px); font-stretch: 112%; margin-top: 1.6em; }
h3 { font-size: clamp(19px, 2vw, 22px); font-stretch: 106%; margin-top: 1.5em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin-bottom: .35em; }
strong { font-weight: 600; }
code, .mono { font-family: var(--f-mono); font-size: .93em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
::selection { background: var(--ink); color: var(--bg); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg);
  padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 0; }

/* ------------------------- nagłówek: MIARKA --------------------------- */
.top {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.top-in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut);
  display: flex; align-items: flex-start; gap: 28px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); padding: 12px 0 10px;
  flex: 0 0 auto;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: 0 0 34px; }
.brand-txt { font-family: var(--f-head); font-weight: 700; font-stretch: 116%; font-size: 17px; letter-spacing: -.3px; }
.brand-txt span { color: var(--ink-3); font-weight: 400; }

/* linijka z podziałką: linki siedzą pod kreskami */
.ruler { flex: 1 1 auto; min-width: 0; }
.ruler-list {
  display: flex; list-style: none; margin: 0; padding: 0;
  justify-content: flex-end; gap: 2px; flex-wrap: wrap;
}
.ruler-list li { margin: 0; }
.ruler-list a {
  display: block; position: relative; text-decoration: none;
  color: var(--ink-2); padding: 21px 11px 11px;
  font-family: var(--f-head); font-size: 12.5px; font-weight: 600; font-stretch: 108%;
  letter-spacing: .09em; text-transform: uppercase; white-space: nowrap;
}
.ruler-list a::before {                 /* kreska podziałki */
  content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 9px;
  background: var(--line); transform: translateX(-50%);
}
.ruler-list a::after {                  /* kropka pozycji aktywnej */
  content: ""; position: absolute; top: 12px; left: 50%; width: 4px; height: 4px;
  background: transparent; transform: translateX(-50%);
}
.ruler-list a:hover { color: var(--ink); }
.ruler-list a:hover::before { background: var(--ink); height: 13px; }
.ruler-list a[aria-current="page"] { color: var(--ink); }
.ruler-list a[aria-current="page"]::before { background: var(--ink); height: 15px; width: 2px; }
.ruler-list a[aria-current="page"]::after { background: var(--accent); }

.top-tools { display: flex; align-items: center; gap: 6px; padding: 14px 0 8px; flex: 0 0 auto; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: transparent; color: var(--ink); border: 1px solid var(--line);
  border-radius: 0; cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.nav-toggle { display: none; }

/* pełnoekranowa nawigacja mobilna */
.sheet {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  display: none; flex-direction: column; padding: 18px var(--gut) 40px;
  overflow-y: auto;
}
.sheet.open { display: flex; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.sheet-title {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-3);
}
.sheet a.sheet-link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 15px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
  font-family: var(--f-head); font-weight: 700; font-stretch: 112%; font-size: 25px;
}
.sheet a.sheet-link:first-of-type { border-top: 3px solid var(--rule); }
.sheet a.sheet-link .n { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); font-weight: 400; }
.sheet a.sheet-link:hover { color: var(--primary); }

/* --------------------------- typografia bloków ------------------------ */
.kicker {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px;
}
.lead { font-size: 19px; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.small { font-size: 14.5px; }

.crumbs {
  font-family: var(--f-mono); font-size: 12px; color: var(--ink-3);
  padding: 14px 0 0; overflow-x: auto; white-space: nowrap;
}
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs span { padding: 0 6px; }

main { display: block; padding-bottom: 60px; }
.section { padding: 42px 0; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rule-h2 { border-bottom: 4px solid var(--rule); padding-bottom: 8px; margin-bottom: 22px; }

/* ------------------------------ przyciski ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-head); font-weight: 700; font-stretch: 110%; font-size: 14px;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: transparent; cursor: pointer;
  padding: 13px 22px; border: 1px solid var(--ink); border-radius: 1px;
  box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4px var(--ink);
  transition: background .12s linear, color .12s linear;
}
.btn:hover { background: var(--ink); color: var(--bg); box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--bg); }
.btn-primary { color: var(--primary); border-color: var(--primary); box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4px var(--primary); }
.btn-primary:hover { background: var(--primary); color: #fff; box-shadow: inset 0 0 0 3px var(--primary), inset 0 0 0 4px #fff; }
.btn-sm { padding: 9px 14px; font-size: 12px; box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 3px var(--ink); }
.btn-sm:hover { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px var(--bg); }
.btn-plain { border: 0; box-shadow: none; padding: 6px 0; color: var(--primary); background: none; }
.btn-plain:hover { background: none; color: var(--accent); text-decoration: underline; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 0; }

/* ---------------------------- pola formularza ------------------------- */
.field { display: block; margin-bottom: 16px; }
.field > .lbl {
  display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px;
}
.field input[type="number"], .field input[type="text"], .field select, .field input[type="search"] {
  width: 100%; font: 600 17px var(--f-mono); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 0;
  padding: 11px 12px; appearance: none;
}
.field select { background-image: none; cursor: pointer; }
.field input:focus, .field select:focus { border-color: var(--primary); outline: 2px solid var(--primary-bg); }
/* minmax(0, …) zamiast 1fr: bez tego ścieżka `1fr` = `minmax(auto, 1fr)` nie schodzi
   poniżej min-content zawartości (np. przycisku „Budowa masy" z white-space: nowrap)
   i cała siatka rozpycha stronę poza ekran telefonu. */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.hint { font-size: 13.5px; color: var(--ink-3); margin: -8px 0 16px; }

/* segmenty (wybór jednej opcji) — prostokątne, bez zaokrągleń */
.seg { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  flex: 1 1 auto; text-align: center; cursor: pointer; padding: 10px 12px;
  font-family: var(--f-head); font-size: 13px; font-weight: 600; font-stretch: 106%;
  border-right: 1px solid var(--line); color: var(--ink-2); background: var(--surface);
  white-space: nowrap;
}
.seg label:last-of-type { border-right: 0; }
.seg input:checked + label { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + label { outline: 3px solid var(--primary); outline-offset: -3px; }

/* ------------------------- blok etykiety / wynik ---------------------- */
.label-box {
  background: var(--surface); border: 3px solid var(--rule); padding: 0;
}
.label-box.thin { border-width: 1px; border-color: var(--line); }
.label-hd {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 10px 16px; border-bottom: 3px solid var(--rule);
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
}
.label-bd { padding: 16px; }

.result-num {
  font-family: var(--f-head); font-weight: 700; font-stretch: 125%;
  font-size: clamp(42px, 9vw, 74px); line-height: 1; letter-spacing: -1.5px;
  margin: 4px 0 2px;
}
.result-num .u { font-size: .32em; font-stretch: 100%; letter-spacing: .04em; color: var(--ink-3); margin-left: .25em; }
.result-sub { font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }

/* wiersze etykiety */
.rows { margin: 0; padding: 0; list-style: none; }
.rows li, .row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft); margin: 0;
}
.rows li:last-child, .row:last-child { border-bottom: 0; }
.rows .k { color: var(--ink-2); font-size: 15.5px; }
.rows .v { font-family: var(--f-mono); font-weight: 600; white-space: nowrap; }
.rows li.total { border-top: 3px solid var(--rule); border-bottom: 0; padding-top: 11px; font-weight: 600; }
.rows li.sub .k { padding-left: 14px; color: var(--ink-3); font-size: 14.5px; }

/* pasek pokrycia z podziałką */
.gauge { margin: 14px 0 6px; }
.gauge-track {
  position: relative; height: 16px; background: var(--surface-2);
  border: 1px solid var(--line); overflow: hidden;
}
.gauge-fill { position: absolute; inset: 0 auto 0 0; background: var(--primary); width: 0; transition: width .35s ease; }
.gauge-fill.over { background: var(--accent); }
.gauge-ticks { position: absolute; inset: 0; display: flex; }
.gauge-ticks i { flex: 1 1 0; border-right: 1px solid var(--line); opacity: .6; }
.gauge-ticks i:last-child { border-right: 0; }
.gauge-cap {
  display: flex; justify-content: space-between; font-family: var(--f-mono);
  font-size: 11.5px; color: var(--ink-3); margin-top: 5px;
}

/* --------------------------- listy produktów -------------------------- */
.plist { border-top: 3px solid var(--rule); margin: 18px 0 0; }
.prow {
  position: relative; display: flex; align-items: baseline; gap: 12px;
  padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line-soft);
  text-decoration: none; color: var(--ink); background: var(--surface);
}
.prow:hover { color: var(--ink); background: var(--surface-2); }
.prow:hover .pname { text-decoration: underline; }
.prow > * { position: relative; z-index: 1; }
/* pasek pokrycia jest tłem wiersza, nie elementem flex — musi być po regule .prow > * */
.prow > .prow-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; height: auto;
  background: var(--primary-bg); z-index: 0;
}
.pname { flex: 1 1 auto; font-weight: 500; }
.pcat { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.pval { font-family: var(--f-mono); font-weight: 600; white-space: nowrap; }
.pval small { color: var(--ink-3); font-weight: 400; }

/* karty-wiersze dla stron/artykułów */
.linklist { border-top: 3px solid var(--rule); margin: 16px 0 0; }
.linkrow {
  display: block; padding: 14px 0; border-bottom: 1px solid var(--line-soft);
  text-decoration: none; color: var(--ink);
}
.linkrow:hover { color: var(--ink); }
.linkrow .t { font-family: var(--f-head); font-weight: 700; font-stretch: 108%; font-size: 19px; }
.linkrow:hover .t { text-decoration: underline; color: var(--primary); }
.linkrow .d { color: var(--ink-2); font-size: 15.5px; margin-top: 2px; }
.linkrow .m { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }

/* ------------------------------ tabele -------------------------------- */
.tablewrap { overflow-x: auto; margin: 18px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
thead th {
  text-align: left; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 400;
  padding: 8px 12px 8px 0; border-bottom: 3px solid var(--rule); white-space: nowrap;
}
tbody td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; font-family: var(--f-mono); white-space: nowrap; padding-right: 0; }

/* ------------------------------ notki --------------------------------- */
.note {
  border: 1px solid var(--line); border-left: 5px solid var(--ink-3);
  background: var(--surface); padding: 14px 16px; margin: 20px 0; font-size: 15.5px;
}
.note-warn { border-left-color: var(--accent); background: var(--accent-bg); }
.note-ok { border-left-color: var(--ok); background: var(--ok-bg); }
.note-info { border-left-color: var(--primary); background: var(--primary-bg); }
.note p:last-child { margin-bottom: 0; }
.note .nt {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  display: block; margin-bottom: 5px; color: var(--ink-2);
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.tag {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 3px 7px; color: var(--ink-2); text-decoration: none;
}
a.tag:hover { border-color: var(--ink); color: var(--ink); }

/* ------------------------------- FAQ ---------------------------------- */
.faq { border-top: 3px solid var(--rule); margin-top: 18px; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 28px 14px 0; position: relative;
  font-family: var(--f-head); font-weight: 600; font-stretch: 106%; font-size: 17.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px;
  font-family: var(--f-mono); font-size: 20px; color: var(--ink-3);
}
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { color: var(--primary); }
.faq .a { padding: 0 0 14px; color: var(--ink-2); max-width: 68ch; }
.faq .a p:last-child { margin-bottom: 0; }

/* ------------------------------ artykuł ------------------------------- */
.prose { max-width: 68ch; }
.prose h2 { border-bottom: 4px solid var(--rule); padding-bottom: 7px; }
.prose h3 { color: var(--ink); }
.prose > p:first-of-type { font-size: 19px; color: var(--ink-2); }
.meta {
  font-family: var(--f-mono); font-size: 12px; color: var(--ink-3);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 8px 0; margin: 0 0 26px; display: flex; gap: 18px; flex-wrap: wrap;
}

/* ------------------------- baner powitalny ----------------------------- */
.baner-sekcja { padding: 22px 0 4px; }
.baner {
  display: block; border: 3px solid var(--rule); background: var(--surface);
  line-height: 0;                       /* bez szczeliny pod obrazkiem */
}
.baner img { width: 100%; height: auto; display: block; }
.baner:hover { border-color: var(--primary); }
:root[data-theme="dark"] .baner img { filter: brightness(.9) contrast(1.02); }

/* --------------------------- zdjęcia treściowe ------------------------- */
/* Zdjęcia mają ciepłe, naturalne kolory, a serwis chłodną szarość. Spójność
   robi ramka i pasek podpisu w monospace — kadr czyta się wtedy jak etykieta
   z próbką, a nie jak wklejone zdjęcie stockowe. */
.foto { margin: 26px 0; border: 3px solid var(--rule); background: var(--surface); }
.foto picture { display: block; line-height: 0; }
.foto img { width: 100%; height: auto; display: block; }
.foto figcaption {
  border-top: 3px solid var(--rule); padding: 9px 12px;
  font-family: var(--f-mono); font-size: 12.5px; line-height: 1.55; color: var(--ink-2);
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
}
.foto-et {
  flex: 0 0 auto; color: var(--primary); font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; font-size: 11px;
}
.foto-tx { flex: 1 1 260px; min-width: 0; }
.foto-tx strong { color: var(--ink); font-weight: 600; }
/* Kwadratowy kadr (plansza pomiarowa) rozpycha kolumnę na pełną wysokość ekranu. */
.foto-waska { max-width: 460px; margin-left: auto; margin-right: auto; }
:root[data-theme="dark"] .foto img { filter: brightness(.88) contrast(1.03); }
@media (max-width: 700px) { .foto figcaption { font-size: 12px; padding: 8px 10px; } }

/* ------------------------------ hero ---------------------------------- */
.hero { padding: 34px 0 8px; }
.hero h1 { max-width: 20ch; }
.hero .lead { margin-bottom: 4px; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 26px; align-items: start; margin-top: 26px; }

/* --------------------------- licznik / szukajka ----------------------- */
.searchbar { display: flex; gap: 0; border: 1px solid var(--line); background: var(--surface); }
.searchbar input { flex: 1 1 auto; border: 0 !important; }
.searchbar button { border: 0; border-left: 1px solid var(--line); background: var(--ink); color: var(--bg); padding: 0 18px; cursor: pointer; font-family: var(--f-head); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.searchbar button:hover { background: var(--primary); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip {
  font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  padding: 6px 10px; cursor: pointer; text-decoration: none;
}
.chip:hover, .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ------------------------------ stopka -------------------------------- */
.foot { border-top: 3px solid var(--rule); background: var(--surface); margin-top: 40px; }
.foot-in { max-width: var(--maxw); margin: 0 auto; padding: 26px var(--gut) 34px; }
.foot-skl { font-size: 15px; color: var(--ink-2); max-width: 90ch; }
.foot-skl a { color: var(--ink-2); text-decoration: none; }
.foot-skl a:hover { color: var(--primary); text-decoration: underline; }
.foot-skl .sep { color: var(--ink-3); padding: 0 5px; }
.foot-box {
  border: 1px solid var(--line); padding: 10px 14px; margin: 18px 0 0;
  font-family: var(--f-mono); font-size: 12px; color: var(--ink-3);
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between;
}
.foot-legal { font-size: 13px; color: var(--ink-3); margin: 14px 0 0; }

/* ------------------------------ toast --------------------------------- */
#kb-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: var(--bg); padding: 11px 18px; z-index: 90;
  font-family: var(--f-mono); font-size: 13px; transition: transform .25s ease; max-width: 90vw;
}
#kb-toast.show { transform: translateX(-50%) translateY(0); }

/* ---------------------------- responsywność --------------------------- */
@media (max-width: 900px) {
  .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .ruler { display: none; }
  .nav-toggle { display: grid; }
  .top-in { align-items: center; }
  .top-tools { padding: 8px 0; }
  .brand { padding: 8px 0; }
}
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 32px 0; }
  /* Segmenty w kolumnie: przy trzech opcjach („Redukcja / Utrzymanie / Budowa masy")
     tekst z white-space: nowrap nie mieścił się w 1/3 szerokości telefonu i wychodził
     poza przycisk. Kolumna daje pełną treść i większe pole dotyku. */
  .seg { flex-direction: column; }
  .seg label {
    flex: 1 1 auto; text-align: left; padding: 13px 14px; white-space: normal;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .seg label:last-of-type { border-bottom: 0; }
  .prow { flex-wrap: wrap; }
  .pcat { order: 3; width: 100%; }

  /* pola dotyku i czytelność mikropodpisów na telefonie */
  .crumbs { padding: 10px 0 0; font-size: 12.5px; }
  .crumbs a { display: inline-block; padding: 7px 0; }
  .faq summary { padding: 16px 30px 16px 0; }
  details > summary.lbl { padding: 12px 0; }
  .kicker, .label-hd, .sheet-title, .pcat, .tag, .chip { font-size: 12px; }
  .gauge-cap, .foot-box { font-size: 12px; }

  /* Wiersze etykiety: przy długiej parze („To w porcjach domowych" + „0,9 × 1 mniejszy filet")
     wartość z nowrap nie mieściła się obok opisu. Zawijamy ją do nowej linii. */
  .rows li, .row { flex-wrap: wrap; }
  .rows .v { white-space: normal; margin-left: auto; text-align: right; }
  .rows .k { flex: 1 1 55%; }

  /* Tabele: zamiast przewijania w bok każdy wiersz staje się blokiem etykiety.
     Nagłówek kolumny wraca jako podpis wartości z atrybutu data-label. */
  .tablewrap { overflow-x: visible; margin: 16px 0; }
  .tablewrap table, .tablewrap tbody, .tablewrap tr, .tablewrap td { display: block; width: 100%; }
  .tablewrap thead { display: none; }   /* nagłówki wracają jako data-label przy każdej wartości */
  .tablewrap tr { border-top: 3px solid var(--rule); padding: 2px 0 10px; }
  .tablewrap tr:first-child { border-top: 0; }
  .tablewrap td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
    padding: 7px 0; border-bottom: 1px solid var(--line-soft); text-align: left;
  }
  .tablewrap td:last-child { border-bottom: 0; }
  .tablewrap td::before {
    content: attr(data-label); flex: 0 1 auto; max-width: 58%;
    font-family: var(--f-mono); font-size: 11px; letter-spacing: .07em;
    text-transform: uppercase; color: var(--ink-3); line-height: 1.5;
  }
  .tablewrap td.num { font-family: var(--f-mono); text-align: right; white-space: normal; min-width: 0; }
  .tablewrap td { min-width: 0; overflow-wrap: anywhere; }
  .tablewrap td:first-child {
    display: block; padding: 10px 0 8px; border-bottom: 1px solid var(--line);
    font-family: var(--f-head); font-weight: 700; font-stretch: 106%; font-size: 17.5px;
  }
  .tablewrap td:first-child::before { content: none; }
  .tablewrap td:first-child .small { font-family: var(--f-body); font-weight: 400; }
}

/* wąskie telefony (iPhone SE i podobne): logo + trzy przyciski nie mieściły się w pasku */
@media (max-width: 420px) {
  :root { --gut: 16px; }
  .top-in { gap: 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; flex: 0 0 30px; }
  .brand-txt { font-size: 15px; }
  .icon-btn { width: 32px; height: 32px; }
  .top-tools { gap: 4px; }
  .result-num { font-size: clamp(38px, 13vw, 56px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .top, .foot, .btn-row, .sheet, #kb-toast, .crumbs { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .label-box { border-color: #000; }
  a { color: #000; text-decoration: none; }
}

/* ---------- 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(--line, #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(--ink-2, #4b5563);
}
@media (max-width: 640px) {
  .geo-tldr { padding: 16px 18px; }
  .geo-tldr-answer { font-size: 1rem; }
}

/* Stopka redakcyjna pod trescia. Markup ac-about stal juz na pieciu podstronach,
   ale arkusz nie mial ani jednej reguly - renderowal sie jako goly tekst.
   Zmienne te same, ktorych uzywa reszta arkusza. */
.ac-about { margin: 34px 0 0; padding: 20px 22px; border-radius: 12px;
            background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb);
            font-size: .94rem; }
.ac-about h2 { margin: 0 0 10px; font-size: 1.05rem; }
.ac-about p { margin: 0 0 10px; color: var(--ink-2, #4b5563); }
.ac-about p:last-child { margin-bottom: 0; }
.ac-about .ac-about-h { font-weight: 600; margin-top: 14px; color: var(--ink, #111827); }
.ac-about ul { margin: 6px 0 0; padding-left: 20px; }
.ac-about li { margin: 4px 0; color: var(--ink-2, #4b5563); }
.ac-about a { color: var(--primary, #047857); font-weight: 600; }
