/* The light landing draft: white bands on the production landing's ASML grid, very few words, the product carrying the page. */
/* The owner, 18 Oct: the dark drafts read like a crypto launch page, and the Warp-style figures copied Warp, so the grid is ours again. */

/* The landing sets Poppins at 600 only, from the same file as the public pages, so a visit to /join finds it in the cache. */
/* The draft in design/landing/trex has no brand folder beside it, so it falls back to its own copy in fonts/. */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../brand/fonts/poppins-semibold.woff2") format("woff2"), url("fonts/poppins-semibold.woff2") format("woff2"); }
/* Until Poppins arrives, headings use a face sized to its metrics, as on the public pages, so the swap barely moves them. */
@font-face {
  font-family: "Poppins Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold");
  font-style: normal;
  font-weight: 500 600;
  size-adjust: 105%;
  ascent-override: 100%;
  descent-override: 33.3333%;
  line-gap-override: 0%;
}

/* The token primitives of web/src/design/tokens.css, in their light roles. */
:root {
  color-scheme: light;

  --ink-950: #0b1220;
  --ink-900: #111827;
  --ink-800: #1f2937;
  --ink-700: #374151;
  --ink-600: #4b5563;
  --ink-500: #6b7280;
  --ink-400: #9ca3af;
  --ink-300: #d1d5db;
  --ink-200: #e5e7eb;
  --ink-100: #f3f4f6;
  --ink-050: #f9fafb;
  --white: #ffffff;
  --teal-900: #134e4a;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-400: #2dd4bf;
  --teal-200: #99f6e4;
  --green-400: #4ade80;
  --rose-300: #fda4af;

  --page: var(--white);
  --line: var(--ink-200);
  --text: var(--ink-950);
  --text-2: var(--ink-700);
  --text-3: var(--ink-600);
  --text-4: var(--ink-500);
  --accent: var(--teal-700);

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

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --frame: min(75rem, calc(100% - 3rem));
}

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

html {
  background: var(--page);
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--text);
  font: 400 1.0625rem / 1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

/* Selected text takes the accent with white letters, never the browser's blue, as on every public page and the try page's install line. */
/* The pair reads on the white bands and on the trailer's dark window alike. */
::selection {
  background: var(--teal-700);
  color: var(--white);
}

p {
  text-wrap: pretty;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

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

/* The first Tab stop, as on the public pages: it shows only while it has the focus. */
.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 30;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ink-300);
  background: var(--white);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

/* ---- The ASML grid: two full-height frame hairlines, and band hairlines to both window edges. ---- */

.frame-lines {
  position: fixed;
  inset: 0 auto 0 50%;
  z-index: 0;
  width: var(--frame);
  border-inline: 1px solid var(--line);
  transform: translateX(-50%);
  pointer-events: none;
}

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--frame);
  margin-inline: auto;
  padding: 1rem 1.5rem;
}

.site-header::after,
.band::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 100vw;
  height: 1px;
  background: var(--line);
  transform: translateX(-50%);
}

.site-header::after {
  bottom: 0;
}

.site-header__logo {
  display: inline-flex;
  transition: opacity 200ms var(--ease);
}

/* The logo answers a pointer as the buttons do, a little lighter on hover and lighter still while pressed. */
.site-header__logo:hover {
  opacity: 0.8;
}

.site-header__logo:active {
  opacity: 0.6;
}

.site-header__logo img {
  display: block;
  width: auto;
  height: 2rem;
}

.band {
  position: relative;
  z-index: 1;
  padding-bottom: 8rem;
}

.band::before {
  top: 0;
}

/* Content starts on the logo's line, 1.5rem inside the frame. */
.band__inner {
  position: relative;
  width: var(--frame);
  margin-inline: auto;
  padding: 8rem 1.5rem 0;
}

/* ---- Buttons and the command box. ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}

/* Buttons keep their code-style label, such as login(), in monospace. */
.btn--code {
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-color: var(--ink-300);
  background: var(--white);
  color: var(--text);
  font: 500 0.9375rem / 1 var(--font-mono);
}

.btn--code:hover {
  border-color: var(--ink-950);
}

.btn--primary {
  min-height: 3.5rem;
  padding: 0 2.25rem;
  background: var(--teal-700);
  color: var(--white);
  font: 600 1rem / 1 var(--font-sans);
}

