/* ==========================================================================
   Light-theme corrections

   Loaded after every page stylesheet. The dark theme remains the visual
   baseline; these rules translate its surfaces and contrast relationships to
   the light palette, including the components that were originally authored
   with dark-only colours.
   ========================================================================== */

[data-theme="light"] {
  --text-soft: rgba(24, 33, 48, 0.82);
  --text-dim: rgba(24, 33, 48, 0.68);
  --soft: var(--text-soft);
  --dim: var(--text-dim);
  --line: rgba(24, 33, 48, 0.2);
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #fbfcfe;
  --panel-bg: rgba(249, 251, 253, 0.97);
  --panel-bg-soft: rgba(244, 248, 252, 0.92);
  --panel-line: rgba(24, 33, 48, 0.2);
  --panel-shadow: 0 18px 46px rgba(30, 45, 70, 0.16), 0 3px 10px rgba(30, 45, 70, 0.08);
  --light-link: #275681;
  --diagram-label: #173d53;
  --diagram-label-soft: #405d74;
  --diagram-line: rgba(47, 86, 118, 0.5);
  --diagram-line-strong: #2f5f96;
  --diagram-zone: rgba(65, 128, 153, 0.12);
  --diagram-warm: #8a5223;
  --diagram-blue: #346d9a;
}

/* Page titles and content links */

[data-theme="light"] :is(h1, .fp-title, .planet-title) span,
[data-theme="light"] .fp-title .dim,
[data-theme="light"] .fp-tooltip {
  color: color-mix(in srgb, var(--light-link) 76%, var(--text));
}

[data-theme="light"] :is(.planet-page, .prose) a,
[data-theme="light"] .proxima-sources a,
[data-theme="light"] .fp-footer-line a {
  color: var(--light-link);
}

[data-theme="light"] .planet-section h2 {
  color: color-mix(in srgb, var(--accent) 38%, var(--text) 62%);
}

[data-theme="light"] .status-badge {
  color: color-mix(in srgb, var(--accent) 42%, var(--text) 58%);
}

[data-theme="light"] .planet-section strong,
[data-theme="light"] .paper-table .paper-study,
[data-theme="light"] .paper-table .paper-study em {
  color: var(--text);
}

[data-theme="light"] .fun-facts-grid .fun-mark {
  color: color-mix(in srgb, var(--accent) 38%, var(--text) 62%);
}

/* Shared cards, fact grids and data tables */

[data-theme="light"] :is(
  .back-button,
  .mission-button,
  .photo-card,
  .saturn-fact,
  .moon-panel,
  .earth-side,
  .earth-frame-button,
  .fun-facts-grid li,
  .video-item
) {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.66);
}

[data-theme="light"] :is(.back-button, .mission-button):hover,
[data-theme="light"] .photo-card:hover,
[data-theme="light"] .earth-frame-button:hover,
[data-theme="light"] .video-item summary:hover,
[data-theme="light"] .video-item summary:focus-visible {
  border-color: color-mix(in srgb, var(--light-link) 34%, var(--line));
  background: #f4f8fc;
}

[data-theme="light"] .mission-button[aria-pressed="true"],
[data-theme="light"] .earth-frame-button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--light-link) 42%, var(--line));
  background: color-mix(in srgb, var(--light-link) 10%, #ffffff);
  color: var(--text);
}

[data-theme="light"] .facts-grid {
  border-color: var(--line);
  background: var(--line);
}

[data-theme="light"] .fact {
  background: rgba(255, 255, 255, 0.78);
}

[data-theme="light"] .fact dt {
  color: var(--text-dim);
}

[data-theme="light"] .fact dd {
  color: var(--text);
}

[data-theme="light"] .paper-table th {
  border-bottom-color: var(--line);
  background: rgba(244, 248, 252, 0.76);
  color: var(--text-dim);
}

[data-theme="light"] .paper-table td {
  border-bottom-color: rgba(24, 33, 48, 0.1);
  color: var(--text-soft);
}

[data-theme="light"] .paper-table tr:hover td {
  background: rgba(47, 95, 150, 0.055);
}

[data-theme="light"] .paper-table a {
  color: var(--light-link);
}

[data-theme="light"] .moon-filters input,
[data-theme="light"] .moon-filters select {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
}

[data-theme="light"] .moon-filters option {
  background: #ffffff;
  color: var(--text);
}

