/* Registrum, option B: "the register".
   One ruled sheet. Rules are 32 px apart at every size and every text line box is a multiple of
   32 px, so type sits on the rules. The page checks its own text (register.js). */

@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #f6f6f4;
  --rule: #dcdcd7;
  --ink: #101113;
  --ink-2: #5a5c62;
  --ink-3: #8f9197;
  --blue: #2a5b9c;
  --red: #c9331a; /* spec said #d93a1f, which measures 4.24:1 on the ground; this is 4.89:1 */
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  /* Where the rule falls inside each 32 px band. Text baselines are nudged onto it. */
  --r: 21px;
  --bar: 56px;
  --dock: 96px;
  --head: 44vh;
  /* Baseline nudges per type role, measured in register.js's QA script (px). */
  --n34: 10px;
  --n56: 3px;
  --n72: 13px; /* phones only (40 px hero) */
  --n64: 0px;
  --gutter: 24px;
  --mar: 160px;
  --col: min(720px, calc(100vw - 2 * var(--gutter) - 2 * var(--mar)));
  --foot-h: 24px;
  --tick: 40px;
  --n17: 0px;
  --n12: 1px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 80px;
  scroll-padding-bottom: calc(var(--dock) + 24px);
  background-color: var(--ground);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 var(--r),
    var(--rule) var(--r) calc(var(--r) + 1px),
    transparent calc(var(--r) + 1px) 32px
  );
  background-size: 100% 32px;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font: 400 17px/32px var(--sans);
  font-stretch: 100%;
  padding-bottom: calc(var(--dock) + 32px);
  -webkit-font-smoothing: antialiased;
}
main {
  display: block;
  padding-top: 128px;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
h1,
h2,
p,
ol,
pre {
  margin: 0;
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font: 500 13px/1 var(--mono);
  color: var(--ground);
  background: var(--ink);
  text-decoration: none;
}
.skip:focus {
  top: 6px;
}
#ch-1:focus {
  outline: none;
}

/* ---------- top bar ---------- */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--bar);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  background: var(--ground);
  border-bottom: 1px solid var(--ink);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 500 18px/1 var(--sans);
  font-stretch: 125%;
  margin-right: auto;
}
.brand-mark {
  display: block;
}
.links {
  display: flex;
  gap: 8px;
}
.links a,
.bar-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font: 400 13px/1 var(--mono);
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.links a:hover,
.bar-action:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.bar-action {
  border: 1px solid var(--ink);
}

/* ---------- the reading head ---------- */
.head {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--head);
  height: 0;
  border-top: 1px solid rgba(16, 17, 19, 0.22);
  z-index: 20;
  pointer-events: none;
  display: none;
}
.js .head {
  display: block;
}
/* Two solid ink ticks in the far margins mark the head; the line between them is only a hint,
   so no sentence is ever struck through. */
.head::before,
.head::after {
  content: '';
  position: absolute;
  top: -1px;
  width: var(--tick);
  height: 2px;
  background: var(--ink);
}
.head::before {
  left: 0;
}
.head::after {
  right: 0;
}
.head-label {
  position: absolute;
  right: 0;
  min-width: 112px;
  text-align: right;
  padding-right: 8px;
  bottom: 6px;
  font: 400 12px/18px var(--mono);
  color: var(--ink-2);
  white-space: nowrap;
}

/* The label sits in the right margin; below 1360 px that margin holds the stamps. */
@media (max-width: 1359px) {
  .head-label {
    display: none;
  }
}

/* ---------- chapters ---------- */
.ch {
  margin-top: 96px;
  scroll-margin-top: 72px;
}
.hero {
  margin-top: 0;
}
.blk {
  width: min(calc(100% - 40px), 720px);
  margin-inline: auto;
}
.kick {
  font: 400 12px/32px var(--mono);
  color: var(--ink-2);
  position: relative;
  top: var(--n12);
}
.title {
  font: 500 56px/64px var(--sans);
  font-stretch: 125%;
  letter-spacing: -0.01em;
  position: relative;
  top: var(--n56);
  margin-bottom: 32px;
  overflow-wrap: break-word;
}
.label {
  font: 400 13px/32px var(--mono);
  color: var(--ink);
  position: relative;
  top: var(--n12);
}
.label.dim,
.note {
  color: var(--ink-2);
}
.note {
  font: 400 12px/32px var(--mono);
  position: relative;
  top: var(--n12);
}
.nojs {
  font: 400 12px/32px var(--mono);
  color: var(--red);
}

