:root {
  --bg: #050505;
  --bone: #e8e4d9;
  --mute: #8a8f96;
  --line: #1c1c1c;
  --red: #ff2a1a;
  --cyan: #7be7ff;
  --max: 1120px;
  --sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

body { min-height: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--bone); }

:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 3px;
}

.scan {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(255, 255, 255, 0.025) 3px
  );
  opacity: 0.9;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000;
  display: grid;
  place-items: center;
  transition: opacity 0.35s ease;
}
.boot.done { opacity: 0; pointer-events: none; }
.boot-mark {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.42em;
  font-size: 18px;
}
.boot-sweep {
  position: absolute;
  left: 0;
  right: 0;
  top: 52%;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  animation: sweep 0.55s ease-out forwards;
}
@keyframes sweep { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .boot { display: none; }
  .boot-sweep { animation: none; }
  .scan { display: none; }
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  background: var(--red);
  vertical-align: 2px;
}

.cmd {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.94);
}
.wordmark {
  font-weight: 600;
  letter-spacing: 0.38em;
  font-size: 13px;
}
.cmd-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.18em;
}
.cmd-meta .live { color: var(--cyan); }
.sep { color: var(--line); padding: 0 4px; }
.cmd-nav { margin-left: auto; display: flex; gap: 8px; }
.menu {
  display: none;
  margin-left: auto;
  background: transparent;
  color: var(--bone);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  padding: 8px 10px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  background: transparent;
  color: var(--bone);
  cursor: pointer;
}
.btn-red { border-color: var(--red); color: var(--red); }
.btn-red:hover { background: var(--red); color: #050505; }
.btn-ghost:hover { border-color: var(--bone); }

.shell {
  display: grid;
  grid-template-columns: 180px minmax(0, var(--max));
  gap: 0;
  max-width: calc(var(--max) + 180px);
  margin: 0 auto;
}
.rail {
  position: sticky;
  top: 53px;
  align-self: start;
  padding: 28px 16px 48px 20px;
  border-right: 1px solid var(--line);
  min-height: calc(100vh - 53px);
}
.rail-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--mute);
  margin: 0 0 14px;
}
.rail a {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mute);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.rail a:hover, .rail a.is-on { color: var(--bone); }

main { padding: 28px 24px 80px; }
section { padding: 48px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }

.hero { padding-top: 36px; }
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--mute);
  margin: 0 0 18px;
}
h1 {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
}
.lede {
  max-width: 42rem;
  color: var(--mute);
  font-size: 17px;
  margin: 22px 0 28px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 32px 0 0;
}
.chips li {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  border: 1px solid var(--line);
  padding: 7px 10px;
  color: var(--mute);
}
.chip-live { color: var(--cyan) !important; border-color: #1a3a40 !important; }

.sec-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.sec-h .num { font-family: var(--mono); color: var(--red); font-size: 12px; letter-spacing: 0.2em; }
h2 { margin: 0; font-size: 22px; letter-spacing: 0.08em; font-weight: 600; }
h3 {
  font-size: 13px;
  letter-spacing: 0.14em;
  font-weight: 600;
  margin: 0 0 10px;
}
h3 span { color: var(--red); margin-right: 10px; font-family: var(--mono); font-size: 11px; }

.prose { color: var(--mute); max-width: 46rem; }
.pillar { margin: 28px 0; padding-top: 20px; border-top: 1px solid var(--line); }
.branches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 8px;
}
.branch {
  border: 1px solid var(--line);
  padding: 16px 16px 12px;
}
.branch h4 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: var(--cyan);
}
.branch p { margin: 0 0 10px; color: var(--mute); font-size: 14px; }
.branch p:last-child { margin-bottom: 0; }
.scope-line {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
@media (max-width: 860px) {
  .branches { grid-template-columns: 1fr; }
}
.ticks { margin: 12px 0; padding: 0; list-style: none; }
.ticks li {
  position: relative;
  padding: 6px 0 6px 16px;
  color: var(--bone);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 1px;
  background: var(--red);
}
.note { color: var(--mute); font-family: var(--mono); font-size: 12px; }

.steps { list-style: none; padding: 0; margin: 0 0 24px; }
.steps li {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
}
.steps strong { color: var(--bone); font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; font-weight: 500; }

.portal-gate, .portal {
  border: 1px solid var(--line);
  padding: 20px;
  margin-top: 16px;
}
.gate-form, .access {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  max-width: 640px;
}
.gate-form { grid-template-columns: 1fr 1fr auto; align-items: end; }
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--mute);
}
input, select, textarea {
  background: #0a0a0a;
  border: 1px solid var(--line);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 13px;
  padding: 9px 10px;
  border-radius: 2px;
}
.full { grid-column: 1 / -1; }
.stamp {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--red);
  margin: 0 0 16px;
}
.portal-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; }
.row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  text-align: left;
  background: transparent;
  color: var(--mute);
  border: 1px solid var(--line);
  border-bottom: 0;
  padding: 10px;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}
.row:last-of-type { border-bottom: 1px solid var(--line); }
.row.active, .row:hover { color: var(--bone); background: #0c0c0c; }
.amber { color: #c9a227; }
.portal-detail dl { margin: 0; }
.portal-detail dl > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--mute); }
.mono { font-family: var(--mono); }

.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 500; letter-spacing: 0.02em; }
.faq p { color: var(--mute); margin: 10px 0 4px; max-width: 46rem; }

.success {
  font-family: var(--mono);
  letter-spacing: 0.16em;
  color: var(--cyan);
  margin-top: 16px;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 24px 20px 40px;
  font-size: 12px;
  color: var(--mute);
}
.foot a { border-bottom: 1px solid var(--line); }
.fine { max-width: 52rem; line-height: 1.6; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    display: none;
    position: fixed;
    inset: 53px 0 auto 0;
    background: #050505;
    z-index: 25;
    min-height: 0;
    border-bottom: 1px solid var(--line);
  }
  .rail.open { display: block; }
  .menu { display: block; }
  .cmd-meta { display: none; }
  .steps li { grid-template-columns: 1fr; gap: 4px; }
  .portal-grid, .gate-form, .access { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .cmd { padding: 10px 12px; gap: 10px; }
  .cmd-nav .btn { padding: 8px 8px; letter-spacing: 0.08em; }
  main { padding: 16px 14px 64px; }
  h1 { font-size: 30px; }
}
