@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/plex-mono.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --accent: #a7f3cb;
  --muted: #a8b4b7;
  --border: #8ca99e38;
  --neon-glow: 6px;
  --glow-alpha: 0.07;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
}
body {
  color: #edf2ee;
  background: #050807;
  font-family: 'IBM Plex Mono', monospace;
}
body:after {
  box-shadow: none;
}
button,
input,
select,
textarea {
  font-family: inherit !important;
  font-size: 14px;
}
button,
select,
input:not([type='range']):not([type='checkbox']),
textarea {
  border-radius: 3px !important;
  min-height: 44px;
}
button {
  transition:
    background 0.15s,
    border-color 0.15s;
  letter-spacing: -0.03em;
}
button:hover {
  background-color: #183129 !important;
  border-color: #a7f3cb !important;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 2px solid #c7ffdf;
  outline-offset: 3px;
}
button.active,
button.primary,
.primary {
  background: #b3f6d2 !important;
  color: #05160e !important;
  border-color: #b3f6d2 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
body > header,
body > footer {
  background: #080f0eeb;
  border-color: var(--border);
  box-shadow: none;
  font-family: 'IBM Plex Mono', monospace;
}
.brand {
  font-weight: 600;
  letter-spacing: 0.16em;
}
.brand small {
  font-size: 10px;
  color: #b3c7bc;
  letter-spacing: 0.13em;
}
.brandmark {
  text-shadow: none;
  color: #b3f6d2;
}
.panel,
.view-options,
dialog,
.compact-dialog,
.world-dialog,
.i3-dialog {
  border-radius: 5px !important;
  background: #0a1211f5 !important;
  border-color: var(--border) !important;
  box-shadow: 0 18px 60px #0008 !important;
  backdrop-filter: blur(12px);
}
.panel:before {
  background: #b3f6d2;
  box-shadow: none;
}
h1,
h2,
h3 {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: -0.05em;
  line-height: 1.25;
  font-weight: 500;
}
.eyebrow,
.compact-kicker,
.world-kicker,
.i3-kicker {
  font:
    11px 'IBM Plex Mono',
    monospace;
  letter-spacing: 0.15em;
  color: #a7f3cb;
  text-transform: uppercase;
}
.panel p,
.world-message,
.compact-note,
.lab-explanation {
  line-height: 1.65;
  color: #aabbb3;
}
.row,
.fact,
.lab-properties > div {
  border-color: var(--border);
}
.lab-heading,
.i3-header,
.world-header {
  background: #0b1512 !important;
  border-bottom: 1px solid var(--border);
  box-shadow: none !important;
}
.lab-viewport,
.compact-stage {
  background: radial-gradient(ellipse at center, #16261f, #050a08 75%);
  border-radius: 3px !important;
  border: 1px solid var(--border);
}
.lab-viewport:after {
  content: '';
  position: absolute;
  top: 65px;
  bottom: 75px;
  left: 50%;
  width: 1px;
  background: linear-gradient(transparent, #a7f3cb33, transparent);
  pointer-events: none;
}
.lab-object-labels {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  left: 0 !important;
  right: 0 !important;
  text-align: center;
}
.lab-object-labels > span {
  width: auto !important;
}
.lab-metrics > div,
.compact-panels > section {
  background: #111d18 !important;
  border-radius: 3px !important;
  border-color: var(--border) !important;
}
.comparison-insight {
  border-left: 2px solid #a7f3cb;
  padding: 14px 18px;
  margin: 18px 0;
  background: #a7f3cb08;
  line-height: 1.6;
}
.compact-heading {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  position: static;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--border);
}
.compact-dialog h1 {
  margin: 24px 0;
  font-size: clamp(18px, 2.3vw, 28px);
}
.pulse-traces {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 18px 0;
}
.pulse-trace {
  width: 100%;
  height: 84px;
  background: #050c09;
  border: 1px solid var(--border);
}
.pulse-counter {
  display: block;
  color: #adf1d0;
  font-size: 14px;
  margin-top: 10px;
}
.world-controls,
.i3-controls {
  background: #09120feb !important;
  border-color: var(--border) !important;
}
.world-controls label,
.i3-controls label {
  font-size: 13px !important;
  color: #bac9c0;
}
.world-toolbar,
.i3-toolbar {
  background: #0b1512 !important;
}
.world-metrics {
  background: #0a1511 !important;
}
.world-metrics strong {
  color: #c1f6d8;
}
.world-message {
  background: #0a1511e8 !important;
  border-color: #a7f3cb !important;
  font-size: 12px !important;
}
.world-view-readout {
  font:
    12px 'IBM Plex Mono',
    monospace;
  background: #06120dde;
}
.world-controls {
  width: 300px;
}
.world-header h2 {
  font-size: 20px;
}
.world-weather {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.world-science {
  padding: 10px;
  border: 1px solid var(--border);
  line-height: 1.7;
  font-size: 12px;
}
.i3-loading {
  background: radial-gradient(ellipse, #183226, #080e0c) !important;
  gap: 14px;
}
.city-loading-detail {
  max-width: 480px;
  padding: 0 24px;
  text-align: center;
  line-height: 1.8;
  color: #b8cbbf;
}
.i3-loading:not([hidden]):before {
  content: '';
  width: 48px;
  height: 48px;
  border: 1px solid #446553;
  border-top: 2px solid #b3f6d2;
  animation: terminal-load 1.5s linear infinite;
}
@keyframes terminal-load {
  to {
    transform: rotate(360deg);
  }
}
.related-objects {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}
.related-objects button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 6px 0;
  padding: 9px 12px;
}
.related-objects small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.related-objects summary {
  padding: 10px 0;
  cursor: pointer;
}
@media (max-width: 760px) {
  :root {
    font-size: 14px;
  }
  .compact-dialog {
    padding: 16px;
  }
  .compact-heading {
    gap: 8px;
  }
  .compact-kicker {
    font-size: 10px;
  }
  .compact-stage {
    height: 290px;
  }
  .world-controls {
    width: 100%;
  }
  .world-header h2 {
    font-size: 16px;
  }
  .world-metrics small {
    font-size: 10px;
  }
  .world-metrics strong {
    font-size: 15px;
  }
  .lab-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .lab-view-controls button {
    font-size: 11px;
    padding: 8px;
  }
  .lab-object-labels {
    font-size: 12px;
  }
  .lab-object-labels small {
    font-size: 10px;
  }
  .pulse-traces {
    gap: 8px;
  }
  .comparison-insight {
    font-size: 12px;
  }
  .world-toolbar {
    gap: 5px !important;
  }
  .world-toolbar button {
    font-size: 11px;
    padding: 8px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .i3-loading:before {
    animation: none !important;
  }
  button {
    transition: none;
  }
}

/* Preserve room for results and keep the nearest tool compact. */
.nearest {
  padding-top: 9px;
  margin-top: 8px;
}
.nearest p {
  display: none;
}
.nearest h3 {
  margin-bottom: 7px;
  font-size: 12px;
}
.catalog-footer {
  margin-top: 9px;
  padding-top: 8px;
  font-size: 10px;
}
.results-head {
  margin: 10px 0 5px;
}
#results {
  min-height: 140px;
}
#catalog {
  overflow-y: auto;
}
.tabs {
  margin-bottom: 8px;
}
.world-controls {
  width: auto;
}
.comparison-unavailable {
  position: absolute;
  inset: 40% 12% auto;
  text-align: center;
  line-height: 1.6;
}
body > header nav {
  border-radius: 3px;
  background: #101b16;
}
footer .zoom-controls {
  background: none;
}
@media (min-width: 761px) and (max-height: 850px) {
  #catalog {
    bottom: 94px;
    top: 90px;
    padding: 16px;
  }
  #catalog h2 {
    margin: 0;
  }
  #catalog .panel-title {
    margin-bottom: 10px;
  }
}

