/* ==========================================================================
   ds / ds.css
   The design system layer: tokens, base, layout, every component, the light
   theme and the utilities. Generic: no rule here exists for one project page.
   Its visual language: a black stage, system type, big rounded media and
   caption-tile galleries.
   Documented in docs/ (one page per component; COMPONENTS.md is generated
   from it), shown in components.html and the pages in examples/.
   Project rules live in the host project's stylesheet, loaded after this file.

   Breakpoints: large >= 1069px, medium 735-1068px, small <= 734px.
   One component sits off that grid on purpose: the chapter-links local nav
   folds into a menu at 834px (Local nav block), because its links need room before
   the medium layout ends.
   Hover styles sit inside @media (hover: hover), so a tap on a touch screen
   does not leave the element in its hover state.

   File order: TOKENS, BASE, LAYOUT, COMPONENTS, UTILITIES. Every component block opens
   with a one-line header: its name, selectors, what it is and its docs page.
   Rule order is part of the cascade: before moving a block, check that
   no rule of the same specificity that can match the same element sits between the
   old and new positions.
   ========================================================================== */

/* ==========================================================================
   TOKENS
   Custom properties on :root: colour, type scale, spacing, radii, icon masks.
   Nothing here draws anything by itself.
   ========================================================================== */
/* :root carries the light colour tokens; [data-theme="light"] re-declares them
   for a light scope inside a dark one. */
:root,
[data-theme="light"] {
  color-scheme: light;

  /* colour */
  --bg: #ffffff;
  --bg-raised: #f5f5f7;        /* tiles, cards, media wells */
  --bg-band: #f5f5f7;          /* tinted section band, footer */
  --bg-sheet: #ffffff;         /* modal sheet */
  --text: #1d1d1f;
  --text-2: #6e6e73;           /* secondary copy */
  --text-3: #86868b;           /* chevrons, tertiary */
  --hair: #d2d2d7;             /* hairlines */
  --link: #0066cc;
  --blue: #0071e3;
  --blue-hover: #0076df;
  --ui: rgba(210, 210, 215, 0.64);          /* paddles, play/pause, platters */
  --ui-hover: rgba(223, 223, 227, 0.698);
  --ui-icon: rgba(0, 0, 0, 0.56);
  --ui-icon-hover: rgba(0, 0, 0, 0.64);
  --nav-bg: rgba(250, 250, 252, 0.8);
  --scrim: rgba(0, 0, 0, 0.48);
  --focus-ring: #0071e3;
  --bg-well-raised: #ffffff;   /* a well or card sitting on a raised surface (band, sheet) */

  /* colour recipes that components used to hard-code. Values are the dark ones;
     a theme scope re-maps them. */
  --bg-raised-hover: #f5f5f7;                /* hover of a raised tile or card */
  --on-text: #ffffff;                        /* ink on a --text fill (neutral pill, selected tab, pressed filter) */
  --on-accent: #fff;                         /* white on --blue or an accent fill; the same in every theme */
  --fill-hover: #272729;                     /* hover of a --text fill */
  --text-hover: #000000;                        /* nav, tab and footer link hover */
  --selection: rgba(41, 151, 255, 0.45);     /* text selection */
  --globalnav-link: rgba(0, 0, 0, 0.8); /* global nav links */
  --globalnav-link-current: rgba(0, 0, 0, 0.56); /* global nav, current page */
  --nav-link: rgba(0, 0, 0, 0.8);      /* local nav links and menu toggle */
  --nav-link-current: rgba(0, 0, 0, 0.56); /* local nav, current chapter */
  --nav-hair: rgba(0, 0, 0, 0.16);     /* stuck local nav edge, phone menu edge */
  --nav-hair-soft: rgba(0, 0, 0, 0.08); /* phone menu row separators */
  --nav-menu-bg: rgba(250, 250, 252, 0.96);     /* phone menu panel */
  --dot: rgba(29, 29, 31, 0.6);           /* dot-nav dot */
  --dot-hover: rgba(0, 0, 0, 0.54);                      /* dot-nav dot, hover */
  --dot-fill: #29292a;                          /* dot-nav active progress fill */
  --platter: #e8e8ed;         /* tabnav platter */
  --platter-tab: rgba(0, 0, 0, 0.8);   /* tabnav unselected tab */
  --control: #1d1d1f;                        /* round control disc: icon-card plus, next-project arrow, modal close */
  --control-hover: #272729;                  /* control disc, hover */
  --modal-close-icon: #ffffff;               /* modal close glyph */
  --fill-soft: rgba(29, 29, 31, 0.07);     /* badge, inline code */
  --badge-outline: #86868b; /* outline badge ring */
  --ring: rgba(0, 0, 0, 0.08);         /* device-frame ring */
  --footer-link: rgba(0, 0, 0, 0.72);                    /* footer links */
  --sheet-shadow: none; /* modal sheet shadow */
  --scrollbar: #d2d2d7;                      /* code block scrollbar thumb */
  --chiclet-bg: radial-gradient(120% 120% at 30% 15%, #ffffff 0%, #f5f5f7 55%, #e8e8ed 100%); /* chiclet fill */
  --chiclet-ring: rgba(0, 0, 0, 0.08); /* chiclet inner ring */
  --chiclet-gloss: rgba(255, 255, 255, 0); /* chiclet top edge light */
  --banner-bg: #f5f5f7; /* banner card fill */
  --banner-rim: rgba(0, 0, 0, 0);   /* banner card rim light, start */
  --banner-rim-end: rgba(0, 0, 0, 0);  /* banner card rim light, end */
  --wanted-bg: rgba(0, 0, 0, 0.02);    /* wanted placeholder fill */
  --wanted-stripe: rgba(0, 0, 0, 0.045); /* wanted placeholder stripes */
  --wanted-border: rgba(29, 29, 31, 0.3); /* wanted placeholder dashed border */

  /* tokens the light theme needs; each dark value is the token or literal it
     replaces, so dark pages render as before */
  --bg-band-raised: #ffffff;                 /* --bg-raised for the children of a band (.tone-band, .tone-raised, .highlights) */
  --bg-band-raised-hover: #ffffff;           /* --bg-raised-hover for the same */
  --bg-sheet-raised: #f5f5f7;                /* --bg-well-raised inside a modal sheet */
  --control-icon: #ffffff;  /* glyph on a --control disc (icon-card plus, next-project arrow) */
  --control-icon-hover: #ffffff;             /* the same, hover; also the modal close glyph on hover */
  --ui-float: rgba(232, 232, 237, 0.72);        /* dot-nav pill and highlights play/pause */
  --ui-float-blur: blur(7px); /* their backdrop-filter */
  --answer-text: #1d1d1f;                    /* FAQ answer copy */
}

:root {

  /* per-project accent: override on any ancestor. Consumers build the
     gradient themselves (linear-gradient(90deg, var(--accent-1), var(--accent-2)))
     so an override on <body>, a section or a chiclet reaches them.
     Both stops colour small text, so each must reach 4.5:1 on #000.
     --accent-gradient is kept for old pages only; it never follows overrides. */
  --accent-1: #2997ff;
  --accent-2: #bf5af2;
  --accent-gradient: linear-gradient(90deg, var(--accent-1), var(--accent-2));

  /* shape */
  --r-lg: 22px;               /* tiles, media, cards */
  --r-md: 18px;               /* inner media, phone tiles */
  --r-sm: 12px;
  --r-pill: 980px;
  --r-chiclet: 22.5%;

  /* layout */
  --content-max: 1260px;
  --content: min(var(--content-max), 87.5%);
  --edge: max(6.25%, calc((100% - var(--content-max)) / 2)); /* gallery first-item inset */
  --gap: 20px;
  --section-pad: 160px;
  --block-gap: 72px;          /* head -> media -> gallery inside a section */
  --nav-h: 44px;
  --localnav-h: 52px;

  /* type: --font-text below 19px, --font-display at 19px and up. Both
     default to the system UI face; set either for a brand face. */
  --font-text: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font: var(--font-text);
  --font-mono: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  --fs-marquee: 80px;  --lh-marquee: 84px;  --ls-marquee: -0.015em;
  --fs-headline: 56px; --lh-headline: 60px; --ls-headline: -0.005em;
  --fs-section: 56px;  --lh-section: 60px;  --ls-section: -0.005em;
  --fs-reduced: 40px;  --lh-reduced: 44px;  --ls-reduced: 0em;
  --fs-faq: 48px;      --lh-faq: 52px;      --ls-faq: -0.003em;
  --fs-stat: 80px;     --lh-stat: 84px;     --ls-stat: -0.015em;
  --fs-eyebrow: 24px;  --lh-eyebrow: 28px;  --ls-eyebrow: 0.009em;
  --fs-card: 24px;     --lh-card: 28px;     --ls-card: 0.009em;
  --fs-copy: 21px;     --lh-copy: 25px;     --ls-copy: 0.011em;
  --fs-lead: 21px;     --lh-lead: 25px;     --ls-lead: 0.011em;   /* welcome body */
  --fs-intro: 21px;    --lh-intro: 29px;    --ls-intro: 0.011em;  /* learn-more link */
  --fs-body: 17px;     --lh-body: 25px;     --ls-body: -0.022em;
  --fs-caption: 17px;  --lh-caption: 21px;  --ls-caption: -0.022em;
  --fs-caption-sm: 14px; --lh-caption-sm: 20px; --ls-caption-sm: -0.016em; /* media captions, credits, meta */
  --fs-tab: 17px;
  --fs-small: 12px;    --lh-small: 16px;    --ls-small: -0.01em;

  --ease: cubic-bezier(0.4, 0, 0.25, 1);
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* film controls: they sit on the picture, so they keep one look in both themes */
  --film-ui: rgba(29, 29, 31, 0.6);           /* bar buttons and the centre disc */
  --film-ui-hover: rgba(45, 45, 48, 0.76);
  --film-icon: rgba(255, 255, 255, 0.92);
  --film-scrim: linear-gradient(to top, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0)); /* under the bar only */
  --film-scrim-h: 120px;
  --film-track: rgba(255, 255, 255, 0.28);
  --film-buffer: rgba(255, 255, 255, 0.48);
  --film-fill: #ffffff;
  --film-bar-gap: 12px;
  --film-inset: 24px;
}