[data-theme="light"] .moon-table th {
  background: #eef3f8;
  color: var(--text-dim);
}

[data-theme="light"] .moon-table td {
  border-top-color: rgba(24, 33, 48, 0.1);
  color: var(--text-soft);
}

[data-theme="light"] .moon-table tr:hover td {
  background: rgba(47, 95, 150, 0.055);
}

[data-theme="light"] .image-caption {
  border-color: var(--line);
  background: rgba(249, 251, 253, 0.92);
  color: var(--text-soft);
}

/* Earth and other media pages */

[data-theme="light"] .earth-live {
  color: var(--text-dim);
}

[data-theme="light"] .earth-meta dd {
  color: var(--text);
}

[data-theme="light"] .earth-source,
[data-theme="light"] .earth-credit a,
[data-theme="light"] .earth-frame-button span {
  color: var(--light-link);
}

[data-theme="light"] .earth-source:hover,
[data-theme="light"] .earth-credit a:hover {
  color: var(--accent-strong);
}

/* Solar-system popovers and controls */

[data-theme="light"] :is(
  .orbit-readout,
  .solar-control-panel,
  .sun-label,
  .planet-label,
  .milky-way-label,
  .proxima-portal-summary,
  .proxima-light-label,
  .px-star-label,
  .px-label,
  .object-marker-label,
  .object-callout
) {
  border-color: var(--panel-line);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
  color: var(--text);
  scrollbar-color: rgba(24, 33, 48, 0.26) transparent;
  backdrop-filter: blur(18px) saturate(1.08);
}

[data-theme="light"] :is(
  .sun-label,
  .planet-label,
  .milky-way-label,
  .proxima-portal-summary,
  .px-star-label,
  .px-label,
  .object-callout
) strong,
[data-theme="light"] :is(
  .sun-facts,
  .planet-facts,
  .milky-way-facts,
  .px-facts,
  .object-callout
) b {
  color: var(--text);
}

[data-theme="light"] :is(
  .sun-summary,
  .planet-summary,
  .milky-way-summary,
  .px-summary,
  .object-callout-summary
) {
  color: var(--text-soft);
}

[data-theme="light"] :is(
  .sun-facts,
  .planet-facts,
  .milky-way-facts,
  .px-facts
) {
  border-top-color: var(--line);
  color: var(--text-dim);
}

[data-theme="light"] :is(.sun-link, .milky-way-link, .object-callout-link) {
  color: var(--light-link);
}

[data-theme="light"] .planet.is-active .planet-label::after,
[data-theme="light"] .px-planet.is-active .px-label::after {
  border-top-color: var(--line);
  color: var(--light-link);
}

[data-theme="light"] .px-star.is-active .px-star-label::after {
  border-top-color: var(--line);
  color: var(--light-link);
}

[data-theme="light"] .px-label em {
  color: var(--text-dim);
}

[data-theme="light"] .orbit-readout {
  border: 1px solid var(--panel-line);
}

[data-theme="light"] .orbit-readout-chips span {
  background: #eef3f8;
  color: var(--text-soft);
}

[data-theme="light"] .solar-controls-toggle {
  border-color: var(--panel-line);
  background: rgba(248, 250, 253, 0.9);
  color: var(--text);
  box-shadow: 0 5px 18px rgba(30, 45, 70, 0.16);
}

[data-theme="light"] :is(
  .solar-controls-toggle:hover,
  .solar-controls-toggle:focus-visible,
  .solar-controls.is-open .solar-controls-toggle,
  .solar-controls-toggle.is-dragging
) {
  border-color: color-mix(in srgb, var(--light-link) 38%, var(--line));
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(30, 45, 70, 0.2);
}

[data-theme="light"] .solar-control-panel {
  background: linear-gradient(145deg, rgba(252, 253, 255, 0.98), rgba(242, 247, 252, 0.96));
}

[data-theme="light"] .solar-control-head {
  border-bottom-color: var(--line);
  color: var(--text-dim);
}

[data-theme="light"] .solar-control-status,
[data-theme="light"] .solar-control-label,
[data-theme="light"] .object-picker label,
[data-theme="light"] .solar-control-note,
[data-theme="light"] .object-readout {
  color: var(--text-dim);
}

[data-theme="light"] .solar-date-window {
  border-color: var(--line);
  background: #eef3f8;
}

