:root {
  --bg: #050506;
  --bg2: #0a0a0d;
  --panel: rgba(12, 11, 14, 0.88);
  --text: #d5d0c6;
  --muted: #91897b;
  --dim: #6d675c;
  --line: rgba(175, 158, 126, 0.16);
  --accent: #b7a27a;
  --glow: rgba(183, 162, 122, 0.08);
  --red: rgba(123, 31, 31, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(123,31,31,0.10), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  overflow-x: hidden;
  animation: pageFlicker 9s infinite linear;
}

.noise,
.veil,
.sigil-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  opacity: 0.045;
  background-image: radial-gradient(#fff 0.7px, transparent 0.7px);
  background-size: 8px 8px;
}

.veil {
  background: radial-gradient(circle at center, transparent 20%, rgba(0,0,0,0.5) 100%);
}

.sigil-bg {
  display: grid;
  place-items: center;
  opacity: 0.12;
}

.ring,
.mark {
  position: absolute;
  border: 1px solid var(--line);
}

.ring {
  border-radius: 50%;
}

.ring-1 { width: 70vmin; height: 70vmin; }
.ring-2 { width: 46vmin; height: 46vmin; }
.ring-3 { width: 22vmin; height: 22vmin; }
.mark-a,
.mark-b,
.mark-c {
  width: 2px;
  height: 60vmin;
  background: linear-gradient(180deg, transparent, rgba(183,162,122,0.3), transparent);
  border: 0;
}
.mark-b { transform: rotate(60deg); }
.mark-c { transform: rotate(-60deg); }

.topbar,
.panel {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: inset 0 0 30px var(--glow), 0 0 20px rgba(0,0,0,0.25);
}

.topbar {
  width: min(1120px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.76rem;
  text-transform: lowercase;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 18px auto 60px;
}

.panel { padding: 24px; }
.hero { min-height: 56vh; display: flex; flex-direction: column; justify-content: center; }
.warning-panel {
  border-color: rgba(123, 31, 31, 0.38);
  box-shadow: inset 0 0 40px rgba(123,31,31,0.12), 0 0 24px rgba(0,0,0,0.35);
}
.grid { display: grid; gap: 18px; margin-top: 18px; }
.two-up { grid-template-columns: 1fr 1fr; }
.three-up { grid-template-columns: repeat(3, 1fr); }

.tiny {
  margin: 0 0 12px;
  color: var(--dim);
  font-size: 0.72rem;
  letter-spacing: 0.20em;
  text-transform: uppercase;
}

.alert {
  color: #b56c6c;
}

.warning-text {
  color: #c79b9b;
  max-width: 760px;
}

.hook {
  max-width: 820px;
  margin: 0 0 14px;
  color: #e4d8c2;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.3;
}

h1,
h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  margin: 0 0 14px;
  line-height: 0.94;
}

h1 { font-size: clamp(3.8rem, 9vw, 7rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.lede,
p,
li,
pre,
a,
em {
  color: var(--muted);
  line-height: 1.85;
  font-size: 0.98rem;
}

.link-row,
.directory-grid {
  display: flex;
  gap: 14px 22px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.link-row a,
.directory-grid a,
.locked {
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}

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

.longform {
  margin-top: 18px;
}

.card p:last-child { margin-bottom: 0; }

.artwork {
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.altar {
  position: relative;
  width: 280px;
  height: 280px;
  filter: drop-shadow(0 0 20px rgba(123,31,31,0.16));
}

.halo,
.eye,
.spoke {
  position: absolute;
  inset: 0;
  margin: auto;
}

.halo {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: 0 0 40px rgba(183,162,122,0.08);
}

.halo::before,
.halo::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px dashed rgba(183,162,122,0.18);
  transform: rotate(45deg);
}

.halo::after {
  inset: 30%;
  transform: rotate(12deg);
}

.eye {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid rgba(183,162,122,0.35);
  box-shadow: inset 0 0 20px rgba(123,31,31,0.18);
}

.eye::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(183,162,122,0.75);
  inset: 0;
  margin: auto;
  box-shadow: 0 0 18px rgba(183,162,122,0.28);
}

.spoke {
  width: 2px;
  height: 280px;
  background: linear-gradient(180deg, transparent, rgba(183,162,122,0.26), transparent);
}

.s2 { transform: rotate(60deg); }
.s3 { transform: rotate(-60deg); }

.redacted-panel {
  margin-top: 18px;
}

.sealed-panel {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dossier {
  background: rgba(10, 10, 12, 0.7);
}

.redacted-doc {
  border: 1px solid rgba(183,162,122,0.14);
  background: rgba(8, 8, 10, 0.55);
  padding: 22px;
  line-height: 2;
}

.redact {
  display: inline-block;
  vertical-align: middle;
  width: 11em;
  height: 0.9em;
  background: linear-gradient(90deg, rgba(123,31,31,0.65), rgba(32,32,36,0.95));
  border-radius: 2px;
}

.redact.short {
  width: 6em;
}

.intrigue-panel {
  margin-top: 18px;
}

.trail-list {
  margin: 0;
  padding-left: 1.4rem;
}

.trail-list li {
  margin: 0 0 10px;
}

.trail-list a {
  color: var(--text);
}

.directory { margin-top: 18px; }
.station-panel { margin-top: 18px; }
.station-box {
  border: 1px solid var(--line);
  padding: 18px;
  background: rgba(6, 6, 8, 0.55);
}
.station-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.station-code {
  margin: 18px 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.22em;
  color: #d6cab4;
  line-height: 1.5;
  word-break: break-word;
}
.terminal { margin-top: 18px; }
.footer-panels { margin-top: 18px; }
.metric-panel { min-height: 220px; display: flex; flex-direction: column; justify-content: center; }
.counter,
.countdown {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--text);
  letter-spacing: 0.08em;
  margin: 8px 0 12px;
}
.counter {
  color: #d3b7b7;
}
.countdown {
  line-height: 1.25;
}
pre { margin: 0; white-space: pre-wrap; color: #b7b09d; }

.narrow {
  max-width: 720px;
}

.login-panel {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.login-form input,
.login-form button {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(6, 6, 8, 0.95);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.login-form button {
  cursor: pointer;
  text-transform: lowercase;
}

.stack > * + * {
  margin-top: 14px;
}

.case-list {
  margin-top: 20px;
}

.case-file {
  border: 1px solid rgba(183,162,122,0.12);
  background: rgba(8, 8, 10, 0.45);
  padding: 18px;
}

.transmission-file {
  box-shadow: inset 0 0 24px rgba(123,31,31,0.08);
}

.subpanel {
  margin-top: 18px;
}

.fragment-list p {
  border-left: 1px solid rgba(183,162,122,0.18);
  padding-left: 14px;
}

.mono-list {
  letter-spacing: 0.08em;
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.table-list {
  display: grid;
  gap: 10px;
}

.table-row {
  border-bottom: 1px solid rgba(183,162,122,0.12);
  padding-bottom: 10px;
}

@keyframes pageFlicker {
  0%, 97%, 100% { opacity: 1; }
  98% { opacity: 0.985; }
  99% { opacity: 0.995; }
}

@media (max-width: 900px) {
  .topbar,
  .station-head { flex-direction: column; }
  .two-up,
  .three-up,
  .dashboard-grid { grid-template-columns: 1fr; }
}
