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

:root {
  /* Foundation */
  --ratio: 1.25;
  --base: 1.125rem;
  --line-height: 1.5;

  /* Type scale */
  --text-sm: calc(var(--base) / var(--ratio));
  --text-base: var(--base);
  --text-md: calc(var(--base) * var(--ratio));
  --text-lg: calc(var(--base) * var(--ratio) * var(--ratio));
  --text-xl: calc(var(--base) * var(--ratio) * var(--ratio) * var(--ratio));
  --text-2xl: calc(var(--base) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio));

  /* Spacing */
  --line: calc(var(--base) * var(--line-height));
  --space-xs: calc(var(--line) * 0.25);
  --space-sm: calc(var(--line) * 0.5);
  --space-md: var(--line);
  --space-lg: calc(var(--line) * 2);
  --space-xl: calc(var(--line) * 3);
  --space-2xl: calc(var(--line) * 4);

  /* Container widths */
  --container-sm: 540px;
  --container-md: 640px;
  --container-lg: 960px;
  --container-xl: 1240px;
  /* Breakpoint: 640px (used in media queries) */

  /* Typography details */
  --tracking-tight: -0.035em;
  --tracking-snug: -0.01em;

  /* Font stacks */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Distance from the top of a hero to its eyebrow (BORINGWARE / back-link).
     Both hero variants anchor to this — it must be global, since .product-hero
     and .platform-hero are siblings, not nested. */
  --hero-top: calc(var(--line) * 3);
  /* How deep the app window sinks below the hero's bottom edge. Global: both
     hero variants size themselves against it, and a var out of scope silently
     invalidates whatever declaration references it. */
  --pocket-depth: 50px;

  /* Code blocks on the branding page */
  --code-bg: rgba(127, 127, 127, 0.08);

  /* Effects */
  --radius-sm: 6px;
  --radius-md: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --transition-fast: 0.15s ease;
  --transition-med: 0.25s ease;
  /* Things that MOVE on hover (a window lifting, a tile rising). 0.15s ease
     is right for a colour and wrong for motion: it snaps. This starts fast
     and settles. */
  --transition-move: 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Colors */
  --text: #000;
  --text-secondary: rgba(0, 0, 0, 0.6);
  --bg: #fff;
  --border: rgba(0, 0, 0, 0.15);
  --button-bg: #000;
  --button-text: #fff;
}

/* Skipped under [data-ogplus]: the share-card renderer may report a dark
   colour scheme, and a card must always be the light composition — the brand
   accent with near-white text. Every dark block in this file carries the same
   guard for the same reason. */
@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) {
    --text: #fff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --bg: #000;
    --border: rgba(255, 255, 255, 0.15);
    --button-bg: #fff;
    --button-text: #000;
  }
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Layout */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--container-sm);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ── The app mosaic ──────────────────────────────────────────────────────────
   Rendered by Components::Mosaic in two places — the homepage and the "more
   apps" footer on every product page. One grid holds the wordmark and every app. Every app is the same 1:1 square —
   what breaks the grid up is the app itself: each tile crops into that product's
   hero window, bleeding off the bottom-right corner. The wordmark is the one
   odd cell: a banner three columns wide (two at phone width, where two columns
   is the whole grid).

   Cell math, so the mosaic ends on a full row: the wordmark eats S cells, so
   with N apps you want (S + N) divisible by the column count. N is not one
   number: the homepage shows all ten apps and a product page's footer nine
   (never itself), so Components::Mosaic works S out for each column count and
   hands it over as --head-2/3/4. A fixed span of 3 left the homepage with
   Playbox alone on its last row. `grid-auto-flow: dense` only reshuffles
   holes, it can't fill a short final row. ── */
.home-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: var(--space-lg) var(--space-md);
}

.mosaic {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: row dense;
  gap: var(--space-xs);
}

@media (min-width: 640px) {
  .mosaic { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .mosaic { grid-template-columns: repeat(4, 1fr); }
}

/* Every cell is square and sizes its own type off its own width. */
.mosaic-header,
.product-tile {
  container-type: inline-size;
  aspect-ratio: 1;
  min-width: 0;
}

.mosaic-header {
  grid-column: span var(--head-2, 2);
  aspect-ratio: var(--head-2, 2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--space-sm);
}

/* Past phone width the wordmark is a banner one row tall, as many columns
   wide as it takes to end the grid flush (see the cell math above). */
@media (min-width: 640px) {
  .mosaic-header {
    grid-column: span var(--head-3, 3);
    aspect-ratio: var(--head-3, 3);
    padding: 0 var(--space-md);
  }
}

@media (min-width: 900px) {
  .mosaic-header {
    grid-column: span var(--head-4, 3);
    aspect-ratio: var(--head-4, 3);
  }
}

.lockup-mark {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 13cqw, 5.5rem);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 0.95;
  margin: 0;
}

.lockup-tagline {
  font-size: clamp(0.8rem, 4cqw, 1.4rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-secondary);
  margin: 0.35em 0 0 0;
}

/* Product Tiles */
.mosaic-tiles {
  display: contents;
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-tile {
  --accent: #000;
  --text-lightness: 97%;
  --text-chroma: 0.03;
  --accent-text: oklch(from var(--accent) var(--text-lightness) min(var(--text-chroma), c) h);
  /* 0.88, not 0.7: on a mid-tone colour (Blocker's teal, Takes' orange) the
     full ink is already only about 3.3:1, and a 0.7 tagline fell to 2.4:1. */
  --accent-text-secondary: oklch(from var(--accent) var(--text-lightness) min(var(--text-chroma), c) h / 0.88);
  --surface: var(--accent);
}

.product-tile-link {
  --pocket-depth: 6cqw;
  --shot-rotation: -2deg;
  --shot-scale: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-move);
}

/* The pocket seam, same trick as the product hero: a hairline at the tile's
   bottom edge casting a soft shadow UP over the window, so the app reads as
   tucked into the tile rather than pasted on top of it. */
.product-tile-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  box-shadow: 0 0 5cqw 2.5cqw rgb(0 0 0 / calc(0.22 * var(--seam, 1)));
  z-index: 2;
}

/* Hover pushes the zoom down into the art via a custom property, so the shot
   and the icon fallback both pick it up without restating their transforms.
   The tile clips, so the app grows INTO the tile rather than out of it. */
.product-tile-link:hover {
  --shot-scale: 1.045;
  transform: translateY(-2px);
}

.product-tile-link:active {
  transform: translateY(0);
}

/* Text owns the top of the square; the app takes everything under it. */
.product-tile-text {
  position: relative;
  z-index: 1;
  flex: none;
  padding: clamp(0.75rem, 7cqw, 2rem);
  padding-bottom: clamp(0.5rem, 3.5cqw, 1rem);
}

.product-name {
  display: block;
  font-size: clamp(1.05rem, 9cqw, 2.6rem);
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  line-height: 1.1;
  color: var(--accent-text);
}

.product-tagline {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: clamp(0.8rem, 5.6cqw, 1.55rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--accent-text-secondary);
  margin-top: 0.35em;
}

/* The app itself, cropped by the tile. It sits in FLOW under the text rather
   than at a fixed offset, so it starts right below the price whether the
   tagline runs one line or three — a fixed top left a band of dead colour on
   the short ones. Wider than the tile on purpose, and anchored left so the
   window keeps its own left edge (traffic lights, sidebar) and bleeds off the
   right: that's what makes it read as a real app and not a thumbnail. No shadow
   or frame — the crop plus the pocket is the whole treatment. */
.product-tile-shot {
  display: block;
  flex: none;
  margin-left: 8cqw;
  margin-top: auto;
  width: 116cqw;
  pointer-events: none;
  /* Origin bottom-left pins the window's own left edge, so the zoom pushes into
     the crop (right + up, behind the text) instead of sliding the sidebar out
     of frame. */
  transform: rotate(var(--shot-rotation)) translateY(var(--pocket-depth)) scale(var(--shot-scale));
  transform-origin: bottom left;
  transition: transform var(--transition-move);
}

.product-tile-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Icon stand-in for a product with no hero capture yet — same pocket, same
   rotation, so the row still reads as one system. */
.product-tile-mark {
  display: block;
  flex: none;
  width: 40cqw;
  margin: auto auto calc(var(--pocket-depth) * -0.4);
  pointer-events: none;
  /* A mark is a closed shape, not a window that keeps going — it only dips a
     little into the pocket, or it reads as broken rather than tucked. */
  transform: rotate(var(--shot-rotation)) translateY(calc(var(--pocket-depth) * 0.35)) scale(var(--shot-scale));
  transition: transform var(--transition-move);
}

.product-tile-mark svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Phone tiles are small enough that the crop would swallow the tagline. */
/* Phone squares are small: two lines of tagline, and the crop starts higher so
   the app is still a visible slice rather than a sliver. */
@media (max-width: 639px) {
  .product-tile-text {
    padding: 0.7rem;
    padding-bottom: 0.4rem;
  }

  .product-tile-shot {
    margin-left: 10cqw;
    width: 106cqw;
  }
}

/* Reduced motion / print: the tuck is decorative, the crop still reads. */
@media (prefers-reduced-motion: reduce) {
  .product-tile-link,
  .product-tile-shot,
  .product-tile-mark {
    transition: none;
  }

  .product-tile-link:hover {
    --shot-scale: 1;
  }
}

/* Footer */
.site-footer {
  padding: var(--space-lg) var(--space-md);
  max-width: var(--container-md);
  margin: 0 auto;
  width: 100%;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.social-link {
  color: var(--text-secondary);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.social-link:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.footer-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
  text-align: center;
}

.footer-text a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-text a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--accent-text);
  color: var(--accent);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Signup form */
.signup-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

.signup-status {
  font-size: var(--text-sm);
  font-weight: 600;
  /* Match the page's accent-derived text (dark on light accents like Mac Deck
     gold, near-white on dark accents) — not a hardcoded white. */
  color: var(--page-text, #fff);
  margin: 0;
}

/* A quiet caption under the form: the status names the state, the hint says
   what the input is for. */
.signup-hint {
  font-size: var(--text-sm);
  color: var(--page-text-secondary, var(--text-secondary));
  margin: 0;
}

/* Signup form derives from the page's own text/accent so it inverts with the
   accent lightness: on dark accents the button is near-white with an accent
   label (as before); on LIGHT accents (e.g. Mac Deck gold) it flips to the
   dark text color — never a stray white block. --page-text is the header/body
   text color, so everything here matches it. */
.signup-form {
  display: flex;
  flex-direction: row;
  /* When the row can't hold input + button, the button wraps under the input
     rather than being pushed out of the form and clipped. */
  flex-wrap: wrap;
  /* On a colour, a wash of the page's ink reads as a field. On a light page
     the same wash is a flat grey box, which reads as DISABLED. There the
     ground hands over a white field with an edge (--field, PageGround). */
  background: var(--field, oklch(from var(--page-text, #fff) l c h / 0.14));
  box-shadow: inset 0 0 0 1px var(--field-edge, transparent);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.signup-input {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  border: none;
  background: transparent;
  color: var(--page-text, #fff);
  /* A huge grow factor, deliberately: sharing a row with the button the input
     takes essentially all the free space (so the button stays its label's
     width), but once the button wraps to its own row it is alone there and
     grows to fill it. Full-width button under a full-width field, with no
     breakpoint to guess at. */
  flex: 999 1 10rem;
  min-width: 0;
}

.signup-input:focus {
  outline: none;
  background: oklch(from var(--page-text, #fff) l c h / 0.08);
}

/* The input gives up its own outline (the form clips it), so the FORM shows
   where the cursor is: a ring in the page's ink, outside the field, which
   reads on a colour, on white and on a dark grey alike. The 8% wash alone was
   invisible on a white field. */
.signup-form:has(.signup-input:focus-visible) {
  outline: 2px solid var(--page-text, #fff);
  outline-offset: 2px;
}

/* Inside the form, which clips: a ring drawn within the button, in the
   colour of its label. */
.signup-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -5px;
}

.signup-input::placeholder {
  /* 0.65: at 0.5 the hint was 3.2:1 on Email's dark grey and lighter still on
     a colour, and read as a disabled field. */
  color: oklch(from var(--page-text, #fff) l c h / 0.65);
}

.signup-button {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  font-weight: 600;
  /* The label never truncates or wraps: the INPUT is the part that flexes
     (its grow factor dwarfs this one). Without a basis of auto plus grow, a
     wrapped button sat at label width with the form's tint stranded beside it.
     Without nowrap a narrow column cut "Notify Me" to "Notify". */
  flex: 1 1 auto;
  white-space: nowrap;
  /* Pill = the accent-derived text color: light on dark/mid accents (white pill,
     accent label) and dark on light accents (e.g. Mac Deck gold → near-black pill,
     gold label). So it always contrasts the accent bg and the label always reads. */
  background: var(--page-text, #fff);
  color: var(--accent);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition-fast);
}

.signup-button:hover {
  opacity: 0.9;
}

.signup-button-unsub {
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
}

.signup-button-unsub:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Store CTA — the shipped state of the hero ────────────────────────────────
   Replaces the notify-me form once a product has a real price. A two-segment
   badge cut from --page-text (so it inverts correctly on light accents, like
   the signup pill): Apple mark + "Download on the <store>" lockup on the left,
   the price in its own divided segment on the right, and a one-line
   reassurance underneath. Everything inside .store-buy is sized in em off its
   font-size, so the whole badge scales as one unit (the OG card scales it with
   a single rule). ── */
.store-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: var(--space-lg);
}

.store-buy {
  font-size: 1rem;
  display: inline-flex;
  align-items: stretch;
  background: var(--page-text, #fff);
  color: var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.store-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.store-buy:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.store-buy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 1em 0.5em 0.85em;
}

.store-buy-apple {
  width: 1.6em;
  height: 1.6em;
  flex: none;
  /* Optical: the glyph's baseline weight sits low; nudge up a hair. */
  transform: translateY(-0.05em);
}

.store-buy-store {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store-buy-eyebrow {
  font-size: 0.62em;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  opacity: 0.8;
}

.store-buy-name {
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  line-height: 1.15;
  white-space: nowrap;
}

.store-buy-price {
  display: inline-flex;
  align-items: center;
  padding: 0 0.95em;
  border-left: 1px solid oklch(from var(--accent) l c h / 0.2);
  font-size: 1.15em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-snug);
}

.store-buy-note {
  margin: var(--space-sm) 0 0;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--page-text-secondary, oklch(from var(--page-text, #fff) l c h / 0.85));
}

/* Phones: the badge spans the content column, price pinned to the far edge —
   same full-width treatment the old hero button had. */
@media (max-width: 639px) {
  .store-cta {
    width: 100%;
  }

  .store-buy {
    width: 100%;
    justify-content: space-between;
  }
}

/* Static pages (legal, etc.) */
.page-main {
  flex: 1;
  padding: var(--space-lg) 0 var(--space-xl) 0;
}

.page-main .container {
  max-width: var(--container-md);
}

/* ── Top nav ──────────────────────────────────────────────────────────────────
   Brand left, the app's sections right. Sits on the accent on every app page,
   platform gallery and support page, so there's always a way out that isn't the
   back button. Colours come from --accent-text, which .product-page and
   .content-page both define. ── */
.page-nav {
  font-size: var(--text-sm);
  position: relative;
  z-index: 30;
}

/* The bar spans; only its contents are capped. Sizing the <nav> itself meant
   depending on flex-item stretch, which left it shrink-to-fit and huddled in
   the middle of the page. */
.page-nav-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  max-width: 1200px;
  margin-inline: auto;
  padding: var(--space-md) var(--space-md) 0;
}

@media (min-width: 640px) {
  .page-nav-inner {
    padding-inline: var(--space-xl);
  }
}

.page-nav a {
  text-decoration: none;
  color: oklch(from var(--accent-text, var(--text)) l c h / 0.85);
  transition: color var(--transition-fast);
}

.page-nav a:hover {
  color: var(--accent-text, var(--text));
}

/* Set as the wordmark is: all caps, tracked out. */
.page-nav-brand {
  font-weight: 800;
  letter-spacing: 0.06em;
}

.page-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75em;
  font-weight: 600;
}

/* Hairline separators between sections, drawn rather than typed so there's
   never a stray leading or trailing one. */
.page-nav-link + .page-nav-link::before {
  content: "|";
  margin-right: 0.75em;
  color: oklch(from var(--accent-text, var(--text)) l c h / 0.35);
}

.page-nav-link.is-current {
  color: var(--accent-text, var(--text));
}

/* ── Content pages (support, trust, branding) ─────────────────────────────────
   A compact accent band instead of a full hero, then the body on a tint of the
   same accent — the treatment the product footer already uses, so a support
   page reads as part of its app rather than as a bare document. Support pages
   inherit their app's colour via ContentPage; site-level pages wear the brand's.

   The h1 is rendered by the layout from frontmatter, never by the content file. ── */
.content-page {
  --text-lightness: 97%;
  --text-chroma: 0.02;
  --accent-text: oklch(from var(--accent) var(--text-lightness) min(var(--text-chroma), c) h);
  --surface: var(--accent);
  /* Chroma is clamped to the accent's OWN, not a fixed value: a neutral accent
     (the brand's #111) has no hue to speak of, so a hardcoded chroma invented a
     pink cast on the trust pages. min() keeps colourful accents subtle and
     neutral ones neutral. */
  --tint: oklch(from var(--accent) 96% min(c, 0.012) h);
}

@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) .content-page {
    --surface: oklch(from var(--accent) calc(l * 0.92) calc(c * 0.7) h);
    --tint: oklch(from var(--accent) 14% min(c, 0.014) h);
  }
}

.content-header {
  background: var(--surface);
  padding: 0 0 var(--space-lg);
}

.content-header .container {
  padding-top: var(--space-xl);
}

.content-header .container {
  max-width: var(--container-md);
}

/* The qualifier half — "for Displays" — steps back in weight and opacity, the
   same two-tone the platform titles use ("Displays for macOS"). */
.content-title-qualifier {
  font-weight: 500;
  color: oklch(from var(--accent-text) l c h / 0.62);
}

.content-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 5.5vw, 3.5rem);
  text-wrap: balance;
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 1.05;
  color: var(--accent-text);
  margin: 0.25em 0 0 0;
}

.content-subtitle {
  font-size: var(--text-md);
  line-height: 1.3;
  color: oklch(from var(--accent-text) l c h / 0.85);
  margin: 0.5em 0 0 0;
  max-width: 34rem;
  text-wrap: balance;
}

/* The body sits on a tint of the header's colour. Its text is the page's
   normal dark-on-light, so components written for the accent background (the
   store badge, its reassurance line) need --page-text pointed at the body's
   colours here — otherwise they render near-white on a near-white tint. */
.content-body {
  background: var(--tint);
  --page-text: var(--text);
  --page-text-secondary: var(--text-secondary);
}

.content-body .container {
  max-width: var(--container-md);
}

/* ── Feature page ─────────────────────────────────────────────────────────────
   The hero is a promoted showcase card (see Components::FeaturePage). ── */
/* Compound, because the generic .showcase sets a margin-top further down this
   file and would win on source order at equal specificity. */
.showcase.showcase--hero {
  /* .product-main already pads --space-lg above this; adding to it put the
     card 81px from the nav and 27px from the paragraph beneath. */
  margin-top: 0;
}

/* Bigger than a regular card: h1-scale title, roomier copy, and the art is
   allowed out of the card's RIGHT edge too, so a Mac window can sit at 1:1
   with its far side bleeding off rather than being shrunk to the column. */
/* The copy column has a real FLOOR: 24rem, enough for the title, the line and
   an un-truncated CTA. The window is what gives way, since it bleeds off the
   right anyway — at 2fr/3fr the copy was squeezed to ~260px, wrapping the
   title one word per line and cutting "Notify Me" to "Notify". */
.showcase-card.showcase-card--hero {
  grid-template-columns: minmax(24rem, 2fr) minmax(0, 3fr);
  align-items: center;
  min-height: 30rem;
  padding: var(--space-xl) 0 0 var(--space-xl);
}

.showcase-card--hero .showcase-copy {
  padding-bottom: var(--space-xl);
  padding-right: var(--space-lg);
  max-width: none;
}

.showcase-card--hero .showcase-name {
  font-size: clamp(var(--text-xl), 3.6vw, 3rem);
  line-height: 1.03;
}

.showcase-name-qualifier {
  font-weight: 500;
  color: var(--page-text-secondary, var(--text-secondary));
}

.showcase-card--hero .showcase-line {
  font-size: var(--text-md);
  line-height: 1.3;
  margin-top: 0.3em;
}

.showcase-cta {
  margin-top: var(--space-md);
}

/* The CTA components set their own top margin for the product hero. */
.showcase-cta .store-cta,
.showcase-cta .signup-wrapper {
  margin-top: 0;
}

/* 1:1 and bleeding. No cap on the anchor beyond its native size; the card
   clips whatever runs past the right edge, and the usual tuck handles the
   bottom. justify-content: flex-start so it starts at the column's left and
   runs OFF the right, not the other way round. */
.showcase-card--hero .showcase-art {
  justify-content: flex-start;
  overflow: visible;
  margin-bottom: -7cqw;
  min-width: 0;
}

.showcase-card--hero .showcase-shot {
  flex: 0 0 auto;
  width: var(--native, 100%);
  max-width: none;
}

.showcase-card--hero .showcase-shot img {
  width: 100%;
  max-width: none;
}

/* A portrait hero (phone, iPad) is narrow enough to fit its column, so it's
   centred rather than bled off the right, and capped by height so a 2778px
   phone doesn't set a two-metre hero. Orientation is a class the component
   sets; branching on the inline --ar string via :has([style*=]) was flaky. */
.showcase-card--hero.showcase-card--portrait .showcase-art {
  justify-content: center;
}

.showcase-card--hero.showcase-card--portrait .showcase-shot {
  width: auto;
  max-width: 100%;
}

.showcase-card--hero.showcase-card--portrait .showcase-shot img {
  /* The biggest this artwork gets anywhere on the site: it is the one image on
     a feature page. Capped at 1:1 as everywhere else. */
  height: min(var(--hero-art-h, 22rem), var(--native-h, 999px));
  width: auto;
  max-width: 100%;
}

/* The art column shrinks to the artwork. At 3fr a phone sat marooned in the
   middle of 800px of empty accent, which is what made a hero read as an
   afterthought on a wide screen. */
@media (min-width: 1100px) {
  .showcase-card.showcase-card--hero.showcase-card--portrait {
    grid-template-columns: minmax(20rem, 1fr) auto;
  }
}

@media (max-width: 1099px) {
  /* Matches the base rule's specificity. The base is .showcase-card
     .showcase-card--hero (two classes, so it outranks Solo); this was one, so
     it lost inside its own media query and the hero stayed two-column on a
     phone with a ZERO-width art column. Every feature page's hero image was
     invisible on mobile. */
  .showcase-card.showcase-card--hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: var(--space-lg) var(--space-lg) 0;
  }

  /* Compound on the card: the hero IS a Solo card, and .showcase-card--solo
     .showcase-copy further down the file sets its own padding-bottom at equal
     specificity, so on source order it won and the copy kept a 54px skirt. */
  .showcase-card.showcase-card--hero .showcase-copy {
    padding: 0 0 var(--space-sm);
  }

  .showcase-card--hero .showcase-shot {
    width: 100%;
  }

  .showcase-card--hero .showcase-shot img {
    max-width: var(--native, none);
  }
}

.feature-page .product-content-card {
  /* One measure for the prose on this page: the lede spans it, and the article
     divides it into two columns. */
  --article-w: 58rem;
  /* Matches the space above the hero, so it sits evenly between the nav and
     the paragraph. */
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.feature-page .product-lede {
  font-size: var(--text-lg);
  line-height: 1.3;
  font-weight: 500;
  /* Same measure as the article below, so the opening line spans the two
     columns rather than sitting narrow against them. */
  max-width: var(--article-w);
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}

/* The feature's article. It uses the app pages' two-column treatment, but this
   column is narrower, so the switch happens later: two columns of a 25rem
   measure read as a newspaper, not as a page. */
/* The article carries the page: it is the only prose on it, and it was set at
   body size in a 34rem column against a 1240px page, which read as a caption
   somebody forgot to finish. Reading size, and a heading that separates the
   problem from the answer. */
.feature-article {
  margin-top: var(--space-lg);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.feature-article h2 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
  margin: 0 0 0.4em;
  color: var(--page-text, var(--text));
}

.feature-article p {
  margin: 0 0 0.9em;
  color: oklch(from var(--page-text, #fff) l c h / 0.88);
  text-wrap: pretty;
}

@media (min-width: 900px) {
  .feature-page .feature-article {
    /* Two columns inside one measure, rather than as many 34rem columns as the
       page happens to fit. The page is 1186px wide here, and columns that ran
       its full width left the lede looking like a narrow block shoved against
       them. --article-w is the measure both share. */
    columns: 2;
    column-gap: var(--space-2xl);
    column-fill: balance;
    max-width: var(--article-w);
  }

  .feature-page .feature-article .prose-block {
    break-inside: avoid;
    /* Bottom margin, never top: a top margin on the block that starts column 2
       drops it below column 1's first heading and the columns lose their shared
       baseline. */
    margin-bottom: 1.5em;
  }

  .feature-page .feature-article .prose-block > *:first-child {
    margin-top: 0;
  }
}

.feature-page .platforms {
  margin-top: var(--space-md);
}

/* "More of <app>" on a feature page. The app page's own section has no heading
   — its lede is the setup — but here the index needs a label. */
.platforms-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  color: var(--page-text, var(--text));
  margin: 0 0 var(--space-md);
}

/* Product page */
.product-page {
  --text-lightness: 97%;
  --text-chroma: 0.02;
  --accent-text: oklch(from var(--accent) var(--text-lightness) min(var(--text-chroma), c) h);
  --page-text: var(--accent-text);
  --page-text-secondary: oklch(from var(--accent) var(--text-lightness) min(var(--text-chroma), c) h / 0.85);
  --page-border: oklch(from var(--accent) var(--text-lightness) min(var(--text-chroma), c) h / 0.25);
  /* --surface = the accent, eased back (darker + desaturated) in dark mode via
     the block below. The page fill reads from it, matching the screens pages. */
  --surface: var(--accent);
  /* One surface for every text card on an app page (--card-shift comes from
     ProductPage#card_shift, so it lightens on a dark-text accent). */
  /* Chroma eased alongside lightness. Darkening alone kept the page's full
     saturation, so on a vivid accent the index tiles read as saturated blocks
     against a calmer page — the same jarring note the showcase cards had before
     they took a c * 0.88. */
  --card-surface: oklch(from var(--surface, var(--accent)) calc(l * var(--card-shift, 0.8)) calc(c * 0.88) h);
  background: var(--surface);
  position: relative;
}

/* ── Dark mode: ease every accent surface back ────────────────────────────────
   Same hue, a touch darker + desaturated, so the big color fields (product page,
   homepage tiles, footer app tiles) aren't glaring on a dark display. One formula,
   matching screens.css so the two stylesheets don't drift. Skipped under
   [data-ogplus] so share cards always render the raw brand accent. ── */
@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) .product-page,
  html:not([data-ogplus]) .product-tile {
    --surface: oklch(from var(--accent) calc(l * 0.92) calc(c * 0.7) h);
  }
}

.product-page.has-hero {
  overflow-x: hidden;
}

.has-hero .product-main {
  overflow-x: visible;
}

.product-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

.product-page > * {
  position: relative;
  z-index: 1;
}

.product-main {
  flex: 1;
  padding: var(--space-lg) 0;
}

.has-hero .product-main {
  padding: 0;
}

.product-main .container {
  max-width: var(--container-md);
}

/* Align the body column with the hero content column: same 1200px wrapper, and
   (on desktop) the same space-xl inset. Otherwise the centered narrow container
   reads as an indent under the left-aligned hero. The prose keeps its readable
   width, left-aligned. */
.has-hero .product-main .container {
  max-width: 1200px;
}

.has-hero .prose {
  position: relative;
  max-width: var(--container-md);
}

@media (min-width: 640px) {
  .has-hero .product-main .container {
    padding-inline: var(--space-xl);
  }
}

.product-header {
  margin-bottom: var(--space-xl);
}

.product-brand {
  display: block;
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--page-text-secondary);
  text-decoration: none;
  margin-bottom: var(--space-sm);
  transition: color var(--transition-fast);
}

.product-brand:hover {
  color: var(--page-text);
}

.product-brand-hero {
  display: block;
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--page-text);
  text-decoration: none;
  margin-bottom: var(--space-sm);
  transition: opacity var(--transition-fast);
}

.product-brand-hero:hover {
  opacity: 0.8;
}

.product-page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 0.95;
  margin: 0;
  color: var(--page-text);
}

.product-page-tagline {
  font-size: var(--text-md);
  font-weight: 400;
  color: var(--page-text-secondary);
  margin: var(--space-sm) 0 0 0;
}

.product-header .btn {
  margin-top: var(--space-lg);
}

/* Prose */
.prose {
  font-size: var(--text-base);
  line-height: var(--line-height);
  color: var(--page-text, var(--text));
}

.prose > *:first-child {
  margin-top: 0;
}

.prose p {
  margin: 1em 0;
  color: var(--page-text-secondary, var(--text-secondary));
}

.prose h2 {
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  margin: 1.5em 0 0.5em 0;
  color: var(--page-text, var(--text));
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  margin: 1.5em 0 0.5em 0;
  color: var(--page-text, var(--text));
}

.prose strong {
  font-weight: 700;
  color: var(--page-text, var(--text));
}

.prose ul, .prose ol {
  margin: 1em 0;
  padding-left: 1.25em;
  color: var(--page-text-secondary, var(--text-secondary));
}

.prose li {
  margin: 0.25em 0;
}

.prose li::marker {
  color: var(--page-text-secondary, var(--text-secondary));
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  color: var(--page-text, var(--text));
}

.prose > figure:first-child {
  margin-top: 0;
}

.prose figure {
  margin: var(--space-lg) 0;
}

.prose figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.prose figcaption {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--page-text-secondary, var(--text-secondary));
  text-align: center;
}

/* The trademark line under a spec sheet. Smaller, and already in the
   secondary ink; it used to stack an inline opacity: 0.7 on that, which put it
   at 2:1 on Blocker's teal. */
.prose .fine-print {
  margin-top: 2rem;
  font-size: 0.85em;
}

/* Per-product support link, in the content so people find help per app */
/* Product page footer */
.product-footer {
  background: oklch(from var(--accent) 93% min(0.03, c) h);
  padding: var(--space-md);
}

@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) .product-footer {
    background: oklch(from var(--accent) 15% min(0.03, c) h);
  }
}

