/* Maiestro Tech · maiestrotech.com
   Plain CSS, no build step. Colours, type and spacing live in :root. */

:root {
  --paper: #f4f0e7;
  --paper-2: #ebe5d8;
  --card: #fbf8f2;
  --ink: #16140f;
  --ink-2: #3a362e;
  --ink-3: #6b6457;
  --rule: #dcd4c4;
  --rule-2: #c5baa5;

  --accent: #c2410c;
  --accent-text: #a3360c;

  --analyst: #c2410c;
  --builder: #9a6410;
  --tester: #2f5d7c;
  --memory: #57599c;

  --night: #13120f;
  --night-2: #1b1915;
  --night-3: #25221d;
  --night-rule: #34302a;
  --night-ink: #f0eadd;
  --night-ink-2: #bdb5a4;
  --night-ink-3: #8b8373;
  --n-analyst: #f08050;
  --n-builder: #e2b65e;
  --n-tester: #93b8d6;
  --n-memory: #b0b2ec;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
code, kbd, pre { font-family: var(--mono); }

::selection { background: #f1cdb8; color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  text-decoration: none;
}
.skip:focus { left: 8px; }

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

.mono { font-family: var(--mono); }

/* ---------- type ---------- */

h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 400; }

.h1 {
  font: 400 clamp(46px, 7vw, 100px)/.96 var(--serif);
  letter-spacing: -.03em;
  font-optical-sizing: auto;
}
.h1 em { font-style: italic; color: var(--accent-text); letter-spacing: -.02em; }

.h1-sm { font-size: clamp(42px, 5.6vw, 80px); line-height: 1; }

.h2 {
  font: 400 clamp(34px, 4.4vw, 60px)/1.03 var(--serif);
  letter-spacing: -.024em;
  text-wrap: balance;
}
.h2 em { font-style: italic; }

.h3 {
  font: 500 clamp(24px, 2vw, 29px)/1.15 var(--serif);
  letter-spacing: -.012em;
}

.h4 { font: 600 17px/1.35 var(--sans); color: var(--ink); }

.lede {
  max-width: 34em;
  font-size: clamp(18px, 1.45vw, 20.5px);
  line-height: 1.55;
}

.small { font-size: 14.5px; line-height: 1.55; color: var(--ink-3); }

.label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label b { font-weight: 500; color: var(--accent-text); }

.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-2);
  text-underline-offset: 4px;
  transition: text-decoration-color .2s;
}
.link:hover { text-decoration-color: var(--accent); }

/* wordmark: the dot on the i is the brand colour */
.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.wordmark .i { position: relative; display: inline-block; line-height: 1; }
.wordmark .i::after {
  content: "";
  position: absolute;
  left: calc(50% + .01em);
  top: .1em;
  width: .15em;
  height: .15em;
  margin-left: -.075em;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 16px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn .arr { display: inline-block; transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }

.btn-line { border-color: var(--rule-2); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink); }

.btn-paper { background: var(--night-ink); color: var(--night); }
.btn-paper:hover { background: #fff; }

.btn-sm { height: 40px; padding: 0 18px; font-size: 15px; }

.play-ico {
  width: 0; height: 0;
  border-style: solid;
  border-width: 5.5px 0 5.5px 9px;
  border-color: transparent transparent transparent currentColor;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 240, 231, .9);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.site-head.is-stuck { border-bottom-color: var(--rule); }

.head-row {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}
.brand .wordmark { font-size: 28px; line-height: 1; }
.brand-sub {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a {
  position: relative;
  color: var(--ink-2);
  font-size: 15px;
  text-decoration: none;
  transition: color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 1px;
  background: var(--accent);
}

.menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background: transparent;
  font-size: 15px;
  cursor: pointer;
}
.menu-btn .bars { position: relative; width: 16px; height: 9px; }
.menu-btn .bars::before, .menu-btn .bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.menu-btn .bars::before { top: 0; }
.menu-btn .bars::after { top: 7.5px; }
.menu-btn[aria-expanded="true"] .bars::before { top: 3.75px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { top: 3.75px; transform: rotate(-45deg); }

.mnav {
  max-height: calc(100vh - 72px);
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
  border-top: 1px solid var(--rule);
  background: var(--paper);
}
.mnav .wrap { padding-top: 8px; padding-bottom: 24px; }
.mnav a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font: 400 26px/1.2 var(--serif);
  text-decoration: none;
}
.mnav .btn { margin-top: 20px; width: 100%; font: 500 16px/1 var(--sans); border-bottom: 0; padding: 0 24px; display: flex; color: var(--paper); }

@media (max-width: 980px) {
  .nav, .head-cta { display: none; }
  .menu-btn { display: inline-flex; }
}

/* ---------- sections ---------- */

.section {
  padding: clamp(72px, 10vw, 136px) 0;
  border-top: 1px solid var(--rule);
}

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

.sec-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 20px;
  margin-bottom: clamp(40px, 6vw, 76px);
}
.sec-head .label { grid-column: 1 / 4; padding-top: .95em; }
.sec-head .h2 { grid-column: 4 / 13; max-width: 15.5em; }
.sec-head .lede { grid-column: 4 / 11; }

@media (max-width: 900px) {
  .sec-head .label, .sec-head .h2, .sec-head .lede { grid-column: 1 / -1; }
  .sec-head .label { padding-top: 0; }
}

