/* Cloudless site. No imports and no outside requests. Body text is the system font; the h1 and h2 headings are
   Jost, served from this site (SIL Open Font License, fonts/OFL.txt). */

@font-face {
  font-family: "Jost";
  src: url("./fonts/jost-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* The first stage's sky stops. Registered, so the gradient can fade when the theme changes. */
@property --stage-sky-a { syntax: "<color>"; inherits: true; initial-value: #DCE5F2; }
@property --stage-sky-b { syntax: "<color>"; inherits: true; initial-value: #E8EDF5; }
@property --stage-sky-c { syntax: "<color>"; inherits: true; initial-value: #F5F5F7; }

/* Tokens: Daylight */
:root {
  color-scheme: light;
  --bg: #FFFFFF;
  /* Recessed Chrome from the brief. Stages, the closing band, code and the quiet buttons use it. */
  --surface: #F5F5F7;
  --surface-hover: #EBEBEE;
  --ink: #111214;
  --ink-2: #555961;
  --line: rgba(17, 18, 20, 0.09);
  --line-strong: rgba(17, 18, 20, 0.18);
  --switch-off: #767B85;
  --link: #184687;
  --focus: #184687;
  --select: rgba(24, 70, 135, 0.18);
  --brass: #C6811E;
  --sage: #247254;
  /* Clear Sky Blue, the app's own Allow button. Used for the download action only. */
  --btn-bg: #184687;
  --btn-bg-hover: #10356A;
  --btn-ink: #FFFFFF;
  --btn-edge: none;
  /* Image outline from the brief, drawn over the edge of every window. */
  --ring: rgba(0, 0, 0, 0.1);
  --edge: rgba(255, 255, 255, 0);
  --lift: 0 1px 1px rgba(17, 18, 20, 0.04), 0 8px 20px -6px rgba(17, 18, 20, 0.05), 0 32px 72px -20px rgba(17, 18, 20, 0.06);
  /* Sky: the morning above the first window and the last band. Text never sits on it. */
  --sky: linear-gradient(180deg, #DCE5F2 0%, #E8EDF5 46%, #F5F5F7 100%);
  --stage-sky-a: #DCE5F2;
  --stage-sky-b: #E8EDF5;
  --stage-sky-c: #F5F5F7;
  --glow: radial-gradient(70% 42% at 50% 100%, rgba(198, 129, 30, 0.07), rgba(198, 129, 30, 0) 100%);
  /* Feature stages: light from above, so the floor sits a little deeper. */
  --overhead: linear-gradient(180deg, rgba(17, 18, 20, 0) 45%, rgba(17, 18, 20, 0.025) 100%);
  /* Model bars: each fill keeps 3:1 or more against the track it sits in. */
  --track: #ECEEF2;
  --bar-fast: #647FA8;
  --bar-balanced: #3F6399;
  --bar-smart: #184687;
  /* The row lit by the memory picker. Secondary text keeps 4.5:1 or more on it. */
  --spot: #F3F4F7;
  --sun: 0;
  --moon: 1;
  /* The closing band's sky: a morning sky with the sun risen above the horizon. */
  --sky-sun-u: 2.3;
  /* Stops sampled from the shader at rest, so the canvas fades in over a still that already matches it. */
  --sky-still: linear-gradient(180deg, #6FA8E8 0%, #7DAFE9 20%, #95BEED 40%, #A7C9EF 60%, #BFD7F2 75%, #D8E5F2 90%, #E3EBF3 100%);
  /* The first screen's sun rests this many sun radii above the horizon. sky.js uses the same two numbers. */
  --hero-sun-u: 1.4;
  --sky-glow: radial-gradient(circle at 50% calc(100% - var(--hero-sun-u) * var(--sun-r)), rgba(248, 227, 189, 0.3) calc(var(--sun-r) * 1.05), rgba(248, 227, 189, 0.1) calc(var(--sun-r) * 1.6), rgba(248, 227, 189, 0) calc(var(--sun-r) * 3));
  /* The load moment starts from this sky and fades to the one above: dawn in Daylight. */
  --sky-from: radial-gradient(60% 45% at 50% 100%, rgba(242, 166, 90, 0.55), rgba(242, 166, 90, 0)), linear-gradient(180deg, #5A73B0 0%, #7179B4 40%, #B38FA6 75%, #F2A65A 100%);
  /* The horizon rule, at one weight in both themes. */
  --horizon: rgba(17, 18, 20, 0.5);
  /* The sky caption: quieter than the headline, and 4.5:1 or more on the warm band near the horizon. */
  --sky-note: #2E3138;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --brand: "Jost", var(--display);

  /* Type scale. Display sizes step by about 1.5, text sizes by about 1.125. */
  /* Sized to the width, so the headline holds one line from about 560 px up and two balanced lines below. */
  --t-hero: clamp(2.25rem, 6vw, 5.5rem);
  --t-h2: clamp(1.875rem, 1.35rem + 1.9vw, 2.75rem);
  --t-h3: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  --t-lead: clamp(1.125rem, 1.06rem + 0.25vw, 1.25rem);
  --t-body: clamp(1rem, 0.96rem + 0.15vw, 1.0625rem);
  --t-small: 0.9375rem;
  --t-label: 0.8125rem;

  --gutter: clamp(20px, 4.5vw, 64px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --gutter-x: max(var(--gutter), var(--safe-l), var(--safe-r));
  --stage-pad: clamp(20px, 4.5vw, 64px);
  --col-gap: clamp(24px, 4.5vw, 64px);
  --sec-gap: clamp(64px, 6.7vw, 96px);
  --head-gap: clamp(64px, 8.9vw, 128px);
  --measure: 31em;
  /* How far the stage floor rises over the foot of a window that runs off it. */
  --fade: clamp(40px, 4.5vw, 64px);

  --r-stage: 28px;
  --r-window: 14px;
  --r-control: 10px;
  --r-chip: 6px;

  /* The first screen: the top bar, the sky down to the horizon, and the size of the sun. */
  --mast-h: 64px;
  --sky-h: clamp(max(400px, 24rem), 48vh, max(820px, 42rem));
  --sun-r: clamp(32px, 0.75rem + 3.4vw, 66px);
  /* The sunrise curve, for brand moments only. */
  --sunrise: cubic-bezier(0.22, 1, 0.36, 1);
}

@supports (height: 1svh) {
  :root {
    --sky-h: clamp(max(400px, 24rem), 48svh, max(820px, 42rem));
  }
}

/* Tokens: Twilight. Used when the system prefers dark and no theme is set, and when the toggle sets it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="daylight"]) {
    color-scheme: dark;
    --bg: #141416;
    --surface: #0E0E10;
    --surface-hover: #26262A;
    --ink: #F2F2F4;
    --ink-2: #9A9EA8;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.18);
    --switch-off: #6E727C;
    --link: #5E9CF0;
    --focus: #5E9CF0;
    --select: rgba(94, 156, 240, 0.32);
    --brass: #E0A347;
    --sage: #52A885;
    /* A deep steel button with Chalk ink (7.5:1), so the action is clear without being the brightest thing here. */
    --btn-bg: #1E4D8F;
    --btn-bg-hover: #275CA6;
    --btn-ink: #F2F2F4;
    --btn-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    /* In the dark a window stands out by its crisp ring, a lit top edge, and a floor darker than itself. */
    --ring: rgba(255, 255, 255, 0.12);
    --edge: rgba(255, 255, 255, 0.16);
    --lift: 0 1px 2px rgba(0, 0, 0, 0.06), 0 24px 56px -16px rgba(0, 0, 0, 0.06);
    --sky: linear-gradient(180deg, #151A25 0%, #11141B 50%, #0E0E10 100%);
    --glow: radial-gradient(70% 42% at 50% 100%, rgba(224, 163, 71, 0.09), rgba(224, 163, 71, 0) 100%);
    --overhead: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 55%);
    --track: #232328;
    --bar-fast: #5A79A6;
    --bar-balanced: #4F84D0;
    --bar-smart: #5E9CF0;
    --spot: #1F1F23;
    --sun: 1;
    --moon: 0;
    --sky-sun-u: -1.3;
    --sky-still: linear-gradient(180deg, #0A1029 0%, #101534 25%, #1C1E42 50%, #2C2649 65%, #44344F 75%, #5B4050 85%, #6A4B4E 95%, #7C5C5E 100%);
    --hero-sun-u: -0.5;
    --sky-glow: radial-gradient(55% 32% at 50% 100%, rgba(242, 166, 90, 0.3), rgba(242, 166, 90, 0));
    --sky-from: radial-gradient(60% 45% at 50% 100%, rgba(242, 166, 90, 0.5), rgba(242, 166, 90, 0)), linear-gradient(180deg, #1E2C60 0%, #3C3F7E 40%, #8A6474 75%, #C98660 100%);
    --horizon: rgba(242, 242, 244, 0.34);
    --sky-note: #FFFFFF;
    --stage-sky-a: #151A25;
    --stage-sky-b: #11141B;
    --stage-sky-c: #0E0E10;
  }
}

:root[data-theme="twilight"] {
  color-scheme: dark;
  --bg: #141416;
  --surface: #0E0E10;
  --surface-hover: #26262A;
  --ink: #F2F2F4;
  --ink-2: #9A9EA8;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --switch-off: #6E727C;
  --link: #5E9CF0;
  --focus: #5E9CF0;
  --select: rgba(94, 156, 240, 0.32);
  --brass: #E0A347;
  --sage: #52A885;
  --btn-bg: #1E4D8F;
  --btn-bg-hover: #275CA6;
  --btn-ink: #F2F2F4;
  --btn-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  --ring: rgba(255, 255, 255, 0.12);
  --edge: rgba(255, 255, 255, 0.16);
  --lift: 0 1px 2px rgba(0, 0, 0, 0.06), 0 24px 56px -16px rgba(0, 0, 0, 0.06);
  --sky: linear-gradient(180deg, #151A25 0%, #11141B 50%, #0E0E10 100%);
  --glow: radial-gradient(70% 42% at 50% 100%, rgba(224, 163, 71, 0.09), rgba(224, 163, 71, 0) 100%);
  --overhead: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 55%);
  --track: #232328;
  --bar-fast: #5A79A6;
  --bar-balanced: #4F84D0;
  --bar-smart: #5E9CF0;
  --spot: #1F1F23;
  --sun: 1;
  --moon: 0;
  --sky-sun-u: -1.3;
  --sky-still: linear-gradient(180deg, #0A1029 0%, #101534 25%, #1C1E42 50%, #2C2649 65%, #44344F 75%, #5B4050 85%, #6A4B4E 95%, #7C5C5E 100%);
  --hero-sun-u: -0.5;
  --sky-glow: radial-gradient(55% 32% at 50% 100%, rgba(242, 166, 90, 0.3), rgba(242, 166, 90, 0));
  --sky-from: radial-gradient(60% 45% at 50% 100%, rgba(242, 166, 90, 0.5), rgba(242, 166, 90, 0)), linear-gradient(180deg, #1E2C60 0%, #3C3F7E 40%, #8A6474 75%, #C98660 100%);
  --horizon: rgba(242, 242, 244, 0.34);
  --sky-note: #FFFFFF;
  --stage-sky-a: #151A25;
  --stage-sky-b: #11141B;
  --stage-sky-c: #0E0E10;
}

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

/* The hidden attribute beats every display rule, so controls that need app.js stay out of sight until it runs. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

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

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

/* Display sizes are set at 500, so large type stays calm. Headings at text size go to 600. */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  text-wrap: balance;
}

h2 {
  font-family: var(--brand);
  font-size: var(--t-h2);
  line-height: 1.08;
  letter-spacing: -0.012em;
}

h3 {
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

p,
li,
dd {
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

code,
pre {
  font-family: var(--mono);
}

/* A chip with an edge, so a command reads as one on white, on the grey band, and in the dark. */
code {
  padding: 0.12em 0.4em;
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.85em;
  overflow-wrap: anywhere;
}

pre {
  padding: 16px;
  border-radius: var(--r-control);
  background: var(--surface);
  font-size: var(--t-label);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  white-space: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-chip);
}

::selection {
  background: var(--select);
}

.symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.narrow-only {
  display: none;
}

.nowrap {
  white-space: nowrap;
}

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

.skip {
  position: absolute;
  left: max(16px, var(--safe-l));
  top: calc(10px + var(--safe-t));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--r-control);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(calc(-100% - 24px - var(--safe-t)));
}

.skip:focus {
  transform: none;
}

.skip:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--bg);
}

#main:focus {
  outline: none;
}

/* Masthead. With scripts on, its rule appears once the page has scrolled under it. */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: var(--safe-t);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.js .masthead:not(.is-scrolled) {
  border-bottom-color: transparent;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .masthead {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    backdrop-filter: saturate(1.6) blur(16px);
  }
}

/* At the top of the page the bar sits clear over the sky, so its links take full ink. It gains its ground once
   the page scrolls under it. */
.js .masthead:not(.is-scrolled) {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.js .masthead:not(.is-scrolled) .nav a,
.js .masthead:not(.is-scrolled) .theme {
  color: var(--ink);
}

/* Without scripts nothing can tell when the page has scrolled, so the bar stays clear and scrolls away with the
   sky instead of sitting frosted over it. */
html:not(.js) .masthead {
  position: relative;
  border-bottom-color: transparent;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html:not(.js) .masthead .nav a {
  color: var(--ink);
}

/* Over the sky the bar's controls take a thin, see-through fill, so they sit in the sky and not on it. */
.js .masthead:not(.is-scrolled):not(.is-past-action) .btn--quiet,
html:not(.js) .masthead .btn--quiet {
  background: color-mix(in srgb, var(--bg) 30%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent);
}

.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  min-height: var(--mast-h);
  padding-block: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: -4px;
  padding: 12px 4px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark {
  display: block;
  flex: none;
  overflow: visible;
}

/* The reading sun. The bar's rule is a horizon, and a small brass sun rises off it and walks from left to right
   as the page is read. Scroll-driven where the browser has it, set by app.js elsewhere. */
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  overflow: hidden;
  container-type: inline-size;
  pointer-events: none;
}

.progress-sun {
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brass);
  translate: calc(var(--progress, 0) * (100cqw - 8px)) 0;
}

.progress {
  opacity: 0;
}

.js .masthead.is-scrolled .progress {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress-sun {
      animation: progress-sun linear both;
      animation-timeline: scroll(root block);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress {
    display: none;
  }
}

@keyframes progress-sun {
  from { translate: 0 0; }
  to { translate: calc(100cqw - 8px) 0; }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--r-control);
  color: var(--ink-2);
  font-size: var(--t-small);
  text-decoration: none;
}

.masthead-end {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* A fixed slot, so showing the theme button moves nothing. */
.theme-slot {
  display: none;
  width: 44px;
  height: 44px;
}

.js .theme-slot {
  display: block;
}

.theme {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r-control);
  background: none;
  color: var(--ink-2);
  cursor: pointer;
}

.theme .icon {
  position: absolute;
  stroke-width: 1.5;
}

.icon-sun {
  opacity: var(--sun);
  transform: scale(calc(0.25 + 0.75 * var(--sun)));
  filter: blur(calc(4px * var(--moon)));
}

.icon-moon {
  opacity: var(--moon);
  transform: scale(calc(0.25 + 0.75 * var(--moon)));
  filter: blur(calc(4px * var(--sun)));
}

/* Buttons and links. One filled button style, used for the download action only. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 24px 10px 18px;
  border-radius: var(--r-control);
  background: var(--btn-bg);
  box-shadow: var(--btn-edge);
  color: var(--btn-ink);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

.btn:focus-visible {
  border-radius: var(--r-control);
}

/* Wide enough for the longest label the script can set, so a new label never moves its neighbours. */
.btn--primary {
  min-width: min(100%, 16.5rem);
}

/* The top bar repeats the action quietly, so the first screen has one filled button. */
.btn--quiet {
  min-height: 44px;
  padding: 8px 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: 0.875rem;
}

/* Once the page's own download buttons have scrolled away, the top bar's action takes the fill. */
.is-past-action .btn--quiet {
  background: var(--btn-bg);
  box-shadow: var(--btn-edge);
  color: var(--btn-ink);
}

/* The menu that holds the links at 900 px and narrower. A <details>, so it works with scripts off. */
.menu {
  display: none;
}

.menu-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-control);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.menu-button::-webkit-details-marker {
  display: none;
}

.menu[open] .menu-button {
  background: var(--surface);
}

/* The panel hangs from the bottom of the top bar, spans it, and scrolls internally on short viewports. */
.menu:not([open]) .menu-panel {
  display: none;
}

.menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  max-height: calc(100vh - var(--mast-actual, calc(var(--mast-h) + var(--safe-t))));
  max-height: calc(100dvh - var(--mast-actual, calc(var(--mast-h) + var(--safe-t))));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px max(var(--gutter), var(--safe-r)) calc(20px + var(--safe-b)) max(var(--gutter), var(--safe-l));
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 24px 32px -24px rgba(0, 0, 0, 0.06);
}

.menu-panel a,
.menu-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
}

.menu-theme {
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

/* A small switch: off in Daylight, on in Twilight. Track and thumb keep >= 3:1 contrast in both states. */
.switch {
  position: relative;
  flex: none;
  width: 40px;
  height: 24px;
  border-radius: 12px;
  background: var(--switch-off);
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.menu-theme[aria-pressed="true"] .switch {
  background: var(--link);
}

.menu-theme[aria-pressed="true"] .switch::after {
  left: 19px;
  background: var(--bg);
}

.quiet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
}

/* Hero. The first screen is the mark at full scale: a clear sky over one horizon, with the sun on it. The sky is
   sticky, so the ground and the app window below the horizon scroll up over it and cover the sun. */
.hero {
  margin-top: calc(-1 * var(--mast-actual, calc(var(--mast-h) + var(--safe-t))));
}

.sky {
  position: sticky;
  /* sky.js sets this so the sky scrolls with the ground until the app window reaches the horizon. */
  top: var(--sky-top, 0px);
  z-index: 0;
  height: var(--sky-h);
  overflow: hidden;
  /* Clip, not scroll: the sun's control reaches under the horizon in Twilight, and focusing it must not scroll
     the sky's contents up. */
  overflow: clip;
  /* The sun's height above the horizon, in sun radii. sky.js moves it; the theme sets where it rests. */
  --sun-u: var(--hero-sun-u);
}

.sky-still,
.sky-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sky-still {
  background: var(--sky-glow), var(--sky-still);
}

/* The sky the load moment starts from. It fades out as the sun moves, so the still changes with it. */
.sky-still::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--sky-from);
  opacity: 0;
}

/* The canvas fades in over the still once its first frame is drawn, so nothing flashes. */
.sky-canvas {
  display: block;
  opacity: 0;
}

.sky.is-live .sky-canvas {
  opacity: 1;
}

.sky-sun {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: calc(var(--sun-r) * 8);
  height: calc(var(--sun-r) * 8);
  margin: 0 0 calc(var(--sun-r) * -4) calc(var(--sun-r) * -4);
  translate: 0 calc(var(--sun-u) * var(--sun-r) * -1);
}

/* With the sun down, only its crown shows, and a halo would only blur it. */
:root[data-theme="twilight"] .sky-sun-halo {
  opacity: 0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="daylight"]) .sky-sun-halo {
    opacity: 0;
  }
}

/* The sun is the theme switch. sky.js places this over it and shows it. In Twilight the sun rests with its
   crown above the horizon, and at least 44 px of the control always stays above it. */
.sun {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(var(--sun-r) * 2 + 24px);
  height: calc(var(--sun-r) * 2 + 24px);
  margin-left: calc(var(--sun-r) * -1 - 12px);
  padding: 0;
  border: 0;
  /* Square, so the strip of it above the rule in Twilight is a full 44 px tall target across its width. */
  border-radius: 0;
  background: none;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.sun.is-dragging {
  cursor: grabbing;
}

/* The focus ring is a circle round the sun, drawn inside the square target. */
.sun::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
}

.sun:focus-visible {
  outline: none;
}

.sun:focus-visible::before {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--bg);
}

