:root {
  --bg: #0f1115;
  --panel: #141820;
  --panel-2: #0b0d11;
  --line: rgba(255, 255, 255, 0.12);
  --soft-line: rgba(255, 255, 255, 0.07);
  --text: #f4f6f8;
  --muted: #a6adb8;
  --faint: #68717f;
  --accent: #ffffff;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 380px),
    radial-gradient(circle at 75% 0%, rgba(255, 255, 255, 0.09), transparent 320px),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--soft-line);
  background: rgba(15, 17, 21, 0.82);
  backdrop-filter: blur(18px);
}

.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  min-width: 34px;
  min-height: 34px;
}

.brand-logo img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand span {
  color: var(--faint);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
}

.hero {
  padding: 118px 0 80px;
  border-bottom: 1px solid var(--soft-line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 70px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 24px;
  font-family: var(--mono);
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
}

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

h1 {
  max-width: 860px;
  margin-bottom: 30px;
  font-size: clamp(54px, 8.8vw, 108px);
  line-height: 0.92;
  letter-spacing: -0.065em;
  font-weight: 720;
}

.lead {
  max-width: 760px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.62;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.button.primary {
  background: var(--accent);
  color: #080a0f;
  border-color: var(--accent);
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.button:hover {
  transform: translateY(-1px);
}

.signal {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  padding: 22px;
}

.signal-title {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.cell-diagram {
  border: 1px solid var(--soft-line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    var(--panel-2);
  background-size: 34px 34px;
  padding: 18px;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.diagram-box {
  border: 1px solid var(--line);
  padding: 12px;
  color: var(--text);
  margin-bottom: 12px;
}

.diagram-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--soft-line);
  padding-top: 10px;
  margin-top: 10px;
}

.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--soft-line);
}

.section-head {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 44px;
  margin-bottom: 46px;
}

.index {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h2 {
  max-width: 840px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 680;
}

.intro {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.feature {
  min-height: 330px;
  padding: 30px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.feature:last-child {
  border-right: 0;
}

.roman {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 12px;
  margin-bottom: 54px;
}

h3 {
  margin-bottom: 18px;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.feature p,
.callout p,
.paper p {
  color: var(--muted);
  line-height: 1.72;
}

.blueprint {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 54px;
  align-items: start;
}

.state-object {
  position: sticky;
  top: 104px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.state-object div {
  padding: 12px 0;
  border-bottom: 1px solid var(--soft-line);
}

.state-object div:last-child {
  border-bottom: 0;
}

.state-object strong {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 5px;
}

.callouts {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.callout {
  background: var(--bg);
  padding: 28px;
}

.paper {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 44px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
  margin-top: 44px;
}

.paper h3 {
  font-size: 32px;
}

.cta {
  padding: 100px 0;
}

.cta-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  padding: clamp(30px, 6vw, 64px);
}

.cta h2 {
  max-width: 980px;
}

.footer {
  border-top: 1px solid var(--soft-line);
  padding: 28px 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.footer .shell {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.paper-body {
  --paper-bg: #f4f1ea;
  --paper-sheet: #fffdf8;
  --paper-ink: #191919;
  --paper-muted: #5d5a53;
  --paper-faint: #8b867b;
  --paper-line: #d8d0c2;
  --paper-rule: #bdb4a6;
  background: var(--paper-bg);
  color: var(--paper-ink);
  font-family: Georgia, "Times New Roman", serif;
}

.paper-body .paper-nav {
  position: sticky;
  background: rgba(244, 241, 234, 0.92);
  border-bottom: 1px solid var(--paper-line);
  backdrop-filter: blur(10px);
}

.paper-body .brand,
.paper-body .nav-links {
  color: var(--paper-ink);
}

.paper-body .brand span,
.paper-body .nav-links a {
  color: var(--paper-muted);
}

.paper-body .nav-links a:hover {
  color: var(--paper-ink);
}

.paper-layout {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  display: block;
}

.whitepaper-doc {
  max-width: 900px;
  margin: 48px auto 110px;
  padding: clamp(32px, 6vw, 76px);
  background: var(--paper-sheet);
  border: 1px solid var(--paper-line);
  box-shadow: 0 24px 80px rgba(48, 38, 24, 0.13);
}

.paper-cover {
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 42px;
}

.paper-label {
  margin: 0 0 44px;
  color: var(--paper-muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.whitepaper-doc h1 {
  max-width: 780px;
  margin: 0 0 26px;
  color: var(--paper-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.paper-subtitle {
  max-width: 680px;
  color: var(--paper-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.45;
}

.paper-meta {
  display: grid;
  gap: 9px;
  margin: 52px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--paper-rule);
  color: var(--paper-muted);
  font-family: var(--mono);
  font-size: 12px;
}

.paper-meta strong {
  color: var(--paper-ink);
  font-weight: 600;
}

.paper-rule {
  height: 1px;
  margin: 0 0 12px;
  background: var(--paper-rule);
}

.wp-section {
  padding: 48px 0;
  border-top: 1px solid var(--paper-line);
}

.wp-section:first-of-type {
  border-top: 0;
}

.wp-section h2 {
  max-width: 760px;
  margin: 0 0 26px;
  color: var(--paper-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.7vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.wp-section h3 {
  margin: 34px 0 12px;
  color: var(--paper-ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wp-section p,
.wp-section li {
  color: var(--paper-muted);
  font-size: 18px;
  line-height: 1.76;
}

.wp-section p {
  margin-bottom: 18px;
}

.wp-section li {
  margin: 10px 0;
  padding-left: 4px;
}

.wp-section strong {
  color: var(--paper-ink);
  font-weight: 600;
}

.wp-section code {
  color: var(--paper-ink);
  font-family: var(--mono);
  font-size: 0.88em;
}

.ascii {
  overflow-x: auto;
  margin: 30px 0;
  padding: 22px;
  border: 1px solid var(--paper-line);
  background: #f0eadf;
  color: #2c2a27;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.36;
}

.wp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  color: var(--paper-muted);
  font-family: var(--sans);
  font-size: 14px;
}

.wp-table th,
.wp-table td {
  border: 1px solid var(--paper-line);
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

.wp-table th {
  color: var(--paper-ink);
  background: #f0eadf;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.references {
  counter-reset: ref;
  padding-left: 0;
  list-style: none;
}

.references li {
  counter-increment: ref;
  position: relative;
  padding-left: 38px;
}

.references li::before {
  content: counter(ref) ".";
  position: absolute;
  left: 0;
  color: var(--paper-faint);
  font-family: var(--mono);
}

.paper-footer {
  color: var(--paper-muted);
  border-top: 1px solid var(--paper-line);
  background: var(--paper-bg);
}

.paper-footer .shell {
  color: var(--paper-muted);
}

@media print {
  .paper-nav,
  .paper-footer {
    display: none;
  }

  .paper-body {
    background: #fff;
  }

  .paper-layout {
    display: block;
    width: 100%;
  }

  .whitepaper-doc {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .wp-section {
    break-inside: avoid;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .section-head,
  .blueprint,
  .paper {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 0;
  }

  .feature:last-child {
    border-bottom: 0;
  }

  .state-object {
    position: static;
  }

  .nav-links {
    display: none;
  }

  .paper-layout {
    display: block;
    width: min(100% - 20px, 900px);
  }

  .whitepaper-doc {
    margin-top: 24px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, 1160px);
  }

  .hero {
    padding-top: 78px;
  }

  h1 {
    font-size: 48px;
  }

  .whitepaper-doc {
    padding: 24px 18px;
  }

  .paper-cover {
    min-height: 440px;
  }

  .wp-section p,
  .wp-section li {
    font-size: 16px;
  }
}
