/* The kit: the look every thing site shares, baked into each site's folder
   by `mix sites.render` from sites_src/_kit/. A site re-colours it by setting
   the accent tokens in its own style.css, and adds only what is its own.
   Markup comes from Hostingthing.Sites.Kit; behaviour from kit.js.
   sites/vpsthing is the reference for how the pieces fit, SITES.md for why. */

/* ---------------------------------------------------------------- tokens -- */

:root {
  color-scheme: dark;

  /* one neutral ramp, one accent, one pair for state */
  --bg: #09090b;
  --bg-up: #0f1013;
  --surface: #131418;
  --surface-up: #1a1b20;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.14);
  --lit: rgb(255 255 255 / 0.06);
  --ink: #f4f4f5;
  --muted: #a6a8b1;
  --dim: #858893;
  /* a site sets the accent four in its own style.css; everything
     accent-coloured in the kit derives from them */
  --accent: #f7b32b;
  --accent-bright: #ffcb5c;
  --accent-deep: #d98e0b;
  --accent-ink: #1b1303;
  --window: #15161b;
  --me: "~/box ";
  --ok: #5fe08c;
  --warn: #ff7a66;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* one spacing scale */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4.5rem;
  --s9: 7rem;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 76rem;
  --top: 3.5rem;
  --r: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* the terminal grid: a fixed line box, so main.js can scroll a window by
     whole lines without measuring anything but one line */
  --code: 0.8125rem;
  --lh: 1.65;
}

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

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

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

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


body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

/* lists on these pages are layout (a stack, a grid of cards, a pipeline),
   never bullets */
ol,
ul {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

p {
  text-wrap: pretty;
}

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

code {
  font: 500 0.88em var(--mono);
  color: var(--ink);
  background: var(--surface-up);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.35em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s;
}

a:hover {
  color: var(--accent-bright);
}

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

::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

.warn {
  color: var(--warn);
}

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

.skip {
  position: fixed;
  left: var(--s4);
  top: var(--s2);
  z-index: 100;
  padding: var(--s2) var(--s4);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 2.875rem;
  padding: 0 var(--s5);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12) inset, 0 8px 24px -8px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
}

.btn:hover {
  color: var(--accent-ink);
  background: var(--accent-bright);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18) inset, 0 12px 32px -8px color-mix(in srgb, var(--accent) 55%, transparent);
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong) inset;
}

.btn-ghost:hover {
  background: var(--surface-up);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.22) inset;
}

.btn-sm {
  min-height: 2.125rem;
  padding: 0 var(--s4);
  font-size: 0.875rem;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12) inset;
}

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

.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--top);
  background: rgb(9 9 11 / 0.72);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.top-in {
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--s5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 1.375rem;
  height: 1.375rem;
  color: var(--accent);
}

.brand:hover {
  color: var(--ink);
}

.acts {
  display: flex;
  gap: var(--s1);
  margin-left: auto;
}

.acts a {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.acts a span {
  font: 600 0.72rem var(--mono);
  color: var(--dim);
  margin-right: 0.2rem;
  transition: color 0.2s;
}

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

.acts a.on {
  color: var(--ink);
  background: var(--surface-up);
}

.acts a.on span {
  color: var(--accent);
}

.meter {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 20%, transparent), var(--accent));
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

@media (max-width: 47.99rem) {
  .acts {
    display: none;
  }

  .top .btn-sm {
    margin-left: auto;
  }
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: calc(var(--top) + var(--s8)) var(--gutter) var(--s8);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 90%;
  z-index: -1;
  background: radial-gradient(50% 55% at 50% 40%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%);
  pointer-events: none;
}

.hero-in {
  width: 100%;
  max-width: 50rem;
  text-align: center;
  display: grid;
  /* a track that can shrink: the command's nowrap line would otherwise
     widen the column the moment it finished typing */
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: var(--s5);
}

.eyebrow,
.act-no,
.step-no {
  font: 600 0.75rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.75rem, 9vw, 6.25rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero h1 em {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent) 60%, var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.2rem);
}

