:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --ink: #15201a;
  --muted: #5f6c63;
  --line: #d9dfd9;
  --line-strong: #b9c5bb;
  --green: #0f5b3b;
  --green-dark: #0a3a28;
  --red: #b3262d;
  --gold: #c89b30;
  --focus: #0b63ce;
  --shadow: 0 12px 30px rgba(20, 33, 24, 0.08);
}

.survey-shell *,
.survey-shell *::before,
.survey-shell *::after {
  box-sizing: border-box;
}

.survey-shell button,
.survey-shell input,
.survey-shell select,
.survey-shell textarea {
  font: inherit;
}

.survey-shell button {
  cursor: pointer;
}

.survey-shell a {
  color: inherit;
}

.survey-shell :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
}

.brand-name,
.brand-context {
  display: block;
}

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

.brand-context {
  color: var(--muted);
  font-size: 0.92rem;
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.header-meta span,
.question-required,
.question-count,
.option-limit,
.char-count,
.points-total {
  border: 1px solid var(--line);
  background: #fbfcfa;
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}

.progress-shell {
  background: var(--green-dark);
  color: #fff;
  padding: 9px clamp(18px, 4vw, 48px) 12px;
  position: sticky;
  top: 89px;
  z-index: 15;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  margin-bottom: 7px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

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

.survey-shell {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  width: min(1320px, calc(100% - 32px));
  margin: 34px auto 56px;
  align-items: start;
}

.survey-shell--embedded {
  width: 100%;
  margin: 22px 0 0;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: clamp(18px, 2.8vw, 36px);
}

.survey-shell--embedded .section-nav {
  top: 112px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  padding: 16px;
  box-shadow: var(--shadow);
}

.survey-shell--embedded .survey-main {
  width: 100%;
}

.survey-shell--embedded .progress-shell {
  top: 96px;
}

.section-nav {
  position: sticky;
  top: 153px;
  max-height: calc(100vh - 174px);
  overflow: auto;
  border-left: 4px solid var(--green);
  padding: 6px 0 6px 14px;
}

.nav-title {
  font-weight: 800;
  margin-bottom: 10px;
}

#section-nav {
  display: grid;
  gap: 6px;
}

.nav-link {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: #e9efe9;
  color: var(--ink);
}

.nav-link.is-complete {
  color: var(--green-dark);
  font-weight: 700;
}

.nav-link small {
  color: inherit;
  opacity: 0.74;
}

.survey-main {
  min-width: 0;
}

.survey-heading {
  border-top: 6px solid var(--green);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 42px);
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.survey-shell h1,
.survey-shell h2,
.survey-shell h3,
.survey-shell p {
  overflow-wrap: anywhere;
}

.survey-shell h1 {
  margin: 0;
  font-size: clamp(2rem, 2.8rem, 2.8rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.survey-heading p:last-child {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 0;
}

.survey-section {
  scroll-margin-top: 175px;
  margin: 0 0 42px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--line-strong);
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.42rem;
}

.briefing-grid,
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.briefing-card,
.model-card,
.question-card,
.submit-panel,
.success-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.briefing-card,
.model-card {
  padding: 18px;
}

.briefing-card h3,
.model-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.briefing-card ul,
.model-card dl,
.scenario-details {
  margin: 0;
}

.briefing-card ul,
.scenario-details {
  padding-left: 20px;
}

.model-card dl {
  display: grid;
  gap: 8px;
}

.model-card dt {
  color: var(--green-dark);
  font-weight: 800;
}

.model-card dd {
  margin: 0;
  color: var(--muted);
}

.question-list {
  display: grid;
  gap: 16px;
}

.question-card {
  min-width: 0;
  min-inline-size: 0;
  padding: clamp(18px, 3vw, 26px);
}

.question-card[data-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(179, 38, 45, 0.12);
}

.question-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.question-title legend,
.question-title h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.choice-list,
.scenario-list,
.points-list {
  display: grid;
  gap: 10px;
}

.choice,
.scenario-choice,
.points-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fbfcfa;
}

.choice:hover,
.scenario-choice:hover {
  border-color: var(--line-strong);
  background: #f1f5f1;
}

.survey-shell input[type="radio"],
.survey-shell input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--green);
}

.survey-shell input[type="text"],
.survey-shell input[type="number"],
.survey-shell textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}

.survey-shell textarea {
  min-height: 132px;
  resize: vertical;
}

.text-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 7px;
}

.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.matrix {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
}

.matrix th,
.matrix td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: center;
  vertical-align: middle;
}

.matrix th:first-child,
.matrix td:first-child {
  text-align: left;
  width: 36%;
}

.matrix tr:last-child th,
.matrix tr:last-child td {
  border-bottom: 0;
}

.points-row {
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
}

.points-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  margin: 10px 0 0;
}

.question-error {
  display: none;
  color: var(--red);
  font-weight: 700;
  margin-top: 10px;
}

.question-card[data-invalid="true"] .question-error {
  display: block;
}

.submit-panel,
.success-panel {
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow);
}

.submit-panel h2,
.success-panel h2 {
  margin: 0 0 10px;
}

.turnstile-panel {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 14px;
  margin: 18px 0;
}

#turnstile-status {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 0.92rem;
}

.validation-summary {
  color: var(--red);
  font-weight: 700;
  margin: 0 0 14px;
}

.primary-action {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.primary-action:hover {
  background: var(--green-dark);
}

.primary-action:disabled {
  cursor: progress;
  opacity: 0.64;
}

.success-panel {
  border-top: 6px solid var(--green);
}

.hidden,
.honeypot {
  display: none !important;
}

.site-footer {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto 40px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-shell {
    top: 0;
  }

  .survey-shell {
    display: block;
    margin-top: 24px;
  }

  .section-nav {
    position: static;
    max-height: none;
    margin-bottom: 24px;
    border-left: 0;
    padding: 0;
  }

  #section-nav {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .section-heading,
  .question-title,
  .points-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .points-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .survey-shell--embedded {
    display: block;
  }

  .survey-shell--embedded .section-nav {
    position: static;
    max-height: none;
    margin-bottom: 24px;
    border-left: 1px solid var(--line);
    border-top: 4px solid var(--green);
    padding: 14px;
  }

  .survey-shell--embedded #section-nav {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }
}

@media (max-width: 560px) {
  .header-meta,
  .question-meta {
    justify-content: flex-start;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  h1 {
    font-size: 2rem;
  }

  .choice,
  .scenario-choice {
    padding: 10px;
  }

  .progress-shell {
    padding: 8px 12px 10px;
  }

  .progress-copy {
    font-size: 0.78rem;
  }

  .survey-heading,
  .question-card,
  .submit-panel,
  .success-panel {
    border-radius: 6px;
  }

  .survey-shell--embedded .section-nav {
    padding: 12px;
  }
}
