/* Shared styles for the interior pages (blog, posts, careers, not found).
   The homepage keeps its own inline CSS and carries the same colors and
   type. Graphite ground, bone type, and one signal orange kept for marks
   and for anything that asks to be pressed. Headings and text are the
   system grotesque. Labels are mono. */

:root {
  /* Color. Everything that is read is the bone, headings and paragraphs
     alike, and a sentence in bold is set apart by its weight. The gray is
     only for a line that supports a title, such as a post's summary in the
     list of posts, and never for a paragraph. */
  --bg: #0a0b0c;                        /* the ground, graphite */
  --ink: #f1efe9;                       /* everything that is read, bone */
  --body: #b9b6ad;                      /* a line that supports a title */
  --dim: rgba(241, 239, 233, 0.54);     /* labels and the small print */
  --line: rgba(241, 239, 233, 0.16);    /* hairlines */
  --accent: #ff5f24;                    /* marks, and anything pressed */
  --cross: rgba(255, 95, 36, 0.78);     /* the survey crosses */
  /* Fonts already on the visitor's device, so nothing is downloaded. Each
     list names the closest match on Apple, Windows, Android and Linux in
     turn. Menlo leads the mono list because every Apple device has it and
     every browser there can use it, where only Safari can reach the
     system's own mono. So a Mac shows the same labels in every browser,
     and an iPhone shows the same labels as a Mac. */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable", "Segoe UI", Roboto, system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: Menlo, ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", "Cascadia Code", Consolas, "Roboto Mono", "Noto Sans Mono", "DejaVu Sans Mono", monospace;
  /* the left rail that dates and locations sit in on wide screens */
  --rail: 212px;
  /* The widest a line of running text goes. It is the page's column less
     the rail, so on a wide screen text ends where the lists and the figure
     end. Lower it to bring every text column in at once. */
  --measure: 868px;

  /* Type. Six sizes and two letter spacings cover every page, and the
     homepage's inline CSS carries the same list. Labels are mono capitals
     and text is the grotesque. Running text is one size wherever it
     appears, in a post and at the top of a page alike. */
  --t-fine: 10px;       /* the small print */
  --t-label: 11px;      /* navigation, dates, filters, anything pressed */
  --t-small: 15px;      /* summaries and asides */
  --t-body: 17px;       /* running text */
  --t-row: 20px;        /* a row's title */
  --t-post: 22px;       /* a post's title in the list of posts */
  --track: 0.18em;
  --track-wide: 0.22em;
  --tight: -0.04em;     /* headings */

  /* Motion. One curve and two speeds, quick for anything pressed and slow
     for anything arriving. --rise names the arriving animation, and is
     switched off further down for visitors who ask for less motion. */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --quick: 0.15s;
  --arrive: 0.55s;
  --rise: rise;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--bg);
  /* a phone turned on its side keeps the sizes set here */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* room for a scroll bar on every page, so the bar across the top is the
     same width on a short page as on a long one */
  scrollbar-gutter: stable;
  /* a tap shows the pressed states below, not the browser's gray flash */
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* an older browser does not know the second of these and keeps the
     first, so the small print still stands at the foot of a short page */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding:
    calc(26px + env(safe-area-inset-top))
    calc(30px + env(safe-area-inset-right))
    calc(24px + env(safe-area-inset-bottom))
    calc(30px + env(safe-area-inset-left));
}

a { color: var(--ink); text-decoration: none; }

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

:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

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

/* The bar across the top. Two boxes with the site's usual hairline border
   and nothing between them, the wordmark in the one at the left and the
   navigation in cells in the one at the right. Each box is solid, and the
   current page's cell is filled. */
header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 46px;
}

.brand {
  display: flex;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  transition: background var(--quick) var(--ease), color var(--quick) var(--ease);
}

.brand svg { display: block; width: clamp(112px, 30vw, 156px); height: auto; }

nav { display: flex; border: 1px solid var(--ink); background: var(--bg); }

nav a {
  display: flex;
  align-items: center;
  /* letter spacing leaves a gap after the last letter. The right padding
     gives it back, so the word sits in the middle of its cell. */
  padding: 0 calc(20px - var(--track-wide)) 0 20px;
  border-left: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: var(--track-wide);
  color: var(--ink);
  transition: background var(--quick) var(--ease), color var(--quick) var(--ease);
}