/* ---------- entries: id | sentence | stamp ---------- */
.entry {
  display: grid;
  grid-template-columns: var(--mar) var(--col) var(--mar);
  justify-content: center;
  width: 100%;
  margin: 0 auto 32px;
  position: relative;
}
.entry .id,
.entry .stamp {
  font: 400 12px/32px var(--mono);
  color: var(--ink-2);
  padding-top: 32px;
  position: relative;
  top: var(--n12);
}
.entry .id {
  grid-column: 1;
  text-align: right;
  padding-right: 24px;
}
.entry .txt {
  grid-column: 2;
  align-self: start;
  display: block;
  position: relative;
  top: var(--n34);
  font: 500 34px/64px var(--sans);
  font-stretch: 125%;
  letter-spacing: -0.005em;
  overflow-wrap: break-word;
  min-width: 0;
}
h1.entry .txt,
h2.entry .txt {
  top: var(--n56);
  font-size: 56px;
  letter-spacing: -0.01em;
}
h1.entry .txt {
  top: var(--n64);
  font-size: 64px;
  line-height: 64px;
  font-weight: 500;
  font-stretch: 118%;
  letter-spacing: -0.015em;
}
.entry .stamp {
  grid-column: 3;
  padding-left: 24px;
}
.entry .stamp .hint {
  display: none;
  color: var(--ink-2);
  white-space: normal;
  text-wrap: balance;
}
.js .entry[data-edit] .stamp .hint {
  display: block;
}

/* stamp colours by state */
.entry.is-sealed .s {
  color: var(--blue);
}
.entry.is-drafted .s,
.entry.is-listed .s {
  color: var(--ink-2);
}
.entry.is-broken .s {
  color: var(--red);
  font-weight: 500;
}

/* The read sweep (300 ms) then the stamp lands (120 ms). */
.js .entry .s {
  opacity: 0;
  transition: opacity 120ms linear 300ms;
}
.js .entry.is-read .s {
  opacity: 1;
}
.js .entry.is-quiet .s {
  transition: none;
}
.entry::before {
  /* The read mark: a 2-px tick in the left margin beside the node id. */
  content: '';
  position: absolute;
  left: calc((100% - var(--col)) / 2 - 14px);
  top: 48px;
  width: 8px;
  height: 2px;
  background: var(--blue);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition:
    opacity 120ms linear 300ms,
    transform 120ms linear 300ms;
  pointer-events: none;
}
.entry.is-read::before {
  opacity: 1;
  transform: scaleX(1);
}
.entry.is-quiet::before {
  transition: none;
}
.entry.is-read.is-broken::before {
  background: var(--red);
}
.entry.is-read.is-drafted::before,
.entry.is-read.is-listed::before {
  background: var(--ink-3);
}
.entry::after {
  /* The read sweep: ink drawn across the first rule under the entry. */
  content: '';
  position: absolute;
  grid-column: 2;
  left: 0;
  right: 0;
  bottom: -23px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms cubic-bezier(0.3, 0, 0.2, 1);
  pointer-events: none;
}
.entry.is-read::after {
  transform: scaleX(1);
}
.entry.is-quiet::after {
  transition: none;
}
.entry.is-broken::after {
  background: var(--red);
}
.entry.is-drafted::after,
.entry.is-listed::after {
  background: var(--ink-3);
}
/* D2: a committed edit re-lands the stamp (120 ms), the same transition as a first read. */
.js .entry.is-flash .s {
  opacity: 0;
  transition: none;
}
.js .entry.is-flashing .s {
  transition: opacity 120ms linear 0ms;
}

