/* Typefaces: Archivo (variable width and weight) and IBM Plex Mono, both under the SIL Open Font License,
   served from this site. Licence texts: /vendor/phl/fonts/OFL-*.txt */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(/vendor/phl/fonts/archivo-var-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(/vendor/phl/fonts/archivo-var-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/phl/fonts/ibm-plex-mono-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/phl/fonts/ibm-plex-mono-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/vendor/phl/fonts/ibm-plex-mono-500-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/vendor/phl/fonts/ibm-plex-mono-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* PH / LABS design system, prototype v0.1
   Near-black surfaces, one signal colour (the slash), neo-grotesk type with mono labels. */
:root {
  --ink-0: #08090a; --ink-1: #0d0f11; --ink-2: #14171a; --ink-3: #1d2125;
  --line: rgba(236, 239, 241, .10); --line-2: rgba(236, 239, 241, .24);
  --fg: #eceff1; --fg-2: #a9b0b7; --fg-3: #737b83;
  --signal: #ff3b2f;
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(18px, 4.2vw, 64px);
  --bar: 64px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink-0); color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ink-0); color: var(--fg); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
main { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--fg); color: var(--ink-0); padding: 10px 14px; font: 500 12px/1 var(--mono); }
.skip:focus { top: 12px; }
.mono { font: 500 11.5px/1.5 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--fg-3); }

