/* The audit diagram follows the same reading order at every width. */
.tech-audit {
  --audit-columns: repeat(3, minmax(0, 1fr));
  --audit-gap: clamp(24px, 2.5vw, 34px);
  --audit-edge: #424246;
  --audit-panel: #19191C;
  --audit-text: #F2F2F3;
  --audit-muted: #C0C0C4;
  --audit-icon: #D2D2D5;
  border-top: 1px solid var(--audit-edge);
}

.tech-audit-header .eyebrow { color: var(--audit-icon); }
.tech-audit-header h2 { max-width: 24ch; }

.tech-audit-flow,
.tech-audit-cards {
  display: grid;
  grid-template-columns: var(--audit-columns);
  gap: var(--audit-gap);
}
.tech-audit-flow {
  list-style: none;
  padding: 0;
  margin: clamp(22px, 3.2vw, 40px) 0 0;
}
.tech-audit-cards {
  margin-top: clamp(16px, 2vw, 26px);
}
.audit-stage,
.audit-check-card {
  min-width: 0;
  min-height: 176px;
  padding: clamp(14px, 1.8vw, 22px);
  background: var(--audit-panel);
  border: 1px solid var(--audit-edge);
}
.audit-stage { position: relative; }
.audit-stage--analysis {
  border-color: #59595D;
  background: #222224;
}
.audit-stage + .audit-stage::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(var(--audit-gap) * -.5);
  width: 8px;
  height: 8px;
  border-top: 1.5px solid #B5B5B9;
  border-right: 1.5px solid #B5B5B9;
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
}
.audit-card-heading { display: flex; align-items: center; gap: 10px; }
.audit-card-heading h3 {
  margin: 0;
  color: var(--audit-text);
  font-size: clamp(16px, 1.55vw, 20px);
  font-weight: 650;
  line-height: 1.22;
}
.audit-stage p {
  margin: 10px 0 0;
  max-width: 34ch;
  color: var(--audit-muted);
  font-size: .9rem;
  line-height: 1.45;
}
.audit-inputs, .tech-audit-checks {
  list-style: none;
  padding: 0;
  display: grid;
}
.audit-inputs { margin: 10px 0 0; gap: 7px; }
.audit-inputs li { display: flex; align-items: center; gap: 9px; color: var(--audit-muted); font-size: .88rem; }
.audit-input-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 14px;
  width: 14px;
  height: 13px;
  color: var(--audit-icon);
  border: 1px solid currentColor;
}
.audit-input-icon--capture::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 4px;
  height: 4px;
  border: 1px solid currentColor;
  border-radius: 50% !important;
}
.audit-input-icon--drawing {
  background: linear-gradient(currentColor, currentColor) center / 1px 66% no-repeat,
    linear-gradient(currentColor, currentColor) left 30% center / 46% 1px no-repeat;
}
.audit-input-icon--schedule {
  background: linear-gradient(currentColor, currentColor) center 3px / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) center 7px / 42% 1px no-repeat;
}
.audit-stage-icon,
.audit-check-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 33px;
  height: 33px;
  color: var(--audit-icon);
  border: 1px solid var(--audit-edge);
}
.audit-stage-icon--sources::before {
  content: "";
  width: 15px;
  height: 14px;
  border: 1px solid currentColor;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, currentColor 3px 4px);
}
.audit-stage-icon--analysis { border-color: #66666A; }
.audit-stage-icon--analysis::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
}
.audit-stage-icon--review::before,
.tech-audit-checks li::before {
  content: "";
  width: 13px;
  height: 7px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

.audit-check-icon--progress::before {
  content: "";
  width: 17px;
  height: 15px;
  background: linear-gradient(currentColor, currentColor) left bottom / 3px 5px no-repeat,
    linear-gradient(currentColor, currentColor) center bottom / 3px 10px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / 3px 15px no-repeat;
}
.audit-check-icon--alert::before {
  content: "";
  width: 18px;
  height: 17px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.audit-check-icon--alert::after {
  content: "";
  position: absolute;
  top: 11px;
  width: 2px;
  height: 5px;
  background: var(--audit-panel);
  box-shadow: 0 7px var(--audit-panel);
}
.audit-check-icon--record::before {
  content: "";
  width: 12px;
  height: 16px;
  border: 1px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center 4px / 6px 1px no-repeat,
    linear-gradient(currentColor, currentColor) center 8px / 6px 1px no-repeat;
}
.tech-audit-checks { gap: 8px; margin: 13px 0 0; }
.tech-audit-checks li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: var(--audit-muted);
  font-size: .88rem;
  line-height: 1.5;
}
.tech-audit-checks li::before { width: 10px; height: 5px; margin: 6px 0 0 1px; color: var(--audit-icon); }

.tech-audit-research {
  margin: clamp(20px, 3vw, 32px) 0 0;
  color: var(--audit-muted);
  line-height: 1.5;
  font-size: .85rem;
}
.tech-audit-research strong { color: var(--audit-text); }

@media (max-width: 760px) {
  .tech-audit {
    --audit-columns: minmax(0, 1fr);
    --audit-gap: 20px;
  }
  .audit-stage,
  .audit-check-card { min-height: 0; }
  .audit-stage + .audit-stage::before {
    top: calc(var(--audit-gap) * -.5);
    left: 50%;
    transform: translate(-50%, -50%) rotate(135deg);
  }
  .tech-audit-cards { gap: 12px; }
}