/* the box's own border stands at the left of its first cell */
nav a:first-child { border-left: 0; }

/* A cell fills for the current page and while it is pressed. A pointer that
   can hover fills it on the way over too. A finger never leaves a cell
   filled behind it, since touch screens don't match the hover rule. */
nav a[aria-current="page"], .brand:active, nav a:active { background: var(--ink); color: var(--bg); }

@media (hover: hover) {
  .brand:hover, nav a:hover { background: var(--ink); color: var(--bg); }
}

/* the focus ring sits inside the cell, where the bar cannot cut it off */
.brand:focus-visible, nav a:focus-visible { outline: 1px solid var(--accent); outline-offset: -5px; }

/* ---------- content column ---------- */

main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding: clamp(56px, 11vh, 124px) 0 96px;
}

/* The head of a page. The title, a small figure of coast beside it, and a
   row of survey stations under both. The stations are the same crosses the
   homepage lays over made ground. */
.head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px 48px;
  align-items: end;
  margin-bottom: clamp(36px, 6.5vh, 60px);
}

@media (min-width: 860px) {
  .head { grid-template-columns: minmax(0, 1fr) minmax(0, 47%); }
}

.head h1 {
  font-size: clamp(46px, 6.4vw, 88px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: var(--tight);
  text-wrap: balance;
  color: var(--ink);
}

/* the figure, drawn by figure.js. It stays out of sight until it is drawn,
   so a page without scripts shows no empty frame. */
.fig { border: 1px solid var(--line); visibility: hidden; opacity: 0; transition: opacity var(--arrive) var(--ease); }
.fig.drawn { visibility: visible; opacity: 1; }

/* The first time a figure is drawn, figure.js drops its dots into place and
   marks it .plot, and its frame comes up at once so the dots are seen
   arriving. The line work waits out of sight to the right and, when the
   script marks the figure .built, is drawn across to the left, the way the
   dividing line builds a site on the homepage. */
.fig.plot { transition-duration: var(--quick); }
.fig.plot canvas + canvas { clip-path: inset(0 0 0 100%); }
.fig.plot.built canvas + canvas { clip-path: inset(0 0 0 0); transition: clip-path 0.9s var(--ease); }

.fig .well { position: relative; height: clamp(128px, 23vh, 212px); overflow: hidden; }
.fig canvas { position: absolute; left: 0; top: 0; }
.fig canvas:first-child { image-rendering: pixelated; image-rendering: crisp-edges; }

.head::after {
  content: "";
  grid-column: 1 / -1;
  display: block;
  height: 9px;
  margin-top: clamp(4px, 2vh, 18px);
  background-image:
    linear-gradient(to right, var(--cross) 0, var(--cross) 9px, transparent 9px),
    linear-gradient(to right, transparent 4px, var(--cross) 4px, var(--cross) 5px, transparent 5px),
    linear-gradient(var(--line), var(--line));
  background-size: 64px 1px, 64px 9px, 100% 1px;
  background-position: 0 4px, 0 0, 0 4px;
  background-repeat: repeat-x, repeat-x, no-repeat;
}

/* A page's opening text is running text. The rule for it is in the essay
   block further down, shared with the paragraphs of a post, so the two are
   always the same size, color and width. */
.lede:last-of-type { margin-bottom: 0; }

/* A statement over a page's opening text. Each sentence is a span and takes
   a line of its own. The size follows the width it has to fill, so a
   sentence of about thirty letters sits on one line on a phone as it does
   on a wide screen. */
.opener {
  max-width: var(--measure);
  font-size: clamp(18px, calc((100vw - 40px) / 15.6), 32px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
  color: var(--ink);
  margin-bottom: 0.85em;
}

.opener span { display: block; }

@media (min-width: 860px) {
  .lede, .opener { margin-left: var(--rail); }
}

/* small mono lines, such as the contact address and the way back */
.aside {
  margin-top: 44px;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: var(--track);
  color: var(--dim);
}

.aside a {
  padding: 8px 0;
  transition: color var(--quick) var(--ease);
}

.aside a:focus-visible, .aside a:active { color: var(--accent); }

/* a way back, or on to another page, is spaced like the rest of the
   navigation, the same as the way back at the top of an essay */
.aside a[href^="/"] { letter-spacing: var(--track-wide); }

/* A line that stands over a list, such as the contact address over the
   posts. It sits the same distance above the list as the count does above
   the open roles. */
.aside.over { margin: 0 0 18px; }

/* ---------- lists, shared by the posts and the open roles ---------- */

.posts, .jobs { list-style: none; }

.posts li, .jobs li { border-top: 1px solid var(--line); }
.posts li:last-child, .jobs li:last-child { border-bottom: 1px solid var(--line); }

.post, .job-link {
  position: relative;
  display: block;
  padding: 24px 44px 24px 0;
}

/* the arrow at the end of every row */
.post::after, .job-link::after {
  content: "\2192";
  position: absolute;
  right: 2px;
  top: 24px;
  font-family: var(--mono);
  font-size: var(--t-small);
  line-height: 28px;
  color: var(--accent);
  transition: transform var(--quick) var(--ease);
}

/* the arrow steps forward and the date or the place brightens */
.post:focus-visible::after, .post:active::after,
.job-link:focus-visible::after, .job-link:active::after { transform: translateX(5px); }

.post:focus-visible .date, .post:active .date,
.job-link:focus-visible .loc, .job-link:active .loc { color: var(--ink); }

.post .date, .job-link .loc {
  display: block;
  font-family: var(--mono);
  font-size: var(--t-label);
  line-height: 1.6;
  letter-spacing: var(--track);
  color: var(--dim);
  transition: color var(--quick) var(--ease);
}

/* A place too long for one line, such as a role in two cities, breaks into
   even lines, so no dot or stroke is left hanging at the end of the first. */
.job-link .loc { text-wrap: balance; }

.post .title, .job-link .title {
  display: block;
  margin-top: 10px;
  font-size: var(--t-post);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.022em;
  text-wrap: balance;
  color: var(--ink);
}

.post .sum {
  display: block;
  margin-top: 8px;
  max-width: 620px;
  font-size: var(--t-small);
  line-height: 1.5;
  letter-spacing: -0.004em;
  color: var(--body);
}

/* wide screens: the date or the location sits in the rail, the entry beside it */
@media (min-width: 860px) {
  .post, .job-link {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    align-items: baseline;
  }
  .post .title, .job-link .title { margin-top: 0; }
  .post .sum { grid-column: 2; }
}

/* ---------- essay ---------- */

.back {
  /* the space under the way back, closed up on a phone further down */
  --gap: clamp(28px, 6vh, 56px);
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: var(--track-wide);
  opacity: 0.6;
  padding: 12px 0;
  margin: -12px 0 var(--gap);
  transition: opacity var(--quick) var(--ease);
}

.back:focus-visible, .back:active { opacity: 1; }

article .date {
  font-family: var(--mono);
  font-size: var(--t-label);
  line-height: 1.6;
  letter-spacing: var(--track);
  color: var(--dim);
  margin-bottom: 18px;
}

/* The essay's title is the page's h1. Its size follows the width it has to
   fill and the number of letters in it, so it sits on one line on a phone
   as it does on a wide screen. A post gives the count of its title's
   letters and spaces as --letters on its h1, and a title that gives none
   is taken to be twenty. Each letter is allowed 0.49 of the type's size,
   which leaves room for the wider fonts on Windows and Android. A title
   too long for the smallest size wraps into even lines. The three sums are
   for the page's three layouts, a phone, a tablet, and a wide screen where
   the date takes the rail. */
article h1 {
  --letters: 20;
  --fit: calc(var(--letters) * 0.49);
  font-size: clamp(18px, calc((100vw - 40px) / var(--fit)), 72px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: var(--tight);
  text-wrap: balance;
  color: var(--ink);
}

@media (min-width: 721px) {
  article h1 { font-size: clamp(26px, calc((100vw - 60px) / var(--fit)), 72px); }
}

@media (min-width: 860px) {
  article h1 { font-size: clamp(40px, calc((min(100vw - 60px, 1080px) - var(--rail)) / var(--fit)), 72px); }
}

article .subtitle {
  margin: 22px 0 clamp(36px, 7vh, 64px);
  font-family: var(--mono);
  font-size: var(--t-label);
  line-height: 1.6;
  letter-spacing: var(--track-wide);
  color: var(--accent);
}

/* Running text, which is the paragraphs of a post and the opening text of
   a page such as Careers. It is one size and one color wherever it
   appears, the first paragraph included, and it runs the width of its
   column. */
article p, .lede {
  max-width: var(--measure);
  font-size: var(--t-body);
  line-height: 1.62;
  letter-spacing: -0.006em;
  text-wrap: pretty;
  color: var(--ink);
  margin-bottom: 1.2em;
}

article p:last-child { margin-bottom: 0; }

/* A link inside a sentence of a post is underlined in the orange, the same
   as the links inside the sentences on Careers. */
article p a {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--quick) var(--ease);
}

article p a:focus-visible, article p a:active { color: var(--accent); }

/* A sentence a post sets in bold takes the weight of the headings. The text
   around it is the same color, so the weight alone sets it apart. */
article p strong { font-weight: 600; }

/* wide screens: the date sits in the rail and the essay runs beside it */
@media (min-width: 860px) {
  article {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    align-items: baseline;
  }
  article .date { grid-column: 1; margin-bottom: 0; }
  article h1, article .subtitle, article p { grid-column: 2; }
}

/* the way out at the foot of an essay */
.end {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--measure);
  margin-top: clamp(48px, 9vh, 84px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

@media (min-width: 860px) {
  .end { margin-left: var(--rail); }
}

/* ---------- careers ---------- */

.board { margin-top: clamp(48px, 9vh, 84px); }

.board-note {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: var(--track);
  color: var(--dim);
  margin-bottom: 18px;
  min-height: 1em;
}

.board .fallback {
  max-width: var(--measure);
  font-size: var(--t-small);
  line-height: 1.5;
  letter-spacing: -0.004em;
  color: var(--body);
}

.board .fallback a, .board .aside a {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* the line under the list is a sentence, so it is set as text */
.board .aside {
  margin-top: 32px;
  font-family: var(--sans);
  font-size: var(--t-small);
  line-height: 1.5;
  letter-spacing: -0.004em;
  color: var(--body);
}

/* department filter */

/* The filters sit on one line on every screen, whatever Ashby lists, and
   they never wrap. The row's box reaches past the column by the page's
   margin on each side and takes that margin back as padding, so the first
   filter starts where the column does. On a phone or a tablet that carries
   the box to both edges of the screen. A row too long for it runs off the
   right edge, to be pulled sideways. board.js says how far the row runs
   past each side, and that side fades out, so the row reads as having more
   to it. A phone first closes the row up to fit, see the filters on a phone
   further down. */
.filters {
  --left: calc(30px + env(safe-area-inset-left));
  --right: calc(30px + env(safe-area-inset-right));
  --fade: 64px;
  display: flex;
  gap: 26px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* a filter reached with the keyboard stops clear of the fade */
  scroll-padding-inline: var(--fade);
  /* the padding above and below holds the area a finger presses and the
     focus ring, and the margins take it back, so nothing else moves */
  margin: -16px calc(-1 * var(--right)) 8px calc(-1 * var(--left));
  padding: 16px var(--right) 16px var(--left);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 min(var(--fade), var(--past-left, 0px)), #000 calc(100% - min(var(--fade), var(--past-right, 0px))), transparent);
  mask-image: linear-gradient(to right, transparent, #000 min(var(--fade), var(--past-left, 0px)), #000 calc(100% - min(var(--fade), var(--past-right, 0px))), transparent);
}

.filters::-webkit-scrollbar { display: none; }

/* board.js hides the filters until there are roles to sort, and the rule
   above would show them all the same */
.filters[hidden] { display: none; }

.chip {
  flex: none;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 8px 0;
  margin: -8px 0;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: var(--track);
  color: var(--ink);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--quick) var(--ease);
}

.chip:focus-visible, .chip:active { opacity: 0.85; }

.chip[aria-pressed="true"] {
  opacity: 1;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}

.job-link { padding-top: 20px; padding-bottom: 20px; }
.job-link::after { top: 20px; line-height: 26px; }
.job-link .title { font-size: var(--t-row); letter-spacing: -0.018em; }

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

footer {
  display: flex;
  justify-content: flex-end;
}

/* the small print, which is the copyright line and nothing else */
.legal {
  font-family: var(--mono);
  font-size: var(--t-fine);
  letter-spacing: var(--track);
  color: var(--dim);
}

/* tablets, where the tall gaps of a wide screen would leave a page mostly
   empty above its first line */
@media (max-width: 1024px) {
  main { padding-top: clamp(48px, 7.5vh, 84px); padding-bottom: 80px; }
}

/* phones, at the same width the homepage changes at. The bar sits the same
   distance from the top as from the sides, and the gaps between the parts
   of a page close up. The small print is a strip across the foot of the
   page, centered under a faint rule, the same as on the homepage. Letter
   spacing leaves a gap after the last letter, and the padding on the left
   matches it, so the line is centered by its letters. */
@media (max-width: 720px) {
  body {
    padding:
      calc(20px + env(safe-area-inset-top))
      calc(20px + env(safe-area-inset-right))
      calc(16px + env(safe-area-inset-bottom))
      calc(20px + env(safe-area-inset-left));
  }
  .legal { flex: 1; padding: 15px 0 0 var(--track); border-top: 1px solid var(--line); text-align: center; }
  .brand { padding: 0 14px; }
  nav a { padding: 0 calc(13px - var(--track-wide)) 0 13px; }
  main { padding-top: clamp(36px, 5.5vh, 52px); padding-bottom: 64px; }
  .head { gap: 22px 48px; margin-bottom: 32px; }
  .aside { margin-top: 32px; }
  .post, .job-link { padding-top: 20px; padding-bottom: 20px; }
  .post::after { top: 20px; }
  /* a size that steps down takes the letter spacing of the size it lands on */
  .post .title { font-size: var(--t-row); letter-spacing: -0.018em; }
  .back { --gap: 28px; }
  article .date { margin-bottom: 14px; }
  article .subtitle { margin: 18px 0 32px; }
  .end { margin-top: 44px; }
  .board { margin-top: 40px; }
}

/* the narrowest phones */
@media (max-width: 350px) {
  .brand { padding: 0 10px; }
  .brand svg { width: 96px; }
  nav a { padding: 0 calc(9px - 0.16em) 0 9px; letter-spacing: 0.16em; }
}

/* Under 300 pixels, which is the outer screen of the first folding phones,
   or a phone set to show everything at its largest. The two boxes of the
   bar close up once more, so they still stand apart. The homepage's inline
   CSS has the same. */
@media (max-width: 300px) {
  .brand { padding: 0 8px; }
  .brand svg { width: 84px; }
  nav a { padding: 0 calc(7px - 0.12em) 0 7px; letter-spacing: 0.12em; }
}

/* ---------- pointers that hover ---------- */

/* Every hover state is here, so a touch screen gets none of them. A finger
   gets the pressed states written beside each rule above. */
@media (hover: hover) {
  .aside a:hover, article p a:hover { color: var(--accent); }
  .post:hover::after, .job-link:hover::after { transform: translateX(5px); }
  .post:hover .date, .job-link:hover .loc { color: var(--ink); }
  .back:hover { opacity: 1; }
  .chip:hover { opacity: 0.85; }
}

/* ---------- fingers ---------- */

/* On a touch screen the small links and the filters get a taller area to
   press, about 44 pixels, without moving anything else on the page. */
@media (pointer: coarse) {
  .aside a, .board .fallback a { padding-block: 16px; }
  .back { padding-block: 16px; margin-top: -16px; margin-bottom: calc(var(--gap) - 4px); }
  .chip { padding: 15px 11px; margin: -15px -11px; }
  /* A filter's box is tall here, and a focus ring drawn round the whole of
     it would run into the count line above. So the ring is drawn inside the
     box, close round the word. */
  .chip:focus-visible { outline-offset: -7px; }
}

/* ---------- the filters on a phone ---------- */

/* A row of filters too long for its screen runs off the edge, see the
   department filter above. A phone is narrow enough for that to happen with
   the few filters there are, so there the row is closed up to fit before it
   is left to run. board.js sets it one of three ways.

   If the row fits as it is on a wide screen, nothing changes.

   If it is too long, board.js marks it .fit. The row is closed up and sized
   to the column, the way a post's title is. board.js gives the count of the
   letters as --letters and of the filters as --count, and the sum is the
   row's width counted in type sizes, each letter 0.603 of the size plus its
   spacing and each gap 1.55. As the screen narrows the gaps close up first,
   then the letter spacing, then the type steps down, and the filters are
   spread from one margin to the other. The type never goes under 9.5
   pixels.

   If the row is too long even for that, the mark comes off again. The row
   stays at its full size and runs off the right edge of the screen, to be
   pulled sideways. This is the row on the narrowest phones, and on any
   phone once Ashby lists more departments than it has room for.

   This block comes after the one for fingers because both set the sides of
   a filter's box. */
@media (max-width: 720px) {
  /* the page's margins are narrower here, and the row's box follows them */
  .filters {
    --left: calc(20px + env(safe-area-inset-left));
    --right: calc(20px + env(safe-area-inset-right));
  }

  /* each filter's box reaches half way to its neighbors, so the boxes meet */
  .chip { padding-inline: 13px; margin-inline: -13px; }
  .chip:focus-visible { outline-offset: -4px; }

  .filters.fit {
    --room: calc(100vw - var(--left) - var(--right));
    --sum: calc(var(--letters) * 0.703 + (var(--count) - 1) * 1.55 - 0.1);
    --size: clamp(9.5px, calc(var(--room) / var(--sum)), var(--t-label));
    justify-content: space-between;
    column-gap: calc(var(--size) * 1.55);
  }

  .fit .chip {
    /* what the column has left once the row is at full size goes to the
       letter spacing, up to the spacing every other label has */
    --spacing: clamp(0.1em, calc(0.1em + (var(--room) - var(--t-label) * var(--sum)) / var(--letters)), var(--track));
    font-size: var(--size);
    letter-spacing: var(--spacing);
    padding-inline: calc(var(--size) * 0.775);
    margin-inline: calc(var(--size) * -0.775);
  }

  /* letter spacing leaves a gap after the last letter, which the margin
     gives back, so the last filter ends at the margin by its letters */
  .fit .chip:last-child { margin-right: calc(var(--size) * -0.775 - var(--spacing)); }
}

/* ---------- arriving ---------- */

/* Words are on screen from the first frame, so a first visit waits for
   nothing. What arrives is what gets made after the page opens. The figure
   at the head of a page fades in when figure.js has drawn it, and the open
   roles rise into place a row at a time once they have loaded. board.js
   numbers the rows. */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}

.jobs li {
  animation: var(--rise) var(--arrive) var(--ease) both;
  animation-delay: calc(var(--n, 0) * 30ms);
}

/* ---------- from page to page ---------- */

/* Browsers that can carry a transition across a page load keep the bar in
   place, fade the old page out and bring the new one up into place under
   it. Other browsers just load the page. The homepage's inline CSS has its
   own half of this.

   The rule that switches it on, @view-transition, is not here. It sits in a
   style tag in the head of each page, because a browser decides whether to
   run the transition as the body starts, and this file may not have arrived
   by then. A page that leaves it out simply loads without the move. */

header { view-transition-name: bar; }

::view-transition-old(root) { z-index: 1; mix-blend-mode: normal; animation: leave 0.16s ease-out both; }
::view-transition-new(root) { mix-blend-mode: normal; animation: rise 0.42s var(--ease) both; }
::view-transition-old(bar), ::view-transition-new(bar) { animation-duration: 0.18s; }

@keyframes leave {
  to { opacity: 0; }
}

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

/* Visitors who ask for less motion get every page complete from the first
   frame. draw.js sets .still for them, and for ?still on the address. */
@media (prefers-reduced-motion: reduce) {
  :root { --rise: none; }
  .fig { transition: none; }
}

.still { --rise: none; }
.still .fig { transition: none; }