/* editable sentences */
.entry .txt[contenteditable] {
  cursor: text;
  text-decoration: underline dotted var(--ink-3);
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
  outline-offset: 6px;
}
.entry .txt[contenteditable]:focus-visible,
.entry .txt[contenteditable]:focus {
  outline: 2px solid var(--blue);
}
.entry.is-broken .txt {
  color: var(--red);
}
.entry .prov {
  grid-column: 2;
  font: 400 12px/32px var(--mono);
  color: var(--ink-2);
  position: relative;
  top: var(--n12);
}
.entry .prov::before {
  content: '';
}

/* ---------- controls ---------- */
.ctl,
.act {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0 16px;
  min-height: 64px;
  margin-bottom: 32px;
}
/* Every wrapped line is a multiple of 32: a button box is 44 + 2 * 10 = 64, a note line is 32. */
.ctl > .btn,
.act > .btn,
.ctl > .why {
  margin-block: 10px;
}
.ctl .note {
  flex: 1 1 200px;
}
.act .note {
  flex: 1 1 0;
  min-width: 0;
  color: var(--red);
}
.btn {
  min-height: 44px;
  padding: 0 18px;
  font: 500 13px/1 var(--mono);
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}
.btn:hover:not(:disabled) {
  background: var(--ink);
  color: var(--ground);
}
.btn.primary {
  background: var(--ink);
  color: var(--ground);
}
.btn.primary:hover:not(:disabled) {
  background: var(--blue);
  border-color: var(--blue);
}
.btn:disabled {
  color: var(--ink-3);
  border-color: var(--ink-3);
  background: var(--ground);
  cursor: default;
}
.btn.primary:disabled {
  color: var(--ground);
  background: var(--ink-3);
  border-color: var(--ink-3);
}
.why {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 400 12px/1 var(--mono);
  color: var(--ink-2);
}
.why input {
  min-height: 44px;
  width: 200px;
  max-width: 100%;
  padding: 0 10px;
  font: 400 13px/1 var(--mono);
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--ink-3);
  border-radius: 0;
}

/* the registration mark: two crosshairs 10 px apart that come into register on seal */
.regmark {
  display: block;
  overflow: visible;
}
.regmark .m {
  fill: none;
  stroke-width: 1;
  transition: transform 400ms cubic-bezier(0.3, 0, 0.2, 1);
}
.regmark .a {
  stroke: var(--ink);
}
.regmark .b {
  stroke: var(--ink-3);
}
.act.is-sealed .regmark .b {
  transform: translateX(-10px);
}
.act.is-sealed .regmark .a,
.act.is-sealed .regmark .b {
  stroke: var(--blue);
}

/* the contract panel: opaque, above the reading-head hairline (z 20) */
.contract {
  margin-bottom: 32px;
  position: relative;
  z-index: 25;
  background: var(--ground);
}
.contract summary {
  font: 400 12px/32px var(--mono);
  color: var(--ink);
  cursor: pointer;
  min-height: 32px;
}
.contract pre {
  height: 320px;
  overflow: auto;
  margin-top: 0;
  padding: 8px 12px;
  background: var(--ground);
  border: 1px solid var(--ink-3);
  font: 400 12px/18px var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.contract[open] {
  margin-bottom: 32px;
}
.js-only {
  display: none;
}
.js .js-only {
  display: block;
}
.js .ctl.js-only,
.js .act.js-only {
  display: flex;
}

/* ---------- the CLI block ---------- */
.cli {
  font: 400 15px/32px var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 32px;
  position: relative;
  top: var(--ncli, 0px);
  box-shadow:
    0 -1px 0 var(--ink),
    0 1px 0 var(--ink);
}
.cli .p {
  color: var(--ink-2);
}

/* ---------- film ---------- */
.film .frame {
  height: 416px;
  /* The film sits in front of the reading head (z 20) and its line; the bar and tape stay above. */
  position: relative;
  z-index: 25;
}
.film video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--ink);
}
.film .note {
  margin-top: 0;
}

.colophon {
  margin-top: 96px;
}
.colophon p {
  font: 400 12px/32px var(--mono);
  color: var(--ink-2);
}

