/* Spergel Health AI · light clinical system: white and cool greys, deep navy ink, one navy for actions, one teal for links.
 * Geist throughout (self-hosted, OFL), sentence-case heads. Real product captures and the founder's own colour portraits.
 * The category standard for health-tech company sites, played straight (owner's choice, 2026-11-15). */
:root {
  color-scheme: light;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.1875rem; --text-xl: 1.375rem;
  --text-hero: clamp(2.5rem, 2.6vw + 1.6rem, 4rem);
  --text-display: clamp(2.25rem, 2.2vw + 1.4rem, 3.5rem);
  --text-section: clamp(1.875rem, 1.4vw + 1.25rem, 2.75rem);
  --text-title: clamp(1.25rem, 0.5vw + 1rem, 1.5rem);
  --text-lead: clamp(1.125rem, 0.3vw + 1rem, 1.3125rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 200ms; --dur-long: 420ms;
  --container: 1280px; --gutter: 48px; --gap-columns: 32px; --section-gap-s: 88px; --section-gap: 120px; --section-gap-l: 144px;
  --z-raised: 10; --z-sticky-nav: 300; --z-modal: 400;

  /* ground and ink: clinical white and greys, deep navy text */
  --color-paper: #ffffff;
  --color-paper-2: #f4f6f9;
  --color-paper-3: #e9eef4;
  --color-ink: #0c1e36;
  --color-ink-2: #3a4a61;
  --color-muted: #5a6678;
  --color-rule: #e2e7ee;
  --color-rule-2: #c8d1dd;

  /* brand: one navy for actions, one teal for links and small highlights */
  --color-brand: #143a64;
  --color-brand-hover: #0d2b4b;
  --color-brand-ink: #ffffff;
  --color-accent: #0e6a73;
  --color-accent-soft: #e3f1f2;
  --color-live: #177245;
  --color-focus: #2563a6;

  /* the night band: principles and footer */
  --color-night: #0c1e36;
  --color-night-2: #132a49;
  --color-night-rule: #24395a;
  --color-night-ink: #f2f5f9;
  --color-night-ink-2: #b9c5d5;

  --font-body: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-display: var(--font-body);
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --display-weight: 600;
  --tracking-display: -0.028em;

  --radius-sm: 6px; --radius-btn: 8px; --radius-card: 14px; --radius-pill: 999px; --rule-hair: 1px;
  --shadow-sm: 0 1px 2px rgb(12 30 54 / 0.06), 0 1px 1px rgb(12 30 54 / 0.04);
  --shadow-shot: 0 1px 2px rgb(12 30 54 / 0.06), 0 12px 24px -8px rgb(12 30 54 / 0.12), 0 32px 64px -24px rgb(12 30 54 / 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-rule-2) var(--color-paper); scroll-padding-top: calc(var(--nav-height, 72px) + var(--space-lg)); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; caret-color: var(--color-accent); font-variant-numeric: tabular-nums; }
::selection { background: color-mix(in oklab, var(--color-focus) 22%, transparent); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-synthesis: none; letter-spacing: var(--tracking-display); line-height: 1.1; overflow-wrap: break-word; min-width: 0; text-wrap: balance; color: var(--color-ink); }
h1 { max-width: 22ch; font-size: var(--text-display); line-height: 1.06; }
h2 { max-width: 30ch; font-size: var(--text-section); }
h3 { max-width: 40ch; font-size: var(--text-title); line-height: 1.25; letter-spacing: -0.016em; }
p { margin: 0; text-wrap: pretty; }
p:not([class]) { max-width: 68ch; }
img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 60rem) { :root { --gutter: 24px; --section-gap-s: 64px; --section-gap: 88px; --section-gap-l: 104px; } }
@media (max-width: 40rem) { :root { --gutter: 16px; --section-gap-s: 56px; --section-gap: 72px; --section-gap-l: 88px; --gap-columns: 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }


@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root { --nav-height: 72px; }

main:focus { outline: none; }
.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon .fill { fill: currentColor; stroke: none; }
.lead { font-size: var(--text-lead); line-height: 1.55; color: var(--color-ink-2); max-width: 54ch; }

.skip { position: absolute; left: var(--space-md); top: var(--space-md); z-index: var(--z-modal); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-btn); background: var(--color-brand); color: var(--color-brand-ink); font-weight: 500; text-decoration: none; transform: translateY(-200%); }
.skip:focus-visible { transform: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border: 0; border-radius: var(--radius-btn); background: var(--color-brand); color: var(--color-brand-ink); font: 550 var(--text-md)/1 var(--font-body); letter-spacing: -0.005em; white-space: nowrap; text-decoration: none; cursor: pointer; box-shadow: var(--shadow-sm); transition: background-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-brand-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--quiet { background: var(--color-paper); color: var(--color-ink); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2), var(--shadow-sm); }
.btn--quiet:hover { background: var(--color-paper-2); }
.btn--quiet .icon { color: var(--color-muted); transition: transform var(--dur-short) var(--ease-out); }
.btn--quiet:hover .icon:last-child { transform: translateX(2px); }
.btn--small { min-height: 40px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.btn--big { min-height: 52px; padding: 0 var(--space-lg); font-size: var(--text-lg); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

.textlink { display: inline-flex; align-items: center; gap: var(--space-2xs); color: var(--color-accent); font-weight: 550; text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--color-accent) 35%, transparent); text-decoration-thickness: 1px; text-underline-offset: 0.25em; transition: text-decoration-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.textlink:hover { color: var(--color-brand); text-decoration-color: currentColor; }
.textlink .icon { width: 16px; height: 16px; transition: transform var(--dur-short) var(--ease-out); }
.textlink:hover .icon { transform: translateX(2px); }
.textlink--big { font-size: var(--text-lg); }

/* status readouts: the glyph's shape carries the meaning, the colour only helps */
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 10px 4px 8px; border-radius: var(--radius-pill); background: var(--color-paper); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2); color: var(--color-ink-2); font: 500 var(--text-xs)/1.2 var(--font-body); white-space: nowrap; }
.status__glyph { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.status__glyph .fill { fill: currentColor; stroke: none; }
.status__note { padding-left: 6px; border-left: var(--rule-hair) solid var(--color-rule-2); color: var(--color-muted); font-weight: 400; }
.status--live { background: #eaf6ef; box-shadow: inset 0 0 0 var(--rule-hair) #b9dcc7; color: var(--color-live); }
.status--beta { background: var(--color-accent-soft); box-shadow: inset 0 0 0 var(--rule-hair) #b7dadd; color: var(--color-accent); }
.status--dev { color: var(--color-brand); }
.status--retiring, .status--moved, .status--offline, .status--discontinued, .status--lab { color: var(--color-muted); }

/* ---------- nav ---------- */
.slab { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: color-mix(in oklab, var(--color-paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: var(--rule-hair) solid var(--color-rule); }
.slab__row { display: flex; align-items: center; gap: var(--space-xl); min-height: var(--nav-height); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--color-ink); font: 650 1.125rem/1 var(--font-body); letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.mark { width: 30px; height: 30px; flex-shrink: 0; }
.mainnav { margin-left: auto; }
.mainnav ul { display: flex; gap: var(--space-2xs); margin: 0; padding: 0; list-style: none; }
.mainnav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-sm); border-radius: var(--radius-btn); color: var(--color-ink-2); font-size: 0.9375rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.mainnav a:hover { color: var(--color-ink); background: var(--color-paper-2); }
.mainnav a[aria-current="page"] { color: var(--color-ink); box-shadow: inset 0 -2px 0 var(--color-brand); border-radius: 0; }
.slab__cta { flex-shrink: 0; }

/* ---------- sections ---------- */
.section { padding-block: var(--section-gap); }
.headblock { display: grid; gap: var(--space-md); margin-bottom: var(--space-2xl); max-width: 52rem; }
.headblock--split { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: end; column-gap: var(--gap-columns); max-width: none; }
.headblock--split .lead { justify-self: end; max-width: 46ch; }

/* ---------- hero ---------- */
.hero { padding-block: var(--space-3xl) var(--space-2xl); background: linear-gradient(180deg, var(--color-paper-2), var(--color-paper) 85%); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: center; gap: var(--space-3xl); }
.hero__copy { display: grid; gap: var(--space-lg); justify-items: start; }
.hero__title { max-width: 17ch; font-size: var(--text-hero); line-height: 1.04; letter-spacing: -0.034em; }
.hero__lead { max-width: 50ch; }
.hero__copy .actions { margin-top: var(--space-xs); }
.hero__figure { position: relative; margin: 0; }
.portrait { display: block; }
.portrait img { width: 100%; height: auto; border-radius: var(--radius-card); background: var(--color-paper-3); box-shadow: var(--shadow-shot); }
.hero__portrait img { aspect-ratio: 4 / 5; max-height: calc(100dvh - var(--nav-height) - 7rem); object-fit: cover; object-position: 50% 20%; }
.hero__card { position: absolute; left: var(--space-md); bottom: var(--space-md); display: grid; gap: 2px; padding: var(--space-sm) var(--space-md); border-radius: 10px; background: color-mix(in oklab, var(--color-paper) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); color: var(--color-muted); font-size: var(--text-sm); line-height: 1.35; }
.hero__name { color: var(--color-ink); font-weight: 600; font-size: var(--text-md); }

/* ---------- credentials strip ---------- */
.strip { border-block: var(--rule-hair) solid var(--color-rule); }
.strip__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.strip__list li { display: grid; gap: var(--space-2xs); align-content: start; padding: var(--space-lg) var(--space-lg) var(--space-lg) 0; }
.strip__list li + li { padding-left: var(--space-lg); border-left: var(--rule-hair) solid var(--color-rule); }
.strip__term { color: var(--color-muted); font-size: var(--text-xs); font-weight: 500; }
.strip__value { color: var(--color-ink); font-weight: 550; line-height: 1.35; }
.strip__line { display: block; }
.strip__line + .strip__line { margin-top: var(--space-2xs); padding-top: var(--space-2xs); border-top: var(--rule-hair) solid var(--color-rule); }

/* ---------- product captures ---------- */
.shot { margin: 0; display: grid; gap: var(--space-sm); }
.shot__frame { display: grid; place-items: center; padding: var(--space-xl); border-radius: var(--radius-card); background: var(--color-paper-2); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule); }
.shot__frame picture { display: block; width: 100%; }
.shot__frame img { width: 100%; height: auto; margin-inline: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow-shot); }
.shot__caption { color: var(--color-muted); font-size: var(--text-sm); }
/* a whole app window: no well, the window is the picture */
.shot--app .shot__frame { padding: 0; background: none; box-shadow: none; }
.shot--app .shot__frame img { border-radius: 10px; box-shadow: 0 0 0 var(--rule-hair) var(--color-rule-2), var(--shadow-shot); }
[data-slot="redact-local"] img { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
[data-slot="arcminute"] { padding: 0; background: #0b0f1d; }
[data-slot="arcminute"] img { border-radius: 0; box-shadow: none; }

/* ---------- galleries: a scroll-snap carousel of captures ---------- */
.gallery { margin: 0; display: grid; gap: var(--space-sm); min-width: 0; }
.gallery__track { display: flex; gap: var(--space-md); margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: var(--radius-card); }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.gallery__slide { flex: 0 0 100%; display: flex; scroll-snap-align: center; min-width: 0; }
.gallery__frame { flex: 1; display: grid; place-items: center; padding: var(--space-xl); border-radius: var(--radius-card); background: var(--color-paper-2); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule); }
.gallery__frame picture { display: contents; }
.gallery__frame img { max-width: 100%; max-height: 72vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 0 0 var(--rule-hair) var(--color-rule-2), var(--shadow-shot); }
.gallery--dark .gallery__frame { background: #090b14; box-shadow: none; }
.gallery--dark .gallery__frame img { box-shadow: none; border-radius: 4px; }

/* ---------- product video ---------- */
.pvideo { margin: var(--space-lg) 0 0; display: grid; gap: var(--space-sm); min-width: 0; }
.pvideo__media { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius-card); background: #090b14; }
.pvideo__caption { color: var(--color-muted); font-size: var(--text-sm); }

/* ---------- product loop (short silent film) ---------- */
.pfilm { margin: var(--space-lg) 0 0; display: grid; gap: var(--space-sm); min-width: 0; }
.pfilm__frame { display: grid; place-items: center; padding: var(--space-lg); border-radius: var(--radius-card); background: #1f2326; /* the film's own backdrop, so it reads as one picture */ }
.pfilm__media { display: block; height: min(70vh, 640px); width: auto; max-width: 100%; aspect-ratio: 720 / 880; border-radius: 6px; }
.pfilm__caption { color: var(--color-muted); font-size: var(--text-sm); }
.gallery__bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-sm); }
.gallery__caption { color: var(--color-muted); font-size: var(--text-sm); }
.gallery__count { color: var(--color-muted); font-size: var(--text-xs); font-weight: 500; white-space: nowrap; }
.gallery__btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: var(--color-paper); color: var(--color-ink); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2), var(--shadow-sm); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.gallery__btn:hover { background: var(--color-paper-2); }
.gallery__btn:disabled { opacity: 0.4; cursor: default; }
.gallery__btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.gallery__btn[data-dir="-1"] { order: 0; }
.gallery__caption { order: 1; }
.gallery__count { order: 2; }
.gallery__btn[data-dir="1"] { order: 3; }

/* ---------- CertaCase showcase ---------- */
.showcase { background: var(--color-paper-2); border-bottom: var(--rule-hair) solid var(--color-rule); }
.showcase__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-lg) var(--space-3xl); margin-bottom: var(--space-2xl); }
.showcase__intro { display: grid; gap: var(--space-md); align-content: start; }
.showcase__name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); }
.showcase__name h2 { font-size: var(--text-display); }
.showcase__tagline { color: var(--color-ink); font-size: var(--text-xl); line-height: 1.4; font-weight: 500; letter-spacing: -0.012em; max-width: 30ch; }
.showcase__body { display: grid; gap: var(--space-md); justify-items: start; color: var(--color-ink-2); padding-top: var(--space-xs); }
.points { display: grid; gap: var(--space-sm); margin: 0; padding: 0; list-style: none; color: var(--color-ink-2); max-width: 62ch; }
.points li { display: grid; grid-template-columns: 22px minmax(0, 1fr); }
.points li::before { content: ""; width: 7px; height: 7px; margin-top: 0.62em; border-radius: 2px; background: var(--color-accent); }
.caveat { color: var(--color-muted); font-size: var(--text-sm); max-width: 60ch; }

