:root {
  --ink: #13201b;
  --ink-soft: #52615a;
  --paper: #fbf8f1;
  --paper-2: #efe9de;
  --forest: #102820;
  --forest-2: #18392e;
  --mint: #9bbfae;
  --teal: #317d68;
  --amber: #e5a24c;
  --amber-light: #f3c778;
  --line: rgba(19, 32, 27, 0.16);
  --line-light: rgba(251, 248, 241, 0.2);
  --max: 1240px;
  --shadow: 0 24px 70px rgba(9, 25, 19, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.62;
  overflow-x: hidden;
}

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

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

[hidden] { display: none !important; }

button:disabled { cursor: default; opacity: 0.45; }

/* A tangible practice folder and a small, self-contained teaching demo. */
.workspace-proof { background: var(--paper-2); }
.workspace-proof-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 72px; }
.workspace-proof-copy .lead-serif { margin-top: 26px; }
.workspace-proof-copy .boundary-note { margin-top: 22px; font-size: 12px; }
.workspace-folder { min-width: 0; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.workspace-folder-bar { display: flex; justify-content: space-between; gap: 16px; padding: 18px 24px; background: var(--forest); color: var(--paper); font-size: 12px; }
.workspace-folder-bar > span { font-family: ui-monospace, monospace; }
.workspace-folder-files { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.workspace-file { color: var(--ink-soft); font-family: ui-monospace, monospace; font-size: 11px; }
.workspace-file.is-active { color: var(--teal); font-weight: 700; }
.workspace-fragment { padding: 24px; }
.workspace-fragment > span { color: var(--teal); font-size: 12px; font-weight: 700; }
.workspace-fragment p { margin-top: 16px; font-size: 14px; }
.workspace-trace { padding: 0 24px 24px; }
.workspace-trace-row { display: grid; grid-template-columns: 45px 1fr auto; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 11px; }
.workspace-trace-row time, .workspace-trace-row strong { color: var(--teal); }
.journey-heading { display: grid; grid-template-columns: 1.25fr 0.75fr; align-items: end; gap: 72px; }
.journey-heading > p { color: var(--ink-soft); }
.journey-shell { margin-top: 38px; }
.journey-choices { display: flex; flex-wrap: wrap; gap: 8px 24px; border-bottom: 1px solid var(--line); }
.journey-choice { padding: 16px 0; color: var(--ink-soft); background: none; border: 0; border-bottom: 3px solid transparent; text-align: left; font-size: 14px; transition: color 180ms, border-color 180ms; }
.journey-choice:hover, .journey-choice.is-active { color: var(--teal); border-bottom-color: var(--teal); }
.journey-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px; padding: 36px 0; }
.journey-step { min-width: 0; }
.journey-step > span { color: var(--teal); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.journey-step blockquote { margin: 20px 0; font-family: "Source Serif 4", Georgia, serif; font-size: 23px; line-height: 1.25; }
.journey-step p { margin-top: 18px; font-size: 14px; color: var(--ink-soft); }
.journey-step strong { color: var(--ink); }
.journey-calculator-link { font-size: 14px; }

/* Endpoint and direction remain separate inputs: no invented factor weights. */
.calculator .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; margin-top: 26px; }
.calculator .text-field { min-width: 0; align-content: start; }
.text-field select, .text-field textarea { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: 14px; }
.text-field select { height: 48px; }
.text-field textarea { resize: vertical; line-height: 1.5; }
.text-field select:focus, .text-field textarea:focus { outline: 2px solid var(--teal); outline-offset: 2px; }
.calculator-status { margin-top: 16px; color: var(--ink-soft); font-size: 12px; }
.field-help { margin-top: 12px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
#factor-memory { font-size: 11px; }
.calculator-method-note { margin-top: 18px; font-size: 12px; }
.calculator-method-note summary { cursor: pointer; color: var(--teal); }
.calculator-method-note p { margin-top: 12px; color: var(--ink-soft); }
.result-image { margin-top: 18px; font-family: "Source Serif 4", Georgia, serif; font-size: 22px; line-height: 1.35; overflow-wrap: anywhere; }
.calculator-result .force-number { margin-top: 24px; }
.direction-result { padding: 20px 0; border-top: 1px solid var(--line-light); }
.direction-result .calculator-kicker { font-size: 10px; letter-spacing: 0.04em; }
#force-direction { margin-top: 12px; font-size: 19px; line-height: 1.35; color: var(--mint); }
#force-direction[data-direction="away"] { color: var(--amber-light); }
#force-direction[data-direction="unknown"] { color: var(--paper); }
#direction-reading { margin-top: 10px; font-size: 12px; color: rgba(251,248,241,.75); }
.observation-check { padding: 16px 0; border-top: 1px solid var(--line-light); }
.observation-check summary { cursor: pointer; font-size: 13px; }
.observation-check .action-signal { margin-top: 18px; padding-top: 0; border: 0; }
.calculator-result #save-calculation { margin-top: 18px; }
.calculator-result .new-image { margin-top: 12px; padding-block: 10px; color: var(--paper); text-align: center; }
.comparison-note { margin-top: 14px; color: var(--ink-soft); font-size: 12px; }
.comparison-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.comparison-entry { min-width: 0; padding: 22px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.comparison-entry-head { display: flex; justify-content: space-between; gap: 16px; }
.comparison-entry-head strong { color: var(--teal); font-family: ui-monospace, monospace; }
.comparison-entry h4 { margin: 14px 0 8px; font-size: 17px; line-height: 1.4; }
.comparison-entry p { margin-top: 8px; font-size: 12px; color: var(--ink-soft); }
.comparison-entry .comparison-direction { color: var(--ink); }

@media (max-width: 1180px) {
  .calculator { grid-template-columns: 1fr !important; }
  .calculator .comparison { grid-column: 1; }
}
@media (max-width: 980px) {
  .workspace-proof-grid, .journey-heading { grid-template-columns: 1fr; gap: 36px; }
  .journey-panel { grid-template-columns: 1fr; gap: 24px; }
  .journey-step + .journey-step { border-top: 1px solid var(--line); padding-top: 22px; }
}
@media (max-width: 720px) {
  .calculator .field-grid { grid-template-columns: 1fr; }
  .calculator .field-wide { grid-column: 1; }
  .comparison-list { grid-template-columns: 1fr; }
  .workspace-folder-bar, .workspace-folder-files, .workspace-fragment { padding-inline: 18px; }
  .workspace-trace { padding-inline: 18px; }
  .workspace-trace-row { grid-template-columns: 40px 1fr; gap: 8px; }
  .workspace-trace-row strong { grid-column: 2; }
  .journey-choices { display: grid; gap: 0; }
  .journey-choice { min-height: 48px; }
  .calculator-heading { flex-wrap: wrap; gap: 12px; }
}

button {
  cursor: pointer;
}

img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

section[id] {
  scroll-margin-top: 82px;
}

::selection {
  color: var(--forest);
  background: var(--amber-light);
}

:focus-visible {
  outline: 3px solid var(--amber-light);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--forest);
  background: var(--paper);
  border-radius: 6px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding-inline: 40px;
}

.section {
  padding: 112px 0;
}

.chapter,
.eyebrow,
.calculator-kicker {
  color: var(--teal);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.chapter {
  margin-bottom: 28px;
}

.chapter-light {
  color: var(--amber-light);
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

h1 {
  max-width: 830px;
  font-size: clamp(42px, 5.15vw, 68px);
}

h2 {
  max-width: 850px;
  font-size: clamp(34px, 4vw, 50px);
}

h3 {
  font-size: clamp(21px, 2vw, 28px);
}

.lead-serif {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(24px, 2.7vw, 34px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.24;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 15px 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

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

.button-amber {
  color: var(--forest);
  background: var(--amber-light);
}

.button-amber:hover {
  background: #ffd58d;
}

.button-light {
  color: var(--forest);
  background: var(--paper);
}

.button-light:hover {
  background: #fff;
}

.button-compact {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 13px;
}

.button-full {
  width: 100%;
}

.button-ghost,
.add-parameter {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--ink-soft);
  background: none;
  font-size: 13px;
  font-weight: 600;
}

.button-ghost:hover,
.add-parameter:hover {
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid currentColor;
  font-size: 14px;
  font-weight: 600;
}

.text-link-light {
  color: var(--paper);
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 14px 34px;
  color: var(--paper);
  border-bottom: 1px solid rgba(251, 248, 241, 0.16);
  background: rgba(7, 22, 17, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(251, 248, 241, 0.46);
  border-radius: 7px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 15px;
}

.brand-copy small {
  margin-top: 4px;
  color: rgba(251, 248, 241, 0.65);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  font-weight: 600;
}

.site-header nav a {
  color: rgba(251, 248, 241, 0.76);
  transition: color 160ms ease;
}

.site-header nav a:hover {
  color: var(--paper);
}

.site-header > .button {
  justify-self: end;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  color: var(--paper);
  background: var(--forest);
  overflow: hidden;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: calc(100% + 44px);
  object-fit: cover;
  object-position: 58% center;
  transform: translate3d(0, var(--hero-shift, 0px), 0) scale(1.035);
  transform-origin: center;
  will-change: transform;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(5, 17, 13, 0.94) 0%, rgba(5, 17, 13, 0.8) 38%, rgba(5, 17, 13, 0.25) 68%, rgba(5, 17, 13, 0.08) 100%),
    linear-gradient(0deg, rgba(5, 17, 13, 0.54), transparent 46%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  width: min(100%, var(--max));
  min-height: 100%;
  margin: 0 auto;
  padding: 108px 40px 30px;
}

.hero-copy {
  width: min(760px, 70%);
}

.hero .eyebrow {
  margin-bottom: 20px;
  color: var(--amber-light);
}

.hero-lead {
  max-width: 680px;
  margin-top: 26px;
  color: rgba(251, 248, 241, 0.82);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(21px, 1.9vw, 25px);
  line-height: 1.32;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid rgba(251, 248, 241, 0.25);
}

.hero-facts div {
  min-width: 180px;
  padding: 17px 34px 0 0;
}

.hero-facts dt {
  font-size: 15px;
  font-weight: 700;
}

.hero-facts dd {
  color: rgba(251, 248, 241, 0.58);
  font-size: 12px;
}

.hero-step {
  opacity: 0;
  animation: hero-in 700ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.hero-step:nth-child(2) { animation-delay: 90ms; }
.hero-step:nth-child(3) { animation-delay: 180ms; }
.hero-step:nth-child(4) { animation-delay: 270ms; }
.hero-step:nth-child(5) { animation-delay: 360ms; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.opening {
  background: var(--paper);
}

.opening-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 88px;
  align-items: start;
}

.opening-copy {
  display: grid;
  gap: 26px;
  color: var(--ink-soft);
}

.opening-copy .lead-serif {
  color: var(--ink);
}

.three-moves {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 76px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.three-moves li {
  display: grid;
  min-height: 174px;
  padding: 28px 30px 30px 0;
  border-right: 1px solid var(--line);
}

.three-moves li + li {
  padding-left: 30px;
}

.three-moves li:last-child {
  border-right: 0;
}

.three-moves span,
.outcome-index {
  color: var(--teal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.three-moves strong {
  align-self: end;
  font-size: 23px;
}

.three-moves p {
  color: var(--ink-soft);
  font-size: 14px;
}

.section-dark {
  color: var(--paper);
  background: var(--forest);
}

.calculator-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 72px;
  align-items: end;
}

.calculator-copy {
  padding-bottom: 14px;
}

.calculator-copy > p:not(.chapter):not(.microcopy) {
  margin-top: 28px;
  color: rgba(251, 248, 241, 0.68);
}

.formula {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 38px 0 26px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
}

.formula i {
  color: var(--amber-light);
  font-weight: 400;
}

.microcopy {
  color: rgba(251, 248, 241, 0.52);
  font-size: 12px;
  line-height: 1.6;
}

.rect-media {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper-2);
}

.rect-media img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rect-media:hover img {
  transform: scale(1.025);
}

.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);
  margin-top: 72px;
  color: var(--ink);
  background: var(--paper);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.calculator-workspace {
  padding: 42px;
}

.calculator-heading,
.comparison-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.calculator-heading h3,
.comparison-head h3 {
  margin-top: 8px;
  font-size: 27px;
}

.field-grid {
  display: grid;
  margin-top: 34px;
}

.field-wide {
  grid-column: 1 / -1;
}

.text-field {
  display: grid;
  gap: 8px;
}

.text-field > span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.text-field input,
.parameter-name input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: #fff;
}

.text-field input:focus,
.parameter-name input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(49, 125, 104, 0.12);
}

.parameter-head,
.parameter-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(135px, 0.8fr) minmax(135px, 0.8fr) 28px;
  gap: 18px;
  align-items: center;
}

.parameter-head {
  margin-top: 34px;
  padding: 0 0 9px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.parameter-name input {
  height: 40px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
}

.parameter-name input:hover {
  border-color: var(--line);
}

.range-field {
  display: grid;
  gap: 5px;
}

.range-caption {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 10px;
  text-transform: uppercase;
}

.range-caption output {
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
}

input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.remove-parameter {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 20px;
}

.remove-parameter:hover {
  color: var(--ink);
  background: var(--paper-2);
}

.add-parameter {
  margin-top: 14px;
}

.distance-control {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.distance-control label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.distance-control label > span {
  display: grid;
}

.distance-control small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
}

.distance-control output {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 34px;
  line-height: 1;
}

.distance-control input {
  margin-top: 14px;
}

.calculator-result {
  display: flex;
  flex-direction: column;
  padding: 42px 34px 34px;
  color: var(--paper);
  background: var(--forest-2);
}

.calculator-result .calculator-kicker {
  color: var(--amber-light);
}

.force-number {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-light);
}

.force-number span {
  color: rgba(251, 248, 241, 0.58);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 26px;
}

.force-number strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(54px, 7vw, 78px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.result-equation {
  display: flex;
  gap: 28px;
  padding: 15px 0;
  color: rgba(251, 248, 241, 0.56);
  border-bottom: 1px solid var(--line-light);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.result-equation strong {
  color: var(--paper);
}

.force-label {
  margin-top: 24px;
  color: var(--amber-light);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#force-text {
  margin-top: 10px;
  color: rgba(251, 248, 241, 0.68);
  font-size: 13px;
  line-height: 1.55;
}

.component-bars {
  display: grid;
  gap: 13px;
  margin: 26px 0 24px;
}

.component-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(251, 248, 241, 0.65);
  font-size: 10px;
}

.component-bar-head strong {
  color: var(--paper);
  font-family: "IBM Plex Mono", monospace;
}

.component-track {
  height: 3px;
  background: rgba(251, 248, 241, 0.12);
}

.component-track i {
  display: block;
  width: var(--component-width);
  height: 100%;
  background: var(--mint);
  transition: width 220ms ease;
}

.component-track i[data-sign="negative"] {
  background: var(--amber);
}

.action-signal {
  min-width: 0;
  margin: 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--line-light);
}

.action-signal legend {
  padding: 0;
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.action-signal > p {
  margin-top: 5px;
  color: rgba(251, 248, 241, 0.5);
  font-size: 10px;
}

.signal-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 12px;
}

.signal-options label {
  min-width: 0;
  cursor: pointer;
}

.signal-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.signal-options span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 7px;
  color: rgba(251, 248, 241, 0.68);
  border: 1px solid var(--line-light);
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.signal-options input:checked + span {
  color: var(--forest);
  border-color: var(--amber-light);
  background: var(--amber-light);
}

.signal-options input:focus-visible + span {
  outline: 3px solid var(--amber-light);
  outline-offset: 3px;
}

.next-step {
  margin: 16px 0 24px;
}

.next-step > span {
  color: var(--amber-light);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#next-step-text {
  margin-top: 6px;
  color: rgba(251, 248, 241, 0.78);
  font-size: 11px;
  line-height: 1.5;
}

.privacy {
  margin-top: 12px;
  color: rgba(251, 248, 241, 0.45);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.comparison {
  grid-column: 1 / -1;
  padding: 32px 42px 38px;
  border-top: 1px solid var(--line);
  background: #f5f0e7;
}

.comparison > p {
  max-width: 720px;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 13px;
}

.comparison-list {
  display: grid;
  margin-top: 22px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 42px minmax(220px, 1fr) auto auto auto;
  gap: 24px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.comparison-rank {
  color: var(--teal);
}

.comparison-row > span:nth-child(2) {
  display: grid;
  font-family: "Manrope", sans-serif;
}

.comparison-row small {
  color: var(--ink-soft);
  font-size: 10px;
}

.case-section {
  background: var(--paper-2);
}

.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 70px;
  align-items: center;
}

.case-copy .eyebrow {
  margin-bottom: 18px;
}

.case-copy h2 {
  font-size: clamp(32px, 3.6vw, 46px);
}

.case-copy .lead-serif {
  margin-top: 30px;
  font-size: clamp(21px, 2.2vw, 29px);
}

.case-trace {
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.case-trace div {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.case-trace dt {
  color: var(--teal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-trace dd {
  color: var(--ink-soft);
  font-size: 13px;
}

.boundary-note {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 11px;
}

.outcomes {
  background: var(--paper);
}

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

.outcome-list {
  margin-top: 62px;
  border-top: 1px solid var(--line);
}

.outcome-list li {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 32px;
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--line);
}

.outcome-list li > div {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(300px, 1.2fr);
  gap: 60px;
  align-items: start;
}

.outcome-list h3 {
  font-size: 25px;
}

.outcome-list p {
  max-width: 580px;
  color: var(--ink-soft);
}

.program-section {
  background: #e6eee8;
}

.program-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 80px;
  align-items: end;
}

.program-intro .chapter {
  grid-column: 1 / -1;
  margin-bottom: -48px;
}

.program-intro > p:last-child {
  color: var(--ink-soft);
}

.timeline {
  margin-top: 70px;
  border-top: 1px solid var(--line);
}

.timeline-day {
  position: relative;
  display: grid;
  grid-template-columns: 155px 120px 1fr;
  gap: 26px;
  padding: 25px 0 29px;
  border-bottom: 1px solid var(--line);
}

.timeline-day time {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
}

.day-kind {
  align-self: start;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-day.live .day-kind {
  color: #9a4d12;
}

.timeline-day.live::before {
  position: absolute;
  top: 0;
  left: -18px;
  width: 4px;
  height: 100%;
  background: var(--amber);
  content: "";
}

.timeline-day h3 {
  font-size: 21px;
}

.timeline-day p {
  max-width: 690px;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

.codex-section {
  background: var(--paper);
}

.codex-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 90px;
  align-items: start;
}

.codex-copy {
  display: grid;
  gap: 27px;
}

.codex-copy .chapter {
  margin-bottom: 0;
}

.codex-copy > p:last-child {
  color: var(--ink-soft);
}

.codex-contract {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.codex-contract > div {
  padding: 28px 26px 32px 0;
}

.codex-contract > div + div {
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.codex-contract > div > span {
  color: var(--teal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.codex-contract ul {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.codex-contract li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 13px;
}

.codex-contract li::before {
  position: absolute;
  top: 0.78em;
  left: 0;
  width: 7px;
  height: 1px;
  background: var(--teal);
  content: "";
}

.fit-section {
  background: var(--paper-2);
}

.fit-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(400px, 1.15fr);
  gap: 90px;
}

.fit-list {
  border-top: 1px solid var(--line);
}

.fit-list p {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.fit-list span {
  color: var(--teal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.boundary-section {
  color: var(--paper);
  background: #24483c;
}

.boundary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(400px, 1.15fr);
  gap: 90px;
}

.boundary-grid > div:last-child {
  display: grid;
  gap: 24px;
  color: rgba(251, 248, 241, 0.72);
}

.boundary-grid strong {
  color: var(--paper);
  white-space: nowrap;
}

.author-section {
  background: var(--paper);
}

.author-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(420px, 1.28fr);
  gap: 86px;
  align-items: center;
}

.author-photo {
  overflow: hidden;
  border-radius: 10px;
  background: #dfe8e2;
}

.author-photo img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 38%;
}

.author-copy .lead-serif {
  margin-top: 30px;
}

.author-copy dl {
  margin-top: 38px;
  border-top: 1px solid var(--line);
}

.author-copy dl div {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.author-copy dt {
  color: var(--teal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.author-copy dd {
  color: var(--ink-soft);
  font-size: 13px;
}

.pricing-section {
  color: var(--paper);
  background: var(--forest);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: 100px;
  align-items: center;
}

.pricing-copy p:last-child {
  max-width: 560px;
  margin-top: 24px;
  color: rgba(251, 248, 241, 0.68);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 26px;
  line-height: 1.3;
}

.offer {
  padding: 34px;
  border: 1px solid var(--line-light);
  border-radius: 10px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-light);
}

.price strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 68px;
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.price span {
  color: rgba(251, 248, 241, 0.55);
  font-size: 12px;
}

.offer ul {
  display: grid;
  gap: 11px;
  margin: 24px 0 30px;
}

.offer li {
  position: relative;
  padding-left: 18px;
  color: rgba(251, 248, 241, 0.75);
  font-size: 13px;
}

.offer li::before {
  position: absolute;
  top: 0.73em;
  left: 0;
  width: 7px;
  height: 1px;
  background: var(--amber-light);
  content: "";
}

.offer-note {
  margin-top: 12px;
  color: rgba(251, 248, 241, 0.45);
  font-size: 10px;
  text-align: center;
}

.faq-section {
  background: var(--paper);
}

.faq-grid {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 90px;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: grid;
  grid-template-columns: 1fr 24px;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  font-size: 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary span {
  position: relative;
  width: 20px;
  height: 20px;
}

.faq-list summary span::before,
.faq-list summary span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1px;
  background: var(--ink);
  content: "";
  transform: translate(-50%, -50%);
  transition: transform 180ms ease;
}

.faq-list summary span::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-list details[open] summary span::after {
  transform: translate(-50%, -50%) rotate(0);
}

.faq-list details p {
  max-width: 720px;
  padding: 0 54px 24px 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.final-cta {
  position: relative;
  padding: 110px 0 116px;
  color: var(--paper);
  background: #0b1f18;
  text-align: center;
  overflow: hidden;
}

.final-cta::before {
  position: absolute;
  inset: 0;
  background-image: url("assets/codex-intent-hero.webp");
  background-position: 60% 64%;
  background-size: cover;
  opacity: 0.13;
  content: "";
}

.final-cta .container {
  position: relative;
}

.final-cta .eyebrow {
  color: var(--amber-light);
}

.final-cta h2 {
  margin: 20px auto 34px;
}

footer {
  color: rgba(251, 248, 241, 0.58);
  background: #07140f;
  font-size: 11px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  padding-block: 22px;
}

.footer-inner a:hover {
  color: var(--paper);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .section {
    padding: 88px 0;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    padding-inline: 24px;
  }

  .site-header nav {
    display: none;
  }

  .hero-inner {
    padding-inline: 32px;
  }

  .hero-copy {
    width: min(720px, 82%);
  }

  .opening-grid,
  .calculator-intro,
  .program-intro,
  .codex-grid,
  .fit-grid,
  .boundary-grid,
  .author-grid,
  .pricing-grid,
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .program-intro .chapter {
    margin-bottom: -24px;
  }

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

  .calculator-result {
    min-height: 520px;
  }

  .comparison {
    grid-column: 1;
  }

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

  .outcome-list li > div {
    grid-template-columns: minmax(220px, 0.75fr) 1.25fr;
    gap: 36px;
  }

  .author-photo {
    width: min(540px, 75%);
  }

  .pricing-grid {
    align-items: stretch;
  }

  .offer {
    width: min(620px, 100%);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .container {
    padding-inline: 20px;
  }

  .section {
    padding: 70px 0;
  }

  .site-header {
    min-height: 64px;
    padding: 10px 16px;
  }

  .brand-copy small {
    display: none;
  }

  .site-header > .button {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .hero {
    min-height: 100svh;
  }

  .hero-image img {
    object-position: 67% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(5, 17, 13, 0.88), rgba(5, 17, 13, 0.26)),
      linear-gradient(0deg, rgba(5, 17, 13, 0.92) 0%, rgba(5, 17, 13, 0.55) 55%, rgba(5, 17, 13, 0.22) 100%);
  }

  .hero-inner {
    align-items: flex-end;
    padding: 96px 20px 24px;
  }

  .hero-copy {
    width: 100%;
  }

  h1 {
    font-size: clamp(38px, 11vw, 48px);
  }

  h2 {
    font-size: clamp(31px, 9vw, 39px);
  }

  .hero-lead {
    margin-top: 20px;
    font-size: 20px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
  }

  .hero-actions .text-link {
    justify-content: center;
    border-bottom: 0;
  }

  .hero-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 14px;
  }

  .hero-facts div {
    min-width: 0;
    padding: 12px 12px 0 0;
  }

  .hero-facts div:last-child {
    grid-column: 1 / -1;
  }

  .opening-grid,
  .calculator-intro,
  .case-grid,
  .codex-grid,
  .fit-grid,
  .boundary-grid,
  .author-grid,
  .pricing-grid,
  .faq-grid {
    gap: 34px;
  }

  .three-moves {
    grid-template-columns: 1fr;
    margin-top: 48px;
  }

  .three-moves li,
  .three-moves li + li {
    min-height: 0;
    padding: 22px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .three-moves li:last-child {
    border-bottom: 0;
  }

  .three-moves strong {
    margin-top: 22px;
  }

  .calculator-intro {
    align-items: stretch;
  }

  .calculator {
    margin-top: 44px;
    border-radius: 8px;
  }

  .calculator-workspace,
  .calculator-result,
  .comparison {
    padding: 26px 20px;
  }

  .calculator-heading h3,
  .comparison-head h3 {
    font-size: 23px;
  }

  .field-wide {
    grid-column: auto;
  }

  .parameter-head {
    display: none;
  }

  .parameter-list {
    margin-top: 26px;
  }

  .parameter-row {
    grid-template-columns: 1fr 28px;
    gap: 12px;
    padding: 16px 0;
  }

  .parameter-name {
    grid-column: 1;
  }

  .remove-parameter {
    grid-column: 2;
    grid-row: 1;
  }

  .range-field {
    grid-column: 1 / -1;
  }

  .distance-control label {
    align-items: flex-end;
  }

  .calculator-result {
    min-height: 0;
  }

  .comparison-row {
    grid-template-columns: 34px 1fr auto;
    gap: 11px;
  }

  .comparison-row > span:nth-child(3),
  .comparison-row > span:nth-child(4) {
    display: none;
  }

  .case-trace div {
    grid-template-columns: 90px 1fr;
  }

  .outcome-list {
    margin-top: 42px;
  }

  .outcome-list li {
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }

  .outcome-list li > div {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .timeline {
    margin-top: 48px;
  }

  .timeline-day {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
    padding: 21px 0;
  }

  .timeline-day > div {
    grid-column: 1 / -1;
    margin-top: 8px;
  }

  .timeline-day.live::before {
    left: -10px;
    width: 3px;
  }

  .codex-contract {
    grid-template-columns: 1fr;
  }

  .codex-contract > div,
  .codex-contract > div + div {
    padding: 24px 0;
    border-left: 0;
  }

  .codex-contract > div + div {
    border-top: 1px solid var(--line);
  }

  .fit-list p {
    grid-template-columns: 32px 1fr;
  }

  .author-photo {
    width: 100%;
  }

  .author-copy dl div {
    grid-template-columns: 86px 1fr;
  }

  .offer {
    padding: 26px 20px;
  }

  .price strong {
    font-size: 58px;
  }

  .final-cta {
    padding: 82px 0 88px;
  }

  .footer-inner {
    gap: 20px;
  }
}

@media (max-width: 720px) {
  .text-field input, .text-field select, .text-field textarea { font-size: 16px; }
}

@media (max-width: 360px) {
  h1 { font-size: 34px; }
  .hero-lead { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .hero-step,
  .reveal {
    opacity: 1;
    transform: none;
  }
}
