/* okurisaki.com: a station departure board in the app icon's colors. Navy for the board and the
   night it hangs in, cream for the signage walls below it, and coral for the line color. The only
   foreign material is macOS's own menu and notifications, drawn in the system font. */

/* Fallback faces for systems without Avenir Next and Hiragino Sans. They follow the Mac fonts
   in every stack, so a Mac never downloads them. Each file is declared at the weight it stands
   in for: Nunito Sans at 550 and 700 matches Avenir Next Medium and Demi Bold, and Zen Kaku
   Gothic New Medium and Bold match Hiragino Sans W5 and W6. The ranges are the subsets. */
@font-face {
  font-family: "Nunito Sans";
  src: url("/assets/fonts/nunito-sans-550.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+20, U+26-29, U+2C-37, U+3A, U+41-57, U+59-5A, U+61-7A, U+7E, U+A9, U+B7,
    U+201C-201D, U+2026;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("/assets/fonts/nunito-sans-700.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+20, U+26-29, U+2C-37, U+3A, U+41-57, U+59-5A, U+61-7A, U+7E, U+A9, U+B7,
    U+201C-201D, U+2026;
}

@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("/assets/fonts/zen-kaku-gothic-new-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+308A, U+5148, U+9001;
}

@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("/assets/fonts/zen-kaku-gothic-new-bold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+308A, U+5148, U+9001;
}

:root {
  --navy: #0b3646;
  --cream: #f6eedc;
  --coral: #f4754a;
  --fold: #b8492b;

  /* On navy. Secondary text and rules are cream mixed into the navy, never gray. */
  --ink: var(--cream);
  --ink-soft: color-mix(in oklab, var(--cream) 78%, var(--navy));
  --rule: color-mix(in oklab, var(--cream) 22%, transparent);
  --rule-strong: color-mix(in oklab, var(--cream) 58%, transparent);
  --board-face: color-mix(in oklab, var(--navy) 93%, var(--cream));
  --board-head: color-mix(in oklab, var(--navy) 84%, #000);
  --coral-hover: color-mix(in oklab, var(--coral) 86%, var(--cream));

  /* On cream. */
  --paper-ink: var(--navy);
  --paper-ink-soft: color-mix(in oklab, var(--navy) 80%, var(--cream));
  --paper-rule: color-mix(in oklab, var(--navy) 18%, transparent);
  --sign-face: color-mix(in oklab, var(--cream) 45%, #fff);
  --shadow-ink: 3 22 30;

  --latin: "Avenir Next", Avenir, "Nunito Sans", system-ui, sans-serif;
  --jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Zen Kaku Gothic New", sans-serif;
  --mac: system-ui, -apple-system, sans-serif;

  --step-display: clamp(2.5rem, 1.1rem + 5.3vw, 5.25rem);
  --step-heading: clamp(1.625rem, 1.15rem + 1.4vw, 2.375rem);
  --step-body: 1.0625rem;
  --step-read: 1.125rem;
  --step-small: 0.9375rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 5vw, 80px);
  --max: 1280px;
  --space: clamp(3.5rem, 2rem + 5vw, 6.5rem);

  /* Board geometry. The Finder menu lines its Send To item up with the board's middle row. */
  --head-h: 58px;
  --row-h: 52px;
  --menu-w: 232px;
  --sendto-center: 250px; /* 5px padding, 9 items of 22px, 4 separators of 9px, and half an item */

  color-scheme: dark;
  scrollbar-color: color-mix(in oklab, var(--cream) 34%, var(--navy)) var(--navy);
}

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

html {
  background: var(--navy);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;

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

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font: 500 var(--step-body) / 1.55 var(--latin);
  caret-color: var(--coral);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--coral);
  color: var(--navy);
}

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

h1,
h2 {
  font-weight: 600;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* A Japanese word breaks between any two characters unless told otherwise. */
[lang="ja"] {
  font-family: var(--jp);
  word-break: keep-all;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  text-decoration-color: var(--coral);
}

a:hover {
  text-decoration-color: currentColor;
}

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

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

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 40;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  translate: 0 -160%;
}

.skip-link:focus-visible {
  translate: 0 0;
  outline-color: var(--coral);
}

/* Masthead: the brand, the sections, and a quiet download. The coral one belongs to the hero. */

.masthead {
  display: flex;
  align-items: center;
  gap: 8px 32px;
  min-height: 68px;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

/* The icon's navy square would vanish into the navy page, so a hairline traces its edge. */
.brand img {
  border-radius: 22%;
  box-shadow: 0 0 0 1px var(--rule-strong);
}

.brand__ja {
  padding-top: 2px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
}

.masthead__nav {
  display: flex;
  gap: 4px 28px;
}

.masthead__nav a {
  color: var(--ink-soft);
  font-size: var(--step-small);
  text-decoration-color: transparent;
}

.masthead__nav a:hover,
.masthead__nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration-color: var(--coral);
}

.masthead .download {
  display: inline-block;
  padding-block: 6px;
  font-size: var(--step-small);
  font-weight: 600;
  line-height: 1.4;
  text-decoration-color: var(--rule-strong);
  white-space: nowrap;
}

.masthead .download:hover {
  text-decoration-color: var(--coral);
}

/* The download button: coral, the one bright control on the page. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 11px;
  background: var(--coral);
  color: var(--navy);
  font-size: var(--step-body);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, #fff 35%, transparent),
    0 10px 24px -12px rgb(var(--shadow-ink) / 0.7);
}

.button:hover {
  background: var(--coral-hover);
}

.button:active {
  background: var(--fold);
  color: var(--cream);
  translate: 0 1px;
}

.get {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.get__version {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

/* Hero */

.hero {
  padding-top: 32px;
  padding-bottom: clamp(3rem, 2rem + 2vw, 3.5rem);
}

.hero h1 {
  max-width: 14em;
  font-size: var(--step-display);
  line-height: 1;
  letter-spacing: -0.028em;
}

.hero__row {
  display: grid;
  grid-template-columns: minmax(0, 37rem) auto;
  justify-content: space-between;
  align-items: end;
  gap: 24px 48px;
  margin-top: 24px;
}

.lede {
  color: var(--ink-soft);
  font-size: 1.1875rem;
}

/* The station: Finder's menu opens into the departure board. */

.station {
  display: grid;
  grid-template-columns: var(--menu-w) minmax(0, 1fr);
  grid-template-areas:
    ". ready"
    "finder board";
  margin-top: 60px;
}

.station__ready {
  grid-area: ready;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  min-height: 44px;
  padding: 0 2px 12px 18px;
  font-size: var(--step-small);
}

.ready {
  margin-right: auto;
  color: var(--ink-soft);
}

.ready b {
  color: var(--ink);
  font-weight: 600;
}

/* A file name, or "right-click" in the headline, never breaks at its hyphen. */
.file,
.nowrap {
  white-space: nowrap;
}

/* The hint and Play again take turns in one slot of the same height, so the board never moves. */
.try,
.again {
  min-height: 32px;
}

.try {
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.again {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: 600 0.875rem / 1 var(--latin);
  cursor: pointer;
}

.again svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.again:hover {
  background: color-mix(in oklab, var(--cream) 10%, transparent);
}

.again:active {
  border-color: var(--fold);
  background: var(--fold);
}

/* Author display values outrank the browser's [hidden] rule, so restate it. */
.try[hidden],
.again[hidden] {
  display: none;
}

.finder {
  grid-area: finder;
  align-self: start;
  position: relative;
  z-index: 2;
  margin-top: calc(var(--head-h) + 2.5 * var(--row-h) - var(--sendto-center));
}

.finder__note {
  margin-top: 22px;
  padding-right: 28px;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

/* macOS chrome: the only gray, and the only system font, on the page. */

.mac-menu {
  position: relative;
  width: var(--menu-w);
  padding: 5px;
  border-radius: 11px;
  background: rgb(240 240 240 / 0.97);
  box-shadow:
    0 0 0 0.5px rgb(0 0 0 / 0.35),
    inset 0 0 0 0.5px rgb(255 255 255 / 0.7),
    0 14px 34px rgb(0 0 0 / 0.38),
    0 3px 8px rgb(0 0 0 / 0.2);
  color: rgb(0 0 0 / 0.86);
  font: 400 13px / 22px var(--mac);
  letter-spacing: -0.003em;
  user-select: none;
}

.mac-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 22px;
  padding: 0 9px 0 14px;
  border-radius: 6px;
  white-space: nowrap;
}

/* The submenu chevron, drawn as a mask so it takes the item's color. */
.mac-menu__item--sub::after {
  content: "";
  width: 6px;
  height: 10px;
  background: currentColor;
  opacity: 0.5;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mac-menu__item.is-active {
  background: #0064e1;
  color: #fff;
}

.mac-menu__item.is-active::after {
  opacity: 1;
}

.mac-menu hr {
  height: 1px;
  margin: 4px 10px;
  border: 0;
  background: rgb(0 0 0 / 0.1);
}

.mac-cursor {
  position: absolute;
  left: 150px;
  bottom: 1px;
  width: 15px;
  height: 23px;
  fill: #000;
  stroke: #fff;
  stroke-width: 1.3;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 0.45));
}

/* The departure board */

.board {
  --plat-w: 44px;
  --bar-w: 8px;
  --items-w: 92px;
  --status-w: 200px;
  --cols: var(--plat-w) var(--bar-w) minmax(0, 1fr) var(--items-w) var(--status-w);
  --cgap: 18px;
  --pad-l: 18px;
  --pad-r: 22px;
  grid-area: board;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--board-face);
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, var(--cream) 8%, transparent),
    0 28px 56px -30px rgb(0 0 0 / 0.6);
}

