/*
 * Clara's website: the landing page and the docs rendered around it (scripts/site.mjs).
 * The values are the board's own (docs/DESIGN.md): neutral surfaces, ink for the primary
 * action, and colour only where it means something: an agent's hue for the agent holding a
 * card, and the warm colour for what needs a person. System fonts, so nothing is downloaded.
 */

:root {
  --canvas: #f7f7f8;
  --surface: #ffffff;
  --sunken: #f1f1f3;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #6b6b74;
  --ink: #18181b;
  --on-ink: #ffffff;
  --focus: #18181b;
  --warm: #c2410c;
  --warm-tint: #fff4e5;
  --warm-line: #fdba74;
  --success: #166534;
  --agent-1: #0f766e;
  --agent-5: #a21caf;
  --shadow: 0 1px 2px rgb(24 24 27 / 0.04), 0 12px 32px -12px rgb(24 24 27 / 0.14);

  --sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --display:
    -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --page: 1200px;
  --gutter: 32px;
  --measure: 66ch;
  --radius: 8px;
  --radius-lg: 12px;
  --top: 60px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0e0e10;
    --surface: #161618;
    --sunken: #1e1e21;
    --border: #2a2a2e;
    --border-strong: #3a3a40;
    --text: #ededef;
    --text-2: #b4b4bb;
    --text-3: #8f8f98;
    --ink: #ededef;
    --on-ink: #161618;
    --focus: #ededef;
    --warm: #fb923c;
    --warm-tint: #2a1a0e;
    --warm-line: #7c3a12;
    --success: #4ade80;
    --agent-1: #2dd4bf;
    --agent-5: #e879f9;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -16px rgb(0 0 0 / 0.6);
  }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--top) + 16px);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

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

code,
pre {
  font-family: var(--mono);
  font-size: 0.88em;
}

:not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--sunken);
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--display);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-ink);
}

.skip:focus {
  top: 12px;
}

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

/* Buttons and commands */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 560;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  border-color: var(--text-3);
}

.button-ink {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}

.button-ink:hover {
  border-color: var(--ink);
  opacity: 0.88;
}

.command {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 16px;
}

.command-prompt {
  color: var(--text-3);
  user-select: none;
}

.command-text {
  user-select: all;
  white-space: nowrap;
  overflow-x: auto;
}

.command .command-text {
  padding: 0;
  background: none;
  font-size: inherit;
}

.code {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
  tab-size: 2;
}

.code .c,
.code .k {
  color: var(--text-3);
}

.code .h {
  color: var(--text);
  font-weight: 650;
}

/* Header */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--canvas) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: calc(var(--page) + 2 * var(--gutter));
  height: var(--top);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  border-radius: 7px;
}

.brand-tile {
  fill: var(--ink);
}

.brand-bar {
  fill: var(--on-ink);
}

.brand-bar-2 {
  fill-opacity: 0.72;
}

.brand-bar-3 {
  fill-opacity: 0.44;
}

.top-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 14.5px;
}

.top-nav a,
.menu-nav a {
  color: var(--text-2);
  text-decoration: none;
}

.top-nav a:hover,
.menu-nav a:hover {
  color: var(--text);
}

.top-cta.button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.menu {
  display: none;
  position: relative;
  margin-left: auto;
}

.menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 560;
  cursor: pointer;
  list-style: none;
}

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

.menu-nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.menu-nav a {
  padding: 10px 12px;
  border-radius: 6px;
}

.menu-nav a:hover {
  background: var(--sunken);
}

/*
 * The stage: the top of the page, dark in either theme like the film's title cards. The film
 * glows in the six agent hues, and the lanes under it are the strip the film's cards end on.
 */

.stage,
.agent-rules,
.close {
  --stage: #0e0e10;
  --stage-raised: #161618;
  --stage-line: #2a2a2e;
  --stage-line-strong: #3a3a40;
  --stage-text: #ededef;
  --stage-text-2: #b4b4bb;
  --stage-text-3: #8f8f98;
  --hues: #2dd4bf, #38bdf8, #60a5fa, #a78bfa, #e879f9, #f472b6;
  background: var(--stage);
  color: var(--stage-text);
  color-scheme: dark;
}

