/*
 * Cited, the landing page. The Editorial Ledger of the product (DESIGN.md of the repository) set for a page whose only
 * job is the download: ink and paper carry the layout, lime marks a citation, a verified fact or the one place to act,
 * Outfit is the only family (commands included), square corners, no shadows, hairline rules.
 */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/outfit-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #171717;
  --ink-2: #57534e;
  --surface: #fafaf9;
  --surface-dark: #1c1917;
  --paper: #ffffff;
  --lime: #ddf469;
  --rule: #e3e3e3;
  --on-ink: #fafaf9;
  --on-ink-2: rgb(250 250 249 / 0.74);
  --on-ink-3: rgb(250 250 249 / 0.6);
  --rule-ink: rgb(250 250 249 / 0.14);
  --gutter: clamp(20px, 4.45vw, 64px);
  --max: 1440px;
  --header: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur-base: 320ms;
  --dur-slow: 640ms;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Commands and paths are set in Outfit too, with tabular figures: the identity has one family. */
  --code: var(--sans);
  --section: clamp(96px, 11.5vw, 168px);
  color-scheme: light;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  font-weight: 800;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

strong {
  font-weight: 700;
}

code {
  font: inherit;
}

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

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

.site-header :focus-visible,
.hero :focus-visible,
.film :focus-visible,
.places :focus-visible,
.terminal :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--lime);
}

[hidden] {
  display: none !important;
}

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

.skip {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.skip:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ the two devices of the identity */

/* The citation mark: a square with the number of a source (DESIGN.md, "Citation Mark"). On this page lime squares
   only ever mean a source; steps and annotations are numbered in type. */
.cite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  height: 1.3em;
  padding: 0 0.3em;
  font-size: 0.72em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: 0.1em;
  font-variant-numeric: tabular-nums;
  background: var(--lime);
  color: var(--ink);
}

/* The highlighter on an ink ground: a solid lime block with ink text, painted in once (DESIGN.md, "Highlighter"). The
   block covers the whole line, accents included; the line above keeps its descenders because .line-b stands off it. */
.hl-ink {
  background-image: linear-gradient(var(--lime), var(--lime));
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  color: var(--ink);
  padding: 0 0.08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ------------------------------------------------------------------ buttons, labels and type */

.btn {
  --h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--h);
  padding: 0 22px;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--sm {
  --h: 44px;
  padding: 0 16px;
  font-size: 0.75rem;
  gap: 9px;
}

.btn--sm svg {
  width: 16px;
  height: 16px;
}

.btn--paper {
  background: var(--on-ink);
  color: var(--ink);
}

.btn--paper:hover {
  background: var(--lime);
}

.btn--ghost {
  color: var(--on-ink);
  border-color: rgb(250 250 249 / 0.32);
}

.btn--ghost:hover {
  border-color: var(--on-ink);
  background: rgb(250 250 249 / 0.06);
}

.btn--ghost svg {
  width: 14px;
  height: 14px;
}

.btn-meta {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid rgb(250 250 249 / 0.24);
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--on-ink-3);
}

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

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

.btn--outline {
  color: var(--ink);
  border-color: var(--ink);
}

.btn--outline:hover {
  background: var(--ink);
  color: var(--lime);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 719px) {
  .actions .btn {
    flex: 1 1 100%;
  }
}