/* --------------------------------------------------------------------------
   Dark theme (opt-in). data-theme="dark" on <html>, <body> or any element
   re-maps every colour token for that subtree; data-theme="light" inside it
   maps them back (the block at the top of this file). Values are literals:
   a var() here would resolve once, on the scope element. Pages without a
   data-theme are light.
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-raised: #1d1d1f;
  --bg-band: #161617;
  --bg-sheet: #1d1d1f;
  --text: #f5f5f7;
  --text-2: #86868b;
  --text-3: #6e6e73;
  --hair: #424245;
  --link: #2997ff;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --ui: rgba(66, 66, 69, 0.72);
  --ui-hover: rgba(80, 80, 84, 0.84);
  --ui-icon: rgba(255, 255, 255, 0.8);
  --ui-icon-hover: #ffffff;
  --nav-bg: rgba(22, 22, 23, 0.8);
  --scrim: rgba(0, 0, 0, 0.56);
  --focus-ring: #2997ff;
  --bg-well-raised: #2a2a2c;
  --bg-raised-hover: #232325;
  --on-text: #1d1d1f;
  --on-accent: #fff;
  --fill-hover: #ffffff;
  --text-hover: #fff;
  --selection: rgba(41, 151, 255, 0.45);
  --globalnav-link: rgba(255, 255, 255, 0.8);
  --globalnav-link-current: rgba(255, 255, 255, 0.56);
  --nav-link: rgba(245, 245, 247, 0.8);
  --nav-link-current: rgba(245, 245, 247, 0.56);
  --nav-hair: rgba(255, 255, 255, 0.16);
  --nav-hair-soft: rgba(255, 255, 255, 0.1);
  --nav-menu-bg: rgba(22, 22, 23, 0.96);
  --dot: rgba(245, 245, 247, 0.8);
  --dot-hover: #f5f5f7;
  --dot-fill: #fff;
  --platter: rgba(66, 66, 69, 0.78);
  --platter-tab: rgba(245, 245, 247, 0.8);
  --control: #333336;
  --control-hover: #424245;
  --modal-close-icon: #d6d6d7;
  --fill-soft: rgba(255, 255, 255, 0.1);
  --badge-outline: rgba(245, 245, 247, 0.4);
  --ring: rgba(255, 255, 255, 0.08);
  --footer-link: #d2d2d7;
  --sheet-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  --scrollbar: #48484a;
  --chiclet-bg: radial-gradient(120% 120% at 30% 15%, #3a3a3d 0%, #1d1d1f 55%, #0b0b0c 100%);
  --chiclet-ring: rgba(255, 255, 255, 0.14);
  --chiclet-gloss: rgba(255, 255, 255, 0.12);
  --banner-bg: linear-gradient(180deg, #2e2e30 0%, #000 100%);
  --banner-rim: rgba(255, 255, 255, 0.14);
  --banner-rim-end: rgba(255, 255, 255, 0);
  --wanted-bg: rgba(255, 255, 255, 0.02);
  --wanted-stripe: rgba(255, 255, 255, 0.045);
  --wanted-border: rgba(245, 245, 247, 0.3);
  --bg-band-raised: #1d1d1f;
  --bg-band-raised-hover: #232325;
  --bg-sheet-raised: #2a2a2c;
  --control-icon: rgba(255, 255, 255, 0.8);
  --control-icon-hover: #ffffff;
  --ui-float: rgba(66, 66, 69, 0.72);
  --ui-float-blur: saturate(180%) blur(20px);
  --answer-text: #86868b;
}

/* Accents on light. Pages set --accent-1/-2 inline on <body> (or a section),
   and an inline value beats any theme block, so the theme cannot re-map
   --accent-1 itself. Light (the default) sets --accent-1-on-light /
   --accent-2-on-light instead, and every accent consumer reads
   var(--accent-1-on-light, var(--accent-1)). The derived stop keeps the hue and
   drops the lightness until small text reads on #fff and #f5f5f7 (#2997ff comes
   out near #0066cc). A page that wants exact stops sets --accent-1-light /
   --accent-2-light next to its accents. The rule is re-declared on any element
   with an inline accent, so the stop follows that element's override; a dark
   scope clears it, and a light scope inside a dark one sets it again. */
