/* Explain the same path twice: first as an attack, then as a defense test. */
.story-grid { grid-template-columns: .86fr 1.14fr; gap: 64px; }
.story-copy { padding-bottom: 12px; }
.story-copy h2 { line-height: 1.3; }
.story-copy > p.story-principle {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #273343;
  color: #8598b2;
  font-size: 14px;
  line-height: 1.9;
}
.story-principle span { display: block; margin-top: 12px; color: #c1d1e8; }
.attack-demo {
  --attack-progress: 0;
  min-width: 0;
  overflow: hidden;
  background: #0a1a2d;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.attack-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 22px;
  border-bottom: 1px solid #233d58;
  background: #10243a;
}
.attack-toolbar > span { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #cbd9ee; }
.attack-toolbar i { width: 5px; height: 5px; border-radius: 50%; background: #abc9f6; }
.attack-toolbar > .attack-context { color: #a1b0c4; font-size: 12px; letter-spacing: .03em; }
.attack-scene { padding: 18px 8px 8px; }
.attack-graph { width: 100%; max-width: 540px; height: auto; margin-inline: auto; overflow: visible; }
.attack-constellation path { fill: none; stroke: #709cca; stroke-width: .6; opacity: .17; }
.attack-constellation circle { fill: #badcff; opacity: .3; }
.attack-graph text { fill: #c9d4e4; font-family: var(--font); font-size: 13px; }
.attack-graph .attack-lane-title { fill: #edf2f8; font-size: 17px; font-weight: 500; }
.attack-graph .attack-lane-tag { fill: #9aabc2; font-size: 12px; }
.attack-graph .attack-defense-title { fill: #b4d1ff; }
.attack-track { fill: none; stroke: #273449; stroke-width: 1.5; stroke-dasharray: 4 5; }
.attack-route { fill: none; stroke: var(--offense); stroke-width: 1.5; }
.attack-defense-route { fill: none; stroke: #a6c8ff; stroke-width: 1.8; }
.attack-replay-wire { fill: none; stroke: #6f8eb9; stroke-width: 1; }
.attack-graph .attack-replay-label { fill: #a1b3cc; font-size: 12px; }
.attack-divider { stroke: #1e2a3b; fill: none; }
.attack-entry > circle,
.attack-identity > circle:first-child,
.attack-business > rect { fill: #172232; stroke: #8c9fba; stroke-width: 1.2; }
.attack-entry > path,
.attack-identity > path,
.attack-business > path,
.attack-glyph { fill: none; stroke: #d9e6f8; stroke-width: 1.4; stroke-linecap: round; }
.attack-unknown { display: none; }
.attack-unknown circle { fill: #111a29; stroke: #526b8e; stroke-dasharray: 3 4; }
.attack-unknown > text { fill: #95b3df; font-size: 21px; }
.attack-unknown .attack-question { fill: #8e9eb7; font-size: 11px; }
.attack-risk rect { fill: #1b2737; }
.attack-risk text { fill: #c2d0e2; font-size: 12px; }
.attack-graph .attack-lane-title:not(.attack-defense-title) { fill: #f0c0bd; }
.attack-entry > circle { fill: #231a20; stroke: #bc767b; }
.attack-defense-node > circle:first-child { fill: #13233b; stroke: #94b8ed; }
.attack-defense-node > path { fill: none; stroke: #b5d1fa; stroke-width: 1.3; }
.attack-barrier .attack-stop-line { stroke: #bad5ff; stroke-width: 3; stroke-linecap: round; }
.attack-barrier rect { fill: #a6c8ff; }
.attack-barrier text { fill: #0a1628; font-size: 11px; font-weight: 600; }
.attack-protected > path:first-child { fill: #182b46; stroke: #abcfff; stroke-width: 1.3; }
.attack-protected .attack-check { fill: none; stroke: #cee2ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.attack-graph [data-attack-from] { transition: opacity .6s ease, stroke .6s ease; }
/* Keep the full route readable at every point in the loop. Only emphasis moves. */
.attack-ready .attack-graph [data-attack-path] {
  opacity: .45;
  transition: opacity .6s ease;
}
.attack-ready .attack-graph [data-attack-path].is-reached { opacity: .8; }
.attack-ready .attack-graph [data-attack-path].is-current { opacity: 1; stroke-width: 2; }
.attack-entry.is-current > circle,
.attack-identity.is-current > circle:first-child,
.attack-business.is-current > rect { stroke: #f19596; fill: #2b1e25; }
.attack-defense-node.is-current > circle:first-child { stroke: #c8dfff; fill: #1c3557; }
.attack-protected.is-current > path:first-child { stroke: #d0e4ff; fill: #1e3c63; }
.attack-ready .attack-protected:not(.is-reached) .attack-check { opacity: 0; }
.attack-ready .attack-barrier:not(.is-reached) .attack-stop-line { opacity: .3; }
.attack-tracer { fill: none; stroke: #f2f7ff; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 4 96; stroke-dashoffset: 100; opacity: 0; }
.attack-tracer[data-attack-from="0"],
.attack-tracer[data-attack-from="1"] { stroke: #ffc1ba; }
.attack-tracer[data-attack-from="2"],
.attack-tracer[data-attack-from="3"] { stroke: #c3dbff; }
.attack-ready .attack-tracer.is-current { opacity: 1; animation: attack-trace 2.8s linear infinite; }
.attack-ready[data-playing="false"] .attack-tracer { animation-play-state: paused; }
.attack-ready[data-playing="false"] [data-attack-from],
.attack-ready[data-playing="false"] [data-attack-path],
.attack-ready[data-playing="false"] .attack-unknown { transition: none; }
.attack-caption { min-height: 128px; padding: 18px 22px; border-top: 1px solid #233d58; }
.attack-caption > span { display: block; margin-bottom: 7px; color: #a0bde8; font-size: 12px; font-variant-numeric: tabular-nums; }
.attack-caption strong { display: block; color: #e3ecf9; font-size: 17px; font-weight: 500; line-height: 1.5; }
.attack-caption p { margin: 7px 0 0; color: #a8b8cd; font-size: 14px; line-height: 1.8; }
.attack-takeaway {
  margin: 0;
  padding: 15px 22px;
  border-top: 1px solid #294561;
  background: #122b46;
  color: #c6d7ed;
  font-size: 14px;
  line-height: 1.8;
}
.attack-takeaway strong { color: #e4edf9; font-weight: 500; }
.attack-takeaway span { display: block; margin-bottom: 3px; font-size: 11px; letter-spacing: .04em; color: #9cbde3; }
.attack-steps { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #29394f; }
.attack-ready .attack-steps { display: grid; }
.attack-steps button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 58px;
  padding: 12px 6px;
  border: 0;
  border-right: 1px solid #1f2e43;
  background: #0a1a2d;
  color: #adbed6;
  font-size: 13px;
}
.attack-steps button:last-child { border-right: 0; }
.attack-steps b { color: #94afd2; font-size: 12px; font-weight: 400; }
.attack-steps button::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto;
  height: 2px;
  background: #a6c8ff;
  transform: scaleX(0);
  transform-origin: left;
}
.attack-steps button[aria-pressed="true"] { background: #18344f; color: #e2edfc; }
.attack-steps button[aria-pressed="true"]::before { transform: scaleX(var(--attack-progress)); }
.attack-steps button:hover { color: #edf5ff; }
.attack-demo button:focus-visible { outline: 2px solid #a6c8ff; outline-offset: -4px; }
.attack-demo figcaption { padding: 10px 22px; color: #9bacc4; font-size: 11px; border-top: 1px solid #233d58; }
@keyframes attack-trace { to { stroke-dashoffset: 0; } }
@media (max-width: 1100px) {
  .story-grid { grid-template-columns: .76fr 1.24fr; gap: 32px; }
  .story-copy h2 { font-size: clamp(3rem, 5.8vw, 4.5rem); }
  .attack-steps button { flex-direction: column; gap: 3px; }
}
@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; gap: 34px; }
  .story-copy > p.story-principle { display: none; }
  .attack-demo { width: 100%; max-width: 580px; margin: 0 auto; }
}
@media (max-width: 760px) {
  .story-copy h2 { font-size: clamp(2.9rem, 13vw, 3.8rem); }
  .story-copy > p:not(.section-index) { font-size: 17px; }
  .attack-toolbar { min-height: 48px; padding: 11px 14px; }
  .attack-toolbar > span { font-size: 12px; }
  .attack-scene { padding: 12px 4px 6px; }
  .attack-graph text { font-size: 17px; }
  .attack-graph .attack-lane-title { font-size: 20px; }
  .attack-graph .attack-lane-tag { font-size: 14px; }
  .attack-unknown .attack-question { font-size: 14px; }
  .attack-graph .attack-replay-label { font-size: 13px; }
  .attack-risk text { font-size: 12px; }
  .attack-barrier text { font-size: 13px; }
  .attack-caption { padding: 15px 17px; min-height: 133px; }
  .attack-caption strong { font-size: 15px; }
  .attack-caption p { font-size: 13px; }
  .attack-takeaway { padding: 12px 17px; font-size: 13px; }
  .attack-steps button { min-height: 62px; font-size: 12px; }
  .attack-demo figcaption { padding: 12px 15px; }
}
@media (min-width: 701px) and (max-width: 900px) {
  .attack-graph text { font-size: 15px; }
  .attack-graph .attack-lane-title { font-size: 18px; }
  .attack-caption { min-height: 143px; }
  .attack-caption strong { font-size: 15px; }
  .attack-steps button { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .attack-ready .attack-graph [data-attack-from],
  .attack-ready .attack-graph [data-attack-path],
  .attack-ready .attack-unknown { transition: none; }
  .attack-ready .attack-tracer { display: none; animation: none; }
}