/* The footer mosaic frames the shared .mosaic grid; the grid itself, the tiles
   and the lockup are all the homepage's rules — see Components::Mosaic. */
.product-footer .mosaic {
  max-width: var(--container-lg);
  margin: 0 auto;
}

.product-footer .lockup-mark {
  color: var(--text);
}

.product-footer .lockup-tagline {
  color: var(--text-secondary);
}

.product-legal {
  background: var(--surface);
  padding: var(--space-md);
}

.product-legal .footer-social {
  margin-bottom: var(--space-sm);
}

.product-legal .social-link {
  color: var(--page-text-secondary);
}

.product-legal .social-link:hover {
  color: var(--page-text);
}

.product-legal .footer-legal {
  color: var(--page-text-secondary);
}

.product-legal .footer-legal a {
  color: var(--page-text-secondary);
  transition: color var(--transition-fast);
}

.product-legal .footer-legal a:hover {
  color: var(--page-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer-legal {
  max-width: var(--container-md);
  margin: 0 auto;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
}

.footer-legal a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Product Hero */
.product-hero {
  --hero-image-rotation: -2deg;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-xl) var(--space-md);
  padding-bottom: 0;
  overflow: hidden;
  position: relative;
}

.product-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -50vw;
  right: -50vw;
  height: 0;
  box-shadow: 0 -7px 26px 13px rgb(0 0 0 / calc(0.17 * var(--seam, 1)));
  z-index: 25;
}

@media (min-width: 640px) {
  .product-hero {
    --hero-height: calc(var(--hero-image-height) - var(--pocket-depth));
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: var(--hero-image-height);
    height: var(--hero-height);
    gap: var(--space-md);
    max-width: 1200px;
    margin-inline: auto;
    padding: 0 var(--space-xl);
    padding-right: 0;
    overflow-x: visible;
    overflow-y: clip;
    position: relative;
  }

  /* The pocket seam. Two things have to be true for the window to read as
     tucked rather than cropped:

     z-index must beat the window's 20 — at 5 the window painted straight over
     the shadow, so its cut edge got no shading at all and looked pasted on.

     The shadow must throw UPWARD, onto the window. It used to offset +8px
     downward, but .product-hero clips its own overflow, so everything below the
     seam was cut away — leaving the shadow terminating in a hard line right at
     the seam. Throwing up keeps the whole gradient inside the clip, landing it
     where it belongs: across the window's base, densest at the cut. */
  .product-hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    /* Bleed past the hero's 1200px box: the window is sized off its own height
       and hangs ~290px beyond the hero's right edge, so a seam that stopped at
       the box left the window's outer third cut with no shading on it. */
    left: -50vw;
    right: -50vw;
    /* Zero height, not 1px. box-shadow paints OUTSIDE the border box, so a 1px
       tall box punches a 1px unshaded line straight through the seam — visible
       as a bright hairline across the window's base. */
    height: 0;
    box-shadow: 0 -7px 26px 13px rgb(0 0 0 / calc(0.17 * var(--seam, 1)));
    z-index: 25;
  }
}

.product-hero-content {
  z-index: 1;
  min-width: 280px;
}

@media (min-width: 640px) {
  /* Centred in the hero — top-aligned left the lockup crowded against the nav
     with a lake of colour under it.
     Centring means the title's y depends on the hero's height, which comes from
     --hero-image-height (set per app from its hero capture). That's what used
     to make the top-left jump between an app page and its platform pages, so
     .platform-hero takes the same height for the same app and centres too: they
     line up because they're the same box, not because of a measured offset. */
  .product-hero .product-hero-content {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: var(--pocket-depth);
  }
}

/* ── Platform layout hero (compact, image-less) ───────────────────────────────
   Same 1200px container + space-xl inset as the product hero, so the back-link
   (in the eyebrow slot) and the title share the product page's top-left and don't
   shift. The title spans the content column; no image, no pocket seam. ── */
.platform-hero {
  max-width: 1200px;
  margin-inline: auto;
  padding: var(--space-xl) var(--space-md) 0;
  position: relative;
}
@media (min-width: 640px) {
  /* Compact and top-anchored. Matching the product hero's height and centring
     here was tried and dropped: it left a dead gap between the pills and the
     first screenshot panel, and it still didn't align, because the app page's
     lockup carries an App Store button this one doesn't — centring ties the
     title's position to the block's height, and the two blocks differ. */
  .platform-hero { padding: var(--hero-top) var(--space-xl) 0; }
}
/* No image here, so the content can use the full width — lets the title run on
   one line. The tagline stays at a readable measure. */
.platform-hero .product-hero-content { max-width: none; }
.platform-hero .product-hero-tagline { max-width: 34rem; }
.platform-hero-cta { margin-top: var(--space-lg); }
/* Title runs the full width (one line where it fits); the platform part is muted. */
.platform-title { max-width: none; text-wrap: nowrap; }
.product-hero-title-platform { font-weight: 500; color: var(--page-text-secondary, rgba(255,255,255,0.6)); }

/* Below the desktop breakpoint the big title can't fit on one line — let it wrap. */
@media (max-width: 720px) {
  .platform-title { text-wrap: balance; }
}

.product-hero-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 10vw, 5rem);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 0.9;
  margin: 0;
  color: var(--page-text);
}

.product-hero-tagline {
  font-size: var(--text-lg);
  color: var(--page-text-secondary);
  margin: var(--space-xs) 0 0 0;
  /* Display-size text needs display leading; var(--line-height) is 1.5, which
     left Mirror's two-line tagline looking like two unrelated lines. */
  line-height: 1.22;
  text-wrap: balance;
}

.product-hero-image {
  position: relative;
  min-width: 0;
}

@media (min-width: 640px) {
  .product-hero-image {
    align-self: end;
  }
}

/* Narrow viewports: a clean, centered window tucked into the pocket.
   (The oversized 120%-width, off-to-the-right, rotated treatment read as
   broken on phones.) */
.product-hero-image picture img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 480px);
  margin: 0 auto calc(var(--pocket-depth) * -1);
  transform: rotate(var(--hero-image-rotation));
}

@media (min-width: 640px) {
  .product-hero-image picture img {
    width: auto;
    /* The row is --hero-image-height tall and the window fills it, but NEVER
       past its own 1:1 size (--native is half the capture's pixel width; the
       captures are 2x). Sized by height alone the window crept 2-3% past
       native and softened. max-height bounds it in both axes at once. */
    height: var(--hero-image-height);
    max-width: var(--native, none);
    max-height: var(--hero-image-height);
    object-fit: contain;
    object-position: left bottom;
    margin: 0 0 0 10%;
    position: relative;
    z-index: 20;
    /* The window rises from the lower-right and tucks into the pocket: the
       row is --hero-image-height tall, the hero clips at
       (--hero-image-height - --pocket-depth), and the deliberate translateY
       pushes the window down so its base disappears into the pocket seam
       (poking up, bottom hidden). Proportional to the image height so the
       tuck reads the same on every product. Rotate around the bottom-left
       to keep the tuck line steady. */
    transform: rotate(var(--hero-image-rotation)) translateY(calc(var(--hero-image-height) * 0.18));
    transform-origin: bottom left;
  }
}

/* Portrait/mobile hero (phone shot): shown only on narrow viewports for
   products that ship one, replacing the desktop window shot. */
.hero-img-mobile {
  display: none;
}

/* ── Two devices in the hero ──────────────────────────────────────────────────
   On desktop a multi-platform app shows the big screen AND the phone: the phone
   sits in front of the window's lower-left corner, both rotated together, both
   tucking into the same pocket. The pairing is the pitch: big screen, little
   screen, same app. ── */
@media (min-width: 640px) {
  .product-hero-image.has-mobile {
    position: relative;
  }

  .product-hero-image.has-mobile .hero-img-mobile {
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 21;
    /* Height-bound so the phone reads as a phone beside the window, not as a
       second screen; never past 1:1. */
    width: auto;
  }

  .product-hero-image.has-mobile .hero-img-mobile img {
    height: calc(var(--hero-image-height) * 0.78);
    width: auto;
    max-width: min(var(--native, 100%), 100%);
    margin: 0;
    transform: rotate(var(--hero-image-rotation)) translateY(calc(var(--hero-image-height) * 0.18));
    transform-origin: bottom left;
    filter: drop-shadow(-10px 18px 30px rgba(0, 0, 0, 0.35));
  }

  /* The window steps right to make room for the phone in front of it. */
  .product-hero-image.has-mobile picture:not(.hero-img-mobile) img {
    margin-left: 22%;
  }
}

@media (max-width: 639px) {
  .product-hero-image.has-mobile picture:not(.hero-img-mobile) {
    display: none;
  }

  .product-hero-image.has-mobile .hero-img-mobile {
    display: block;
  }

  /* Wide phone that tucks into the pocket: the container clips (overflow) and
     the big negative bottom margin pulls the phone's base up out of view, so
     the seam lands ~57% up the phone (around "Kitchen Display") — the top with
     the app's title + first rows stays framed, the rest tucks below the pocket.
     The margin is a % of width, so the cut tracks the phone size on any phone. */
  .product-hero-image.has-mobile {
    overflow: hidden;
  }

  .product-hero-image.has-mobile .hero-img-mobile img {
    display: block;
    width: 84%;
    max-width: 84%;
    max-height: none;
    height: auto;
    margin: 0 auto -68%;
    transform: rotate(var(--hero-image-rotation));
  }
}

/* Social share card. OpenGraph+ adds html[data-ogplus] only while it
   screenshots the page (regular visitors never see it), and it renders at
   a viewport that would otherwise give the narrow, window-less layout.
   Force the wide "content left, app window peeking right" composition here
   with viewport units so it fills whatever size ogplus renders at. */
html[data-ogplus] .product-hero {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0 0 0 6.5vw;
  align-items: center;
  overflow: hidden;
}

html[data-ogplus] .product-hero::after {
  display: none;
}

html[data-ogplus] .product-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: none;
  z-index: 1;
  /* Generous top/bottom edge so the big type never feels crammed. */
  padding: 9vh 0;
}

/* The on-page hero title is clamped to 5rem for real layouts; the card has
   no such constraint, so let the title + subtitle grow to fill it. Sized in
   viewport units so it scales with whatever ogplus renders at. Tuned to fill
   for short names (Mics, Blocker) while keeping longer ones on one line. */
html[data-ogplus] .product-brand-hero {
  font-size: 1.8vw;
  letter-spacing: 0.3em;
  margin-bottom: 2.8vh;
}

html[data-ogplus] .product-hero-title {
  font-size: 10vw;
  line-height: 0.9;
  margin: 0;
}

html[data-ogplus] .product-hero-tagline {
  font-size: 3.6vw;
  line-height: 1.14;
  margin-top: 2.8vh;
  max-width: 24ch;
}

html[data-ogplus] .product-hero-image {
  align-self: stretch;
  height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: visible;
}

/* Use the dark window in the card (ogplus renders light mode, and the dark
   window reads better on the accent background). .og-window is hidden for
   regular visitors. */
.og-window,
.og-window img {
  display: none;
}

html[data-ogplus] .product-hero-image picture,
html[data-ogplus] .product-hero-image .hero-img-mobile {
  display: none;
}

/* Zoom the window and tuck its base into the pocket — the bottom of the OG
   viewport IS the pocket, so the window rises from the lower-right with its
   bottom bled off below the card (like the on-page hero), its top-left content
   staying framed. One template, every product (compose key UI up top-left). */
html[data-ogplus] .product-hero-image .og-window,
html[data-ogplus] .product-hero-image .og-window img {
  display: block;
  width: 178%;
  max-width: none;
  height: auto;
  margin: 0;
  /* translateX opens a gap between the text column and the window's left edge
     (it just bleeds a touch more off the right) — no risk of wrapping the big
     title, which a column gap or content padding would. */
  transform: rotate(var(--hero-image-rotation)) translate(6%, 19%);
  transform-origin: bottom left;
}

/* The inverse of ogplus:hidden — present only in the share card. The BORINGWARE
   eyebrow lives here: on-page the nav carries the brand, but a share image has
   no nav, so the card still needs it above the app name. */
.og-only {
  display: none;
}

html[data-ogplus] .og-only {
  display: block;
}

/* ogplus:hidden utility — the OpenGraph+ Tailwind variant, done in plain
   CSS: hide the element only while ogplus captures the share card. */
html[data-ogplus] .ogplus\:hidden {
  display: none;
}

/* The buy badge on the share card: scale the whole em-sized lockup with one
   rule to sit under the vw-sized tagline; the reassurance line stays on-page
   only. */
html[data-ogplus] .store-cta {
  margin-top: 3.5vh;
}

html[data-ogplus] .store-buy {
  font-size: 4vh;
}

html[data-ogplus] .store-buy-note {
  display: none;
}

/* Homepage share card. The live homepage is a tall mosaic of squares, which
   overflows and clips in the short, wide OG viewport. Reuse the 4-column
   desktop layout — wordmark block + 8 apps = 12 cells = 3 rows — but drop the
   square ratio and let the rows divide the card height evenly, so the whole
   mosaic fits the card no matter how long the list gets. */
html[data-ogplus] .home-main {
  display: block;
  height: 100vh;
  min-height: 100vh;
  padding: 3vh 3vw;
  overflow: hidden;
}

html[data-ogplus] .mosaic {
  max-width: none;
  height: 94vh;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 1.4vh;
}

html[data-ogplus] .mosaic-header,
html[data-ogplus] .product-tile {
  aspect-ratio: auto;
  min-height: 0;
}

html[data-ogplus] .mosaic-header {
  grid-column: span 2;
  grid-row: span 2;
  padding: 0 2vw;
}

html[data-ogplus] .lockup-mark {
  font-size: 9vh;
  line-height: 0.9;
}

html[data-ogplus] .lockup-tagline {
  font-size: 2.6vh;
  margin-top: 1.2vh;
}

html[data-ogplus] .product-tile-text {
  padding: 2vh;
}

html[data-ogplus] .product-name {
  font-size: 3.6vh;
}

html[data-ogplus] .product-tagline {
  font-size: 2.2vh;
  line-height: 1.2;
  -webkit-line-clamp: 2;
  margin-top: 0.25em;
}

/* The card's cells are much wider than they are tall, so the crop is sized off
   the tile's own width here rather than the square-tile ratio. */
html[data-ogplus] .product-tile-shot {
  margin-left: 6%;
  width: 92%;
}

html[data-ogplus] .product-tile-mark {
  width: 22%;
}

html[data-ogplus] .site-footer {
  display: none;
}

