/* tokens.css — zmienne projektowe nazysk (light domyślny + dark). */
:root {
  /* LIGHT (domyślny) — zaufanie */
  --bg: #F3EFE7;            /* cream canvas */
  --bg-grad-1: #F7F4EE;
  --bg-grad-2: #EFE9DD;
  --surface: rgba(255, 255, 255, .72);   /* frosted glass card */
  --surface-solid: #FFFFFF;
  --surface-2: #FFFFFF;    /* kafelek listy: o stopień jaśniejszy od tła */
  --border: rgba(14, 42, 71, .10);
  --thumb-edge: rgba(14, 42, 71, .12);   /* krawędź miniaturki */
  --thumb-ring: rgba(14, 42, 71, .10);   /* zewnętrzny pierścień (kontrast do tła) */
  --ink: #0E2A47;          /* granat — tekst, marka */
  --muted: #4D5E72;
  --accent: #E8A13A;       /* amber — jedyny akcent, CTA */
  --accent-ink: #241500;
  --good: #1F8A5B;         /* werdykt: opłaca się */
  --bad: #C2533B;          /* werdykt: nie opłaca się */
  --glow: rgba(232, 161, 58, .18);
  --shadow: 0 14px 34px -22px rgba(14, 42, 71, .45);
  --blur: 14px;

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* TYPOGRAFIA (skala portalowa: Onet / Business Insider, zwarta) */
  --fs-body: 16px;
  --lh-body: 1.55;
  --lh-head: 1.15;
  --fs-h1: clamp(26px, 2.4vw, 32px);   /* żaden nagłówek strony nie przekracza 32px */
  --fs-h2: clamp(20px, 2vw, 24px);
  --fs-h3: 18px;            /* tytuły kart */
  --fs-title: 15px;        /* tytuły kart w portalu (rail, poradniki) */
  --fs-lead: 16px;         /* podtytuł pod H1 */
  --fs-small: 13px;
  --fs-micro: 12px;        /* wersaliki/etykiety */
  --fs-result: clamp(26px, 2.4vw, 30px); /* wielka liczba wyniku */
  --fs-nav: 14px;

  /* POLA FORMULARZA, jednolita wysokość input == select == 40px */
  --control-h: 40px;
  --control-fs: 14.5px;
  --control-pad-x: 12px;

  /* UKŁAD I ODSTĘPY */
  --container: 1180px;
  --gutter: 24px;
  --space-section: 56px;
  --card-pad: 20px;
  --radius: 12px;
  --radius-sm: 10px;
}

:root[data-theme="dark"] {
  /* DARK (granat-based, glass) */
  --bg: #0B1A2E;
  --bg-grad-1: #102A47;
  --bg-grad-2: #0A1726;
  --surface: rgba(18, 37, 61, .6);       /* navy glass card */
  --surface-solid: #12253D;
  --surface-2: #16304E;    /* kafelek listy: jaśniejszy od granatowego tła strony */
  --border: rgba(255, 255, 255, .12);
  --thumb-edge: rgba(255, 255, 255, .10);   /* krawędź miniaturki (dark) */
  --thumb-ring: rgba(255, 255, 255, .08);   /* zewnętrzny pierścień (dark) */
  --ink: #DCE6F0;
  --muted: #8FA3B8;
  --accent: #F0B65C;
  --accent-ink: #241500;
  --good: #34D399;
  --bad: #F08A6B;
  --glow: rgba(240, 182, 92, .22);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, .6);
  --blur: 16px;
}

/* base.css — reset, typografia, layout, komponenty (poza glass). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(60vw 40vw at 80% -5%, var(--glow), transparent 60%),
    radial-gradient(50vw 35vw at -5% 20%, var(--glow), transparent 55%),
    linear-gradient(160deg, var(--bg-grad-1), var(--bg-grad-2));
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; line-height: var(--lh-head); color: var(--ink); }
h1 { font-size: var(--fs-h1); margin: 0 0 .4em; }
h2 { font-size: var(--fs-h2); margin: 1.4em 0 .5em; }
h3 { font-size: var(--fs-h3); margin: 1.1em 0 .4em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

.num { font-variant-numeric: tabular-nums; }
.micro { font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.center { text-align: center; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Jeden wspólny, wyśrodkowany kontener dla wszystkich pasów treści
   (header, breadcrumb, hero, kalkulator, sekcje, footer). */