.btn--primary:hover {
  background: var(--teal-800);
}

.btn--primary:active {
  background: var(--teal-900);
}

.btn--code:active {
  background: var(--ink-100);
}

.command {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border: 1px solid var(--ink-300);
  background: var(--white);
}

/* The box with its border is 3.5rem tall, the same as a primary button beside or across from it. */
.command code {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: calc(3.5rem - 2px);
  padding: 0 1.4rem;
  color: var(--text);
  font-size: 1rem;
  white-space: nowrap;
  user-select: all;
}

.command__prompt {
  color: var(--ink-400);
  user-select: none;
}

.command__copy {
  min-width: 4.5rem;
  border: 0;
  border-left: 1px solid var(--ink-300);
  border-radius: 0;
  background: var(--white);
  color: var(--text-3);
  font: 500 0.875rem / 1 var(--font-sans);
  cursor: pointer;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

.command__copy:hover {
  background: var(--ink-050);
  color: var(--text);
}

.command__copy:active {
  background: var(--ink-100);
}

.command__copy:focus-visible {
  outline: 2px solid var(--teal-700);
  outline-offset: -3px;
}

.command__copy[data-copied] {
  color: var(--accent);
}

/* ---- Hero: the claim centred, the one command under it, then mm in a large window, after the production landing. ---- */

.hero {
  padding-bottom: 7rem;
}

/* The pinned scene's last screen is empty below the skull, so the hero rises over it and no band of blank page sits between them. */
/* That strip shrinks with a short window, so the rise does too, and the jaw is never cut. */
/* Unpinned, under reduced motion or without JavaScript, the stage has no empty strip, so the hero does not rise. */
.trex + .hero {
  background: var(--page);
}

@media (prefers-reduced-motion: no-preference) {
  .js .trex + .hero {
    margin-top: calc(-1 * min(8rem, 18vh));
  }
}

/* The two frame hairlines run on through the hero, inside its page-coloured cover. */
.trex + .hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--frame);
  border-inline: 1px solid var(--line);
  transform: translateX(-50%);
  pointer-events: none;
}

.hero .band__inner {
  padding-top: 0;
}

.hero__claim {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8rem !important;
  text-align: center;
}

.hero__title {
  font-size: clamp(3.5rem, 6.8vw, 6.25rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.hero__line {
  display: block;
}

.hero__line--last {
  color: var(--teal-700);
}

.hero__lead {
  max-width: 40rem;
  margin-top: 1.75rem;
  color: var(--text-3);
  font-size: 1.25rem;
  line-height: 1.55;
}

.hero__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-top: 3.5rem;
}

/* The two doors are tabs on a box, like the install tabs of a docs site, so the switch reads as a switch (owner, 4 Nov). */
/* The box keeps one width on both tabs, so switching moves nothing. */
.tabs {
  width: 34rem;
  max-width: 100%;
  border: 1px solid var(--ink-300);
  background: var(--white);
}

.tabs__bar {
  display: flex;
  border-bottom: 1px solid var(--ink-300);
  background: var(--ink-050);
}

.tabs__tab {
  position: relative;
  flex: 1;
  padding: 0.95rem 1rem;
  border: 0;
  border-right: 1px solid var(--ink-300);
  background: transparent;
  color: var(--text-3);
  font: 600 1rem / 1 var(--font-sans);
  cursor: pointer;
  transition: color 200ms var(--ease), background 200ms var(--ease);
}

.tabs__tab:last-child {
  border-right: 0;
}

.tabs__tab:hover {
  background: var(--ink-100);
  color: var(--text);
}

.tabs__tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* The chosen tab is white with a line in the accent on top, and joins the box below it. */
.tabs__tab[aria-selected="true"] {
  background: var(--white);
  color: var(--text);
}

.tabs__tab[aria-selected="true"]::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--accent);
}

.tabs__tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: var(--white);
}

.tabs__body {
  display: grid;
  padding: 1.5rem;
}

.tabs__panel {
  grid-area: 1 / 1;
  width: 100%;
}

.tabs__panel .hero__try,
.tabs__panel .command--hero {
  width: 100%;
}

/* Without scripts there is no switching, so the tab bar hides and both doors show one under the other. */
html:not(.js) .tabs__bar {
  display: none;
}

html:not(.js) .tabs__panel[hidden] {
  display: block;
  grid-area: auto;
  margin-top: 0.75rem;
}

