/* Anthra site. Colours and type follow the app's own chrome. */
:root {
  color-scheme: dark;
  --bg: #17171b;
  --bg-deep: #121215;
  --surface: #1c1c21;
  --surface-2: #212128;
  --surface-3: #26262e;
  --border: #2c2c35;
  --border-soft: #24242c;
  --text: #e7e7ec;
  --text-dim: #a3a3b1;
  --text-faint: #6a6a78;
  --accent: #9b8cf7;
  --accent-dim: #7b6ee0;
  --accent-soft: rgba(155, 140, 247, 0.14);
  --accent-line: rgba(155, 140, 247, 0.45);
  --green: #6ec08a;
  --red: #e06c75;
  --amber: #d6a96a;
  --cyan: #62b6c9;
  --track: #2a2a33;

  --sans: 'Mona Sans', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Cascadia Code Variable', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --nav-h: 60px;
}

[hidden] {
  display: none !important;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  scrollbar-color: var(--surface-3) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border: 3px solid var(--bg);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #34343e;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
a:hover {
  color: #b8adfa;
}

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

code,
kbd,
pre {
  font-family: var(--mono);
  font-variant-ligatures: none;
}

kbd {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.82em;
  line-height: 1.5;
}

em {
  font-style: normal;
  color: var(--text);
}

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

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip:focus {
  transform: none;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.accent {
  color: var(--accent);
}
.green {
  color: var(--green);
}
.red {
  color: var(--red);
}
.amber {
  color: var(--amber);
}
.dim {
  color: var(--text-dim);
}
.faint {
  color: var(--text-faint);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #141418;
  font: 600 15px/1 var(--sans);
  font-stretch: 105%;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 8px 24px -10px rgba(155, 140, 247, 0.6);
  transition:
    transform 0.35s var(--ease-out),
    background-color 0.2s,
    box-shadow 0.35s var(--ease-out);
}
.btn:hover {
  background: #aa9df9;
  color: #141418;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 14px 30px -12px rgba(155, 140, 247, 0.75);
}
.btn:active {
  transform: translateY(0);
  transition-duration: 0.08s;
}

.btn-meta {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(20, 20, 24, 0.14);
  font: 500 12px/1.2 var(--mono);
}

.btn-small {
  height: 34px;
  padding: 0 14px;
  font-size: 14px;
  box-shadow: none;
}

.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}
.btn-ghost:hover {
  border-color: var(--accent-line);
  background: var(--surface-2);
  color: var(--text);
  box-shadow: none;
}

.cmd {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: 14px/1 var(--mono);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}
.cmd:hover {
  border-color: var(--accent-line);
  background: var(--surface-2);
}
.cmd code {
  white-space: nowrap;
}
.cmd-prompt {
  color: var(--accent);
}
.cmd-state {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--text-dim);
}
.cmd-state svg {
  grid-area: 1 / 1;
  transition:
    opacity 0.25s,
    transform 0.4s var(--ease-out);
}
/* Coming soon: a tag in the accent, its dot beating like a tab at work. Solid, so it can sit on a border. */
.soon {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 8px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  color: var(--accent);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.soon::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.js.motion .soon::before {
  animation: tick 1.9s var(--ease-out) infinite;
}
.soon-mini {
  gap: 5px;
  margin-left: 6px;
  padding: 3px 7px 3px 6px;
  font-size: 10px;
  vertical-align: 1px;
}
.soon-mini::before {
  width: 5px;
  height: 5px;
}

/* The winget line: shown, not offered, with the tag set on its top edge like a label on a box. */
.cmd.is-soon {
  position: relative;
  padding-right: 18px;
  color: var(--text-dim);
  cursor: default;
}
.cmd.is-soon:hover {
  border-color: var(--border);
  background: var(--surface);
}
.cmd.is-soon .cmd-prompt {
  color: var(--text-faint);
}
.cmd.is-soon .soon {
  position: absolute;
  top: 0;
  right: 14px;
  transform: translateY(-50%);
}
.line.is-soon {
  flex-wrap: wrap;
  row-gap: 10px;
}
.line.is-soon code {
  color: var(--text-dim);
}
.line.is-soon .ps {
  color: var(--text-faint);
}
.line .soon {
  margin-left: auto;
}

.i-check {
  color: var(--green);
  opacity: 0;
  transform: scale(0.5);
}
.is-copied .i-copy {
  opacity: 0;
  transform: scale(0.5);
}
.is-copied .i-check {
  opacity: 1;
  transform: none;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s,
    border-color 0.3s;
}
.nav.is-scrolled {
  border-color: var(--border-soft);
  background: rgba(23, 23, 27, 0.94);
}

.brand {
  color: var(--text);
  font: 700 16px/1 var(--mono);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover {
  color: var(--text);
}
.brand-prompt {
  color: var(--accent);
}

.nav nav {
  display: flex;
  gap: 4px;
}
.nav nav a {
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 0.2s,
    background-color 0.2s;
}
.nav nav a:hover {
  background: var(--surface);
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-link {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: var(--text-dim);
}
.icon-link:hover {
  background: var(--surface);
  color: var(--text);
}

/* ---------- Story: hero + exploded window ---------- */

.story {
  position: relative;
  height: 640vh;
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(1200px 520px at 50% 118%, rgba(155, 140, 247, 0.16), transparent 70%),
    linear-gradient(var(--bg), var(--bg-deep) 70%, var(--bg));
}

/* A faint floor grid, the plane the layers rise from. */
.stage::before {
  content: '';
  position: absolute;
  inset: 45% -40% -30%;
  background-image:
    linear-gradient(rgba(155, 140, 247, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 140, 247, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(900px) rotateX(62deg);
  transform-origin: 50% 0;
  mask-image: linear-gradient(transparent, #000 30%, transparent 62%);
  opacity: var(--grid, 0.6);
  pointer-events: none;
}

.hero {
  position: absolute;
  top: calc(var(--nav-h) + clamp(28px, 7vh, 88px));
  left: 50%;
  z-index: 3;
  width: min(100% - 2 * var(--gutter), var(--max));
  transform: translateX(-50%);
  will-change: transform, opacity;
}

h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.5rem, 1.2rem + 4.6vw, 5.4rem);
  font-weight: 640;
  font-stretch: 112%;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lede {
  max-width: 56ch;
  margin: 22px 0 0;
  color: var(--text-dim);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.req {
  margin: 14px 0 0;
  color: var(--text-faint);
  font-size: 13px;
}
.req a {
  color: var(--text-dim);
}

/* Hero load-in, once. */
.js .hero > * {
  animation: rise 1s var(--ease-out) both;
}
.js .hero > :nth-child(2) {
  animation-delay: 0.08s;
}
.js .hero > :nth-child(3) {
  animation-delay: 0.16s;
}
.js .hero > :nth-child(4) {
  animation-delay: 0.24s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }
}

.viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
  perspective: 2400px;
  perspective-origin: 50% 30%;
}

.win-note {
  position: absolute;
  right: var(--gutter);
  bottom: 18px;
  z-index: 2;
  margin: 0;
  color: var(--text-faint);
  font: 12px/1.4 var(--mono);
  opacity: var(--note, 1);
}

/* Captions and their rail */
.captions {
  position: absolute;
  top: 50%;
  left: max(var(--gutter), calc((100vw - var(--max)) / 2));
  z-index: 4;
  width: min(390px, 34vw);
  height: 320px;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateY(-58%);
  pointer-events: none;
}

.caption {
  position: absolute;
  inset: 0 0 auto;
  opacity: 0;
  transform: translateY(24px);
  filter: blur(8px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.8s var(--ease-out),
    filter 0.6s var(--ease-out);
}
.caption.is-active {
  opacity: 1;
  transform: none;
  filter: none;
  pointer-events: auto;
}
.caption h2 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 1rem + 1.5vw, 2.5rem);
  font-weight: 620;
  font-stretch: 110%;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.caption p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.6;
}
.caption p code {
  color: var(--text);
  font-size: 0.92em;
}
.caption .caption-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font: 13px/1.6 var(--mono);
}

.rail {
  position: absolute;
  top: calc(50% + 150px);
  left: max(var(--gutter), calc((100vw - var(--max)) / 2));
  z-index: 4;
  display: flex;
  gap: 4px;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.6s var(--ease-out);
  pointer-events: none;
}
.is-exploded .rail {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.rail button {
  position: relative;
  padding: 16px 12px 6px 0;
  border: 0;
  background: none;
  color: var(--text-faint);
  font: 13px/1 var(--mono);
  cursor: pointer;
  transition: color 0.2s;
}
.rail button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--track);
}
.rail button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(var(--fill, 0));
  transform-origin: left;
}
.rail button:hover,
.rail button[aria-current='true'] {
  color: var(--text);
}

