:root {
  --ground: #f4f2ed;
  --panel: #eae7df;
  --card: #fbfaf8;
  --ink: #191817;
  --muted: rgba(25, 24, 23, .64);
  --faint: rgba(25, 24, 23, .44);
  --line: rgba(25, 24, 23, .12);
  --amber: #f2a03d;
  --lavender: #d7b9dd;
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ground);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.nav {
  position: fixed;
  z-index: 30;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 250, 248, .86);
  box-shadow: 0 10px 34px rgba(25, 24, 23, .08);
  backdrop-filter: blur(14px);
}
.brand {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
  white-space: nowrap;
}
.brand b { color: var(--amber); }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.hero {
  position: relative;
  min-height: 790px;
  max-width: 1180px;
  margin: auto;
  padding: 164px 20px 92px;
  overflow: visible;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .42;
  pointer-events: none;
}
.hero::before { width: 430px; height: 330px; left: -15%; top: 24%; background: #f8c47f; }
.hero::after { width: 420px; height: 320px; right: -14%; bottom: 4%; background: var(--lavender); }
.eyebrow,
.section-no {
  color: var(--faint);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow { margin-bottom: 22px; }
h1, h2, h3 { font-family: "Bricolage Grotesque", sans-serif; }
h1, h2 { margin: 0; letter-spacing: -.052em; line-height: .96; }
h1 {
  max-width: 1040px;
  font-size: clamp(3.5rem, 8.2vw, 7.1rem);
}
h1 em,
h2 em {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.025em;
}
.hero-copy {
  max-width: 650px;
  margin: 30px 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 500;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 23px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary {
  background: var(--amber);
  color: #291b07;
  box-shadow: 0 10px 28px rgba(242, 160, 61, .28);
}
.button.secondary { border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.formula {
  margin-top: 74px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(251, 250, 248, .9);
  box-shadow: 0 22px 60px rgba(25, 24, 23, .08);
}
.formula div {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: 16px;
}
.formula div:nth-of-type(2) { background: #f6e4cc; }
.formula b {
  color: var(--amber);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}
.formula span { font-family: "Bricolage Grotesque", sans-serif; font-size: 19px; font-weight: 700; }
.formula i { color: var(--faint); font-style: normal; font-size: 22px; }

.intro {
  max-width: 1180px;
  margin: auto;
  padding: 106px 20px 44px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 72px;
  align-items: end;
}
.section-no { display: block; margin-bottom: 18px; }
.intro h2,
.closing h2,
.priority-head h2 {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
}
.intro p,
.priority-head p,
.closing p {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.65;
}

.segment-shell { max-width: 1180px; margin: 0 auto 120px; padding: 0 20px; }
.segment-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0 20px;
  scrollbar-width: none;
}
.segment-tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font: 500 11px "IBM Plex Mono", monospace;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.tab:hover { transform: translateY(-1px); }
.tab.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.segment-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 22px 60px rgba(25, 24, 23, .08);
}
.segment-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 35px 38px;
  border-bottom: 1px solid var(--line);
}
.segment-title small {
  color: var(--faint);
  font: 500 11px "IBM Plex Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.segment-title h3 {
  margin: 8px 0 0;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  letter-spacing: -.04em;
  line-height: 1;
}
.age {
  padding: 8px 13px;
  border-radius: 999px;
  background: #f6e4cc;
  color: #8f5513;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.rows { padding: 8px 38px 22px; }
.row {
  display: grid;
  grid-template-columns: 1.15fr .8fr 1.05fr;
  gap: 30px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.cell-label {
  display: block;
  margin-bottom: 9px;
  color: var(--faint);
  font: 500 10px "IBM Plex Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.problem { font-weight: 700; line-height: 1.45; }
.solution { color: var(--muted); line-height: 1.5; }
.magnet { color: #8f5513; font-weight: 700; line-height: 1.45; }
.segment-helper {
  max-width: 540px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.chain-launch,
.copy-all,
.copy-prompt {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.chain-launch {
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.chain-launch:hover,
.chain-launch.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  transform: translateY(-1px);
}
.chain-studio {
  padding: 38px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.chain-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 24px;
}
.chain-head h4 {
  margin: 6px 0 8px;
  font: 700 clamp(1.8rem, 3.6vw, 3rem)/1.06 "Bricolage Grotesque", sans-serif;
  letter-spacing: -.035em;
}
.chain-head p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.chain-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.format-tag {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  color: var(--faint);
  font: 500 10px "IBM Plex Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.copy-all {
  padding: 12px 17px;
  border-radius: 999px;
  background: var(--amber);
  color: #291b07;
  font-size: 13px;
  white-space: nowrap;
}
.copy-all:hover,
.copy-prompt:hover { transform: translateY(-1px); }
.copy-all.copied,
.copy-prompt.copied { background: #dce9bd; color: #2c4015; }
.prompt-chain { display: grid; gap: 10px; }
.prompt-step {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.prompt-step summary {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 17px 18px;
  cursor: pointer;
  list-style: none;
}
.prompt-step summary::-webkit-details-marker { display: none; }
.prompt-number {
  color: var(--amber);
  font: 500 11px "IBM Plex Mono", monospace;
}
.prompt-step summary small,
.prompt-step summary strong { display: block; }
.prompt-step summary small {
  margin-bottom: 3px;
  color: var(--faint);
  font: 500 9px "IBM Plex Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.prompt-step summary strong { font-size: 15px; }
.chevron {
  color: var(--faint);
  font-size: 22px;
  transition: transform .18s ease;
}
.prompt-step[open] .chevron { transform: rotate(45deg); }
.prompt-body {
  padding: 0 18px 18px 68px;
  border-top: 1px solid var(--line);
}
.prompt-instruction {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(194, 119, 34, .2);
  border-radius: 12px;
  background: rgba(239, 179, 96, .16);
}
.prompt-instruction span {
  display: block;
  color: #8c5516;
  font: 600 9px "IBM Plex Mono", monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.prompt-instruction p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.prompt-body pre {
  margin: 18px 0;
  color: var(--muted);
  font: 400 12px/1.7 "IBM Plex Mono", monospace;
  white-space: pre-wrap;
}
.copy-prompt {
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
}
.codex-handoff {
  margin-top: 22px;
  padding: 28px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
}
.handoff-kicker {
  margin-bottom: 8px;
  color: var(--amber);
  font: 500 10px "IBM Plex Mono", monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.codex-handoff h5 {
  margin: 0 0 20px;
  font: 700 clamp(1.45rem, 3vw, 2rem)/1.1 "Bricolage Grotesque", sans-serif;
  letter-spacing: -.025em;
}
.codex-handoff ol {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.codex-handoff li {
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
}
.codex-handoff li span {
  display: block;
  margin-bottom: 18px;
  color: var(--amber);
  font: 500 10px "IBM Plex Mono", monospace;
}
.codex-handoff li p {
  margin: 0;
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  line-height: 1.55;
}

.priorities {
  padding: 112px max(20px, calc((100vw - 1140px) / 2));
  background: var(--ink);
  color: #fff;
}
.section-no.light { color: var(--amber); }
.priority-head { max-width: 720px; }
.priority-head p { margin-top: 24px; color: rgba(255, 255, 255, .62); }
.rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; }
.rank-card {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
  background: rgba(255, 255, 255, .06);
}
.rank-label { margin-bottom: 14px; font: 700 19px "Bricolage Grotesque", sans-serif; }
.conversion .rank-label { color: var(--amber); }
.value .rank-label { color: var(--lavender); }
.rank-card ol { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.rank-card li {
  counter-increment: rank;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.rank-card li:last-child { border: 0; }
.rank-card li::before {
  content: counter(rank, decimal-leading-zero);
  color: rgba(255, 255, 255, .4);
  font: 500 10px "IBM Plex Mono", monospace;
}
.rank-card li span { color: rgba(255, 255, 255, .5); font-size: 13px; }

.closing {
  width: min(1180px, calc(100% - 40px));
  margin: 70px auto 50px;
  padding: 100px 38px;
  border-radius: var(--radius);
  background: var(--lavender);
  text-align: center;
}
.closing .section-no { margin-bottom: 20px; }
.closing p { max-width: 690px; margin: 26px auto 32px; }
.closing .button.primary { background: var(--ink); color: #fff; box-shadow: none; }
footer {
  width: min(1180px, calc(100% - 40px));
  min-height: 110px;
  margin: auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
footer a { color: var(--ink); font-weight: 700; text-decoration: none; }
footer span:last-child { justify-self: end; }

@media (max-width: 820px) {
  .hero { min-height: auto; padding-top: 140px; }
  .intro { grid-template-columns: 1fr; gap: 24px; }
  .row { grid-template-columns: 1fr; gap: 18px; }
  .rank-grid { grid-template-columns: 1fr; }
  .chain-head { grid-template-columns: 1fr; gap: 18px; }
  .chain-actions { align-items: flex-start; }
  .codex-handoff ol { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-link { padding-inline: 13px; }
  .hero { padding-inline: 14px; padding-bottom: 68px; }
  h1 { font-size: clamp(3rem, 15vw, 4.4rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .formula { grid-template-columns: 1fr; }
  .formula i { justify-self: center; transform: rotate(90deg); }
  .formula div { min-height: auto; }
  .intro { padding: 76px 14px 34px; }
  .segment-shell { padding-inline: 14px; margin-bottom: 76px; }
  .segment-title { align-items: flex-start; flex-direction: column; padding: 27px 22px; }
  .rows { padding: 4px 22px 12px; }
  .chain-studio { padding: 28px 18px; }
  .prompt-body { padding: 0 16px 16px; }
  .prompt-step summary { grid-template-columns: 32px 1fr auto; padding-inline: 15px; }
  .codex-handoff { padding: 22px 16px; }
  .codex-handoff ol { grid-template-columns: 1fr; }
  .priorities { padding-block: 80px; }
  .rank-card { padding: 22px; }
  .rank-card li { grid-template-columns: 30px 1fr; }
  .rank-card li span { display: none; }
  .closing { width: calc(100% - 28px); margin-top: 14px; padding: 72px 22px; }
  footer { width: calc(100% - 28px); grid-template-columns: 1fr; text-align: center; }
  footer span:last-child { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .tab { transition: none; }
}
