:root {
  --background: #f4f8fc;
  --foreground: #10253d;
  --primary: #07589e;
  --primary-dark: #064a85;
  --gold: #c99720;
  --border: #d8e3ee;
  --muted: #607187;
  --danger: #b72f2f;
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.survey-shell {
  min-height: 100vh;
  padding: 0 24px;
  background:
    radial-gradient(circle at 10% 0%, rgb(40 126 188 / 9%), transparent 26rem),
    linear-gradient(180deg, #ffffff 0, #f4f8fc 24rem);
}

.brand-header {
  width: min(100%, 1080px);
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo {
  width: 198px;
  height: auto;
  max-height: 76px;
  object-fit: contain;
}

.official-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #e7c775;
  border-radius: 999px;
  background: #fff9e8;
  color: #75530b;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

.intro-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 58px);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.7fr);
  align-items: end;
  gap: 40px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(128deg, #064b89 0%, #0870b8 72%, #0b5d9c 100%);
  box-shadow: 0 28px 70px rgb(7 67 117 / 20%);
}

.intro-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: 8px;
  background: #d0a129;
}

.intro-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 340px;
  height: 340px;
  right: -150px;
  top: -190px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgb(255 255 255 / 4%), 0 0 0 110px rgb(255 255 255 / 3%);
}

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

.intro-panel .eyebrow {
  color: #f1cc6d;
}

.intro-panel h1,
.success-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.55rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.intro-copy {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgb(255 255 255 / 85%);
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.privacy-card {
  padding: 20px;
  display: grid;
  gap: 14px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 18px;
  background: rgb(3 45 82 / 42%);
  backdrop-filter: blur(8px);
}

.privacy-card div {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
}

.info-icon {
  width: 22px;
  color: #f0c961;
  font-size: 1.2rem;
  line-height: 1;
  text-align: center;
}

.setup-notice {
  width: min(100%, 860px);
  margin: 22px auto -8px;
  padding: 13px 16px;
  border: 1px solid #e0c576;
  border-radius: 13px;
  background: #fff9e7;
  color: #684f17;
  font-size: 0.9rem;
}

.progress-panel {
  position: sticky;
  top: 12px;
  z-index: 20;
  width: min(100%, 860px);
  margin: 28px auto;
  padding: 16px 20px 18px;
  border: 1px solid rgb(203 217 230 / 88%);
  border-radius: 17px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 12px 30px rgb(30 76 112 / 10%);
  backdrop-filter: blur(12px);
}

.progress-heading {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.progress-heading span {
  color: #6a7d91;
  font-size: 0.85rem;
  font-weight: 700;
}

.progress-heading strong {
  color: var(--primary);
  font-size: 0.92rem;
}

.progress-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfeaf3;
}

.progress-value {
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #07589e, #2c86c6);
  transition: width 220ms ease;
}

.progress-20 { width: 20%; }
.progress-40 { width: 40%; }
.progress-60 { width: 60%; }
.progress-80 { width: 80%; }
.progress-100 { width: 100%; }

.survey-form {
  width: min(100%, 860px);
  margin: 0 auto;
}

.step-stack {
  display: grid;
  gap: 20px;
  animation: step-in 260ms ease-out both;
}

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

.question-card {
  min-width: 0;
  margin: 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #d9e4ee;
  border-radius: 21px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgb(34 77 111 / 7%);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.question-card-error {
  border-color: #cf5353;
  box-shadow: 0 0 0 3px rgb(201 54 54 / 9%);
}

.question-legend {
  width: 100%;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: #12314e;
  font-size: clamp(1.08rem, 2.4vw, 1.28rem);
  font-weight: 800;
  line-height: 1.35;
}

.question-number {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 30px;
  border-radius: 9px;
  background: #e8f2fa;
  color: var(--primary);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.optional-label {
  margin-left: 8px;
  color: #78889a;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: lowercase;
}

.question-hint {
  margin: 9px 0 0 51px;
  color: #687b8e;
  font-size: 0.9rem;
}

.question-body {
  margin-top: 20px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-option {
  min-height: 50px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #d5e1ec;
  border-radius: 13px;
  background: #fbfdff;
  color: #233c54;
  cursor: pointer;
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease, box-shadow 130ms ease;
}

.choice-option:hover {
  transform: translateY(-1px);
  border-color: #8bb7d8;
  background: #f4faff;
  box-shadow: 0 5px 14px rgb(22 91 143 / 8%);
}

.choice-option:has(input:checked) {
  border-color: #2b79b5;
  background: #edf7ff;
  color: #074e89;
  box-shadow: inset 3px 0 #c4931c;
}

.choice-control {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--primary);
}

.text-input,
.answer-area {
  width: 100%;
  border: 1px solid #cbd9e6;
  border-radius: 13px;
  background: #fbfdff;
  color: #19344c;
  outline: none;
}

.text-input {
  min-height: 52px;
  padding: 12px 16px;
}

.answer-area {
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
}

.text-input:focus,
.answer-area:focus {
  border-color: #2c7bbb;
  box-shadow: 0 0 0 3px rgb(44 123 187 / 14%);
}

.follow-up {
  margin-top: 14px;
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 7px;
}

.rating-option {
  position: relative;
  min-width: 0;
  height: 45px;
  display: grid;
  place-items: center;
  border: 1px solid #d3e0eb;
  border-radius: 11px;
  background: #fbfdff;
  color: #27425b;
  font-weight: 800;
  cursor: pointer;
  transition: 130ms ease;
}

.rating-option:hover {
  border-color: #6ca2ca;
  background: #f1f8fd;
}

.rating-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 7px 16px rgb(7 88 158 / 22%);
}

.rating-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.rating-labels {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: #74869a;
  font-size: 0.78rem;
}

.field-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 700;
}

.skip-note,
.finish-note {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 16px;
}

.skip-note {
  border: 1px solid #bcdac8;
  background: #eef9f2;
  color: #286143;
}

.finish-note {
  border: 1px solid #d8c27f;
  background: #fff9e8;
  color: #674e17;
}

.skip-note p,
.finish-note p {
  margin: 0;
}

.note-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 70%);
  font-weight: 900;
}