.eyebrow {
  margin-bottom: 22px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.eyebrow--ink {
  color: var(--on-ink-3);
}

.eyebrow--lime {
  color: var(--ink);
}

.display {
  font-size: clamp(3rem, 5.9vw, 6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.h2 {
  max-width: 18ch;
  font-size: clamp(2.25rem, 4.2vw, 3.875rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h3 {
  font-size: clamp(1.25rem, 1.45vw, 1.375rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.1875rem, 1.5vw, 1.4375rem);
  line-height: 1.5;
}

.body {
  max-width: 54ch;
  font-size: clamp(1.0625rem, 1.12vw, 1.1875rem);
  line-height: 1.62;
  color: var(--ink-2);
  text-wrap: pretty;
}

.body--ink {
  color: var(--on-ink-2);
}

.body--lime {
  color: var(--ink);
}

.caption {
  margin-top: 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.caption--ink {
  color: var(--on-ink-3);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--on-ink);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--rule-ink);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--on-ink);
  text-decoration: none;
}

.wordmark .cite {
  margin-left: 0.14em;
}

.nav {
  display: none;
  gap: 28px;
  margin-left: 20px;
}

.nav a {
  padding-block: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--on-ink-2);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

.nav a:hover {
  color: var(--on-ink);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lang a {
  display: inline-block;
  padding: 12px 4px;
  color: var(--on-ink-3);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

.lang a:hover {
  color: var(--on-ink);
}

.lang a[aria-current="page"] {
  color: var(--on-ink);
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.lang-sep {
  color: rgb(250 250 249 / 0.3);
}

.lang-short {
  display: none;
}

@media (max-width: 719px) {
  .lang-long,
  .site-header .btn-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .lang-short {
    display: inline;
  }

  .site-header .btn--sm {
    flex: none;
    width: 44px;
    padding: 0;
  }

  .site-header .btn--sm svg {
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 960px) {
  .nav {
    display: flex;
  }
}

/* ------------------------------------------------------------------ hero: the wall of documents */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: max(640px, calc(100svh - var(--header)));
  overflow: hidden;
  background: var(--ink);
  color: var(--on-ink);
}

/* The wall is at full strength only where a passage can be cited (above the copy on a phone, right of it on a wide
   screen), dimmed behind the copy, and it fades out at the bottom edge instead of being sliced by it. */
.wall {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image:
    linear-gradient(180deg, #000 0%, #000 19%, rgb(0 0 0 / 0.06) 26%, rgb(0 0 0 / 0.06) 100%),
    linear-gradient(0deg, transparent 0, #000 96px);
  mask-image:
    linear-gradient(180deg, #000 0%, #000 19%, rgb(0 0 0 / 0.06) 26%, rgb(0 0 0 / 0.06) 100%),
    linear-gradient(0deg, transparent 0, #000 96px);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

@media (min-width: 1024px) {
  .wall {
    -webkit-mask-image:
      linear-gradient(90deg, rgb(0 0 0 / 0.2) 0%, rgb(0 0 0 / 0.2) 50%, #000 66%),
      linear-gradient(0deg, transparent 0, #000 96px);
    mask-image:
      linear-gradient(90deg, rgb(0 0 0 / 0.2) 0%, rgb(0 0 0 / 0.2) 50%, #000 66%),
      linear-gradient(0deg, transparent 0, #000 96px);
  }
}

/* A row of document columns that drifts up by exactly one copy of its documents, so the loop has no seam. On a wide
   screen the third column starts where the mask stops dimming, so a cited passage is always at full strength; on a
   phone the first column starts at the gutter. */
.wall-layer {
  --w: 22em;
  --gap: 120px;
  position: absolute;
  top: 0;
  left: calc(66% - 2 * (var(--w) + var(--gap)));
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
  width: max-content;
  font-size: 17px;
  line-height: 1.62;
  color: rgb(250 250 249 / 0.075);
  animation: wall-drift 190s linear infinite;
  animation-delay: -23s;
  will-change: transform;
}

.wall-col {
  flex: none;
  width: var(--w);
}

@media (max-width: 719px) {
  .wall-layer {
    left: var(--gutter);
    font-size: 15px;
  }
}

.hero.is-paused .wall-layer,
.hero.is-citing .wall-layer {
  animation-play-state: paused;
}

@keyframes wall-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -50%, 0);
  }
}

.doc {
  padding-bottom: 3.2em;
}

.doc-file {
  margin-bottom: 1.2em;
  padding-bottom: 0.9em;
  border-bottom: 1px solid currentColor;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.doc-file::before {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.7em;
  border: 1px solid currentColor;
  vertical-align: -0.02em;
}

.doc-h {
  margin-bottom: 0.7em;
  font-size: 1.45em;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.doc-h2 {
  margin: 1.3em 0 0.45em;
  font-weight: 700;
}

.doc-p + .doc-p {
  margin-top: 0.7em;
}

.doc-li {
  padding-left: 1.1em;
  text-indent: -1.1em;
}

.doc-li::before {
  content: "–";
  display: inline-block;
  width: 1.1em;
  text-indent: 0;
}

/* A passage the wall is citing: the highlighter of the product, then back to paper. */
.passage {
  background-image: linear-gradient(var(--lime), var(--lime));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  padding: 0.04em 0.1em;
  margin: 0 -0.1em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition:
    background-size 760ms var(--ease),
    color 360ms var(--ease);
}

.passage.is-marked {
  background-size: 100% 100%;
  color: var(--ink);
}

.passage.is-fading {
  transition:
    background-size 520ms var(--ease-in-out),
    color 520ms var(--ease-in-out);
  background-position: 100% 0;
}

.thread {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* The leader line runs in a channel of ink cut through the wall, so it never reads as a line struck through a word. */
.thread-casing {
  fill: none;
  stroke: var(--ink);
  stroke-width: 9;
  stroke-linejoin: miter;
  stroke-linecap: square;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.thread-line {
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.5;
  stroke-linejoin: miter;
  stroke-linecap: square;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.thread-node {
  fill: var(--lime);
  opacity: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: clamp(56px, 9vh, 112px) clamp(64px, 9vh, 112px);
}

.hero-eyebrow {
  color: var(--on-ink-2);
}

.hero .display {
  margin-bottom: clamp(28px, 3.4vh, 40px);
}

.line {
  display: block;
}

.line-b {
  margin-top: 0.38em;
  white-space: nowrap;
}

@media (max-width: 719px) {
  .line-b {
    white-space: normal;
  }
}

/* The citation mark of the headline: at rest the open mark of the product on ink (lime number, lime outline); the
   leader line of the wall fills it when it arrives. */
.cite--hero {
  position: relative;
  margin-left: 0.24em;
  font-size: 0.34em;
  vertical-align: text-top;
  background: transparent;
  color: var(--lime);
  box-shadow: inset 0 0 0 0.075em var(--lime);
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}

.cite--hero.is-hit {
  background: var(--lime);
  color: var(--ink);
}

@media (max-width: 719px) {
  .cite--hero {
    font-size: 0.4em;
    vertical-align: middle;
  }
}

.hero-lede {
  max-width: 38ch;
  color: var(--on-ink-2);
  text-wrap: pretty;
}

.hero-actions {
  margin-top: clamp(28px, 3.6vh, 40px);
}

.stack {
  max-width: 64ch;
  margin-top: 26px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--on-ink-3);
  text-wrap: pretty;
}

/* On a phone the providers wait for the ledger and the download, so the wall keeps a band to cite from. */
@media (max-width: 719px) {
  .stack {
    display: none;
  }
}

/* WCAG 2.2.2: the wall, its citations and the orb stop for good with one press, remembered on this device. */
.motion-toggle {
  position: absolute;
  right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  bottom: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 2px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-ink-3);
  transition: color var(--dur-fast) var(--ease);
}

.motion-toggle svg {
  width: 11px;
  height: 11px;
}

.motion-toggle:hover {
  color: var(--on-ink);
}

.motion-icon {
  display: inline-flex;
}

.motion-icon--play,
.motion-toggle.is-paused .motion-icon--pause {
  display: none;
}

.motion-toggle.is-paused .motion-icon--play {
  display: inline-flex;
}

.motion-toggle--inline {
  position: static;
  margin-top: 18px;
  padding: 0;
}

/* ------------------------------------------------------------------ film */

.film {
  padding-block: var(--section);
  border-top: 1px solid var(--rule-ink);
  background: var(--surface-dark);
  color: var(--on-ink);
}

.film-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
}

@media (min-width: 1024px) {
  .film-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(48px, 5vw, 88px);
    align-items: start;
  }

  .film-copy {
    padding-top: clamp(24px, 3vw, 56px);
  }
}

.film-copy .h2 {
  margin-bottom: 28px;
  color: var(--on-ink);
}

.film-player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
  outline: 1px solid var(--rule-ink);
}

.film-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: clamp(14px, 2.2vw, 28px);
  color: var(--on-ink);
  text-align: left;
}

.film-play:focus-visible {
  outline-offset: -6px;
}

.film-player video:focus-visible {
  outline-offset: -3px;
}

.film-play-mark {
  display: grid;
  place-items: center;
  width: clamp(48px, 5vw, 64px);
  height: clamp(48px, 5vw, 64px);
  flex: none;
  background: var(--on-ink);
  color: var(--ink);
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}

.film-play-mark svg {
  width: 36%;
  height: 36%;
  margin-left: 6%;
}

.film-play:hover .film-play-mark,
.film-play:focus-visible .film-play-mark {
  background: var(--lime);
}

/* The poster already says what the film is; the button keeps its name for assistive technology only. */
.film-play-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.film-play-time {
  padding-block: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--on-ink);
}

/* On a phone the poster is small and full: the mark moves to its empty corner. */
@media (max-width: 719px) {
  .film-play {
    align-items: flex-start;
    justify-content: flex-end;
    padding: 10px;
  }

  .film-play-mark {
    width: 40px;
    height: 40px;
  }

  .film-play-time {
    display: none;
  }
}

.transcript {
  margin-top: 6px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--on-ink-2);
}

.transcript summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-ink-2);
}

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

.transcript summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgb(250 250 249 / 0.3);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
}

.transcript[open] summary::before {
  content: "−";
}

.transcript summary:hover {
  color: var(--on-ink);
}

.transcript dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 18px;
  margin: 8px 0 12px;
}

.transcript dt {
  font-weight: 600;
  color: var(--on-ink);
}

.transcript p {
  max-width: 62ch;
}

/* ------------------------------------------------------------------ anatomy of an answer */

.anatomy {
  padding-block: var(--section);
  background: var(--paper);
}

.anatomy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
}

@media (min-width: 1024px) {
  .anatomy-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(48px, 6vw, 112px);
    align-items: start;
  }

  .anatomy-copy {
    position: sticky;
    top: calc(var(--header) + 56px);
  }
}

.anatomy-copy .h2,
.section-head .h2,
.principles-head .h2 {
  margin-bottom: 28px;
}

.legend {
  margin-top: 44px;
  border-top: 1px solid var(--ink);
}

.legend li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1.0625rem;
  line-height: 1.5;
}

/* Annotations are letters in outlined squares, never lime: on this page a lime square is a source. */
.note {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
}

.legend .note {
  margin-top: -2px;
}

.shot {
  border: 1px solid var(--rule);
  background: var(--paper);
}

.shot img {
  width: 100%;
}

.shot--pinned {
  position: relative;
}

.note--on {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
}

/* The note under the citation mark reaches up to it with a hairline. */
.note--up::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 1.5px;
  height: 10px;
  background: var(--ink);
  transform: translateX(-50%);
}

.js .note--on {
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
  transition-delay: calc(200ms + var(--i, 0) * 140ms);
}

.js .is-in .note--on {
  opacity: 1;
}

/* On a phone the capture is the phone's own view of the answer, and the letters stay in the legend. */
@media (max-width: 719px) {
  .note--on,
  .legend .note {
    display: none;
  }

  .legend li {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------ the guided setup */

.steps {
  padding-block: var(--section);
  border-top: 1px solid var(--rule);
  background: var(--surface);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-bottom: clamp(48px, 6vw, 88px);
}

@media (min-width: 1024px) {
  .section-head {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: clamp(48px, 6vw, 112px);
    align-items: end;
  }

  .section-head .eyebrow {
    grid-column: 1 / -1;
  }

  .section-head .h2 {
    margin-bottom: 0;
  }

  .section-head .body {
    padding-bottom: 0.35em;
  }
}

.steps-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}

@media (min-width: 1024px) {
  .steps-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(48px, 5vw, 96px);
    align-items: start;
  }
}

.steps-list {
  border-top: 1px solid var(--ink);
}

.steps-list li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--rule);
}