/* The label tied to the sun. sky.js keeps --sun-cy (its centre, held above the rule) and --sun-top (its top
   edge) up to date. Wide screens hang it beside the sun; narrow ones above it. */
.sky-hint {
  position: absolute;
  top: var(--sun-cy, 50%);
  left: calc(50% + var(--sun-r) + 16px);
  z-index: 1;
  max-width: min(22rem, calc(50% - var(--sun-r) - 16px - var(--gutter-x)));
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--ink);
  font-size: var(--t-label);
  line-height: 1.4;
  translate: 0 -50%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sun:focus-visible + .sky-hint {
  opacity: 1;
  visibility: visible;
}

@media (hover: hover) {
  .sun:hover + .sky-hint {
    opacity: 1;
    visibility: visible;
  }
}

.sky.is-hint-done .sky-hint,
.sun.is-dragging + .sky-hint {
  opacity: 0;
  visibility: hidden;
}

.hero-head {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  height: var(--sky-h);
  margin-top: calc(-1 * var(--sky-h));
  /* The headline centres in the sky between the top bar and the top of the resting sun. */
  padding: var(--mast-actual, calc(var(--mast-h) + var(--safe-t))) 0 calc(var(--sun-r) * 2.4 + 24px);
  text-align: center;
  pointer-events: none;
}