[data-theme="light"] .solar-date-window time {
  color: var(--text);
}

[data-theme="light"] .speed-options {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

[data-theme="light"] :is(.speed-options button, .control-button) {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-soft);
}

[data-theme="light"] :is(.speed-options button, .control-button):hover {
  border-color: color-mix(in srgb, var(--light-link) 34%, var(--line));
  background: #f4f8fc;
  color: var(--text);
}

[data-theme="light"] .speed-options button[aria-pressed="true"] {
  background: var(--light-link);
  color: #ffffff;
}

[data-theme="light"] :is(.control-button.is-active, .control-button.is-paused) {
  border-color: color-mix(in srgb, var(--light-link) 38%, var(--line));
  background: color-mix(in srgb, var(--light-link) 11%, #ffffff);
  color: var(--accent-strong);
}

[data-theme="light"] .solar-control-panel .epoch-date-panel {
  border-color: var(--panel-line);
  background: var(--panel-bg);
  color: var(--text);
  box-shadow: var(--panel-shadow);
}

[data-theme="light"] .solar-control-panel .epoch-date-label {
  color: var(--text-dim);
}

[data-theme="light"] .solar-control-panel .epoch-date-input {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
  color-scheme: light;
}

[data-theme="light"] .object-switch {
  color: var(--text-soft);
}

[data-theme="light"] .switch-rail {
  background: rgba(24, 33, 48, 0.2);
}

[data-theme="light"] .object-switch input:checked + .switch-rail {
  background: var(--light-link);
}

[data-theme="light"] .object-picker select {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
}

[data-theme="light"] .object-picker select option {
  background: #ffffff;
  color: var(--text);
}

[data-theme="light"] .object-page-link {
  color: var(--light-link);
}

[data-theme="light"] .proxima-portal-name {
  color: var(--text-dim);
}

/* Full-page home controls */

[data-theme="light"] .fp-info-toggle {
  border-color: rgba(24, 33, 48, 0.2);
  background: rgba(249, 251, 253, 0.94);
  color: var(--text);
  box-shadow: 0 7px 24px rgba(30, 45, 70, 0.18);
}

[data-theme="light"] :is(
  .fp-info-toggle:hover,
  .fp-info-toggle:focus-visible,
  .fp-info.is-open .fp-info-toggle
) {
  border-color: color-mix(in srgb, var(--light-link) 52%, var(--line));
  background: #ffffff;
  color: var(--accent-strong);
}

[data-theme="light"] .fp-info-i {
  display: block;
  color: inherit;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-0.5px);
}

[data-theme="light"] .fp-info.is-attract .fp-info-toggle {
  border-color: color-mix(in srgb, var(--accent-warm) 58%, var(--line));
  color: var(--accent-warm);
}

[data-theme="light"] .fp-info-panel {
  border-color: var(--panel-line);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
  color: var(--text);
}

[data-theme="light"] .fp-info-head {
  border-bottom-color: var(--line);
}

[data-theme="light"] .fp-info-close {
  background: #eef3f8;
  color: var(--text-soft);
}

[data-theme="light"] .fp-info-close:hover {
  background: #e5edf6;
  color: var(--text);
}

[data-theme="light"] .fp-info-panel li {
  color: var(--text-soft);
}

[data-theme="light"] .fp-info-panel li::before {
  color: var(--accent-warm);
}

[data-theme="light"] .fp-hint {
  border-color: var(--panel-line);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
  color: var(--text-soft);
}

[data-theme="light"] .fp-hint-mark {
  color: var(--accent-warm);
}

[data-theme="light"] .fp-chip {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--text-soft);
}

[data-theme="light"] #fp-nav ul li a span {
  background: rgba(24, 33, 48, 0.3);
}

[data-theme="light"] :is(
  #fp-nav ul li a.active span,
  #fp-nav ul li:hover a.active span
) {
  background: var(--light-link);
}

[data-theme="light"] #fp-nav ul li .fp-tooltip {
  color: var(--text-soft);
}

/* Dark visualization stages keep their own light-on-dark labels */

