:root {
  --ink: #17191b;
  --steel: #3c444a;
  --paper: #efede6;
  --paper-2: #e5e1d7;
  --line: rgba(23, 25, 27, 0.18);
  --red: #d34136;
  --orange: #e69a64;
  --white: #f7f5ee;
  --muted: #6f726f;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(15deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--ink);
  font-family: "Manrope", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page-grain {
  position: fixed;
  z-index: 20;
  inset: 0;
  opacity: 0.055;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
}

.diagnostic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1380px, calc(100% - 80px));
  margin: 0 auto;
  padding: 28px 0 22px;
  color: var(--white);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.88);
  background: #171a1c;
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.22);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.09em;
}

.brand-mark::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 15px;
  height: 4px;
  background: #de6645;
  content: "";
}

.brand-name {
  display: flex;
  gap: 5px;
  align-items: baseline;
  color: #f4f1e8;
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.035em;
}

.brand-name strong {
  font-weight: 800;
}

.back-home {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.back-home span {
  margin-left: 9px;
  color: var(--orange);
}

.diagnostic-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(620px, 1.4fr);
  gap: clamp(42px, 6vw, 100px);
  align-items: start;
  width: min(1380px, calc(100% - 80px));
  margin: 0 auto;
  padding: clamp(52px, 7vh, 94px) 0 70px;
}

.diagnostic-intro {
  position: sticky;
  top: 36px;
  min-height: 670px;
  color: var(--white);
}

.eyebrow {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 0 0 27px;
  color: #d9d5ca;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 29px;
  height: 1px;
  background: var(--red);
}

.diagnostic-intro h1 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(72px, 7.1vw, 116px);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.diagnostic-intro h1 i {
  color: var(--orange);
  font-style: italic;
  font-weight: 600;
}

.intro-lead {
  max-width: 480px;
  margin: 31px 0 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 14px;
  line-height: 1.75;
}

