.attention-demo { color: #203c42; }
.attention-flow { display: block; width: 100%; max-width: 43rem; height: auto; margin: 0 auto 1rem; }
.attention-connector { fill: none; stroke: #64867c; stroke-width: 3; }
.attention-stage rect { fill: #f2f5ed; stroke: #b7cbbd; stroke-width: 2; }
.attention-stage.is-active rect { fill: #fbe7c9; stroke: #ad602f; stroke-width: 3; }
.attention-stage-name { font: 600 20px system-ui, sans-serif; fill: #203c42; }
.attention-stage-detail, .attention-loop-label { font: 16px system-ui, sans-serif; fill: #405f5d; }
.attention-current { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.2rem; border: 1px solid #b7cbbd; border-radius: 1.1rem; background: #fff9ee; }
.attention-current h3 { margin: .25rem 0 .4rem; font-size: 1.25rem; line-height: 1.35; }
.attention-current p { margin: 0; }
.attention-eyebrow { display: block; margin: .7rem 0 .35rem; font-size: .85rem; font-weight: 650; color: #516c65; }
.attention-current .attention-eyebrow { margin: 0; }
.attention-duration { flex-shrink: 0; border-radius: 1rem; padding: .4rem .7rem; font-size: .85rem; background: #e6efe7; white-space: nowrap; }
.attention-readouts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin: 1rem 0; }
.attention-card { min-width: 0; padding: 1.15rem; border: 1px solid #c2d0c6; border-radius: 1rem; background: #fffef9; }
.attention-card h3 { margin: 0 0 .8rem; font-size: 1.05rem; }
.attention-card p { margin: .5rem 0; line-height: 1.55; }
.attention-viewer { border-top: 4px solid #ce8c55; }
.attention-algorithm { border-top: 4px solid #6f9d9a; }
.attention-quote { padding-left: .75rem; border-left: 3px solid #dcb583; }
.attention-small { color: #4d625f; font-size: .88rem; line-height: 1.55; }
.attention-reward-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border-top: 1px solid #d9e1d8; margin-top: 1rem; padding-top: .8rem; }
.attention-reward-row strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.attention-reward-row small { color: #4d625f; }
.attention-formula { display: block; padding: .6rem .75rem; margin-top: .7rem; border-radius: .5rem; background: #edf2ec; white-space: normal; overflow-wrap: anywhere; font-size: .88rem; }
.attention-scores { display: grid; gap: .75rem; margin: 1rem 0; }
.attention-score-row { display: grid; grid-template-columns: 5.4rem minmax(3rem, 1fr) 3.8rem; align-items: center; gap: .75rem; }
.attention-score-row meter { width: 100%; height: 1.2rem; accent-color: #527e72; }
.attention-score-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.attention-explanation { padding: 1rem 1.1rem; border-left: 4px solid #b57642; background: #fbf0dc; border-radius: 0 .6rem .6rem 0; line-height: 1.6; }
.attention-metrics { display: flex; flex-wrap: wrap; gap: 1.5rem; padding: .4rem 0 1rem; }
.attention-metrics div { display: grid; gap: .3rem; }
.attention-metrics span { color: #516c65; font-size: .85rem; }
.attention-metrics strong { font-size: 1rem; }
.attention-history-panel { padding: .8rem 1rem; border: 1px solid #c2d0c6; border-radius: .75rem; background: #f5f6ee; }
.attention-history-panel summary { cursor: pointer; font-weight: 650; }
.attention-history { list-style: none; padding: 0; margin: .8rem 0 0; }
.attention-history li { border-top: 1px solid #d5dfd3; padding: .6rem 0; }
.attention-history li p { margin: .25rem 0 0; font-size: .9rem; }
.attention-controls label { max-width: 100%; }
.attention-controls select { max-width: 100%; }
.attention-controls button { border-color: #9a5c3f; }
body[data-motion="step"] .attention-stage.is-active rect,
body[data-motion="play"] .attention-stage.is-active rect { animation: attention-arrival 400ms ease-out 1; }
@keyframes attention-arrival { from { fill: #fffdf7; } to { fill: #fbe7c9; } }
@media (max-width: 700px) {
  .attention-readouts { grid-template-columns: minmax(0, 1fr); }
  .attention-current { flex-direction: column; gap: .7rem; }
  .attention-card { padding: 1rem; }
  .attention-score-row { gap: .5rem; grid-template-columns: 5.1rem minmax(2rem, 1fr) 3.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-motion] .attention-stage.is-active rect { animation: none; }
}
