/* ============================================
   Taylor Prince — the orbit

   One page: a ring of work around a single sentence. Turning the ring brings a
   project to rest, where its frames open into a strip. The same frames lay
   themselves out as an index, and a project opens into a full sheet.

   Motion, in one place. One curve, three lengths; site.js mirrors them.
     ease     quick start, long soft settle. Nothing eases in, nothing bounces.
     quick    a press, a hover, anything leaving
     base     something appearing
     move     something travelling or changing size
   Places and sizes move; words fade. Things leave before others arrive.
   ============================================ */

@layer legacy;

/* The page's tokens. Every transition on the site reads its curve and length
   from here, so a rule that loses one of these stops moving altogether. */
:root {
  color-scheme: light dark;

  --text: #111;
  --text-secondary: #444;
  --text-muted: #6f6f6e;
  --text-faint: #b4b4b1;
  --bg: #fdfdfc;
  --bg-alt: #f6f5f4;
  --surface: #fff;
  --border: #e8e8e6;
  --border-light: #f0efee;
  --edge: rgb(17 17 17 / 0.12);
  --lift: 0 1px 2px rgb(17 17 17 / 0.05), 0 18px 44px -18px rgb(17 17 17 / 0.28);
  --veil: rgb(253 253 252 / 0.78);

  --font: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-quick: 150ms;
  --t-base: 250ms;
  --t-move: 450ms;

  --top-h: 64px;
  --gutter: 28px;
}

/* Dark: when the system asks for it and the footer's switch hasn't chosen
   light, or when the switch chooses dark (data-theme on the root, set in the
   head before the page paints). The two lists are the same; keep them so. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --text: #f4f4f2;
    --text-secondary: #c3c3bf;
    --text-muted: #91918d;
    --text-faint: #5d5d5a;
    --bg: #0e0e0d;
    --bg-alt: #181817;
    --surface: #222221;
    --border: #2c2c2a;
    --border-light: #212120;
    --edge: rgb(255 255 255 / 0.14);
    --lift: 0 1px 2px rgb(0 0 0 / 0.4), 0 18px 44px -18px rgb(0 0 0 / 0.8);
    --veil: rgb(14 14 13 / 0.78);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --text: #f4f4f2;
  --text-secondary: #c3c3bf;
  --text-muted: #91918d;
  --text-faint: #5d5d5a;
  --bg: #0e0e0d;
  --bg-alt: #181817;
  --surface: #222221;
  --border: #2c2c2a;
  --border-light: #212120;
  --edge: rgb(255 255 255 / 0.14);
  --lift: 0 1px 2px rgb(0 0 0 / 0.4), 0 18px 44px -18px rgb(0 0 0 / 0.8);
  --veil: rgb(14 14 13 / 0.78);
}

:root[data-theme='light'] {
  color-scheme: light;
}

/* The switch swaps the page in one crossfade on the site's curve. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--t-base);
  animation-timing-function: var(--ease);
}

/* While it swaps, nothing else eases from the old colours to the new. */
.is-theming,
.is-theming *,
.is-theming *::before,
.is-theming *::after {
  transition: none !important;
}

@font-face {
  font-family: 'Instrument Sans';
  src: url('assets/fonts/instrument-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* The home page is one fixed stage; only an open project scrolls. */
body:has(.o-stage) {
  overflow: hidden;
  overscroll-behavior: none;
}

/* A selection takes the colour the headline's full stop came to rest on
   (grid.css, --dot), with the ink that reads on it. */
::selection {
  background: var(--dot, var(--text));
  color: var(--dot-ink, var(--bg));
}

:where(a, button, [tabindex], summary):focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 6px;
}

button {
  font: inherit;
  color: inherit;
}

kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0.1em 0.4em;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-alt);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.4;
  text-align: center;
  color: var(--text-muted);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  text-decoration: none;
  transform: translateY(-200%);
}

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

/* ---- Top bar ---- */

.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--top-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* The top of the wheel rises between the name and the links, so the bar
   itself lets the pointer through to it. */
.top {
  pointer-events: none;
}

.top > * {
  pointer-events: auto;
}

/* Over an open project or a long page the bar needs a ground of its own. */
.top::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--veil);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border-light);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}

.is-sheet .top::before,
.page .top::before {
  opacity: 1;
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.top-brand svg {
  width: 22px;
  height: 17px;
  fill: currentColor;
}

.top-nav {
  --nav-gap: clamp(16px, 2.4vw, 30px);
  display: flex;
  align-items: center;
}

.top-sections {
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--t-quick) var(--ease);
}

.top-nav a:hover,
.top-nav a[aria-current='page'],
.tab.open .tab-label {
  color: var(--text);
}

.top-sections > a {
  transition: color var(--t-quick) var(--ease), opacity var(--t-base) var(--ease) 140ms, visibility 0s;
}

/* In the orbit, on a wide screen, the wheel itself names the work and the two
   sections, under each cover. The bar keeps the name, Contact and the two
   views; its section links step back before the wheel's words are gone and
   return after it has left. */
@media (min-width: 1025px), (min-width: 761px) and (orientation: landscape) {
  .nav-wheel .top-sections > a {
    opacity: 0;
    visibility: hidden;
    transition: color var(--t-quick) var(--ease), opacity var(--t-quick) var(--ease), visibility 0s var(--t-quick);
  }
}

/* The work's two views stand at the bar's edge, so they hold still whatever
   the sections beside them do. They are there while you are in the work, and
   fold away on Photography and About, where there is only one view, on the
   timing the Contact drawer has always had. */
.top-views {
  display: flex;
  align-items: center;
}

.views-drawer {
  display: flex;
  align-items: center;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(0.5rem);
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.4s;
}

.top-views.open .views-drawer {
  max-width: var(--w, 12rem);
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

/* In the bar the two views are plain words, like the sections: the one you
   are in is lit, and a stroke between them says they are a pair. */
.top .seg {
  margin-left: calc(var(--nav-gap) * 1.6);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.top .seg button,
.top .seg button[aria-pressed='true'] {
  min-height: 44px;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 0.875rem;
}

.top .seg button + button::before {
  content: '/';
  margin: 0 0.6em;
  color: var(--text-faint);
}

/* The old site's arrow, beside each section. Hidden and nudged back at rest,
   it slides in on hover; on the section you are in it has turned a quarter
   to point down. A fixed width keeps the labels still. */
.top-nav .arrow {
  display: inline-block;
  width: 0.9em;
  margin-left: 0.3em;
  text-align: center;
  opacity: 0;
  transform: translateX(-0.2rem);
  transition: opacity 0.2s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-nav .arrow::after {
  content: '\2192';
}

.top-nav a:hover .arrow,
.top-nav a:focus-visible .arrow {
  opacity: 1;
  transform: none;
}

.top-nav a[aria-current='page'] .arrow {
  opacity: 1;
  transform: rotate(90deg);
}

/* No room for it on a phone, and nothing to hover with. */
@media (hover: none), (max-width: 760px) {
  .top-nav .arrow {
    display: none;
  }
}

/* A phone keeps the two views at the bottom, under the thumb. */
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) {
  .top-views {
    display: none;
  }
}

/* A tab and what sits behind it. The drawer slides out to the left of its
   label, on the timing Contact has always had. */
.tab {
  display: flex;
  align-items: center;
}

.tab-drawer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(1rem);
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.4s;
}

.tab-drawer a:last-child {
  margin-right: 1.25rem;
}

.tab.open .tab-drawer {
  max-width: var(--w, 40rem);
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

@media (max-width: 899px) {
  .tab-drawer {
    display: none;
  }
}

/* ---- Stage ---- */

.o-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  /* Until site.js has measured and placed everything, show nothing half-built. */
  opacity: 0;
  transition: opacity var(--t-move) var(--ease);
}

.o-stage.is-ready {
  opacity: 1;
}

.o-stage.is-dragging,
.o-stage.is-dragging * {
  cursor: grabbing !important;
}

.o-ring {
  position: absolute;
  left: calc(var(--cx) - var(--r));
  top: calc(var(--cy) - var(--r));
  width: calc(var(--r) * 2);
  height: calc(var(--r) * 2);
  border: 1px solid var(--border);
  border-radius: 50%;
  pointer-events: none;
}

/* The gate: the place on the wheel the open stop left for the stage, the same
   shape as the covers either side of it. It holds a pip for each of the open
   stop's frames (on a phone, one for each stop). */
.o-gate {
  position: absolute;
  left: var(--cx);
  top: calc(var(--cy) - var(--r));
  width: var(--thumb);
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  pointer-events: none;
}

.o-gate i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: background var(--t-base) var(--ease);
}

.o-gate i.is-on {
  background: var(--text);
}

/* The page lets the work say what I do. The sentence stays as its heading for
   screen readers and search, out of sight. */
.o-hub h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The name under each cover on the wheel. Together they are the orbit's
   navigation: the work, then Photography and About. */
.o-tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.o-tag {
  position: absolute;
  left: 0;
  top: 0;
  padding: 5px 8px;
  border: 0;
  background: none;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--text-muted);
  cursor: pointer;
  pointer-events: auto;
  will-change: transform, opacity;
  transition: color var(--t-quick) var(--ease);
}

.o-tag:hover {
  color: var(--text);
}

/* ---- Frames ----
   Each frame is laid out once at its largest size and only ever moved and
   scaled after that, so nothing reflows while it travels. --e is one over its
   scale, stepped: it keeps the hairline edge a hairline and the corners
   proportionate however small the frame is drawn. */

