:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --radius: 8px;
  --shadow: 0 24px 90px color-mix(in srgb, var(--shadow-color) 40%, transparent);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, var(--grid-line) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(145deg, var(--bg), var(--bg-deep) 64%, var(--bg-edge));
  overflow-x: hidden;
  transition:
    color 240ms ease,
    background 240ms ease;
}

body[data-theme="copper"] {
  color-scheme: dark;
  --bg: #07120f;
  --bg-deep: #101713;
  --bg-edge: #211711;
  --surface: rgba(18, 28, 24, 0.76);
  --surface-strong: rgba(34, 33, 26, 0.9);
  --text: #f8efe4;
  --muted: #c0afa0;
  --faint: #89776a;
  --line: rgba(224, 173, 113, 0.2);
  --grid-line: rgba(229, 159, 91, 0.08);
  --accent: #d98a45;
  --accent-2: #f1d789;
  --accent-3: #56c6a2;
  --danger: #ff6b5f;
  --shadow-color: #0f0c08;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

#factor-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.78;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--accent);
  font-weight: 900;
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--accent) 20%, transparent);
}

.top-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
}

.top-nav a {
  transition: color 180ms ease;
}

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

.hero {
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 68px) 0 34px;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 1.06fr);
  align-items: center;
  gap: clamp(36px, 6vw, 82px);
}

.hero-copy {
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family:
    "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(48px, 5.35vw, 88px);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
  max-width: 11ch;
}

h2 {
  margin: 0;
  font-family:
    "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(36px, 5vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: uppercase;
}

h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.hero-lede {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.56;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.primary-cta {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  color: color-mix(in srgb, var(--bg) 88%, #000);
  background: var(--accent);
  font-weight: 850;
  box-shadow: 0 18px 44px color-mix(in srgb, var(--accent) 28%, transparent);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 58px color-mix(in srgb, var(--accent) 34%, transparent);
}

.microcopy {
  margin: 0;
  color: var(--faint);
  font-size: 13px;
}

.hero-visual {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 92%, transparent), var(--surface)),
    repeating-linear-gradient(90deg, transparent 0 18px, color-mix(in srgb, var(--line) 34%, transparent) 19px 20px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.terminal-bar {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.terminal-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--faint);
}

.terminal-bar span:nth-child(1) {
  background: var(--danger);
}

.terminal-bar span:nth-child(2) {
  background: var(--accent-2);
}

.terminal-bar span:nth-child(3) {
  background: var(--accent);
}

.terminal-bar strong {
  margin-left: auto;
  color: var(--faint);
  font-weight: 700;
}

.dashboard-grid {
  padding: clamp(16px, 2.5vw, 26px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.signal-card {
  min-height: 166px;
  padding: 18px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
}

.signal-card.wide {
  grid-column: 1 / -1;
}

.card-label {
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.signal-line,
.risk-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.signal-line strong,
.risk-row strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

.signal-meter {
  height: 6px;
  margin: 8px 0 16px;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  overflow: hidden;
}

.signal-meter i {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
}

.mini-chart {
  height: 92px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
}

.mini-chart span {
  height: var(--h);
  min-height: 18px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.risk-row {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.risk-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.marquee {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 36px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: blur(18px);
}

.marquee span {
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  text-transform: uppercase;
}

.marquee span:last-child {
  border-right: 0;
}

.section-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(58px, 8vw, 104px) 0;
  border-top: 1px solid var(--line);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.section-heading {
  max-width: 560px;
}

.section-heading.narrow {
  max-width: 820px;
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.foundry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-panel,
.factor-tile,
.loop-track article,
.ledger-item {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 78%, transparent), color-mix(in srgb, var(--surface) 82%, transparent));
  backdrop-filter: blur(18px);
}

.info-panel {
  min-height: 270px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.panel-index {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  border: 1px solid var(--line);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 840;
  font-variant-numeric: tabular-nums;
}

.info-panel h3,
.factor-tile span,
.loop-track span,
.ledger-item span {
  color: var(--text);
}

.info-panel p,
.loop-track p,
.ledger-item p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.factor-matrix {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.factor-tile {
  min-height: 170px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 0;
  border-left: 0;
}

.factor-tile span {
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.factor-tile strong {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.loop-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(28px, 5vw, 72px);
}

.loop-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
}

.loop-track article {
  min-height: 220px;
  padding: 18px;
  border: 0;
  border-right: 1px solid var(--line);
}

.loop-track article:last-child {
  border-right: 0;
}

.loop-track span {
  display: block;
  margin-bottom: 76px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ledger-section {
  padding-bottom: clamp(44px, 7vw, 88px);
}

.ledger-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ledger-item {
  min-height: 190px;
  padding: 20px;
}

.ledger-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ledger-item strong {
  display: block;
  margin-top: 24px;
  color: var(--accent-2);
  font-family:
    "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.final-cta {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 48px;
  padding: clamp(34px, 6vw, 68px);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface-strong) 84%, transparent);
  backdrop-filter: blur(18px);
}

.final-cta h2 {
  max-width: 820px;
  margin-bottom: 26px;
}

@media (max-width: 960px) {
  .site-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .top-nav {
    justify-self: start;
  }

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

  h1 {
    max-width: 10ch;
  }

  .hero-visual {
    width: 100%;
  }

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

  .split-section,
  .loop-section {
    grid-template-columns: 1fr;
  }

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

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

  .loop-track article:nth-child(2) {
    border-right: 0;
  }

  .loop-track article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .marquee span:nth-child(2) {
    border-right: 0;
  }

  .marquee span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .site-header,
  .hero,
  .marquee,
  .section-shell,
  .final-cta {
    width: min(100% - 28px, 1180px);
  }

  .top-nav {
    display: none;
  }

  h1 {
    font-size: clamp(44px, 15vw, 62px);
    max-width: 8.6ch;
  }

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

  .signal-card {
    min-height: auto;
  }

  .marquee,
  .foundry-grid,
  .factor-matrix,
  .loop-track,
  .ledger-grid {
    grid-template-columns: 1fr;
  }

  .info-panel,
  .factor-tile,
  .loop-track article,
  .ledger-item {
    min-height: auto;
  }

  .loop-track article,
  .loop-track article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .loop-track article:last-child {
    border-bottom: 0;
  }

  .loop-track span {
    margin-bottom: 34px;
  }

  .marquee span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .marquee span:last-child {
    border-bottom: 0;
  }
}

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