/* ---------- chapter index ---------- */
.chapters {
  width: min(calc(100% - 40px), 720px);
  margin: 32px auto 0;
}
.chapters ol {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
}
.chapters a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px 0 0;
  font: 400 12px/1 var(--mono);
  color: var(--ink-2);
  text-decoration: none;
}
.chapters a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.chapters a[aria-current='true'] {
  color: var(--blue);
  font-weight: 500;
}
.chapters li {
  height: 64px;
  display: flex;
  align-items: center;
}

/* ---------- the verdict tape and its footnote ---------- */
.tape {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--foot-h);
  z-index: 40;
  min-height: 48px;
  max-height: 40vh;
  overflow: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 24px;
  font: 400 14px/20px var(--mono);
  color: var(--blue);
  background: var(--ground);
  border-top: 1px solid var(--blue);
}
.tape .strip {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  padding: 5px 8px;
  background: var(--ground);
}
.tape .strip i {
  display: block;
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink-3);
  background: transparent;
}
.tape .strip i[data-s='met'] {
  background: var(--blue);
  border-color: var(--blue);
}
.tape .strip i[data-s='broken'] {
  background: var(--red);
  border-color: var(--red);
}
.tape .strip i[data-s='grey'] {
  border-style: dashed;
}
.tape .msg {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.tape .exit {
  flex: 0 0 auto;
  white-space: nowrap;
}
.tape[data-state='changed'] {
  background: var(--red);
  color: var(--ground);
  border-top-color: var(--red);
  font-weight: 500;
}
.foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  min-height: 24px;
  margin: 0;
  padding: 4px 24px;
  font: 400 11.5px/16px var(--mono);
  color: var(--ink-2);
  background: var(--ground);
}
.foot-nojs {
  display: none;
}
html:not(.js) .foot-js {
  display: none;
}
html:not(.js) .foot-nojs {
  display: inline;
}

/* ---------- wide: chapter index becomes a fixed column on the right ---------- */
@media (min-width: 1440px) and (min-height: 701px) {
  .chapters {
    position: fixed;
    right: 24px;
    top: 96px;
    margin: 0;
    width: 120px;
    z-index: 10;
  }
  .chapters ol {
    display: block;
  }
  .chapters li {
    height: 32px;
  }
  .chapters a {
    min-height: 32px;
    padding: 0;
    background: var(--ground);
  }
  .chapters a[aria-current='true']::before {
    content: '▸ ';
  }
}

@media (max-width: 1199px) {
  :root {
    --mar: 96px;
  }
}

@media (min-width: 1140px) {
  .entry .stamp,
  .entry .stamp .hint {
    white-space: nowrap;
  }
}
@media (min-width: 1000px) and (max-width: 1139px) {
  .entry .stamp .s {
    white-space: nowrap;
  }
  .entry .stamp {
    font-size: 11.5px;
    padding-left: 12px;
  }
}

/* Below 1024 px the longest stamp ("drafted · not sealed") would overflow the viewport; it may wrap. */
@media (min-width: 1000px) and (max-width: 1023px) {
  .entry.is-drafted .stamp .s {
    white-space: normal;
  }
}

/* The longest stamp is allowed to wrap inside its margin column, at every width. */
@media (min-width: 1000px) {
  .entry.is-listed .stamp .s {
    white-space: normal;
    text-wrap: balance;
  }
}

/* C3: on short desktop windows the pre-release label must clear the verdict tape on first paint. */
@media (max-height: 760px) {
  main {
    padding-top: 96px;
  }
  h1.entry {
    margin-bottom: 0;
  }
}
@media (max-height: 700px) {
  main {
    padding-top: 64px;
  }
}