.detail {
  overflow-x: hidden;
}
.detail dd {
  min-width: 0;
  overflow-wrap: anywhere;
}
.detail dl > div {
  min-width: 0;
}
#facts > div:has(dd:only-child) {
  display: block;
}
.zoom-control {
  background: #0b1712 !important;
}

/* Atlas controls share the caption's left edge; no floating overlap with title/footer. */
.atlas-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  pointer-events: auto;
  max-width: 560px;
}
.atlas-secondary-actions > button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.875rem;
  background: #0b1a22;
  color: #bbdbe4;
  cursor: pointer;
}
.scene-caption .atlas-secondary-actions .view-options {
  position: relative;
  inset: auto;
  margin: 0;
  max-width: 320px;
  padding: 0;
  min-height: 44px;
  flex-basis: 100%;
  background: transparent;
  border: 0;
  pointer-events: auto;
}
.scene-caption .view-options > summary {
  display: block;
  width: fit-content;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  background: #0b1a22;
  font-size: 0.875rem;
}
.scene-caption .view-options[open] {
  padding: 10px;
  background: #091711f5;
  border: 1px solid var(--border);
  max-height: 50vh;
  overflow: auto;
}
.scene-caption .view-options[open] > summary {
  padding: 0 0 10px;
  border: 0;
  background: none;
}
@media (max-width: 760px) {
  .atlas-secondary-actions {
    gap: 6px;
    max-width: calc(100vw - 28px);
  }
  .atlas-secondary-actions > button {
    font-size: 0.875rem;
  }
}
.cosmic-lab {
  width: min(1500px, 98vw);
  max-width: 98vw;
  height: 94dvh;
  max-height: 94dvh;
  padding: 0;
  color: #d9e8ed;
  background: #061017;
  border: 1px solid #35666a;
  overflow: hidden;
  font-family: var(--font-body, monospace);
}
.cosmic-lab[open] {
  display: flex;
  flex-direction: column;
}
.cosmic-lab header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border-bottom: 1px solid #245358;
}
.cosmic-lab h2 {
  font-size: 22px;
  margin: 0;
  flex: 1;
}
.cosmic-lab .eyebrow {
  color: #73d4bd;
  font-size: 11px;
  letter-spacing: 0.1em;
}
.cosmic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 20px;
}
.cosmic-tabs [aria-pressed='true'] {
  background: #163e36;
  border-color: #82dfbd;
}
.cosmic-lab button,
.cosmic-lab input,
.cosmic-lab select {
  font: inherit;
  font-size: 14px;
  min-height: 44px;
}
.cosmic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 0;
  flex: 1;
}
.cosmic-view {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cosmic-stage {
  position: relative;
  min-height: 240px;
  flex: 1;
}
.cosmic-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.cosmic-caption {
  padding: 10px 18px;
  margin: 0;
  color: #a4cec9;
  font-size: 13px;
  min-height: 40px;
}
.cosmic-transport {
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cosmic-transport input {
  flex: 1;
  min-width: 70px;
  accent-color: #8adac3;
}
.cosmic-panel {
  overflow: auto;
  padding: 20px;
  border-left: 1px solid #245358;
  background: #0b161f;
}
.cosmic-field,
.cosmic-selector {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}
.cosmic-field > span,
.cosmic-selector > span {
  font-size: 13px;
  color: #a6c1c8;
}
.cosmic-panel input,
.cosmic-panel select {
  width: 100%;
  box-sizing: border-box;
  color: #e1eded;
  background: #071018;
  border: 1px solid #32505c;
  padding: 9px;
}
.cosmic-results {
  display: flex;
  flex-direction: column;
  max-height: 200px;
  overflow: auto;
}
.cosmic-results:empty {
  display: none;
}
.cosmic-note {
  font-size: 13px;
  line-height: 1.65;
  color: #9db5bf;
}
.cosmic-metrics {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  font-size: 14px;
}
.cosmic-metrics dd {
  margin: 0;
  color: #96ebce;
}
.cosmic-panel a {
  color: #88dccb;
  font-size: 13px;
}
.cosmic-milestones {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 5px;
}
.cosmic-milestones button {
  width: 100%;
  text-align: left;
  padding: 9px;
}
.cosmic-story {
  border-top: 1px solid #315159;
  margin-top: 14px;
  padding-top: 14px;
  line-height: 1.7;
}
.cosmic-story strong {
  color: #b9d7c4;
}
.cosmic-lab :focus-visible {
  outline: 2px solid #a7f5d9;
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .cosmic-lab {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .cosmic-lab header {
    padding: 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .cosmic-lab header .eyebrow {
    display: none;
  }
  .cosmic-lab h2 {
    font-size: 17px;
  }
  .cosmic-tabs {
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .cosmic-layout {
    display: block;
    overflow: auto;
  }
  .cosmic-view {
    height: 48dvh;
    min-height: 320px;
  }
  .cosmic-panel {
    overflow: visible;
    border-left: 0;
    border-top: 1px solid #245358;
  }
  .cosmic-stage {
    min-height: 220px;
  }
  .cosmic-transport {
    padding: 8px;
  }
  .cosmic-caption {
    font-size: 12px;
  }
}
.research-panel {
  width: min(1000px, 94vw);
  max-height: 92dvh;
  background: #07131c;
  color: #d6e7e9;
  border: 1px solid #38636a;
  padding: 0;
}
.research-panel header {
  display: flex;
  gap: 16px;
  align-items: center;
  position: sticky;
  top: 0;
  background: #0a1922;
  padding: 16px;
  z-index: 2;
}
.research-panel h2 {
  flex: 1;
  font-size: 21px;
  margin: 0;
}
.research-panel section {
  padding: 20px;
}
.research-panel input,
.research-panel button {
  min-height: 44px;
  font: inherit;
}
.research-panel input {
  padding: 10px;
  border: 1px solid #315760;
  background: #050e15;
  color: #e1eded;
  max-width: 100%;
  box-sizing: border-box;
}
.research-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 18px 0;
}
.research-panel th,
.research-panel td {
  text-align: left;
  padding: 9px;
  border-bottom: 1px solid #203944;
  overflow-wrap: anywhere;
  max-width: 300px;
}
.research-panel th {
  font-weight: 500;
  color: #7dcbbb;
}
.research-panel a {
  color: #85dccc;
}
.research-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.research-tools form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.satellite-globe {
  height: 380px;
  margin-top: 16px;
  touch-action: none;
}
.satellite-globe canvas {
  display: block;
}
.research-status {
  font-size: 13px;
  color: #a0c2c7;
}
.scene-caption .atlas-secondary-actions .view-options:not([open]) {
  flex-basis: auto;
  width: fit-content;
  min-width: 0;
  box-shadow: none;
  background: transparent;
}
.atlas-secondary-actions .view-options {
  clear: both;
}
.atlas-secondary-actions::after {
  content: '';
  order: 1;
  flex-basis: 100%;
  height: 0;
}
.atlas-secondary-actions > .view-options {
  order: 2;
}
.cosmic-panel small {
  display: block;
  margin: 8px 0;
  color: #99bdc3;
}
.cosmic-stage > h3 {
  font-size: clamp(24px, 3vw, 42px);
  margin: 8% 7% 20px;
}
.cosmic-stage > p {
  max-width: 720px;
  margin: 18px 7%;
  font-size: 16px;
  line-height: 1.8;
  color: #b5d2d7;
}
.cosmic-stage > strong {
  display: block;
  margin: 20px 7%;
  color: #87d9b8;
}
.cosmic-story {
  margin: 12px 0 24px;
  padding: 12px;
  border: 1px solid #24444c;
  background: #0b1d26;
}
.cosmic-lab .cosmic-tabs {
  border-radius: 0;
}
.cosmic-panel .cosmic-note {
  font-size: 14px;
}
.cosmic-lab > header {
  inset: auto;
  height: auto;
  min-height: 68px;
  flex-shrink: 0;
  box-sizing: border-box;
}
.cosmic-lab > .cosmic-tabs {
  position: static;
  inset: auto;
  transform: none;
  width: auto;
  height: auto;
  min-height: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}
.cosmic-lab .cosmic-tabs button {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
  text-align: left;
}
.research-panel > header {
  height: auto;
  min-height: 68px;
  inset: 0 0 auto;
  box-sizing: border-box;
}
@media (max-width: 760px) {
  .cosmic-lab > .cosmic-tabs {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .cosmic-lab h2 {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .cosmic-lab header > button {
    max-width: 44%;
    padding: 8px;
    white-space: normal;
  }
}
/* Cinematic labs: information lives beside, never over, the action. */
.cosmic-stage {
  position: relative;
  isolation: isolate;
  min-height: 440px;
  background: radial-gradient(ellipse at center, #111529, #02050b);
  overflow: hidden;
}
.cosmic-stage > canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.cinema-hud {
  position: absolute;
  top: 25px;
  left: 28px;
  right: 22px;
  pointer-events: none;
  text-shadow: 0 2px 16px #000;
  max-width: 75%;
}
.cinema-hud small {
  font: 11px var(--font-mono, monospace);
  letter-spacing: 0.16em;
  color: #a6d9e0;
  text-transform: uppercase;
}
.cinema-hud h3 {
  font-size: clamp(22px, 2.4vw, 39px);
  font-weight: 500;
  line-height: 1.2;
  color: #f1f7ff;
  margin: 10px 0 9px;
  letter-spacing: -0.035em;
}
.cinema-hud p {
  font-size: 14px;
  line-height: 1.65;
  max-width: 490px;
  color: #b9c9dd;
  margin: 0;
}
.cinema-legend {
  position: absolute;
  bottom: 55px;
  left: 24px;
  right: 24px;
  color: #bac7d7;
  font-size: 11px;
  line-height: 1.5;
  pointer-events: none;
  max-width: 680px;
  text-shadow: 0 1px 5px #000;
}
.cinema-views {
  position: absolute;
  bottom: 14px;
  left: 22px;
  display: flex;
  gap: 6px;
}
.cinema-views button {
  font-size: 11px;
  min-height: 34px;
  padding: 7px 12px;
  background: #07111ce0;
}
.cosmic-tabs {
  overflow-x: auto;
  flex-wrap: nowrap;
}
.cosmic-tabs button {
  white-space: nowrap;
  min-height: 44px;
}
.cosmic-caption {
  font-size: 12px;
}
.cosmic-transport {
  gap: 8px;
}
.cosmic-transport input {
  min-width: 30px;
}
@media (max-width: 760px) {
  .cosmic-lab {
    width: 100dvw;
    height: 100dvh;
    padding: 0;
    max-height: 100dvh;
    border-radius: 0;
  }
  .cosmic-lab > header {
    padding: 12px !important;
  }
  .cosmic-lab > header h2 {
    font-size: 18px;
  }
  .cosmic-layout {
    display: flex;
    flex-direction: column;
  }
  .cosmic-view {
    min-width: 0;
  }
  .cosmic-stage {
    min-height: 350px;
    height: 49dvh;
  }
  .cosmic-panel {
    max-height: none;
    overflow: visible;
  }
  .cosmic-tabs {
    padding: 0 8px;
  }
  .cosmic-tabs button {
    font-size: 11px;
    padding: 9px;
  }
  .cinema-hud {
    left: 16px;
    top: 16px;
    max-width: 92%;
  }
  .cinema-hud h3 {
    font-size: 21px;
  }
  .cinema-hud p {
    font-size: 12px;
    max-width: 280px;
  }
  .cinema-legend {
    left: 16px;
    bottom: 61px;
    font-size: 10px;
  }
  .cinema-views {
    left: 12px;
  }
  .cinema-views button {
    min-height: 40px;
  }
  .cosmic-transport {
    padding: 8px;
  }
  .cosmic-transport button {
    font-size: 12px;
    padding: 8px;
  }
  .cosmic-panel {
    padding: 16px;
  }
}
@media (max-height: 600px) and (orientation: landscape) {
  .cosmic-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .cosmic-stage {
    height: calc(100dvh - 210px);
    min-height: 220px;
  }
  .cosmic-panel {
    max-height: calc(100dvh - 126px);
    overflow: auto;
  }
  .cinema-hud h3 {
    font-size: 21px;
  }
  .cinema-hud p {
    display: none;
  }
}
.live-tracking-panel {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding: 16px 0;
  border-top: 1px solid #365045;
  font-size: 14px;
  line-height: 1.55;
}
.live-tracking-panel label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}
.live-tracking-panel input[type='checkbox'] {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.live-tracking-panel select {
  width: 100%;
  min-height: 44px;
}
.live-tracking-panel p {
  margin: 0;
  overflow-wrap: anywhere;
}
.live-tracking-panel small {
  display: block;
  color: #a8bfb4;
}
.live-tracking-panel a {
  color: #a6f4cf;
}
