:root {
  --bg: #0e1116;
  --fg: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --good: #3fb950;
  --bad: #f85149;
  --warn: #d29922;
  --panel: #161b22;
  --panel-2: #1c232c;
  --border: #30363d;
  --ocean: #0a1421;
  --land: #1f2a3a;
  --grid: #1f2933;
  --iss: #f85149;
  --observer: #58a6ff;
  --sun: #d29922;
  --footprint: rgba(248, 81, 73, 0.18);
  --night: rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px; line-height: 1.55;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

header h1 {
  font-size: 1.85rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 65ch;
}

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

.map-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

#map {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.map-ocean { fill: var(--ocean); }

#map-graticule line {
  stroke: var(--grid);
  stroke-width: 0.15;
  vector-effect: non-scaling-stroke;
}

#map-continents path {
  fill: var(--land);
  stroke: rgba(88, 166, 255, 0.12);
  stroke-width: 0.1;
  vector-effect: non-scaling-stroke;
}

#map-night rect {
  fill: var(--night);
}

#map-footprint circle {
  fill: var(--footprint);
  stroke: rgba(248, 81, 73, 0.5);
  stroke-width: 0.2;
  stroke-dasharray: 1 1;
  vector-effect: non-scaling-stroke;
}

#map-trail polyline {
  fill: none;
  stroke: var(--iss);
  stroke-width: 0.4;
  stroke-opacity: 0.55;
  vector-effect: non-scaling-stroke;
}

#map-iss circle {
  fill: var(--iss);
  stroke: white;
  stroke-width: 0.3;
  vector-effect: non-scaling-stroke;
}

#map-observer circle {
  fill: var(--observer);
  stroke: white;
  stroke-width: 0.3;
  vector-effect: non-scaling-stroke;
}

#map-sun circle {
  fill: var(--sun);
  fill-opacity: 0.85;
  stroke: rgba(255,236,179,0.7);
  stroke-width: 0.25;
  vector-effect: non-scaling-stroke;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.card-title {
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.row.inputs {
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.row.inputs label {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  color: var(--muted);
}

input[type="number"] {
  font: inherit;
  font-size: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  padding: 0.4rem 0.55rem;
  background: var(--panel-2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 0.25rem;
}

.ghost {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  background: var(--panel-2);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.ghost:hover { border-color: var(--accent); }

table.kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.kv td {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
  vertical-align: top;
}

table.kv tr:last-child td { border-bottom: none; }

table.kv td:first-child {
  width: 36%;
  color: var(--muted);
  font-size: 0.85rem;
}

table.kv td:last-child {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.visibility {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.checks li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.4rem 0;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
}

.checks li:last-child { border-bottom: none; }

.checks .badge {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--panel-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.checks li.ok .badge   { background: rgba(63, 185, 80, 0.2); color: var(--good); }
.checks li.bad .badge  { background: rgba(248, 81, 73, 0.18); color: var(--bad); }
.checks li.note .badge { background: rgba(210, 153, 34, 0.18); color: var(--warn); }

.checks .desc {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
  margin-top: 0.15rem;
}

.verdict {
  margin-top: 0.6rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: var(--panel-2);
  font-weight: 500;
  text-align: center;
}

.verdict.visible {
  background: rgba(63, 185, 80, 0.15);
  color: var(--good);
}

.verdict.not-visible {
  background: rgba(248, 81, 73, 0.10);
  color: var(--bad);
}

footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

footer code {
  background: var(--panel);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}
