/* ==========================================================================
   Zdrowe Paliwo — dashboard/gauge design system
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Work+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --bg: #f7f5ec;
  --surface: #ffffff;
  --surface-2: #efece0;
  --ink: #1c2320;
  --muted: #5c6b64;
  --primary: #1f9d5a;
  --primary-ink: #0e6b3a;
  --primary-light: #3ddc84;
  --accent: #ff8a3d;
  --accent-ink: #b85a1d;
  --blue: #2f8fd6;
  --danger: #e4483a;
  --border: #dcd6c2;
  --dial-track: #e8e3d1;
  --shadow: 0 10px 30px rgba(28, 35, 32, 0.08);
  --radius: 14px;
  --font-head: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Work Sans', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

:root[data-theme="dark"] {
  --bg: #121615;
  --surface: #1a2020;
  --surface-2: #212926;
  --ink: #edf1ec;
  --muted: #9aa79f;
  --primary: #3ddc84;
  --primary-ink: #8ff0b6;
  --primary-light: #6bf0a6;
  --accent: #ffab6b;
  --accent-ink: #ffc79a;
  --blue: #58b3ff;
  --danger: #ff6b5e;
  --border: #2a3430;
  --dial-track: #263230;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121615; --surface: #1a2020; --surface-2: #212926; --ink: #edf1ec;
    --muted: #9aa79f; --primary: #3ddc84; --primary-ink: #8ff0b6;
    --primary-light: #6bf0a6; --accent: #ffab6b; --accent-ink: #ffc79a;
    --blue: #58b3ff; --danger: #ff6b5e; --border: #2a3430; --dial-track: #263230;
    --shadow: 0 10px 30px rgba(0,0,0,0.4);
  }
}

html { overflow-x: hidden; scroll-behavior: smooth; }
body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px; /* space for mobile bottom dashboard nav */
  transition: background .2s ease, color .2s ease;
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--primary-ink); }
ul, ol { padding-left: 1.3em; }
img { max-width: 100%; display: block; }
code, .mono { font-family: var(--font-mono); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.section-alt { background: var(--surface-2); }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.max-prose { max-width: 720px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary-ink);
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}

/* ==========================================================================
   Dashboard buttons — beveled console-switch look, not pills
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: 13px 22px; border-radius: 8px; border: 1px solid var(--border);
  cursor: pointer; text-decoration: none; color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 3px 0 var(--border);
  transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(1px); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 2px 0 var(--border); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn-primary {
  background: var(--primary); color: #06331c; border-color: var(--primary-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 3px 0 var(--primary-ink);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 2px 0 var(--primary-ink); }
.btn-primary:active { box-shadow: none; }
.btn-accent {
  background: var(--accent); color: #3a1c00; border-color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 3px 0 var(--accent-ink);
}
.btn-ghost { background: transparent; box-shadow: none; border-color: var(--border); }
.btn-ghost:hover { box-shadow: none; background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ==========================================================================
   Header — desktop "instrument strip", mobile bottom dashboard console
   ========================================================================== */
.top-strip {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface); border-bottom: 1px solid var(--border);
  background-image: repeating-linear-gradient(90deg, transparent 0 38px, var(--border) 38px 39px);
  background-size: 39px 100%;
}
:root[data-theme="dark"] .top-strip { background-image: repeating-linear-gradient(90deg, transparent 0 38px, var(--border) 38px 39px); }
.top-strip-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.brand-name b { color: var(--primary-ink); }

.desk-nav { display: none; }
@media (min-width: 900px) {
  .desk-nav { display: flex; gap: 4px; }
  .desk-nav a {
    font-family: var(--font-head); font-size: .88rem; font-weight: 600; color: var(--muted);
    text-decoration: none; padding: 8px 12px; border-radius: 6px; border: 1px solid transparent;
  }
  .desk-nav a:hover, .desk-nav a[aria-current="page"] {
    color: var(--primary-ink); background: color-mix(in srgb, var(--primary) 12%, transparent);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
  }
}
.top-strip-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.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; }

/* Mobile bottom console — fuel-metaphor "dashboard buttons" tab bar */
.bottom-console {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 18px rgba(0,0,0,.08);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { .bottom-console { display: none; } }
.bottom-console a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none; color: var(--muted); font-size: .64rem; font-family: var(--font-head); font-weight: 600;
  padding: 6px 2px; border-radius: 8px;
}
.bottom-console a svg { width: 20px; height: 20px; }
.bottom-console a[aria-current="page"] { color: var(--primary-ink); background: color-mix(in srgb, var(--primary) 14%, transparent); }

