:root {
  --text: #f7faff;
  --muted: #a8b6c9;
  --subtle: #7e8da3;
}

/* Readability pass */
body { font-size: 16px; }
.brand-copy strong { font-size: 15px; letter-spacing: .10em; }
.brand-copy small { font-size: 9px; }
.public-nav { font-size: 13px; }
.eyebrow, .section-kicker { font-size: 10px; }
.lede { font-size: 16px; }
.stat-card small { font-size: 9px; }
.stat-card > span { font-size: 10px; }
.panel-head h2 { font-size: 21px; }
.legend { font-size: 10px; }
.filter-label { font-size: 9px; }
.searchbox input, .toolbar select { font-size: 13px; }
.result-summary small { font-size: 9px; }
.result-summary strong { font-size: 15px; }
.page-status, .pager-button, .sort-control, .sort-control select { font-size: 10px; }
.axis-label { font-size: 11px; fill: #8291a7; }
.event-label { font-size: 10px; }
.mover-copy strong { font-size: 12.5px; }
.mover-copy small, .mover-delta { font-size: 9.5px; }
.detail-manufacturer, .detail-title-block .section-kicker { font-size: 9px; }
.detail-grid-public span { font-size: 10px; }
.availability-grid strong { font-size: 10.5px; }
.history-row time, .history-row strong, .state-row { font-size: 8.5px; }
.change-row time, .change-main span { font-size: 9px; }
.change-main strong { font-size: 11px; }
.method-strip p:last-child, footer { font-size: 10px; }

/* Stronger chart contrast */
.grid-line { stroke: rgba(255,255,255,.085); }
.axis-line { stroke: rgba(255,255,255,.20); }
.ship-line {
  stroke-width: 2.4;
  opacity: .58;
  stroke-linecap: round;
}
.ship-line.active {
  stroke-width: 3.5;
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(255,255,255,.12));
}
.ship-line.state-solid,
.price-jump.state-solid {
  stroke-dasharray: none;
  stroke-linecap: round;
}
.ship-line.state-dashed,
.price-jump.state-dashed {
  stroke-dasharray: 7 5;
  stroke-linecap: butt;
}
.price-jump { stroke-width: 2.8; opacity: .82; }
.price-jump.active { stroke-width: 3.8; }
.bubble-string { opacity: .82; stroke-width: 1.5; }

/* Legend: color means purchase availability; line style means flight readiness. */
.legend-line {
  width: 18px;
  height: 0;
  display: inline-block;
  border-top: 2px solid #aab6c7;
}
.legend-line.dashed { border-top-style: dashed; }
.legend-swatch.available { background: var(--green); }
.legend-swatch.unavailable { background: var(--gray); }

/* Ship-detail event availability */
.availability-events {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #09101a;
}
.availability-events > small {
  display: block;
  color: #66778f;
  font-size: 6.2px;
  font-weight: 850;
  letter-spacing: .08em;
  margin-bottom: 7px;
}
.availability-event-content {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 22px;
}
.availability-event-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid;
  border-radius: 999px;
  color: var(--event-color);
  font-size: 7.5px;
  font-weight: 760;
  line-height: 1.15;
  white-space: nowrap;
}
.availability-always {
  color: var(--green-2);
  font-size: 8.5px;
  font-weight: 760;
}
.availability-none {
  color: #8291a7;
  font-size: 8.5px;
}

/* Hidden StarChill fleet mode */
.brand-mark { cursor: pointer; }
body.fleet-mode .brand-mark {
  filter: drop-shadow(0 0 10px rgba(91,214,164,.65));
}
.fleet-mode-banner {
  width: min(1360px, calc(100% - 32px));
  margin: 10px auto 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(91,214,164,.30);
  border-radius: 10px;
  background: rgba(7,15,22,.94);
  box-shadow: 0 0 28px rgba(91,214,164,.07);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}
