:root {
  --fg: #1a1a1a;
  --muted: #666;
  --bg: #fafafa;
  --panel-bg: #fff;
  --border: #e4e4e4;
  --max-width: 1100px;
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  margin: 0;
  padding: 0;
}
header, main, footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
}
h1 { margin: 0 0 0.25rem 0; font-size: 1.5rem; }
.muted { color: var(--muted); font-size: 0.9rem; margin: 0; }
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.plot { width: 100%; min-height: 380px; }
.error { color: #b00; }
footer { font-size: 0.85rem; }

/* Loading placeholder, replaced by Plotly once data loads. */
.loading {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
  padding: 1rem 0;
}

/* Each .panel has an <h2 class="panel-title"> for screen readers /
   aria-labelledby. Plotly renders the same title inside the chart, so the
   visual heading is hidden but kept in the accessibility tree
   (this is the canonical WAI-ARIA "visually-hidden" pattern). */
.panel-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