/* Content card below hero */
.has-hero .product-content-card {
  position: relative;
  z-index: 10;
  background: var(--surface);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.has-hero .product-content-card > *:first-child {
  margin-top: 0;
}

/* A page with no hero capture yet (Mac Deck, Playbill) still ends its body
   clear of the closer's hairline. Without this the last bullet of the spec
   sheet sat on the line. */
.product-page:not(.has-hero) .product-content-card {
  padding-bottom: var(--space-xl);
}

/* ── Product body: fill the page ──────────────────────────────────────────────
   The shared .container is a 540px measure, which is right for support and
   trust pages but left the app pages as a thin ribbon down the left of a wide
   display. Widen the card and flow the body into two columns, so the copy
   fills the space it's given instead of stranding half the viewport.

   Scoped to .product-page so support/trust keep their single readable measure.
   The lede spans both columns; headings stay welded to the text under them. ── */
@media (min-width: 1000px) {
  /* Same descendant depth as .has-hero .product-main .container so this wins on
     source order rather than needing a specificity hack. */
  .product-page .product-main .container {
    max-width: var(--container-xl);
  }

  /* .has-hero .prose caps the measure at 640px for the single-column layout;
     the two columns supply their own measure, so the cap comes off. */
  .product-page .prose {
    max-width: none;
    columns: 2;
    column-gap: var(--space-2xl);
  }

  /* A heading and the content under it are one unit — see ProseHelper.
     break-after: avoid on the heading alone is not honoured by Chrome in
     multicol, which is how "Details" ended up alone at the foot of a column. */
  .product-page .prose .prose-block {
    break-inside: avoid;
    /* The gap between blocks is a BOTTOM margin, never a top one. With
       `+ .prose-block { margin-top }`, the block that happens to start column 2
       still had a preceding sibling in the DOM, so it carried the margin and
       sat 1.5em lower than column 1 — the two columns' first headings didn't
       share a baseline. Bottom margins are dropped at a column break, so
       whichever block lands at the top of a column sits flush. */
    margin-bottom: 1.5em;
  }

  .product-page .prose .prose-block > *:first-child {
    margin-top: 0;
  }

  .product-page .prose .prose-block:last-child {
    margin-bottom: 0;
  }

  .product-page .prose p,
  .product-page .prose ul,
  .product-page .prose ol,
  .product-page .prose figure {
    break-inside: avoid;
  }

  /* The opening paragraph reads as a lede across the full width. */
  .product-page .prose > p:first-child {
    column-span: all;
    font-size: var(--text-md);
    line-height: 1.45;
    max-width: 46rem;
    margin-bottom: var(--space-lg);
  }
}

/* ── The lede ─────────────────────────────────────────────────────────────────
   The pitch, one paragraph, set larger than the body copy. First thing under
   the hero, before anything asks the reader to work. ── */
.product-lede {
  font-size: var(--text-md);
  line-height: 1.4;
  color: var(--page-text, var(--text));
  max-width: 46rem;
  margin: 0 0 var(--space-lg);
  text-wrap: pretty;
}

/* ── Platform sections ────────────────────────────────────────────────────────
   One block per platform the app ships on: its name, what it runs on, and its
   App Store screens as a swipeable rail. The tiles are the very same ones the
   capture pipeline renders — sized in container-query units, so they compose
   correctly at rail size without a second set of styles. ── */
.platforms {
  margin: var(--space-lg) 0;
}

/* ── The closer ───────────────────────────────────────────────────────────────
   Centred, unlike everything above it, because a change of rhythm is what says
   "this is the end of the argument". Sits on the same hairline the spec sheet
   uses so it belongs to the page. ── */
/* One centred column, evenly spaced: title, line, form, with the same gap
   between each and the same breathing room above and below. Before, a
   --space-xl margin stacked on a --space-xl padding under the prose's own
   bottom margin, and the form sat a long way under its title. */
.closing {
  border-top: 1px solid oklch(from var(--page-text, #fff) l c h / 0.16);
  /* The content card above already pads its bottom; a margin here stacked on
     that, and the rule sat in a no-man's-land 135px below the last paragraph. */
  margin-top: 0;
  padding: var(--space-xl) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  text-align: center;
}

.closing-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
  color: var(--page-text, var(--text));
  margin: 0;
  text-wrap: balance;
}

/* Pulled up under the title (the flex gap is for the form, not for this). */
.closing-line {
  font-size: var(--text-base);
  line-height: 1.45;
  color: var(--page-text-secondary, var(--text-secondary));
  margin: calc(var(--space-md) * -1 + 0.4em) 0 0;
  max-width: 34rem;
  text-wrap: pretty;
}

.closing-cta {
  display: flex;
  justify-content: center;
  margin-top: 0;
}

/* The signup/store CTA carries its own top margin for the hero; not here. */
.closing-cta .store-cta,
.closing-cta .signup-wrapper {
  margin-top: 0;
}

/* The CTA is built left-aligned for the hero; centre its innards here. */
.closing-cta .store-cta,
.closing-cta .signup-wrapper {
  align-items: center;
  text-align: center;
}

/* On a phone the line runs to three or four lines, and a centred paragraph
   that long is hard to read: the whole closer goes flush left, as the story's
   bands above it already are at this width. */
@media (max-width: 639px) {
  .closing { align-items: flex-start; text-align: left; }
  .closing-cta { justify-content: flex-start; }
  .closing-cta .store-cta,
  .closing-cta .signup-wrapper { align-items: flex-start; text-align: left; }
}

/* ── The compact index ────────────────────────────────────────────────────────
   The "more of this app" grid on a feature page. These are the OTHER features
   and must not outweigh the one you came to see, so they're thumbnails — not
   the showcase cards. Without these rules the images rendered at full size and
   a feature page ran to 22,000px. ── */
.shots-index {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: grid;
  /* auto-FIT, not auto-fill: an app with three features leaves two tiles on
     each feature page, and auto-fill kept the empty tracks so the pair huddled
     at 15rem with a hole to their right. auto-fit collapses the empties and the
     tiles stretch to fill the row, whether there are two of them or six. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--space-md);
}

.shot-thumb {
  min-width: 0;
  /* The container for the tile's own layout query. It sits here, on the list
     item, because .shot-thumb-link is what the query styles and an element
     cannot query itself. */
  container-type: inline-size;
}

/* An index tile is a small card: caption at the top, the app window tucked into
   the pocket below and cropped by the tile's own bottom edge. Same idiom as the
   homepage mosaic. It used to be a padded screenshot with the caption floating
   underneath, which read as two loose objects instead of one tile. */
.shot-thumb-link {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  background: var(--card-surface);
  border-radius: calc(var(--radius-md) * 1.2);
  padding: 1rem 1rem 0;
  overflow: hidden;
  /* A definite height, not a minimum: the artwork has to overflow for the tile
     to crop it. With min-height the flex column shrank the image instead, and a
     phone came out 355x176 — squashed, not pocketed. */
  --tile-h: 20rem;
  height: var(--tile-h);
  transition: transform var(--transition-move);
}

@media (min-width: 700px) {
  .shot-thumb-link {
    --tile-h: 18rem;
  }
}

@media (min-width: 1100px) {
  .shot-thumb-link {
    --tile-h: 20rem;
  }
}

.shot-thumb-link:hover {
  transform: translateY(-2px);
}

.shot-thumb-text {
  display: block;
  min-width: 0;
}

.shot-thumb-sub {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin-top: 0.3rem;
  font-size: var(--text-sm);
  line-height: 1.35;
  color: var(--page-text-secondary, oklch(from var(--page-text, #fff) l c h / 0.85));
}

/* A wide tile puts the copy beside the artwork instead of above it. Stacked, a
   full-width tile was a line of text, a phone on the left, and a large hole to
   its right. Container query, not a media query: what matters is how wide THIS
   tile is, and the same tile is full width on a phone and a third of a row on a
   desktop. */
@container (min-width: 28rem) {
  .shot-thumb-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    align-items: end;
    gap: 1rem;
  }

  .shot-thumb-text {
    align-self: start;
  }

  .shot-thumb-shot {
    margin-top: 0;
    align-self: end;
    justify-self: center;
  }
}

/* The window sits on the floor of the tile and runs off it. A portrait phone
   shows its top two thirds; a Mac window its top edge and toolbar, which is
   the part that identifies the screen. */
.shot-thumb-shot {
  display: block;
  margin-top: auto;
  align-self: center;
  flex: none;
  max-width: 100%;
}

/* Sized by the TILE'S height, not by its width. Width-sizing made a full-width
   tile on a phone hold an enormous image, and the fixed-height tile then showed
   a band across the top of it: you got a notch and half a toolbar. Pinning the
   art to a fraction over the tile height means the same generous slice of the
   device shows at every width, whatever its shape. */
.shot-thumb-shot img {
  display: block;
  /* Width, with height following the aspect ratio, so it can never distort.
     The target is a fraction over the tile height (so a slice crops off the
     bottom), converted to a width through --ar, and capped at the tile's own
     width so a wide Mac window is not clipped on both sides. */
  width: min(100%, calc(var(--tile-h) * 1.25 * var(--ar, 1)));
  height: auto;
  border-radius: calc(var(--radius-sm) * 0.8) calc(var(--radius-sm) * 0.8) 0 0;
}

.shot-thumb-link:hover picture {
  transform: translateY(-2px);
}

.shot-thumb-name {
  display: block;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: var(--tracking-tight);
  color: var(--page-text, var(--text));
}

.shot-thumb-device {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  /* A label, but still text: at 0.42 "MAC" all but vanished on a colour and
     on Email's pale grey cards. */
  color: oklch(from var(--page-text, #fff) l c h / 0.75);
}

/* ── The showcase: one card per feature ───────────────────────────────────────
   Components::FeatureCards renders one of three cards by device count. The
   three share a surface and a copy treatment; they differ in where the art
   goes, because one, two and three devices want different compositions.
   The variation tracks something real, so the page has rhythm without
   pretending to. ── */
.showcase {
  /* Breaks out of the reading column: a Mac window is a three-pane UI and at
     66% of a 1240px measure it rendered ~400px wide, illegible. */
  width: min(94vw, 1700px);
  margin-inline: calc(50% - min(47vw, 850px));
  container-type: inline-size;
  margin-top: var(--space-md);
  /* A two-track grid: full-width cards span both, Slim cards take one, so two
     phone-only features sit side by side instead of each stranding a lake of
     colour beside a single device. */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

/* Shared: the surface and the copy. */
.showcase-card {
  /* Height budget for the artwork; see "How app windows are sized" above. */
  --art-h: 22rem;
  --hero-art-h: 22rem;
  grid-column: span 2;          /* full width; Slim overrides to 1 */
  /* A calm step from the page, not --card-surface: that one is 20% darker so
     the feature TEXT cards pass AA, and on a card that mostly holds artwork the
     same shift reads as a hard block. */
  /* From --surface, not --accent: the page eases its accent back in dark mode
     (darker, desaturated), and a card computed from the raw accent came out
     BRIGHTER and more saturated than the page around it. --surface already
     carries the mode. */
  background: oklch(from var(--surface, var(--accent)) calc(l * 0.93) calc(c * 0.88) h);
  border-radius: calc(var(--radius-md) * 1.6);
  overflow: hidden;            /* the fold: art runs past the bottom, card clips */
  /* Safari does not apply a rounded overflow clip to composited children (the
     hover transform promotes the shots to layers), so the artwork painted
     straight past the card's edges there. Isolating the card forces the clip
     onto its own context. */
  isolation: isolate;
  transform: translateZ(0);
  display: grid;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-lg) 0;
}

.showcase-copy {
  max-width: 44rem;
  min-width: 0;
}

.showcase-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
  color: var(--page-text, var(--text));
  margin: 0;
  text-wrap: balance;
}

.showcase-line {
  font-size: var(--text-base);
  line-height: 1.4;
  color: var(--page-text-secondary, var(--text-secondary));
  margin: 0.25em 0 0;
  text-wrap: pretty;
}

.showcase-art {
  display: flex;
  align-items: flex-end;
  gap: 1.5cqw;
  min-width: 0;
  /* The tuck: 7cqw of the art sits below the fold, but never more than 30% of
     the shortest shot — a fixed cut swallowed small captures whole. */
  margin-bottom: calc(-1 * min(7cqw, var(--min-art-h, 999px) * 0.3));
}

/* ── How app windows are sized ────────────────────────────────────────────────
   One rule for every device on every page. The artwork is the point of a card,
   so it gets a HEIGHT BUDGET that grows with the viewport, and a width ceiling
   at its own 1:1 size. Both are maxima on an auto-sized image, so it fits the
   box without distorting, and a row of a Mac, an iPad and a phone lines up at a
   common height with each one's width falling out of its shape — which is what
   makes a lineup read as a lineup.

   This replaced a per-variant ceiling in cqw (46cqw for solo, 38 for pair, 36
   for trio...). Those are width-derived, so a tall phone came out tiny: 18% of
   its card next to a Mac window, and 0 on a narrow screen. Height is the honest
   limit for portrait devices; width is the honest limit for landscape ones.
   Budgeting height and capping width lets one rule serve both. ── */
@media (min-width: 700px) {
  .showcase-card {
    --art-h: 26rem;
    /* Still stacked at this width, so a tall phone would otherwise fill the
       card and push the copy off the top of it. */
    --hero-art-h: 24rem;
  }
}

@media (min-width: 1100px) {
  .showcase-card {
    --art-h: 32rem;
    --hero-art-h: 38rem;
  }
}

.showcase-card:not(.showcase-card--hero) .showcase-shot img {
  width: auto;
  height: auto;
  max-width: min(100%, var(--native, 100%));
  max-height: min(var(--art-h), var(--native-h, 9999px));
}

.showcase-shot {
  display: block;
  min-width: 0;
  transition: transform var(--transition-move);
}

.showcase-shot:hover {
  transform: translateY(-4px);
}

.showcase-shot img {
  display: block;
  width: 100%;
  height: auto;
  /* Never past 1:1, whatever the variant above decides. */
  max-width: var(--native, none);
  border-radius: 0.4rem;
}

/* ── Solo: one device ─────────────────────────────────────────────────────────
   Copy and window side by side. The window takes the bigger column and its
   width is WHATEVER THE COLUMN GIVES IT — the previous rule set its height to
   40cqw, which at ~1100px made a Mac window half the card with empty space
   beside it. Width-driven, it fills the column at every size. ── */
.showcase-card--solo {
  /* The copy needs ~14rem; everything else is the window's. */
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 3fr);
  align-items: center;
}

.showcase-card--solo .showcase-copy {
  padding-bottom: var(--space-lg);
}

.showcase-card--solo .showcase-art {
  justify-content: flex-end;
}

.showcase-card--solo .showcase-shot {
  flex: 1 1 auto;
  width: 100%;
}

/* ── Narrow: every variant stacks ─────────────────────────────────────────────
   Below ~900px there's no room for a side-by-side; copy above, art below, and
   a lone Mac window is full width — it was half-width with space beside it. ── */
@media (max-width: 899px) {
  .showcase-card,
  .showcase-card--solo {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .showcase-card--solo .showcase-copy {
    padding-bottom: 0;
  }

}

@media (max-width: 767px) {
  .showcase {
    width: auto;
    margin-inline: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  /* The desktop rhythm reads as dead air in a phone-width column, where the
     stacked field and button already take two rows: pull the CTA up under the
     line it belongs to and tighten the rows to a tap target rather than a
     tap target plus change. */
  .showcase-cta {
    margin-top: var(--space-sm);
  }

  .signup-input,
  .signup-button {
    padding-block: calc(var(--space-sm) * 0.8);
  }

  /* Two stacked rows in one narrow column: the desktop row gap between the
     copy and the artwork reads as a hole here. */
  .showcase-card.showcase-card--hero {
    gap: var(--space-md);
  }

  /* The feature-page hero is a direct child of .product-main, which has no
     horizontal padding — margin-inline: 0 ran it edge-to-edge on a phone.
     Same gutter as .container, so it aligns with the content card below. */
  .showcase.showcase--hero {
    margin-inline: var(--space-md);
  }

  .showcase-card {
    grid-column: span 1;
    padding: var(--space-md) var(--space-md) 0;
  }

  /* The cqw ceilings above are desktop card-rhythm tuning: they keep neighbouring
     cards the same height on a wide screen. On a phone there are no neighbours,
     and they starve the art — a Mac window came out 217px inside a 336px card,
     and a portrait phone shot barely a fifth of it. Fill the card instead, still
     never past 1:1 so nothing blurs. */
  .showcase-card--solo .showcase-shot {
    max-width: min(100%, var(--native, 100%));
  }

  /* Portrait art is the exception: full width would make a phone screenshot
     twice as tall as the text it illustrates. */
  .showcase-card--portrait .showcase-shot {
    max-width: min(66%, var(--native, 100%));
    margin-inline: auto;
  }
}

/* ── Where it runs: the line under the hero's buy button ──────────────────────
   Components::PlatformLine. "iPhone · iPad · Mac · Siri" with glyphs, or
   "For macOS". A statement, not navigation. ── */
.platform-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: oklch(from var(--page-text, #fff) l c h / 0.85);
}

.platform-line-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.platform-glyph {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── The story: full-bleed bands, one moment each ─────────────────────────────
   Components::Story. Every band is the hero's idea again: the window at its
   real size, rising out of a pocket seam at the band's bottom edge. That's
   what lets a window be big enough to read; the previous layouts all shrank
   it to fit a column or a tile.

   Bands are stripes across the whole page, each on one of a few tones of the
   app's colour (see "Tones"), joined by a crisp fold. No cards, so never a
   box in a box. One component per kind of band: Components::Story::Pocket,
   Wide, Siri and Aside.

   Sizing is all definite lengths (no percentages), so each band can work out
   its art's height and tuck a fixed share of it below the seam:
     --native / --ar   set per band by the component: the art's 1:1 width, shape
     --cap             the widest a device is drawn beside copy
     --room            what's left beside the copy column, up to the screen edge
     --w               the art's width: the smallest of the three ── */
.story {
  --inset: var(--space-md);
  --gap: clamp(2rem, 5vw, 5rem);
  --pad: clamp(4.5rem, 10vw, 8.5rem);
  --gutter: clamp(1rem, 4vw, 4rem);
  /* The copy column is 2 of 5 parts of the hero's 1200px box. */
  --box: min(100vw, 1200px);
  --copy-track: calc((var(--box) - 2 * var(--inset) - var(--gap)) * 0.4);
  /* From the art's left edge to 1rem short of the screen edge: the art may run
     past the 1200px box, the way the hero window does, but never off-screen. */
  --room: calc(100vw - (100vw - var(--box)) / 2 - var(--inset) - var(--copy-track) - var(--gap) - 1rem);
  position: relative;
  z-index: 10;   /* over the hero window's overflow, like the content card */
}

@media (min-width: 640px) {
  .story { --inset: var(--space-xl); }   /* the hero's own inset */
}

.story-beat {
  --tuck: 0.12;
  --tilt: -2deg;
  /* The capture's measurements (Components::Story::Band#shot_geometry): the
     light one's by default, the dark one's in dark mode, because the two can
     differ in size and in margin.
       --il --ir --ib  how far the WINDOW sits inside the image (left, right,
                       bottom), as fractions. Captures taken with their shadow
                       have a transparent margin; captures without have none.
       --vis           the share of the image's width that is window
     Everything below places the window, not the image. Tucking by the image
     left windows floating whole above the fold with only their shadow cut. */
  --native: var(--l-native, 600px);
  --ar: var(--l-ar, 1.5);
  --il: var(--l-il, 0);
  --ir: var(--l-ir, 0);
  --ib: var(--l-ib, 0);
  --mask: var(--l-mask, none);
  --vis: calc(1 - var(--il) - var(--ir));
  /* The WINDOW fits the room; the image may be wider by its empty margins. */
  --w: min(var(--native), var(--cap, 9999px), var(--room) / var(--vis));
  /* Slides the image so the window's edge, not the image's, meets the column. */
  --shift: calc(var(--w) * var(--il) * -1);
  /* The band's colour and its darker partner. Every tone below is cut from
     these two, so a band is never lighter than the page: white text has to
     stay readable on all of them. */
  --band: var(--surface, var(--accent));
  --band-deep: oklch(from var(--band) calc(l * var(--band-shift, 0.85)) calc(c * 0.88) h);
  position: relative;
  overflow: clip;   /* the pocket: art runs past the bottom, the band cuts it */
  background-color: var(--band);
  /* The fold. Each band ends on a dark hairline and the next begins on a
     light one, so the join reads as a crease catching the light: the lip of
     the pocket the art is tucked behind. Crisp on purpose. A wide soft shadow
     across the whole band smeared the join and sat under bands with nothing
     tucked into them. */
  box-shadow:
    inset 0 1px 0 oklch(from var(--band) calc(l * 1.12) c h / calc(0.55 * var(--seam, 1)));
}

.story-beat.is-flipped { --shift: calc(var(--w) * var(--ir)); }

@media (prefers-color-scheme: dark) {
  .story-beat {
    --native: var(--d-native, var(--l-native, 600px));
    --ar: var(--d-ar, var(--l-ar, 1.5));
    --il: var(--d-il, var(--l-il, 0));
    --ir: var(--d-ir, var(--l-ir, 0));
    --ib: var(--d-ib, var(--l-ib, 0));
    --mask: var(--d-mask, var(--l-mask, none));
  }
}

.story-beat--pocket[data-platform="ios"]    { --cap: 380px; --tuck: 0.24; }
.story-beat--pocket[data-platform="ipados"] { --cap: 640px; --tuck: 0.32; }
/* `fit: whole`: the point of this screen is at the bottom of the device (a
   share sheet), so nearly all of it shows; just enough is tucked to seat it. */
.story-beat--pocket[data-fit="whole"] { --tuck: 0.05; }
/* Centred art: split the difference between the two margins. */
.story-beat--pocket[data-platform="ios"] { --shift: calc(var(--w) * (var(--ir) - var(--il)) / 2); }

/* ── Tones: the band's background ─────────────────────────────────────────────
   Components::Story rotates through spot, dusk, deep and dawn so neighbours
   differ; a beat can ask for one by name (`tone:` in the story frontmatter).
   Same tint throughout. Gradients are background-IMAGES over the flat
   background-color, so the colour is still there to measure and to fall back
   on.

     spot  the page's colour, with a soft light behind the art
     dusk  darkens toward the fold, so the art sinks into shade
     deep  one flat step darker
     dawn  starts dark and clears toward the fold
     ink   the darkest; asides use it ── */
.story-tone--spot {
  --spot-x: 72%;
  background-image: radial-gradient(ellipse 46% 78% at var(--spot-x) 100%,
    rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 72%);
}
.story-tone--spot.is-flipped { --spot-x: 28%; }
.story-tone--spot.story-beat--wide { --spot-x: 50%; }

.story-tone--dusk {
  background-image: linear-gradient(180deg, var(--band) 20%, var(--band-deep) 100%);
}

.story-tone--deep {
  background-color: oklch(from var(--band) calc(l * var(--band-mid, 0.92)) calc(c * 0.9) h);
}

.story-tone--dawn {
  background-image: linear-gradient(180deg, var(--band-deep) 0%, var(--band) 80%);
}

.story-tone--ink {
  background-color: oklch(from var(--band) calc(l * 0.76) calc(c * 0.82) h);
}

.story-beat-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  column-gap: var(--gap);
  max-width: 1200px;
  margin-inline: auto;
  padding: var(--pad) var(--inset) 0;
}

.story-beat.is-flipped .story-beat-inner { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.story-beat.is-flipped .story-copy { order: 2; }

.story-copy {
  align-self: center;
  min-width: 0;
  padding-bottom: var(--pad);
}

.story-device {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--page-text-secondary, var(--text-secondary));
}

.story-device .platform-glyph { width: 1.15rem; height: 1.15rem; }

.story-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  color: var(--page-text, var(--text));
  text-wrap: balance;
}

.story-body {
  max-width: 30rem;
  margin: 1rem 0 0;
  font-size: var(--text-md);
  line-height: 1.4;
  /* Full page text, like the lede: the secondary tint is too faint for the
     paragraph that carries the story. */
  color: var(--page-text, var(--text));
  text-wrap: pretty;
}

/* A band whose feature has a page of its own ends with the way to it. */
.story-more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--page-text, var(--text));
  font-weight: 700;
  text-decoration: none;
}
.story-more::after { content: " ›"; }
.story-more:hover { text-decoration: underline; text-underline-offset: 0.15em; }

/* The art sits on the band's bottom edge. A Mac window keeps its left edge
   (traffic lights, sidebar) and may run off toward the screen edge; the
   flipped side mirrors that. */
.story-art {
  position: relative;
  align-self: end;
  justify-self: start;
  min-width: 0;
  margin: 0;
}

.story-beat.is-flipped .story-art { justify-self: end; }
.story-beat[data-platform="ios"] .story-art { justify-self: center; }

.story-shot {
  /* How far up the image the fold cuts it: past the empty margin under the
     window (--ib), then --tuck of the image's height into the window itself. */
  --fold: calc(var(--w) / var(--ar) * (var(--ib) + var(--tuck)));
  position: relative;
  left: var(--shift);
  display: block;
  width: var(--w);
  margin-bottom: calc(var(--fold) * -1);
  transform: translateY(var(--lift, 0px)) rotate(var(--tilt));
  transform-origin: bottom left;
  transition: transform var(--transition-move);
}

/* Shade where the window goes into the pocket: the pocket's shadow falling ON
   the art, which is what makes the cut read as tucked rather than cropped.
   A band of gradient across the image at the fold, MASKED BY THE IMAGE ITSELF
   (--mask), so it darkens the art's own pixels and nothing else. As a plain
   rectangle it showed as a dark block wherever the capture was transparent:
   beside a sheet that hangs below its window, around a phone's corners.
   It starts 2rem below the fold, out of sight, so the tilt can't lift a corner
   clear of it. */
.story-shot::after {
  content: "";
  position: absolute;
  inset: 0;   /* the image's box exactly, so the mask lines up with the image */
  background: linear-gradient(to top,
    rgb(0 0 0 / calc(0.36 * var(--seam, 1))) 0, rgb(0 0 0 / calc(0.36 * var(--seam, 1))) 2rem, rgb(0 0 0 / calc(0.1 * var(--seam, 1))) 4.2rem, rgba(0, 0, 0, 0) 100%)
    left 0 bottom calc(var(--fold) - 2rem) / 100% 6.5rem no-repeat;
  -webkit-mask: var(--mask) center / 100% 100% no-repeat;
          mask: var(--mask) center / 100% 100% no-repeat;
  pointer-events: none;
}
.story-beat.is-flipped .story-shot { --tilt: 2deg; transform-origin: bottom right; }
/* Hover the column, not the window: the window moves, and a thing that
   moves out from under the cursor flickers. */
.story-art:hover .story-shot { --lift: -8px; }
.story-shot img { display: block; width: 100%; height: auto; }

/* ── Wide: a big Mac window gets the whole band ───────────────────────────────
   Title and paragraph in a row above it, cut to the window's own width so
   their edges line up with it; the window below at 1:1, or the full width of
   the screen if that's smaller. ── */
.story-beat--wide {
  --w: min(var(--native), (100vw - 2 * var(--gutter)) / var(--vis));
  --shift: calc(var(--w) * (var(--ir) - var(--il)) / 2);   /* the window is centred, not the image */
  --tuck: 0.1;
  --tilt: -1deg;
}

.story-beat--wide .story-beat-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: none;
  padding-inline: var(--gutter);
}

.story-beat--wide .story-copy {
  width: calc(var(--w) * var(--vis));   /* the window's width, so their edges line up */
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  column-gap: var(--gap);
  align-items: end;
  padding-bottom: clamp(2rem, 4vw, 3.25rem);
}

.story-beat--wide .story-device { grid-column: 1 / -1; }
.story-beat--wide .story-body { margin: 0; padding-bottom: 0.2em; }
.story-beat--wide .story-art { align-self: center; }

/* ── Siri: nothing to photograph, so the exchange is drawn ────────────────────
   Not clipped, so not tilted. SiriExchange is sized in container units; this
   gives it a container. ── */
.story-beat--siri .story-art {
  align-self: center;
  justify-self: center;
  padding-bottom: var(--pad);
}

.story-siri {
  width: min(600px, var(--room));
  aspect-ratio: 6 / 5;
  container-type: size;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
}
.story-siri .screen-voice,
.story-siri .screen-shortcut { margin: 0; }

/* ── Demo: a mechanic a still cannot show, drawn and running ──────────────────
   Components::Story::Demo. Laid out like the Siri band: copy one side, the
   demo the other, centred and not tucked into the fold. ── */
.story-beat--demo .story-art {
  align-self: center;
  justify-self: center;
  padding-bottom: var(--pad);
}

.story-demo { width: min(500px, var(--room)); }

/* The feature page draws the same demo above its article. */
.feature-demo {
  display: flex;
  justify-content: center;
  margin: 0 0 var(--space-lg);
}
.feature-demo .triage-demo { width: min(500px, 100%); }

/* The app's spring (response 0.35, damping 0.85, SwiftUI's .spring and
   .snappy alike), sampled: x(t) = 1 - e^(-z w t)(cos(wd t) + z w / wd sin(wd t))
   at 25 points over 1.6 responses, so a transition runs 1.6 x the response
   (0.56s for 0.35, 0.48s for 0.3). It is at 95% at 0.59 of the response and
   overshoots by 0.6%. */
:root {
  --spring: linear(0, 0.069, 0.218, 0.388, 0.547, 0.681, 0.786, 0.864, 0.919, 0.956, 0.98, 0.994, 1.002, 1.005,
    1.006, 1.006, 1.005, 1.004, 1.003, 1.002, 1.001, 1.001, 1.001, 1, 1);
}

/* ── Mail row ─────────────────────────────────────────────────────────────────
   Components::MailRow: the app's list row (ThreadRowView), drawn once for the
   Triage and the Search demos. Inks are Theme.Ink's row inks; sizes are the
   app's points (`--pt`, set by the demo around it).

   Mac (mac-round captures, 2 px a point): 83 tall with a full-width hairline
   on top; the text column at 51.7, 25 short of the trailing edge, its first
   line 11 down; senders and subject 15, preview and date 13, lines 2 apart.
   The gutter is one column centred at 33.5: the star (13) centred 21.7 down,
   on the senders' line, the dot (9) centred 41.5 down, on the subject's. A
   paperclip trails the subject.

   Weight: unread senders bold, an unread subject semibold. Semibold is 600
   with the weight axis set to 590, Apple's semibold: Chrome on a Mac draws
   600 as the system font at wght 600 (its DevTools name it ".SFNS-Bold",
   the nearest named instance; the axis is 600): the app's subject line is
   220.0pt, Chrome's at 600 220.5, at 590 220.0. And it fakes bold over the
   regular face for any weight under 600, so 590 is never written as a
   font-weight. ── */
.mail-row {
  --mr-name-u: #000;
  --mr-body-u: #48484d;
  --mr-name-r: #58585d;
  --mr-body-r: #76767b;
  --mr-dot: #0a66e0;
  --mr-star: #ffcc00;
  --mr-line: #e5e5e5;
  --mr-sel: #48484d;
  --mr-sel-ink: #fff;
  --mr-sel-meta: #dbdbe0;
  --mr-sel-star: #ffcc00;
  position: relative;
  height: var(--row);
  overflow: hidden;
  transition: height 0.56s var(--spring), opacity 0.3s ease, background-color 0.15s ease;
}

@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) .mail-row {
    --mr-name-u: #fff;
    --mr-body-u: #b0b0b6;
    --mr-name-r: #a2a2a8;
    --mr-body-r: #8a8a8f;
    --mr-dot: #3b8cff;
    --mr-star: #ffd60a;
    --mr-line: #393939;
    --mr-sel: #c7c7cc;
    --mr-sel-ink: #121214;
    --mr-sel-meta: #333338;
    --mr-sel-star: #734a00;
  }
}

.mail-row :where(p) { margin: 0; }
.mail-row-glyph { display: block; width: 100%; height: 100%; }

.mail-row-gutter { position: absolute; top: 0; left: 0; width: calc(2 * var(--mr-gut)); height: 100%; }
.mail-row-dot { position: absolute; display: block; border-radius: 50%; background: var(--mr-dot); }
.mail-row-star { position: absolute; color: var(--mr-star); }
.mail-row-clip { color: var(--mr-meta); }

.mail-row-text { position: absolute; left: var(--mr-text); right: var(--mr-trail); }
.mail-row-head,
.mail-row-line { display: flex; align-items: baseline; gap: calc(8 * var(--pt)); }
.mail-row-sender,
.mail-row-subject { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row-time { flex: none; font-variant-numeric: tabular-nums; }
.mail-row-hit { font-weight: inherit; transition: color 0.3s ease; }

/* Read and unread, as whole rows. */
.mail-row.is-unread { --mr-name: var(--mr-name-u); --mr-meta: var(--mr-body-u); }
.mail-row.is-read { --mr-name: var(--mr-name-r); --mr-meta: var(--mr-body-r); }
.mail-row :is(.mail-row-sender, .mail-row-subject) { color: var(--mr-name); }
.mail-row :is(.mail-row-preview, .mail-row-time) { color: var(--mr-meta); }
.mail-row.is-unread .mail-row-sender { font-weight: 700; }
.mail-row.is-unread .mail-row-subject { font-weight: 600; font-variation-settings: "wght" 590; }

/* The selected row: the accent with its text inverted, the dot in the ink. */
.mail-row.is-selected { --mr-name: var(--mr-sel-ink); --mr-meta: var(--mr-sel-meta); --mr-dot: var(--mr-sel-ink); --mr-star: var(--mr-sel-star); background: var(--mr-sel); }

.mail-row-place {
  position: absolute;
  right: var(--mr-trail);
  bottom: calc(9 * var(--pt));
  padding: calc(1 * var(--pt)) calc(6 * var(--pt));
  border-radius: calc(5 * var(--pt));
  background: var(--sd-chip);
  color: var(--sd-secondary);
  font-size: calc(11 * var(--pt));
  font-weight: 500;
  letter-spacing: 0;
}

/* The Mac. */
.mail-row--mac {
  --mr-gut: calc(33.5 * var(--pt));
  --mr-text: calc(51.7 * var(--pt));
  --mr-trail: calc(25 * var(--pt));
  font-size: calc(15 * var(--pt));
  font-variation-settings: "opsz" 17;
  letter-spacing: 0;           /* Chrome's SF already tracks as AppKit does: Elena Vasquez 97.5 against the app's 98.0, The Dispatch bold 95.5 against 95.5 */
  line-height: 1.233;          /* AppKit's line for SF: the rows' 20.5pt pitch */
}
.mail-row--mac::before { content: ""; position: absolute; inset: 0 0 auto; border-top: 1px solid var(--mr-line); }
.mail-row--mac.is-selected::before { border-top-color: transparent; }
.mail-row--mac .mail-row-star { top: calc(15.2 * var(--pt)); left: calc(var(--mr-gut) - 6.5 * var(--pt)); width: calc(13 * var(--pt)); height: calc(13 * var(--pt)); }
.mail-row--mac .mail-row-dot { top: calc(37 * var(--pt)); left: calc(var(--mr-gut) - 4.5 * var(--pt)); width: calc(9 * var(--pt)); height: calc(9 * var(--pt)); }
.mail-row--mac .mail-row-text { top: calc(11 * var(--pt)); display: flex; flex-direction: column; gap: calc(2 * var(--pt)); }
.mail-row--mac .mail-row-head { position: relative; top: calc(-1 * var(--pt)); }   /* its caps 14.5 down, as the app's; the lines below stay */
.mail-row--mac :is(.mail-row-time, .mail-row-preview) { font-size: calc(13 * var(--pt)); }   /* a preview 162.0 against 162.5 */
.mail-row--mac .mail-row-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row--mac .mail-row-clip { flex: none; width: calc(13 * var(--pt)); height: calc(13 * var(--pt)); align-self: center; }

/* The iPhone, measured from each row's rule in app-phone/inbox-light (3x):
   107 a row. Baselines at 30.0 (the senders, 17, and the date, 13, beside
   them; 29.67), 51.33 (the subject, 15) and 72.33 / 90.33 (the preview, 15,
   two lines kept, an 18 pitch). One slot per line in the gutter: the dot, 10,
   centred 20 in and 25 down beside the senders; the star on the subject's
   line; the paperclip on the preview's. The text at 36, the date's ink ending
   12.67 from the edge, the rule from the text's edge to the screen's in
   #e4e4e8 (#232326 dark). The rows of both drawn iPhones are this one. */
.mail-row--phone {
  --row: calc(107 * var(--pt));
  --mr-line: #e4e4e8;
  --mr-gut: calc(20 * var(--pt));
  --mr-text: calc(36 * var(--pt));
  --mr-trail: calc(12 * var(--pt));
  --mr-l1: calc(25 * var(--pt));
  --mr-l2: calc(46 * var(--pt));
  --mr-l3: calc(67 * var(--pt));
  font-size: calc(17 * var(--pt));
  letter-spacing: 0;
}
@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) .mail-row--phone { --mr-line: #232326; --mr-body-r: #77777c; }
}
.mail-row--phone::before { content: ""; position: absolute; top: 0; left: var(--mr-text); right: 0; border-top: 1px solid var(--mr-line); }
.mail-row--phone .mail-row-dot { top: calc(var(--mr-l1) - 5 * var(--pt)); left: calc(var(--mr-gut) - 5 * var(--pt)); width: calc(10 * var(--pt)); height: calc(10 * var(--pt)); }
.mail-row--phone :is(.mail-row-star, .mail-row-clip) { position: absolute; left: calc(var(--mr-gut) - 6.5 * var(--pt)); width: calc(13 * var(--pt)); height: calc(13 * var(--pt)); }
.mail-row--phone .mail-row-star { top: calc(var(--mr-l2) - 6.5 * var(--pt)); }
.mail-row--phone .mail-row-clip { top: calc(var(--mr-l3) - 6.5 * var(--pt)); }
/* Line boxes of 20, 18 and 18 with 3 between put the baselines where the
   app's are (drawn 30.0, 51.0, 72.0 against 30.0, 51.33, 72.33: a device
   pixel, which is as near as the 3x grid lets it come; 19.67 lands a pixel
   the other way, at 52.0). The head is held to 19.33, the senders' line
   overhanging it, so the date's own box cannot push the subject down. */
.mail-row--phone .mail-row-text { top: calc(14 * var(--pt)); display: flex; flex-direction: column; gap: calc(3 * var(--pt)); }
.mail-row--phone .mail-row-head { height: calc(19.33 * var(--pt)); line-height: calc(20 * var(--pt)); }
.mail-row--phone :is(.mail-row-line, .mail-row-preview) { font-size: calc(15 * var(--pt)); line-height: calc(18 * var(--pt)); }
.mail-row--phone .mail-row-time { font-size: calc(13 * var(--pt)); line-height: calc(16 * var(--pt)); }
.mail-row--phone .mail-row-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.mail-row--phone .mail-row-place { font-size: calc(12 * var(--pt)); bottom: calc(11 * var(--pt)); }

/* ── Phone bezel ──
   Components::PhoneBezel, the frame of both drawn iPhones, from the
   simulator's own device chrome for the 17 Pro and 18 Pro (DeviceKit phone11,
   read at 3x): 15 around the 402 x 874 screen, so 432 x 904 in all; the outer
   corner 77, concentric with the screen's 62; from the edge in, 1 of
   highlight (#7e7e7e), 5 of metal (#2c2c2c), then the black glass. */
.phone-bezel {
  padding: calc(15 * var(--pt));
  border-radius: calc(77 * var(--pt));
  background: #000;
  box-shadow: inset 0 0 0 calc(1 * var(--pt)) #7e7e7e, inset 0 0 0 calc(6 * var(--pt)) #2c2c2c,
              0 18px 40px rgb(0 0 0 / calc(var(--cast, 0) + 0.14));
}

/* ── Phone bar ──
   Components::PhoneBar, the foot of both drawn iPhones, as the app draws it
   (app-phone/inbox-light and inbox-dark at 3x; points on the 402 screen). The
   oval 35 to 313 and Compose, a 46 disc, 321 to 367: 35 in from each edge, 8
   apart, both 793 to 839 down. In the oval the + well at its leading end,
   nearest the thumb, a 36 disc 5 from the oval's end (40 to 76), its plus 13
   long and 2.3 thick; then the placeholder at 48, its ink 48.7 in on a 821.7
   baseline (the app's rest-empty still, fan-reach). Light: white with a grey
   ring of one device pixel feathered by a lighter one outside it, and a soft
   shadow under it. Dark: #2b2b2e with a lighter inner ring and no
   shadow. The list runs under it in full ink, as the app's does. */
.phone-bar {
  --pb-fill: #fff;
  --pb-ring: rgb(0 0 0 / 0.15);
  --pb-shadow: rgb(0 0 0 / 0.15);
  --pb-place: #57575c;
  --pb-ink: #000;
  --pb-well: #e6eefb;
  --pb-blue: #0a66e0;
  position: absolute;
  z-index: var(--phone-bar-z, 1);
  top: calc(793 * var(--pt));
  left: calc(35 * var(--pt));
  right: calc(35 * var(--pt));
  display: flex;
  gap: calc(8 * var(--pt));
  height: calc(46 * var(--pt));
  font-size: calc(15 * var(--pt));
  letter-spacing: 0;
}
@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) .phone-bar {
    --pb-fill: #2b2b2e;
    --pb-ring: #48484b;
    --pb-shadow: transparent;
    --pb-place: #c7c7cc;
    --pb-ink: #fff;
    --pb-well: #233249;
    --pb-blue: #3b8cff;
  }
}
.phone-oval,
.phone-compose {
  position: relative;
  height: 100%;
  border-radius: calc(23 * var(--pt));
  background: var(--pb-fill);
  box-shadow: 0 0 0 calc(0.33 * var(--pt)) var(--pb-ring), 0 0 0 calc(0.67 * var(--pt)) rgb(0 0 0 / 0.14),
              0 calc(2 * var(--pt)) calc(12 * var(--pt)) var(--pb-shadow);
}
@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) :is(.phone-oval, .phone-compose) { box-shadow: inset 0 0 0 calc(0.5 * var(--pt)) var(--pb-ring); }
}
.phone-oval { flex: 1; color: var(--pb-place); white-space: nowrap; }
.phone-bar-place { position: absolute; top: 0; left: calc(48 * var(--pt)); line-height: calc(46 * var(--pt)); }
/* The placeholder (and the Search demo's words) on the app's 821.7 baseline. */
.phone-bar :is(.phone-bar-place, .sd-words) { translate: 0 calc(-0.67 * var(--pt)); }
.phone-compose { flex: none; display: grid; place-items: center; width: calc(46 * var(--pt)); color: var(--pb-ink); }
.phone-glyph--compose { width: calc(24 * var(--pt)); height: calc(24 * var(--pt)); }
.phone-bar .phone-plus {
  position: absolute;
  top: calc(5 * var(--pt));
  left: calc(5 * var(--pt));
  display: grid;
  place-items: center;
  width: calc(36 * var(--pt));
  height: calc(36 * var(--pt));
  margin: 0;
  border-radius: 50%;
  background: var(--pb-well);
  color: var(--pb-blue);
}
.phone-bar .phone-plus svg { width: calc(19 * var(--pt)); height: calc(19 * var(--pt)); color: inherit; stroke-width: 2.95; }