/* night sections */
.section-night {
  background: var(--night);
  color: var(--night-ink-2);
  border-top: 0;
}
.section-night .h2, .section-night .h3, .section-night .h4 { color: var(--night-ink); }
.section-night .label { color: var(--night-ink-3); }
.section-night .label b { color: var(--n-analyst); }
.section-night ::selection { background: #5a3a2a; color: #fff; }

/* ---------- reveal ---------- */

.js .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js .rv.is-in { opacity: 1; transform: none; }

/* ---------- hero ---------- */

.hero { padding: clamp(44px, 7vw, 96px) 0 clamp(64px, 8vw, 112px); }
.hero .label { margin-bottom: clamp(22px, 3vw, 34px); }
.hero-title { max-width: 12.6em; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
  margin-top: clamp(36px, 5vw, 68px);
}
.hero-copy { padding-top: 6px; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.spec-list { margin-top: 40px; border-top: 1px solid var(--rule); }
.spec-list > div {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
.spec-list dt { font: 500 12px/1.9 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.spec-list dd { color: var(--ink); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .hero-ctas .btn { width: 100%; }
  .spec-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- score (hero visual) ---------- */

.score {
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: 0 1px 0 rgba(22, 20, 15, .03), 0 30px 60px -40px rgba(22, 20, 15, .25);
}

.score-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  font: 500 12px/1.3 var(--mono);
  color: var(--ink-3);
}
.score-top .live { display: inline-flex; flex: none; align-items: center; gap: 8px; }
.score-top .live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.6s steps(2, jump-none) infinite;
}

.score-lanes {
  --lane-w: 82px;
  position: relative;
  padding: 34px 18px 12px;
}

.score-marks {
  position: absolute;
  top: 0; bottom: 0;
  left: calc(18px + var(--lane-w));
  right: 18px;
  pointer-events: none;
}
.score-mark {
  position: absolute;
  top: 0; bottom: 6px;
  left: calc(var(--x) * 100%);
  padding: 11px 0 0 6px;
  border-left: 1px dashed var(--rule-2);
  font: 500 10.5px/1 var(--mono);
  color: var(--ink-3);
  white-space: nowrap;
}
.score-mark.is-end {
  border-left: 0;
  border-right: 1px dashed var(--rule-2);
  padding: 11px 6px 0 0;
  transform: translateX(-100%);
}

.playhead {
  position: absolute;
  top: 26px; bottom: 6px;
  left: calc(var(--p, 0) * 100%);
  width: 1.5px;
  margin-left: -.75px;
  background: var(--accent);
}
.playhead::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -4px;
  border-style: solid;
  border-width: 6px 4.75px 0;
  border-color: var(--accent) transparent transparent;
}

.lane {
  display: grid;
  grid-template-columns: var(--lane-w) minmax(0, 1fr);
  align-items: center;
  height: 54px;
}
.lane[data-role="analyst"] { --role: var(--analyst); }
.lane[data-role="builder"] { --role: var(--builder); }
.lane[data-role="tester"] { --role: var(--tester); }
.lane[data-role="memory"] { --role: var(--memory); }

.lane-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lane-name::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--role);
}

.lane-track {
  position: relative;
  height: 41px;
  background: repeating-linear-gradient(to bottom, var(--rule) 0 1px, transparent 1px 10px);
}

.note {
  position: absolute;
  top: 50%;
  left: calc(var(--x) * 100%);
  width: calc(var(--w) * 100%);
  height: 23px;
  display: flex;
  align-items: center;
  padding: 0 2px;
  overflow: hidden;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-3);
  font: 500 10px/1 var(--mono);
  white-space: nowrap;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  transition: background-color .3s, border-color .3s, color .3s;
}
.note.is-on { background: var(--role); border-color: var(--role); color: #fff; }
.note.is-done { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.score-now {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 12px 18px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink-2);
}
.score-now .who {
  flex: none;
  font: 500 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

@container (max-width: 620px) {
  .score-lanes { --lane-w: 70px; padding-left: 14px; padding-right: 14px; }
  .score-marks { left: calc(14px + var(--lane-w)); right: 14px; }
  .note { height: 11px; padding: 0; font-size: 0; }
  .score-mark { font-size: 9.5px; }
  .lane { height: 40px; }
  .lane-track { height: 31px; background-size: auto; }
  .lane-name { font-size: 10px; letter-spacing: .05em; }
  .score-now { min-height: calc(2 * 1.4em + 25px); }
}
@container (max-width: 400px) {
  .score-mark:not(.is-first):not(.is-end) { color: transparent; }
  .score-now { min-height: calc(3 * 1.4em + 25px); }
}

@keyframes blink { 50% { opacity: .2; } }

/* ---------- engine strip ---------- */

.strip { border-top: 1px solid var(--rule); }
.strip-row {
  display: flex;
  align-items: center;
  gap: 18px 40px;
  flex-wrap: wrap;
  padding-top: 26px;
  padding-bottom: 26px;
}
.strip-label { font: 500 12px/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.strip-list { display: flex; flex-wrap: wrap; gap: 10px 0; }
.strip-list li {
  padding: 0 22px;
  border-left: 1px solid var(--rule-2);
  color: var(--ink);
  font: 400 22px/1.2 var(--serif);
  letter-spacing: -.01em;
}
.strip-list li:first-child { padding-left: 0; border-left: 0; }
.strip-list li span { font: 400 13px/1 var(--sans); color: var(--ink-3); margin-left: 4px; }

@media (max-width: 640px) {
  .strip-list { flex-direction: column; gap: 6px; }
  .strip-list li { padding: 0; border-left: 0; font-size: 20px; }
}

/* ---------- film (walkthrough player) ---------- */

.film {
  overflow: hidden;
  border: 1px solid var(--night-rule);
  border-radius: 10px;
  background: var(--night-2);
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .8);
}

.film-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  height: clamp(470px, 44vw, 560px);
}

.film-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.film-pane + .film-pane { border-left: 1px solid var(--night-rule); }

.pane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--night-rule);
  font: 500 11.5px/1.2 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--night-ink-3);
}