/* ---------- The window ---------- */

/* Set every frame on the element that uses them: registered so they do not cascade into the
   hundreds of nodes inside each layer. */
@property --lz {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}
@property --s {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
@property --lo {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
@property --solid {
  syntax: '<number>';
  inherits: false;
  initial-value: 1;
}

.win {
  --z: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 1200px;
  height: 740px;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  color: var(--text);
  font: 13px/1.5 var(--mono);
  will-change: transform;
  user-select: none;
}

.layer {
  position: absolute;
  transform: translateZ(var(--lz, 0px));
  transform-style: preserve-3d;
  transition:
    box-shadow 0.5s var(--ease-out),
    border-color 0.5s;
  backface-visibility: hidden;
}

.l-frame {
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  box-shadow:
    0 50px 100px -30px rgba(0, 0, 0, 0.7),
    0 30px 60px -40px rgba(155, 140, 247, 0.35);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
  white-space: nowrap;
}
.tb-brand b {
  color: var(--accent);
}
.tb-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
}
.tb-title {
  color: var(--text-dim);
}
.tb-title b {
  color: var(--text);
}
.tb-right {
  margin-left: auto;
  color: var(--text-faint);
}
.tb-panel {
  display: grid;
  place-items: center;
  width: 26px;
  height: 22px;
  margin-left: 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
}
.tb-gear {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--text-dim);
}
.tb-ctl {
  display: flex;
  gap: 26px;
  margin-left: 12px;
  color: var(--text-dim);
}

/* The frame's other half: the header over the session, model to view switch. */
.subbar {
  position: absolute;
  top: 68px;
  left: 0;
  width: 880px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 32px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 12px;
}
.subbar .badge-model {
  margin-right: auto;
}
.sb-meta b {
  color: var(--text-dim);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.hintbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 880px;
  display: flex;
  gap: 14px;
  height: 26px;
  padding: 0 14px;
  align-items: center;
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
}
.hintbar b {
  color: var(--accent-dim);
  font-weight: 400;
}
.hint-right {
  margin-left: auto;
}

/* Every raised layer becomes a plate when exploded. */
.l-tabs,
.l-term,
.l-conv,
.l-panel {
  border: 1px solid transparent;
  border-radius: 8px;
}
.is-exploded .l-tabs,
.is-exploded .l-term,
.is-exploded .l-panel {
  border-color: var(--border);
  background: var(--bg);
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.55);
}
.is-exploded .l-conv {
  border-color: var(--border);
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, calc(0.55 * var(--solid, 1)));
}
.is-exploded .layer.is-lit {
  border-color: var(--accent-line);
  box-shadow:
    0 40px 60px -24px rgba(0, 0, 0, 0.6),
    0 0 0 1px var(--accent-line);
}

.l-tabs {
  top: 36px;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  height: 32px;
  padding: 0 10px;
  border-bottom-color: var(--border-soft);
  border-radius: 0;
  font-size: 12px;
}
.is-exploded .l-tabs {
  border-radius: 8px;
}
.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  color: var(--text-dim);
  white-space: nowrap;
}
.tab.is-active {
  box-shadow: inset 0 -2px 0 var(--accent);
  color: var(--text);
  font-weight: 700;
}
.tab-x {
  margin-left: 4px;
  color: var(--text-dim);
}
.tab-git {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 400;
}
.tab-branch {
  color: var(--accent-dim);
}
.tab-dirty {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}
.tab-add {
  color: var(--text-faint);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  transition:
    background-color 0.3s,
    box-shadow 0.3s;
}
.dot:not([data-status]) {
  display: none;
}
.dot[data-status='working'] {
  background: var(--text-dim);
  animation: tab-pulse 1.6s ease-in-out infinite;
}
.dot[data-status='waiting'] {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(214, 169, 106, 0.28);
}
.dot[data-status='unread'] {
  background: var(--accent);
}
@keyframes tab-pulse {
  50% {
    opacity: 0.3;
  }
}