/* ── Phone chrome ──
   Components::PhoneChrome, the top of both drawn iPhones, as the app draws it
   (app-phone/inbox-light at 3x; points on the 402 screen). The clock, 18
   semibold, its ink centred 81.33 in on a 39.0 baseline; signal at 277, Wi-Fi
   at 305.8, the battery at 333, all 25.3 to 39.7 down; the island 126 by
   37.33, 11 down. Back and more in 45.33 glass discs 15.33 in from each edge,
   centred 84 down. "Inbox", 17 semibold, on a 90.67 baseline, then 7.33 to an
   18 disc holding the chevron, the pair centred. Under a subtitle (12, the
   secondary ink, on 99.0) the title rises to 83.0 (chain-launch). */
.phone-status,
.phone-nav {
  --ph-ink: #000;
  --ph-ink-2: #57575c;
  --ph-glass: #f9f9f9;
  --ph-edge: rgb(0 0 0 / 0.3);
  --ph-disc: #efeff0;
  color: var(--ph-ink);
  letter-spacing: 0;
}
@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) :is(.phone-status, .phone-nav) {
    --ph-ink: #fff;
    --ph-ink-2: #c7c7cc;
    --ph-glass: #1f1f1f;
    --ph-edge: transparent;
    --ph-disc: #1c1c1f;
  }
}
.phone-status { position: absolute; z-index: var(--phone-status-z, 1); inset: 0 0 auto; height: calc(54 * var(--pt)); pointer-events: none; }
.phone-time {
  position: absolute;
  top: calc(21.6 * var(--pt));
  left: calc(51.33 * var(--pt));
  width: calc(60 * var(--pt));
  font-size: calc(18 * var(--pt));
  font-weight: 600;
  line-height: calc(22 * var(--pt));
  text-align: center;
}
.phone-island {
  position: absolute;
  top: calc(11 * var(--pt));
  left: 50%;
  width: calc(126 * var(--pt));
  height: calc(37.33 * var(--pt));
  border-radius: calc(18.67 * var(--pt));
  background: #000;
  transform: translateX(-50%);
}
.phone-glyph { display: block; }
.phone-status .phone-glyph { position: absolute; }
.phone-glyph--signal { top: calc(26 * var(--pt)); left: calc(277 * var(--pt)); width: calc(20.5 * var(--pt)); height: calc(13.67 * var(--pt)); }
.phone-glyph--wifi { top: calc(25.33 * var(--pt)); left: calc(305.8 * var(--pt)); width: calc(19.2 * var(--pt)); height: calc(14.33 * var(--pt)); }
.phone-glyph--battery { top: calc(25.33 * var(--pt)); left: calc(333 * var(--pt)); width: calc(29 * var(--pt)); height: calc(13.67 * var(--pt)); }

.phone-nav { position: absolute; z-index: 1; inset: 0 0 auto; height: calc(116 * var(--pt)); pointer-events: none; }
.phone-round {
  position: absolute;
  top: calc(61.5 * var(--pt));
  display: grid;
  place-items: center;
  width: calc(45 * var(--pt));   /* 45.33 with its ring, as the capture measures it */
  height: calc(45 * var(--pt));
  border-radius: 50%;
  background: var(--ph-glass);
  box-shadow: 0 0 0 calc(0.33 * var(--pt)) var(--ph-edge);   /* a device pixel of grey and no shadow; none in dark */
}
.phone-back { left: calc(15.5 * var(--pt)); }
.phone-more { right: calc(15.5 * var(--pt)); }
/* The glyphs' ink: back 31 to 42 across, more 354 to 373.8, both centred 84.33 down. */
.phone-glyph--back { width: calc(11 * var(--pt)); height: calc(18.67 * var(--pt)); translate: calc(-1.17 * var(--pt)) calc(0.67 * var(--pt)); }
.phone-glyph--more { width: calc(19.8 * var(--pt)); height: calc(4 * var(--pt)); }
.phone-title { position: absolute; top: calc(73.63 * var(--pt)); left: 0; right: 0; text-align: center; transition: transform 0.3s ease 0.9s; }
.phone-title :where(p) { margin: 0; }
.phone-title-name {
  display: inline-flex;
  align-items: center;
  gap: calc(7.17 * var(--pt));
  font-size: calc(17 * var(--pt));
  font-weight: 600;
  line-height: calc(22 * var(--pt));
}
.phone-chevron {
  position: relative;
  top: calc(-0.63 * var(--pt));
  display: grid;
  place-items: center;
  width: calc(18 * var(--pt));
  height: calc(18 * var(--pt));
  border-radius: 50%;
  background: var(--ph-disc);
  color: var(--ph-ink-2);
}
.phone-glyph--chevron { width: calc(9 * var(--pt)); height: calc(5 * var(--pt)); translate: 0 calc(0.67 * var(--pt)); }
.phone-title .phone-title-sub {
  display: grid;
  justify-items: center;
  margin-top: calc(-1.67 * var(--pt));
  color: var(--ph-ink-2);
  font-size: calc(12 * var(--pt));
  line-height: calc(16 * var(--pt));
}

/* ── Triage demo ──────────────────────────────────────────────────────────────
   Components::TriageDemo: a miniature of Email on a Mac, an iPhone or an iPad
   (`data-platform`), playing one of two scenes (`data-scene`). `data-step` on
   the root moves on a timer; everything that moves is a transition below, keyed
   on that attribute, so the timing of each step lives here.

   triage
     1  Mac: the pointer reaches the second row (0.7s), presses (0.75s), the
        menu opens under it (1.1s). iPhone, iPad: a finger presses the row and
        the mail lifts out with its context menu (0.7s)
     2  over to Notifications, which highlights
     3  the menu closes; the three Harborline rows collapse together while the
        Inbox count drops and Notifications glows once. iPhone, iPad: the toast comes up
     4  Mac: the keycaps come up and press. iPhone, iPad: the finger taps Undo.
        The rows come back

   screening
     1  a new Harborline message rises through the sidebar into Notifications
     2  a new message from a person slides into the top of the list
     3  held

   The screen keeps its own colours, light or dark with the system like the
   app, whatever ground it sits on. Geometry is in px from the top of the
   screen (rows are a fixed height) and % across it, so the pointer, finger and
   menu land on the same rows at any width. ── */
.triage-demo {
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);   /* --transition-move's curve */
  --bar: 40px;      /* everything above the first row */
  --row: 46px;
  --rows: 6;        /* how many rows the screen is tall enough for */
  --foot: 56px;     /* the room under them */
  --side: clamp(108px, 30%, 150px);
  --side-top: var(--bar);   /* where the sidebar's rows start */
  --place: 28px;    /* a sidebar row */
  --item: 24px;     /* a menu row */
  --press-x: 50%;   /* where the second row is pressed */
  --menu-top: 113px;
  --win: #fff;
  --win-side: #f2f2f4;
  --win-ink: #1d1d1f;
  --win-ink-2: #6e6e73;
  --win-line: rgb(0 0 0 / 0.08);
  --win-press: rgb(0 0 0 / 0.07);
  --win-menu: rgb(248 248 250 / 0.97);
  --win-key: #fff;
  --win-key-edge: rgb(0 0 0 / 0.16);
  --win-ring: rgb(0 0 0 / 0.12);
  --win-dim: rgb(60 60 67 / 0.22);
  --win-danger: #c9201a;
  /* The app's own accent, a graphite: not the system blue. */
  --win-pick: #48484d;
  --win-pick-ink: #fff;
  width: 100%;
  margin: 0;
  /* The system's, so Apple devices draw SF as the app does; never the page's. */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) .triage-demo {
    --win: #242426;
    --win-side: #2d2d30;
    --win-ink: #f2f2f7;
    --win-ink-2: #a1a1a8;
    --win-line: rgb(255 255 255 / 0.08);
    --win-press: rgb(255 255 255 / 0.08);
    --win-menu: rgb(52 52 56 / 0.97);
    --win-key: #55555b;
    --win-key-edge: rgb(0 0 0 / 0.5);
    --win-ring: rgb(255 255 255 / 0.14);
    --win-dim: rgb(0 0 0 / 0.42);
    --win-danger: #ff6b61;
    --win-pick: #c7c7cc;
    --win-pick-ink: #1d1d1f;
  }
}

/* The iPhone: a screen the proportions of the app's, in a plain frame. */
.triage-demo[data-platform="ios"] {
  --bar: 152px;
  --row: 62px;
  --foot: 40px;
  --item: 29px;
  --press-x: 46%;
  --menu-top: 176px;
  --menu-w: 212px;
  --menu-title: 22px;
  --pick-x: 62%;
  max-width: 286px;
  margin-inline: auto;
}

/* The iPad: the sidebar and the list. */
.triage-demo[data-platform="ipados"] {
  --bar: 120px;
  --row: 50px;
  --foot: 22px;
  --side: clamp(112px, 30%, 150px);
  --side-top: 74px;
  --item: 25px;
  --press-x: calc(var(--side) + (100% - var(--side)) * 0.45);
  --menu-top: 34px;
  --menu-w: 192px;
  --menu-title: 20px;
  --pick-x: calc(100% - 96px);
}

.triage-demo[data-scene="screening"] { --rows: 4; }

/* The iPad's frame. (The iPhone's is Components::PhoneBezel, "Phone bezel".) */
.triage-demo[data-platform="ipados"] .triage-bezel {
  padding: 9px;
  border-radius: 24px;
  background: #1b1b1d;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.16), 0 18px 40px rgb(0 0 0 / calc(var(--cast, 0) + 0.14));
}

.triage-window {
  position: relative;
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  height: calc(var(--bar) + var(--rows) * var(--row) + var(--foot));
  overflow: hidden;
  border-radius: 12px;
  background: var(--win);
  color: var(--win-ink);
  /* The hairline, then the shadow a Mac window casts: --cast on a grey ground
     (PageGround), and a soft one anywhere else so it still lifts off a colour. */
  box-shadow: 0 0 0 0.5px var(--win-ring), 0 18px 40px rgb(0 0 0 / calc(var(--cast, 0) + 0.08));
  font-size: 12.5px;
  line-height: 1.25;
  text-align: left;
  user-select: none;
}

.triage-bezel .triage-window { box-shadow: none; }
.triage-demo[data-platform="ios"] .triage-window { grid-template-columns: minmax(0, 1fr); border-radius: 32px; font-size: 12px; }
.triage-demo[data-platform="ipados"] .triage-window { border-radius: 15px; font-size: 11px; }

/* :where, so the reset never outranks the rules below. */
.triage-window :where(p, ul) { margin: 0; padding: 0; list-style: none; }

.triage-status {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 22px;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 600;
}

.triage-battery {
  width: 19px;
  height: 9px;
  border-radius: 3px;
  background: var(--win-ink);
  opacity: 0.8;
}

.triage-sidebar {
  padding: var(--side-top) 8px 0;
  background: var(--win-side);
  border-right: 1px solid var(--win-line);
}

.triage-side-title {
  position: absolute;
  top: 26px;
  left: 15px;
  font-size: 13px;
  font-weight: 700;
}

.triage-side-group {
  position: absolute;
  top: 52px;
  left: 15px;
  color: var(--win-ink-2);
  font-size: 10.5px;
  font-weight: 600;
}

.triage-lights {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 7px;
}

.triage-light {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 0.14);
}
.triage-light:nth-child(2) { background: #febc2e; }
.triage-light:nth-child(3) { background: #28c840; }

.triage-place {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--place);
  padding: 0 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.triage-place.is-selected { background: var(--win-press); font-weight: 600; }
.triage-demo[data-platform="ipados"] .triage-place { border-radius: 14px; }

.triage-place-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.triage-icon {
  flex: none;
  overflow: visible;   /* person.2 is wider than the grid, as the symbol is */
  width: 15px;
  height: 15px;
  color: var(--win-pick);
}

.triage-dot {
  width: 6px;
  height: 6px;
  margin-right: 3px;
  border-radius: 50%;
  background: var(--win-ink-2);
}

/* Two numbers in one cell: the count before the change and after it. */
.triage-count {
  display: grid;
  min-width: 1.2em;
  color: var(--win-ink-2);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  text-align: right;
  transition: color 0.3s ease;
}
.triage-count-was,
.triage-count-now {
  grid-area: 1 / 1;
  transition: opacity 0.3s ease, transform 0.45s var(--ease);
}
.triage-count-now { opacity: 0; transform: translateY(6px); }

.triage-list { min-width: 0; }

.triage-list-title {
  display: flex;
  align-items: center;
  height: var(--bar);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
}

/* iPhone and iPad: the bar of round buttons, the big title, the search field.
   Together they come to --bar. */
.triage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  margin-top: 22px;
  padding: 0 10px;
}

.triage-round {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--win-press);
}
.triage-round .triage-icon { width: 14px; height: 14px; color: var(--win-ink); }

.triage-demo:not([data-platform="macos"]) .triage-list-title { height: 32px; padding: 0 12px; font-size: 18px; }

.triage-search {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  margin: 0 10px 10px;
  padding: 0 9px;
  border-radius: 13px;
  background: var(--win-press);
  color: var(--win-ink-2);
}
.triage-demo[data-platform="ios"] .triage-search { height: 30px; border-radius: 15px; }
.triage-search .triage-icon { width: 12px; height: 12px; color: inherit; }

/* Rows leave and come back on the app's spring (--spring, 0.35 / 0.85). */
.triage-row {
  height: var(--row);
  overflow: hidden;
  transition: height 0.56s var(--spring), opacity 0.3s ease;
}

/* Press and hold: the Destination menu comes up under the pointer. */
.triage-menu {
  position: absolute;
  top: var(--menu-top);
  left: calc(var(--press-x) + 2px);
  width: 156px;
  padding: 5px;
  border-radius: 8px;
  background: var(--win-menu);
  box-shadow: 0 0 0 0.5px var(--win-ring), 0 10px 28px rgb(0 0 0 / 0.22);
  opacity: 0;
  transform: scale(0.97);
  transform-origin: top left;
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
  pointer-events: none;
}

.triage-menu-title {
  height: 22px;
  padding: 0 8px;
  color: var(--win-ink-2);
  font-size: 11px;
  font-weight: 600;
  line-height: 22px;
}

.triage-menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--item);
  padding: 0 8px 0 4px;
  border-radius: 5px;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.triage-tick { width: 12px; }

/* iPhone: a tick column, the sender's current destination checked. */
.triage-demo[data-platform="ios"] .triage-peek .triage-menu-item { gap: 6px; padding-left: 6px; }
.triage-demo[data-platform="ios"] .triage-tick { display: grid; flex: none; place-items: center; width: 13px; }
.triage-demo[data-platform="ios"] .triage-tick .triage-icon { width: 13px; height: 13px; stroke-width: 2.4; }

.triage-menu-item .triage-icon { width: 14px; height: 14px; }

/* iPhone and iPad: the context menu. The peek dims the list and fades as one,
   so the menu and the preview inside it stay put. */
.triage-peek {
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;   /* the blur has to stop at the screen's corners */
  background: var(--win-dim);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.triage-peek .triage-menu {
  left: 12px;
  width: var(--menu-w);
  max-width: calc(100% - 24px);
  border-radius: 13px;
  opacity: 1;
  transform: none;
}
.triage-demo[data-platform="ipados"] .triage-peek .triage-menu { left: auto; right: 12px; }

.triage-peek .triage-menu-item { gap: 8px; padding: 0 9px; border-radius: 8px; }
.triage-peek .triage-menu-item.is-destructive,
.triage-peek .triage-menu-item.is-destructive .triage-icon { color: var(--win-danger); }

.triage-peek .triage-menu-title {
  position: relative;
  height: var(--menu-title);
  margin-top: 7px;
  padding: 0 9px;
  line-height: var(--menu-title);
}

.triage-menu-last { position: relative; margin-top: 7px; }

.triage-peek .triage-menu-title::before,
.triage-menu-last::before {
  content: "";
  position: absolute;
  top: -4px;
  inset-inline: 6px;
  height: 1px;
  background: var(--win-line);
}

.triage-preview {
  position: absolute;
  top: 46px;
  left: 12px;
  right: 12px;
  height: 118px;
  overflow: hidden;
  padding: 11px 13px;
  border-radius: 13px;
  background: var(--win);
  box-shadow: 0 8px 26px rgb(0 0 0 / 0.2);
}
.triage-demo[data-platform="ipados"] .triage-preview {
  top: var(--menu-top);
  right: calc(var(--menu-w) + 22px);
  height: 104px;
  padding: 9px 11px;
}

.triage-preview-subject { font-weight: 700; }
.triage-preview-from { margin-top: 2px; color: var(--win-ink-2); font-size: 0.9em; }
.triage-preview-body { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--win-line); }

/* iPhone and iPad: what Undo is there. Bottom centre of the whole screen. */
.triage-toast {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 14px;
  display: flex;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--win-menu);
  box-shadow: 0 0 0 0.5px var(--win-ring), 0 4px 14px rgb(0 0 0 / 0.16);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 14px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}

.triage-toast-undo { color: var(--win-pick); font-weight: 700; }

/* A fingertip. It only ever moves while it is on the glass or out of sight. */
.triage-touch {
  position: absolute;
  z-index: 4;
  top: calc(var(--bar) + 1.5 * var(--row));
  left: var(--press-x);
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  background: rgb(120 120 128 / 0.42);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.55), 0 2px 8px rgb(0 0 0 / 0.2);
  opacity: 0;
  transition: top 0.5s var(--ease) 0.3s, left 0.5s var(--ease) 0.3s, opacity 0.25s ease, transform 0.2s ease;
}

/* New mail from Harborline, on its way up the sidebar. */
.triage-arrival {
  position: absolute;
  z-index: 2;
  top: calc(var(--side-top) + var(--target, 3) * var(--place) - 4px);
  left: 6px;
  display: grid;
  width: calc(var(--side) - 13px);
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--win-pick);
  color: var(--win-pick-ink);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.22);
  font-size: 0.92em;
  line-height: 1.2;
  opacity: 0;
}
.triage-arrival-from { font-weight: 700; }
.triage-arrival-subject { overflow: hidden; opacity: 0.8; text-overflow: ellipsis; white-space: nowrap; }