.hero-head > .wrap {
  position: static;
}

.hero h1 {
  margin: 0;
  font-family: var(--brand);
  font-size: var(--t-hero);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
  pointer-events: auto;
}

/* A quiet caption low in the sky, at the left edge of the page column. */
.sky-note {
  position: absolute;
  left: max(var(--gutter-x), (100% - 1312px) / 2);
  bottom: 20px;
  width: min(19rem, 50% - var(--sun-r) - var(--gutter-x) - 24px);
  margin: 0;
  color: var(--sky-note);
  font-size: var(--t-label);
  line-height: 1.45;
  text-align: left;
  pointer-events: auto;
}

/* The ground starts at the horizon. Its top edge is the rule, and it is opaque, so it covers the sky as it
   scrolls up. */
.ground {
  position: relative;
  z-index: 1;
  padding-bottom: var(--sec-gap);
  background: var(--bg);
}

.ground::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--horizon);
}

.hero-copy {
  position: relative;
  text-align: center;
}

.hero-sub {
  max-width: 40rem;
  margin: 0 auto;
  padding-top: clamp(20px, 2vw, 28px);
  color: var(--ink-2);
  font-size: var(--t-lead);
  line-height: 1.5;
}

.hero .actions {
  margin-top: clamp(16px, 1.6vw, 22px);
}

/* Room for two lines of small print on narrow screens, so a late answer from GitHub moves nothing. */
.hero-note {
  max-width: 34rem;
  min-height: 1.5em;
  margin-inline: auto;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.stage-note {
  max-width: 44rem;
  margin: 24px auto 0;
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

/* Stage: the real app on a quiet ground */
.stage {
  position: relative;
  overflow: hidden;
  padding: var(--stage-pad) var(--stage-pad) 0;
  border-radius: var(--r-stage);
  background: var(--overhead), var(--surface);
}

/* Where a window runs off the stage, the stage's own ground rises over its foot, so the window fades into the
   floor instead of stopping on a hard line. The layer repeats the stage's background exactly, sky and glow
   included, and a mask shows only its lowest strip. Its ring and shadow fade with it. */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  -webkit-mask-image: linear-gradient(180deg, transparent calc(100% - var(--fade)), #000);
  mask-image: linear-gradient(180deg, transparent calc(100% - var(--fade)), #000);
  pointer-events: none;
}

/* These stages hold cards that stand clear of the floor, so there is nothing to fade. */
.stage--cards::after,
.stage--strip::after {
  content: none;
}

/* The first stage is a clear sky with a little sun low on the horizon. A narrow band of sky above the window. */
.stage--sky {
  margin-top: clamp(24px, 2vw, 28px);
  padding-top: clamp(24px, 2.2vw, 32px);
  background: var(--glow), linear-gradient(180deg, var(--stage-sky-a) 0%, var(--stage-sky-b) 46%, var(--stage-sky-c) 100%);
}


.window,
.panel {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--lift);
}

/* The outline sits over the picture's edge, with a lit top edge in Twilight. */
.window::after,
.panel:not(.panel--card)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--ring), inset 0 1px 0 var(--edge);
  pointer-events: none;
}

/* A window stands on the stage floor and runs off it. */
.window {
  margin-bottom: -1px;
  border-radius: var(--r-window) var(--r-window) 0 0;
}

.still {
  width: 100%;
}

.still--hero { aspect-ratio: 2880 / 1640; }
.still--page,
.still--project { aspect-ratio: 2880 / 1540; }
.still--approve-edit { aspect-ratio: 1084 / 830; }
.still--memory-chat { aspect-ratio: 780 / 968; }
.still--composer { aspect-ratio: 1472 / 276; }
.still--hero-narrow { aspect-ratio: 780 / 1150; }
.still--page-narrow { aspect-ratio: 780 / 1280; }
.still--project-narrow { aspect-ratio: 780 / 1340; }
.still--approve-narrow { aspect-ratio: 780 / 1180; }

/* Each wide still has a narrow twin with its own words. The one not in use points at a blank pixel, so it costs
   no download. */
.at-narrow {
  display: none;
}

/* Below 1,000 px a full window would shrink its text too far. The window then leaves out the app's sidebar,
   which ends 18.67% of the way across each still, and shows everything to the right of it. The cut falls on
   the sidebar's own edge, so no word is cut in half. */
@media (min-width: 721px) and (max-width: 999px) {
  .window .still--hero,
  .window .still--page,
  .window .still--project {
    width: calc(100% / 0.8133);
    max-width: none;
    margin-left: calc(100% / 0.8133 * -0.1867);
  }
}

.panel {
  border-radius: var(--r-window);
}

/* An approval card is cut out along its own corners, so it needs no ground of its own. */
.panel--card {
  border-radius: var(--r-control);
  background: none;
  box-shadow: 0 0 0 1px var(--ring), var(--lift);
}

/* A chat in a narrow window, at its real size of 390 px. It stands on the stage floor, as the windows do. */
.stage--chat {
  display: grid;
  justify-items: center;
}

.stage--chat .panel {
  width: 100%;
  max-width: 390px;
  margin-bottom: -1px;
  border-radius: var(--r-window) var(--r-window) 0 0;
}