.hero-cmd {
  width: min(100%, 34rem);
  margin-top: var(--s3);
  padding: var(--s4) clamp(var(--s4), 4vw, var(--s5));
  text-align: left;
  font: clamp(0.72rem, 3.1vw, 0.9rem) / 1.7 var(--mono);
  background: linear-gradient(var(--surface-up), var(--surface));
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: 0 1px 0 var(--lit) inset, 0 30px 60px -30px rgb(0 0 0 / 0.9), 0 0 0 6px color-mix(in srgb, var(--accent) 4%, transparent);
}

.hero-cmd-line,
.hero-cmd-out {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p0 {
  color: var(--accent);
}

.hero-cmd-out {
  color: var(--ink);
}

.ok,
.okc {
  color: var(--ok);
}

.dim {
  color: var(--dim);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s3);
  margin-top: var(--s2);
}

/* ------------------------------------------------------------------ acts -- */

.act {
  position: relative;
  padding: var(--s9) var(--gutter) 0;
}

.act-head {
  max-width: 40rem;
  margin: 0 auto var(--s8);
  text-align: center;
  display: grid;
  gap: var(--s4);
}

.act-head h2 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  letter-spacing: -0.04em;
}

.act-head p:last-child {
  color: var(--muted);
  font-size: 1.125rem;
}

.act-pain .act-no {
  color: var(--warn);
}

/* ---------------------------------------------------------------- beats -- */

/* An act is a column of beats: a caption beside its own window, in the flow.
   Nothing is sticky and nothing tracks scroll; main.js plays each window
   once when it comes into view. On a phone the caption sits above. */
.beats {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: clamp(4rem, 10vw, 7rem);
}

.beat {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.beat-win {
  min-width: 0;
}

@media (max-width: 59.99rem) {
  .beat {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s5);
  }
}

.card {
  display: grid;
  gap: var(--s3);
  max-width: 28rem;
}

.card h3 {
  font-size: clamp(1.625rem, 2.6vw, 2.125rem);
  letter-spacing: -0.03em;
}

.card > p:not([class]) {
  color: var(--muted);
}

.replaces {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin-top: var(--s2);
  font: 0.75rem/1 var(--mono);
}

.replaces span {
  color: var(--dim);
  margin-right: 0.25rem;
}

.replaces s {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--warn) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 20%, transparent);
  color: #ffb1a5;
  text-decoration-color: color-mix(in srgb, var(--warn) 70%, transparent);
}

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

.window {
  --tone: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(180deg, var(--window), color-mix(in srgb, var(--window) 75%, #000));
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow:
    0 1px 0 var(--lit) inset,
    0 0 0 1px rgb(0 0 0 / 0.5),
    0 40px 80px -30px rgb(0 0 0 / 0.95),
    0 0 60px -20px color-mix(in srgb, var(--tone) 25%, transparent);
  overflow: hidden;
}

.window[data-tone="warn"] {
  --tone: var(--warn);
}

/* the accent lives on the window's top edge, and nowhere else on the box */
.window::before {
  content: "";
  position: absolute;
  inset: 0 12% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tone), transparent);
  opacity: 0.7;
}

.bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--s4);
  height: 2.625rem;
  padding: 0 var(--s4);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.02);
  font: 500 0.75rem/1 var(--mono);
  color: var(--dim);
  white-space: nowrap;
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2c2e35;
}

.title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud {
  display: flex;
  gap: var(--s4);
  margin-left: auto;
}

.hud b {
  display: inline-block;
  min-width: 2ch;
  text-align: right;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hud .risk b {
  color: var(--warn);
}

.hud .sm {
  display: none;
}

.tabs {
  display: flex;
  gap: 2px;
  height: 100%;
  align-items: flex-end;
}

.tab {
  padding: 0.55rem 0.8rem;
  border-radius: 8px 8px 0 0;
  color: var(--dim);
  border: 1px solid transparent;
  border-bottom: 0;
  transition: color 0.3s, background 0.3s;
}

.tab.on {
  color: var(--ink);
  background: var(--window);
  border-color: var(--line);
  box-shadow: 0 1px 0 var(--window);
}

.tab.on::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.1em;
}

/* ---------------------------------------------------------------- screen -- */

