/* Q11 · 三种改法，都让 E 回来了 */

.q11,
.q11-m {
  --q11-soft: #fbf7ef;
  --q11-pass-soft: #eef5f1;
  --q11-gold-line: #d9c6a2;
  --q11-mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --q11-fade: 180ms;
  --q11-enter: 240ms;
  --q11-result: 220ms;
}

.q11 {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}

.q11-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

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

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

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

.q11-contract {
  flex: 0 0 auto;
  margin: 0 0 2px;
  padding: 8px 14px;
  border: 1px solid var(--q11-gold-line);
  border-radius: 999px;
  background: var(--q11-soft);
  font-size: 19px;
  line-height: 1.5;
  color: var(--navy);
  white-space: nowrap;
}

.q11-contract code {
  font-family: var(--q11-mono);
  font-size: 0.95em;
  color: var(--navy);
}

.q11-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.q11-panel {
  position: absolute;
  inset: 20px 0 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--q11-fade) ease-out, visibility 0s linear var(--q11-fade);
}

.q11-panel.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--q11-fade) ease-out, visibility 0s;
}

/* b0 · 先定接口 */

.q11-b0 {
  justify-content: center;
  gap: 26px;
}

.q11-flow {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.q11-input-card,
.q11-options-card,
.q11-resolution {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.q11-input-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 28px 30px;
}

.q11-label {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.q11-big-code {
  margin: 0;
  font-family: var(--q11-mono);
  font-size: 72px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--navy);
}

.q11-input-copy {
  margin: 0;
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink);
}

.q11-options-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 30px;
}

.q11-options-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q11-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.q11-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 20px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.q11-option.is-chosen {
  background: var(--white);
  border: 2px solid var(--gold);
}

.q11-option-code {
  margin: 0;
  font-family: var(--q11-mono);
  font-size: 44px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--navy);
}

.q11-option-name {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q11-option-note {
  margin: 0;
  display: flex;
  align-items: center;
  min-height: 30px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

.q11-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.q11-options-foot {
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.q11-resolution {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 26px;
}

.q11-resolution-main {
  margin: 0;
  font-size: 30px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.q11-resolution-main code {
  font-family: var(--q11-mono);
  font-size: 0.95em;
  color: var(--navy);
}

.q11-resolution-sub {
  margin: 0;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  text-align: right;
}

/* b1 / b2 · 三张候选卡与同一输入 */

.q11-compare {
  gap: 16px;
}

.q11-inputstrip {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.q11-strip-label {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}

.q11-strip-value {
  margin: 0;
  font-size: 26px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.q11-strip-value code {
  font-family: var(--q11-mono);
  font-size: 0.9em;
  color: var(--navy);
}

.q11-strip-note {
  margin: 0 0 0 auto;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
  white-space: nowrap;
}

.q11-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.q11-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 20px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--q11-enter) ease-out, transform var(--q11-enter) ease-out;
}

.q11-compare.is-on .q11-card {
  opacity: 1;
  transform: none;
}

.q11-compare.is-on [data-q11-candidate-a] {
  transition-delay: 0ms;
}

.q11-compare.is-on [data-q11-candidate-b] {
  transition-delay: 70ms;
}

.q11-compare.is-on [data-q11-candidate-c] {
  transition-delay: 140ms;
}

.q11-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 64px;
}

.q11-letter {
  flex: 0 0 auto;
  font-family: var(--q11-mono);
  font-size: 38px;
  line-height: 1;
  font-weight: 600;
  color: var(--gold);
}

.q11-card-titles {
  min-width: 0;
}

.q11-card-role {
  margin: 0 0 2px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.q11-card-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q11-code {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 14px;
  min-height: 188px;
  padding: 16px 12px;
  background: var(--q11-soft);
  border-radius: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  color: var(--navy);
}

.q11-pre {
  margin: 0;
  min-width: 0;
  font-family: var(--q11-mono);
  font-size: 20px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--navy);
  white-space: pre;
}

.q11-code-note {
  margin: 10px 0 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--navy);
}

.q11-footnote {
  margin: 12px 0 0;
  min-height: 48px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.q11-result {
  margin-top: auto;
  min-height: 92px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--q11-result) ease-out, transform var(--q11-result) ease-out;
}

.q11-result.is-on {
  opacity: 1;
  transform: none;
}

.q11-compare [data-q11-candidate-a] .q11-result {
  transition-delay: 0ms;
}

.q11-compare [data-q11-candidate-b] .q11-result {
  transition-delay: 90ms;
}

.q11-compare [data-q11-candidate-c] .q11-result {
  transition-delay: 180ms;
}

.q11-result-code {
  margin: 0;
  font-family: var(--q11-mono);
  font-size: 24px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.q11-pass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--q11-pass-soft);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--pass);
  white-space: nowrap;
}

