:root {
  color-scheme: light;
  --bg: #eef3f7;
  --ink: #111827;
  --muted: #505050;
  --line: #e2e7ef;
  --surface: #ffffff;
  --surface-strong: #f4f7fb;
  --accent: #382e95;
  --accent-strong: #251c72;
  --accent-soft: #f0eefc;
  --blue: #061431;
  --gold: #c58b1d;
  --red: #d2363d;
  --red-strong: #b7272d;
  --green: #1b7d69;
  --shadow: 0 18px 45px rgba(12, 22, 46, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  padding-bottom: 96px;
  font-family:
    Lato, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 64px;
}

.site-header {
  width: min(1180px, calc(100% - 32px));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: min(150px, 24vw);
  max-height: 46px;
  object-fit: contain;
}

.partner-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.partner-logo {
  display: block;
  width: min(250px, 34vw);
  max-height: 46px;
  object-fit: contain;
}

.intro-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
  min-height: 300px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(2, 10, 32, 0.94) 0%, rgba(5, 13, 43, 0.82) 52%, rgba(5, 13, 43, 0.38) 100%),
    url("/assets/digital-wave.jpeg") center / cover;
  box-shadow: var(--shadow);
  padding: 40px 54px;
}

.form-section,
.confirmation-panel,
.journey-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(12, 22, 46, 0.07);
}

.intro-copy {
  display: grid;
  align-content: center;
  max-width: 760px;
  color: #fff;
}

.environment-notice {
  display: grid;
  gap: 4px;
  margin: -4px 0 18px;
  border: 1px solid #b8d7f5;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #f4f9ff;
  color: var(--ink);
  padding: 14px 18px;
}

.environment-notice[data-mode="warning"] {
  border-color: #efc58a;
  border-left-color: #d99023;
  background: #fff9ef;
}

.environment-notice strong {
  font-size: 0.95rem;
}

.environment-notice span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 3.4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 900;
}

h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.intro-copy p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.12rem;
  line-height: 1.65;
}

.intro-copy .eyebrow {
  color: #fff;
  text-transform: none;
  font-size: 1rem;
  line-height: 1.55;
}

.intro-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.intro-facts span {
  border-left: 3px solid var(--red);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 9px 12px;
  font-size: 0.86rem;
  font-weight: 850;
}

.journey-panel {
  position: sticky;
  top: 10px;
  z-index: 5;
  margin-bottom: 18px;
  padding: 16px 22px 14px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.journey-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -28px;
  height: 28px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(238, 243, 247, 0.88), rgba(238, 243, 247, 0));
}

.journey-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.journey-topline strong {
  font-size: 1rem;
  font-weight: 900;
}

.journey-topline span {
  border-radius: 999px;
  background: rgba(56, 46, 149, 0.08);
  color: var(--accent-strong);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: #e4ebef;
  overflow: hidden;
}

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

.survey-layout {
  display: grid;
  gap: 18px;
}

.step-panel {
  scroll-margin-top: 172px;
}

.form-section,
.confirmation-panel {
  padding: 34px;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading p:last-child {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 18px;
}

label {
  display: grid;
  gap: 8px;
  color: #293241;
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid #c7d0db;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(56, 46, 149, 0.16);
}

.field-error {
  border-color: var(--red);
  outline: 3px solid rgba(168, 68, 68, 0.12);
}

.questions-stack {
  display: grid;
  gap: 0;
}

.dimension-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}

.dimension-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 22px 26px 20px;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
}

.dimension-header .eyebrow {
  margin-bottom: 6px;
  color: var(--red);
  font-size: 0.72rem;
}

.dimension-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.dimension-icon {
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(210, 54, 61, 0.2);
  border-radius: 8px;
  background: #fff;
  color: var(--red);
}

.dimension-icon::before {
  content: "";
  width: 29px;
  height: 29px;
  background: currentColor;
  mask: var(--icon-url) center / contain no-repeat;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
}

.question-row {
  margin: 0;
  border: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
  min-height: 410px;
  padding: 36px 52px 34px;
}

