:root {
  color-scheme: dark;
  --bg: #0c0f0c;
  --panel: #121714;
  --panel-2: #171c19;
  --ink: #f6f1e6;
  --muted: #b6b9ad;
  --line: rgba(246, 241, 230, 0.16);
  --mint: #20c997;
  --cyan: #38d9e8;
  --amber: #f59f00;
  --red: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(12, 15, 12, 0.96), rgba(12, 15, 12, 0.86)),
    repeating-linear-gradient(90deg, rgba(246, 241, 230, 0.04) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(246, 241, 230, 0.035) 0 1px, transparent 1px 84px);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.demo-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(246, 241, 230, 0.08);
  background: rgba(12, 15, 12, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101611;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 36px;
  height: auto;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--ink);
}

.demo-shell {
  padding: clamp(42px, 7vw, 76px) clamp(18px, 5vw, 76px) 76px;
}

.demo-copy {
  max-width: 980px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.96;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
}

.lede {
  max-width: 720px;
  margin-bottom: 0;
  color: #e4dfd2;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.42;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric,
.control-panel,
.result-panel,
.agent-guide,
.endpoint-grid a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 20, 0.84);
}

.metric {
  min-height: 110px;
  padding: 18px;
}

.metric span,
.last-run dt,
.endpoint-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  color: var(--ink);
  font-size: clamp(18px, 2vw, 24px);
  overflow-wrap: anywhere;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 0.62fr);
  gap: 16px;
  align-items: stretch;
}

.control-panel,
.result-panel {
  padding: clamp(20px, 3vw, 30px);
}

.panel-heading {
  margin-bottom: 22px;
}

.button-stack {
  display: grid;
  gap: 10px;
}

button {
  display: flex;
  min-height: 52px;
  width: 100%;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(246, 241, 230, 0.2);
  border-radius: 8px;
  padding: 0 14px;
  background: #101611;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  border-color: rgba(32, 201, 151, 0.72);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

button span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  background: var(--mint);
  color: #06110d;
  font-size: 12px;
}

.last-run {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
}

.last-run div {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.last-run dd {
  margin: 0;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

pre {
  min-height: 430px;
  max-height: 62vh;
  margin: 0;
  overflow: auto;
  border: 1px solid rgba(246, 241, 230, 0.12);
  border-radius: 8px;
  padding: 18px;
  background: #080b09;
  color: #d8f8ec;
  font: 500 13px / 1.62 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.agent-guide {
  display: grid;
  grid-template-columns: minmax(280px, 0.34fr) minmax(280px, 0.34fr) minmax(0, 0.32fr);
  gap: 16px;
  margin-top: 16px;
  padding: clamp(20px, 3vw, 30px);
}

.agent-guide p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.agent-list {
  display: grid;
  gap: 10px;
}

.agent-list a {
  display: block;
  border: 1px solid rgba(246, 241, 230, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: #101611;
}

.agent-list a:hover {
  border-color: rgba(32, 201, 151, 0.72);
}

.agent-list span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.agent-list strong {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.agent-snippet {
  min-height: 0;
  max-height: none;
}

.endpoint-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.endpoint-grid a {
  min-height: 108px;
  padding: 18px;
}

.endpoint-grid strong {
  display: block;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.endpoint-grid a:hover {
  border-color: rgba(56, 217, 232, 0.72);
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .status-grid,
  .workspace,
  .agent-guide,
  .endpoint-grid {
    grid-template-columns: 1fr;
  }

  pre {
    min-height: 320px;
    max-height: none;
  }
}
