:root {
  color-scheme: light;
  --paper: #eff4f4;
  --white: #ffffff;
  --ink: #193545;
  --muted: #5f7984;
  --line: #d8e4e6;
  --teal: #247f83;
  --teal-soft: #dceeed;
  --sand: #c78b58;
  --sand-soft: #f1e4d7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.page-shell { max-width: 1480px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 64px); }

.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 17px; font-weight: 800; letter-spacing: .055em; white-space: nowrap; }
.brand-light { color: var(--teal); padding-inline: 2px; }
.brand-symbol { width: 35px; height: 35px; border: 2px solid var(--teal); border-radius: 50%; display: grid; place-items: center; transform: rotate(-27deg) scaleY(.58); }
.brand-symbol span { width: 9px; height: 9px; background: var(--teal); border-radius: 50%; transform: scaleY(1.7); }
.source-status { margin: 0; color: var(--muted); font-size: 13px; text-align: right; }
.source-status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: 9px; border-radius: 50%; background: var(--sand); vertical-align: 1px; }
.source-status.is-ready::before { background: var(--teal); }

.intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 28px; padding: 28px 0 25px; }
.intro-note { margin: 0 0 7px; color: var(--teal); font-size: 12px; font-weight: 700; letter-spacing: .015em; }
.intro h1 { margin: 0; max-width: 760px; font-size: clamp(35px, 3.8vw, 53px); line-height: 1; letter-spacing: -.045em; font-weight: 650; }
.intro-copy { max-width: 680px; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.catalog-summary { display: flex; gap: 28px; padding: 0 0 7px; }
.catalog-summary div { display: flex; flex-direction: column; min-width: 110px; }
.catalog-summary strong { font-size: 29px; font-weight: 650; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.catalog-summary span { color: var(--muted); font-size: 13px; margin-top: 9px; }

.feature-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; margin: 0 calc(-1 * clamp(18px, 4vw, 64px)); padding: 8px clamp(18px, 4vw, 64px); border-block: 1px solid var(--line); background: rgba(239, 244, 244, .97); scrollbar-width: thin; }
.feature-tabs button { flex: none; min-height: 43px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.feature-tabs button:hover { background: #e4eeee; color: var(--ink); }
.feature-tabs button[aria-selected="true"] { border-color: #a6ccca; background: var(--white); color: #155f63; box-shadow: 0 2px 6px rgba(29, 68, 79, .07); }
.world-picker { display: grid; grid-template-columns: auto minmax(220px, 350px) minmax(0, 1fr); align-items: center; gap: 12px 18px; margin: 27px 0 32px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.world-picker label { font-size: 13px; font-weight: 700; }
.world-picker select { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid #b9d0d3; border-radius: 8px; background: #f9fbfb; color: var(--ink); font: inherit; }
.world-picker p { margin: 0; color: var(--muted); font-size: 12px; }
.feature-panel { min-width: 0; margin: 0 0 38px; }
.feature-intro { max-width: 1200px; margin: 0 0 25px; }
.feature-kind { margin: 0 0 5px; color: var(--teal); font-size: 12px; font-weight: 700; }
.feature-intro h2 { margin: 0; font-size: clamp(30px, 3vw, 43px); line-height: 1.1; letter-spacing: -.04em; }
.feature-intro > p:not(.feature-kind) { max-width: 830px; margin: 11px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.feature-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; row-gap: 11px; margin-top: 23px; }
.feature-facts p { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 12px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.5; }
.feature-facts strong { color: var(--ink); }
.feature-facts span { color: var(--muted); }
.feature-facts a { color: var(--teal); text-underline-offset: 2px; }
.feature-card { max-width: 1100px; padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 18px 45px rgba(29, 68, 79, .045); }
.feature-card > .detail-section { margin-top: 0; }
.feature-card > .detail-bottom { margin-top: 30px; }
.feature-card .story-section { max-width: 780px; }
.feature-empty { max-width: 1100px; padding: 28px; border: 1px dashed #bdd3d5; border-radius: 12px; color: var(--muted); background: #f7faf9; }
.story-choices { display: flex; flex-wrap: wrap; gap: 8px; max-width: 1100px; margin: 0 0 16px; }
.story-choices button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-size: 13px; font-weight: 650; }
.story-choices button:hover { background: #eef7f5; }
.story-choices button[aria-pressed="true"] { border-color: #81b9b5; background: var(--teal-soft); color: #155f63; }

.sky-panel { margin: 0 0 27px; padding: 24px; border: 1px solid #294d58; border-radius: 18px; background: #102d3a; color: #e7f4f1; box-shadow: 0 18px 45px rgba(29, 68, 79, .08); }
.sky-panel-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 17px; }
.eyebrow { margin: 0 0 5px; color: #a8d8d2; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.sky-panel h2 { margin: 0; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.1; letter-spacing: -.035em; }
.sky-panel-head > p { max-width: 320px; margin: 0; color: #bdd4d7; font-size: 12px; }
.sky-layout { display: grid; grid-template-columns: minmax(0, 1fr) 205px; gap: 18px; align-items: stretch; }
#sky-canvas { display: block; width: 100%; height: 270px; border: 1px solid #38606b; border-radius: 11px; background: #0b2735; }
.sky-caption { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 18px 0 18px 6px; }
.sky-caption strong { font-size: 21px; line-height: 1.15; overflow-wrap: anywhere; }
.sky-caption span { font-size: 13px; color: #d0e4e3; }
.sky-caption small { color: #a9c4c8; font-size: 11px; }

.explorer { display: grid; grid-template-columns: minmax(350px, .82fr) minmax(0, 1.18fr); background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 45px rgba(29, 68, 79, .055); overflow: hidden; }
.ranking { min-width: 0; padding: 28px 0 18px; border-inline-end: 1px solid var(--line); }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 0 28px; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.section-help { color: var(--muted); font-size: 12px; white-space: nowrap; padding-top: 8px; }
.search-field { display: flex; align-items: center; gap: 10px; margin: 22px 28px 12px; padding: 0 13px; min-height: 46px; border: 1px solid var(--line); border-radius: 9px; background: #f9fbfb; color: var(--muted); }
.search-field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.search-field svg { width: 18px; height: 18px; flex: none; }
.search-field input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-field input::placeholder { color: #7d949c; }
.filters { display: flex; gap: 6px; padding: 0 28px 17px; overflow-x: auto; }
.filters button { flex: none; min-height: 36px; border: 0; border-radius: 7px; padding: 7px 12px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
.filters button:hover { background: #eef5f4; color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--teal-soft); color: #155f63; }
.planet-list { list-style: none; margin: 0; padding: 0; max-height: min(69vh, 740px); overflow-y: auto; scrollbar-color: #bed4d7 transparent; }
.planet-list li { margin: 0; }
.planet-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 78px; align-items: center; gap: 10px; width: 100%; min-height: 75px; padding: 11px 28px; border: 0; border-top: 1px solid #eaf0f0; border-inline-start: 4px solid transparent; background: var(--white); color: var(--ink); text-align: start; }
.planet-row:hover { background: #f4f9f8; }
.planet-row[aria-pressed="true"] { background: #eaf5f3; border-inline-start-color: var(--teal); }
.planet-rank { color: #8197a0; font-size: 12px; font-variant-numeric: tabular-nums; }
.planet-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; }
.planet-host { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planet-story-label { display: inline-block; margin-top: 5px; color: var(--teal); font-size: 11px; font-weight: 700; }
.planet-score { display: flex; flex-direction: column; align-items: end; gap: 6px; color: var(--teal); font-size: 21px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.planet-row.is-optimistic .planet-score { color: #a76f3b; }
.mini-track { width: 56px; height: 4px; background: #dae7e8; border-radius: 3px; overflow: hidden; }
.mini-track span { display: block; height: 100%; background: currentColor; border-radius: inherit; }
.list-message { margin: 0; padding: 30px 28px; color: var(--muted); }
.show-all { display: block; width: calc(100% - 56px); min-height: 42px; margin: 16px 28px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-weight: 600; }
.show-all:hover { background: #f3f8f8; }

.detail { min-width: 0; padding: 35px clamp(26px, 3vw, 50px); }
.detail-empty { min-height: 350px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.detail-top { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.detail-host { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.detail h2 { margin: 0 0 12px; font-size: clamp(30px, 3vw, 44px); line-height: 1.08; letter-spacing: -.045em; overflow-wrap: anywhere; }
.zone-label { display: inline-block; padding: 5px 10px; border-radius: 5px; background: var(--teal-soft); color: #155f63; font-size: 12px; font-weight: 700; }
.zone-label.is-optimistic { background: var(--sand-soft); color: #8b5d2f; }
.detail-score { display: flex; align-items: baseline; gap: 2px; flex: none; color: var(--teal); font-variant-numeric: tabular-nums; }
.detail-score strong { font-size: clamp(42px, 4vw, 62px); line-height: 1; letter-spacing: -.06em; }
.detail-score span { color: var(--muted); font-size: 13px; }
.detail-section { margin-top: 34px; }
.detail-section h3 { margin: 0 0 17px; font-size: 17px; letter-spacing: -.015em; }
.passport-section { margin-top: 29px; }
.passport-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.passport-grid > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #f7faf9; }
.passport-grid span { color: var(--muted); font-size: 11px; }
.passport-grid strong { font-size: clamp(17px, 1.8vw, 23px); line-height: 1.16; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.passport-grid small { color: var(--muted); font-size: 11px; }
.evidence { display: inline-block; align-self: start; margin-top: auto; padding: 3px 7px; border-radius: 4px; font-size: 10px; font-style: normal; font-weight: 700; line-height: 1.35; }
.is-measured { background: #dceeed; color: #155f63; }
.is-derived { background: #e5eaf7; color: #485f9a; }
.is-artistic { background: #f1e4d7; color: #8b5d2f; }
.evidence-key { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 2; }
.story-section { padding: 20px 22px; border: 1px solid #c7dcd7; border-radius: 12px; background: #f1f8f5; }
.story-section[hidden] { display: none; }
.story-kicker { margin: 0 0 8px; color: var(--teal); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.story-section h3 { margin-bottom: 9px; font-size: 20px; }
.story-section > p:not(.story-kicker) { margin: 0 0 12px; font-size: 14px; line-height: 1.55; }
.story-unknown { color: var(--muted); }
.story-unknown strong { color: var(--ink); }
.story-sources { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 10px; border-top: 1px solid #d7e6e0; }
.story-sources a { color: var(--teal); font-size: 12px; font-weight: 700; }
.hwc-section { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf6; }
.hwc-section .section-inline a { color: var(--teal); font-size: 12px; font-weight: 700; }
.hwc-section .detail-explain { margin: 7px 0 0; }
.hwc-section #hwc-result { color: var(--ink); font-size: 14px; font-weight: 650; }
.score-reason { margin: 7px 0 14px; color: var(--muted); font-size: 12px; }
.stability-story { margin: -3px 0 17px; padding: 15px 18px; border-inline-start: 3px solid var(--teal); border-radius: 0 8px 8px 0; background: #f0f7f5; font-size: 14px; line-height: 1.5; }
.score-part + .score-part { margin-top: 12px; }
.score-part > div:first-child { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.score-part strong { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.score-track { height: 7px; border-radius: 4px; background: #e7eff0; overflow: hidden; }
.score-track span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.stability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stability-grid div { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #f7faf9; }
.stability-grid span { display: block; color: var(--muted); font-size: 11px; }
.stability-grid strong { display: block; margin-top: 5px; color: var(--teal); font-size: 19px; font-variant-numeric: tabular-nums; }
.stability-section .detail-explain { margin: 11px 0 0; }
.scene-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.scene-heading h3 { margin-bottom: 3px; }
.scene-heading .detail-explain { margin-bottom: 12px; }
.scene-heading button { flex: none; padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; background: #f9fbfb; color: var(--ink); font-size: 12px; font-weight: 700; }
#system-canvas { display: block; width: 100%; height: 310px; border-radius: 10px; background: #102633; touch-action: none; cursor: grab; }
#system-canvas:active { cursor: grabbing; }
.scene-legend { display: flex; flex-wrap: wrap; gap: 5px 17px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.scene-legend span { display: inline-flex; align-items: center; gap: 5px; }
.scene-legend i { width: 12px; height: 3px; border-radius: 2px; }
.scene-key-orbit { background: #d6e4df; }
.scene-key-zone { background: #60b7a5; }
.known-model-link { display: inline-block; margin-top: 9px; color: var(--teal); font-size: 12px; font-weight: 700; text-underline-offset: 3px; }
.appearance-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 15px; }
.appearance-controls > span { margin-right: 3px; color: var(--muted); font-size: 12px; }
.appearance-controls button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font-size: 11px; }
.appearance-controls button[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); color: #155f63; font-weight: 700; }
.scene-disclaimer { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.world-lab { max-width: 1100px; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 18px 45px rgba(29, 68, 79, .07); }
.world-lab-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 25px 28px 20px; }
.world-lab-head h3 { margin: 3px 0 4px; font-size: clamp(23px, 3vw, 34px); line-height: 1.15; letter-spacing: -.035em; overflow-wrap: anywhere; }
.world-lab-head #world-facts { margin: 0; color: var(--muted); font-size: 13px; }
.world-lab-kicker { margin: 0; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.world-lab-head .evidence { margin-top: 3px; white-space: nowrap; }
.world-lab-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, .8fr); }
.world-stage { position: relative; min-width: 0; min-height: 570px; overflow: hidden; background: radial-gradient(circle at 52% 45%, #1e3d53, #081622 70%); }
#world-canvas { display: block; width: 100%; height: 100%; min-height: 570px; touch-action: none; cursor: grab; }
#world-canvas:active { cursor: grabbing; }
.world-stage-actions { position: absolute; z-index: 1; inset-block-start: 18px; inset-inline-end: 18px; display: flex; gap: 7px; }
.world-stage-actions button { min-height: 38px; padding: 7px 11px; border: 1px solid #8cafbd77; border-radius: 7px; background: #102c3ad9; color: #e9f5f3; font-size: 12px; font-weight: 700; }
.world-stage-actions button:hover:not(:disabled) { background: #215162; }
.world-stage-actions button:disabled { opacity: .48; cursor: not-allowed; }
.world-stage-caption { position: absolute; pointer-events: none; inset-inline-start: 25px; inset-block-end: 20px; display: flex; flex-direction: column; gap: 2px; color: #e9f5f3; text-shadow: 0 2px 10px #071725; }
.world-stage-caption strong { font-size: 23px; line-height: 1.1; letter-spacing: -.025em; }
.world-stage-caption span { color: #c9dedf; font-size: 12px; }
.world-error { position: absolute; inset-inline: 20px; inset-block-start: 45%; margin: 0; color: #f8eeee; text-align: center; }
.world-side { min-width: 0; }
.world-controls, .world-civilization { padding: 24px; }
.world-civilization { border-top: 1px solid var(--line); background: #f7faf9; }
.world-control-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.world-control-head h4 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.world-control-head button { flex: none; min-height: 38px; padding: 7px 12px; border: 1px solid #a6c6c7; border-radius: 8px; background: #fff; color: #155f63; font-size: 12px; font-weight: 700; }
.world-control-head button:hover { background: #eaf5f3; }
.world-control-head #world-reveal { border-color: var(--teal); background: var(--teal); color: #fff; }
.world-control-head #world-reveal:hover { background: #17696d; }
.world-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.world-options button { min-height: 38px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 650; }
.world-options button:hover { background: #edf6f4; }
.world-options button[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); color: #155f63; }
.world-description { max-width: 760px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
#score-size-bar { background: #70a9ab; }
#score-orbit-bar { background: #9ec5c3; }
.section-inline { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-inline h3 { margin-bottom: 5px; }
.section-inline strong { color: var(--teal); font-size: 17px; white-space: nowrap; }
.detail-explain { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.flux-ruler { position: relative; height: 18px; border-radius: 9px; background: var(--sand-soft); margin: 22px 5px 11px; }
.conservative-band { position: absolute; inset-block: 0; border-radius: 9px; background: #b6dcd9; }
.flux-marker { position: absolute; top: -8px; width: 3px; height: 34px; background: var(--ink); transform: translateX(-50%); z-index: 1; }
.flux-marker span { position: absolute; top: -6px; left: -5px; width: 13px; height: 13px; border-radius: 50%; background: var(--ink); border: 2px solid var(--white); }
.flux-labels { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.flux-labels span:nth-child(2) { text-align: center; }
.flux-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.flux-legend span { display: inline-flex; align-items: center; gap: 6px; }
.flux-legend i { width: 10px; height: 10px; border-radius: 3px; }
.orbit-lab { display: flex; flex-direction: column; align-items: start; margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f7faf9; }
.orbit-lab label { width: 100%; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 650; }
.orbit-lab input { width: 100%; margin: 15px 0 11px; accent-color: var(--teal); }
.orbit-lab p { margin: 0 0 10px; font-size: 13px; }
.orbit-lab button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); font-size: 11px; font-weight: 700; }
.orbit-lab small { margin-top: 9px; color: var(--muted); font-size: 11px; }
.legend-conservative { background: #b6dcd9; }
.legend-optimistic { background: var(--sand-soft); }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; margin: 0; }
.metric-grid div { padding-top: 11px; border-top: 1px solid var(--line); min-width: 0; }
.metric-grid dt { color: var(--muted); font-size: 12px; }
.metric-grid dd { margin: 3px 0 0; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.detail-bottom { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.detail-bottom h3 { margin-bottom: 9px; }
.data-flags { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; }
.data-flags li + li { margin-top: 4px; }
.data-flags li::before { content: "•"; color: var(--sand); margin-inline-end: 7px; }
.nasa-link { flex: none; font-size: 12px; font-weight: 700; color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap; }
.nasa-link:hover { color: #155f63; }
.source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.source-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: #f9fbfb; }
.source-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.source-card-head strong { font-size: 13px; }
.source-card-head a { flex: none; color: var(--teal); font-size: 11px; text-decoration: none; }
.source-card p, .spectra-list { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.spectra-list { padding-left: 17px; }
.spectra-list li + li { margin-top: 5px; }
.spectra-list a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 25px 0 35px; color: var(--muted); font-size: 12px; }
.footer p { max-width: 700px; margin: 0; }
.footer a { flex: none; color: var(--teal); font-weight: 700; }

@media (max-width: 1050px) {
  .world-picker { grid-template-columns: minmax(220px, 350px) minmax(0, 1fr); }
  .world-picker label { grid-column: 1 / -1; }
  .intro { grid-template-columns: 1fr; }
  .catalog-summary { gap: 35px; }
  .explorer { grid-template-columns: minmax(315px, .85fr) minmax(0, 1.15fr); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-bottom { display: block; }
  .source-grid { grid-template-columns: 1fr; }
  .world-lab-body { grid-template-columns: 1fr; }
  .world-stage, #world-canvas { min-height: 460px; height: 460px; }
  .world-lab-head, .world-controls, .world-civilization { padding-inline: 20px; }
  .nasa-link { display: inline-block; margin-top: 17px; }
  .sky-layout { grid-template-columns: minmax(0, 1fr) 170px; }
}
@media (max-width: 800px) {
  .feature-facts { grid-template-columns: 1fr; }
  .sky-panel-head { align-items: start; }
  .explorer { grid-template-columns: 1fr; }
  .ranking { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .planet-list { max-height: 390px; }
  .detail { padding: 30px 28px 38px; scroll-margin-top: 20px; }
  .detail-bottom { display: flex; }
  .nasa-link { margin-top: 0; }
}
@media (max-width: 560px) {
  .page-shell { padding-inline: 15px; }
  .feature-tabs { margin-inline: -15px; padding-inline: 15px; }
  .feature-tabs button { padding-inline: 11px; }
  .world-picker { grid-template-columns: 1fr; margin-block: 20px 26px; padding: 15px; }
  .world-picker label { grid-column: auto; }
  .feature-facts p { grid-template-columns: 1fr; gap: 3px; }
  .feature-card { padding: 18px; border-radius: 12px; }
  .feature-intro > p:not(.feature-kind) { font-size: 14px; }
  .topbar { min-height: 72px; align-items: start; flex-direction: column; justify-content: center; gap: 3px; padding-block: 12px; }
  .source-status { text-align: start; font-size: 11px; }
  .intro { padding: 34px 0 29px; gap: 24px; }
  .intro h1 { font-size: clamp(32px, 9vw, 42px); }
  .intro-copy { margin-top: 16px; font-size: 15px; }
  .catalog-summary strong { font-size: 30px; }
  .sky-panel { padding: 17px; border-radius: 12px; }
  .sky-panel-head { display: block; }
  .sky-panel-head > p { margin-top: 9px; }
  .sky-layout { grid-template-columns: 1fr; gap: 8px; }
  #sky-canvas { height: 235px; }
  .sky-caption { gap: 5px; padding: 8px 3px 2px; }
  .sky-caption strong { font-size: 17px; }
  .passport-grid { grid-template-columns: 1fr; }
  .passport-grid > div { padding: 11px 13px; }
  .passport-grid strong { font-size: 20px; }
  .explorer { border-radius: 12px; }
  .section-heading { padding-inline: 17px; }
  .search-field { margin-inline: 17px; }
  .filters { padding-inline: 17px; }
  .planet-row { padding-inline: 13px; grid-template-columns: 24px minmax(0, 1fr) 65px; gap: 7px; }
  .planet-score { font-size: 19px; }
  .show-all { margin-inline: 17px; width: calc(100% - 34px); }
  .detail { padding: 25px 18px 30px; }
  .detail-top { gap: 8px; }
  .detail-score strong { font-size: 39px; }
  .detail-score span { font-size: 11px; }
  .metric-grid { gap: 15px 12px; }
  .metric-grid dd { font-size: 16px; }
  .stability-grid { gap: 6px; }
  .stability-grid div { padding: 9px; }
  .stability-grid strong { font-size: 15px; }
  #system-canvas { height: 255px; }
  .world-lab { border-radius: 12px; }
  .world-stage, #world-canvas { min-height: 380px; height: 380px; }
  .world-stage-actions { inset-block-start: 11px; inset-inline-end: 11px; }
  .world-lab-head { flex-direction: column; gap: 9px; }
  .world-lab-head, .world-controls, .world-civilization { padding-inline: 16px; }
  .world-control-head { align-items: start; flex-direction: column; }
  .world-stage-caption { inset-inline-start: 16px; inset-block-end: 16px; }
  .detail-bottom { display: block; }
  .nasa-link { margin-top: 17px; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
