/* Control-room refinements shared by the four reference dashboards. */
.ref {
  --panel-edge: #22435b;
  --panel-top: #102a40;
  --accent: #60e7f2;
  color: #eef7ff;
  background: radial-gradient(ellipse at 50% 0, #122942 0, transparent 37rem), #050e1a;
  font-size: clamp(13px, .87vw, 16px);
}
.ref .ref-shell { padding-inline: clamp(10px, 1.15vw, 22px); }
.ref .ref-head { min-height: 116px; background-blend-mode: screen; }
.ref .ref-head h1 { font-size: clamp(27px, 2.85vw, 46px); text-shadow: 0 0 20px #149dc170; }
.ref .ref-head strong { font-size: clamp(12px, 1vw, 17px); margin-block: 4px; }
.ref .ref-head small { color: #b6d2e7; }
.ref .ref-nav, .ref .ref-foot {
  border-radius: 12px; border-color: #284962; background: #0a192a;
}
.ref .ref-nav { justify-content: flex-start; }
.ref .ref-nav a { padding-block: 9px; color: #c1d5e8; }
.ref .ref-nav .active {
  background: #143b51; box-shadow: inset 0 -2px #56e1ee; color: #f0fdff;
}
.ref .ref-status {
  min-height: 25px; padding: 3px 8px; margin-block: 0 9px;
  color: #ffd794; background: #17212b; border-radius: 6px; text-align: start;
}
.ref .ref-grid, .ref .ref-stack { gap: clamp(9px, .85vw, 16px); }
.ref .ref-box {
  border-color: var(--panel-edge); border-radius: 13px;
  background: linear-gradient(160deg, #102338, #081828 58%);
  box-shadow: 0 8px 18px #0003;
}
.ref .ref-body { padding: clamp(8px, .8vw, 14px); }
.ref .ref-box h2 {
  padding: 8px 12px; color: #f0f9ff; background: var(--panel-top);
  border-bottom-color: #25465e; text-shadow: none; line-height: 1.5;
}
.ref .ref-box h2 span { color: var(--accent); }
.ref .ref-alert { border-color: #754154; background: linear-gradient(160deg, #251c2c, #111b2c); }
.ref .ref-box th, .ref .ref-box td { padding-block: .46em; border-bottom-color: #254158; }
.ref .ref-box th { color: #c6dcec; }
.ref .ref-box tbody tr:last-child > * { border-bottom-color: transparent; }
.ref .ref-box tbody tr:hover { background: #18384e80; }
.ref .ref-box button[data-symbol]:not(.ref-planets button) {
  color: #e8f7ff; background: transparent; border-color: transparent;
  text-align: start; padding-inline: 3px;
}
.ref .ref-box button[data-symbol][aria-pressed=true]:not(.ref-planets button) {
  background: #164259; border-color: #3a738d;
}
.ref .ref-chart-head { gap: .45rem .8rem; }
.ref .ref-chart-head [data-price] { color: #e4faff; font-size: clamp(20px, 2.05vw, 35px); }
.ref .ref-price-change { padding: 3px 8px; border-radius: 7px; background: #0b3538; }
.ref .ref-price-change.down { background: #402334; }
.ref .ref-plot { margin: 0; min-width: 0; }
.ref .ref-plot canvas { height: clamp(205px, 17vw, 310px); border: 1px solid #22475e; border-radius: 9px; }
.ref .ref-plot canvas.mini-chart { height: clamp(145px, 11vw, 205px); }
.ref .ref-chart-reading {
  display: block; min-height: 1.9em; margin-top: 6px; padding: 3px 7px;
  color: #c3deef; background: #0f2438; border-radius: 5px;
  font-size: .87em; font-variant-numeric: tabular-nums;
}
.ref .ref-chip { background: #112d43; border-color: #305270; }
.ref .ref-scenario { border-radius: 10px; }
.ref .ref-scenario strong { font-size: 1.06em; }
.ref .ref-scenario small { color: #cee3f4; }
.ref .ref-time-controls { margin-top: 8px; min-width: 0; }
.ref .ref-time-controls input { width: 100%; }
.ref .ref-time-controls button { min-height: 36px; }
.ref #year-label { padding: 4px 12px; min-width: 5.2em; text-align: center; color: #a4f5ff; background: #163d55; border-radius: 7px; }
.ref #investment-asset { max-width: 100%; }
.ref [hidden] { display: none !important; }
.ref .ref-strip, .ref .ref-nav { scrollbar-width: thin; scrollbar-color: #3a718b #0b1c2a; }
@media (max-width: 1050px) {
  .ref .ref-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); }
  .ref .ref-grid > .center { grid-area: 1 / 1; }
  .ref .ref-grid > .right { grid-area: 1 / 2; grid-template-columns: minmax(0, 1fr); }
  .ref .ref-grid > .left { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
  .ref .ref-twin > .left { grid-area: 1 / 2; grid-template-columns: minmax(0, 1fr); }
  .ref[data-route="universe"] .ref-grid > .center > .ref-third,
  .ref[data-route="time-machine"] .ref-grid > .center > .ref-third { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .ref .ref-head { min-height: 0; }
  .ref .ref-nav { padding-inline: 5px; }
  .ref .ref-grid { grid-template-columns: minmax(0, 1fr); }
  .ref .ref-grid > .center, .ref .ref-grid > .right, .ref .ref-grid > .left, .ref .ref-grid > .scenes { grid-area: auto; grid-template-columns: minmax(0, 1fr); }
  .ref .ref-grid > .center { order: -3; }
  .ref .ref-grid > .right { order: -2; }
  .ref .ref-grid > .scenes { order: -1; }
  .ref .ref-twin { display: contents; }
  .ref .ref-twin > .left { margin-top: 10px; }
  .ref[data-route="twin"] #dashboard { display: flex; flex-direction: column; }
  .ref[data-route="twin"] .ref-bottom { order: -2; }
  .ref .ref-nav a, .ref .ref-controls button, .ref .ref-strip button { min-height: 40px; }
  .ref .ref-controls button { min-width: 40px; }
  .ref .ref-box .ref-body { padding-inline: 9px; }
  .ref .ref-plot canvas { height: 226px; }
}