.o-frames {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.o-frame {
  --e: 1;
  position: absolute;
  left: 0;
  top: 0;
  padding: 0;
  border: 0;
  border-radius: calc(6px + 3px * var(--e));
  background: var(--bg-alt);
  box-shadow: 0 0 0 calc(1px * var(--e)) var(--edge), var(--lift);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  transition: scale var(--t-quick) var(--ease);
  pointer-events: auto;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.o-frame:active {
  scale: 0.985;
}

/* A card that opens nothing is not something to press. */
.o-frame.is-still {
  cursor: default;
  scale: 1;
}

/* The strip's window (site.js sets the mask itself). The mask reaches past
   the frame's sides and is not clipped to its box, so a frame keeps its edge
   and shadow while it fades. */
.o-frame {
  -webkit-mask-size: calc(100% + 240px) 100%;
  mask-size: calc(100% + 240px) 100%;
  -webkit-mask-position: -120px 0;
  mask-position: -120px 0;
  -webkit-mask-repeat: repeat-y;
  mask-repeat: repeat-y;
  -webkit-mask-clip: no-clip;
  mask-clip: no-clip;
}

.is-dragging .o-frame {
  scale: 1;
}

.o-frame:focus-visible {
  outline: calc(2px * var(--e)) solid var(--text);
  outline-offset: calc(3px * var(--e));
  border-radius: calc(6px + 3px * var(--e));
}

/* The picture never changes size inside its frame; the frame is a 16:9 window
   onto it that can open to the whole picture. --oy is where the window sits. */
.o-frame img {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--bw);
  height: var(--bh);
  max-width: none;
  transform: translate(-50%, var(--oy, 0px)) scale(var(--k, 1));
  transform-origin: 50% 0;
  object-fit: cover;
  object-position: top center;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Frames drawn live. Sized in ems of the frame's width, so the same drawing
   serves the wheel, the index and the strip. Their colours are Snapbar's own
   in either theme, like any capture. */
.lv {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--bw);
  height: var(--bh);
  transform: translateX(-50%);
  font-size: calc(var(--bw) / 40);
  background: #fff;
  color: #0a0a0a;
  pointer-events: none;
}

.lv-palette {
  display: flex;
}

.lv-palette span {
  flex: var(--w);
  background: var(--c);
}

.lv-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 1.1em;
  padding: 0 4em;
}

.lv-icons i {
  display: grid;
  place-items: center;
  width: 5.4em;
  height: 5.4em;
  border-radius: 1.5em;
  background: #f4efff;
}

.o-frame .lv-icons img {
  position: static;
  width: 2.8em;
  height: 2.8em;
  transform: none;
}

.lv-agent {
  display: grid;
  grid-template-columns: repeat(4, auto);
  place-content: center;
  gap: 2.8em 3.6em;
  background: #f8fafb;
  list-style: none;
}

.lv-agent .agent-state svg {
  width: 5em;
  height: 5em;
}

/* Each state's name under it, quiet, so the motion leads. */
.agent-state {
  gap: 0.375rem;
}

.agent-name {
  font: 500 0.75rem/1 var(--font);
  color: rgb(10 10 10 / 0.55);
}

.lv-agent {
  row-gap: 2em;
}

.lv-agent .agent-state {
  gap: 0.6em;
}

.lv-agent .agent-name {
  font-size: 1.15em;
}

/* About is words, not a picture. On the wheel they sit on a card, like any
   cover; on the stage the card falls away and they stand on the page itself,
   at reading size. */
.o-frame.is-plain {
  overflow: visible;
  background: var(--ground, var(--bg-alt));
  transition: scale var(--t-quick) var(--ease), background-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.o-frame.is-plain.is-open {
  background: transparent;
  box-shadow: none;
}

.lv-about {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1em;
  padding: 0 8%;
  border-radius: inherit;
  background: var(--surface);
  color: var(--text);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  text-align: center;
  transition: background-color var(--t-base) var(--ease);
}

.is-open .lv-about {
  background: transparent;
}

.lv-about p {
  margin: 0;
  max-width: 34em;
  font-size: 1em;
  line-height: 1.55;
  text-wrap: balance;
}

.lv-about p + p {
  color: var(--text-secondary);
}

/* Several phone screens as one step. In the strip they stand free, each its
   own screen, and the tile that held them falls away. In the index they share
   that tile, pulled back to fit by the same --k and --oy a capture uses. */
.lv-phones {
  display: flex;
  justify-content: space-between;
  background: none;
  transform: translate(-50%, var(--oy, 0px)) scale(var(--k, 1));
  transform-origin: 50% 0;
}

.o-frame .lv-phones img {
  position: static;
  width: auto;
  height: 100%;
  transform: none;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--edge);
  transition: box-shadow var(--t-base) var(--ease);
}

.o-frame.is-open .lv-phones img {
  box-shadow: 0 0 0 1px var(--edge), var(--lift);
}

/* The agent only moves while its project is open. */
.o-frame:not(.is-open) .lv-agent * {
  animation-play-state: paused !important;
}

/* The full frame arrives over its small version, into the same box. */
.o-frame .hi {
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}

.o-frame .hi.in {
  opacity: 1;
}

/* ---- The project at rest ---- */

.o-detail {
  position: absolute;
  left: var(--dx);
  top: var(--dy);
  width: var(--dw);
  -webkit-user-select: text;
  user-select: text;
}

.o-title {
  margin: 0;
  font-size: clamp(1.25rem, 1.05rem + 0.5vw, 1.625rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.o-outcome {
  margin: 0.5em 0 0;
  max-width: 44ch;
  font-size: 0.9375rem;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.o-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-quick) var(--ease), opacity var(--t-quick) var(--ease);
}

.btn:hover {
  opacity: 0.86;
}

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

.o-link,
.sheet-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline dashed var(--text-faint);
  text-underline-offset: 5px;
  transition: color var(--t-quick) var(--ease);
}

.o-link:hover,
.sheet-link:hover {
  color: var(--text);
}

/* The small arrow says this one leaves the site. */
.o-link::after,
.sheet-link::after {
  content: '';
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(1px);
}

.o-link:empty {
  display: none;
}

/* Which frame this is, and of how many. */
.o-count {
  position: absolute;
  left: var(--dx);
  top: var(--dy);
  width: var(--dw);
  margin: 0;
  max-width: none;
  padding-top: 0.35em;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: var(--text-muted);
  pointer-events: none;
}

.o-num,
.o-keys i {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

/* On a wide screen the stop's name stands over its frames and its words
   under them, all on the wheel's axis. --hy is where the name ends and the
   count under it begins; site.js sets it so the pair sits midway between the
   names on the wheel and the frames. */
@media (min-width: 1025px), (min-width: 761px) and (orientation: landscape) {
  .o-detail {
    text-align: center;
  }

  .o-title {
    position: absolute;
    left: 50%;
    bottom: calc(100% + var(--dy) - var(--hy) - 6px);
    transform: translateX(-50%);
    font-size: clamp(1.375rem, 1rem + 1.1vw, 2rem);
    white-space: nowrap;
  }

  .o-count {
    left: 0;
    right: 0;
    top: calc(var(--hy) + 12px);
    width: auto;
    padding-top: 0;
    justify-content: center;
  }

  /* Two lines held whether or not they are used, so the buttons keep their place. */
  .o-outcome {
    max-width: 60ch;
    min-height: 2.9em;
    margin: 0 auto;
    text-wrap: balance;
  }

  .o-actions {
    justify-content: center;
    margin-top: 14px;
  }
}

/* ---- Index ---- */

.o-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Quick look: the index dims and one frame stands in front of it, named. */
.o-veil {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  opacity: 0;
  pointer-events: auto;
  cursor: zoom-out;
}

.o-stage[data-view='index'] .o-frame {
  cursor: zoom-in;
}

.o-stage[data-view='index'] .o-frame.is-looked {
  cursor: zoom-out;
}

/* At rest the large frame is redrawn at its real size, so it is sharp. */
.o-frame.is-looked {
  will-change: auto;
}

/* In a quick look the large frame is plainly the thing in focus; a ring round
   it would only frame the picture twice. */
.o-stage[data-look] .o-frame:focus-visible {
  outline: none;
}

.o-look {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--look-y);
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

.o-look p {
  margin: 0;
  max-width: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--text-secondary);
}

.o-look strong {
  font-weight: 600;
  color: var(--text);
}

.o-look i {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.o-look .o-more {
  pointer-events: auto;
}

/* A row lights up under the pointer: the whole of it opens the project. */
.o-rows {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.o-row {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 16px;
  background: var(--bg-alt);
  box-shadow: 0 0 0 1px var(--border);
  opacity: 0;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity var(--t-quick) var(--ease);
}

.o-row.is-hot {
  opacity: 1;
}

.o-label {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
}

.o-label strong {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}

.o-label span {
  margin-top: 0.3em;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* A shorter row gives the line between one line; a very short one drops it. */
.o-label.is-snug span {
  -webkit-line-clamp: 1;
}

.o-label.is-tight span {
  display: none;
}

.o-label p {
  margin: 0.5em 0 0;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 14px;
  line-height: 1;
}

.o-more,
.o-label .o-link {
  min-height: 26px;
  font-size: 0.8125rem;
}

.o-more {
  padding: 0;
  border: 0;
  background: none;
  font-weight: 500;
  color: var(--text);
  text-decoration: underline dashed var(--text-faint);
  text-underline-offset: 5px;
  cursor: pointer;
  transition: text-decoration-color var(--t-quick) var(--ease);
}

.o-more:hover,
.o-row.is-hot + * .o-more {
  text-decoration-color: currentColor;
}

/* ---- Dock ---- */

.o-dock {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.o-dock > * {
  pointer-events: auto;
}

/* On a wide screen the two views live in the bar; only the key hints stay here. */
.o-dock {
  justify-content: flex-end;
}

.o-dock .seg {
  display: none;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
}

.seg button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--t-quick) var(--ease), background-color var(--t-quick) var(--ease), box-shadow var(--t-quick) var(--ease);
}

.seg button:hover {
  color: var(--text);
}

.seg button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / 0.06);
}

.o-keys {
  margin: 0;
  max-width: none;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: opacity var(--t-quick) var(--ease);
}

.o-keys span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.o-keys kbd:last-of-type {
  margin-right: 4px;
}

.o-stage[data-view='index'] .o-keys,
.is-sheet .o-keys {
  opacity: 0;
}

/* No keys to hint at on a touch screen, and no room beside the words in a
   narrow window. */
@media (hover: none), (max-width: 999px) {
  .o-keys {
    display: none;
  }
}

/* While a project is open the stage's words step back first. */
.o-dock {
  transition: opacity var(--t-quick) var(--ease);
}

.is-sheet .o-dock {
  opacity: 0;
  pointer-events: none;
}