.l-term,
.l-conv {
  top: 100px;
  left: 0;
  bottom: 26px;
  width: 880px;
  border-radius: 0;
}
.l-term {
  display: flex;
  flex-direction: column;
}
.is-exploded .l-term,
.is-exploded .l-conv {
  border-radius: 8px;
}

/* The switch between the two views of one session, in the window and in the glimpse, drawn as the app draws it. */
.view-pick {
  display: inline-flex;
  flex: none;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.7;
}
.view-pick > * {
  padding: 0 9px;
  color: var(--text-faint);
  font-style: normal;
  font-weight: 400;
  transition:
    background-color 0.35s var(--ease-out),
    color 0.35s var(--ease-out);
}
.view-pick b,
.win[data-view='chat'] [data-v='chat'],
.win[data-view='terminal'] [data-v='terminal'] {
  background: var(--accent-soft);
  color: var(--accent);
}
.subbar .view-pick {
  margin-left: 0;
}

.badge-model {
  padding: 1px 8px;
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
}
.badge-model i {
  margin-left: 4px;
  color: var(--cyan);
  font-style: normal;
}
/* Output runs from the top until the screen is full, then scrolls: the newest line stays in view. */
.term-body,
.cl-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
  overflow: hidden;
}
.term-body {
  flex: 1;
  padding: 0 18px;
}
.term-scroll,
.cl-scroll {
  flex: none;
  min-height: 100%;
}
.term-scroll {
  padding-top: 20px;
}
.cc-head {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
  line-height: 1.55;
}
.cc-prompt {
  min-height: 24px;
  margin: 0 -8px 14px;
  padding: 2px 8px;
  background: var(--surface-2);
  font-weight: 600;
}
.caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.cc-line {
  display: flex;
  gap: 10px;
  max-width: 820px;
  margin: 0 0 14px 8px;
}
.cc-line b {
  font-weight: 700;
}
.cc-sub {
  display: block;
  padding-left: 4px;
  color: var(--text-dim);
}
.bullet {
  color: var(--text);
  font-size: 10px;
  line-height: 19.5px;
}
.spin {
  display: inline-block;
  color: #d97757;
}
.term-input {
  padding: 0 10px 8px;
  font-size: 12.5px;
}
.term-line {
  white-space: nowrap;
}
.term-line .caret {
  margin: 0 6px 0 0;
}
.term-input > div {
  padding: 5px 0;
}
.term-input .term-rule {
  height: 1px;
  padding: 0;
  background: var(--border);
}

/* The conversation plate: the app's own view of the turn, over the terminal. --solid and --ink
   thin it to a pane of glass when the story looks at the terminal underneath. */
.l-conv {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: rgb(23 23 27 / var(--solid, 1));
}
.l-conv > * {
  opacity: var(--ink, 1);
}
.cl-list {
  padding: 0 20px;
}
.cl-scroll {
  padding: 12px 0 6px;
}
.cl-turn {
  max-width: 640px;
  margin: 0 auto;
  padding: 10px 3px 14px;
}
.cl-turn + .cl-turn {
  border-top: 1px solid var(--border-soft);
}
.cl-prompt {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.cl-prompt p {
  max-width: 86%;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 10px 10px 2px 10px;
  background: var(--surface-2);
}
.cl-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cl-md {
  margin: 0;
  line-height: 1.7;
}
.cl-md code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface-2);
  font-size: 1em;
}
.cl-run {
  padding: 0 10px;
  color: var(--text-dim);
}
/* The panel's disclosure mark, closed. */
.cl-run::before {
  content: '';
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  transform: rotate(-90deg);
}
.cl-card {
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--surface);
  transition: border-color 0.5s var(--ease-out);
}
.cl-card.is-running {
  border-color: var(--accent-line);
}
.cl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: var(--surface-2);
}
.cl-head b {
  font-weight: 600;
}
.cl-target {
  color: var(--text-dim);
}
.cl-counts {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
  font-size: 11px;
}
.cl-meta {
  min-width: 34px;
  color: var(--text-dim);
  font-size: 11px;
  text-align: right;
}
.cl-counts.is-off + .cl-meta {
  margin-left: auto;
}
.cl-card.is-running .cl-meta {
  color: var(--accent);
}
.cl-card.is-running .cl-meta::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  animation: tab-pulse 1.4s var(--ease-out) infinite;
}
/* The diff opens when the edit lands. */
.cl-diff {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s var(--ease-out);
}
.cl-card.is-done .cl-diff {
  grid-template-rows: 1fr;
}
.cl-diff > div {
  min-height: 0;
  overflow: hidden;
}
.cl-diff p {
  display: grid;
  grid-template-columns: 34px 34px 18px minmax(0, 1fr);
  margin: 0;
  font-size: 12px;
  line-height: 19px;
  white-space: pre;
}
.cl-diff p:first-child {
  border-top: 1px solid var(--border-soft);
}
.cl-diff i {
  padding-right: 8px;
  color: var(--text-faint);
  font-style: normal;
  text-align: right;
}
.cl-diff i:nth-child(3) {
  padding: 0;
  color: inherit;
  text-align: center;
}
.cl-diff .d-del {
  background: rgba(224, 108, 117, 0.13);
}
.cl-diff .d-add {
  background: rgba(110, 192, 138, 0.12);
}
.cl-foot {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 11px;
}
.cl-working {
  color: var(--accent);
}
.cl-hint {
  color: var(--text-faint);
}
/* Words arrive in place: the answer wraps once, where it will end up. */
[data-c-answer] > span {
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
[data-c-answer] > span.on {
  opacity: 1;
}

.cl-comp {
  display: grid;
  gap: 5px;
  padding: 0 20px 10px;
}
.cl-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 7px 7px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.cl-field {
  overflow: hidden;
  line-height: 1.5;
  white-space: nowrap;
}
.cl-caret {
  display: inline-block;
  width: 1.5px;
  height: 15px;
  margin: 0 1px;
  vertical-align: -3px;
  background: var(--text);
  animation: blink 1.05s steps(1) infinite;
}
.cl-ph {
  color: var(--text-dim);
}
.cl-send {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-faint);
  transition:
    background-color 0.16s var(--ease-out),
    color 0.16s var(--ease-out),
    transform 0.16s var(--ease-out);
}
.cl-send.is-ready {
  background: var(--accent-soft);
  color: var(--accent);
}
.cl-send.is-pressed {
  transform: scale(0.88);
}
.cl-cfoot {
  display: flex;
  justify-content: flex-end;
  min-height: 16px;
  padding: 0 4px;
  color: var(--text-dim);
  font-size: 11px;
}