.screen {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  font: 400 var(--code) / var(--lh) var(--mono);
  font-variant-ligatures: none;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.rail {
  padding: var(--s4) var(--s5);
}

.l {
  min-height: calc(var(--lh) * 1em);
  white-space: pre;
  color: var(--muted);
}

.p {
  font-style: normal;
  color: var(--accent);
}

.p.r::before {
  content: "root@box:~";
}

.p.u::before {
  content: "admin@box:~";
}

/* the local prompt's directory is the site's to name */
.p.me::before {
  content: var(--me);
}

.window[data-tone="warn"] .p {
  color: #ff9d8f;
}

.l .t {
  color: var(--ink);
}

.l.x .p {
  color: var(--dim);
}

/* a continuation's indent is the stylesheet's, not spaces in the text */
.l.x .t {
  margin-left: 2ch;
}

.l.e {
  color: var(--ink);
}

.l.e::before {
  content: "  ✎ ";
  color: var(--dim);
}

.l.f {
  color: var(--warn);
}

.l.ok {
  color: var(--ok);
}

.l.add {
  color: var(--ok);
  background: rgb(95 224 140 / 0.07);
}

.l.del {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 7%, transparent);
}

/* a config file gets the same six roles as a terminal */
.code {
  counter-reset: ln;
  padding-left: var(--s3);
}

.code .l {
  counter-increment: ln;
  color: var(--ink);
  border-left: 2px solid transparent;
  padding-left: var(--s2);
  transition: background 0.4s, border-color 0.4s;
}

.code .l::before {
  content: counter(ln);
  display: inline-block;
  width: 3ch;
  margin-right: 1.5ch;
  text-align: right;
  color: #6b6e79;
}

.code .a,
.snippet .a {
  color: var(--accent);
}

.code .s,
.snippet .s {
  color: var(--ok);
}

.code .m,
.snippet .m {
  color: var(--muted);
}

.code .cm,
.snippet .cm {
  color: var(--dim);
  font-style: italic;
}

/* the mini window: a second terminal opened over the first, overlapping its
   corner; the pair keeps room under it so it never covers the next beat */
.pair {
  position: relative;
  padding-bottom: 7.5rem;
}

.mini {
  position: absolute;
  right: -1.5rem;
  bottom: 0;
  width: min(24rem, 80%);
  z-index: 2;
}

@media (max-width: 59.99rem) {
  .mini {
    right: 0;
    width: 88%;
  }
}

/* ------------------------------------------------ enhanced (main.js on) -- */

/* main.js plays these; without it, or with reduced motion, every line is
   simply visible. A hidden line still takes its space, so a window never
   changes size while it types. */
.js:not(.still) [data-play] .l {
  visibility: hidden;
}

.js:not(.still) [data-play] .l.is-v {
  visibility: visible;
}

.js:not(.still) [data-play] .l.is-ty .t {
  display: inline-block;
  vertical-align: top;
  max-width: calc(var(--c, 0) * 1ch);
  overflow: hidden;
}

.js:not(.still) [data-play] .l.is-k::after {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

.js:not(.still) [data-play] .l.is-ty.is-k::after {
  animation: none;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.js:not(.still) .mini {
  opacity: 0;
  transform: translateY(1.5rem) scale(0.96);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}

.js:not(.still) .mini.on {
  opacity: 1;
  transform: none;
}

html:not(.js) .hud,
.still .hud {
  display: none;
}


/* ----------------------------------------------------------------- story -- */

/* The pieces every page's story reuses: the tally between the pain and the
   relief, the mechanism as a pipeline, a before/after change, the
   comparison table, and where the thing stops. */

/* ----------------------------------------------------------------- tally -- */

.tally {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s9) var(--gutter);
  text-align: center;
  display: grid;
  gap: var(--s7);
}

.tally h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.04em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.stats > div {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--s2);
  padding: var(--s6) var(--s4);
}

.stats > div + div {
  border-left: 1px solid var(--line);
}

.stats dt {
  color: var(--muted);
  font-size: 0.9375rem;
}

