/* styles.css — MET-AL Ensemble Verification Views
   Dark metallic "heavy-metal" aesthetic: chrome/steel on near-black, with
   readable scientific content. No external fonts or assets (system stacks). */

:root {
  --bg: #0a0c10;
  --bg-2: #0e1014;
  --panel: #13161c;
  --panel-2: #171b22;
  --steel: #2a313c;
  --steel-lt: #3a4252;
  --chrome: linear-gradient(180deg, #e8eef6 0%, #aab6c6 38%, #7e8a9c 52%, #c3cdda 70%, #8d99ab 100%);
  --chrome-dim: linear-gradient(180deg, #c5ccd6 0%, #8a94a4 60%, #aab4c2 100%);
  --text: #c9d4e2;
  --text-dim: #8a97a8;
  --accent: #6fa8d6;
  --accent-warm: #e0a64a;
  --good: #79e0b0;
  --bad: #e07a5f;
  --hair: rgba(176,196,222,0.10);
  --hair-2: rgba(176,196,222,0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(60,72,92,0.30), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(40,50,66,0.28), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ---- SYNTHETIC banner ---- */
.synthetic-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #1a1207;
  background: repeating-linear-gradient(45deg, #e0a64a 0 18px, #c98f33 18px 36px);
  padding: 5px 10px;
  border-bottom: 1px solid #6e5320;
  text-transform: uppercase;
}

/* ---- header ---- */
.app-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--steel);
  background: linear-gradient(180deg, rgba(30,36,46,0.55), rgba(12,14,18,0.2));
}
.logo {
  height: 64px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.title-block { flex: 1; min-width: 0; }
.app-header h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.subtitle { margin: 4px 0 0; color: var(--text-dim); font-size: 13px; max-width: 70ch; }
.subtitle .mono { color: var(--accent); }

.pill {
  align-self: flex-start;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--steel-lt);
  background: #12151b;
  color: var(--text-dim);
  white-space: nowrap;
}
.pill.ok { color: var(--good); border-color: rgba(121,224,176,0.4); }
.pill.bad { color: var(--bad); border-color: rgba(224,122,95,0.5); }

/* ---- layout ---- */
.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  padding: 18px 24px 26px;
  align-items: start;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0) 40%),
    var(--panel);
  border: 1px solid var(--steel);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px rgba(0,0,0,0.35);
}

/* ---- controls ---- */
.controls {
  padding: 16px 16px 18px;
  position: sticky;
  top: 38px;
}
.controls h2 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.controls h3 {
  margin: 4px 0 10px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.controls hr { border: none; border-top: 1px solid var(--hair); margin: 16px 0 14px; }

.control { margin-bottom: 14px; }
.control label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}
.control .val {
  display: inline-block;
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--accent);
  margin-top: 3px;
}
.control .hint {
  display: block;
  font-size: 10.5px;
  color: var(--text-dim);
  margin: 2px 0 0;
}
.control.headline {
  background: linear-gradient(180deg, rgba(111,168,214,0.08), rgba(111,168,214,0.02));
  border: 1px solid rgba(111,168,214,0.28);
  border-radius: 8px;
  padding: 12px 12px 10px;
}
.control.headline label { color: #d7e6f5; }
.control.headline .val { color: #bfe0ff; font-weight: 700; }
.control.check label { font-weight: 500; display: flex; align-items: center; gap: 6px; }

select, input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--steel-lt);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(90deg, #2a313c, #4a5568);
  border: 1px solid #1b2028;
  margin-top: 4px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--chrome);
  border: 1px solid #5a6678;
  box-shadow: 0 1px 3px rgba(0,0,0,0.6);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #c3cdda;
  border: 1px solid #5a6678;
  cursor: pointer;
}

.reset {
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(180deg, #2a313c, #1a1f27);
  border: 1px solid var(--steel-lt);
  border-radius: 7px;
  cursor: pointer;
}
.reset:hover { border-color: var(--accent); color: #eaf2fb; }

.meta {
  margin: 14px 0 0;
  font-size: 11px;
  color: var(--text-dim);
  border-top: 1px solid var(--hair);
  padding-top: 10px;
  line-height: 1.6;
}
.meta b { color: var(--text); }

/* ---- panels grid ---- */
.panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.panel.diag { padding: 14px 14px 16px; display: flex; flex-direction: column; }
.panel.wide { grid-column: 1 / -1; }

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 10px;
}
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 700; color: #e4ecf5; }
.met-tag {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #9fb6cf;
  background: #11161d;
  border: 1px solid var(--steel-lt);
  border-radius: 5px;
  padding: 2px 7px;
  white-space: nowrap;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
  border: 1px solid var(--hair-2);
  border-radius: 7px;
  overflow: hidden;
}
.canvas-wrap canvas { width: 100%; height: 100%; display: block; }

.readout {
  margin: 9px 0 0;
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--text);
}
.readout b { color: var(--accent); }
.readout.crps { color: var(--good); }
.readout.crps b { color: var(--good); }

.guide {
  margin: 7px 0 0;
  font-size: 10.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* contingency strip */
.readout.ctc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ctc-cell {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: #e4ecf5;
  background: #11161d;
  border: 1px solid var(--steel-lt);
  border-radius: 5px;
  padding: 3px 9px;
}
.ctc-scores {
  flex-basis: 100%;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ---- footer ---- */
.app-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--steel);
  color: var(--text-dim);
  font-size: 11px;
}
.app-footer .mono { color: var(--accent-warm); }

/* ---- responsive ---- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .controls { position: static; }
  .panels { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .app-header { flex-wrap: wrap; }
  .logo { height: 48px; }
}
