:root {
  --red: #c40000;
  --green: #1f6b45;
  --green-dark: #155238;
  --green-soft: #eaf5ee;
  --ink: #17201b;
  --muted: #5e6962;
  --line: #d7e0da;
  --surface: #ffffff;
  --background: #f2f5f3;
  --warning: #98500c;
  --warning-bg: #fff7e9;
  --danger: #a22a2a;
  --danger-bg: #fff1f1;
  --shadow: 0 8px 26px rgba(22, 67, 44, .07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

button, input, select, textarea { font: inherit; }

button { cursor: pointer; }

.page-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.site-header {
  background: #fff;
  border-bottom: 5px solid var(--red);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .08);
}

.site-header-inner {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 15px 22px;
}

.kab-logo {
  display: block;
  width: 185px;
  height: 88px;
  object-fit: contain;
}

.site-header-copy h1 {
  margin: 2px 0 5px;
  font-size: clamp(1.55rem, 3.3vw, 2.35rem);
  line-height: 1.08;
}

.site-header-copy p { max-width: 760px; margin: 0; color: var(--muted); }

.header-kicker {
  display: inline-block;
  color: var(--red);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.header-reset { color: #fff; background: var(--red); }
.header-reset:hover { background: #9d0000; }

.card {
  margin: 16px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 11px;
}

h2, h3 { line-height: 1.2; }

.section-heading h2 { margin: 0; }

.step {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 800;
}

.scope-badge,
.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: .78rem;
  font-weight: 800;
}

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

.field label,
.field > label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid #b9c7be;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}

.field textarea { resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(31, 107, 69, .24);
  outline-offset: 2px;
  border-color: var(--green);
}

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

.input-with-select {
  display: grid;
  grid-template-columns: 1fr 92px;
}

.input-with-select input { border-radius: 9px 0 0 9px; }
.input-with-select select { border-left: 0; border-radius: 0 9px 9px 0; }

.help {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .84rem;
}

.callout {
  margin-top: 14px;
  padding: 11px 13px;
  border-left: 4px solid #8dad9a;
  border-radius: 6px;
  background: #f5f8f6;
}

.subcard {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf9;
}

.subcard h3 { margin: 0 0 14px; }

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 74px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
}

.choice-card:hover { border-color: #9eb6a7; }
.choice-card input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); }
.choice-card span { display: block; }
.choice-card small { display: block; margin-top: 4px; color: var(--muted); }

.segmented {
  display: inline-flex;
  gap: 5px;
  margin: 0 0 16px;
  padding: 4px;
  border: 0;
  border-radius: 11px;
  background: #edf2ef;
}

.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 9px 13px; border-radius: 8px; font-weight: 700; }
.segmented input:checked + span { color: var(--green-dark); background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }

.button {
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 800;
}