.stats dd {
  font: 650 clamp(3rem, 7vw, 5rem) / 1 var(--sans);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.stats > div:nth-child(2) { transition-delay: 80ms; }
.stats > div:nth-child(3) { transition-delay: 160ms; }
.stats > div:nth-child(4) { transition-delay: 240ms; }

.tally-turn {
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

@media (max-width: 47.99rem) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stats > div:nth-child(3) {
    border-left: 0;
  }

  .stats > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

/* ------------------------------------------------------------- mechanism -- */

.act-plain {
  padding-top: var(--s8);
}

.pipe {
  --n: 3;
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s5);
  counter-reset: pipe;
}

/* the line through the three stages draws itself once it is on screen */
.pipe::before {
  content: "";
  position: absolute;
  top: 2.25rem;
  left: 3rem;
  right: 3rem;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 20%, transparent));
  transform-origin: 0 50%;
  transition: transform 1.2s var(--ease) 0.2s;
}

.js .pipe:not(.in)::before {
  transform: scaleX(0);
}

.pipe li {
  position: relative;
  display: grid;
  gap: var(--s3);
  align-content: start;
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 1px 0 var(--lit) inset;
}

.pipe-no {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font: 600 0.8rem var(--mono);
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--bg), 0 0 20px color-mix(in srgb, var(--accent) 40%, transparent);
}

.pipe h3 {
  font-size: 1.375rem;
}

.pipe p:last-child {
  color: var(--muted);
  font-size: 0.975rem;
}

@media (max-width: 47.99rem) {
  .pipe {
    grid-template-columns: minmax(0, 1fr);
  }

  .pipe::before {
    top: 2rem;
    bottom: 2rem;
    left: calc(var(--s5) + 0.875rem);
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 20%, transparent));
    transform-origin: 50% 0;
  }

  .js .pipe:not(.in)::before {
    transform: scaleY(0);
  }
}

.sub {
  max-width: var(--max);
  margin: var(--s9) auto var(--s6);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  text-align: center;
}

.sub code {
  font-size: 0.8em;
}

.change {
  max-width: var(--max);
  margin: var(--s9) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.change-copy {
  display: grid;
  gap: var(--s4);
}

.change-copy h3 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  letter-spacing: -0.035em;
}

.change-copy p {
  color: var(--muted);
}

.window.flat {
  height: auto;
}

@media (max-width: 59.99rem) {
  /* minmax(0, …): a plain 1fr can't shrink below a window's longest line */
  .change {
    grid-template-columns: minmax(0, 1fr);
  }
}

.compare {
  /* a table with more columns than a phone has room for scrolls inside
     itself, never the page */
  overflow-x: auto;
  max-width: 52rem;
  margin: var(--s9) auto 0;
}

.compare table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.compare caption {
  text-align: left;
  font: 600 0.75rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: var(--s5);
}

.compare th,
.compare td {
  padding: var(--s4) var(--s3);
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}

.compare thead th {
  font: 500 0.8rem var(--mono);
  color: var(--dim);
}

.compare tbody th {
  font-weight: 500;
  color: var(--ink);
}

.compare td {
  color: var(--muted);
}

.compare td.win {
  color: var(--ink);
}

.compare td.win::before {
  content: "✓ ";
  color: var(--ok);
}

.compare .num {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 35.99rem) {
  .compare table {
    font-size: 0.85rem;
  }

  .compare th,
  .compare td {
    padding: var(--s3) var(--s1);
  }

  .compare td.win::before {
    content: none;
  }
}

.stops {
  max-width: 52rem;
  margin: var(--s8) auto 0;
  padding: var(--s5) var(--s6);
  display: grid;
  gap: var(--s3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
}

.stops p:last-child {
  color: var(--muted);
}


/* ------------------------------------------------------------------- ask -- */

.ask {
  position: relative;
  padding: var(--s9) var(--gutter);
  margin-top: var(--s9);
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}

.ask::before {
  content: "";
  position: absolute;
  inset: 0 -20% -40%;
  z-index: -1;
  background: radial-gradient(45% 55% at 50% 60%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}

.ask-in {
  max-width: 40rem;
  margin: 0 auto;
  display: grid;
  gap: var(--s4);
  justify-items: center;
}

.ask h2 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  letter-spacing: -0.045em;
}

.ask p {
  color: var(--muted);
  font-size: 1.125rem;
}

.foot {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--s6) 0 var(--s7);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s4);
  color: var(--dim);
  font-size: 0.9rem;
}

.foot strong {
  color: var(--ink);
  font-weight: 600;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s5);
}

.foot-links a {
  color: var(--muted);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--ink);
}

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

