:root {
  color-scheme: light;
  --page-bg: #f6f6fb;
  --surface: #ffffff;
  --text: #111111;
  --muted: #767676;
  --line: #e5e7eb;
  --line-strong: #c9c9d4;
  --blue: #4b84ee;
  --blue-soft: #e9f1ff;
  --gold: #e6bf35;
  --black-button: #130d12;
  --danger: #b91c1c;
  --shadow: 0 14px 40px rgba(22, 25, 34, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, #f9f9fc 0%, #eef3ff 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  padding: 24px 16px 40px;
}

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

.page-shell {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: min(100%, 420px);
  min-height: calc(100vh - 48px);
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 20px 18px 26px;
  position: relative;
}

.wizard-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

.wizard-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wizard-screen,
.loading-screen,
.success-screen {
  min-height: 68vh;
}

.screen-header {
  text-align: center;
  margin-bottom: 24px;
}

.screen-header.screen-header-left {
  text-align: left;
}

.screen-header h1,
.loading-copy h2,
.success-screen h2 {
  margin: 0;
  font-size: clamp(40px, 8.6vw, 54px);
  line-height: 1.06;
  font-weight: 400;
}

.screen-subtitle {
  margin: 16px auto 0;
  max-width: 320px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--muted);
}

.screen-body {
  display: grid;
  gap: 28px;
}

.field-stack,
.question-stack,
.rating-stack {
  display: grid;
  gap: 28px;
}

.field-group {
  display: grid;
  gap: 10px;
}

.field-group label,
.question-label,
.coverage-group-title,
.class-code-card-title {
  font-size: 18px;
  line-height: 1.35;
}

.field-help,
.small-note,
.upload-summary,
.muted-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.text-input,
.select-input,
.text-area {
  width: 100%;
  min-height: 58px;
  border: 2px solid #1b1b1b;
  border-radius: 18px;
  padding: 14px 18px;
  background: #ffffff;
  font-size: 17px;
}

.text-area {
  min-height: 110px;
  resize: vertical;
}

.text-input::placeholder,
.select-input:invalid {
  color: #a2a2aa;
}

.field-row {
  display: grid;
  gap: 14px;
}

.field-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-row.three {
  grid-template-columns: 1.5fr 1fr 0.9fr;
}

.choice-group {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.choice-pill {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  cursor: pointer;
  font-size: 18px;
}

.choice-pill-circle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 3px solid var(--blue);
  display: grid;
  place-items: center;
  color: transparent;
  transition: all 160ms ease;
}

.choice-pill.is-active .choice-pill-circle {
  background: var(--blue);
  color: #ffffff;
}

.choice-pill-circle::after {
  content: "✓";
  font-size: 21px;
  line-height: 1;
}

.coverage-grid {
  display: grid;
  gap: 0;
  border: 4px solid var(--blue);
  border-radius: 24px;
  overflow: hidden;
}

.coverage-card {
  display: grid;
  grid-template-columns: 78px 1fr 72px;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 4px solid var(--blue);
  background: #ffffff;
}

.coverage-card:last-child {
  border-bottom: none;
}

.coverage-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff8e4;
  font-size: 30px;
}

.coverage-copy {
  display: grid;
  gap: 6px;
}

.coverage-title {
  font-size: 26px;
  line-height: 1.03;
  font-weight: 700;
}

.coverage-description {
  font-size: 16px;
  line-height: 1.2;
}

.coverage-check {
  width: 58px;
  height: 58px;
  border: 4px solid #111111;
  background: #ffffff;
  display: grid;
  place-items: center;
  font-size: 30px;
}

.coverage-card.is-selected {
  background: #f8fbff;
}

.coverage-card.is-selected .coverage-check {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.help-link,
.action-link {
  border: none;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-size: 17px;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
  cursor: pointer;
}

.bullet-card {
  border: 2px solid var(--line-strong);
  padding: 18px 16px;
  display: grid;
  gap: 12px;
}

.bullet-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  font-size: 17px;
  line-height: 1.5;
}

.bullet-icon {
  color: var(--blue);
  font-weight: 700;
}

.bullet-icon.exclude {
  color: var(--danger);
}

.class-code-card {
  border: 2px solid var(--line-strong);
  overflow: hidden;
}

.class-code-card-header {
  background: var(--blue);
  color: #ffffff;
  padding: 16px 18px;
  font-size: 18px;
  font-weight: 700;
}

.class-code-card-body {
  padding: 18px;
  display: grid;
  gap: 18px;
}

.upload-area {
  display: grid;
  gap: 14px;
}