.button:disabled { cursor: not-allowed; opacity: .52; }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover:not(:disabled) { background: var(--green-dark); }
.button-large { min-height: 49px; padding-inline: 20px; }
.button-outline { color: var(--green-dark); background: #fff; border-color: var(--green); }
.button-outline:hover { background: var(--green-soft); }

.status-message {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid #dfc08a;
  border-radius: 10px;
  background: var(--warning-bg);
  color: #6c3a08;
}

.loading-result,
.empty-state {
  padding: 18px;
  border: 1px dashed #b9c7be;
  border-radius: 11px;
  color: var(--muted);
  text-align: center;
  background: #fafcfb;
}

.result-box {
  padding: 17px;
  border: 2px solid var(--green);
  border-radius: 13px;
  background: #f4fbf7;
}

.result-box.warning { border-color: #c98737; background: var(--warning-bg); }
.result-box.danger { border-color: #c65353; background: var(--danger-bg); }
.result-box h3 { margin: 4px 0 8px; }
.result-box p { margin: 7px 0; }

.eyebrow {
  color: var(--green);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.result-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.result-fact {
  padding: 10px;
  border: 1px solid #dbe6df;
  border-radius: 9px;
  background: #fff;
}

.result-fact small { display: block; color: var(--muted); }
.result-fact strong { display: block; margin-top: 2px; }

.notice-list { margin: 14px 0 0; padding-left: 21px; }
.notice-list li + li { margin-top: 7px; }

.recommendations {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.recommendation-group { display: grid; gap: 10px; }
.recommendation-group-title { margin: 0; font-size: 1.05rem; }

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

.recommendation-card {
  position: relative;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 15px;
  min-width: 0;
  padding: 15px;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.recommendation-card.is-selected { border-color: var(--green); background: #f7fcf9; }
.recommendation-card img { width: 116px; height: 142px; object-fit: contain; border-radius: 8px; background: #f6f7f6; }
.recommendation-card h3 { margin: 5px 0 5px; }
.recommendation-card p { margin: 5px 0; }
.recommendation-card .price { margin-top: 9px; font-size: 1.08rem; font-weight: 900; }
.recommendation-card .ex-vat { color: var(--muted); font-size: .8rem; }
.recommendation-card .card-actions { display: flex; gap: 8px; margin-top: 12px; }
.recommendation-actions { display: flex; justify-content: center; margin-top: 18px; }
.recommendation-card .recommended-ribbon { position: absolute; top: 9px; right: 9px; }

.selection-list { display: grid; gap: 9px; }

.selection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
}

.selection-row p { margin: 2px 0 0; color: var(--muted); font-size: .83rem; }
.quantity { display: flex; align-items: center; gap: 5px; }
.quantity button { width: 34px; height: 34px; border: 1px solid #b9c7be; border-radius: 7px; background: #fff; font-weight: 900; }
.quantity output { min-width: 28px; text-align: center; font-weight: 800; }
.remove-button { border: 0; color: #8a2727; background: transparent; text-decoration: underline; }

.selection-total {
  margin-top: 12px;
  padding: 14px;
  border-radius: 10px;
  background: var(--green-soft);
  text-align: right;
  font-weight: 800;
}

.selection-total strong { display: block; font-size: 1.2rem; }

.order-form {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.order-form h3 { margin-top: 0; }
.order-actions { display: flex; align-items: center; gap: 16px; margin-top: 17px; }
.order-actions .help { margin: 0; max-width: 620px; }
.cost-info { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; font-size: .88rem; }
.cost-info div + div { margin-top: 4px; }

.legal-card summary { font-size: 1.2rem; font-weight: 800; cursor: pointer; }
.legal-content { margin-top: 14px; }
.legal-content a { color: var(--green-dark); font-weight: 700; }
.legal-warning { padding: 12px; border-radius: 9px; background: var(--warning-bg); }

.product-info > h2 { margin-top: 0; }
.product-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.product-info article { display: grid; grid-template-columns: 125px 1fr; align-items: center; gap: 15px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.product-info img { width: 125px; height: 170px; object-fit: contain; border-radius: 8px; background: #f5f6f5; }
.product-info h3 { margin: 0 0 6px; }
.product-info p { margin: 0; color: var(--muted); }
.catalog-order { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-weight: 800; }

.footer {
  padding: 28px 14px 44px;
  color: #515b55;
  font-size: .82rem;
  line-height: 1.6;
  text-align: center;
}

[hidden] { display: none !important; }

@media (max-width: 840px) {
  .recommendation-grid,
  .product-info-grid { grid-template-columns: 1fr; }
  .result-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .page-shell { padding: 10px; }
  .site-header-inner { grid-template-columns: 135px minmax(0, 1fr); gap: 11px; padding: 12px 10px; }
  .kab-logo { width: 135px; height: 68px; }
  .site-header-copy h1 { font-size: 1.25rem; }
  .site-header-copy p { font-size: .8rem; }
  .header-reset { grid-column: 1 / -1; justify-self: start; }
  .card { padding: 17px; }
  .grid-2,
  .grid-3,
  .result-facts { grid-template-columns: 1fr; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .scope-badge { align-self: flex-start; }
  .segmented { display: grid; width: 100%; }
  .recommendation-card { grid-template-columns: 86px 1fr; }
  .recommendation-card img { width: 86px; height: 118px; }
  .selection-row { grid-template-columns: 1fr auto; }
  .selection-row .quantity { grid-column: 1; }
  .selection-row .remove-button { grid-column: 2; }
  .order-actions { align-items: stretch; flex-direction: column; }
  .order-actions .button { width: 100%; }
  .recommendation-actions .button { width: 100%; }
  .product-info article { grid-template-columns: 90px 1fr; }
  .product-info img { width: 90px; height: 125px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