/* ---------- phones and narrow windows ---------- */
@media (max-width: 999px) {
  :root {
    --head: 40vh;
    --n34: -2px;
    --ncli: 1px;
    --n56: -5px;
    --n72: 8px;
  }
  .bar {
    padding: 0 12px 0 20px;
  }
  .links {
    display: none;
  }
  .brand {
    margin-right: auto;
  }
  .head-label {
    display: none;
  }
  .cli {
    font-size: 13px;
  }
  main {
    padding-top: 96px;
  }
  .ch {
    margin-top: 64px;
  }
  :root {
    --foot-h: 0px;
  }
  .entry {
    width: min(calc(100% - 40px), 720px);
    justify-content: normal;
    grid-template-columns: auto 1fr;
    margin-bottom: 32px;
  }
  .entry .txt {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: 22px;
    line-height: 32px;
    letter-spacing: 0;
  }
  h1.entry .txt,
  h2.entry .txt {
    font-size: 32px;
    line-height: 32px;
  }
  h1.entry .txt {
    top: var(--n72);
    font-size: 40px;
    line-height: 64px;
  }
  .title {
    font-size: 32px;
    line-height: 32px;
  }
  .entry .id,
  .entry .stamp {
    grid-row: 2;
    padding: 0;
    white-space: normal;
  }
  .entry .id {
    grid-column: 1;
    text-align: left;
    padding-right: 1ch;
  }
  .entry .stamp {
    grid-column: 2;
    padding-left: 0;
  }
  .entry .stamp .s:not(:empty)::before {
    content: '· ';
    color: var(--ink-2);
  }
  .entry .stamp .hint {
    display: none !important;
  }
  .entry::after {
    grid-column: 1 / -1;
  }
  .entry .prov {
    grid-column: 1 / -1;
  }
  .tape {
    min-height: 56px;
    bottom: 0;
    padding: 8px 12px;
    font-size: 13px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: start;
  }
  .tape .strip {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 0;
  }
  :root {
    --tick: 16px;
  }
  .entry::before,
  h1.entry::before {
    left: -14px;
    top: auto;
    bottom: 15px;
  }
  .foot {
    position: static;
    height: auto;
    min-height: 0;
    white-space: normal;
    padding: 0 20px;
    margin: 0 auto 32px;
    max-width: 720px;
    line-height: 32px;
    background: none;
  }
  .film .frame {
    height: 224px;
  }
  .film video {
    height: 100%;
    aspect-ratio: auto;
  }
  .contract pre {
    height: 224px;
  }
  .chapters ol {
    gap: 0 4px;
  }
  body {
    padding-bottom: calc(var(--dock) + 32px);
  }
}

@media (max-width: 999px) and (min-width: 640px) {
  .film .frame {
    height: 416px;
  }
}

/* ---------- reduced motion: no sweeps, no registration animation ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* No JavaScript: static identity. Hide the hooks that need script. */
html:not(.js) .tape .msg {
  color: inherit;
}