/* What the turn adds, it adds from below; when the demo starts over, the turn fades first. */
.win .is-off {
  display: none;
}
.cl-turn,
.t-turn {
  transition: opacity 0.45s var(--ease-out);
}
.win .is-leaving {
  opacity: 0;
}
.js.motion .win [data-t-prompt],
.js.motion .win [data-t-read],
.js.motion .win [data-t-edit],
.js.motion .win [data-t-edited],
.js.motion .win [data-t-answer],
.js.motion .win [data-t-done],
.js.motion .win [data-c-ask],
.js.motion .win [data-c-read],
.js.motion .win [data-c-edit],
.js.motion .win [data-c-answer],
.js.motion .win [data-c-foot] {
  animation: arrive 0.5s var(--ease-out) both;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Leader lines: a hairline from each raised corner down to the frame, standing up out of its plane. */
.lead {
  position: absolute;
  width: 1px;
  height: 100px;
  margin-left: -0.5px;
  background: linear-gradient(rgba(155, 140, 247, 0), rgba(155, 140, 247, 0.55));
  transform-origin: 50% 0;
  transform: rotateX(90deg) scaleY(var(--s, 0));
  opacity: var(--lo, 0);
  pointer-events: none;
}

.l-panel {
  top: 68px;
  right: 0;
  bottom: 0;
  width: 320px;
  border-left-color: var(--border-soft);
  border-radius: 0;
  font-size: 12px;
  overflow: hidden;
}
/* The grip on the panel's left edge: it resizes. */
.pn-grip {
  position: absolute;
  top: calc(50% - 16px);
  left: 2px;
  width: 3px;
  height: 32px;
  border-radius: 2px;
  background: var(--accent-line);
}
.pn-fold .pn-h {
  margin-bottom: 0;
}
.pn-chev {
  margin-right: 6px;
  vertical-align: 0;
}
.trend {
  display: block;
  width: 100%;
  height: 44px;
  margin-bottom: 4px;
}
.bar small {
  margin-left: 4px;
  font-size: 10.5px;
}
.is-exploded .l-panel {
  border-radius: 8px;
}
.pn-sec {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.pn-last {
  border-bottom: 0;
}
.pn-h {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--text-faint);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}
.pn-h b {
  font-weight: 400;
}
.ctx {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 11.5px;
  line-height: 1.45;
}
.ctx-arc {
  transition: stroke-dasharray 0.6s var(--ease-out);
}
.ctx-pct {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}
.ctx-pct small {
  font-size: 11px;
}
.kv {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}
.kv b,
.bar b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bar {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 3px 0 9px;
}
.bar i {
  position: absolute;
  left: 0;
  bottom: 3px;
  width: 100%;
  height: 2px;
  background: var(--track);
}
.bar i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(var(--w));
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
.cost {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.cost > b {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.today {
  margin-left: auto;
  color: var(--text-dim);
}
.today b {
  color: var(--amber);
}
.curve {
  display: block;
  width: 100%;
  height: 36px;
}
.chat {
  display: grid;
  padding: 5px 8px;
  margin: 0 -8px;
  border-radius: 4px;
}
.chat b {
  font-weight: 700;
}
.chat span {
  color: var(--text-faint);
  font-size: 11px;
}
.chat.is-current {
  background: var(--accent-soft);
}

.l-toast {
  right: 22px;
  bottom: 44px;
  width: 340px;
}
.toast {
  display: grid;
  gap: 2px;
  padding: 14px 16px 16px;
  border: 1px solid #3a3a45;
  border-radius: 8px;
  background: #2b2b33;
  font: 13px/1.4 'Segoe UI Variable Text', 'Segoe UI', var(--sans);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.7s var(--ease-out);
}
.toast.is-shown,
.is-exploded .toast {
  opacity: 1;
  transform: none;
}
.toast-app {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 12px;
}
.toast-app img {
  border-radius: 3px;
}
.toast b {
  font-weight: 600;
}
.toast span {
  color: #c9c9d3;
}

/* ---------- Sections ---------- */

.talk,
.own,
.tasks,
.recall,
.updates,
.install,
.privacy,
.faq {
  position: relative;
  padding: clamp(96px, 14vw, 180px) 0 0;
}

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

.h-section {
  margin: 0;
  font-size: clamp(2.1rem, 1.2rem + 3vw, 3.8rem);
  font-weight: 640;
  font-stretch: 110%;
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-lede {
  max-width: 58ch;
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.15rem);
  text-wrap: pretty;
}
.install .section-lede {
  margin-top: 22px;
}

.fine {
  max-width: 62ch;
  margin: 20px 0 0;
  color: var(--text-faint);
  font-size: 14px;
}
.fine code,
.section-lede code {
  color: var(--text-dim);
}

/* Conversation: a glimpse of the view beside what it is made of. */
.talk-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin: clamp(56px, 7vw, 88px) 0 0;
}
.talk-grid .secs {
  margin-top: 0;
}

.cv {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-deep);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  font: 12.5px/1.6 var(--mono);
}
.cv-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 11.5px;
}
.cv-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-flow {
  display: grid;
  gap: 10px;
  padding: 14px 14px 0;
}
.cv-ask {
  margin: 0;
  padding: 8px 11px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 500;
}
.cv-said {
  display: flex;
  gap: 9px;
  padding: 0 2px;
}
.cv-said b {
  color: #d97757;
  font-weight: 400;
}
.cv-said p {
  margin: 0;
  color: var(--text-dim);
  font: 14px/1.55 var(--sans);
}
.cv-card {
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
}
.cv-card.is-live {
  border-color: var(--accent-line);
}
.cv-card-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: var(--text-dim);
}
.cv-card-h code {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-kind {
  flex: none;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text-dim);
  font-size: 11px;
}
.cv-count {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--text-faint);
  font-size: 11.5px;
}
.cv-count b {
  font-weight: 400;
}
.cv-tick {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.js.motion .cv-tick {
  animation: tick 1.9s var(--ease-out) infinite;
}
@keyframes tick {
  from {
    box-shadow: 0 0 0 0 rgba(155, 140, 247, 0.45);
  }
  to {
    box-shadow: 0 0 0 7px rgba(155, 140, 247, 0);
  }
}
.cv-hunk {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-deep);
  font-size: 11.5px;
}
.cv-hunk div {
  overflow: hidden;
  padding: 2px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-hunk i {
  display: inline-block;
  width: 30px;
  color: var(--text-faint);
  font-style: normal;
}
.cv-del {
  background: rgba(224, 108, 117, 0.11);
  color: #eda6ac;
}
.cv-add {
  background: rgba(110, 192, 138, 0.11);
  color: #9ed8b2;
}
.cv-row {
  overflow: hidden;
  padding: 0 2px;
  color: var(--text-faint);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-row code {
  color: var(--text-dim);
}
.cv-work {
  margin: 0 0 4px 2px;
  color: var(--text-faint);
  font-size: 11.5px;
}

.cv-comp {
  margin: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.cv-menu {
  padding: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.cv-menu div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 4px 8px;
  border-radius: 6px;
}
.cv-menu div.is-on {
  background: var(--surface-3);
}
.cv-menu b {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 400;
}
.cv-menu span {
  overflow: hidden;
  color: var(--text-dim);
  font: 12px/1.6 var(--sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-field {
  padding: 10px 11px 12px;
  color: var(--text);
}
.cv-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 11px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 11px;
}
.cv-foot b {
  color: var(--accent-dim);
  font-weight: 400;
}

/* The glimpse assembles itself once, top to bottom. */
.cv-flow > *,
.cv-comp {
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.8s var(--ease-out);
}
.js.motion .cv:not(.in) .cv-flow > *,
.js.motion .cv:not(.in) .cv-comp {
  opacity: 0;
  transform: translateY(12px);
}
.cv-flow > :nth-child(2) {
  transition-delay: 0.08s;
}
.cv-flow > :nth-child(3) {
  transition-delay: 0.16s;
}
.cv-flow > :nth-child(4) {
  transition-delay: 0.24s;
}
.cv-flow > :nth-child(5) {
  transition-delay: 0.32s;
}
.cv-flow > :nth-child(6) {
  transition-delay: 0.4s;
}
.cv-comp {
  transition-delay: 0.48s;
}

/* Updates timeline: a rule that draws itself, four stops on it. */
.timeline {
  --draw: 1;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: clamp(56px, 7vw, 88px) 0 0;
  padding: 36px 0 0;
  list-style: none;
}
.timeline::before,
.timeline::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.timeline::after {
  height: 2px;
  top: -0.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent) 70%, var(--green));
  transform: scaleX(var(--draw));
  transform-origin: left;
  transition: transform 1.6s var(--ease-out);
}
.timeline li {
  position: relative;
  display: grid;
  gap: 4px;
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.9s var(--ease-out);
}
.timeline li::before {
  content: '';
  position: absolute;
  top: -41px;
  left: 0;
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}
.timeline li:last-child::before {
  border-color: var(--green);
  background: var(--green);
}
.timeline time {
  color: var(--accent);
  font: 13px/1.4 var(--mono);
}
.timeline li:last-child time {
  color: var(--green);
}
.timeline b {
  font-size: 1.15rem;
  font-weight: 600;
  font-stretch: 105%;
  letter-spacing: -0.01em;
}
.timeline span {
  color: var(--text-dim);
  font-size: 14px;
}

.js.motion .timeline:not(.in) {
  --draw: 0;
}
.js.motion .timeline:not(.in) li {
  opacity: 0;
  transform: translateY(14px);
}
.timeline li:nth-child(2) {
  transition-delay: 0.25s;
}
.timeline li:nth-child(3) {
  transition-delay: 0.5s;
}
.timeline li:nth-child(4) {
  transition-delay: 0.75s;
}

/* Panel: the sections list and a panel you can resize and fold. */
.secs {
  display: grid;
  gap: 18px;
  margin: 36px 0 0;
}
.secs div {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.secs dt {
  font-size: 1.08rem;
  font-weight: 600;
  font-stretch: 105%;
}
.secs dd {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 15px;
  text-wrap: pretty;
}
.secs code {
  color: var(--text);
  font-size: 0.9em;
}

.play {
  display: grid;
  gap: 14px;
}
.play-stage {
  --pw: 300px;
  position: relative;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-deep);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.play-term {
  position: absolute;
  top: 24px;
  left: 20px;
  right: calc(var(--pw) + 20px);
  display: grid;
  gap: 16px;
}
.play-term i {
  display: block;
  width: calc(var(--l) * 100%);
  height: 7px;
  border-radius: 4px;
  background: var(--surface-2);
}
.play-term i:nth-child(4) {
  background: var(--accent-soft);
}

.mini {
  position: relative;
  flex: none;
  width: var(--pw);
  max-width: 100%;
  border-left: 1px solid var(--border-soft);
  background: var(--bg);
  font: 12px/1.5 var(--mono);
}
.mini-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -7px;
  z-index: 2;
  width: 14px;
  cursor: ew-resize;
  touch-action: none;
}
.mini-edge::before {
  content: '';
  position: absolute;
  top: calc(50% - 20px);
  left: 5px;
  width: 4px;
  height: 40px;
  border-radius: 2px;
  background: var(--accent-line);
  transition:
    background-color 0.2s,
    transform 0.4s var(--ease-out);
}
.mini-edge:hover::before,
.mini-edge:focus-visible::before,
.mini-edge.is-drag::before {
  background: var(--accent);
  transform: scaleY(1.6);
}
.mini-edge:focus-visible {
  outline-offset: -3px;
}
.mini-width {
  position: absolute;
  top: calc(50% + 40px);
  right: 16px;
  padding: 2px 7px;
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition:
    opacity 0.25s,
    transform 0.4s var(--ease-out);
  pointer-events: none;
}
.mini-edge:hover .mini-width,
.mini-edge:focus-visible .mini-width,
.mini-edge.is-drag .mini-width {
  opacity: 1;
  transform: none;
}

.mini-sec {
  position: relative;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
}
.mini-sec:last-child {
  border-bottom: 0;
}
.mini-h {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: none;
  color: var(--text-faint);
  font: 10.5px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}
.mini-h:hover {
  color: var(--text-dim);
}
.mini-h:focus-visible {
  outline-offset: -3px;
}
.mini-h .pn-chev {
  flex: none;
  margin: 0;
  transition: transform 0.4s var(--ease-out);
}
.mini-val {
  margin-left: auto;
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0;
  opacity: 0;
  transform: translateX(8px);
  transition:
    opacity 0.3s,
    transform 0.45s var(--ease-out);
}
.is-folded .mini-val {
  opacity: 1;
  transform: none;
}
.is-folded .mini-h .pn-chev {
  transform: rotate(-90deg);
}
.mini-body {
  display: grid;
  grid-template-rows: 1fr;
  padding: 0 14px;
  transition: grid-template-rows 0.45s var(--ease-out);
}
.is-folded .mini-body {
  grid-template-rows: 0fr;
}
.mini-in {
  min-height: 0;
  overflow: hidden;
}
.mini-in > :last-child {
  margin-bottom: 14px;
}
.mini-chart {
  display: block;
  width: 100%;
  height: 60px;
  margin-bottom: 6px;
}
.mini-axis {
  display: none;
  justify-content: space-between;
  margin: -2px 0 6px;
  color: var(--text-faint);
  font-size: 10.5px;
}
.mini-pair {
  display: grid;
  gap: 6px 20px;
}
.mini-pair small {
  font-size: 10.5px;
}
.mini-more {
  display: none;
}
.mini-models {
  display: grid;
  gap: 0 16px;
  margin: 8px 0 4px;
}
.is-wide .mini-axis,
.is-wide .mini-more {
  display: flex;
}
.is-wide .mini-pair {
  grid-template-columns: 1fr 1fr;
}
.is-wide .mini-models {
  grid-template-columns: repeat(3, 1fr);
}
.play-hint {
  margin: 0;
  color: var(--text-faint);
  font-size: 14px;
}

/* Tasks: a repository and the branches its tasks grow. */
.fork {
  --draw: 1;
  position: relative;
  display: grid;
  gap: 14px;
  margin: clamp(56px, 7vw, 88px) 0 0;
  padding: 0 0 0 32px;
  list-style: none;
}
.fork::before {
  content: '';
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 4px;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(var(--accent), var(--accent-line));
  transform: scaleY(var(--draw));
  transform-origin: top;
  transition: transform 1s var(--ease-out);
}
.fk {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  min-height: 44px;
}
.fk::before {
  content: '';
  position: absolute;
  top: calc(50% - 6px);
  left: -32px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}
.fk::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -20px;
  width: 20px;
  height: 1px;
  background: var(--accent-line);
}
.fk-base::before {
  background: var(--accent);
}
.fk-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font: 600 13px/1 var(--mono);
}
.fk-br {
  color: var(--text-dim);
  font-size: 13px;
}
.fk-ahead {
  margin-left: 4px;
  color: var(--green);
}
.fk-line {
  flex: 1;
  min-width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--border), var(--accent-line));
  transform: scaleX(var(--draw));
  transform-origin: left;
  transition: transform 1.1s var(--ease-out) calc(0.25s + var(--i, 0) * 0.18s);
}
.fk-end {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: 13px/1.2 var(--mono);
  transition:
    opacity 0.6s var(--ease-out) calc(0.8s + var(--i, 0) * 0.18s),
    transform 0.8s var(--ease-out) calc(0.8s + var(--i, 0) * 0.18s);
}
.fk-keep {
  border-color: transparent;
  color: var(--text-faint);
  font-family: var(--sans);
  font-size: 14px;
}
.fk-merge {
  border-color: rgba(110, 192, 138, 0.45);
  background: rgba(110, 192, 138, 0.08);
  color: var(--green);
}
.fk-pr {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.fk-drop {
  border-color: rgba(224, 108, 117, 0.4);
  color: var(--red);
}
.js.motion .fork:not(.in) {
  --draw: 0;
}
.js.motion .fork:not(.in) .fk-end {
  opacity: 0;
  transform: translateX(-10px);
}

.ends {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(48px, 6vw, 72px) 0 0;
  border-top: 1px solid var(--border);
}
.ends div {
  padding: 22px 24px 0 0;
}
.ends div + div {
  padding-left: 24px;
  border-left: 1px solid var(--border);
}
.ends dt {
  font-size: 1.15rem;
  font-weight: 600;
  font-stretch: 105%;
}
.ends dd {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 15px;
  text-wrap: pretty;
}

.tasks-notes {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(48px, 6vw, 72px);
}
.tasks-notes p {
  max-width: 62ch;
  margin: 0;
  color: var(--text-dim);
}
.tasks-notes b {
  color: var(--text);
  font-weight: 600;
}
.tasks-notes .fine {
  font-size: 14px;
}

/* History: timeline, search and cost analysis, each with a glimpse of its window. */
.rc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px);
  margin-top: clamp(56px, 7vw, 88px);
}
.rc-screen {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 216px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-deep);
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.8);
  font: 12px/1.5 var(--mono);
}
.rc h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 24px 0 8px;
  font-size: 1.2rem;
  font-weight: 600;
  font-stretch: 105%;
  letter-spacing: -0.01em;
}
.rc-keys {
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 400;
}
.rc p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  text-wrap: pretty;
}
.rc p code {
  color: var(--text);
  font-size: 0.9em;
}
.rc-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
}
.tl-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  margin: 0 -6px;
  padding: 2px 6px;
  border-radius: 4px;
}
.tl-row time {
  color: var(--text-faint);
}
.tl-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-row b {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}
.tl-row.is-sel {
  background: var(--accent-soft);
}
.tl-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-dim);
  font-size: 11px;
  white-space: nowrap;
}
.tl-mark::before,
.tl-mark::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.rc-foot {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: auto;
}
.rc-btn {
  padding: 2px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  color: var(--accent);
  font-size: 11px;
}
.rc-search {
  padding: 6px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--surface);
  white-space: nowrap;
}
.rc-search .caret {
  width: 7px;
  height: 13px;
}
.rc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rc-chips span {
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-faint);
  font-size: 11px;
}
.rc-chips .is-on {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.sr-row {
  display: grid;
  gap: 1px;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
}
.sr-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-row span:last-child {
  color: var(--text-dim);
}
mark {
  padding: 0 2px;
  border-radius: 2px;
  background: var(--accent-soft);
  color: var(--text);
}
.rc-weeks {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 64px;
  margin: 6px 0 4px;
  border-bottom: 1px solid var(--border);
}
.rc-weeks i {
  flex: 1;
  height: calc(var(--h) * 100%);
  border-radius: 3px 3px 0 0;
  background: var(--surface-3);
}
.rc-weeks i:last-child {
  background: var(--accent);
}
.rc-screen .kv b {
  font-weight: 400;
}

/* Install console */
.console {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-deep);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.console-tabs {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 8px 8px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overflow-x: auto;
  scrollbar-width: none;
}
.console-tabs button {
  position: relative;
  z-index: 1;
  padding: 10px 16px 12px;
  border: 0;
  background: none;
  color: var(--text-dim);
  font: 500 14px/1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
}
.console-tabs button:hover,
.console-tabs button[aria-selected='true'] {
  color: var(--text);
}
.console-tabs button:focus-visible {
  outline-offset: -4px;
}
.console-ink {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100px;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s var(--ease-out);
}
.console-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: start;
  min-height: 190px;
  padding: 28px 24px;
  animation: panel-in 0.5s var(--ease-out);
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.line {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  font: 15px/1.5 var(--mono);
}
.line code {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ps {
  flex: none;
  color: var(--accent);
}
.copy {
  flex: none;
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-dim);
  font: 500 13px/1 var(--sans);
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s,
    background-color 0.2s;
}
.copy:hover {
  border-color: var(--accent-line);
  color: var(--text);
}
.copy.is-copied {
  border-color: rgba(110, 192, 138, 0.5);
  color: var(--green);
}
.console-out {
  margin: 4px 0 0;
  color: var(--text-faint);
  font-size: 14px;
}
.console-out code {
  color: var(--text-dim);
}
.console-file {
  margin: 0;
  color: var(--text-dim);
  font: 15px/1.5 var(--mono);
}

/* Privacy */
.h-statement {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.4rem, 1rem + 4.6vw, 5.2rem);
  font-weight: 640;
  font-stretch: 112%;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.dim-h {
  color: var(--text-faint);
}
.privacy-lede {
  margin-top: 24px;
}
.reads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(48px, 6vw, 80px) 0 0;
  border-top: 1px solid var(--border);
}
.reads div {
  padding: 22px 24px 28px 0;
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.9s var(--ease-out);
}
.reads div:not(:nth-child(3n + 1)) {
  padding-left: 24px;
  border-left: 1px solid var(--border);
}
.reads div:nth-child(n + 4) {
  border-top: 1px solid var(--border);
}
.reads dt code {
  color: var(--text);
  font-size: 15px;
}
.reads dd {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 14px;
}
.reads div:last-child dt code {
  color: var(--amber);
}
.js.motion .reads:not(.in) div {
  opacity: 0;
  transform: translateY(14px);
}
.reads div:nth-child(2) {
  transition-delay: 0.1s;
}
.reads div:nth-child(3) {
  transition-delay: 0.2s;
}
.reads div:nth-child(4) {
  transition-delay: 0.3s;
}
.reads div:nth-child(5) {
  transition-delay: 0.4s;
}
.reads div:nth-child(6) {
  transition-delay: 0.5s;
}
.reads div:nth-child(7) {
  transition-delay: 0.6s;
}
.reads div:nth-child(8) {
  transition-delay: 0.7s;
}

