/* -- Weather on Mars (/mars) and Planets tonight (/planets) -- */
.mars-panel {
  max-width: 52rem;
}

.mars-report-meta {
  margin: 0 0 0.5rem;
  font-size: var(--tool-font-row);
  color: var(--ink);
  line-height: 1.45;
}

.mars-section {
  max-width: 52rem;
  margin: 2.25rem auto 0;
}

.mars-section .wx-now {
  margin-top: 0.75rem;
}

.mars-compare-location {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin: 0.4rem 0 0.75rem;
  font-family: var(--font-sans);
}

.mars-compare-place {
  flex-basis: 100%;
  margin: 0;
  font-size: var(--tool-font-row);
  color: var(--ink);
}

.mars-compare-link {
  font-size: var(--tool-font-row);
}

.mars-compare-location .cloud-guide-location-status {
  flex-basis: 100%;
  margin: 0;
}

.mars-compare-location .cloud-guide-location-status:empty {
  display: none;
}

.mars-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mars-compare,
.mars-month-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: var(--tool-font-row);
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
}

.mars-compare th,
.mars-compare td,
.mars-month-table th,
.mars-month-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.mars-compare tbody tr:last-child > *,
.mars-month-table tbody tr:last-child > * {
  border-bottom: 0;
}

.mars-compare thead th,
.mars-month-table thead th {
  font-size: var(--tool-font-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--cream-dark);
}