.form-actions {
  margin: 24px 0 52px;
  padding: 17px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgb(30 76 112 / 9%);
}

.button {
  min-height: 48px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: 3px solid rgb(44 123 187 / 28%);
  outline-offset: 2px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.primary-action {
  margin-left: auto;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgb(7 88 158 / 18%);
}

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

.secondary-action {
  border: 1px solid #b9cad9;
  color: #164b75;
  background: #ffffff;
}

.site-footer {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 28px 0 36px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #d9e4ee;
  color: #718397;
  font-size: 0.85rem;
}

.success-shell {
  min-height: 100vh;
  padding: 0 24px;
  background:
    radial-gradient(circle at 10% 0%, rgb(40 126 188 / 9%), transparent 26rem),
    linear-gradient(180deg, #ffffff 0, #f4f8fc 24rem);
}

.success-panel {
  width: min(100%, 680px);
  margin: clamp(60px, 10vh, 120px) auto;
  padding: clamp(34px, 7vw, 66px);
  text-align: center;
  border: 1px solid #d9e4ee;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgb(29 75 112 / 12%);
}

.success-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9f6ee;
  color: #21804a;
  font-size: 2rem;
  font-weight: 900;
}

.success-panel h1 {
  color: #0b487b;
  font-size: clamp(2rem, 6vw, 3.1rem);
}

.success-panel > p:not(.eyebrow) {
  max-width: 520px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.success-signature {
  margin-top: 30px;
  color: #a8790f;
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  top: 18px;
  width: min(calc(100% - 28px), 560px);
  padding: 14px 18px;
  transform: translateX(-50%);
  border: 1px solid #d8c27f;
  border-radius: 13px;
  background: #fff9e8;
  color: #624b18;
  box-shadow: 0 18px 42px rgb(27 61 88 / 18%);
  font-weight: 700;
}

.toast.error {
  border-color: #dfa3a3;
  background: #fff1f1;
  color: #922c2c;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 200;
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #8d2424;
  color: #ffffff;
  text-align: center;
}

@media (max-width: 760px) {
  .survey-shell,
  .success-shell {
    padding-inline: 14px;
  }

  .brand-header {
    min-height: 78px;
  }

  .brand-logo {
    width: 158px;
    max-height: 64px;
  }

  .official-badge {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .intro-panel {
    padding: 30px 24px 26px;
    grid-template-columns: 1fr;
    gap: 24px;
    border-radius: 21px;
  }

  .intro-panel h1 {
    font-size: 2.2rem;
  }

  .privacy-card {
    grid-template-columns: 1fr 1fr;
    padding: 14px;
  }

  .privacy-card div {
    align-items: flex-start;
    font-size: 0.82rem;
  }

  .progress-panel {
    top: 8px;
    margin: 18px auto;
    padding: 13px 15px 15px;
    border-radius: 14px;
  }

  .progress-heading strong {
    max-width: 55%;
    text-align: right;
  }

  .question-card {
    padding: 22px 17px;
    border-radius: 17px;
  }

  .question-legend {
    gap: 10px;
    font-size: 1.06rem;
  }

  .question-number {
    width: 34px;
    height: 28px;
  }

  .question-hint {
    margin-left: 44px;
  }

  .choice-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .choice-option {
    min-height: 52px;
    padding: 12px;
  }

  .rating-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .form-actions {
    position: sticky;
    bottom: 8px;
    z-index: 18;
    margin-bottom: 38px;
    padding: 10px;
    border-radius: 15px;
  }

  .form-actions button {
    min-width: 0;
    padding-inline: 15px;
  }

  .site-footer {
    padding: 22px 2px 28px;
    flex-direction: column;
    gap: 4px;
  }

  .success-panel {
    margin-top: 36px;
  }
}

@media (max-width: 420px) {
  .official-badge {
    max-width: 132px;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .privacy-card {
    grid-template-columns: 1fr;
  }

  .progress-heading {
    align-items: flex-start;
  }

  .form-actions {
    gap: 8px;
  }

  .form-actions button {
    font-size: 0.88rem;
  }
}

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