:root {
  --ink: #111827;
  --muted: #5b6472;
  --line: #d9dee8;
  --paper: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.9);
  --white: #ffffff;
  --blue: #1368e8;
  --cyan: #0ea5b7;
  --green: #12a66a;
  --yellow: #d98d00;
  --red: #df3b30;
  --grey: #7a8494;
  --violet: #7857d8;
  --shadow: 0 20px 60px rgba(17, 24, 39, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::selection {
  background: rgba(19, 104, 232, 0.2);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 36px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(245, 247, 251, 0.88);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.header-action,
.hero-actions,
.signal-strip,
.form-row,
.mode-selector,
.panel-title-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 0;
  font-weight: 800;
}

.brand-mark {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

.site-nav {
  justify-content: center;
  gap: 8px;
}

.site-nav a,
.header-action {
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a:hover,
.header-action:hover {
  background: var(--white);
  color: var(--ink);
}

.header-action {
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: var(--white);
  color: var(--ink);
}

.control-room {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 36px);
  padding: 44px 36px 64px;
}

.control-room::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(17, 24, 39, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.diffusion-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.control-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(620px, 1.4fr);
  gap: 36px;
  max-width: 1440px;
  margin: 0 auto;
  align-items: end;
  min-width: 0;
}

.hero-copy {
  padding-top: 38px;
  min-width: 0;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 22px;
  font-size: 4rem;
  line-height: 1.02;
}

h2 {
  margin-bottom: 18px;
  font-size: 2.25rem;
  line-height: 1.12;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.02rem;
}

.hero-lede,
.section-copy,
.section-heading p,
.capability-card p,
.mode-grid p,
.expansion-grid p,
.socket-list span {
  color: var(--muted);
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 26px;
  font-size: 1.08rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.primary-action {
  background: var(--ink);
  color: var(--white);
}

.primary-action:hover {
  background: #263142;
}

.secondary-action {
  border-color: rgba(17, 24, 39, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.secondary-action:hover {
  background: var(--white);
}

.compact {
  min-height: 42px;
  padding: 10px 13px;
  font-size: 0.92rem;
}

.signal-strip {
  flex-wrap: wrap;
  gap: 10px;
}

.signal-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.status-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.red {
  background: var(--red);
}

.green {
  background: var(--green);
}

.yellow {
  background: var(--yellow);
}

.grey {
  background: var(--grey);
}

.runtime-shell {
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  min-width: 0;
}

.visual-stage {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stage-frame {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    #111827;
  background-size: 34px 34px;
  isolation: isolate;
}

.stage-frame::before {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.stage-frame::before {
  inset: 9%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
}

.map-flow-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.phase-panel,
.agent-stack,
.layer-stack {
  position: absolute;
  z-index: 3;
}

.phase-panel {
  top: 24px;
  left: 24px;
  width: min(260px, calc(100% - 48px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.78);
  color: var(--white);
  backdrop-filter: blur(10px);
}

.phase-panel span,
.agent-stack span,
.stack-slab span {
  display: block;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.phase-panel span,
.agent-stack span {
  color: rgba(255, 255, 255, 0.66);
}

.phase-panel strong {
  display: block;
  margin: 4px 0 12px;
  font-size: 1.18rem;
  line-height: 1.1;
}

.phase-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.phase-meter i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  animation: phaseSweep 4.8s linear infinite;
}

.agent-stack {
  right: 24px;
  top: 24px;
  display: grid;
  gap: 8px;
  width: min(128px, calc(100% - 48px));
}

.agent-stack span {
  position: relative;
  min-height: 32px;
  padding: 8px 10px 8px 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  overflow: hidden;
}

.agent-stack span::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(18, 166, 106, 0.16);
}

.agent-stack span:nth-child(2)::before {
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(217, 141, 0, 0.16);
}

.agent-stack span:nth-child(3)::before {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(223, 59, 48, 0.16);
}

.stage-routes span {
  position: absolute;
  z-index: 2;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--cyan);
  animation: routeSignal 6s linear infinite;
}

.stage-routes span:nth-child(1) {
  left: 12%;
  top: 58%;
}

.stage-routes span:nth-child(2) {
  left: 34%;
  top: 43%;
  background: var(--yellow);
  animation-delay: -1.7s;
}

.stage-routes span:nth-child(3) {
  left: 54%;
  top: 67%;
  background: var(--red);
  animation-delay: -3.2s;
}

.detail-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: #f7f9fc;
}

.detail-cta span {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-cta strong {
  display: block;
  max-width: 760px;
  font-size: 1rem;
}

.layer-stack {
  right: 8%;
  bottom: 9%;
  width: min(430px, 84%);
  min-height: 270px;
  perspective: 900px;
}

.stack-slab {
  position: absolute;
  right: 0;
  display: grid;
  align-content: center;
  width: 86%;
  min-height: 72px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: var(--white);
  transform: skewX(-14deg) rotateX(54deg);
  box-shadow: 0 22px 34px rgba(0, 0, 0, 0.24);
  animation: slabLift 4.8s ease-in-out infinite;
}

.stack-slab span,
.stack-slab strong {
  transform: skewX(14deg);
}

.stack-slab strong {
  margin-top: 2px;
  font-size: 1rem;
}

.stack-slab.product {
  bottom: 174px;
  background: rgba(19, 104, 232, 0.9);
  animation-delay: -0.6s;
}

.stack-slab.harness {
  right: 26px;
  bottom: 116px;
  background: rgba(120, 87, 216, 0.9);
  animation-delay: -1.2s;
}

.stack-slab.code {
  right: 52px;
  bottom: 58px;
  background: rgba(18, 166, 106, 0.9);
  animation-delay: -1.8s;
}

.stack-slab.sockets {
  right: 78px;
  bottom: 0;
  background: rgba(217, 141, 0, 0.92);
  animation-delay: -2.4s;
}

.stage-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  background: #fbfcff;
}

.stage-footer span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.console-room {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 72px);
  padding: 52px 36px 72px;
}

.console-room::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(17, 24, 39, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.console-intro,
.console-shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
}

.console-intro {
  margin-bottom: 28px;
}

.console-intro h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: 3.2rem;
}

.console-intro p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

@keyframes phaseSweep {
  0% {
    width: 18%;
    background: var(--yellow);
  }

  45% {
    width: 76%;
    background: var(--green);
  }

  72% {
    width: 54%;
    background: var(--red);
  }

  100% {
    width: 92%;
    background: var(--cyan);
  }
}

@keyframes routeSignal {
  0% {
    transform: translate3d(0, 0, 0) scale(0.88);
    opacity: 0.35;
  }

  28% {
    transform: translate3d(120px, -72px, 0) scale(1);
    opacity: 1;
  }

  62% {
    transform: translate3d(244px, 28px, 0) scale(0.96);
    opacity: 0.82;
  }

  100% {
    transform: translate3d(392px, -118px, 0) scale(0.72);
    opacity: 0;
  }
}

@keyframes slabLift {
  0%,
  100% {
    filter: brightness(0.96);
    transform: skewX(-14deg) rotateX(54deg) translateY(0);
  }

  50% {
    filter: brightness(1.08);
    transform: skewX(-14deg) rotateX(54deg) translateY(-8px);
  }
}

.runtime-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.runtime-header h2 {
  margin-bottom: 0;
  font-size: 1.42rem;
}

.runtime-metric {
  min-width: 96px;
  padding: 12px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: var(--white);
  text-align: center;
}

.runtime-metric span {
  display: block;
  font-size: 1.65rem;
  font-weight: 900;
}

.runtime-metric small {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
}

.runtime-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) minmax(250px, 1fr);
  gap: 18px;
  padding: 18px;
  min-width: 0;
}

.submit-panel,
.feedback-panel,
.board-panel,
.tile-inspector,
.capability-card,
.mode-grid article,
.expansion-grid article {
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: var(--white);
  min-width: 0;
}

.submit-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.submit-panel label {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

textarea {
  width: 100%;
  min-height: 152px;
  resize: vertical;
  padding: 12px;
  border: 1px solid rgba(17, 24, 39, 0.15);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfcff;
}

textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(19, 104, 232, 0.28);
  outline-offset: 2px;
}

.form-row {
  flex-wrap: wrap;
  gap: 8px;
}

.mode-selector {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.mode-button {
  min-height: 38px;
  padding: 8px 6px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.mode-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.mode-note {
  min-height: 42px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.feedback-panel {
  min-height: 100%;
  padding: 16px;
}

.panel-title-row {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title-row h3 {
  margin: 0;
}

.panel-title-row span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.event-feed {
  display: grid;
  gap: 8px;
  max-height: 260px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: auto;
}

.event-feed li {
  padding: 10px;
  border-left: 4px solid var(--line);
  border-radius: 6px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 0.88rem;
}

.event-feed strong {
  color: var(--ink);
}

.board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.75fr);
  gap: 18px;
  padding: 0 18px 18px;
  min-width: 0;
}

.board-panel {
  padding: 16px;
}

.puzzle-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(112px, auto);
  gap: 10px;
}

.tile {
  position: relative;
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 112px;
  padding: 11px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-top: 5px solid var(--grey);
  border-radius: 8px;
  background: #fbfcff;
  text-align: left;
}

.tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.1);
}

