.q21,
.q21-m {
  --q21-mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --q21-gold-ink: #7a5717;
  --q21-gold-soft: #f7f0e2;
  --q21-gold-line: #d9c6a2;
  --q21-pass-soft: #eef5f1;
}

.q21 {
  position: absolute;
  inset: 0;
  color: var(--ink);
}

.q21 [hidden],
.q21-m [hidden] {
  display: none !important;
}

.q21 *,
.q21-m * {
  box-sizing: border-box;
}

.q21-head {
  position: absolute;
  left: 64px;
  top: 56px;
  width: 1472px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.q21-heading {
  min-width: 0;
}

.q21-title {
  margin: 0;
  font-size: 40px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

.q21-state {
  margin: 6px 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.q21-mark {
  flex: 0 0 auto;
  margin: 0;
  padding-bottom: 4px;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.q21-problem {
  font-family: var(--q21-mono);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.q21-pair {
  position: absolute;
  left: 64px;
  top: 164px;
  width: 1472px;
  display: grid;
  grid-template-columns: 548px 296px 548px;
  grid-template-areas:
    "ua la aa"
    "ub lb ab";
  column-gap: 40px;
  row-gap: 24px;
  grid-auto-rows: 206px;
  transform-origin: top center;
}

.q21 .q21-pair[data-compact="true"] {
  transform: scale(0.8);
}

.q21 [data-q21-use="a"],
.q21-m [data-q21-use="a"] {
  grid-area: ua;
}

.q21 [data-q21-link="a"],
.q21-m [data-q21-link="a"] {
  grid-area: la;
}

.q21 [data-q21-answer="a"],
.q21-m [data-q21-answer="a"] {
  grid-area: aa;
}

.q21 [data-q21-use="b"],
.q21-m [data-q21-use="b"] {
  grid-area: ub;
}

.q21 [data-q21-link="b"],
.q21-m [data-q21-link="b"] {
  grid-area: lb;
}

.q21 [data-q21-answer="b"],
.q21-m [data-q21-answer="b"] {
  grid-area: ab;
}

.q21-use {
  min-width: 0;
  padding: 26px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.q21-use-tag {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted);
}

.q21-use-title {
  margin: 0;
  font-size: 36px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--navy);
}

.q21-answer {
  min-width: 0;
  padding: 22px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.q21-answer-tag {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--q21-gold-ink);
}

.q21-answer-value {
  margin: 0;
  font-family: var(--q21-mono);
  font-size: 82px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.q21-answer-value.is-expression {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 38px;
  line-height: 1.3;
  font-weight: 500;
}

.q21-answer-value.is-expression span {
  display: block;
  white-space: nowrap;
}

.q21-link {
  position: relative;
  min-width: 0;
  height: 206px;
}

.q21-link-line {
  position: absolute;
  left: 6px;
  right: 14px;
  top: 50%;
  border-top: 2px solid var(--control-line);
  transform-origin: left center;
}

.q21-link-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -5px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--control-line);
  border-right: 2px solid var(--control-line);
  transform: rotate(45deg);
}

.q21-link-reason {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  width: max-content;
  max-width: 268px;
  margin: -17px auto 0;
  padding: 3px 10px;
  background: var(--paper);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  white-space: nowrap;
}

.q21-panel {
  position: absolute;
  left: 64px;
  top: 530px;
  width: 1472px;
  height: 226px;
  padding: 22px 30px;
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.q21-panel-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.q21-panel-label {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted);
}

.q21-ac {
  display: flex;
  align-items: center;
  gap: 20px;
}

.q21-ac-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--q21-mono);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--navy);
}

.q21-check-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--pass);
  overflow: visible;
}

.q21-check-icon circle,
.q21-check-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.q21-panel-note {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
}

.q21-panel-right {
  min-width: 0;
  padding-left: 32px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.q21-rule {
  margin: 0;
  font-size: 30px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q21-warn {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 26px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--q21-gold-ink);
}

.q21-neq {
  font-family: var(--q21-mono);
  font-size: 30px;
  line-height: 1;
  color: var(--danger);
}

.q21-question {
  position: absolute;
  left: 64px;
  top: 700px;
  width: 1472px;
  margin: 0;
  padding-top: 16px;
  border-top: 2px solid var(--gold);
  font-size: 32px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--navy);
}

.q21-foot {
  position: absolute;
  left: 64px;
  top: 772px;
  width: 1472px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 28px;
  line-height: 1.45;
  color: var(--muted);
}