@media (max-width: 47.99rem) {
  :root {
    --code: 0.6875rem;
  }

  .rail {
    padding: var(--s3) var(--s4);
  }

  .p.r::before,
  .p.u::before,
  .p.me::before {
    content: none;
  }

  .hud {
    gap: var(--s3);
  }

  .hud .lg {
    display: none;
  }

  .hud .sm {
    display: inline;
  }

  .bar .title {
    display: none;
  }

  .mini .bar .title,
  .bar .title.lines {
    display: inline;
  }

  .tab {
    padding: 0.55rem 0.6rem;
  }

  .code {
    padding-left: 0;
  }

  .code .l::before {
    width: 2ch;
    margin-right: 1ch;
  }

  .act {
    padding-top: var(--s8);
  }

  .act-head {
    margin-bottom: var(--s6);
  }
}

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

@media (prefers-reduced-motion: no-preference) {
  /* the hero's command types itself once, on load */
  .js .hero-cmd .ty {
    display: inline-block;
    vertical-align: top;
    overflow: hidden;
    max-width: 0;
    animation: type 2.2s steps(44, end) 0.9s forwards;
  }

  .js .hero-cmd-line::after {
    content: "";
    display: inline-block;
    width: 0.6em;
    height: 1.1em;
    vertical-align: -0.2em;
    background: var(--accent);
    animation: blink 1.1s steps(1) infinite, gone 0s 2.6s forwards;
  }

  .js .hero-cmd-out {
    opacity: 0;
    animation: rise 0.6s var(--ease) 2.8s forwards;
  }

  @keyframes type {
    to {
      max-width: 44ch;
    }
  }

  @keyframes gone {
    to {
      visibility: hidden;
    }
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  /* reveal on entry, once */
  .js .rv {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }

  .js .rv.in {
    opacity: 1;
    transform: none;
  }

  .hero-in > .rv:nth-child(2) { transition-delay: 80ms; }
  .hero-in > .rv:nth-child(3) { transition-delay: 160ms; }
  .hero-in > .rv:nth-child(4) { transition-delay: 240ms; }
  .hero-in > .rv:nth-child(5) { transition-delay: 320ms; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ------------------------------------------------------------------- 404 -- */

.lost {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--top) var(--gutter) 0;
  text-align: center;
}

.lost .hero-in {
  gap: var(--s4);
}

.lost h1 {
  font-size: clamp(2.25rem, 7vw, 4rem);
  letter-spacing: -0.04em;
}

/* --------------------------------------------------------------- browser -- */

/* A browser window shows somebody else's dashboard: light, sans, clicky, a
   different world from the terminals on purpose. The page's own chrome
   (.ui-*) is static markup; fields, presses and new rows are lines that
   play in turn. */
.window.browser {
  --page: #f4f5f7;
  --page-up: #ffffff;
  --page-ink: #1e2330;
  --page-muted: #5b6374;
  --page-line: #dde1e8;
  --page-accent: #3a63e6;
}

.bar .url {
  flex: 1;
  min-width: 0;
  max-width: 30rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar .url i {
  flex: none;
  width: 0.5rem;
  height: 0.4rem;
  margin-top: 0.2rem;
  border-radius: 1px;
  background: var(--dim);
  box-shadow: 0 -0.3rem 0 -0.05rem transparent, 0 -0.22rem 0 -0.06rem var(--dim);
}

.window.browser .screen {
  background: var(--page);
  color: var(--page-ink);
  font: 400 0.875rem/1.5 var(--sans);
}

.window.browser .rail {
  display: grid;
  gap: var(--s3);
  padding: var(--s5);
}

.window.browser .l {
  min-height: 0;
  white-space: normal;
  color: var(--page-ink);
}

/* the terminal's colours don't reach the page: a typed value is the page's
   ink, and a label is the page's, whatever tone the window has */
.window.browser .l .t {
  color: var(--page-ink);
}

.window.browser .fl .p {
  color: var(--page-muted);
}

.ui-h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  font: 600 1.0625rem/1.3 var(--sans);
  color: var(--page-ink);
}

.ui-h small {
  font: 400 0.8125rem var(--sans);
  color: var(--page-muted);
}

.ui-panel {
  display: grid;
  gap: var(--s3);
  padding: var(--s4);
  background: var(--page-up);
  border: 1px solid var(--page-line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgb(20 30 50 / 0.06);
}

.ui-panel > b {
  font: 600 0.875rem var(--sans);
}

/* a form field: its label, and a box the value is typed into */
.l.fl {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  align-items: center;
  gap: var(--s3);
}

.fl .p {
  color: var(--page-muted);
  font: 400 0.8125rem var(--sans);
}

.fl .box {
  display: block;
  min-height: 2.1rem;
  padding: 0.4rem 0.6rem;
  background: var(--page-up);
  border: 1px solid var(--page-line);
  border-radius: 6px;
  font: 0.8125rem/1.25rem var(--mono);
  color: var(--page-ink);
  white-space: pre;
  overflow: hidden;
}

.js:not(.still) .fl.is-ty .box {
  border-color: var(--page-accent);
  box-shadow: 0 0 0 3px rgb(58 99 230 / 0.18);
}

.js:not(.still) [data-play] .fl.is-k::after {
  content: none;
}

.js:not(.still) [data-play] .fl.is-k .box::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--page-ink);
  animation: blink 1.1s steps(1) infinite;
}

.l.press span {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  background: var(--page-accent);
  color: #fff;
  font: 600 0.8125rem var(--sans);
}

.js:not(.still) .press.is-v span {
  animation: pressed 0.45s var(--ease);
}

@keyframes pressed {
  30% {
    transform: scale(0.94);
    filter: brightness(0.85);
  }
}

.window.browser .l.ok {
  padding: 0.45rem 0.75rem;
  border: 1px solid #bfe3cb;
  border-radius: 6px;
  background: #e8f6ed;
  color: #186a3b;
  font-size: 0.8125rem;
}

.window.browser .l.f {
  padding: 0.45rem 0.75rem;
  border: 1px solid #f1c7c0;
  border-radius: 6px;
  background: #fdeeec;
  color: #a2321f;
  font-size: 0.8125rem;
}

/* a table: rows are a grid whose columns the table sets in --cols */
.ui-table {
  --cols: repeat(4, minmax(0, 1fr));
  background: var(--page-up);
  border: 1px solid var(--page-line);
  border-radius: 10px;
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: var(--cols);
  gap: var(--s3);
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--page-line);
  font: 0.8125rem/1.4 var(--mono);
  color: var(--page-ink);
}