.views__tabs { display: inline-flex; flex-wrap: wrap; gap: var(--space-2xs); padding: var(--space-2xs); margin-bottom: var(--space-md); border-radius: 10px; background: var(--color-paper-3); }
.views__tab { min-height: 40px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-ink-2); font: 500 var(--text-sm)/1 var(--font-body); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.views__tab:hover { color: var(--color-ink); }
.views__tab[aria-selected="true"] { background: var(--color-paper); color: var(--color-ink); box-shadow: var(--shadow-sm); }
.views__tab:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.views__panel { display: grid; gap: var(--space-lg); }
.views__panel:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 6px; border-radius: 12px; }
.views__panel .shot__frame img { animation: rise var(--dur-long) var(--ease-out) both; }
@keyframes rise { from { opacity: 0.4; transform: translateY(8px); } }
.views__line { color: var(--color-ink-2); }
.views__note { margin-top: var(--space-md); color: var(--color-muted); font-size: var(--text-sm); }
.js .views__panel[hidden] { display: none !important; }

/* ---------- more from the studio: cards with real captures ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); }
.card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--radius-card); background: var(--color-paper); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule); transition: box-shadow var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.card:hover { box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2), var(--shadow-shot); }
.card__media .shot__frame { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; padding: 0; border-radius: 0; box-shadow: inset 0 -1px 0 var(--color-rule); }
.card__media .shot__frame picture { position: absolute; inset: var(--space-lg); width: auto; display: block; }
.card__media .shot__frame img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; box-shadow: none; filter: drop-shadow(0 1px 1px rgb(12 30 54 / 0.08)) drop-shadow(0 8px 16px rgb(12 30 54 / 0.14)); }
.card__media [data-slot="arcminute"] { background: var(--color-paper-2); }
.card__body { display: grid; gap: var(--space-sm); align-content: start; padding: var(--space-lg); }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); }
.card__name { font-size: var(--text-title); }
.card__name a { color: var(--color-ink); text-decoration: none; }
.card__name a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card__name a:hover { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.card__line { color: var(--color-ink-2); }
.card__links { position: relative; z-index: var(--z-raised); margin-top: var(--space-2xs); }
.card:has(.card__name a:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.card__name a:focus-visible { outline: none; }

/* ---------- the night band: how the work is done ---------- */
.night { background: var(--color-night); color: var(--color-night-ink); }
.night h2, .night h3 { color: var(--color-night-ink); }
.night .lead { color: var(--color-night-ink-2); }
.night .textlink { color: #8fd6dc; text-decoration-color: rgb(143 214 220 / 0.4); }
.night .textlink:hover { color: #ffffff; }
.night :focus-visible { outline-color: #8fd6dc; }
.rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-columns); }
.rule { display: grid; gap: var(--space-sm); align-content: start; padding-top: var(--space-lg); border-top: 2px solid var(--color-night-rule); }
.rule:first-child { border-top-color: #8fd6dc; }
.rule__claim { font-size: var(--text-title); line-height: 1.25; max-width: 16ch; }
.rule__proof { color: var(--color-night-ink-2); font-size: var(--text-md); line-height: 1.6; }

/* ---------- every product: the ledger ---------- */
.ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xl) var(--space-xl); }
.ledger__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); padding-bottom: var(--space-sm); border-bottom: 2px solid var(--color-ink); }
.ledger__name { font-size: var(--text-lg); letter-spacing: -0.014em; }
.ledger__head a { color: var(--color-ink); text-decoration: none; }
.ledger__head a:hover { color: var(--color-accent); }
.ledger__count { color: var(--color-muted); font: 500 var(--text-xs)/1 var(--font-body); }
.ledger__list { display: grid; margin: 0; padding: 0; list-style: none; }
.ledger__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: 52px; padding-block: var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-rule); }
.ledger__row a { color: var(--color-ink); font-weight: 500; text-decoration: none; }
.ledger__row a:hover { color: var(--color-accent); text-decoration: underline; text-underline-offset: 0.25em; }

