/* Q09 · 没写出来，不等于没有中间计算 */

.q09 {
  --q09-motion: 200ms;
  --q09-gold-tint: #fbf3e4;
  --q09-gold-ink: #7a5616;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}

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

.q09-head h1 {
  margin: 0;
  max-width: none;
  font-size: 40px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

.q09-source {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.q09-source span {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

.q09-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 36px;
  padding-top: 20px;
}

.q09-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.q09-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.q09-field-label {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.q09-lock {
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--q09-gold-ink);
}

.q09-answer-hint {
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.q09-prompt {
  display: flex;
  align-items: center;
  min-height: 100px;
  padding: 16px 20px;
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: 14px;
  font-size: 28px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

.q09-answer {
  display: flex;
  align-items: center;
  min-height: 98px;
  padding: 12px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color var(--q09-motion) ease-out, background-color var(--q09-motion) ease-out;
}

.q09-answer-text {
  font-size: 44px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

.q09.is-intervened[data-q09-phase="respond"] .q09-answer,
.q09.is-intervened[data-q09-phase="stable"] .q09-answer {
  border-color: var(--gold);
  background: var(--q09-gold-tint);
}

.q09-geo {
  margin-top: 2px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  transition: border-color var(--q09-motion) ease-out, background-color var(--q09-motion) ease-out;
}

.q09-geo.is-corner {
  background: transparent;
  border-style: dashed;
}

.q09-geo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--navy);
}

.q09-geo-note {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--q09-gold-ink);
}

.q09-geo-chain {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.q09-geo-chain li {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
}

.q09-geo-chain strong {
  font-weight: 600;
  color: var(--navy);
}

.q09-geo-chain li span {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.q09-geo-arrow {
  color: var(--muted);
  font-size: 15px;
}

.q09-mech {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.q09-mech-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.q09-mech-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.q09-mech-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q09-mech-title p {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}

.q09-state-tag {
  margin: 0;
  max-width: 520px;
  font-size: 17px;
  line-height: 1.45;
  text-align: right;
  color: var(--muted);
}

.q09-state-tag.is-alert {
  font-weight: 600;
  color: var(--navy);
}

.q09-graph-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4px;
}

.q09-graph {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: visible;
}

.q09-graph text {
  font-family: var(--font-sans);
}

.q09-empty,
.q09-live,
.q09-direct,
.q09-intervention,
.q09-legend,
.q09-legend-direct {
  transition: opacity var(--q09-motion) ease-out, visibility 0s linear var(--q09-motion);
}

.q09-empty.is-hidden,
.q09-live.is-hidden,
.q09-direct.is-hidden,
.q09-intervention.is-hidden,
.q09-legend.is-hidden,
.q09-legend-direct.is-hidden {
  opacity: 0;
  visibility: hidden;
}

/* SVG groups have fixed viewBox slots. Remove hidden groups from paint to avoid
   stale inherited visibility after b0→b1; object identity remains mounted. */
/* Mechanism motion is owned by the cancellable RAF timeline. */
.q09 .q09-graph g,
.q09 .q09-graph path {
  transition: none;
}

.q09-graph g.is-hidden {
  display: none;
}

.q09-node rect {
  fill: var(--white);
  stroke: var(--line);
  stroke-width: 1.5;
}

.q09-node-state rect {
  stroke: var(--navy);
}

.q09.is-intervened:not([data-q09-phase="suppress"]) .q09-node-state rect {
  fill: var(--q09-gold-tint);
  stroke: var(--gold);
}

.q09-node-kicker {
  fill: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.q09-node-title {
  fill: var(--navy);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0;
}

.q09-node-sub {
  fill: var(--muted);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.q09-variant {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--q09-motion) ease-out, visibility 0s linear var(--q09-motion);
}

.q09-variant.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--q09-motion) ease-out, visibility 0s;
}

.q09-edge-main {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.q09-edge-direct {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.q09-edge-intervene {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
}

.q09-edge-label {
  fill: var(--q09-gold-ink);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.q09-intervene-box {
  fill: var(--q09-gold-tint);
  stroke: var(--gold);
  stroke-width: 1.5;
}

.q09-intervene-text {
  fill: var(--navy);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.q09-arrow-mark-main {
  fill: var(--navy);
}

.q09-arrow-mark-direct,
.q09-arrow-mark-intervene {
  fill: var(--gold);
}

.q09-main-path path {
  transition: opacity var(--q09-motion) ease-out, visibility 0s linear var(--q09-motion);
}

.q09-main-path path.is-off {
  opacity: 0;
  visibility: hidden;
}

.q09-empty-frame {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-dasharray: 8 8;
}

.q09-empty-mark {
  fill: var(--line);
  font-size: 76px;
  line-height: 1;
  font-weight: 300;
}

.q09-empty-text {
  fill: var(--muted);
  font-size: 22px;
  line-height: 1.4;
}

.q09-empty-sub {
  fill: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

.q09-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  min-height: 36px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

.q09-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.q09-legend-item svg {
  width: 40px;
  height: 10px;
  flex: 0 0 auto;
  overflow: visible;
}

.q09-legend-line-main {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.5;
}

.q09-legend-head-main {
  fill: var(--navy);
}

.q09-legend-line-direct {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
}

.q09-legend-head-direct {
  fill: var(--gold);
}

.q09-caption {
  margin: 0;
  min-height: 32px;
  padding-top: 4px;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--q09-gold-ink);
}

.q09-caption:empty {
  visibility: hidden;
}

.q09-conclusion {
  margin: 0;
  min-height: 50px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 28px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

/* 手机文档流 */

.q09-m {
  --q09-motion: 200ms;
  --q09-gold-tint: #fbf3e4;
  --q09-gold-ink: #7a5616;
  color: var(--ink);
}

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

.q09-m-source {
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.q09-m-prompt-block,
.q09-m-answer-block {
  margin-bottom: 18px;
}

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

.q09-m-prompt {
  padding: 14px 16px;
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: 12px;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

.q09-m-answer {
  display: flex;
  align-items: center;
  min-height: 78px;
  padding: 10px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color var(--q09-motion) ease-out, background-color var(--q09-motion) ease-out;
}

.q09-m-answer span {
  font-size: 34px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

.q09-m.is-intervened[data-q09m-phase="respond"] .q09-m-answer,
.q09-m.is-intervened[data-q09m-phase="stable"] .q09-m-answer {
  border-color: var(--gold);
  background: var(--q09-gold-tint);
}

.q09-m-geo {
  margin: 0 0 26px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.q09-m-geo-title {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--navy);
}

.q09-m-geo-title span {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--q09-gold-ink);
}

.q09-m-geo-chain {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.q09-m-geo-chain li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.q09-m-geo-chain strong {
  font-weight: 600;
  color: var(--navy);
}

.q09-m-geo-chain li span {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.q09-m-geo-arrow {
  color: var(--muted);
  font-size: 13px;
}

.q09-m-mech {
  margin: 0 0 26px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.q09-m-mech-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.q09-m-mech-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q09-m-state-tag {
  margin: 0;
  max-width: 60%;
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
  color: var(--muted);
}

.q09-m-state-tag.is-alert {
  font-weight: 600;
  color: var(--navy);
}

.q09-m-empty {
  margin: 12px 0 0;
  padding: 18px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.q09-m-graph {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: 12px;
}

.q09-m-node {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.q09-m-node strong {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q09-m-node span:last-child {
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.q09-m-node-kicker {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.q09-m.is-intervened:not([data-q09m-phase="suppress"]) [data-q09m-feature-state] {
  border-color: var(--gold);
  background: var(--q09-gold-tint);
}

.q09-m-connector {
  position: relative;
  width: 2px;
  height: 24px;
  margin-left: 24px;
  background: var(--navy);
}

.q09-m-connector::after {
  content: "";
  position: absolute;
  left: -4px;
  bottom: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--navy);
}

.q09-m-intervention {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 8px 0 18px 24px;
  padding: 8px 12px;
  background: var(--q09-gold-tint);
  border: 1px solid var(--gold);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--navy);
}

.q09-m-intervention small {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--muted);
}

.q09-m-intervention::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: -10px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid var(--gold);
}

.q09-m-direct {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--q09-gold-ink);
}

.q09-m-legend {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.q09-m-caption {
  margin: 8px 0 0;
  min-height: 20px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--q09-gold-ink);
}

.q09-m-caption:empty {
  visibility: hidden;
}

.q09-m-conclusion {
  margin: 0 0 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 22px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

.q09-m-node,
.q09-m-connector,
.q09-m-intervention,
.q09-m-direct {
  transition: opacity var(--q09-motion) ease-out;
}

.q09-m[data-q09m-phase="suppress"] .q09-m-connector,
.q09-m[data-q09m-phase="suppress"] .q09-m-direct {
  opacity: 0.35;
}

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

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