:root {
  --ink: #172126;
  --muted: #657279;
  --line: #dce3e6;
  --paper: #f5f7f6;
  --red: #df5035;
  --navy: #1c3f49;
  --green: #0b5e43;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, sans-serif;
}

code {
  font-size: 0.92em;
  background: #edf3f3;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 4vw;
  min-height: 70px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand h1 {
  margin: 0;
  color: var(--red);
  font: 26px Georgia, serif;
}

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

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 28px 4vw;
  color: #fff;
  background: var(--navy);
}

.hero h2 {
  margin: 4px 0 8px;
  font: 500 clamp(28px, 4vw, 42px)/1.05 Georgia, serif;
}

.hero p:not(.eyebrow) {
  margin: 0;
  max-width: 52rem;
  color: #c8d6da;
  font-size: 14px;
  line-height: 1.5;
}

.eyebrow {
  margin: 0;
  color: #ee947f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hero-badge {
  min-width: 240px;
  padding: 14px 18px;
  background: #12323b;
  border-left: 3px solid var(--red);
}

.hero-badge span,
.hero-badge small {
  display: block;
  color: #a9bdc2;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.hero-badge b {
  display: block;
  margin: 4px 0;
  font: 18px Georgia, serif;
}

.workspace {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 4vw 40px;
  display: grid;
  grid-template-columns: minmax(320px, 380px) 1fr;
  gap: 22px;
  align-items: start;
}

.panel-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel,
.results {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 5px 18px rgba(20, 40, 46, 0.04);
  padding: 18px;
}

.panel h3,
.results h2 {
  margin: 0 0 14px;
  font: 600 18px Georgia, serif;
}

.hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #46555b;
}

input,
select {
  width: 100%;
  border: 1px solid #ccd6da;
  border-radius: 3px;
  background: #fbfcfc;
  color: var(--ink);
  font: 14px Arial;
  padding: 8px 9px;
}

input:focus,
select:focus {
  border-color: #4b7b88;
  box-shadow: 0 0 0 2px #dce9ec;
  outline: none;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.row.gap { gap: 8px; }

button {
  border: 0;
  border-radius: 3px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

button.primary {
  width: 100%;
  margin-top: 8px;
  background: var(--navy);
  color: #fff;
}

button.primary:hover { background: #285966; }

button.secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--navy);
}

button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.file-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  background: var(--green);
  color: #fff;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.gm-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
}

.gm-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #edf0f1;
  font-size: 11px;
}

.gm-list li:first-child { border-top: 0; }

.gm-list li span:last-of-type {
  color: var(--muted);
  white-space: nowrap;
}

.gm-list .muted {
  padding: 10px;
  color: var(--muted);
}

.scenario-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-bottom: 8px;
}

.scenario-table th,
.scenario-table td {
  border: 1px solid var(--line);
  padding: 6px;
  text-align: center;
}

.scenario-table th:first-child { text-align: left; }

.scenario-table input {
  padding: 6px;
  font-size: 12px;
}

.status {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: #edf3f3;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
}

.status.error {
  background: #fff1ed;
  color: #a24130;
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.plot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.plot-card {
  border: 1px solid var(--line);
  background: #fff;
}

.plot-canvas {
  display: block;
  width: 100%;
  height: 320px;
}

.plot-caption {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 8px 10px;
  border-top: 1px solid #edf0f1;
  text-align: left;
}

th {
  background: #f1f4f4;
  color: #5c6b71;
  font-size: 10px;
  text-transform: uppercase;
}

.note {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff8f5;
  border-left: 3px solid var(--red);
  color: #626e73;
  font-size: 11px;
  line-height: 1.5;
}

footer {
  padding: 20px 4vw 28px;
  text-align: center;
  color: #7d898e;
  font-size: 10px;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .hero-badge { display: none; }
}
