:root {
  --void: #050607;
  --graphite: #111315;
  --carbon: #17191c;
  --ivory: #f2efe7;
  --paper: #d8d2c4;
  --silver: #c8c3b8;
  --steel: #71777d;
  --slate: #3a4148;
  --oxblood: #641e24;
  --risk: #ff4d4f;
  --max: 1440px;
  --font-hard: "Avenir Next Condensed", "DIN Alternate", "SF Pro Display", sans-serif;
  --font-body: "Avenir Next", "SF Pro Text", system-ui, sans-serif;
  --font-mono: Menlo, Monaco, "Courier New", monospace;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--void);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ivory);
  background:
    linear-gradient(180deg, #050607 0%, #0a0b0c 54%, #050607 100%);
  font-family: var(--font-body);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(200, 195, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 195, 184, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.92), transparent 92%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(transparent 0 50%, rgba(242, 239, 231, 0.025) 50% 52%, transparent 52%),
    radial-gradient(circle at center, transparent, rgba(5, 6, 7, 0.72));
  background-size: 100% 4px, 100% 100%;
  mix-blend-mode: screen;
  opacity: 0.34;
}

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

button {
  font: inherit;
}

#signal-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.scanline {
  position: fixed;
  inset: -30% 0 auto;
  z-index: 2;
  height: 32%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(200, 195, 184, 0.07), transparent);
  transform: translate3d(0, -80%, 0);
  animation: sweep 9s var(--ease) infinite;
}

.page-shell {
  position: relative;
  z-index: 3;
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 22px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1180px);
  min-height: 64px;
  margin: 22px auto 0;
  padding: 8px 10px 8px 12px;
  border: 1px solid rgba(200, 195, 184, 0.16);
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.62);
  box-shadow: inset 0 1px rgba(242, 239, 231, 0.08);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  color: var(--ivory);
  font-size: 13px;
  font-weight: 680;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.ff-mark {
  width: 38px;
  height: 30px;
  fill: currentColor;
  filter: drop-shadow(9px 7px 0 rgba(200, 195, 184, 0.07));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(113, 119, 125, 0.25);
  border-radius: 999px;
  background: rgba(17, 19, 21, 0.78);
}

.nav-links a {
  padding: 11px 18px;
  border-radius: 999px;
  color: rgba(242, 239, 231, 0.68);
  font-size: 12px;
  font-weight: 650;
  transition: color 600ms var(--ease), background 600ms var(--ease), transform 600ms var(--ease);
}

.nav-links a:hover {
  color: var(--ivory);
  background: rgba(242, 239, 231, 0.07);
  transform: translate3d(0, -1px, 0);
}

.nav-links a.is-active {
  color: var(--ivory);
  background: rgba(242, 239, 231, 0.08);
}

.nav-action,
.ghost-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(200, 195, 184, 0.18);
  border-radius: 999px;
  color: rgba(242, 239, 231, 0.72);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: border-color 700ms var(--ease), color 700ms var(--ease), transform 700ms var(--ease);
}

.nav-action:hover,
.ghost-cta:hover {
  color: var(--ivory);
  border-color: rgba(200, 195, 184, 0.48);
  transform: translate3d(0, -1px, 0);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(420px, 1.06fr);
  align-items: center;
  min-height: calc(100svh - 86px);
  gap: clamp(28px, 5vw, 82px);
  padding: clamp(52px, 9svh, 108px) 0 clamp(32px, 8svh, 80px);
}

.microline {
  margin: 0 0 26px;
  color: rgba(200, 195, 184, 0.62);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--font-hard);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

h1 {
  max-width: 760px;
  font-size: 8rem;
  line-height: 0.78;
  letter-spacing: -0.02em;
}

h1 span {
  display: block;
  color: var(--paper);
}

