:root {
  --bg: #07100f;
  --surface: rgba(13, 27, 25, 0.86);
  --surface-strong: #10221f;
  --surface-soft: rgba(143, 255, 193, 0.045);
  --line: rgba(187, 230, 207, 0.15);
  --line-strong: rgba(187, 230, 207, 0.28);
  --text: #f0f7f3;
  --muted: #93a8a0;
  --green: #84f6ad;
  --cyan: #7ce7de;
  --amber: #ffc875;
  --red: #ff8f8f;
  --blue: #91bdff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, #112d26 0, var(--bg) 42rem);
  background-size: 36px 36px, 36px 36px, auto;
}

a {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.1;
  pointer-events: none;
}

.ambient-one {
  top: -10rem;
  right: -8rem;
  background: var(--green);
}

.ambient-two {
  bottom: -12rem;
  left: -10rem;
  background: var(--cyan);
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(132, 246, 173, 0.06);
}

.brand-mark span {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--green);
}

.brand-mark span:nth-child(2),
.brand-mark span:nth-child(3) {
  opacity: 0.45;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
}

.live-pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--text);
  background: rgba(7, 16, 15, 0.72);
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(132, 246, 173, 0.1);
}

.live-pill[data-status="blocked"] .pulse,
.live-pill[data-status="error"] .pulse {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(255, 143, 143, 0.1);
}

.live-pill[data-status="degraded"] .pulse {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(255, 200, 117, 0.1);
}

main {
  padding: 68px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: end;
  gap: 48px;
  padding-bottom: 44px;
}

