:root {
  --bg: #0b1a24;
  --panel: #12303f;
  --panel-2: #17394b;
  --ink: #e8f1f5;
  --muted: #93aebc;
  --line: #235468;
  --go: #2fb36b;
  --caution: #e0a323;
  --nogo: #d9534f;
  --accent: #3aa7c9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 0 3rem;
  background: radial-gradient(1200px 600px at 20% -10%, #16384a 0%, var(--bg) 55%);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 25, 34, 0.75);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 { margin: 0; font-size: 1.3rem; letter-spacing: 0.02em; }
.topbar .sub { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.85rem; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.85rem; }

button {
  background: var(--accent);
  color: #06212c;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: progress; }

main { max-width: 1100px; margin: 0 auto; padding: 1.25rem; }
.loading { color: var(--muted); padding: 2rem 0; text-align: center; }

.banner {
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  background: var(--panel);
}
.banner .status { font-size: 2rem; font-weight: 800; letter-spacing: 0.04em; }
.banner .headline { font-size: 1.02rem; max-width: 62ch; }
.banner .stamp { color: var(--muted); font-size: 0.8rem; text-align: right; }

.status-go { color: var(--go); }
.status-caution { color: var(--caution); }
.status-nogo { color: var(--nogo); }
.border-go { border-left: 6px solid var(--go); }
.border-caution { border-left: 6px solid var(--caution); }
.border-nogo { border-left: 6px solid var(--nogo); }

.warn {
  margin-top: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: rgba(224, 163, 35, 0.15);
  border: 1px solid var(--caution);
  color: #ffd98a;
  font-size: 0.85rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}
.card h2 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.card .big { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.card .unit { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.card .row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; }
.card .row span:last-child { color: var(--muted); text-align: right; }
.card p.detail { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.85rem; }

.pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.pill.go { background: rgba(47,179,107,0.2); color: #7ce3ab; }
.pill.caution { background: rgba(224,163,35,0.2); color: #ffd98a; }
.pill.nogo { background: rgba(217,83,79,0.22); color: #ff9a97; }

.factors { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  background: var(--panel-2);
  cursor: default;
}
.chip b { font-weight: 700; }

.section-title {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 0.45rem 0.5rem; text-align: right; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
tr.hour-go td:first-child { border-left: 3px solid var(--go); }
tr.hour-caution td:first-child { border-left: 3px solid var(--caution); }
tr.hour-nogo td:first-child { border-left: 3px solid var(--nogo); }
tr.is-now { background: rgba(58,167,201,0.12); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-top: 1rem; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

ul.notes { margin: 0.25rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.86rem; }
ul.notes li { margin-bottom: 0.35rem; }

.alerts { margin-top: 1rem; }
.alert {
  border: 1px solid var(--caution);
  background: rgba(224,163,35,0.1);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin-top: 0.5rem;
}
.alert.severe { border-color: var(--nogo); background: rgba(217,83,79,0.12); }
.alert .name { font-weight: 700; }

.fuel input {
  width: 90px;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}

footer {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding: 1rem 1.25rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