.hero__try {
  min-height: calc(4.25rem + 2px);
  padding: 0 2.5rem;
  font-size: 1.125rem;
}

.command--hero {
  border-color: var(--teal-700);
}

.command--hero code {
  min-height: 4.25rem;
  padding: 0 1.75rem;
  font-size: 1.375rem;
}

.command--hero .command__prompt {
  color: var(--teal-700);
}

/* The copy button is the same as everywhere else; only its divider is lighter against the teal border. */
.command--hero .command__copy {
  border-left-color: var(--ink-200);
}

/* The trailer: one real session of mm, played as live text in a large dark window with its bar (film.js). */
.hero__stage {
  padding-top: 4.5rem !important;
}

/* The window takes the frame's whole width less the 24 px insets, so 120 columns get text about 15 px tall, as on a large monitor (owner, 10 Nov). */
.term {
  max-width: 72rem;
  margin: 0 auto;
  border: 1px solid var(--ink-950);
  background: var(--ink-950);
  box-shadow: 0 2.5rem 5rem -2rem rgb(11 18 32 / 0.45);
}

.term__bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--ink-800);
  background: var(--ink-900);
}

.term__dots {
  display: inline-flex;
  gap: 0.45rem;
}

.term__dots i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--ink-700);
}

.term__title {
  position: absolute;
  left: 50%;
  color: var(--ink-400);
  font: 500 0.8125rem / 1 var(--font-mono);
  transform: translateX(-50%);
}

/* The screen keeps one shape at every width, so nothing below it moves when the take arrives, and film.js fits the terminal inside it. */
/* At the frame's full width it is 36 rows of 19 px tall with their margin, as the approved take shows on a screen at 100 percent. */
.film__screen {
  position: relative;
  aspect-ratio: 1150 / 708;
  overflow: hidden;
  background: var(--ink-950);
}

/* Two terminals take the same place: the hidden one draws a cut whole, then takes the stage, so no half-drawn frame ever shows. */
/* Both start hidden, and the take's first frame takes the stage the same way. */
.film__xterm,
.film__layer {
  position: absolute;
  inset: 0;
}

.film__layer {
  display: grid;
  place-items: center;
  opacity: 0;
}

.film__layer.is-front {
  opacity: 1;
}

.film__layer .xterm {
  padding: 0;
}

.film__layer .xterm-viewport {
  overflow: hidden !important;
  background: var(--ink-950) !important;
}

/* The still of the accepted code, from the same take, shows without scripts and under reduced motion until the viewer plays. */
/* Under full motion it never shows, so the window goes from dark to the take's first frame, and it comes back only when the take cannot play. */
/* It is a background, which a browser loads only for an element that shows, so a visitor who never sees it never downloads it. */
.film__still {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  background: var(--ink-950) url("film-still.png?v=1") center / 100% 100% no-repeat;
}

html:not(.js) .film__still,
.film.is-still .film__still {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .film:not(.is-live) .film__still {
    display: block;
  }
}

/* The course card comes over the lesson map, which stays faintly behind it. */
.film__card {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0 10%;
  background: color-mix(in srgb, var(--ink-950) 86%, transparent);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms var(--ease), background-color 380ms var(--ease);
}

/* The card's words rise a little as it fades in, so it arrives rather than blinks on. */
.film__card > * {
  transform: translateY(0.5rem);
  transition: transform 700ms var(--ease), opacity 280ms var(--ease);
}

.film__card.is-on {
  opacity: 1;
}

.film__card.is-on > * {
  transform: none;
}

/* Before the slate, the card's words fade and its ground turns solid, so the two never show through each other. */
.film__card.is-out {
  background: var(--ink-950);
}

.film__card.is-out > * {
  opacity: 0;
}

.film__kicker {
  color: var(--teal-400);
  font: 500 1.0625rem / 1.3 var(--font-sans);
}

.film__title {
  max-width: 16em;
  color: var(--white);
  font: 600 clamp(1.75rem, 3.4vw, 2.75rem) / 1.15 var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* The end slate holds: the logo over the address of lesson 1, with ssh in brackets as on the page's foot (owner, 10 Nov). */
.film__slate {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--ink-950);
  visibility: hidden;
  pointer-events: none;
}

.film__slate.is-on {
  visibility: visible;
  pointer-events: auto;
}

