* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0f;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}
h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

.date-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.step-btn {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-width: auto;
  line-height: 1;
}
.step-btn:hover { background: #334155; color: #e0e0e0; }
#date-display {
  font-size: 1.8rem;
  font-weight: 700;
  color: #60a5fa;
  font-variant-numeric: tabular-nums;
  min-width: 180px;
  text-align: center;
}

.dashboard {
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 1600px;
  align-items: stretch;
}
.asset-col, .curve-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
#chart {
  width: 100%;
  height: 440px;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  min-height: 30px;
}
.window-bar .win-label {
  font-size: 0.85rem;
  color: #94a3b8;
  white-space: nowrap;
}
input[type="date"], select {
  color-scheme: dark;
  background: #1a1a24;
  color: #e0e0e0;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
}
input[type="date"]:hover, select:hover { border-color: #334155; }
input[type="date"]:focus, select:focus { outline: none; border-color: #3b82f6; }

.chart-card {
  background: #12121a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 8px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex: none;
}
.card-type {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.card-plot {
  width: 100%;
  flex: 1;
  min-height: 400px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
  flex-wrap: wrap;
}
button {
  background: #1e293b;
  color: #e0e0e0;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
  min-width: 80px;
}
button:hover { background: #334155; }
button.active { background: #2563eb; border-color: #3b82f6; color: #fff; }
#slider {
  flex: 1;
  min-width: 200px;
  accent-color: #3b82f6;
  cursor: pointer;
}
.scrub-row {
  position: relative;
  margin-top: 8px;
  padding-left: 60px;
  padding-right: 24px;
}
#play-btn {
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  min-width: auto;
  padding: 5px 0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1;
}
#speed-slider, #trail-slider {
  width: 110px;
  accent-color: #3b82f6;
  cursor: pointer;
}
#speed-val, #trail-val {
  font-size: 0.85rem;
  color: #94a3b8;
  min-width: 32px;
  font-variant-numeric: tabular-nums;
}
.ctrl-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ctrl-group label {
  font-size: 0.85rem;
  color: #94a3b8;
  white-space: nowrap;
}
.sm-btn {
  padding: 4px 10px;
  font-size: 0.8rem;
  min-width: auto;
}
.sm-btn.active { background: #2563eb; border-color: #3b82f6; }
#loading {
  font-size: 1.2rem;
  color: #94a3b8;
  margin-top: 40px;
}
.home-link {
  align-self: flex-start;
  font-size: 0.85rem;
  color: #64748b;
  text-decoration: none;
  margin-bottom: 8px;
}
.home-link:hover { color: #60a5fa; }
#last-updated {
  display: none;
  margin-top: 14px;
  font-size: 0.75rem;
  color: #475569;
  letter-spacing: 0.03em;
}

@media (max-width: 1000px) {
  .dashboard { flex-direction: column; }
  .asset-col, .curve-col { width: 100%; flex: none; }
  .chart-card { flex: none; margin-top: 12px; }
  .card-plot { flex: none; height: 360px; min-height: 0; }
}
