/* EO demo — slate / cyan, no generic AI purple */
:root {
  --bg: #0b1220;
  --panel: #121a2b;
  --border: #243049;
  --text: #e8eef7;
  --muted: #9aabc4;
  --accent: #3dd6c6;
  --accent-dim: #1f6f68;
  --danger: #ff6b6b;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 600px at 10% -10%, #16324a 0%, transparent 55%),
    radial-gradient(900px 500px at 90% 0%, #1a2740 0%, transparent 50%), var(--bg);
  color: var(--text);
  font-family: var(--font);
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

header .lede {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 52rem;
  line-height: 1.45;
}

.layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1.25rem;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: color-mix(in srgb, var(--panel) 92%, black);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

#demo-list,
#model-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#model-list {
  margin-bottom: 1.25rem;
}

#demo-list button,
#model-list button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: #0e1626;
  color: var(--text);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  font: inherit;
}

#demo-list button:hover,
#model-list button:hover {
  border-color: var(--accent-dim);
}

#demo-list button.active,
#model-list button.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-dim) 35%, #0e1626);
}

#demo-list .meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
}

.controls label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.controls input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.stats {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.stage {
  position: relative;
  overflow: visible;
  background: #060a12;
  min-width: 0; /* allow grid child to shrink so width:100% works */
}

#viewport {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  display: inline-block;
}

footer {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 52rem;
}

.status {
  min-height: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.status.error {
  color: var(--danger);
}