/* ---------- founder and facts ---------- */
.founder { background: var(--color-paper-2); }
.founder__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); align-items: center; }
.founder__figure { margin: 0; }
.founder__figure .portrait img { aspect-ratio: 4 / 5; object-fit: cover; }
.founder__copy .plate { width: 100%; margin-block: var(--space-sm); }
.founder__copy { display: grid; gap: var(--space-md); justify-items: start; }
.founder__copy h2 { margin-bottom: var(--space-xs); }
.founder__copy > p { color: var(--color-ink-2); max-width: 62ch; }
.plate { display: grid; margin: 0; }
.plate__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--gap-columns); padding-block: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.plate__row:first-child { border-top: var(--rule-hair) solid var(--color-rule-2); }
.plate dt { color: var(--color-muted); font-size: var(--text-sm); padding-top: 2px; }
.plate dd { margin: 0; color: var(--color-ink); font-weight: 500; line-height: 1.45; }

/* ---------- the close ---------- */
.close { padding-block: var(--section-gap-s); }
.close__panel { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-xl) var(--gap-columns); align-items: center; padding: var(--space-3xl) var(--space-2xl); border-radius: 20px; background: var(--color-brand); color: var(--color-brand-ink); }
.close__panel h2 { color: #ffffff; }
.close__panel .lead { color: #c9d6e6; }
.close__copy { display: grid; gap: var(--space-md); }
.close__note { color: #a9bbd1; font-size: var(--text-sm); }
.close__contact { display: grid; gap: var(--space-sm); justify-items: end; }
.close__panel .btn--big { background: #ffffff; color: var(--color-brand); }
.close__panel .btn--big:hover { background: #e9eff6; }
.close__panel .btn--onbrand { background: transparent; color: #ffffff; box-shadow: inset 0 0 0 var(--rule-hair) rgb(255 255 255 / 0.35); }
.close__panel .btn--onbrand:hover { background: rgb(255 255 255 / 0.08); }
.close__panel .btn--onbrand .icon { color: #ffffff; }
.close__panel :focus-visible { outline-color: #ffffff; }

/* ---------- footer ---------- */
.mast { padding-block: var(--space-3xl) var(--space-xl); background: var(--color-night); color: var(--color-night-ink-2); font-size: var(--text-sm); }
.mast a { color: var(--color-night-ink); }
.mast :focus-visible { outline-color: #8fd6dc; }
.mast__top { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: var(--space-xl) var(--gap-columns); padding-bottom: var(--space-2xl); border-bottom: var(--rule-hair) solid var(--color-night-rule); }
.mast__id { display: grid; gap: var(--space-sm); align-content: start; }
.mast__word a { display: inline-flex; align-items: center; gap: 10px; font: 650 1.25rem/1 var(--font-body); letter-spacing: -0.02em; text-decoration: none; }
.mast__word { margin-bottom: var(--space-xs); }
.mast__email { text-decoration: underline; text-decoration-color: rgb(242 245 249 / 0.35); text-underline-offset: 0.25em; }
.mast__email:hover { text-decoration-color: currentColor; }
.mast__head { margin-bottom: var(--space-sm); color: var(--color-night-ink); font-size: var(--text-sm); letter-spacing: 0; font-weight: 600; }
.mast__nav ul { display: grid; gap: var(--space-2xs); margin: 0; padding: 0; list-style: none; }
.mast__nav a { display: inline-flex; min-height: 32px; align-items: center; color: var(--color-night-ink-2); text-decoration: none; }
.mast__nav a:hover { color: #ffffff; }
.mast__fine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg) var(--gap-columns); padding-block: var(--space-xl); line-height: 1.55; }
.mast__fine strong { color: var(--color-night-ink); font-weight: 600; }
.mast__copy { color: var(--color-night-ink-2); }

/* ---------- inner pages ---------- */
.pagehead { padding-block: var(--space-3xl) var(--space-2xl); background: linear-gradient(180deg, var(--color-paper-2), var(--color-paper)); }
.pagehead__title { font-size: var(--text-display); margin-bottom: var(--space-md); }
.pagehead .lead { max-width: 56ch; }
.pagehead__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-2xl) var(--gap-columns); align-items: start; margin-bottom: var(--space-xl); }

.legend { display: grid; gap: var(--space-sm); margin: 0; }
.legend__item { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); align-items: center; gap: var(--space-md); }
.legend dd { margin: 0; color: var(--color-ink-2); font-size: var(--text-sm); }
.legend-wide { justify-self: end; width: 100%; max-width: 32rem; padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-paper); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule); }
@media (min-width: 64rem) { .legend-box { display: none; } }
@media (max-width: 63.99rem) { .legend-wide { display: none; } }
.legend-box { justify-self: start; width: 100%; max-width: 30rem; border-radius: var(--radius-card); background: var(--color-paper); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule); }
.legend-box summary { display: flex; align-items: center; min-height: 48px; padding: 0 var(--space-lg); color: var(--color-ink); font-weight: 550; cursor: pointer; border-radius: var(--radius-card); }
.legend-box summary:hover { background: var(--color-paper-2); }
.legend-box .legend { padding: var(--space-xs) var(--space-lg) var(--space-lg); }

.filters { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.chip { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 40px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-pill); background: var(--color-paper); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2); color: var(--color-ink-2); font: 500 0.9375rem/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.chip:hover { background: var(--color-paper-2); color: var(--color-ink); }
.chip:active { transform: translateY(1px); }
.chip:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.chip[aria-pressed="true"] { background: var(--color-brand); color: #ffffff; box-shadow: none; }
.chip__n { color: var(--color-muted); font: 500 var(--text-xs)/1 var(--font-body); }
.chip[aria-pressed="true"] .chip__n { color: #c9d6e6; }

.depts { padding-bottom: var(--section-gap-s); }
.dept { padding-top: var(--section-gap-s); }
.dept:first-child { padding-top: var(--space-2xl); }
.dept__head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr) minmax(0, 2fr); align-items: end; gap: var(--space-md) var(--gap-columns); padding-bottom: var(--space-lg); border-bottom: 2px solid var(--color-ink); }
.dept__name { font-size: var(--text-section); }
.dept__blurb { color: var(--color-ink-2); max-width: 44ch; }
.dept__count { justify-self: end; color: var(--color-muted); font-size: var(--text-sm); }
.product { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-xl) var(--space-3xl); padding-block: var(--space-2xl); border-bottom: var(--rule-hair) solid var(--color-rule); scroll-margin-top: calc(var(--nav-height) + var(--space-lg)); }
.product--shot { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
.product--gallery { grid-template-columns: minmax(0, 1fr); }
.product--gallery .product__main { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--space-3xl); }
.product--gallery .product__main > * { grid-column: 1; }
.product--gallery .product__main > .product__meta { grid-column: 2; grid-row: 1 / span 6; align-self: start; flex-direction: column; padding-top: var(--space-xs); }
.product__main { display: grid; gap: var(--space-md); justify-items: start; }
.product__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); }
.product__name { font-size: var(--text-title); max-width: none; }
.product__tagline { color: var(--color-ink); font-size: var(--text-lg); line-height: 1.45; font-weight: 500; max-width: 44ch; }
.product__text { color: var(--color-ink-2); max-width: 64ch; }
.product__meta { display: flex; flex-wrap: wrap; gap: var(--space-md) var(--space-xl); margin: 0; align-content: start; }
.product__meta > div { display: grid; gap: var(--space-2xs); }
.product__meta dt { color: var(--color-muted); font-size: var(--text-xs); font-weight: 500; }
.product__meta dd { margin: 0; color: var(--color-ink-2); }
.product__nolink { color: var(--color-muted); }
.product__links, .repo__links { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-3xl); }
.product-grid .product { grid-template-columns: minmax(0, 1fr); }
.product:target { background: linear-gradient(90deg, var(--color-accent-soft), transparent 60%); padding-inline: var(--space-lg); border-radius: var(--radius-card); }
.labs { padding-block: var(--space-xl) 0; }
.labs__title { margin-bottom: var(--space-sm); color: var(--color-ink-2); font-size: var(--text-lg); }
.labs__list { display: grid; margin: 0; padding: 0; list-style: none; }
.dept--past .dept__name { color: var(--color-ink-2); }
.past__list .lab:first-child { border-top: 0; }
.past__list .lab__name { color: var(--color-ink-2); }
.lab { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr) auto; gap: var(--space-xs) var(--gap-columns); align-items: center; padding-block: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); scroll-margin-top: calc(var(--nav-height) + var(--space-lg)); }
.lab__name { font-weight: 600; }
.lab__line { color: var(--color-ink-2); font-size: var(--text-sm); max-width: 70ch; }