.q11-pass-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  overflow: visible;
}

.q11-pass-icon circle,
.q11-pass-icon path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.q11-pass-icon circle {
  stroke-width: 1.5;
}

.q11-pass-icon path {
  stroke-width: 2;
}

.q11-compare-foot {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 28px;
}

.q11-legend {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  white-space: nowrap;
}

.q11-state-note {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--navy);
}

.q11-source {
  margin: 0 0 0 auto;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

.is-instant .q11-panel,
.is-instant .q11-card,
.is-instant .q11-result {
  transition: none !important;
}

/* 手机自然文档流 */

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

.q11-m-title {
  margin: 6px 0 0;
  font-size: 30px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

.q11-m-contract {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  margin: 12px 0 0;
  padding: 7px 12px;
  border: 1px solid var(--q11-gold-line);
  border-radius: 999px;
  background: var(--q11-soft);
  font-size: 16px;
  line-height: 1.5;
  color: var(--navy);
}

.q11-m-contract code {
  font-family: var(--q11-mono);
  font-size: 0.95em;
  color: var(--navy);
}

.q11-m-state {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.q11-m-panel {
  margin-top: 18px;
  min-width: 0;
}

.q11-m-inputcard,
.q11-m-option,
.q11-m-resolution,
.q11-m-strip,
.q11-m-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.q11-m-inputcard {
  padding: 16px;
}

.q11-m-label {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.q11-m-big-code {
  margin: 6px 0;
  font-family: var(--q11-mono);
  font-size: 40px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--navy);
}

.q11-m-copy {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}

.q11-m-options-title {
  margin: 18px 0 10px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q11-m-options {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.q11-m-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px;
}

.q11-m-option.is-chosen {
  border: 2px solid var(--gold);
}

.q11-m-option-code {
  margin: 0;
  font-family: var(--q11-mono);
  font-size: 30px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--navy);
}

.q11-m-option-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q11-m-option-note {
  margin: 0;
  min-height: 24px;
  display: flex;
  align-items: center;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.q11-m-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.q11-m-options-foot {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.q11-m-resolution {
  margin: 16px 0 0;
  padding: 14px 16px;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--navy);
}

.q11-m-resolution code {
  font-family: var(--q11-mono);
  font-size: 0.95em;
  color: var(--navy);
}

.q11-m-resolution span {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--muted);
}

.q11-m-strip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  min-width: 0;
}

.q11-m-strip-label {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}

.q11-m-strip-value {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.q11-m-strip-value code {
  font-family: var(--q11-mono);
  font-size: 0.9em;
  color: var(--navy);
}

.q11-m-card {
  margin-top: 12px;
  padding: 14px;
  min-width: 0;
}

.q11-m-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.q11-m-letter {
  flex: 0 0 auto;
  font-family: var(--q11-mono);
  font-size: 30px;
  line-height: 1;
  font-weight: 600;
  color: var(--gold);
}

.q11-m-card-titles {
  min-width: 0;
}

.q11-m-card-role {
  margin: 0 0 1px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.q11-m-card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q11-m-code {
  margin-top: 10px;
  padding: 10px 12px;
  max-width: 100%;
  background: var(--q11-soft);
  border-radius: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  color: var(--navy);
}

.q11-m-pre {
  margin: 0;
  min-width: 0;
  font-family: var(--q11-mono);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
  color: var(--navy);
  white-space: pre;
}

.q11-m-code-note {
  margin: 8px 0 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--navy);
}

.q11-m-footnote {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.q11-m-result {
  min-height: 76px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.q11-m-result:empty {
  visibility: hidden;
}

.q11-m-result-code {
  margin: 0;
  font-family: var(--q11-mono);
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.q11-m-pass {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 6px 0 0;
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--q11-pass-soft);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--pass);
}

.q11-m .q11-pass-icon {
  width: 16px;
  height: 16px;
}

.q11-m-legend {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.q11-m-note {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--navy);
}

.q11-m-source {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

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

@media (prefers-reduced-motion: reduce) {
  .q11-panel,
  .q11-panel.is-on,
  .q11-card,
  .q11-result {
    transition: none !important;
  }
}
