:root {
  --bg: #0f1419;
  --bg-2: #171e26;
  --bg-3: #1e2731;
  --ink: #e8eef4;
  --muted: #8b98a6;
  --line: #2c3844;
  --brass: #c9a227;
  --brass-2: #e2c36a;
  --good: #6fba7c;
  --warn: #d6a24a;
  --bad: #d46a6a;
  --focus: #7eb6d9;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 500px at 10% -10%, #1b2733 0%, var(--bg) 55%);
  color: var(--ink);
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
}

a { color: var(--brass-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 20, 25, 0.92);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--brass);
  color: var(--brass-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.search {
  display: flex;
  flex: 1 1 16rem;
  max-width: 28rem;
  gap: 0.4rem;
}
.search input { flex: 1; }

nav {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}
nav a { color: var(--ink); }

main {
  flex: 1;
  width: min(960px, calc(100% - 2rem));
  margin: 1.4rem auto 2rem;
}

footer {
  padding: 1rem 1.4rem 1.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 1.2rem 1.3rem 1.4rem;
}
.narrow { max-width: 34rem; margin-inline: auto; }

h1, h2 { font-weight: 650; letter-spacing: 0.01em; }
h1 { margin: 0 0 0.4rem; font-size: 1.7rem; }
h2 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.lede { color: var(--muted); margin: 0 0 1rem; }

.row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.stack { display: grid; gap: 0.85rem; }
label { display: grid; gap: 0.3rem; font-size: 0.92rem; color: var(--muted); }
.optional { color: var(--muted); font-weight: 400; font-size: 0.8rem; }

input, select, textarea, button {
  font: inherit;
  color: var(--ink);
}
input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

button, .button {
  display: inline-block;
  background: var(--brass);
  color: #1a1406;
  border: 0;
  padding: 0.5rem 0.9rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}
.button:hover, button:hover { filter: brightness(1.08); text-decoration: none; }
.button.secondary, button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
button.danger, .danger { background: var(--bad); color: #1a0808; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.linkish {
  background: none;
  color: var(--brass-2);
  padding: 0;
  font-weight: 500;
}
.danger-form { margin-top: 1.2rem; }

.flash {
  padding: 0.7rem 0.85rem;
  margin: 0 0 1rem;
  border-left: 3px solid var(--brass);
  background: var(--bg-3);
}
.flash.err { border-color: var(--bad); }
.flash.warn { border-color: var(--warn); }
.flash.ok { border-color: var(--good); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.callsign { font-weight: 650; color: var(--ink); }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 1rem 0; }

code, .hash {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.86em;
  overflow-wrap: anywhere;
}
.copy { cursor: pointer; border-bottom: 1px dotted var(--muted); }
.copy:hover { color: var(--brass-2); }

.card {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.card.retired { opacity: 0.72; }
.identity-group {
  margin-top: 1.25rem;
  padding-bottom: 0.85rem;
  border-left: 3px solid var(--brass);
}
.identity-group.status-testing { border-left-color: var(--warn); }
.identity-group.status-retired { border-left-color: var(--muted); }
.identity-group h2 { margin-bottom: 0.2rem; }
.identity-group h3 {
  margin: 0 0 0.3rem;
  font-size: 0.98rem;
  font-weight: 650;
}
.nested-list {
  margin: 0.75rem 0 0.15rem 0.35rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--line);
}
.card.nested {
  margin: 0.55rem 0 0.15rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-2);
  position: relative;
}
.card.nested::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 1.15rem;
  width: 0.65rem;
  border-top: 2px solid var(--line);
}
.nested-hint { margin: 0.7rem 0 0 0.35rem; }
.other-heading {
  margin: 1.6rem 0 0;
  font-size: 1.05rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--line);
  color: var(--muted);
  vertical-align: middle;
}
.pill.primary { color: var(--brass-2); border-color: var(--brass); }
.pill.testing { color: var(--warn); }
.pill.proven { color: var(--good); border-color: var(--good); }
.pill.unproven { color: var(--muted); }

.ok-line { color: var(--good); }
.warn-line { color: var(--warn); }
.hint { color: var(--muted); font-size: 0.92rem; margin: 0 0 1rem; }
.primary-action button {
  padding: 0.7rem 1.1rem;
  font-size: 1.05rem;
}
.inline { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.inline input { width: auto; min-width: 16rem; flex: 1; }

.facts { display: grid; grid-template-columns: 10rem 1fr; gap: 0.4rem 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.ifaces { list-style: none; padding: 0; }
.ifaces li { display: flex; gap: 0.5rem; align-items: center; margin: 0.3rem 0; }
.dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--bad); }
.dot.on { background: var(--good); }

@media (max-width: 720px) {
  .facts { grid-template-columns: 1fr; }
  .top { position: static; }
}
