:root {
  --bg: #050505; --bg-raised: #0c0c0c; --ink: #fafafa; --ink-dim: #a6a6a6;
  --ink-faint: #4a4a4a; --rule: #1f1f1f; --red: #fb2c36; --red-deep: #8f1820;
  --sans: 'Inter', system-ui, sans-serif; --mono: 'JetBrains Mono', monospace;
  --serif: 'Fraunces', serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); min-height: 100vh; -webkit-font-smoothing: antialiased; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 50% -5%, rgba(251,44,54,0.06), transparent 60%);
}
nav {
  padding: 20px 32px; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-dim);
  letter-spacing: 0.08em; text-transform: uppercase;
}
nav .brand { color: var(--ink); font-weight: 500; }
nav .brand em { color: var(--red); font-style: normal; font-weight: 500; }
nav .breadcrumb { color: var(--ink-faint); }
nav .breadcrumb span { margin: 0 8px; }
nav a { color: var(--ink-dim); text-decoration: none; }
nav a:hover { color: var(--red); }

.opening { max-width: 720px; margin: 40px auto; padding: 0 32px; position: relative; z-index: 2; }
.chapter {
  font-family: var(--mono); font-size: 11px; color: var(--red);
  letter-spacing: 0.25em; text-transform: uppercase; margin-bottom: 20px;
}
h1 {
  font-weight: 300; font-size: clamp(40px, 6vw, 64px);
  line-height: 0.98; letter-spacing: -0.03em; margin-bottom: 24px;
}
h1 em { font-family: var(--serif); font-style: italic; color: var(--red); font-weight: 300; }
.opening p { font-size: 16px; color: var(--ink-dim); line-height: 1.7; margin-bottom: 14px; }
.opening code { font-family: var(--mono); font-size: 14px; color: var(--ink); background: #141414; padding: 1px 6px; border-radius: 3px; }
.opening em { font-style: italic; color: var(--ink); }

.dossier { max-width: 720px; margin: 0 auto 48px; padding: 0 32px; position: relative; z-index: 2; }
.dossier-head, .dossier-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint);
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 12px 16px; background: var(--bg-raised); border: 1px solid var(--rule);
}
.dossier-head { border-radius: 8px 8px 0 0; border-bottom: none; }
.dossier-foot { border-radius: 0 0 8px 8px; border-top: none; }
.dossier-head .label, .dossier-foot .label { color: var(--red); }
.dossier-head .status { color: var(--ink-dim); }
.readout {
  background: #08080a; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule);
  font-family: var(--mono); font-size: 13px;
}
.row {
  display: grid; grid-template-columns: 170px 1fr; gap: 24px;
  padding: 10px 16px; border-bottom: 1px solid var(--rule);
}
.row:last-child { border-bottom: none; }
.row .k { color: var(--ink-faint); letter-spacing: 0.08em; text-transform: uppercase; }
.row .v { color: var(--ink); word-break: break-all; }
.err { padding: 14px 16px; color: var(--red); font-family: var(--mono); font-size: 13px; }
.refresh {
  background: transparent; border: 1px solid var(--rule); color: var(--ink-dim);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  padding: 6px 12px; border-radius: 4px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.refresh:hover { color: var(--red); border-color: var(--red-deep); }

.notes { max-width: 720px; margin: 0 auto 48px; padding: 0 32px; position: relative; z-index: 2; }
.notes ul { list-style: none; margin-top: 16px; }
.notes li {
  font-size: 14px; color: var(--ink-dim); line-height: 1.6;
  padding-left: 18px; position: relative; margin-bottom: 8px;
}
.notes li::before { content: '—'; position: absolute; left: 0; color: var(--red); }
.notes code { font-family: var(--mono); font-size: 12px; color: var(--ink); background: #141414; padding: 1px 5px; border-radius: 3px; }

footer {
  max-width: 720px; margin: 32px auto 0; padding: 24px 32px 40px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; color: var(--ink-faint);
  letter-spacing: 0.08em; text-transform: uppercase;
  position: relative; z-index: 2;
}
footer a { color: var(--ink-faint); text-decoration: none; }
footer a:hover { color: var(--red); }

@media (max-width: 600px) {
  .row { grid-template-columns: 1fr; gap: 4px; }
  .row .v { font-size: 13px; }
}