.stage :where(:not(pre) > code),
.agent-rules :where(:not(pre) > code),
.close :where(:not(pre) > code) {
  background: var(--stage-raised);
}

.stage :where(a:not(.button)),
.close :where(a:not(.button)) {
  text-decoration-color: var(--stage-line-strong);
}

.stage :where(a:not(.button):hover),
.close :where(a:not(.button):hover) {
  text-decoration-color: currentColor;
}

.stage :focus-visible,
.agent-rules :focus-visible,
.close :focus-visible {
  outline-color: var(--stage-text);
}

.stage {
  padding: 80px 0 104px;
  overflow: clip;
}

.stage-head {
  display: grid;
  justify-items: start;
}

.stage h1 {
  max-width: 9.4em;
  font-size: clamp(50px, 8vw, 116px);
  font-weight: 760;
  line-height: 0.93;
  letter-spacing: -0.056em;
}

.stage-lede {
  margin: 32px 0 0;
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 620;
  line-height: 1.2;
  letter-spacing: -0.022em;
}

.stage-text {
  max-width: 46em;
  margin: 12px 0 0;
  font-size: 18px;
  color: var(--stage-text-2);
}

.stage-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.command-stage {
  padding: 13px 22px;
  border-color: var(--stage-text);
  background: var(--stage-text);
  color: var(--stage);
  font-size: 17px;
  font-weight: 560;
}

.command-stage .command-prompt {
  color: #6b6b74;
}

.button-ghost {
  border-color: var(--stage-line-strong);
  background: transparent;
  color: var(--stage-text);
}

.button-ghost:hover {
  border-color: var(--stage-text-3);
}

.button-bright {
  border-color: var(--stage-text);
  background: var(--stage-text);
  color: var(--stage);
}

.button-bright:hover {
  border-color: var(--stage-text);
  opacity: 0.88;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--stage-text-3);
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stage-text-3);
}

/* The film, shown no wider than it was cut, so it is never scaled up. */
.film {
  position: relative;
  max-width: 1282px;
  margin: 56px auto 0;
}

.film::before {
  content: "";
  position: absolute;
  inset: 8% 3% 14%;
  background: linear-gradient(90deg, var(--hues));
  filter: blur(80px);
  opacity: 0.42;
}

.film-frame {
  position: relative;
  border: 1px solid var(--stage-line-strong);
  border-radius: 16px;
  background: var(--stage);
  box-shadow: 0 48px 120px -48px rgb(0 0 0 / 0.9);
  overflow: hidden;
}

.film-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 800;
}

.lanes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  height: 4px;
  margin-top: 16px;
}

.lanes span {
  border-radius: var(--lane-radius, 2px);
  background: #2dd4bf;
  transform-origin: left;
}

.lanes span:nth-child(2) {
  background: #38bdf8;
}
.lanes span:nth-child(3) {
  background: #60a5fa;
}
.lanes span:nth-child(4) {
  background: #a78bfa;
}
.lanes span:nth-child(5) {
  background: #e879f9;
}
.lanes span:nth-child(6) {
  background: #f472b6;
}

.film figcaption {
  position: relative;
  max-width: 76ch;
  margin-top: 20px;
  font-size: 14px;
  color: var(--stage-text-3);
}

.film :where(figcaption a) {
  color: var(--stage-text);
}

.works-title {
  margin: 72px 0 0;
  font-size: 15px;
  color: var(--stage-text-3);
}

