/* A deliberately still diagram. Movement is owned by one finite JS timeline. */
.attack-story {
  padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(24px, 3vw, 40px);
}
.demo-player {
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.demo-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}
.demo-head h2 {
  font-size: clamp(30px, 2.8vw, 44px);
  line-height: 1.1;
}
.demo-disclosure {
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
}
.demo-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.demo-tabs button {
  position: relative;
  padding: 0 0 15px;
  text-align: left;
  font-size: 14px;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
  transition: color 0.45s var(--ease-move);
}
.demo-tabs button[aria-selected="true"] {
  color: var(--ink);
}
.demo-tabs button.is-queued {
  color: var(--ink-2);
}
.demo-tabs button.is-queued::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 22px;
  height: 1px;
  background: var(--ink-3);
}
.demo-tabs button:hover {
  color: var(--ink);
}
.demo-content {
  display: grid;
  grid-template-columns: minmax(230px, 0.68fr) minmax(0, 2fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  min-height: 470px;
  padding: 36px 0 30px;
}
.demo-narrative h3 {
  font-size: clamp(30px, 2.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.022em;
}
.demo-narrative p {
  max-width: 30ch;
  margin-top: 22px;
  font: 400 18px/1.55 var(--serif);
  color: var(--ink-2);
}
.demo-narrative [role="tabpanel"]:focus-visible {
  outline: 1px solid var(--green);
  outline-offset: 10px;
}
.demo-viewport {
  width: 100%;
  min-width: 0;
}
.demo-drawing {
  width: 100%;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: #b9b6aa;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.demo-drawing text {
  stroke: none;
  fill: var(--ink-2);
  font: 13px var(--sans);
}
.demo-drawing .dp-label {
  fill: var(--ink);
  font-size: 15px;
}
.demo-drawing .dp-small {
  font: 11px var(--mono);
  fill: var(--ink-3);
}
.dp-centred {
  text-anchor: middle;
}
.dp-grid,
.dp-mesh,
.dp-perimeter,
.dp-outline,
.dp-nodes {
  stroke: none;
}
.dp-grid {
  filter: url(#ink-grain-soft);
}
.dp-grid path {
  fill: #ece9df;
  opacity: 0.05;
}
.dp-grid path.strong {
  opacity: 0.08;
}
.dp-mesh {
  filter: url(#ink-grain);
}

.dp-perimeter {
  filter: url(#ink-grain);
}
.dp-perimeter-dash {
  fill: var(--red-text);
  opacity: 0.55;
}
.dp-outline {
  filter: url(#ink-grain-soft);
}
.dp-outline-ink {
  fill: #d9d5c8;
}
.dp-actor {
  filter: brightness(0) invert(1);
  opacity: 0.66;
}
.dp-surface {
  fill: #141512;
  stroke: none;
}
.dp-rule {
  stroke: #3a3b35;
}
.dp-window-dot {
  fill: #6c6b63;
  stroke: none;
}
.demo-drawing .dp-command text {
  font: 14px var(--mono);
  fill: var(--ink);
}
.dp-command .dp-prompt {
  fill: var(--green) !important;
}
.dp-cursor {
  fill: var(--green);
  stroke: none;
}
.dp-route {
  fill: none;
  stroke: var(--red-text);
  stroke-width: 1.8;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.dp-link {
  fill: #ece9df;
  opacity: 0.17;
}
.dp-node-ring {
  fill: var(--ground);
  stroke: #9d9b91;
  stroke-width: 1.1;
}
.dp-node-core {
  fill: #c9c5b8;
  stroke: none;
}
.dp-hop {
  fill: none;
  stroke: var(--red-text);
  stroke-width: 1.4;
  opacity: 0;
}
.demo-player[data-scene="3"] .dp-hop {
  stroke: var(--green-text);
}
.dp-packet {
  opacity: 0;
}
.dp-packet-glow {
  fill: url(#dp-packet-glow);
  stroke: none;
}
.dp-packet-core {
  fill: #f1f8f1;
  stroke: none;
}
.dp-screen {
  fill: #0a0b09;
  stroke: none;
}
.dp-camera {
  fill: #45463f;
  stroke: none;
}
.dp-hatch,
.dp-rail {
  fill: #ece9df;
  opacity: 0.22;
}
.demo-drawing .dp-dump text {
  font: 10px var(--mono);
  fill: var(--ink-3);
}
.dp-firewall .dp-surface {
  fill: #171814;
}
.dp-fw-led {
  stroke: none;
}
.dp-fw-vent {
  stroke: #6c6b63;
  stroke-width: 1;
}
.dp-bubble-rule {
  stroke: var(--red-text);
  stroke-opacity: 0.45;
}
/* Your systems: a monitor showing your web portal in a browser. */
.dp-monitor .dp-surface {
  fill: #161713;
}
.dp-stand {
  fill: #161713;
  stroke: #d9d5c8;
  stroke-opacity: 0.7;
  stroke-width: 1.1;
}
.dp-tabbar {
  fill: #0e0f0c;
  stroke: none;
}
.dp-tab,
.dp-toolbar {
  fill: #22231f;
  stroke: none;
}
.dp-favicon {
  fill: #c9c5b8;
  stroke: none;
}
.demo-drawing .dp-tab-title {
  font: 9.5px var(--sans);
  fill: var(--ink-2);
}
.dp-tab-glyph {
  stroke: #8f8d83;
  stroke-width: 1.1;
}
.dp-address {
  fill: #121310;
  stroke: #3e3f38;
  stroke-width: 0.8;
}
.dp-lock rect {
  fill: #8f8d83;
  stroke: none;
  transition: fill 0.5s var(--ease-move);
}
.dp-lock path {
  fill: none;
  stroke: #8f8d83;
  stroke-width: 1.1;
  transition: stroke 0.5s var(--ease-move);
}
.dp-lock.is-secure rect {
  fill: var(--green);
}
.dp-lock.is-secure path {
  stroke: var(--green);
}
.demo-drawing .dp-url {
  font: 9.5px var(--mono);
  fill: var(--ink-2);
}
.dp-page {
  stroke: none;
}
.dp-page-mark {
  fill: #d9d5c8;
}
.dp-page-nav {
  stroke: #8f8d83;
  stroke-width: 1.6;
}
.dp-page-title {
  stroke: #ece9df;
  stroke-opacity: 0.7;
  stroke-width: 3.2;
}
.dp-page-button {
  fill: var(--green);
  opacity: 0.75;
}
.dp-card {
  fill: #171814;
  stroke: #ece9df;
  stroke-opacity: 0.26;
  stroke-width: 0.9;
}
.dp-card-line {
  stroke: #ece9df;
  stroke-opacity: 0.38;
  stroke-width: 1.4;
}
.dp-cards-hit {
  opacity: 0;
}
.dp-cards-hit rect {
  fill: rgb(220 114 118 / 0.08);
  stroke: var(--red-text);
  stroke-width: 1.3;
}
/* A stoic blue screen: the sign that work has stopped. */
.dp-bluescreen {
  opacity: 0;
}
.dp-bluescreen rect {
  fill: #2356a6;
  stroke: none;
}
.demo-drawing .dp-frown {
  font: 300 30px var(--sans);
  fill: #eef3fb;
}
.dp-bsod-text {
  stroke: #dce7f8;
  stroke-opacity: 0.85;
  stroke-width: 3.4;
}
.dp-file {
  fill: #141512;
  stroke: #dbeedd;
  stroke-width: 1.15;
  opacity: 0;
}
.dp-receipt {
  opacity: 0;
  stroke: var(--green);
  stroke-width: 0.9;
}
.demo-drawing .dp-receipt text {
  font: 11px var(--mono);
  fill: var(--green-text);
}
.dp-greeting {
  opacity: 0;
}
.dp-bubble {
  stroke: var(--red-text);
  stroke-opacity: 0.8;
  fill: #1d1213;
}
.demo-drawing .dp-greeting text {
  fill: #f0d4d4;
  font: 12px var(--mono);
}
.dp-service {
  stroke: none;
}
.dp-service circle {
  fill: var(--green);
}
.demo-drawing .dp-service text {
  font: 12px var(--sans);
  fill: var(--green-text);
}
.dp-shield {
  opacity: 0;
}
.dp-shield > path {
  fill: #ebe8de;
  stroke: var(--green);
  stroke-width: 1.2;
}
.dp-blocked {
  opacity: 0;
  stroke: var(--green);
}
.dp-label-ground {
  fill: var(--ground);
  stroke: none;
}
.demo-drawing .dp-blocked text {
  font: 11px var(--mono);
  fill: var(--green-text);
  text-anchor: middle;
}
.demo-progress {
  height: 1px;
  background: var(--rule);
  overflow: hidden;
}
.demo-progress > i {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink-2);
  transform: scaleX(0);
  transform-origin: left;
}
.demo-transport {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 66px;
  padding-top: 22px;
}
.demo-playback {
  display: flex;
  align-items: center;
  gap: 24px;
}
.demo-replay {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--ink-2);
  transition: color 0.25s;
}
.demo-replay span {
  font-size: 18px;
  line-height: 1;
}
.demo-replay:hover:not(:disabled) {
  color: var(--ink);
}
.demo-replay:disabled {
  color: var(--ink-3);
  opacity: 0.55;
}
.demo-status {
  font: 12px/1.6 var(--mono);
  color: var(--ink-3);
}
/* Results already appear in the diagram. Announce them without another label. */
.demo-player:not([data-queued]) .demo-status,
.demo-player[data-queued=""] .demo-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.demo-arrows {
  display: flex;
  gap: 8px;
}
.demo-arrows button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  transition:
    background 0.25s,
    border-color 0.25s,
    opacity 0.25s;
}
.demo-arrows button:hover:not(:disabled) {
  background: var(--ground-3);
  border-color: rgb(236 233 223 / 0.36);
}
.demo-arrows button:disabled {
  opacity: 0.3;
}
.demo-next {
  min-width: 168px;
}
.demo-next-label {
  font-size: 13px;
}
@media (max-width: 1050px) {
  .demo-content {
    grid-template-columns: minmax(200px, 0.7fr) minmax(0, 1.6fr);
    gap: 24px;
    min-height: 400px;
  }
  .demo-tabs {
    gap: 18px;
  }
}
@media (max-width: 900px) {
  .demo-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    padding: 30px 0 12px;
  }
  .demo-narrative {
    width: 100%;
    min-height: 150px;
  }
  .demo-narrative h3 br {
    display: none;
  }
  .demo-narrative p {
    max-width: 44ch;
  }
  .demo-viewport {
    margin-top: 18px;
  }
}
@media (max-width: 760px) {
  .attack-story {
    padding-inline: 20px;
  }
  .demo-player {
    padding-top: 28px;
  }
  .demo-head {
    flex-direction: column;
    gap: 10px;
  }
  .demo-tabs {
    gap: 12px;
    margin-top: 28px;
  }
  .demo-tabs button {
    padding-bottom: 12px;
    font-size: 12.5px;
  }
  .demo-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    padding: 30px 0 12px;
  }
  .demo-narrative {
    width: 100%;
    min-height: 168px;
  }
  .demo-narrative h3 {
    font-size: 30px;
  }
  .demo-narrative h3 br {
    display: none;
  }
  .demo-narrative p {
    margin-top: 16px;
    font-size: 17px;
    max-width: 40ch;
  }
  .demo-viewport {
    width: calc(100% + 24px);
    margin: 4px -12px 0;
  }
  .dp-grid {
    display: none;
  }
  /* 601–760px still uses the wide drawing: larger labels, fewer small words. */
  .demo-player:not(.is-tall) .demo-drawing .dp-label {
    font-size: 20px;
  }
  .demo-player:not(.is-tall) .demo-drawing :is(.dp-small, .dp-tab-title, .dp-url) {
    display: none;
  }
  .demo-transport {
    gap: 14px;
    padding-top: 18px;
    align-items: flex-start;
  }
  .demo-playback {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .demo-status {
    max-width: 120px;
    min-height: 30px;
    font-size: 11px;
  }
  .demo-arrows {
    gap: 6px;
  }
  .demo-arrows button {
    gap: 16px;
    padding-inline: 13px;
  }
  .demo-next {
    min-width: 136px;
  }
}
@media (max-width: 360px) {
  .demo-tabs {
    gap: 8px;
  }
  .demo-tabs button {
    font-size: 11px;
  }
  .demo-next {
    min-width: 112px;
  }
  .demo-arrows button {
    gap: 9px;
    padding-inline: 10px;
  }
  .demo-status {
    max-width: 90px;
  }
}

/* One underline slides between tabs, as in the reference. */
.tab-ink {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  pointer-events: none;
}
.tab-ink.is-ready {
  transition:
    transform 0.62s var(--ease-move),
    width 0.62s var(--ease-move);
}
.motion-off .tab-ink {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .tab-ink {
    transition: none !important;
  }
}