.repos { display: grid; padding-bottom: var(--space-2xl); }
.repo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-xl) var(--space-3xl); align-items: center; padding-block: var(--space-2xl); border-bottom: var(--rule-hair) solid var(--color-rule); }
.repo__main { display: grid; gap: var(--space-md); justify-items: start; }
.repo__path { color: var(--color-ink-2); font: 400 var(--text-sm)/1.4 var(--font-mono); }
.repo__facts dd.repo__path { color: var(--color-ink); }
.repo__owner { color: var(--color-muted); }
.repo__name { font-size: var(--text-section); max-width: none; }
.repo__name a { color: var(--color-ink); text-decoration: none; }
.repo__name a:hover { color: var(--color-accent); }
.repo__line { color: var(--color-ink-2); max-width: 48ch; }
.repo__facts { display: grid; gap: var(--space-sm); margin: 0; }
.repo__facts > div { display: grid; grid-template-columns: 6rem minmax(0, 1fr); align-items: center; gap: var(--space-md); }
.repo__facts dt { color: var(--color-muted); font-size: var(--text-sm); }
.repo__facts dd { margin: 0; color: var(--color-ink-2); }
.stack { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); margin: 0; padding: 0; list-style: none; }
.repo--soon .repo__main { grid-column: 1 / -1; }
.repos__all { padding-top: var(--space-xl); }