.triage-pointer {
  position: absolute;
  z-index: 4;   /* over the popover and the Undo capsule */
  top: 318px;
  left: 84%;
  width: 16px;
  height: 24px;
  filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 0.3));
  transform-origin: 2px 2px;
  transition: top 0.7s var(--ease), left 0.7s var(--ease), transform 0.15s ease;
}
.triage-pointer svg { display: block; }

/* One line per step, stacked in one cell so the tallest reserves the room and
   nothing below moves when the line changes. */
.triage-captions {
  display: grid;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--page-text, var(--text));
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}

.triage-caption {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ── The steps ── */
.triage-demo[data-step="0"] .triage-caption[data-steps~="0"],
.triage-demo[data-step="1"] .triage-caption[data-steps~="1"],
.triage-demo[data-step="2"] .triage-caption[data-steps~="2"],
.triage-demo[data-step="3"] .triage-caption[data-steps~="3"],
.triage-demo[data-step="4"] .triage-caption[data-steps~="4"] { opacity: 1; }

/* 1: press and hold the first Harborline row. */
.triage-demo[data-step="1"] .triage-pointer {
  top: var(--press-y, calc(var(--bar) + 1.45 * var(--row)));
  left: var(--press-x);
  transform: scale(0.88);
  transition-delay: 0s, 0s, 0.75s;
}
.triage-demo[data-step="1"] .triage-menu,
.triage-demo[data-step="2"] .triage-menu { opacity: 1; transform: none; }
.triage-demo[data-step="1"] .triage-menu { transition-delay: 1.1s; }

.triage-demo[data-step="1"] .triage-peek,
.triage-demo[data-step="2"] .triage-peek { opacity: 1; }
.triage-demo[data-step="1"] .triage-peek { transition-delay: 0.7s; }
.triage-demo[data-step="1"] .triage-peek .triage-menu { transition-delay: 0s; }
/* The finger presses, then gets out of the way of the menu it opened. */
.triage-demo[data-step="1"] .triage-touch { animation: triage-hold 1s ease both; }

@keyframes triage-hold {
  0% { opacity: 0; transform: none; }
  15% { opacity: 1; }
  30%, 65% { opacity: 1; transform: scale(0.82); }
  100% { opacity: 0; transform: scale(0.82); }
}

/* 2: over to the target (--pick, its row in the menu: Notifications is the
   first destination in the Mac's list and in the iPad's section under the
   row's own actions, and the second on iPhone, whose menu is only
   destinations, Inbox first). */
.triage-demo[data-step="2"] .triage-touch {
  top: calc(var(--menu-top) + 5px + 3 * var(--item) + 7px + var(--menu-title) + (var(--pick, 2) + 0.5) * var(--item));
  left: var(--pick-x);
  opacity: 1;
  transform: scale(0.82);
  transition-delay: 0s;
}
.triage-demo[data-platform="ios"][data-step="2"] .triage-touch {
  top: calc(var(--menu-top) + var(--menu-pad, 5px) + (var(--pick, 3) + 0.5) * var(--item));
}
.triage-demo[data-step="2"] .triage-menu-item.is-chosen,
.triage-demo[data-step="3"] .triage-menu-item.is-chosen { background-color: var(--win-pick); color: var(--win-pick-ink); }
.triage-demo[data-step="2"] .triage-menu-item.is-chosen .triage-icon,
.triage-demo[data-step="3"] .triage-menu-item.is-chosen .triage-icon { color: var(--win-pick-ink); }
.triage-demo[data-step="2"] .triage-menu-item.is-chosen { transition-delay: 0.4s; }

/* 3: let go. Every Harborline row leaves at once and the counts follow. */
.triage-demo[data-scene="triage"][data-step="3"] .triage-row.is-moving {
  height: 0;
  opacity: 0;
  transition-delay: 0.15s, 0.1s;
}
.triage-demo[data-scene="triage"][data-step="3"] .triage-count-was { opacity: 0; transform: translateY(-6px); transition-delay: 0.3s; }
.triage-demo[data-scene="triage"][data-step="3"] .triage-count-now { opacity: 1; transform: none; transition-delay: 0.3s; }
.triage-demo[data-scene="triage"][data-step="3"] .triage-place.is-target { animation: triage-glow 1.4s ease 0.3s both; }
.triage-demo[data-scene="triage"][data-step="3"] .triage-place.is-target .triage-count { color: var(--win-pick); font-weight: 700; }
.triage-demo[data-step="3"] .triage-toast { opacity: 1; transform: translate(-50%, 0); transition-delay: 0.35s; }

/* The finger goes to Undo while it is off the glass. */
.triage-demo[data-step="3"] .triage-touch,
.triage-demo[data-step="4"] .triage-touch {
  top: calc(100% - 30px);
  left: calc(50% + 57px);
}

@keyframes triage-glow {
  0%, 100% { background-color: transparent; }
  30% { background-color: color-mix(in srgb, var(--win-pick) 16%, transparent); }
}

/* 4: Undo. The pointer clicks the capsule's Undo, or the toast's Undo is
   tapped, and everything comes back. */
.triage-demo[data-step="4"] .triage-row { transition-delay: 0.8s, 0.9s; }
.triage-demo[data-step="4"] .triage-count-was,
.triage-demo[data-step="4"] .triage-count-now { transition-delay: 0.85s; }
.triage-demo[data-step="4"] .triage-touch {
  opacity: 1;
  transition-delay: 0s, 0s, 0.1s;
  animation: triage-tap 0.32s ease 0.5s;
}
.triage-demo[data-step="4"] .triage-toast { transition-delay: 0.85s; }

@keyframes triage-tap {
  50% { transform: scale(0.74); }
}

/* Screening. The list stands still while Harborline's new mail goes by it, and
   only the person's message touches it. */
.triage-row.is-arriving { height: 0; opacity: 0; }
.triage-demo:is([data-step="2"], [data-step="3"]) .triage-row.is-arriving { height: var(--row); opacity: 1; }
.triage-demo[data-step="2"] .triage-row.is-arriving .mail-row { animation: triage-glow 1.6s ease 0.35s both; }

.triage-demo[data-step="1"] .triage-arrival { animation: triage-arrive 1.8s var(--ease) 0.2s both; }

@keyframes triage-arrive {
  0% { opacity: 0; transform: translateY(100px); }
  16% { opacity: 1; }
  66% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: scale(0.92); }
}

.triage-demo[data-scene="screening"]:is([data-step="1"], [data-step="2"], [data-step="3"]) .is-target .triage-count-was,
.triage-demo[data-scene="screening"]:is([data-step="2"], [data-step="3"]) .is-home .triage-count-was { opacity: 0; transform: translateY(-6px); }
.triage-demo[data-scene="screening"]:is([data-step="1"], [data-step="2"], [data-step="3"]) .is-target .triage-count-now,
.triage-demo[data-scene="screening"]:is([data-step="2"], [data-step="3"]) .is-home .triage-count-now { opacity: 1; transform: none; }
.triage-demo[data-scene="screening"]:is([data-step="1"], [data-step="2"], [data-step="3"]) .is-target .triage-count { color: var(--win-pick); font-weight: 700; }
.triage-demo[data-scene="screening"][data-step="1"] .is-target :is(.triage-count-was, .triage-count-now) { transition-delay: 1.25s; }
.triage-demo[data-scene="screening"][data-step="1"] .is-target .triage-count { transition-delay: 1.25s; }
.triage-demo[data-scene="screening"][data-step="2"] .is-home :is(.triage-count-was, .triage-count-now) { transition-delay: 0.3s; }
.triage-demo[data-scene="screening"][data-step="1"] .triage-place.is-target { animation: triage-glow 1.4s ease 1.2s both; }

/* A still: ?demo-step=N, or reduced motion. No motion at all. */
.triage-demo[data-still] *,
.triage-demo[data-still] .triage-place.is-target { transition: none !important; animation: none !important; }

/* Held mid-way, so a still of these steps still shows what they are. */
.triage-demo[data-still][data-step="1"] .triage-arrival { opacity: 1; transform: translateY(32px); }
.triage-demo[data-still][data-step="4"] .triage-toast { opacity: 1; transform: translate(-50%, 0); }
.triage-demo[data-still][data-step="4"] .triage-undo { opacity: 1; transform: translate(-50%, 0); }

/* Reduced motion: the after state, with the lines in order. */
@media (prefers-reduced-motion: reduce) {
  .triage-captions {
    display: block;
    list-style: decimal;
    width: fit-content;
    margin-inline: auto;
    padding-left: 1.4em;
    text-align: left;
  }
  .triage-captions .triage-caption { opacity: 1; }
}

@media (max-width: 799px) {
  .story-demo { width: min(520px, 100vw - 2 * var(--gutter)); }
  .story-beat--demo .story-art { padding-bottom: clamp(2rem, 6vw, 3rem); }
}

@media (max-width: 520px) {
  /* The iPad, which is still laid out to its slot. The Mac and the iPhone are
     drawn at the app's sizes and scaled whole (.device-stage), never re-set. */
  .triage-demo[data-platform="ipados"] { --side: 114px; --menu-w: 164px; --item: 24px; --pick-x: calc(100% - 44px); }
  .triage-demo[data-platform="ipados"] .triage-window { font-size: 10.5px; }
  .triage-demo[data-platform="ipados"] .triage-sidebar { padding-inline: 5px; font-size: 10px; }
  .triage-demo[data-platform="ipados"] .triage-place { gap: 4px; padding: 0 5px; }
  .triage-demo[data-platform="ipados"] .triage-place .triage-icon { width: 13px; height: 13px; }
  .triage-demo[data-platform="ipados"] :is(.triage-side-title, .triage-side-group) { left: 10px; }
  .triage-demo[data-platform="ipados"] .triage-arrival { left: 3px; width: calc(var(--side) - 7px); padding-inline: 7px; }
  .triage-demo[data-platform="ipados"] .triage-preview { left: 8px; right: calc(var(--menu-w) + 16px); padding: 8px 9px; }
  .triage-demo[data-platform="ipados"] .triage-peek .triage-menu { right: 8px; }
  .triage-captions { font-size: var(--text-sm); }
}

/* ── Recorded demo (Components::RecordedDemo) ────────────────────────────────
   A recording of the app's screen, with the screen's own corners (62pt on a
   402pt iPhone, as the drawn iPhone's window), a hairline, and the shadow the
   drawn demos cast. The poster sits under the video at the screen's ratio, so
   nothing moves when the video arrives. */
.recorded-demo {
  --rd-ring: rgb(0 0 0 / 0.12);
  --rd-ground: #f2f2f7;
  width: min(100%, 286px);
  margin-inline: auto;
  container-type: inline-size;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .recorded-demo { --rd-ring: rgb(255 255 255 / 0.14); --rd-ground: #1c1c1e; }
}
:root[data-theme="dark"] .recorded-demo { --rd-ring: rgb(255 255 255 / 0.14); --rd-ground: #1c1c1e; }

.recorded-frame {
  position: relative;
  aspect-ratio: var(--screen-w) / var(--screen-h);
  overflow: hidden;
  border-radius: calc(100cqw * 62 / var(--screen-w));
  background: var(--rd-ground);
  box-shadow: 0 0 0 0.5px var(--rd-ring), 0 18px 40px rgb(0 0 0 / calc(var(--cast, 0) + 0.08));
  user-select: none;
}
.recorded-poster img,
.recorded-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recorded-video { opacity: 0; transition: opacity 0.2s ease; }
.recorded-demo[data-playing] .recorded-video { opacity: 1; }

/* Where a finger is down: a soft disc, about a fingertip (44pt) across. */
.recorded-touch {
  position: absolute;
  width: calc(100cqw * 44 / var(--screen-w));
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 0.55) 0 45%, rgb(255 255 255 / 0) 72%);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06);
  translate: -50% -50%;
  scale: 0.6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, scale 0.12s ease;
}
.recorded-touch[data-down] { opacity: 1; scale: 1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .recorded-touch { background: radial-gradient(circle, rgb(255 255 255 / 0.4) 0 45%, rgb(255 255 255 / 0) 72%); }
}

/* The captions are the drawn demos', keyed on the same data-step. Until the
   script runs (no JavaScript, reduced motion) they are a list, in order. */
.recorded-demo[data-step="0"] .triage-caption[data-steps~="0"],
.recorded-demo[data-step="1"] .triage-caption[data-steps~="1"],
.recorded-demo[data-step="2"] .triage-caption[data-steps~="2"],
.recorded-demo[data-step="3"] .triage-caption[data-steps~="3"],
.recorded-demo[data-step="4"] .triage-caption[data-steps~="4"],
.recorded-demo[data-step="5"] .triage-caption[data-steps~="5"],
.recorded-demo[data-step="6"] .triage-caption[data-steps~="6"],
.recorded-demo[data-step="7"] .triage-caption[data-steps~="7"],
.recorded-demo[data-step="8"] .triage-caption[data-steps~="8"],
.recorded-demo[data-step="9"] .triage-caption[data-steps~="9"] { opacity: 1; }
.recorded-demo:not([data-live]) .triage-captions {
  display: block;
  list-style: decimal;
  width: fit-content;
  margin-inline: auto;
  padding-left: 1.4em;
  text-align: left;
}
.recorded-demo:not([data-live]) .triage-caption { opacity: 1; }

/* ── Device stage ───────────────────────────────────────────────────────────
   A drawn device is laid out once, a CSS pixel to each of the app's points, on
   a stage of the device's own size (--stage-w x --stage-h, set by the demo),
   and only ever scaled whole, so its type is the system's own at the app's
   sizes. A font set at 9.5px is not the 15pt font made smaller: San Francisco
   is spaced by size, and scaled type came out loose in a window that was
   otherwise right.

   The slot takes the width it is given and reserves the scaled height, so
   nothing below it moves. --fit is slot over stage, never past 1:1, as a
   number: tan(atan2(a, b)) is a / b without units (Safari 15.4, Chrome 111,
   Firefox 108). Where that is missing, the demo's script measures it. */
.device-slot {
  --fit: 1;
  height: calc(var(--stage-h) * var(--fit));
}
@supports (scale: tan(atan2(1px, 2px))) {
  .device-slot { --fit: min(1, tan(atan2(100cqw, var(--stage-w)))); }
}
.device-stage {
  width: var(--stage-w);
  margin-inline: auto;
  transform: scale(var(--fit));
  transform-origin: 0 0;
  /* At the app's sizes the browser's SF sets every role as wide as the app
     does, so nothing drawn here is tracked ("Triage demo at 1:1"). */
  letter-spacing: 0;
}

/* ── Triage demo at 1:1: the Mac and the iPhone ──────────────────────────────
   Measured from captures of the app (today's build) and its own numbers
   (Theme.swift, ThreadRowView, SidebarView), then drawn in the app's points.
   --pt is one of the app's points at the demo's size: the Mac window is the
   sidebar and the list (208 + 380pt), the iPhone the 402pt screen in an 11pt
   bezel. Every size below is a count of points, so it stays 1:1 at any width.
   Type is SF Pro Text at every size ("opsz" pinned), untracked: drawn at the
   app's own sizes, the browser's SF sets every role as wide as the app does
   (Chromium within 0.3pt of the captures' words, WebKit within 0.6pt
   narrower), so letter-spacing stays 0.

   Mac: toolbar 52, row 83 (padding 11 over 14, lines 15/15/13 two apart),
   gutter dot 9 at 33.5, text at 51.7, date 13 at 25 from the edge; sidebar
   rows 32 from 71, glyph 16 at 28.5, label 13 at 47, selection inset 10,
   radius 8; "Incoming" 11 semibold; traffic lights 14 on a 23 pitch at 25.75.
   The menu can't be captured: macOS 26's standard 13pt menu.
   iPhone: rows 88.7 from 115.5 (padding 12, lines 17/17/15 three apart), dot 8
   at 19, text at 34, 20 from the right; preview 346 wide at 28, radius 34,
   padding 16; menu 250 wide at 28, radius 34, padding 9, rows 42.1, tick at
   18, glyph at 40, label 17 at 66; island 126 x 37 at 11; screen radius 62. */
.triage-demo:is([data-platform="macos"], [data-platform="ios"]) {
  container-type: inline-size;
  font-variation-settings: "opsz" 17;
  --lh: 1.193;          /* SF's own ascender + descender: a SwiftUI Text line */
}
.triage-demo[data-platform="macos"] {
  --lh: 1.233;             /* AppKit's line for SF: the rows' measured 20.5pt pitch */
}
.triage-demo[data-platform="ios"] {
  --lh: 1.21;
}

.triage-demo[data-platform="macos"] {
  --pt: 1px;
  --stage-w: 588px;
  --stage-h: calc(var(--bar) + var(--rows) * var(--row) + var(--foot));
  --bar: calc(52 * var(--pt));
  --row: calc(83 * var(--pt));
  --foot: calc(18 * var(--pt));
  --side: calc(208 * var(--pt));
  --side-top: calc(71 * var(--pt));
  --place: calc(32 * var(--pt));
  --item: calc(24 * var(--pt));
  /* The press lands in the empty stretch of the sender's line, between the
     name (its ink ends at 337) and the time (513), so it covers no words; the
     popover centred under it spans 298 to 538, inside the window. */
  --press-x: calc(var(--side) + 210 * var(--pt));
  --press-y: calc(var(--bar) + var(--row) + 19 * var(--pt));
  --undo-half: calc(131 * var(--pt));   /* half the Undo capsule, measured from a capture of it */
  --win: #fff;
  --win-side: #fbfbfb;
  --win-ink: rgb(0 0 0 / 0.85);
  --win-ink-2: #57575c;
  --win-line: #e5e5e5;
  --win-col: #c9c9c9;
  --win-glass: #fbfbfb;
  --win-glass-edge: rgb(0 0 0 / 0.2);
  --win-menu: rgb(246 246 246 / 0.96);
  --win-pick: #48484d;
  --win-pick-ink: #fff;
}

.triage-demo[data-platform="ios"] {
  --pt: 1px;
  --stage-w: 432px;     /* the 402 x 874 screen in Components::PhoneBezel */
  --stage-h: 904px;
  --bar: calc(115.5 * var(--pt));
  --row: calc(107 * var(--pt));
  --item: calc(42.1 * var(--pt));
  --menu-pad: calc(9 * var(--pt));
  --menu-w: calc(250 * var(--pt));
  --preview-top: calc(78 * var(--pt));
  --preview-h: calc(136 * var(--pt));
  --menu-top: calc(var(--preview-top) + var(--preview-h) + 16 * var(--pt));
  --pick-x: calc(28 * var(--pt) + 150 * var(--pt));
  --press-x: 46%;
  --win: #fff;
  --win-ink: #000;
  --win-ink-2: #57575c;
  --win-glass: #fbfbfb;
  --win-glass-edge: rgb(0 0 0 / 0.12);
  --win-field: #f1f1f1;
  --win-card: #f2f2f7;
  --win-menu: #e7e7e7;
  --win-dim: rgb(0 0 0 / 0.2);
  --win-line: rgb(60 60 67 / 0.29);
  --win-pick: #48484d;
  --win-pick-ink: #fff;
  max-width: 286px;
}

@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) .triage-demo[data-platform="macos"] {
    --win: #1e1e1e;
    --win-side: #1c1c1c;
    --win-ink: rgb(255 255 255 / 0.85);
    --win-ink-2: #c7c7cc;
    --win-line: #393939;
    --win-col: #383838;
    --win-glass: #1f1f1f;
    --win-glass-edge: rgb(255 255 255 / 0.16);
    --win-menu: rgb(40 40 40 / 0.96);
    --win-pick: #c7c7cc;
    --win-pick-ink: rgb(0 0 0 / 0.86);
  }
  html:not([data-ogplus]) .triage-demo[data-platform="ios"] {
    --win: #000;
    --win-ink: #fff;
    --win-ink-2: #c7c7cc;
    --win-glass: #202020;
    --win-glass-edge: rgb(255 255 255 / 0.12);
    --win-field: #2b2b2e;
    --win-card: #1c1c1e;
    --win-menu: #222;
    --win-dim: rgb(0 0 0 / 0.2);
    --win-line: rgb(84 84 88 / 0.65);
    --win-pick: #c7c7cc;
    --win-pick-ink: #000;
  }
}

/* Shared: SF, its line height, and point-sized glyphs. */
.triage-demo:is([data-platform="macos"], [data-platform="ios"]) .triage-window { line-height: var(--lh); }
.triage-demo:is([data-platform="macos"], [data-platform="ios"]) .triage-round {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--win-glass);
  box-shadow: 0 0 0 0.5px var(--win-glass-edge), 0 calc(2 * var(--pt)) calc(10 * var(--pt)) rgb(0 0 0 / 0.08);
}

/* ── The Mac ── */
.triage-demo[data-platform="macos"] .triage-window {
  border-radius: calc(26 * var(--pt));
  font-size: calc(15 * var(--pt));
}
.triage-demo[data-platform="macos"] .triage-sidebar {
  position: relative;
  padding: var(--side-top) calc(10 * var(--pt)) 0;
  border-right: 1px solid var(--win-col);
  font-size: calc(13 * var(--pt));
}
/* New mail on its way up the sidebar: set at the sidebar's 13, not a
   fraction of the window's 15. */
.triage-demo[data-platform="macos"] .triage-arrival { font-size: calc(13 * var(--pt)); }
.triage-demo[data-platform="macos"] .triage-lights { top: calc(18.75 * var(--pt)); left: calc(18.75 * var(--pt)); gap: calc(9 * var(--pt)); }
.triage-demo[data-platform="macos"] .triage-light { width: calc(14 * var(--pt)); height: calc(14 * var(--pt)); }
.triage-demo[data-platform="macos"] .triage-side-toggle {
  position: absolute;
  top: calc(7.5 * var(--pt));
  left: calc(163.5 * var(--pt));
  width: calc(36.5 * var(--pt));
  height: calc(36.5 * var(--pt));
}
.triage-demo[data-platform="macos"] .triage-round .triage-icon { width: calc(19 * var(--pt)); height: calc(19 * var(--pt)); color: var(--win-ink-2); }
/* The sidebar lists what the app lists (app-mac/panel2): Incoming's six on a
   32 pitch from 71, then 13.5 more to Starred, Unread and Archive; Outgoing's
   heading 37 under Archive with Drafts, Sent and Trash 16.2 under it. Which
   groups a window draws is Components::TriageDemo's (#more_places): only rows
   that fit whole, so the app's bare Accounts heading is left out. */
.triage-demo[data-platform="macos"] .triage-side-group {
  position: absolute;
  top: calc(54.8 * var(--pt));
  left: calc(15 * var(--pt));
  color: var(--win-ink-2);
  font-size: calc(11 * var(--pt));
  font-weight: 600;
}
.triage-demo[data-platform="macos"] .triage-side-group--3 { top: calc(387.8 * var(--pt)); }
.triage-demo[data-platform="macos"] .triage-side-more {
  position: absolute;
  left: calc(10 * var(--pt));
  right: calc(10 * var(--pt));
}
.triage-demo[data-platform="macos"] .triage-side-more--1 { top: calc(var(--side-top) + 6 * var(--place) + 13.5 * var(--pt)); }
.triage-demo[data-platform="macos"] .triage-side-more--2 { top: calc(404 * var(--pt)); }
.triage-demo[data-platform="macos"] .triage-place {
  gap: calc(7.5 * var(--pt));   /* the names' ink starts at 47, as the app's */
  padding: 0 calc(13 * var(--pt)) 0 calc(8.5 * var(--pt));
  border-radius: calc(8 * var(--pt));
}
.triage-demo[data-platform="macos"] .triage-place.is-selected { background: var(--win-pick); color: var(--win-pick-ink); font-weight: 400; }
.triage-demo[data-platform="macos"] .triage-place.is-selected :is(.triage-icon, .triage-count) { color: inherit; }
.triage-demo[data-platform="macos"] .triage-place-name { translate: 0 calc(-0.5 * var(--pt)); }
.triage-demo[data-platform="macos"] .triage-place .triage-icon { width: calc(20 * var(--pt)); height: calc(20 * var(--pt)); stroke-width: 1.5; }
.triage-demo[data-platform="macos"] .triage-count { color: var(--win-ink-2); font-size: calc(13 * var(--pt)); font-variant-numeric: tabular-nums; }
.triage-demo[data-platform="macos"] .triage-dot {
  width: calc(6.5 * var(--pt));
  height: calc(6.5 * var(--pt));
  margin-right: calc(-2.5 * var(--pt));
  background: var(--win-pick);
}

.triage-demo[data-platform="macos"] .triage-toolbar {
  display: flex;
  align-items: center;
  gap: calc(9 * var(--pt));
  height: var(--bar);
  margin: 0;
  padding: 0 calc(7 * var(--pt)) 0 calc(8 * var(--pt));
  border-bottom: 1px solid var(--win-line);
}
.triage-demo[data-platform="macos"] .triage-toolbar .triage-round { flex: none; width: calc(35 * var(--pt)); height: calc(35 * var(--pt)); }
/* Its fill, ring, height and corner are the Search demo's too ("Mac field"). */
.triage-demo[data-platform="macos"] .triage-search {
  flex: 1;
  gap: calc(8 * var(--pt));
  margin: 0;
  padding: 0 calc(14 * var(--pt));
  color: var(--win-ink);
  font-size: calc(13 * var(--pt));
  font-weight: 600;
}
.triage-demo[data-platform="macos"] .triage-search .triage-icon { width: calc(16 * var(--pt)); height: calc(16 * var(--pt)); }
/* The filter capsule's + (mac.md 3.10): a 28 disc 4 in, the prompt at 42 (its
   ink 38.5 past the disc's edge, as the app's). The
   prompt is medium in the secondary ink (app-mac/inbox588: its stems 1.5 at
   13, against regular's 1.0, the ink #57575c / #c7c7cc unchanged). */
.triage-demo[data-platform="macos"] .triage-search { gap: calc(10 * var(--pt)); padding-left: calc(4 * var(--pt)); color: var(--win-ink-2); font-weight: 500; }
.triage-plus { display: grid; flex: none; place-items: center; border-radius: 50%; }
.triage-demo[data-platform="macos"] .triage-plus { width: calc(28 * var(--pt)); height: calc(28 * var(--pt)); }
/* The Mac's + (Triage's and Search's): a filled grey disc, #dedede / #505050,
   with a heavy plus in the primary ink, 14 across with a 2 stroke
   (app-mac/inbox588-light and -dark at 2x). */
