/* The system page (/the-system/): the site's tokens, type and components, drawn by the site's
 * own CSS. Loads after home.css and project.css (for the hero and facts row). Uses the site's
 * tokens only. system.js reads the values from home.css and fills in the numbers. */

.sys-hero .case-facts { width: min(100%, 880px); margin-inline: auto; text-align: center; } /* keeps the project pages' hairline above */
.sys-hero .case-facts div { justify-items: center; }

/* The sections: one column no wider than the screen */
.sys {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-12);
  padding: 0 var(--edge); /* Let's talk, below, brings its own space */
}
/* The index: at every width, a strip pinned under the top bar (48px) from the moment the
   page opens, page-wide, that scrolls sideways where it doesn't fit. Its links are the top
   bar's links (Type/link-nav, with the fill sweep on hover and focus, home.css) and start and
   end on the page's edge, like the content. A chevron icon button sits over each end, on a
   short fade to the page colour, to step it along without swiping; each shows only while
   there's more that way (system.js .can-back/.can-on). system.js also keeps the section
   you're reading in view. Under the phone menu, which covers it. */
.sys-index {
  position: fixed; top: 48px; left: 0; right: 0; z-index: 8;
  padding-block: 0 var(--space-2); /* none above: it sits right under the top bar */
  background: var(--color-bg);
}
.sys-index ul {
  position: relative;
  display: flex; flex-wrap: nowrap; gap: var(--space-5);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  scroll-padding-inline: var(--space-12); /* a link tabbed to stops clear of the chevrons and their fade */
}
.sys-index ul::-webkit-scrollbar { display: none; }
.sys-index li { flex: none; }
/* The page's edge before the first link and after the last (padding on the items, so
   every browser scrolls it) */
.sys-index li:first-child { padding-left: var(--edge); }
.sys-index li:last-child { padding-right: var(--edge); }
/* Centred at every width, like the top bar's links, until they reach the sides; then it
   scrolls from the first link. The list shrinks to its links and is centred itself (never
   wider than the page); works in every browser, unlike auto margins on the items. */
.sys-index ul { width: max-content; max-width: 100%; margin-inline: auto; }
.sys-index::before, .sys-index::after {
  content: ""; position: absolute; z-index: 1; top: 0; bottom: 0; width: var(--space-16);
  pointer-events: none; opacity: 0; transition: opacity var(--duration-s) var(--ease);
}
.sys-index::before { left: 0; background: linear-gradient(to right, var(--strip-bg, var(--color-bg)) 60%, transparent); }
.sys-index::after { right: 0; background: linear-gradient(to left, var(--strip-bg, var(--color-bg)) 60%, transparent); }
.sys-index.can-back::before, .sys-index.can-on::after { opacity: 1; }
.sys-index__step {
  display: grid; position: absolute; z-index: 2; top: 50%; translate: 0 -50%;
  color: var(--color-text-muted); transition: opacity var(--duration-s) var(--ease);
}
.sys-index__step[data-step="-1"] { left: var(--space-1); }
.sys-index__step[data-step="1"] { right: var(--space-1); }
.sys-index__step:disabled { opacity: 0; pointer-events: none; }
/* Anything tabbed to stops clear of the top bar and the strip (80px) */
html:has(.sys-index) { scroll-padding-top: var(--space-24); }
/* The section you're reading is in the text colour, the rest muted */
.sys-index a:not([aria-current]) { color: var(--color-text-muted); }
.sys-index a { display: inline-block; font: var(--type-link-nav); text-decoration: none; } /* a full 24px line, like the top bar's links */

.sys-body { display: grid; min-width: 0; }
.sys-section { position: relative; display: grid; gap: var(--space-4); padding-block: var(--space-44); scroll-margin-top: var(--space-24); } /* clear of the top bar and the index strip */
/* Sections break like the project pages' chapters: 176px above and below (120px on phones)
   and a hairline across the whole page. */
