/* SZKLIWO — strona-gospodarz (demonstracyjna karta produktu). Widżet ma własne style w Shadow DOM. */
:root {
  --bg: #EEF1F6; --bg-2: #E3E8F1; --surface: #FFFFFF; --ink: #0F1635; --muted: #4A5170; --line: #D2D7E4;
  --accent: #2340D6; --accent-ink: #FFFFFF; --kiln: #E8572E; --kiln-ink: #9E2F0E; --code-bg: #0F1635; --code-tx: #E9ECF5;
  --hd: "Bricolage Grotesque", "Onest", system-ui, sans-serif; --tx: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 18px; --pad: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0E1222; --bg-2: #141932; --surface: #171C33; --ink: #E9ECF5; --muted: #AEB5CE; --line: #2C3456;
  --accent: #8FA2FF; --accent-ink: #0E1222; --kiln: #FF8A62; --kiln-ink: #FF9F7E; --code-bg: #090C18; --code-tx: #E9ECF5;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
html:not(.rm) { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--tx); overflow-wrap: break-word; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--hd); line-height: 1.08; letter-spacing: -.025em; margin: 0; font-weight: 750; }
p { margin: 0; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .88em; background: var(--bg-2); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* pasek koncepcji */
.concept { background: var(--ink); color: var(--bg); font-size: 14px; }
.concept-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-block: 9px; }
.concept-t { min-width: 0; flex: 1 1 320px; }
.concept-tag { display: inline-block; background: var(--kiln); color: #0F1635; font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 5px; margin-right: 6px; }
html[data-theme="dark"] .concept-tag { color: #0E1222; }
.concept-act { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.concept a { color: inherit; font-weight: 600; }
.concept :focus-visible { outline-color: var(--bg); }
.theme-btn { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 2px; border: 0; background: none; color: inherit; font: 600 14px/1.2 var(--tx); cursor: pointer; }
.theme-sw { width: 38px; height: 22px; border-radius: 999px; border: 2px solid currentColor; position: relative; flex: none; }
.theme-sw span { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: currentColor; transition: transform .2s; }
.theme-btn[aria-pressed="true"] .theme-sw { background: var(--kiln); border-color: var(--kiln); }
.theme-btn[aria-pressed="true"] .theme-sw span { transform: translateX(16px); background: #0F1635; }
.rm .theme-sw span { transition: none; }

/* nagłówek sklepu */
.hdr { border-bottom: 1px solid var(--line); background: var(--surface); }
.hdr-in { display: flex; align-items: center; gap: 12px 28px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font: 800 21px/1 var(--hd); letter-spacing: .06em; }
.logo svg { color: var(--accent); }
.hdr-nav { margin-left: auto; min-width: 0; }
.hdr-nav ul { display: flex; gap: 4px 22px; list-style: none; margin: 0; padding: 0; }
.hdr-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 0; display: inline-block; }
.hdr-nav a:hover { color: var(--accent); text-decoration: underline; }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 15px/1 var(--tx); cursor: pointer; flex: none; }
.cart-btn:hover { border-color: var(--muted); }
.cart-count { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
@media (max-width: 879px) {
  .hdr-nav { display: none; }
  .cart-btn { margin-left: auto; }
}
@media (max-width: 379px) { .cart-l { display: none; } }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 18px 0 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* intro */
.intro { display: grid; gap: 20px 48px; grid-template-columns: minmax(0, 1fr); padding-top: 22px; padding-bottom: 26px; align-items: end; }
@media (min-width: 960px) { .intro { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.kicker { color: var(--kiln-ink); font-weight: 600; font-size: 14px; letter-spacing: .02em; margin-bottom: 10px; }
.intro h1 { font-size: clamp(34px, 6.4vw, 64px); max-width: 15ch; }
.lead { margin-top: 16px; font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); max-width: 60ch; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts b { font: 700 17px/1.2 var(--hd); letter-spacing: -.01em; }
.facts span { font-size: 13px; color: var(--muted); line-height: 1.35; }
@media (max-width: 479px) { .facts { grid-template-columns: minmax(0, 1fr); } .facts li { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; } }

/* konfigurator */
.cfg-h { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 14px; }
.mount {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(12px, 2.4vw, 28px);
  --szk-font: "Onest", system-ui, sans-serif; --szk-radius: 16px;
  --szk-surface: #FFFFFF; --szk-surface-2: #F2F4F9; --szk-text: #0F1635; --szk-muted: #4A5170;
  --szk-accent: #2340D6; --szk-accent-ink: #FFFFFF; --szk-line: #D5D9E6; --szk-line-strong: #7F87A3;
  --szk-stage: radial-gradient(120% 90% at 50% 28%, #FAFBFD 0%, #E3E8F1 68%, #D3DAE8 100%); --szk-stage-solid: #E4E8F1;
  --szk-err: #B3261E; --szk-ok: #1D6B3A; --szk-warn: #7A4A00;
}
.js .mount { min-height: var(--mount-h, 1860px); }
@media (min-width: 560px) { .js .mount { --mount-h: 1730px; } }
@media (min-width: 700px) { .js .mount { --mount-h: 1840px; } }
@media (min-width: 860px) { .js .mount { --mount-h: 1040px; } }
@media (min-width: 1000px) { .js .mount { --mount-h: 935px; } }
html[data-theme="dark"] .mount {
  --szk-surface: #171C33; --szk-surface-2: #1F2542; --szk-text: #E9ECF5; --szk-muted: #AEB5CE;
  --szk-accent: #8FA2FF; --szk-accent-ink: #0E1222; --szk-line: #323A5C; --szk-line-strong: #6F79A0;
  --szk-stage: radial-gradient(120% 90% at 50% 28%, #2A3154 0%, #171C33 70%, #10142A 100%); --szk-stage-solid: #1B2140;
  --szk-err: #FF9C92; --szk-ok: #7FD69C; --szk-warn: #F5C26B;
}
.nojs { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 720px) { .nojs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.nojs img { border-radius: 16px; width: 100%; }
.nojs-h { font: 700 20px/1.2 var(--hd); margin-bottom: 8px; }
.js .mount .nojs { display: none; }

/* jak działa */
.how, .dev, .about { padding-top: clamp(48px, 7vw, 88px); }
.how h2, .dev h2, .about h2 { font-size: clamp(28px, 4vw, 44px); }
.how-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: k; }
.how-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 20px; counter-increment: k; min-width: 0; }
.how-list li::before { content: "0" counter(k); display: block; font: 800 14px/1 var(--hd); color: var(--kiln-ink); letter-spacing: .08em; margin-bottom: 14px; }
.how-list h3 { font-size: 20px; margin-bottom: 8px; }
.how-list p { color: var(--muted); font-size: 15px; }

/* dla developera */
.dev-head { display: grid; gap: 10px 40px; grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 900px) { .dev-head { grid-template-columns: auto minmax(0, 1fr); } }
.dev-head p { color: var(--muted); max-width: 64ch; }
.no-js .dev-tabs { display: none; }
.dev-tabs { display: flex; gap: 4px; margin-top: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.dev-tabs [role="tab"] { flex: none; border: 0; background: none; color: var(--muted); font: 600 15px/1 var(--tx); padding: 13px 14px 12px; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.dev-tabs [role="tab"]:hover { color: var(--ink); }
.dev-tabs [aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.dev-tabs :focus-visible { outline-offset: -3px; }
.dev-n { background: var(--bg-2); color: var(--ink); border-radius: 999px; padding: 3px 7px; font-size: 12px; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.dev-panel { padding-top: 20px; display: grid; gap: 16px; min-width: 0; }
.dev-panel:focus-visible { outline-offset: 6px; }
.dev-panel > p { color: var(--muted); max-width: 72ch; }
.dev-h3 { font-size: 18px; margin-bottom: 10px; }
.code { background: var(--code-bg); color: var(--code-tx); border-radius: 16px; overflow: hidden; min-width: 0; }
.code-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-bottom: 1px solid #2C3456; font-size: 13px; color: #AEB5CE; }
.code pre { margin: 0; padding: 16px; overflow: auto; max-height: 460px; font: 13.5px/1.6 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; tab-size: 2; }
.code pre code { background: none; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; }
.code pre:focus-visible { outline: 3px solid #8FA2FF; outline-offset: -3px; border-radius: 0 0 16px 16px; }
.copy { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #4A5378; background: #171C33; color: #E9ECF5; font: 600 13px/1 var(--tx); cursor: pointer; }
.copy:hover { background: #232A4A; }
.copy:focus-visible { outline-color: #8FA2FF; }
.copy-msg { min-height: 1.6em; font-size: 14px; color: var(--muted); margin-top: -8px; }
.leak-box { display: grid; gap: 6px; border: 1px dashed var(--muted); border-radius: 16px; padding: 14px 18px; }
.leak-box p { color: var(--muted); font-size: 14px; }
.leak-btn { justify-self: start; }
.ev-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .ev-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } }
.ev-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 420px; overflow: auto; font-size: 14px; }
.ev-log li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.ev-log time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.ev-log b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; font-weight: 600; }
.ev-log span { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; }
.ev-log .ev-empty { display: block; color: var(--muted); }
.ev-pay { display: grid; gap: 12px; min-width: 0; }
.btn-2 { justify-self: start; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--accent); background: var(--surface); color: var(--accent); font: 600 15px/1.2 var(--tx); cursor: pointer; text-align: left; }
.btn-2 code { background: none; padding: 0; color: inherit; }
.btn-2:hover { background: var(--bg-2); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14.5px; }
caption { text-align: left; font: 700 17px/1.3 var(--hd); padding: 14px 16px 6px; }
th, td { text-align: left; vertical-align: top; padding: 10px 16px; border-top: 1px solid var(--line); }
th { font-weight: 600; color: var(--muted); font-size: 13px; }
td code { white-space: nowrap; }
td:last-child code { white-space: normal; }

/* o kubku */
.about-grid { display: grid; gap: 24px 48px; grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.spec { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 20px; }
.spec div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 20px; padding: 13px 0; }
.spec div + div { border-top: 1px solid var(--line); }
@media (min-width: 560px) { .spec div { grid-template-columns: 180px minmax(0, 1fr); } }
.spec dt { font-weight: 600; }
.spec dd { margin: 0; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; align-content: start; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 14px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 800 18px/1 var(--hd); }
.steps b { font: 700 18px/1.3 var(--hd); padding-top: 2px; }
.steps span { color: var(--muted); }

/* stopka */
.ftr { margin-top: clamp(56px, 8vw, 104px); background: var(--ink); color: var(--bg); padding-block: 40px; }
.ftr-grid { display: grid; gap: 22px 40px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .ftr-grid { grid-template-columns: auto minmax(0, 1fr) auto; } }
.ftr-logo { font: 800 clamp(30px, 4vw, 44px)/1 var(--hd); letter-spacing: .06em; }
.ftr-notes { display: grid; gap: 10px; font-size: 14.5px; max-width: 72ch; }
.ftr a { color: inherit; font-weight: 600; }
.ftr :focus-visible { outline-color: var(--bg); }
.ftr-top { justify-self: start; }

/* koszyk */
.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(420px, 100%); max-width: 100%; border: 0; padding: 0; background: var(--surface); color: var(--ink); box-shadow: -20px 0 60px rgba(15, 22, 53, .25); }
.drawer::backdrop { background: rgba(15, 22, 53, .5); }
.drawer-in { padding: 20px; display: grid; gap: 16px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.drawer-head h2 { font-size: 26px; }
.drawer-ex { font: 600 12px/1 var(--tx); letter-spacing: .08em; text-transform: uppercase; background: var(--bg-2); color: var(--muted); border-radius: 6px; padding: 4px 7px; vertical-align: middle; }
.drawer-x { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; }
.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cart-list li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 4px 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.cart-list img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; grid-row: span 3; background: var(--bg-2); }
.cart-list b { font-weight: 600; line-height: 1.3; }
.cart-list span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.cart-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cart-rm { border: 0; background: none; color: var(--accent); font: 600 14px/1 var(--tx); text-decoration: underline; padding: 8px 0; min-height: 36px; cursor: pointer; }
.cart-empty { color: var(--muted); }
.cart-sum { display: flex; justify-content: space-between; gap: 10px; font-size: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.cart-note { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

/* test przecieków: celowo agresywne reguły strony — widżet w Shadow DOM ich nie dziedziczy */
html.leak * { font-family: "Courier New", Courier, monospace !important; letter-spacing: .02em; }
html.leak div:not(.mount) { outline: 1px dashed #9E2F0E; outline-offset: -1px; }
html.leak button { border-radius: 0 !important; background: #FFE14D !important; color: #0F1635 !important; border: 2px solid #0F1635 !important; text-transform: uppercase; }
html.leak input, html.leak label { font-size: 22px !important; }
html.leak p, html.leak li, html.leak span { line-height: 2 !important; }
html.leak canvas { filter: grayscale(1) blur(2px); }
html.leak h1, html.leak h2, html.leak h3 { color: #9E2F0E !important; text-decoration: underline wavy; }
html.leak[data-theme="dark"] h1, html.leak[data-theme="dark"] h2, html.leak[data-theme="dark"] h3 { color: #FF9F7E !important; }
html.leak .theme-sw span { background: #0F1635 !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .cart-count, .concept-tag { border: 1px solid; } }