.hero-text {
  max-width: 670px;
  margin: 34px 0 0;
  color: rgba(242, 239, 231, 0.67);
  font-size: 1.2rem;
  font-weight: 430;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 7px 7px 7px 22px;
  border: 1px solid rgba(100, 30, 36, 0.8);
  border-radius: 999px;
  background: linear-gradient(135deg, #7e252d, #4a1519);
  color: var(--ivory);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: 0 16px 50px rgba(100, 30, 36, 0.38), inset 0 1px rgba(242, 239, 231, 0.2);
  transition: transform 700ms var(--ease), box-shadow 700ms var(--ease);
}

.primary-cta i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(242, 239, 231, 0.12);
  transition: transform 700ms var(--ease), background 700ms var(--ease);
}

.primary-cta svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.8;
}

.primary-cta:hover {
  transform: translate3d(0, -2px, 0) scale(1.012);
  box-shadow: 0 20px 70px rgba(100, 30, 36, 0.48), inset 0 1px rgba(242, 239, 231, 0.24);
}

.primary-cta:hover i {
  background: rgba(242, 239, 231, 0.18);
  transform: translate3d(2px, -1px, 0) scale(1.04);
}

.primary-cta.compact {
  min-height: 52px;
  margin-top: 28px;
}

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(68svh, 720px);
  perspective: 1200px;
}

.orbital-rings {
  position: absolute;
  inset: 2% 2% 0;
  border: 1px solid rgba(200, 195, 184, 0.12);
  transform: skewX(-10deg);
}

.orbital-rings::before,
.orbital-rings::after {
  position: absolute;
  inset: 12% 9%;
  content: "";
  border: 1px solid rgba(100, 30, 36, 0.42);
}

.orbital-rings::after {
  inset: 25% 0 18% 18%;
  border-color: rgba(200, 195, 184, 0.16);
  transform: translate3d(22px, 18px, 0);
}

.monogram-machine {
  position: relative;
  width: min(100%, 620px);
  aspect-ratio: 1.08;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(200, 195, 184, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(242, 239, 231, 0.06), transparent 42%),
    rgba(17, 19, 21, 0.82);
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.42),
    inset 0 1px rgba(242, 239, 231, 0.1);
  transform-style: preserve-3d;
  transition: transform 850ms var(--ease);
  overflow: hidden;
}

.monogram-machine::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 48px, rgba(200, 195, 184, 0.07) 49px 50px, transparent 51px 96px),
    linear-gradient(0deg, transparent 0 48px, rgba(200, 195, 184, 0.05) 49px 50px, transparent 51px 96px);
  mask-image: radial-gradient(circle at center, #000, transparent 78%);
}

.monogram-machine::after {
  position: absolute;
  inset: -40% 40% -40% auto;
  width: 28%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(242, 239, 231, 0.14), transparent);
  transform: rotate(12deg);
  animation: machineSweep 6.6s var(--ease) infinite;
}

.machine-label {
  position: relative;
  z-index: 1;
  color: rgba(200, 195, 184, 0.62);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.hero-ff {
  position: relative;
  z-index: 1;
  display: block;
  width: 86%;
  margin: 42px auto 0;
  overflow: visible;
}

.ff-geometry {
  fill: var(--ivory);
  filter: drop-shadow(18px 16px 0 rgba(242, 239, 231, 0.05));
}

.decision-path {
  fill: none;
  stroke: var(--silver);
  stroke-width: 4;
  stroke-linecap: square;
  stroke-dasharray: 470;
  stroke-dashoffset: 470;
  animation: drawPath 4.8s var(--ease) 700ms infinite;
}

.risk-floor {
  fill: none;
  stroke: var(--oxblood);
  stroke-width: 2;
  opacity: 0.7;
  stroke-dasharray: 12 12;
  animation: riskPulse 2.8s var(--ease) infinite;
}

.state-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}

.state-row span {
  min-width: 102px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(113, 119, 125, 0.16);
  color: rgba(242, 239, 231, 0.68);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.state-row .active {
  background: rgba(100, 30, 36, 0.9);
  color: var(--ivory);
}

.engine-page {
  min-height: calc(100svh - 86px);
  padding: 6.5rem 0 7rem;
}

.thesis-page {
  min-height: calc(100svh - 86px);
  padding: 3.2rem 0 4rem;
}

.thesis-paper {
  position: relative;
  min-height: calc(100svh - 178px);
  padding: 3rem;
  border: 1px solid rgba(5, 6, 7, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), transparent 35%),
    var(--ivory);
  color: var(--void);
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.45),
    inset 0 1px rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.thesis-paper::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(5, 6, 7, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 6, 7, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}