/* top bar */
.bar { position: fixed; inset: 0 0 auto 0; height: var(--bar); z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); transition: background .3s; }
.bar::after { content: ""; position: absolute; inset: auto var(--gutter) 0 var(--gutter); height: 1px; background: var(--line); }
.bar.is-stuck { background: rgba(8, 9, 10, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.mark { display: inline-flex; align-items: baseline; gap: .4em; font: 700 17px/1 var(--sans); font-stretch: 112%; letter-spacing: .04em; text-decoration: none; color: var(--fg); }
.mark i { font-style: normal; color: var(--signal); display: inline-block; transform: skewX(-10deg) scaleY(1.15); }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); }
.nav a:not(.btn) { font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); text-decoration: none; padding: 10px 0; transition: color .2s; }
.nav a:not(.btn):hover { color: var(--fg); }
.nav a[aria-current="page"]:not(.btn) { color: var(--fg); box-shadow: inset 0 -1px 0 var(--signal); }
.menu { display: none; align-items: center; height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 2px; background: none; color: var(--fg); font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.menu[aria-expanded="true"] { border-color: var(--fg); }
.link { color: var(--fg); text-decoration: none; box-shadow: inset 0 -1px 0 var(--signal); white-space: nowrap; }
.link:hover { box-shadow: inset 0 -2px 0 var(--signal); }
.btn { display: inline-flex; align-items: center; gap: 12px; height: 44px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 2px; background: transparent; color: var(--fg); font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.btn:hover { border-color: var(--fg); }
.btn--solid { background: var(--fg); border-color: var(--fg); color: var(--ink-0); }
.btn--solid:hover { background: #fff; }
.btn--sm { height: 36px; padding: 0 14px; }
.btn .arr { width: 14px; height: 1px; background: currentColor; position: relative; }
.btn .arr::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }

/* hero */
.hero { position: relative; min-height: var(--shot-h, max(680px, 100svh)); display: grid; grid-template-rows: 1fr auto; isolation: isolate; }
.fig { position: absolute; inset: 0; z-index: -1; }
.fig canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.fig canvas { opacity: 0; transition: opacity .9s var(--ease); }          /* the figure fades in once it is drawn */
.fig[data-ready] canvas { opacity: 1; }
/* JavaScript off: each page carries a still of its figure in a noscript tag, right after the figure */
.fig-still { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.hero:has(> noscript img) > .fig { display: none; }
.hero:has(> noscript img) > noscript { display: contents; }   /* only when the browser really parsed the picture, i.e. scripts are off */

/* where the figure cannot run, app.js shows a still of it (fetched only in that case) */
.fig--still { background: center / cover no-repeat; }
.fig--still canvas { display: none; }
.hero__copy { align-self: center; padding: calc(var(--bar) + 20px) var(--gutter) 28px; max-width: 760px; }
.hero__copy .mono { margin: 0 0 clamp(20px, 3vh, 34px); }
.hero__copy .mono b { color: var(--signal); font-weight: 500; }
h1 { margin: 0 0 clamp(22px, 3.4vh, 36px); font: 620 clamp(42px, 6.3vw, 108px)/.93 var(--sans); font-stretch: 112%; letter-spacing: -.045em; }
h1 span { display: block; }
h1 .dim { color: var(--fg-3); }
.lede { margin: 0 0 clamp(24px, 3.6vh, 38px); max-width: 35ch; font-size: clamp(16px, 1.22vw, 19px); line-height: 1.5; color: var(--fg-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.legend { position: absolute; right: var(--gutter); bottom: 92px; width: min(560px, 46vw); text-align: right; }
.legend .mono { margin: 0 0 12px; }
.legend ol { display: flex; justify-content: flex-end; gap: 0; margin: 0 0 12px; padding: 0; list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.legend li { flex: 1 1 0; }
.legend li + li { border-left: 1px solid var(--line); }
.legend button { width: 100%; padding: 11px 6px 10px; background: none; border: 0; color: var(--fg-3); font: 500 10.5px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: color .2s, background .2s; }
.legend button b { display: block; font-weight: 500; color: var(--fg-3); }
.legend button:hover, .legend button[aria-pressed="true"] { color: var(--fg); background: rgba(236, 239, 241, .04); }
.legend button:hover b, .legend button[aria-pressed="true"] b { color: var(--signal); }
.legend p.note { margin: 0; min-height: 3em; font-size: 14px; line-height: 1.5; color: var(--fg-2); }

.proof { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 var(--gutter); padding: 0; list-style: none; border-top: 1px solid var(--line); }
.proof li { display: flex; gap: 14px; padding: 18px 24px 22px 0; font-size: 14px; line-height: 1.45; color: var(--fg-2); }
.proof li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.proof b { flex: none; font: 500 11px/1.9 var(--mono); letter-spacing: .1em; color: var(--fg-3); }

/* sections */
.sec { padding: clamp(72px, 10vw, 160px) var(--gutter); border-top: 1px solid var(--line); }
.sec__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: end; margin-bottom: clamp(40px, 6vw, 88px); }
.sec__head p { margin: 0; max-width: 46ch; color: var(--fg-2); font-size: clamp(16px, 1.2vw, 18px); }
h2 { margin: 16px 0 0; font: 620 clamp(29px, 4vw, 62px)/1.02 var(--sans); font-stretch: 112%; letter-spacing: -.04em; }
h3 { margin: 0; font: 620 clamp(26px, 2.6vw, 40px)/1.05 var(--sans); font-stretch: 112%; letter-spacing: -.036em; }
h4 { font-stretch: 106%; }

.case { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 72px); padding: clamp(32px, 4vw, 56px) 0; border-top: 1px solid var(--line); align-items: start; }
.case__text { position: sticky; top: calc(var(--bar) + 28px); }
.case__text p { color: var(--fg-2); max-width: 40ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 26px; padding: 0; list-style: none; }
.chips li { padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 2px; font: 500 10.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
.chips li.live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--signal); vertical-align: 1px; }
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 32px); align-items: start; }
.phones figure:nth-child(2) { margin-top: clamp(24px, 5vw, 80px); }
.phones figure:nth-child(3) { margin-top: clamp(48px, 10vw, 160px); }
figure { margin: 0; }
figcaption { margin-top: 12px; font: 400 11px/1.5 var(--mono); letter-spacing: .06em; color: var(--fg-3); }
.phone { aspect-ratio: 630 / 1368; padding: 2.4%; border-radius: 12.5% / 5.8%; background: linear-gradient(150deg, #2b2f34, #0c0d0f 55%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .09), 0 40px 80px -30px #000; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 10.8% / 5%; }
.browser { border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: var(--ink-2); box-shadow: 0 40px 80px -30px #000; }
.browser__bar { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--line); font: 400 11px/1 var(--mono); letter-spacing: .04em; color: var(--fg-3); }
.browser img { width: 100%; height: auto; }
.browser__bar::before { content: ""; width: 8px; height: 8px; border: 1px solid var(--fg-3); border-radius: 50%; }

.caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.caps li { padding: 28px 28px 36px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.caps h4 { margin: 18px 0 10px; font: 700 21px/1.15 var(--sans); letter-spacing: -.015em; }
.caps p { margin: 0; color: var(--fg-2); font-size: 15px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.steps li { padding: 28px 28px 8px 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps h4 { margin: 18px 0 10px; font: 700 21px/1.15 var(--sans); letter-spacing: -.015em; }
.steps p { margin: 0; color: var(--fg-2); font-size: 15px; max-width: 34ch; }
.close { text-align: left; }
.close h2 { max-width: 16ch; margin-bottom: 34px; }
.foot { padding: clamp(40px, 5vw, 72px) var(--gutter) 36px; border-top: 1px solid var(--line); }
.foot__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 24px; padding-bottom: clamp(32px, 4vw, 56px); }
.foot__nav { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.foot__nav a { font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); text-decoration: none; padding: 6px 0; }
.foot__nav a:hover { color: var(--fg); }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }

/* inner pages: a shorter first screen, same grammar */
.hero--page { min-height: var(--shot-h, max(600px, 86svh)); }
.hero--page h1 { font-size: clamp(40px, 5.2vw, 90px); }
.prose { max-width: 62ch; color: var(--fg-2); font-size: clamp(16px, 1.15vw, 18px); }
.prose p { margin: 0 0 1.1em; }
.prose strong { color: var(--fg); font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 9px; border: 1px solid var(--line-2); border-radius: 2px; font: 500 10.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
.status--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }

/* first screen: the headline rises line by line, the rest follows */
@keyframes phl-rise { from { opacity: 0; transform: translateY(.32em); } }
@keyframes phl-fade { from { opacity: 0; } }
.hero h1 span { animation: phl-rise .9s var(--ease) both; }
.hero h1 span:nth-child(2) { animation-delay: .07s; }
.hero h1 span:nth-child(3) { animation-delay: .14s; }
.hero h1 span:nth-child(4) { animation-delay: .21s; }
.hero__copy > .mono { animation: phl-fade .8s ease both; }
.hero__copy > :not(h1):not(.mono), .hero > .legend, .hero > .proof { animation: phl-fade .9s ease .35s both; }

/* sections arriving on scroll (class set by app.js only when motion is welcome) */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }

/* moving between pages: the next page arrives behind a slanted edge (the slash) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: phl-wipe .55s var(--ease) both; }
@keyframes phl-wipe { from { clip-path: polygon(0 0, 0 0, -24% 100%, -24% 100%); } to { clip-path: polygon(0 0, 124% 0, 100% 100%, -24% 100%); } }

/* narrow screens */
@media (max-width: 860px) {
  .menu { display: inline-flex; }
  .nav { position: fixed; inset: var(--bar) 0 0 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--gutter) 32px; background: var(--ink-0); overflow-y: auto; visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s; }
  .nav.is-open { visibility: visible; opacity: 1; }
  .nav a:not(.btn) { padding: 20px 0; border-bottom: 1px solid var(--line); font: 700 30px/1 var(--sans); letter-spacing: -.02em; text-transform: none; color: var(--fg); }
  .nav .btn { margin-top: 28px; height: 52px; justify-content: center; }
  .menu-open { overflow: hidden; }
  .hero { display: flex; flex-direction: column; min-height: 0; padding-top: calc(var(--bar) + 22px); }
  .hero__copy { display: contents; }
  .hero__copy > * { margin-left: var(--gutter); margin-right: var(--gutter); }
  .hero__copy .mono { order: 1; margin: 0 var(--gutter) 14px; }
  .hero__copy h1 { order: 2; margin-bottom: 4px; }
  .hero .fig-still { position: relative; inset: auto; z-index: 0; order: 3; height: 46svh; min-height: 300px; }
  .fig { position: relative; inset: auto; height: 46svh; min-height: 300px; z-index: 0; order: 3; }
  .legend { position: static; order: 4; width: auto; margin: 0 var(--gutter); text-align: left; }
  .legend ol { justify-content: stretch; }
  .legend button { padding: 10px 4px; font-size: 10px; letter-spacing: .05em; }
  .hero__copy .lede { order: 5; margin-top: 26px; }
  .hero__copy .cta { order: 6; margin-bottom: 34px; }
  .proof { order: 7; grid-template-columns: 1fr; }
  .proof li, .proof li + li { padding: 14px 0; border-left: 0; }
  .proof li + li { border-top: 1px solid var(--line); }
  .sec__head, .case { grid-template-columns: 1fr; }
  .case__text { position: static; }
  .caps { grid-template-columns: 1fr; }
  .steps, .split { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 22px 0 6px; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .legend ol { display: grid; grid-template-columns: repeat(3, 1fr); }
  .legend li + li { border-left: 0; }
  .legend li { border-right: 1px solid var(--line); }
  .legend li:nth-child(3n), .legend li:last-child { border-right: 0; }
  .legend li:nth-child(n+4) { border-top: 1px solid var(--line); }
  .phones { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  ::view-transition-new(root) { animation: none; }
}

/* picture mode: the figure alone, used to make the fallback poster */
.bare .bar, .bare .hero__copy, .bare .legend, .bare .proof { visibility: hidden; }

/* Factory revision 5 helper styles (only where the design had no class): the self-hosted video block
   of the capability pages. Status labels, pictures and sections use the design's existing classes. */
.video video { display: block; width: 100%; height: auto; background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 2px; }

/* Factory revision 9, fixes-round-c.md G2: on the capability pages whose figure is a row of sheets or gates
   (/retrieval, /engineering: the legend from the capability helper, .legend.flow) the legend is a full-width
   row below the figure above 860 px, the note line under it, never over the canvas. */
@media (min-width: 861px) {
  .hero--page:has(> .legend.flow) { display: grid; grid-template-columns: minmax(0, 1fr); }
  .hero--page:has(> .legend.flow) > .fig,
  .hero--page:has(> .legend.flow) > .fig-still,
  .hero--page:has(> .legend.flow) > .hero__copy { grid-area: 1 / 1; }
  .hero--page > .legend.flow { grid-area: 2 / 1; position: static; inset: auto; width: 100%; max-width: none; margin: 0; transform: none; }
  .hero--page > .legend.flow ol { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .hero--page > .legend.flow .note { margin-top: 12px; max-width: none; }
}

/* Factory revision 9, fixes-round-c.md G4: capability sections (rendered by the shared section helper with
   .sec--cap) use half the design's .sec vertical spacing, set once here; horizontal padding is unchanged. */
.sec--cap { padding-top: clamp(36px, 5vw, 80px); padding-bottom: clamp(36px, 5vw, 80px); }

/* Factory revision 13, fixes-round-e.md J7: a grid of bordered cells never ends with a single cell in its
   last row at 1200 px and above (four cells two by two; five as three and two, the last two sharing the
   full width; seven as four and three); up to 860 px one cell per row. */
@media (min-width: 1200px) {
  :is(.caps, .lab, .quad, .cells):has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(.caps, .lab, .quad, .cells):has(> :nth-child(5):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  :is(.caps, .lab, .quad, .cells):has(> :nth-child(5):last-child) > * { grid-column: span 2; }
  :is(.caps, .lab, .quad, .cells):has(> :nth-child(5):last-child) > :nth-child(n+4) { grid-column: span 3; }
  :is(.caps, .lab, .quad, .cells):has(> :nth-child(7):last-child) { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  :is(.caps, .lab, .quad, .cells):has(> :nth-child(7):last-child) > * { grid-column: span 3; }
  :is(.caps, .lab, .quad, .cells):has(> :nth-child(7):last-child) > :nth-child(n+5) { grid-column: span 4; }
}
@media (max-width: 860px) {
  :is(.caps, .lab, .quad, .cells) { grid-template-columns: minmax(0, 1fr); }
  :is(.caps, .lab, .quad, .cells) > * { grid-column: auto; }
}

/* Factory revision 13, additions-round-f.md K1/K2: inline SVG charts drawn by the page's PHP (figure.chart).
   Classes only; the security policy allows no style attribute. */
.chart { margin: 0 0 28px; max-width: 960px; }
.chart__svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__svg text { font-family: var(--mono); fill: var(--fg-2); }
/* Revision 14 (L3): two drawings of one chart. The wide one (text 13 units) shows from 620px of the figure's
   available width, the narrow one (text 11 units) below that; the switch is this rule on the figure's own width. */
.chart { container-type: inline-size; }
.chart__svg--wide text { font-size: 13px; }
.chart__svg--narrow text { font-size: 11px; }
.chart__svg--narrow { display: none; }
@container (max-width: 619.98px) {
  .chart__svg--wide { display: none; }
  .chart__svg--narrow { display: block; }
}
/* Revision 14 (L3): on Home and /work the chart stays inside the block's picture column, at most 720px wide. */
.case .chart, .page-home .chart, .page-work .chart { width: 100%; max-width: 720px; min-width: 0; }
.chart__grid line { stroke: var(--line); stroke-width: 1; }
.chart__axis line { stroke: var(--line-2); stroke-width: 1.5; }
.chart__model, .chart__keyline { fill: none; stroke: var(--fg, #ececec); stroke-width: 3; }
.chart__dot, .chart__keydot { fill: var(--fg, #ececec); }
.chart__open, .chart__keypub { fill: none; stroke: var(--signal); stroke-width: 3; }
.chart__pub text { fill: var(--signal); }
.chart figcaption { margin-top: 12px; max-width: 70ch; font-size: 14px; line-height: 1.5; color: var(--fg-2); }
/* Revision 14 (L2, fixes-round-f.md): up to 860px every table caption is a block as wide as its table's box,
   left aligned, in the mono face, above the table (the table box may be display: block on a phone). */
@media (max-width: 860px) {
  main :is(table, .ev-table, .sim-table) > caption { display: block; width: 100%; max-width: none; box-sizing: border-box; caption-side: top; text-align: left; font-family: var(--mono); }
  main .sim-table > caption { position: sticky; left: 0; }
}
/* Revision 14 (L5): a status label on a section label line is centred vertically on the line of text beside it. */
.sec__head :has(> .mono + .status) { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 6px; }
.sec__head .mono + .status { align-self: center; vertical-align: middle; margin-block: 0; }
/* Revision 14 (mayaclerk-2.md): the plaintiff and defence memos side by side from 900px under one caption; the
   progress card at no more than its own 604px; pictures that open at full size keep the frame look. */
.pair--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; margin-top: 0; }
@media (max-width: 899.98px) { .pair--even { grid-template-columns: 1fr; } }
.shot--card { max-width: 604px; }
.wide > a, .pair--even > a { display: block; color: inherit; text-decoration: none; }

/* M1 (revision 15): a framed picture is never shown wider than its natural width; the frame takes the picture's width and stands at the left of its column. */
.browser { width: fit-content; max-width: 100%; margin-left: 0; margin-right: auto; justify-self: start; }
.browser > .browser__bar, .browser > figcaption { contain: inline-size; }
.browser img { width: auto; max-width: 100%; height: auto; }

/* M2 (revision 15): pictures in pairs and rows from 900px, one per row below. */
.duo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.duo > figure { margin: 0; }
.duo > a, .duo > figure > a { display: block; color: inherit; text-decoration: none; }
.duo--links { gap: 0 32px; }
figcaption .full { display: block; width: fit-content; margin-top: 8px; color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) {
  .duo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .duo--claim { grid-template-columns: minmax(0, 1fr) minmax(0, 604px); }
}

/* M3 (revision 15): one style for a third-level heading in a section's own flow of text. */
main .sec > h3, main .sec > .prose > h3 { margin: 56px 0 16px; color: var(--fg); font: 620 clamp(22px, 1.6vw, 24px)/1.2 var(--sans); font-stretch: 100%; letter-spacing: -.02em; }

/* Revision 16 (N1): running text in a section stands in the prose block (max-width 62ch, within the 68-character measure), 32px below what precedes it. */
main .sec .prose--flow { max-width: 62ch; margin-top: 32px; }
main .sec .prose--flow p:last-child { margin-bottom: 0; }
/* Revision 16 (N3): at least 40px between a caption (or a pair's last caption or link) and the block after it. */
main figure:has(> figcaption):not(.duo > figure), main .duo:has(figcaption) { margin-bottom: 40px; }
/* Revision 20 (P1): the space under a picture block's last caption or 'Open at full size' link is padding inside the figure, so no margin of the block after it can collapse or shorten it; a row counts from its lowest caption. */
main figure > figcaption:last-child { padding-bottom: 40px; }
/* Revision 20 (REQ-80): a linked picture without a frame (the row of portraits) is never shown wider than its natural width. */
main figure.pic > a { display: block; }
main figure.pic > a > img { width: auto; max-width: 100%; height: auto; }
/* Revision 21 (REQ-82): below 600px each picture of the Ryu row fills the text column, one under another, caption and link under it. */
@media (max-width: 599.98px) {
  main .trio.trio--ryu { grid-template-columns: 1fr; }
  main .trio.trio--ryu figure { display: block; }
  main .trio.trio--ryu figure.pic > a > img { width: 100%; max-width: 1024px; }
  main .trio.trio--ryu figcaption { margin-top: 16px; max-width: none; }
}