/* ==========================================================================
   Gauge dial component (SVG driven, CSS variable needle rotation)
   ========================================================================== */
.gauge { position: relative; width: 100%; max-width: 280px; margin: 0 auto; aspect-ratio: 1.6/1; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge-needle { transform-origin: 130px 140px; transition: transform .8s cubic-bezier(.2,.9,.2,1); }
.gauge-value { font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; fill: var(--ink); }
.gauge-label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; fill: var(--muted); text-transform: uppercase; }

/* ==========================================================================
   Cards — "gauge card": corner dial + notch, not icon-in-square
   ========================================================================== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.dial-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 22px 22px; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); display: block;
}
.dial-card::before {
  content: ""; position: absolute; top: 18px; right: 18px; width: 34px; height: 34px;
  border-radius: 50%; border: 3px solid var(--dial-track); border-top-color: var(--primary);
  border-right-color: var(--primary);
}
.dial-card h3 { margin-bottom: 8px; padding-right: 44px; }
.dial-card p { color: var(--muted); font-size: .93rem; margin-bottom: 0; }
.dial-card .tag { margin-bottom: 10px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 5px; background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border);
}
.tag-1 { color: var(--primary-ink); background: color-mix(in srgb, var(--primary) 14%, transparent); }
.tag-2 { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tag-3 { color: var(--blue); background: color-mix(in srgb, var(--blue) 16%, transparent); }
.tag-4 { color: var(--muted); }

/* callout box — "gauge warning light" style, dashed */
.callout {
  border: 1px dashed var(--primary); border-radius: 10px; padding: 18px 20px;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface)); margin: 24px 0;
}
.callout.amber { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.callout h4 { margin-bottom: 6px; font-family: var(--font-head); }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 16px 4px; font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-q .plus { font-size: 1.3rem; color: var(--primary-ink); transition: transform .2s ease; flex-shrink: 0; }
.faq-item[open] .faq-q .plus { transform: rotate(45deg); }
.faq-a { padding: 0 4px 16px; color: var(--muted); }

/* Breadcrumbs */
.crumbs { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin: 18px 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary-ink); }

/* Article prose */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .92rem; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.prose th { font-family: var(--font-head); background: var(--surface-2); }
.byline {
  display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); margin: 10px 0 28px;
  font-family: var(--font-mono);
}
.byline .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary);
  color: #06331c; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; flex-shrink: 0;
}
.sources { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--border); margin-top: 2.4em; padding-top: 1em; }

/* Hero photo with corner octane badge */
.hero-photo { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo .octane-badge { position: absolute; right: 14px; bottom: 14px; width: 64px; height: 64px; font-size: 1.15rem; background: var(--surface); box-shadow: var(--shadow); }
.hero-photo-caption { font-size: .8rem; color: var(--bg); background: rgba(0,0,0,.45); position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 14px; backdrop-filter: blur(2px); }

/* Hero */
.hero { padding: 52px 0 30px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { margin-bottom: .4em; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.stat-row { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 26px; }
.stat-row .stat b { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--primary-ink); }
.stat-row .stat span { font-size: .78rem; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }

/* ==========================================================================
   Baner startowy — zdjęcie dystrybutora na całą szerokość. Kadr ma pusty
   lewy plan (niebo, wzgórza), więc tam siada tekst; scrim w kolorze --bg
   wtapia lewą krawędź i dół zdjęcia w tło strony, przez co działa w obu
   motywach. Poniżej 900 px zdjęcie jest pasem nad tekstem (kadr mobilny).
   ========================================================================== */
.hero-banner { position: relative; padding: 0; overflow: hidden; isolation: isolate; }
.hero-banner-media { position: relative; aspect-ratio: 4 / 3; max-height: 460px; }
.hero-banner-media picture, .hero-banner-media img { width: 100%; height: 100%; }
.hero-banner-media img { object-fit: cover; object-position: 60% 50%; display: block; }
.hero-banner-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, var(--bg) 100%);
}
.hero-banner-copy { position: relative; margin-top: -56px; padding-top: 4px; padding-bottom: 40px; }
.hero-banner-copy .geo-tldr { background: color-mix(in srgb, var(--surface) 92%, transparent); }
.hero-banner-strip { margin-top: 24px; }
.hero-banner-strip .stat-row { margin-top: 0; }

