:root {
  --bg: #0f172a; /* slate-900 */
  --panel: #111827; /* gray-900 */
  --muted: #334155; /* slate-600 */
  --text: #e5e7eb; /* gray-200 */
  --accent: #22c55e; /* green-500 */
  --accent-2: #06b6d4; /* cyan-500 */
  --danger: #ef4444; /* red-500 */
  --border: #1f2937; /* gray-800 */
  --card: #0b1220;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter,
    Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #0b1020, #0a0f1a 60%, #0b0f19);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
header .title {
  font-weight: 800;
  letter-spacing: 0.3px;
}
#app {
  flex: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: 0;
}
nav {
  background: var(--panel);
  border-right: 1px solid var(--border);
  overflow: auto;
  padding: 12px;
}
.tab {
  display: block;
  width: 100%;
  text-align: left;
  background: #0b1220;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.15s transform, 0.15s background;
}
.tab:hover {
  transform: translateY(-1px);
  background: #0a1426;
}
.tab.active {
  outline: 2px solid var(--accent);
  background: #0a1322;
}
main {
  position: relative;
  overflow: hidden;
}
.view {
  position: absolute;
  inset: 0;
  display: none;
}
.view.active {
  display: flex;
} /* Panels inside views */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.grid {
  display: grid;
  gap: 12px;
}
.grid-2 {
  grid-template-columns: 1.2fr 1fr;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
}
input,
textarea,
select,
button {
  font: inherit;
}
input[type="text"],
input[type="number"],
textarea,
select {
  background: #0a1322;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
}
textarea {
  min-height: 80px;
  resize: vertical;
}
button {
  background: var(--accent);
  color: #071013;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}
button.secondary {
  background: #0c172a;
  color: #d1d5db;
  border: 1px solid var(--border);
}
button.ghost {
  background: transparent;
  border: 1px dashed var(--muted);
  color: #94a3b8;
}
button.warn {
  background: var(--danger);
  color: white;
}
small {
  color: #93a2b4;
}
label {
  font-size: 12px;
  color: #aab4c7;
}
.list {
  max-height: 180px;
  overflow: auto;
  border: 1px dashed var(--border);
  padding: 8px;
  border-radius: 8px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono",
    monospace;
  font-size: 12px;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  min-height: 0;
} /* Graphing surfaces */
#canvas2dContainer {
  position: relative;
  min-height: 260px;
  flex: 1;
}
#graphCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #0a1320;
  border-radius: 10px;
}
#plot3d {
  position: absolute;
  inset: 0;
  display: none;
}
.pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: #0b1322;
}
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.right {
  margin-left: auto;
} /* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}
td,
th {
  border: 1px solid var(--border);
  padding: 6px 8px;
  font-size: 13px;
}
th {
  text-align: left;
  background: #0a1426;
} /* Responsive */
@media (max-width: 980px) {
  #app {
    grid-template-columns: 1fr;
  }
  nav {
    display: flex;
    gap: 8px;
    overflow: auto;
    white-space: nowrap;
  }
  .tab {
    min-width: 180px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
