:root {
  color-scheme: light;
  --ink: #31384a;
  --heading: #3d176f;
  --muted: #666666;
  --line: #d9dcea;
  --paper: #ffffff;
  --soft: #fbfaff;
  --accent: #3d176f;
  --lavender: #b6a7f5;
  --lavender-soft: #f1edff;
  --blue: #3f6df6;
  --shadow: 0 14px 32px rgba(61, 23, 111, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--lavender);
  font-family: "Arial Rounded MT Bold", "Avenir Next", Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 12px 28px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button-secondary {
  border-color: transparent;
  background: #e9e8f4;
  color: var(--ink);
}

.site-band {
  min-height: 196px;
  padding: 64px 24px 30px;
  background: var(--lavender);
  color: #fff;
  text-align: center;
}

.brand-mark {
  display: inline-grid;
  gap: 0;
  justify-items: center;
  color: #fff;
  text-decoration: none;
}

.brand-main {
  font-size: clamp(3.4rem, 8vw, 5.4rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: 0;
}

.brand-sub {
  font-size: clamp(1rem, 2.2vw, 1.7rem);
  font-weight: 900;
  letter-spacing: 0;
}

.app {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 84px;
}

.form-card,
.results-card,
.chooser-card {
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.form-card {
  width: min(1180px, 100%);
  min-height: 520px;
  margin: 0 auto;
}

.question-panel {
  padding: 72px;
}

.intro-panel {
  padding: 72px;
  border-bottom: 1px solid var(--line);
}

.intro-panel h1,
.results-header h1,
.chooser-card h1 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.intro-panel p,
.results-header p,
.chooser-card p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
}

.question-title {
  margin: 0 0 24px;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: 0;
}

.question-title.is-required::after {
  content: " *";
  color: #d8251d;
}

.choices {
  display: grid;
  gap: 14px;
  margin: 0;
  text-align: left;
}

.choice {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: center;
  width: fit-content;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 400;
  text-align: left;
}

.choice:hover,
.choice.is-selected {
  background: transparent;
  color: var(--ink);
}

.choice-box {
  position: relative;
  width: 30px;
  height: 30px;
  border: 2px solid #b8bfcc;
  border-radius: 50%;
  background: #fff;
}

.choice.is-selected .choice-box {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 0 0 4px #dfe6ff;
}

.choice.is-selected .choice-box::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 52px -72px -72px;
  padding: 36px 72px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.form-actions button {
  min-width: 180px;
  min-height: 64px;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 400;
}

.results-card {
  padding: 64px;
  background: #fff;
}

.results-header {
  margin: 0 auto 42px;
  text-align: center;
}

.answer-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 24px auto 0;
  padding: 0;
  list-style: none;
}

.answer-summary li {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--lavender-soft);
  color: var(--heading);
  font-size: 0.9rem;
  font-weight: 700;
}

.teacher-list {
  display: grid;
  gap: 62px;
}

.teacher-section {
  display: grid;
  grid-template-columns: minmax(220px, 42%) 1fr;
  gap: 44px;
  align-items: center;
  padding-bottom: 62px;
}

.teacher-section:nth-child(even) {
  grid-template-columns: 1fr minmax(220px, 42%);
}

.teacher-section:nth-child(even) .teacher-media {
  order: 2;
}

.teacher-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--lavender-soft);
}

.teacher-media img,
.teacher-media svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.teacher-media img {
  background: #fff;
}

.teacher-copy h2 {
  margin: 0 0 12px;
  color: var(--heading);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: uppercase;
}

.headline {
  margin: 0 0 12px;
  color: var(--heading);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.2;
}

.summary {
  margin: 0 0 18px;
  color: var(--muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.badges li {
  color: #333;
  font-size: 0.86rem;
}

.note {
  margin: 0 0 18px;
  font-size: 0.9rem;
  font-weight: 700;
}

.explanation-box {
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
}

.explanation-box p {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.92rem;
}

.explanation-box p:last-child {
  margin-bottom: 0;
}

.explanation-status {
  color: var(--heading) !important;
  font-weight: 700;
}

.explanation-box ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.explanation-box li {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--lavender-soft);
  color: var(--heading);
  font-size: 0.78rem;
  font-weight: 700;
}

.teacher-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.empty {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 36px;
  background: var(--soft);
  color: var(--muted);
  text-align: center;
}

.retake {
  display: flex;
  justify-content: center;
  margin-top: 42px;
}

.chooser-card {
  padding: 64px;
}

.chooser-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.demo-steps {
  max-width: 840px;
  margin: 34px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  list-style: none;
}

.demo-steps li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.demo-steps span {
  color: var(--heading);
  font-size: 0.88rem;
  font-weight: 700;
}

.demo-steps p {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.55;
}

.demo-steps strong {
  color: var(--heading);
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .app {
    width: min(100% - 22px, 1060px);
  }

  .site-band {
    min-height: 132px;
    padding: 38px 20px 22px;
  }

  .intro-panel,
  .question-panel,
  .results-card,
  .chooser-card {
    padding: 28px 22px;
  }

  .form-card {
    min-height: 0;
  }

  .form-actions {
    margin: 36px -22px -28px;
    padding: 22px;
  }

  .form-actions button {
    min-width: 120px;
    min-height: 52px;
  }

  .choice {
    width: 100%;
    font-size: 1.15rem;
  }

  .demo-steps li {
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }

  .teacher-section,
  .teacher-section:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 42px;
  }

  .teacher-section:nth-child(even) .teacher-media {
    order: 0;
  }
}
