/* Alto de la barra de navegación: los paneles y el globo parten debajo de ella. */
:root {
  --nav-h: 52px;
}

/* Alias de los nombres anteriores hacia los tokens del sistema visual (design-system.css). */
:root {
  --panel: var(--surface);
  --border: var(--line);
  --text: var(--ink);
  --muted: var(--ink-muted);
  --ok: var(--state-ok);
  --warn: var(--state-warn);
  --bad: var(--state-bad);
  --comm-high: var(--data-earth-high);
  --comm-mid: var(--data-earth-mid);
  --comm-low: var(--data-earth-low);
  --off: var(--data-off);
  --viable: #56b4e9; /* = VIABLE_COLOR en views/encoding.js */
  --sun: var(--data-sun);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 var(--font-text);
}

#globe {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  width: 100%;
  height: calc(100% - var(--nav-h)); /* un lienzo no se estira solo con inset */
  display: block;
  touch-action: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  backdrop-filter: blur(6px);
}

h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: 0.01em;
}

h2 {
  margin: 0;
  font-size: 0.95rem;
}

h3 {
  margin: 16px 0 6px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--muted);
}

.caption {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

a {
  color: var(--accent);
}

/* Botones y campos */

button {
  flex: 1 1 auto;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #182030;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #22304a;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

button.primary {
  background: color-mix(in srgb, var(--accent) 30%, var(--surface-solid));
  border-color: var(--accent);
}

button.primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 42%, var(--surface-solid));
}

button.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 600;
  text-align: left;
}

button.link:hover {
  background: none;
  text-decoration: underline;
}

button:focus-visible,
#site-list li:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0b0f18;
  color: var(--text);
  font: inherit;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Columna izquierda: controles y detalle */

#left {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  left: 16px;
  bottom: 16px;
  width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none; /* el hueco entre paneles deja pasar el mouse al globo */
}

#left > * {
  pointer-events: auto;
}

#controls {
  padding: 14px;
  flex: none;
}

#controls > label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

#status {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

#status[data-kind="ok"] {
  color: var(--ok);
}

#status[data-kind="error"] {
  color: var(--bad);
}

#compare-bar {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.compare-count {
  margin: 0;
  font-size: 0.85rem;
}

.compare-items {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

#detail {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#detail[hidden] {
  display: none;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 0;
}

.detail-header button {
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
}

.detail-body {
  padding: 4px 14px 14px;
  overflow-y: auto;
}

.detail-body[aria-busy="true"] {
  opacity: 0.5;
}

.detail-body p {
  margin: 6px 0;
}

.note {
  padding: 6px 8px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 0.85rem;
}

.verdict {
  font-weight: 600;
}

.verdict.ok,
.ok {
  color: var(--ok);
}

.verdict.bad,
.bad {
  color: var(--bad);
}

.warn {
  color: var(--warn);
}

.error {
  color: var(--bad);
}

