:root {
  color-scheme: dark;
  --bg: #080907;
  --surface: #10140f;
  --surface-strong: #171d15;
  --surface-soft: #0b0e0a;
  --line: #313a2b;
  --line-strong: #48543d;
  --text: #f3f6ee;
  --muted: #aab4a1;
  --dim: #737d6c;
  --lime: #d8ff55;
  --green: #67d79a;
  --cyan: #75d7d0;
  --coral: #ff7168;
  --ink: #050604;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(103, 215, 154, 0.08), transparent 480px),
    linear-gradient(#080907, #080907);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(216, 255, 85, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 215, 208, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  padding: 10px 14px;
}

.skip-link:focus {
  top: 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 7, 0.92);
  padding: 13px max(20px, calc((100vw - 1240px) / 2));
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--lime);
  border-radius: 8px;
  color: var(--lime);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-action:hover {
  color: var(--lime);
}

.nav-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 12px;
  transition: border-color 150ms ease, color 150ms ease;
}

main {
  position: relative;
  z-index: 1;
}

.runtime {
  display: grid;
  gap: 24px;
  min-height: calc(100vh - 61px);
  padding: 28px max(20px, calc((100vw - 1240px) / 2)) 24px;
}

.runtime-heading {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1fr);
  gap: 28px;
  align-items: end;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 3.7rem;
  line-height: 0.94;
  max-width: 760px;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

h3 {
  margin-bottom: 4px;
  font-size: 0.94rem;
}

.intro,
.flow-section p,
.image-band p,
.ship-section p {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.runtime-heading .intro {
  align-self: end;
  margin-bottom: 2px;
}

.team-console {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 610px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  overflow: hidden;
}

.console-topline,
.panel-heading,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
}

.console-topline {
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
}

#shell-status {
  color: var(--lime);
}

.run-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 46px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.tab:last-child {
  border-right: 0;
}

.tab.is-active {
  background: var(--surface-strong);
  color: var(--lime);
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(360px, 1.2fr) minmax(260px, 0.85fr);
  min-height: 0;
}

.agents-panel,
.center-panel,
.tasks-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--surface);
}

.agents-panel,
.center-panel {
  border-right: 1px solid var(--line);
}

.panel-heading {
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
}

.panel-heading h2 {
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
}

.agent-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.agent-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 98px;
  background: var(--surface);
  padding: 14px;
}

.agent-row p,
.handoff-stream p,
.task-stack,
.provider-route {
  margin: 0;
}

.agent-row p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.agent-row strong {
  color: var(--dim);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.agent-signal {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dim);
}

.agent-signal.active {
  background: var(--lime);
}

.agent-signal.wait {
  background: var(--coral);
}

.agent-signal.idle {
  background: var(--line-strong);
}

.center-panel {
  background: #0d110c;
}

.handoff-stream {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.87rem;
  line-height: 1.55;
}

.handoff-stream p {
  border-left: 2px solid var(--line-strong);
  color: #dce6d2;
  padding-left: 10px;
}

.handoff-stream strong {
  color: var(--cyan);
  font-weight: 800;
}

.prompt-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.prompt-row span {
  color: var(--lime);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.prompt-row input {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #080a07;
  color: var(--text);
  padding: 11px 12px;
}

.prompt-row input:focus {
  border-color: var(--lime);
  outline: none;
}

.prompt-row button,
.quick-prompts button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
  padding: 11px 14px;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.task-stack {
  display: grid;
  gap: 1px;
  padding: 0;
  list-style: none;
  background: var(--line);
}

.task-stack li {
  min-height: 54px;
  background: var(--surface);
  color: var(--muted);
  padding: 16px 16px 16px 36px;
  position: relative;
}

.task-stack li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 22px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--dim);
  border-radius: 50%;
}

.task-stack li.done {
  color: var(--text);
}

.task-stack li.done::before {
  background: var(--green);
  border-color: var(--green);
}

.task-stack li.active {
  color: var(--lime);
}

.task-stack li.active::before {
  background: var(--lime);
  border-color: var(--lime);
}

.provider-route {
  display: grid;
  gap: 8px;
  margin: auto 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
}

.quick-prompts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.quick-prompts button {
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.quick-prompts button:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.proof-strip,
.flow-section,
.image-band,
.ship-section,
.footer {
  padding-left: max(20px, calc((100vw - 1240px) / 2));
  padding-right: max(20px, calc((100vw - 1240px) / 2));
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-block: 1px solid var(--line);
  background: var(--line);
}

.proof-strip p {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  margin: 0;
  background: #0b0d0a;
  padding: 22px;
}

.proof-strip strong {
  color: var(--lime);
  font-size: 1.1rem;
}

.proof-strip span {
  color: var(--muted);
  line-height: 1.5;
}

.flow-section,
.ship-section {
  padding-top: 88px;
  padding-bottom: 88px;
}

.flow-section > div:first-child,
.ship-section > div:first-child {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.flow-section h2,
.image-band h2,
.ship-section h2 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: 2.2rem;
  line-height: 1.05;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 34px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.flow-grid article {
  min-height: 210px;
  background: var(--surface);
  padding: 24px;
}

.flow-grid span {
  display: block;
  margin-bottom: 34px;
  color: var(--coral);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.flow-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.image-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 36px;
  align-items: center;
  border-block: 1px solid var(--line);
  background: #10130d;
  padding-top: 54px;
  padding-bottom: 54px;
}

.image-band img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  filter: saturate(0.72) contrast(1.08);
}

.image-band ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.image-band li {
  border-left: 2px solid var(--green);
  color: var(--text);
  padding-left: 12px;
}

.ship-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 34px;
  align-items: center;
}

.run-card {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.run-card div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  background: var(--surface);
  padding: 18px;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.status-dot.done {
  background: var(--green);
}

.status-dot.active {
  background: var(--lime);
}

.status-dot.wait {
  background: var(--coral);
}

.footer {
  min-height: 84px;
  border-top: 1px solid var(--line);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1060px) {
  .runtime-heading,
  .console-grid,
  .image-band,
  .ship-section {
    grid-template-columns: 1fr;
  }

  .agents-panel,
  .center-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .runtime {
    min-height: auto;
  }

  .team-console {
    min-height: auto;
  }

  .handoff-stream {
    min-height: 260px;
  }

  .proof-strip,
  .flow-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .nav-action {
    display: none;
  }

  .runtime {
    padding-top: 24px;
  }

  .runtime-heading {
    padding-left: 14px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .flow-section h2,
  .image-band h2,
  .ship-section h2 {
    font-size: 1.8rem;
  }

  .console-topline,
  .panel-heading,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .agent-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .agent-row strong {
    grid-column: 2;
  }

  .quick-prompts {
    grid-template-columns: 1fr;
  }

  .prompt-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .prompt-row button {
    grid-column: 2;
  }

  .image-band img {
    height: 260px;
  }
}
