:root {
  color-scheme: light;
  --ink: #16201d;
  --muted: #53635e;
  --paper: #f7f5ef;
  --paper-strong: #fffdf8;
  --line: #d6d2c6;
  --green: #1f6f5b;
  --green-dark: #123d34;
  --blue: #295f91;
  --blue-soft: #d9e8f4;
  --yellow: #d8ad42;
  --red: #a34a43;
  --violet: #5f4a8b;
  --shadow: 0 22px 60px rgba(24, 32, 29, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}

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

.site-header {
  position: fixed;
  inset: 18px 24px auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(247, 245, 239, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 38px rgba(24, 32, 29, 0.12);
}

.brand,
.nav-links,
.hero-actions,
.pilot-actions,
.footer-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--green-dark);
  color: #f5f0de;
  font-size: 0.76rem;
  letter-spacing: 0;
}

.nav-links {
  gap: 22px;
  color: #293632;
  font-size: 0.92rem;
}

.nav-links a,
.footer-links a {
  transition: color 180ms ease;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--green);
}

.nav-cta,
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 750;
}

.nav-cta {
  padding: 0 16px;
  background: var(--ink);
  color: #fffdf8;
  font-size: 0.9rem;
}

.hero {
  position: relative;
  min-height: 96vh;
  overflow: hidden;
  background: #17211f;
  color: #fffdf8;
}

#shape-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(23, 33, 31, 0), rgba(23, 33, 31, 0.82));
  content: "";
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 180px 0 150px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 920px;
  margin-bottom: 20px;
  font-size: clamp(4rem, 10vw, 9.2rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  color: rgba(255, 253, 248, 0.84);
  font-size: clamp(1.16rem, 2vw, 1.55rem);
}

.hero-actions,
.pilot-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  padding: 0 20px;
  border: 1px solid transparent;
}

.button-primary {
  background: var(--yellow);
  color: #15130d;
}

.button-secondary {
  border-color: rgba(255, 253, 248, 0.38);
  color: #fffdf8;
}

.pilot-actions .button-secondary {
  border-color: rgba(22, 32, 29, 0.22);
  color: var(--ink);
}

.hero-readout {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 24px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  border: 1px solid rgba(255, 253, 248, 0.18);
  background: rgba(255, 253, 248, 0.12);
  backdrop-filter: blur(20px);
}

.hero-readout div {
  min-height: 112px;
  padding: 20px;
  background: rgba(23, 33, 31, 0.42);
}

.hero-readout span {
  display: block;
  color: var(--yellow);
  font-size: 2rem;
  font-weight: 850;
}

.hero-readout p {
  margin: 4px 0 0;
  color: rgba(255, 253, 248, 0.78);
}

.section-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.intro-band {
  padding: 80px 0;
  background: var(--paper-strong);
  border-bottom: 1px solid var(--line);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: start;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.intro-grid p,
.section-heading p,
.pilot-copy p {
  color: var(--muted);
  font-size: 1.08rem;
}

.split-section,
.demo-section,
.leaderboard-section,
.pilot-section {
  padding: 110px 0;
}

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

.section-heading.compact {
  max-width: 620px;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 40px;
}

.process-list article,
.trust-cards article,
.leaderboard {
  border: 1px solid var(--line);
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.process-list article {
  min-height: 280px;
  padding: 28px;
}

.process-list span {
  display: block;
  margin-bottom: 34px;
  color: var(--red);
  font-weight: 850;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.32rem;
  line-height: 1.08;
}

.process-list p,
.trust-cards p,
.result-card p,
.materialize-card p,
.leaderboard p,
.site-footer p {
  color: var(--muted);
}

.demo-section {
  background: #e7ece6;
  border-bottom: 1px solid var(--line);
}

.demo-layout {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 42px;
  align-items: start;
}

.lookup-panel {
  padding: 18px;
  border: 1px solid #c9d2c7;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.lookup-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.lookup-tab {
  min-height: 40px;
  border: 1px solid #d7d1c3;
  border-radius: 6px;
  background: #f3efe4;
  color: #35433e;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.lookup-tab.active {
  border-color: var(--green);
  background: var(--green);
  color: #fffdf8;
}

.query-label {
  display: block;
  margin-bottom: 8px;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

#shape-query {
  width: 100%;
  min-height: 142px;
  resize: vertical;
  padding: 16px;
  border: 1px solid #c8c1b2;
  border-radius: 6px;
  background: #181f1d;
  color: #f9f4e5;
  font: 700 0.92rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
}

#shape-query:focus,
.lookup-tab:focus-visible,
input[type="range"]:focus-visible,
.button:focus-visible,
.nav-cta:focus-visible {
  outline: 3px solid rgba(216, 173, 66, 0.55);
  outline-offset: 3px;
}

.lookup-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0;
}

.lookup-actions .button {
  border: 0;
  cursor: pointer;
}

#lookup-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.result-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 12px;
}

.result-card,
.materialize-card {
  min-height: 250px;
  padding: 22px;
  border: 1px solid var(--line);
  background: #fbf7ec;
}

.result-card.winner {
  border-color: rgba(31, 111, 91, 0.38);
  background: #eff7f0;
}