:root,
[style*="--accent-"] {
  --accent-1-on-light: var(--accent-1-light, color-mix(in oklab, var(--accent-1) 58%, #000));
  --accent-2-on-light: var(--accent-2-light, color-mix(in oklab, var(--accent-2) 58%, #000));
}
[data-theme="dark"],
[data-theme="dark"][style*="--accent-"],
[data-theme="dark"] [style*="--accent-"] {
  --accent-1-on-light: initial;
  --accent-2-on-light: initial;
}
[data-theme="dark"] [data-theme="light"],
[data-theme="dark"] [data-theme="light"][style*="--accent-"],
[data-theme="dark"] [data-theme="light"] [style*="--accent-"] {
  --accent-1-on-light: var(--accent-1-light, color-mix(in oklab, var(--accent-1) 58%, #000));
  --accent-2-on-light: var(--accent-2-light, color-mix(in oklab, var(--accent-2) 58%, #000));
}
@supports (color: oklch(from red l c h)) {
  :root,
  [style*="--accent-"] {
    --accent-1-on-light: var(--accent-1-light, oklch(from var(--accent-1) min(l, 0.5) c h));
    --accent-2-on-light: var(--accent-2-light, oklch(from var(--accent-2) min(l, 0.5) c h));
  }
  [data-theme="dark"],
  [data-theme="dark"][style*="--accent-"],
  [data-theme="dark"] [style*="--accent-"] {
    --accent-1-on-light: initial;
    --accent-2-on-light: initial;
  }
  [data-theme="dark"] [data-theme="light"],
  [data-theme="dark"] [data-theme="light"][style*="--accent-"],
  [data-theme="dark"] [data-theme="light"] [style*="--accent-"] {
    --accent-1-on-light: var(--accent-1-light, oklch(from var(--accent-1) min(l, 0.5) c h));
    --accent-2-on-light: var(--accent-2-light, oklch(from var(--accent-2) min(l, 0.5) c h));
  }
}

/* a scope repaints: body's colour is computed once, so each scope recomputes it;
   html, body, sections, footnotes, the footer and a plain .theme-scope wrapper
   paint --bg (a .tone-* class, .highlights or .site-footer still wins) */
[data-theme] { color: var(--text); }
:where(html, body, .section, .site-footer, .footnotes, .theme-scope)[data-theme] { background-color: var(--bg); }
html:has(> body[data-theme="light"]) { background-color: #ffffff; color-scheme: light; }
html:has(> body[data-theme="dark"]) { background-color: #000000; color-scheme: dark; }

@media (max-width: 1068px) {
  :root {
    --section-pad: 140px;
    --fs-marquee: 64px;  --lh-marquee: 68px;  --ls-marquee: -0.009em;
    --fs-headline: 48px; --lh-headline: 52px; --ls-headline: -0.003em;
    --fs-section: 48px;  --lh-section: 52px;  --ls-section: -0.003em;
    --fs-reduced: 32px;  --lh-reduced: 36px;  --ls-reduced: 0.004em;
    --fs-faq: 40px;      --lh-faq: 44px;      --ls-faq: 0em;
    --fs-stat: 64px;     --lh-stat: 68px;     --ls-stat: -0.009em;
    --fs-lead: 19px;     --lh-lead: 23px;     --ls-lead: 0.012em;
    --fs-tab: 14px;
  }
}

@media (max-width: 734px) {
  :root {
    --r-lg: 18px;
    --r-md: 14px;
    --section-pad: 100px;
    --block-gap: 52px;
    --gap: 16px;
    --fs-marquee: 48px;  --lh-marquee: 52px;  --ls-marquee: -0.003em;
    --fs-headline: 32px; --lh-headline: 36px; --ls-headline: 0.004em;
    --fs-section: 32px;  --lh-section: 36px;  --ls-section: 0.004em;
    --fs-reduced: 28px;  --lh-reduced: 32px;  --ls-reduced: 0.007em;
    --fs-faq: 32px;      --lh-faq: 36px;      --ls-faq: 0.004em;
    --fs-stat: 48px;     --lh-stat: 52px;     --ls-stat: -0.003em;
    --fs-eyebrow: 21px;  --lh-eyebrow: 25px;  --ls-eyebrow: 0.011em;
    --fs-card: 21px;     --lh-card: 25px;     --ls-card: 0.011em;
    --fs-copy: 19px;     --lh-copy: 23px;     --ls-copy: 0.012em;
    --fs-lead: 17px;     --lh-lead: 21px;     --ls-lead: -0.022em;
    --fs-intro: 17px;    --lh-intro: 25px;    --ls-intro: -0.022em;
  }
}

/* Icon masks (chevron, down, play-circle, external) for the link and button components. Moved here from the buttons block: custom properties only, nothing jumped over declares them. */
:root {
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16'%3E%3Cpath d='M2 1l6.5 7L2 15' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M1 2l7 6.5L15 2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-play-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10.75' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M9.6 7.6v8.8c0 .5.5.8.9.5l6.6-4.4c.4-.2.4-.8 0-1l-6.6-4.4c-.4-.3-.9 0-.9.5z'/%3E%3C/svg%3E");
  --icon-external: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 1.5h7.5V9M10.2 1.8L1.5 10.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ==========================================================================
   BASE
   Element defaults: html, body, headings, links, media, focus rings, selection.
   Two small utilities (.visually-hidden, .skip-link) also sit here; see the note on them.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--localnav-h) + 8px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.47059;
  letter-spacing: var(--ls-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* element-level reset only, so .stack / .prose / .modal-content rhythm (one class)
   always wins over it; components never reset margin-top themselves */
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, figure, blockquote, pre { margin: 0; }
ul, ol { padding: 0; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--link); text-decoration: none; }
@media (hover: hover) { a:hover { text-decoration: underline; } }
strong, b { font-weight: 600; }

/* display face for everything set at 19px and up (single classes only, so
   the specificity stays at one class and later overrides win by order) */
:is(.t-marquee, .t-headline, .t-reduced, .t-eyebrow, .t-copy,
    .welcome-eyebrow, .welcome-headline, .welcome-body,
    .gallery-header-headline, .section-header-headline,
    .chapter-eyebrow, .chapter-headline, .chapter-body, .eyebrow, .headline, .copy,
    .link-intro, .pill-lg, .media-overlay-caption, .banner-headline, .icon-card-headline,
    .reduced-eyebrow, .reduced-headline, .modal-eyebrow, .modal-headline, .modal-body,
    .localnav-title, .faq-headline, .faq-question, .stat-number, .quote, .owned-title,
    .next-project-headline, .work-card-headline) {
  font-family: var(--font-display);
}
.callout-row-text .callout-title, .reduced-lg .reduced-body { font-family: var(--font-display); }
@media (max-width: 734px) {
  /* these drop to 17px on phones */
  :is(.welcome-body, .link-intro) { font-family: var(--font-text); }
}

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

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}
/* programmatic focus targets (sections jumped to, headings) draw no ring */
[tabindex="-1"]:not(.tabnav-tab):focus-visible { outline: none; }

/* Utilities kept in Base: .visually-hidden and .skip-link. Moving them below the components would change the cascade (they set margin, border, background and similar on elements components also style). */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: var(--r-pill);
  font-size: 14px; transition: top 0.2s;
}
.skip-link:focus { top: 8px; text-decoration: none; }

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

/* ==========================================================================
   LAYOUT
   Page structure: .wrap, .section, .stack, tone bands, .center.
   The type helper classes (.t-*, .text-gradient) follow, kept in place; see the note on them.
   ========================================================================== */
.wrap {
  width: var(--content);
  margin-inline: auto;
}
.wrap-narrow { width: min(692px, 87.5%); margin-inline: auto; }

.section {
  position: relative;
  padding-block: var(--section-pad);
}
.section + .section { padding-top: 0; }           /* sections stack with one gap */
.section.section-flush-top { padding-top: 0; }
.section.section-flush-bottom { padding-bottom: 0; }
.section.section-gap-top { padding-top: var(--section-pad); } /* force a top gap after another section */

.tone-raised { background: var(--bg-raised); }
.tone-band { background: var(--bg-band); }
.tone-raised + .section, .tone-band + .section, .section + .tone-raised, .section + .tone-band {
  padding-top: var(--section-pad);
}
/* the highlights section is a #1d1d1f band; it keeps its own top padding
   next to other sections */
.highlights { background: var(--bg-raised); }
.section.highlights, .section + .section.highlights, .section.highlights + .section { padding-top: var(--section-pad); }
.highlights .media:not(.wanted) { background-color: var(--matte, var(--bg-well-raised)); }
/* one step up from the surface: a card on a band, a well in a modal sheet.
   Dark values equal the tokens they replace; light gives #fff cards on a
   #f5f5f7 band and #f5f5f7 wells in a #fff sheet. */
:is(.tone-band, .tone-raised, .highlights) > * { --bg-raised: var(--bg-band-raised); --bg-raised-hover: var(--bg-band-raised-hover); }
.modal { --bg-well-raised: var(--bg-sheet-raised); }

.center { text-align: center; }

/* block rhythm inside a section: head, media, gallery, sub-blocks */
.stack > * + * { margin-top: var(--block-gap); }
.stack > .visually-hidden:first-child + * { margin-top: 0; }   /* a hidden heading takes no space, so it adds no gap */
.stack > :is(.gallery-header, .section-header) { margin-bottom: 0; }
.stack > :is(.gallery-header, .section-header) + * { margin-top: 64px; }   /* "Get to know ..." to its gallery */
@media (max-width: 734px) { .stack > :is(.gallery-header, .section-header) + * { margin-top: 40px; } }

/* Self-wrapping blocks: dropped straight into a .section or a .stack (one
   that is not itself a .wrap) they constrain themselves to the content
   column. Inside .wrap, .modal-content or a grid they fill their parent. */
.section > :is(.stats, .quote, .callouts, .callout-row, .feature-list, .facts, .owned, .next-project, .code, .code-figure, .media-grid, .work-grid, .work-filter),
.stack:not(.wrap) > :is(.stats, .quote, .callouts, .callout-row, .feature-list, .facts, .owned, .next-project, .code, .code-figure, .media-grid, .work-grid, .work-filter) {
  width: var(--content);
  margin-inline: auto;
}
/* prose spans the content column and holds its lines to 692px, left-aligned
   under a left-aligned chapter head; .prose-center (or a centred head above
   it) centres the 692px column instead */
.section > .prose, .stack:not(.wrap) > .prose { width: var(--content); max-width: none; margin-inline: auto; }
.section > .prose > *, .stack:not(.wrap) > .prose > * { max-width: 692px; }
.prose-center > *,
:is(.chapter-head-center, .section-head-center, .reduced) + .prose > * { margin-inline: auto; }

/* Type helper classes (.t-*, .text-gradient). Utilities that stay here, ahead of the components, on purpose: moved below them they would override .pill, .callout and others on elements that carry both. */
.t-marquee  { font-size: var(--fs-marquee);  line-height: var(--lh-marquee);  letter-spacing: var(--ls-marquee);  font-weight: 600; }
.t-headline { font-size: var(--fs-headline); line-height: var(--lh-headline); letter-spacing: var(--ls-headline); font-weight: 600; }
.t-reduced  { font-size: var(--fs-reduced);  line-height: var(--lh-reduced);  letter-spacing: var(--ls-reduced);  font-weight: 600; }
.t-eyebrow  { font-size: var(--fs-eyebrow);  line-height: var(--lh-eyebrow);  letter-spacing: var(--ls-eyebrow);  font-weight: 600; }
.t-copy     { font-size: var(--fs-copy);     line-height: var(--lh-copy);     letter-spacing: var(--ls-copy);     font-weight: 600; color: var(--text-2); }
.t-body     { font-size: var(--fs-body);     line-height: var(--lh-body);     letter-spacing: var(--ls-body); }
.t-caption  { font-size: var(--fs-caption);  line-height: var(--lh-caption);  letter-spacing: var(--ls-caption);  font-weight: 600; color: var(--text-2); }
.t-small    { font-size: var(--fs-small);    line-height: var(--lh-small);    letter-spacing: var(--ls-small);    color: var(--text-2); }
.t-copy strong, .t-caption strong { color: var(--text); }

.text-gradient {
  background: linear-gradient(90deg, var(--accent-1-on-light, var(--accent-1)), var(--accent-2-on-light, var(--accent-2)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ==========================================================================
   COMPONENTS
   One block per component. Each opens with a one-line header: name, selectors,
   what it is and its docs page.
   ========================================================================== */

/* Buttons and links (.pill, .link-more). Pill buttons (blue, neutral, outline) and text links ("Learn more", "Watch the film"). Docs: docs/buttons.html, docs/links.html. */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 17px;
  line-height: 1.17648;
  font-weight: 400;
  letter-spacing: -0.022em;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
  background: var(--blue);
  color: var(--on-accent);
}
@media (hover: hover) { .pill:hover { text-decoration: none; } }
.pill-blue { background: var(--blue); color: var(--on-accent); }
@media (hover: hover) { .pill-blue:hover { background: var(--blue-hover); } }
.pill-neutral { background: var(--text); color: var(--on-text); }
@media (hover: hover) { .pill-neutral:hover { background: var(--fill-hover); } }
.pill-outline { background: transparent; color: var(--text); border-color: var(--text); }
@media (hover: hover) { .pill-outline:hover { background: var(--text); color: var(--on-text); } }
.pill-sm {
  position: relative;
  min-height: 24px;
  padding: 3px 10px;               /* + the 1px border = 24px tall, 11px inset */
  font-size: 12px;
  line-height: 1.33337;
  letter-spacing: -0.01em;
}
.pill-sm::after { content: ""; position: absolute; inset: -10px -2px; }   /* 44px tall hit area, same look */
.pill-lg { min-height: 56px; padding: 16px 32px; font-size: 19px; }
.pills { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.pills + .link-more { display: inline-block; margin-top: 24px; }
.center .pills, .pills.center { justify-content: center; }

/* text links with an icon after */
.link-more {
  display: inline;
  color: var(--link);
  font-weight: 400;
  cursor: pointer;
  background: none; border: 0; padding: 0;
  font-size: inherit; line-height: inherit;
}
.link-more::after {
  content: "";
  display: inline-block;
  width: 0.6em; height: 0.6em;
  margin-left: 0.25em;
  vertical-align: 0.02em;
  background: currentColor;
  -webkit-mask: var(--icon-chevron) center / contain no-repeat;
  mask: var(--icon-chevron) center / contain no-repeat;
}
@media (hover: hover) { .link-more:hover { text-decoration: underline; } }
/* phones: a ~44px-tall hit area around the 17px line, same look (::after is the chevron) */
@media (max-width: 734px) {
  .link-more { position: relative; }
  .link-more::before { content: ""; position: absolute; inset: -9px -4px; }
}
.link-play::after {
  width: 1.05em; height: 1.05em; margin-left: 0.3em; vertical-align: -0.17em;
  -webkit-mask-image: var(--icon-play-circle); mask-image: var(--icon-play-circle);
}
.link-external::after {
  width: 0.55em; height: 0.55em; vertical-align: 0.08em;
  -webkit-mask-image: var(--icon-external); mask-image: var(--icon-external);
}
.link-down::after {
  -webkit-mask-image: var(--icon-down); mask-image: var(--icon-down);
}
.link-intro {
  font-size: var(--fs-intro);
  line-height: var(--lh-intro);
  letter-spacing: var(--ls-intro);
}

/* round icon buttons: paddles, play/pause, close */
.icon-button,
.paddle,
.media-ui,
.playpause,
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ui);
  color: var(--ui-icon);
  cursor: pointer;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
}
/* paddles and the inline video button take a 44px hit area around the 36px disc */
.paddle { position: relative; }
.paddle::after, .media-ui::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
@media (hover: hover) {
  .icon-button:hover, .paddle:hover, .media-ui:hover, .playpause:hover, .modal-close:hover {
    background: var(--ui-hover);
    color: var(--ui-icon-hover);
  }
}
.icon-button svg, .paddle svg, .media-ui svg, .playpause svg, .modal-close svg {
  width: 100%; height: 100%; fill: currentColor;
}

/* Global nav (.globalnav). The thin site bar: the site's name and three links. Docs: docs/globalnav.html. */
.globalnav {
  position: relative;
  z-index: 30;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.globalnav-inner {
  width: min(1024px, 100%);
  height: 100%;
  margin-inline: auto;
  padding-inline: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
/* bar links fill the bar's height, so each is a 44px-tall target (no visual change) */
.globalnav-name, .globalnav-links a {
  display: flex;
  align-items: center;
  height: var(--nav-h);
}
.globalnav-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.016em;
}
@media (hover: hover) { .globalnav-name:hover { text-decoration: none; color: var(--text-hover); } }
.globalnav-links { display: flex; list-style: none; gap: 30px; }
.globalnav-links a {
  color: var(--globalnav-link);
  font-size: 12px;
  letter-spacing: -0.01em;
  transition: color 0.3s;
}
@media (hover: hover) { .globalnav-links a:hover { color: var(--text-hover); text-decoration: none; } }
.globalnav-links a[aria-current="page"] { color: var(--globalnav-link-current); }
@media (max-width: 734px) {
  .globalnav-inner { padding-inline: 16px; }
  .globalnav-links { gap: 20px; }
}

/* Local nav (.localnav). The page bar: title, one text link, one small pill; hidden over the hero. Docs: docs/localnav.html. */
.localnav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--localnav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background-color 0.3s var(--ease-out);
}
.localnav.is-stuck { border-bottom-color: var(--nav-hair); }
.localnav-inner {
  width: min(1024px, 100%);
  height: 100%;
  margin-inline: auto;
  padding-inline: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: opacity 0.3s var(--ease-out);
}
/* Hidden at the top of the page: the bar fades in once it sticks. Opacity
   only, so keyboard focus still reaches it (and shows it). Needs ds.js
   (html.js); without JS the bar always shows. */
.js .localnav:not(.is-stuck):not(.is-open):not(:focus-within) {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.js .localnav:not(.is-stuck):not(.is-open):not(:focus-within) .localnav-inner {
  opacity: 0;
  pointer-events: none;
}
.localnav-title {
  min-width: 0;
  padding-block: 13px;               /* a ~50px-tall target inside the 52px bar */
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 21px;
  line-height: 1.14286;
  font-weight: 600;
  letter-spacing: 0.011em;
  white-space: nowrap;
}
.localnav-menu { flex: none; }
/* "All work" as the last item of the folded chapter menu (phones only) */
.localnav-items .localnav-all { display: none; }
@media (hover: hover) { .localnav-title:hover { text-decoration: none; } }
.localnav-menu { display: flex; align-items: center; gap: 24px; min-width: 0; }
.localnav-items { display: flex; align-items: center; gap: 24px; list-style: none; }
.localnav-items a,
.localnav-link {
  position: relative;
  display: inline-block;
  color: var(--nav-link);
  font-size: 12px;
  line-height: 1.33337;
  letter-spacing: -0.01em;
  white-space: nowrap;
  padding-block: 6px;
  transition: color 0.2s;
}
.localnav-link { padding-block: 16px; }   /* 48px-tall target, same look */
@media (hover: hover) { .localnav-items a:hover, .localnav-link:hover { color: var(--text-hover); text-decoration: none; } }
/* current chapter is dimmed; no underline */
.localnav-items a[aria-current="true"] { color: var(--nav-link-current); }
.localnav-toggle {
  display: none;
  width: 28px; height: 28px; padding: 0; border: 0; background: none;
  color: var(--nav-link); cursor: pointer;
}
.localnav-toggle svg { width: 12px; height: 12px; margin: auto; fill: none; stroke: currentColor; stroke-width: 2; transition: transform 0.3s var(--ease); }
.localnav.is-open .localnav-toggle svg { transform: rotate(180deg); }
@media (max-width: 1068px) {
  .localnav-items { gap: 18px; }
}
/* nav-fold breakpoint: off the 735/1069 grid on purpose (see the file header) */
@media (max-width: 834px) {
  .localnav-inner { padding-inline: 16px; }
  .localnav-title { font-size: 19px; }
  .localnav-toggle { display: inline-flex; }
  .localnav-items {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 16px 16px;
    background: var(--nav-menu-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--nav-hair);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
  }
  .localnav.is-open .localnav-items {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  }
  .localnav-items li + li { border-top: 1px solid var(--nav-hair-soft); }
  .localnav-items a { display: block; font-size: 17px; padding: 12px 0; }
  .localnav-menu { gap: 14px; }
  /* with a chapter menu, "All work" moves from the bar into the menu;
     without one it stays in the bar at every width */
  .localnav-menu:has(.localnav-items) > .localnav-link { display: none; }
  .localnav-items .localnav-all { display: list-item; }
}

/* Chiclet (.chiclet). Rounded-square project icons. Docs: docs/chiclet.html. */
.chiclet {
  --chiclet-size: 54px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--chiclet-size);
  height: var(--chiclet-size);
  border-radius: var(--r-chiclet);
  overflow: hidden;
  background: var(--chiclet-bg);
  color: var(--text);
  font-size: calc(var(--chiclet-size) * 0.5);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  vertical-align: middle;
}
.chiclet > img, .chiclet > svg { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 50%); }
.chiclet::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--chiclet-ring), inset 0 1px 0 var(--chiclet-gloss);
  pointer-events: none;
}
.chiclet-glyph > span {
  background: linear-gradient(90deg, var(--accent-1-on-light, var(--accent-1)), var(--accent-2-on-light, var(--accent-2)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.chiclet-fill { background: linear-gradient(145deg, var(--accent-1), var(--accent-2)); color: var(--on-accent); }
.chiclet-sm { --chiclet-size: 40px; }
.chiclet-lg { --chiclet-size: 72px; }
.chiclet-xl { --chiclet-size: 96px; }
@media (max-width: 734px) {
  .chiclet-lg { --chiclet-size: 60px; }
  .chiclet-xl { --chiclet-size: 72px; }
}

/* Badge (.badge, .badges). Small pill labels, as on a banner card. Docs: docs/badge.html. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--fill-soft);
  color: var(--text);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  vertical-align: middle;
}
/* accent badge: a pill like the others, gradient text inside an accent ring */
.badge-accent {
  background: linear-gradient(90deg, var(--accent-1-on-light, var(--accent-1)), var(--accent-2-on-light, var(--accent-2)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  box-shadow: inset 0 0 0 1px var(--accent-1-on-light, var(--accent-1));   /* fallback where color-mix() is missing (Safari < 16.2) */
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-1-on-light, var(--accent-1)) 55%, transparent);
}
.badge-outline { background: none; box-shadow: inset 0 0 0 1px var(--badge-outline); }
/* a row of badges: above a welcome eyebrow, above a chapter eyebrow, under an icon-card headline */
.badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.welcome-head > .badges { justify-content: center; margin-bottom: 16px; }
.welcome-suite .welcome-head > .badges { justify-content: flex-start; }
.welcome-head > .chiclet + .badges { margin-top: -8px; }
:is(.chapter-head, .section-head) > .badges { margin-bottom: 12px; }
:is(.chapter-head-center, .section-head-center) > .badges { justify-content: center; }
.icon-card .badges, .work-card .badges { margin-top: 12px; }
.facts dd .badge { vertical-align: 1px; }
.badge-lockup {           /* the banner's brand line: mark + name, 17px */
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 17px; line-height: 21px; font-weight: 600; letter-spacing: -0.022em;
}
.badge-lockup .chiclet { --chiclet-size: 20px; font-size: 11px; }

/* Media panels (.media). The rounded panels every section uses, and the media helpers. Docs: docs/media.html. */
.media {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--r-lg);
  background: var(--matte, var(--bg-raised));   /* --matte: the clip's own ground, so letterboxing disappears */
}
.media > img,
.media > video,
.media > picture,
.media > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focal, 50% 50%);   /* focal point for every crop */
}

/* Phone screens and focal point (.media-device, --focal). Docs: docs/media.html. */
/* focal point: style="--focal: 30% 50%" on the .media (or any ancestor), or a class */
.focal-left { --focal: 0% 50%; }
.focal-right { --focal: 100% 50%; }
.focal-top { --focal: 50% 0%; }
.focal-bottom { --focal: 50% 100%; }
.media-contain > img, .media-contain > video, .media-contain > picture > img { object-fit: contain; }
/* the poster behind a video (ds.js sets its background-image): shown whenever the
   video has no frame to paint, as while a stream attaches, framed like the video */
.media > video { background: var(--focal, 50% 50%) / cover no-repeat; }
.media-contain > video, .media-pad > video { background-size: contain; }
/* padded: the picture is sized to fit inside 6% padding (never cropped, never
   enlarged past its own pixels) and its own corners are rounded */
.media-pad {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: 6%;
}
.media-pad > picture { display: contents; }
.media-pad > img, .media-pad > video, .media-pad > picture > img {
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-md);
}
.media-bleed { border-radius: 0; }
.media-black { background: #000; }
.ratio-16x9  { aspect-ratio: 16 / 9; }
.ratio-16x10 { aspect-ratio: 16 / 10; }
.ratio-3x2   { aspect-ratio: 3 / 2; }
.ratio-4x3   { aspect-ratio: 4 / 3; }
.ratio-1x1   { aspect-ratio: 1 / 1; }
.ratio-3x4   { aspect-ratio: 3 / 4; }
.ratio-21x9  { aspect-ratio: 21 / 9; }
.ratio-9x16  { aspect-ratio: 9 / 16; }
.ratio-9x19  { aspect-ratio: 9 / 19.5; }   /* a modern phone screen */

/* phone screenshot at full height on the dark well, with screen corners.
   Works on any .media: a tile, a hero, a tab panel, a grid cell. */
.media.media-device {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
}
.media.media-device > img,
.media.media-device > video {
  width: auto;
  height: 100%;
  max-width: calc(100% - 32px);
  object-fit: contain;
  border-radius: 13% / 6%;               /* round screen corners at 9:19.5 */
  box-shadow: 0 0 0 1px var(--ring);
}
@media (max-width: 734px) { .media.media-device { padding: 20px 0; } }

/* Media grid, compare, media label (.media-grid, .media-label). Docs: docs/media-grid.html. */
/* a label over the top-left of a picture (Before / After, Desktop / Phone) */
.media-label {
  position: absolute; z-index: 2;
  top: 16px; left: 16px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--ui);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: var(--text);
  font-size: var(--fs-small); line-height: var(--lh-small); letter-spacing: var(--ls-small); font-weight: 600;
}

/* static 2-up / 3-up pictures; one column on phones (.compare too); .media-grid-sm-2 keeps two */
.media-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: 32px var(--gap);
  align-items: start;
}
.media-grid-3 { --cols: 3; }
.media-grid > figure { margin: 0; min-width: 0; }
.media-grid .media-caption { padding-inline: 4px; }
@media (max-width: 734px) {
  /* one column on phones (.compare too, so each side is big enough to judge);
     .media-grid-sm-2 keeps two across (small repeated things: logos, icons) */
  .media-grid, .media-grid-3 { --cols: 1; gap: 24px; }
  .media-grid-sm-2 { --cols: 2; gap: 20px 12px; }
  .media-grid-sm-2 .media-label { top: 10px; left: 10px; padding: 3px 9px; }
}

.media-hero { aspect-ratio: 16 / 9; }
@media (max-width: 734px) {
  .media-hero { aspect-ratio: 4 / 3; }
  .media-hero.ratio-keep { aspect-ratio: 16 / 9; }
}

/* Media captions (.media-overlay-caption, .media-caption). Docs: docs/media-caption.html. */
/* a caption that sits over a media panel, top-left (highlights style).
   White by default: pick or crop the picture so its top-left is dark.
   .caption-ink (on the card or the caption) sets it in dark ink for a light
   picture. Every .media-card gets a soft dark gradient (the scrim) over the
   top of its picture by default, so white text clears 3:1 on any picture.
   .caption-clear (on the card) drops it when the picture is already dark
   there; .caption-ink cards have none, since dark ink wants a light picture,
   and a .media-pad card has none, since its caption sits on the matte and
   the inset picture would only be greyed.
   .caption-scrim stays as the explicit form, and also works on a .media
   outside a card. Each needs 3:1 against the brightest tenth of the pixels
   under the text. */
.media-overlay-caption {
  position: absolute; z-index: 2;
  top: 0; left: 0;
  max-width: min(560px, 72%);
  padding: 40px 44px;
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--fs-card); line-height: var(--lh-card); letter-spacing: var(--ls-card);
  font-weight: 600;
  text-wrap: pretty;
}
.caption-ink .media-overlay-caption, .media-overlay-caption.caption-ink { color: rgba(29, 29, 31, 0.92); }
.media-card:not(.caption-ink):not(.caption-clear) > .media:not(.media-pad)::after,
.caption-scrim > .media::after, .media.caption-scrim::after {
  content: "";
  position: absolute; z-index: 1;
  top: 0; left: 0; right: 0;
  height: var(--scrim-h, 320px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}
@media (max-width: 734px) {
  .media-card:not(.caption-ink):not(.caption-clear) > .media:not(.media-pad)::after,
  .caption-scrim > .media::after, .media.caption-scrim::after { height: var(--scrim-h, 300px); }
}

/* caption / credit line under a single picture (hero media, callout row) */
.media-caption {
  margin-top: 12px;
  font-size: var(--fs-caption-sm); line-height: var(--lh-caption-sm); letter-spacing: var(--ls-caption-sm);
  color: var(--text-2);
  text-wrap: pretty;
}
.media-caption strong { color: var(--text); font-weight: 600; }
.media-caption-center { text-align: center; }
/* story caption under a picture: the tile-caption scale (17/21, 600, grey with
   a white lead), inset 16px like tile captions. Keep the 14px default for
   credits and meta. */
.media-caption-lg {
  margin-top: 20px;
  padding-inline: 16px;
  font-size: var(--fs-caption); line-height: var(--lh-caption); letter-spacing: var(--ls-caption);
  font-weight: 600;
}
.media-grid .media-caption-lg { padding-inline: 16px; }

/* Inline media UI (.media-ui, .playpause, .wanted). The inline play/pause control, and the wanted placeholder. Docs: docs/media-ui.html, docs/wanted.html. */
/* inline video play/pause control (auto-attached by ds.js to .media video) */
.media-ui {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 24px;
}
.media-ui .icon-play, .playpause .icon-play, .playpause .icon-replay { display: none; }
.media-ui[data-state="paused"] .icon-pause, .playpause[data-state="paused"] .icon-pause, .playpause[data-state="ended"] .icon-pause { display: none; }
.media-ui[data-state="paused"] .icon-play, .playpause[data-state="paused"] .icon-play { display: block; }
.playpause[data-state="ended"] .icon-replay { display: block; }
@media (max-width: 734px) {
  .media-ui { right: 16px; bottom: 16px; }
}

/* Film controls (.film-ui). ds.js builds them over a video[data-film] in a .media: ds controls with a mouse, ds's start button then the browser's controls on touch. Docs: docs/film.html. */
.film-ui {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: var(--film-icon);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.film-ui[hidden] { display: none; }
.film-ui[data-state="playing"][data-bar="off"] { cursor: none; }
/* the scrim: a gradient under the bar while it shows; the picture itself is never dimmed */
.film-ui::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: var(--film-scrim-h);
  background: var(--film-scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
.film-ui[data-bar="on"]::before { opacity: 1; }

.film-center,
.film-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--film-ui);
  color: var(--film-icon);
  cursor: pointer;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.film-center { width: 72px; height: 72px; }
.film-btn { width: 36px; height: 36px; }
.film-btn::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.film-center[hidden], .film-btn[hidden] { display: none; }
.film-center svg, .film-btn svg { width: 100%; height: 100%; fill: currentColor; }
@media (hover: hover) {
  .film-center:hover, .film-btn:hover { background: var(--film-ui-hover); color: #ffffff; }
}
.film-center .icon-replay,
.film-play .icon-pause,
.film-mute .icon-muted,
.film-fs .icon-fs-exit { display: none; }
.film-ui[data-state="ended"] .film-center .icon-play,
.film-ui[data-state="playing"] .film-play .icon-play,
.film-ui[data-muted] .film-mute .icon-volume,
.film-ui[data-fs] .film-fs .icon-fs { display: none; }
.film-ui[data-state="ended"] .film-center .icon-replay,
.film-ui[data-state="playing"] .film-play .icon-pause,
.film-ui[data-muted] .film-mute .icon-muted,
.film-ui[data-fs] .film-fs .icon-fs-exit { display: block; }
.film-cc[aria-pressed="true"] { background: var(--film-fill); color: #000000; }

.film-bar {
  position: absolute;
  left: var(--film-inset);
  right: var(--film-inset);
  bottom: var(--film-inset);
  display: flex;
  align-items: center;
  gap: var(--film-bar-gap);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.film-ui[data-bar="on"] .film-bar { opacity: 1; transform: none; pointer-events: auto; }
.film-time {
  flex: none;
  min-width: 4ch;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--film-icon);
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}
.film-left { text-align: right; }
.film-scrub { flex: 1 1 auto; min-width: 48px; display: flex; align-items: center; height: 36px; }
.film-vol { flex: none; display: flex; align-items: center; }

/* the scrubber and the volume: a range input, filled to --pos, buffered to --buf */
.film-range {
  --pos: 0%;
  --buf: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.film-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--film-fill) 0 var(--pos), var(--film-buffer) var(--pos) var(--buf), var(--film-track) var(--buf));
}
.film-range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--film-fill) 0 var(--pos), var(--film-buffer) var(--pos) var(--buf), var(--film-track) var(--buf));
}
.film-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--film-fill);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: scale(0);
  transition: transform 0.15s var(--ease-out);
}
.film-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--film-fill);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: scale(0);
  transition: transform 0.15s var(--ease-out);
}
.film-range:hover::-webkit-slider-thumb, .film-range:focus-visible::-webkit-slider-thumb, .film-range:active::-webkit-slider-thumb { transform: scale(1); }
.film-range:hover::-moz-range-thumb, .film-range:focus-visible::-moz-range-thumb, .film-range:active::-moz-range-thumb { transform: scale(1); }
.film-range:focus-visible { outline-offset: 2px; border-radius: 4px; }
.film-vol .film-range {
  width: 0;
  opacity: 0;
  transition: width 0.2s var(--ease-out), opacity 0.2s var(--ease-out), margin 0.2s var(--ease-out);
}
.film-vol:hover .film-range, .film-vol:focus-within .film-range { width: 72px; margin-left: 8px; opacity: 1; }