.eyebrow,
.section-index {
  margin: 0 0 12px;
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: #b7c8c1;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.mode-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.mode-card span,
.mode-card strong,
.mode-card small {
  display: block;
}

.mode-card span {
  color: var(--muted);
  font-size: 0.72rem;
}

.mode-card strong {
  margin: 7px 0 5px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.94rem;
}

.mode-card small {
  color: var(--muted);
  line-height: 1.45;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
  padding: 13px 16px;
  border: 1px solid rgba(124, 231, 222, 0.2);
  border-radius: 12px;
  background: rgba(124, 231, 222, 0.05);
}

.notice p {
  margin: 0;
  color: #b6cbc5;
  font-size: 0.84rem;
  line-height: 1.5;
}

.notice-icon {
  display: grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: var(--bg);
  background: var(--cyan);
  font-family: Georgia, serif;
  font-size: 0.76rem;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-card {
  min-height: 150px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.summary-card:last-child {
  border-right: 0;
}

.summary-label,
.summary-card small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.summary-card strong {
  display: block;
  margin: 17px 0 9px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.05em;
}

.panel {
  margin-bottom: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.panel-heading.compact {
  margin-bottom: 18px;
}

.panel-heading h2,
.contract-strip h2 {
  margin: 0;
  font-size: 1.34rem;
  letter-spacing: -0.025em;
}

.panel-heading > p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

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

.agent-card,
.skeleton-card {
  min-height: 224px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(140deg, rgba(132, 246, 173, 0.045), transparent 45%),
    rgba(7, 16, 15, 0.42);
}

.skeleton-card {
  background:
    linear-gradient(
      100deg,
      rgba(255, 255, 255, 0.02) 20%,
      rgba(255, 255, 255, 0.06) 40%,
      rgba(255, 255, 255, 0.02) 60%
    );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  to {
    background-position-x: -200%;
  }
}

.agent-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.agent-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.agent-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(132, 246, 173, 0.26);
  border-radius: 9px;
  color: var(--green);
  background: rgba(132, 246, 173, 0.07);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
}

.agent-name {
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-role {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.status-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  font-size: 0.66rem;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

[data-status="running"],
[data-status="completed"] {
  color: var(--green);
}

[data-status="waiting"],
[data-status="paused"],
[data-status="degraded"] {
  color: var(--amber);
}

[data-status="blocked"],
[data-status="error"],
[data-status="stale"] {
  color: var(--red);
}

[data-status="idle"],
[data-status="not_started"] {
  color: var(--muted);
}

.agent-task {
  min-height: 43px;
  margin: 0 0 16px;
  color: #d8e6e0;
  font-size: 0.82rem;
  line-height: 1.55;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.66rem;
}

.progress-track {
  height: 5px;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-value {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.agent-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.agent-heartbeat {
  display: block;
  margin-top: 10px;
  color: #748a82;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.64rem;
}

.workstream-list {
  border-top: 1px solid var(--line);
}

.workstream-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) 110px minmax(180px, 1fr) 1.2fr;
  gap: 20px;
  align-items: center;
  min-height: 88px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.workstream-row:last-child {
  border-bottom: 0;
}

.workstream-title strong,
.workstream-title small {
  display: block;
}

.workstream-title strong {
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.workstream-title small,
.workstream-next {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.workstream-context {
  min-width: 0;
}

.workstream-next {
  margin: 9px 0 0;
}

.workstream-progress .progress-track {
  margin: 8px 0 0;
}

.dependency-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.dependency-chip {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.61rem;
}

.dependency-chip.blocker {
  border-color: rgba(255, 143, 143, 0.22);
  color: var(--red);
  background: rgba(255, 143, 143, 0.035);
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.split-layout .panel {
  margin-bottom: 0;
}

.finding-list {
  display: grid;
  gap: 10px;
}

.finding {
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 9px;
  background: rgba(255, 200, 117, 0.035);
}

.finding[data-severity="critical"],
.finding[data-severity="high"] {
  border-left-color: var(--red);
  background: rgba(255, 143, 143, 0.035);
}

.finding[data-severity="info"] {
  border-left-color: var(--cyan);
}

.finding-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.finding strong {
  font-size: 0.8rem;
}

.finding span {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.61rem;
  text-transform: uppercase;
}

.finding p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.finding .finding-action {
  margin-top: 8px;
  color: #b7c8c1;
}

.event-list {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-list::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.event {
  position: relative;
  padding: 0 0 17px 24px;
}

.event:last-child {
  padding-bottom: 0;
}

.event::before {
  position: absolute;
  top: 5px;
  left: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface-strong);
  border-radius: 50%;
  background: var(--cyan);
  content: "";
}

.event strong,
.event time {
  display: block;
}

.event strong {
  font-size: 0.78rem;
  line-height: 1.45;
}

.event p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.event time {
  color: #70867e;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.61rem;
}

.empty-state,
.loading-row {
  margin: 0;
  padding: 20px 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.contract-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 1fr);
  gap: 34px;
  align-items: end;
  margin-top: 22px;
  padding: 28px;
  border: 1px solid rgba(132, 246, 173, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(120deg, rgba(132, 246, 173, 0.07), transparent 55%),
    var(--surface);
}

.contract-strip p:last-child {
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.contract-strip dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
}

.contract-strip dl div {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.contract-strip dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.65rem;
}

.contract-strip dd {
  margin: 0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

footer nav {
  display: flex;
  gap: 18px;
}

footer a {
  text-underline-offset: 3px;
}

.noscript {
  position: fixed;
  bottom: 0;
  width: 100%;
  margin: 0;
  padding: 12px;
  color: #191006;
  background: var(--amber);
  text-align: center;
}

@media (max-width: 920px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-card:nth-child(2) {
    border-right: 0;
  }

  .summary-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .agent-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .workstream-row {
    grid-template-columns: 1.5fr 100px 1fr;
  }

  .workstream-next {
    grid-column: 1 / -1;
    padding-left: 0;
  }

  .contract-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    min-height: 76px;
  }

  .header-meta time {
    display: none;
  }

  main {
    padding-top: 44px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .mode-card {
    max-width: none;
  }

  .summary-grid,
  .agent-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: 126px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-card:nth-child(3) {
    border-bottom: 1px solid var(--line);
  }

  .summary-card:last-child {
    border-bottom: 0;
  }

  .panel {
    padding: 20px;
  }

  .panel-heading {
    display: block;
  }

  .panel-heading > p {
    margin-top: 10px;
    text-align: left;
  }

  .workstream-row {
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 18px 0;
  }

  .workstream-progress,
  .workstream-next {
    grid-column: 1 / -1;
  }

  .contract-strip {
    padding: 22px;
  }

  .contract-strip dl {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  footer {
    display: block;
  }

  footer nav {
    margin-top: 12px;
  }
}