.pane-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 56px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 56px);
}

.msg {
  flex: none;
  max-width: 92%;
  color: var(--night-ink);
  font-size: 14.5px;
  line-height: 1.5;
}
.msg.enter { animation: rise .45s var(--ease) both; }
.msg-who {
  display: block;
  margin-bottom: 6px;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--night-ink-3);
}
.msg-user {
  align-self: flex-end;
  padding: 11px 14px;
  border: 1px solid var(--night-rule);
  border-radius: 14px 14px 3px 14px;
  background: var(--night-3);
}
.msg-user .caret {
  display: inline-block;
  width: 1.5px; height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--n-analyst);
  animation: blink 1s steps(2, jump-none) infinite;
}
.msg-user .msg-who { color: var(--night-ink-2); }
.msg-agent { align-self: flex-start; padding-left: 14px; border-left: 2px solid var(--who, var(--night-ink-3)); }
.msg-agent .msg-who { color: var(--who); }
.msg-system {
  align-self: center;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px dashed var(--night-rule);
  border-radius: 999px;
  color: var(--night-ink-2);
  font: 500 11.5px/1.3 var(--mono);
  text-align: center;
}

[data-who="analyst"] { --who: var(--n-analyst); }
[data-who="builder"] { --who: var(--n-builder); }
[data-who="tester"] { --who: var(--n-tester); }
[data-who="memory"] { --who: var(--n-memory); }
[data-who="system"] { --who: var(--night-ink-3); }

.mini-doc.product-ui {
  --ui-bg: var(--night-2);
  --ui-ink: var(--night-ink);
  --ui-text: var(--night-ink-2);
  --ui-muted: var(--night-ink-3);
  --ui-rule: var(--night-rule);
  margin-top: 16px;
  border: 1px solid var(--ui-rule);
  border-radius: var(--r);
  overflow: hidden;
}
.mini-doc li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ui-rule);
  color: var(--ui-ink);
  font: 400 15px/1.5 var(--sans);
}
.mini-doc li:last-child { border-bottom: 0; }
.mini-doc li b { padding-top: 3px; font: 400 12px/1.5 var(--mono); color: var(--ui-muted); }
.mini-doc li.q span { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.msg:has(.mini-doc) { max-width: 100%; }

.release-card { display: grid; gap: 10px; }
.release-card .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--night-rule);
  border-radius: 999px;
  color: var(--night-ink);
  font: 500 12px/1 var(--sans);
  white-space: nowrap;
}
.chip-solid { background: var(--night-ink); border-color: var(--night-ink); color: var(--night); }
.ok-badge { color: var(--n-tester); font-family: var(--mono); font-size: 12px; }

.toast {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #3c3a52;
  border-radius: 8px;
  background: #1f1e2b;
  color: var(--night-ink);
  font-size: 13px;
}
.toast::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--n-memory); }
.toast .undo { margin-left: auto; color: var(--n-memory); font: 500 12px/1 var(--mono); text-decoration: underline; text-underline-offset: 3px; }

/* activity log */
.log { gap: 0; font: 400 12.5px/1.45 var(--mono); }
.log li {
  flex: none;
  display: grid;
  grid-template-columns: 38px 62px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--night-rule);
}
.log li.enter { animation: rise .35s var(--ease) both; }
.log .t { color: var(--night-ink-3); }
.log .who { color: var(--who); }
.log .call { min-width: 0; color: var(--night-ink); overflow-wrap: anywhere; }
.log .call i { font-style: normal; color: var(--night-ink-3); }
.log .res { color: var(--night-ink-2); text-align: right; white-space: nowrap; }
.log li.is-running .res { color: var(--night-ink-3); }
.log li.is-running .res::after { content: ""; animation: dots 1.2s steps(4, jump-none) infinite; }
.log li.is-pass .res { color: var(--n-tester); }

@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.film-end {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: rgba(19, 18, 15, .84);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  color: var(--night-ink);
  text-align: center;
}
.film-end[hidden] { display: none; }
.film-end p { font: 400 clamp(26px, 3vw, 36px)/1.1 var(--serif); }

.film-caption {
  display: grid;
  align-content: center;
  min-height: 60px;
  padding: 16px 20px;
  border-top: 1px solid var(--night-rule);
  color: var(--night-ink);
  font: 400 clamp(16px, 1.4vw, 18px)/1.45 var(--serif);
  text-align: center;
  text-wrap: balance;
}
.film-caption.swap { animation: fadein .5s ease both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.film-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--night-rule);
}
.film-play {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--night-ink);
  color: var(--night);
  cursor: pointer;
  transition: background-color .2s;
}
.film-play:hover { background: #fff; }
.film-play .play-ico { margin-left: 3px; }
.film-play .pause-ico { display: none; width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.film.is-playing .film-play .play-ico { display: none; }
.film.is-playing .film-play .pause-ico { display: block; }

.film-track { position: relative; flex: 1; height: 30px; cursor: pointer; touch-action: none; }
.film-track::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--night-rule);
}
.film-fill {
  position: absolute;
  left: 0; top: 50%;
  width: calc(var(--p, 0) * 100%);
  height: 2px;
  margin-top: -1px;
  background: var(--n-analyst);
}
.film-fill::after {
  content: "";
  position: absolute;
  right: -6px; top: -5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--night-ink);
}
.film-tick {
  position: absolute;
  top: 50%;
  left: calc(var(--x) * 100%);
  width: 1px; height: 10px;
  margin-top: -5px;
  background: var(--night-ink-3);
}
.film-time { flex: none; min-width: 84px; color: var(--night-ink-3); font: 500 12px/1 var(--mono); text-align: right; }