[data-theme="light"] .bh-zoom-detail {
  border-color: var(--line);
  background:
    radial-gradient(120% 80% at 88% 8%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 58%),
    rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .bh-zoom-facts div {
  background: rgba(247, 250, 253, 0.94);
}

[data-theme="light"] .bh-motion-figure figcaption {
  border-top-color: var(--line);
  background: var(--surface-strong);
  color: var(--text-soft);
}

[data-theme="light"] .bh-motion-figure figcaption a {
  color: var(--light-link);
}

[data-theme="light"] .bh-zoom-visible,
[data-theme="light"] :is(
  .bh-zoom-visible-label,
  .bh-zoom-visible-item,
  .bh-zoom-visible-refs,
  .bh-zoom-visible-beyond,
  .bh-zoom-visible-empty,
  .bh-zoom-gesture
) {
  color: rgba(233, 239, 250, 0.78);
}

[data-theme="light"] .bh-zoom-visible-beyond {
  color: rgba(255, 225, 177, 0.82);
}

[data-theme="light"] :is(
  .bh-zoom-map-head,
  .bh-zoom-map-ends,
  .bh-zoom-map-tick,
  .bh-zoom-caption
) {
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   Shared light-theme diagram language

   Scientific SVG artwork uses its own semantic palette. This keeps labels,
   boundaries and populated regions legible without weakening the dark theme.
   -------------------------------------------------------------------------- */

[data-theme="light"] :is(.kuiper-page-visual, .frontier-page-visual) {
  border-color: rgba(36, 67, 91, 0.22);
  background:
    radial-gradient(circle at 50% 50%, rgba(202, 129, 51, 0.1), transparent 14%),
    radial-gradient(ellipse at 50% 50%, rgba(69, 132, 163, 0.12), transparent 64%),
    #f7fafd;
  box-shadow: 0 10px 28px rgba(42, 65, 86, 0.08);
}

[data-theme="light"] :is(.kuiper-page-visual, .frontier-page-visual) figcaption {
  background: rgba(244, 248, 251, 0.94);
  color: var(--text-dim);
  font-size: 11px;
}

[data-theme="light"] .diagram-label,
[data-theme="light"] .diagram-planet-label {
  fill: var(--diagram-label);
  font-size: 11px;
  font-weight: 600;
}

[data-theme="light"] .diagram-caption {
  fill: var(--diagram-label-soft);
  font-size: 10px;
}

[data-theme="light"] .diagram-path-label {
  fill: var(--diagram-blue);
  font-size: 10px;
  font-weight: 600;
}

[data-theme="light"] .diagram-sun-label {
  fill: var(--diagram-warm);
  font-size: 10px;
  font-weight: 600;
}

[data-theme="light"] .diagram-planet-label {
  fill: var(--diagram-blue);
  font-size: 10px;
}

[data-theme="light"] .diagram-path {
  stroke: rgba(63, 103, 135, 0.56) !important;
}

[data-theme="light"] .diagram-boundary {
  stroke: rgba(47, 95, 133, 0.52) !important;
}

[data-theme="light"] .diagram-orbit {
  stroke: rgba(71, 109, 139, 0.38) !important;
}

[data-theme="light"] .frontier-shell {
  stroke: rgba(47, 95, 133, 0.58);
  opacity: 0.94;
}

[data-theme="light"] .frontier-shell--faint {
  opacity: 0.58;
}

[data-theme="light"] .frontier-zone,
[data-theme="light"] .kuiper-scale-veil {
  fill: var(--diagram-zone);
}

[data-theme="light"] .frontier-surface {
  fill: rgba(206, 169, 94, 0.13);
}

[data-theme="light"] .kuiper-scale-zone {
  stroke: rgba(47, 95, 133, 0.58);
}

[data-theme="light"] .kuiper-scale-zone--1 { opacity: 0.9; }
[data-theme="light"] .kuiper-scale-zone--2 { opacity: 0.68; }
[data-theme="light"] .kuiper-scale-zone--3 { opacity: 0.4; }
[data-theme="light"] .kuiper-scale-zone--4 { opacity: 0.2; }

[data-theme="light"] .frontier-page-visual:hover .frontier-shell {
  stroke: var(--diagram-line-strong);
}

[data-theme="light"] .frontier-page-visual:hover .frontier-zone,
[data-theme="light"] .frontier-page-visual:hover .frontier-surface,
[data-theme="light"] .kuiper-page-visual:hover .kuiper-scale-veil {
  fill: rgba(61, 128, 154, 0.17);
}

[data-theme="light"] .frontier-node {
  fill: #4f7795;
}

[data-theme="light"] .helio-plasma-particle {
  fill: #9a6a2c !important;
}

[data-theme="light"] .helio-crossing-line {
  fill: #a36a25;
}

[data-theme="light"] .heliopause-page-visual:hover .helio-crossing-line {
  fill: #744714;
}

[data-theme="light"] .frontier-cloud-haze {
  fill: rgba(76, 132, 158, 0.12);
}

[data-theme="light"] .diagram-planet-detail {
  fill: rgba(47, 86, 118, 0.24);
}

/* Oort Cloud: violet outer shell, cyan inner cloud, and a warm comet path. */
[data-theme="light"] .oort-page-visual {
  border-color: rgba(86, 57, 125, 0.48);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 213, 113, 0.46), transparent 18%),
    linear-gradient(135deg, #eee4fa 0%, #e3f3f7 100%);
  box-shadow: 0 14px 34px rgba(71, 58, 101, 0.17);
}

[data-theme="light"] .oort-page-visual .oort-cloud-field {
  fill: #e0d1f3;
}

[data-theme="light"] .oort-page-visual .oort-outer-region {
  fill: rgba(118, 82, 164, 0.3);
}

[data-theme="light"] .oort-page-visual .oort-inner-region {
  fill: #c9e9f0;
}

[data-theme="light"] .oort-page-visual .oort-outer-shell {
  stroke: #503678;
  stroke-width: 2.4;
  stroke-dasharray: 5 6;
  opacity: 1;
}

[data-theme="light"] .oort-page-visual .oort-inner-shell {
  stroke: #17657f;
  stroke-width: 2.1;
  stroke-dasharray: 4 6;
  opacity: 1;
}

[data-theme="light"] .oort-page-visual .oort-inner-core {
  stroke: #4f7e8e;
  stroke-width: 1.7;
  opacity: 0.95;
}

[data-theme="light"] .oort-page-visual .oort-comet-path {
  stroke: #9a4f0c !important;
  stroke-width: 2.6 !important;
  stroke-dasharray: 9 5;
}

[data-theme="light"] .oort-page-visual .frontier-node {
  fill: #493968;
  stroke: #f8f5fc;
  stroke-width: 1.25px;
  filter: drop-shadow(0 0 1px rgba(55, 38, 82, 0.42));
}

[data-theme="light"] .oort-page-visual .frontier-node > circle {
  r: 2.6px;
  vector-effect: non-scaling-stroke;
}

.oort-light-particle {
  display: none;
}

[data-theme="light"] .oort-page-visual .oort-light-particle {
  display: inline;
}

[data-theme="light"] .oort-page-visual :is(.diagram-label, .diagram-caption, .diagram-path-label) {
  paint-order: stroke fill;
  stroke: #fbf9fe;
  stroke-width: 5px;
  stroke-linejoin: round;
}

[data-theme="light"] .oort-page-visual :is(.diagram-label, .oort-shell-label) {
  fill: #342344;
  font-size: 12.5px;
  font-weight: 600;
}

[data-theme="light"] .oort-page-visual :is(.oort-shell-caption, .diagram-caption) {
  fill: #493f5d;
  font-size: 11px;
  font-weight: 600;
}

[data-theme="light"] .oort-page-visual .oort-inner-label {
  fill: #124f66;
  font-weight: 600;
}

[data-theme="light"] .oort-page-visual .oort-comet-label {
  fill: #743b08;
  font-weight: 600;
}

[data-theme="light"] .oort-diagram-key {
  background: rgba(249, 247, 253, 0.98);
}

/* Heliopause: a warm solar bubble meeting a cool interstellar field. */
[data-theme="light"] .heliopause-page-visual {
  border-color: rgba(123, 78, 12, 0.48);
  background:
    radial-gradient(circle at 10% 48%, rgba(255, 196, 48, 0.45), transparent 28%),
    linear-gradient(100deg, #ffe49c 0%, #f8deb0 56%, #d8e6f1 72%, #edf3f8 100%);
  box-shadow: 0 14px 34px rgba(74, 70, 49, 0.16);
}

[data-theme="light"] .heliopause-page-visual .frontier-surface {
  fill: rgba(244, 196, 53, 0.86);
  stroke: #81500f;
  stroke-width: 2.4;
  stroke-dasharray: 6 5;
}

[data-theme="light"] .heliopause-page-visual .helio-plasma-particle {
  fill: #653405 !important;
  stroke: #653405;
  stroke-width: 1.15px;
  paint-order: fill stroke;
  filter: drop-shadow(0 0 1px rgba(71, 38, 3, 0.48));
}

[data-theme="light"] .heliopause-page-visual .helio-crossing-line {
  fill: #6f291a;
  filter: drop-shadow(0 0 1px rgba(255, 238, 180, 0.9));
}

[data-theme="light"] .heliopause-page-visual .helio-wind-streaks {
  display: block;
  fill: none;
  stroke: #71400c;
  stroke-width: 1.8;
  stroke-linecap: round;
  opacity: 0.72;
}

[data-theme="light"] .heliopause-page-visual .helio-dust-field {
  display: block;
  fill: #4d321a;
  stroke: #fff1bc;
  stroke-width: 0.7px;
}

[data-theme="light"] .heliopause-page-visual .helio-ism-dust {
  display: block;
  fill: #3f5d78;
  stroke: #ffffff;
  stroke-width: 0.7px;
}

[data-theme="light"] .heliopause-page-visual .helio-voyager {
  fill: #153958;
  stroke: #ffffff;
  stroke-width: 1.3px;
  filter: drop-shadow(0 0 2px rgba(255, 250, 220, 0.9));
}

[data-theme="light"] .heliopause-page-visual :is(.diagram-label, .diagram-caption) {
  paint-order: stroke fill;
  stroke: rgba(255, 249, 229, 0.98);
  stroke-width: 5px;
  stroke-linejoin: round;
}

[data-theme="light"] .heliopause-page-visual :is(.diagram-warm-label, .diagram-boundary-label) {
  fill: #4e2c05;
  font-size: 12px;
  font-weight: 600;
}

[data-theme="light"] .heliopause-page-visual .diagram-cool-label {
  fill: #233f58;
  font-size: 11.5px;
  font-weight: 600;
}

[data-theme="light"] .helio-diagram-key {
  background: rgba(250, 249, 243, 0.98);
}

/* --------------------------------------------------------------------------
   Home solar-system diagram
   -------------------------------------------------------------------------- */

.frontier-border-label {
  position: absolute;
  z-index: 8;
  display: grid;
  gap: 1px;
  max-width: calc(100% - 28px);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 1px 3px var(--page-bg),
    0 0 7px var(--page-bg),
    0 0 12px var(--page-bg);
  white-space: nowrap;
  pointer-events: none;
}

.frontier-border-label small {
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.oort-border-label {
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
}

.heliopause-border-label {
  left: 50%;
  top: 77%;
  transform: translateX(-50%);
}

[data-theme="light"] .oort-border-label {
  color: #3e2564;
}

[data-theme="light"] .heliopause-border-label {
  color: #653700;
}

[data-theme="light"] .frontier-border-label small {
  color: #3c4b5e;
}

[data-theme="light"] .kuiper-belt-shadow {
  opacity: 0.04;
}

[data-theme="light"] .kuiper-belt-fog {
  fill: url(#kuiper-fog-light);
  filter: url(#kuiper-fog-soft);
}

[data-theme="light"] .kuiper-belt-reveal {
  fill: url(#kuiper-fog-light);
}

[data-theme="light"] .kuiper-belt-rim {
  stroke: rgba(28, 92, 124, 0.72);
}

[data-theme="light"] .kuiper-belt-callout-line {
  stroke: rgba(26, 75, 104, 0.9);
}

[data-theme="light"] .kuiper-belt-layer:hover .kuiper-belt-rim,
[data-theme="light"] .kuiper-belt-layer:focus-within .kuiper-belt-rim,
[data-theme="light"] .kuiper-belt-layer.is-open .kuiper-belt-rim {
  stroke: #173f58;
}

[data-theme="light"] .kuiper-belt-layer :is(.kuiper-rock) {
  fill: #2f6f8c;
}

[data-theme="light"] .kuiper-belt-layer:hover .kuiper-belt-rocks,
[data-theme="light"] .kuiper-belt-layer:focus-within .kuiper-belt-rocks,
[data-theme="light"] .kuiper-belt-layer.is-open .kuiper-belt-rocks {
  opacity: 1;
}

[data-theme="light"] .kuiper-belt-hit:focus-visible {
  fill: rgba(47, 95, 150, 0.07);
  stroke: var(--diagram-line-strong);
  stroke-width: 2.5;
  stroke-dasharray: 4 5;
}

/* Index map: outer frontier layers */
[data-theme="light"] .oort-native-layer .oort-shell-field {
  fill: url(#oort-layer-haze-light);
}

[data-theme="light"] .oort-native-layer .frontier-native-reveal {
  fill: rgba(75, 48, 111, 0.16);
}

[data-theme="light"] .oort-native-layer .frontier-native-rim {
  stroke: rgba(67, 38, 105, 0.9);
  opacity: 0.68;
}

[data-theme="light"] .oort-native-layer:hover .frontier-native-rim,
[data-theme="light"] .oort-native-layer:focus-within .frontier-native-rim,
[data-theme="light"] .oort-native-layer.is-open .frontier-native-rim {
  stroke: rgba(48, 22, 82, 0.98);
  opacity: 0.9;
}

[data-theme="light"] .oort-native-layer .oort-planetesimal {
  fill: #2e174e !important;
  opacity: 0.94 !important;
}

[data-theme="light"] .oort-native-layer .oort-planetesimal:nth-child(5n) {
  fill: #00566c !important;
}

[data-theme="light"] .oort-native-layer .frontier-native-callout-line {
  stroke: #493267;
}

[data-theme="light"] .heliopause-native-layer .heliopause-haze {
  fill: url(#heliopause-layer-wind-light);
}

[data-theme="light"] .heliopause-native-layer .frontier-native-reveal {
  fill: rgba(135, 77, 7, 0.18);
}

[data-theme="light"] .heliopause-native-layer .heliopause-plasma-mote {
  fill: #572b02 !important;
  opacity: 0.9 !important;
}

[data-theme="light"] .heliopause-native-layer .heliopause-wind-stream {
  fill: #653200 !important;
  opacity: 0.9 !important;
}

[data-theme="light"] .heliopause-native-layer.is-flowing .heliopause-plasma-mote,
[data-theme="light"] .heliopause-native-layer.is-flowing .heliopause-wind-stream {
  filter: drop-shadow(0 0 1.5px rgba(112, 65, 11, 0.55));
}

[data-theme="light"] .heliopause-native-layer .frontier-native-popup {
  border-color: rgba(121, 81, 20, 0.32);
}

[data-theme="light"] .dwarf-world-disc circle[fill^="url"],
[data-theme="light"] .icy-world-disc circle[fill^="url"] {
  stroke: rgba(44, 58, 73, 0.72);
  stroke-width: 1px;
}

[data-theme="light"] .proxima-portal-name {
  color: #623733;
}

/* --------------------------------------------------------------------------
   System overview labels and orbit contrast
   -------------------------------------------------------------------------- */

.system-planet-key {
  display: none;
}

[data-theme="light"] .system-planet-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: min(96vw, 1040px);
  margin: -2px auto 14px;
  padding: 0;
  list-style: none;
}

[data-theme="light"] .system-planet-key li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(35, 70, 98, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

[data-theme="light"] .system-planet-key li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--diagram-blue);
  box-shadow: 0 0 0 2px rgba(52, 109, 154, 0.12);
}

[data-theme="light"] .system-planet-key li[data-status="Candidate"]::before {
  border: 1px solid var(--diagram-blue);
  background: transparent;
  box-shadow: none;
}

[data-theme="light"] .proxima-system {
  background: radial-gradient(ellipse 48% 36% at 50% 50%, rgba(108, 139, 168, 0.1), transparent 78%);
}

[data-theme="light"] .px-orbit {
  border-width: 1.5px;
  border-color: color-mix(in srgb, var(--orbit-color) 48%, #29465f);
  opacity: 1;
}

[data-theme="light"] .px-orbit.is-highlighted,
[data-theme="light"] .px-orbit.is-selected {
  border-color: color-mix(in srgb, var(--orbit-color) 42%, #1e3c56);
  box-shadow: 0 0 10px color-mix(in srgb, var(--orbit-color) 14%, transparent);
}

[data-theme="light"] .proxima-caption {
  color: var(--text-soft);
  font-size: 12px;
}

[data-theme="light"] .proxima-model,
[data-theme="light"] .proxima-sources {
  color: var(--text-dim);
  font-size: 10.5px;
}

/* Keep scientific figure thumbnails visually connected to the light surface. */
[data-theme="light"] .system-logo {
  padding: 5px;
  border: 1px solid rgba(35, 70, 98, 0.2);
  border-radius: 20px;
  background: #eef4f9;
  box-shadow: 0 5px 14px rgba(36, 62, 82, 0.08);
}

[data-theme="light"] .system-logo > rect {
  fill: #eef4f9;
  stroke: rgba(35, 70, 98, 0.15);
}

[data-theme="light"] .system-logo ellipse {
  stroke: rgba(37, 77, 106, 0.4);
}

[data-theme="light"] :is(.galaxy-card-icon, .card-icon, .object-icon) .g-bg,
[data-theme="light"] .card-icon > circle:first-child,
[data-theme="light"] .object-icon .o-tile {
  fill: #eef4f9;
  stroke: rgba(35, 70, 98, 0.18);
}

/* --------------------------------------------------------------------------
   Legible controls and metadata on intentionally dark science stages
   -------------------------------------------------------------------------- */

[data-theme="light"] .galaxy-view-scale,
[data-theme="light"] .galaxy-explore-kicker {
  font-size: 10.5px;
}

[data-theme="light"] .galaxy-ctl {
  height: 34px;
  padding-inline: 10px;
  font-size: 12px;
}

[data-theme="light"] :is(.galaxy-speed button, .galaxy-zoom button) {
  height: 28px;
  min-width: 32px;
  font-size: 11px;
}

[data-theme="light"] .galaxy-caption,
[data-theme="light"] .galaxy-collision-kicker,
[data-theme="light"] .galaxy-collision-when {
  font-size: 11px;
}

[data-theme="light"] .gn-star b {
  font-size: 9.5px;
}

[data-theme="light"] .gn-star small {
  font-size: 8.5px;
}

[data-theme="light"] .evo-hud-chip span {
  font-size: 9.5px;
}

[data-theme="light"] .evo-era-time {
  font-size: 11px;
}

[data-theme="light"] .evo-tick-label {
  font-size: 10px;
}

[data-theme="light"] .evo-tick-cap {
  font-size: 9px;
}

[data-theme="light"] .evo-tl-endcaps {
  font-size: 9px;
}

[data-theme="light"] .bh-zoom-visible-label {
  font-size: 9.5px;
}

[data-theme="light"] .bh-zoom-visible-item {
  font-size: 11px;
}

[data-theme="light"] :is(.bh-zoom-gesture, .bh-zoom-caption) {
  font-size: 10.5px;
}

@media (max-width: 700px) {
  [data-theme="light"] :is(.kuiper-page-visual, .frontier-page-visual) {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 95, 150, 0.32) transparent;
  }

  [data-theme="light"] :is(.kuiper-page-visual, .frontier-page-visual) svg {
    width: 620px;
    min-width: 620px;
  }

  [data-theme="light"] :is(.kuiper-page-visual, .frontier-page-visual) figcaption::after {
    content: " · Swipe horizontally to explore";
    color: var(--diagram-line-strong);
    font-weight: 600;
  }

  [data-theme="light"] :is(.kuiper-page-visual, .frontier-page-visual) .diagram-label {
    font-size: 15px;
  }

  [data-theme="light"] :is(.kuiper-page-visual, .frontier-page-visual) .diagram-caption,
  [data-theme="light"] :is(.kuiper-page-visual, .frontier-page-visual) .diagram-planet-label,
  [data-theme="light"] :is(.kuiper-page-visual, .frontier-page-visual) .diagram-sun-label,
  [data-theme="light"] :is(.kuiper-page-visual, .frontier-page-visual) .diagram-path-label {
    font-size: 14px;
  }

  [data-theme="light"] .proxima-system {
    width: min(88vw, 560px);
  }

  [data-theme="light"] .system-planet-key {
    width: min(92vw, 560px);
    justify-content: flex-start;
  }

  [data-theme="light"] .galaxy-ctl {
    height: 32px;
    padding-inline: 8px;
    font-size: 11px;
  }

  [data-theme="light"] :is(.galaxy-speed button, .galaxy-zoom button) {
    height: 27px;
    min-width: 29px;
    font-size: 10.5px;
  }
}

