/* theme_02 — Laboratory Instrument Console */
:root {
  --bg: #0b1117;
  --surface: #121a24;
  --surface-2: #16202c;
  --ink: #e6edf3;
  --accent: #10b981;
  --accent-dim: #10b98133;
  --muted: #8b949e;
  --danger: #f85149;
  --warn: #d29922;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: var(--accent); }
code, .mono { font-family: var(--mono); }

/* ---------- header / disclosure ---------- */
.hero {
  border-bottom: 1px solid #1f2a37;
  padding: 2rem 1.25rem 1.25rem;
  background:
    radial-gradient(1200px 300px at 20% -10%, #10b98114, transparent),
    var(--surface);
}
.hero h1 { margin: 0 0 .35rem; font-size: clamp(1.6rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
.hero .sub { color: var(--muted); max-width: 62ch; margin: 0; }
.disclosure-banner {
  margin: 1rem auto 0;
  max-width: 72rem;
  padding: .7rem 1rem;
  border: 1px solid #3d5a4a;
  border-left: 4px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 6px;
  font-size: .9rem;
}
.disclosure-banner strong { color: var(--accent); }

main { max-width: 72rem; margin: 0 auto; padding: 1.25rem; }

/* ---------- two-pane instrument console ---------- */
.console {
  display: grid;
  grid-template-columns: minmax(320px, 5fr) minmax(0, 7fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 900px) { .console { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid #1f2a37;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.card h2, .card h3 { margin: 0 0 .75rem; font-size: 1rem; letter-spacing: .02em; }
.card h3 { color: var(--accent); font-family: var(--mono); font-size: .85rem; text-transform: uppercase; }

/* input deck */
.deck label {
  display: block;
  font-size: .8rem;
  color: var(--muted);
  margin: .55rem 0 .15rem;
  font-family: var(--mono);
}
.deck input[type="number"], .deck select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid #2a3a4d;
  color: var(--ink);
  border-radius: 6px;
  padding: .45rem .55rem;
  font-family: var(--mono);
  font-size: .95rem;
}
.deck input:focus, .deck select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .8rem; }
button {
  background: var(--accent);
  color: #06281c;
  border: 0;
  border-radius: 6px;
  padding: .5rem .9rem;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  font-family: var(--mono);
}
button.ghost { background: var(--surface-2); color: var(--ink); border: 1px solid #2a3a4d; }
button:hover { filter: brightness(1.08); }
#sim-error { color: var(--danger); font-family: var(--mono); font-size: .85rem; min-height: 1.2em; margin-top: .5rem; }

/* telemetry pane */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
  margin-bottom: .8rem;
}
@media (max-width: 560px) { .telemetry-grid { grid-template-columns: repeat(2, 1fr); } }
.telemetry {
  background: var(--surface-2);
  border: 1px solid #2a3a4d;
  border-radius: 8px;
  padding: .6rem .7rem;
}
.telemetry .k { font-size: .68rem; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.telemetry .v { font-family: var(--mono); font-size: 1rem; color: var(--accent); }
.telemetry .v.warn { color: var(--warn); }
#curve-svg { width: 100%; height: auto; display: block; background: #0d141d; border: 1px solid #1f2a37; border-radius: 8px; }

/* rule evaluator */
.verdict {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.verdict.ok { color: var(--accent); }
.verdict.warn { color: var(--warn); }
.verdict.fail { color: var(--danger); }
#rules-rows td:first-child { font-family: var(--mono); font-weight: 700; width: 4.5rem; }
#rules-rows tr.rule-pass td:first-child { color: var(--accent); }
#rules-rows tr.rule-warn td:first-child { color: var(--warn); }
#rules-rows tr.rule-fail td:first-child { color: var(--danger); }

/* sensitivity / rubric tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .82rem; }
th, td { text-align: right; padding: .4rem .5rem; border-bottom: 1px solid #1f2a37; }
th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: .68rem; letter-spacing: .05em; }
td:first-child, th:first-child { text-align: left; }
#rules-rows td:nth-child(2) { text-align: left; }

/* rubric */
.rubric-score {
  display: flex; gap: 1.2rem; align-items: baseline; flex-wrap: wrap;
  margin-bottom: .8rem;
}
.rubric-score .big { font-family: var(--mono); font-size: 2.4rem; color: var(--accent); }
.rubric-score .grade { font-family: var(--mono); font-size: 1.6rem; color: var(--ink); }
.rubric-row {
  display: flex; align-items: center; gap: .6rem;
  padding: .4rem 0; border-bottom: 1px solid #16202c;
  font-size: .88rem; cursor: pointer;
}
.rubric-row input { accent-color: var(--accent); width: 16px; height: 16px; }
.rubric-label { flex: 1; }
.rubric-w { font-family: var(--mono); color: var(--muted); font-size: .78rem; }
#rubric-rows td:first-child { font-family: var(--mono); font-weight: 700; }
#rubric-rows tr.ok td:first-child { color: var(--accent); }
#rubric-rows tr.miss td:first-child { color: var(--danger); }

/* reference sections */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.25rem; margin-top: 2rem; }
.prose p, .prose li { color: #c9d4e0; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem; }
.kv .telemetry .v { font-size: 1rem; }

/* footer */
.foot {
  border-top: 1px solid #1f2a37;
  margin-top: 2.5rem;
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
}
.foot nav { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; margin-bottom: .6rem; }