.octane-note {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 24px; max-width: 560px;
  padding: 10px 20px 10px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  text-decoration: none; color: var(--muted); font-size: .9rem; line-height: 1.35;
  transition: border-color .15s ease, transform .15s ease;
}
.octane-note:hover { border-color: var(--primary); transform: translateY(-1px); }
.octane-note .octane-badge { width: 48px; height: 48px; font-size: .95rem; border-width: 4px; flex-shrink: 0; }
.octane-note b { display: block; color: var(--primary-ink); font-family: var(--font-head); font-weight: 600; }

/* Sekcja Dziennika na stronie startowej: zdjęcie z nasuniętym od dołu panelem podglądu */
.dziennik-stack { position: relative; }
.dziennik-stack .hero-photo { margin: 0; }
.dziennik-stack .panel { position: relative; margin: -48px 16px 0; }
@media (min-width: 900px) { .dziennik-stack .panel { margin: -60px 28px 0; } }

@media (min-width: 900px) {
  .hero-banner { display: grid; min-height: clamp(560px, 52vw, 900px); }
  .hero-banner-media { position: absolute; inset: 0; aspect-ratio: auto; max-height: none; z-index: -1; }
  .hero-banner-media img { object-position: 55% 62%; }
  .hero-banner-media::after {
    background:
      linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 94%, transparent) 34%,
                      color-mix(in srgb, var(--bg) 62%, transparent) 52%, transparent 70%),
      linear-gradient(180deg, transparent 88%, var(--bg) 100%);
  }
  .hero-banner-copy {
    margin-top: 0; width: 100%; padding-top: 48px; padding-bottom: 44px;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  }
  .hero-banner-copy > * { max-width: 560px; }
  .hero-banner-copy h1 { font-size: clamp(2rem, 3vw, 2.6rem); }
  .hero-banner-copy .lead { max-width: 52ch; }
  /* blok "W skrócie" w banerze jest zwarty — pełny rozmiar rozciągał kadr w pionie */
  .hero-banner-copy .geo-tldr { margin: 18px 0 22px; padding: 14px 18px; backdrop-filter: blur(6px); }
  .hero-banner-copy .geo-tldr-answer { font-size: .98rem; margin-bottom: 8px; }
  .hero-banner-copy .geo-tldr-list li { font-size: .88rem; line-height: 1.45; margin: 3px 0; }
  /* statystyki po lewej, notka oktanowa po prawej — jeden rząd na dole banera,
     na całą szerokość kontenera (wychodzi poza kolumnę tekstu) */
  .hero-banner-copy > .hero-banner-strip {
    max-width: none; width: 100%; display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: 26px;
  }
  .hero-banner-strip .octane-note { margin-top: 0; }
}
/* 900–1279 px: kadr jest mocno przycięty z boków i dystrybutor podchodzi pod tekst — węższa kolumna */
@media (min-width: 900px) and (max-width: 1279px) {
  .hero-banner-copy > * { max-width: 520px; }
  .hero-banner-copy .lead { max-width: 46ch; }
  .hero-banner-strip .stat-row { gap: 20px; }
  .hero-banner-strip .octane-note { max-width: 430px; font-size: .84rem; gap: 10px; }
}
@media (min-width: 1280px) { .hero-banner-copy > * { max-width: 600px; } }

/* W trybie ciemnym jasne, słoneczne zdjęcie lekko przygaszamy, żeby nie świeciło z ciemnej strony. */
:root[data-theme="dark"] .hero-banner-media img { filter: brightness(.8) saturate(.95); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-banner-media img { filter: brightness(.8) saturate(.95); }
}

/* ==========================================================================
   Dodane 2026-09-20 (audyt AdSense): przycisk zgód w stopce, komunikaty
   walidacji kalkulatorów, karty jadłospisu, tabela indeksu sytości.
   ========================================================================== */