.film-spinner {
  display: none;
  position: absolute;
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: film-spin 0.8s linear infinite;
}
.film-ui[data-loading] .film-spinner { display: block; }
@keyframes film-spin { to { transform: rotate(360deg); } }
/* read by screen readers ("Loading"); shown only for an error */
.film-status {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.film-ui[data-error] .film-status {
  inset: auto 16px 50% 16px;
  width: auto; height: auto;
  clip-path: none;
  white-space: normal;
  transform: translateY(64px);
  text-align: center;
  font-size: var(--fs-caption-sm);
  line-height: var(--lh-caption-sm);
  color: var(--film-icon);
}
.film-ui[data-error] .film-center { display: none; }

/* full screen: the .media goes edge to edge and the picture fits whole */
.media:fullscreen { border-radius: 0; background: #000000; aspect-ratio: auto; }
.media:fullscreen > video { object-fit: contain; }
.media:-webkit-full-screen { border-radius: 0; background: #000000; aspect-ratio: auto; width: 100%; height: 100%; }
.media:-webkit-full-screen > video { object-fit: contain; }

@media (prefers-reduced-motion: reduce) {
  .film-ui::before, .film-bar, .film-range::-webkit-slider-thumb, .film-vol .film-range { transition: none; }
  .film-bar { transform: none; }
  .film-spinner { animation-duration: 2.4s; }
}
@media (max-width: 734px) {
  :root { --film-inset: 16px; --film-bar-gap: 8px; }
  .film-center { width: 56px; height: 56px; }
  .film-left { display: none; }
}
@media print {
  .film-ui { display: none; }
}

/* "wanted" placeholder: names the missing picture */
.wanted {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 28px;
  background-color: var(--wanted-bg);
  background-image: repeating-linear-gradient(-45deg, var(--wanted-stripe) 0 2px, transparent 2px 14px);
  border: 1.5px dashed var(--wanted-border);
  color: var(--text-2);
  text-align: center;
}
/* aspect-ratio turns min-height into a min width (200px x 16/9 = 356px), which
   overflows a phone column narrower than that; 48vw keeps it inside */
@media (max-width: 389px) {
  .wanted { min-height: min(200px, 48vw); }
}
.wanted-label {
  max-width: 34ch;
  font-size: var(--fs-caption-sm);
  line-height: var(--lh-caption-sm);
  font-weight: 600;
  letter-spacing: var(--ls-caption-sm);
  text-wrap: balance;
}
.wanted-label b, .wanted-label strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-1-on-light, var(--accent-1));
}

/* Welcome hero (.welcome). The welcome that opens a project page or a landing page. Docs: docs/welcome.html. */
.welcome {
  position: relative;
  padding-top: 120px;
  padding-bottom: 0;
  text-align: center;
}
.welcome-head {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.welcome-head .chiclet { --chiclet-size: 54px; margin-bottom: 24px; }
.welcome-eyebrow {
  font-size: var(--fs-eyebrow); line-height: var(--lh-eyebrow); letter-spacing: var(--ls-eyebrow);
  font-weight: 600;
  color: var(--text);
}
.welcome-headline {
  margin-top: 12px;
  max-width: 14em;
  font-size: var(--fs-marquee); line-height: var(--lh-marquee); letter-spacing: var(--ls-marquee);
  font-weight: 600;
  text-wrap: balance;
}
.welcome-body {
  margin-top: 16px;
  max-width: 700px;
  font-size: var(--fs-lead); line-height: var(--lh-lead); letter-spacing: var(--ls-lead);
  font-weight: 600;
  color: var(--text-2);
  text-wrap: pretty;
}
.welcome-body strong { color: var(--text); }
.welcome .pills { margin-top: 32px; justify-content: center; }
.welcome-media { margin-top: 64px; }
.welcome-media .media { aspect-ratio: 16 / 9; }
.welcome-media.wrap .media { border-radius: var(--r-lg); }
.welcome-media:not(.wrap) .media { border-radius: 0; }

/* product variant: media first (a backdrop/still above the name) */
.welcome-media-first .welcome-media { margin-top: 0; margin-bottom: 48px; }
.welcome.welcome-media-first { padding-top: 0; }   /* two classes, so the phone .welcome padding can't undo it */
.welcome-media-first > .welcome-media { order: -1; }
.welcome-media-first { display: flex; flex-direction: column; }

/* suite variant: left-aligned marquee like the landing page */
.welcome-suite { text-align: left; padding-top: 140px; }
.welcome-suite .welcome-head { align-items: flex-start; }
.welcome-suite .welcome-headline { max-width: 12em; }
.welcome-suite .welcome-body { max-width: 640px; }
.welcome-suite .pills { justify-content: flex-start; }
.welcome-suite .welcome-eyebrow { color: var(--text); }

/* hero media never ends on the edge of a band: a banded section next gets
   clear black below the media first */
.welcome:has(+ :is(.highlights, .tone-raised, .tone-band)) { padding-bottom: 80px; }
@media (max-width: 1068px) { .welcome:has(+ :is(.highlights, .tone-raised, .tone-band)) { padding-bottom: 64px; } }
/* a plain section after the welcome (a facts banner) starts 80px under it, not a
   full --section-pad: the welcome has no bottom padding to share the gap with */
.welcome + .section:not(.highlights, .tone-raised, .tone-band) { padding-top: 80px; }
@media (max-width: 1068px) { .welcome + .section:not(.highlights, .tone-raised, .tone-band) { padding-top: 64px; } }

@media (max-width: 734px) {
  .welcome { padding-top: 88px; }
  .welcome:has(+ :is(.highlights, .tone-raised, .tone-band)) { padding-bottom: 48px; }
  .welcome + .section:not(.highlights, .tone-raised, .tone-band) { padding-top: 48px; }
  .welcome-suite { padding-top: 96px; }
  .welcome-media { margin-top: 48px; }
  .welcome-media .media { aspect-ratio: 4 / 5; }
  .welcome-media .media.ratio-keep { aspect-ratio: 16 / 9; }
}

/* Banner card (.banner-card). A banner card under the welcome on a project page. Docs: docs/banner-card.html. */
.banner-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 40px 52px;
  border-radius: var(--r-lg);
  background: var(--banner-bg);   /* bottom edge melts into the page */
  overflow: hidden;
}
.banner-card::before {             /* faint lighter edge on top and sides, fading out downward */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, var(--banner-rim), var(--banner-rim-end) 80%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* rows of --banner-cols (default 5); a partial last row is centred */
.banner-icons {
  --banner-chiclet: 70px;
  --banner-gap: 17px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--banner-gap);
  max-width: calc(var(--banner-cols, 5) * var(--banner-chiclet) + (var(--banner-cols, 5) - 1) * var(--banner-gap));
  margin-bottom: 56px;
}
.banner-icons .chiclet { --chiclet-size: var(--banner-chiclet); }
.banner-card .badge-lockup { margin-bottom: 6px; }
.banner-headline {
  font-size: var(--fs-card); line-height: var(--lh-card); letter-spacing: var(--ls-card);
  font-weight: 600;
}
.banner-body, .banner-copy {     /* .banner-copy: legacy name */
  margin-top: 14px;
  max-width: 460px;
  font-size: 17px; line-height: 21px; letter-spacing: -0.022em;
  color: var(--text);
  text-wrap: pretty;
}
.banner-card .pills { margin-top: 32px; justify-content: center; gap: 16px 32px; }
.banner-link {
  margin-top: 32px;
  text-align: center;
  font-size: 17px; line-height: 21px; letter-spacing: -0.022em;
  color: var(--text);
  text-wrap: balance;
}
.banner-link a { white-space: nowrap; }
@media (max-width: 734px) {
  .banner-card { padding: 40px 24px 40px; }
  .banner-icons { --banner-chiclet: 48px; --banner-gap: 8px; margin-bottom: 36px; }
  .banner-card .pills { gap: 12px; }   /* two pills stay side by side at 390 */
}

/* Gallery header and chapter head (.gallery-header, .chapter-head). The heading that opens a gallery, with its links; the head that opens a chapter. Docs: docs/gallery-header.html, docs/chapter.html. */
/*
   Canonical names: .gallery-header (-headline, -links, -stacked) and
   .chapter-head (.chapter-eyebrow, .chapter-headline, .chapter-body,
   .chapter-head-center). Legacy aliases, kept so older pages don't break:
   .section-header*, .section-head, .section-head-center, .eyebrow,
   .headline, .copy.
*/
.gallery-header, .section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 40px;
  margin-bottom: 64px;
}
.gallery-header-headline, .section-header-headline {
  font-size: var(--fs-section); line-height: var(--lh-section); letter-spacing: var(--ls-section);
  font-weight: 600;
  text-wrap: balance;
}
.gallery-header-links, .section-header-links {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-size: 17px; line-height: 25px; letter-spacing: -0.022em;
}
.gallery-header-stacked, .section-header-stacked { flex-direction: column; align-items: flex-start; }
@media (max-width: 734px) {
  .gallery-header, .section-header { flex-direction: column; align-items: flex-start; margin-bottom: 40px; }
}