/* FAQ */
.faq-list {
  border-top: 1px solid var(--border);
  interpolate-size: allow-keywords;
}
details {
  border-bottom: 1px solid var(--border);
}
summary {
  position: relative;
  display: block;
  padding: 22px 48px 22px 0;
  font-size: 1.12rem;
  font-weight: 560;
  font-stretch: 104%;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s;
}
summary::-webkit-details-marker {
  display: none;
}
summary:hover {
  color: #fff;
}
summary::before,
summary::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 8px;
  width: 14px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--text-dim);
  transition:
    transform 0.45s var(--ease-out),
    background-color 0.2s;
}
summary::after {
  transform: rotate(90deg);
}
details[open] summary::after {
  transform: rotate(0deg);
}
details[open] summary::before,
details[open] summary::after {
  background: var(--accent);
}
details::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 0.5s var(--ease-out),
    content-visibility 0.5s allow-discrete;
}
details[open]::details-content {
  block-size: auto;
}
.faq-body {
  padding: 0 0 24px;
  color: var(--text-dim);
}
.faq-body p {
  max-width: 64ch;
  margin: 0;
}
.faq-body p + p {
  margin-top: 12px;
}
.faq-body code {
  color: var(--text);
  font-size: 0.9em;
}
.faq-body pre {
  margin: 14px 0 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-deep);
  font-size: 13px;
  white-space: pre;
}