/* ---------- variant: background registration mark (see DESIGN.md) ---------- */
.regbg {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 0; /* set from mark.js: the free space left of the column */
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.regbg.is-off {
  display: none;
}
.regbg .rb-c,
.regbg .rb-x {
  fill: none;
  vector-effect: non-scaling-stroke;
  transition:
    stroke-width 300ms linear,
    stroke-opacity 300ms linear;
}
.rb-black {
  stroke: #101113;
  stroke-width: 1px;
  stroke-opacity: 0.07;
}
.rb-red {
  stroke: #c9331a;
  stroke-width: 1px;
  stroke-opacity: 0.16;
  will-change: transform;
  transition: opacity 300ms linear;
}
/* Registered: the pair coincides and reads as one slightly heavier black mark. */
.regbg.is-registered .rb-black {
  stroke-width: 2px;
  stroke-opacity: 0.1;
}
.regbg.is-registered .rb-black .rb-c,
.regbg.is-registered .rb-black .rb-x {
  stroke-width: 2px;
}
.regbg.is-registered .rb-red {
  opacity: 0;
}
.rb-black .rb-c,
.rb-black .rb-x,
.rb-red .rb-c,
.rb-red .rb-x {
  stroke: inherit;
  stroke-width: inherit;
  stroke-opacity: inherit;
}
/* Content sits above the mark. main stays non-isolating so the contract panel keeps its z-index. */
main {
  position: relative;
}
@media (max-width: 999px) {
  .foot {
    position: relative; /* was static; fixed elements (.bar, .head, .tape, desktop .foot) already stack above */
  }
}
@media (prefers-reduced-motion: reduce) {
  .regbg *,
  .rb-red {
    transition: none !important;
  }
}

/* ---------- V3: the intro ----------
   A white room. One small black mark in the centre; the red one comes in from the left as the
   visitor scrolls, joins it, the CLI answers, the name appears, and the joined mark carries the
   name to the top-left corner where the bar takes over. Scroll-driven only (a pure function of
   scroll position); no timers. Without JS or under reduced motion there is no intro. */
.intro {
  display: none;
}
.js .intro {
  display: block;
  height: 380vh; /* the scroll runway: a spacer only; the stage is fixed over it */
  position: relative;
  z-index: 35; /* above the bar (30) and the head (20); below the tape (40), which is hidden meanwhile */
}
.intro .stage {
  position: fixed;
  inset: 0;
  background: #fff;
  overflow: hidden;
}
/* The register rises into place under the fading white; the hero sits just under the bar then. */
.js .intro + main {
  padding-top: 128px;
}
.st-mark {
  position: absolute;
  inset: 0;
  display: block;
}
.st-mark .st-c,
.st-mark .st-x {
  fill: none;
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}
.st-black {
  stroke: var(--ink);
}
.st-red {
  stroke: var(--red);
  will-change: transform;
}
.st-black {
  will-change: transform;
}
/* The join is an overprint: for a beat the two inks are translucent and darker where both lie. */
.st-mark.is-overprint .st-black,
.st-mark.is-overprint .st-red {
  mix-blend-mode: multiply;
  stroke-opacity: 0.8;
}
.st-ruler .st-rl {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1px;
}
.st-ruler .st-rt {
  font: 400 12px var(--mono);
  fill: var(--ink-2);
  text-anchor: middle;
}
.st-cli,
.st-name,
.st-hint {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  opacity: 0;
}
.st-cli {
  font: 400 15px/24px var(--mono);
  color: var(--ink);
  white-space: pre-wrap;
}
.st-cli .st-l0,
.st-cli .st-l1,
.st-cli .st-l2 {
  display: block;
  min-height: 24px;
}
.st-cli .st-l0 {
  color: var(--ink-2);
}
.st-cli .st-l0::before {
  content: '$ ';
  color: var(--ink-3);
}
.st-cli .st-l2 {
  color: var(--ink-2);
  font-size: 13px;
}
.st-cli.is-changed .st-l1 {
  color: var(--red);
}
.st-name {
  font: 500 56px/64px var(--sans);
  font-stretch: 125%;
  letter-spacing: -0.01em;
  color: var(--ink);
  transform-origin: 0 50%;
  will-change: transform;
  white-space: nowrap;
}
/* The name is typed in the mono face first, then becomes the wordmark. */
.st-name .st-nm,
.st-name .st-ns {
  display: block;
  grid-area: 1 / 1;
}
.st-name {
  display: grid;
}
.st-name .st-nm {
  font: 400 40px/64px var(--mono);
  letter-spacing: 0;
}
/* The wordmark keeps the face the intro typed it in. */
.brand-name {
  font: 400 17px/1 var(--mono);
  letter-spacing: 0;
}
.st-hint {
  bottom: 32px;
  font: 400 12px/32px var(--mono);
  color: var(--ink-3);
}
/* While the intro runs, the instrument is quiet: no bar, no head, no tape, no chapter index. */
.is-intro .bar,
.is-intro .head,
.is-intro .tape,
.is-intro .foot,
.is-intro .chapters {
  opacity: 0;
  transition: opacity 400ms linear;
  pointer-events: none;
}
.bar,
.head,
.tape,
.foot,
.chapters {
  transition: opacity 400ms linear;
}
.is-intro .brand {
  visibility: hidden;
}
@media (max-width: 999px) {
  .st-name {
    font-size: 40px;
    line-height: 48px;
  }
  .st-cli {
    font-size: 13px;
    padding: 0 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .js .intro {
    display: none;
  }
}
