:root {
  --bg: #050914;
  --panel: rgba(14, 28, 52, 0.9);
  --line: rgba(145, 188, 255, 0.2);
  --text: #eaf1ff;
  --muted: #90a8d6;
  --ok: #76ff9b;
  --warn: #ffd46a;
  --bad: #ff6c7e;
  --panel-2: rgba(6, 16, 35, 0.84);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(118, 255, 155, 0.12), transparent 35%),
    radial-gradient(circle at 80% 100%, rgba(122, 191, 255, 0.14), transparent 35%),
    linear-gradient(135deg, #04101e, #050a14 60%, #02060d);
  color: var(--text);
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.8;
}

.shell {
  position: relative;
  width: min(1200px, 96%);
  margin: 18px auto 30px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.brand {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.pill {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(2, 10, 24, 0.8);
  font-size: 12px;
}

.layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  backdrop-filter: blur(2px);
}

.panel h1, .panel h2, .panel h3 { margin: 0 0 10px; }

.panel > p { margin-top: 0; }

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

.card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.card h3 { margin: 0 0 8px; font-size: 14px; }

.card p { margin: 0; font-size: 13px; color: var(--muted); }

#command-form { margin: 8px 0 12px; }
#command-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #020a17;
  color: var(--text);
  padding: 10px;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 14px;
}

.command-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }

.example-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #03112a;
  color: var(--text);
  padding: 8px 11px;
  cursor: pointer;
}

button:hover { border-color: rgba(122, 191, 255, 0.7); }

button.ghost { background: transparent; }

.history-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  max-height: 180px;
  overflow: auto;
}

.history-list li {
  margin: 0;
  padding: 5px 0 5px 8px;
  border-left: 2px solid rgba(122, 191, 255, 0.4);
  color: var(--muted);
  font-size: 13px;
}

.command-output, .trace-box {
  background: #020b18;
  border: 1px solid rgba(122, 191, 255, 0.25);
  border-radius: 10px;
  min-height: 84px;
  padding: 10px;
  white-space: pre-wrap;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 12px;
}

.trace-box { max-height: 220px; overflow: auto; }

.trace-box p { margin: 4px 0; }

.progress-panel {
  border: 1px solid rgba(145, 188, 255, 0.25);
  border-radius: 10px;
  padding: 10px;
  background: #020b18;
  min-height: 86px;
}

.court-box {
  margin-top: 10px;
}

.court-box ul { margin: 8px 0 0 16px; padding: 0; }

#artifact-preview {
  width: 100%;
  height: 360px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 8px;
  background: white;
}

#artifact-preview.loaded { border-color: rgba(118, 255, 155, 0.7); }

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

.usage-card {
  min-height: 58px;
  display: flex;
  align-items: center;
}

.small-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.muted { color: var(--muted); font-size: 13px; }

.mono {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  color: #8af0ff;
}

.status-ok { color: var(--ok); }
.status-bad { color: var(--bad); }
.status-warn { color: var(--warn); }

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

.footnote {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