.film-chapters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--night-rule);
}
.film-chapters li + li { border-left: 1px solid var(--night-rule); }
.film-chapters button {
  display: block;
  width: 100%;
  padding: 14px 16px 16px;
  border: 0;
  background: transparent;
  color: var(--night-ink-3);
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.film-chapters button span { display: block; margin-bottom: 4px; font: 500 11px/1 var(--mono); letter-spacing: .06em; }
.film-chapters button:hover { color: var(--night-ink); }
.film-chapters button.is-current { color: var(--night-ink); background: var(--night-3); }
.film-chapters button.is-current span { color: var(--n-analyst); }
.film-chapters button:focus-visible { outline-color: var(--night-ink); outline-offset: -4px; }

@media (max-width: 820px) {
  /* Keep the full spec message below the fade used for older messages. */
  .film-screen { grid-template-columns: minmax(0, 1fr); grid-template-rows: 380px 260px; height: auto; }
  .film-pane + .film-pane { border-left: 0; border-top: 1px solid var(--night-rule); }
  .log li { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "t who res" "call call call"; row-gap: 2px; }
  .log .t { grid-area: t; }
  .log .who { grid-area: who; }
  .log .res { grid-area: res; }
  .log .call { grid-area: call; }
  .film-chapters button { padding: 12px 8px 14px; font-size: 12.5px; }
  .film-caption { min-height: calc(2 * 1.45em + 33px); }
}
@media (max-width: 640px) {
  .film-screen { grid-template-rows: 480px 260px; }
}
@media (max-width: 480px) {
  .film-bar { gap: 12px; padding: 10px 12px; }
  .film-time { min-width: 0; font-size: 11px; }
  .film-chapters button { padding: 10px 6px 12px; font-size: 11.5px; text-align: center; }
  .pane-body { padding: 14px; }
  .film-caption { min-height: calc(3 * 1.45em + 33px); }
}

/* ---------- agents ---------- */

.agents {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.agent {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 28px 30px;
  border-right: 1px solid var(--rule);
}
.agent:first-child { padding-left: 0; }
.agent:last-child { border-right: 0; padding-right: 0; }
.agent[data-role="analyst"] { --role: var(--analyst); }
.agent[data-role="builder"] { --role: var(--builder); }
.agent[data-role="tester"] { --role: var(--tester); }

.agent-tag { display: flex; align-items: center; gap: 8px; font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.agent-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--role); }
.agent .h3 { font-size: clamp(30px, 2.6vw, 38px); }
.agent-job { min-height: 2.9em; color: var(--ink); font-size: 17.5px; line-height: 1.45; }
@media (max-width: 980px) { .agent-job { min-height: 0; } }

.agent-dl { margin-top: 6px; border-top: 1px solid var(--rule); }
.agent-dl > div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.agent-dl dt { margin-bottom: 3px; font: 500 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.agent-dl dd { font-size: 15.5px; line-height: 1.5; }

.agent-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.agent-tools code, .tag {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.3;
}

.night-shift {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.night-shift .label { grid-column: 1 / 4; }
.night-shift-grid { grid-column: 4 / 13; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.night-shift-grid p { margin-top: 6px; font-size: 15.5px; }

@media (max-width: 980px) {
  .agents { grid-template-columns: minmax(0, 1fr); }
  .agent { padding: 28px 0 32px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .agent:last-child { border-bottom: 0; }
  .night-shift .label, .night-shift-grid { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .night-shift-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- knowledge ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.split-rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 980px) {
  .split, .split-rev { grid-template-columns: minmax(0, 1fr); }
}

.pipeline { counter-reset: step; border-top: 1px solid var(--ink); }
.pipeline li {
  position: relative;
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr);
  gap: 4px 12px;
  padding: 18px 0 18px;
  border-bottom: 1px solid var(--rule-2);
  transition: color .4s;
}
.pipeline li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  padding-top: 3px;
  font: 500 12px/1.5 var(--mono);
  color: var(--ink-3);
  transition: color .4s;
}
.pipeline li::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 0; height: 1px;
  background: var(--accent);
}
.pipeline .h4 { font-size: 18px; }
.pipeline p { font-size: 15.5px; color: var(--ink-2); }
.pipeline li.is-active::before { color: var(--accent-text); }
.pipeline li.is-active::after { width: 100%; transition: width 2.4s linear; }

.mocks { display: grid; gap: 20px; }

/* Shared paper and ink for the product examples. */
.product-ui {
  --ui-bg: var(--card);
  --ui-ink: var(--ink);
  --ui-text: var(--ink-2);
  --ui-muted: var(--ink-3);
  --ui-rule: var(--rule);
  min-width: 0;
  background: var(--ui-bg);
  color: var(--ui-text);
  font: 400 15px/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
}
.product-ui code { font-family: var(--mono); font-weight: 400; }
.mock, .mem, .assign, .diff {
  overflow: hidden;
  border: 1px solid var(--rule-2);
  border-radius: var(--r);
  background: transparent;
}
.mock-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 16px;
  border-bottom: 1px solid var(--ui-rule);
}
.mock-head b { min-width: 0; color: var(--ui-ink); font: 400 14px/1.5 var(--sans); }
.mock-head > span { color: var(--ui-muted); font: 400 12px/1.5 var(--mono); }
.mock-foot {
  padding: 14px 16px;
  border-top: 1px solid var(--ui-rule);
  color: var(--ui-muted);
  font: 400 12px/1.6 var(--sans);
  overflow-wrap: anywhere;
}
.mock-foot code { font-size: 11px; }
.search-query { padding: 20px 16px; color: var(--ink); font: italic 400 21px/1.35 var(--serif); }
.results li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 16px;
  border-top: 1px solid var(--rule);
}
.result-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; color: var(--ink); font-size: 15px; }
.result-title > span { color: var(--ink-3); font: 400 12px/1.5 var(--mono); }
.result-content p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.result-content mark { background: transparent; color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.result-score { color: var(--ink-3); font: 400 12px/1.5 var(--mono); text-align: right; }
.table-summary { padding: 16px; color: var(--ink-3); font: 400 12px/1.6 var(--mono); }
.column-table { width: 100%; border-collapse: collapse; text-align: left; }
.column-table th, .column-table td { padding: 14px 8px; border-top: 1px solid var(--rule); vertical-align: baseline; }
.column-table th:first-child { padding-left: 16px; }
.column-table td:last-child, .column-table th:last-child { padding-right: 16px; text-align: right; }
.column-table thead th { color: var(--ink-3); font: 400 11px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.column-table tbody th { color: var(--ink); font: 400 15px/1.5 var(--mono); }
.column-table td { color: var(--ink-3); font: 400 12px/1.5 var(--mono); }

/* ---------- memory ---------- */

.mem-tabs { display: flex; flex-wrap: wrap; gap: 0 16px; padding: 0 16px; border-bottom: 1px solid var(--rule); font-size: 12px; }
.mem-tabs span { padding: 14px 0 13px; border-bottom: 1px solid transparent; color: var(--ink-3); }
.mem-tabs span.on { color: var(--ink); border-bottom-color: var(--accent); }
.mem-list li { display: grid; gap: 6px; padding: 16px; border-bottom: 1px solid var(--rule); }
.mem-list li:last-child { border-bottom: 0; }
.mem-type { color: var(--ink-3); font: 400 11px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.mem-text { color: var(--ink); font-size: 15px; line-height: 1.5; }
.mem-text small { display: block; margin-top: 6px; color: var(--ink-3); font: 400 12px/1.5 var(--mono); }
.mem-list li.old .mem-text { color: var(--ink-3); }
.mem-toast {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 16px 16px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  border-radius: var(--r);
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
}
.mem-undo { margin-left: auto; color: var(--ink); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

.rules { border-top: 1px solid var(--ink); counter-reset: rule; }
.rules li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 4px 10px; padding: 18px 0; border-bottom: 1px solid var(--rule-2); }
.rules li::before { counter-increment: rule; content: counter(rule); grid-row: span 2; font: 400 26px/1 var(--serif); color: var(--accent-text); }
.rules p { font-size: 15.5px; }

/* ---------- engines ---------- */

.engines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.engine { padding: 26px 26px 28px; border-right: 1px solid var(--rule); }
.engine:first-child { padding-left: 0; }
.engine:last-child { padding-right: 0; border-right: 0; }
.engine-name { color: var(--ink); font: 400 clamp(28px, 2.6vw, 36px)/1.1 var(--serif); letter-spacing: -.015em; }
.engine-by { margin-top: 6px; font: 500 11.5px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.engine dl { margin-top: 22px; }
.engine dl > div { padding: 10px 0; border-top: 1px dashed var(--rule); }
.engine dt { font: 500 11px/1.6 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.engine dd { font-size: 15.5px; line-height: 1.5; }

@media (max-width: 900px) {
  .engines { grid-template-columns: minmax(0, 1fr); }
  .engine, .engine:first-child, .engine:last-child { padding: 24px 0 26px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .engine:last-child { border-bottom: 0; }
}

.engine-controls { margin-top: clamp(40px, 5vw, 64px); }
.engine-layers { display: grid; gap: 36px; padding: 24px 16px; text-align: center; }
.engine-layers li { position: relative; }
.engine-layers li + li::before { content: ""; position: absolute; top: -27px; left: 50%; width: 1px; height: 18px; background: var(--rule); }
.engine-layers h3 { margin-bottom: 8px; color: var(--ink-3); font: 400 11px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.engine-layers p { max-width: 34ch; margin: 0 auto; color: var(--ink); font-size: 15px; }
.engine-roles { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 8px; }
.engine-roles span { display: inline-flex; align-items: center; gap: 6px; }
.engine-roles span::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--role); }
.engine-roles [data-role="analyst"] { --role: var(--analyst); }
.engine-roles [data-role="builder"] { --role: var(--builder); }
.engine-roles [data-role="tester"] { --role: var(--tester); }
.engine-effort { padding: 16px; border-top: 1px solid var(--rule); color: var(--ink-3); font: 400 12px/1.8 var(--mono); text-align: center; }
.engine-effort span { display: inline-block; }
.engine-effort u { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 5px; }

.points li { padding: 16px 0; border-bottom: 1px solid var(--rule-2); }
.points li:first-child { border-top: 1px solid var(--ink); }
.points p { margin-top: 4px; font-size: 15.5px; }

/* ---------- release ---------- */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  --line: 0;
}
.steps::before, .steps::after {
  content: "";
  position: absolute;
  top: 17px; left: 18px;
  width: calc(80% + 19.2px);
  height: 1px;
  background: var(--night-rule);
}
.steps::after { width: calc((80% + 19.2px) * var(--line)); background: var(--n-analyst); transition: width 2.6s var(--ease); }
.steps.is-in { --line: 1; }
.steps li { position: relative; z-index: 1; }
.step-n {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--night-rule);
  border-radius: 50%;
  background: var(--night);
  color: var(--night-ink-3);
  font: 500 12px/1 var(--mono);
  transition: border-color .4s, color .4s, background-color .4s;
}
.steps.is-in .step-n { border-color: var(--n-analyst); color: var(--night-ink); }
.steps li:nth-child(2) .step-n { transition-delay: .5s; }
.steps li:nth-child(3) .step-n { transition-delay: 1s; }
.steps li:nth-child(4) .step-n { transition-delay: 1.5s; }
.steps li:nth-child(5) .step-n { transition-delay: 2s; }
.steps .h4 { margin-top: 18px; }
.steps p { margin-top: 6px; font-size: 15px; }

.statement {
  max-width: 19em;
  margin-top: clamp(56px, 8vw, 104px);
  padding-top: 28px;
  border-top: 1px solid var(--night-rule);
  color: var(--night-ink);
  font: 400 clamp(28px, 3.4vw, 46px)/1.12 var(--serif);
  letter-spacing: -.02em;
}
.statement em { color: var(--n-analyst); }

@media (max-width: 900px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps::before, .steps::after { top: 18px; bottom: 18px; left: 17.5px; width: 1px; height: auto; }
  .steps::after { height: calc((100% - 36px) * var(--line)); bottom: auto; transition: height 2.6s var(--ease); }
  .steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 18px; padding-bottom: 26px; }
  .steps li:last-child { padding-bottom: 0; }
  .step-n { grid-row: span 2; }
  .steps .h4 { margin-top: 7px; }
}

/* ---------- workflow ---------- */
.doc-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; padding: 16px; color: var(--ui-muted); font: 400 12px/1.6 var(--mono); }
.doc-state, .doc-section { color: var(--ui-muted); font: 400 11px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.doc-section { padding: 14px 16px; border-top: 1px solid var(--ui-rule); border-bottom: 1px solid var(--ui-rule); }
.diff-lines li { display: grid; grid-template-columns: 12px 24px minmax(0, 1fr); gap: 8px; padding: 16px; border-bottom: 1px solid var(--rule); color: var(--ink); font: 400 15px/1.5 var(--sans); }
.diff-lines li:last-child { border-bottom: 0; }
.diff-lines li::before { content: ""; color: var(--ink); font: 400 12px/1.9 var(--mono); }
.diff-lines b { padding-top: 3px; color: var(--ink-3); font: 400 12px/1.5 var(--mono); }
.diff-lines li.add { background: var(--paper-2); }
.diff-lines li.add::before { content: "+"; }
.diff-lines li.del { color: var(--ink-3); }
.diff-lines li.del::before { content: "−"; color: var(--ink-3); }
.diff-lines ins { text-decoration: none; }
.diff-lines del { text-decoration-thickness: 1px; }

/* ---------- facts ---------- */

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.facts > div { padding: 24px 24px 6px; border-right: 1px solid var(--rule); }
.facts > div:first-child { padding-left: 0; }
.facts > div:last-child { border-right: 0; }
.fact-n { color: var(--ink); font: 400 clamp(54px, 6vw, 84px)/1 var(--serif); letter-spacing: -.03em; }
.fact-n span { margin-left: 4px; font-size: .36em; letter-spacing: 0; color: var(--ink-3); }
.facts p + p { margin-top: 10px; max-width: 15em; font-size: 15px; }

@media (max-width: 900px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(2) { border-right: 0; }
  .facts > div:nth-child(3) { padding-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 420px) {
  .facts > div { padding-left: 0; padding-right: 12px; }
  .facts > div:nth-child(even) { padding-left: 14px; }
}

/* ---------- faq ---------- */

.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule-2); }
.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  color: var(--ink);
  font: 400 clamp(20px, 1.8vw, 24px)/1.3 var(--serif);
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font: 300 26px/1 var(--sans);
  color: var(--ink-3);
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { max-width: 40em; padding: 0 0 22px; font-size: 16.5px; }

/* ---------- cta ---------- */

.cta { padding: clamp(80px, 11vw, 150px) 0; background: var(--night); color: var(--night-ink-2); }
.cta .h2 { max-width: 13em; color: var(--night-ink); font-size: clamp(38px, 5.4vw, 76px); line-height: 1; }
.cta .lede { margin-top: 24px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 36px; }
.cta-row a:not(.btn) { color: var(--night-ink); font-family: var(--mono); font-size: 14px; text-underline-offset: 4px; text-decoration-color: var(--night-ink-3); }

/* ---------- footer ---------- */

.site-foot { padding: clamp(56px, 7vw, 88px) 0 28px; background: var(--paper-2); border-top: 1px solid var(--rule); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 4fr) repeat(4, minmax(0, 2fr)); gap: 32px; }
.foot-about p { max-width: 22em; color: var(--ink-2); }
.foot-about a { display: inline-block; margin-top: 14px; color: var(--ink); font-family: var(--mono); font-size: 14px; }
.foot-grid nav { display: flex; flex-direction: column; gap: 8px; }
.foot-h { margin-bottom: 6px; font: 500 11.5px/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.foot-grid nav a { color: var(--ink-2); text-decoration: none; }
.foot-grid nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.foot-word {
  margin-top: clamp(36px, 5vw, 64px);
  color: var(--ink);
  font-size: clamp(48px, 9vw, 120px);
  line-height: .9;
  letter-spacing: -.03em;
  user-select: none;
}
.foot-word .i::after { left: calc(50% + .0225em); width: .12em; height: .12em; margin-left: -.06em; }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-2);
  font: 400 12.5px/1.4 var(--mono);
  color: var(--ink-3);
}