.about__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-3xl); align-items: center; }
.about__copy { display: grid; gap: var(--space-lg); justify-items: start; }
.about__title { margin-bottom: 0; }
.about__bio { color: var(--color-ink-2); max-width: 62ch; line-height: 1.7; }
.about__figure { margin: 0; }
.about__figure .portrait img { aspect-ratio: 4 / 5; object-fit: cover; }
.facts__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-xl) var(--space-3xl); align-items: start; }
.facts__copy { display: grid; gap: var(--space-lg); align-content: start; }
.facts__figure { margin: var(--space-sm) 0 0; }
.prose { display: grid; gap: var(--space-md); color: var(--color-ink-2); }
.prose p { max-width: 64ch; line-height: 1.7; }
.facts .plate dd { font-size: var(--text-md); }

.contact__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-2xl) var(--space-3xl); align-items: start; }
.contact__copy { display: grid; gap: var(--space-lg); justify-items: start; }
.contact__copy .pagehead__title { margin-bottom: 0; }
.contact__alt { color: var(--color-ink-2); }
.notice { padding: var(--space-md) var(--space-lg); border-radius: 10px; background: var(--color-paper); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2); color: var(--color-ink-2); font-size: var(--text-sm); max-width: 54ch; }
.topics { padding-top: var(--space-xs); }
.topics__title { margin-bottom: var(--space-md); font-size: var(--text-title); }
.topics__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; }
.lost__links { display: grid; margin: 0; padding: 0; list-style: none; border-top: var(--rule-hair) solid var(--color-rule); }
.topic { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); min-height: 56px; padding: var(--space-lg) var(--space-sm) var(--space-lg) 0; border-bottom: var(--rule-hair) solid var(--color-rule); color: var(--color-ink); text-decoration: none; transition: background-color var(--dur-short) var(--ease-out); }
.topic:hover { background: var(--color-paper-2); }
.topic .icon { color: var(--color-muted); transition: transform var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.topic:hover .icon { color: var(--color-accent); transform: translateX(3px); }
.topic__words { display: grid; gap: var(--space-2xs); }
.topic__name { font-weight: 600; font-size: var(--text-lg); letter-spacing: -0.012em; }
.topic__line { color: var(--color-ink-2); font-size: var(--text-sm); }
.lost { min-height: calc(70dvh - var(--nav-height)); }
.lost__links { max-width: 36rem; margin-top: var(--space-2xl); }
.lost .topic { justify-content: flex-start; }

/* ---------- narrower screens ---------- */
@media (max-width: 75rem) {
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-2xl); }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip__list li:nth-child(3) { padding-left: 0; border-left: 0; }
  .strip__list li:nth-child(n + 3) { border-top: var(--rule-hair) solid var(--color-rule); }
}
@media (max-width: 64rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 60rem) {
  .slab__row { flex-wrap: wrap; gap: 0 var(--space-md); padding-block: var(--space-xs); }
  .wordmark { flex: 1; }
  .mainnav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .mainnav ul { gap: 0; margin-left: calc(var(--space-sm) * -1); }
  .hero { padding-block: var(--space-2xl); }
  .hero__grid, .about__grid, .contact__grid, .founder__grid, .facts__grid, .pagehead__grid, .close__panel, .showcase__head { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .hero__figure, .about__figure, .founder__figure { max-width: 30rem; }
    .hero__figure, .about__figure,     .headblock--split { grid-template-columns: minmax(0, 1fr); }
  .headblock--split .lead { justify-self: start; }
  .product, .product--shot, .repo { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .product--gallery .product__main { grid-template-columns: minmax(0, 1fr); }
  .product--gallery .product__main > .product__meta { grid-column: 1; grid-row: auto; flex-direction: row; }
  .dept__head { grid-template-columns: minmax(0, 1fr); }
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .dept__count { justify-self: start; }
  .close__panel { padding: var(--space-2xl) var(--space-lg); }
  .close__contact { justify-items: start; }
  .mast__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mast__id { grid-column: 1 / -1; }
  .mast__fine { grid-template-columns: minmax(0, 1fr); }
  .topics__list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  .cards, .rules, .ledger, .strip__list { grid-template-columns: minmax(0, 1fr); }
  .strip__list li, .strip__list li + li { padding: var(--space-md) 0; border-left: 0; }
  .strip__list li + li { border-top: var(--rule-hair) solid var(--color-rule); }
  .shot__frame { padding: var(--space-md); }
  .legend__item { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
  .plate__row { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
  .lab { grid-template-columns: minmax(0, 1fr); }
  .lab .status { justify-self: start; }
  .slab__cta { min-height: 40px; }
  .btn--big { font-size: var(--text-md); padding-inline: var(--space-md); }
  .hero__card { left: var(--space-sm); bottom: var(--space-sm); }
  .views__tabs { display: flex; flex-wrap: wrap; }
  .gallery__frame { padding: var(--space-sm); }
  .views__tab { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .views__panel .shot__frame img { animation: none; }
  .gallery__track { scroll-behavior: auto; }
  .btn, .chip, .topic .icon, .textlink .icon, .card { transition: none; }
}