.sys-section::before { content: ""; position: absolute; top: 0; left: -100vw; right: -100vw; border-top: 1px solid var(--color-border); }
.sys-section > .label + .sys-title { margin-top: calc(-1 * var(--space-2)); }
.sys-title { margin-bottom: var(--space-6); font: var(--type-display-m); letter-spacing: var(--type-display-m-tracking); } /* 40px to what follows, with the section's gap */
.sys-lede { max-width: 560px; margin-bottom: var(--space-6); font: var(--type-body-m); color: var(--color-text-muted); text-wrap: pretty; }
/* How to use the section's tokens, as one terminal line (like the 404 log) in a pill on the
   subtle surface: the $ muted, the code in --color-text. A line that wraps on a phone keeps
   rounded corners rather than a stretched capsule. */
.sys-usage {
  justify-self: start; max-width: 100%;
  margin: calc(-1 * var(--space-3)) 0 var(--space-6); padding: var(--space-1) 14px;
  border-radius: var(--radius-s);
  background: var(--color-bg-subtle);
  font: var(--type-label-meta); letter-spacing: var(--type-label-meta-tracking);
  color: var(--color-text); overflow-wrap: anywhere;
}
.sys-usage code { font: inherit; }
.sys-usage__prompt { color: var(--color-text-muted); }

/* Rows: a hairline over each, like the type grid, with room either side of it */
.sys-rows { display: grid; gap: var(--space-6); }
.sys-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-6); align-items: baseline;
  padding-top: var(--space-6); border-top: 1px solid var(--color-border);
}
.sys-meta { display: grid; gap: 2px; min-width: 0; }
/* Mono is only for token names: the thing you'd type. Values are quiet sans, with figures
   that line up */
.sys-name { font: var(--type-label-meta); letter-spacing: var(--type-label-meta-tracking); color: var(--color-text); overflow-wrap: anywhere; }
.sys-role { font: var(--type-body-m); color: var(--color-text-muted); text-wrap: pretty; }
.sys-value { font: var(--type-body-s); font-variant-numeric: tabular-nums; color: var(--color-text-muted); text-align: right; }

/* Colour: the swatches side by side, three to a row (two on tablets and phones). Each token
   is two rounded squares, the light theme then the dark, with the border token round each.
   Without script both show the colour in the current theme. See-through tokens sit on each
   theme's own page colour. A hairline over each, like the type cards. */
.sys-swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-10) var(--space-6); }
.sys-swatch {
  display: grid; gap: var(--space-1); align-content: start; min-width: 0;
  padding-top: var(--space-6); border-top: 1px solid var(--color-border);
}
.sys-swatch .sys-value { text-align: left; }
.swatch { display: flex; gap: var(--space-1); margin-bottom: var(--space-3); }
.swatch::before, .swatch::after {
  content: ""; width: var(--space-12); aspect-ratio: 1;
  border: 1px solid var(--color-border); border-radius: var(--radius-s);
}
.swatch::before { background: linear-gradient(var(--light, var(--c)) 0 0), var(--light-back, var(--color-bg)); }
.swatch::after { background: linear-gradient(var(--dark, var(--c)) 0 0), var(--dark-back, var(--color-bg)); }
@media (max-width: 1023px) { .sys-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .sys-swatches { gap: var(--space-8) var(--space-4); } .swatch::before, .swatch::after { width: var(--space-10); } }
.sys-pass { color: var(--color-text); }

/* Type: a grid of samples, each in its own style with its name and its sizes right now
   under it. The four display sizes four across (on phones they're all 44px, so two across),
   the rest three across. Each card's sample and name share their row's lines (subgrid), so
   the names line up under samples of every size. */
/* A hairline over each card, and plenty of air above the next row, so samples of very
   different sizes don't run into each other */
