:root {
  color-scheme: light;
  --navy: #032c59;
  --navy-deep: #021f3f;
  --blue: #009fe3;
  --blue-dark: #007eb5;
  --ice: #eef7fb;
  --mist: #f5f7f9;
  --line: #d8e1e8;
  --ink: #172638;
  --muted: #627083;
  --white: #ffffff;
  --success: #08795b;
  --shadow: 0 16px 40px rgb(3 44 89 / 10%);
  font-family: Inter, Aptos, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  background: var(--mist);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 0%, rgb(0 159 227 / 8%), transparent 28rem),
    var(--mist);
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
select,
label,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 1rem;
  padding: 0.75rem 1rem;
  color: var(--white);
  background: var(--navy);
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0.85rem clamp(1rem, 4vw, 4rem);
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 4px 16px rgb(1 27 55 / 20%);
}

.brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--blue);
  border-radius: 50% 50% 50% 12%;
  color: var(--white);
  font-size: 1.45rem;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.brand small {
  color: #bceaff;
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  min-width: 0;
  gap: 0.75rem;
  align-items: center;
}

.language-control {
  display: flex;
  min-width: 0;
  gap: 0.55rem;
  align-items: center;
  color: #d9eff9;
  font-size: 0.82rem;
}

.language-control select {
  width: auto;
  min-width: 8rem;
  padding: 0.55rem 2rem 0.55rem 0.7rem;
  border-color: rgb(255 255 255 / 35%);
  color: var(--white);
  background: var(--navy-deep);
}

main {
  min-height: calc(100vh - 150px);
  outline: none;
}

.selector-page {
  width: min(1380px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) 0;
}