/* The message box, as a strip under its heading. */
.stage--strip {
  margin-top: 32px;
  padding: 32px;
}

/* The file-change card. At 1440 and wider it is 542 px, its real size. */
.stage--cards {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
  padding-bottom: var(--stage-pad);
}

.stage--cards .panel {
  width: 100%;
  max-width: 542px;
}

/* Sections. A chapter of facts opens with a rule across the page. */
.section {
  padding-bottom: var(--sec-gap);
}

.section > .wrap {
  padding-top: var(--head-gap);
  border-top: 1px solid var(--line);
}

/* A feature opens with its heading and words, then its stage. */
.feature {
  padding-top: clamp(24px, 2.3vw, 32px);
  padding-bottom: var(--sec-gap);
}

.split + .stage {
  margin-top: clamp(32px, 3.4vw, 48px);
}

/* The page's one axis: the right column starts at the middle of the container. */
.split,
.side,
.grid-list {
  display: grid;
  grid-template-columns: calc(50% - var(--col-gap)) minmax(0, 1fr);
  column-gap: var(--col-gap);
  align-items: start;
}

.split {
  row-gap: 24px;
}

/* The two product features set their heading in a narrower column and give the words more room, so the page
   does not run on one 50/50 stamp from top to bottom. */
@media (min-width: 901px) {
  .feature .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  }
}

.split-head h2,
.side-copy h2 {
  max-width: 13em;
}

.split-head h3 {
  max-width: 16em;
}

.split-body > p {
  max-width: var(--measure);
  color: var(--ink-2);
}

.split-body > p:first-child {
  color: var(--ink);
}

.split-body > p + p {
  margin-top: 16px;
}

.lead,
.split-body > .lead {
  color: var(--ink);
  font-size: var(--t-lead);
  line-height: 1.5;
}

.aside {
  color: var(--ink-2);
  font-size: var(--t-small);
}

/* Two paragraphs of equal weight, one each side of the axis. */
.pair {
  display: grid;
  grid-template-columns: calc(50% - var(--col-gap)) minmax(0, 1fr);
  column-gap: var(--col-gap);
  row-gap: 16px;
  margin-top: 32px;
}

.pair p {
  max-width: var(--measure);
  color: var(--ink-2);
}

.split--notes {
  margin-top: clamp(32px, 3.4vw, 48px);
}

/* The one sentence a section leaves you with, under a short brass rule. */
.takeaway {
  max-width: 19em;
  color: var(--ink);
  font-family: var(--display);
  font-size: var(--t-lead);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.takeaway::before {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin-bottom: 16px;
  background: var(--brass);
}

/* Hairline lists. The rules run the width of the column. The text keeps to a reading measure. */
.facts {
  margin-top: 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: var(--t-small);
  line-height: 1.55;
}

.facts li {
  padding: 12px max(0px, 100% - 33em) 12px 0;
  border-top: 1px solid var(--line);
}

.split--notes .facts {
  margin-top: 0;
  border-bottom: 0;
}

.split--notes .facts li:first-child {
  padding-top: 0;
  border-top: 0;
}

/* One chat, three states: a line the chat climbs along, left to right. */
.ladder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--col-gap);
  margin-top: clamp(48px, 5vw, 72px);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.rung {
  position: relative;
  padding: 36px 0 40px;
}

/* Three equal markers on the line. The state names lead; nothing else is large. */
.rung-dot {
  position: absolute;
  top: -6.5px;
  left: 0;
  color: var(--ink-2);
}

