:root {
  --y: #ffe500;
  --y-soft: #fff9cc;
  --ink: #101214;
  --muted: #5f6670;
  --line: #e3e6ea;
  --bg: #eef0f2;
  --card: #fff;
  --ok: #16794a;
  --err: #c0262d;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 13px; }
.center { text-align: center; }

.app { min-height: 100vh; background: var(--card); display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 560px; margin: 0 auto; }
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 1000; }
.top-in { padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 900; font-size: 24px; color: var(--y); text-decoration: none; letter-spacing: 1px; }
.top-tag { display: none; color: #aeb4bb; font-size: 14px; margin-right: auto; }
.top-phone { color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; }
.progress { height: 4px; background: #2a2e33; position: sticky; top: 52px; z-index: 999; }
.progress div { height: 100%; background: var(--y); transition: width 0.25s; }
.layout { flex: 1; }
main { padding: 18px 18px 40px; min-width: 0; }
h1 { font-size: 28px; line-height: 1.15; margin: 12px 0 6px; }
h2 { font-size: 22px; margin: 6px 0 14px; }

.hero { background: var(--y); margin: -18px -18px 22px; padding: 30px 20px; text-align: center; }
.hero-logo { width: 132px; height: auto; max-width: 50%; border-radius: 10px; box-shadow: 0 8px 24px #0000001f; }
.hero p { margin: 0; font-weight: 600; }
.hero-cta { margin-top: 18px; }
.hero-art, .hero .hero-note { display: none; }
.how { margin: 0 0 22px; padding-left: 22px; }
.how li { margin: 10px 0; }
.how span { display: block; color: var(--muted); font-size: 14px; }
.install { margin-top: 18px; }
.side { display: none; }

.btn { display: block; width: 100%; padding: 15px; border: 0; border-radius: var(--radius); background: var(--y); font-weight: 900; cursor: pointer; text-align: center; text-decoration: none; margin-top: 8px; }
.btn:hover { filter: brightness(0.96); }
.btn.dark:hover { filter: none; background: #2a2e33; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.ghost { background: #f3f4f6; border: 1px solid var(--line); font-weight: 700; }
.small-btn { padding: 10px; margin: 0 0 10px; }
.btn:focus-visible, .card:focus-visible, .option:focus-visible, .seg button:focus-visible { outline: 3px solid #1f6feb; outline-offset: 2px; }
.back { border: 0; background: none; font-size: 24px; cursor: pointer; padding: 0 8px 4px 0; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; cursor: pointer; }
.card .pic { height: 92px; display: grid; place-items: center; font-size: 38px; background: #2c3032; }
.card b { display: block; padding: 12px; }
.card:hover { border-color: var(--ink); box-shadow: 0 6px 18px #0001; }
.option:hover { border-color: #9aa1a9; }
.option { width: 100%; padding: 15px; margin: 9px 0; display: flex; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; text-align: left; }
.option.sel { border: 3px solid var(--y); padding: 13px; }
.option { align-items: center; gap: 12px; }
.option.has-img { padding-top: 8px; padding-bottom: 8px; }
.option img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.opt-text { flex: 1; }
.opt-text small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.draft { background: var(--y-soft); border: 1px solid #f1df6b; border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.draft div { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.draft .btn { width: auto; padding: 10px 18px; margin: 0; }
.link { border: 0; background: none; color: #1f5fbf; text-decoration: underline; cursor: pointer; padding: 0; }

.field { margin: 16px 0; }
.field label, .label { font-weight: 700; display: block; margin-bottom: 7px; }
.field input, .field select, .field textarea, .calc input { width: 100%; padding: 13px; border: 1px solid #c9ced4; border-radius: 9px; background: #fff; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--err); }
.hint { display: block; color: var(--muted); font-size: 13px; margin-top: 5px; }
.error { color: var(--err); font-size: 14px; margin-top: 5px; min-height: 0; }
.error:empty { display: none; }
.with-unit { display: flex; align-items: center; gap: 10px; }
.with-unit span { font-weight: 700; min-width: 30px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.seg button { padding: 12px; border: 1px solid #d5d9de; border-radius: 9px; background: #f7f7f7; cursor: pointer; }
.seg .on { background: var(--y); border-color: #e2cb00; font-weight: 700; }

.calc { background: #f6f7f8; border-radius: var(--radius); padding: 12px 14px; margin: 14px 0; }
.calc summary { cursor: pointer; font-weight: 700; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.calc-grid label { font-size: 13px; font-weight: 600; }
.calc-grid input { margin-top: 4px; }

.search { position: relative; }
.suggest { position: absolute; z-index: 1001; left: 0; right: 0; margin: 4px 0 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid #c9ced4; border-radius: 9px; box-shadow: 0 8px 24px #0002; max-height: 260px; overflow: auto; }
.suggest li { padding: 10px 13px; cursor: pointer; }
.suggest li:hover { background: var(--y-soft); }
.map { height: 320px; border-radius: var(--radius); background: #dfe4d6; overflow: hidden; }
.map-off { padding: 30px; }
.notice { padding: 12px; border-radius: 10px; background: var(--y-soft); font-size: 14px; margin: 12px 0; }
.notice.ok { background: #e3f5ea; color: var(--ok); }

.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumb { position: relative; }
.thumb img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; display: block; }
.thumb button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer; line-height: 1; }
.consent { display: block; font-size: 14px; line-height: 1.4; margin: 18px 0 6px; padding-left: 30px; position: relative; }
.consent input { position: absolute; left: 0; top: 1px; width: 20px; height: 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.box { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.summary { padding: 4px 15px; margin: 0; }
.summary > div { padding: 11px 0; border-bottom: 1px solid #eee; }
.summary > div:last-child { border-bottom: 0; }
.summary dt { font-weight: 700; display: flex; justify-content: space-between; }
.summary dd { margin: 2px 0 0; }
.edit { border: 0; background: none; color: #1f5fbf; cursor: pointer; font-size: 14px; }

.success { text-align: center; padding-top: 25px; }
.success .summary { padding: 15px; margin: 18px 0; }
.check { margin: 10px auto; width: 80px; height: 80px; border-radius: 50%; background: var(--ink); color: var(--y); display: grid; place-items: center; font-size: 45px; }

.cookies { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000; background: var(--ink); color: #fff; padding: 14px 18px; font-size: 13px; line-height: 1.45; box-shadow: 0 -4px 20px #0003; }
.cookies p { margin: 0 auto 10px; max-width: 760px; }
.cookies div { display: flex; gap: 16px; align-items: center; justify-content: flex-end; max-width: 760px; margin: auto; }
.cookies a { color: var(--y); }
.cookies .btn { width: auto; margin: 0; padding: 10px 20px; }
.foot { padding: 18px; background: #f6f7f8; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.7; }
.prose { white-space: pre-wrap; }
.prose h1 { font-size: 24px; }

/* ---------- Szeroki ekran: formularz + panel zapytania obok ---------- */
@media (min-width: 960px) {
  body { background: var(--bg); }
  .app { background: transparent; }
  .wrap { max-width: 1160px; }
  .top-in { padding: 14px 28px; }
  .top-tag { display: block; }
  .progress { top: 60px; }
  .brand { font-size: 28px; }

  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; padding: 32px 28px 56px; }
  main { background: var(--card); border-radius: 20px; padding: 32px 40px 40px; box-shadow: 0 10px 40px #0000000f; }
  h2 { font-size: 26px; }
  .back { margin-left: -6px; }

  .side { display: block; position: sticky; top: 92px; }
  .side-card { background: var(--card); border-radius: 20px; padding: 22px 24px; box-shadow: 0 10px 40px #0000000f; margin-bottom: 16px; }
  .side-card h3 { margin: 0 0 14px; font-size: 18px; }
  .steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
  .steps li { position: relative; padding: 0 0 16px 40px; counter-increment: s; }
  .steps li:last-child { padding-bottom: 0; }
  .steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; background: #eceef1; color: var(--muted); display: grid; z-index: 1; place-items: center; font-size: 13px; font-weight: 800; }
  .steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 26px; bottom: -2px; width: 2px; background: #e3e6ea; }
  .steps li.done::before { content: "✓"; background: var(--ink); color: var(--y); }
  .steps li.now::before { background: var(--y); color: var(--ink); }
  .steps b { display: block; font-size: 15px; }
  .steps li:not(.done):not(.now) b { color: var(--muted); font-weight: 600; }
  .steps small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
  .steps button { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; }
  .steps button:hover b { text-decoration: underline; }
  .side-dark { background: var(--ink); color: #fff; }
  .side-dark span { display: block; color: #aeb4bb; font-size: 14px; }
  .side-dark a { display: block; color: var(--y); font-size: 24px; font-weight: 900; text-decoration: none; margin: 2px 0 4px; }
  .side-dark small { color: #aeb4bb; }
  .side-note { font-size: 13px; color: var(--muted); margin: 0 6px; }

  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .card .pic { height: 120px; }
  #prods { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .map { height: 440px; }
  .thumb img { width: 100px; height: 100px; }

  /* Ekran startowy i potwierdzenie – pełna szerokość, bez panelu */
  .step-0 .layout, .step-8 .layout { grid-template-columns: 1fr; }
  .step-0 .side, .step-8 .side { display: none; }
  .step-0 main { background: transparent; box-shadow: none; padding: 0; }
  .step-0 .hero { margin: 0 0 28px; border-radius: 24px; padding: 56px 64px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; text-align: left; }
  .step-0 .hero-logo { display: none; }
  .step-0 .hero-art { display: block; }
  .step-0 .hero-art { background: var(--ink); border-radius: 20px; aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; overflow: hidden; box-shadow: 0 20px 50px #0000002a; }
  .hero-mark { color: var(--y); font-weight: 900; font-size: 96px; letter-spacing: -2px; display: flex; align-items: center; line-height: 1; position: relative; z-index: 1; }
  /* „I” w logo to fragment drogi z przerywaną linią */
  .hero-mark i { width: 22px; height: 72px; margin-right: 8px; background: linear-gradient(var(--y), var(--y)) left / 4px 100% no-repeat, linear-gradient(var(--y), var(--y)) right / 4px 100% no-repeat, repeating-linear-gradient(var(--y) 0 8px, transparent 8px 14px) center / 3px 100% no-repeat; }
  .step-0 .hero h1 { font-size: 52px; letter-spacing: -0.5px; margin: 0 0 12px; }
  .step-0 .hero p { font-size: 18px; }
  .step-0 .hero-cta { display: inline-block; width: auto; padding: 18px 34px; margin-top: 28px; font-size: 17px; }
  .step-0 .hero .hero-note { display: block; font-weight: 400; font-size: 14px; margin-top: 12px; }
  .step-0 .start-cta { display: none; }
  .step-0 .how { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: h; }
  .step-0 .how li { margin: 0; background: var(--card); border-radius: 20px; padding: 24px 24px 24px 76px; position: relative; counter-increment: h; box-shadow: 0 10px 40px #0000000f; }
  .step-0 .how li::before { content: counter(h); position: absolute; left: 24px; top: 22px; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--y); display: grid; place-items: center; font-weight: 900; }
  .step-0 .how b { display: block; font-size: 17px; }
  .step-0 .how span { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
  .step-0 .draft { max-width: 640px; }
  .step-0 .install { width: auto; display: inline-block; padding: 10px 18px; }
  .step-8 main { max-width: 640px; margin: 0 auto; width: 100%; }

  .foot { background: var(--ink); color: #aeb4bb; padding: 28px; }
  .foot b { color: #fff; }
  .foot a { color: #fff; }
}

/* Osadzenie w ramce (?embed=1): nagłówek i stopkę daje strona firmy. */
.embed .top, .embed .foot, .embed #installBtn { display: none !important; }
.embed .progress { top: 0; }
@media (min-width: 960px) { .embed .side { top: 24px; } }
.embed .app { min-height: 0; }
.captcha-box { margin: 12px 0; min-height: 65px; }
