:root {
  --bg: #07090a;
  --fg: #d5e0da;
  --dim: #6b7c74;
  --line: #17211d;
  --accent: #38f29a;
  --accent-soft: rgba(56, 242, 154, 0.12);
  --err: #ff6b6b;
  --warn: #ffb454;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.6 var(--mono);
  min-height: 100vh;
}

/* faint CRT scanlines */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
  z-index: 10;
}

::selection { background: var(--accent); color: var(--bg); }

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

.dim { color: var(--dim); }

/* top bar */
.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.brand { color: var(--accent); font-weight: 700; letter-spacing: 0.2em; }
.uplink { margin-left: auto; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

/* hero */
.hero {
  text-align: center;
  padding: 40px 0 36px;
}
.boot {
  width: fit-content;
  margin: 0 auto 32px;
  font: inherit;
  font-size: 12px;
  text-align: left;
  white-space: pre-wrap;
  max-width: 100%;
}
.kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
h1 {
  margin: 0 0 14px;
  font-size: clamp(22px, 4.6vw, 34px);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 6px;
  vertical-align: -0.12em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
.lede { margin: 0 0 36px; color: var(--dim); }

/* form */
.register {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  text-align: left;
}
.prompt { display: block; margin-bottom: 10px; color: var(--accent); font-size: 13px; }
.row { display: flex; gap: 10px; }

input[type="text"],
input[type="search"] {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  caret-color: var(--accent);
  outline: none;
  transition: border-color 0.15s;
}
input::placeholder { color: #3c4a44; }
input:focus { border-color: var(--accent); }

button {
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0;
  padding: 12px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
button:hover { background: transparent; color: var(--accent); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:disabled { opacity: 0.5; cursor: wait; }

button.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
button.ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.status-line { min-height: 1.6em; margin: 14px 0 6px; font-size: 13px; }
.status-line.ok { color: var(--accent); }
.status-line.err { color: var(--err); }
.status-line.warn { color: var(--warn); }
.fine { margin: 0; font-size: 11px; line-height: 1.6; }

.you {
  margin: 20px auto 0;
  font-size: 12px;
  color: var(--dim);
}
.you strong { color: var(--accent); font-weight: 400; }

/* registry */
.registry { border-top: 1px solid var(--line); padding: 40px 0 24px; }
.registry-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
h2 .dim { letter-spacing: 0.04em; font-weight: 400; text-transform: none; }
.controls { display: flex; gap: 10px; flex: 1 1 340px; justify-content: flex-end; }
.controls input { max-width: 260px; padding: 9px 12px; font-size: 13px; }
.controls button { padding: 9px 14px; font-size: 12px; }

.caption { margin: 22px 0 10px; font-size: 12px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: grid;
  grid-template-columns: 7.5em 1fr auto;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.list .id { color: var(--dim); font-size: 12px; padding-top: 1px; }
.list .nm { overflow-wrap: anywhere; }
.list .ts { color: var(--dim); font-size: 12px; padding-top: 1px; }
.list li.fresh { animation: fresh 2.4s ease-out; }
.list li.fresh .nm { color: var(--accent); }

.more { display: block; margin: 20px auto 0; }
.more[hidden] { display: none; }

.footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 40px;
  font-size: 11px;
  text-align: center;
}
.footer p { margin: 4px 0; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes fresh { from { background: var(--accent-soft); } to { background: transparent; } }

@media (max-width: 560px) {
  body { font-size: 14px; }
  .row { flex-direction: column; }
  .controls { flex-direction: column; }
  .controls input { max-width: none; }
  .list li { grid-template-columns: 1fr auto; gap: 2px 12px; }
  .list .id { grid-column: 1 / -1; }
  .topbar .dim { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor, .dot, .list li.fresh { animation: none; }
}
