/* ============================================================
   dede.service — style strony produktu
   Rozszerzenie systemu v3 (css/v3.css). Tokeny i reguły: DESIGN.md v3.
   Tylko komponenty specyficzne dla tej strony.
   ============================================================ */

:root {
  --primary: var(--orange); /* script.js maluje suwaki przez --primary */
  --ok: #1E7F4F;
  --warn: #A05A00;
  --bad: #C13515;
}

/* ---------- Przełącznik języka w nav ---------- */
.lang-switch { display: flex; gap: 0; border: 1px solid var(--hairline); }
.nav.is-scrolled .lang-switch, .lang-switch { transition: border-color .25s var(--ease); }
.nav:not(.is-scrolled) .lang-switch { border-color: rgba(255,255,255,.25); }
.lang-btn {
  font: 500 12px/1 "Geist Mono", monospace; letter-spacing: .08em;
  padding: 8px 12px; background: none; border: 0; cursor: pointer;
  color: inherit; opacity: .55; transition: opacity .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.lang-btn.active { opacity: 1; background: var(--orange); color: #fff; }

/* ---------- Hero produktu ---------- */
.hero--service { min-height: auto; padding-bottom: 0; }
.hero--service .hero__title { margin-bottom: clamp(24px, 3vw, 40px); }
.hero--service .hero__row { margin-bottom: clamp(48px, 6vw, 80px); }

/* ---------- Panel analizy (check) ---------- */
.check {
  background: var(--white); border: 1px solid var(--hairline);
  padding: clamp(24px, 3.5vw, 44px);
  max-width: 1040px; margin: 0 auto;
}
.check__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.check__label { font: 400 13px/1 "Geist Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-text); }
.check__title { font-size: clamp(20px, 2vw, 28px); font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 6px 0 0; }
.check__note { font-size: 13px; color: var(--gray); }
.check__note a { color: inherit; }
.check__form { display: flex; gap: 0; border: 1px solid var(--ink); }
.check__form input {
  flex: 1; min-width: 0; border: 0; padding: 18px 20px; font: 400 16px/1.4 "Geist", sans-serif;
  color: var(--ink); background: var(--white); outline-offset: -3px;
}
.check__form button {
  border: 0; background: var(--orange); color: #fff; font: 600 15px/1 "Geist", sans-serif;
  padding: 18px 28px; cursor: pointer; white-space: nowrap;
  transition: background .25s var(--ease);
}
.check__form button:hover { background: var(--navy); }
@media (max-width: 640px) {
  .check__form { flex-direction: column; }
  .check__form button { padding: 16px; }
}

/* Ładowanie analizy */
.analyzer-loading { display: none; padding: 28px 0 8px; text-align: left; }
.analyzer-loading.active { display: block; }
.loading-title { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.loading-status { font: 400 13px/1.5 "Geist Mono", monospace; color: var(--gray); margin: 0 0 14px; }
.loading-progress { height: 2px; background: var(--hairline); overflow: hidden; }
.loading-progress-bar { height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: var(--orange); transition: transform .5s var(--ease); }
.loading-spinner, .spinner-ring, .spinner-icon { display: none; }

/* Wyniki analizy */
.analyzer-results { display: none; margin-top: 28px; border-top: 1px solid var(--hairline); }
.analyzer-results.active { display: grid; grid-template-columns: minmax(200px, .8fr) 1fr 1fr; gap: 0; }
.analyzer-results > * { padding: 24px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.analyzer-results > *:nth-child(3n), .analyzer-results > .result-cta { border-right: 0; }
.health-score-section { grid-row: span 2; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.health-score-circle { position: relative; width: 120px; height: 120px; }
.health-score-circle svg { width: 100%; height: 100%; }
.health-score-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.health-score-value > span:first-child { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1; }
.health-score-label { font: 400 10px/1 "Geist Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); margin-top: 6px; }
.health-score-info h4, .health-score-info .hs-title { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.health-score-info p { font-size: 14px; color: var(--ink-soft); margin: 0; }
.issues-list { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; }
.issue { font-size: 13px; line-height: 1.4; color: var(--ink-soft); padding: 6px 0 6px 16px; position: relative; border-top: 1px solid var(--hairline); }
.issue::before { content: ""; position: absolute; left: 0; top: 12px; width: 7px; height: 7px; background: var(--gray); }
.issue--bad::before { background: var(--bad); }
.issue--warning::before { background: var(--warn); }
.issue--ok { color: var(--ok); }
.issue--ok::before { background: var(--ok); }
.result-section-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font: 400 12px/1 "Geist Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--gray);
}
.result-section-header svg { width: 15px; height: 15px; stroke: var(--orange-text); }
.result-item { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; font-size: 14px; }
.result-label { color: var(--ink-soft); }
.result-value { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); text-align: right; }
.status-dot { width: 8px; height: 8px; flex: 0 0 8px; background: var(--hairline); }
.status-dot.status-good { background: var(--ok); }
.status-dot.status-warning { background: var(--warn); }
.status-dot.status-bad { background: var(--bad); }
.result-cta { grid-column: 2 / -1; display: flex; flex-direction: column; justify-content: center; gap: 18px; background: var(--navy); border-bottom: 0; border-right: 0; }
.result-cta-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.result-cta-note { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.75); margin: 0; max-width: 380px; }
.result-cta h4, .result-cta .cta-label { font: 400 12px/1 "Geist Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.65); margin: 0 0 6px; }
.result-cta p { font-size: 18px; font-weight: 700; color: #fff; margin: 0; }
@media (max-width: 900px) {
  .analyzer-results.active { grid-template-columns: 1fr; }
  .analyzer-results > * { border-right: 0; }
  .health-score-section { grid-row: auto; }
  .result-cta { grid-column: 1; }
}

/* ---------- Cennik ---------- */
.pricing-toggle { display: flex; align-items: center; gap: 14px; margin: 0 0 40px; }
.toggle-label { font: 400 13px/1 "Geist Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); cursor: default; }
.toggle-label.active { color: var(--ink); }
.toggle-switch { width: 52px; height: 28px; border: 1px solid var(--ink); position: relative; cursor: pointer; flex: 0 0 auto; }
.toggle-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--ink); transition: transform .25s var(--ease), background .25s var(--ease); }
.toggle-switch.active::after { transform: translateX(24px); background: var(--orange); }
.save-badge { font: 400 12px/1 "Geist Mono", monospace; letter-spacing: .06em; color: var(--orange-text); }

.vat-toggle { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 28px; }
.vat-toggle[hidden] { display: none; }
.vat-toggle__btn { background: none; border: 0; padding: 4px 0; font: 400 13px/1 "Geist Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); cursor: pointer; border-bottom: 1px solid transparent; }
.vat-toggle__btn.is-active { color: var(--ink); border-bottom: 1px solid var(--ink); }
.vat-toggle__btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.plans { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--hairline); }
.plan { padding: clamp(24px, 2.6vw, 40px) clamp(20px, 2vw, 32px); border-right: 1px solid var(--hairline); display: flex; flex-direction: column; background: var(--white); }
.plan:last-child { border-right: 0; }
.plan__name { font: 400 13px/1 "Geist Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-text); margin: 0 0 6px; }
.plan__desc { font-size: 14px; color: var(--gray); margin: 0 0 24px; }
.plan__price { margin: 0 0 6px; color: var(--ink); }
.plan__price .price-currency { font-size: 20px; font-weight: 600; vertical-align: super; }
.plan__price .price-amount { font-size: clamp(40px, 3.6vw, 56px); font-weight: 800; letter-spacing: -.03em; }
.plan__price .price-period { font-size: 14px; color: var(--gray); }
.plan .price-annual { font-size: 12.5px; color: var(--gray); margin-bottom: 24px; min-height: 18px; }
.plan__features { list-style: none; margin: 0 0 28px; padding: 0; flex: 1; }
.plan__features li { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--hairline); font-size: 14px; color: var(--ink-soft); }
.plan__features li::before { content: ""; width: 12px; height: 12px; flex: 0 0 auto; margin-top: 4px; color: var(--orange-text); background-color: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3,8.5 6.5,12 13,4.5'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3,8.5 6.5,12 13,4.5'/%3E%3C/svg%3E") no-repeat center / contain; }
.plan__features li.disabled { color: var(--gray); opacity: .55; }
.plan__features li.disabled::before { content: "×"; color: var(--gray); -webkit-mask: none; mask: none; background-color: transparent; width: auto; height: auto; margin-top: 0; font-weight: 600; }
.plan .btn { width: 100%; text-align: center; justify-content: center; }

.plan--featured { background: var(--navy); }
.plan--featured .plan__name { color: var(--orange); }
.plan--featured .plan__desc, .plan--featured .price-annual, .plan--featured .plan__price .price-period { color: rgba(255,255,255,.6); }
.plan--featured .plan__price { color: #fff; }
.plan--featured .plan__features li { color: rgba(255,255,255,.78); border-top-color: rgba(255,255,255,.14); }
.plan--featured .plan__features li::before { color: var(--orange); }
.plan__flag { font: 400 11px/1 "Geist Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); margin: 0 0 14px; }
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, 1fr); } .plan:nth-child(2n) { border-right: 0; } .plan:nth-child(-n+2) { border-bottom: 1px solid var(--hairline); } }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } .plan { border-right: 0; border-bottom: 1px solid var(--hairline); } .plan:last-child { border-bottom: 0; } }

/* ---------- Kalkulator ---------- */
.calc-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.calc-group { margin-bottom: clamp(28px, 3vw, 44px); }
.calc-label { display: block; font: 400 13px/1 "Geist Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; }
.calc-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.calc-option { border: 1px solid var(--hairline); padding: 16px 18px; cursor: pointer; transition: border-color .25s var(--ease), background .25s var(--ease); position: relative; }
.calc-option input { position: absolute; opacity: 0; pointer-events: none; }
.calc-option:hover { border-color: var(--ink); }
.calc-option.selected { border-color: var(--navy); background: var(--navy); }
.calc-option-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 3px; transition: color .25s var(--ease); }
.calc-option-desc { font-size: 13px; color: var(--gray); transition: color .25s var(--ease); }
.calc-option.selected .calc-option-title { color: #fff; }
.calc-option.selected .calc-option-desc { color: rgba(255,255,255,.6); }
.calc-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: var(--hairline); outline-offset: 6px; }
.calc-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; background: var(--orange); border: 0; cursor: grab; }
.calc-slider::-moz-range-thumb { width: 22px; height: 22px; background: var(--orange); border: 0; cursor: grab; border-radius: 0; }
.slider-labels { display: flex; justify-content: space-between; margin-top: 12px; font: 400 12px/1 "Geist Mono", monospace; letter-spacing: .04em; color: var(--gray); }
.slider-labels span:nth-child(2) { color: var(--orange-text); font-weight: 500; }

.calc-summary { background: var(--navy); padding: clamp(24px, 3vw, 40px); position: sticky; top: 100px; }
.summary-title { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: #fff; margin: 0 0 22px; }
.summary-item { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; color: rgba(255,255,255,.72); }
.summary-item span:last-child { font: 500 14px/1.4 "Geist Mono", monospace; color: #fff; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 24px; border-top: 1px solid rgba(255,255,255,.3); margin-top: 8px; }
.total-label { font: 400 13px/1 "Geist Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.total-price { font-size: clamp(34px, 3vw, 46px); font-weight: 800; letter-spacing: -.03em; color: var(--orange); line-height: 1; text-align: right; }
.total-period { font-size: 13px; color: rgba(255,255,255,.55); text-align: right; }
.summary-cta { width: 100%; }
@media (max-width: 900px) { .calc-wrap { grid-template-columns: 1fr; } .calc-summary { position: static; } }

/* ---------- FAQ (akordeon sterowany z script.js) ---------- */
.faq-grid { max-width: 860px; }
.faq-item { border-top: 1px solid var(--hairline); }
.faq-item:last-child { border-bottom: 1px solid var(--hairline); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 22px 0; font: 700 clamp(16px, 1.6vw, 19px)/1.35 "Geist", sans-serif; letter-spacing: -.01em; color: var(--ink);
  transition: color .25s var(--ease);
}
.faq-question:hover { color: var(--orange-text); }
.faq-question svg { width: 18px; height: 18px; flex: 0 0 18px; stroke: var(--ink); transition: transform .3s var(--ease); }
.faq-item.active .faq-question svg { transform: rotate(180deg); stroke: var(--orange-text); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.faq-answer p { overflow: hidden; }
.faq-item.active .faq-answer { grid-template-rows: 1fr; }
.faq-answer p { margin: 0; padding: 0 40px 24px 0; font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.cform .form-group { margin-bottom: 22px; }
.cform label { display: block; font: 400 12px/1 "Geist Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 8px; }
.cform label .required { color: var(--orange-text); }
.cform input, .cform textarea, .cform select {
  width: 100%; border: 1px solid var(--hairline); background: var(--white);
  padding: 14px 16px; font: 400 15.5px/1.5 "Geist", sans-serif; color: var(--ink);
  transition: border-color .25s var(--ease); border-radius: 0; -webkit-appearance: none; appearance: none;
}
.cform select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230E1116' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.cform input:focus, .cform textarea:focus, .cform select:focus { border-color: var(--navy); outline: none; }
.cform input:focus-visible, .cform textarea:focus-visible, .cform select:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.cform textarea { resize: vertical; min-height: 140px; }
.cform ::placeholder { color: var(--gray); opacity: .8; }

.contact-aside { border-top: 1px solid var(--hairline); }
.contact-aside > div { padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.contact-aside h4, .contact-aside .aside-label { font: 400 12px/1 "Geist Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--gray); margin: 0 0 8px; font-weight: 400; }
.contact-aside p { margin: 0; font-size: clamp(17px, 1.7vw, 21px); font-weight: 700; letter-spacing: -.01em; }
.contact-aside p a { color: var(--ink); text-decoration: none; }
.contact-aside p a:hover { color: var(--orange-text); }
.contact-aside span { display: block; font-size: 13.5px; color: var(--gray); margin-top: 4px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form-success { border: 1px solid var(--ok); padding: 28px; }
.form-success h3 { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.form-success p { font-size: 15px; color: var(--ink-soft); margin: 0; }
.form-success svg { display: none; }

/* ---------- Detale przeglądarkowe ---------- */
::selection { background: var(--orange); color: #fff; }
.check ::selection, .cform ::selection { background: var(--navy); color: #fff; }

/* Disclaimer wyniku analizy — komórka obok granatowego CTA */
.result-note { border-bottom: 0; border-right: 0; display: flex; align-items: center; }
.result-disclaimer { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--gray); }

/* Formularz leadowy w granatowym boksie */
.lead-form { display: grid; gap: 14px; }
.lead-form .btn[hidden] { display: none; }
.lead-fields { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; }
.lead-fields .btn { white-space: nowrap; }
.lead-fields input { padding: 12px 14px; border: 1px solid rgba(255,255,255,.25); background: #fff; color: var(--ink); font: inherit; font-size: 15px; width: 100%; border-radius: 0; }
.lead-fields input:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.lead-form .btn { justify-self: start; }
.lead-status { font-size: 15px; font-weight: 600; color: #fff; margin: 0; }
.lead-status--error { color: #ffb4a3; }
.result-cta .form-clause { font-size: 12.5px; font-weight: 400; line-height: 1.55; color: rgba(255,255,255,.75); }

/* Checkbox RODO (formularz kontaktowy + lead) */
.rodo-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--ink-soft); cursor: pointer; }
.rodo-check input[type="checkbox"] { margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; }
.rodo-check a { color: inherit; text-decoration: underline; }
@media (max-width: 1100px) { .lead-fields { grid-template-columns: 1fr 1fr; } .lead-fields .btn { grid-column: 1 / -1; justify-self: start; } }
@media (max-width: 760px) { .lead-fields { grid-template-columns: 1fr; } }

/* ---------- Boks cennika (samorządy-i-instytucje, bez suwaków) ---------- */
.pricebox__label { font: 400 13px/1 "Geist Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin: 0; }
.pricebox__price { font-size: clamp(34px, 3vw, 46px); font-weight: 800; letter-spacing: -.03em; color: #fff; line-height: 1; margin: 12px 0 4px; }
.pricebox__period { font-size: 13px; color: rgba(255,255,255,.55); margin: 0 0 24px; }
.pricebox__list { list-style: none; margin: 0 0 28px; padding: 0; }
.pricebox__list li { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; color: rgba(255,255,255,.85); }
.pricebox .summary-cta { width: 100%; }

/* ---------- RODO: klauzula informacyjna + przycisk cookies w stopce ---------- */
.form-clause { font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.form-clause a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer__cookie { font: inherit; background: none; border: none; padding: 0; cursor: pointer; color: inherit; text-align: left; }
.footer__cookie:hover { color: #fff; }
.footer__nav { flex-wrap: wrap; }

/* ---------- Podstrona instytucje: ilustracja + ikony filarów ---------- */
.split { display: grid; grid-template-columns: minmax(0, 780px) minmax(280px, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.split .prose { max-width: none; }
.split__media { margin: 0; align-self: center; }
.split__media img { display: block; width: 100%; height: auto; max-width: 460px; margin-inline: auto; }
.numbered--icons > li { grid-template-columns: 64px 1fr 150px; align-items: start; }
.numbered__icon { display: block; width: 150px; height: 150px; object-fit: contain; justify-self: end; align-self: center; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split__media img { max-width: 360px; }
  .numbered--icons > li { grid-template-columns: 36px 1fr; grid-template-rows: auto auto; gap: 8px 12px; align-items: start; }
  .numbered--icons > li > div { grid-column: 2; grid-row: 2; }
  .numbered__icon { grid-column: 2; grid-row: 1; width: 88px; height: 88px; justify-self: start; align-self: start; }
}