.rung h3 {
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.rung-text {
  max-width: 24em;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: var(--t-small);
  line-height: 1.55;
}

/* The step limit, as a quiet line of small print. */
.limit {
  margin-top: 12px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.ladder-note {
  max-width: 44em;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: var(--t-small);
}

/* Approvals and memory: the words beside the picture, centred on it. */
.side {
  align-items: center;
}

.side-copy .lead {
  max-width: var(--measure);
  margin-top: 24px;
}

.side-copy .lead + p {
  max-width: var(--measure);
  margin-top: 12px;
  color: var(--ink-2);
}

.side-copy .facts {
  margin-top: 32px;
}

/* Also in the app: short entries in three columns, as the three states are. */
.grid-list {
  margin-top: clamp(40px, 4.45vw, 64px);
}

.grid-list--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.more .grid-list {
  margin-top: 0;
}

.more .grid-list > div {
  padding: 4px 0 32px;
  border-top: 0;
}

.grid-list > div {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
}

.grid-list dt {
  font-family: var(--display);
  font-size: var(--t-lead);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.grid-list dd {
  max-width: 30em;
  margin-top: 8px;
  color: var(--ink-2);
  font-size: var(--t-small);
  line-height: 1.6;
}

/* The memory picker: a horizon with one stop per row of the table. The sun waits at dawn on the left end until a
   stop is chosen, then rises and rests over it, as the mark's sun rests over its rule. Without scripts it is not shown. */
.pick {
  display: none;
  min-width: 0;
  margin: clamp(48px, 5vw, 72px) 0 0;
  padding: 0;
  border: 0;
}

.js .pick {
  display: block;
}

.pick-track {
  --r: clamp(9px, 0.35rem + 0.5vw, 12px);
  --sky: calc(var(--r) * 4.5);
  /* Room on the left for the waiting sun, and on the right for the last stop's name. */
  --in-l: calc(var(--r) * 1.6);
  --in-r: 1.75rem;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  gap: 8px;
  min-height: calc(var(--sky) + max(48px, 3.25rem));
  container-type: inline-size;
}

/* The sky above the rule clips the waiting sun, so only its crown shows, and carries the horizon rule. */
.pick-sky {
  position: absolute;
  inset: 0 0 auto;
  height: calc(var(--sky) + 1px);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  pointer-events: none;
}

.pick-sun {
  position: absolute;
  top: calc(var(--sky) - 1px - var(--r));
  left: calc(var(--in-l) - var(--r));
  width: calc(var(--r) * 2);
  height: calc(var(--r) * 2);
  border-radius: 50%;
  background: var(--brass);
  /* A faint halo, as the sun in the sky above has. */
  box-shadow: 0 0 0 calc(var(--r) * 0.55) color-mix(in srgb, var(--brass) 14%, transparent);
  translate: calc((100cqw - var(--in-l) - var(--in-r)) * var(--sun-at, 0)) var(--sun-y, 0);
}

/* Once a stop is chosen the sun clears the rule by one radius. */
.pick.is-set .pick-sun {
  --sun-y: calc(var(--r) * -2);
}

/* Each stop is its whole column of the track: the mark on the rule and the name under it, 44 px wide or more. */
.pick-stop {
  position: absolute;
  top: calc(var(--sky) - 16px);
  left: calc(var(--in-l) + (100% - var(--in-l) - var(--in-r)) * var(--at));
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  padding: 0 4px;
  translate: -50% 0;
  color: var(--ink-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* The mark on the rule: an open ring that fills in when chosen. */
.pick-stop::before {
  content: "";
  width: 11px;
  height: 11px;
  margin: 10.5px 0 9px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--bg);
}

.pick-stop:has(input:checked)::before {
  background: var(--ink);
}

.pick-stop input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.pick-name {
  padding: 1px 6px 3px;
  border-radius: var(--r-chip);
  font-size: var(--t-small);
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pick-stop:has(input:checked) {
  color: var(--ink);
}

.pick-stop:has(input:checked) .pick-name {
  font-weight: 600;
}

.pick-stop input:focus-visible + .pick-name {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

@media (hover: hover) {
  .pick-stop:hover {
    color: var(--ink);
  }
}

/* Models: one row per amount of memory. */
.tiers {
  width: 100%;
  margin-top: clamp(48px, 5vw, 72px);
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.tiers th,
.tiers td {
  padding: 28px 24px 28px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
  font-weight: 400;
}

.tiers tr > :last-child {
  padding-right: 0;
}

.tiers thead th {
  padding-block: 0 16px;
  border-top: 0;
  vertical-align: top;
}

.tiers tbody tr:first-child > * {
  border-top-color: var(--line-strong);
}

.tiers tbody tr:last-child > * {
  border-bottom: 1px solid var(--line);
}

.tiers-mem {
  width: 16%;
}

.tiers-total {
  width: 24%;
}

.role {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-small);
  font-weight: 600;
}

.key {
  flex: none;
}

.key--fast { color: var(--bar-fast); }
.key--balanced { color: var(--bar-balanced); }
.key--smart { color: var(--bar-smart); }

.role-for,
.tiers-mem,
.tiers-total {
  color: var(--ink-2);
  font-size: var(--t-label);
  font-weight: 500;
}

.role-for {
  display: block;
  margin-top: 2px;
  font-weight: 400;
}

.mem {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.625rem, 1.4rem + 0.8vw, 2.125rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.mem-up {
  display: inline-block;
  margin-left: 8px;
  color: var(--ink-2);
  font-size: var(--t-label);
}

.model {
  display: block;
  line-height: 1.4;
}

.size {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: var(--t-label);
}

.total-num {
  display: block;
  font-weight: 500;
  line-height: 1.4;
}

.table-note {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

/* Each bar runs in a full-width track, drawn to scale against the largest set, 32.45 GiB, and split by model. */
.bar {
  display: block;
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  background: var(--track);
}

.bar-fill {
  display: flex;
  gap: 2px;
  width: var(--share);
  height: 100%;
}

.bar i {
  flex: var(--part) 1 0%;
  min-width: 2px;
}

.bar i:nth-child(1) { background: var(--bar-fast); }
.bar i:nth-child(2) { background: var(--bar-balanced); }
.bar i:nth-child(3) { background: var(--bar-smart); }

/* With a stop chosen, its row is lit and the others step back to the quiet ink, which keeps 4.5:1 or more. Their
   bars lose their colour but keep their length. The tint reaches past the text edge, so nothing moves. */
.js .pick ~ .tiers {
  margin-top: 24px;
}

.tiers.has-pick tbody tr:not(.is-lit) :is(.mem, .model, .total-num) {
  color: var(--ink-2);
}

.tiers.has-pick tbody tr:not(.is-lit) .bar-fill {
  opacity: 0.4;
  filter: grayscale(1);
}

.tiers tbody tr.is-lit {
  background: var(--spot);
}

.tiers tbody tr.is-lit > :first-child {
  box-shadow: -16px 0 0 var(--spot);
}

.tiers tbody tr.is-lit > :last-child {
  box-shadow: 16px 0 0 var(--spot);
}

/* Reference tables: the first column ends on the page axis, so the second starts where the right column does. */
.table {
  width: 100%;
  margin-top: clamp(32px, 3.4vw, 48px);
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.table th,
.table td {
  padding: 16px 24px 16px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
  font-weight: 400;
}

.table tr > :last-child {
  padding-right: 0;
}

.table thead th {
  padding-block: 0 12px;
  border-top: 0;
  color: var(--ink-2);
  font-size: var(--t-label);
  font-weight: 500;
}

.table tbody th {
  font-weight: 500;
}

.table tbody tr:last-child > * {
  border-bottom: 1px solid var(--line);
}

.table tbody tr:first-child > * {
  border-top-color: var(--line-strong);
}

.table th:first-child {
  width: 50%;
}

/* What runs where: the computer, the engine, then the widest column for acceleration. */
.table--engines th:first-child {
  width: 28%;
}

.table--engines thead th:nth-child(2) {
  width: 32%;
}

.table td {
  color: var(--ink-2);
  text-wrap: pretty;
}

.table .num {
  text-align: right;
  white-space: nowrap;
}

/* Outside requests: sized to their words, so no column ends in a wide empty gap. */
.table--leaves th:first-child {
  width: 28%;
}

.table--leaves thead th:nth-child(2) {
  width: 32%;
}

.host {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

/* All 34 models, and what runs where: closed by default, full width once open. */
.more {
  border-bottom: 1px solid var(--line);
}

.more-group {
  margin-top: clamp(32px, 3.4vw, 48px);
}

.more + .more summary {
  border-top: 0;
}

.more-intro {
  max-width: 33em;
  color: var(--ink-2);
  font-size: var(--t-small);
}

.more .table--engines {
  margin-top: 16px;
}

/* The disclosure's own rule closes a table inside it. */
.more .table tbody tr:last-child > * {
  border-bottom: 0;
}

/* The chevron sits beside its words, not at the far end of the rule. */
.more summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 48px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.more summary::-webkit-details-marker {
  display: none;
}

.more summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.more[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.table-scroll {
  overflow-x: auto;
}

.table--catalog {
  min-width: 40rem;
  max-width: 60rem;
  margin-top: 4px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.table--catalog th,
.table--catalog td {
  padding: 8px 16px 8px 0;
}

.table--catalog thead th {
  padding-block: 8px;
}

.table--catalog th:first-child {
  width: 36%;
}

/* On phones each model's role sits under its name, in place of the Role column. */
.cat-role {
  display: none;
  color: var(--ink-2);
  font-weight: 400;
}

.table--catalog .num {
  width: 5.5rem;
}

.table--catalog th:last-child,
.table--catalog td:last-child {
  width: 4.5rem;
  padding-left: 16px;
}

.more .aside {
  max-width: 34em;
  padding: 16px 0;
  font-size: 0.875rem;
}

/* Downloads: what each file needs, how it is signed, and the file itself. */
.downloads {
  width: 100%;
  margin-top: clamp(40px, 4.45vw, 64px);
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}

.downloads th,
.downloads td {
  padding: 14px 24px 14px 0;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  font-weight: 400;
}

.downloads tr > :last-child {
  padding-right: 0;
}

.downloads thead th {
  padding-block: 0 12px;
  border-top: 0;
  color: var(--ink-2);
  font-size: var(--t-label);
  font-weight: 500;
}

.downloads thead th:nth-child(1) { width: 20%; }
.downloads thead th:nth-child(3) { width: min(15rem, 24%); }
.downloads thead th:nth-child(4) { width: min(17.5rem, 28%); }


.downloads tbody tr:first-child > * {
  border-top-color: var(--line-strong);
}

.downloads tbody tr:last-child > * {
  border-bottom: 1px solid var(--line);
}

.downloads tbody th {
  font-weight: 600;
  line-height: 1.4;
}

.arch {
  display: block;
  color: var(--ink-2);
  font-size: var(--t-small);
  font-weight: 400;
}

.req {
  color: var(--ink-2);
  font-size: var(--t-small);
  line-height: 1.5;
}

.sign {
  font-size: var(--t-small);
  line-height: 1.5;
}

.sign-dot {
  display: inline-block;
  margin-right: 10px;
  color: var(--ink-2);
  vertical-align: 0;
}

.sign-dot--yes {
  color: var(--sage);
}

.downloads .file {
  text-align: right;
}

/* A file button: sized to its words and set right, with an edge, so it reads as a button and not a field. */
.dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: min(100%, 12rem);
  max-width: 100%;
  min-height: 44px;
  padding: 10px 16px 10px 14px;
  border-radius: var(--r-control);
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line-strong), 0 1px 2px rgba(17, 18, 20, 0.05);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

.dl .icon {
  color: var(--ink-2);
}

/* Verification, in a disclosure as before, laid out as three steps once open. */
.verify {
  margin-top: 16px;
}

.verify-body {
  padding: 8px 0 40px;
}

.verify-intro p {
  max-width: 33em;
  color: var(--ink-2);
}

.verify-intro p + p {
  margin-top: 12px;
}

.verify-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--col-gap);
  margin-top: 32px;
}

/* Each step keeps its command at the foot, so the three commands line up across the row. */
.step {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.step p {
  max-width: 33em;
  color: var(--ink-2);
  font-size: var(--t-small);
  line-height: 1.55;
}

/* The command and its Copy button, which appears once app.js knows the clipboard is there. Wraps cleanly on
   narrow screens and at 200% text scaling so long commands never collide with Copy. */
.cmd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 16px;
  padding: 6px;
  border-radius: var(--r-control);
  background: var(--surface);
}

.cmd pre {
  flex: 1 1 11rem;
  min-width: 0;
  padding: 10px;
  background: none;
}

.cmd pre .nowrap {
  white-space: normal;
  overflow-wrap: anywhere;
}

.cmd .copy {
  margin-left: auto;
}

.copy {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  background: var(--bg);
  color: var(--ink-2);
  font: 500 0.875rem / 1 var(--sans);
  cursor: pointer;
}

.copy .icon {
  stroke-width: 1.6;
}

.copy .icon-done,
.copy.is-done .icon-copy {
  display: none;
}

.copy.is-done .icon-done {
  display: block;
  color: var(--sage);
}

/* Closing band: a quiet ground, the mark at its own small size, then the action and every file. */
.band-inner {
  overflow: hidden;
  border-radius: var(--r-stage);
  background: var(--surface);
  container: band / inline-size;
}

.band-ground {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: var(--col-gap);
  padding: clamp(48px, 5.6vw, 80px) var(--stage-pad) clamp(40px, 4.45vw, 64px);
}

/* The closing band opens on the same sky as the first screen, drawn in CSS, with the sun at a smaller size. */
.band-sky {
  --band-r: clamp(18px, 0.6rem + 1.4vw, 34px);
  position: relative;
  height: clamp(132px, 7rem + 5vw, 208px);
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: var(--sky-still);
}

.band-sky::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% calc(100% - var(--sky-sun-u) * var(--band-r)), rgba(248, 227, 189, 0.22) 0, rgba(248, 227, 189, 0) calc(var(--band-r) * 4));
}

.band-sun {
  position: absolute;
  left: 50%;
  bottom: calc((var(--sky-sun-u) - 1) * var(--band-r));
  width: calc(var(--band-r) * 2);
  height: calc(var(--band-r) * 2);
  margin-left: calc(var(--band-r) * -1);
  border-radius: 50%;
  background: radial-gradient(circle, #EEC06F, #E0A03E);
}

:root[data-theme="twilight"] .band-sky::before {
  background: radial-gradient(55% 60% at 50% 100%, rgba(242, 166, 90, 0.3), rgba(242, 166, 90, 0));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="daylight"]) .band-sky::before {
    background: radial-gradient(55% 60% at 50% 100%, rgba(242, 166, 90, 0.3), rgba(242, 166, 90, 0));
  }
}

.band-ground > .actions {
  grid-column: 2;
  grid-row: 1 / span 3;

  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  min-width: min(100%, 16.5rem);
}

.band h2 {
  font-size: clamp(2rem, 1.4rem + 2.3vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.band-ground > p,
.noscript-note {
  margin-top: 24px;
  color: var(--ink-2);
  line-height: 1.5;
}

.noscript-note {
  margin-top: 12px;
  font-size: var(--t-small);
}

.band .actions {
  margin-top: 0;
}

/* Every file, on the same ground as the button above it. */
.band-table {
  padding: 0 var(--stage-pad) clamp(24px, 2.8vw, 40px);
  text-align: left;
}

.band-table .downloads {
  margin-top: 0;
}

.band-inner .dl,
.band-inner .cmd,
.band-inner code {
  background: var(--bg);
}

.band-inner .copy {
  background: var(--surface);
}

.band-inner pre code {
  background: none;
}

.phones {
  max-width: 34em;
  margin-top: 16px;
}

/* Footer */
.footer {
  padding: var(--sec-gap) 0 calc(64px + var(--safe-b));
  color: var(--ink-2);
  font-size: var(--t-small);
}

.footer-inner {
  display: grid;
  grid-template-columns: calc(50% - var(--col-gap)) minmax(0, 1fr);
  column-gap: var(--col-gap);
  row-gap: 48px;
}

/* Two groups of links: the page's own sections, then the project on GitHub. They share a row where it fits. */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  column-gap: var(--col-gap);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: 12px;
  margin-left: -6px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 6px;
  color: var(--ink-2);
  text-decoration: none;
}

/* Product stills that load late fade in once, when app.js has seen them arrive. */
/* The copy of the app picture that lies over it while the theme changes (see holdHeroStill in app.js). */
.still-ghost {
  position: absolute;
  max-width: none;
  pointer-events: none;
}

.still-ghost.is-out {
  opacity: 0;
}

.fade .still[loading="lazy"]:not(.is-in) {
  opacity: 0;
}

/* Hover, only where a pointer can hover */
@media (hover: hover) {
  .nav a:hover,
  .footer-nav a:hover {
    color: var(--ink);
  }

  .nav a:hover,
  .theme:hover {
    background: var(--surface);
  }

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

  .btn:hover {
    background: var(--btn-bg-hover);
  }

  .btn--quiet:hover,
  .dl:hover {
    background: var(--surface-hover);
  }

  .is-past-action .btn--quiet:hover {
    background: var(--btn-bg-hover);
  }

  /* Over the sky, hover fills stay see-through too. */
  .js .masthead:not(.is-scrolled) .nav a:hover,
  .js .masthead:not(.is-scrolled) .theme:hover {
    background: color-mix(in srgb, var(--ink) 8%, transparent);
  }

  .js .masthead:not(.is-scrolled):not(.is-past-action) .btn--quiet:hover {
    background: color-mix(in srgb, var(--bg) 50%, transparent);
  }

  .dl:hover .icon,
  .copy:hover {
    color: var(--ink);
  }

  .copy:hover {
    border-color: var(--line-strong);
  }

  .quiet:hover,
  .more summary:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
  }
}

/* Motion, only when the visitor has not asked for less */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .btn,
  .dl {
    transition: background-color 150ms ease-out, color 150ms ease-out, transform 150ms ease-out;
  }

  .btn:active,
  .dl:active,
  .copy:active {
    transform: scale(0.97);
  }

  .masthead {
    transition: border-color 200ms ease-out, background-color 200ms ease-out;
  }

  .sky-canvas {
    transition: opacity 400ms ease-out;
  }

  /* The load moment, once, in 1.1 s from first paint. The horizon draws from the centre out, the sun comes up from behind it
     as the sky turns from dawn to day, and the headline arrives as the sun settles. In Twilight the same beat is
     dusk settling: the sun sinks to its crown and the warm sky fades. sky.js follows the sun's clock. */
  .sky-intro .ground::before {
    animation: horizon-draw 600ms var(--sunrise) both;
  }

  .sky-intro .sky-sun {
    animation: sky-rise 1100ms var(--sunrise) both;
  }

  .sky-intro .sky-still::before {
    animation: sky-from 1100ms var(--sunrise) both;
  }

  .sky-intro .hero h1,
  .sky-intro .sky-note {
    animation: head-in 800ms var(--sunrise) 200ms both;
  }

  :root.sky-intro[data-theme="twilight"] .sky-sun {
    animation-name: sky-settle;
  }

  .sky-hint {
    transition: opacity 150ms ease-out, visibility 150ms;
  }

  .nav-watch .masthead .btn--quiet {
    transition: background-color 150ms ease-out, color 150ms ease-out, transform 150ms ease-out, opacity 200ms ease-out, visibility 200ms;
  }

  /* As the sun crosses the horizon the page's colours fade over 300 ms instead of cutting. app.js sets the class
     for the length of the fade. Text colour fades where it is set, never on an ancestor as well. */
  .theme-fade body,
  .theme-fade .ground,
  .theme-fade .masthead,
  .theme-fade .menu-panel {
    transition: background-color 300ms ease-out, border-color 300ms ease-out;
  }

  .theme-fade .stage--sky {
    transition: --stage-sky-a 300ms ease-out, --stage-sky-b 300ms ease-out, --stage-sky-c 300ms ease-out;
  }

  .theme-fade .ground::before {
    transition: background-color 300ms ease-out;
  }

  .theme-fade .hero h1,
  .theme-fade .sky-note,
  .theme-fade .hero-sub,
  .theme-fade .hero-note,
  .theme-fade .stage-note,
  .theme-fade .quiet,
  .theme-fade .brand,
  .theme-fade .menu-button {
    transition: color 300ms ease-out;
  }

  .theme-fade .nav a,
  .theme-fade .theme {
    transition: color 300ms ease-out, background-color 300ms ease-out;
  }

  .theme-fade .btn,
  .theme-fade .sky-hint {
    transition: color 300ms ease-out, background-color 300ms ease-out, box-shadow 300ms ease-out, opacity 150ms ease-out;
  }

  .nav a,
  .theme,
  .footer-nav a {
    transition: background-color 150ms ease-out, color 150ms ease-out;
  }

  .copy {
    transition: color 150ms ease-out, border-color 150ms ease-out, transform 150ms ease-out;
  }

  .dl .icon {
    transition: color 150ms ease-out;
  }

  .theme .icon {
    transition: opacity 200ms cubic-bezier(0.2, 0, 0, 1), transform 200ms cubic-bezier(0.2, 0, 0, 1), filter 200ms cubic-bezier(0.2, 0, 0, 1);
  }

  .quiet .icon,
  .more summary::after {
    transition: transform 150ms ease-out;
  }

  .fade .still[loading="lazy"] {
    transition: opacity 600ms cubic-bezier(0.2, 0, 0, 1);
  }

  .still-ghost {
    transition: opacity 300ms ease-out;
  }

  /* The picker's sun moves on the sunrise curve. The table follows at the speed of the theme fade. */
  .pick-sun {
    transition: translate 900ms var(--sunrise);
  }

  .pick-stop,
  .pick-stop::before {
    transition: color 200ms ease-out, background-color 200ms ease-out;
  }

  .tiers :is(.mem, .model, .total-num) {
    transition: color 300ms ease-out;
  }

  .tiers tbody tr,
  .tiers tbody tr > * {
    transition: background-color 300ms ease-out, box-shadow 300ms ease-out;
  }

  .tiers .bar-fill {
    transition: opacity 300ms ease-out, filter 300ms ease-out;
  }
}

/* In Daylight the closing band's sun rises from the horizon as the band comes up the screen, and its glow comes
   with it. It is tied to scrolling, so it stops when the reader does. Only where the browser supports it, and only
   with scripts on, so the page without them reads as before. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Clip, not hidden, so the band is not a scroll box of its own and the timeline follows the page. */
    :root[data-theme="daylight"] .band-inner {
      overflow: clip;
    }

    :root[data-theme="daylight"] .band-sky {
      view-timeline-name: --band;
    }

    :root[data-theme="daylight"] .band-sun,
    :root[data-theme="daylight"] .band-sky::before {
      animation: band-rise linear both;
      animation-timeline: --band;
      animation-range: entry 10% cover 45%;
    }
  }
}

@keyframes band-rise {
  from { translate: 0 calc(var(--sky-sun-u) * var(--band-r)); }
}

@keyframes horizon-draw {
  from { transform: scaleX(0); }
}

/* The sun starts at -1 radius (Daylight, from 1.4) and at the horizon (Twilight, from -0.5). */
@keyframes sky-rise {
  from { transform: translateY(calc(var(--sun-r) * 2.4)); }
}

@keyframes sky-settle {
  from { transform: translateY(calc(var(--sun-r) * -0.5)); }
}

@keyframes sky-from {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes head-in {
  from { opacity: 0; transform: translateY(10px); }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .quiet:hover .icon {
    transform: translateX(2px);
  }
}

/* Medium widths: table columns stop following the axis so every cell keeps room, and downloads become rows. */
@media (max-width: 1150px) {
  .table th:first-child {
    width: 34%;
  }

  .verify-steps {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
    max-width: 42rem;
  }


  .tiers-mem {
    width: 14%;
  }

  .tiers-total {
    width: 20%;
  }

  .downloads,
  .downloads tbody,
  .downloads tr,
  .downloads th,
  .downloads td {
    display: block;
  }

  .downloads thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .downloads tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 24px;
    row-gap: 4px;
    align-items: center;
    padding: 18px 0;
    border-top: 1px solid var(--line);
  }

  .downloads tbody tr:first-child {
    border-top-color: var(--line-strong);
  }

  .downloads tbody tr:last-child {
    border-bottom: 1px solid var(--line);
  }

  .downloads tbody tr > *,
  .downloads tbody tr:first-child > *,
  .downloads tbody tr:last-child > * {
    padding: 0;
    border: 0;
  }

  .downloads tbody th,
  .downloads .req,
  .downloads .sign {
    grid-column: 1;
  }

  .downloads .arch {
    display: inline;
    margin-left: 4px;
  }

  .downloads .file {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

}

/* One column. Tables become stacked rows. */
/* The memory column is too narrow here to hold "and up" beside its number, so it always sits under it. */
@media (min-width: 901px) and (max-width: 1150px) {
  .tiers .mem-up {
    display: block;
    margin: 2px 0 0;
  }
}

@media (max-width: 900px) {
  .nav,
  .js .theme-slot {
    display: none;
  }

  /* One Download on the first screen: the top bar's waits until the hero's has scrolled away. */
  .nav-watch .masthead:not(.is-past-action) .btn--quiet {
    visibility: hidden;
    opacity: 0;
  }

  .menu {
    display: block;
  }

  .split,
  .side,
  .grid-list,
  .footer-inner,
  .band-ground {
    grid-template-columns: minmax(0, 1fr);
  }

  .band-ground > .actions {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 28px;
    min-width: 0;
    margin-top: 28px;
  }

  .split-head h2,
  .split-head h3,
  .side-copy h2 {
    max-width: 18em;
  }

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

  .rung:last-child {
    padding-bottom: 24px;
  }

  .rung {
    padding: 28px 0 32px 28px;
    border-top: 1px solid var(--line-strong);
  }

  .rung-dot {
    top: 32px;
  }

  .rung h3 {
    line-height: 1.1;
  }

  /* The cards come first, as every other stage does on a narrow page. */
  .side {
    row-gap: 32px;
  }

  .side .stage {
    order: -1;
  }

  .side-copy {
    padding-top: 0;
  }

  .grid-list > div:last-child {
    padding-bottom: 8px;
  }

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

  .verify-steps {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
    margin-top: 8px;
  }

  /* Models: one block per amount of memory, each model on its own line. */
  .tiers,
  .tiers tbody,
  .tiers tr,
  .tiers th,
  .tiers td {
    display: block;
  }

  .tiers,
  .table--stack {
    container-type: inline-size;
  }

  .tiers thead,
  .table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .tiers tbody tr {
    padding: 24px 0;
    border-top: 1px solid var(--line);
  }

  .tiers tbody tr:first-child {
    border-top-color: var(--line-strong);
  }

  .tiers tbody tr:last-child {
    border-bottom: 1px solid var(--line);
  }

  .tiers tbody tr > * {
    padding: 0;
    border: 0;
  }

  .tiers tbody tr:last-child > * {
    border-bottom: 0;
  }

  /* Here the row is one block, so the row carries the tint. */
  .tiers tbody tr.is-lit {
    background: var(--spot);
    box-shadow: -12px 0 0 var(--spot), 12px 0 0 var(--spot);
  }

  .tiers tbody tr.is-lit > *,
  .tiers tbody tr.is-lit > :first-child,
  .tiers tbody tr.is-lit > :last-child {
    background: none;
    box-shadow: none;
  }

  .tiers tbody th {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
  }

  .tiers .mem-up {
    margin-top: 0;
  }

  .tiers td[data-label] {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 10px;
    padding: 5px 0 5px 6.5rem;
  }

  .tiers td[data-label]::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    color: var(--ink-2);
    font-size: var(--t-small);
  }

  .tiers .model {
    display: inline;
  }

  .tiers .size {
    display: inline;
    margin-top: 0;
  }

  /* Each label keeps its colour key, since the column heads are hidden at this width. */
  .tiers td[data-label]::before {
    padding-left: 16px;
    background: radial-gradient(circle at 4.5px 50%, var(--key) 4.5px, transparent 5px) no-repeat;
  }

  .tiers td:nth-of-type(1) { --key: var(--bar-fast); }
  .tiers td:nth-of-type(2) { --key: var(--bar-balanced); }
  .tiers td:nth-of-type(3) { --key: var(--bar-smart); }
  .tiers td:nth-of-type(4) { --key: transparent; }

  .tiers td.total {
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
  }

  .tiers .bar {
    flex: 1 1 auto;
    max-width: 18rem;
    margin-top: 0;
  }

  .tiers .total-num {
    flex: none;
    color: var(--ink-2);
    font-size: var(--t-small);
  }

  .table--stack,
  .table--stack tbody,
  .table--stack tr,
  .table--stack th,
  .table--stack td {
    display: block;
  }

  .table--stack th:first-child,
  .table--stack th:nth-child(n) {
    width: auto;
  }

  .table--stack tbody tr {
    padding: 16px 0;
    border-top: 1px solid var(--line);
  }

  .table--stack tbody tr:first-child {
    border-top-color: var(--line-strong);
  }

  .table--stack tbody tr:last-child {
    border-bottom: 1px solid var(--line);
  }

  /* The row carries the rule and the space. Its cells carry neither, in the first and last rows too. */
  .table--stack tbody tr > *,
  .table--stack tbody tr:first-child > *,
  .table--stack tbody tr:last-child > * {
    border: 0;
  }

  .table--stack tbody th {
    margin-bottom: 8px;
    padding: 0;
  }

  /* Each cell names its column in a 7rem gutter on its left. */
  .table--stack tbody td,
  .table--stack tbody td.num {
    position: relative;
    padding: 4px 0 4px calc(7rem + 16px);
    color: var(--ink);
    text-align: left;
  }

  .table--stack tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    color: var(--ink-2);
  }
}

/* Small screens: a narrow-window still, edge to edge */
@media (max-width: 720px) {
  html {
    scroll-padding-top: calc(72px + var(--safe-t));
  }

  .narrow-only {
    display: inline;
  }

  .wide-only,
  .stage.wide-only {
    display: none;
  }

  .at-narrow {
    display: block;
  }

  :root {
    --mast-h: 56px;
    --sky-h: clamp(max(340px, 21rem), 46vh, max(560px, 35rem));
  }

  @supports (height: 1svh) {
    :root {
      --sky-h: clamp(max(340px, 21rem), 46svh, max(560px, 35rem));
    }
  }

  .masthead-inner {
    gap: 12px;
  }

  /* The caption moves under the headline, where there is room beside nothing. */
  .sky-note {
    position: static;
    width: auto;
    max-width: 20rem;
    margin: 12px auto 0;
    text-align: center;
  }

  .sky-hint {
    left: 50%;
    top: var(--sun-top, 50%);
    max-width: calc(100% - 2 * var(--gutter));
    width: max-content;
    translate: -50% calc(-100% - 10px);
  }

  .masthead-end {
    gap: 8px;
  }

  .stage,
  .stage--chat,
  .stage--cards {
    display: block;
    margin-inline: calc(var(--gutter-x) * -1);
    padding: 24px max(var(--gutter), var(--safe-r)) 0 max(var(--gutter), var(--safe-l));
    border-radius: 0;
  }

  .stage--sky {
    padding-top: 32px;
  }

  .stage--chat .panel,
  .stage--cards .panel {
    max-width: none;
    margin-bottom: -1px;
    border-radius: var(--r-window) var(--r-window) 0 0;
    background: var(--bg);
    box-shadow: var(--lift);
  }

  /* The command card stands clear of the floor with all four corners, and one edge only. */
  .stage--cards,
  .stage--strip {
    padding-bottom: 24px;
  }

  /* The narrow page picture ends just under its last card, so only a thin strip of it fades. */
  #pages .stage {
    --fade: 12px;
  }

  .stage--cards .panel {
    margin-bottom: 0;
    border-radius: var(--r-window);
  }

  .stage--cards .panel::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px var(--ring), inset 0 1px 0 var(--edge);
    pointer-events: none;
  }

  .stage-note {
    max-width: 34em;
    margin: 16px 0 0;
    text-align: left;
  }

  /* The stops sit evenly here, so each keeps a wide enough place to tap. */
  .pick-stop {
    left: calc(var(--in-l) + (100% - var(--in-l) - var(--in-r)) * var(--even));
  }

  .pick-sun {
    --sun-at: var(--sun-even, 0);
  }

  .band .wrap {
    width: 100%;
  }

  .band-inner {
    border-radius: 0;
  }

  .band-ground,
  .band-table {
    padding-left: max(var(--gutter), var(--safe-l));
    padding-right: max(var(--gutter), var(--safe-r));
  }

}