.upload-button {
  width: 100%;
  min-height: 72px;
  border: none;
  border-radius: 8px;
  background: #231d22;
  color: #ffffff;
  font-size: 26px;
  letter-spacing: 0.03em;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.checkbox-line input {
  width: 24px;
  height: 24px;
  accent-color: var(--blue);
}

.alert-bar {
  margin-bottom: 14px;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fef2f2;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.45;
}

.wizard-footer {
  margin-top: 22px;
}

.progress-line {
  position: relative;
  margin-bottom: 18px;
  padding-top: 12px;
}

.progress-track {
  position: absolute;
  left: 34px;
  right: 34px;
  top: 32px;
  height: 6px;
  background: #111111;
}

.progress-dots {
  position: relative;
  display: flex;
  justify-content: space-between;
}

.progress-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #d0ddff;
  border: 6px solid #d0ddff;
  transform: translateY(10px);
}

.progress-dot.is-active,
.progress-dot.is-complete {
  width: 34px;
  height: 34px;
  border-width: 8px;
  background: var(--blue);
  border-color: var(--blue);
}

.progress-labels {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.nav-actions {
  display: flex;
  gap: 16px;
}

.nav-button {
  flex: 1;
  min-height: 78px;
  border: none;
  border-radius: 8px;
  font-size: 28px;
}

.nav-button-secondary {
  background: var(--black-button);
  color: #5f8ff1;
}

.nav-button-primary {
  background: var(--black-button);
  color: var(--gold);
}

.nav-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

.loading-screen {
  display: grid;
  align-content: start;
  gap: 32px;
  padding-top: 30px;
}

.loading-copy {
  text-align: center;
}

.dog-illustration {
  width: 100%;
  height: 320px;
  position: relative;
  overflow: hidden;
}

.dog-face {
  position: absolute;
  left: 52%;
  top: 72px;
  transform: translateX(-50%);
  width: 170px;
  height: 144px;
  border-radius: 46% 46% 40% 40%;
  background: #f6d06d;
}

.dog-ear {
  position: absolute;
  top: 100px;
  width: 94px;
  height: 120px;
  background: #e9c15d;
  border-radius: 50%;
}

.dog-ear.left {
  left: 64px;
  transform: rotate(20deg);
}

.dog-ear.right {
  right: 64px;
  transform: rotate(-14deg);
}

.goggle {
  position: absolute;
  top: 4px;
  width: 56px;
  height: 36px;
  border-radius: 999px;
  border: 8px solid #9aa3ab;
  background: rgba(255, 255, 255, 0.3);
}

.goggle.left {
  left: 22px;
  transform: rotate(-12deg);
}

.goggle.right {
  right: 22px;
  transform: rotate(12deg);
}

.dog-eyes {
  position: absolute;
  top: 58px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
}

.dog-eyes span {
  width: 26px;
  height: 36px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 10px 0 0 #111111;
}

.dog-nose {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  width: 46px;
  height: 34px;
  border-radius: 50%;
  background: #684226;
}

.dog-laptop {
  position: absolute;
  left: 50%;
  bottom: 38px;
  transform: translateX(-24%);
  width: 182px;
  height: 100px;
  border-radius: 12px 12px 6px 6px;
  background: #2865c6;
}

.dog-laptop-logo {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #111111;
  position: absolute;
  left: 50%;
  top: 28px;
  transform: translateX(-50%);
}

.dog-laptop-logo::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  border: 4px solid #f0b632;
  border-left-color: transparent;
  transform: rotate(24deg);
}

.dog-cape {
  position: absolute;
  left: 84px;
  bottom: 38px;
  width: 124px;
  height: 118px;
  background: #dc2d2d;
  border-radius: 14px 80px 14px 14px;
  transform: skewX(-24deg);
}

.success-screen {
  display: grid;
  align-content: center;
  gap: 18px;
  text-align: center;
}

.success-screen p {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.success-link {
  color: var(--blue);
  font-size: 17px;
  font-weight: 700;
}

.chat-fab {
  position: fixed;
  right: 16px;
  bottom: 18px;
  width: 92px;
  height: 92px;
  border: none;
  border-radius: 999px;
  background: #b80000;
  box-shadow: 0 14px 30px rgba(139, 0, 0, 0.35);
  z-index: 10;
}

.chat-bubble,
.chat-bubble::before {
  position: absolute;
  display: block;
}

.chat-bubble {
  left: 26px;
  top: 26px;
  width: 40px;
  height: 30px;
  border-radius: 10px;
  border: 6px solid #ffffff;
}

.chat-bubble::before {
  content: "";
  bottom: -14px;
  left: 8px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

@media (max-width: 420px) {
  body {
    padding: 0;
  }

  .phone-frame {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    padding-bottom: 120px;
  }

  .field-row.two,
  .field-row.three {
    grid-template-columns: 1fr;
  }

  .coverage-card {
    grid-template-columns: 64px 1fr 62px;
    padding: 18px 14px;
  }

  .coverage-title {
    font-size: 24px;
  }

  .nav-actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 24%);
    padding-top: 8px;
  }
}