/* The slate's ground is already dark under the card, so only its contents rise in, one after the other. */
.film__slate > * {
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 500ms var(--ease), transform 800ms var(--ease);
}

.film__slate.is-on > * {
  opacity: 1;
  transform: none;
}

.film__slate.is-on > :nth-child(2) {
  transition-delay: 90ms;
}

.film__logo {
  width: auto;
  height: 3rem;
  filter: brightness(0) invert(1);
}

.film__ssh {
  margin: 0;
  color: var(--ink-300);
  font: 400 1.125rem / 1 var(--font-mono);
}

.film__ssh-cmd {
  color: var(--teal-600);
}

/* Under the screen, a player as asciinema's: play or pause, the time, and a track to click or drag along. */
.player {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: 2.5rem;
  padding: 0 0.9rem;
  border-top: 1px solid var(--ink-800);
  background: var(--ink-900);
}

.player__toggle {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  cursor: pointer;
}

/* The icon is a triangle to play, two bars to pause. */
.player__icon {
  width: 0.7rem;
  height: 0.8rem;
  background: var(--ink-300);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.player.is-playing .player__icon {
  clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0);
}

/* The button itself shades on hover and darkens on a press, as the copy segments do, and its icon turns white. */
.player__toggle {
  transition: background-color 200ms var(--ease);
}

.player__toggle:hover {
  background: var(--ink-800);
}

.player__toggle:active {
  background: var(--ink-700);
}

.player__toggle:hover .player__icon,
.player__toggle:active .player__icon {
  background: var(--white);
}

.player__time {
  min-width: 6.5rem;
  color: var(--ink-400);
  font: 400 0.8125rem / 1 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.player__track {
  position: relative;
  flex: 1;
  height: 1.5rem;
  cursor: pointer;
}

.player__track::before,
.player__fill {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  height: 3px;
  margin-top: -1.5px;
}

.player__track::before {
  right: 0;
  background: var(--ink-700);
}

.player__fill {
  width: 100%;
  background: var(--teal-600);
  transform: scaleX(0);
  transform-origin: left;
}

/* The track shows where each chapter starts, as a small gap in the line. */
.player__tick {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  background: var(--ink-900);
}

/* After the end the button plays again, so it shows the triangle. */
.player.is-ended .player__icon {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* Under the window, the trailer's scenes as a list, as obeya.si lists its video's chapters: a click plays from that scene. */
.chapters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.375rem;
  max-width: 64rem;
  margin: 0.875rem auto 0;
  padding: 0;
  list-style: none;
}

.chapters__item {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-3);
  font: 400 0.9375rem / 1.5 var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}

.chapters__time {
  min-width: 2.25rem;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}

/* The scene playing lifts as the chosen tab does, on a light ground with a line in the accent on top. */
.chapters__item.is-on {
  background: var(--ink-050);
  box-shadow: inset 0 2px 0 var(--accent);
  color: var(--text);
}

.chapters__item.is-on .chapters__time {
  color: var(--accent);
}

.chapters__item:hover {
  background: var(--ink-100);
  color: var(--text);
}