.sys-types { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-16) var(--space-8); }
.sys-type {
  grid-column: span 4; display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: var(--space-4); min-width: 0;
  padding-top: var(--space-6); border-top: 1px solid var(--color-border);
}
.sys-type--display { grid-column: span 3; }
.sys-type .sys-sample { align-self: end; }
.sys-type .sys-value { text-align: left; }
.sys-sample { min-width: 0; overflow-wrap: break-word; }
@media (max-width: 1023px) { .sys-type { grid-column: span 6; } .sys-type--display { grid-column: span 3; } }
@media (max-width: 767px) { .sys-types { gap: var(--space-10) var(--space-6); } .sys-type { grid-column: 1 / -1; } .sys-type--display { grid-column: span 6; } }
.t-display-xl { font: var(--type-display-xl); letter-spacing: var(--type-display-xl-tracking); }
.t-display-l { font: var(--type-display-l); letter-spacing: var(--type-display-l-tracking); }
.t-display-m { font: var(--type-display-m); letter-spacing: var(--type-display-m-tracking); }
.t-display-s { font: var(--type-display-s); letter-spacing: var(--type-display-s-tracking); }
.t-display-menu { font: var(--type-display-menu); letter-spacing: var(--type-display-menu-tracking); }
.t-heading-stat { font: var(--type-heading-stat); letter-spacing: var(--type-heading-stat-tracking); }
.t-heading-pull { font: var(--type-heading-pull); letter-spacing: var(--type-heading-pull-tracking); }
.t-body-m { font: var(--type-body-m); }
.t-body-s { font: var(--type-body-s); }
.t-link-nav { font: var(--type-link-nav); }
.t-link-company { font: var(--type-link-company); }
.t-label { font: var(--type-label); letter-spacing: var(--type-label-tracking); color: var(--color-text-muted); }
.t-label-meta { font: var(--type-label-meta); letter-spacing: var(--type-label-meta-tracking); color: var(--color-text-muted); }

/* Layout: the edge, the content, the edge */
.sys-layout {
  display: grid; grid-template-columns: 1fr 4fr 1fr; gap: var(--space-1);
  height: 64px; margin-bottom: var(--space-2);
  font: var(--type-body-s); color: var(--color-text-muted);
}
.sys-layout > span { display: grid; place-items: center; border-radius: var(--radius-l); }
.sys-layout__content { background: var(--color-bg-subtle); color: var(--color-text); }

/* Motion: the curves as pills; under them one graph with every curve faint and the picked
   one in the text colour, and a dot running its track on it. Still with Reduce motion or
   Pause animations. */
.sys-ease { display: grid; gap: var(--space-6); }
.sys-ease__tabs { justify-content: start; }
.sys-ease__panel { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--space-8); align-items: center; }
.sys-ease__panel .sys-value { text-align: left; }
.sys-curve { width: 160px; height: 160px; overflow: visible; }
.sys-curve__grid { fill: none; stroke: var(--color-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sys-curve__line { fill: none; stroke: var(--color-border); stroke-width: 1.5; stroke-linecap: round; vector-effect: non-scaling-stroke; transition: stroke var(--duration-s) var(--ease); }
.sys-curve__line.is-on { stroke: var(--color-text); }
.sys-track { position: relative; display: block; height: 16px; margin-top: var(--space-4); margin-right: 12%; border-bottom: 1px solid var(--color-border); } /* stops short, so --ease-pop's overshoot stays on screen */
.sys-track__dot {
  position: absolute; z-index: 1; left: 0; bottom: -4px; /* above the track and the pop's run-on line */
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-text);
}
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="paused"]) .sys-track__dot {
    animation: sys-run 3.2s var(--run-ease, var(--ease)) infinite alternate;
  }
}
/* Held at each end, then the eased run between: the curve applies to each stretch */
@keyframes sys-run {
  0%, 15% { left: 0; }
  85%, 100% { left: calc(100% - 8px); }
}

/* Components: grouped under a small label; a card each, two side by side on wide screens,
   the long ones the full width. Samples sit on the grey surface, like the pictures on the
   project pages, with no borders. */
.sys-group { display: grid; gap: var(--space-6); }
.sys-group + .sys-group { margin-top: var(--space-24); }
.sys-group__name { padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border); }
.sys-cards { display: grid; gap: var(--space-10) var(--space-6); }
@media (min-width: 1024px) {
  .sys-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sys-card--wide { grid-column: 1 / -1; }
}
.sys-card { display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.sys-card__name { font: var(--type-body-m); font-weight: 500; color: var(--color-text); } /* bold, like every small heading here */
.sys-demo {
  display: grid; place-items: center; gap: var(--space-4);
  min-height: 128px; padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-l);
  background: var(--color-bg-subtle);
  overflow: hidden;
}
.sys-demo--stack { justify-items: center; align-content: center; }
.sys-demo--row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-3); }
.sys-demo--wide { place-items: stretch; align-content: center; padding: var(--space-8); }
.sys-note { font: var(--type-body-s); color: var(--color-text-muted); max-width: 560px; text-wrap: pretty; }