:is(.triage-demo[data-platform="macos"] .triage-plus, .sd-mac .sd-plus) { --mac-plus-disc: #dedede; --mac-plus-ink: #141414; }
@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) :is(.triage-demo[data-platform="macos"] .triage-plus, .sd-mac .sd-plus) { --mac-plus-disc: #505050; --mac-plus-ink: #fdfdfd; }
}
.triage-demo[data-platform="macos"] .triage-search .triage-plus,
.sd-mac .sd-field .sd-plus { background: var(--mac-plus-disc); color: var(--mac-plus-ink); }
.triage-demo[data-platform="macos"] .triage-search .triage-plus .triage-icon,
.sd-mac .sd-field .sd-plus .sd-glyph { width: calc(22.5 * var(--pt)); height: calc(22.5 * var(--pt)); color: inherit; stroke-width: 2.15; }

/* The rows are Components::MailRow ("Mail row"). The first sits under the
   toolbar's rule, so it draws none of its own. */
.triage-demo[data-platform="macos"] .triage-row:first-child .mail-row::before { border-top-color: transparent; }

/* The press selects the row, as a click does: the accent, its text inverted. */
.triage-demo[data-platform="macos"] .mail-row :is(.mail-row-sender, .mail-row-subject, .mail-row-preview, .mail-row-time, .mail-row-clip) { transition: color 0.12s ease; }
.triage-demo[data-platform="macos"] .mail-row-dot { transition: background-color 0.12s ease; }
.triage-demo[data-platform="macos"]:is([data-step="1"], [data-step="2"]) .triage-row.is-pressed .mail-row {
  --mr-name: var(--mr-sel-ink);
  --mr-meta: var(--mr-sel-meta);
  --mr-dot: var(--mr-sel-ink);
  --mr-star: var(--mr-sel-star);
  background-color: var(--mr-sel);
}
.triage-demo[data-platform="macos"]:is([data-step="1"], [data-step="2"]) .triage-row.is-pressed .mail-row::before { border-top-color: transparent; }
.triage-demo[data-platform="macos"]:is([data-step="1"], [data-step="2"]) .triage-row.is-pressed + .triage-row .mail-row::before { border-top-color: transparent; }
.triage-demo[data-platform="macos"][data-step="1"] .triage-row.is-pressed :is(.mail-row, .mail-row *) { transition-delay: 0.75s; }

/* The press popover (TriagePressMenu; TriagePanelMetrics): 240 wide; 8 over
   a 20pt title, "All mail from Harborline", 11 semibold, secondary; rows of
   24 at the menu font, the tick's column at 12, the glyph's (16) at 28, the
   words at 52; the highlight inset 4 with radius 6, the accent with its own
   ink; an 8pt block with a hairline 12 in from each side; a 20pt footer, 11
   regular, on the words' edge; 8 under. Its ground is the snapshot's, which
   draws the popover opaque: #fff in light, #1e1e1e in dark. The real one is
   the system's popover material; the edge, shadow, corner radius and the
   arrow are a stand-in, by eye. It opens half a second into the press (the
   app's hold) under the pointer, flipped below because there is no room for
   it above, its arrow at the press. */
.triage-panel {
  --panel: #fff;
  --panel-ink: rgb(0 0 0 / 0.85);
  --panel-ink-2: #57575c;
  --panel-lit: #48484d;
  --panel-lit-ink: #fff;
  --panel-rule: rgb(0 0 0 / 0.1);
  --panel-edge: rgb(0 0 0 / 0.16);
  --arrow: calc(14 * var(--pt));
  position: absolute;
  z-index: 3;
  top: calc(var(--press-y) + 0.7071 * var(--arrow));
  left: calc(var(--press-x) - 120 * var(--pt));
  width: calc(240 * var(--pt));
  padding: calc(8 * var(--pt)) 0;
  border-radius: calc(12 * var(--pt));
  background: var(--panel);
  box-shadow: 0 0 0 0.5px var(--panel-edge), 0 calc(10 * var(--pt)) calc(30 * var(--pt)) rgb(0 0 0 / 0.18);
  color: var(--panel-ink);
  font-size: calc(13 * var(--pt));
  font-variation-settings: "opsz" 17;
  letter-spacing: 0;   /* the menu font as the app sets it: "Notifications" 75pt wide in both */
  line-height: 1.2;
  opacity: 0;
  transform: scale(0.96);
  transform-origin: 50% 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.triage-panel-arrow {
  position: absolute;
  top: calc(-0.5 * var(--arrow));
  left: calc(50% - 0.5 * var(--arrow));
  width: var(--arrow);
  height: var(--arrow);
  border-radius: calc(2 * var(--pt)) 0 0;
  background: var(--panel);
  box-shadow: -0.5px -0.5px 0 0 var(--panel-edge);
  transform: rotate(45deg);
}
.triage-panel-title,
.triage-panel-foot {
  position: relative;
  height: calc(20 * var(--pt));
  padding: 0 calc(16 * var(--pt)) 0 calc(52 * var(--pt));
  color: var(--panel-ink-2);
  font-size: calc(11 * var(--pt));
  letter-spacing: 0;
  line-height: calc(20 * var(--pt));
  white-space: nowrap;
}
.triage-panel-title { font-weight: 600; font-variation-settings: "wght" 590; }
.triage-panel-foot { display: grid; }
.triage-panel-foot > span { grid-area: 1 / 1; transition: opacity 0.2s ease; }
.triage-panel-to { opacity: 0; }
.triage-panel ul { position: relative; margin: 0; padding: 0; list-style: none; }
.triage-panel-item {
  position: relative;
  height: calc(24 * var(--pt));
  margin: 0 calc(4 * var(--pt));
  border-radius: calc(6 * var(--pt));
  transition: background-color 0.1s ease, color 0.1s ease;
}
.triage-panel-tick { position: absolute; top: 0; left: calc(8 * var(--pt)); width: calc(12 * var(--pt)); }
.triage-panel-item .triage-icon {
  position: absolute;
  top: calc(4 * var(--pt));
  left: calc(24 * var(--pt));
  width: calc(16 * var(--pt));
  height: calc(16 * var(--pt));
  color: inherit;
  stroke-width: 1.5;
}
.triage-panel-name { position: absolute; left: calc(48 * var(--pt)); line-height: calc(24 * var(--pt)); }
.triage-panel-rule { display: block; position: relative; height: calc(8 * var(--pt)); }
.triage-panel-rule::before {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline: calc(12 * var(--pt));
  border-top: 1px solid var(--panel-rule);
}

/* Undo (UndoToastView), centred over the list 24 above its foot: the line in
   medium, Undo semibold in the accent; padding 16, 12 and 16 around them, 12
   above and below; the bar's surface (BarSurface): white with a 0.5 hairline
   at 11% black in light, #2b2b2d at 14% white in dark, and its two shadows. */
.triage-undo {
  position: absolute;
  z-index: 3;
  left: calc(var(--side) + (100% - var(--side)) / 2);
  bottom: calc(24 * var(--pt));
  display: flex;
  align-items: baseline;
  border-radius: 999px;
  background: var(--undo, #fff);
  box-shadow: 0 0 0 0.5px var(--undo-edge, rgb(0 0 0 / 0.11)), 0 0.5px 1px rgb(0 0 0 / var(--undo-s1, 0.05)),
    0 calc(3 * var(--pt)) calc(12 * var(--pt)) rgb(0 0 0 / var(--undo-s2, 0.09));
  color: var(--panel-ink, rgb(0 0 0 / 0.85));
  font-size: calc(11 * var(--pt));
  font-variation-settings: "opsz" 17;
  font-weight: 500;
  letter-spacing: 0;   /* 11pt as the app sets it: "4 messages moved to Receipts" is 165.5 there, 166.3 here */
  line-height: calc(15 * var(--pt));
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, calc(20 * var(--pt)));
  transition: opacity 0.3s ease, transform 0.56s var(--spring);
}
.triage-undo-line { padding: calc(12 * var(--pt)) 0 calc(12 * var(--pt)) calc(16 * var(--pt)); }
.triage-undo-button {
  padding: calc(12 * var(--pt)) calc(16 * var(--pt)) calc(12 * var(--pt)) calc(12 * var(--pt));
  color: var(--undo-tint, #48484d);
  font-weight: 600;
  font-variation-settings: "wght" 590;
}

@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) .triage-panel {
    --panel: #1e1e1e;
    --panel-ink: rgb(255 255 255 / 0.85);
    --panel-ink-2: #c7c7cc;
    --panel-lit: #c7c7cc;
    --panel-lit-ink: #1c1c1e;
    --panel-rule: rgb(255 255 255 / 0.1);
    --panel-edge: rgb(255 255 255 / 0.2);
  }
  html:not([data-ogplus]) .triage-undo {
    --undo: #2b2b2d;
    --undo-edge: rgb(255 255 255 / 0.14);
    --undo-s1: 0.35;
    --undo-s2: 0.4;
    --undo-tint: #c7c7cc;
    color: rgb(255 255 255 / 0.85);
  }
}

/* The Mac's steps. 1: the pointer reaches the row (0.7s) and presses
   (0.75s); the row is selected; the popover opens half a second into the
   press (1.25s). 2: over Notifications, which lights, and the footer says
   where the three go. 3: the pick; the popover closes, the rows leave on the
   spring and the capsule comes up. 4: the pointer goes to Undo and clicks
   (0.55s); the capsule goes and the rows come back. */
.triage-demo[data-platform="macos"]:is([data-step="1"], [data-step="2"]) .triage-panel { opacity: 1; transform: none; }
.triage-demo[data-platform="macos"][data-step="1"] .triage-panel { transition-delay: 1.25s; }
.triage-demo[data-platform="macos"]:is([data-step="2"], [data-step="3"]) .triage-panel-item.is-chosen { background: var(--panel-lit); color: var(--panel-lit-ink); }
.triage-demo[data-platform="macos"][data-step="2"] .triage-panel-item.is-chosen { transition-delay: 0.4s; }
.triage-demo[data-platform="macos"]:is([data-step="2"], [data-step="3"]) .triage-panel-will { opacity: 0; }
.triage-demo[data-platform="macos"]:is([data-step="2"], [data-step="3"]) .triage-panel-to { opacity: 1; }
.triage-demo[data-platform="macos"][data-step="2"] .triage-panel-foot > span { transition-delay: 0.4s; }
.triage-demo[data-platform="macos"]:is([data-step="2"], [data-step="3"]) .triage-pointer {
  top: calc(var(--press-y) + 0.7071 * var(--arrow, calc(14 * var(--pt))) + 37 * var(--pt));
  left: calc(var(--press-x) + 34 * var(--pt));
  transform: none;
  transition-duration: 0.5s, 0.5s, 0.15s;
}
.triage-demo[data-platform="macos"][data-step="3"] .triage-undo { opacity: 1; transform: translate(-50%, 0); transition-delay: 0.45s; }
.triage-demo[data-platform="macos"][data-step="4"] .triage-undo { transition-delay: 0.75s; }
.triage-demo[data-platform="macos"][data-step="4"] .triage-pointer {
  top: calc(100% - 24 * var(--pt) - 21 * var(--pt));
  left: calc(var(--side) + (100% - var(--side)) / 2 + var(--undo-half) - 31 * var(--pt));
  transform: none;
  transition-duration: 0.5s, 0.5s, 0.15s;
  animation: triage-click 0.25s ease 0.55s;
}
.triage-demo[data-platform="macos"][data-step="4"] .triage-undo-button { animation: triage-undo-press 0.25s ease 0.55s; }
@keyframes triage-click { 50% { transform: scale(0.86); } }
@keyframes triage-undo-press { 50% { opacity: 0.55; } }

/* ── The iPhone ── (its frame is Components::PhoneBezel, "Phone bezel") */
.triage-demo[data-platform="ios"] .triage-window {
  height: calc(874 * var(--pt));
  border-radius: calc(62 * var(--pt));
  font-size: calc(17 * var(--pt));
}
.triage-demo[data-platform="ios"] .triage-list { padding-top: var(--bar); }

/* The bottom bar is Components::PhoneBar ("Phone bar"). */

/* The rows are Components::MailRow's iPhone row ("Mail row"), the Search
   demo's. The first sits under the bar and draws no rule; the press greys the
   row behind the preview it lifts. */
.triage-demo[data-platform="ios"] .triage-row:first-child .mail-row::before { border-top-color: transparent; }
.triage-demo[data-platform="ios"]:is([data-step="1"], [data-step="2"]) .triage-row.is-pressed .mail-row { background-color: var(--win-press); }
.triage-demo[data-platform="ios"][data-step="1"] .triage-row.is-pressed .mail-row { transition-delay: 0.3s; }

/* Press and hold: the preview over the dimmed list, the menu under it. */
.triage-demo[data-platform="ios"] .triage-preview {
  top: var(--preview-top);
  left: calc(28 * var(--pt));
  right: calc(28 * var(--pt));
  height: var(--preview-h);
  padding: calc(16 * var(--pt));
  border-radius: calc(34 * var(--pt));
  background: var(--win-card);
  box-shadow: 0 calc(8 * var(--pt)) calc(40 * var(--pt)) rgb(0 0 0 / 0.18);
}
.triage-demo[data-platform="ios"] .triage-preview-subject { font-weight: 600; }
.triage-demo[data-platform="ios"] .triage-preview-from {
  margin-top: calc(8 * var(--pt));
  color: var(--win-ink-2);
  font-size: calc(15 * var(--pt));
}
.triage-demo[data-platform="ios"] .triage-preview-body {
  margin-top: calc(8 * var(--pt));
  padding-top: calc(6.5 * var(--pt));   /* 8, less the 2pt line spacing SwiftUI puts under a line, not over it */
  border-top: 0.5px solid var(--win-line);
  font-size: calc(15 * var(--pt));
  line-height: calc(19.9 * var(--pt));
}
.triage-demo[data-platform="ios"] .triage-peek .triage-menu {
  left: calc(28 * var(--pt));
  width: var(--menu-w);
  max-width: none;
  padding: var(--menu-pad) 0;
  border-radius: calc(34 * var(--pt));
  background: var(--win-menu);
  box-shadow: 0 calc(8 * var(--pt)) calc(40 * var(--pt)) rgb(0 0 0 / 0.18);
}
.triage-demo[data-platform="ios"] .triage-peek .triage-menu-item {
  gap: 0;
  height: var(--item);
  margin: 0 calc(8 * var(--pt));
  padding: 0;
  border-radius: calc(21 * var(--pt));
}
.triage-demo[data-platform="ios"] .triage-tick { width: calc(20 * var(--pt)); }
.triage-demo[data-platform="ios"] .triage-tick .triage-icon { width: calc(15 * var(--pt)); height: calc(15 * var(--pt)); color: var(--win-ink); stroke-width: 2.6; }
.triage-demo[data-platform="ios"] .triage-peek .triage-menu-item > .triage-icon {
  width: calc(20.5 * var(--pt));
  height: calc(20.5 * var(--pt));
  margin: 0 calc(13.75 * var(--pt)) 0 calc(1.75 * var(--pt));
  color: var(--win-ink);
  stroke-width: 1.6;
}

/* Undo, above the floating bar. */
.triage-demo[data-platform="ios"] .triage-toast {
  bottom: calc(97 * var(--pt));
  gap: calc(16 * var(--pt));
  padding: calc(12 * var(--pt)) calc(20 * var(--pt));
  font-size: calc(15 * var(--pt));
}
.triage-demo[data-platform="ios"]:is([data-step="3"], [data-step="4"]) .triage-touch {
  top: calc(100% - 118 * var(--pt));
  left: calc(50% + 70 * var(--pt));
}

/* ── Aside: a statement between two moments, no screen ───────────────────────
   Short, flush left, on the darkest tone, so it reads as a pause and not as one
   more feature. ── */
.story-beat--aside .story-beat-inner {
  display: block;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.story-beat--aside .story-copy { padding-bottom: 0; }

/* Flush left on the band's text column like every other band: a paragraph
   centred over six lines is hard to read. The body keeps a reading measure. */
.story-beat--aside .story-title { max-width: 18em; font-size: clamp(1.75rem, 3.4vw, 2.6rem); }

.story-beat--aside .story-body { max-width: 36em; }

@media (prefers-reduced-motion: reduce) {
  .story-art:hover .story-shot { --lift: 0px; }
}

/* ── Narrow: copy above, art below, everything centred on the seam ── */
@media (max-width: 799px) {
  /* The art gets a slimmer margin than the copy: on a phone every pixel of a
     Mac window's width is legibility. */
  .story { --gutter: 1rem; }

  .story-beat,
  .story-beat.is-flipped {
    --w: min(var(--native), var(--cap, 9999px), (100vw - 2 * var(--gutter)) / var(--vis));
    --shift: calc(var(--w) * (var(--ir) - var(--il)) / 2);
  }
  .story-beat--pocket[data-platform="ios"] { --cap: 300px; }

  .story-beat--wide .story-beat-inner { padding-inline: var(--inset); }
  .story-beat--wide .story-copy { width: 100%; }

  .story-beat-inner,
  .story-beat.is-flipped .story-beat-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .story-beat.is-flipped .story-copy { order: 0; }

  .story-copy { padding-bottom: clamp(2rem, 6vw, 3rem); }

  .story-art,
  .story-beat.is-flipped .story-art { justify-self: center; }

  .story-beat--wide .story-copy { grid-template-columns: minmax(0, 1fr); row-gap: 1rem; }

  /* Squarer, so the container-unit type comes out a readable size. */
  .story-siri { width: min(560px, 100vw - 2 * var(--inset)); aspect-ratio: 1; }
  .story-beat--siri .story-art { padding-bottom: clamp(1rem, 4vw, 2rem); }
}

/* The lede, between the hero and the story's first band. Opaque and above the
   hero window's overflow, as the content card is. */
.product-intro {
  position: relative;
  z-index: 10;
  background: var(--surface, var(--accent));
  padding: var(--space-xl) 0 var(--space-lg);
}
.product-intro .product-lede { margin: 0; }

/* ── A platform page's tiles ──────────────────────────────────────────────────
   Components::TileGrid. The App Store tiles in rows that wrap and start at the
   left, straight on the page background. `html .screens.tile-grid` outranks
   screens.css's older web-presentation rules for .screens. ── */
html .screens.tile-grid {
  --gap: clamp(0.75rem, 1.6vw, 1.25rem);
  --cols: 3;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: var(--gap);
  max-width: 1240px;
  margin: var(--space-lg) auto var(--space-xl);
  padding: 0 var(--space-md);
  list-style: none;
}

html .screens.tile-grid[data-platform="ipados"],
html .screens.tile-grid[data-platform="tvos"],
html .screens.tile-grid[data-platform="macos"] { --cols: 2; }

@media (max-width: 999px) {
  html .screens.tile-grid { --cols: 2; }
  html .screens.tile-grid[data-platform="ipados"],
  html .screens.tile-grid[data-platform="tvos"],
  html .screens.tile-grid[data-platform="macos"] { --cols: 1; }
}

@media (max-width: 639px) {
  html .screens.tile-grid { --cols: 1; }
}

.tile-grid-item {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  min-width: 0;
}

/* `html` in front, because screens.css's web cap
   (`html:not([data-screenshot]) .screen`, 310px for a phone tile) outranked
   this and every tile sat at its cap, left-aligned in a wider column: on a
   phone the column had 27px on the left and 53px on the right, and on a wide
   screen the gaps between tiles were three times the gutter. */
html .tile-grid-item .screen {
  width: 100%;
  max-width: none;
  border-radius: 1.1rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  transition: transform var(--transition-move);
}

.tile-grid-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 1.1rem;
}
.tile-grid-link:hover .screen { transform: translateY(-4px); }
.tile-grid-link:focus-visible { outline: 3px solid var(--page-text, #fff); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .tile-grid-link:hover .screen { transform: none; }
}

/* ── Feature cards ────────────────────────────────────────────────────────────
   Scannable cards instead of a wall of prose. The surface is the accent shifted
   AWAY from the page's text colour — darker under the usual near-white text,
   lighter under dark text on a light accent — so the tint raises contrast
   instead of eroding it. --card-shift comes from ProductPage#card_shift and is
   verified against WCAG AA for every shipping accent. ── */
.features {
  margin: var(--space-lg) 0;
}

.features-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  color: var(--page-text, var(--text));
  margin: 0 0 var(--space-md);
}

.features-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 639px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  /* Span set per card by Components::FeatureGrid so every row is full. */
  grid-column: span var(--cols, 4);
  background: var(--card-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  /* A hairline of the page text at low alpha, so the card still has an edge on
     accents where the tint lands close to the background. */
  box-shadow: inset 0 0 0 1px oklch(from var(--page-text, #fff) l c h / 0.10);
}

.feature-icon {
  display: block;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--page-text, var(--text));
  opacity: 0.9;
  margin-bottom: var(--space-sm);
}

.feature-name {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  color: var(--page-text, var(--text));
  margin: 0 0 0.25em;
}

.feature-body {
  font-size: var(--text-sm);
  line-height: 1.4;
  /* Full-strength page text, not the secondary tone: this is the copy the
     cards exist to make readable. */
  color: var(--page-text, var(--text));
  margin: 0;
}

/* The features block spans the body's full width rather than joining the
   two-column prose flow. */
@media (min-width: 1000px) {
  .product-page .features { column-span: all; }
}

/* ---- Brand guidelines page ---- */
.brand-lede {
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--page-text, var(--text));
  margin: var(--space-md) 0 var(--space-lg);
}

.brand-logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: var(--space-md) 0 var(--space-lg);
}
.brand-logo-cell {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 140px;
  padding: var(--space-lg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand-cap {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}
/* Fixed light/dark lockup tiles: show the wordmark + B mark on each
   background regardless of the viewer's theme, so both treatments are
   always visible on the branding page. */
.brand-logo-cell--light {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
}
.brand-logo-cell--light .brand-wordmark { color: #000000; }
.brand-logo-cell--light .brand-cap { color: rgba(0, 0, 0, 0.6); }
.brand-logo-cell--dark {
  background: #000000;
  border-color: rgba(255, 255, 255, 0.15);
}
.brand-logo-cell--dark .brand-wordmark { color: #ffffff; }
.brand-logo-cell--dark .brand-cap { color: rgba(255, 255, 255, 0.65); }

/* In dark mode the page is near-black too, so the "on dark" logo cards and
   the Ink swatch are black on black: only their edge says where they are, and
   the usual 0.15 hairline all but vanished. */
@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) .brand-logo-cell--dark { border-color: rgba(255, 255, 255, 0.32); }
  html:not([data-ogplus]) .swatch-chip-bordered { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32); }
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-sm);
  margin: var(--space-md) 0 var(--space-lg);
}
.swatch-grid-neutral { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.swatch {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
}
.swatch-chip {
  height: 88px;
  background: var(--sw);
}
.swatch-chip-bordered { box-shadow: inset 0 0 0 1px var(--border); }
.swatch-name {
  font-weight: 700;
  font-size: var(--text-sm);
  padding: var(--space-sm) var(--space-sm) 0;
}
.swatch-hex {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: 0 var(--space-sm) var(--space-sm);
}

.type-specimens { margin: var(--space-md) 0 var(--space-lg); }
.type-row {
  display: flex;
  /* The token label drops under the sample when the row cannot hold both. On
     a phone it could not, and the label pushed the whole page 52px wider than
     the screen. */
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}
.type-sample { color: var(--text); line-height: 1.15; }
.type-meta {
  flex: none;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}

.space-scale { margin: var(--space-md) 0 var(--space-lg); }
.space-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xs) 0;
}
.space-bar {
  height: 16px;
  background: var(--text);
  border-radius: 3px;
  flex: none;
}

.brand-principles {
  margin: var(--space-md) 0 var(--space-md);
  padding-left: 1.1em;
}
.brand-principles li { margin: var(--space-xs) 0; }

.brand-tokens {
  background: var(--code-bg, rgba(127,127,127,0.08));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-md);
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text);
}

/* ── Backstage ────────────────────────────────────────────────────────────────
   Brand collateral, not a page for visitors: no nav, no footer, no accent
   flood. A plain sheet so the artwork is the only colour on it. ── */
.backstage {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-xl);
  color: var(--text);
}

.backstage-head {
  margin-bottom: var(--space-lg);
}

.backstage-head h1 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

.backstage-head p {
  color: var(--text-secondary);
  margin: 0.25em 0 0;
}

.backstage-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
  gap: var(--space-md);
}

.backstage-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: var(--space-md) 0.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.backstage-tile:hover {
  transform: translateY(-2px);
  background: rgba(127, 127, 127, 0.08);
}

.backstage-tile-icon {
  width: 96px;
  height: 96px;
  border-radius: 22%;
}

.backstage-tile-name {
  font-weight: 700;
  text-align: center;
}

.backstage-tile-meta,
.backstage-meta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.backstage-app-head {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.backstage-app-head h1 {
  margin: 0;
}

.backstage-icon {
  border-radius: 22%;
}

.backstage-section {
  margin-top: var(--space-lg);
}

/* One recorded demo to a screen, so each comes into view on its own. */
.backstage-demo {
  display: grid;
  align-content: center;
  gap: var(--space-sm);
  min-height: 100svh;
  padding-block: var(--space-lg);
}
.backstage-demo h2 { margin: 0; text-align: center; font-size: var(--text-md); }

.backstage-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-sm);
}

.backstage-icons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.backstage-icon-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
}

.backstage-icon-swatch img {
  border-radius: 22%;
}

.backstage-note {
  margin: var(--space-sm) 0 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.backstage-shots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-md);
}

/* Light and dark side by side, on the accent, which is where both are meant to
   be seen. Any difference between them is the point of this page. */
.backstage-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--accent, #333);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 0.5rem;
}

.backstage-frame {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  min-width: 0;
}