@media (max-width: 860px) {
  .foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .foot-about { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- inner pages ---------- */

.page-hero { padding: clamp(48px, 7vw, 100px) 0 clamp(56px, 7vw, 96px); }
.page-hero .label { margin-bottom: 26px; }
.page-hero .lede { margin-top: 28px; }

/* architecture stack */
.stack { position: relative; border-top: 1px solid var(--ink); }
.stack::before {
  content: "";
  position: absolute;
  left: 5px; top: 0; bottom: 0;
  width: 1px;
  background: var(--rule-2);
}
.stack::after {
  content: "";
  position: absolute;
  left: 2px; top: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: travel 6s var(--ease) infinite;
}
@keyframes travel {
  0% { top: 0; opacity: 0; }
  8% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: calc(100% - 7px); opacity: 0; }
}
.layer {
  display: grid;
  grid-template-columns: 13em minmax(0, 1fr);
  gap: 10px 24px;
  align-items: baseline;
  padding: 20px 0 20px 30px;
  border-bottom: 1px solid var(--rule-2);
}
.layer-name { color: var(--ink); font: 400 24px/1.2 var(--serif); }
.layer-name small { display: block; margin-top: 4px; font: 400 13.5px/1.45 var(--sans); color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 12px; border: 1px solid var(--rule-2); border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 14px; }
.chips li.mono { font-size: 13px; }
.chips li.ro { border-style: dashed; color: var(--accent-text); }

@media (max-width: 760px) {
  .layer { grid-template-columns: minmax(0, 1fr); padding-left: 26px; }
}

/* code blocks */
.code {
  overflow: hidden;
  border: 1px solid var(--night-rule);
  border-radius: var(--r);
  background: var(--night);
  color: var(--night-ink);
}
.code-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--night-rule);
  font: 500 11.5px/1.3 var(--mono);
  color: var(--night-ink-3);
}
.code pre {
  margin: 0;
  padding: 16px 18px 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.65;
  tab-size: 2;
}
.code .c { color: var(--night-ink-3); }
.code .k { color: var(--n-builder); }
.code .s { color: var(--n-tester); }
.code .h { color: var(--n-analyst); }
.code .m { color: var(--n-memory); }