.board__head,
.row {
  display: grid;
  grid-template-columns: var(--cols);
  column-gap: var(--cgap);
  padding: 0 var(--pad-r) 0 var(--pad-l);
}

.board__head {
  height: var(--head-h);
  align-items: end;
  padding-bottom: 9px;
  border-bottom: 1.5px solid var(--rule-strong);
  background: var(--board-head);
}

.board__dest {
  grid-column: 3;
  display: grid;
  gap: 1px;
}

.board__dest [lang="ja"] {
  font-size: var(--step-body);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.1em;
}

.board__label {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.board__items {
  grid-column: 4;
  text-align: center;
}

.board__status {
  grid-column: 5;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 7px;
  border: 1px solid var(--rule-strong);
  border-radius: 5px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.clock svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rows {
  padding: 0;
  list-style: none;
}

.rows li {
  position: relative;
}

.rows li::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--rule);
  pointer-events: none;
}

/* Not connected: the rule under the row breaks cleanly where the line bar sits. */
.rows li.is-out::after {
  --gap-a: calc(var(--pad-l) + var(--plat-w) + var(--cgap) - 22px);
  --gap-b: calc(var(--pad-l) + var(--plat-w) + var(--cgap) + var(--bar-w) + 22px);
  background: linear-gradient(
    to right,
    var(--rule) 0 var(--gap-a),
    transparent var(--gap-a) var(--gap-b),
    var(--rule) var(--gap-b)
  );
}