.backstage-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.backstage-frame figcaption {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.backstage-frame--missing {
  display: grid;
  place-items: center;
  min-height: 6rem;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.backstage-shot {
  min-width: 0;
}

.backstage-shot-sub {
  margin: 0.1rem 0 0.35rem;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* The listing copy, collapsed by default: it is long, and most visits here are
   to look at pictures. */
.backstage-listing {
  margin: 0 0 var(--space-md);
  font-size: var(--text-sm);
}

.backstage-listing summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
}

.backstage-listing dl {
  margin: var(--space-sm) 0 0;
  display: grid;
  grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr);
  gap: 0.4rem var(--space-md);
  align-items: baseline;
}

.backstage-listing dt {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-weight: 600;
  text-transform: capitalize;
  color: var(--text-secondary);
}

.backstage-listing dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.backstage-longform {
  white-space: pre-wrap;
  max-height: 12rem;
  overflow: auto;
}

.backstage-shot-name {
  margin: 0.5rem 0 0.15rem;
  font-weight: 600;
}

.backstage-flags {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.flag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.15em 0.45em;
  border-radius: 4px;
  background: rgba(127, 127, 127, 0.16);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* The whole reason the page exists: something that needs looking at. */
.flag--warn {
  background: #b91c1c;
  color: #fff;
}

.backstage-empty {
  color: var(--text-secondary);
}

/* Backstage, part two: enough structure to read as a tool. Hairline rules
   instead of boxes, monospace for anything you would paste, and a switcher
   pinned to the top so moving between apps is one click. */
.backstage-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0.9rem 0;
  margin-bottom: var(--space-lg);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.backstage-bar-title p {
  margin: 0.1rem 0 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.backstage-switcher {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.backstage-switcher-home {
  display: inline-block;
  font-size: var(--text-md);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  text-decoration: none;
  color: var(--text);
}

.backstage-switcher-app {
  display: block;
  line-height: 0;
  border-radius: 8px;
  padding: 3px;
  opacity: 0.45;
  transition: opacity var(--transition-fast);
}

.backstage-switcher-app:hover {
  opacity: 1;
}

.backstage-switcher-app.is-current {
  opacity: 1;
  outline: 2px solid var(--text);
  outline-offset: 1px;
}

.backstage-switcher-app img {
  border-radius: 6px;
}

.backstage-tagline {
  margin: 0.1rem 0 0.3rem;
  color: var(--text-secondary);
}

.backstage-swatch {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  border-radius: 3px;
  margin-right: 0.4em;
  vertical-align: -0.05em;
}

.backstage-links {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.backstage-link {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.backstage-link:hover {
  background: rgba(127, 127, 127, 0.1);
}

.backstage-link--muted {
  color: var(--text-secondary);
  font-weight: 400;
}

.backstage-section h2 {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.backstage-accent {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  flex-wrap: wrap;
}

.backstage-accent-swatch {
  width: 7rem;
  height: 7rem;
  border-radius: var(--radius-md);
  flex: none;
}

.backstage-formats {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.3rem var(--space-md);
  align-items: baseline;
  font-size: var(--text-sm);
}

.backstage-formats dt {
  color: var(--text-secondary);
  font-weight: 600;
}

.backstage-formats dd {
  margin: 0;
  min-width: 0;
}

/* Everything here exists to be pasted somewhere else. */
.backstage-copy {
  font: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: none;
  border: 0;
  padding: 0.1rem 0.3rem;
  margin-left: -0.3rem;
  border-radius: 4px;
  color: inherit;
  cursor: copy;
  text-align: left;
}

.backstage-copy:hover {
  background: rgba(127, 127, 127, 0.14);
}

.backstage-copy.is-copied {
  background: #15803d;
  color: #fff;
}

.backstage-listing h3 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: 0 0 var(--space-sm);
}

.backstage-listing dd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
}

/* ── Backstage on a phone ─────────────────────────────────────────────────────
   The desktop layout is two-column everywhere: label beside value. At 390px
   that leaves the value about five characters wide, so the listing copy wrapped
   two words per line and was unreadable — which is the one thing this page is
   for. Everything stacks below 700px, and the switcher becomes a scrolling
   strip rather than three rows of small targets. ── */
@media (max-width: 699px) {
  .backstage {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  /* One line, scrolled sideways, with targets big enough to hit. */
  .backstage-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.7rem 0;
  }

  .backstage-switcher {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    margin-right: calc(var(--space-sm) * -1);
  }

  .backstage-switcher::-webkit-scrollbar {
    display: none;
  }

  .backstage-switcher-app {
    padding: 4px;
  }

  .backstage-switcher-app img {
    width: 36px;
    height: 36px;
  }

  .backstage-app-head {
    gap: var(--space-sm);
  }

  .backstage-icon {
    width: 64px;
    height: 64px;
  }

  .backstage-links {
    gap: 0.4rem;
  }

  .backstage-link {
    padding: 0.45rem 0.8rem;
  }

  /* Label above value, value full width: the only way the copy is legible. */
  .backstage-listing dl,
  .backstage-formats {
    display: block;
  }

  .backstage-listing dt,
  .backstage-formats dt {
    margin-top: 0.9rem;
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .backstage-listing dt:first-child,
  .backstage-formats dt:first-child {
    margin-top: 0;
  }

  .backstage-listing dd,
  .backstage-formats dd {
    margin-top: 0.15rem;
  }

  .backstage-longform {
    max-height: none;
  }

  .backstage-accent {
    gap: var(--space-sm);
  }

  .backstage-accent-swatch {
    width: 100%;
    height: 5rem;
  }

  .backstage-copy {
    display: block;
    width: 100%;
    padding: 0.35rem 0.4rem;
    margin-left: -0.4rem;
    background: rgba(127, 127, 127, 0.08);
  }

  /* The icon sizes are a reference strip, not a gallery. */
  .backstage-icons {
    gap: var(--space-sm);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .backstage-icons::-webkit-scrollbar {
    display: none;
  }

  .backstage-icons li {
    flex: none;
  }

  .backstage-section {
    margin-top: var(--space-md);
  }

  /* Light and dark stay side by side: comparing them is the whole point, and
     a phone screenshot at half of 390px is still legible enough to spot a
     cream slab where a dark one belongs. */
  .backstage-pair {
    padding: 0.35rem;
    gap: 0.35rem;
  }

  .backstage-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(50%, 8rem), 1fr));
    gap: var(--space-sm);
  }

  .backstage-tile-icon {
    width: 72px;
    height: 72px;
  }
}

/* The links list: every URL the app has, each one ready to send. */
.backstage-urls {
  list-style: none;
  margin: 0;
  padding: 0;
}

.backstage-url {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.backstage-url-text {
  min-width: 0;
}

.backstage-url-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.backstage-url-name:hover {
  text-decoration: underline;
}

.backstage-url-note {
  margin-left: 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.backstage-url-path {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.backstage-url-actions {
  display: flex;
  gap: 0.35rem;
  flex: none;
}

.backstage-share,
.backstage-copy--compact {
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--text);
  cursor: pointer;
  margin-left: 0;
}

.backstage-share:hover,
.backstage-copy--compact:hover {
  background: rgba(127, 127, 127, 0.1);
}

.backstage-share.is-copied,
.backstage-copy--compact.is-copied {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
}

@media (max-width: 699px) {
  /* Thumb-sized targets, and the path under the name rather than beside it. */
  .backstage-url {
    padding: 0.7rem 0;
  }

  .backstage-share,
  .backstage-copy--compact {
    padding: 0.5rem 0.9rem;
  }
}

/* A page with its own dark-mode colour (`page: dark:` in the product's
   frontmatter; see PageGround). The element that sets --accent also hands
   over --accent-dark, and everything derived from --accent follows. Not in the share card and not in
   a store capture: those are the app's colour as designed. */
@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]):not([data-screenshot]) [style*="--accent-dark:"] {
    --accent: var(--accent-dark) !important;
    --text-lightness: var(--text-lightness-dark) !important;
    --card-shift: var(--card-shift-dark) !important;
    --band-shift: var(--band-shift-dark) !important;
    --band-mid: var(--band-mid-dark) !important;
    --seam: var(--seam-dark) !important;
    --cast: var(--cast-dark) !important;
    --fold-line: var(--fold-line-dark) !important;
    --field: var(--field-dark) !important;
    --field-edge: var(--field-edge-dark) !important;
  }
}

/* A share card is the brand colour, whatever the page wears. */
html[data-ogplus] [style*="--accent-brand:"] {
  --accent: var(--accent-brand) !important;
  --text-lightness: var(--text-lightness-brand) !important;
  --card-shift: var(--card-shift-brand) !important;
  --band-shift: var(--band-shift-brand) !important;
  --band-mid: var(--band-mid-brand) !important;
  --seam: var(--seam-brand) !important;
  --cast: var(--cast-brand) !important;
  --fold-line: var(--fold-line-brand) !important;
  --field: var(--field-brand) !important;
  --field-edge: var(--field-edge-brand) !important;
}

/* Mac windows are captured without their shadow. On a colour that is fine:
   the window is a different colour from the page. On a grey page it is the
   shadow that separates them, so a grey ground asks for one (--cast, from
   PageGround; 0 everywhere else). drop-shadow follows the window's own
   rounded corners. */
.product-hero-image picture:not(.hero-img-mobile) img,
.story-beat[data-platform="macos"] .story-shot img,
[data-platform="macos"] .tile-grid-item .screen-shot img {
  filter: drop-shadow(0 16px 34px rgb(0 0 0 / var(--cast, 0)));
}

/* A store tile shown on the web keeps its white headline, as in the App
   Store, unless the page's ink is dark (a light ground): then white would
   not show. */
.tile-grid-item .screen { color: #fff; }
[style*="--text-lightness: 20%"] .tile-grid-item .screen { color: var(--page-text); }

/* The fold line. Where a window or device is tucked into a section's edge,
   one hairline says where the section ends, drawn ABOVE the art and the full
   width of the page. It used to be the band's own inset line, which the art
   was painted over: every wide window had two stubs sticking out either side
   of it and every phone hid the middle. Only where art is tucked into the
   edge: the hero, and a story band with a window or device. */
.product-hero::after { border-top: 1px solid var(--fold-line, transparent); }
.story-beat--pocket::after,
.story-beat--wide::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--fold-line, transparent);
  z-index: 3;
  pointer-events: none;
}

/* ── Search demo ──────────────────────────────────────────────────────────────
   Components::SearchDemo: Email's search built from pieces, on a Mac (the
   list column's toolbar field and its dropdown) and an iPhone (the oval at the
   foot and the + fan), one timeline for both. `data-step` on the root moves on
   a timer; every motion is a transition keyed on it, so the timing of each
   step lives here:

     1  + pressed (0.3s); the dropdown fades in under the field / the fan
        bursts out of the +, which turns to x
     2  Unread lit (0.45s); its chip comes out from under the + (0.75s); the
        list closes up (0.9s); the dropdown row goes (1.0s)
     3  Starred, the same
     4  "pri" typed (0.2s); the dropdown offers Contains and Priya / the fan
        closes
     5  Priya picked (0.45s); the chip (0.75s); the list (0.9s); the dropdown
        fades (1.1s)
     6  "launch" typed (0.2s); the headings open and the results split (0.9s)
     7  the Starred chip shows its x (0.5s) and shrinks into its centre
        (0.9s); its neighbours close up; the list opens out (1.1s)
     0  everything goes back the way it came (0.3s)

   Sizes are the app's points (`--pt`), from docs/design/mac.md 3.10 and
   iphone-states.md; colours are Theme.Ink's. ── */
.search-demo {
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sd-ground: #fff;
  --sd-name-u: #000;
  --sd-body-u: #48484d;
  --sd-name-r: #58585d;
  --sd-body-r: #76767b;
  --sd-line: #e4e4e8;
  --sd-dot: #0a66e0;
  --sd-blue: #0a66e0;
  --sd-star: #ffcc00;
  --sd-chip: #ededf0;
  --sd-well: #e6eefb;
  --sd-secondary: #57575c;
  --sd-glyph: #7a7a80;
  --sd-pick: #48484d;
  --sd-pick-ink: #fff;
  --sd-field: #f2f2f4;
  --sd-disc: #e4e4e8;
  --sd-menu: #fff;
  --sd-group: #f5f5f7;
  --sd-bar: #fff;
  --sd-edge: rgb(0 0 0 / 0.12);
  --sd-veil: rgb(255 255 255 / 0.62);
  --sd-avatar: #5e5ce6;
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) .search-demo {
    --sd-ground: #1e1e1e;
    --sd-name-u: #fff;
    --sd-body-u: #b0b0b6;
    --sd-name-r: #a2a2a8;
    --sd-body-r: #8a8a8f;
    --sd-line: #2e2e31;
    --sd-dot: #3b8cff;
    --sd-blue: #3b8cff;
    --sd-star: #ffd60a;
    --sd-chip: #3a3a3e;
    --sd-well: #233249;
    --sd-secondary: #c7c7cc;
    --sd-glyph: #9a9aa0;
    --sd-pick: #c7c7cc;
    --sd-pick-ink: #121214;
    --sd-field: #2c2c2f;
    --sd-disc: #3a3a3e;
    --sd-menu: #2a2a2d;
    --sd-group: #252528;
    --sd-bar: #1c1c1e;
    --sd-edge: rgb(255 255 255 / 0.12);
    --sd-veil: rgb(0 0 0 / 0.55);
  }
  /* The fan's pieces and names stand on the bar's own dark fill, #2b2b2e. */
  html:not([data-ogplus]) .search-demo .sd-phone { --sd-ground: #000; --sd-body-r: #77777c; --sd-line: #232326; --sd-bar: #2b2b2e; }
}

.sd-stage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.sd-device {
  position: relative;
  flex: 0 1 auto;
  container-type: inline-size;
  color: var(--sd-name-u);
  line-height: 1.21;
  text-align: left;
  user-select: none;
}
.sd-device :where(p) { margin: 0; }

.sd-glyph { display: block; width: 100%; height: 100%; }

/* ── The Mac ── */
/* Drawn at 460 x 600 points, a pixel to a point, and scaled whole to its slot
   ("Device stage"). */
.sd-mac { --pt: 1px; --stage-w: 460px; --stage-h: 600px; width: min(460px, 100%); }
.search-demo[data-device="both"] .sd-mac { flex-basis: 460px; }

.sd-window {
  position: relative;
  height: calc(600 * var(--pt));
  overflow: hidden;
  border-radius: calc(16 * var(--pt));
  background: var(--sd-ground);
  box-shadow: 0 0 0 0.5px var(--sd-edge), 0 18px 40px rgb(0 0 0 / calc(var(--cast, 0) + 0.1));
  font-size: calc(15 * var(--pt));
}

.sd-toolbar {
  position: relative;
  height: calc(52 * var(--pt));
  border-bottom: 1px solid var(--sd-line);
}
.sd-lights { position: absolute; top: calc(19 * var(--pt)); left: calc(19 * var(--pt)); display: flex; gap: calc(9 * var(--pt)); }
.sd-light { width: calc(14 * var(--pt)); height: calc(14 * var(--pt)); border-radius: 50%; background: #ff5f57; }
.sd-light:nth-child(2) { background: #febc2e; }
.sd-light:nth-child(3) { background: #28c840; }

.sd-round {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sd-bar);
  color: var(--sd-name-u);
  box-shadow: 0 0 0 0.5px var(--sd-edge), 0 calc(2 * var(--pt)) calc(10 * var(--pt)) rgb(0 0 0 / 0.08);
}
.sd-round .sd-glyph { width: 46%; height: 46%; }
.sd-side-toggle { position: absolute; top: calc(8 * var(--pt)); left: calc(92 * var(--pt)); width: calc(36 * var(--pt)); height: calc(36 * var(--pt)); color: var(--sd-glyph); }

/* The field: + at 4, chips on a 32 pitch from 36, the words 8 after the last
   chip, the clear button at the trailing end. */
.sd-field {
  position: absolute;
  top: calc(8 * var(--pt));
  left: calc(136 * var(--pt));
  right: calc(8 * var(--pt));
  height: calc(36 * var(--pt));
  border-radius: calc(18 * var(--pt));
  background: var(--sd-field);
  font-size: calc(13 * var(--pt));
}
.sd-plus,
.sd-chip {
  position: absolute;
  top: calc(4 * var(--pt));
  display: grid;
  place-items: center;
  width: calc(28 * var(--pt));
  height: calc(28 * var(--pt));
  border-radius: 50%;
  background: var(--sd-disc);
}
.sd-plus { left: calc(4 * var(--pt)); color: var(--sd-body-u); transition: transform 0.35s var(--ease), background-color 0.3s ease, color 0.3s ease; }
.sd-plus .sd-glyph { width: 60%; height: 60%; stroke-width: 2.2; }

.sd-chip {
  opacity: 0;
  transform: translateX(var(--home)) scale(0.3);
  /* The app's .snappy(0.3): the spring at a 0.3 response. */
  transition: transform 0.48s var(--spring), opacity 0.2s ease;
}
.sd-chip--unread { --home: calc(-32 * var(--pt)); left: calc(36 * var(--pt)); }
.sd-chip--starred { --home: calc(-64 * var(--pt)); left: calc(68 * var(--pt)); color: var(--sd-star); }
.sd-chip--from { --home: calc(-96 * var(--pt)); left: calc(100 * var(--pt)); }
.sd-chip-mark { display: grid; place-items: center; width: 100%; height: 100%; transition: opacity 0.2s ease; }
.sd-chip--starred .sd-glyph { width: 60%; height: 60%; }
.sd-chip-x { position: absolute; inset: 0; display: grid; place-items: center; color: var(--sd-body-u); opacity: 0; transition: opacity 0.2s ease; }
.sd-chip-x .sd-glyph { width: 62%; height: 62%; stroke-width: 2.4; }

.sd-dot { display: block; width: calc(9 * var(--pt)); height: calc(9 * var(--pt)); border-radius: 50%; background: var(--sd-dot); }
.sd-avatar {
  display: grid;
  place-items: center;
  width: 86%;
  height: 86%;
  border-radius: 50%;
  background: var(--sd-avatar);
  color: #fff;
  font-size: calc(10 * var(--pt));
  font-weight: 700;
  letter-spacing: 0;
}

.sd-words {
  position: absolute;
  top: 0;
  left: calc(40 * var(--pt));
  right: calc(28 * var(--pt));
  overflow: hidden;
  color: var(--sd-secondary);
  line-height: calc(36 * var(--pt));
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.3s ease, left 0.45s var(--ease);
}
.sd-words--place { left: calc(40 * var(--pt)); }
/* The Mac's prompt is medium, as Triage's (app-mac/inbox588). */
.sd-mac .sd-words--place { left: calc(42 * var(--pt)); font-weight: 500; }
.sd-words--1 { left: calc(72 * var(--pt)); }
.sd-words--2 { left: calc(104 * var(--pt)); }
.sd-words--3 { left: calc(136 * var(--pt)); }
.sd-words--typed { color: var(--sd-name-u); text-overflow: clip; }
.sd-words--pri { left: calc(104 * var(--pt)); }
.sd-words--launch { left: calc(136 * var(--pt)); }

/* ── Mac field ──
   Both drawn Macs' search field, the app's (app-mac/inbox588 at 2x): 37 tall
   with its top 7.5 down the 52 toolbar, fully round, #fbfbfb / #1c1c1c with a
   one-device-pixel ring inside its edge, #c9 / #0d. (The Search demo's
   window sits half a point higher on its stage, so its field keeps top 8;
   its +, chips and clear keep their places.) */
:is(.triage-demo[data-platform="macos"] .triage-search, .sd-mac .sd-field) {
  --mac-field: #fbfbfb;
  --mac-field-ring: rgb(0 0 0 / 0.2);
  height: calc(37 * var(--pt));
  border-radius: calc(18.5 * var(--pt));
  background: var(--mac-field);
  box-shadow: inset 0 0 0 calc(0.5 * var(--pt)) var(--mac-field-ring);
}
@media (prefers-color-scheme: dark) {
  html:not([data-ogplus]) :is(.triage-demo[data-platform="macos"] .triage-search, .sd-mac .sd-field) {
    --mac-field: #1c1c1c;
    --mac-field-ring: rgb(0 0 0 / 0.53);
  }
}
.sd-mac .sd-words { line-height: calc(37 * var(--pt)); }

.sd-clear {
  position: absolute;
  top: calc(10 * var(--pt));
  right: calc(8 * var(--pt));
  width: calc(16 * var(--pt));
  height: calc(16 * var(--pt));
  border-radius: 50%;
  background: var(--sd-glyph);
  color: var(--mac-field, var(--sd-field));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sd-clear .sd-glyph { stroke-width: 3; }

/* The dropdown: 4 under the field, its edges on the field's. */
.sd-menu {
  position: absolute;
  z-index: 3;
  top: calc(49 * var(--pt));
  left: calc(136 * var(--pt));
  right: calc(8 * var(--pt));
  padding: calc(4 * var(--pt)) 0;
  border-radius: calc(12 * var(--pt));
  background: var(--sd-menu);
  box-shadow: 0 0 0 0.5px var(--sd-edge), 0 calc(10 * var(--pt)) calc(28 * var(--pt)) rgb(0 0 0 / 0.16);
  font-size: calc(13 * var(--pt));
  opacity: 0;
  transform: translateY(calc(-4 * var(--pt)));
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
  pointer-events: none;
}
.sd-menu-row {
  position: relative;
  display: flex;
  align-items: center;
  height: 0;
  margin: 0 calc(4 * var(--pt));
  overflow: hidden;
  border-radius: calc(8 * var(--pt));
  color: var(--sd-name-u);
  opacity: 0;
  transition: height 0.3s var(--ease), opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.sd-menu-mark {
  position: absolute;
  left: calc(5 * var(--pt));
  display: grid;
  place-items: center;
  width: calc(18 * var(--pt));
  height: calc(18 * var(--pt));
}
.sd-menu-row--starred .sd-menu-mark { color: var(--sd-star); }
.sd-menu-row--files .sd-menu-mark,
.sd-menu-row--contains .sd-menu-mark { color: var(--sd-body-u); }
.sd-menu-row--priya .sd-menu-mark { width: calc(22 * var(--pt)); height: calc(22 * var(--pt)); }
.sd-menu-row--priya .sd-avatar { width: 100%; height: 100%; }
.sd-menu-name { position: absolute; left: calc(36 * var(--pt)); }
.sd-menu-key { position: absolute; right: calc(12 * var(--pt)); color: var(--sd-secondary); }

/* The list. */
.sd-list { position: relative; }
.sd-mac .sd-list { --row: calc(83 * var(--pt)); --text: calc(51.7 * var(--pt)); --trail: calc(25 * var(--pt)); }

.sd-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 0;
  padding: 0 var(--trail) 0 var(--text);
  overflow: hidden;
  color: var(--sd-secondary);
  font-size: calc(13 * var(--pt));
  font-weight: 600;
  opacity: 0;
  transition: height 0.45s var(--ease), opacity 0.3s ease;
}
.sd-heading-name { white-space: nowrap; }
.sd-heading--inbox { background: var(--sd-ground); }
.sd-heading--elsewhere { background: var(--sd-group); box-shadow: inset 0 1px var(--sd-line), inset 0 -1px var(--sd-line); }
.sd-heading-count { position: relative; display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
.sd-n { grid-area: 1 / 1; opacity: 0; transition: opacity 0.3s ease; }

/* The rows are Components::MailRow ("Mail row"); `.sd-row` is how the steps
   below find them. A heading's own rule stands in for the first row's. */
.sd-heading + .mail-row::before { display: none; }
.sd-list .mail-row { transition: height 0.56s var(--spring), opacity 0.3s ease; }
/* Search keeps two lines of preview, so the word it found is in sight. */
.sd-mac .mail-row-preview {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.sd-row.has-place .mail-row-preview { padding-right: calc(64 * var(--pt)); }

.sd-pointer {
  position: absolute;
  z-index: 4;
  top: calc(330 * var(--pt));
  left: calc(330 * var(--pt));
  width: calc(16 * var(--pt));
  height: calc(24 * var(--pt));
  transform-origin: 2px 2px;
  transition: top 0.5s var(--ease), left 0.5s var(--ease), opacity 0.3s ease;
}
.sd-pointer svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 0.3)); }

/* ── The iPhone: 402 x 874 points, in a plain frame. ── */
/* The 402 x 874 screen, a pixel to a point, in Components::PhoneBezel: a
   432 x 904 stage scaled whole to its slot ("Device stage"). */
.sd-phone { --pt: 1px; --stage-w: 432px; --stage-h: 904px; --phone-status-z: 4; --phone-bar-z: 3; width: min(286px, 100%); }
.search-demo[data-device="both"] .sd-phone { flex-basis: 286px; }
.sd-screen {
  position: relative;
  height: calc(874 * var(--pt));
  overflow: hidden;
  border-radius: calc(62 * var(--pt));
  background: var(--sd-ground);
  font-size: calc(17 * var(--pt));
}
.sd-sub { grid-area: 1 / 1; white-space: nowrap; opacity: 0; transition: opacity 0.3s ease 0.9s; }
/* The phone's top is Components::PhoneChrome ("Phone chrome"). Its status
   bar stays over the dim and the bar (--phone-status-z on .sd-phone); while a
   subtitle shows, the title rises to make room for it, as the app's does. */
.search-demo:is([data-step="2"], [data-step="3"], [data-step="4"], [data-step="5"], [data-step="6"], [data-step="7"]) .phone-title { transform: translateY(calc(-7.67 * var(--pt))); }

.sd-phone .sd-list {
  position: absolute;
  top: calc(116 * var(--pt));
  left: 0;
  right: 0;
  --row: calc(107 * var(--pt));
  --gut: calc(20 * var(--pt));
  --text: calc(36 * var(--pt));
  --trail: calc(20 * var(--pt));
}
.sd-phone .sd-heading { font-size: calc(15 * var(--pt)); }
.sd-phone .sd-dot { width: calc(10 * var(--pt)); height: calc(10 * var(--pt)); }
/* The rows are Components::MailRow's iPhone row ("Mail row"), 107 apiece. */

.sd-dim { position: absolute; inset: 0; z-index: 2; background: var(--sd-veil); opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }

/* The bar is Components::PhoneBar ("Phone bar"): the field fills its oval,
   the + its well at the leading end. After the + slot (the oval's first 46)
   the chips, 40 wide on a 44 pitch from 48, and the words 6 after the last
   chip's slot (48 with none), ending 16 in (OvalMetrics, leading). */
.sd-phone .sd-field { inset: 0; height: auto; border-radius: inherit; background: none; font-size: inherit; }
.sd-phone .sd-chip {
  top: calc(7 * var(--pt));
  width: calc(40 * var(--pt));
  height: calc(32 * var(--pt));
  border-radius: calc(16 * var(--pt));
  background: var(--sd-chip);
  transform: scale(0.3);
}
.sd-phone .sd-chip--unread { left: calc(48 * var(--pt)); }
.sd-phone .sd-chip--starred { left: calc(92 * var(--pt)); }
.sd-phone .sd-chip--from { left: calc(136 * var(--pt)); }
.sd-phone .sd-chip--starred .sd-glyph { width: calc(18 * var(--pt)); height: calc(18 * var(--pt)); }
.sd-phone .sd-chip .sd-avatar { width: calc(26 * var(--pt)); height: calc(26 * var(--pt)); font-size: calc(10.5 * var(--pt)); }
.sd-phone .sd-words { left: calc(48 * var(--pt)); right: calc(16 * var(--pt)); line-height: calc(46 * var(--pt)); }
.sd-phone .sd-words--1 { left: calc(96 * var(--pt)); }
.sd-phone :is(.sd-words--2, .sd-words--pri) { left: calc(140 * var(--pt)); }
/* Three chips: "Search", as the app says when their names do not fit. */
.sd-phone :is(.sd-words--3, .sd-words--launch) { left: calc(184 * var(--pt)); }

/* The fan: centred on the + (Components::PhoneBar: 58 in, 816 down), each
   piece at the place Components::SearchDemo gives it (--dx, --dy: FilterFan's
   far layout on a 402 screen, the + leading). */
.sd-fan { position: absolute; z-index: 3; left: calc(58 * var(--pt)); top: calc(816 * var(--pt)); width: 0; height: 0; }
/* Each piece is its 48 disc, centred on its point of the arc. Its name's card
   stands at its anchor (--lx, --ly, the app's places) as FilterFan.labelFrame
   stands it: the card's near side toward the piece, so the anchor is
   (1 - cos) / 2 of the way along its width and (1 + sin) / 2 down it. The
   card: 15 semibold, 8 and 5 of ground, corner 8. */
.sd-piece {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  opacity: 0;
  transform: scale(0.3);
  transition: transform 0.4s var(--ease), opacity 0.25s ease;
}
.sd-piece-name {
  position: absolute;
  top: calc(var(--ly) * var(--pt));
  left: calc(var(--lx) * var(--pt));
  /* 5 above and below; the browser's line sets SF a third of a point lower
     than the app's, so a third comes off the top. */
  padding: calc(4.67 * var(--pt)) calc(8 * var(--pt)) calc(5.33 * var(--pt));
  border-radius: calc(8 * var(--pt));
  background: var(--sd-bar);
  box-shadow: inset 0 0 0 calc(0.33 * var(--pt)) var(--sd-edge);
  color: var(--sd-name-u);
  font-size: calc(15 * var(--pt));
  font-weight: 600;
  line-height: normal;
  white-space: nowrap;
  transform: translate(calc((var(--c) - 1) * 50%), calc((1 + var(--s)) * -50%));
}
.sd-piece-disc {
  position: absolute;
  top: calc(-24 * var(--pt));
  left: calc(-24 * var(--pt));
  display: grid;
  place-items: center;
  width: calc(48 * var(--pt));
  height: calc(48 * var(--pt));
  border-radius: 50%;
  background: var(--sd-bar);
  color: var(--sd-body-u);
  /* The app's rim is inside the 48. */
  box-shadow: inset 0 0 0 calc(0.5 * var(--pt)) var(--sd-edge), 0 calc(3 * var(--pt)) calc(12 * var(--pt)) rgb(0 0 0 / 0.14);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.sd-piece-disc .sd-glyph { width: 46%; height: 46%; }
.sd-piece--unread .sd-dot { width: calc(12 * var(--pt)); height: calc(12 * var(--pt)); transition: background-color 0.25s ease; }
.sd-piece--starred .sd-piece-disc { color: var(--sd-star); }
.sd-piece--files .sd-piece-disc,
.sd-piece--from .sd-piece-disc,
.sd-piece--words .sd-piece-disc { color: var(--sd-body-u); }

.sd-touch {
  position: absolute;
  z-index: 5;
  top: calc(816 * var(--pt));
  left: calc(58 * var(--pt));
  width: calc(44 * var(--pt));
  height: calc(44 * var(--pt));
  margin: calc(-22 * var(--pt)) 0 0 calc(-22 * var(--pt));
  border-radius: 50%;
  background: rgb(128 128 128 / 0.35);
  box-shadow: 0 0 0 1.5px rgb(255 255 255 / 0.7);
  opacity: 0;
  transition: top 0.45s var(--ease), left 0.45s var(--ease), opacity 0.25s ease;
}

/* ── The caption, and the old way beside it ── */
.sd-foot { display: grid; justify-items: center; gap: 0.6rem; text-align: center; }
.sd-captions { display: grid; margin: 0; padding: 0; list-style: none; font-size: clamp(1.15rem, 2.4vw, 1.4rem); font-weight: 600; }
.sd-caption { grid-area: 1 / 1; opacity: 0; transition: opacity 0.35s ease; }
.sd-old { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem 0.6rem; margin: 0; font-size: 0.95rem; }
.sd-old-label { color: var(--page-text-secondary, inherit); }
.sd-old-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.95em; }
.sd-token { opacity: 0.35; text-decoration: line-through transparent; transition: opacity 0.3s ease, text-decoration-color 0.3s ease; }

/* ── The steps ── */
.search-demo[data-step="0"] :is(.sd-caption, .sd-words, .sd-sub, .sd-n)[data-steps~="0"],
.search-demo[data-step="1"] :is(.sd-caption, .sd-words, .sd-sub, .sd-n)[data-steps~="1"],
.search-demo[data-step="2"] :is(.sd-caption, .sd-words, .sd-sub, .sd-n)[data-steps~="2"],
.search-demo[data-step="3"] :is(.sd-caption, .sd-words, .sd-sub, .sd-n)[data-steps~="3"],
.search-demo[data-step="4"] :is(.sd-caption, .sd-words, .sd-sub, .sd-n)[data-steps~="4"],
.search-demo[data-step="5"] :is(.sd-caption, .sd-words, .sd-sub, .sd-n)[data-steps~="5"],
.search-demo[data-step="6"] :is(.sd-caption, .sd-words, .sd-sub, .sd-n)[data-steps~="6"],
.search-demo[data-step="7"] :is(.sd-caption, .sd-words, .sd-sub, .sd-n)[data-steps~="7"] { opacity: 1; }

/* Words change as the chip lands; typing is revealed a letter at a time. */
.search-demo:is([data-step="2"], [data-step="3"], [data-step="5"]) .sd-words { transition-delay: 0.75s; }
.search-demo[data-step="4"] .sd-words--pri { animation: sd-type 0.5s steps(3, end) 0.2s both; }
.search-demo[data-step="6"] .sd-words--launch { animation: sd-type 0.8s steps(6, end) 0.2s both; }
.search-demo[data-step="7"] .sd-words--launch { left: calc(104 * var(--pt)); transition-delay: 0s, 0.95s; }
.search-demo[data-step="7"] .sd-phone .sd-words--launch { left: calc(140 * var(--pt)); }
@keyframes sd-type {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* Chips: out from under the + (the Mac) or up from their own centre (the
   iPhone); the one taken off shrinks into its centre and the next closes up. */
.search-demo:is([data-step="2"], [data-step="3"], [data-step="4"], [data-step="5"], [data-step="6"], [data-step="7"]) .sd-chip--unread,
.search-demo:is([data-step="3"], [data-step="4"], [data-step="5"], [data-step="6"]) .sd-chip--starred,
.search-demo:is([data-step="5"], [data-step="6"], [data-step="7"]) .sd-chip--from { opacity: 1; transform: none; }
.search-demo[data-step="2"] .sd-chip--unread,
.search-demo[data-step="3"] .sd-chip--starred,
.search-demo[data-step="5"] .sd-chip--from { transition-delay: 0.75s; }
.search-demo[data-step="7"] .sd-chip--starred { transform: scale(0.2); transition-delay: 0.9s; }
.search-demo[data-step="7"] .sd-chip--starred .sd-chip-mark { opacity: 0; transition-delay: 0.5s; }
.search-demo[data-step="7"] .sd-chip--starred .sd-chip-x { opacity: 1; transition-delay: 0.5s; }
.search-demo[data-step="7"] .sd-chip--from { transform: translateX(calc(-32 * var(--pt))); transition-delay: 0.95s; }
.search-demo[data-step="7"] .sd-phone .sd-chip--from { transform: translateX(calc(-44 * var(--pt))); }
/* On iPhone Unread and Starred come down from their pieces of the fan (the
   piece's centre less the chip's: Unread 229.4, 761 to 103, 816; Starred
   203.9, 710.6 to 147, 816), waiting there unseen the step before. From
   lands where "pri" was typed. Leaving, a chip shrinks into its own centre. */
.sd-phone .sd-chip--unread { --from: calc(126.39 * var(--pt)), calc(-55 * var(--pt)); }
.sd-phone .sd-chip--starred { --from: calc(56.91 * var(--pt)), calc(-105.4 * var(--pt)); }
.search-demo[data-step="1"] .sd-phone .sd-chip--unread,
.search-demo[data-step="2"] .sd-phone .sd-chip--starred { transform: translate(var(--from)) scale(1.2, 1.5); }
.search-demo[data-step="1"] .sd-phone .sd-chip--unread,
.search-demo[data-step="2"] .sd-phone .sd-chip--starred { transition-duration: 0s; }
.search-demo:not([data-step="0"]):not([data-step="1"]) .sd-clear { opacity: 1; transition-delay: 0.75s; }

/* The Mac's dropdown. Which rows it has, step by step, and which is lit. */
.search-demo:is([data-step="1"], [data-step="2"], [data-step="3"], [data-step="4"]) .sd-menu { opacity: 1; transform: none; }
.search-demo[data-step="1"] .sd-menu { transition-delay: 0.3s; }
.search-demo[data-step="5"] .sd-menu { opacity: 1; transform: none; animation: sd-menu-out 0.3s ease 1.1s both; }
@keyframes sd-menu-out { to { opacity: 0; } }
.search-demo[data-step="1"] :is(.sd-menu-row--unread, .sd-menu-row--starred, .sd-menu-row--files),
.search-demo[data-step="2"] :is(.sd-menu-row--unread, .sd-menu-row--starred, .sd-menu-row--files),
.search-demo[data-step="3"] :is(.sd-menu-row--starred, .sd-menu-row--files),
.search-demo:is([data-step="4"], [data-step="5"]) :is(.sd-menu-row--contains, .sd-menu-row--priya) { height: calc(28 * var(--pt)); opacity: 1; }
.search-demo[data-step="2"] .sd-menu-row--unread,
.search-demo[data-step="3"] .sd-menu-row--starred { animation: sd-row-taken 0.3s var(--ease) 1s both; }
@keyframes sd-row-taken { to { height: 0; opacity: 0; } }
.search-demo[data-step="2"] .sd-menu-row--unread,
.search-demo[data-step="3"] .sd-menu-row--starred,
.search-demo[data-step="5"] .sd-menu-row--priya { background: var(--sd-pick); color: var(--sd-pick-ink); transition-delay: 0s, 0s, 0.45s, 0.45s; }
.search-demo[data-step="4"] .sd-menu-row--contains { background: var(--sd-pick); color: var(--sd-pick-ink); }
.search-demo:is([data-step="2"], [data-step="3"], [data-step="4"], [data-step="5"]) :is(.sd-menu-row--unread, .sd-menu-row--starred, .sd-menu-row--contains, .sd-menu-row--priya) .sd-menu-mark { color: inherit; }

/* The pointer: the +, the first row, the second, the Starred chip. */
.search-demo[data-step="1"] .sd-pointer { top: calc(24 * var(--pt)); left: calc(152 * var(--pt)); animation: sd-click 0.25s ease 0.45s; }
.search-demo:is([data-step="2"], [data-step="3"], [data-step="4"]) .sd-pointer { top: calc(64 * var(--pt)); left: calc(250 * var(--pt)); }
.search-demo:is([data-step="2"], [data-step="3"]) .sd-pointer { animation: sd-click 0.25s ease 0.5s; }
.search-demo:is([data-step="5"], [data-step="6"]) .sd-pointer { top: calc(92 * var(--pt)); left: calc(262 * var(--pt)); }
.search-demo[data-step="5"] .sd-pointer { animation: sd-click 0.25s ease 0.5s; }
.search-demo[data-step="7"] .sd-pointer { top: calc(24 * var(--pt)); left: calc(218 * var(--pt)); animation: sd-click 0.25s ease 0.75s; }
@keyframes sd-click { 50% { transform: scale(0.86); } }

/* The list: rows close up and open out; the headings come with the words. */
.search-demo[data-step="0"] .sd-row:not([data-in~="0"]),
.search-demo[data-step="1"] .sd-row:not([data-in~="1"]),
.search-demo[data-step="2"] .sd-row:not([data-in~="2"]),
.search-demo[data-step="3"] .sd-row:not([data-in~="3"]),
.search-demo[data-step="4"] .sd-row:not([data-in~="4"]),
.search-demo[data-step="5"] .sd-row:not([data-in~="5"]),
.search-demo[data-step="6"] .sd-row:not([data-in~="6"]),
.search-demo[data-step="7"] .sd-row:not([data-in~="7"]) { height: 0; opacity: 0; }
.search-demo:is([data-step="6"], [data-step="7"]) .sd-heading { height: calc(34 * var(--pt)); opacity: 1; }
.search-demo:is([data-step="2"], [data-step="3"], [data-step="5"], [data-step="6"]) :is(.sd-row, .sd-heading) { transition-delay: 0.9s; }
.search-demo[data-step="7"] .sd-row { transition-delay: 1.1s; }
.search-demo[data-step="7"] .sd-n { transition-delay: 1.1s; }
/* Round again: the whole list opens back out, slower than any one step. */
.search-demo[data-step="0"] :is(.sd-row, .sd-heading) { transition-duration: 0.8s, 0.6s; transition-delay: 0.3s; }
.search-demo:is([data-step="6"], [data-step="7"]) .mail-row-hit { color: var(--mr-name); font-weight: 600; font-variation-settings: "wght" 590; }
.search-demo[data-step="6"] .mail-row-hit { transition-delay: 0.9s; }

/* The iPhone: the fan out of the +, picks turning blue, + turned to x.
   The + is pressed and held (FanReach): the pieces burst out of it to near
   (44 across, --nx, --ny) at once, hold there 0.18 s, then carry out to far
   (48 across) over 0.45 s, quick at first and settling, and the names come in
   over the last fifth of that reach. A still is far, with its names. */
.search-demo:is([data-step="1"], [data-step="2"], [data-step="3"], [data-step="4"]) .sd-piece {
  opacity: 1;
  transform: translate(calc(var(--dx) * var(--pt)), calc(var(--dy) * var(--pt)));
}
.search-demo[data-step="1"] .sd-piece { animation: sd-fan-reach 1.03s 0.3s both; }
.search-demo[data-step="1"] .sd-piece-name { animation: sd-fan-names 1.03s 0.3s both; }
@keyframes sd-fan-reach {
  0% { opacity: 0; transform: scale(0.3); animation-timing-function: var(--ease); }
  39% { opacity: 1; transform: translate(calc(var(--nx) * var(--pt)), calc(var(--ny) * var(--pt))) scale(0.9167); }
  56% { opacity: 1; transform: translate(calc(var(--nx) * var(--pt)), calc(var(--ny) * var(--pt))) scale(0.9167); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  100% { opacity: 1; transform: translate(calc(var(--dx) * var(--pt)), calc(var(--dy) * var(--pt))); }
}
@keyframes sd-fan-names { 0%, 75% { opacity: 0; } 100% { opacity: 1; } }
.search-demo[data-step="4"] .sd-piece { animation: sd-fan-shut 0.35s var(--ease) 0.75s both; }
@keyframes sd-fan-shut { to { opacity: 0; transform: scale(0.3); } }
.search-demo:is([data-step="2"], [data-step="3"], [data-step="4"]) .sd-piece--unread .sd-piece-disc,
.search-demo:is([data-step="3"], [data-step="4"]) .sd-piece--starred .sd-piece-disc,
.search-demo[data-step="4"] .sd-piece--from .sd-piece-disc { background: var(--sd-blue); color: #fff; }
.search-demo:is([data-step="3"], [data-step="4"]) .sd-piece--starred .sd-piece-disc { color: var(--sd-star); }
.search-demo:is([data-step="2"], [data-step="3"], [data-step="4"]) .sd-piece--unread .sd-dot { background: #fff; }
.search-demo[data-step="2"] .sd-piece--unread :is(.sd-piece-disc, .sd-dot),
.search-demo[data-step="3"] .sd-piece--starred .sd-piece-disc,
.search-demo[data-step="4"] .sd-piece--from .sd-piece-disc { transition-delay: 0.45s; }
.search-demo:is([data-step="1"], [data-step="2"], [data-step="3"]) .sd-phone .sd-plus { transform: rotate(45deg); background: var(--sd-blue); color: #fff; transition-delay: 0.3s; }
.search-demo[data-step="4"] .sd-phone .sd-plus { animation: sd-plus-back 0.35s var(--ease) 0.75s both; transform: rotate(45deg); background: var(--sd-blue); color: #fff; }
@keyframes sd-plus-back { to { transform: none; background-color: var(--sd-well); color: var(--sd-blue); } }
.search-demo:is([data-step="1"], [data-step="2"], [data-step="3"]) .sd-dim { opacity: 1; transition-delay: 0.3s; }
.search-demo[data-step="4"] .sd-dim { opacity: 1; animation: sd-menu-out 0.35s ease 0.75s both; }

/* The finger: held on the + while the fan opens, then on Unread, Starred and
   From at their far places, and on the Starred chip to take it off. */
.search-demo[data-step="1"] .sd-touch { top: calc(816 * var(--pt)); left: calc(58 * var(--pt)); opacity: 1; animation: sd-press 1.25s ease 0.2s; }
.search-demo:is([data-step="2"], [data-step="3"], [data-step="4"]) .sd-touch { opacity: 1; animation: sd-tap 0.3s ease 0.45s; }
.search-demo[data-step="2"] .sd-touch { top: calc(761 * var(--pt)); left: calc(229.39 * var(--pt)); }
.search-demo[data-step="3"] .sd-touch { top: calc(710.6 * var(--pt)); left: calc(203.91 * var(--pt)); }
.search-demo[data-step="4"] .sd-touch { top: calc(644.86 * var(--pt)); left: calc(113.78 * var(--pt)); }
.search-demo[data-step="4"] .sd-touch { animation: sd-tap 0.3s ease 0.45s, sd-menu-out 0.3s ease 0.8s both; }
.search-demo[data-step="7"] .sd-touch { top: calc(816 * var(--pt)); left: calc(35 * var(--pt) + 112 * var(--pt)); opacity: 1; animation: sd-tap 0.3s ease 0.6s, sd-menu-out 0.3s ease 1.3s both; }
@keyframes sd-tap { 50% { transform: scale(0.8); } }
@keyframes sd-press { 12%, 88% { transform: scale(0.8); } }

/* The old way, a token at a time; the one taken back is struck through. */
.search-demo:is([data-step="2"], [data-step="3"], [data-step="4"], [data-step="5"], [data-step="6"], [data-step="7"]) .sd-token[data-token="unread"],
.search-demo:is([data-step="3"], [data-step="4"], [data-step="5"], [data-step="6"], [data-step="7"]) .sd-token[data-token="starred"],
.search-demo:is([data-step="5"], [data-step="6"], [data-step="7"]) .sd-token[data-token="priya"],
.search-demo:is([data-step="6"], [data-step="7"]) .sd-token[data-token="launch"] { opacity: 1; transition-delay: 0.75s; }
.search-demo[data-step="7"] .sd-token[data-token="starred"] { opacity: 0.45; text-decoration-color: currentColor; transition-delay: 0.9s; }

/* Still: a pinned step, reduced motion, no script, or a share card. */
.search-demo:is([data-still], .is-static) *,
.search-demo:is([data-still], .is-static) *::before { transition: none !important; animation: none !important; }
.search-demo:is([data-still], .is-static) .sd-pointer,
.search-demo:is([data-still], .is-static) .sd-touch { display: none; }
.search-demo.is-static .sd-captions {
  display: block;
  width: fit-content;
  margin-inline: auto;
  padding-left: 1.4em;
  font-size: 1rem;
  font-weight: 500;
  list-style: decimal;
  text-align: left;
}
.search-demo.is-static .sd-caption { opacity: 1; }

/* A still sized to what it shows: the window hugs its rows. */
.search-demo[data-pinned] .sd-window { height: auto; padding-bottom: calc(10 * var(--pt)); }
/* What each pinned window measures at the app's size, reserved for it
   scaled; device_stage_test holds these to the drawn windows. */
.search-demo[data-pinned][data-step="5"] .sd-mac { --stage-h: 228px; }
.search-demo[data-pinned][data-step="6"] .sd-mac { --stage-h: 462px; }
.search-demo[data-pinned][data-step="7"] .sd-mac { --stage-h: 628px; }
.search-demo[data-pinned][data-step="5"] .sd-menu { display: none; }

/* Phone widths show the device in the visitor's hand. */
@media (max-width: 760px) {
  .search-demo[data-device="both"] .sd-mac { display: none; }
}

/* ── Spotlight pages ──────────────────────────────────────────────────────────
   One of an app's bigger features as its own page (SpotlightPage, layout
   `spotlight`): /apps/email/search. Made to be landed on from a link: the app
   and the feature in a few lines, the feature working, the way to get it, then
   the pieces one at a time, each beside a still of it. ── */
/* One column edge for the whole page, the app page's: a 1200 wrapper with the
   space-xl inset on wider screens. */
.spotlight-hero {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  color: var(--page-text);
}
.spotlight-page .product-main .container { max-width: 1200px; }
@media (min-width: 640px) {
  .spotlight-hero,
  .spotlight-page .product-main .container { padding-inline: var(--space-xl); }
}
.spotlight-app {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2em 0.6em;
  margin: 0 0 var(--space-sm);
  color: var(--page-text-secondary);
  font-size: var(--text-base);
}
.spotlight-app-link {
  color: var(--page-text);
  font-weight: 800;
  text-decoration: none;
}
.spotlight-app-link::before { content: "‹ "; font-weight: 600; }
.spotlight-app-link:hover { text-decoration: underline; text-underline-offset: 0.15em; }
.spotlight-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
.spotlight-line {
  max-width: 40rem;
  margin: var(--space-sm) 0 0;
  color: var(--page-text);
  font-size: var(--text-md);
  line-height: 1.4;
  text-wrap: pretty;
}

.spotlight-stage {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-lg);
  color: var(--page-text);
}

.spotlight-get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
  margin: 0 0 var(--space-lg);
}
.spotlight-get .store-cta,
.spotlight-get .signup-wrapper { margin-top: 0; }
.spotlight-more {
  color: var(--page-text);
  font-weight: 600;
  text-decoration: none;
}
.spotlight-more::after { content: " ›"; }
.spotlight-more:hover { text-decoration: underline; text-underline-offset: 0.15em; }

/* The pieces: words one side, a still the other, alternating. */
.spotlight-piece {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-lg) 0;
}
.spotlight-piece + .spotlight-piece { border-top: 1px solid oklch(from var(--page-text, #000) l c h / 0.12); }
.spotlight-piece:nth-child(even) .spotlight-piece-copy { order: 2; }
.spotlight-piece-copy h2 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
.spotlight-piece-copy p { margin: 0 0 var(--space-sm); line-height: 1.5; text-wrap: pretty; }
.spotlight-piece-copy p:last-child { margin-bottom: 0; }
.spotlight-piece-art { display: flex; justify-content: center; min-width: 0; }
.spotlight-piece-art .search-demo,
.spotlight-piece-art .triage-demo { width: min(460px, 100%); }
.spotlight-piece-art--phone .search-demo,
.spotlight-piece-art--phone .triage-demo { width: min(240px, 70%); }
.spotlight-piece-art .sd-device { width: 100%; }
.spotlight-piece-art img { display: block; max-width: 100%; height: auto; }

@media (max-width: 760px) {
  .spotlight-piece { grid-template-columns: minmax(0, 1fr); }
  .spotlight-piece:nth-child(even) .spotlight-piece-copy { order: 0; }
}

/* The share card: the feature's words on the left, the feature on the right,
   from the same page. Viewport units, so it fills whatever ogplus renders at. */
html[data-ogplus] .spotlight-page .page-nav,
html[data-ogplus] .spotlight-page .product-main > .container,
html[data-ogplus] .spotlight-page .product-footer,
html[data-ogplus] .spotlight-page .product-legal { display: none; }
html[data-ogplus] .spotlight-page .product-main { position: relative; height: 100vh; overflow: hidden; }
html[data-ogplus] .spotlight-hero {
  position: absolute;
  top: 7vh;
  left: 5vw;
  width: 40vw;
  max-width: none;
  padding: 0;
  color: #fff;
}
html[data-ogplus] .spotlight-hero .product-brand { margin-bottom: 3vh; color: #fff; font-size: 1.6vw; letter-spacing: 0.3em; }
html[data-ogplus] .spotlight-app { margin-bottom: 2vh; color: rgb(255 255 255 / 0.78); font-size: 2vw; }
html[data-ogplus] .spotlight-app-link { color: #fff; }
html[data-ogplus] .spotlight-app-link::before { content: none; }
html[data-ogplus] .spotlight-app-tagline { display: none; }
html[data-ogplus] .spotlight-title { font-size: 4.9vw; line-height: 1; }
html[data-ogplus] .spotlight-line { margin-top: 3vh; color: rgb(255 255 255 / 0.86); font-size: 1.9vw; }
html[data-ogplus] .spotlight-stage {
  position: absolute;
  top: 6vh;
  left: 49vw;
  width: 46vw;
  max-width: none;
  padding: 0;
  color: #fff;
}
html[data-ogplus] .spotlight-stage .sd-phone,
html[data-ogplus] .spotlight-stage .sd-captions { display: none; }
/* The card's Mac fills its column, larger than the app if the card is: the
   whole window scaled, its type with it. */
html[data-ogplus] .spotlight-stage .sd-mac { --stage-h: 460px; width: 100%; }
html[data-ogplus] .spotlight-stage .sd-mac .device-slot { --fit: tan(atan2(100cqw, var(--stage-w))); }
html[data-ogplus] .spotlight-stage .sd-window { height: auto; padding-bottom: calc(8 * var(--pt)); }
html[data-ogplus] .spotlight-stage .search-demo { gap: 2.4vh; }
html[data-ogplus] .spotlight-stage .sd-old { font-size: 1.7vw; }
html[data-ogplus] .spotlight-stage .sd-old-code { padding: 0.3em 0.7em; border-radius: 0.5em; background: rgb(255 255 255 / 0.12); }
html[data-ogplus] .spotlight-stage .sd-token { opacity: 1; }

/* Two devices side by side on the stage; on a phone, the phone. */
.spotlight-pair { display: flex; align-items: flex-start; justify-content: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
.spotlight-pair .triage-demo[data-platform="macos"] { flex: 0 1 560px; }
.spotlight-pair .triage-demo[data-platform="ios"] { flex: 0 1 286px; }
@media (max-width: 760px) {
  .spotlight-pair .triage-demo[data-platform="macos"] { display: none; }
}
.spotlight-piece-art .shot { display: block; width: min(460px, 100%); }
/* A piece with no art: its words take the measure of a paragraph. */
.spotlight-piece--words { grid-template-columns: minmax(0, 40rem); }
html[data-ogplus] .spotlight-stage .spotlight-pair .triage-demo[data-platform="ios"],
html[data-ogplus] .spotlight-stage .triage-captions { display: none; }
html[data-ogplus] .spotlight-stage .spotlight-pair .triage-demo[data-platform="macos"] { flex-basis: 100%; }
.spotlight-body { margin-bottom: var(--space-lg); }