.tile.is-selected {
  outline: 3px solid rgba(19, 104, 232, 0.24);
}

.tile[data-status="red"] {
  border-top-color: var(--red);
}

.tile[data-status="green"] {
  border-top-color: var(--green);
}

.tile[data-status="yellow"] {
  border-top-color: var(--yellow);
}

.tile[data-status="grey"] {
  border-top-color: var(--grey);
}

.tile small,
.tile span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tile strong {
  display: block;
  margin: 6px 0 10px;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  line-height: 1.22;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf5;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.tile-inspector {
  padding: 16px;
}

.tile-inspector h3 {
  margin-bottom: 8px;
}

.inspector-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.inspector-meta div {
  padding: 10px;
  border-radius: 8px;
  background: #f7f9fc;
}

.inspector-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.file-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-list li {
  padding: 8px 9px;
  border-radius: 6px;
  background: #f7f9fc;
  color: var(--muted);
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.section-band {
  padding: 72px 36px;
  background: var(--white);
}

.section-band:nth-of-type(odd) {
  background: #f7f9fc;
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(260px, 1fr);
  gap: 34px;
  margin-bottom: 24px;
  align-items: start;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.capability-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
}

.cap-number,
.cap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 0;
  border-radius: 8px;
  background: #edf4ff;
  color: var(--blue);
  font-weight: 900;
}

.cap-icon {
  padding: 0;
  background: transparent;
}

.capability-card h3 {
  margin-bottom: 0;
}

.capability-card p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1fr);
  gap: 48px;
  align-items: center;
}