.step-num {
  padding-top: 0.45em;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.steps-list .h3 {
  margin-bottom: 6px;
}

.steps-list p {
  max-width: 44ch;
  color: var(--ink-2);
}

.measure {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 32px;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.measure strong {
  color: var(--ink);
}

.measure-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  margin-top: -1px;
  background: var(--lime);
  color: var(--ink);
}

.measure-mark svg {
  width: 16px;
  height: 16px;
}

/* ------------------------------------------------------------------ where it answers */

.places {
  padding-block: var(--section);
  background: var(--ink);
  color: var(--on-ink);
}

.section-head--ink .h2 {
  color: var(--on-ink);
}

.places-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--rule-ink);
  border: 1px solid var(--rule-ink);
}

@media (min-width: 1024px) {
  .places-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .place--page {
    grid-row: span 2;
  }
}

.place {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: clamp(28px, 3.4vw, 52px);
  background: var(--ink);
}

.place-num {
  display: block;
  margin-bottom: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--on-ink-3);
  font-variant-numeric: tabular-nums;
}

.place .h3 {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 2.1vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--on-ink);
}

.place p {
  max-width: 46ch;
  color: var(--on-ink-2);
}

.place--page {
  justify-content: space-between;
}

.phone {
  align-self: flex-start;
  width: min(300px, 78%);
  border: 1px solid var(--rule-ink);
}