.container, .wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); width: 100%; box-sizing: border-box; }
.wrap-narrow { max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); width: 100%; box-sizing: border-box; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .bar { display: flex; align-items: center; gap: 1.25rem; padding-block: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.03em; text-decoration: none; color: var(--ink); }
.brand .word { display: inline-flex; }
.brand .na { color: var(--ink); }
.brand .zysk { color: var(--accent); }
.brand svg { display: block; width: 24px; height: 24px; }
.nav { display: flex; gap: 1.1rem; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; font-weight: 600; font-size: var(--fs-nav); color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-solid); color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); }

/* --- Buttons / chips --- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  padding: .65rem 1.15rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 22px -10px var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem; border-radius: 999px;
  background: var(--surface-solid); border: 1px solid var(--border);
  font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--ink);
}
.chip:hover { border-color: var(--accent); }

/* --- Forms --- */
.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: 12px; }
.field label { font-weight: 600; font-size: var(--fs-small); }
.field .help { font-size: 12px; color: var(--muted); }
.input-wrap { display: flex; align-items: stretch; height: var(--control-h); box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-solid); overflow: hidden; }
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.input-wrap input, .input-wrap select {
  flex: 1; height: 100%; box-sizing: border-box; border: 0; background: transparent; color: var(--ink);
  font-family: inherit; font-size: var(--control-fs); font-variant-numeric: tabular-nums;
  padding: 0 var(--control-pad-x); min-width: 0;
}
.input-wrap input:focus, .input-wrap select:focus { outline: none; }
.input-wrap .unit, .input-wrap .addon { display: inline-grid; place-items: center; padding: 0 .7rem; background: var(--surface); color: var(--muted); font-size: var(--fs-small); font-weight: 600; border-left: 1px solid var(--border); }
.input-wrap select.addon { border-left: 1px solid var(--border); border-right: 0; cursor: pointer; }
select { color: var(--ink); }

.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; min-height: var(--control-h); }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }

details.advanced { margin: .9rem 0 0; border-top: 1px dashed var(--border); padding-top: .8rem; }
details.advanced > summary { cursor: pointer; font-weight: 700; font-family: var(--font-display); font-size: var(--fs-small); list-style: none; display: flex; align-items: center; gap: .4rem; margin-bottom: .8rem; }
details.advanced > summary::-webkit-details-marker { display: none; }
details.advanced > summary::before { content: "+"; color: var(--accent); font-weight: 800; }
details.advanced[open] > summary::before { content: "\2212"; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* --- Layout kalkulatora: pola + sticky panel wyniku --- */
.calc-layout { display: grid; grid-template-columns: 1.1fr .9fr; column-gap: 24px; row-gap: 12px; align-items: start; margin: 1rem 0 var(--space-section); }
@media (max-width: 860px) { .calc-layout { grid-template-columns: 1fr; } }
.result-col { position: sticky; top: 72px; }
@media (max-width: 860px) { .result-col { position: static; } }

/* --- Werdykt --- */
.verdict {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
  padding: .45rem 1rem; border-radius: 999px; letter-spacing: -.01em;
}
.verdict.good { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.verdict.bad  { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }

.result-big { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-result); font-variant-numeric: tabular-nums; line-height: 1.05; margin: .5rem 0 .2rem; }
.result-sentence { font-size: var(--fs-small); color: var(--ink); margin: .5rem 0 1rem; }

.breakdown { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.breakdown td { padding: .35rem 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.breakdown td:last-child { text-align: right; font-weight: 600; }
.breakdown tr.total td { border-bottom: 0; border-top: 2px solid var(--border); font-weight: 800; padding-top: .5rem; }
.breakdown .vat-info td { color: var(--muted); }

/* --- Partner slot --- */
.partner-slot { margin-top: 1rem; padding: .85rem 1rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.partner-slot .micro { display: block; margin-bottom: .25rem; }
.partner-slot a { font-weight: 700; color: var(--ink); text-decoration: none; }
.partner-slot a:hover { color: var(--accent); }

/* --- Hero --- */
.hero { padding-block: 2.2rem 1rem; }
.hero h1 { font-size: var(--fs-h1); }
.hero .tagline { font-size: var(--fs-lead); color: var(--muted); max-width: 52ch; }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.2rem; }

/* Sekcje na stronie głównej, jednolita gęstość pionowa. */
main > section { margin-bottom: var(--space-section); }

/* --- Cards grid --- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .12s ease; }
.card-link:hover { transform: translateY(-2px); }
.card-link h3 { margin: 0 0 .3rem; }
.card-link p { margin: 0; color: var(--muted); font-size: var(--fs-small); }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--border); margin-top: var(--space-section); padding: 2rem 0 2.5rem; color: var(--muted); font-size: var(--fs-small); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.site-footer a { color: var(--muted); text-decoration: none; display: block; padding: .15rem 0; }
.site-footer a:hover { color: var(--ink); }
.site-footer h4 { font-family: var(--font-display); color: var(--ink); font-size: var(--fs-small); margin: 0 0 .5rem; }

.breadcrumb { font-size: var(--fs-small); color: var(--muted); margin-block: .9rem; }
.breadcrumb a { text-decoration: none; color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; border-radius: 0 0 var(--radius-sm) 0; z-index: 100; }
.skip-link:focus { left: 0; }

.prose p, .prose li { max-width: 68ch; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .3rem; }

/* --- Artykuł: kicker, data, okładka, treść --- */
.article-kicker { display: block; letter-spacing: .08em; margin-bottom: .4rem; }
.article-meta { color: var(--muted); margin: -.2rem 0 1rem; }
.article-cover { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--radius); display: block; margin: 0 0 1.6rem; border: 1px solid var(--border); }
.prose blockquote { margin: 1.2rem 0; padding: .8rem 1.1rem; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--surface); padding: .1em .35em; border-radius: 5px; }
.table-wrap { overflow-x: auto; margin: 1.2rem 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.prose th, .prose td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--border); }
.prose thead th { background: var(--surface); font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.prose tbody tr:last-child td { border-bottom: 0; }
.note { padding: .8rem 1rem; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: var(--fs-small); }
/* Wariant ostrzegawczy (cło antydumpingowe) */
.note-warn { border-left-color: var(--bad); margin: 0 0 1rem; }
.note-warn strong { color: var(--bad); }
.tag-updated { font-size: 13px; color: var(--muted); }

/* =====================================================================
   STRONA GŁÓWNA (układ hybrydowy: rama portalu + kalkulator w leadzie)
   ===================================================================== */

/* Pasek kategorii pod headerem (home + huby) */
.cat-bar { border-bottom: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); }
.cat-bar-inner { display: flex; gap: 18px; align-items: center; overflow-x: auto; padding-block: 9px; scrollbar-width: none; }
.cat-bar-inner::-webkit-scrollbar { display: none; }
.cat-bar a { white-space: nowrap; text-decoration: none; font-size: var(--fs-small); font-weight: 600; color: var(--muted); }
.cat-bar a:first-child { color: var(--accent); }
.cat-bar a:hover { color: var(--ink); }

/* Sekcja LEAD: kalkulator + rail */
.lead-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; margin-block: 20px; }
.lead-grid.solo { grid-template-columns: 1fr; }
@media (max-width: 860px) { .lead-grid { grid-template-columns: 1fr; } }