.mars-compare tbody th,
.mars-month-table tbody th {
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

.mars-compare td,
.mars-month-table td {
  color: var(--ink);
}

.mars-month-table td {
  white-space: nowrap;
}

.mars-age {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  background: var(--cream-dark);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-family: var(--font-sans);
}

.mars-age label {
  display: block;
  margin: 0 0 0.45rem;
  font-weight: 600;
  color: var(--ink);
}

.mars-age-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mars-age input[type="date"] {
  padding: 0.4rem 0.55rem;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.mars-age-out {
  margin: 0.6rem 0 0;
  color: var(--ink);
  line-height: 1.45;
}

.mars-age-out:empty {
  display: none;
}

.mars-chart-lede {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.mars-chart {
  margin: 0 0 1.5rem;
  padding: 0.9rem 0.9rem 0.5rem;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.mars-chart-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-sans);
  font-size: var(--tool-font-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.mars-chart-plot {
  position: relative;
  width: 100%;
  min-height: 230px;
}

.mars-svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--font-sans);
  touch-action: pan-y;
}

.mars-band {
  fill: var(--cream);
}

.mars-band-label {
  font-size: 11px;
  fill: var(--ink-muted);
}

.mars-grid {
  stroke: var(--line-soft);
  stroke-width: 1;
}

.mars-baseline,
.mars-tick {
  stroke: var(--line);
  stroke-width: 1;
}

.mars-axis {
  font-size: 11px;
  fill: var(--ink-muted);
}

.mars-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.mars-direct {
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink);
}

.mars-note {
  font-size: 11.5px;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--white);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.mars-note-dot {
  fill: var(--white);
  stroke-width: 2;
}

.mars-cross {
  stroke: var(--ink-muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.mars-hover-dot {
  stroke: var(--white);
  stroke-width: 2;
}

.mars-tip {
  position: absolute;
  top: 0.25rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  white-space: nowrap;
}

.mars-tip[hidden] {
  display: none;
}

.mars-details {
  margin: 0 0 0.5rem;
  font-family: var(--font-sans);
}

.mars-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.mars-details .cloud-guide-note {
  margin-top: 0.6rem;
}

.mars-why {
  margin: 0.5rem 0 0;
}

.mars-why dt {
  margin: 1rem 0 0.25rem;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--ink);
}

.mars-why dd {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.mars-worlds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.mars-world {
  padding: 0.9rem 1rem;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.mars-world h3 {
  margin: 0 0 0.15rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
}

.mars-world-stuff {
  margin: 0 0 0.5rem;
  font-family: var(--font-sans);
  font-size: var(--tool-font-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a3a22;
}

.mars-world p:last-child {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

@media (max-width: 520px) {
  .mars-compare th,
  .mars-compare td,
  .mars-month-table th,
  .mars-month-table td {
    padding: 0.45rem 0.5rem;
  }

  .mars-chart {
    padding: 0.7rem 0.5rem 0.4rem;
  }
}

/* -- Planets tonight -- */
.pl-summary {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
}

.pl-summary:empty {
  display: none;
}

.pl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 0.75rem;
  font-family: var(--font-sans);
}

.pl-card {
  padding: 0.85rem 0.95rem;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.pl-card--off {
  background: transparent;
  border-style: dashed;
}

.pl-card--moon {
  background: var(--cream);
}

.pl-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.pl-card-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--ink);
}

.pl-card-when {
  font-size: var(--tool-font-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.pl-card-lead {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.pl-card--off .pl-card-lead {
  font-weight: 400;
  color: var(--ink-soft);
}

.pl-card .wx-line {
  line-height: 1.45;
}

.pl-card-moon {
  font-weight: 600;
}

.pl-card-tip,
.pl-card-dist {
  color: var(--ink-soft);
}

.pl-sky {
  position: relative;
  width: 100%;
  min-height: 210px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.pl-svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--font-sans);
}

.pl-alt-line {
  stroke: rgba(249, 247, 242, 0.22);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.pl-alt-label {
  font-size: 10px;
  fill: rgba(249, 247, 242, 0.7);
}

.pl-ground {
  fill: #3a3326;
}

.pl-tick {
  stroke: rgba(249, 247, 242, 0.5);
}

.pl-dir {
  font-size: 11px;
  fill: rgba(249, 247, 242, 0.75);
}

.pl-dir--main {
  font-weight: 700;
  fill: #f9f7f2;
}

.pl-body {
  fill: #fff6d8;
  stroke: rgba(255, 246, 216, 0.35);
  stroke-width: 4;
}

.pl-body--faint {
  fill: #b9c7da;
  stroke: none;
}

.pl-moon {
  fill: #e9e4d6;
  stroke: rgba(233, 228, 214, 0.3);
  stroke-width: 6;
}

.pl-label {
  font-size: 12px;
  font-weight: 600;
  fill: #f9f7f2;
}

.pl-label--faint {
  font-weight: 400;
  fill: #c9d3e1;
}

.pl-slider {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  margin: 0.75rem 0 0;
  font-family: var(--font-sans);
}

.pl-slider label {
  min-width: 11rem;
  font-weight: 600;
  color: var(--ink);
}

.pl-slider input[type="range"] {
  flex: 1 1 14rem;
  accent-color: var(--accent);
}

/* -- Mars globe -- */
.mars-globe {
  margin: 0.75rem 0 0;
  padding: 1.1rem 1rem 0.9rem;
  background: radial-gradient(circle at 50% 40%, #1a2742 0%, #0b1220 70%);
  border-radius: var(--radius);
  text-align: center;
}

.mars-globe-stage {
  display: flex;
  justify-content: center;
  max-width: 440px;
  margin: 0 auto;
}

.mars-globe-canvas {
  display: block;
  cursor: grab;
  touch-action: none;
}

.mars-globe-canvas:active {
  cursor: grabbing;
}

.mars-globe-caption {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 34rem;
  margin: 0.8rem auto 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  color: #f9f7f2;
}

.mars-globe-hint {
  font-size: 0.82rem;
  color: rgba(249, 247, 242, 0.7);
}

.mars-globe-hint .link-btn {
  color: #f3c9a8;
  font-size: inherit;
  text-decoration: underline;
}

/* -- One day on Mars against Earth's records -- */
.mars-ref {
  stroke: var(--ink-muted);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.mars-ref-label {
  font-size: 11.5px;
  font-weight: 600;
  fill: var(--ink-soft);
}

.mars-ref-sub {
  font-size: 10.5px;
  fill: var(--ink-muted);
}

.mars-swing-row {
  font-size: 12.5px;
  font-weight: 600;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--white);
  stroke-width: 4px;
}

.mars-swing-empty {
  font-size: 12.5px;
  fill: var(--ink-muted);
  font-style: italic;
}

.mars-swing-end {
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--white);
  stroke-width: 4px;
}

.mars-swing-span {
  font-size: 12px;
  fill: var(--ink-soft);
  paint-order: stroke;
  stroke: var(--white);
  stroke-width: 4px;
}

/* -- How thin is the air -- */
.mars-thin-mark {
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 1.5;
}

.mars-thin-mars {
  stroke: #f3c9a8;
  stroke-width: 2.5;
}

.mars-thin-leader {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.mars-thin-label {
  font-size: 12.5px;
  font-weight: 600;
  fill: var(--ink);
}

.mars-thin-label--mars {
  fill: #8a3a22;
  font-size: 13.5px;
}

.mars-thin-sub {
  font-size: 11.5px;
  fill: var(--ink-muted);
}
