:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #0b0b0b;
  --panel-soft: #111;
  --ink: #c4c4c4;
  --ink-strong: #e4e4e4;
  --muted: #8a8a8a;
  --line: #242424;
  --line-strong: #3a3a3a;
  --ok: #39ff14;
  --warn: #d9d9d9;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.72rem, 0.95vw, 0.92rem);
  line-height: 1.5;
}

a { color: var(--ink-strong); text-underline-offset: 0.22em; }
a:hover { color: #fff; }

.site-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 54px;
}

.brand {
  color: var(--ink-strong);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink-strong); }

.hero {
  display: grid;
  gap: 28px;
  min-height: 58vh;
  align-content: center;
}

.kicker, .label, dt, .eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76em;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 20px;
  color: var(--ink-strong);
  font-size: clamp(2.4rem, 8vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  font-weight: 700;
}

h2 {
  margin: 0 0 18px;
  color: var(--ink-strong);
  font-size: clamp(1.25rem, 2.5vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h3 {
  margin: 0 0 12px;
  color: var(--ink-strong);
  font-size: 1rem;
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.8vw, 1.35rem);
}

.ascii-rule {
  overflow: hidden;
  color: #535353;
  white-space: pre;
  font-size: clamp(0.35rem, 0.72vw, 0.7rem);
  line-height: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
}

.card.large { grid-column: span 7; }
.card.side { grid-column: span 5; }
.card.full { grid-column: 1 / -1; }
.card.third { grid-column: span 4; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-strong);
}

.status::before {
  width: 0.72em;
  height: 0.72em;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.7);
  content: "";
}

.record-id {
  color: var(--ink-strong);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  line-height: 1;
}

dl {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
}

dt, dd { margin: 0; }
dd { color: var(--ink-strong); overflow-wrap: anywhere; }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: #050505;
  color: var(--ink-strong);
  text-decoration: none;
  font-weight: 700;
}

.button:hover { border-color: #666; color: #fff; }
.button.disabled { color: #777; pointer-events: none; }

section { margin-top: 42px; }

.timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.code-box {
  overflow-x: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: #050505;
  color: var(--ink-strong);
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  display: grid;
  gap: 6px;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #050505;
  color: var(--ink-strong);
  padding: 10px;
  font: inherit;
}

.footer {
  margin-top: 54px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; margin-bottom: 36px; }
  .card.large, .card.side, .card.third { grid-column: 1 / -1; }
  dl { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; }
}