/* Widget kalkulatora */
.hc-head { position: relative; margin-bottom: 14px; }
.hc-head h2 { font-size: 19px; margin: .25rem 0 .2rem; }
.hc-sub { font-size: var(--fs-small); margin: 0; }
.kicker { display: block; font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); }
.hc-head .kicker { color: var(--accent); }
.live-tag { position: absolute; top: 0; right: 0; font-size: var(--fs-micro); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--good); display: inline-flex; align-items: center; gap: .35rem; }
.live-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
/* Mobile: „NA ŻYWO" w osobnej linii nad nagłówkiem, by nie nachodziło na zawijający się tytuł. */
@media (max-width: 640px) {
  .live-tag { position: static; margin-bottom: 8px; }
}
/* Odstęp po podtytule, przed pierwszym rzędem pól (oddech + balans wysokości kolumn). */
.hc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 52px; }
.hc .field { margin-bottom: 0; }
.hc-result { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.hc-neutral { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.hc-msg { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.hc-figs { display: flex; gap: 28px; margin: .5rem 0; }
.hc-figs > div { display: flex; flex-direction: column; gap: .1rem; }
.hc-figs strong { font-family: var(--font-display); font-size: var(--fs-result); font-variant-numeric: tabular-nums; line-height: 1.05; }
.hc-sentence { font-size: var(--fs-small); margin: .4rem 0 .6rem; }
.hc-full { font-size: var(--fs-small); font-weight: 700; text-decoration: none; color: var(--accent); }
.hc-full:hover { text-decoration: underline; }
.hc-has .verdict { margin-bottom: .4rem; font-size: 18px; padding: .35rem .85rem; }
@media (max-width: 520px) { .hc-grid { grid-template-columns: 1fr; } .hc-more { display: none; } }

/* Kolumny leada: lewa (kalkulator + kursy + „od czego zacząć"), prawa (rail). Gap = jak w rail,
   by etykiety „Kalkulator" i „Najnowsze" oraz górne krawędzie kart startowały z tej samej linii. */
.lead-main, .lead-rail { display: flex; flex-direction: column; gap: 12px; }

/* Rail najnowszych */
.section-label { display: block; font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.rail { display: flex; flex-direction: column; gap: 12px; }

/* Blok „Od czego zacząć" (lewa kolumna, pod kursami) */
.start-here { padding: 14px 16px; }
.start-here .section-label { margin-bottom: 8px; }
.start-list { list-style: none; margin: 0; padding: 0; }
.start-list li { border-bottom: 1px solid var(--border); }
.start-list li:last-child { border-bottom: 0; }
.start-list a { display: block; padding: 9px 0; text-decoration: none; color: var(--ink); font-weight: 600; font-size: var(--fs-small); }
.start-list a:hover { color: var(--accent); }

/* Widget „Stawki dziś" */
.rates-card { padding: 14px 16px; }
.rates-card .section-label { margin-bottom: 8px; }
.rates-row { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--border); }
.rates-row:last-of-type { border-bottom: 0; }
.rates-cur { font-size: var(--fs-small); color: var(--muted); font-weight: 600; }
.rates-row strong { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; font-size: 17px; }
.rates-date { display: block; margin-top: 8px; color: var(--muted); }
.rail-featured { display: block; text-decoration: none; color: inherit; overflow: hidden; }
.rail-featured .thumb-lg { width: 100%; height: 160px; }
.rail-featured-body { padding: 12px 14px; }
.rail-featured-body h3 { font-size: var(--fs-title); margin: .15rem 0 .25rem; line-height: 1.25; }
.rail-featured-body p { font-size: var(--fs-small); margin: 0; }
/* Kafelek listy: własne tło (kontrast do tła strony), padding i zaokrąglenie. */
.rail-item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-decoration: none; color: inherit;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.rail-item:hover { border-color: var(--accent); }
.rail-item:hover h3 { color: var(--accent); }
.rail-item h3 { font-size: var(--fs-title); margin: 0; line-height: 1.25; }

/* Miniatury i gradientowe placeholdery (kolory marki). Krawędź + pierścienie, żeby
   granatowa miniaturka nie wtapiała się w granatowe tło strony (ważne w dark mode). */
.thumb {
  border-radius: 8px; background-size: cover; background-position: center; flex: none;
  border: 1px solid var(--thumb-edge);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 0 0 1px var(--thumb-ring);
}
/* Miniaturka (system 5, wariant thumb 1200x900 bez tytułu) — bohater wyśrodkowany, kadr centralny. */
.thumb-cover { background-position: center; background-color: #0E2A47; }
.thumb-sm { width: 64px; height: 64px; }                    /* stały kwadrat */
.thumb-card { width: 100%; height: 132px; border-radius: 8px 8px 0 0; }
/* Featured: miniaturka u góry karty (rogi przejmuje overflow karty). */
.rail-featured .thumb-lg { border-radius: 0; }

/* Siatki sekcji */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid-3 { grid-template-columns: 1fr; } }

/* Karty artykułów z miniaturą */
.card-link.glass { overflow: hidden; }
.card-link .card-body { padding: 12px 14px; }
.card-link .card-body h3 { font-size: var(--fs-title); margin: .15rem 0 .25rem; line-height: 1.25; }
.card-link .card-body p { margin: 0; color: var(--muted); font-size: var(--fs-small); }

/* =====================================================================
   HAMBURGER + DRAWER (tylko mobile; desktop bez zmian)
   ===================================================================== */
.nav-toggle { display: none; }

/* Drawer i backdrop istnieją w DOM, ale są niewidoczne i poza tab-orderem do otwarcia. */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(8, 16, 28, .45);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto; }
.mobile-drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(82vw, 320px); z-index: 70;
  background: var(--surface-solid); border-left: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 1.1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: .25rem;
  transform: translateX(100%); transition: transform .22s ease; will-change: transform;
}
.mobile-drawer.open { transform: translateX(0); }
/* Stan zamknięty: poza tab-orderem i drzewem dostępności (atrybut inert). */
.mobile-drawer[inert] { pointer-events: none; }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a { padding: .8rem .4rem; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 16px; border-bottom: 1px solid var(--border); }
.drawer-nav a:hover, .drawer-nav a:focus-visible { color: var(--accent); }
.mobile-drawer .drawer-cta { margin-top: 1rem; justify-content: center; }
.drawer-foot { display: flex; align-items: center; gap: .6rem; margin-top: auto; padding-top: 1rem; color: var(--muted); }
.drawer-foot .micro { color: var(--muted); }
html.drawer-locked { overflow: hidden; }

@media (max-width: 760px) {
  .site-header .nav { display: none; }
  .site-header #theme-toggle { display: none; }       /* desktopowy toggle chowamy; jest w drawerze */
  .site-header .bar { gap: .6rem; }
  .site-header .bar > .btn-primary { margin-left: auto; padding: .5rem .8rem; font-size: 13px; }
  .nav-toggle {
    display: inline-grid; place-items: center; width: 40px; height: 40px;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--surface-solid); color: var(--ink); cursor: pointer;
  }
  .nav-toggle:hover { border-color: var(--accent); }
}
/* Desktop: hamburger/drawer całkowicie wyłączone (niewidoczne i niefokusowalne). */
@media (min-width: 761px) {
  .nav-toggle, .mobile-drawer, .drawer-backdrop { display: none !important; }
}

/* glass.css — efekt szkła dla kart w obu trybach. */
.glass {
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.glass-pad { padding: var(--card-pad); }
@media (max-width: 560px) { .glass-pad { padding: 1.1rem; } }

/* Subtelny highlight u góry karty — bardziej „szkło". */
.glass { position: relative; }
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 40%);
}
:root[data-theme="dark"] .glass::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 40%);
}

/* Fallback gdy brak backdrop-filter — solidne tło, by zachować czytelność. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--surface-solid); }
}
