.doom-demo { color: #253f43; }
.doom-flow { display: block; width: 100%; max-width: 46rem; height: auto; margin: 0 auto 1rem; }
.doom-connector { fill: none; stroke: #617e76; stroke-width: 3; }
.doom-repeat-path { stroke-dasharray: 7 5; }
.doom-node rect { fill: #f2f5ed; stroke: #b8cbbd; stroke-width: 2; }
.doom-node.is-active rect { fill: #fbe7c9; stroke: #ac6338; stroke-width: 3; }
.doom-node-title { font: 600 19px system-ui, sans-serif; fill: #253f43; }
.doom-node-detail, .doom-route-label { font: 16px system-ui, sans-serif; fill: #46635e; }
.doom-small-label { font: 14px system-ui, sans-serif; fill: #46635e; }
.doom-node.is-muted, .doom-connector.is-muted, .doom-route-label.is-muted { opacity: .38; }
.doom-context { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; border: 1px solid #b8cbbd; border-radius: 1rem; background: #fff9ee; padding: 1.1rem; }
.doom-context h3 { margin: .2rem 0 .5rem; font-size: 1.2rem; }
.doom-context p { margin: 0; line-height: 1.6; }
.doom-eyebrow { display: block; color: #48665b; font-size: .85rem; font-weight: 650; }
.doom-format-label { flex-shrink: 0; max-width: 10rem; padding: .45rem .7rem; background: #e4eee4; border-radius: .8rem; color: #35594a; font-size: .85rem; line-height: 1.4; }
.doom-expectation { padding: .2rem .75rem; border-left: 3px solid #c08c50; line-height: 1.6; }
.doom-card, .doom-reflection, .doom-ending { border: 1px solid #c0cfc3; border-radius: 1rem; padding: 1.1rem; margin: .8rem 0; }
.doom-card { background: #fffef9; border-top: 4px solid #6d9990; }
.doom-card h3, .doom-reflection h3, .doom-ending h3 { margin: .3rem 0 .5rem; font-size: 1.1rem; line-height: 1.35; }
.doom-card p, .doom-reflection p, .doom-ending p { margin: 0; line-height: 1.6; }
.doom-reflection { background: #f9edda; border-color: #d8bd8f; }
.doom-ending { background: #eef0e9; }
.doom-ending[data-cue="true"] { background: #e4eee4; border-color: #81a88a; }
.doom-summary { padding: 1rem 1.1rem; border-left: 4px solid #b77843; border-radius: 0 .6rem .6rem 0; background: #fff5e4; line-height: 1.6; }
.doom-metrics { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin: .9rem 0 1.2rem; }
.doom-metrics div { display: grid; gap: .3rem; }
.doom-metrics dt { color: #50695e; font-size: .85rem; }
.doom-metrics dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.doom-history-panel { padding: .85rem 1rem; background: #f4f5ed; border: 1px solid #c0cfc3; border-radius: .75rem; }
.doom-history-panel summary { font-weight: 650; cursor: pointer; }
.doom-history { padding: 0 0 0 1.25rem; margin: .7rem 0 0; }
.doom-history li { padding: .5rem 0; }
.doom-history p { margin: .3rem 0 0; line-height: 1.55; font-size: .9rem; }
.doom-risk { margin-top: 1.2rem; padding-top: .9rem; border-top: 1px solid #c0cfc3; }
.doom-risk h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
.doom-risk p { margin: 0; color: #46635e; line-height: 1.6; font-size: .95rem; }
.doom-controls label, .doom-controls select { max-width: 100%; }
.doom-controls button { border-color: #9a603f; }
body[data-motion="step"] .doom-node.is-active rect,
body[data-motion="play"] .doom-node.is-active rect { animation: doom-arrival 350ms ease-out 1; }
@keyframes doom-arrival { from { fill: #fffef9; } to { fill: #fbe7c9; } }
@media (max-width: 700px) {
  .doom-context { flex-direction: column; gap: .65rem; }
  .doom-format-label { max-width: 100%; }
  .doom-card, .doom-reflection, .doom-ending { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-motion] .doom-node.is-active rect { animation: none; }
}