.counters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.counter {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.counter b {
  display: block;
  font-size: 0.9rem;
}

.counter span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.bar {
  display: grid;
  grid-template-columns: 96px 1fr 32px;
  gap: 8px;
  align-items: center;
  margin: 4px 0;
  font-size: 0.85rem;
}

.bar .track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar .track span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.bar b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.metrics {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.metrics th,
.metrics td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.metrics th:first-child,
.metrics tbody th {
  text-align: left;
  color: var(--muted);
  font-weight: normal;
}

.windows {
  margin: 0;
  padding-left: 18px;
  font-size: 0.8rem;
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* Panorama del cielo */

.sky {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  overflow: hidden;
}

.sky-bg {
  fill: #03050a;
}

.sky-ground {
  fill: #2a2d33;
}

.sky-grid {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 0.5;
}

.sky-horizon {
  stroke: #c9ced6;
  stroke-width: 1;
}

.sky-tick,
.sky-cardinal {
  fill: var(--muted);
  font-size: 8px;
}

.sky-trail {
  fill: none;
  stroke-width: 1;
  stroke-dasharray: 2 2;
  opacity: 0.75;
}

.sky-body {
  stroke: #05070d;
  stroke-width: 1;
}

.sky-body.below {
  opacity: 0.5;
}

.sky-label {
  font-size: 9px;
  font-weight: 600;
  paint-order: stroke;
  stroke: #05070d;
  stroke-width: 3px;
}

.sky-cursor {
  fill: none;
  stroke-width: 2;
}

/* Línea de tiempo */

.timeline {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  touch-action: none;
}

.strip-bg {
  fill: rgba(255, 255, 255, 0.06);
}

.strip-label {
  fill: #05070d;
  font-size: 6px;
  font-weight: 700;
}

.timeline-bg {
  fill: #03050a;
}

.timeline-ground {
  fill: #2a2d33;
}

.timeline-line {
  fill: none;
  stroke-width: 1.4;
}

.timeline-cursor line {
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 0.75;
}

.timeline-readout {
  min-height: 2.6em;
}

/* Animación */

.play {
  align-items: center;
}

.play #play[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 30%, var(--surface-solid));
  border-color: var(--accent);
}

label.inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

select {
  padding: 5px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0b0f18;
  color: var(--text);
  font: inherit;
}

.custom select {
  width: 100%;
  margin-top: 2px;
}

.custom input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}

/* Barra lateral: leyenda, coordenadas y ranking */

#sidebar {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  right: 16px;
  bottom: 16px;
  width: 340px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.legend {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.legend dl {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 5px 10px;
  align-items: center;
  margin: 10px 0 0;
  font-size: 0.82rem;
}

.legend dt {
  display: flex;
  justify-content: center;
}

.legend dd {
  margin: 0;
  color: var(--muted);
}

.legend dd b {
  color: var(--text);
  font-weight: 600;
}

.reticle-key {
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: middle;
}

.swatch {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c);
}

.custom {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.custom summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.custom form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.custom label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.custom .fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-error {
  margin: 0;
  color: var(--bad);
  font-size: 0.8rem;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px 0;
}

.list-header label {
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.list-header input {
  width: auto;
}

.list-hint {
  margin: 4px 14px 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

#site-list {
  list-style: none;
  margin: 0;
  padding: 0 6px 10px;
  overflow-y: auto;
  flex: 1;
}

#site-list li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  grid-template-areas:
    "dot name score"
    ". sub sub";
  gap: 2px 10px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

#site-list li:hover {
  background: rgba(255, 255, 255, 0.05);
}

#site-list li[aria-selected="true"] {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.dot {
  grid-area: dot;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.name {
  grid-area: name;
  min-width: 0;
}

.name small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.score {
  grid-area: score;
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sub {
  grid-area: sub;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.status {
  margin-left: 6px;
  font-weight: 600;
}

.status.ok {
  color: var(--ok);
}

.status.bad {
  color: var(--bad);
}

/* Comparación */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 4, 8, 0.7);
}

.overlay[hidden] {
  display: none;
}

.compare-panel {
  width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: #0e121c;
}

.compare-content {
  padding: 10px 14px 14px;
  overflow: auto;
}

.compare-scroll {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.compare-table th,
.compare-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

.compare-table thead th {
  min-width: 190px;
}

.compare-table thead th > * {
  display: block;
  margin-bottom: 4px;
}

.compare-table thead .sky-container {
  margin: 6px 0;
}

.compare-table tbody th {
  color: var(--muted);
  font-weight: normal;
  white-space: nowrap;
}

.compare-table td.best {
  color: var(--ok);
  font-weight: 700;
}

.compare-table .remove {
  width: auto;
  font-size: 0.78rem;
}

/* Tooltip del globo */

#tooltip {
  position: fixed;
  z-index: 10;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(8, 11, 18, 0.95);
  border: 1px solid var(--border);
  pointer-events: none;
  font-size: 0.82rem;
}

#tooltip > * {
  display: block;
}

#tooltip em {
  color: var(--muted);
  font-style: normal;
  margin-top: 2px;
}

/* Pantallas angostas: controles arriba, lista o detalle abajo */

