:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --ink: #172033;
  --muted: #64748b;
  --panel: #ffffff;
  --line: #dbe3ec;
  --surface: #1167b1;
  --accent: #e6a700;
  --page: #eef3f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

.site-header {
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
  background: linear-gradient(135deg, #0f3150, #164f7d);
  color: white;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.site-header p {
  max-width: 70rem;
  margin: 0.5rem 0 0;
  color: #d7e7f5;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(15rem, 20rem) minmax(24rem, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  box-shadow: 0 0.7rem 2rem rgba(15, 49, 80, 0.08);
}

.controls {
  padding: 1rem;
}

.controls h2,
.details h2 {
  margin-top: 0;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.field label {
  font-size: 0.86rem;
  color: var(--muted);
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.72rem;
  font: inherit;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

button {
  border: 0;
  border-radius: 0.7rem;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary {
  grid-column: 1 / -1;
  background: var(--surface);
  color: white;
}

.secondary {
  background: #e8eef5;
  color: var(--ink);
}

.status {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.workspace {
  display: grid;
  gap: 1rem;
}

.canvas-panel {
  min-height: 34rem;
  overflow: hidden;
}

#wave-canvas {
  display: block;
  width: 100%;
  height: 34rem;
}

.regime-banner {
  border-radius: 0.8rem;
  padding: 0.9rem;
  background: #0f3150;
  color: white;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.details {
  padding: 1rem;
}

.details details {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}

.details summary {
  cursor: pointer;
  font-weight: 800;
}

table {
  width: 100%;
  margin-top: 0.8rem;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem;
  text-align: left;
}

.theory-map {
  display: block;
  width: 100%;
  aspect-ratio: 498.145188 / 465.162727;
  margin-top: 1rem;
  border: 0;
}

.note {
  color: var(--muted);
  line-height: 1.6;
}

footer {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
}

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

  .canvas-panel,
  #wave-canvas {
    min-height: 26rem;
    height: 26rem;
  }
}

.project-links {
  margin-top: 1rem;
}

.project-links a,
footer a {
  font-weight: 700;
}

.project-links a:hover,
.project-links a:focus,
footer a:hover,
footer a:focus {
  text-decoration: underline;
}