button.receipt-btn { width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.receipt-btn:hover span:first-child { text-decoration: underline; }

.calc-alert { margin: 12px 0 0; padding: 10px 14px; border-radius: 8px; font-size: .9rem; color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.calc-alert:empty { display: none; }
.calc-warn { margin: 12px 0 0; padding: 10px 14px; border-radius: 8px; font-size: .9rem; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.calc-warn:empty { display: none; }

/* Jadłospis: dzień = karta, posiłek = wiersz; działa na 375 px bez tabeli */
.plan-day { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.plan-day h3 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin: 0 0 10px; font-size: 1.15rem; }
.plan-day h3 .plan-sum { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); white-space: nowrap; }
.plan-meal { display: grid; grid-template-columns: 82px 1fr auto; gap: 10px 14px; padding: 10px 0; border-top: 1px dashed var(--border); align-items: start; }
.plan-meal:first-of-type { border-top: 0; }
.plan-meal .plan-kind { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 3px; }
.plan-meal .plan-name { font-family: var(--font-head); font-weight: 600; }
.plan-meal .plan-ing { font-size: .88rem; color: var(--muted); margin: 2px 0 0; }
.plan-meal .plan-swap { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }
.plan-meal .plan-swap b { color: var(--primary-ink); font-weight: 600; }
.plan-meal .plan-kcal { font-family: var(--font-mono); font-size: .78rem; text-align: right; white-space: nowrap; color: var(--primary-ink); }
@media (max-width: 560px) { .plan-meal { grid-template-columns: 1fr auto; } .plan-meal .plan-kind { grid-column: 1 / -1; padding-top: 0; } .plan-day h3 .plan-sum { white-space: normal; } }

/* Lista zakupów na tydzień */
.shop-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 16px 0 8px; }
.shop-cat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.shop-cat h4 { margin: 0 0 8px; font-size: .95rem; }
.shop-cat ul { margin: 0; padding-left: 18px; font-size: .9rem; }
.shop-cat li { margin: 3px 0; }

/* Tabele danych w artykułach (indeks sytości, gęstość odżywcza) — przewijalne na telefonie */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.2em 0; }
.table-wrap table { min-width: 520px; margin: 0; }
.si-bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--primary); vertical-align: middle; margin-right: 8px; }
.si-low .si-bar { background: var(--accent); }
td.num { font-family: var(--font-mono); white-space: nowrap; }
/* tabele na stronach autopilota (ac-page) — ten sam wygląd co .prose table */
.ac-page table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .92rem; }
.ac-page th, .ac-page td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.ac-page th { font-family: var(--font-head); background: var(--surface-2); }
.table-wrap table { margin: 0; }

/* Search (sitelinks searchbox target) */
.site-search { position: relative; display: flex; flex: 1 1 150px; max-width: 260px; min-width: 0; order: 3; }
@media (min-width: 900px) { .site-search { order: 0; } }
.site-search input {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: 8px 0 0 8px; border: 1px solid var(--border); border-right: none;
  font-family: var(--font-body); font-size: .95rem; background: var(--surface); color: var(--ink);
}
.site-search button {
  border-radius: 0 8px 8px 0; padding: 0 16px; border: 1px solid var(--primary-ink);
  background: var(--primary); color: #06331c; cursor: pointer;
}
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); z-index: 30; overflow: hidden; display: none; }
.search-results.open { display: block; }
.search-results a { display: block; padding: 10px 14px; text-decoration: none; color: var(--ink); font-size: .9rem; border-bottom: 1px solid var(--border); }
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--surface-2); }
.search-results .none { padding: 12px 14px; color: var(--muted); font-size: .88rem; }

/* Forms (calculator / quiz / tools) */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-head); font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: .95rem;
}
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 14px; }
.seg { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { flex: 1; padding: 10px; border: none; background: var(--bg); color: var(--muted); font-family: var(--font-head); font-weight: 600; font-size: .85rem; cursor: pointer; border-right: 1px solid var(--border); }
.seg button:last-child { border-right: none; }
.seg button.active { background: var(--primary); color: #06331c; }

.tank-bar { height: 26px; border-radius: 999px; background: var(--dial-track); overflow: hidden; border: 1px solid var(--border); display: flex; }
.tank-bar span { display: block; height: 100%; transition: width .6s ease; }
.tank-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: .82rem; font-family: var(--font-mono); }
.tank-legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }

/* Octane result badge (Dziennik Tankowania) */
.octane-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 50%;
  font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; border: 6px solid var(--primary); color: var(--primary-ink);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}
.octane-badge.mid { border-color: var(--accent); color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.octane-badge.low { border-color: var(--danger); color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }

.log-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.log-row:last-child { border-bottom: none; }
.log-row .chip { font-family: var(--font-mono); font-size: .7rem; padding: 3px 8px; border-radius: 5px; }
.chip-98 { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary-ink); }
.chip-95 { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent-ink); }
.chip-91 { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.log-row button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; }

/* week bars mini chart */
.week-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 14px; }
.week-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.week-chart .bar { width: 100%; border-radius: 4px 4px 0 0; min-height: 4px; }
.week-chart .day-label { font-size: .68rem; font-family: var(--font-mono); color: var(--muted); }