.chapters__item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* The claim rises in line by line, then the command, then the window. */
.js .hero .hero__line,
.js .hero .hero__lead,
.js .hero .hero__action,
.js .hero .term,
.js .hero .chapters {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 800ms var(--ease), transform 900ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.js .hero .hero__line:nth-child(2) { transition-delay: 120ms; }
.js .hero .hero__lead { transition-delay: 380ms; }
.js .hero .hero__action { transition-delay: 520ms; }
.js .hero .term { transition-delay: 700ms; }
.js .hero .chapters { transition-delay: 700ms; }

.js .hero.is-in .hero__line,
.js .hero.is-in .hero__lead,
.js .hero.is-in .hero__action,
.js .hero.is-in .term,
.js .hero.is-in .chapters {
  opacity: 1;
  transform: none;
}

/* ---- Headings: short, left on the logo's line. ---- */

.heading {
  max-width: 44rem;
  font-size: 3rem;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

/* ---- What it is: plain prose in one narrow column. ---- */

.prose {
  max-width: 42rem;
  margin-top: 2.5rem;
}

.prose p {
  color: var(--text-2);
  font-size: 1.25rem;
  line-height: 1.55;
}

.prose p + p {
  margin-top: 1.25rem;
}

/* A paragraph's lead-in reads in the ink colour at semibold, in the same sans as the text around it. */
.prose strong {
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 600;
}

/* ---- Close: the two steps as two cards of the same size side by side, each with its action at the foot (the owner's pick, 18 Oct). ---- */

/* The cards start as far under the title's letters as the prose does under "What Modelmathics is.", 56px. */
.close__steps,
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.close__step,
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* 2rem on every side, measured on the letters: the top gives back the room the title's line box leaves above its capitals. */
  padding: calc(2rem - 6px) 2rem 2rem;
  border: 1px solid var(--line);
  background: var(--white);
}

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

.close__step-title,
.card__title {
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

/* Plain wrapping, so a card's text runs on as far as it needs, since the shared rows keep the actions level. */
.close__text {
  margin: 0.875rem 0 2rem;
  color: var(--text-2);
  font-size: 1.25rem;
  line-height: 1.55;
  text-wrap: wrap;
}

.close__step .btn,
.close__step .command {
  margin-top: auto;
}

/* The install line fills its card and keeps to it, so its Copy button stays inside. */
.close__step .command {
  width: 100%;
}

/* The two cards share their rows, so the button and the install line stay level while a note sits under the install line. */
.close__steps {
  grid-template-rows: repeat(4, auto);
}

.close__step {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0;
  justify-items: start;
}

/* The note under the install line says what the command touches, in a quiet small grey. */
.close__note {
  margin-top: 0.75rem;
  color: var(--text-4);
  font-size: 0.9375rem;
}

.close__step .command code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 0 1rem;
  font-size: 0.8125rem;
  scrollbar-width: none;
}

/* Inline code gets a light ground and room on both sides, so it never sits tight against the words around it. */
.close__text code {
  padding: 0.1em 0.4em;
  background: var(--ink-100);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* Links in a card's text read as links, in the accent. */
.close__text a,
.close__note a {
  color: var(--accent);
  text-decoration: underline;
  transition: color 200ms var(--ease);
}

.close__text a:hover,
.close__note a:hover {
  color: var(--teal-800);
}

/* ---- What you build: the stages as rows on the grid, the number, the title and one line each. ---- */

.stages {
  margin-top: 3rem;
  border-bottom: 1px solid var(--line);
}

.stages__row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 17rem) minmax(0, 1fr);
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.stages__n {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.stages__title {
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.stages__text {
  max-width: 42rem;
  color: var(--text-2);
  font-size: 1.25rem;
  line-height: 1.55;
}

.stages__note {
  max-width: 42rem;
  margin-top: 2rem;
  color: var(--text-2);
  font-size: 1.25rem;
  line-height: 1.55;
}

/* The two planned courses wear the close's cards, with no action at the foot. */
.card__text {
  margin-top: 0.875rem;
  color: var(--text-2);
  font-size: 1.25rem;
  line-height: 1.55;
}

/* A window too narrow for the install line in half the frame, such as 1280 at 125% zoom, stacks the cards before the install line crowds its card. */
/* There the one column inside a card is never wider than the card, so a long install line scrolls inside its box instead of pushing the card wider. */
@media (max-width: 77.5rem) {
  .close__steps,
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

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

/* A narrow window, such as 1280 at 200% zoom, puts each stage's line under its title. */
@media (max-width: 48rem) {
  .chapters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stages__row {
    grid-template-columns: 3rem minmax(0, 1fr);
    row-gap: 0.5rem;
  }

  .stages__text {
    grid-column: 2;
  }
}

/* ---- A return by Back or Forward to the claim or below, from early.js. ---- */

/* The opening stays hidden until early.js has scrolled back, so its first screen never shows before the jump. */
.is-restoring .trex__stage {
  visibility: hidden;
}

/* The page comes back as the reader left it, with the claim already in. */
/* early.js shows every block above the window's bottom edge at once after the return, and the blocks below still fade in as the reader scrolls on. */
html.is-restored .hero .hero__line,
html.is-restored .hero .hero__lead,
html.is-restored .hero .hero__action,
html.is-restored .hero .term,
html.is-restored .hero .chapters {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ---- Without JavaScript: the trailer shows its still, and the controls that need a script are gone. ---- */

html:not(.js) .player,
html:not(.js) .chapters,
html:not(.js) .command__copy {
  display: none;
}

/* When xterm.js or the take cannot load, film.js marks the window is-still, and the trailer's controls go as they do without scripts. */
.film.is-still .player,
.film.is-still + .chapters {
  display: none;
}

/* ---- Motion: everything fades up once. ---- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 1000ms var(--ease), transform 1000ms var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms);
}

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

/* After a jump or a Tab, early.js marks a block is-now, and it shows at once with no fade, no rise and no delay. */
.js [data-reveal].is-now,
.js .hero.is-now .hero__line,
.js .hero.is-now .hero__lead,
.js .hero.is-now .hero__action,
.js .hero.is-now .term,
.js .hero.is-now .chapters {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-reveal],
  .js .hero .hero__line,
  .js .hero .hero__lead,
  .js .hero .hero__action,
  .js .hero .term,
  .js .hero .chapters {
    opacity: 1;
    transform: none;
  }
}

/* ---- The opening: a T. rex's jaws up close, then the whole head, which a scan turns bionic as the reader scrolls. ---- */

.trex {
  padding-bottom: 0;
}

/* The opening is the top of the page, so it has no band line above it; the header brings its own line when it slides in. */
.trex::before {
  display: none;
}

.trex__stage {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .js .trex {
    height: 420vh;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .trex .trex__stage {
    position: sticky;
    top: 0;
  }
}

/* The drawing fills the frame's width and the window's height, and spills past both when it zooms in. */
.trex__art {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--frame);
  height: 100%;
  overflow: visible;
  transform: translateX(-50%);
}

.trex__art path,
.trex__art line,
.trex__art rect,
.trex__art circle {
  vector-effect: non-scaling-stroke;
}

.b-eye {
  opacity: var(--eye, 1);
}

.b-eye__glow {
  fill: var(--teal-800);
}

.b-eye__iris {
  fill: var(--teal-600);
}

.b-eye__core {
  fill: var(--teal-200);
}

.trex__scanline {
  stroke: var(--teal-600);
  stroke-width: 2;
  opacity: 0;
}

/* The two lines sit at the bottom left, under the comet's sky, one after the other. */
.trex__words {
  position: absolute;
  inset: 0;
  width: var(--frame);
  margin-inline: auto;
  z-index: 1;
  padding: 14vh 1.5rem 0;
  pointer-events: none;
}

.trex__line {
  max-width: 11ch;
  /* The lines scale with the drawing in a small or short window, so they never run into its teeth. */
  font: 600 clamp(1.75rem, min(4.8vw, 10.5vh), 4.5rem) / 1 var(--font-display);
  letter-spacing: -0.045em;
}

.trex__line + .trex__line {
  margin-top: 0.5rem;
}

/* Both lines sit in the vertical middle, on the same spot, one after the other. */
@media (prefers-reduced-motion: no-preference) {
  .js .trex .trex__words {
    display: grid;
    align-content: center;
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .trex .trex__line {
    grid-area: 1 / 1;
    justify-self: start;
    margin: 0;
  }
}

.comet,
.beam,
.burst {
  opacity: 0;
}

.comet__tail {
  stroke: var(--ink-400);
  stroke-width: 1;
  stroke-linecap: round;
}

.comet__rock {
  fill: var(--white);
  stroke: var(--ink-950);
  stroke-width: 1.5;
}

.comet__crater {
  fill: var(--ink-100);
  stroke: var(--ink-600);
  stroke-width: 1;
}

.beam__glow {
  stroke: var(--teal-600);
  stroke-width: 20;
  stroke-linecap: round;
  opacity: 0.22;
}

.beam__core {
  stroke: var(--teal-600);
  stroke-width: 4;
  stroke-linecap: round;
}

.burst__ring {
  fill: none;
  stroke: var(--teal-600);
  stroke-width: 1.5;
}

.burst__shard {
  fill: var(--white);
  stroke: var(--ink-950);
  stroke-width: 1;
}

.beam__muzzle {
  fill: var(--teal-200);
  opacity: 0.8;
  stroke: var(--teal-600);
  stroke-width: 2;
}

.burst__flash {
  fill: var(--teal-200);
  opacity: 0.5;
}

.comet__speck {
  fill: var(--ink-400);
}

/* The header stays out of the way during the opening and slides in as the claim comes up. */
.js .site-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  box-shadow: inset 1px 0 var(--line), inset -1px 0 var(--line);
  transform: translate(-50%, -101%);
  transition: transform 600ms var(--ease);
}

.js .site-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  z-index: -1;
  width: 100vw;
  background: var(--page);
  transform: translateX(-50%);
}

/* A reader who tabs to the logo or to login() during the opening sees the header come down with the focus. */
/* A click on the logo gives no visible focus, so the header hides again at the opening it scrolls back to. */
.js .site-header.is-shown,
.js .site-header:has(:focus-visible) {
  transform: translate(-50%, 0);
}

/* "Grow with it." comes alive: the letters pop up one by one, a teal rule grows under it with the scan, "Grow" turns teal and grows, and the line jolts when the comet is hit. */
.trex__line--two {
  color: var(--teal-700);
}

.trex__line--two .w {
  display: inline-block;
  white-space: nowrap;
}

.trex__line--two .l {
  display: inline-block;
}

/* The letters pop in one by one; scrolling back, the whole line leaves at once, so it never overlaps the first line. */
@media (prefers-reduced-motion: no-preference) {
  .js .trex .trex__line--two {
    transition: opacity 120ms var(--ease);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .trex .trex__line--two:not(.is-on) {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .trex .trex__line--two .l {
    opacity: 0;
    transform: translateY(0.6em) scale(0.3) rotate(-8deg);
    transition: transform 0ms 120ms, opacity 0ms 120ms;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .trex .trex__line--two.is-on .l {
    opacity: 1;
    transform: none;
    transition: transform 750ms cubic-bezier(0.34, 1.7, 0.64, 1), opacity 250ms var(--ease);
    transition-delay: calc(var(--i) * 45ms);
  }
}

.trex__line--two .w--grow {
  transform-origin: left bottom;
  transition: transform 900ms cubic-bezier(0.34, 1.7, 0.64, 1), color 600ms var(--ease), margin 900ms cubic-bezier(0.34, 1.7, 0.64, 1);
}

.trex__line--two.is-bionic .w--grow {
  margin-right: 0.4em;
  transform: scale(1.14);
}

.trex__line--two::after {
  content: "";
  display: block;
  width: 100%;
  height: 0.3rem;
  margin-top: 0.35em;
  background: var(--teal-600);
  transform: scaleX(var(--scan, 0));
  transform-origin: left;
}

.trex__line--two.is-hit {
  animation: trex-jolt 700ms cubic-bezier(0.34, 1.7, 0.64, 1);
}

@keyframes trex-jolt {
  0% {
    transform: none;
  }
  25% {
    transform: scale(1.07) rotate(-1.5deg);
  }
  55% {
    transform: scale(0.98) rotate(0.6deg);
  }
  100% {
    transform: none;
  }
}

/* The skeleton traced from the reference photo, in three tones: a pale cast for the bones, dark metal with teal highlights for the bionic one. */
.t-tone--0 { fill: var(--ink-300); }
.t-tone--1 { fill: var(--ink-200); }
.t-tone--2 { fill: var(--white); }

.t-outline {
  fill: none;
  stroke: var(--ink-800);
  stroke-width: 1;
}

.b-tone--0 { fill: var(--ink-950); }
.b-tone--1 { fill: var(--ink-800); }
.b-tone--2 { fill: var(--teal-600); }

/* ---- The scroll cue: a small chevron at the foot of the first screen, gone once the reader scrolls. ---- */

.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: -1.375rem;
  color: var(--text-4);
  pointer-events: none;
  animation: scroll-cue 2.2s ease-in-out infinite;
  transition: opacity 300ms var(--ease);
}

.scroll-cue.is-gone {
  opacity: 0;
}

@keyframes scroll-cue {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(0.4rem);
  }
}

/* ---- The end: a quiet footer, the ssh line above the byline. ---- */

/* The footer is a quiet centred stack: the ssh line with the try page's address, then who builds it (owner, 4 Nov). */
.end {
  padding-bottom: 3rem;
}

.end__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 3rem;
}

/* The ssh word is the lighter part, so the line reads as the address with the command in front of it. */
.end__ssh {
  color: var(--text-4);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}

.end__try {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--ink-300);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 200ms var(--ease);
}

.end__try:hover {
  text-decoration-color: var(--accent);
}

.end__by {
  color: var(--text-4);
  font-size: 0.9375rem;
}