.survey-notes {
  max-width: 480px;
  margin-top: 58px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.survey-label {
  margin: 0 0 18px;
  color: var(--orange);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.survey-notes ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.survey-notes li {
  display: flex;
  gap: 13px;
  align-items: center;
}

.survey-notes li span {
  color: rgba(255, 255, 255, 0.36);
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.survey-disclaimer {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.43);
  font-size: 10px;
  line-height: 1.65;
}

.diagnostic-card {
  position: relative;
  min-height: 680px;
  padding: 30px clamp(28px, 4.2vw, 64px) 36px;
  background:
    linear-gradient(rgba(23, 25, 27, 0.035) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(90deg, rgba(23, 25, 27, 0.035) 1px, transparent 1px) 0 0 / 36px 36px,
    var(--paper);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.32);
}

.diagnostic-card::before {
  position: absolute;
  top: 0;
  left: 34px;
  width: 42px;
  height: 7px;
  background: var(--red);
  content: "";
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.card-topline p {
  display: flex;
  align-items: center;
  margin: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(211, 65, 54, 0.12);
}

.progress-track {
  height: 2px;
  margin-top: 21px;
  overflow: hidden;
  background: rgba(23, 25, 27, 0.11);
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--red);
  transition: width 0.35s ease;
}

#diagnostic-form {
  display: flex;
  min-height: 575px;
  flex-direction: column;
}

.step-panel {
  padding: clamp(36px, 6vh, 62px) 0 15px;
  animation: panel-in 0.34s ease both;
}

.step-heading p {
  margin: 0 0 15px;
  color: var(--red);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.step-heading h2 {
  max-width: 700px;
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(41px, 4.4vw, 66px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.step-heading > span {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 31px 0 0;
  padding: 0;
  border: 0;
}

.option-card {
  position: relative;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.option-card:hover {
  border-color: rgba(23, 25, 27, 0.55);
  transform: translateY(-2px);
}

.option-card:has(input:checked) {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.option-card:has(input:focus-visible) {
  outline: 3px solid rgba(211, 65, 54, 0.32);
  outline-offset: 2px;
}

.option-card input {
  position: absolute;
  opacity: 0;
}

.option-card-wide {
  grid-column: 1 / -1;
}

.option-index {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid currentColor;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  opacity: 0.68;
}

.option-card strong,
.option-card small {
  display: block;
}

.option-card strong {
  font-size: 12px;
  line-height: 1.35;
}

.option-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.option-card:has(input:checked) small {
  color: rgba(255, 255, 255, 0.52);
}

.option-card b {
  color: var(--orange);
  font-size: 17px;
  font-weight: 500;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 35px;
}

.select-field,
.contact-fields > label {
  display: grid;
  gap: 8px;
  color: #4f5352;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.select-field select,
.contact-fields input,
.contact-fields textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.44);
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
}

.select-field select,
.contact-fields input {
  height: 57px;
  padding: 0 15px;
}

.contact-fields textarea {
  min-height: 92px;
  padding: 14px 15px;
  resize: vertical;
}

.select-field select:focus,
.contact-fields input:focus,
.contact-fields textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(211, 65, 54, 0.11);
}

.summary-panel {
  padding-top: 34px;
}

.scope-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 25px;
  background: rgba(23, 25, 27, 0.12);
  border: 1px solid rgba(23, 25, 27, 0.12);
}

.scope-item {
  min-height: 68px;
  padding: 12px 14px;
  background: var(--paper-2);
}

.scope-item span,
.scope-item strong {
  display: block;
}

.scope-item span {
  margin-bottom: 5px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scope-item strong {
  font-size: 11px;
  line-height: 1.35;
}

.contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 22px;
}

.contact-fields > label:nth-child(4),
.consent-field {
  grid-column: 1 / -1;
}

.contact-fields > label:nth-child(3) {
  grid-column: 1 / -1;
}

.consent-field {
  display: flex !important;
  grid-template-columns: none;
  gap: 10px !important;
  align-items: flex-start;
  font-family: "Manrope", sans-serif !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1.5;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.consent-field input {
  width: 16px !important;
  height: 16px !important;
  margin: 0;
  accent-color: var(--red);
}

.honeypot {
  position: absolute !important;
  left: -9999px;
}

.form-error,
.form-status {
  min-height: 18px;
  margin: auto 0 10px;
  font-size: 11px;
  font-weight: 700;
}

.form-error {
  color: #a9261e;
}

.form-status {
  min-height: 0;
  margin: 0 0 10px;
  color: #275d3f;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.form-actions button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 0 23px;
  border: 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.back-button {
  color: var(--ink);
  background: transparent;
}

.next-button,
.submit-button {
  margin-left: auto;
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 16px 30px rgba(23, 25, 27, 0.18);
}

.submit-button {
  background: var(--red);
}

.form-actions button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.privacy-note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.privacy-note a {
  border-bottom: 1px solid currentColor;
}

.diagnostic-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1380px, calc(100% - 80px));
  margin: 0 auto;
  padding: 28px 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.52);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diagnostic-footer p {
  margin: 0;
}

.diagnostic-footer a {
  color: var(--orange);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .diagnostic-header,
  .diagnostic-shell,
  .diagnostic-footer {
    width: min(100% - 44px, 760px);
  }

  .diagnostic-shell {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-top: 45px;
  }

  .diagnostic-intro {
    position: static;
    min-height: 0;
  }

  .diagnostic-intro h1 {
    font-size: clamp(74px, 13vw, 105px);
  }

  .survey-notes {
    display: none;
  }
}

@media (max-width: 620px) {
  .diagnostic-header,
  .diagnostic-shell,
  .diagnostic-footer {
    width: calc(100% - 28px);
  }

  .diagnostic-header {
    padding-top: 18px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .brand-name {
    font-size: 16px;
  }

  .back-home {
    font-size: 0;
  }

  .back-home span {
    margin: 0;
    font-size: 18px;
  }

  .diagnostic-shell {
    gap: 31px;
    padding: 26px 0 44px;
  }

  .eyebrow {
    margin-bottom: 19px;
  }

  .diagnostic-intro h1 {
    font-size: clamp(63px, 20vw, 84px);
  }

  .intro-lead {
    margin-top: 22px;
    font-size: 13px;
  }

  .diagnostic-card {
    min-height: 650px;
    margin: 0 -14px;
    padding: 25px 20px 25px;
  }

  #diagnostic-form {
    min-height: 560px;
  }

  .step-panel {
    padding-top: 33px;
  }

  .step-heading h2 {
    font-size: clamp(39px, 12vw, 52px);
  }

  .option-grid,
  .field-row,
  .contact-fields,
  .scope-summary {
    grid-template-columns: 1fr;
  }

  .option-grid {
    gap: 8px;
    margin-top: 25px;
  }

  .option-card,
  .option-card-wide {
    grid-column: 1;
    min-height: 70px;
    padding: 12px 13px;
  }

  .scope-summary {
    gap: 1px;
  }

  .contact-fields > label,
  .contact-fields > label:nth-child(3),
  .contact-fields > label:nth-child(4),
  .consent-field {
    grid-column: 1;
  }

  .summary-panel .step-heading h2 {
    font-size: 42px;
  }

  .form-actions button {
    min-height: 51px;
    padding: 0 15px;
  }

  .form-actions button span {
    display: none;
  }

  .diagnostic-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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