/* Quiz */
.quiz-progress { height: 6px; background: var(--dial-track); border-radius: 999px; overflow: hidden; margin-bottom: 24px; }
.quiz-progress span { display: block; height: 100%; background: var(--primary); transition: width .3s ease; }
.quiz-options { display: grid; gap: 10px; }
.quiz-options button {
  text-align: left; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-family: var(--font-body); font-size: .95rem; color: var(--ink);
}
.quiz-options button:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }

/* Checklist (shopping list generator) */
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 10px; margin-bottom: 18px; }
.check-item { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.list-output { columns: 2; column-gap: 26px; }
@media (max-width: 640px) { .list-output { columns: 1; } }
.list-output li { break-inside: avoid; margin-bottom: 6px; }
.list-output .cat-title { font-family: var(--font-head); font-weight: 700; margin: 14px 0 6px; color: var(--primary-ink); break-after: avoid; }

/* ==========================================================================
   Footer — "paragon" (gas-station receipt) style
   ========================================================================== */
.receipt-footer {
  background: var(--ink); color: var(--bg); margin-top: 64px; position: relative;
  padding-top: 22px;
}
:root[data-theme="dark"] .receipt-footer { background: #0a0d0c; }
.receipt-footer::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 14px;
  background:
    linear-gradient(135deg, var(--bg) 25%, transparent 25%) 0 0,
    linear-gradient(225deg, var(--bg) 25%, transparent 25%) 0 0;
  background-size: 16px 16px; background-repeat: repeat-x;
}
.receipt-inner { max-width: 640px; margin: 0 auto; padding: 30px 20px 40px; font-family: var(--font-mono); font-size: .85rem; }
.receipt-title { text-align: center; font-family: var(--font-head); font-size: 1.1rem; letter-spacing: .04em; margin-bottom: 4px; }
.receipt-sub { text-align: center; color: color-mix(in srgb, var(--bg) 55%, transparent); margin-bottom: 18px; font-size: .78rem; }
.receipt-dash { border-top: 1px dashed color-mix(in srgb, var(--bg) 35%, transparent); margin: 14px 0; }
.receipt-footer a { color: inherit; text-decoration: none; }
.receipt-footer a:hover { color: var(--primary-light); }
.receipt-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 0; }
.receipt-line .leader { flex: 1; border-bottom: 1px dotted color-mix(in srgb, var(--bg) 25%, transparent); margin: 0 6px 4px; }
.receipt-line .code { font-size: .72rem; opacity: .6; }
.receipt-total { display: flex; justify-content: space-between; font-family: var(--font-head); font-size: 1rem; margin-top: 10px; }
.receipt-barcode { height: 32px; margin: 20px 0 10px; background-image: repeating-linear-gradient(90deg, var(--bg) 0 2px, transparent 2px 5px, var(--bg) 5px 6px, transparent 6px 11px); opacity: .5; }
.receipt-legal { text-align: center; font-size: .72rem; color: color-mix(in srgb, var(--bg) 50%, transparent); margin-top: 10px; }

/* disclaimer box */
.disclaimer { font-size: .82rem; color: var(--muted); background: var(--surface-2); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 20px 0; }

/* print (shopping list) */
@media print {
  .top-strip, .bottom-console, .receipt-footer, .no-print { display: none !important; }
  body { padding-bottom: 0; background: #fff; color: #000; }
}

/* utility */
.flex { display: flex; }
.gap-2 { gap: 8px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 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; }
}

/* ---------- 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); }

/* 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; } }

/* Stopka redakcyjna pod trescą — kto odpowiada za material i na czym jest oparty.
   Markup `ac-about` przyszedl z toolkitu bez ani jednej reguly, wiec renderowal sie
   jak zwykly akapit. Idiom przejety z `.geo-tldr`, ale wyciszony: to stopka, nie wyroznik. */
.ac-about {
  margin: 34px 0 8px;
  padding: 22px 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .93rem;
  color: var(--muted);
}
.ac-about h2 {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary-ink);
}
.ac-about p { margin: 0 0 10px; line-height: 1.6; }
.ac-about p strong { color: var(--ink); }
.ac-about-h {
  margin-top: 16px !important;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
}
.ac-about ul { margin: 8px 0 0; padding-left: 20px; }
.ac-about li { margin-bottom: 6px; line-height: 1.5; }
.ac-about a { color: var(--primary-ink); }
:root[data-theme="dark"] .ac-about a { color: var(--primary); }

@media (max-width: 640px) {
  .ac-about { padding: 18px 16px; }
}