.section-copy {
  margin-bottom: 24px;
  font-size: 1.02rem;
}

.socket-list {
  display: grid;
  gap: 12px;
}

.socket-list div {
  display: grid;
  grid-template-columns: minmax(120px, 0.38fr) 1fr;
  gap: 12px;
  padding: 14px;
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
  background: var(--white);
}

.layered-band {
  background: #eef4f7;
}

.layer-visual {
  position: relative;
  display: grid;
  gap: 16px;
  min-height: 460px;
  padding: 26px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(rgba(19, 104, 232, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.06) 1px, transparent 1px),
    #fbfcff;
  background-size: 34px 34px;
  box-shadow: var(--shadow);
}

.layer {
  display: grid;
  align-content: center;
  min-height: 92px;
  padding: 18px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
}

.layer span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.layer strong {
  margin-top: 5px;
  font-size: 1rem;
}

.sky {
  border-left: 6px solid var(--blue);
}

.air {
  margin-left: 34px;
  border-left: 6px solid var(--violet);
}

.ground {
  margin-left: 68px;
  border-left: 6px solid var(--green);
}

.base {
  margin-left: 102px;
  border-left: 6px solid var(--yellow);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.mode-grid article {
  padding: 16px;
}

.mode-grid span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #f0f4fa;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.community-band {
  background: #f0f6f1;
}

