/* AM Infra uses the Polaris palette. These rules do not affect other pages. */
.infra { --infra-blue: #6ba3d6; --infra-warn: #d9a25f; color: var(--fg); overflow: clip; }
.infra .wrap { width: min(100% - 112px,1328px); max-width: none; margin-inline: auto; padding-inline: 0; }
.infra .infra-perimeter > .wrap { width: calc(100% - 56px); max-width: 1440px; }
.infra [id] { scroll-margin-top: 110px; }
.infra a:focus-visible, .infra button:not(.animation-playback):focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.infra button:not(.animation-playback) { font: inherit; }
.infra [hidden] { display: none !important; }
.infra-hero { padding-top: clamp(50px, 6vw, 90px); }
.infra-hero-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 44px; align-items: center; }
.infra-hero-copy > .infra-link { margin-top: 24px; font-size: 12px; min-height: 44px; }
.infra-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.infra-index { color: #626970; font: 11px var(--mono); letter-spacing: .13em; }
.infra h1 { font-size: clamp(2.6rem, 3.9vw, 4.1rem); font-weight: 500; line-height: 1.12; letter-spacing: -.035em; white-space: pre-line; text-wrap: balance; margin: 26px 0; max-width: 720px; }
.infra-hero-bottom { display: flex; justify-content: space-between; gap: 2rem; align-items: end; }
.infra-lead { max-width: 540px; font-size: 15px; line-height: 1.85; color: var(--muted); }
.infra-link { display: inline-flex; align-items: center; min-height: 44px; gap: 1rem; text-decoration: none; color: var(--fg); font-size: .9rem; line-height: 1.5; }
.infra-link span { color: var(--accent); }
.infra-link:hover { color: var(--accent); }
.infra-hq { position: relative; margin: 0; }
.infra-hq img { width: 100%; height: auto; display: block; }
.infra-hq figcaption { position: absolute; left: 2rem; right: 2rem; bottom: 1.5rem; display: flex; justify-content: space-between; color: #a6adb5; font: 10px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.infra-chapters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 36px; margin-top: 52px; }
.infra-chapters a { border-block: 1px solid #30363c; display: flex; gap: 1rem; padding: 1.5rem 0; align-items: center; text-decoration: none; font-size: 1rem; }
.infra-chapters a:first-child, .infra-chapters a:last-child { margin: 0; }
.infra-chapters a > span:first-child { font: 10px var(--mono); color: #808a93; }
.infra-chapters a > span:last-child { margin-left: auto; color: var(--accent); }
.infra-chapters a:hover { color: var(--accent); }
.infra-section { padding-block: clamp(4.5rem, 8vw, 8rem); }
.infra h2 { font-size: clamp(2rem, 4.1vw, 3.8rem); font-weight: 500; line-height: 1.12; letter-spacing: -.045em; white-space: pre-line; text-wrap: balance; margin: 1.4rem 0 1.8rem; }
.infra-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 7rem); align-items: start; }
.infra-prose { padding-top: 2.5rem; color: #bec2c7; font-size: 1.05rem; line-height: 1.85; }
.infra-prose p + p { margin-top: 1.4rem; }
.infra-polaris-link { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 20px; margin-top: 22px; }
.infra-intro { max-width: 740px; color: #aeb5bc; font-size: 1.05rem; line-height: 1.8; }
.infra-network { border-block: 1px solid #24282d; }
.infra-network-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: clamp(32px,5vw,72px); align-items: center; }
.infra-network-copy h2 { font-size: clamp(2rem,3vw,3rem); letter-spacing: -.035em; }
.infra-network-copy .infra-prose { padding-top: 0; font-size: 15px; }
.infra-network-art { width: min(100%,600px); margin: 0; justify-self: end; }
.infra-network-art img { width: 100%; height: auto; display: block; }
.infra-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 3rem; }
.infra-trio article { border-top: 1px solid #30363c; padding-top: 1.4rem; }
.infra-number { display: block; color: #707b85; font: 11px var(--mono); margin-bottom: 1.8rem; }
.infra h3, .infra h4 { font-size: 1.13rem; font-weight: 500; line-height: 1.45; letter-spacing: -.015em; }
.infra-trio p { margin-top: .9rem; color: #a4adb5; font-size: .93rem; line-height: 1.8; }
.infra-news { background: var(--surface-blue); border-block: 1px solid #253849; }
.infra-news-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 4rem; margin-top: 3.5rem; align-items: center; }
.infra-news figure { min-width: 0; margin-left: -2rem; }
.infra-news figure img { width: 100%; height: auto; display: block; mix-blend-mode: screen; }
.infra-news figcaption { color: #78838c; font: 9px/1.7 var(--mono); text-transform: uppercase; margin: 1rem 2rem; }
.infra-reports article { padding: 1.8rem 0; border-top: 1px solid #303941; }
.infra-article-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 24px; align-items: baseline; }
.infra-article-heading time { color: #8194a4; font: 9px/1.7 var(--mono); white-space: nowrap; }
.infra-reports h3 { font-size: 1.3rem; }
.infra-reports p { color: #a7afb6; line-height: 1.8; font-size: .92rem; margin: 1rem 0 1.2rem; }
.infra-reports .infra-link { font-size: .8rem; }
.infra-consequences { margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid #30363c; }
.infra-consequences > h3 { font-size: 1.5rem; }
.infra-consequences .infra-trio { margin-top: 1.5rem; }
.infra-consequences .infra-trio article { border: 0; }
.infra-integration { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 4rem; padding: 0; }
.infra-integration li { border-top: 1px dotted #485867; padding: 1.7rem 1rem 0 0; position: relative; color: #aab6c1; font-size: .87rem; line-height: 1.6; }
.infra-node { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px dotted #6ba3d6; background: #000; color: var(--accent); font: 18px var(--mono); margin: -2.9rem 0 1.5rem; }
.infra-linear { border-block: 1px solid var(--rule); background: var(--bg); }
.infra-linear h2 { font-size: clamp(2rem,3.35vw,3.3rem); letter-spacing: -.035em; }
.infra-linear .infra-intro { font-size: 15px; line-height: 1.85; max-width: 680px; }
.infra-patrol-panel { margin-top: 32px; border: 0; background: transparent; }
.infra-patrol-panel .infra-panel-bottom { border: 0; padding: 0; }
.infra-panel-top, .infra-panel-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; font: 10px/1.6 var(--mono); color: #9dabb6; }
.infra-panel-top { border-bottom: 1px solid #27323c; }
.infra-panel-top > span:first-child { display: inline-flex; align-items: center; gap: .65rem; }
.infra-status-dot { width: 5px; height: 5px; background: var(--accent); flex: 0 0 auto; }
.infra-panel-top > span:last-child { text-align: right; font-size: 9px; color: #697e90; }
.infra-patrol-stage { height: clamp(300px,46vw,570px); position: relative; }
.infra canvas { display: none; width: 100%; height: 100%; }
.infra.infra-enhanced canvas { display: block; }
.infra.infra-enhanced [data-infra-fallback] { display: none; }
.infra-static-map { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: end; background: #030506; }
.infra-static-map img { object-fit: contain; width: 100%; height: 75%; position: absolute; top: 0; opacity: .6; }
.infra-static-map p { color: #b5c1cb; padding: 1.25rem; position: relative; font-size: .85rem; line-height: 1.7; background: linear-gradient(transparent, #030506 30%); }
.infra-panel-bottom { border-top: 1px solid #27323c; font-size: 9px; }
.infra-control { border: 1px solid #3b4c5b; padding: .55rem .8rem; background: transparent; color: #b6c8d7; cursor: pointer; font: 10px var(--mono) !important; }
.infra-control:hover { border-color: var(--accent); color: #fff; }
.infra-control:disabled { opacity: .35; cursor: default; }
.infra-legend { display: flex; flex-wrap: wrap; gap: 1.5rem; font: 9px/1.6 var(--mono); color: #8b9aa6; margin-top: 1.1rem; }
.infra-legend > span { display: flex; align-items: center; gap: .5rem; }
.infra-key { display: inline-block; width: 15px; height: 8px; }
.infra-key-route { border-top: 1px dotted var(--accent); height: 1px; }
.infra-key-scan { background: #6ba3d629; border: 1px solid #6ba3d66b; }
.infra-key-cue { border: 1px solid var(--infra-warn); width: 7px; height: 7px; }
.infra-note { font-size: .78rem; line-height: 1.8; color: #87939e; border-left: 1px solid #475767; padding-left: 1.2rem; margin-top: 2.5rem; max-width: 850px; }
.infra-scroll-hint { display: none; color: #849aac; font: 10px var(--mono); margin-top: 2rem; }
.infra-enhanced .infra-scroll-hint { display: block; }
.infra-perimeter { --infra-heading-height: 160px; --infra-lock-top: calc(80px + var(--infra-heading-height) + 18px); background: var(--surface-blue); border-block: 1px solid #253849; }
.infra-perimeter > .wrap { max-width: 1440px; }
.infra-perimeter-heading { position: sticky; top: 80px; z-index: 4; background: var(--surface-blue); padding: .9rem 0 .15rem; }
.infra-perimeter-heading::before { content: ''; position: absolute; bottom: 100%; left: 0; right: 0; height: 85px; background: var(--surface-blue); pointer-events: none; }
.infra-perimeter-heading::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 24px; background: var(--surface-blue); pointer-events: none; }
/* Keep the heading's masks inside the section, and the intro clear of the lower mask. */
.infra-perimeter { overflow: clip; }
.infra-perimeter-heading + .infra-intro { margin-top: 24px; }
.infra-perimeter-heading h2 { font-size: clamp(1.8rem, 3.2vw, 3rem); margin: .8rem 0 1.1rem; }
.infra-scenario { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 3.5rem; margin-top: 2rem; align-items: start; position: relative; }
.infra-scene-panel { position: sticky; top: var(--infra-lock-top); border: 1px solid #253849; background: #000; min-width: 0; }
.infra-scene-stage { position: relative; height: clamp(180px, calc(100svh - var(--infra-lock-top) - 200px), 650px); overflow: hidden; }
.infra-scene-time { position: absolute; top: 1.1rem; left: 1.3rem; display: flex; flex-direction: column; gap: .4rem; color: #8195a7; font: 9px var(--mono); pointer-events: none; }
.infra-scene-time > span:first-child { color: #e8e8e8; font-size: 1.6rem; letter-spacing: -.04em; }
.infra-scene-time > span:last-child { letter-spacing: .12em; }
.infra-live-feed { position: absolute; bottom: 1rem; right: 1rem; width: 150px; border: 1px solid #50616e; background: #050a0eef; }
.infra-live-feed > span { font: 8px var(--mono); color: #b1c5d5; display: block; padding: .45rem .6rem; border-bottom: 1px solid #283845; }
.infra-live-feed svg { width: 100%; height: auto; display: block; stroke: #7c9aaf; stroke-width: 1; fill: none; }
.infra-live-feed .infra-feed-point { fill: #d5dfe7; stroke: none; }
.infra-live-feed .infra-feed-target { stroke: var(--infra-warn); stroke-dasharray: none; }
.infra-scene-detail { border-top: 1px solid #283540; padding: 1rem 1.3rem; font: 9px/1.7 var(--mono); color: #97adbf; min-height: 3.5rem; }
.infra-scene-controls { display: flex; align-items: center; justify-content: space-between; padding: 0 1.3rem 1rem; gap: .7rem; }
.infra-scene-controls > span { font: 8px/1.5 var(--mono); color: #697a88; text-align: center; }
.infra-steps { list-style: none; padding: 0; }
.infra-step { padding: 2rem 0 3rem; border-top: 1px solid #28323b; min-height: 50vh; opacity: 1; }
.infra-enhanced .infra-step { transition: border-color .25s ease; }
.infra-enhanced .infra-step:not(.is-active) .infra-step-title { color: #8e9aa6; }
.infra-step.is-active { border-top-color: #6ba3d6; }
.infra-step-body > button { display: block; text-align: left; width: 100%; border: 0; background: transparent; padding: 0; color: inherit; cursor: pointer; }
.infra-step-meta { display: flex; justify-content: space-between; font: 10px var(--mono); color: var(--accent); gap: 1rem; }
.infra-step-title { display: block; font-size: clamp(1.2rem, 1.9vw, 1.6rem); font-weight: 500; line-height: 1.4; letter-spacing: -.025em; margin: 1.2rem 0 1rem; }
.infra-step p { color: #a9b3bc; font-size: .95rem; line-height: 1.85; }
.infra-actions { display: none; gap: .65rem; margin-top: 1.5rem; }
.infra-enhanced .infra-actions { display: grid; }
.infra-actions button { display: flex; justify-content: space-between; gap: .6rem; align-items: center; width: 100%; text-align: left; color: #afbac4; background: #080d11; border: 1px solid #2c3a46; padding: .9rem; cursor: pointer; font-size: .8rem; line-height: 1.5; }
.infra-actions button[aria-pressed="true"] { color: #d4e8f8; border-color: var(--accent); background: #6ba3d610; }
.infra-actions button > span { color: var(--accent); }
.infra-step .infra-action-detail { display: none; font-size: .8rem; margin-top: 1rem; min-height: 5.5em; color: #a7bfD2; }
.infra-enhanced .infra-step .infra-action-detail { display: block; }
.infra-concept-note { margin-top: 3rem; }
.infra-cta { border-block: 1px solid #253849; padding-block: clamp(4rem, 7vw, 7rem); background: var(--surface-blue); }
.infra-cta p { color: #a7b0b8; line-height: 1.7; }
.infra-cta-actions { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; margin-top: 2.5rem; }
.infra-cta .btn-primary { gap: 1.2rem; }
.infra-classic { color: #83909c; font-size: .8rem; line-height: 1.7; text-decoration: none; }
.infra-classic:hover { color: var(--accent); }
.infra-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 1400px) { .infra-hero .infra-hq { margin-top: 1rem; } }
@media (max-width: 900px) {
  .infra-split { gap: 2rem; }
  .infra-scenario { gap: 2rem; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .infra-news-layout { gap: 2rem; }
  .infra-trio { gap: 1.5rem; }
  .infra-live-feed { width: 115px; }
}
@media (max-width: 700px) {
  .infra h1 { font-size: clamp(2.45rem, 9vw, 3.8rem); margin-top: 2rem; }
  .infra-hero-top .section-label { font-size: 9px; letter-spacing: .1em; }
  .infra-index { display: none; }
  .infra-hero-bottom { display: block; }
  .infra-hero-bottom > .infra-link { margin-top: 1.5rem; }
  .infra-hq { margin: 1.5rem -.75rem 0; }
  .infra-hq figcaption { left: .75rem; right: .75rem; bottom: .5rem; font-size: 8px; }
  .infra-chapters { gap: 1rem; margin-top: 2rem; }
  .infra-chapters a { font-size: .8rem; gap: .55rem; align-items: start; }
  .infra-chapters a:first-child, .infra-chapters a:last-child { margin: 0; }
  .infra-split, .infra-trio, .infra-news-layout { grid-template-columns: 1fr; }
  .infra h2 { font-size: clamp(1.8rem, 7.2vw, 2.7rem); }
  .infra-split { gap: 0; }
  .infra-prose { padding-top: .5rem; font-size: 1rem; }
  .infra-trio { gap: 1.8rem; }
  .infra-number { margin-bottom: 1rem; }
  .infra-network-layout { grid-template-columns: 1fr; gap: 24px; }
  .infra-network-art { justify-self: center; }
  .infra-news figure { margin-inline: -.75rem; overflow: hidden; }
  /* Crop to the papers so the dotted lines stay visible at phone width. */
  .infra-news figure img { width: 170%; max-width: none; margin-left: -35%; }
  .infra-news-layout { gap: 1.5rem; margin-top: 1.5rem; }
  .infra-consequences .infra-trio article { padding-top: 0; }
  .infra-integration { grid-template-columns: 1fr 1fr; gap: 2rem 1rem; }
  .infra-integration li { font-size: .8rem; }
  .infra-panel-top { padding: .85rem; font-size: 9px; }
  .infra-patrol-panel .infra-panel-top { align-items: start; flex-direction: column; gap: .4rem; }
  .infra-patrol-panel .infra-panel-top > span:last-child { text-align: left; }
  /* The scene background matches the page, so the stage can use the side gutters. */
  .infra-patrol-stage { margin-inline: -24px; }
  .infra-panel-bottom { padding: .8rem; font-size: 8px; }
  .infra-scenario { grid-template-columns: 1fr; gap: 1.5rem; }
  .infra-perimeter { --infra-lock-top: calc(76px + var(--infra-heading-height) + 8px); }
  .infra-perimeter-heading { top: 70px; padding-top: .65rem; }
  .infra-perimeter-heading .section-label { font-size: 8px; letter-spacing: .07em; }
  .infra-perimeter-heading h2 { font-size: clamp(1.1rem, 5vw, 1.55rem); margin: .5rem 0 .65rem; }
  .infra-enhanced .infra-scene-panel { top: var(--infra-lock-top); z-index: 2; box-shadow: 0 15px 25px #000b; }
  .infra-scene-stage { height: clamp(180px, 31svh, 290px); }
  .infra-scene-detail { padding: .65rem .85rem; min-height: 0; font-size: 8px; }
  .infra-scene-controls { padding: 0 .85rem .65rem; }
  .infra-scene-controls .infra-control { padding: .3rem .7rem; min-width: 40px; min-height: 32px; }
  .infra-scene-time { top: .75rem; left: .85rem; }
  .infra-scene-time > span:first-child { font-size: 1.2rem; }
  .infra-scene-time > span:last-child { font-size: 7px; }
  .infra-live-feed { width: 92px; bottom: .5rem; right: .5rem; }
  .infra-live-feed > span { font-size: 6px; padding: .3rem; }
  .infra-step { min-height: 58svh; padding: 1.5rem 0 2.5rem; }
  /* The active step's text stays just below the pinned panel; the taller decision step scrolls normally. */
  .infra-enhanced .infra-step:not(:has(.infra-actions)) > .infra-step-body { position: sticky; top: var(--infra-step-top, 60svh); }
  .infra-step-title { font-size: 1.3rem; }
  .infra-step p { font-size: .92rem; }
  .infra-cta-actions { gap: 1.5rem; }
  .infra-cta .btn-primary { font-size: .8rem; }
}
@media (max-height: 650px) and (min-width: 701px) {
  .infra-perimeter-heading { top: 75px; padding-top: .5rem; }
  .infra-perimeter-heading h2 { font-size: 1.35rem; margin-block: .4rem .6rem; }
  .infra-perimeter-heading .section-label { font-size: 8px; }
  .infra-scene-stage { height: clamp(125px, calc(100svh - var(--infra-lock-top) - 145px), 300px); }
}
@media (prefers-reduced-motion: reduce) {
  .infra *, .infra *::before, .infra *::after { scroll-behavior: auto !important; transition: none !important; }
  .infra [data-patrol-toggle] { display: none !important; }
}
/* The story keeps its own illustrations and scene controls. */
@media (max-width: 900px) {
  .infra-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .infra-hq { width: min(100%,620px); margin: 0 auto; }
}
@media (max-width: 800px) {
  .infra .wrap, .infra .infra-perimeter > .wrap { width: calc(100% - 48px); }
}
@media (max-width: 540px) {
  .infra-hero { padding-top: 42px; }
  .infra h1 { font-size: clamp(2rem,8vw,2.8rem); margin-block: 24px; }
  .infra-lead { font-size: 14px; line-height: 1.8; }
  .infra-chapters { grid-template-columns: 1fr; gap: 0; margin-top: 30px; }
  .infra-chapters a { padding-block: 15px; min-height: 50px; }
  .infra-chapters a + a { border-top: 0; }
}
.infra-panel-bottom { justify-content: flex-end; }
/* Links to the three standalone use cases, parallel to the example story. */