.chapter-head, .section-head { position: relative; }
.chapter-eyebrow, .eyebrow, .modal-eyebrow {
  display: block;
  font-size: var(--fs-eyebrow); line-height: var(--lh-eyebrow); letter-spacing: var(--ls-eyebrow);
  font-weight: 600;
  color: var(--text);
}
/* .eyebrow-gradient: a block eyebrow in the accent (shrinks to its text so
   the gradient spans the words). .text-gradient: the same on an inline span. */
.eyebrow-gradient {
  width: fit-content;
  background: linear-gradient(90deg, var(--accent-1-on-light, var(--accent-1)), var(--accent-2-on-light, var(--accent-2)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.chapter-headline, .headline {
  font-size: var(--fs-headline); line-height: var(--lh-headline); letter-spacing: var(--ls-headline);
  font-weight: 600;
  text-wrap: balance;
}
:is(.chapter-eyebrow, .eyebrow) + :is(.chapter-headline, .headline) { margin-top: 8px; }
/* running text of a head: 2/3 of the column at large and medium (8 of
   12 columns), 3/4 in a landing app section, full width on phones */
.chapter-body, .copy, .modal-body {
  max-width: 66.6%;
  font-size: var(--fs-copy); line-height: var(--lh-copy); letter-spacing: var(--ls-copy);
  font-weight: 600;
  color: var(--text-2);
  text-wrap: pretty;
}
:is(.chapter-body, .copy, .modal-body) :is(strong, b) { color: var(--text); font-weight: 600; }
:is(.chapter-headline, .headline) + :is(.chapter-body, .copy) { margin-top: 32px; }
:is(.chapter-body, .copy) + :is(.chapter-body, .copy) { margin-top: 1em; }
.app-section :is(.chapter-body, .copy) { max-width: 75%; }
.app-section :is(.chapter-headline, .headline) { max-width: 75%; }   /* the headline wraps no wider than its copy */
:is(.chapter-head, .section-head) .link-intro { display: inline-block; margin-top: 16px; }
/* pills in a head: 32px under the body, a trailing link 24px under the pills */
:is(.chapter-head, .section-head) .pills { display: flex; margin-top: 32px; }
:is(.chapter-head, .section-head) .pills + .link-more { margin-top: 24px; }
/* a chiclet sits on its own line above the eyebrow (app sections and chapters alike) */
:is(.chapter-head, .section-head) > .chiclet { display: grid; margin-bottom: 12px; }
:is(.chapter-head-center, .section-head-center) { text-align: center; }
:is(.chapter-head-center, .section-head-center) :is(.chapter-body, .copy) { margin-inline: auto; }
:is(.chapter-head-center, .section-head-center) .eyebrow-gradient { margin-inline: auto; }
:is(.chapter-head-center, .section-head-center) > .chiclet { margin-inline: auto; }
:is(.chapter-head-center, .section-head-center) .pills { justify-content: center; }
@media (max-width: 734px) {
  :is(.chapter-body, .copy, .modal-body) { max-width: 100%; }
  .app-section :is(.chapter-body, .copy, .chapter-headline, .headline) { max-width: 100%; }
  :is(.chapter-headline, .headline) + :is(.chapter-body, .copy) { margin-top: 24px; }
}

/* Gallery track and paddles (.gallery, .track, .paddles). The scrolling track the galleries below share. Docs: docs/tiles.html, docs/highlights.html. */
.gallery {
  position: relative;
  container-type: inline-size;              /* 1cqw = 1% of the full-bleed gallery width */
  --col: min(var(--content-max), 87.5cqw);  /* the content column, measured inside a gallery */
}
.track {
  position: relative;
  display: flex;
  gap: var(--gap);
  margin: 0;
  padding: 0 var(--edge);
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.track > * { flex: none; scroll-snap-align: start; }
.track:focus-visible { outline-offset: -2px; border-radius: 0; }

.paddles {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  width: var(--content);
  margin: 40px auto 0;
}
.paddle svg { width: 36px; height: 36px; }
.paddle:disabled { opacity: 0.36; cursor: default; background: var(--ui); color: var(--ui-icon); }
.gallery:not([data-ready]) .paddles { visibility: hidden; }
.gallery.is-static .paddles { display: none; }

/* Highlights ([data-highlights], .media-card). A media-card gallery with dot nav and play/pause. Docs: docs/highlights.html. */
.highlights-track { padding-bottom: 0; }
.media-card {
  position: relative;
  width: var(--col);
}
.media-card .media { aspect-ratio: 16 / 11; }
/* the caption lets clicks through to the card, except on its own links (footnote refs) */
.media-card .media-overlay-caption { pointer-events: none; }
.media-card .media-overlay-caption a { pointer-events: auto; }
/* a padded picture in a card starts below a two-line caption (three on phones) */
.media-card .media-pad { padding: calc(40px + 2 * var(--lh-card) + 24px) 6% 6%; }
.highlights-controls {
  position: sticky;
  bottom: 32px;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  margin-top: 36px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
/* hit-testing only while visible, so an invisible control can't be clicked */
.highlights-controls > * { pointer-events: none; }
[data-highlights].is-inview .highlights-controls > *,
.highlights-controls:focus-within > * { pointer-events: auto; }
[data-highlights].is-inview .highlights-controls,
.highlights-controls:focus-within { opacity: 1; transform: none; }
[data-highlights]:not([data-ready]) .highlights-controls { visibility: hidden; }

.dotnav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
  padding: 0 36px;
  border-radius: var(--r-pill);
  background: var(--ui-float);
  -webkit-backdrop-filter: var(--ui-float-blur);
  backdrop-filter: var(--ui-float-blur);
  list-style: none;
}
/* the button is a transparent 8px box with a 28x32 hit area (::before);
   the visible pill is .dot-pill, which clips the progress fill. Nothing on
   the button itself clips, so the hit area works. */
.dot {
  position: relative;
  flex: none;
  display: block;
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  cursor: pointer;
  transition: width 0.4s var(--ease);
}
.dot::before {                 /* hit area: 28 x 32 (24 x 32 on phones) */
  content: ""; position: absolute; inset: -12px -10px;
}
.dot-pill {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--dot);
  overflow: hidden;
  pointer-events: none;
  transition: background-color 0.3s;
}
@media (hover: hover) { .dot:hover .dot-pill { background: var(--dot-hover); } }
.dot[aria-current="true"] { width: 48px; cursor: default; }
.dot[aria-current="true"] .dot-pill { background: var(--dot); }
.dot-fill {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--dot-fill);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  pointer-events: none;
}
.dot:not([aria-current="true"]) .dot-fill { transform: scaleX(0); }
.playpause { width: 56px; height: 56px; background: var(--ui-float); -webkit-backdrop-filter: var(--ui-float-blur); backdrop-filter: var(--ui-float-blur); }
.playpause svg { width: 56px; height: 56px; }
@media (max-width: 734px) {
  .media-card { width: 87.5cqw; }
  .media-card .media { aspect-ratio: 3 / 4.2; }
  .media-overlay-caption { padding: 28px 28px; max-width: 100%; }
  .media-card .media-pad { padding: calc(28px + 3 * var(--lh-card) + 20px) 6% 6%; }
  .dotnav { gap: 16px; padding: 0 22px; height: 48px; }
  .dot::before { inset: -12px -8px; }   /* 24px wide on a 24px pitch: no overlap */
  .dot[aria-current="true"] { width: 40px; }
  .playpause, .playpause svg { width: 48px; height: 48px; }
  .highlights-controls { bottom: 20px; min-height: 48px; }
}

/* Icon cards (.icon-cards, .icon-card). Icon cards on a landing page. Docs: docs/icon-cards.html. */
.icon-cards .track > li { display: flex; }
/* room inside the clipping track for the focus ring (2px + 3px offset) and the hover lift */
.icon-cards .track { padding-block: 8px; margin-block: -8px; }   /* ring 5px + lift 2.4px */
.icon-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: calc((var(--col) - 2 * var(--gap)) / 3);
  min-height: 340px;
  padding: 28px 56px 48px 28px;
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  color: var(--text);
  transition: transform 0.4s var(--ease), background-color 0.3s;
}
@media (hover: hover) { .icon-card:hover { text-decoration: none; transform: scale(1.012); background: var(--bg-raised-hover); } }
.icon-card .chiclet { margin-bottom: 28px; }
.icon-card-eyebrow {
  font-size: 12px; line-height: 16px; letter-spacing: -0.01em; font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}
.icon-card-headline {
  font-size: var(--fs-card); line-height: var(--lh-card); letter-spacing: var(--ls-card);
  font-weight: 600;
}
.icon-card-body {
  margin-top: 12px;
  font-size: 17px; line-height: 21px; letter-spacing: -0.022em;
  color: var(--text);
}
.icon-card-body .muted, .icon-card-meta { color: var(--text-2); }
.icon-card-meta { margin-top: auto; padding-top: 24px; font-size: var(--fs-caption-sm); line-height: var(--lh-caption-sm); letter-spacing: var(--ls-caption-sm); }
.icon-card-plus {
  position: absolute;
  right: 20px; bottom: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--control);
  color: var(--control-icon);
  display: grid; place-items: center;
  transition: background-color 0.2s, color 0.2s;
}
.icon-card-plus svg { width: 36px; height: 36px; fill: currentColor; }
@media (hover: hover) { .icon-card:hover .icon-card-plus { background: var(--control-hover); color: var(--control-icon-hover); } }
@media (max-width: 1068px) {
  .icon-card { width: calc((var(--col) - var(--gap)) / 2.15); }
}
@media (max-width: 734px) {
  .icon-card { width: 78cqw; min-height: 300px; padding: 24px 48px 44px 24px; }
}