/* Close */
.close {
  padding: clamp(120px, 16vw, 220px) 0 clamp(96px, 12vw, 160px);
  background: radial-gradient(900px 420px at 50% 100%, rgba(155, 140, 247, 0.13), transparent 70%);
  text-align: center;
}
.close-prompt {
  margin: 0 0 20px;
  font: 700 28px/1 var(--mono);
}
.close-prompt .caret {
  width: 14px;
  height: 26px;
  margin-left: 6px;
  vertical-align: -4px;
}
.h-display {
  margin: 0 auto;
  font-size: clamp(2.5rem, 1rem + 5.4vw, 6rem);
  font-weight: 660;
  font-stretch: 114%;
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.close .hero-actions {
  justify-content: center;
  margin-top: 40px;
}

.foot {
  padding: 28px 0 36px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 14px;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}
.foot-meta a,
.foot-links a {
  color: var(--text-dim);
  text-decoration: none;
}
.foot-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
.foot-links a:hover,
.foot-meta a:hover {
  color: var(--text);
}

/* ---------- Static mode: small screens, reduced motion, no JS ---------- */

:is(.is-static, html:not(.js)) .story {
  height: auto;
}
:is(.is-static, html:not(.js)) .stage {
  position: relative;
  height: auto;
  overflow: visible;
  padding: calc(var(--nav-h) + 40px) 0 0;
  background: radial-gradient(900px 500px at 50% 60%, rgba(155, 140, 247, 0.12), transparent 70%);
}
:is(.is-static, html:not(.js)) .stage::before {
  display: none;
}
:is(.is-static, html:not(.js)) .hero {
  position: relative;
  top: 0;
  left: 0;
  margin-inline: auto;
  transform: none;
}
:is(.is-static, html:not(.js)) .viewport {
  position: relative;
  inset: auto;
  width: min(100% - 2 * var(--gutter), var(--max));
  height: var(--vh-static, 420px);
  margin: 48px auto 0;
  perspective: none;
}
:is(.is-static, html:not(.js)) .win-note {
  position: static;
  width: min(100% - 2 * var(--gutter), var(--max));
  margin: 12px auto 0;
  text-align: right;
}
:is(.is-static, html:not(.js)) .captions {
  position: relative;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 40px 48px;
  width: min(100% - 2 * var(--gutter), var(--max));
  height: auto;
  margin: 72px auto 0;
  transform: none;
  pointer-events: auto;
  order: 5;
}
:is(.is-static, html:not(.js)) .caption {
  position: relative;
  opacity: 1;
  transform: none;
  filter: none;
}
:is(.is-static, html:not(.js)) .caption h2 {
  font-size: 1.45rem;
}
:is(.is-static, html:not(.js)) .rail {
  display: none;
}
:is(.is-static, html:not(.js)) .toast {
  opacity: 1;
  transform: none;
}
:is(.is-static, html:not(.js)) .lead {
  display: none;
}
:is(.is-static, html:not(.js)) .stage {
  display: flex;
  flex-direction: column;
}
:is(.is-static, html:not(.js)) .hero {
  order: 1;
}
:is(.is-static, html:not(.js)) .viewport {
  order: 2;
}
:is(.is-static, html:not(.js)) .win-note {
  order: 3;
}

/* Eight section links need the room the wide nav takes. */
@media (max-width: 1060px) {
  .nav {
    gap: 16px;
  }
  .nav nav {
    gap: 0;
  }
  .nav nav a {
    padding: 6px 8px;
  }
}

@media (max-width: 860px) {
  .nav nav {
    display: none;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .talk-grid {
    grid-template-columns: 1fr;
  }
  .cv {
    position: static;
    max-width: 560px;
  }
  .timeline {
    grid-template-columns: 1fr 1fr;
    gap: 40px 24px;
  }
  .reads {
    grid-template-columns: 1fr 1fr;
  }
  .reads div,
  .reads div:not(:nth-child(3n + 1)) {
    padding-left: 0;
    border-left: 0;
  }
  .reads div:nth-child(even) {
    padding-left: 24px;
    border-left: 1px solid var(--border);
  }
  .reads div:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
  .ends,
  .rc-grid,
  .tasks-notes {
    grid-template-columns: 1fr;
  }
  .ends div + div {
    padding-left: 0;
    border-left: 0;
  }
  .ends div {
    padding-bottom: 22px;
  }
  .ends div + div {
    border-top: 1px solid var(--border);
  }
  .rc-grid {
    gap: 56px;
  }
  .rc {
    max-width: 560px;
  }
  .talk-grid {
    gap: 44px;
  }
  .foot-links {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .cv {
    font-size: 11.5px;
  }
  .cv-menu div {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
  }
  .cv-meta {
    display: none;
  }
  h1 {
    font-size: clamp(2rem, 1rem + 5.4vw, 2.5rem);
    font-stretch: 100%;
  }
  .h-statement,
  .h-display {
    font-stretch: 100%;
  }
  .win-note {
    font-size: 11px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    row-gap: 20px;
  }
  .btn,
  .cmd {
    justify-content: center;
  }
  .cmd code {
    font-size: 13px;
  }
  .timeline {
    grid-template-columns: 1fr;
    padding: 0 0 0 28px;
    gap: 28px;
  }
  .timeline::before,
  .timeline::after {
    top: 0;
    bottom: 0;
    left: 4px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .timeline::after {
    width: 2px;
    left: 3.5px;
    background: linear-gradient(var(--accent), var(--accent) 70%, var(--green));
    transform: scaleY(var(--draw));
    transform-origin: top;
  }
  .timeline li::before {
    top: 6px;
    left: -28px;
  }
  .reads {
    grid-template-columns: 1fr;
  }
  .reads div,
  .reads div:nth-child(even) {
    padding: 20px 0 22px;
    border-left: 0;
  }
  .reads div:nth-child(n + 2) {
    border-top: 1px solid var(--border);
  }
  .fork {
    padding-left: 26px;
  }
  .fork::before {
    top: 30px;
    bottom: 30px;
  }
  .fk {
    gap: 8px 12px;
  }
  .fk::before {
    left: -26px;
  }
  .fk::after {
    left: -14px;
    width: 14px;
  }
  .fk-line {
    display: none;
  }
  .fk-tab {
    height: 30px;
    padding: 0 10px;
  }
  .fk-br {
    flex-basis: 100%;
    order: 3;
    font-size: 12px;
  }
  .fk-keep {
    order: 4;
    padding: 0;
  }
  .line {
    font-size: 13.5px;
  }
  .console-tabs button {
    padding-inline: 12px;
  }
  /* Four tabs fill a phone: the winget tag keeps its dot and says "soon" to screen readers only. */
  .soon-mini {
    padding: 3px;
  }
  .soon-mini > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .console-panel {
    padding: 22px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