/* A row's lit look lives in these properties, so the no-script batch below can share it. */
.row {
  --fill: transparent;
  --row-ink: var(--ink);
  --plat-fill: transparent;
  --plat-line: var(--rule-strong);
  --plat-ink: var(--ink);
  --bar-fill: var(--coral);
  --roll: hidden;
  width: 100%;
  height: var(--row-h);
  align-items: center;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--fill);
  color: var(--row-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.row.is-lit {
  --fill: var(--coral);
  --row-ink: var(--navy);
  --plat-fill: var(--navy);
  --plat-line: var(--navy);
  --plat-ink: var(--coral);
  --bar-fill: var(--navy);
  --roll: visible;
}

/* Without scripts, the markup's sent batch shows: Clients lit, its status set. Nothing can be
   picked, so the invitation to try stays off. */
@media (scripting: none) {
  .row {
    cursor: default;
  }

  .row[data-sent] {
    --fill: var(--coral);
    --row-ink: var(--navy);
    --plat-fill: var(--navy);
    --plat-line: var(--navy);
    --plat-ink: var(--coral);
    --bar-fill: var(--navy);
    --roll: visible;
  }

  .try {
    display: none;
  }
}

@media (hover: hover) and (scripting: enabled) {
  .row:not(:disabled, .is-lit):hover {
    --fill: color-mix(in oklab, var(--cream) 7%, transparent);
  }
}

.row:active:not(:disabled) {
  --fill: var(--fold);
  --row-ink: var(--cream);
  --bar-fill: var(--cream);
}

.row:focus-visible {
  outline-offset: -4px;
  border-radius: 6px;
}

.row.is-lit:focus-visible {
  outline-color: var(--navy);
}

.row:disabled {
  cursor: default;
}

.plat {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--plat-line, currentColor);
  border-radius: 5px;
  background: var(--plat-fill, transparent);
  color: var(--plat-ink, inherit);
  font-family: var(--latin);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.bar {
  width: var(--bar-w, 8px);
  height: 30px;
  border-radius: 2px;
  background: var(--bar-fill, var(--coral));
}

.is-out .bar {
  background: linear-gradient(var(--coral) 0 38%, transparent 38% 62%, var(--coral) 62%);
}

.dest {
  overflow: hidden;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.012em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.items,
.status {
  display: flex;
  align-items: center;
  height: 30px;
  overflow: hidden;
  font-weight: 600;
}

.items {
  justify-content: center;
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
}

.status {
  font-size: 1.125rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.roll {
  display: block;
  visibility: var(--roll);
}

.board__foot {
  display: flex;
  align-items: center;
  height: 42px;
  padding-left: calc(var(--pad-l) + var(--plat-w) + var(--bar-w) + 2 * var(--cgap));
  color: var(--ink-soft);
  font-size: var(--step-small);
}

/* macOS notifications: the banner a pick posts, and the two drawn further down. */

.mac-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 11px;
  padding: 11px 14px 11px 11px;
  border-radius: 18px;
  background: rgb(246 246 246 / 0.88);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  backdrop-filter: blur(28px) saturate(1.8);
  box-shadow:
    0 0 0 0.5px rgb(0 0 0 / 0.22),
    inset 0 0 0 0.5px rgb(255 255 255 / 0.6),
    0 12px 32px rgb(var(--shadow-ink) / 0.32);
  color: #1d1d1f;
  font: 400 13px / 1.3 var(--mac);
  text-align: left;
}

.mac-note img {
  grid-row: span 3;
  display: block;
  width: 38px;
  height: 38px;
}

.mac-note__app {
  font-weight: 600;
}

.mac-note__time {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  padding-top: 1px;
  color: #6e6e73;
  font-size: 12px;
}

.mac-note__title,
.mac-note__body {
  grid-column: 2 / 4;
}

.toast {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 30;
  width: min(356px, 100vw - 20px);
  visibility: hidden;
  translate: calc(100% + 24px) 0;
}

.toast .mac-note__title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.toast.is-shown {
  visibility: visible;
  translate: 0 0;
}

/* Below the hero: one cream field of signage, read top to bottom. */

.field {
  background: var(--cream);
  color: var(--paper-ink);
}

.field ::selection {
  background: var(--navy);
  color: var(--cream);
}

.field :focus-visible {
  outline-color: var(--navy);
}

.field a {
  text-decoration-color: var(--fold);
}

/* Headings on the field are type alone. Numbers and line colors belong to the board's rows. */
.field h2 {
  font-size: var(--step-heading);
  line-height: 1.12;
  letter-spacing: -0.018em;
}

.lead,
.fact,
.name__text,
.column,
.stop__body {
  font-size: var(--step-read);
  line-height: 1.6;
}

.lead > p,
.fact > p,
.column > p,
.route,
.stop__body > p,
.doc-list {
  max-width: 68ch;
}

/* The home page's bands: the board's own facts, the name sign, then two reading columns. */
.band {
  --col-gap: clamp(2rem, 5vw, 5rem);
  padding-block: var(--space);
}

.band + .band {
  border-top: 1px solid var(--paper-rule);
}

.lead {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px var(--col-gap);
}

.lead h2 {
  grid-column: 1 / -1;
}

/* What a pick leaves behind. The two facts share rows, so both drawings start on one line. */
.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  gap: 20px var(--col-gap);
  margin-top: clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
}

.fact {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
}

.fact > .listing,
.fact > .notes {
  align-self: start;
  margin-top: 8px;
}

/* The privacy page keeps a heading beside each section. */
.stop {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: 24px clamp(2rem, 5vw, 5rem);
  padding-block: var(--space);
}

.stop + .stop {
  border-top: 1px solid var(--paper-rule);
}

.stop__body {
  display: grid;
  gap: 1.1em;
}

/* "A copy never replaces a file": the destination's own short board. */
.listing {
  --bar-w: 6px;
  width: min(100%, 26rem);
  overflow: hidden;
  border-radius: 8px;
  background: var(--board-face);
  color: var(--ink);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 22px 40px -26px rgb(var(--shadow-ink) / 0.7);
}

.listing__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 18px 9px;
  border-bottom: 1.5px solid var(--rule-strong);
  background: var(--board-head);
  font-size: var(--step-body);
}