/* Caption-tile gallery (.tiles, .tile). Caption-tile galleries inside each chapter. Docs: docs/tiles.html. */
.tiles { --tile-h: 460px; --tile-narrow: 372px; --tile-wide: 696px; --tile-16x9: 818px; --tile-16x10: 736px; }
.tile {
  display: flex;
  flex-direction: column;
  width: var(--tile-narrow);
}
.tile-wide { width: var(--tile-wide); }
.tile-media,
.tile > .media {
  height: var(--tile-h);
  flex: none;
}
/* ratio tiles mix with wide and narrow ones: fixed widths like theirs, set to the row height × 16/9 or × 16/10 (rounded up) */
.tile-16x9 { width: var(--tile-16x9); }
.tile-16x10 { width: var(--tile-16x10); }
.tile-caption {
  padding: 26px 16px 0;
  font-size: var(--fs-caption); line-height: var(--lh-caption); letter-spacing: var(--ls-caption);
  font-weight: 600;
  color: var(--text-2);
  text-wrap: pretty;
}
.tile-caption h3, .tile-caption h4, .tile-caption p { display: inline; font: inherit; letter-spacing: inherit; }
.tile-caption h3, .tile-caption h4, .tile-caption strong { color: var(--text); }
.tile-note {
  margin-top: 10px;
  padding-inline: 16px;
  font-size: var(--fs-small); line-height: var(--lh-small); letter-spacing: var(--ls-small);
  color: var(--text-2);
}
.tiles-short { --tile-h: 340px; --tile-16x9: 605px; --tile-16x10: 544px; }
@media (max-width: 1068px) {
  .tiles { --tile-h: 416px; --tile-narrow: 344px; --tile-wide: 644px; --tile-16x9: 740px; --tile-16x10: 666px; }
  .tiles-short { --tile-h: 300px; --tile-16x9: 534px; --tile-16x10: 480px; }
}
@media (max-width: 734px) {
  /* phones: every tile is one 260×325 box (4:5), wide, narrow or ratio, so one 4:5 phone cut fits all */
  .tiles { --tile-h: 325px; --tile-narrow: 260px; --tile-wide: 260px; --tile-16x9: 260px; --tile-16x10: 260px; }
  .tiles-short { --tile-h: 325px; }
  .tile-caption { padding-top: 20px; }
}
/* ratio rows: every .tile-wide takes the ratio tile's width at the row's height; narrow tiles are unchanged */
.tiles-16x9 { --tile-wide: var(--tile-16x9); }
.tiles-16x10 { --tile-wide: var(--tile-16x10); }

/* App section and chapter (.app-section, .chapter). One section per project on a landing page; chapters on a project page. Docs: docs/app-section.html, docs/chapter.html. */
/* .app-section: a landing-page project section; its head body runs 3/4 wide (see 13) */
/* legacy: app sections written before the .stack snippet */
.app-section > .wrap > .media-hero { margin-top: var(--block-gap); }

.chapter { scroll-margin-top: var(--localnav-h); }
.chapter-divider {
  width: var(--content); margin: 0 auto; height: 1px; background: var(--hair); border: 0;
}

/* Headline-reduced block (.reduced). Sub-blocks inside a chapter, and centred eyebrow + headline + body blocks. Docs: docs/reduced.html. */
.reduced {
  width: min(692px, 87.5%);
  margin-inline: auto;
  text-align: center;
}
.stack > * + .reduced { margin-top: 140px; }
.stack > .reduced + * { margin-top: 64px; }
.reduced-eyebrow {
  font-size: 21px; line-height: 25px; letter-spacing: 0.011em;
  font-weight: 600;
  color: var(--text);
}
.reduced-headline {
  font-size: var(--fs-reduced); line-height: var(--lh-reduced); letter-spacing: var(--ls-reduced);
  font-weight: 600;
  text-wrap: balance;
}
.reduced-eyebrow + .reduced-headline { margin-top: 6px; }
.reduced-body {
  margin-top: 20px;
  font-size: 17px; line-height: 25px; letter-spacing: -0.022em;
  font-weight: 600;
  color: var(--text-2);
  text-wrap: pretty;
}
.reduced-body strong { color: var(--text); }
.reduced .link-more { display: inline-block; margin-top: 16px; }
.reduced .pills { justify-content: center; margin-top: 32px; }
.reduced .pills + .link-more { margin-top: 24px; }
/* large centred variant (eyebrow 24 + headline-elevated) */
.reduced-lg { width: var(--content); }
.reduced-lg .reduced-eyebrow { font-size: var(--fs-eyebrow); line-height: var(--lh-eyebrow); letter-spacing: var(--ls-eyebrow); }
.reduced-lg .reduced-headline { font-size: var(--fs-headline); line-height: var(--lh-headline); letter-spacing: var(--ls-headline); }
.reduced-lg .reduced-eyebrow + .reduced-headline { margin-top: 12px; }
.reduced-lg .reduced-body { max-width: 66.6%; margin-inline: auto; margin-top: 32px; font-size: var(--fs-copy); line-height: var(--lh-copy); letter-spacing: var(--ls-copy); }
@media (max-width: 734px) {
  .stack > * + .reduced { margin-top: 100px; }
  .stack > .reduced + * { margin-top: 48px; }
  .reduced-eyebrow { font-size: 19px; line-height: 23px; }
  .reduced-lg .reduced-body { max-width: 100%; }
}

