/* ---------------------------------------------------------------
   Yearth styles. Colours are set once here at the top.
   --------------------------------------------------------------- */
:root {
  --bg: rgba(8, 14, 28, 0.78);
  --line: rgba(125, 249, 255, 0.18);
  --text: #e6eefc;
  --muted: #8ea2c4;
  --accent: #7df9ff;
  --warm: #ffb547;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #02040a; color: var(--text); font: 14px/1.45 var(--font); }
a { color: var(--accent); }
code, kbd { background: rgba(255,255,255,0.08); padding: 0 4px; border-radius: 4px; font-size: 12px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- Globe page ---------- */
body.app { overflow: hidden; }
#globe { position: fixed; inset: 0; }

#side, #panel, #legend, #bar {
  position: fixed; background: var(--bg); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.45);
}
#side { top: 16px; left: 16px; width: 330px; max-height: calc(100% - 90px); overflow: auto; padding: 16px 16px 8px; }
.brand h1 {
  margin: 0; font-size: 24px; letter-spacing: 0.32em; font-weight: 700;
  background: linear-gradient(90deg, #7df9ff, #a8b8ff 45%, #ffb547);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand p { margin: 4px 0 12px; color: var(--muted); font-size: 12.5px; }

.search-wrap { position: relative; margin-bottom: 8px; }
#search {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.06); color: var(--text); font-size: 14px; outline: none;
}
#search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(125,249,255,0.15); }
.hint { display: block; margin-top: 6px; color: var(--muted); font-size: 11.5px; }
#results {
  list-style: none; margin: 6px 0 0; padding: 4px; max-height: 300px; overflow: auto;
  background: rgba(4, 8, 18, 0.95); border: 1px solid var(--line); border-radius: 10px;
}
#results li { display: flex; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
#results li:hover { background: rgba(125,249,255,0.1); }
#results li.muted { cursor: default; }
#results small { color: var(--muted); }
.ico { font-size: 18px; }

details { border-top: 1px solid var(--line); padding: 8px 0; }
summary { cursor: pointer; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11.5px; color: var(--muted); }
.toggle { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; cursor: pointer; }
.toggle b { margin-left: auto; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.key { display: flex; flex-wrap: wrap; gap: 3px 10px; margin: 2px 0 6px 26px; font-size: 11px; color: var(--muted); }
.key i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.wx { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 6px; }
.wx label { cursor: pointer; }

#legend { left: 50%; transform: translateX(-50%); bottom: 64px; width: min(460px, 92vw); padding: 10px 14px; }
.lg-title { font-weight: 600; margin-bottom: 6px; }
.lg-bar { height: 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.15); }
.lg-ticks { position: relative; height: 16px; font-size: 11px; color: var(--muted); }
.lg-ticks span { position: absolute; transform: translateX(-50%); top: 2px; }
.lg-src { font-size: 11px; color: var(--muted); margin-top: 4px; }

#panel { top: 16px; right: 16px; width: 340px; max-height: calc(100% - 90px); overflow: auto; padding: 14px 16px; }
#panel header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#panel h2 { margin: 0; font-size: 17px; }
#panel-close { background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; }
#panel table { width: 100%; border-collapse: collapse; margin-top: 10px; }
#panel th { text-align: left; font-weight: 500; color: var(--muted); padding: 4px 8px 4px 0; width: 42%; vertical-align: top; }
#panel td { padding: 4px 0; font-variant-numeric: tabular-nums; }
#panel tr + tr { border-top: 1px solid rgba(255,255,255,0.05); }
.links { margin: 10px 0 4px; }
.follow { display: block; margin-top: 8px; color: var(--muted); cursor: pointer; }

#bar { left: 16px; right: 16px; bottom: 14px; display: flex; align-items: center; gap: 16px; padding: 8px 14px; font-size: 12.5px; }
#bar nav { margin-left: auto; display: flex; gap: 14px; }
#bar nav a { text-decoration: none; }
#bar .donate { color: var(--warm); font-weight: 600; }
#clock small, #readout { color: var(--muted); }
#readout { font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#live { font-weight: 700; font-size: 11.5px; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
#live.on { color: #06210f; background: #3ddc84; }
#live.off { color: var(--muted); background: rgba(255,255,255,0.08); }
#status-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; cursor: help; }
#status-dot.ok { background: #3ddc84; box-shadow: 0 0 8px #3ddc84; }
#status-dot.warn { background: var(--warm); box-shadow: 0 0 8px var(--warm); }

#paused { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 6; background: var(--bg);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 22px; font-weight: 600; backdrop-filter: blur(10px); }
#demo-banner {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 5;
  background: #ff3b5c; color: #fff; font-weight: 700; padding: 4px 14px; border-radius: 0 0 10px 10px; letter-spacing: 0.05em;
}

@media (max-width: 760px) {
  #side { width: auto; right: 16px; max-height: 45vh; }
  #panel { top: auto; bottom: 64px; left: 16px; right: 16px; width: auto; max-height: 40vh; }
  #readout { display: none; }
  .brand h1 { font-size: 20px; }
}

/* ---------- Text pages (About, Acknowledgements) ---------- */
body.page {
  background: radial-gradient(1200px 600px at 70% -10%, rgba(125,249,255,0.12), transparent),
              radial-gradient(900px 500px at 0% 110%, rgba(255,181,71,0.10), transparent), #04070f;
  min-height: 100%;
}
.page main { max-width: 780px; margin: 0 auto; padding: 40px 22px 80px; }
.page nav.top { display: flex; gap: 18px; align-items: center; margin-bottom: 30px; }
.page nav.top .logo { font-weight: 700; letter-spacing: 0.3em; text-decoration: none;
  background: linear-gradient(90deg, #7df9ff, #a8b8ff 45%, #ffb547); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page h1 { font-size: 34px; margin: 0 0 6px; }
.page h2 { margin-top: 38px; font-size: 21px; color: var(--accent); }
.page h3 { margin: 22px 0 4px; font-size: 16px; }
.page p, .page li { color: #cfdaf0; font-size: 15.5px; line-height: 1.65; }
.page .lead { font-size: 18px; color: var(--muted); }
.card { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px 12px; margin: 16px 0; }
.card h3 { color: var(--text); }
.card .lic { font-size: 12.5px; color: var(--muted); }
.big-button {
  display: inline-block; margin: 8px 0; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none;
  background: linear-gradient(90deg, #ffb547, #ff7a59); color: #1a0d00; box-shadow: 0 8px 30px rgba(255,140,60,0.35);
}
.quote { border-left: 3px solid var(--warm); padding-left: 14px; font-style: italic; }
.page footer { margin-top: 50px; color: var(--muted); font-size: 13px; }