.listing__head [lang="ja"] {
  color: var(--ink-soft);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.listing__row {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 48px;
  padding-inline: 18px;
  font-variant-numeric: tabular-nums;
}

.listing__row + .listing__row {
  border-top: 1px solid var(--rule);
}

.listing__row .bar {
  height: 26px;
}

.listing__row.is-lit {
  background: var(--coral);
  color: var(--navy);
}

.listing__row.is-lit .bar {
  background: var(--navy);
}

.notes {
  display: grid;
  gap: 10px;
  width: min(100%, 356px);
}

/* The name: 送り先 on a station name sign, its two parts as the stations either side. */

.band--name {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: 32px var(--col-gap);
}

.name__text {
  display: grid;
  gap: 1.25rem;
}

.sign {
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--navy) 16%, transparent);
  border-radius: 8px;
  background: var(--sign-face);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.7),
    0 26px 50px -30px rgb(var(--shadow-ink) / 0.55);
  text-align: center;
}

.sign__word {
  padding-top: clamp(2.25rem, 1rem + 3vw, 3.5rem);
  font-size: clamp(4rem, 1.6rem + 7.4vw, 8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
}

.sign__roman {
  margin-top: 14px;
  font-size: clamp(1.125rem, 0.9rem + 0.8vw, 1.625rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
}

.sign__strip {
  display: flex;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: clamp(1.75rem, 1rem + 2vw, 2.5rem);
  padding: 14px 22px 15px;
  border-top: 5px solid var(--coral);
  background: var(--navy);
  color: var(--cream);
}

.sign__next {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--ink-soft);
  font-size: var(--step-body);
  white-space: nowrap;
}

.sign__next [lang="ja"] {
  margin-right: 3px;
  color: var(--cream);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.sign__next b {
  color: var(--cream);
  font-weight: 600;
}

.sign__next svg {
  align-self: center;
  width: 9px;
  height: 11px;
  fill: var(--coral);
}

/* Privacy and Before you install, side by side. */

.band--read {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 56px var(--col-gap);
}

.column {
  display: grid;
  gap: 1.1em;
}

/* Installing reads as a line on a route map: a ring for each stop on the coral line. */
.route {
  padding: 0;
  list-style: none;
}

.route li {
  position: relative;
  padding: 0 0 1em 36px;
  text-wrap: pretty;
}

.route li:last-child {
  padding-bottom: 0;
}

.route li::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: calc(0.5lh - 8px);
  left: 0;
  width: 16px;
  height: 16px;
  border: 3.5px solid var(--navy);
  border-radius: 50%;
  background: var(--cream);
}

/* The line runs from this stop's ring to the next one's. */
.route li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.5lh;
  bottom: -0.5lh;
  left: 6px;
  width: 4px;
  background: var(--coral);
}