.result-kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--violet);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.score-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 0;
}

.score-list div {
  padding: 12px;
  border: 1px solid rgba(31, 111, 91, 0.18);
  background: rgba(255, 253, 248, 0.74);
}

.score-list dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.score-list dd {
  margin: 2px 0 0;
  color: var(--green-dark);
  font-size: 1.2rem;
  font-weight: 900;
}

#materialize-command {
  min-height: 104px;
  margin: 0 0 18px;
  padding: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid #252f2b;
  border-radius: 6px;
  background: #17211f;
  color: var(--blue-soft);
  font: 750 0.85rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.market-band {
  padding: 110px 0;
  background: #1d2a26;
  color: #fffdf8;
}

.market-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  align-items: center;
}

.market-layout .section-heading p {
  color: rgba(255, 253, 248, 0.74);
}

.economics-panel {
  padding: 24px;
  border: 1px solid rgba(255, 253, 248, 0.2);
  background:
    linear-gradient(rgba(255, 253, 248, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 253, 248, 0.08) 1px, transparent 1px),
    rgba(255, 253, 248, 0.06);
  background-size: 32px 32px;
}

.sim-control {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 0.8fr) 84px;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 253, 248, 0.16);
}

.sim-control label {
  color: rgba(255, 253, 248, 0.86);
  font-weight: 800;
}

.sim-control strong {
  color: var(--yellow);
  text-align: right;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--yellow);
}

.economics-output {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.economics-output div {
  min-height: 138px;
  padding: 18px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  background: rgba(255, 253, 248, 0.1);
}

.economics-output span {
  display: block;
  color: var(--yellow);
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  font-weight: 900;
}

.economics-output p,
.sim-note {
  color: rgba(255, 253, 248, 0.74);
}

.sim-note {
  margin: 20px 0 0;
}

.leaderboard {
  margin-top: 36px;
  overflow: hidden;
}

.leaderboard-head,
.leaderboard-row {
  display: grid;
  grid-template-columns: 86px 1.2fr 1fr;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
}

.leaderboard-head {
  background: #e8e1d1;
  color: #4d5854;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.leaderboard-row + .leaderboard-row {
  border-top: 1px solid var(--line);
}

.leaderboard-row > span {
  color: var(--green);
  font-weight: 900;
}

.leaderboard-row strong {
  font-size: 1.1rem;
}

.leaderboard-row p {
  margin: 0;
}

.trust-band {
  padding: 110px 0;
  background: var(--green-dark);
  color: #fffdf8;
}

.trust-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 42px;
}

.trust-cards {
  display: grid;
  gap: 16px;
}

.trust-cards article {
  padding: 26px;
  background: rgba(255, 253, 248, 0.08);
  border-color: rgba(255, 253, 248, 0.16);
  box-shadow: none;
}

.trust-cards p,
.trust-band .section-heading p {
  color: rgba(255, 253, 248, 0.74);
}

.pilot-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: end;
}

.pilot-copy {
  max-width: 760px;
}

.pilot-actions {
  justify-content: flex-end;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 36px 24px;
  border-top: 1px solid var(--line);
  background: var(--paper-strong);
}

.site-footer p {
  margin: 6px 0 0;
}

.footer-links {
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

@media (max-width: 880px) {
  .site-header {
    inset: 10px 10px auto;
  }

  .nav-links {
    display: none;
  }

  .hero-inner {
    width: min(calc(100% - 32px), 720px);
    padding: 140px 0 28px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(3rem, 15vw, 4.35rem);
    overflow-wrap: break-word;
  }

  .hero-readout {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(calc(100% - 32px), 720px);
    margin: 0 auto 16px;
  }

  .hero-readout div {
    min-height: 132px;
    padding: 12px;
  }

  .hero-readout span {
    font-size: 1.35rem;
  }

  .hero-readout p {
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .intro-grid,
  .demo-layout,
  .market-layout,
  .trust-grid,
  .pilot-section,
  .process-list {
    grid-template-columns: 1fr;
  }

  .section-shell {
    width: min(calc(100% - 32px), 720px);
  }

  .intro-band,
  .split-section,
  .demo-section,
  .market-band,
  .leaderboard-section,
  .trust-band,
  .pilot-section {
    padding: 72px 0;
  }

  .lookup-actions {
    display: grid;
    justify-items: start;
  }

  .lookup-actions .button {
    width: 100%;
  }

  .result-grid,
  .economics-output {
    grid-template-columns: 1fr;
  }

  .sim-control {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sim-control strong {
    text-align: left;
  }

  .leaderboard-head,
  .leaderboard-row {
    grid-template-columns: 58px 1fr;
  }

  .leaderboard-head span:last-child,
  .leaderboard-row p {
    grid-column: 2;
  }

  .pilot-actions {
    justify-content: flex-start;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .nav-cta {
    display: none;
  }

  .hero-inner {
    padding-top: 120px;
  }

  .button {
    width: 100%;
  }

  .lookup-tabs,
  .score-list {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 28ch;
    font-size: 1.05rem;
    line-height: 1.42;
  }

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

  .hero-readout div {
    min-height: 74px;
    padding: 16px;
  }
}
