:root {
  --ink: #202124;
  --muted: #66717d;
  --paper: #ffffff;
  --soft: #fbfcfe;
  --line: #e6ebf1;
  --red: #d64040;
  --teal: #00978f;
  --green: #35a85c;
  --yellow: #d7a417;
  --focus: #111111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid #eef2f6;
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 210px;
  height: auto;
}

.header-note {
  margin: 0;
  color: var(--muted);
}

.footer-link {
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--ink);
  background: #f5f8fb;
  outline: none;
}

.app-shell {
  padding: 42px 0 56px;
}

.site-footer {
  border-top: 1px solid #eef2f6;
  background: #ffffff;
}

.footer-inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.screen[hidden] {
  display: none;
}

[hidden] {
  display: none !important;
}

.section-label {
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: 40px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.2;
}

.screen-lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.choice-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.choice-card {
  min-height: 322px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--red);
  border-radius: 8px;
  background: var(--paper);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.choice-card:hover,
.choice-card:focus-visible {
  border-color: var(--ink);
  box-shadow: 0 10px 24px rgba(32, 33, 36, 0.08);
  transform: translateY(-2px);
  outline: none;
}

.choice-card.accent-teal {
  border-top-color: var(--teal);
}

.choice-card.accent-yellow {
  border-top-color: var(--yellow);
}

.choice-card.accent-green {
  border-top-color: var(--green);
}

.choice-image {
  width: 100%;
  height: 104px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background-color: #ffffff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 78px 78px, 100% 100%;
}