/* Tab gallery ([data-tabgallery], .tabnav). One picture at a time under a row of tabs. Docs: docs/tabgallery.html. */
/* the media shows first whatever the DOM order, so a page may put .tabnav
   before .tabgallery-media (tabs, then panel, in Tab order) */
.tabgallery { position: relative; display: flex; flex-direction: column; }
.tabgallery-media { order: -1; }
.tabgallery-media {
  display: grid;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-raised);
}
.tabgallery-panel {
  grid-area: 1 / 1;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}
/* a focusable panel draws its ring inside itself (the rounded well clips outside) */
.tabgallery-panel:focus-visible { outline-offset: -4px; border-radius: inherit; }
.tabgallery-panel.is-active,
.tabgallery:not([data-ready]) .tabgallery-panel:first-child {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s var(--ease);
}
.tabnav {
  display: flex;
  justify-content: flex-start;
  margin-top: 24px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabnav::-webkit-scrollbar { display: none; }
.tabnav-platter {
  position: relative;
  display: inline-flex;
  flex: none;
  gap: 0;
  padding: 4px;
  margin-inline: auto;
  border-radius: var(--r-pill);
  background: var(--platter);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.tabnav-indicator {
  position: absolute;
  top: 4px; bottom: 4px;
  left: 0;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--text);
  transform: translateX(var(--x, 0));
  transition: transform 0.5s var(--ease), width 0.5s var(--ease);
  pointer-events: none;
}
.tabnav-tab {
  position: relative;
  z-index: 1;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--platter-tab);
  font-size: var(--fs-tab);
  line-height: 1.2;
  letter-spacing: -0.016em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.4s var(--ease);
}
.tabnav-tab::after { content: ""; position: absolute; inset: -4px 0; }   /* hit area to the platter edge */
@media (hover: hover) { .tabnav-tab:hover { color: var(--text-hover); } }
.tabnav-tab[aria-selected="true"] { color: var(--on-text); }
.tabgallery:not([data-ready]) .tabnav-tab:first-child { background: var(--text); color: var(--on-text); }
.tabnav-tab:focus-visible { outline-offset: -2px; border-radius: var(--r-pill); }
.tabgallery-captions {
  display: grid;
  width: min(760px, 100%);
  margin: 24px auto 0;
  text-align: center;
}
.tabgallery-caption {
  grid-area: 1 / 1;
  font-size: var(--fs-caption); line-height: var(--lh-caption); letter-spacing: var(--ls-caption);
  font-weight: 600;
  color: var(--text-2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s;
  text-wrap: pretty;
}
.tabgallery-caption strong { color: var(--text); }
.tabgallery-caption.is-active,
.tabgallery:not([data-ready]) .tabgallery-caption:first-child {
  opacity: 1; visibility: visible;
  transition: opacity 0.5s var(--ease) 0.1s;
}
/* tabs that don't fit scroll sideways: 24px of padding keeps the end tabs
   clear of the fade at rest, and only a side with hidden tabs fades
   (ds.js sets .is-at-start / .is-at-end) */
.tabnav.is-overflowing {
  padding-inline: 24px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.tabnav.is-overflowing.is-at-start {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent 100%);
}
.tabnav.is-overflowing.is-at-end {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px);
  mask-image: linear-gradient(90deg, transparent 0, #000 24px);
}
@media (max-width: 734px) {
  .tabgallery-panel { aspect-ratio: 4 / 3; }
  .tabnav-tab { padding: 9px 11px; }   /* six short labels fit a 341px column */
}

/* Modal (.modal). Overlay pages opened from a link. Docs: docs/modal.html. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: block;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 40px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0s linear 0.35s;
  --sheet-max: calc(var(--content-max) * 1.2); /* inside the 8.33% padding, a picture is as wide as the content column at most */
}
.modal[hidden] { display: none; }
.modal.is-open {
  opacity: 1; visibility: visible;
  transition: opacity 0.35s var(--ease-out);
}
.modal-scrim {
  position: fixed; inset: 0;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
}
.modal-sheet {
  position: relative;
  width: min(var(--sheet-max), calc(100% - 80px));
  margin: 0 auto;
  border-radius: var(--r-lg);
  background: var(--bg-sheet);
  box-shadow: var(--sheet-shadow);
  transform: translateY(40px);
  transition: transform 0.5s var(--ease);
}
.modal.is-open .modal-sheet { transform: none; }
.modal-sheet:focus { outline: none; }
.modal-close {
  position: sticky;
  top: 16px;
  float: right;
  z-index: 5;
  margin: 16px 16px 0 0;
  background: var(--control);
  color: var(--modal-close-icon);
}
@media (hover: hover) { .modal-close:hover { background: var(--control-hover); color: var(--control-icon-hover); } }
.modal-close svg { width: 36px; height: 36px; }
.modal-content {
  padding: 80px 8.33% 96px;
}
.modal-content > * + * { margin-top: 48px; }
.modal-content > :is(.modal-eyebrow, .eyebrow) + .modal-headline { margin-top: 8px; }
.modal-content > .modal-headline + :is(.modal-body, .copy) { margin-top: 32px; }
.modal-headline {
  font-size: var(--fs-headline); line-height: var(--lh-headline); letter-spacing: var(--ls-headline);
  font-weight: 600;
  text-wrap: balance;
}
.modal :is(.modal-body, .copy) { max-width: min(80%, 720px); }
.modal-content .media { border-radius: var(--r-md); }
.modal-content .tabgallery-media { border-radius: var(--r-md); }
/* galleries inside a sheet scroll within the sheet's text column */
.modal-content .track { padding-inline: 0; scroll-padding-inline: 0; }
.modal-content .paddles { width: 100%; }
.modal-content .prose { max-width: 692px; }
html.has-modal, html.has-modal body { overflow: hidden; }
@media (max-width: 734px) {
  .modal { padding: 0; }
  .modal-sheet { width: 100%; min-height: 100%; border-radius: 0; }
  .modal-content { padding: 64px 24px 72px; }
  .modal :is(.modal-body, .copy) { max-width: 100%; }
}

/* Callouts and callout row (.callouts, .callout). Callout grids and centred image rows. Docs: docs/callouts.html, docs/callout-row.html. */
.callouts {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 44px var(--gap);
  list-style: none;
}
.callouts-2 { --cols: 2; }
.callouts-4 { --cols: 4; }
.callout .chiclet { --chiclet-size: 40px; margin-bottom: 16px; }
.callout-title {
  font-size: 17px; line-height: 21px; letter-spacing: -0.022em; font-weight: 600;
  color: var(--text);
}
.callout-body {
  margin-top: 6px;
  font-size: 17px; line-height: 25px; letter-spacing: -0.022em;
  color: var(--text-2);
}
.callouts-cards .callout {
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--bg-raised);
}
:is(.modal, .tone-raised, .highlights) .callouts-cards .callout { background: var(--bg-well-raised); }
@media (max-width: 1068px) { .callouts-4 { --cols: 2; } .callouts { --cols: 2; } .callouts-2 { --cols: 2; } }
@media (max-width: 734px) { .callouts, .callouts-2, .callouts-4 { --cols: 1; gap: 32px; } }

.callout-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}
.callout-row-text { max-width: 600px; }
.callout-row-text .callout-title { font-size: var(--fs-card); line-height: var(--lh-card); letter-spacing: var(--ls-card); }
.callout-row-text .callout-body { margin-top: 12px; font-weight: 600; }
.callout-row .media { width: 100%; }
.callout-row > .media-caption { margin-top: -20px; align-self: stretch; }

/* Feature list (.feature-list). Docs: docs/feature-list.html. */
.feature-list {
  list-style: none;
  columns: var(--cols, 2);
  column-gap: 40px;
}
.feature-list li {
  break-inside: avoid;
  padding: 16px 0;
  border-top: 1px solid var(--hair);
  font-size: 17px; line-height: 25px; letter-spacing: -0.022em;
  color: var(--text-2);
}
.feature-list li strong { display: block; color: var(--text); }
.feature-list-3 { --cols: 3; }
@media (max-width: 734px) { .feature-list, .feature-list-3 { --cols: 1; } }