.works {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.works li {
  padding: 7px 15px;
  border: 1px solid var(--stage-line);
  border-radius: 999px;
  background: var(--stage-raised);
  font-size: 15px;
  font-weight: 560;
}

/* The one moment of motion: the lanes fill in turn, as agents take them, when the page opens. */
@media (prefers-reduced-motion: no-preference) {
  .stage .lanes span {
    animation: lane 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .stage .lanes span:nth-child(2) {
    animation-delay: 120ms;
  }
  .stage .lanes span:nth-child(3) {
    animation-delay: 240ms;
  }
  .stage .lanes span:nth-child(4) {
    animation-delay: 360ms;
  }
  .stage .lanes span:nth-child(5) {
    animation-delay: 480ms;
  }
  .stage .lanes span:nth-child(6) {
    animation-delay: 600ms;
  }
}

@keyframes lane {
  from {
    transform: scaleX(0);
  }
}

/* Sections */

.section {
  padding: 112px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 44rem;
}

.section-head p {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 18px;
}

.section-head .code {
  margin-top: 24px;
}

.section h3 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.caption,
.aside {
  max-width: var(--measure);
  margin-top: 20px;
  color: var(--text-2);
  font-size: 15px;
}

.aside {
  margin-top: 40px;
}

.window {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.window-bar {
  display: flex;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border-strong);
}

/* What it is, in four claims, each under one agent's hue. */

.pitch-title {
  max-width: 17ch;
  font-size: clamp(36px, 5.2vw, 68px);
  font-weight: 740;
  line-height: 1.02;
  letter-spacing: -0.046em;
}

.pitch-text {
  max-width: var(--measure);
  margin: 28px 0 0;
  font-size: 18px;
  color: var(--text-2);
}

.claims {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
  margin-top: 72px;
}

.claim {
  padding-top: 22px;
  border-top: 3px solid #2dd4bf;
}

.claim:nth-child(2) {
  border-top-color: #60a5fa;
}
.claim:nth-child(3) {
  border-top-color: #a78bfa;
}
.claim:nth-child(4) {
  border-top-color: #f472b6;
}

.claim h3 {
  font-size: 21px;
  letter-spacing: -0.018em;
}

.claim p {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--text-2);
}

/*
 * Five rules for a team of agents: a dark band like the stage, each rule large on the left in
 * one agent's hue and how the board holds agents to it on the right.
 */

.agent-rules {
  padding: 120px 0;
}

.agent-rules-head {
  max-width: 44rem;
}

.agent-rules-head h2 {
  font-size: clamp(36px, 5.2vw, 68px);
  font-weight: 740;
  line-height: 1.02;
  letter-spacing: -0.046em;
}

.agent-rules-head p {
  margin: 22px 0 0;
  font-size: 18px;
  color: var(--stage-text-2);
}

.agent-rules-list {
  margin: 72px 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--stage-line);
}

.agent-rule {
  --hue: #2dd4bf;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px 64px;
  align-items: baseline;
  padding: 36px 0 36px 28px;
  border-top: 1px solid var(--stage-line);
  background: linear-gradient(var(--hue), var(--hue)) left 36px / 4px 1.1em no-repeat;
}

.agent-rule:nth-child(2) {
  --hue: #38bdf8;
}
.agent-rule:nth-child(3) {
  --hue: #a78bfa;
}
.agent-rule:nth-child(4) {
  --hue: #e879f9;
}
.agent-rule:nth-child(5) {
  --hue: #f472b6;
}

.agent-rule h3 {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--stage-text);
}

.agent-rule p {
  margin: 0;
  max-width: 34em;
  font-size: 17px;
  color: var(--stage-text-2);
}

/* Start */

.starts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 56px;
}

.start {
  display: grid;
  align-content: start;
  gap: 16px;
}

.start .code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.start-day {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
}

.start-day .code {
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

.start p {
  color: var(--text-2);
  font-size: 15.5px;
}

/* The loop */

.loop {
  display: grid;
  gap: 96px;
  margin: 72px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 56px;
  align-items: center;
}

.step-text {
  display: grid;
  gap: 14px;
  align-content: start;
}

.step-text p {
  color: var(--text-2);
}

.step-n {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--text);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.step-shot img {
  width: 100%;
}

/* How it works */

.how {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: start;
  margin-top: 56px;
}

.flow {
  display: grid;
  gap: 40px;
  position: relative;
}

.flow > * {
  position: relative;
}

.flow > * + *::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -40px;
  height: 40px;
  border-left: 1px dashed var(--border-strong);
}