.stacked { display: grid; gap: 20px; }

/* tool catalogue */
.tools-table { border-top: 1px solid var(--ink); }
.tool-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 170px 170px;
  gap: 12px 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-2);
}
.tool-row.head { padding: 12px 0; font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.tool-row .srv { color: var(--ink); font: 500 15px/1.4 var(--mono); }
.tool-row .names { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-row .names code { padding: 3px 7px; border: 1px solid var(--rule); border-radius: 4px; background: transparent; font-size: 12px; }
.tool-row .who, .tool-row .acc { font-size: 14px; }
.tool-row .acc { color: var(--ink); }
.tool-row .acc::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--tester); vertical-align: 1px; }
.tool-row .acc.lim::before { background: var(--builder); }
.tool-row .note-line { grid-column: 2 / -1; color: var(--ink-3); font-size: 14px; }

@media (max-width: 900px) {
  .tool-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tool-row.head { display: none; }
  .tool-row .names, .tool-row .note-line { grid-column: 1 / -1; }
  .tool-row .who { grid-column: 1; color: var(--ink-3); }
  .tool-row .acc { grid-column: 2; grid-row: 1; }
}

/* lifecycle (memory, platform page) */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.flow li { padding: 18px 18px 6px 0; }
.flow li + li { padding-left: 18px; border-left: 1px solid var(--rule); }
.flow .mono { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-text); }
.flow p { margin-top: 6px; font-size: 15px; }
@media (max-width: 900px) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow li, .flow li + li { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
}

