.public-study-demo {
  background: #eef5fc;
  scroll-margin-top: 86px;
}

.public-study-demo .wrap {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 5vw, 72px);
}

.public-demo-intro h2 {
  color: var(--navy);
  font: 700 clamp(34px, 4.6vw, 56px)/1.05 'Space Grotesk', sans-serif;
  letter-spacing: -.05em;
  margin: 14px 0 20px;
}

.public-demo-intro p {
  color: #455b73;
  font-size: 17px;
  line-height: 1.65;
  max-width: 55ch;
}

.public-demo-method {
  border-left: 3px solid var(--cyan);
  color: var(--navy);
  line-height: 1.65;
  margin-top: 28px;
  padding-left: 18px;
}

.public-demo-method strong { display: block; }

.public-demo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
}

.public-demo-badge {
  background: var(--green-soft);
  border-radius: 999px;
  color: #075d5b;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 16px;
  padding: 8px 12px;
}

.public-demo-progress {
  color: #405772;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 22px;
}

.public-demo-context {
  background: #f5f8fc;
  border-radius: 14px;
  color: #405772;
  line-height: 1.55;
  margin: 0 0 22px;
  padding: 14px 16px;
}

.public-demo-fieldset {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.public-demo-fieldset legend {
  color: var(--navy);
  font: 700 22px/1.25 'Space Grotesk', sans-serif;
  margin-bottom: 18px;
  padding: 0;
}

.public-demo-options { display: grid; gap: 10px; }

.public-demo-option {
  align-items: center;
  border: 1px solid #b6c9de;
  border-radius: 14px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 16px;
  gap: 12px;
  line-height: 1.4;
  min-height: 54px;
  padding: 12px 14px;
  transition: background-color .16s ease, border-color .16s ease;
}

.public-demo-option:hover { background: #f2f7fc; }
.public-demo-option:has(input:checked) { background: #e8f4ff; border-color: var(--blue); }
.public-demo-option:focus-within { outline: 3px solid var(--yellow); outline-offset: 2px; }
.public-demo-option input { accent-color: var(--blue); flex: 0 0 auto; height: 20px; margin: 0; width: 20px; }

.public-demo-error {
  color: #a12d25;
  font-weight: 700;
  line-height: 1.5;
  margin: 14px 0 0;
}

.public-demo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.public-demo-card button { cursor: pointer; }
.public-demo-card .primary { border: 0; text-align: center; }
.public-demo-card .secondary { background: #fff; }
.public-demo-card :is(button, a):focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.public-demo-feedback {
  background: var(--green-soft);
  border: 1px solid #85c8bd;
  border-radius: 16px;
  line-height: 1.6;
  padding: 20px;
}

.public-demo-feedback[data-result="incorrect"] { background: #fff6e3; border-color: #ddb96a; }
.public-demo-feedback h3, .public-demo-finish h3 {
  color: var(--navy);
  font: 700 24px/1.2 'Space Grotesk', sans-serif;
  margin: 0 0 10px;
}
.public-demo-feedback p { margin: 8px 0; }
.public-demo-feedback a { color: #145ba5; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.public-demo-finish { line-height: 1.65; }
.public-demo-finish p { margin: 10px 0; }
.public-demo-finish .public-demo-result { color: var(--navy); font-weight: 700; }
.public-demo-finish .public-demo-next-step { background: #f5f8fc; border-radius: 14px; padding: 14px 16px; }
.public-study-demo [hidden] { display: none !important; }

@media (max-width: 820px) {
  .public-study-demo .wrap { grid-template-columns: minmax(0, 1fr); }
  .public-demo-intro p { max-width: 65ch; }
}

@media (max-width: 580px) {
  .public-study-demo { padding: 64px 0; }
  .public-study-demo .wrap { padding: 0 18px; }
  .public-demo-intro h2 { font-size: 34px; }
  .public-demo-card { padding: 20px; }
  .public-demo-actions { display: grid; }
  .public-demo-actions :is(button, a) { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .public-demo-option { transition: none; }
}
