:root {
  --bg: #070b14;
  --bg-2: #0d1422;
  --card: #111a2b;
  --line: #1f2c44;
  --text: #e6ebf3;
  --muted: #93a3bb;
  --accent: #4da3ff;
  --accent-2: #ffd54f;
  --good: #3ddc97;
  --danger: #ff6b6b;
  --radius: 12px;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -10%, #13213d 0%, var(--bg) 60%) fixed;
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ---------- Navigasi ---------- */
nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
nav .wrap { display: flex; align-items: center; gap: 16px; height: 56px; }
nav .brand { font-weight: 700; color: var(--text); text-decoration: none; margin-right: auto; white-space: nowrap; }
nav a.link { color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
nav a.link:hover, nav a.link.active { color: var(--text); }

/* ---------- Umum ---------- */
h1, h2, h3 { line-height: 1.25; }
h2 { font-size: 26px; margin: 56px 0 16px; }
h3 { font-size: 18px; margin: 0 0 8px; }
p.lead { font-size: 19px; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--bg-2); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); }

.btn {
  display: inline-block; padding: 12px 20px; border-radius: 10px;
  background: var(--accent); color: #031021; font-weight: 600; text-decoration: none;
  border: 0; cursor: pointer; font-size: 15px;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn:hover { filter: brightness(1.1); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }

pre {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; overflow-x: auto; font: 13px/1.5 var(--mono);
}

footer { margin: 72px 0 0; padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ---------- Beranda ---------- */
.hero { padding: 64px 0 24px; }
.hero h1 { font-size: 44px; margin: 0 0 12px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 16px 44px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-weight: 700; color: var(--accent);
}
.diagram { width: 100%; min-width: 620px; height: auto; display: block; }
.diagram text { font-family: system-ui, sans-serif; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.good { color: var(--good); }

/* ---------- Pelacak ---------- */
.app { display: grid; gap: 16px; grid-template-columns: 1fr; padding: 24px 0; }
@media (min-width: 820px) { .app { grid-template-columns: 380px 1fr; } }
.controls { display: flex; gap: 8px; flex-wrap: wrap; }
.controls select, .controls input {
  flex: 1; min-width: 0; padding: 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font-size: 15px;
}
.controls .btn { padding: 10px 14px; }
#sky { width: 100%; max-width: 380px; aspect-ratio: 1; display: block; margin: 0 auto; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
.stats div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stats dt { color: var(--muted); font-size: 13px; }
.stats dd { margin: 0; font: 600 18px/1.3 var(--mono); }
.status { min-height: 22px; font-size: 14px; color: var(--accent-2); margin: 8px 0; }
.big { font-size: 22px; font-weight: 700; margin: 4px 0 12px; }
tr.vis td { color: var(--accent-2); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); justify-content: center; margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; background: var(--c); }

@media (max-width: 520px) {
  .hero h1 { font-size: 32px; }
  nav a.link.hide-sm { display: none; }
}
