*{box-sizing:border-box}
html{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,system-ui,sans-serif;line-height:1.55;color:#1a1a1a;background:#fafbfc}
body{margin:0}
.wrap{max-width:1100px;margin:0 auto;padding:0 20px}
a{color:#0b63ce;text-decoration:none}
a:hover{text-decoration:underline}
.skip{position:absolute;left:-9999px}
.skip:focus{left:0;top:0;background:#0b63ce;color:#fff;padding:10px;z-index:100}
.site-header{background:#fff;border-bottom:1px solid #e3e6ea;position:sticky;top:0;z-index:10}
.site-header .wrap{display:flex;align-items:center;gap:24px;height:60px;flex-wrap:wrap}
.logo{font-size:18px}
.menu-toggle{display:none;background:none;border:1px solid #e3e6ea;border-radius:6px;font-size:22px;padding:4px 10px;cursor:pointer;color:#1a1a1a}
.menu{list-style:none;display:flex;gap:18px;margin:0;padding:0;flex-wrap:wrap}
.menu a{color:#1a1a1a;font-weight:500}
.menu .has-sub{position:relative}
.submenu{list-style:none;position:absolute;top:100%;left:0;background:#fff;border:1px solid #e3e6ea;padding:8px 0;min-width:260px;display:none;box-shadow:0 8px 24px rgba(0,0,0,.08);border-radius:6px}
.sub-arrow{display:none}
.menu .has-sub:hover .submenu,.menu .has-sub:focus-within .submenu{display:block}
.submenu li{padding:6px 16px}
main{padding:30px 0 60px;min-height:60vh}
h1{font-size:34px;margin:10px 0 16px}
h2{margin-top:36px}
.lead{font-size:18px;color:#3a3f47}
.hero{padding:40px 0 20px}
.btn{display:inline-block;padding:10px 18px;border:1px solid #0b63ce;border-radius:6px;margin-right:8px;margin-top:8px}
.btn.primary{background:#0b63ce;color:#fff}
.box{background:#eef4fd;border:1px solid #c8ddf6;padding:16px 20px;border-radius:8px;margin:22px 0}
.box.highlight{background:#fef9e7;border-color:#f0d36e}
.list-filter-wrap{margin:12px 0}
.list-filter{width:100%;max-width:400px;padding:8px 12px;border:1px solid #d1d5db;border-radius:6px;font-size:15px}
.list-filter:focus{outline:none;border-color:#0b63ce;box-shadow:0 0 0 2px rgba(11,99,206,.2)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px}
.card{background:#fff;padding:18px 20px;border:1px solid #e3e6ea;border-radius:8px}
.card h2,.card h3{margin-top:0}
.breadcrumbs ol{list-style:none;display:flex;gap:6px;padding:16px 0 0;margin:0;font-size:14px;color:#6b7280;flex-wrap:wrap}
.breadcrumbs li+li::before{content:"›";margin-right:6px}
table.data{border-collapse:collapse;width:100%;background:#fff;border-radius:6px;overflow:hidden}
table.data th,table.data td{text-align:left;padding:8px 12px;border-bottom:1px solid #eef0f4;font-size:14px}
table.data th{background:#f4f6fa}
table.data td.num{text-align:right;font-variant-numeric:tabular-nums}
dl.meta{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;background:#fff;padding:16px 20px;border:1px solid #e3e6ea;border-radius:8px}
dl.meta dt{font-weight:600;color:#4b5563}
code{background:#f1f3f6;padding:1px 6px;border-radius:4px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.92em}
.code{font-family:ui-monospace,Menlo,Consolas,monospace;background:#f1f3f6;padding:2px 10px;border-radius:4px}
.muted{color:#6b7280}
.columns{column-count:3;column-gap:30px;list-style:none;padding:0}
.columns li{break-inside:avoid;padding:4px 0}
@media(max-width:780px){.columns{column-count:1}}
.inline-list{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:6px 10px}
.faq details{background:#fff;border:1px solid #e3e6ea;border-radius:6px;margin:8px 0;padding:10px 16px}
.faq summary{cursor:pointer;font-weight:600}
.site-footer{background:#fff;border-top:1px solid #e3e6ea;padding:20px 0;margin-top:40px;color:#6b7280;font-size:14px}
.site-footer nav a{margin-right:4px}

/* API docs */
.api-docs pre{background:#0f172a;color:#e2e8f0;padding:16px 20px;border-radius:8px;overflow-x:auto;font-size:13px;line-height:1.55;margin:14px 0}
.api-docs pre code{background:none;color:inherit;padding:0;font-size:inherit}
.api-docs .endpoint{font-weight:600;padding:2px 10px;border-radius:4px;font-size:13px}
.api-docs .endpoint.get{background:#dcfce7;color:#166534}
.api-docs .endpoint.post{background:#dbeafe;color:#1e40af}
.api-docs section{padding:18px 0;border-bottom:1px solid #e3e6ea}
.api-docs section:last-child{border-bottom:none}
.api-docs h2{margin-top:4px}
.api-docs h3{margin-top:22px;color:#334155}
.api-docs .toc{background:#fff;border:1px solid #e3e6ea;border-radius:8px;padding:14px 20px;margin:16px 0}
.api-docs .toc ul{margin:8px 0 0;padding-left:20px;columns:2;column-gap:30px}
.api-docs .toc li{padding:2px 0}
.api-docs .cta{background:#eff6ff;border-left:4px solid #0b63ce;padding:16px 20px;margin-top:20px;border-radius:4px}
@media(max-width:780px){.api-docs .toc ul{columns:1}}

/* ── Responsywność mobile (≤780px) ───────────────────────── */
@media(max-width:780px){
  .wrap{padding:0 14px}
  h1{font-size:26px;line-height:1.25;word-wrap:break-word}
  h2{font-size:20px}
  .hero{padding:24px 0 10px}
  .lead{font-size:16px}

  .site-header .wrap{height:auto;gap:8px;padding-top:10px;padding-bottom:10px}
  .menu-toggle{display:block}
  .menu{display:none;width:100%;flex-direction:column;gap:0;font-size:14px;padding:8px 0}
  .menu.open{display:flex}
  .menu>li{border-top:1px solid #eef0f4;padding:8px 0}
  .menu>li:first-child{border-top:none}
  .menu .has-sub .submenu{position:static;display:none;box-shadow:none;border:none;padding:4px 0 4px 16px;min-width:0;background:transparent}
  .menu .has-sub .submenu.open{display:block}
  .menu .has-sub .submenu li{padding:3px 0}
  .sub-arrow{display:inline-block;margin-left:4px;font-size:.8em;transition:transform .15s}

  /* Szerokie tabele scrollują poziomo zamiast rozpychać viewport */
  table.data{display:block;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch;max-width:100%}
  table.data th,table.data td{font-size:13px;padding:6px 10px}

  /* dl.meta — klucz nad wartością zamiast obok */
  dl.meta{grid-template-columns:1fr;gap:2px 0;padding:14px 16px}
  dl.meta dt{margin-top:6px}
  dl.meta dd{margin:0 0 4px}

  .btn{padding:9px 14px;font-size:14px}
  .breadcrumbs ol{font-size:13px}

  /* API docs — pre nie może rozpychać */
  .api-docs pre{font-size:12px;padding:12px 14px}
}

/* ── Mobile: lista miejscowości — nazwa nad metadanymi ── */
@media(max-width:780px){
  .msc-list li{padding:8px 0;border-bottom:1px solid #eef0f4}
  .msc-list .msc-name{display:block;font-weight:600;margin-bottom:2px}
  .msc-list .msc-meta{display:block;font-size:.85rem}
}
html[data-theme="dark"] .msc-list li,
html:not([data-theme="light"]) .msc-list li{border-color:#2a3340}

/* ── Offer cards — dark mode override (inline style cards) ── */
@media (prefers-color-scheme: dark){
  html:not([data-theme="light"]) article > div[style*="grid-template-columns"] > div[style*="border-radius:12px"]{
    background:#161c24 !important;border-color:#2a3340 !important;color:#e5e7eb !important;
  }
  html:not([data-theme="light"]) article > div[style*="grid-template-columns"] > div[style*="border-radius:12px"] > div[style*="font-weight:700"],
  html:not([data-theme="light"]) article > div[style*="grid-template-columns"] > div[style*="border-radius:12px"] strong{
    color:#e5e7eb !important;
  }
  html:not([data-theme="light"]) article > div[style*="grid-template-columns"] > div[style*="border-radius:12px"] p{color:#cbd5e1 !important}
  html:not([data-theme="light"]) article > div[style*="background:#f8f9fa"]{background:#1a2332 !important;color:#e5e7eb !important}
  html:not([data-theme="light"]) article > div[style*="background:#f8f9fa"] table.data{background:transparent}
  html:not([data-theme="light"]) article > div[style*="background:#f8f9fa"] table.data th{background:#161c24;color:#e5e7eb}
  html:not([data-theme="light"]) article > div[style*="background:linear-gradient(135deg,#fafbff 0%,#f0f4ff 100%)"]{
    background:linear-gradient(135deg,#1a2332 0%,#1e2a3e 100%) !important;
  }
  html:not([data-theme="light"]) a[style*="background:#1a1a1a"]{background:#1d4ed8 !important}
}
html[data-theme="dark"] article > div[style*="grid-template-columns"] > div[style*="border-radius:12px"]{
  background:#161c24 !important;border-color:#2a3340 !important;color:#e5e7eb !important;
}
html[data-theme="dark"] article > div[style*="grid-template-columns"] > div[style*="border-radius:12px"] > div[style*="font-weight:700"],
html[data-theme="dark"] article > div[style*="grid-template-columns"] > div[style*="border-radius:12px"] strong{color:#e5e7eb !important}
html[data-theme="dark"] article > div[style*="grid-template-columns"] > div[style*="border-radius:12px"] p{color:#cbd5e1 !important}
html[data-theme="dark"] article > div[style*="background:#f8f9fa"]{background:#1a2332 !important;color:#e5e7eb !important}
html[data-theme="dark"] article > div[style*="background:#f8f9fa"] table.data{background:transparent}
html[data-theme="dark"] article > div[style*="background:#f8f9fa"] table.data th{background:#161c24;color:#e5e7eb}
html[data-theme="dark"] article > div[style*="background:linear-gradient(135deg,#fafbff 0%,#f0f4ff 100%)"]{
  background:linear-gradient(135deg,#1a2332 0%,#1e2a3e 100%) !important;
}
html[data-theme="dark"] a[style*="background:#1a1a1a"]{background:#1d4ed8 !important}

/* ── Theme toggle button ──────────────────────────────── */
.theme-toggle{background:none;border:1px solid #e3e6ea;border-radius:6px;padding:4px 10px;cursor:pointer;color:inherit;font-size:18px;line-height:1;display:inline-flex;align-items:center;justify-content:center;width:36px;height:34px}
.theme-toggle:hover{background:rgba(0,0,0,.04)}

/* ── Dark mode (auto z prefers-color-scheme + manual data-theme) ─ */
:root{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}

@media (prefers-color-scheme: dark){
  html:not([data-theme="light"]){color-scheme:dark;color:#e5e7eb;background:#0f1419}
  html:not([data-theme="light"]) a{color:#60a5fa}
  html:not([data-theme="light"]) .lead{color:#cbd5e1}
  html:not([data-theme="light"]) .muted{color:#94a3b8}
  html:not([data-theme="light"]) .site-header{background:#161c24;border-color:#2a3340}
  html:not([data-theme="light"]) .menu a{color:#e5e7eb}
  html:not([data-theme="light"]) .menu>li{border-color:#2a3340}
  html:not([data-theme="light"]) .submenu{background:#161c24;border-color:#2a3340;box-shadow:0 8px 24px rgba(0,0,0,.4)}
  html:not([data-theme="light"]) .menu-toggle{color:#e5e7eb;border-color:#2a3340}
  html:not([data-theme="light"]) .theme-toggle{border-color:#2a3340}
  html:not([data-theme="light"]) .theme-toggle:hover{background:rgba(255,255,255,.08)}
  html:not([data-theme="light"]) .breadcrumbs ol{color:#94a3b8}
  html:not([data-theme="light"]) .box{background:#1a2332;border-color:#2a3950;color:#e5e7eb}
  html:not([data-theme="light"]) .box.highlight{background:#2a2418;border-color:#5c4818;color:#fbe7a3}
  html:not([data-theme="light"]) .card{background:#161c24;border-color:#2a3340;color:#e5e7eb}
  html:not([data-theme="light"]) dl.meta{background:#161c24;border-color:#2a3340;color:#e5e7eb}
  html:not([data-theme="light"]) dl.meta dt{color:#cbd5e1}
  html:not([data-theme="light"]) code,html:not([data-theme="light"]) .code{background:#1a2332;color:#e5e7eb}
  html:not([data-theme="light"]) table.data{background:#161c24;color:#e5e7eb}
  html:not([data-theme="light"]) table.data th{background:#1a2332;color:#e5e7eb}
  html:not([data-theme="light"]) table.data th,html:not([data-theme="light"]) table.data td{border-color:#2a3340}
  html:not([data-theme="light"]) .list-filter{background:#161c24;color:#e5e7eb;border-color:#2a3340}
  html:not([data-theme="light"]) .list-filter:focus{border-color:#60a5fa;box-shadow:0 0 0 2px rgba(96,165,250,.2)}
  html:not([data-theme="light"]) .faq details{background:#161c24;border-color:#2a3340}
  html:not([data-theme="light"]) .site-footer{background:#161c24;border-color:#2a3340;color:#94a3b8}
  html:not([data-theme="light"]) .btn{border-color:#60a5fa;color:#60a5fa}
  html:not([data-theme="light"]) .btn.primary{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
  html:not([data-theme="light"]) .tools-box{background:#1a2332 !important;border-color:#2a3950}
  html:not([data-theme="light"]) .api-docs section{border-color:#2a3340}
  html:not([data-theme="light"]) .api-docs h3{color:#cbd5e1}
}

html[data-theme="dark"]{color:#e5e7eb;background:#0f1419}
html[data-theme="dark"] a{color:#60a5fa}
html[data-theme="dark"] .lead{color:#cbd5e1}
html[data-theme="dark"] .muted{color:#94a3b8}
html[data-theme="dark"] .site-header{background:#161c24;border-color:#2a3340}
html[data-theme="dark"] .menu a{color:#e5e7eb}
html[data-theme="dark"] .menu>li{border-color:#2a3340}
html[data-theme="dark"] .submenu{background:#161c24;border-color:#2a3340;box-shadow:0 8px 24px rgba(0,0,0,.4)}
html[data-theme="dark"] .menu-toggle{color:#e5e7eb;border-color:#2a3340}
html[data-theme="dark"] .theme-toggle{border-color:#2a3340}
html[data-theme="dark"] .theme-toggle:hover{background:rgba(255,255,255,.08)}
html[data-theme="dark"] .breadcrumbs ol{color:#94a3b8}
html[data-theme="dark"] .box{background:#1a2332;border-color:#2a3950;color:#e5e7eb}
html[data-theme="dark"] .box.highlight{background:#2a2418;border-color:#5c4818;color:#fbe7a3}
html[data-theme="dark"] .card{background:#161c24;border-color:#2a3340;color:#e5e7eb}
html[data-theme="dark"] dl.meta{background:#161c24;border-color:#2a3340;color:#e5e7eb}
html[data-theme="dark"] dl.meta dt{color:#cbd5e1}
html[data-theme="dark"] code,html[data-theme="dark"] .code{background:#1a2332;color:#e5e7eb}
html[data-theme="dark"] table.data{background:#161c24;color:#e5e7eb}
html[data-theme="dark"] table.data th{background:#1a2332;color:#e5e7eb}
html[data-theme="dark"] table.data th,html[data-theme="dark"] table.data td{border-color:#2a3340}
html[data-theme="dark"] .list-filter{background:#161c24;color:#e5e7eb;border-color:#2a3340}
html[data-theme="dark"] .list-filter:focus{border-color:#60a5fa;box-shadow:0 0 0 2px rgba(96,165,250,.2)}
html[data-theme="dark"] .faq details{background:#161c24;border-color:#2a3340}
html[data-theme="dark"] .site-footer{background:#161c24;border-color:#2a3340;color:#94a3b8}
html[data-theme="dark"] .btn{border-color:#60a5fa;color:#60a5fa}
html[data-theme="dark"] .btn.primary{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
html[data-theme="dark"] .tools-box{background:#1a2332 !important;border-color:#2a3950}
html[data-theme="dark"] .api-docs section{border-color:#2a3340}
html[data-theme="dark"] .api-docs h3{color:#cbd5e1}