@media (max-width: 760px) {
  #left {
    left: 16px;
    right: 16px;
    width: auto;
  }

  #detail {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-height: 55vh;
  }

  #sidebar {
    top: auto;
    left: 16px;
    width: auto;
    max-height: 38vh;
  }

  body.detail-open #sidebar {
    display: none;
  }

  .legend {
    display: none;
  }
}

/* Relieve en el cielo y la línea de tiempo */

.sky-terrain {
  fill: #2a2d33;
  opacity: 0.92;
}

.sky-zero {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 0.6;
  stroke-dasharray: 3 3;
}

.timeline-horizon {
  fill: none;
  stroke-width: 0.9;
  stroke-dasharray: 2 2;
  opacity: 0.8;
}

/* Topography & Landing Safety */

.slope-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.slope-presets button {
  flex: 1 1 auto;
  font-size: 0.72rem;
  padding: 4px 6px;
}

.slope-presets button.active {
  border-color: var(--accent, #56b4e9);
  background: rgba(86, 180, 233, 0.16);
}

.topography-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.topography-summary > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
}

.slope-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.slope-badge.ok {
  background: rgba(70, 200, 120, 0.18);
  color: #7ee2a8;
}

.slope-badge.warn {
  background: rgba(230, 159, 0, 0.2);
  color: #f6c25b;
}

.slope-badge.bad {
  background: rgba(213, 94, 0, 0.22);
  color: #ff8e72;
}

.slope-warning {
  padding: 8px 10px;
  margin: 8px 0;
  border-left: 3px solid #d55e00;
  border-radius: 4px;
  background: rgba(213, 94, 0, 0.14);
  color: #ffb49a;
  font-size: 0.82rem;
}

/* Phase 2 & 3: 3D Relief, Mission Control Readiness, Radar & Patch */

.relief-toggle {
  align-items: center;
}

.relief-toggle .caption {
  margin-right: 4px;
}

.relief-toggle button.active,
.surface-toggle button.active {
  border-color: var(--accent, #56b4e9);
  background: rgba(86, 180, 233, 0.18);
}

.lola-colorbar {
  margin: 4px 0 6px;
}

.lola-bar {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #301278 0%,
    #205cd6 18%,
    #18b9d2 36%,
    #40d26e 52%,
    #ebdc38 68%,
    #f07820 82%,
    #d7261e 93%,
    #faf5f0 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.lola-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.demo-picker {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.demo-picker select {
  width: 100%;
  margin-top: 2px;
}

.readiness-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin: 8px 0;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 500;
}

.readiness-banner .badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.readiness-banner.go {
  background: rgba(70, 200, 120, 0.14);
  border: 1px solid rgba(70, 200, 120, 0.38);
  color: #9ff0bf;
}

.readiness-banner.go .badge {
  background: #2f9e5b;
  color: #05160c;
}

.readiness-banner.nogo {
  background: rgba(213, 94, 0, 0.16);
  border: 1px solid rgba(213, 94, 0, 0.45);
  color: #ffb49a;
}

.readiness-banner.nogo .badge {
  background: #d55e00;
  color: #fff;
}

.terrain-patch-controls {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
  width: 100%;
  max-width: 320px;
}