.fleet-mode-banner[hidden] { display: none; }
.fleet-mode-banner span {
  color: #5bd6a4;
  font-weight: 800;
  letter-spacing: .12em;
}
.fleet-mode-banner strong { color: var(--text); }
.fleet-mode-banner button {
  margin-left: 6px;
  border: 1px solid rgba(91,214,164,.28);
  border-radius: 8px;
  background: rgba(91,214,164,.08);
  color: #bdf5df;
  min-height: 28px;
  padding: 0 10px;
  font: inherit;
  cursor: pointer;
}
.fleet-ship-row {
  position: relative;
  box-shadow: inset 2px 0 0 rgba(91,214,164,.75);
  background: linear-gradient(90deg, rgba(91,214,164,.08), transparent 40%);
}
.fleet-ship-row::after {
  content: '★';
  position: absolute;
  top: 7px;
  right: 8px;
  color: #5bd6a4;
  font-size: 10px;
  opacity: .85;
}
.fleet-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 9999;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(91,214,164,.30);
  border-radius: 999px;
  background: rgba(5,11,17,.96);
  color: #d9fff0;
  padding: 9px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 26px rgba(91,214,164,.10);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: opacity .18s ease, transform .18s ease;
}
.fleet-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Mobile: single-column market experience with a readable, pannable timeline. */
@media (max-width: 760px) {
  .topbar { padding: 0 12px; }
  .brand-copy strong { font-size: 13px; }
  .brand-mark { width: 34px; height: 34px; }
  main { width: calc(100% - 20px); }
  .hero { padding: 22px 18px; }
  .hero h1 { font-size: clamp(38px, 12vw, 52px); }
  .lede { font-size: 15px; line-height: 1.55; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 96px; }

  /* Override the desktop two-column workspace defined later in styles.css. */
  .workspace {
    display: block !important;
    width: 100%;
    min-width: 0;
  }
  .chart-panel,
  .detail-panel {
    width: 100%;
    min-width: 0;
  }
  .detail-panel {
    margin-top: 14px;
    height: auto !important;
    max-height: none !important;
  }
  .mover-browser,
  .detail-content,
  .detail-scroll {
    width: 100%;
    max-height: none !important;
  }

  .panel-head { padding: 16px; }
  .legend { gap: 10px 14px; }
  .toolbar.public-filters { grid-template-columns: 1fr; }
  .toolbar.public-filters .searchbox { grid-column: auto; }
  .searchbox input, .toolbar select { height: 44px; font-size: 14px; }
  .top-pagination { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .result-navigation { width: 100%; flex-wrap: wrap; }
  .pager { width: 100%; justify-content: space-between; }
  .pager-button { min-width: 108px; height: 38px; font-size: 11px; }
  .sort-control { width: 100%; justify-content: space-between; margin-left: 0; }
  .sort-control select { width: 70%; height: 38px; font-size: 11px; }

  .chart-wrap {
    width: 100%;
    height: 560px;
    min-height: 560px;
    overflow-x: auto !important;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  #chart {
    display: block;
    width: 760px !important;
    min-width: 760px;
    max-width: none;
    height: 100%;
  }
  .axis-label { font-size: 12px; }

  .mover-list { display: block !important; }
  .mover-row {
    width: 100%;
    min-height: 74px;
    grid-template-columns: 78px minmax(0,1fr) auto;
    border-right: 0 !important;
  }
  .mover-row img { width: 78px; height: 52px; }
  .mover-copy strong { font-size: 13px; }
  .mover-copy small, .mover-delta { font-size: 10px; }
  .detail-grid-public, .availability-grid { grid-template-columns: 1fr; }
  .recent-list { grid-template-columns: 1fr; }
  .change-row { min-height: 76px; }
  .method-strip { padding: 18px; }
  footer { line-height: 1.7; }

  .fleet-mode-banner {
    width: calc(100% - 20px);
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 10px 12px;
  }
  .fleet-mode-banner button { margin-left: auto; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .stat-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-card:last-child { border-bottom: 0; }
  .hero-side { opacity: .38; }
  .update-pill { left: 14px; right: auto; }
}