/* Lists on the privacy page. */

.doc-list {
  display: grid;
  gap: 0.75em;
  padding-left: 1.5em;
}

.doc-list li {
  padding-left: 0.3em;
}

ol.doc-list li::marker {
  color: var(--navy);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

ul.doc-list li::marker {
  color: var(--fold);
}

/* The close: a navy band with the download. */

.close {
  padding-block: var(--space);
}

.close__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.close h2 {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 18em;
  font-size: clamp(1.875rem, 1.3rem + 1.6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.close h2 img {
  flex: none;
  width: clamp(44px, 3rem + 1vw, 56px);
  height: auto;
  border-radius: 22%;
  box-shadow: 0 0 0 1px var(--rule-strong);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 24px 0 36px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.footer p {
  max-width: 75ch;
}

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

/* Text pages: a navy title, then the cream field set for reading. */

.doc-title {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}

.doc-title h1 {
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.doc-title p {
  max-width: 62ch;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.1875rem;
}

.field--doc .stop {
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.field code {
  padding: 0.05em 0.35em;
  border-radius: 0.3em;
  background: color-mix(in oklab, var(--navy) 8%, var(--cream));
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.doc-date {
  color: var(--paper-ink-soft);
}

/* 404: a board with nothing on it. */

.lost {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 18px;
  min-height: 70svh;
  padding-block: var(--space);
}

.lost h1 {
  font-size: var(--step-heading);
  line-height: 1.12;
  letter-spacing: -0.018em;
}

.lost p {
  color: var(--ink-soft);
  font-size: var(--step-read);
}

.lost p a {
  color: var(--ink);
}

.lost__board {
  --plat-w: 58px;
  --bar-w: 8px;
  --cgap: 16px;
  --pad-l: 16px;
  width: min(100%, 26rem);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--board-face);
}

.lost__board .board__head {
  display: block;
  height: auto;
  padding: 12px 16px 9px calc(var(--pad-l) + var(--plat-w) + var(--bar-w) + 2 * var(--cgap));
}

.lost__row {
  display: flex;
  align-items: center;
  gap: var(--cgap);
  height: 56px;
  padding-left: var(--pad-l);
}

.lost__row .plat {
  width: var(--plat-w);
}

/* Narrower desktops */

@media (width <= 1180px) {
  .board {
    --plat-w: 40px;
    --items-w: 72px;
    --status-w: 176px;
    --cgap: 14px;
  }

  .dest {
    font-size: 1.5rem;
  }
}

/* Too narrow for the menu beside the board. Finder's menu keeps its last group, ending in Send
   To, as a card fused to the board's top edge, with the note beside it. The sections run in one
   column. */

@media (width <= 980px) {
  .station {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "ready ready"
      "menu note"
      "board board";
    margin-top: 44px;
  }

  .station__ready {
    padding: 0 0 16px;
  }

  .finder {
    display: contents;
  }

  .finder .mac-menu {
    grid-area: menu;
    align-self: end;
    z-index: 2;
    margin-bottom: -6px;
  }

  .finder .mac-menu > :not(.is-last-group, .is-active, .mac-cursor) {
    display: none;
  }

  .finder__note {
    grid-area: note;
    align-self: end;
    max-width: 22em;
    margin: 0;
    padding: 0 0 18px 22px;
  }

  .hero__row,
  .stop,
  .lead,
  .band--name,
  .band--read {
    grid-template-columns: minmax(0, 1fr);
  }

  .get {
    justify-items: start;
  }

  .pair {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: 56px;
  }

  .fact {
    grid-row: auto;
    grid-template-rows: none;
    row-gap: 20px;
  }

  .band--name .sign {
    max-width: 640px;
  }
}

/* The nav takes a row of its own under the brand and the download. */

@media (width < 52rem) {
  .masthead {
    flex-wrap: wrap;
    column-gap: 16px;
    padding-block: 12px 10px;
  }

  .masthead__nav {
    order: 3;
    width: 100%;
    gap: 4px 22px;
  }
}

/* On a phone the board must show in the first screen, so the hero tightens. A touch screen has
   no pointer, so the drawn one goes. */
@media (width <= 720px) {
  .hero {
    padding-top: 20px;
  }

  .hero__row {
    gap: 20px;
    margin-top: 16px;
  }

  .lede {
    font-size: var(--step-body);
  }

  /* The version sits beside the hero's button, which saves the board a line. */
  .hero .get {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
  }

  .station {
    --menu-w: 196px;
    margin-top: 28px;
  }

  .mac-cursor {
    display: none;
  }

  .finder__note {
    padding: 0 0 12px 14px;
    font-size: 0.8125rem;
  }

  .station__ready {
    row-gap: 4px;
    padding-bottom: 12px;
  }

  .board {
    --plat-w: 30px;
    --bar-w: 6px;
    --status-w: 112px;
    --cols: var(--plat-w) var(--bar-w) minmax(0, 1fr) var(--status-w);
    --cgap: 10px;
    --pad-l: 12px;
    --pad-r: 12px;
    --row-h: 50px;
    --head-h: 54px;
  }

  .board__items,
  .items {
    display: none;
  }

  .board__status,
  .status {
    grid-column: 4;
  }

  .row .plat {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-size: var(--step-small);
  }

  .row .bar {
    height: 26px;
  }

  .dest {
    font-size: 1.1875rem;
  }

  .status {
    font-size: 0.875rem;
  }

  .clock {
    padding: 2px 6px;
    font-size: 0.75rem;
  }

  /* Stacked, the two parts keep their sides: the station behind at left, the one ahead at right. */
  .sign__strip {
    flex-direction: column;
    align-items: start;
    padding-inline: 18px;
  }

  .sign__next:last-child {
    align-self: end;
  }
}

/* The brand and the full label share a row from about 372 px. Below 384 px, "for Mac" leaves
   the screen but stays in the link's name. */
@media (width < 24rem) {
  .download__platform {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .board {
    --status-w: 104px;
  }

  .dest {
    font-size: 1.0625rem;
  }
}

/* Too narrow for the note beside the menu, so it moves under the board. */
@media (width < 22rem) {
  .station {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "ready"
      "menu"
      "board"
      "note";
  }

  .finder__note {
    padding: 14px 0 0;
  }
}

/* Motion: board updates only. A pick rolls the changed cells up into place, fills the lit row,
   and slides the notification in. With reduced motion, every change lands at once. */

@keyframes roll-in {
  from {
    translate: 0 105%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .row {
    transition:
      background-color 180ms ease,
      color 180ms ease;
  }

  .row.is-lit .roll {
    animation: roll-in 520ms var(--ease-out) backwards;
  }

  .row.is-lit .status .roll {
    animation-delay: 70ms;
  }

  .toast {
    transition:
      translate 560ms var(--ease-out),
      visibility 0s linear 560ms;
  }

  .toast.is-shown {
    transition:
      translate 560ms var(--ease-out),
      visibility 0s;
  }
}
