﻿:root {
  color-scheme: light;
  --bg: #eef2f6;
  --panel: #ffffff;
  --panel-soft: #e7edf3;
  --text: #101418;
  --muted: #5b6876;
  --line: #c6d1dc;
  --accent: #1f7a8c;
  --accent-2: #c75c1e;
  --good: #1f7a4f;
  --warn: #9f5a00;
  --viewport: #15202b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease, background-color 120ms ease;
}

button:hover {
  border-color: var(--accent);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  height: 100vh;
}

.sidebar {
  padding: 1.4rem;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.stack {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.35rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.35rem;
  line-height: 1.15;
}

h2 {
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}

.lede,
.notes {
  color: var(--muted);
  line-height: 1.5;
}

.panel-group + .panel-group {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.status-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.status-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.status-list dt {
  font-size: 0.82rem;
  color: var(--muted);
}

.status-list dd {
  margin: 0;
  font-weight: 600;
}

.status-help {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.controls {
  display: grid;
  gap: 0.65rem;
}

.notes {
  margin: 0;
  padding-left: 1.1rem;
}

.notes code {
  color: var(--text);
}

.viewport {
  position: relative;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, rgba(76, 201, 240, 0.18), transparent 0 30%),
    radial-gradient(circle at 50% 62%, rgba(255, 255, 255, 0.06), transparent 0 25%),
    linear-gradient(180deg, #25364a 0%, #13202c 48%, #101820 100%);
}

.viewport::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.2;
  pointer-events: none;
}

.viewport canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hud {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 2;
}

.hud span {
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(15, 20, 26, 0.72);
  backdrop-filter: blur(6px);
}

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .viewport {
    min-height: 56vh;
    height: 56vh;
  }
}