@media (max-width: 560px) {
  :root {
    --sky-h: clamp(max(340px, 26rem), 46vh, max(560px, 38rem));
  }

  @supports (height: 1svh) {
    :root {
      --sky-h: clamp(max(340px, 26rem), 46svh, max(560px, 38rem));
    }
  }

  .hero-note {
    min-height: 3em;
  }

  .pick-track {
    --in-l: 12px;
    --in-r: max(22px, 1.75rem);
  }

  /* The role column moves under each model so the table stays compact, while min-width keeps columns readable inside .table-scroll. */
  .table--catalog {
    min-width: 21.5rem;
  }

  .table--catalog th:nth-child(2),
  .table--catalog td:nth-child(2) {
    display: none;
  }

  .cat-role {
    display: block;
  }

  .table--catalog th:first-child {
    width: 46%;
  }

  .table--catalog th,
  .table--catalog td {
    padding-right: 8px;
  }

  .table--catalog .num {
    width: 4.75rem;
  }

  .table--catalog th:last-child,
  .table--catalog td:last-child {
    width: 3.75rem;
    padding-left: 8px;
    padding-right: 0;
  }

  /* Each download button moves under its platform, so every one stays in view. */
  .downloads tbody tr {
    grid-template-columns: minmax(0, 1fr);
  }

  .downloads .file {
    grid-column: 1;
    grid-row: auto;
    margin-top: 10px;
    text-align: left;
  }

  .downloads .dl {
    width: auto;
  }

  .tiers td[data-label],
  .tiers .total {
    padding-left: 5.75rem;
  }
}