.flow-ins {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-ins li {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.flow-ins b {
  font-size: 14.5px;
  font-weight: 620;
}

.flow-ins span {
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.35;
}

.flow-core {
  display: grid;
  gap: 6px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--on-ink);
}

.flow-core b {
  font-size: 17px;
  font-weight: 650;
}

.flow-core span {
  opacity: 0.78;
  font-size: 15px;
}

.flow-repo {
  padding: 20px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.flow-repo b {
  font-size: 17px;
  font-weight: 650;
}

.flow-repo ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.flow-repo li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  font-size: 15px;
}

.flow-repo li span {
  color: var(--text-2);
}

.file {
  margin: 0;
}

.file figcaption {
  margin-bottom: 10px;
  color: var(--text-2);
  font-size: 14px;
}

.code-file {
  font-size: 13px;
}

/* The second brain: a dark band in either theme, since the graph is drawn on the dark. */

.brain-band {
  --canvas: #0b0b0d;
  --surface: #161618;
  --sunken: #1e1e21;
  --border: #2a2a2e;
  --border-strong: #3a3a40;
  --text: #ededef;
  --text-2: #b4b4bb;
  --text-3: #8f8f98;
  --focus: #ededef;
  --agent-5: #e879f9;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 24px 64px -24px rgb(0 0 0 / 0.8);

  border-top-color: #000;
  background: var(--canvas);
  color: var(--text);
  color-scheme: dark;
}

.brain-band a {
  color: var(--text);
}

.brain-shot {
  margin-top: 48px;
}

.brain-shot img {
  width: 100%;
  height: auto;
}

.brain-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 64px;
}

.brain-points > div {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-top: 20px;
  border-top: 2px solid var(--agent-5);
}

.brain-points p {
  color: var(--text-2);
  font-size: 15.5px;
}

.brain-note {
  margin-top: 88px;
  align-items: center;
}

.brain-note-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.brain-note .code-file {
  overflow-x: auto;
}

.brain-note-text > p {
  color: var(--text-2);
}

.brain-note .brain-shot {
  margin-top: 0;
}

.brain-note .file {
  margin-top: 8px;
}

.brain-note-aside {
  font-size: 15px;
}

/* On your machine */

.rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  margin-top: 56px;
}

.rule-list ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.rule-list li {
  position: relative;
  padding: 14px 0 14px 30px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
}

.rule-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 21px;
  width: 11px;
  height: 6px;
  border-left: 1.75px solid var(--text);
  border-bottom: 1.75px solid var(--text);
  transform: rotate(-45deg);
}

.rule-list-not li::before {
  left: 0;
  top: 25px;
  width: 15px;
  height: 0;
  border-left: 0;
  border-bottom: 1.75px solid var(--text);
  transform: none;
}

/* Two columns: the words on the left, what they are about on the right */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}

.split-wide {
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
}

.imports {
  display: grid;
  gap: 4px;
  margin: 28px 0 0;
}

.imports dt {
  margin-top: 12px;
}

.imports dd {
  margin: 0;
  color: var(--text-2);
  font-size: 15.5px;
}

.code-lib {
  font-size: 13px;
}