.place--widget {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-content: start;
}

.widget-shot {
  width: min(300px, 80%);
  border: 1px solid var(--rule-ink);
}

@media (min-width: 1024px) {
  .place--widget {
    grid-template-columns: minmax(0, 1fr) 248px;
    grid-template-areas: "text shot" "code shot";
    column-gap: clamp(28px, 3vw, 44px);
  }

  .place--widget .place-text {
    grid-area: text;
  }

  .place--widget .code {
    grid-area: code;
    align-self: end;
    white-space: pre-wrap;
  }

  .place--widget .code code {
    display: block;
    padding-left: 1.2em;
    text-indent: -1.2em;
  }

  .widget-shot {
    grid-area: shot;
    width: 100%;
  }
}

.code {
  padding: 18px 20px;
  overflow-x: auto;
  background: rgb(250 250 249 / 0.04);
  border: 1px solid var(--rule-ink);
  font-family: var(--code);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
  white-space: pre;
  color: var(--on-ink-2);
}

.code-attr,
.code-str {
  color: var(--on-ink);
}

.code-var {
  color: var(--lime);
  white-space: nowrap;
}

.place--voice {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

@media (min-width: 640px) {
  .place--voice {
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(32px, 3.4vw, 52px);
  }
}

.orb-stage {
  position: relative;
  width: clamp(168px, 15vw, 232px);
  aspect-ratio: 1;
}

.orb-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--rule-ink);
  border-radius: 50%;
}

