.compatibility-hero {
  padding-bottom: 54px;
}

.compatibility-workspace {
  align-items: start;
}

.compatibility-config-card,
.compatibility-result-card {
  min-height: 1030px;
}

.compatibility-config-card form {
  margin-top: 34px;
}

.module-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.module-fieldset legend {
  padding: 0;
  font-size: 14px;
  font-weight: 800;
}

.module-help {
  margin: 8px 0 14px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.6;
}

.module-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.module-option + .module-option {
  margin-top: 8px;
}

.module-option:has(input:checked) {
  border-color: rgba(21, 151, 125, 0.42);
  background: rgba(223, 242, 236, 0.58);
  box-shadow: inset 3px 0 0 var(--green);
}

.module-option:has(input:focus-visible) {
  outline: 4px solid rgba(21, 151, 125, 0.1);
}

.module-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.48;
}

.module-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--green);
}

.module-number {
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.module-copy,
.module-copy strong,
.module-copy small {
  display: block;
  min-width: 0;
}

.module-copy strong {
  font-size: 13px;
}

.module-copy small {
  margin-top: 5px;
  overflow: hidden;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-cost {
  min-width: 38px;
  padding: 5px 7px;
  border-radius: 99px;
  background: rgba(124, 132, 127, 0.1);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.module-option-heavy .module-cost {
  background: var(--amber-soft);
  color: var(--amber);
}

.selection-summary {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(17, 24, 20, 0.045);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.selection-summary[data-heavy="true"] {
  background: var(--amber-soft);
  color: #7c5417;
}

.progress-track {
  height: 4px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(17, 24, 20, 0.08);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 260ms ease;
}

.compatibility-check-list {
  margin-top: 12px;
}

.compatibility-check-list .check-row {
  min-height: 73px;
}

.check-state[data-state="unsupported"] {
  background: rgba(124, 132, 127, 0.12);
  color: var(--muted);
}

.check-state[data-state="skipped"] {
  background: rgba(124, 132, 127, 0.08);
  color: var(--faint);
}

.compatibility-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compatibility-scope {
  max-width: none;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.scope-grid p {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.38);
}

.scope-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
}

@media (max-width: 980px) {
  .compatibility-config-card,
  .compatibility-result-card {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .module-option {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .module-cost {
    grid-column: 3;
    width: max-content;
  }

  .module-copy small {
    white-space: normal;
  }

  .compatibility-metrics,
  .scope-grid {
    grid-template-columns: 1fr;
  }

  .compatibility-metrics {
    gap: 8px;
  }

  .compatibility-metrics .metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .compatibility-metrics .metric strong {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-track span {
    transition: none;
  }
}
