.demo-board {
  --qd-ink: #173b2e;
  --qd-lime: #d9f589;
  --qd-paper: #fcfaed;
  box-sizing: border-box;
  min-width: 0;
  scroll-margin-top: 5rem;
  container-type: inline-size;
}

#quest-demo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(18px, 5.5cqw, 34px);
  background-color: #194638;
  background-image:
    linear-gradient(#b4dda310 1px, transparent 1px),
    linear-gradient(90deg, #b4dda310 1px, transparent 1px);
  background-size: 24px 24px;
  color: #f8fae9;
  border: 1px solid #173d31;
  border-radius: 25px;
  box-shadow: inset 0 1px 0 #ffffff20;
  text-align: left;
  font-family: inherit;
}

#quest-demo *, #quest-demo *::before, #quest-demo *::after { box-sizing: border-box; }
#quest-demo [hidden] { display: none; }

#quest-demo::before, #quest-demo::after {
  position: absolute;
  z-index: -1;
  width: 175px;
  height: 175px;
  border: 1.5px solid #c4e4b454;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

#quest-demo::before { top: -61px; right: -84px; box-shadow: 0 0 0 12px #194638, 0 0 0 13px #c4e4b42b; }
#quest-demo::after { bottom: -132px; left: -54px; width: 220px; height: 220px; }

.qd-top, .qd-foot, .qd-topic, .qd-label, .qd-next, .qd-track {
  display: flex;
  align-items: center;
}

.qd-top, .qd-foot { justify-content: space-between; gap: 10px; }
.qd-top { margin: 0 1px clamp(20px, 5cqw, 28px); }
.qd-label, .qd-count, .qd-foot-label, .qd-topic {
  font-size: 12px;
  line-height: 1.3;
  font-weight: 650;
}
.qd-label { gap: 9px; letter-spacing: .035em; }
.qd-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--qd-lime);
  box-shadow: 0 0 0 3px #d9f58918;
}
.qd-count {
  padding: 5px 10px;
  border: 1px solid #a6c8ac72;
  border-radius: 20px;
  color: #e1ebce;
  background: #163c30;
  letter-spacing: .09em;
  font-variant-numeric: tabular-nums;
}

.qd-paper {
  position: relative;
  padding: clamp(17px, 5.75cqw, 34px);
  border-radius: 15px;
  background: var(--qd-paper);
  box-shadow: 0 7px 0 -3px #a4b59a, 0 15px 24px -8px #082a26a6;
  color: var(--qd-ink);
}
.qd-topic { gap: 7px; color: #40583a; }
.qd-topic svg { width: 25px; height: 25px; padding: 4px; background: #e4eacb; border-radius: 7px; }
#quest-demo .qd-prompt {
  margin: clamp(22px, 5.2cqw, 30px) 0 0;
  font-family: inherit;
  font-size: clamp(15px, 3.7cqw, 20px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.015em;
  color: var(--qd-ink);
}
#quest-demo .qd-expression {
  margin: 5px 0 clamp(18px, 5.1cqw, 29px);
  font-family: inherit;
  font-size: clamp(37px, 12.7cqw, 73px);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -.065em;
  color: var(--qd-ink);
}
.qd-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#quest-demo button { font-family: inherit; cursor: pointer; }
.qd-answer {
  min-height: 45px;
  padding: 6px 2px;
  color: var(--qd-ink);
  background: #fffef4;
  border: 1.5px solid #8d9c80;
  box-shadow: 0 2px 0 #c5ceae;
  border-radius: 9px;
  font-size: clamp(16px, 4.7cqw, 24px);
  font-weight: 650;
  line-height: 1.15;
}
.qd-answer:not([aria-disabled]):active, .qd-next:active { transform: translateY(2px); box-shadow: none; }
.qd-answer[data-result="retry"] { background: #f4ebd8; border-style: dashed; }
.qd-answer[data-result="correct"] { background: var(--qd-lime); border-color: #557535; box-shadow: 0 2px 0 #7f9a4f; }
#quest-demo .qd-answer[aria-disabled] { cursor: default; }

#quest-demo .qd-feedback {
  min-height: 17px;
  margin: 13px 0 0;
  color: #58684f;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.45;
}
#quest-demo .qd-feedback[data-state="retry"] { color: #78511e; }
#quest-demo .qd-feedback[data-state="correct"] { color: #34592c; }
.qd-next {
  gap: 10px;
  margin: 12px 0 0;
  padding: 10px 15px;
  min-height: 43px;
  border: 1px solid var(--qd-ink);
  border-radius: 9px;
  background: var(--qd-ink);
  color: #fffef2;
  font-size: 14px;
  font-weight: 650;
}
#quest-demo :is(button,.qd-prompt):focus-visible { outline: 3px solid #7961a6; outline-offset: 3px; }
.qd-foot { margin: clamp(21px, 5.5cqw, 31px) 1px 0; }
.qd-track { gap: 4px; }
.qd-track i { width: clamp(16px, 4.8cqw, 28px); height: 5px; border-radius: 6px; background: #83a38a; }
.qd-track .qd-filled { background: var(--qd-lime); }
.qd-foot-label { color: #dce7d2; }

@media (hover: hover) {
  .qd-answer:not([aria-disabled]):hover { border-color: #557535; background: #ebf4cf; }
  .qd-next:hover { background: #2d5947; }
}
@media (prefers-reduced-motion: no-preference) {
  .qd-answer, .qd-next { transition: background-color 120ms, transform 120ms, border-color 120ms; }
}