.row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row.head {
  border-top: 0;
  background: var(--page);
  font: 600 0.6875rem/1.4 var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--page-muted);
}

.js:not(.still) .row.l.is-v {
  animation: arrived 1.6s var(--ease);
}

@keyframes arrived {
  from {
    background: #e8f6ed;
  }
}

/* ------------------------------------------------------------------ chat -- */

/* A chat with an assistant: a question on the right, and the answer, as
   long as it takes, on the left. An answer's code sits in a snippet. */
.window.chat .screen {
  font: 400 0.9375rem/1.6 var(--sans);
}

.window.chat .rail {
  display: grid;
  gap: var(--s3);
  padding: var(--s5);
}

.l.say {
  min-height: 0;
  white-space: normal;
  max-width: 64ch;
  color: #d9dbe1;
}

.l.say.you {
  justify-self: end;
  max-width: 80%;
  padding: 0.6rem 0.95rem;
  border-radius: 16px 16px 4px 16px;
  background: var(--surface-up);
  border: 1px solid var(--line);
  color: var(--ink);
}

.l.say.llm {
  position: relative;
  padding-left: 2.25rem;
}

.say.you + .say.llm::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: conic-gradient(from 90deg, #8b8f9a, #d9dbe1, #8b8f9a);
}

.snippet {
  margin-left: 2.25rem;
  padding: var(--s3) var(--s4);
  background: #0c0d10;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 400 var(--code) / var(--lh) var(--mono);
  overflow-x: auto;
}

/* ----------------------------------------------------------------- favicon -- */

.fav {
  display: block;
  flex: none;
}

@media (max-width: 47.99rem) {
  .l.fl {
    grid-template-columns: 5rem minmax(0, 1fr);
  }

  .window.browser .rail,
  .window.chat .rail {
    padding: var(--s4);
  }

  .snippet {
    margin-left: 0;
  }

  .l.say.llm {
    padding-left: 0;
  }

  .say.you + .say.llm::before {
    display: none;
  }
}