.expansion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.expansion-grid article {
  position: relative;
  min-height: 176px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(rgba(17, 24, 39, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.04) 1px, transparent 1px),
    var(--white);
  background-size: 28px 28px;
}

.expansion-grid article::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 132px;
  height: 92px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  transform: skewX(-18deg) rotate(-8deg);
  background: rgba(19, 104, 232, 0.08);
}

.expansion-grid article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--blue);
}

.expansion-grid article:nth-child(2)::before {
  background: var(--green);
}

.expansion-grid article:nth-child(3)::before {
  background: var(--yellow);
}

.expansion-grid article:nth-child(2)::after {
  background: rgba(18, 166, 106, 0.1);
}

.expansion-grid article:nth-child(3)::after {
  background: rgba(217, 141, 0, 0.1);
}

.expansion-grid span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 36px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-weight: 900;
}

.expansion-grid h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.expansion-grid p {
  max-width: 270px;
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 36px;
  background: var(--ink);
  color: var(--white);
}

.site-footer span {
  font-weight: 900;
}

.site-footer p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer a {
  color: var(--white);
  font-weight: 800;
}

@media (max-width: 1180px) {
  .control-grid,
  .section-heading,
  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .control-grid {
    align-items: start;
  }

  .hero-copy {
    padding-top: 12px;
  }

  .capability-grid,
  .mode-grid,
  .expansion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage-frame {
    min-height: 590px;
  }
}

@media (max-width: 840px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 0 18px;
  }

  .site-nav {
    display: none;
  }

  .control-room,
  .section-band {
    padding-right: 18px;
    padding-left: 18px;
  }

  h1 {
    font-size: 2.7rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .runtime-header,
  .runtime-layout,
  .board-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .runtime-header {
    display: grid;
  }

  .puzzle-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .socket-list div {
    grid-template-columns: 1fr;
  }

  .layer-visual {
    min-height: 0;
    padding: 16px;
  }

  .air,
  .ground,
  .base {
    margin-left: 0;
  }

  .site-footer {
    display: grid;
  }

  .stage-frame {
    min-height: 560px;
  }

  .agent-stack {
    top: auto;
    right: 18px;
    bottom: 22px;
    width: calc(100% - 36px);
  }

  .agent-stack span {
    min-height: 32px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .layer-stack {
    right: 18px;
    bottom: 142px;
    width: calc(100% - 36px);
    min-height: 220px;
  }

  .stack-slab {
    width: 82%;
    min-height: 58px;
  }

  .stack-slab.product {
    bottom: 138px;
  }

  .stack-slab.harness {
    bottom: 92px;
  }

  .stack-slab.code {
    bottom: 46px;
  }

  .console-room {
    padding-right: 18px;
    padding-left: 18px;
  }

  .console-intro h1 {
    font-size: 2.4rem;
  }
}

@media (max-width: 560px) {
  .control-room {
    padding-top: 28px;
  }

  .header-action {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  h1 {
    font-size: 2.25rem;
  }

  .runtime-header,
  .runtime-layout,
  .board-layout {
    padding: 14px;
  }

  .mode-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .puzzle-board,
  .capability-grid,
  .mode-grid,
  .expansion-grid {
    grid-template-columns: 1fr;
  }

  .inspector-meta {
    grid-template-columns: 1fr;
  }

  .stage-frame {
    min-height: 540px;
  }

  .phase-panel {
    top: 16px;
    left: 16px;
    width: calc(100% - 32px);
  }

  .phase-panel strong {
    font-size: 1.15rem;
  }

  .stage-footer {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .tile:hover {
    transform: none;
  }

  .phase-meter i,
  .stage-routes span,
  .stack-slab {
    animation: none;
  }
}