.orb-stage.is-live::before {
  display: none;
}

.orb-stage canvas {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ------------------------------------------------------------------ built not to invent */

.principles {
  padding-block: var(--section);
  background: var(--paper);
}

.principles-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}

@media (min-width: 1024px) {
  .principles-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(48px, 6vw, 112px);
    align-items: start;
  }

  .principles-head {
    position: sticky;
    top: calc(var(--header) + 56px);
  }
}

.ledger {
  border-top: 1px solid var(--ink);
  counter-reset: ledger;
}

.ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 32px 0 34px;
  border-bottom: 1px solid var(--rule);
  counter-increment: ledger;
}

@media (min-width: 720px) {
  .ledger-row {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
  }
}

.ledger-row .h3::before {
  content: counter(ledger, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.ledger-body p {
  max-width: 50ch;
  color: var(--ink-2);
  text-wrap: pretty;
}

.source {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin-top: 14px;
  color: var(--ink);
  text-decoration: none;
}

.source .cite {
  font-size: 0.8125rem;
  vertical-align: 0;
}

.source-path {
  font-family: var(--code);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #b8b4ae;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--dur-fast) var(--ease);
}

.source:hover .source-path {
  text-decoration-color: var(--ink);
}

.shot--refusal {
  max-width: 450px;
  margin-top: 22px;
}

/* ------------------------------------------------------------------ download: the lime flood */

.download {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--section);
  background: var(--lime);
  color: var(--ink);
}

.download-fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--lime);
  transform-origin: 50% 100%;
}