@media (max-width: 480px) {
  .masthead-inner {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .actions,
  .band-ground > .actions {
    flex-direction: column;
    gap: 4px;
  }

  .btn--primary {
    width: 100%;
  }

}

/* Container-based reflow for 200% text scaling on desktop, tablet, and mobile: stack the closing band and
   downloads table before fixed rem columns collapse Requirements, switch memory picker to even stops when tight,
   reflow stops into a wrapping row when four inline labels cannot fit, and stack table labels above values so narrow
   cells never crush or overflow horizontally. */
@container band (max-width: 65rem) {
  .downloads,
  .downloads tbody,
  .downloads tr,
  .downloads th,
  .downloads td {
    display: block;
  }

  .downloads thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .downloads tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 24px;
    row-gap: 4px;
    align-items: center;
    padding: 18px 0;
    border-top: 1px solid var(--line);
  }

  .downloads tbody tr:first-child {
    border-top-color: var(--line-strong);
  }

  .downloads tbody tr:last-child {
    border-bottom: 1px solid var(--line);
  }

  .downloads tbody tr > *,
  .downloads tbody tr:first-child > *,
  .downloads tbody tr:last-child > * {
    padding: 0;
    border: 0;
  }

  .downloads tbody th,
  .downloads .req,
  .downloads .sign {
    grid-column: 1;
  }

  .downloads .arch {
    display: inline;
    margin-left: 4px;
  }

  .downloads .file {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
}

@container band (max-width: 50rem) {
  .band-ground {
    grid-template-columns: minmax(0, 1fr);
  }

  .band-ground > .actions {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 28px;
    min-width: 0;
    margin-top: 28px;
  }
}

@container band (max-width: 34rem) {
  .downloads tbody tr {
    grid-template-columns: minmax(0, 1fr);
  }

  .downloads .file {
    grid-column: 1;
    grid-row: auto;
    margin-top: 10px;
    text-align: left;
  }

  .downloads .dl {
    width: auto;
  }
}

@container band (max-width: 30rem) {
  .band-ground > .actions {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .band-ground .btn--primary {
    width: 100%;
  }
}

@container (max-width: 44rem) {
  .pick-stop {
    left: calc(var(--in-l) + (100% - var(--in-l) - var(--in-r)) * var(--even));
  }

  .pick-sun {
    --sun-at: var(--sun-even, 0);
  }
}

@container (max-width: 17rem) {
  .pick-sky {
    display: none;
  }

  .pick-stop {
    position: static;
    flex: 1 1 auto;
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-control);
    background: var(--bg);
    translate: none;
  }

  .pick-stop::before {
    flex: none;
    margin: 0;
  }

  .tiers td[data-label],
  .tiers .total,
  .table--stack tbody td,
  .table--stack tbody td.num {
    padding-left: 0;
  }

  .tiers td[data-label] {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 2px;
  }

  .tiers td[data-label]::before,
  .table--stack tbody td::before {
    position: static;
    display: block;
    margin-bottom: 2px;
  }

  .tiers td.total {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 12px;
  }

  .tiers .bar {
    width: 100%;
    max-width: none;
  }
}

/* Forced colors (Windows High Contrast): keep interactive boundaries, switches, horizon rules, picker markers,
   download bars, and lit rows visible when backgrounds and box-shadows are stripped. */
@media (forced-colors: active) {
  .sky-canvas,
  .sky-sun-halo {
    display: none;
  }

  .brand {
    --brass: currentColor;
  }

  .rung-dot {
    --bg: Canvas;
    color: CanvasText;
  }

  .sign-dot,
  .key {
    color: CanvasText;
  }

  .takeaway::before {
    forced-color-adjust: none;
    background: CanvasText;
  }

  .sky-sun circle:last-of-type {
    forced-color-adjust: none;
    fill: ButtonFace;
    stroke: ButtonText;
    stroke-width: 0.14;
  }

  .masthead,
  .js .masthead:not(.is-scrolled),
  html:not(.js) .masthead,
  .menu-panel {
    background: Canvas;
    border-bottom: 1px solid CanvasText;
  }

  .band-sky {
    border-bottom-color: CanvasText;
  }

  .band-sun {
    border: 2px solid CanvasText;
    background: Canvas;
  }

  .btn,
  .btn--quiet,
  .dl,
  .skip,
  .menu-button,
  .theme,
  .copy {
    border: 1px solid ButtonText;
  }

  .menu[open] .menu-button {
    border-color: Highlight;
  }

  .progress-sun {
    forced-color-adjust: none;
    background: Highlight;
  }

  .cmd {
    border: 1px solid CanvasText;
  }

  .switch {
    border: 1px solid ButtonText;
    background: Canvas;
  }

  .switch::after {
    forced-color-adjust: none;
    top: 2px;
    left: 2px;
    background: ButtonText;
  }

  .menu-theme[aria-pressed="true"] .switch {
    forced-color-adjust: none;
    border-color: Highlight;
    background: Highlight;
  }

  .menu-theme[aria-pressed="true"] .switch::after {
    forced-color-adjust: none;
    left: 18px;
    background: HighlightText;
  }

  .ground::before {
    background: none;
    border-top: 1px solid CanvasText;
  }

  .pick-sky {
    border-bottom-color: CanvasText;
  }

  .pick-sun {
    forced-color-adjust: none;
    border: 2px solid CanvasText;
    background: Highlight;
    box-shadow: none;
  }

  .pick-stop::before {
    border-color: CanvasText;
    background: Canvas;
  }

  .pick-stop:has(input:checked) {
    border-color: Highlight;
  }

  .pick-stop:has(input:checked)::before {
    forced-color-adjust: none;
    border-color: Highlight;
    background: Highlight;
  }

  .tiers tbody tr.is-lit {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }

  .bar {
    border: 1px solid CanvasText;
    background: Canvas;
  }

  .bar i,
  .bar i:nth-child(n) {
    forced-color-adjust: none;
    background: Highlight;
  }

  .window,
  .panel--card,
  .band-inner {
    border: 1px solid CanvasText;
  }

  :focus-visible,
  .pick-stop input:focus-visible + .pick-name {
    outline-color: Highlight;
  }

  .sun:focus-visible::before {
    outline: 2px solid Highlight;
    box-shadow: none;
  }

  .sky-hint {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
}