/* ---- Sheet: a project, opened ---- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
}

.sheet[hidden] {
  display: none;
}

.sheet.is-leaving {
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}

.sheet-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-top: var(--top-h);
  outline: none;
}

.sheet-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px clamp(20px, 4vw, 48px) 72px;
}

.sheet-bar {
  position: sticky;
  top: 12px;
  z-index: 5;
  height: 0;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.sheet-close {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--veil);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--t-quick) var(--ease), border-color var(--t-quick) var(--ease), transform var(--t-quick) var(--ease);
}

.sheet-close:hover {
  color: var(--text);
  border-color: var(--text-faint);
}

.sheet-close:active {
  transform: scale(0.97);
}

.sheet-head {
  padding-top: clamp(20px, 5vh, 56px);
  max-width: 820px;
}

.sheet-head h1 {
  margin: 0;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
}

.sheet-outcome {
  margin: 0.7em 0 0;
  max-width: 36ch;
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.375rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
}

.sheet-body {
  margin: 1.1em 0 0;
  max-width: 62ch;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.sheet-body:empty {
  display: none;
}

.sheet-link {
  margin-top: 10px;
}

.sheet-link:empty {
  display: none;
}

.sheet-hero {
  margin-top: clamp(24px, 5vh, 44px);
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--bg-alt);
  overflow: hidden;
}

.sheet-hero img {
  display: block;
  object-fit: cover;
  object-position: top center;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(72vh, 760px);
}

.sheet-hero[hidden] {
  display: none;
}

.sheet-hero.is-tall {
  padding: clamp(20px, 4vh, 44px);
}

.sheet-hero.is-tall img {
  max-height: min(64vh, 680px);
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--edge), var(--lift);
}

/* The sheet's words and case file come in after the cover has started to move,
   and leave before it travels back. */
.sheet-head,
.sheet-hero,
.sheet-cases,
.sheet-foot,
.sheet-bar {
  opacity: 0;
  transition: opacity var(--t-quick) var(--ease);
}

.sheet.is-in .sheet-head,
.sheet.is-in .sheet-hero,
.sheet.is-in .sheet-cases,
.sheet.is-in .sheet-foot,
.sheet.is-in .sheet-bar {
  opacity: 1;
  transition: opacity var(--t-base) var(--ease) var(--t-quick);
}

.sheet-hero img {
  visibility: hidden;
}

.sheet.is-landed .sheet-hero img {
  visibility: visible;
}

/* The case files were built to unfold under a card. Here they are simply open. */
.sheet-case {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: auto;
}

.sheet-case[hidden] {
  display: none;
}

.sheet-case::before {
  content: none;
}

.sheet-case .case-body {
  height: auto;
  overflow: visible;
}

.sheet-case .case-body > div {
  padding-top: 0;
}

.sheet-case .case-inner {
  margin-top: clamp(28px, 6vh, 56px);
}

.sheet-foot {
  margin-top: 96px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.sheet-next {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.sheet-next span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.sheet-next strong {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
  text-decoration: underline transparent;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  transition: text-decoration-color var(--t-quick) var(--ease);
}

/* Hover only where there is a pointer to hover with: on a touch screen a tap
   would leave the underline on into the next project. */
@media (hover: hover) and (pointer: fine) {
  .sheet-next:hover strong {
    text-decoration-color: currentColor;
  }
}

.sheet-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.sheet-meta p {
  margin: 0;
  max-width: none;
  font-size: inherit;
  line-height: 1.6;
  color: inherit;
}

.sheet-meta a {
  margin-right: 14px;
  color: var(--text-secondary);
  text-decoration: underline dashed var(--text-faint);
  text-underline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .sheet-meta a:hover {
    color: var(--text);
  }
}

.noscript {
  position: fixed;
  inset: var(--top-h) 0 0 0;
  padding: 48px var(--gutter);
  background: var(--bg);
  z-index: 70;
}

/* ---- Phones ----
   The ring becomes a dial under the thumb and the strip takes the width. */

@media (max-width: 760px) {
  :root {
    --top-h: 56px;
    --gutter: 20px;
  }

  .top-nav {
    --nav-gap: 18px;
  }

  .top-brand span {
    display: none;
  }
}

@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) {
  /* On a phone the About words start at the margin, like everything else,
     and take the column's width rather than the picture's. */
  .lv-about {
    width: calc(100vw - var(--gutter) * 2);
    align-items: flex-start;
    padding: 0;
    font-size: 0.875rem;
    text-align: left;
  }

  .lv-about p {
    max-width: none;
    line-height: 1.45;
    text-wrap: pretty;
  }

  /* A phone keeps the sections in the bar, so its covers go unnamed. */
  .o-tags {
    display: none;
  }

  /* The slot is smaller on a phone's dial, and counts the stops. */
  .o-gate {
    gap: 4px;
  }

  .o-gate i {
    width: 4px;
    height: 4px;
  }

  /* The stop's name sits under its picture, with its caption above it and
     what it did below. One line, so the words under it keep their place. */
  .o-title {
    overflow: hidden;
    font-size: 1.0625rem;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  /* Two lines held whether or not they are used, so the buttons keep their place. */
  .o-outcome {
    min-height: 2.9em;
    margin-top: 3px;
    font-size: 0.875rem;
  }

  .o-actions {
    margin-top: 12px;
  }

  /* Thumb-sized targets: the buttons grow, and the small ones take a larger
     area than they draw. */
  .o-actions .btn,
  .o-actions .o-link {
    min-height: 44px;
  }

  .top-brand {
    min-width: 44px;
  }

  .seg button {
    position: relative;
  }

  .seg button::after {
    content: '';
    position: absolute;
    inset: -8px 0;
  }

  .o-count {
    justify-content: space-between;
    padding-top: 0;
  }

  .o-detail {
    top: calc(var(--dy) + 26px);
  }

  .o-dock {
    justify-content: center;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .o-dock .seg {
    display: inline-flex;
  }

  .sheet-foot {
    margin-top: 64px;
  }
}

/* The narrowest phones: the bar tightens to fit, the outcome may run to a
   third line, and the link out waits on the project's own page. */
@media (max-width: 349px) {
  .top-nav {
    --nav-gap: 12px;
  }

  .top-nav a {
    font-size: 0.8125rem;
  }

  .o-outcome {
    min-height: 4.35em;
  }

  .o-actions .o-link {
    display: none;
  }
}

/* ---- The platform's design system ----
   Its own components, drawn live. The buttons, field, badges, current nav
   item and shadows take the values measured from the dashboard's gallery
   (/admin/design-system, from theme.css and @kit/ui), so a button hovers and
   presses and a field focuses as it does in the product; the corners card
   is put together from its radius scale and tokens. Two departures: labels
   are in this site's face (the product's Mark Pro isn't ours to ship), and
   the error line is red-600, a step darker than the product's red-500, so
   12px text passes AA. Like the brand board, the colours and shapes are
   Snapbar's, not this site's. Here, not in v2.css, because the grid page
   layers v2.css under the plain `button` rule above. */

.ds-board {
  --ds-indigo: #4c00ff;
  --ds-indigo-dark: #3a00c4;
  --ds-indigo-50: #f4efff;
  --ds-indigo-100: #ede6ff;
  --ds-ink: #0a0a0a;
  --ds-muted: rgb(10 10 10 / 0.6);
  --ds-gray: #f5f5f7;
  --ds-snow: #f8fafb;
  --ds-hair: #d1d5db;
  --ds-red: #ef4444;
  --ds-ease: 150ms cubic-bezier(0, 0, 0.2, 1);
  /* card-shadow-sm to -xl: a hairline ring, then soft layers added a step at a time */
  --ds-sm: 0 0 0 1px rgb(229 231 235), 0 1px 2px rgb(10 10 10 / 0.04);
  --ds-md: 0 0 0 1px rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.06), 0 2px 4px rgb(0 0 0 / 0.04), 0 4px 8px rgb(0 0 0 / 0.03);
  --ds-lg: var(--ds-md), 0 8px 16px rgb(0 0 0 / 0.03);
  --ds-xl: var(--ds-lg), 0 16px 32px rgb(0 0 0 / 0.02);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

/* Each specimen is two rows of the board, its tile and its caption, so the
   tiles side by side share one height however their captions wrap. The
   space between specimens is the caption's own, so no gap moves a line. */
.ds-spec {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 0;
  min-width: 0;
  margin: 0;
}

.ds-spec--wide {
  grid-column: 1 / -1;
}

/* Each tile centres what it holds. A pair are 16:9, as the screens below
   them, and grow if what they hold needs it. */
.ds-tile {
  align-self: stretch;
  width: 100%;   /* not from the ratio when a taller neighbour stretches it */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  align-content: center;
  padding: 1.5rem;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ds-ink);
  font-size: 14px;
  line-height: 1.4;
}

/* A specimen that isn't wide is at least 16:9. The shape is held by a strut
   in the tile's own cell, not an aspect-ratio on the tile: a tile has to grow
   with what it holds in every engine, and Safari keeps a ratio it is given. */
.ds-spec:not(.ds-spec--wide)::before {
  content: '';
  grid-area: 1 / 1;
  padding-top: 56.25%;
  pointer-events: none;
}

.ds-spec > .ds-tile { grid-area: 1 / 1; }
.ds-spec > figcaption { grid-area: 2 / 1; }

.ds-tile--canvas {
  background: var(--ds-snow);
}

.ds-spec figcaption {
  margin: 0.5rem 0 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--text-muted);
}

/* Buttons: eight variants in the product; the six a dashboard page uses. */
.ds-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 8.5rem;
}

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ds-ink);
  font: 500 14px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--ds-ease), text-decoration-color var(--ds-ease), box-shadow var(--ds-ease), transform var(--ds-ease);
}

.ds-btn:focus-visible {
  outline: none;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ds-indigo);
}

.ds-btn:active {
  transform: scale(0.97);
}