.paper-topline,
.thesis-grid,
.doctrine-matrix,
.covenant-strip {
  position: relative;
  z-index: 1;
}

.paper-topline {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(5, 6, 7, 0.2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(5, 6, 7, 0.58);
}

.thesis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 4rem;
  align-items: start;
  margin-top: 2.2rem;
}

.thesis-main .microline {
  color: rgba(5, 6, 7, 0.52);
}

.thesis-main h1 {
  max-width: 880px;
  color: var(--void);
  font-size: 6.9rem;
  line-height: 0.79;
}

.thesis-lede {
  max-width: 820px;
  margin: 1.45rem 0 0;
  color: rgba(5, 6, 7, 0.82);
  font-family: var(--font-hard);
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1.02;
  text-transform: uppercase;
}

.thesis-body {
  max-width: 820px;
  margin: 1rem 0 0;
  color: rgba(5, 6, 7, 0.7);
  font-size: 1.02rem;
  font-weight: 520;
  line-height: 1.65;
}

.thesis-aside {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(5, 6, 7, 0.18);
  border-radius: 8px;
  background: rgba(5, 6, 7, 0.045);
}

.paper-mark {
  width: 94px;
  fill: var(--void);
  filter: drop-shadow(10px 8px 0 rgba(5, 6, 7, 0.08));
}

.thesis-aside div {
  display: grid;
  gap: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(5, 6, 7, 0.16);
}

.thesis-aside span,
.doctrine-matrix span {
  color: rgba(5, 6, 7, 0.52);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.thesis-aside strong {
  color: var(--void);
  font-family: var(--font-hard);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 0.96;
  text-transform: uppercase;
}

.doctrine-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.2rem;
  border: 1px solid rgba(5, 6, 7, 0.22);
  background: rgba(5, 6, 7, 0.22);
}

.doctrine-matrix div {
  min-height: 142px;
  padding: 1rem;
  background: rgba(242, 239, 231, 0.92);
}

.doctrine-matrix strong {
  display: block;
  margin-top: 1rem;
  color: var(--void);
  font-family: var(--font-hard);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 0.96;
  text-transform: uppercase;
}

.doctrine-matrix p {
  margin: 0.7rem 0 0;
  color: rgba(5, 6, 7, 0.62);
  font-size: 0.96rem;
  line-height: 1.45;
}