.metric-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 28px; border-top: 1px solid var(--rule-2); }
.metric-row > div { padding: 16px 16px 0 0; }
.metric-row > div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.metric-row b { display: block; color: var(--ink); font: 400 40px/1 var(--serif); letter-spacing: -.02em; }
.metric-row b s { color: var(--ink-3); font-size: .55em; text-decoration-thickness: 1px; margin-right: 6px; }
.metric-row span { display: block; margin-top: 8px; font-size: 14px; color: var(--ink-3); }

/* security controls */
.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; border-top: 1px solid var(--ink); counter-reset: ctl; }
.controls li { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 4px 8px; padding: 26px 0; border-bottom: 1px solid var(--rule-2); }
.controls li::before { counter-increment: ctl; content: counter(ctl, decimal-leading-zero); grid-row: span 2; padding-top: 6px; font: 500 12px/1.4 var(--mono); color: var(--accent-text); }
.controls .h3 { font-size: clamp(22px, 1.9vw, 27px); }
.controls p { margin-top: 6px; font-size: 16px; }
@media (max-width: 860px) { .controls { grid-template-columns: minmax(0, 1fr); } }

.never { padding: clamp(28px, 4vw, 44px); border: 1px solid var(--night-rule); border-radius: var(--r); background: var(--night-2); }
.never .h3 { color: var(--night-ink); }
.never ul { margin-top: 18px; }
.never li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--night-rule); color: var(--night-ink); font-size: 17px; }
.never li::before { content: "×"; flex: none; color: var(--n-analyst); font: 400 22px/1 var(--sans); }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.expect { margin-top: 40px; border-top: 1px solid var(--ink); counter-reset: ex; }
.expect li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--rule-2); font-size: 16px; }
.expect li::before { counter-increment: ex; content: counter(ex); font: 400 22px/1.1 var(--serif); color: var(--accent-text); }