.inspection-image {
  background-image:
    url("data:image/svg+xml,%3Csvg width='96' height='96' viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='18' y='18' width='46' height='60' rx='6' fill='%23c92d2d'/%3E%3Crect x='28' y='10' width='26' height='14' rx='4' fill='%23202124'/%3E%3Cpath d='M62 31h8c5 0 9 4 9 9v31H62V31Z' fill='%23f0b429'/%3E%3Ccircle cx='34' cy='76' r='8' fill='%23202124'/%3E%3Ccircle cx='69' cy='76' r='8' fill='%23202124'/%3E%3Cpath d='M29 38h26M29 50h20' stroke='white' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #fffafa 0%, #ffffff 100%);
}

.company-image {
  background-image:
    url("data:image/svg+xml,%3Csvg width='96' height='96' viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='14' y='30' width='68' height='50' rx='6' fill='%23007c76'/%3E%3Crect x='24' y='40' width='10' height='10' rx='2' fill='white'/%3E%3Crect x='43' y='40' width='10' height='10' rx='2' fill='white'/%3E%3Crect x='62' y='40' width='10' height='10' rx='2' fill='white'/%3E%3Crect x='24' y='58' width='10' height='10' rx='2' fill='white'/%3E%3Crect x='43' y='58' width='10' height='22' rx='2' fill='%23f0b429'/%3E%3Crect x='62' y='58' width='10' height='10' rx='2' fill='white'/%3E%3Cpath d='M30 30V20h36v10' fill='none' stroke='%23202124' stroke-width='6' stroke-linejoin='round'/%3E%3Ccircle cx='76' cy='24' r='14' fill='%23f0b429'/%3E%3Cpath d='M76 16v16M68 24h16' stroke='%23202124' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #f5fffd 0%, #ffffff 100%);
}

.expert-search-image {
  background-image:
    url("data:image/svg+xml,%3Csvg width='96' height='96' viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='42' cy='42' r='24' fill='%23f0b429'/%3E%3Cpath d='m60 60 18 18' stroke='%23202124' stroke-width='9' stroke-linecap='round'/%3E%3Cpath d='M34 41h16M42 33v16' stroke='white' stroke-width='6' stroke-linecap='round'/%3E%3Cpath d='M24 79h31' stroke='%23c92d2d' stroke-width='8' stroke-linecap='round'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #fffcf0 0%, #ffffff 100%);
}

.expert-add-image {
  background-image:
    url("data:image/svg+xml,%3Csvg width='96' height='96' viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='39' cy='31' r='15' fill='%232d8a48'/%3E%3Cpath d='M15 78c4-17 15-27 24-27s20 10 24 27H15Z' fill='%232d8a48'/%3E%3Ccircle cx='68' cy='64' r='17' fill='%23f0b429'/%3E%3Cpath d='M68 55v18M59 64h18' stroke='%23202124' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #f5fff7 0%, #ffffff 100%);
}

.choice-number {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.choice-title {
  display: block;
  min-height: 86px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.16;
}

.choice-copy {
  display: block;
  color: var(--muted);
}

.seo-service-copy {
  max-width: 880px;
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.seo-service-copy h2 {
  margin-bottom: 8px;
}

.seo-service-copy p {
  max-width: 820px;
  color: var(--muted);
}

.seo-service-copy p:last-child {
  margin-bottom: 0;
}

.back-button,
.primary-button,
.secondary-button,
.region-list button,
.checkbox-grid label {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
}

.back-button {
  margin-bottom: 22px;
  padding: 10px 14px;
}

.back-button:hover,
.region-list button:hover,
.region-list button:focus-visible {
  border-color: var(--ink);
  outline: none;
}

.map-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.task-chip {
  max-width: 340px;
  margin: 6px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-weight: 700;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.map-board,
.selection-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.map-board {
  padding: 12px;
}

.poland-map {
  display: block;
  width: 100%;
  height: auto;
}

.map-region {
  cursor: pointer;
}

.map-region polygon {
  stroke: #ffffff;
  stroke-width: 5;
  transition: filter 160ms ease, stroke 160ms ease, stroke-width 160ms ease;
}

.map-region text {
  fill: #202124;
  font-size: 16px;
  font-weight: 800;
  pointer-events: none;
  text-anchor: middle;
}

.map-region .small-label {
  font-size: 13px;
}

.map-region:hover polygon,
.map-region:focus-visible polygon,
.map-region.is-active polygon {
  filter: brightness(1.05);
  stroke: var(--ink);
  stroke-width: 6;
  outline: none;
}

.map-region:focus-visible {
  outline: none;
}

.map-color-1 polygon { fill: #f8b6ad; }
.map-color-2 polygon { fill: #a8dfbd; }
.map-color-3 polygon { fill: #b5d2ea; }
.map-color-4 polygon { fill: #f8dc77; }
.map-color-5 polygon { fill: #c9eb98; }
.map-color-6 polygon { fill: #f6c28d; }
.map-color-7 polygon { fill: #a7e2df; }
.map-color-8 polygon { fill: #fae58e; }
.map-color-9 polygon { fill: #b3dfa8; }
.map-color-10 polygon { fill: #f3b4b4; }
.map-color-11 polygon { fill: #acd0ec; }
.map-color-12 polygon { fill: #f7cf8c; }
.map-color-13 polygon { fill: #9bd7a5; }
.map-color-14 polygon { fill: #faeba0; }
.map-color-15 polygon { fill: #a6ddcf; }
.map-color-16 polygon { fill: #e8b9c0; }

.selection-panel {
  padding: 20px;
  position: sticky;
  top: 16px;
}

.selection-panel p {
  color: var(--muted);
}

.region-result {
  margin: 18px 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fcfdff;
  color: var(--ink) !important;
  font-weight: 700;
}

.results-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.service-filter {
  margin: 16px 0 18px;
}

.service-filter h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.2;
}

.service-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.service-choice {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.service-choice:hover,
.service-choice:focus-visible,
.service-choice.is-active {
  border-color: var(--ink);
  background: #f7fbff;
  outline: none;
}

.service-heading,
.results-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.service-step-layout,
.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.service-step-panel,
.service-summary,
.results-panel,
.results-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.service-step-panel,
.service-summary,
.results-panel,
.results-summary {
  padding: 20px;
}

.service-step-panel p,
.service-summary p,
.results-panel p,
.results-summary p {
  color: var(--muted);
}

.service-step-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.service-summary,
.results-summary {
  position: sticky;
  top: 16px;
}

.results-panel .results-list {
  margin-bottom: 0;
}

.results-actions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.result-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.result-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
}

.result-card p {
  margin-bottom: 6px;
  color: var(--muted);
}

.result-card a {
  color: var(--red);
  font-weight: 700;
}

.primary-button {
  width: 100%;
  padding: 10px 14px;
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
  font-weight: 800;
}

.primary-button:disabled {
  border-color: var(--line);
  background: #d2d6dc;
  color: #606770;
  cursor: not-allowed;
}

.primary-button:not(:disabled):hover,
.primary-button:not(:disabled):focus-visible {
  background: #a92525;
  outline: none;
}

.secondary-button {
  padding: 8px 12px;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--ink);
  outline: none;
}

.region-list {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.region-list button {
  padding: 8px 12px;
}

.region-list button.is-active {
  border-color: var(--ink);
  background: #30343a;
  color: #ffffff;
}

.register-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.price-notice {
  display: grid;
  gap: 6px;
  margin: -6px 0 20px;
  padding: 14px 16px;
  border: 1px solid #f0d084;
  border-left: 6px solid var(--yellow);
  border-radius: 8px;
  background: #fff9e7;
}

.price-notice strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.price-notice span {
  color: var(--muted);
}

.register-layout {
  max-width: 820px;
}

.catalog-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.catalog-form {
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.catalog-form label,
.regions-fieldset,
.services-fieldset {
  display: grid;
  gap: 7px;
}

.catalog-form label span,
.regions-fieldset legend,
.services-fieldset legend {
  color: var(--ink);
  font-weight: 800;
}

.catalog-form small {
  color: var(--muted);
  font-weight: 400;
}

.catalog-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.catalog-form input:focus {
  border-color: var(--ink);
  outline: none;
}

.wide-field {
  grid-column: 1 / -1;
}

.regions-fieldset,
.services-fieldset {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.captcha-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.captcha-box label {
  margin: 0;
}

.captcha-box strong {
  color: var(--ink);
}

.trap-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.checkbox-grid label:has(input:checked) {
  border-color: var(--ink);
  background: #fcfdff;
}

.checkbox-grid input {
  width: 18px;
  min-height: 18px;
}

.terms-consent {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 10px !important;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdff;
  color: var(--muted);
}

.terms-consent input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.terms-consent span {
  font-weight: 400 !important;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.service-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #dbe7f2;
  border-radius: 8px;
  background: #f7fbff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.form-message {
  min-height: 24px;
  margin: 14px 0;
  color: var(--muted);
  font-weight: 700;
}

.form-message.is-error {
  color: var(--red);
}

.form-message.is-success {
  color: var(--green);
}

.proforma-panel {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #dbe7f2;
  border-left: 6px solid var(--teal);
  border-radius: 8px;
  background: #f7fbff;
}

.proforma-panel h2 {
  margin-bottom: 8px;
}

.proforma-panel h3 {
  margin: 18px 0 8px;
  font-size: 18px;
  line-height: 1.2;
}

.proforma-panel p {
  margin-bottom: 8px;
}

.proforma-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.proforma-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.proforma-box strong {
  display: block;
  margin-bottom: 6px;
}

.payment-title {
  padding: 10px 12px;
  border: 1px dashed var(--teal);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 800;
}

.mail-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.mail-button:hover,
.mail-button:focus-visible {
  background: #007d77;
  outline: none;
}

.empty-note {
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.hide-services .services-column {
  display: none;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td strong {
  display: block;
  margin-bottom: 4px;
}

td a {
  color: var(--red);
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f9fafb;
  font-size: 13px;
  font-weight: 800;
}

.status-active {
  border-color: #9bd4ac;
  background: #eff9f2;
  color: var(--green);
}

.status-pending {
  border-color: #f0d084;
  background: #fff9e7;
  color: #8b6400;
}

.status-reminder {
  border-color: #f0d084;
  background: #fff9e7;
  color: #8b6400;
}

.status-paused {
  border-color: #f3b2b2;
  background: #fff4f4;
  color: var(--red);
}

.status-expired {
  border-color: #c8cdd4;
  background: #f2f4f7;
  color: var(--muted);
}

.admin-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.admin-rules,
.admin-table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.admin-rules {
  padding: 20px;
  position: sticky;
  top: 16px;
}

.admin-rules p {
  color: var(--muted);
}

.admin-table-panel {
  padding: 20px;
}

.admin-stats {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.stat-pill {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdff;
  font-weight: 800;
}

.admin-control {
  display: grid;
  gap: 8px;
  min-width: 140px;
}

.admin-control select,
.admin-control input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-actions {
  display: grid;
  gap: 8px;
}

.reminder-link {
  text-align: center;
  text-decoration: none;
}

.terms-content {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.terms-content h2 {
  margin-top: 22px;
}

.terms-content h2:first-child {
  margin-top: 0;
}

.terms-content p {
  color: var(--muted);
}

@media (max-width: 980px) {
  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-layout,
  .service-step-layout,
  .results-layout,
  .register-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .selection-panel,
  .service-summary,
  .results-summary,
  .admin-rules {
    position: static;
  }

  .service-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .header-inner,
  .map-heading,
  .service-heading,
  .results-heading,
  .register-heading,
  .admin-heading {
    display: block;
  }

  .header-note {
    margin-top: 8px;
    margin-bottom: 10px;
  }

  .footer-inner {
    display: block;
    padding: 14px 0;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 8px;
  }

  .brand-logo {
    width: 190px;
  }

  .app-shell {
    padding-top: 28px;
  }

  h1 {
    font-size: 32px;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .captcha-box {
    grid-template-columns: 1fr;
  }

  .choice-card {
    min-height: 286px;
  }

  .choice-title {
    min-height: auto;
  }

  .task-chip {
    max-width: none;
  }

  .map-board {
    padding: 6px;
  }

  .form-grid,
  .checkbox-grid,
  .service-step-grid {
    grid-template-columns: 1fr;
  }

  .proforma-grid {
    grid-template-columns: 1fr;
  }
}