.q21.is-q21-animating .q21-link-line {
  animation: q21-draw-x 280ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.q21-m.is-q21-animating .q21-link-line {
  animation: q21-draw-y 280ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.q21.is-q21-animating .q21-link-reason,
.q21.is-q21-animating .q21-panel,
.q21.is-q21-animating .q21-rule,
.q21.is-q21-animating .q21-warn,
.q21.is-q21-animating .q21-foot,
.q21-m.is-q21-animating .q21-link-reason,
.q21-m.is-q21-animating .q21-panel,
.q21-m.is-q21-animating .q21-rule,
.q21-m.is-q21-animating .q21-warn,
.q21-m.is-q21-animating .q21-foot {
  animation: q21-rise 240ms ease-out both;
}

.q21.is-q21-animating .q21-ac-item {
  animation: q21-rise 220ms ease-out both;
}

.q21.is-q21-animating .q21-ac-item + .q21-ac-item {
  animation-delay: 50ms;
}

@keyframes q21-draw-x {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes q21-draw-y {
  from {
    transform: translateX(-1px) scaleY(0);
  }
  to {
    transform: translateX(-1px) scaleY(1);
  }
}

@keyframes q21-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.q21-m {
  min-width: 0;
  color: var(--ink);
}

.q21-m .q21-head {
  position: static;
  width: auto;
  display: block;
  padding-bottom: 14px;
}

.q21-m .q21-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.45;
}

.q21-m .q21-state {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
}

.q21-m .q21-mark {
  margin: 10px 0 0;
  padding-bottom: 0;
  font-size: 13px;
}

.q21-m .q21-problem {
  font-size: 16px;
}

.q21-m .q21-pair {
  position: static;
  width: auto;
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 0;
  row-gap: 12px;
  grid-auto-rows: auto;
  transform: none !important;
}

.q21-m[data-q21-cue="b0"] .q21-pair {
  grid-template-areas:
    "ua"
    "ub"
    "aa"
    "ab";
}

.q21-m[data-q21-cue="b1"] .q21-pair {
  grid-template-areas:
    "ua"
    "la"
    "aa"
    "ub"
    "lb"
    "ab";
}

.q21-m[data-q21-cue="b0"] .q21-link {
  display: none;
}

.q21-m .q21-use {
  padding: 16px 18px;
}

.q21-m .q21-use-tag {
  font-size: 12px;
}

.q21-m .q21-use-title {
  font-size: 24px;
  line-height: 1.4;
}

.q21-m .q21-answer {
  padding: 16px 18px;
}

.q21-m .q21-answer-tag {
  font-size: 13px;
}

.q21-m .q21-answer-value {
  font-size: 56px;
}

.q21-m .q21-answer-value.is-expression {
  font-size: 26px;
  line-height: 1.4;
}

.q21-m .q21-link {
  height: 46px;
}

.q21-m .q21-link-line {
  left: 50%;
  right: auto;
  top: 4px;
  bottom: 10px;
  width: 0;
  border-top: 0;
  border-left: 2px solid var(--control-line);
  transform: translateX(-1px);
}

.q21-m .q21-link-line::after {
  left: -5px;
  right: auto;
  top: auto;
  bottom: -1px;
  transform: rotate(135deg);
}

.q21-m .q21-link-reason {
  max-width: 240px;
  margin-top: -12px;
  font-size: 15px;
  padding: 2px 8px;
}

.q21-m .q21-panel {
  position: static;
  width: auto;
  height: auto;
  margin-top: 22px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.q21-m .q21-panel-left {
  gap: 8px;
}

.q21-m .q21-panel-label {
  font-size: 12px;
}

.q21-m .q21-ac {
  gap: 16px;
}

.q21-m .q21-ac-item {
  font-size: 26px;
}

.q21-m .q21-check-icon {
  width: 19px;
  height: 19px;
}

.q21-m .q21-panel-note {
  font-size: 15px;
}

.q21-m .q21-panel-right {
  padding-left: 0;
  padding-top: 16px;
  border-left: 0;
  border-top: 1px solid var(--line);
  gap: 12px;
}

.q21-m .q21-rule {
  font-size: 22px;
  line-height: 1.5;
}

.q21-m .q21-warn {
  font-size: 20px;
}

.q21-m .q21-neq {
  font-size: 24px;
}

.q21-m .q21-question {
  position: static;
  width: auto;
  margin: 22px 0 0;
  padding-top: 14px;
  font-size: 24px;
  line-height: 1.5;
}

.q21-m .q21-foot {
  position: static;
  width: auto;
  margin: 20px 0 0;
  padding-top: 12px;
  font-size: 20px;
  line-height: 1.65;
}

.q21-m-link {
  margin: 26px 0 0;
  font-size: 16px;
  line-height: 1.6;
}

.is-instant .q21 *,
.is-instant .q21-m * {
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .q21 *,
  .q21-m * {
    transition: none !important;
    animation: none !important;
  }
}