.question-row:last-child {
  border-bottom: 0;
}

.question-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.question-row legend {
  padding: 10px 0 0;
  margin: 0;
  width: 100%;
  max-width: 850px;
}

.question-title {
  display: block;
  color: #293241;
  font-size: 1.32rem;
  font-weight: 850;
  line-height: 1.34;
}

.editorial-pill {
  display: inline-block;
  margin-left: 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 850;
  vertical-align: middle;
}

.scale-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  max-width: 980px;
  margin-top: 0;
  border: 0;
}

.scale-direction {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 4px 8px 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.scale-direction::after {
  position: absolute;
  right: 4px;
  bottom: -7px;
  left: 4px;
  content: "";
  border-top: 1px dashed #cdd5e2;
}

.scale-options.is-ranked-scale {
  grid-template-columns: repeat(var(--option-count), minmax(0, 1fr));
  gap: 8px;
}

.scale-option {
  position: relative;
  min-width: 0;
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
}

.scale-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  border: 0;
  opacity: 0;
  padding: 0;
}

.scale-option span {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  min-height: 66px;
  border: 1px solid #edf1f6;
  border-left: 4px solid transparent;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  padding: 14px 18px;
  text-align: left;
  line-height: 1.42;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.scale-option span::before {
  content: "";
  display: block;
  width: 13px;
  height: 13px;
  border: 2px solid #b9c2d2;
  border-radius: 50%;
  background: #fff;
}

.scale-option small {
  display: block;
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
}

.scale-option input:checked + span {
  border-left-color: var(--accent);
  background: #f7f6ff;
  border-top-color: #d8d3f6;
  border-right-color: #d8d3f6;
  border-bottom-color: #d8d3f6;
  color: var(--ink);
}

.scale-option input:checked + span small {
  font-weight: 500;
}

.scale-option input:checked + span::before {
  border-color: var(--accent);
  background: radial-gradient(circle at center, var(--accent) 0 45%, #fff 48%);
}

.scale-option input:focus + span {
  outline: 3px solid rgba(56, 46, 149, 0.16);
}

.is-ranked-scale .scale-option span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 126px;
  padding: 14px 12px;
  border-left: 1px solid #edf1f6;
  gap: 10px;
}

.is-ranked-scale .scale-option span::before {
  display: none;
}

.scale-index {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #b9c2d2;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1;
}

.is-ranked-scale .scale-option small {
  font-size: 0.92rem;
  line-height: 1.35;
}

.is-ranked-scale .scale-option input:checked + span {
  border-left-color: #d8d3f6;
}

.is-ranked-scale .scale-option input:checked + span .scale-index {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.question-row.field-error {
  background: #fff8f8;
}

.question-row.field-error .scale-option span {
  background: #fff8f8;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.45;
}

.checkbox-row input {
  min-height: auto;
  margin-top: 4px;
}

.primary-button {
  width: auto;
  min-width: 220px;
  min-height: 52px;
  margin-top: 0;
  border: 0;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
  padding: 0 22px;
}

.primary-button:hover {
  background: var(--red-strong);
}

.primary-button:disabled {
  background: #82909f;
  cursor: wait;
}

.form-status {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 500;
}

.journey-panel .form-status:empty {
  min-height: 0;
  margin: 0;
}

.step-actions {
  position: fixed;
  left: max(16px, calc((100vw - 1180px) / 2 + 16px));
  right: max(16px, calc((100vw - 1180px) / 2 + 16px));
  bottom: 14px;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 0;
  align-items: center;
  border: 1px solid rgba(226, 231, 239, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(12, 22, 46, 0.18);
  padding: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dimension-block .step-actions {
  margin-top: 0;
}

.split-actions {
  justify-content: space-between;
}

.right-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

.form-status.error {
  color: var(--red);
}

.secondary-button {
  min-height: 42px;
  border: 1px solid #c9c6ea;
  border-radius: 6px;
  background: #fff;
  color: var(--accent-strong);
  cursor: pointer;
  padding: 8px 14px;
  font-weight: 700;
}

.secondary-button:hover {
  border-color: var(--accent);
}

.test-easter-egg {
  width: 7px;
  min-width: 7px;
  min-height: 7px;
  margin: 0 auto 0 3px;
  border: 0;
  border-radius: 50%;
  background: currentColor;
  cursor: pointer;
  opacity: 0.025;
  padding: 0;
}

.test-menu-dialog {
  width: min(420px, calc(100vw - 32px));
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(10, 20, 38, 0.28);
  padding: 0;
}

.test-menu-dialog::backdrop {
  background: rgba(8, 16, 31, 0.45);
}

.test-menu-content {
  padding: 28px;
}

.test-menu-content h2 {
  margin-bottom: 10px;
}

.test-menu-content > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}

.test-menu-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.test-menu-actions button {
  width: 100%;
  justify-content: center;
}

.ghost-button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ghost-button:hover {
  color: var(--accent-strong);
  background: var(--accent-soft);
  text-decoration: none;
}

.confirmation-panel {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  min-height: 320px;
  background: #fff;
}

.confirmation-panel h2 {
  max-width: 650px;
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.08;
}

.confirmation-panel p:not(.eyebrow) {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.confirmation-panel .primary-button {
  margin-top: 24px;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.confirmation-actions .primary-button,
.confirmation-actions .secondary-button {
  margin-top: 0;
}

.pdf-download-button {
  display: flex;
  margin-left: auto;
}

.email-disclaimer {
  max-width: 680px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.86);
}

.email-disclaimer h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
}

.email-disclaimer p {
  max-width: none !important;
  margin: 0;
  font-size: 0.95rem !important;
}

.email-disclaimer p + p {
  margin-top: 10px;
}

.checkbox-row a,
.email-disclaimer a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result-preview {
  display: block;
  width: 100%;
  margin-top: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.privacy-consent {
  align-items: flex-start;
}

.privacy-consent span {
  display: block;
}

.privacy-consent strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  line-height: 1.45;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 8px auto 36px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(17, 24, 39, 0.12);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.support-contact {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.support-contact a {
  color: var(--accent-strong);
  font-weight: 800;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 840px) {
  body {
    padding-bottom: 154px;
  }

  .intro-panel,
  .field-grid,
  .scale-options {
    grid-template-columns: 1fr;
  }

  .scale-options.is-ranked-scale {
    grid-template-columns: 1fr;
  }

  .scale-direction {
    display: none;
  }

  .is-ranked-scale .scale-option span {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    min-height: 66px;
  }

  .site-header {
    min-height: 74px;
  }

  .brand-row {
    flex-wrap: wrap;
    gap: 10px 12px;
  }

  .brand-logo {
    width: min(138px, 44vw);
    max-height: 40px;
  }

  .partner-label {
    font-size: 0.78rem;
  }

  .partner-logo {
    width: min(210px, 58vw);
    max-height: 38px;
  }

  .form-section,
  .confirmation-panel,
  .journey-panel {
    padding: 22px;
  }

  .intro-panel {
    min-height: auto;
    padding: 34px 24px;
    background:
      linear-gradient(180deg, rgba(2, 10, 32, 0.94) 0%, rgba(5, 13, 43, 0.78) 100%),
      url("/assets/digital-wave.jpeg") center / cover;
  }

  .question-row {
    align-items: stretch;
    min-height: auto;
    padding: 28px 20px 32px;
  }

  .question-title {
    font-size: 1.12rem;
  }

  .question-topline {
    display: grid;
    justify-content: stretch;
  }

  .dimension-header {
    padding: 20px;
  }

  .dimension-icon {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  .dimension-icon::before {
    width: 25px;
    height: 25px;
  }

  .dimension-block .step-actions {
    padding: 16px;
  }

  .step-actions {
    left: 12px;
    right: 12px;
    bottom: 10px;
  }

  .step-actions,
  .split-actions,
  .right-actions,
  .intro-facts {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }
}