/* Stats (.stats, .stat). Docs: docs/stats.html. */
.stats {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 40px var(--gap);
}
.stats-2 { --cols: 2; } .stats-4 { --cols: 4; }
.stat-eyebrow {
  font-size: 17px; line-height: 21px; letter-spacing: -0.022em; font-weight: 600;
  color: var(--text);
}
.stat-number {
  font-size: var(--fs-stat); line-height: var(--lh-stat); letter-spacing: var(--ls-stat);
  font-weight: 600;
  width: fit-content;
  background: linear-gradient(90deg, var(--accent-1-on-light, var(--accent-1)), var(--accent-2-on-light, var(--accent-2)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-number small { font-size: 0.4em; line-height: 0; letter-spacing: 0; }  /* a unit never makes the line taller */
.stat-label {
  margin-top: 6px;
  font-size: 17px; line-height: 21px; letter-spacing: -0.022em; font-weight: 600;
  color: var(--text-2);
  text-wrap: pretty;
}
.stat-plain .stat-number { background: none; color: var(--text); }
.stats-center .stat { text-align: center; }
.stats-center .stat-number { margin-inline: auto; }
.stat-sm .stat-number { font-size: 48px; line-height: 52px; letter-spacing: -0.003em; }
@media (max-width: 1068px) { .stats-4 { --cols: 2; } }
@media (max-width: 734px) {
  .stats, .stats-2, .stats-4 { --cols: 1; gap: 32px; }
  .stats-sm-2 { --cols: 2; }
  .stat-sm .stat-number { font-size: 40px; line-height: 44px; }
}

/* Quote (.quote). Docs: docs/quote.html. */
/* quote (pull line from a client or collaborator) */
.quote {
  font-size: var(--fs-reduced); line-height: var(--lh-reduced); letter-spacing: var(--ls-reduced);
  font-weight: 600;
  text-wrap: balance;
}
.quote-cite {
  display: block; margin-top: 20px;
  font-size: 17px; line-height: 21px; letter-spacing: -0.022em; font-weight: 600; font-style: normal;
  color: var(--text-2);
}

/* Facts (.facts). Spec and fact rows. Docs: docs/facts.html. */
/* facts: label/value list for a project (client, role, years, team, tools, link) */
.facts {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 0 var(--gap);
}
.facts-3 { --cols: 3; }
.facts > div {
  padding: 16px 0 24px;
  border-top: 1px solid var(--hair);
  min-width: 0;
}
.facts dt {
  font-size: var(--fs-small); line-height: var(--lh-small); letter-spacing: var(--ls-small);
  color: var(--text-2);
}
.facts dd {
  margin: 4px 0 0;
  font-size: 17px; line-height: 21px; letter-spacing: -0.022em; font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}
.facts dd + dd { margin-top: 2px; }
/* default 4 across down to 735px, 2 on phones: 4 or 8 items stay even at every width.
   .facts-3: 3 across down to 735px, 2 on phones: use 6 items. */
@media (max-width: 734px) { .facts, .facts-3 { --cols: 2; } }

/* Role and credits (.owned). Docs: docs/owned.html. */
/* owned: what one person did vs. what the team did, plus a credits line */
.owned {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px var(--gap);
}
.owned-title {
  margin-bottom: 12px;
  font-size: var(--fs-card); line-height: var(--lh-card); letter-spacing: var(--ls-card);
  font-weight: 600;
  color: var(--text);
}
.owned-list { list-style: none; }
.owned-list li {
  padding: 12px 0;
  border-top: 1px solid var(--hair);
  font-size: 17px; line-height: 25px; letter-spacing: -0.022em;
  color: var(--text-2);
}
.owned-list li strong { color: var(--text); }
.owned-credits {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  font-size: var(--fs-caption-sm); line-height: var(--lh-caption-sm); letter-spacing: var(--ls-caption-sm);
  color: var(--text-2);
}
.owned-credits strong { color: var(--text); font-weight: 600; }
@media (max-width: 734px) { .owned { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* Prose (.prose). Docs: docs/prose.html. */
/* prose: a paragraph or two of plain running text */
.prose {
  max-width: 692px;
  font-size: var(--fs-body); line-height: var(--lh-body); letter-spacing: var(--ls-body);
  font-weight: 400;
  color: var(--text-2);
  text-wrap: pretty;
}
.prose > * + * { margin-top: 1em; }
.prose strong, .prose b { color: var(--text); font-weight: 600; }
.prose a { color: var(--link); }
.prose a:where(:not(.pill, .link-more)) { text-decoration: underline; text-underline-offset: 0.18em; }   /* running-text links do not rely on colour alone */
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }
:is(.chapter-head, .section-head) + .prose { margin-top: 32px; }

/* Code block (.code). Docs: docs/code.html. */
/* code: a block (<pre class="code"><code>) on a dark well that scrolls
   sideways inside itself, and inline <code> in running text */
.code, .prose pre, .modal-content pre {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  padding: 24px;
  border-radius: var(--r-md);
  background: var(--bg-raised);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px; line-height: 20px; letter-spacing: 0; font-weight: 400;
  white-space: pre;
  tab-size: 2;
  text-align: left;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar) transparent;
}
.code code, .prose pre code, .modal-content pre code { font: inherit; padding: 0; background: none; }
:is(.modal-content, .tone-raised, .highlights) :is(.code, pre) { background: var(--bg-well-raised); }
.code-figure > .media-caption { padding-inline: 4px; }
:not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--fill-soft);
  color: var(--text);
  font-size: 0.88em;
  letter-spacing: 0;
  font-weight: 400;
  overflow-wrap: anywhere;
}
@media (max-width: 734px) { .code, .prose pre, .modal-content pre { padding: 20px; font-size: 13px; line-height: 19px; } }

/* Work index (.work-grid, .work-card). A filterable card grid. Docs: docs/work-grid.html. */
/* work index: a dense grid of project link cards for "All work" (20+ projects).
   3 across at large, 2 at medium, compact rows on phones. */
.work-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.work-filter .badge { min-height: 32px; padding: 6px 14px; font-size: 14px; line-height: 20px; cursor: pointer; border: 0; }
.work-filter .badge[aria-pressed="true"] { background: var(--text); color: var(--on-text); box-shadow: none; }
.stack > .work-filter + .work-grid { margin-top: 0; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: var(--gap);
  list-style: none;
}
.work-grid-4 { --cols: 4; }
.work-grid > li { display: flex; min-width: 0; }
.work-grid > li[hidden] { display: none; }
.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 248px;
  padding: 24px 24px 22px;
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  color: var(--text);
  transition: background-color 0.3s, transform 0.4s var(--ease);
}
/* only linked cards lift; a plain <div class="work-card"> (coming soon) stays still */
@media (hover: hover) { a.work-card:hover { text-decoration: none; background: var(--bg-raised-hover); transform: scale(1.012); } }
.work-card .chiclet { margin-bottom: 20px; }
.work-card-eyebrow {
  font-size: var(--fs-small); line-height: var(--lh-small); letter-spacing: var(--ls-small); font-weight: 600;
  color: var(--text-2);
  margin-bottom: 4px;
}
.work-card-headline {
  font-size: 21px; line-height: 25px; letter-spacing: 0.011em; font-weight: 600;
}
.work-card-body {
  margin-top: 6px;
  font-size: 17px; line-height: 21px; letter-spacing: -0.022em;
  color: var(--text-2);
  text-wrap: pretty;
}
.work-card-meta {
  margin-top: auto;
  padding-top: 16px;
  font-size: var(--fs-small); line-height: var(--lh-small); letter-spacing: var(--ls-small);
  color: var(--text-2);
}
@media (max-width: 1068px) { .work-grid, .work-grid-4 { --cols: 2; } }
@media (max-width: 734px) {
  .work-grid, .work-grid-4 { --cols: 1; gap: 12px; }
  .work-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    align-content: start;
    min-height: 0;
    padding: 18px 20px;
    border-radius: var(--r-md);
  }
  .work-card > * { grid-column: 2; }
  .work-card .chiclet { --chiclet-size: 48px; grid-column: 1; grid-row: 1 / span 5; margin: 2px 0 0; }
  .work-card-meta { padding-top: 8px; }
  .work-card .badges { margin-top: 8px; }
}

/* Next project (.next-project). Docs: docs/next-project.html. */
/* next project: one raised card that is one link, closing a project page */
.next-project {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 32px 48px;
  padding: 40px 88px 40px 40px;
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  color: var(--text);
  transition: background-color 0.3s, transform 0.4s var(--ease);
}
@media (hover: hover) { .next-project:hover { text-decoration: none; background: var(--bg-raised-hover); transform: scale(1.006); } }
.next-project:has(> .next-project-media) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.next-project .chiclet { margin-bottom: 20px; }
.next-project-eyebrow {
  width: fit-content;
  font-size: 17px; line-height: 21px; letter-spacing: -0.022em; font-weight: 600;
  background: linear-gradient(90deg, var(--accent-1-on-light, var(--accent-1)), var(--accent-2-on-light, var(--accent-2)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.next-project-headline {
  margin-top: 6px;
  font-size: var(--fs-reduced); line-height: var(--lh-reduced); letter-spacing: var(--ls-reduced);
  font-weight: 600;
  text-wrap: balance;
}
.next-project-body {
  margin-top: 12px;
  font-size: 17px; line-height: 25px; letter-spacing: -0.022em; font-weight: 600;
  color: var(--text-2);
  text-wrap: pretty;
}
.next-project-media { border-radius: var(--r-md); aspect-ratio: 16 / 10; }
.next-project-arrow {
  position: absolute;
  right: 24px; bottom: 24px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--control);
  color: var(--control-icon);
  display: grid; place-items: center;
  transition: background-color 0.2s, color 0.2s;
}
.next-project-arrow svg { width: 36px; height: 36px; }
@media (hover: hover) { .next-project:hover .next-project-arrow { background: var(--control-hover); color: var(--control-icon-hover); } }
@media (max-width: 734px) {
  .next-project, .next-project:has(> .next-project-media) { grid-template-columns: minmax(0, 1fr); padding: 28px 24px 76px; gap: 24px; }
  .next-project-arrow { right: 20px; bottom: 20px; }
  /* with a picture, the arrow sits on the picture's corner: no empty band below it */
  .next-project:has(> .next-project-media) { padding-bottom: 24px; }
  .next-project:has(> .next-project-media) .next-project-arrow { right: 36px; bottom: 36px; }
}

/* FAQ accordion (.faq). An FAQ accordion at the foot of a page. Docs: docs/faq.html. */
.faq-headline {
  font-size: var(--fs-faq); line-height: var(--lh-faq); letter-spacing: var(--ls-faq);
  font-weight: 600;
  margin-bottom: 40px;
}
.faq-list { list-style: none; }
.faq-item { border-bottom: 1px solid var(--hair); }
.faq-item:last-child { border-bottom: 0; }   /* hairlines only between questions */
.faq-item details { margin: 0; }
.faq-question {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 0;
  font-size: 21px; line-height: 25px; letter-spacing: 0.011em; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { content: ""; }
.faq-question > span:first-child { max-width: 80%; }
.faq-chevron {
  flex: none;
  width: 22px; height: 25px;
  margin-right: 0;
  color: var(--text-3);
  background: currentColor;
  -webkit-mask: var(--icon-down) center / 21px 13px no-repeat;
  mask: var(--icon-down) center / 21px 13px no-repeat;
  transition: transform 0.4s var(--ease), color 0.2s;
}
@media (hover: hover) { .faq-question:hover .faq-chevron { color: var(--text); } }
.faq-item details[open] > .faq-question .faq-chevron { transform: rotate(180deg); }
.faq-item details.is-closing > .faq-question .faq-chevron { transform: none; }
.faq-question:focus-visible { outline-offset: 2px; }
.faq-answer {
  overflow: hidden;
}
.faq-answer-inner {
  padding: 0 0 28px;
  max-width: 80%;
  font-size: 17px; line-height: 25px; letter-spacing: -0.022em;
  color: var(--answer-text);
}
.faq-answer-inner > * + * { margin-top: 1em; }
.faq-answer-inner strong { color: var(--text); }
.faq-answer-inner a { text-decoration: underline; text-underline-offset: 0.18em; }
@media (max-width: 734px) {
  .faq-question { font-size: 19px; line-height: 23px; padding: 22px 0; }
  .faq-question > span:first-child, .faq-answer-inner { max-width: 100%; }
}

/* Footnotes (.footnotes, sup.fn). Docs: docs/footer.html. */
sup.fn, .fn {
  font-size: 0.6em;
  line-height: 0;
  vertical-align: super;
  font-weight: inherit;
}
.fn a { position: relative; color: inherit; text-decoration: none; padding: 0 1px; }
.fn a::after { content: ""; position: absolute; inset: -8px -6px; }   /* ~20x28 hit area, type unmoved */
/* markers after display-size type stay small */
:is(.welcome-headline, .chapter-headline, .gallery-header-headline, .section-header-headline, .headline,
    .reduced-headline, .modal-headline, .faq-headline, .next-project-headline, .quote) .fn { font-size: 0.4em; }
@media (hover: hover) { .fn a:hover { text-decoration: underline; } }
.footnotes {
  padding: 48px 0 20px;
  font-size: var(--fs-small); line-height: var(--lh-small); letter-spacing: var(--ls-small);
  color: var(--text-2);
}
.footnotes .wrap { border-top: 1px solid var(--hair); padding-top: 18px; }
.footnotes-list { padding-left: 1.2em; }
.footnotes-list li + li, .footnotes p + p, .footnotes-list + p { margin-top: 0.8em; }
.footnotes-list li:is(:target, .is-target) { color: var(--text); }
.footnotes a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

/* Site footer (.site-footer). Docs: docs/footer.html. */
.site-footer {
  padding: 20px 0 36px;
  background: var(--bg-band);
  font-size: var(--fs-small); line-height: var(--lh-small); letter-spacing: var(--ls-small);
  color: var(--text-2);
}
.footnotes + .site-footer { padding-top: 0; }
.footnotes:has(+ .site-footer) { background: var(--bg-band); }
.site-footer-crumbs {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair);
  color: var(--text);
}
.site-footer-crumbs a { color: var(--text); }
/* footer links: a 26px-tall hit area around 16px type */
.site-footer a { position: relative; }
.site-footer a::after { content: ""; position: absolute; inset: -5px -4px; }
.site-footer-crumbs .chev { color: var(--text-3); }
.site-footer-links {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  padding: 18px 0;
  list-style: none;
}
.site-footer-links a { color: var(--footer-link); }
@media (hover: hover) { .site-footer-links a:hover { color: var(--text-hover); } }
.site-footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
}
.site-footer-legal a { color: var(--footer-link); }
.site-footer-crumbs + .site-footer-links { border-bottom: 0; }
/* opt-in: <body class="footer-bottom"> holds the footer to the bottom of the
   viewport when the page is shorter than it; main takes the spare height.
   svh, so a short page never scrolls with the phone toolbars showing. */
body.footer-bottom { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
body.footer-bottom > main { flex: 1 0 auto; }

/* ==========================================================================
   UTILITIES
   Cross-cutting aids that sit last so they win: scroll reveal,
   reduced-motion and print overrides.
   ========================================================================== */

/* Scroll reveal (.reveal). Blocks rise in once as they reach the screen. Docs: docs/reveal.html. */
/* ds.js adds .reveal-pending only to below-fold elements. */
.reveal-pending {
  opacity: 0;
  transform: translateY(40px);
}
/* a keyboard user who tabs into a block that has not revealed yet sees it (and its focus ring) at once */
.reveal-pending:focus-within { opacity: 1; transform: none; }
.reveal-run {
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

/* Reduced motion and print. Accessibility and print overrides that stay last on purpose. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;      /* hidden panels and captions leave hit-testing at once */
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-pending { opacity: 1; transform: none; }
  .icon-card:hover, .next-project:hover, a.work-card:hover { transform: none; }
}

/* print: show everything, drop chrome */
@media print {
  .localnav, .globalnav, .highlights-controls, .paddles, .media-ui { display: none !important; }
  .track { flex-wrap: wrap; overflow: visible; }
  .reveal-pending { opacity: 1; transform: none; }
}