/* Small fixes so each sample sits in its panel the way it sits on its page */
.sys-demo .primary-btn { border: 0; cursor: pointer; } /* a button here, a link on the pages */
.sys-icon-row { display: flex; gap: var(--space-2); }
.sys-demo .sys-menu-btn { display: inline-flex; justify-self: center; } /* phones only on the pages, where the top bar pushes it right */
.sys-pill-panel { font: var(--type-body-s); color: var(--color-text-muted); }
.sys-fold { width: min(100%, 560px); justify-self: center; }
.sys-navlinks { padding: 0; border-top: 0; justify-content: center; }
.sys-inline { padding-top: 0; max-width: 520px; }
.sys-demo--stack .sys-inline { text-align: center; }
.sys-log { justify-self: center; }
.sys-copy { position: static; translate: none; opacity: 1; justify-self: center; transition: none; }
/* One stat is enough to show the part: centred, as wide as one of three on a project page */
.sys-stats { margin-top: 0; grid-template-columns: minmax(0, 384px); justify-content: center; }
.sys-facts { width: 100%; margin-top: 0; padding-top: 0; border-top: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 768px) { /* the three facts together in the middle, not spread to the panel's edges */
  .sys-facts { width: auto; justify-self: center; grid-template-columns: repeat(3, max-content); column-gap: var(--space-16); }
}
.sys-career, .sys-quotes { width: 100%; }
.sys-career li:first-child { border-top: 0; }
.sys-career { border-bottom: 0; }
.sys-quotes { grid-template-columns: minmax(0, 1fr); }
.sys-quotes li { border-top: 0; padding-top: 0; }
/* Samples narrower than their panel sit in its middle, text still ranged left; the ones that
   fill the width (rows, stats, columns) are centred top to bottom instead */
.sys-quotes { max-width: 640px; justify-self: center; }
.sys-career { max-width: 520px; justify-self: center; } /* its widest on the homepage */
.sys-case-quote { padding: 0; }
.sys-cols { --cols: 2; }
/* Figure: a normal grey panel like its neighbours, the picture and caption in its middle; the
   picture's frame gets the border token so it shows on the grey */
.sys-demo > .fig { width: min(100%, 400px); justify-self: center; }
.sys-demo .sys-frame { border: 1px solid var(--color-border); }
.sys-video-bar { width: 100%; }

/* Accessibility */
.sys-row--a11y { align-items: start; }
.sys-rule { font: var(--type-body-m); font-weight: 500; color: var(--color-text); }

/* Phones: rows stack, numbers go under their names */
@media (max-width: 767px) {
  .sys-section { padding-block: var(--space-30); }
  .sys-row { grid-template-columns: minmax(0, 1fr); }
  .sys-ease__panel { grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-5); }
  .sys-curve { width: 96px; height: 96px; }
  .sys-value { text-align: left; }
    .sys-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sys-demo--wide { padding: var(--space-8) var(--space-5); }
  .sys-cols { --cols: 1; }
}