.ds-btn--primary { background: var(--ds-indigo); color: #fff; }
.ds-btn--secondary { background: var(--ds-gray); }
.ds-btn--outline { border: 1px solid rgb(209 213 219 / 0.5); background: #fff; }
.ds-btn--destructive { background: var(--ds-red); color: #fff; }

.ds-btn--link {
  color: var(--ds-indigo);
  text-decoration: underline;
  text-decoration-color: rgb(76 0 255 / 0.4);
  text-underline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .ds-btn--primary:hover { background: var(--ds-indigo-dark); }
  .ds-btn--secondary:hover { background: rgb(245 245 247 / 0.8); }
  .ds-btn--outline:hover,
  .ds-btn--ghost:hover { background: var(--ds-gray); }
  .ds-btn--link:hover { text-decoration-color: var(--ds-indigo); }
  .ds-btn--destructive:hover { background: rgb(239 68 68 / 0.9); }
}

/* Fields: a grey hairline at rest, mid grey on hover, indigo with a pale
   ring on focus. 16px type on a phone so iOS never zooms, 14px from 768. */
.ds-form {
  place-items: stretch;
  gap: 1rem;
}

/* The form and the navigation beside it keep one measure, centred in their tiles. */
.ds-form > * {
  width: 100%;
  max-width: 20rem;
  justify-self: center;
}

/* The switch a form ends on, under a hairline, as wide as its fields. */
.ds-form .ds-switch {
  max-width: 20rem;
  height: auto;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f2;
}

.ds-field {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.ds-field > span {
  font-weight: 500;
}

.ds-input {
  width: 100%;
  height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--ds-hair);
  border-radius: 999px;
  background: #fff;
  color: var(--ds-ink);
  font: 16px var(--font);
  transition: border-color var(--ds-ease), box-shadow var(--ds-ease);
}

.ds-input::placeholder {
  color: var(--ds-muted);
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .ds-input:hover { border-color: #9ca3af; }
}

.ds-input:focus {
  outline: none;
  border-color: var(--ds-indigo);
  box-shadow: 0 0 0 3px var(--ds-indigo-100);
}

.ds-input--error,
.ds-input--error:hover,
.ds-input--error:focus {
  border-color: var(--ds-red);
}

.ds-input--error:focus {
  box-shadow: 0 0 0 3px rgb(239 68 68 / 0.15);
}

.ds-field small {
  font-size: 12px;
  color: #dc2626;
}

@media (min-width: 768px) {
  .ds-input { font-size: 14px; }
}

/* Colour as wayfinding: an indigo fill for the current place, a coral dot
   only for live, sun yellow only for New. The words all stay ink. */
/* Where you are: the tabs of a view over the list that leads to it. */
.ds-way {
  place-items: center;
  gap: 1.25rem;
}

.ds-nav {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.ds-nav button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 2.25rem;
  padding: 0 0.875rem;
  border: 0;
  border-radius: 999px;
  background: none;
  font: 500 14px/1.4 var(--font);
  color: var(--ds-ink);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--ds-ease), box-shadow var(--ds-ease);
}

@media (hover: hover) and (pointer: fine) {
  .ds-nav button:hover { background: var(--ds-gray); }
}

.ds-nav button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ds-indigo);
}

.ds-nav [aria-current],
.ds-nav [aria-current]:hover {
  background: var(--ds-indigo-50);
}

.ds-live,
.ds-new {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
}

.ds-live {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--ds-muted);
}

.ds-live::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6a3d;
}

.ds-new {
  padding: 2px 10px;
  border-radius: 999px;
  background: #ffc400;
  color: var(--ds-ink);
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Corners step up with the surface: a 28px card, 20px choices inside it, a
   round control. */
.ds-card {
  display: grid;
  gap: 0.75rem;
  width: 100%;
  max-width: 17rem;
  padding: 1rem;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--ds-sm);
}

.ds-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.ds-choice,
.ds-pill {
  display: grid;
  place-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ds-ink);
  font: 500 13px/1 var(--font);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--ds-ease), border-color var(--ds-ease), box-shadow var(--ds-ease), transform var(--ds-ease);
}

/* Pressed, a control gives a little: the same 0.97 as the buttons. */
.ds-choice:active,
.ds-pill:active {
  transform: scale(0.97);
}

.ds-choice:focus-visible,
.ds-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ds-indigo);
}

.ds-choice {
  height: 3.5rem;
  border: 1px solid var(--ds-hair);
  border-radius: 20px;
}

.ds-choice[aria-pressed='true'] {
  border-color: var(--ds-indigo);
  background: var(--ds-indigo-50);
}

.ds-pill {
  height: 2.25rem;
  border-radius: 999px;
  background: var(--ds-indigo);
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .ds-choice[aria-pressed='false']:hover { border-color: #9ca3af; background: #fafafa; }
  .ds-pill:hover { background: var(--ds-indigo-dark); }
}

/* Surfaces: the corners card beside the four steps of shadow, on the gray
   canvas, no borders. */
.ds-surfaces {
  grid-template-columns: minmax(0, 17rem) minmax(0, 20rem);
  justify-content: center;
  gap: 1.5rem 3rem;
  padding-block: 2rem;
}

.ds-depth {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

.ds-lift {
  display: grid;
  place-items: center;
  height: 3rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--lift);
  font-size: 12px;
  color: var(--ds-muted);
}

/* Tabs: white on the muted pill, from @kit/ui tabs (h-10, p-1, rounded-full).
   One thing is this page's own: the product's white pill fades from tab to
   tab, and here it slides (play.js places it; without a script the chosen
   tab simply wears it). */
.ds-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 4px;
  border-radius: 999px;
  background: var(--ds-gray);
}

.ds-tabs button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 0.875rem;
  border: 0;
  border-radius: 999px;
  background: none;
  font: 500 14px/1 var(--font);
  color: var(--ds-muted);
  cursor: pointer;
  transition: background-color var(--ds-ease), color var(--ds-ease), box-shadow var(--ds-ease);
}

.ds-tabs button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ds-indigo);
}

@media (hover: hover) and (pointer: fine) {
  .ds-tabs button:hover { color: var(--ds-ink); }
}

.ds-tabs [aria-pressed='true'] {
  background: #fff;
  color: var(--ds-ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.ds-tabs.is-live [aria-pressed='true'] {
  background: none;
  box-shadow: none;
}

/* The pill itself: moved and resized by transform and width only, on a curve
   that leaves quickly and settles without a bounce. */
.ds-tabs-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--w, 0);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  transform: translateX(var(--x, 0));
  transition: transform 260ms cubic-bezier(0.32, 0.72, 0, 1), width 260ms cubic-bezier(0.32, 0.72, 0, 1), scale var(--ds-ease);
  pointer-events: none;
}

/* Held down, the pill draws in a touch, as the buttons do. */
.ds-tabs:active .ds-tabs-thumb {
  scale: 0.97;
}

/* Switches: the theme's primary (black) when on, the input gray when off
   (@kit/ui switch, 36×20). */
.ds-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 16rem;
  height: 2.5rem;
  margin: 0 auto;
  font-weight: 500;
  cursor: pointer;
}

.ds-switch + .ds-switch {
  border-top: 1px solid #f0f0f2;
}

.ds-switch input {
  appearance: none;
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  margin: 0;
  border-radius: 999px;
  background: var(--ds-hair);
  cursor: pointer;
  transition: background-color var(--ds-ease);
}

.ds-switch input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.15);
  transition: transform var(--ds-ease);
}

.ds-switch input:checked {
  background: #000;
}

.ds-switch input:checked::after {
  transform: translateX(16px);
}

.ds-switch input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ds-indigo);
}

/* The eight rules: a number, the rule in ink, the reason in the label tone. */
.ds-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: rule;
}