.covenant-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.covenant-strip span {
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(100, 30, 36, 0.25);
  border-radius: 999px;
  background: rgba(100, 30, 36, 0.08);
  color: var(--oxblood);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.section-copy {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.section-copy h2,
.access-card h2 {
  max-width: 780px;
  font-size: 5.25rem;
  line-height: 0.95;
}

.engine-title {
  display: block;
  margin-bottom: 3rem;
}

.engine-title h1 {
  max-width: 980px;
  font-size: 6.6rem;
}

.engine-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 20px;
}

.engine-panel,
.access-card,
.memo-card {
  border: 1px solid rgba(200, 195, 184, 0.16);
  border-radius: 8px;
  background: rgba(17, 19, 21, 0.76);
  box-shadow: inset 0 1px rgba(242, 239, 231, 0.08);
}

.engine-panel {
  min-height: 360px;
  padding: 28px;
  overflow: hidden;
}

.panel-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
  color: rgba(200, 195, 184, 0.6);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.panel-top strong {
  color: var(--silver);
  font-weight: 700;
}

.state-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.state-chip {
  min-width: 110px;
  padding: 13px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(113, 119, 125, 0.18);
  color: rgba(242, 239, 231, 0.72);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.state-chip.is-active {
  background: var(--oxblood);
  color: var(--ivory);
  box-shadow: 0 14px 34px rgba(100, 30, 36, 0.38);
}

.filter-stack {
  display: grid;
  gap: 22px;
}

.filter-row {
  display: grid;
  grid-template-columns: 92px minmax(120px, 1fr) 96px;
  align-items: center;
  gap: 16px;
  color: rgba(242, 239, 231, 0.55);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.filter-row i {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(113, 119, 125, 0.22);
  overflow: hidden;
}

.filter-row i::before {
  position: absolute;
  inset: 0;
  width: var(--level);
  content: "";
  border-radius: inherit;
  background: linear-gradient(90deg, var(--silver), var(--paper));
  transform-origin: left;
  animation: meterFlow 3.8s var(--ease) infinite;
}

.filter-row strong {
  color: var(--silver);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.risk-row i::before {
  background: linear-gradient(90deg, #7e252d, var(--oxblood));
}

.chart-panel {
  position: relative;
}

.signal-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.noise-line {
  fill: none;
  stroke: var(--silver);
  stroke-width: 4;
  stroke-linecap: square;
  stroke-dasharray: 860;
  animation: chartDraw 5s var(--ease) infinite;
}

.target-line,
.entry-line,
.stop-line {
  stroke-width: 1.5;
  stroke-dasharray: 8 12;
  opacity: 0.54;
}

.target-line {
  stroke: var(--silver);
}

.entry-line {
  stroke: var(--steel);
}

.stop-line {
  stroke: var(--oxblood);
}

.chart-dots circle {
  fill: var(--steel);
  animation: dotPulse 2.8s var(--ease) infinite;
}

.doctrine {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1.08fr);
  gap: 48px;
  align-items: center;
  padding: 7rem 0;
  border-top: 1px solid rgba(200, 195, 184, 0.1);
  border-bottom: 1px solid rgba(200, 195, 184, 0.1);
}

.doctrine-line {
  position: relative;
  display: grid;
  gap: 14px;
}

.doctrine-line::before {
  position: absolute;
  top: 50%;
  left: 4px;
  width: calc(100% - 8px);
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--silver), var(--oxblood));
  transform: translateY(-50%);
  opacity: 0.55;
}

.doctrine-line span {
  position: relative;
  width: min(100%, 420px);
  padding: 20px 24px;
  border: 1px solid rgba(200, 195, 184, 0.14);
  border-radius: 8px;
  background: rgba(17, 19, 21, 0.88);
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  transform: translateX(calc(var(--i, 0) * 16px));
}

.doctrine-line span:nth-child(2) {
  margin-left: 42px;
}

.doctrine-line span:nth-child(3) {
  margin-left: 84px;
}

.doctrine-line span:nth-child(4) {
  margin-left: 42px;
  color: #f0b3b6;
}

.doctrine-line span:nth-child(5) {
  color: var(--paper);
}

.doctrine-copy p,
.access-card p {
  max-width: 640px;
  color: rgba(242, 239, 231, 0.66);
  font-size: 1.12rem;
  line-height: 1.72;
}

.ledger-section {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
  align-items: stretch;
}

.engine-footer-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 20px;
  margin-top: 20px;
}

.protocol-rail {
  display: grid;
  align-content: stretch;
  gap: 10px;
}

.protocol-rail span {
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 0 24px;
  border: 1px solid rgba(200, 195, 184, 0.15);
  border-radius: 8px;
  background: rgba(17, 19, 21, 0.72);
  color: var(--ivory);
  font-family: var(--font-hard);
  font-size: 1.55rem;
  font-weight: 900;
  text-transform: uppercase;
}

.protocol-rail span:nth-child(4) {
  color: #f0b3b6;
}

.memo-card {
  padding: 2.75rem;
  background: var(--ivory);
  color: var(--void);
}

.memo-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(5, 6, 7, 0.22);
  font-family: var(--font-hard);
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.memo-mark {
  width: 54px;
  fill: var(--void);
}

.memo-card h2 {
  margin: 32px 0 22px;
  color: var(--void);
  font-size: 4.5rem;
}

.ledger-table {
  display: grid;
}

.ledger-table div {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(5, 6, 7, 0.18);
  font-family: var(--font-mono);
  font-size: 14px;
}

.ledger-table div:nth-child(2) {
  color: var(--oxblood);
}

.ledger-table strong {
  font-weight: 700;
}

.access-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 5vw, 60px);
}