.loading-panel,
.empty-state {
  display: grid;
  min-height: 50vh;
  place-content: center;
  justify-items: center;
  padding: 2rem;
  text-align: center;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.progress-list {
  display: grid;
  min-width: 670px;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
}

.progress-item {
  border-bottom: 3px solid var(--line);
}

.progress-item a {
  display: block;
  padding: 0.8rem 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.progress-item.is-current,
.progress-item.is-complete {
  border-color: var(--blue);
}

.progress-item.is-current a {
  color: var(--navy);
}

.progress-item.is-complete a::after {
  content: " ✓";
  color: var(--success);
}

.question-panel {
  padding: clamp(1.25rem, 4vw, 3.25rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.page-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.page-heading h1,
.results-heading h1,
.detail-hero h1,
.sidebar-heading h2 {
  margin: 0;
  color: var(--navy);
  line-height: 1.12;
}

.page-heading h1,
.results-heading h1,
.detail-hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: -0.035em;
}

.page-heading > p:last-child {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.option-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.option-grid-images {
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}

.option-card {
  position: relative;
  display: flex;
  min-height: 88px;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 150ms, box-shadow 150ms, transform 150ms;
}

.option-card:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 20px rgb(3 44 89 / 9%);
  transform: translateY(-1px);
}

.option-card.is-selected {
  border-color: var(--blue);
  background: var(--ice);
}

.option-card.is-disabled,
.option-card.is-disabled:hover {
  border-color: #dfe4e8;
  color: #7c8791;
  background: #eef1f3;
  box-shadow: none;
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.62;
  transform: none;
}

.option-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.option-card:has(input:focus-visible) {
  outline: 3px solid rgb(0 159 227 / 28%);
  outline-offset: 2px;
}

.option-check {
  z-index: 1;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 2px solid #9eabb7;
  border-radius: 5px;
  background: var(--white);
}

.option-card.is-selected .option-check {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: inset 0 0 0 4px var(--white);
}

.option-label {
  z-index: 1;
  flex: 1 1 auto;
  font-weight: 720;
}

.option-count {
  z-index: 1;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.option-card.is-disabled .option-count {
  color: #66717b;
}

.option-image {
  width: 76px;
  height: 62px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

.step-actions,
.detail-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 2.25rem;
}

.selection-summary {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: var(--ice);
}

.selection-summary-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.selection-chip {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--navy);
  font-size: 0.82rem;
}

.selection-summary-note {
  margin-left: auto;
  color: #41566c;
  font-size: 0.82rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
}

.button-primary {
  color: var(--white);
  background: var(--blue);
}

.button-primary:hover {
  background: var(--blue-dark);
}

.button-secondary {
  border-color: #afbdc8;
  color: var(--navy);
  background: var(--white);
}

.button-secondary:hover,
.button-ghost:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.button-ghost {
  border-color: rgb(255 255 255 / 40%);
  color: inherit;
  background: transparent;
}

.button-full {
  width: 100%;
}

.technical-grid {
  display: grid;
  min-width: 0;
  gap: 1rem 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  min-width: 0;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field-label,
.filter-group legend {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 760;
}

.field-help {
  color: var(--muted);
}

input,
select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 0.68rem 0.75rem;
  border: 1px solid #aebbc6;
  border-radius: 6px;
  color: var(--ink);
  background: var(--white);
}

input:focus,
select:focus {
  border-color: var(--blue);
  outline: 3px solid rgb(0 159 227 / 18%);
}

.results-page {
  display: grid;
  gap: 2rem;
  align-items: start;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
}

.filter-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  padding: 1.25rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.sidebar-heading {
  margin-bottom: 1.25rem;
}

.sidebar-heading h2 {
  font-size: 1.45rem;
}

.filter-group {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
  padding: 0;
  border: 0;
}

.filter-group legend {
  margin-bottom: 0.35rem;
}

.filter-checkbox {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  color: #34485e;
  font-size: 0.88rem;
  cursor: pointer;
}

.filter-checkbox input {
  width: 17px;
  min-height: 17px;
  margin: 0.18rem 0 0;
  accent-color: var(--blue);
}

.results-heading {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.results-heading h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.result-count {
  flex: 0 0 auto;
  margin: 0 0 0.3rem;
  color: var(--muted);
  font-weight: 700;
}

.result-list {
  display: grid;
  gap: 1rem;
}

.product-card {
  padding: clamp(1.15rem, 3vw, 1.7rem);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 6px 18px rgb(3 44 89 / 6%);
}

.product-card-top {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.product-type {
  margin: 0 0 0.25rem;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-title {
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.product-title:hover,
.text-link:hover {
  color: var(--blue-dark);
}

.product-id {
  color: #8a98a6;
  font-size: 0.8rem;
}

.product-description {
  max-width: 92ch;
  margin: 0.85rem 0;
  color: #405269;
}

.product-specs {
  display: flex;
  gap: 1.5rem;
  margin: 0.9rem 0;
}

.product-specs div {
  display: grid;
  gap: 0.05rem;
}

.product-specs dt,
.detail-facts dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
}

.product-specs dd,
.detail-facts dd {
  margin: 0;
  color: var(--navy);
  font-weight: 780;
}

.tag-list {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0.9rem 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: #28506e;
  background: var(--ice);
  font-size: 0.78rem;
  font-weight: 650;
}

.text-link {
  color: var(--navy);
  font-weight: 800;
  text-decoration-color: var(--blue);
  text-underline-offset: 3px;
}

.detail-page {
  max-width: 1180px;
}

.detail-actions {
  justify-content: space-between;
  margin: 0 0 1.5rem;
}

.detail-hero {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(125deg, var(--navy-deep), var(--navy) 70%, #075b8d);
}

.detail-hero h1 {
  color: var(--white);
}

.detail-hero .product-type {
  color: #85dcff;
}

.detail-product-line {
  margin: 0.8rem 0 0;
  color: #c9e5f1;
}

.detail-hero img {
  width: min(230px, 30vw);
  max-height: 170px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--white);
}

.detail-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 330px);
}

.detail-main {
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.detail-section + .detail-section {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.detail-section h2,
.detail-facts h2 {
  margin: 0 0 0.7rem;
  color: var(--navy);
  font-size: 1.2rem;
}

.detail-section p {
  white-space: pre-line;
}

.detail-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1.25rem;
}

.detail-list li::marker {
  color: var(--blue);
}

.detail-facts {
  position: sticky;
  top: 96px;
  padding: 1.4rem;
  border-radius: 12px;
  color: var(--white);
  background: var(--navy);
}

.detail-facts h2 {
  color: var(--white);
}

.detail-facts dl {
  margin: 0;
}

.detail-facts dl div {
  padding: 0.8rem 0;
  border-top: 1px solid rgb(255 255 255 / 18%);
}

.detail-facts dt {
  color: #a9d8ee;
}

.detail-facts dd {
  margin-top: 0.15rem;
  color: var(--white);
  overflow-wrap: anywhere;
}

.documents {
  margin-top: 1rem;
}

.documents a {
  display: block;
  color: var(--white);
}

.site-footer {
  padding: 1.2rem 1rem;
  color: #b5c8d8;
  background: var(--navy-deep);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.82rem;
}

code {
  padding: 0.45rem 0.65rem;
  border-radius: 5px;
  color: var(--navy);
  background: var(--ice);
}

@media (max-width: 900px) {
  .results-page,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar,
  .detail-facts {
    position: static;
    max-height: none;
  }

  .filter-sidebar {
    display: grid;
    gap: 0 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-sidebar .sidebar-heading,
  .filter-sidebar .button-full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .site-header {
    position: static;
    gap: 0.85rem;
    align-items: stretch;
    flex-direction: column;
  }

  .brand small,
  .language-control > span {
    display: none;
  }

  .header-actions {
    display: grid;
    width: 100%;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) 6.5rem;
  }

  .language-control {
    width: 100%;
    flex: 1 1 auto;
  }

  .header-actions .button {
    width: 6.5rem;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .language-control select {
    width: 100%;
    min-width: 0;
  }

  .selector-page {
    width: min(100% - 1rem, 1380px);
    padding: 1rem 0 2rem;
  }

  .question-panel {
    padding: 1.1rem;
    border-radius: 10px;
  }

  .option-grid,
  .technical-grid,
  .filter-sidebar {
    grid-template-columns: 1fr;
  }

  .filter-sidebar .sidebar-heading,
  .filter-sidebar .button-full {
    grid-column: auto;
  }

  .step-actions,
  .results-heading,
  .detail-actions,
  .detail-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .selection-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .selection-summary-note {
    margin-left: 0;
  }

  .step-actions .button,
  .detail-actions .button {
    width: 100%;
  }

  .results-heading {
    display: flex;
  }

  .detail-hero img {
    width: 100%;
  }

  .product-specs {
    flex-direction: column;
    gap: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
