
  /* Fourth Order Intel staging. One continuous field teaches the four orders; every dot is a person or a reading.
     Color means one thing each: blue = what happened, red = the symptom, green = the forecast and what worked,
     white = people, grey = the same plan or not yet. Colors and buttons follow fourthorderintel.com. */
  :root {
    --bg: #07080d; --ink: #eef0f6; --ink-2: rgba(238, 240, 246, 0.8); --ink-3: rgba(238, 240, 246, 0.52);
    --line: rgba(238, 240, 246, 0.14); --blue: #1470ef; --blue-2: #7eb2ff; --violet: #1470ef; --red: #bed6ff; --green: #21ccee;
    --frame: 1320px; --gutter: clamp(16px, 4vw, 48px);
    --edge: max(var(--gutter), calc((100vw - var(--frame)) / 2 + var(--gutter)));
  }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
  a { color: inherit; }
  .topbar { position: fixed; inset: 0 0 auto; height: 3px; z-index: 20; background: linear-gradient(90deg, var(--violet), var(--blue)); }
  canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none; }
  .hero-video { position: fixed; inset: 0; width: 100vw; height: 100vh; object-fit: cover; z-index: 0; opacity: var(--vid, 1); }
  .hero-shade { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: var(--vid, 1); background: linear-gradient(90deg, rgba(7, 8, 13, 0.95), rgba(7, 8, 13, 0.82) 45%, rgba(7, 8, 13, 0.55)), linear-gradient(0deg, rgba(7, 8, 13, 0.9), transparent 40%); }

  header { position: fixed; inset: 0 0 auto; z-index: 10; display: flex; align-items: center; gap: 28px; padding: 22px var(--edge); }
  .foi { display: inline-flex; flex-direction: column; font: 900 12px/1.25 Inter, sans-serif; text-transform: uppercase; letter-spacing: -0.025em; color: var(--ink); text-decoration: none; }
  header { transition: background 0.3s; }
  body.scrolled header { background: linear-gradient(rgba(7, 8, 13, 0.92), rgba(7, 8, 13, 0.6)); backdrop-filter: blur(6px); }
  header nav { margin-left: auto; display: flex; gap: 26px; font: 600 14px Inter; }
  header nav a { color: var(--ink-2); text-decoration: none; }
  header nav a:hover { color: var(--ink); }
  .btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 4px; background: var(--blue); color: #fff; font: 700 13px/1 Inter; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; }
  .btn--ghost { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(238, 240, 246, 0.6); }
  header .btn { padding: 11px 16px; font-size: 12px; }

  /* the story: each chapter pins its copy while the field re-forms behind it */
  main { position: relative; z-index: 2; }
  .ch { position: relative; height: calc(var(--len, 180) * 1vh); }
  .pin { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; padding: 96px var(--edge) 96px; pointer-events: none; }
  .pin a { pointer-events: auto; }
  .copy { width: min(460px, 38vw); }
  .ch--hero .copy { width: min(620px, 50vw); }
  .kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 500 12px/1 "JetBrains Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-2); }
  .kicker b { display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid currentColor; border-radius: 50%; font-weight: 500; }
  h1 { margin: 0; font: 900 clamp(40px, 5.2vw, 84px)/0.96 Inter; letter-spacing: -0.045em; }
  h2 { margin: 0; font: 800 clamp(30px, 3.3vw, 48px)/1.03 Inter; letter-spacing: -0.035em; text-wrap: balance; }
  .copy p { margin: 16px 0 0; color: var(--ink-2); max-width: 440px; text-shadow: 0 0 18px var(--bg), 0 1px 2px var(--bg); }
  .copy .lede { font-size: 20px; max-width: 560px; }
  .copy .note { font: 500 12px/1.5 "JetBrains Mono", monospace; color: var(--ink-3); }
  .layers, .orders { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; max-width: 440px; }
  .layers li, .orders li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: baseline; font-size: 15px; color: var(--ink-2); }
  .layers li b, .orders li b { font: 500 12px "JetBrains Mono", monospace; color: var(--blue-2); }
  .orders li b { color: var(--red); }
  .layers strong, .orders strong { color: var(--ink); }
  .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
  .beat { opacity: 0; transform: translateY(18px); transition: opacity 0.6s, transform 0.6s; }
  .ch.is-on .beat { opacity: 1; transform: none; }

  /* the readout: which order you're in, and how far back or ahead you're looking */
  .hud { position: fixed; inset: auto 0 0; z-index: 9; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px var(--edge); font: 500 11px/1 "JetBrains Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); pointer-events: none; transition: opacity 0.4s; }
  body.past-story .hud { opacity: 0; }
  .hud__orders { display: flex; gap: 6px; align-items: center; }
  .hud__orders i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font-style: normal; transition: all 0.3s; }
  .hud__orders i.on { border-color: var(--blue-2); color: var(--ink); background: rgba(61, 111, 242, 0.25); }
  .time { display: flex; align-items: center; gap: 12px; }
  .time__track { position: relative; width: min(320px, 40vw); height: 1px; background: var(--line); }
  .time__track::before { content: ""; position: absolute; left: 50%; top: -5px; width: 1px; height: 11px; background: var(--ink-3); }
  .time__dot { position: absolute; top: -4px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--blue-2); box-shadow: 0 0 12px var(--blue-2); transition: left 0.6s cubic-bezier(.2,.7,.2,1); }
  .time__val { min-width: 120px; text-align: right; color: var(--ink-2); }

  /* below the story: plain ledger sections, no cards */
  .after { position: relative; z-index: 3; background: var(--bg); }
  .cta { max-width: var(--frame); margin: 80px auto 0; padding: 90px var(--gutter); text-align: center; border-top: 1px solid var(--line); }
  .cta h2 { max-width: 900px; margin: 0 auto; font-size: clamp(34px, 4.4vw, 64px); }
  .cta p { max-width: 560px; margin: 18px auto 0; color: var(--ink-2); font-size: 19px; }
  .cta .actions { justify-content: center; }
  footer { border-top: 1px solid var(--line); }
  .foot { max-width: var(--frame); margin: 0 auto; padding: 56px var(--gutter) 40px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
  .foot h4 { margin: 0 0 14px; font: 500 11px "JetBrains Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
  .foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
  .foot a { color: var(--ink-2); text-decoration: none; } .foot a:hover { color: var(--ink); }
  .foot__brand p { margin: 16px 0 0; color: var(--ink-2); font-size: 15px; max-width: 320px; }
  .legal { max-width: var(--frame); margin: 0 auto; padding: 18px var(--gutter) 40px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); }
  .legal p { margin: 0; max-width: 760px; }

  @media (max-width: 820px) {
    header nav { display: none; } header .btn { margin-left: auto; }
    .pin { align-items: flex-end; padding: 80px var(--gutter) 70px; }
    .copy, .ch--hero .copy { width: 100%; padding: 20px 18px; border-radius: 12px; background: linear-gradient(180deg, rgba(7, 8, 13, 0.84), rgba(7, 8, 13, 0.97) 35%); backdrop-filter: blur(8px); }
    .ch--hero .copy { background: none; backdrop-filter: none; padding: 0; }
    h1 { font-size: clamp(36px, 10.5vw, 58px); }
    .copy p { font-size: 15px; } .copy .lede { font-size: 17px; }
    .layers li, .orders li { font-size: 14px; }
    .copy .long-m, .copy .long { display: none; }
    .time__track { width: 28vw; } .hud__label { display: none; }
    .row, .row.case, .svc, .groups { grid-template-columns: 1fr !important; gap: 8px; }
    .groups { gap: 30px !important; }
    .svc__case { padding-left: 14px; }
    .tiers, .promises, .doors, .intake { grid-template-columns: 1fr; gap: 28px; }
    .intake { padding: 22px 18px; }
    .row .res { justify-self: start; text-align: left; }
    .foot { grid-template-columns: 1fr 1fr; }
  }
  @media (max-height: 760px) { .copy .long { display: none; } }
  @media (min-width: 821px) and (max-height: 760px) { h2 { font-size: clamp(26px, 2.8vw, 40px); } .copy p { margin-top: 12px; font-size: 15.5px; } .pin { padding-top: 84px; padding-bottom: 64px; } }
  @media (prefers-reduced-motion: reduce) { .beat { transition: none; } }
/* the homepage ends with two exits */
.exits { position: relative; z-index: 3; background: var(--bg); max-width: var(--frame); margin: 0 auto; padding: 120px var(--gutter) 120px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.exit { display: block; padding: 34px 0 28px; border-top: 2px solid var(--ink); text-decoration: none; }
.exit h2 { font-size: clamp(34px, 4.2vw, 60px); }
.exit p { margin: 12px 0 0; max-width: 420px; color: var(--ink-2); font-size: 18px; }
.exit:hover h2, .exit:focus-visible h2 { color: var(--blue-2); }
@media (max-width: 820px) { .exits { grid-template-columns: 1fr; padding: 80px var(--gutter); } }

/* the console: sample dashboard panels that replace the field during "How it works" */
:root { --panel: #f5f8fd; }
.console { --ink: #0a1628; --ink-2: #33415c; --ink-3: #6b7a92; --line: #e3eaf5; --gold: #0b4fb3; --red: #6b7a92; --green: #1470ef; --teal: #1470ef; --blue2: #1470ef;
  position: fixed; z-index: 2; display: flex; flex-direction: column; border: 1px solid #dbe3ef; border-radius: 12px; background: #ffffff; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); opacity: 0; transform: translateY(16px) scale(0.985); transition: opacity 0.5s, transform 0.5s; pointer-events: none; overflow: hidden; }
.console.show { opacity: 1; transform: none; }
.console__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 500 10.5px/1 "JetBrains Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.console__bar .foi { font-size: 8.5px; }
.console__tab { margin-left: auto; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); }
.console__sample { color: #1470ef; }
.console__bar .foi { color: var(--ink); }
.console__body { position: relative; flex: 1; min-height: 0; padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.p-title { margin: 0; font: 700 15px/1.25 Inter; letter-spacing: -0.01em; color: var(--ink); }
.p-sub { margin: -6px 0 0; font-size: 12px; line-height: 1.45; color: var(--ink-3); }
.p-chart { position: relative; height: clamp(170px, 30vh, 300px); flex: none; }
.p-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--ink-3); }
.p-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }
.go .grow-y, .go .grow-x { transform: none !important; }
.grow-y { transform: scaleY(0); transform-origin: bottom; transition: transform 0.9s cubic-bezier(.2,.7,.2,1); }
.grow-x { transform: scaleX(0); transform-origin: left; transition: transform 0.9s cubic-bezier(.2,.7,.2,1); }
.grow-x.from-r { transform-origin: right; }
.draw { clip-path: inset(-10% 100% -10% 0); transition: clip-path 1.6s ease 0.3s; }
.go .draw { clip-path: inset(-10% 0 -10% 0); }
.fade { opacity: 0; transition: opacity 0.6s ease 0.9s; } .go .fade { opacity: 1; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.tile span { display: block; font: 500 9.5px/1.2 "JetBrains Mono", monospace; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.tile b { display: block; margin-top: 6px; font: 800 clamp(16px, 1.6vw, 22px)/1 Inter; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile em { font-style: normal; font-size: 11px; color: #1470ef; }
.tile em.dn { color: var(--ink-3); }

/* bar plot with a line on top */
.bars { position: absolute; inset: 0 0 18px 0; display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--line); }
.bars > i { flex: 1; border-radius: 2px 2px 0 0; background: #1470ef; }
.bars--stack > div { flex: 1; display: flex; flex-direction: column-reverse; }
.bars--stack > div > i { display: block; }
.over { position: absolute; inset: 0 0 18px 0; width: 100%; height: calc(100% - 18px); overflow: visible; }
.axis { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font: 500 9.5px "JetBrains Mono", monospace; color: var(--ink-3); }

/* horizontal rows */
.hrows { display: grid; gap: 9px; }
.hrow { display: grid; grid-template-columns: minmax(96px, 34%) 1fr 54px; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-2); }
.hrow .track { position: relative; height: 12px; border-radius: 3px; background: #eef3fb; display: flex; overflow: hidden; }
.hrow .track i { height: 100%; }
.hrow b { font: 500 11.5px "JetBrains Mono", monospace; text-align: right; color: var(--ink); }
.hrow.total { padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 700; }

/* tornado: label, then bars either side of zero */
.torn { display: grid; gap: 7px; }
.torn__row, .torn__head { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 1fr; align-items: center; gap: 0; }
.torn__row { height: 22px; }
.torn__head { font: 500 9.5px "JetBrains Mono", monospace; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.torn__head span:nth-child(2) { text-align: right; padding-right: 8px; } .torn__head span:nth-child(3) { padding-left: 8px; }
.torn__lab { padding-right: 10px; font-size: 11.5px; line-height: 1.2; color: var(--ink-2); }
.torn__neg, .torn__pos { position: relative; height: 14px; display: flex; align-items: center; }
.torn__neg { justify-content: flex-end; border-right: 1px solid #b9c6da; }
.torn__neg i { height: 100%; background: #a9cbf9; border-radius: 3px 0 0 3px; }
.torn__pos i { height: 100%; background: #1470ef; border-radius: 0 3px 3px 0; }
.torn__val { font: 500 10.5px "JetBrains Mono", monospace; color: var(--ink); padding: 0 6px; white-space: nowrap; }

/* split test result strip */
.result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

@media (max-width: 820px) {
  .console { border-radius: 10px; }
  .console__bar { padding: 9px 12px; font-size: 9.5px; gap: 10px; }
  .console__bar .foi { display: none; }
  .console__body { padding: 12px; gap: 9px; }
  .p-sub { display: none; }
  .tile { padding: 7px 8px; } .tile span { font-size: 8.5px; } .tile b { font-size: 15px; margin-top: 4px; }
  .tile em { display: block; margin-top: 3px; font-size: 10px; line-height: 1.3; } .tile.more { display: none; }
  .hrow { grid-template-columns: minmax(80px, 38%) 1fr 44px; font-size: 11px; gap: 8px; }
  .hrows { gap: 6px; }
  .torn { gap: 4px; } .torn__row { height: auto; min-height: 18px; } .torn__lab { font-size: 10.5px; } .torn__row, .torn__head { grid-template-columns: minmax(92px, 40%) 1fr 1fr; }
  .p-chart { height: auto; flex: 1; min-height: 120px; }
  .p-legend { font-size: 10px; gap: 4px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .console, .grow-y, .grow-x, .draw, .fade { transition: none !important; }
}
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 10px 14px; background: var(--blue); color: #fff; border-radius: 4px; }
.skip:focus { left: 12px; }

/* Book a demo dialog */
.demo { width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; background: #fff; color: #0a1628; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.demo::backdrop { background: rgba(7, 8, 13, 0.6); backdrop-filter: blur(4px); }
.demo__form, .demo__done { position: relative; display: grid; gap: 14px; padding: 28px; }
.demo h2 { margin: 0; font: 800 26px/1.15 Inter; letter-spacing: -0.03em; color: #0a1628; }
.demo__lede, .demo__done p { margin: -4px 0 4px; color: #33415c; font-size: 15px; }
.demo label { display: grid; gap: 6px; font: 600 14px Inter; color: #0a1628; }
.demo input { min-height: 46px; padding: 10px 12px; border: 1px solid #c9d6ea; border-radius: 8px; font: 400 16px Inter; color: #0a1628; background: #fff; }
.demo input:focus-visible { outline: 3px solid rgba(20, 112, 239, 0.35); border-color: #1470ef; }
.demo__trap { position: absolute; left: -9999px; }
.demo__err { min-height: 1em; margin: 0; color: #9b2c1f; font-size: 14px; }
.demo .btn { justify-self: start; }
.demo .btn--ghost { color: #1470ef; box-shadow: inset 0 0 0 1.5px #1470ef; }
.demo__fine { margin: 0; font-size: 12.5px; color: #6b7a92; } .demo__fine a { color: inherit; }
.demo__x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; font-size: 26px; line-height: 1; color: #33415c; cursor: pointer; }
.demo__x:hover { background: #eef3fb; }
.demo [hidden] { display: none !important; }