.section-reveal {
  opacity: 0;
  transform: translate3d(0, 46px, 0);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}

.section-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ─── Metrics Strip ─── */

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 0;
  padding: 0;
  border-top: 1px solid rgba(200, 195, 184, 0.12);
  border-bottom: 1px solid rgba(200, 195, 184, 0.12);
  background: rgba(17, 19, 21, 0.4);
}

.metric {
  display: grid;
  gap: 6px;
  padding: 28px 24px;
  background: rgba(5, 6, 7, 0.72);
}

.metric-label {
  color: rgba(200, 195, 184, 0.5);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  color: var(--ivory);
  font-family: var(--font-hard);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.metric-note {
  color: rgba(200, 195, 184, 0.42);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Principles Section ─── */

.principles {
  padding: 7rem 0 6rem;
}

.doctrine-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.doctrine-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 28px 24px 32px;
  border: 1px solid rgba(200, 195, 184, 0.14);
  border-radius: 8px;
  background: rgba(17, 19, 21, 0.72);
  box-shadow: inset 0 1px rgba(242, 239, 231, 0.06);
  transition: border-color 600ms var(--ease), transform 600ms var(--ease), background 600ms var(--ease);
}

.doctrine-card:hover {
  border-color: rgba(200, 195, 184, 0.32);
  background: rgba(23, 25, 28, 0.82);
  transform: translate3d(0, -3px, 0);
}

.doctrine-index {
  color: var(--oxblood);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.doctrine-card h3 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--font-hard);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.doctrine-card p {
  margin: 0;
  color: rgba(242, 239, 231, 0.58);
  font-size: 0.92rem;
  font-weight: 430;
  line-height: 1.55;
}

.principles .covenant-strip {
  margin-top: 2.5rem;
}

/* ─── Belief Band ─── */

.belief-band {
  padding: 8rem 0 7rem;
  border-top: 1px solid rgba(200, 195, 184, 0.1);
}

.belief-copy {
  max-width: 820px;
}

.belief-title {
  font-size: 5.5rem;
  line-height: 0.88;
  letter-spacing: -0.02em;
}

.belief-text {
  max-width: 640px;
  margin: 32px 0 0;
  color: rgba(242, 239, 231, 0.68);
  font-size: 1.15rem;
  font-weight: 430;
  line-height: 1.7;
}

/* ─── Ghost CTA refinement ─── */

.ghost-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 6px;
  padding: 0 18px;
  border: 1px solid rgba(200, 195, 184, 0.18);
  border-radius: 999px;
  color: rgba(242, 239, 231, 0.72);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: border-color 700ms var(--ease), color 700ms var(--ease), transform 700ms var(--ease);
}

.ghost-cta i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
}

.ghost-cta svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.8;
}

.ghost-cta:hover {
  color: var(--ivory);
  border-color: rgba(200, 195, 184, 0.42);
  transform: translate3d(0, -1px, 0);
}

/* ─── Footer ─── */