.js .download {
  background: var(--ink);
}

.js .download-fill {
  transform: scaleY(0);
  transition: transform 1100ms var(--ease);
}

.js .download.is-in .download-fill {
  transform: none;
}

.download-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}

@media (min-width: 1024px) {
  .download-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: clamp(48px, 6vw, 112px);
    row-gap: clamp(56px, 6vw, 88px);
    align-items: end;
  }
}

.display--xl {
  font-size: clamp(3.75rem, 10.6vw, 10.75rem);
  line-height: 0.86;
  letter-spacing: -0.055em;
}

.display--xl span {
  display: block;
}

:lang(es) .display--xl {
  font-size: clamp(3.25rem, 9.2vw, 9.25rem);
}

.download-copy .body {
  margin-bottom: 32px;
}

.terminal {
  align-self: stretch;
  background: var(--ink);
  color: var(--on-ink);
}

.terminal-bar {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  border-bottom: 1px solid var(--rule-ink);
}

.terminal-title,
.term-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-ink-3);
}

.term-step {
  padding: 18px 24px 22px;
  border-bottom: 1px solid var(--rule-ink);
}

.term-step:last-child {
  border-bottom: 0;
}

.term-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.term-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border: 1px solid rgb(250 250 249 / 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--on-ink-2);
}

.term-label {
  color: var(--on-ink-2);
}

.copy {
  min-width: 92px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 16px;
  border: 1px solid var(--rule-ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-ink);
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.copy:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.copy.is-done {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.term-code {
  margin-top: 10px;
  overflow-x: auto;
  font-family: var(--code);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.85;
  white-space: pre;
}

.t-line {
  display: block;
}

.t-prompt {
  display: inline-block;
  width: 1.6em;
  text-indent: 0;
  color: var(--lime);
  user-select: none;
}

.term-note {
  max-width: 62ch;
  margin-top: 8px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--on-ink-2);
  text-wrap: pretty;
}

.term-note code {
  font-weight: 600;
  color: var(--on-ink);
  overflow-wrap: anywhere;
}

/* On a phone long commands wrap under their prompt instead of hiding past the edge. */
@media (max-width: 719px) {
  .code,
  .term-code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .t-line {
    padding-left: 1.6em;
    text-indent: -1.6em;
  }

  .code code {
    display: block;
    padding-left: 1.2em;
    text-indent: -1.2em;
  }

  .term-step {
    padding-inline: 18px;
  }
}

/* The same install, told to a coding agent: a full row under the quick start, the words on the left and the command
   on the right, with tabs that join the ink panel below them. */
.agent {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 26px 24px 28px;
  border: 1.5px solid var(--ink);
}

@media (min-width: 1024px) {
  .agent {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(32px, 4vw, 64px);
    padding: 32px;
  }
}

.agent-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.agent-lead {
  max-width: 62ch;
  margin-top: 8px;
  font-size: 0.9375rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.agent-tabs {
  display: flex;
  flex-wrap: wrap;
}

.agent-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}

.agent-tab + .agent-tab {
  border-left: 0;
}

.agent-tab svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.agent-tab:hover {
  background: rgb(23 23 23 / 0.08);
}

.agent-tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--on-ink);
}