.terrain-patch-btn {
  flex: 1;
  font-size: 11px;
  padding: 5px 4px;
  background: var(--surface-2, #141a29);
  color: var(--text-muted, #94a3b8);
  border: 1px solid var(--border, #242e42);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.terrain-patch-btn:hover:not(:disabled) {
  background: var(--surface-3, #1e2638);
  color: var(--text, #f1f5f9);
}

.terrain-patch-btn.active {
  background: var(--accent, #38bdf8);
  color: #060912;
  font-weight: 600;
  border-color: var(--accent, #38bdf8);
}

.terrain-patch-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.terrain-patch-canvas {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #060912;
  cursor: grab;
}

.terrain-patch-canvas:active {
  cursor: grabbing;
}

.terrain-patch-legend {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin-top: 6px;
  max-width: 320px;
  line-height: 1.35;
}

/* Modo simple y modo técnico */

body.mode-simple .tech-only,
body:not(.mode-simple) .simple-only {
  display: none !important;
}

.title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 10px;
}

.segmented.wide {
  display: flex;
}

.segmented button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 4px 10px;
}

.segmented button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 30%, var(--surface-solid));
  font-weight: 600;
}

button.small {
  flex: none;
  padding: 3px 8px;
  font-size: 0.78rem;
}

.plain {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

.plain ul {
  margin: 0;
  padding-left: 18px;
}

.plain li + li {
  margin-top: 6px;
}

.learn p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 14px 8px;
}

.list-tools .list-hint {
  margin: 0;
}

.status + .reason,
.sub .reason {
  display: block;
  color: var(--bad);
  font-size: 0.75rem;
}

.best-dates > button {
  width: 100%;
}

.best-list {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 0.85rem;
}

.best-list li {
  margin: 6px 0;
}

.best-list li > span {
  display: inline-block;
  min-width: 70%;
}

.best-list small {
  display: block;
  color: var(--muted);
}

.best-list button {
  float: right;
  flex: none;
}

.credits {
  border-top: 1px solid var(--border);
  border-bottom: 0;
}

.mobile-only {
  display: none;
}

@media (max-width: 760px) {
  .mobile-only {
    display: block;
    width: 100%;
    margin-top: 8px;
  }

  body:not(.more-open) #more-controls {
    display: none;
  }

  #sidebar {
    max-height: 32vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}


/* ---------- Barra de navegación y secciones ---------- */

#topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-4);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

#topnav .segmented {
  margin: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  font-stretch: 118%;
  white-space: nowrap;
}

.brand .icon {
  color: var(--accent);
  width: 1.5em;
  height: 1.5em;
}

.nav-links {
  display: flex;
  gap: var(--space-1);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: 8px 12px;
  color: var(--ink-muted);
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

#topnav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page[hidden] {
  display: none !important;
}

.page h1:focus {
  outline: none;
}

a.btn {
  text-decoration: none;
}

/* Comparación (provisoria): ocupa la pantalla bajo la barra. La intro tiene su propio archivo (intro.css). */
.page--compare {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  display: grid;
  place-items: center;
  padding: var(--space-5) var(--space-4);
  overflow-y: auto;
}

.page-inner {
  display: grid;
  gap: var(--space-5);
  width: min(760px, 100%);
}

.page--compare .hud-frame p {
  margin: 0 0 var(--space-4);
  max-width: 62ch;
}

@media (max-width: 620px) {
  .brand-name {
    display: none;
  }
}

@media (max-width: 480px) {
  #topnav {
    gap: var(--space-2);
    padding: 0 var(--space-3);
  }

  .nav-num {
    display: none;
  }

  .nav-links a {
    padding: 8px;
  }
}


/* Relieve y calidad del globo */

.relief {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.relief label {
  display: grid;
  gap: 2px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.relief .check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink);
  font-size: var(--fs-body);
}

.relief .check input {
  width: auto;
}

.range-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.range-row input {
  padding: 0;
  accent-color: var(--accent);
}

.range-row output {
  min-width: 2.6em;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  text-align: right;
}

/* Surface & Risk Layer grid inside the config drawer */
.layer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.layer-grid button[aria-pressed="true"] {
  background: rgba(34, 211, 238, 0.18);
  color: #f8fafc;
  border-color: rgba(34, 211, 238, 0.65);
}

/* Puntaje referencial (sitio no viable) y métrica sin datos. */
.mini .ref { opacity: 0.55; }
.bar.nodata-bar b { font-weight: 400; color: var(--ink-muted); font-size: 0.75rem; }
.bar.nodata-bar .track { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.1) 4px 8px); }

.layer-grid .btn-suitability {
  grid-column: 1 / -1;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.45);
  color: #34d399;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.layer-grid .btn-suitability[aria-pressed="true"] {
  background: rgba(52, 211, 153, 0.3);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.45);
}