.site-footer {
  position: relative;
  z-index: 3;
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: 0 0 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 28px 0;
  border-top: 1px solid rgba(200, 195, 184, 0.12);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-mark {
  width: 34px;
  height: 26px;
  fill: rgba(242, 239, 231, 0.5);
  filter: none;
}

.footer-brand div {
  display: grid;
  gap: 2px;
}

.footer-brand strong {
  color: var(--ivory);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.footer-brand span {
  color: rgba(200, 195, 184, 0.42);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: rgba(242, 239, 231, 0.5);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 500ms var(--ease);
}

.footer-links a:hover {
  color: var(--ivory);
}

.footer-disclaimer {
  padding-top: 20px;
  border-top: 1px solid rgba(200, 195, 184, 0.08);
}

.footer-disclaimer p {
  max-width: 760px;
  margin: 0;
  color: rgba(200, 195, 184, 0.32);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px !important;
  color: rgba(200, 195, 184, 0.24) !important;
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}

/* ─── Section copy refinement ─── */

.section-copy h2 {
  letter-spacing: -0.02em;
}

@keyframes sweep {
  0%,
  18% {
    transform: translate3d(0, -100%, 0);
  }
  64%,
  100% {
    transform: translate3d(0, 420%, 0);
  }
}

@keyframes machineSweep {
  0%,
  22% {
    transform: translate3d(-420%, 0, 0) rotate(12deg);
  }
  70%,
  100% {
    transform: translate3d(360%, 0, 0) rotate(12deg);
  }
}

@keyframes drawPath {
  0%,
  14% {
    stroke-dashoffset: 470;
    opacity: 0.2;
  }
  52%,
  88% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -470;
    opacity: 0.2;
  }
}

@keyframes riskPulse {
  0%,
  100% {
    opacity: 0.28;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes meterFlow {
  0%,
  100% {
    transform: scaleX(0.82);
  }
  50% {
    transform: scaleX(1);
  }
}

@keyframes chartDraw {
  0%,
  12% {
    stroke-dashoffset: 860;
  }
  58%,
  88% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -860;
  }
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

@media (max-width: 920px) {
  .page-shell {
    width: min(100% - 28px, var(--max));
  }

  .nav {
    top: 14px;
    align-items: stretch;
    border-radius: 28px;
  }

  .nav-links {
    display: none;
  }

  .nav-action {
    min-height: 42px;
    padding-inline: 14px;
  }

  .hero,
  .engine-grid,
  .engine-footer-grid,
  .thesis-grid,
  .doctrine,
  .ledger-section {
    grid-template-columns: 1fr;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doctrine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .thesis-paper {
    min-height: auto;
  }

  .thesis-main h1 {
    font-size: 6rem;
  }

  .thesis-lede {
    font-size: 1.65rem;
  }

  .doctrine-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .hero-stage {
    min-height: 440px;
  }

  .state-row {
    flex-wrap: wrap;
  }

  .section-copy {
    display: block;
  }

  .doctrine-line span,
  .doctrine-line span:nth-child(n) {
    width: 100%;
    margin-left: 0;
  }

  .belief-title {
    font-size: 4rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

@media (max-width: 580px) {
  .brand {
    min-width: 0;
  }

  .brand span {
    display: none;
  }

  h1 {
    font-size: 4.3rem;
    line-height: 0.82;
  }

  .engine-title h1 {
    font-size: 3.7rem;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-actions {
    display: grid;
  }

  .primary-cta {
    width: 100%;
  }

  .monogram-machine {
    aspect-ratio: 0.82;
  }

  .hero-ff {
    width: 104%;
  }

  .engine-panel {
    padding: 20px;
  }

  .filter-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .filter-row strong {
    text-align: left;
  }

  .ledger-table div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .memo-card {
    padding: 1.5rem;
  }

  .memo-card h2 {
    font-size: 3.1rem;
  }

  .protocol-rail span {
    min-height: 58px;
    font-size: 1.25rem;
  }

  .paper-topline {
    display: grid;
  }

  .thesis-page {
    padding-top: 3rem;
  }

  .thesis-paper {
    padding: 1.4rem;
  }

  .thesis-grid {
    gap: 2rem;
    margin-top: 2rem;
  }

  .thesis-main h1 {
    font-size: 3.7rem;
  }

  .thesis-lede {
    font-size: 1.25rem;
    line-height: 1.08;
  }

  .thesis-body {
    font-size: 0.98rem;
  }

  .thesis-aside strong {
    font-size: 1.15rem;
  }

  .doctrine-matrix {
    grid-template-columns: 1fr;
  }

  .doctrine-matrix div {
    min-height: auto;
  }

  .doctrine-matrix strong {
    font-size: 1.45rem;
  }

  .metrics-strip {
    grid-template-columns: 1fr;
  }

  .metric {
    padding: 20px 18px;
  }

  .metric-value {
    font-size: 1.8rem;
  }

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

  .belief-title {
    font-size: 2.8rem;
  }

  .principles {
    padding: 4rem 0 3rem;
  }

  .belief-band {
    padding: 4rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