.agent-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px 16px 18px 20px;
  background: var(--ink);
  color: var(--on-ink);
}

.agent-panel + .agent-panel {
  margin-top: 12px;
}

.agent-panel :focus-visible {
  outline-color: var(--lime);
}

.agent-code {
  padding-top: 10px;
  font-family: var(--code);
  font-size: 0.9375rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--on-ink-2);
}

.agent-code .t-line {
  padding-left: 1.6em;
  text-indent: -1.6em;
}

.agent-note {
  max-width: 64ch;
  margin-top: 14px;
  font-size: 0.8125rem;
  line-height: 1.5;
  text-wrap: pretty;
}

@media (max-width: 519px) {
  .agent {
    padding: 18px 16px 20px;
  }

  .agent-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .agent-panel .copy {
    justify-self: start;
    margin-left: 0;
  }
}

.download-notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-self: start;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.download-notes p {
  max-width: 50ch;
  text-wrap: pretty;
}

.download-notes a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.download-notes a:hover {
  text-decoration-thickness: 2px;
}

.hosted a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.hosted .flame {
  width: 16px;
  height: 16px;
}

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

.site-footer {
  padding-block: clamp(72px, 8vw, 112px) 36px;
  background: var(--ink);
  color: var(--on-ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
  }
}

.wordmark--lg {
  font-size: clamp(3.25rem, 6.4vw, 5.5rem);
  letter-spacing: -0.05em;
}

.footer-sign {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 0.9375rem;
  color: var(--on-ink-2);
}

.footer-sign a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  color: var(--on-ink);
  text-decoration: none;
}

.footer-sign a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-sign .flame {
  width: 20px;
  height: 20px;
}

.dot {
  color: var(--on-ink-3);
}

.footer-nav .eyebrow {
  margin-bottom: 14px;
}

.footer-nav a {
  display: inline-block;
  padding-block: 9px;
  color: var(--on-ink-2);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  color: var(--on-ink);
}

.footer-legal {
  margin-top: clamp(56px, 7vw, 96px);
}

.footer-legal p {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-ink);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--on-ink-3);
}

.footer-legal .flame {
  width: 14px;
  height: 14px;
  flex: none;
}

/* ------------------------------------------------------------------ entrances */

.js .hero-eyebrow,
.js .hero .line,
.js .hero-lede,
.js .hero-actions,
.js .stack {
  animation: rise 800ms var(--ease) both;
}

.js .hero .line-a {
  animation-delay: 60ms;
}

.js .hero .line-b {
  animation-delay: 140ms;
}

.js .hero-lede {
  animation-delay: 260ms;
}

.js .hero-actions {
  animation-delay: 340ms;
}

.js .stack {
  animation-delay: 420ms;
}

.js .hero .hl-ink {
  animation: hl-sweep 900ms var(--ease) 420ms both;
}

.js .hero .cite--hero {
  animation: mark-land var(--dur-base) var(--ease) 1150ms both;
}

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity 700ms var(--ease),
    transform 900ms var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hl-sweep {
  from {
    background-size: 0% 100%;
  }
  to {
    background-size: 100% 100%;
  }
}

@keyframes mark-land {
  from {
    opacity: 0;
    transform: translateY(0.35em) scale(0.85);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Reduced motion: nothing moves, the highlighter and the flood are painted in their final state, and the pause button
   has nothing left to pause. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal],
  .js .note--on {
    opacity: 1;
  }

  .js [data-reveal] {
    transform: none;
  }

  .js .download {
    background: var(--lime);
  }

  .js .download-fill {
    transform: none;
  }

  .motion-toggle {
    display: none;
  }
}