/* home.css resets h1–h3; this page also uses h4 (card names) and h5 (sample headings) */
:where(.sys-body) :is(h4, h5) { margin: 0; font-weight: 400; }
.sys-cols .diff { font-size: 1.17em; } /* an h3 on the project pages */
.sys-navlinks a { display: inline-block; color: var(--color-text); text-decoration: none; } /* a full 24px box, as in the top bar, so the fill and its line sit right */
.sys-demo > .career-co { justify-self: center; } /* the lone link in Links; inside a career row it stays with its role */
/* The Figure sample's placeholder picture, drawn in the tokens so it suits both themes */
.sys-picture { display: block; width: 100%; height: auto; }
.sys-picture__page { fill: var(--color-bg); stroke: var(--color-border); }
.sys-picture__ink { fill: var(--color-text); }
.sys-picture__muted { fill: var(--color-text-muted); opacity: .5; }
.sys-picture__card { fill: var(--color-bg-subtle); stroke: var(--color-border); }
/* Descriptions in rows stop at the project pages' paragraph width, however wide the row */
.sys-role { max-width: 560px; }
/* The easing curves sit in small grey panels, like the samples */
.sys-curve { box-sizing: border-box; padding: var(--space-3); border-radius: var(--radius-m); background: var(--color-bg-subtle); }
/* The theme and pause samples show their own state, whatever the page's theme or pause */
.sys-demo [data-sys-theme] .theme-icon { rotate: 0deg; }
.sys-demo [data-sys-theme].is-on .theme-icon { rotate: 180deg; }
.sys-demo [data-sys-pause] .motion-icon__pause { display: inline; }
.sys-demo [data-sys-pause] .motion-icon__play { display: none; }
.sys-demo [data-sys-pause][aria-pressed="true"] .motion-icon__pause { display: none; }
.sys-demo [data-sys-pause][aria-pressed="true"] .motion-icon__play { display: inline; }

/* Shape: a grey tile per corner size, its name, where it's used and its value (read live) */
.sys-shapes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-10) var(--space-6); }
.sys-shape { display: grid; gap: var(--space-1); align-content: start; }
.sys-shape__tile { height: 120px; margin-bottom: var(--space-3); border: 1px solid var(--color-border); background: var(--color-bg-subtle); } /* the border token, so each corner reads */
.sys-shape .sys-value { justify-items: start; text-align: left; }
/* Durations: a hairline over each, like the rows */
.sys-durations .sys-shape { padding-top: var(--space-6); border-top: 1px solid var(--color-border); }

/* Icons: each icon bigger on a grey tile, with its name and where it's used */
.sys-icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-10) var(--space-6); }
.sys-icon { display: grid; gap: var(--space-1); align-content: start; }
.sys-icon__art {
  display: grid; place-items: center; height: 120px; margin-bottom: var(--space-3);
  border-radius: var(--radius-l); background: var(--color-bg-subtle); color: var(--color-text);
}
.sys-icon__art .line-icon, .sys-icon__art .motion-icon { width: 28px; height: 28px; }
.sys-icon__art .theme-icon { width: 28px; height: 28px; }
.sys-icon__name { font: var(--type-body-m); font-weight: 500; color: var(--color-text); } /* bold, like every small heading here */
.sys-subtitle { margin-top: var(--space-12); font: var(--type-body-m); font-weight: 500; color: var(--color-text); } /* bold: Plex Sans 500, the heaviest the site loads */
.sys-icon__art .skill-icon { width: 28px; height: 28px; } /* drawn at 20px, shown bigger like the rest */
@media (max-width: 1023px) {
  .sys-shapes, .sys-icons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Icons with two states show both: the usual one, then the other. These rules set each
   copy's state outright, so the page's own theme or pause doesn't change them. */
.sys-icon__art:has(.sys-icon__state) { grid-auto-flow: column; justify-content: center; gap: var(--space-8); }
.sys-icon__state { display: grid; place-items: center; }
.sys-icon__art .theme-icon { rotate: 0deg; }
.sys-icon__state--alt .theme-icon { rotate: 180deg; }
.sys-icon__art .motion-icon__pause { display: inline; }
.sys-icon__art .motion-icon__play { display: none; }
.sys-icon__state--alt .motion-icon__pause { display: none; }
.sys-icon__state--alt .motion-icon__play { display: inline; }
.sys-icon__state--alt .menu-btn__icon { rotate: 45deg; }
.sys-icon__state--alt .fold-icon__bar { rotate: 90deg; }
/* The Audio description dot and the tick list arrow aren't SVGs: these use the real rules
   from home.css and project.css, shown twice as big like the icons */
.sys-icon__art .vctl--toggle { display: inline-flex; scale: 2; }
.sys-icon__state--alt .vctl--toggle::before { background: currentColor; }
/* Dots: the sample as wide as the column, then the rules three to a row */
.sys-dots-sample { aspect-ratio: 1360 / 400; margin-bottom: var(--space-3); }
.sys-dot-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-10) var(--space-6); margin-top: var(--space-10); }
@media (max-width: 1023px) { .sys-dot-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .sys-dots-sample { aspect-ratio: 680 / 420; } .sys-dot-rules { grid-template-columns: minmax(0, 1fr); } }
.sys-tick-arrow { font: var(--type-body-m); color: var(--color-text); scale: 2; } /* the text colour like every tile here; muted on project pages */
/* A wide panel that stacks (Links) keeps everything centred, at every width */
.sys-demo--stack.sys-demo--wide { justify-items: center; }
.sys-demo--stack .sys-inline { justify-self: center; text-align: center; }
/* A company link outside a career row: its stretched click area (home.css) stays on the link
   itself, not over the page. Every sample panel also holds anything positioned inside it. */