.form { padding: clamp(22px, 3vw, 36px); border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); box-shadow: 0 30px 60px -44px rgba(22, 20, 15, .35); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 14px; font-weight: 500; }
.field label small { color: var(--ink-3); font-weight: 400; }
.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.4 var(--sans);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(194, 65, 12, .15); }
textarea.input { height: auto; min-height: 132px; padding: 12px 14px; resize: vertical; }
select.input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b6457' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}
.form .btn { width: 100%; margin-top: 22px; }
.form-note { margin-top: 14px; font-size: 13px; color: var(--ink-3); text-align: center; }
.form-done { text-align: left; }
.form-done[hidden] { display: none; }
.form-done .h3 { margin-top: 6px; }
.form-done p { margin-top: 10px; }

/* 404 */
.lost { min-height: 62vh; display: grid; align-content: center; padding-top: 80px; padding-bottom: 80px; }
.lost .lede { margin-top: 24px; }
.lost .btn { margin-top: 32px; justify-self: start; }

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .js .rv { opacity: 1; transform: none; }
  .mem-toast { animation: none; }
  .stack::after { display: none; }
}

/* ---------- use cases, integrations and pilot ---------- */
.use-cases-note { max-width: 46em; margin-top: 20px; }
.use-case-card { display: flex; flex-direction: column; min-width: 0; }
.use-case-request { margin: 20px 0 24px; color: var(--ink-2); font: 400 20px/1.4 var(--serif); }
.use-case-caption { color: var(--ink-3); font: 500 11px/1.6 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.use-case-card .use-case-roles { margin-top: 10px; margin-bottom: 24px; }
.use-case-card .use-case-roles > div { padding: 12px 0; border-top-style: solid; }
.use-case-card .use-case-role { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; color: var(--ink); }
.use-case-role::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.use-case-role-analyst::before { background: var(--analyst); }
.use-case-role-builder::before { background: var(--builder); }
.use-case-result { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rule-2); }
.use-case-result p { margin-top: 6px; color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.integration-list { margin-top: 22px; }
.integrations-note { max-width: 50em; margin-top: 28px; }
.pilot-steps { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--ink); }
.pilot-steps li { min-width: 0; padding: 24px 0; border-bottom: 1px solid var(--rule-2); }
.pilot-steps p { margin-top: 10px; font-size: 15.5px; }
@media (min-width: 768px) {
  .pilot-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pilot-steps li { padding-right: 24px; }
  .pilot-steps li:nth-child(even) { padding-left: 24px; padding-right: 0; border-left: 1px solid var(--rule); }
}
@media (min-width: 1024px) {
  .pilot-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pilot-steps li { padding: 24px; }
  .pilot-steps li:first-child { padding-left: 0; }
  .pilot-steps li + li { border-left: 1px solid var(--rule); }
  .pilot-steps li:nth-child(even) { padding-right: 24px; }
  .pilot-steps li:last-child { padding-right: 0; }
}

/* ---------- legal pages ---------- */

.legal { max-width: calc(46em + 2 * var(--gutter)); }
.legal h2 { margin-top: 40px; font: 400 clamp(24px, 2.2vw, 30px)/1.2 var(--serif); letter-spacing: -.012em; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { font-size: 16.5px; line-height: 1.7; }
.legal p { margin-top: 12px; }
.legal ul { margin-top: 12px; padding-left: 1.2em; list-style: disc; }
.legal li { margin-top: 8px; }
.legal li::marker { color: var(--accent); }
.legal b { color: var(--ink); font-weight: 600; }

/* ---------- deliverables ---------- */

.deliverables-grid { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--ink); }
.deliverable { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.deliverable .small { margin-top: auto; padding-top: 6px; }
@media (min-width: 768px) {
  .deliverables-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deliverable { padding: 28px; }
  .deliverable:nth-child(odd) { padding-left: 0; }
  .deliverable:nth-child(even) { padding-right: 0; border-left: 1px solid var(--rule); }
}
@media (min-width: 1024px) {
  .deliverables-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .deliverable:nth-child(n) { padding: 28px; border-left: 1px solid var(--rule); }
  .deliverable:nth-child(3n+1) { padding-left: 0; border-left: 0; }
  .deliverable:nth-child(3n) { padding-right: 0; }
}
