/* A common page shell around the existing charts, feeds, and controls. */
body > :is(.dash, .page, .explorer-page, .content-page) {
  box-sizing: border-box;
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding: clamp(22px, 3.5vw, 42px) clamp(14px, 3vw, 34px) 48px;
}
body > .dash { gap: 16px; }
:where(.dash, .page, .explorer-page, .content-page) {
  --page-surface: #12151b;
  --page-line: #262c36;
  --page-ink: #e2e8f1;
  --page-secondary: #a7b1c0;
  --page-radius: 10px;
}
:is(.dash, .page, .explorer-page, .content-page) :is(.page-title, .explorer-header h1, .page-heading) {
  color: var(--page-ink);
  font-size: clamp(27px, 3.6vw, 39px);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -.035em;
  margin: 0 0 8px;
}
:is(.page, .explorer-page, .content-page) :is(.page-sub, .explorer-header > p, .page-description) {
  color: var(--page-secondary);
  max-width: 72ch;
  font-size: 14px;
  line-height: 1.55;
}
:is(.page, .explorer-page, .content-page) :is(.page-header, .explorer-header) { margin-bottom: 20px; }
:is(.dash, .page, .explorer-page, .content-page) :is(.card, .panel, .space-data-panel, .explorer-card,
  .sidebar-card, .rocket-card, .mission-card, .astro-card, .comet-card, .sat-card, .eclipse-card) {
  min-width: 0;
  border-radius: var(--page-radius);
  border-color: var(--page-line);
  background-color: var(--page-surface);
}
:is(.dash, .page, .explorer-page, .content-page) :is(.card, .space-data-panel, .explorer-card) {
  padding: clamp(14px, 1.5vw, 20px);
}
:is(.dash, .page, .explorer-page, .content-page) :is(.card-hd, .explorer-context) { flex-wrap: wrap; }
:is(.dash, .page, .explorer-page, .content-page) :is(.card-title, .sidebar-title, .section-title) {
  font-weight: 650;
  color: #b2bccb;
}
:is(.page, .explorer-page, .content-page) :is(.filter-btn, .explorer-button) {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 550;
}
:is(.dash, .page, .explorer-page, .content-page) :is(a, button, input, summary):focus-visible {
  outline: 2px solid var(--blue, #79b7fa);
  outline-offset: 3px;
}
:is(.dash, .page, .explorer-page, .content-page) :is(.space-data-detail, .explorer-source, .explorer-detail) {
  font-size: 12px;
  color: var(--page-secondary);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
:is(.page, .content-page) .space-data-panel > h2,
.explorer-card > h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
:is(.page, .content-page) .space-data-panel ul {
  gap: 0 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
:is(.page, .content-page) .space-data-panel li { padding: 8px 0; border-bottom: 1px solid var(--page-line); }
.explorer-source a, .space-data-detail a { text-underline-offset: 2px; }
.explorer-context { margin-top: 12px; }
body > .explorer-page { --bg3: #1a1e27; }
body[data-page] { background-color: #0b0d12; }
.explorer-entries > li { padding: 9px 0; }
.explorer-actions { margin-top: 5px; }
.explorer-actions a { text-underline-offset: 2px; }

#briefing-title { margin-bottom: 15px; }
.briefing-section .briefing-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.briefing-grid--launch-lead .briefing-launch { border-left: 2px solid var(--blue); }
.briefing-grid--launch-lead .briefing-launch .ln { font-size: 16px; font-weight: 650; }
.briefing-section .exploration-grid { gap: 12px; margin-top: 12px; align-items: start; }
.briefing-section .exploration-item {
  padding: 0; margin-top: 8px; border: 0; background: transparent;
}
.briefing-section .exploration-item img {
  display: block; width: 100%; max-height: 150px; object-fit: cover;
}
.briefing-section .exploration-item h3 { font-size: 15px; line-height: 1.4; }
.briefing-section [data-freshness] a { color: var(--blue); text-underline-offset: 2px; }
.featured-briefing {
  grid-template-columns: minmax(0,1.55fr) minmax(0,1fr);
  min-height: 0; border: 1px solid var(--page-line); border-radius: var(--page-radius);
  background: var(--page-surface);
}
.featured-briefing[hidden] { display: none; }
.featured-briefing:not([data-kind="story"]) {
  background: var(--page-surface);
  border-left: 2px solid var(--blue);
}
.featured-copy { padding: clamp(16px, 2vw, 22px); }
.featured-briefing h2 { font-size: clamp(20px, 2.7vw, 29px); line-height: 1.15; overflow-wrap: anywhere; }
.featured-kicker { color: var(--page-secondary); font-size: 10px; margin-bottom: 5px; }
#featured-detail { color: var(--page-secondary); margin: 6px 0 10px; font-size: 13px; }
.featured-link { color: var(--blue); border: 0; padding: 0; }
.featured-link:hover { color: var(--page-ink); background: transparent; text-decoration: underline; }
.featured-credit { color: var(--page-secondary); margin-top: 8px; }
.featured-briefing img { min-height: 0; height: 100%; max-height: 175px; object-fit: cover; }
.dashboard-section-title { margin: 6px 0 -3px; color: var(--page-ink); font-size: 17px; font-weight: 650; }
@media (max-width: 900px) {
  .briefing-section .briefing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .briefing-section .briefing-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .briefing-section .briefing-grid { grid-template-columns: minmax(0,1fr); }
  .featured-briefing { grid-template-columns: minmax(0,1fr); }
  .featured-briefing img { height: 116px; }
}

/* Keep catalog comparisons and technical charts inside the page at narrow widths. */
.rocket-comparison { margin-bottom: 22px; }
.rocket-comparison .compare-bar-wrap { margin: 12px 0 0; }
.rocket-comparison .compare-bar-row {
  display: grid; grid-template-columns: minmax(70px, 140px) minmax(20px, 1fr) 80px;
  gap: clamp(6px, 2vw, 15px);
}
.rocket-comparison .compare-bar-label { text-align: left; min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.compare-track { height: 7px; border-radius: 4px; background: #252a35; }
.rocket-comparison .compare-bar { height: 100%; padding: 0; border-radius: 4px; }
.compare-value { text-align: right; font-size: 12px; }
.timeline-page :is(.page-header, .controls, .scrubber-wrap, .main) { padding-inline: 0; }
.sky-chart-note { margin-top: 8px; color: var(--page-secondary); font-size: 12px; }
body[data-page="aurora"] .layout,
body[data-page="exoplanets"] .layout { grid-template-columns: minmax(0, 1fr) minmax(240px, 290px); }
body[data-page="aurora"] #map-updated { overflow-wrap: anywhere; }
.solar-wind-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.solar-wind-grid > div { min-width: 0; overflow-wrap: anywhere; }
body[data-page="eclipses"] #eclipse-sim { display: block; max-width: 100%; height: auto; }
body[data-page="eclipses"] .eclipse-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); }
body[data-page="exoplanets"] .planet-list { overflow-x: auto; }
body[data-page="exoplanets"] .planet-row { min-width: 588px; }
body[data-page="exoplanets"] .stat-card { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  body[data-page="aurora"] .layout,
  body[data-page="exoplanets"] .layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 640px) {
  .solar-wind-grid,
  body[data-page="exoplanets"] .stats-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-page="launches"] .launch-row { grid-template-columns: minmax(0,1fr) auto; gap: 6px 10px; padding: 12px; }
  body[data-page="launches"] .launch-row > :nth-child(2) { grid-row: 1; grid-column: 1 / -1; }
  body[data-page="launches"] .launch-row > :last-child { grid-column: 1 / -1; text-align: left; min-width: 0; }
  body[data-page="launches"] .launch-cd:empty { display: none; }
}
.space-data-more { margin-top: 10px; }
.space-data-more summary { color: var(--blue, #79b7fa); cursor: pointer; font-size: 12px; }
.space-data-detail[data-freshness="stale"], .explorer-source[data-freshness="stale"] { color: #d9b585; }