.sys-demo { position: relative; }
.sys-demo > .career-co { position: relative; }
/* The section lines run the full width; clip them at the page edge so nothing scrolls
   sideways */
.sys { overflow-x: clip; }
/* Let's talk gets the same full-width line above it as the homepage's Contact */
.system .case-cta { border-top: 1px solid var(--color-border); }

/* Hero picture: the system's parts in the homepage's dots (a dotTile canvas, js/dots.js and
   system.js), in the project heroes' shape: 1360 by 635, then 680 by 560 on phones. */
.sys-mosaic { aspect-ratio: 1360 / 635; }
@media (max-width: 767px) {
  .sys-mosaic { aspect-ratio: 680 / 560; }
}

/* Spacing: one ruler in four bands. Every step is a bar of its real height standing on a
   shared line, its number and value under it; under each band, a hairline and what that
   range is for. The key comes first in the markup, so it's read before its steps. Bands
   share rows (subgrid), so every bar stands on the same line even when a key wraps. */
.sys-ruler {
  display: grid; grid-template-columns: 3fr 4fr 4fr 5fr; column-gap: var(--space-6); row-gap: var(--space-10);
}
.sys-band { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: var(--space-4); min-width: 0; }
.sys-band__steps { grid-row: 1; display: grid; grid-template-columns: repeat(var(--steps), minmax(0, 1fr)); gap: var(--space-2); align-items: end; }
.sys-band__key { grid-row: 2; display: grid; align-content: start; gap: var(--space-1); padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.sys-step { display: grid; justify-items: center; gap: 2px; min-width: 0; text-align: center; }
.sys-step__bar {
  width: 100%; max-width: var(--space-6); margin-bottom: var(--space-2); border-radius: var(--radius-xs);
  background: var(--color-text-muted); transform-origin: bottom;
  transition: scale var(--duration-xl) var(--ease);
}
/* Until the ruler comes into view the bars lie flat; then they grow as their values count up
   (system.js). Only with motion on: otherwise they're simply there. */
.sys-ruler.is-waiting .sys-step__bar { scale: 1 0; }
.sys-step .sys-value { justify-items: center; text-align: center; }
@media (max-width: 1023px) { .sys-ruler { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .sys-ruler { grid-template-columns: minmax(0, 1fr); } }
/* --ease-pop overshoots its end, so its track runs on past the end in the muted colour:
   the stretch the dot pops into before settling back */
.sys-ease__panel[data-ease-panel="--ease-pop"] .sys-track::after {
  content: ""; position: absolute; left: 100%; bottom: -1px; width: 12%;
  border-bottom: 1px solid var(--color-text-muted);
}

/* Let's talk's boy (the homepage hero's): as tall as the project pages' closing drawings
   (Debug's crowd 159px, Plusnet's man 238px), not the hero's 92px */
.case-art .hero-doodle.person { width: calc(200px * 44 / 92); height: 200px; }

/* Foundations: one section, with Colour, Type and the rest as sub-sections inside it. They
   break with space rather than the full-width line, and take the next size of title down. */
.sys-sub { display: grid; gap: var(--space-4); min-width: 0; scroll-margin-top: var(--space-24); }
.sys-sub + .sys-sub { margin-top: var(--space-35); } /* 140px, the homepage's gap between sections */
.sys-sub > .sys-title { margin-bottom: var(--space-2); font: var(--type-display-s); letter-spacing: var(--type-display-s-tracking); }
@media (max-width: 767px) { .sys-sub + .sys-sub { margin-top: var(--space-24); } }

/* The Section strip sample: the page's own strip, held narrow in its panel so it scrolls,
   with its fades in the panel's grey */
.sys-strip {
  --strip-bg: var(--color-bg-subtle);
  position: relative; top: auto; left: auto; right: auto; z-index: auto; isolation: isolate;
  width: min(100%, 320px); justify-self: center;
  padding-block: 0; background: var(--strip-bg);
}
.sys-strip ul { scroll-padding-inline: var(--space-10); }
.sys-demo:has(> .sys-strip) { grid-template-columns: minmax(0, 1fr); } /* else the column grows to every link and the strip slides right on phones */
/* Ends as wide as the gap outside each chevron, so the links sit centred in the panel */
.sys-strip li:first-child { padding-left: var(--space-4); }
.sys-strip li:last-child { padding-right: var(--space-4); }

/* Patterns: outlines with each part named, on the grey panel. Parts are page-colour boxes
   with the border token; rows split their width evenly. */
.sys-anatomy {
  display: grid; gap: var(--space-2); width: min(100%, 640px); justify-self: center; align-content: start;
  font: var(--type-body-s); color: var(--color-text-muted);
}
.sys-anatomy .sys-anatomy { width: 100%; }
.sys-anatomy__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--space-2); }
.sys-anatomy__row--split { grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); }
.sys-anatomy__row--start { justify-content: start; grid-auto-columns: max-content; }
.sys-part {
  display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 32px;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border); border-radius: var(--radius-s);
  background: var(--color-bg); text-align: center; overflow-wrap: anywhere;
}
.sys-part--start { justify-content: flex-start; text-align: left; }
.sys-part--end { justify-content: flex-end; text-align: right; }
.sys-part--short { justify-self: start; }
.sys-part--title { min-height: 56px; color: var(--color-text); }
.sys-part--page { min-height: 120px; }
.sys-part--picture { min-height: 160px; }
.sys-part--drawing { justify-self: center; width: 96px; min-height: 120px; margin-top: var(--space-4); }
@media (max-width: 767px) {
  .sys-anatomy__row--split { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .sys-part--picture { min-height: 120px; }
}

/* Section heads: like a small page hero. The label, the title in the page hero's size
   (Display XL, so it stands well above Colour, Type and the rest) and the lede, with the
   section's own picture in the hero's dots beside them (system.js); stacked under 1024px. */
.sys-head { display: grid; gap: var(--space-12); align-items: center; margin-bottom: var(--space-24); } /* 112px to what follows, with the section's gap */
.sys-head__text { display: grid; gap: var(--space-4); align-content: center; }
.sys-head__text .label + .sys-title { margin-top: calc(-1 * var(--space-2)); }
.sys-head .sys-title { margin-bottom: var(--space-2); font: var(--type-display-xl); letter-spacing: var(--type-display-xl-tracking); }
.sys-head .sys-lede { margin-bottom: 0; }
.sys-head__art { aspect-ratio: 4 / 3; }
@media (min-width: 1024px) {
  .sys-head { grid-template-columns: minmax(0, 520px) minmax(0, 640px); justify-content: space-between; }
}
@media (max-width: 1023px) {
  .sys-head__art { width: min(100%, 640px); }
}
@media (max-width: 767px) {
  .sys-head { gap: var(--space-8); margin-bottom: var(--space-16); }
  .sys-head__art { width: 100%; aspect-ratio: 680 / 420; }
}
/* Cards side by side: the sample panels in a row are the same height (the taller one's),
   each sample in its panel's middle. Patterns go further: all four panels one size. */
@media (min-width: 1024px) {
  /* Each card's name, panel and note share the row's lines (subgrid), so a longer note
     never shortens its panel */
  .sys-card { grid-row: span 3; grid-template-rows: subgrid; row-gap: var(--space-3); }
  .sys-demo { align-content: center; }
  #patterns .sys-cards { grid-auto-rows: 1fr; }
  #patterns .sys-card { grid-row: auto; grid-template-rows: auto 1fr auto; }
}
/* Accessibility on desktop: the rules in two columns */
@media (min-width: 1024px) {
  .sys-rows--two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-16); }
}