/* Tables */

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.section-head + .table-wrap {
  margin-top: 48px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.table caption {
  padding-bottom: 12px;
  text-align: left;
  font-weight: 650;
}

.table th,
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.table thead th {
  border-bottom-color: var(--border-strong);
  color: var(--text);
  font-weight: 650;
  white-space: nowrap;
}

.table tbody th {
  font-weight: 600;
  color: var(--text);
}

.table td {
  color: var(--text-2);
}

.table-compare {
  min-width: 860px;
}

.table-compare tbody th {
  width: 18%;
}

.table .us {
  background: var(--surface);
  color: var(--text);
}

.table thead .us {
  border-radius: var(--radius) var(--radius) 0 0;
}

.state {
  display: inline-block;
  margin-right: 6px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}

.state-done {
  border-color: color-mix(in srgb, var(--success) 50%, transparent);
  color: var(--success);
}

/* Hosting */

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

.trio > div {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-top: 20px;
  border-top: 2px solid var(--text);
}

.trio p {
  color: var(--text-2);
  font-size: 15.5px;
}

/* Where it stands, and lists of plain sentences */

.plain {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain li {
  padding: 16px 0;
  border-top: 1px solid var(--border);
  color: var(--text-2);
}

.plain li:last-child {
  border-bottom: 1px solid var(--border);
}

/* Questions */

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

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

.faq summary {
  position: relative;
  padding: 18px 40px 18px 0;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 25px;
  width: 8px;
  height: 8px;
  border-right: 1.75px solid var(--text-2);
  border-bottom: 1.75px solid var(--text-2);
  transform: rotate(45deg);
}

.faq details[open] summary::after {
  top: 29px;
  transform: rotate(-135deg);
}

.faq p {
  max-width: var(--measure);
  padding: 0 0 20px;
  color: var(--text-2);
}

/* The close: the stage again, ending on the lanes as the film does. */

.close {
  padding: 136px 0 0;
  overflow: clip;
}

.close-inner {
  display: grid;
  justify-items: center;
  gap: 20px;
  text-align: center;
}

.section-head h2,
.close h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.close h2 {
  font-size: clamp(44px, 7vw, 104px);
  font-weight: 760;
  line-height: 0.96;
  letter-spacing: -0.052em;
}

.close-inner > p {
  max-width: 36em;
  color: var(--stage-text-2);
  font-size: 18px;
}

.command-lg {
  margin-top: 12px;
  padding: 16px 26px;
  font-size: 19px;
}

.close .hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.lanes-close {
  width: 100%;
  height: 6px;
  margin-top: 112px;
  gap: 0;
  --lane-radius: 0;
}

/* Footer */

.foot {
  padding: 56px 0 64px;
  border-top: 1px solid var(--border);
  font-size: 14.5px;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.foot-brand {
  display: grid;
  align-content: start;
  gap: 8px;
  color: var(--text-2);
}

.foot-name {
  color: var(--text);
  font-weight: 680;
  font-size: 17px;
}

.foot-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.foot-col h2 {
  margin-bottom: 4px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 650;
}

.foot-col a {
  color: var(--text-2);
  text-decoration: none;
}

.foot-col a:hover {
  color: var(--text);
}

/* Smaller screens */

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

  .menu {
    display: block;
  }

  .how,
  .split,
  .split-wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .brain-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claims {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .step-text {
    max-width: var(--measure);
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 16px;
  }

  .stage {
    padding: 56px 0 64px;
  }

  .stage-lede {
    margin-top: 24px;
  }

  .stage-text {
    font-size: 16px;
  }

  .film {
    margin-top: 48px;
  }

  .film-frame {
    border-radius: 10px;
  }

  .works-title {
    margin-top: 48px;
  }

  .claims {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 48px;
  }

  .agent-rules {
    padding: 80px 0;
  }

  .agent-rules-list {
    margin-top: 48px;
  }

  .agent-rule {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 28px 0 28px 22px;
    background-position: left 30px;
  }

  .agent-rule p {
    font-size: 16px;
  }

  .section {
    padding: 72px 0;
  }

  .close {
    padding: 88px 0 0;
  }

  .lanes-close {
    margin-top: 72px;
  }

  .starts,
  .rules,
  .trio,
  .brain-points {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .loop {
    gap: 64px;
  }

  .flow-ins {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-brand {
    grid-column: 1 / -1;
  }

  .command-lg,
  .command-stage {
    font-size: 15px;
  }
}

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

/* A doc's header keeps its three links on every screen. */
@media (max-width: 1080px) {
  .top-nav.top-nav-docs {
    display: flex;
    gap: 18px;
  }
}