.ds-rules li {
  counter-increment: rule;
  padding-top: 0.75rem;
  border-top: 0.5px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.ds-rules li::before {
  content: counter(rule);
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.ds-rules b {
  font-weight: 500;
  color: var(--text);
}

@media (max-width: 639px) {
  .ds-board,
  .ds-rules {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 639px) {
  .ds-surfaces { grid-template-columns: minmax(0, 1fr); }
  .ds-surfaces .ds-card { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ds-btn,
  .ds-input,
  .ds-choice,
  .ds-pill,
  .ds-tabs-thumb,
  .ds-switch input,
  .ds-switch input::after {
    transition: none;
  }

  .ds-btn:active,
  .ds-choice:active,
  .ds-pill:active {
    transform: none;
  }

  .ds-tabs:active .ds-tabs-thumb {
    scale: none;
  }
}

/* ---- Brand systems ----
   Palettes and component boards for each project, drawn live (systems.js and
   the case files). A palette is a mosaic sized by how much of a page each
   colour takes; each swatch names itself in its own legible ink. */

.pal {
  display: grid;
  width: 100%;
  height: 100%;
  font: 500 0.6875rem/1.25 var(--font);
}

.pal > span {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.125rem;
  min-width: 0;
  padding: 0.625rem 0.75rem;
  overflow: hidden;
  background: var(--c);
  color: var(--on, #0a0a0a);
}

.pal b {
  font-weight: 500;
  white-space: nowrap;
}

.pal i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

/* Each product's own faces are declared in assets/systems/fonts.css, brought
   in from the products by scripts/vendor-systems.py. */

/* A coded palette or specimen standing in a case file's strip of pictures,
   with the pictures' own shape and edge. */
.case-live {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  container-type: inline-size;
}

.case-live > * {
  font-size: clamp(6px, 2.4cqi, 11px);
}

.case-live--tall { aspect-ratio: 1080 / 1350; }

/* The boards for Drift, Peak Season and Dungym: the platform's tiles, each
   in its product's own ground, holding the same components the grid draws.
   The components are in ems of about a pixel's tenth, so 1em is 10px here
   and 2.5% of a tile's width on the grid. */
.sys .ds-tile {
  container-type: inline-size;
  overflow: hidden;
}

/* What a tile holds is sized from the tile's own width, as on the grid, so
   it sits the same in a narrow tile as a wide one and never runs past it. */
.sys .ds-tile > * {
  font-size: clamp(6px, 2.5cqi, 11.5px);
}

.sys .ds-spec--wide .ds-tile > * {
  font-size: clamp(6px, 1.75cqi, 11.5px);
}

/* A type scale: one row a role, the line set as the product sets it, the
   face named quietly at the far edge, a hairline between rows. */
.type {
  display: grid;
  align-content: center;
  width: 100%;
  height: 100%;
  padding: 1.2em 3em;
  background: var(--tg, #fff);
  color: var(--tc, #0a0a0a);
}

.type > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2em;
  min-width: 0;
  padding: 1.5em 0;
}

.type > span + span {
  border-top: 1px solid var(--tl, rgb(0 0 0 / 0.1));
}

.type b {
  min-width: 0;
  font-weight: inherit;
  line-height: 1.1;
}

.type i {
  flex: none;
  font: 500 1em/1 var(--tm, var(--font-mono));
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--tc);
  opacity: 0.75;
  white-space: nowrap;
}

.case-live--auto { aspect-ratio: auto; }

/* A strip that swipes keeps one height: a tall slide is narrower there, never
   taller, so the strip's dots and what follows stay where they are. */
@media (max-width: 768px) {
  .case-frames--web { --slide-h: calc((100vw - 2rem) * 0.625); }
  .case-frames--web > .case-frame:has(> .case-live--tall),
  .case-frames--web > .case-frame:has(> img[height='1350']) { flex: 0 0 calc(var(--slide-h) * 0.8); }
  .case-frames--web > .case-frame > img[height='1350'],
  .case-frames--web .case-live--tall,
  .case-frames--web .case-live--auto { height: var(--slide-h); aspect-ratio: auto; }
  .case-frames--web .case-live--auto .type { padding: 0.2em 1.8em; }
  .case-frames--web .case-live--auto .type > span { gap: 0.35em; padding: 0.8em 0; }
}

/* ---- The grid's compositions ----
   One layout for every project's tile: the same margin all round, two rows
   whose pieces share left and right edges, the block centred in the tile,
   and every piece whole inside it. Sizes are ems of 2.5% of the tile's width
   (40em across, 22.5em down), so a tile reads the same at any size. */
.ix-pic [class*='lv-sys-'] {
  display: grid;
  align-content: center;
  gap: 1.4em;
  padding: 2.6em 3.2em;
  overflow: hidden;
}

.ix-pic [class*='lv-sys-'] > * {
  min-width: 0;
}

/* ---- The platform ---- */
.lv-sys-platform {
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  background: #f8fafb;
  color: #0a0a0a;
  font-family: var(--font);
}

.sp-card {
  border-radius: 2em;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(229 231 235), 0 1px 2px rgb(10 10 10 / 0.04);
}

.sp-nav {
  display: grid;
  gap: 0.2em;
  padding: 0.8em;
}

.sp-nav > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  height: 2.6em;
  padding: 0 0.9em;
  border-radius: 99em;
  font-size: 1.2em;
  font-weight: 500;
  white-space: nowrap;
}

.sp-nav .is-on { background: #f4efff; }

.sp-live,
.sp-new {
  font-style: normal;
  font-size: 0.8em;
  font-weight: 500;
}

.sp-live { display: inline-flex; align-items: center; gap: 0.45em; color: rgb(10 10 10 / 0.6); }
.sp-live::before { content: ''; width: 0.6em; height: 0.6em; border-radius: 50%; background: #ff6a3d; }
.sp-new { padding: 0.2em 0.7em; border-radius: 99em; background: #ffc400; text-transform: uppercase; letter-spacing: 0.03em; }

/* Tabs close over the switch they sit with, on the canvas itself, centred
   against the nav. */
.sp-ctl {
  display: grid;
  align-content: center;
  gap: 1.3em;
  min-width: 0;
}

.sp-tabs {
  display: flex;
  height: 3.2em;
  padding: 0.3em;
  border-radius: 99em;
  background: #f5f5f7;
}

.sp-tabs > span {
  flex: 1;
  display: grid;
  place-items: center;
  border-radius: 99em;
  font-size: 1.08em;
  font-weight: 500;
  color: rgb(10 10 10 / 0.6);
}

.sp-tabs .is-on {
  background: #fff;
  color: #0a0a0a;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}

.sp-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
  padding: 0 0.5em;
  font-size: 1.12em;
  font-weight: 500;
  white-space: nowrap;
}

.sp-switch i {
  position: relative;
  flex: none;
  width: 2.5em;
  height: 1.4em;
  border-radius: 99em;
  background: #d1d5db;
}

.sp-switch i::after {
  content: '';
  position: absolute;
  top: 0.15em;
  left: 0.15em;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0.1em 0.3em rgb(0 0 0 / 0.15);
}

.sp-switch i.is-on { background: #000; }
.sp-switch i.is-on::after { transform: translateX(1.1em); }

/* Under them, across both: a field holding its value, taking the room the
   action leaves, the two one height. */
.sp-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1.4em;
  min-width: 0;
}

.sp-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.9em;
  min-width: 0;
  height: 3em;
  padding: 0 1.3em;
  border-radius: 99em;
  background: #fff;
  box-shadow: inset 0 0 0 1px #d1d5db;
  font-size: 1.2em;
  font-weight: 500;
  white-space: nowrap;
}

.sp-field small {
  font-size: 0.86em;
  font-weight: 400;
  color: rgb(10 10 10 / 0.6);
}

.sp-btn {
  display: grid;
  place-items: center;
  height: 3em;
  padding: 0 1.5em;
  border-radius: 99em;
  font-size: 1.2em;
  font-weight: 500;
  white-space: nowrap;
}

.sp-btn--primary { background: #4c00ff; color: #fff; }

/* ---- Drift Through Space (space-viz explorer/style.css) ----
   The void, warm white ink at three strengths, hairlines of the same ink,
   amber only for what is live or chosen; Geist and Geist Mono, 4px corners. */
.sys--drift,
.lv-sys-drift {
  --dv: #020307;
  --di: 245 240 230;
  --da: 255 176 96;
  --dm: 'Geist Mono', ui-monospace, monospace;
}

.sys--drift .ds-tile { background: var(--dv); color: rgb(var(--di)); }

/* The viewfinder glass: a hairline box with corner brackets. */
.sd-hud,
.sd-tabs,
.sd-focus {
  --br: rgb(var(--di) / 0.3);
  position: relative;
  border: 1px solid rgb(var(--di) / 0.12);
  border-radius: 0.4em;
  background:
    linear-gradient(var(--br), var(--br)) 0 0 / 0.8em 1px,
    linear-gradient(var(--br), var(--br)) 0 0 / 1px 0.8em,
    linear-gradient(var(--br), var(--br)) 100% 0 / 0.8em 1px,
    linear-gradient(var(--br), var(--br)) 100% 0 / 1px 0.8em,
    linear-gradient(var(--br), var(--br)) 0 100% / 0.8em 1px,
    linear-gradient(var(--br), var(--br)) 0 100% / 1px 0.8em,
    linear-gradient(var(--br), var(--br)) 100% 100% / 0.8em 1px,
    linear-gradient(var(--br), var(--br)) 100% 100% / 1px 0.8em,
    rgb(2 3 7 / 0.3);
  background-repeat: no-repeat;
}

.sd-hud {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 4.6em;
}

.sd-place,
.sd-date {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0 1.4em;
}

.sd-place { flex: 1; }

.sd-place i {
  width: 0.55em;
  height: 0.55em;
  background: rgb(var(--da));
  box-shadow: 0 0 1em rgb(var(--da) / 0.45);
  transform: rotate(45deg);
}

.sd-place > span,
.sd-date {
  display: grid;
  gap: 0.25em;
}

.sd-date { justify-items: end; align-content: center; }

.sd-place b,
.sd-date b {
  font: 500 1.2em/1 var(--dm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sd-date b { font-weight: 400; letter-spacing: 0.04em; }

.sd-place small,
.sd-date small {
  font: 400 1em/1 var(--dm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(var(--di) / 0.62);
  white-space: nowrap;
}

.sd-date small { color: rgb(var(--da)); letter-spacing: 0.08em; }

.sd-play {
  position: relative;
  width: 4.8em;
  box-shadow: inset 1px 0 rgb(var(--di) / 0.1);
}

.sd-play::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0.9em;
  height: 1em;
  background: rgb(var(--di) / 0.8);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.sd-tabs {
  display: grid;
  align-self: stretch;
  overflow: hidden;
}

.sd-focus {
  --br: rgb(var(--da) / 0.85);
  display: grid;
  width: 100%;
  border-color: rgb(var(--da) / 0.28);
  background-color: rgb(2 3 7 / 0.66);
  box-shadow: 0 2em 6em rgb(0 0 0 / 0.5);
}

.sd-head {
  display: flex;
  align-items: center;
  gap: 0.8em;
  height: 4.4em;
  padding-left: 1em;
}

.sd-head i {
  flex: none;
  width: 2.6em;
  height: 2.6em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e59a6a, #b4502a 55%, #5a2412);
}

.sd-head b { font-size: 1.3em; font-weight: 500; }

.sd-head small,
.sd-facts small {
  font: 500 0.95em/1 var(--dm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--di) / 0.62);
}

.sd-x {
  display: grid;
  place-items: center;
  width: 4.4em;
  height: 100%;
  margin-left: auto;
  box-shadow: inset 1px 0 rgb(var(--di) / 0.1);
  font-size: 1.2em;
  color: rgb(var(--di) / 0.8);
}

.sd-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 3.6em;
  box-shadow: inset 0 1px rgb(var(--di) / 0.1);
}

.sd-facts > span {
  display: grid;
  gap: 0.5em;
  padding: 0.9em 1em;
  font: 400 1.2em/1 var(--dm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sd-facts small { font-size: 0.8em; }
.sd-facts > span + span { box-shadow: inset 1px 0 rgb(var(--di) / 0.1); }
.sd-facts .sd-more { place-items: center; padding: 0; color: rgb(var(--da)); font-size: 1.6em; }

/* The case board's tiles hold one component each. */
.sys--drift .ds-spec--wide .ds-tile { padding: 2.4em; }
.sys--drift .sd-focus { max-width: 34em; }

/* The brand palette, as the drop's printed card had it: seven inks, the
   screen's void widest, and the temperature ramp under them, the only colour
   that carries data. */
.pal--drift {
  grid-template: repeat(2, minmax(0, 1fr)) 4.4em / repeat(4, minmax(0, 1fr));
  background: #050506;
  color: #f2f2f2;
  font-family: 'Geist', var(--font);
}

.pal--drift > span { padding: 1em 1.2em; }
.pal--drift > span:first-child { grid-column: span 2; }
.pal--drift b { font-size: 1.3em; white-space: normal; }
.pal--drift i { font-family: 'Geist Mono', var(--font-mono); }

.pal--drift .p-ramp {
  grid-column: 1 / -1;
  margin: 1.4em 1.2em 1.8em;
  padding: 0;
  border-radius: 1px;
  background: linear-gradient(90deg, #3c69ff, #5082ff 17%, #82a5f0 40%, #e8e4dc 55%, #ffb26e 68%, #ff783a 82%, #ff5228);
}

/* Drift's faces: Geist, light and in capitals for the tour's captions, and
   Geist Mono for every title and readout. */
.type--drift {
  --tg: #050506;
  --tc: #f2f2f2;
  --tl: rgb(242 242 242 / 0.12);
  --tm: 'Geist Mono', var(--font-mono);
  font-family: 'Geist', var(--font);
}

.type--drift .t-a b { font-size: 3.2em; font-weight: 200; letter-spacing: 0.06em; text-transform: uppercase; }
.type--drift .t-b b { font-size: 1.5em; font-weight: 400; }
.type--drift .t-c b { font: 500 1.2em/1.1 'Geist Mono', var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }
.type--drift .t-d b { font: 400 1.4em/1.1 'Geist Mono', var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---- Peak Season (park-year, the atlas restyle) ----
   Paper and brown ink; red for the diamond, the needle and focus; colour in
   the answers only. Fraunces, Bricolage Grotesque, IBM Plex Mono. */
.sys--peak,
.lv-sys-peak {
  --pp: #fbf6ea;
  --pk: #3b2618;
  --pk2: #7a604c;
  --pr: #c8462b;
  --pt: #efe5cf;
  --pf: 'Fraunces', Georgia, serif;
  --pb: 'Bricolage Grotesque', var(--font);
  --pm: 'IBM Plex Mono', var(--font-mono);
  font-family: var(--pb);
  color: var(--pk);
}

.sys--peak .ds-tile { background: #f7f0de; color: var(--pk); }

.sys--peak b,
.lv-sys-peak b { font-weight: inherit; }

/* A park card: the view in a fine frame, its name and when to come. */

.sys--peak .ds-spec--wide .ds-tile { padding: 2.4em; }

/* The palette, as on the brand card: ink first, the papers, the diamond's
   red, then the land's own green and water. */
.pal--peak {
  grid-template-rows: repeat(7, minmax(0, 1fr));
  font-family: 'IBM Plex Mono', var(--font-mono);
}

.pal--peak > span {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.6em;
}

.pal--peak b { font: 500 2.6em/1 'Fraunces', Georgia, serif; font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.pal--peak i { font-family: inherit; font-size: 1.1em; letter-spacing: 0.14em; opacity: 0.85; }

.type--peak {
  --tg: #f7f0de;   /* the app's own ground, as its components stand on above */
  --tc: #3b2618;
  --tl: rgb(59 38 24 / 0.2);
  --tm: 'IBM Plex Mono', var(--font-mono);
}

.type--peak .t-a b { font: 500 3.8em/1 'Fraunces', Georgia, serif; letter-spacing: -0.015em; font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.type--peak .t-b b { font: italic 500 2em/1.15 'Fraunces', Georgia, serif; }
.type--peak .t-c b { font: 500 1.5em/1.4 'Bricolage Grotesque', var(--font); }
.type--peak .t-d b { font: 500 1.05em/1.2 'IBM Plex Mono', var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }

/* ---- Dungym (workout, app/globals.css) ----
   Black ground, cards a step up with a white hairline, zinc for every
   secondary line, red-500 the one accent. DIN for the headings, Söhne for
   the rest, the system mono for the clock. Drawn to a phone's width: 40em. */
.sys--dungym,
.lv-sys-dungym {
  --gr: 239 68 68;
  --gd: 'DIN', var(--font);
  font-family: 'Sohne', var(--font);
  color: #fff;
}

.sys--dungym .ds-tile { background: #0a0a0a; color: #fff; }
.sys--dungym .ds-tile > * { font-size: clamp(4px, 1.65cqi, 7.5px); }

.lv-sys-dungym {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: max-content;
  background: #0a0a0a;
}

.lv-sys-dungym .dg-timer { position: absolute; left: 0; right: 0; bottom: 0; }
/* A phone's width is 64em here; the block sits clear of the timer at the foot. */
.ix-pic .lv.lv-sys-dungym { font-size: 1.55cqi; align-content: center; gap: 3em; padding: 4em 3.6em 14em; }

.dg-word {
  font: 900 4.4em/1 var(--gd);
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.dg-tabs { display: flex; gap: 1.6em; width: 100%; }

.dg-tabs > span {
  flex: 1;
  padding: 1.6em 0;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 99em;
  text-align: center;
  font-size: 2.4em;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: #71717b;
}

.dg-tabs > span { min-width: 0; padding: 0.65em 0; white-space: nowrap; }
.lv-sys-dungym .dg-tabs { gap: 1em; }
.lv-sys-dungym .dg-tabs > span { font-size: 2em; }

.dg-tabs .is-on {
  border-color: rgb(var(--gr) / 0.4);
  background: rgb(var(--gr) / 0.1);
  box-shadow: 0 0 2em rgb(var(--gr) / 0.1);
  color: #fff;
}

.dg-card {
  display: grid;
  gap: 2.6em;
  width: 100%;
  padding: 3.6em 3.4em;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 2.8em;
  background: #1a1a1a;
}

.dg-h {
  font: 900 3.6em/1 var(--gd);
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.dg-ex { display: grid; gap: 0.9em; }
.dg-ex b { font-size: 3em; font-weight: 600; }
.dg-ex > span { font-size: 2.3em; color: #9f9fa9; white-space: nowrap; }

.dg-ex code {
  padding: 0.1em 0.4em;
  border-radius: 0.3em;
  background: rgb(255 255 255 / 0.1);
  font: 0.9em ui-monospace, 'SF Mono', monospace;
  color: #d4d4d8;
}

.dg-sets { display: flex; align-items: center; gap: 1.6em; }
.dg-sets > span { font-size: 2.3em; color: #52525c; }
.dg-sets > span:first-child { width: 1em; font-size: 2em; }

.dg-sets .dg-in {
  width: 5.5em;
  padding: 0.6em 0;
  border-radius: 0.25em;
  background: rgb(255 255 255 / 0.05);
  text-align: center;
  font-size: 2.8em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.dg-sets .dg-in--s { width: 4.2em; }

.dg-rounds { display: flex; align-items: center; justify-content: flex-end; gap: 1.8em; }
.dg-rounds > span { margin-right: 0.4em; font-size: 2.3em; font-weight: 500; text-transform: uppercase; color: #9f9fa9; }
.dg-rounds i { width: 1.7em; height: 1.7em; background: rgb(255 255 255 / 0.1); transform: rotate(45deg); }
.dg-rounds .is-done { background: rgb(var(--gr) / 0.6); }
.dg-rounds .is-now { background: rgb(var(--gr)); box-shadow: 0 0 1.4em rgb(var(--gr) / 0.6); transform: rotate(45deg) scale(1.1); }

.dg-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2em; width: 100%; }

.dg-stats > span {
  display: grid;
  gap: 0.35em;
  padding: 0.65em 0.85em 0.7em;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 0.7em;
  background: #1a1a1a;
  font: 700 4em/1 var(--gd);
  font-variant-numeric: tabular-nums;
}

.dg-stats > span:first-child { color: #f87171; }
.dg-stats small { font: 500 0.5em/1 var(--font); letter-spacing: 0.05em; text-transform: uppercase; color: #71717b; }

.dg-timer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 10em;
  padding: 0 3.2em;
  overflow: hidden;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  background: #0a0a0a;
}

.dg-fill { position: absolute; inset: 0 40% 0 0; background: rgb(var(--gr) / 0.15); }
.dg-timer b { position: relative; font: 700 5.4em/1 ui-monospace, 'SF Mono', monospace; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.dg-timer small { position: relative; font-size: 2.4em; font-weight: 500; text-transform: uppercase; color: #71717b; }

/* In the case board, each component keeps the phone's width. */
.sys--dungym .dg-tabs,
.sys--dungym .dg-card,
.sys--dungym .dg-timer { max-width: 46em; }

.sys--dungym .dg-timer { border: 1px solid rgb(255 255 255 / 0.1); border-radius: 1.6em; }

/* The palette, by how much of a screen each takes: the black ground, the
   cards on it, white and zinc for the words, red only for what is live. */
.pal--dungym {
  grid-template: repeat(2, minmax(0, 1fr)) / 3fr 1.6fr 1.2fr 1.2fr;
  font-family: var(--font);
}

.pal--dungym > span { padding: 1.1em 1.2em; }
.pal--dungym b { font-size: 1.2em; }
.pal--dungym .p-ground { --c: #0a0a0a; --on: #fff; grid-area: 1 / 1 / 3 / 2; }
.pal--dungym .p-card { --c: #1a1a1a; --on: #fff; grid-area: 1 / 2 / 3 / 3; }
.pal--dungym .p-white { --c: #fff; grid-area: 1 / 3 / 2 / 4; }
.pal--dungym .p-zinc { --c: #9f9fa9; grid-area: 2 / 3 / 3 / 4; }
.pal--dungym .p-zinc5 { --c: #71717b; --on: #fff; grid-area: 1 / 4 / 2 / 5; }
.pal--dungym .p-red { --c: #ef4444; --on: #0a0a0a; grid-area: 2 / 4 / 3 / 5; }

.type--dungym {
  --tg: #0a0a0a;
  --tc: #fff;
  --tl: rgb(255 255 255 / 0.1);
  font-family: 'Sohne', var(--font);
}

.type--dungym .t-a b { font: 900 3.2em/1 'DIN', var(--font); letter-spacing: -0.025em; text-transform: uppercase; }
.type--dungym .t-b b { font-size: 1.8em; font-weight: 600; }
.type--dungym .t-c b { font-size: 1.4em; font-weight: 400; color: #9f9fa9; }
.type--dungym .t-d b { font: 700 2.6em/1 ui-monospace, 'SF Mono', monospace; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }

/* Wide tiles hold a palette or a specimen edge to edge. */
.sys .ds-tile.ds-tile--bleed {
  aspect-ratio: 16 / 7;
  padding: 0;
  place-items: stretch;
  align-content: stretch;
  grid-template-rows: minmax(0, 1fr);
}

/* A type scale takes the height its rows need. */
.sys .ds-tile.ds-tile--bleed:has(> .type) {
  aspect-ratio: auto;
}

.sys .ds-tile.ds-tile--bleed > * {
  font-size: clamp(8px, 2.4cqi, 11px);
}

@media (max-width: 639px) {
  .sys .ds-tile.ds-tile--bleed { aspect-ratio: 4 / 3; }
  /* Dungym's palette folds to two columns: ground and card, then the pairs. */
  .pal--dungym { grid-template: 1.5fr 1fr 1fr / 1fr 1fr; }
  .pal--dungym .p-ground { grid-area: 1 / 1; }
  .pal--dungym .p-card { grid-area: 1 / 2; }
  .pal--dungym .p-white { grid-area: 2 / 1; }
  .pal--dungym .p-zinc { grid-area: 2 / 2; }
  .pal--dungym .p-zinc5 { grid-area: 3 / 1; }
  .pal--dungym .p-red { grid-area: 3 / 2; }
  .type { padding: 0.6em 1.8em; }
  .type > span { flex-direction: column; gap: 0.7em; padding: 1.3em 0; }
}

.ix .case-live {
  border: 0;
  border-radius: 0;
  outline: 1px solid var(--edge);
  outline-offset: -1px;
}

/* ---- Components that work (play.js) ----
   The boards' tiles hold each product's own pieces, with its behaviour. A
   working tile keeps its type large enough to press on a phone, and its
   pieces give way inside the tile instead of shrinking past use. */
.sys .ds-tile[data-play] {
  padding: 20px;
  overflow: clip visible;   /* it grows to hold a piece taller than its shape, and nothing spills past its sides */
}

/* A product is drawn when its case file opens (play.js), so each tile keeps
   its piece's height until then: nothing below it moves when it arrives. */
.ds-tile[data-play]:empty { min-height: var(--rest, 0); }
[data-play='peak-when'] { --rest: 112px; }
[data-play='peak-ask'] { --rest: 432px; }
[data-play='peak-parks'] { --rest: 234px; }
[data-play='dungym'] { --rest: 504px; }
[data-play='drift-time'],
[data-play='drift-layers'] { --rest: 358px; }

@media (max-width: 700px) {
  [data-play='peak-when'] { --rest: 117px; }
  [data-play='peak-ask'] { --rest: 294px; }
  [data-play='peak-parks'] { --rest: 226px; }
  [data-play='dungym'] { --rest: 401px; }
  [data-play='drift-time'] { --rest: 260px; }
  [data-play='drift-layers'] { --rest: 292px; }
}

/* The products' faces are for their pieces; a board's captions stay in the page's. */
.sys figcaption { font-family: var(--font); }

/* On a touch screen the platform's controls keep the product's size and take
   a finger's 44px all the same. */
@media (pointer: coarse) {
  .ds-tabs button::after,
  .ds-nav button::after,
  .ds-pill::after {
    content: '';
    position: absolute;
    inset: -6px 0;
  }

  .ds-nav button,
  .ds-pill { position: relative; }
}

.sys .ds-tile[data-play] > .live {
  width: 100%;
  font-size: 16px;
}

/* On a phone, less edge round each piece. */
@media (max-width: 639px) {
  .sys .ds-tile[data-play] { padding: 14px; }
}

/* A strip that slides runs to the tile's edges: its cards are cut by the tile,
   not short of it. (The strip keeps the edge as its own inset: play.js.) */
.sys .ds-tile[data-play='peak-parks'] { padding-inline: 0; }

/* A piece too slight for a tile of its own once the board is one column. */
@media (max-width: 1199px) {
  .sys .ds-spec--roomy { display: none; }
}

.sys [hidden] {
  display: none !important;
}

/* Two to a row needs a wide page: a working piece wants room to be pressed. */
@media (max-width: 1199px) {
  .ds-board.sys {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sys button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ---- Peak Season, from peakseasons.app (sizes are its pixels over 11) ---- */
.pk-piece {
  border: 1px solid var(--pk);
  border-radius: 0.55em;
  background: var(--pp);
}

.pk-tray {
  box-shadow: inset 0 0 0 3px var(--pp), inset 0 0 0 4px var(--pk);
}

.pk-where {
  display: flex;
  height: 4em;
  padding: 0.36em;
}

.pk-where > span {
  display: grid;
  grid-template: auto auto / auto auto;
  align-content: center;
  column-gap: 0.7em;
  padding: 0 1em 0 0.45em;
  border-radius: 0.36em;
  background: var(--pt);
}

.pk-where img {
  grid-row: 1 / 3;
  align-self: center;
  width: 2.3em;
  height: 2.3em;
  border: 1px solid var(--pk);
  border-radius: 50%;
  object-fit: cover;
}

.pk-where b { font-size: 1.3em; font-weight: 700; line-height: 1.05; }
.pk-where small { font-size: 0.95em; font-weight: 500; line-height: 1.1; color: var(--pk2); }

.pk-when {
  display: flex;
  flex: 1 1 30em;
  align-items: center;
  min-width: 0;
  max-width: 62em;
  height: 4em;
  padding: 0 0.36em 0 0.18em;
}

.pk-round {
  display: grid;
  flex: none;
  place-items: center;
  width: 3.1em;
  height: 3.1em;
  padding: 0;
  border: 0;
  border-radius: 0.36em;
  background: none;
  color: var(--pk);
  cursor: pointer;
  transition: background-color 150ms ease;
}

.pk-round svg { width: 1.45em; height: 1.45em; }

@media (hover: hover) and (pointer: fine) {
  button.pk-round:hover { background: var(--pt); }
}

.sys--peak :is(button, [role='slider']):focus-visible {
  outline: 2px solid var(--pr);
  outline-offset: 2px;
}

.pk-date {
  flex: none;
  min-width: 7.6em;
  padding: 0 0.3em;
  text-align: center;
  font: 600 1.27em/1 var(--pm);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* The year: twelve months and a needle, to drag or to step with the arrows. */
.pk-year {
  position: relative;
  display: grid;
  flex: 1 1 12em;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-width: 0;
  height: 2.55em;
  margin: 0 0.7em 0 0.5em;
  border-radius: 0.36em;
  background: rgb(239 229 207 / 0.6);
}

.pk-year[role='slider'] {
  height: max(2.55em, 28px);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
}

.pk-year > span {
  display: grid;
  place-items: center;
  font: 500 0.91em/1 var(--pm);
  color: var(--pk2);
}

.pk-year > i {
  position: absolute;
  top: 0.18em;
  bottom: 0.18em;
  left: calc(var(--p, 0.5) * 100%);
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--pr);
}

.pk-year > i::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 1px;
  width: 0.64em;
  height: 0.64em;
  margin-left: -0.32em;
  background: var(--pr);
  transform: rotate(45deg);
}

.pk-play {
  display: flex;
  gap: 0.35em;
  width: auto;
  padding: 0 0.8em 0 0.5em;
}

.pk-play > span { font: 600 1.2em/1 var(--pb); }

/* The question and its answer, a bubble over the choice that gave it. */

.pk-tray {
  padding: 1.27em 1.27em 1.1em;
}

.pk-q {
  margin: 0.2em 0 0.55em;
  text-align: center;
  font: italic 500 2.18em/1.2 var(--pf);
  letter-spacing: -0.01em;
  color: var(--pk);
}

.pk-choices {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9em;
}

.pk-choices > * {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.58em;
  min-width: 0;
  height: 8.26em;
  padding: 0.77em 0.26em 0.71em;
  border: 1px solid var(--pk);
  border-radius: 0.2em;
  background: var(--pt);
  font: 600 1.41em/1.1 var(--pb);
  color: var(--pk);
  text-align: center;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.pk-choices > button { cursor: pointer; }
.pk-choices svg { width: 4.13em; height: 4.13em; max-width: 100%; }

@media (hover: hover) and (pointer: fine) {
  .pk-choices > button:hover { background: color-mix(in srgb, var(--pk) 7%, var(--pt)); }
}

.pk-choices > :is([aria-pressed='true'], .is-on),
.pk-choices > button[aria-pressed='true']:hover {
  background: color-mix(in srgb, var(--c) 16%, var(--pp));
  box-shadow: inset 0 0 0 3px var(--pp), inset 0 0 0 4px var(--pk);
}

.pk-short { display: none; }

/* A narrow tile: the ruler takes a row of its own, the choices their short names. */
@container (max-width: 560px) {
  .pk-when { flex-wrap: wrap; height: auto; padding: 0.36em; row-gap: 0.2em; justify-content: space-between; }
  .pk-year { order: 5; flex-basis: 100%; margin: 0; }
  .pk-long { display: none; }
  .pk-short { display: block; }
  .pk-choices { gap: 0.5em; }
  .pk-choices > * { height: 7.2em; font-size: 1.1em; }
  .pk-choices svg { width: 3.2em; height: 3.2em; }
}

/* On the grid: the date bar over the legend, inert. */
.lv-sys-peak {
  grid-template-columns: minmax(0, 1fr);
  background: #f7f0de;
}

.ix-pic .lv.lv-sys-peak { font-size: 1.62cqi; gap: 1.2em; padding: 2.6em 4.4em; }
.lv-sys-peak .pk-when { flex: none; max-width: none; }

/* As the app sets them on a phone: the park and its tools, then the date under both. */
.pk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}

.pk-head .pk-where > span { grid-template-columns: auto auto auto; }
.pk-head .pk-where svg { grid-area: 1 / 3 / 3 / 4; align-self: center; width: 1.3em; height: 1.3em; margin-left: 0.5em; }

.pk-tools {
  display: flex;
  gap: 0.7em;
}

.pk-tools > span {
  display: grid;
  place-items: center;
  width: 4em;
  height: 4em;
}

.pk-tools svg { width: 1.5em; height: 1.5em; }

/* ---- Drift Through Space, from explorer/style.css ---- */
.lv-sys-drift {
  grid-template: 4.4em minmax(0, 1fr) / minmax(0, 1fr) 4.8em;
  background: radial-gradient(ellipse at 70% 120%, rgb(255 176 96 / 0.07), transparent 60%), var(--dv);
  color: rgb(var(--di));
  font-family: 'Geist', var(--font);
}

.lv-sys-drift .sd-hud { grid-area: 1 / 1; }
.lv-sys-drift .sd-tabs { grid-area: 1 / 2 / 3 / 3; }
.lv-sys-drift .sd-main { grid-area: 2 / 1; display: grid; align-content: space-between; gap: 1em; }
.lv-sys-drift .sd-head { height: 3.8em; }
.lv-sys-drift .sd-facts > span { padding: 0.75em 1em; }
.lv-sys-drift .sd-checks { justify-content: flex-start; gap: 2.6em; }   /* the two switches side by side */

.sys--drift button,
.sys--drift input {
  font-family: inherit;
}

.sys--drift :is(button, input, [role='slider']):focus-visible {
  outline: 1px solid rgb(var(--da));
  outline-offset: 2px;
}

.sd-hud > :is(button, span) {
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.sd-hud > button { cursor: pointer; }

.sd-place,
.sd-place > span { min-width: 0; }

.sd-place b,
.sd-place small { overflow: hidden; text-overflow: ellipsis; }

.lv-sys-drift :is(.sd-place, .sd-date) { padding: 0 1.1em; gap: 0.8em; }
.lv-sys-drift .sd-play { width: 4em; }

.sd-date {
  flex: none;
  box-shadow: inset 1px 0 rgb(var(--di) / 0.1);
}

.sd-date b { font-variant-numeric: tabular-nums; }

/* Tracking: the diamond beats while time runs. */

.sd-play {
  flex: none;
  padding: 0;
}

.sd-play.is-playing::after {
  width: 0.9em;
  height: 1em;
  background: linear-gradient(90deg, rgb(var(--di) / 0.8) 34%, transparent 34% 66%, rgb(var(--di) / 0.8) 66%);
  clip-path: none;
}

/* The tab column: an icon over its name, the open one amber with a bar. */
.sd-tabs {
  grid-auto-rows: minmax(0, 1fr);
}

.sd-tabs > * {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.45em;
  padding: 0;
  border: 0;
  background: none;
  font: 500 0.9em/1 var(--dm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(var(--di) / 0.8);
  white-space: nowrap;
}

.sd-tabs > button { cursor: pointer; transition: color 150ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.sd-tabs > * + * { box-shadow: inset 0 1px rgb(var(--di) / 0.1); }
.sd-tabs svg { width: 1.7em; height: 1.7em; }

@media (hover: hover) and (pointer: fine) {
  .sd-tabs > button:hover { color: rgb(var(--di)); }
}

.sd-tabs > :is([aria-pressed='true'], .is-on),
.sd-tabs > button[aria-pressed='true']:hover { color: rgb(var(--da)); }

.sd-tabs > :is([aria-pressed='true'], .is-on)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 2px;
  height: 2.2em;
  background: rgb(var(--da));
  box-shadow: 0 0 1em rgb(var(--da) / 0.45);
  transform: translateY(-50%);
}

.sys--drift .sd-tabs { width: 5em; height: 18em; }

/* The focus panel's two controls are buttons. */

.sd-focus :is(.sd-x, .sd-more) {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.sd-more { transition: transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.sd-more.is-open { transform: rotate(90deg); }

/* Layer switches: a square knob in a square track, amber when on. */

.sd-checks > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  font-size: 1.14em;
  color: rgb(var(--di) / 0.8);
  white-space: nowrap;
}

.sd-checks i {
  position: relative;
  flex: none;
  width: 2.9em;
  height: 1.75em;
  margin: 0;
  border-radius: 0.24em;
  background: rgb(var(--di) / 0.12);
  appearance: none;
  cursor: pointer;
  transition: background-color 150ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sd-checks i::before {
  content: '';
  position: absolute;
  top: 0.32em;
  left: 0.32em;
  width: 1.11em;
  height: 1.11em;
  border-radius: 0.12em;
  background: rgb(var(--di) / 0.62);
  transition: transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 150ms;
}

.sd-checks i.is-on {
  background: rgb(var(--da));
  box-shadow: 0 0 0.8em rgb(var(--da) / 0.45);
}

.sd-checks i.is-on::before {
  background: var(--dv);
  transform: translateX(1.15em);
}

.sd-checks {
  display: flex;
  justify-content: space-between;
  gap: 2em;
}

/* ---- Dungym, from components/workout-viewer.tsx ---- */
.sys--dungym button,
.sys--dungym input {
  font-family: inherit;
}

.sys--dungym :is(button, input):focus-visible {
  outline: 1px solid rgb(255 255 255 / 0.4);
  outline-offset: 2px;
}

.dg-tabs > button {
  flex: 1;
  min-width: 0;
  padding: 0.65em 0;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 99em;
  background: none;
  font-size: 2.4em;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: #71717b;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 150ms, background-color 150ms, color 150ms, transform 150ms;
}

.dg-tabs > button:active { transform: scale(0.95); }

.dg-tabs > [aria-pressed='true'] {
  border-color: rgb(var(--gr) / 0.4);
  background: rgb(var(--gr) / 0.1);
  box-shadow: 0 0 2em rgb(var(--gr) / 0.1);
  color: #fff;
}

.sys--dungym .dg-rounds { justify-content: space-between; }

input.dg-in {
  border: 0;
  font-size: max(16px, 2.8em);
  font-family: inherit;
  appearance: none;
}

input.dg-in:focus { outline: 1px solid rgb(255 255 255 / 0.2); outline-offset: 0; }

/* The bar along the foot of the app: start, the session clock, or the rest. */
.dg-timer.is-low b { color: #f87171; }

/* ---- Reduced motion: state changes still fade, nothing travels for show ---- */

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-base: 150ms;
    --t-move: 150ms;
  }
}

/* ============================================
   Pages on the stage: Photography and About
   ============================================

   Both are set on the index's own two columns (site.js measures them into
   --ix0, --iw, --ilw, --igap and --iy0): what a row is on the left, the
   thing itself on the right. Going from the index to either, the columns
   hold still and only what is in them changes. */

/* The work steps out before a page steps in, and the other way about. */
.o-work {
  position: absolute;
  inset: 0;
  transition: opacity var(--t-base) var(--ease) var(--t-quick), visibility 0s;
}

.o-stage[data-page] .o-work {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-quick) var(--ease), visibility 0s linear var(--t-quick);
}

.o-page {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden auto;
  overscroll-behavior: contain;
  padding: 0 0 120px;
  touch-action: pan-y;
  -webkit-user-select: text;
  user-select: text;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-quick) var(--ease), visibility 0s linear var(--t-quick);
}

.o-page.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--t-base) var(--ease) var(--t-quick), visibility 0s;
}

.o-page:focus {
  outline: none;
}

/* The space above the first row is a block, not padding, so a row's name can
   hold at that same height while the page scrolls under it. */
.o-page::before {
  content: '';
  display: block;
  height: var(--iy0);
}

/* Over a page that scrolls, the bar needs a ground of its own. */
.is-page .top::before {
  opacity: 1;
}

.g-row {
  display: grid;
  grid-template-columns: var(--ilw) minmax(0, 1fr);
  column-gap: var(--igap);
  align-items: start;
  width: var(--iw);
  margin-left: var(--ix0);
}

.g-row + .g-row {
  margin-top: clamp(44px, 7vh, 72px);
}

/* A row's name holds its place while what it names scrolls past. */
.g-label {
  position: sticky;
  top: var(--iy0);
}

.g-label h2 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}

.g-label p {
  margin: 0.3em 0 0;
  max-width: 30ch;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.g-label .p-count {
  margin-top: 0.8em;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

/* ---- Photography ---- */

.p-grid {
  position: relative;
}

/* A photograph is laid out once, by photos.js, and only ever moved and
   scaled after that. --s is how large it is drawn, so its edge stays a
   hairline and its corners stay small when it grows. */
.p-tile {
  --s: 1;
  position: absolute;
  left: 0;
  top: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: 0 0 0 1px var(--edge);
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-move) var(--ease), opacity var(--t-quick) var(--ease), border-radius var(--t-move) var(--ease), box-shadow var(--t-move) var(--ease);
}

.p-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--t-move) var(--ease);
}

.p-tile.is-loaded img {
  opacity: 1;
}

.p-tile.is-looked,
.p-tile.is-back {
  z-index: 5;
}

.p-tile.is-looked {
  border-radius: calc(8px / var(--s));
  box-shadow: 0 0 0 calc(1px / var(--s)) var(--edge);
  cursor: zoom-out;
}

/* Large, it is plainly the thing in focus; a ring would frame it twice. */
.o-photos.is-looking .p-tile:focus-visible {
  outline: none;
}

.p-veil {
  position: fixed;
  inset: 0;
  z-index: 4;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  cursor: zoom-out;
  transition: opacity var(--t-base) var(--ease), visibility 0s linear var(--t-base);
}

.o-photos.is-looking .p-veil {
  opacity: 0.94;
  visibility: visible;
  transition: opacity var(--t-base) var(--ease), visibility 0s;
}

.p-cap {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--cap-y, 80%);
  z-index: 6;
  margin: 0;
  max-width: none;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--text-secondary);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-quick) var(--ease);
}

.p-cap strong {
  font-weight: 600;
  color: var(--text);
}

.p-cap i {
  font-style: normal;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.o-photos.is-looking .p-cap {
  opacity: 1;
  transition: opacity var(--t-base) var(--ease) var(--t-base);
}

/* ---- About ---- */

.o-about a {
  color: var(--text);
  text-decoration: underline dashed var(--text-faint);
  text-underline-offset: 5px;
  transition: text-decoration-color var(--t-quick) var(--ease);
}

.o-about a:hover {
  text-decoration-color: currentColor;
}

.a-bio {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(24px, 4vw, 64px);
}

.a-text {
  max-width: 35rem;
}

.a-text p {
  margin: 0 0 0.9em;
  max-width: 56ch;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.a-text p:last-child {
  margin-bottom: 0;
}

/* The sentence the orbit turns around, said again here. */
.a-text .a-lead {
  margin-bottom: 0.7em;
  max-width: none;
  font-size: clamp(1.375rem, 1rem + 1.1vw, 1.875rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text);
  text-wrap: balance;
}

.a-photo {
  flex: none;
  width: clamp(150px, 22%, 220px);
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: 0 0 0 1px var(--edge);
}

.a-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.a-list,
.a-favs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px clamp(20px, 3vw, 40px);
}

.a-list strong {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.a-list span {
  display: block;
  margin-top: 0.4em;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.a-favs strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
}

.a-favs span {
  display: block;
  margin-top: 0.15em;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.a-links {
  margin: 0;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 1rem;
}

@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) {
  /* One column: each row's name sits over what it names. */
  .g-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 14px;
  }

  .g-label {
    position: static;
  }

  .g-label p {
    max-width: none;
  }

  .a-bio {
    flex-direction: column;
  }

  .a-photo {
    width: 56%;
  }

  .a-list,
  .a-favs {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

/* The grid page fills a project's roles; elsewhere the row stays out of the way. */
.sheet-roles:empty {
  display: none;
}
