/* Styles shared by the case studies and the style guide.
   Andada Pro (serif) carries names, headings and reading text; Inter carries
   small labels and metadata (both in fonts.css). Light mode only, white
   page, near-black ink. */

:root {
  /* Ink */
  --ink: #222;
  --ink-2: #666;       /* labels, secondary text */
  --ink-3: #888;       /* intro subline, quiet text */
  --ink-4: #999;       /* faintest text, placeholders */
  --rule: #e4e6e5;     /* hairlines */
  --page: #fff;

  /* Card tints, one per project on the index */
  --tint-sage: #e3ece7;
  --tint-sand: #f0e5db;
  --tint-sky: #e5edf4;
  --tint-lilac: #eeebf4;
  --tint-straw: #eeecd9;
  --tint-rose: #f4e4e2;

  /* Accent, from the Cytiva card mock */
  --green-ink: #2b523b;
  --green-mid: #9abcaa;
  --green-wash: #eff4f0;

  /* Accent, from the Clario slides */
  --plum-ink: #441440;
  --plum-mid: #a12a6f;
  --plum-wash: #f6eef3;

  /* The project's tint, used by the hero and figure frames. A case study
     sets these on <body> to match its index card; the defaults are Cytiva's. */
  --tint: var(--tint-sage);
  --tint-ink: #4d5a53;  /* labels on the tint */
  /* Accent for the part cards, part navigation and In short label; a case
     study sets these on <body> next to its tint. */
  --wash: var(--green-wash);
  --accent: var(--green-ink);
  /* The dark statement band; a case study can set these on <body> too. */
  --band-from: #2f5a42;
  --band-to: #1a2f23;
  --band-label: var(--green-mid);

  /* Type */
  --serif: "Andada Pro", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;

  /* Layout */
  --page-max: 1480px;
  --page-pad: 5vw;
  --measure: 680px;    /* reading column */
  --wide: 1080px;      /* figures that break out of the column */
  --radius: 16px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }
/* The sticky header's background is 100vw wide; keep it from adding a sideways scroll. */
body { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem/1.5 var(--serif);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg, video { display: block; max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }

/* ---------- Page frame (same as index) ---------- */

.page {
  max-width: var(--page-max);
  margin: auto;
  padding: 0 var(--page-pad);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
  font-size: 1rem;
  line-height: 1.5;
}
.site-header > a { display: inline-flex; align-items: center; gap: 10px; font-size: 1.125rem; font-weight: 500; letter-spacing: .01em; }
.site-header .head { width: auto; height: 36px; mix-blend-mode: multiply; }

/* Sticky variant: stays at the top, with a full-width white background.
   The background is a separate layer, not a huge clipped box-shadow:
   Safari can ignore that clip and paint the whole page white. */
.site-header.sticky {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 0;
}
.site-header.sticky::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  background: var(--page);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.sticky.scrolled::before { border-bottom-color: var(--rule); }
.site-header nav { display: flex; gap: 22px; }
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 2px;
}
.site-header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

.nowrap { white-space: nowrap; }

/* ---------- Small type ---------- */

.label {
  font: 400 .875rem/1.7 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: var(--ink-2);
}

/* ---------- Reading column ---------- */

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.65;
}
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.1em; }

.prose > .lede {
  font-size: clamp(1.25rem, 1.9vw, 1.5rem);
  line-height: 1.5;
}

.prose h2 {
  margin-top: 2.6em;
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -.005em;
}
.prose h3 {
  margin-top: 2.2em;
  font-size: 1.375rem;
  line-height: 1.35;
  font-weight: 500;
}
.prose h2 + *, .prose h3 + * { margin-top: .6em; }

.prose strong { font-weight: 700; color: #111; }
.prose em { font-style: italic; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }

.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--ink-4); }

.prose hr {
  margin: 4em auto;
  width: 48px;
  border: 0;
  border-top: 1px solid var(--ink-4);
}

/* Small label above a heading, e.g. "From finding 1" */
.prose .kicker { margin-top: 2.6em; }
.prose .kicker + h2, .prose .kicker + h3, .prose .kicker + .lede { margin-top: .3em; }
.prose > :first-child { margin-top: clamp(56px, 8vw, 104px); }

/* ---------- Part openers ----------
   Each part of a case study opens with a wide hairline, a large heading
   and the question the part answers. */

.prose .part-head {
  position: relative;
  margin-top: clamp(96px, 12vw, 152px);
  padding-top: clamp(28px, 4vw, 44px);
}
.prose .part-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(var(--wide), 100vw - 2 * var(--page-pad));
  transform: translateX(-50%);
  border-top: 1px solid var(--rule);
}
.part-head .label { color: var(--accent); }
.prose .part-head h2 {
  margin: 6px 0 0;
  font-size: clamp(2.25rem, 4.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.015em;
}
.prose .part-head .part-q {
  margin: 14px 0 0;
  font: italic 400 clamp(1.2rem, 1.8vw, 1.4rem)/1.45 var(--serif);
  color: var(--ink-2);
  text-wrap: balance;
}
.prose .part-head + * { margin-top: 1.6em; }
[id] { scroll-margin-top: 96px; }

/* ---------- Index of parts, for the overview ---------- */

.prose .parts {
  --w: min(var(--wide), 100vw - 2 * var(--page-pad));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 2.4em calc((100% - var(--w)) / 2) 0;
  padding: 0;
  list-style: none;
}
.prose .parts > li { margin: 0; }
.prose .part-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px 26px 24px;
  border-radius: var(--radius);
  background: var(--wash);
  text-decoration: none;
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.prose .part-card:hover { background: var(--tint); transform: translateY(-3px); }
.part-card .part-num { font: 400 .875rem/1.6 var(--sans); letter-spacing: .02em; color: var(--accent); }
.part-card .part-name { margin-top: 8px; font: 500 1.625rem/1.15 var(--serif); letter-spacing: -.01em; }
.part-card .part-q { margin-top: 10px; font: italic 400 1.2rem/1.4 var(--serif); color: var(--ink-2); }
.part-card .part-sum { margin-top: 18px; padding-top: 16px; border-top: 1px solid #2b523b24; font-size: 1rem; line-height: 1.55; }
.part-card .part-sum span { display: block; }
.part-card .part-sum span + span { margin-top: 10px; }
/* Small animated icon at the top of each card */
.part-icon { display: block; width: 64px; height: 64px; margin-bottom: 18px; }
.part-icon svg { width: 100%; height: 100%; overflow: visible; }
.part-icon * { transform-box: fill-box; }
@media (prefers-reduced-motion: no-preference) {
  .icon-matrix .note-a { animation: note-a 7s var(--ease) infinite; }
  .icon-matrix .note-b { animation: note-b 7s var(--ease) infinite; }
  .icon-matrix .note-c { animation: note-c 7s var(--ease) infinite; }
  @keyframes note-a { 0%, 22% { transform: none; } 30%, 72% { transform: translate(26px, 0); } 80%, 100% { transform: none; } }
  @keyframes note-b { 0%, 40% { transform: none; } 48%, 88% { transform: translate(-26px, -26px); } 96%, 100% { transform: none; } }
  @keyframes note-c { 0%, 8% { transform: none; } 16%, 56% { transform: translate(0, 26px); } 64%, 100% { transform: none; } }

  .icon-app .step { animation: step-on 6s linear infinite; }
  .icon-app .step:nth-of-type(2) { animation-delay: 1s; }
  .icon-app .step:nth-of-type(3) { animation-delay: 2s; }
  .icon-app .fill { transform-origin: left center; animation: bar-fill 6s var(--ease) infinite; }
  @keyframes step-on { 0%, 8% { fill: #d6dfda; } 14%, 80% { fill: var(--green-ink); } 90%, 100% { fill: #d6dfda; } }
  @keyframes bar-fill { 0%, 5% { transform: scaleX(.05); } 60%, 85% { transform: scaleX(1); } 95%, 100% { transform: scaleX(.05); } }

  .icon-kit .knob { animation: knob 4s var(--ease) infinite; }
  .icon-kit .track { animation: track 4s var(--ease) infinite; }
  .icon-kit .tick { stroke-dasharray: 14; animation: tick 4s var(--ease) infinite; }
  .icon-kit .dot { animation: dot 4s var(--ease) infinite; }
  .icon-kit .dot:nth-of-type(2) { animation-delay: .4s; }
  .icon-kit .dot:nth-of-type(3) { animation-delay: .8s; }
  @keyframes knob { 0%, 20% { transform: none; } 35%, 70% { transform: translateX(10px); } 85%, 100% { transform: none; } }
  @keyframes track { 0%, 20% { fill: #d6dfda; } 35%, 70% { fill: var(--green-ink); } 85%, 100% { fill: #d6dfda; } }
  @keyframes tick { 0%, 25% { stroke-dashoffset: 14; } 45%, 75% { stroke-dashoffset: 0; } 90%, 100% { stroke-dashoffset: 14; } }
  @keyframes dot { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.35); } 40% { transform: scale(1); } }
}
/* Clario's icons: comments land on a design, a tab moves across a
   documentation page, and a measurement syncs on a phone. */
@media (prefers-reduced-motion: no-preference) {
  .icon-review .bubble-a, .icon-review .bubble-b { animation: bubble 6s var(--ease) infinite; }
  .icon-review .bubble-a { transform-origin: left bottom; }
  .icon-review .bubble-b { transform-origin: right bottom; animation-delay: 1.2s; }
  @keyframes bubble { 0%, 6% { opacity: 0; transform: scale(.6); } 14%, 74% { opacity: 1; transform: none; } 84%, 100% { opacity: 0; transform: scale(.6); } }

  .icon-docs .tab { animation: tab 6s var(--ease) infinite; }
  @keyframes tab { 0%, 26% { transform: none; } 33%, 59% { transform: translateX(11px); } 66%, 92% { transform: translateX(22px); } 100% { transform: none; } }

  /* A measurement draws itself on the phone, then the result syncs. */
  .icon-product .pulse { stroke-dasharray: 60; animation: pulse 6s var(--ease) infinite; }
  .icon-product .synced { animation: synced 6s var(--ease) infinite; }
  @keyframes pulse { 0%, 10% { stroke-dashoffset: 60; } 40%, 80% { stroke-dashoffset: 0; } 90%, 100% { stroke-dashoffset: 60; } }
  @keyframes synced { 0%, 46% { opacity: 0; transform: scale(.6); } 54%, 80% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: scale(.6); } }
}
/* Side by side, the cards share rows so names, questions, summaries and results line up. */
@media (min-width: 901px) {
  .prose .parts { grid-template-rows: auto auto auto auto 1fr auto; row-gap: 0; }
  .prose .parts > li,
  .prose .part-card { display: grid; grid-row: span 6; grid-template-rows: subgrid; }
}

/* ---------- Groups: three short columns, e.g. who judged trust ---------- */

.prose .groups {
  --w: min(var(--wide), 100vw - 2 * var(--page-pad));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 40px;
  margin: 2em calc((100% - var(--w)) / 2) 2.4em;
  padding: 0;
  list-style: none;
}
.prose .groups > li { margin: 0; }
.prose .groups { padding: 28px 0; border-block: 1px solid var(--rule); }
.groups svg { display: block; width: 32px; height: 32px; margin-bottom: 14px; color: var(--accent); }
.groups b { display: block; font: 500 1.2rem/1.3 var(--serif); }
.groups .who { display: block; margin-top: 6px; font: 400 .875rem/1.55 var(--sans); color: var(--ink-2); }
.groups .ask { margin: 14px 0 0; font: 500 1.0625rem/1.45 var(--serif); }
.groups .ask .label { display: block; margin-bottom: 2px; color: var(--accent); }
.groups p { margin: 8px 0 0; font-size: 1rem; line-height: 1.55; }
/* Two columns, for four items or a pair */
.prose .groups.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 56px; }
@media (max-width: 900px) {
  .prose .groups { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 700px) { .prose .groups.two { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Contextual sidebar ----------
   Footnote-style notes. An underlined phrase in the text opens a panel on
   the right that holds all of a page's notes, scrolled to the one asked for. */

.note-ref {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  text-decoration: underline;
  text-decoration-color: var(--quote-mark, var(--green-mid));
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}
.note-ref:hover { text-decoration-color: var(--accent); }
.note-ref sup { margin-left: 2px; font: 500 .7em/0 var(--sans); color: var(--accent); }

.ctx-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #1c2a2233;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility 0s .3s;
}
.ctx-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(440px, 100vw);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 28px 48px;
  background: var(--page);
  box-shadow: -24px 0 60px -30px #1f3a2b59;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .4s var(--ease), visibility 0s .4s;
}
.ctx-open .ctx-scrim { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
.ctx-open .ctx-panel { transform: none; visibility: visible; transition: transform .4s var(--ease); }
.ctx-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 14px;
  background: var(--page);
  border-bottom: 1px solid var(--rule);
}
.ctx-close {
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  font: 400 1.5rem/1 var(--sans);
  color: var(--ink-2);
}
.ctx-close:hover { background: var(--wash); color: var(--ink); }
.ctx-note { padding: 26px 0 8px; scroll-margin-top: 80px; }
.ctx-note + .ctx-note { border-top: 1px solid var(--rule); }
.ctx-note h3 { display: flex; gap: 10px; margin: 0; font: 500 1.25rem/1.3 var(--serif); }
.ctx-note h3 span { font: 500 .875rem/1.9 var(--sans); color: var(--accent); }
.ctx-note h3:focus { outline: none; }
.ctx-note p { margin: 12px 0 0; font-size: 1rem; line-height: 1.6; }
.ctx-note.current h3 { color: var(--accent); }

/* Chromatography example, used inside a note */
.separation { position: relative; margin: 20px 0 0; padding: 16px 0 8px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; align-items: center; }
.separation .column-anim { width: 100%; height: auto; }
.separation .chrom { width: 100%; height: auto; overflow: visible; }
.separation .chrom text { font: 400 11px var(--sans); fill: var(--ink-2); }
.separation .reveal { transform-box: view-box; transform-origin: 20px 0; }
.separation .red-fill, .separation .blue-fill { transform-box: fill-box; transform-origin: center bottom; }
.separation ul { display: flex; gap: 14px; margin: 8px 0 0; padding: 0; list-style: none; font: 400 .8125rem/1.4 var(--sans); color: var(--ink-2); }
.separation ul i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; background: #83aab2; vertical-align: -1px; }
.separation ul i.imp { background: #c78e8c; }
.separation figcaption { grid-column: 1 / -1; font: italic 400 .875rem/1.5 var(--serif); color: var(--ink-2); }
.replay {
  position: absolute;
  right: 0;
  bottom: 8px;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--page);
  color: var(--green-ink);
  cursor: pointer;
}
.replay:hover { background: var(--green-wash); }
.replay svg { width: 18px; height: 18px; }

/* ---------- Image rows ----------
   Screenshots side by side at the same height. Each item grows in
   proportion to its image's aspect ratio (--r), so nothing is letterboxed,
   labels sit right under their images, and the arrow centers on them. */

.prose .evolution {
  --w: min(var(--wide), 100vw - 2 * var(--page-pad));
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px clamp(12px, 2vw, 28px);
  margin: 2.4em calc((100% - var(--w)) / 2);
}
.evolution figcaption { flex: 0 0 100%; margin: 6px 0 0; padding: 0 max(0px, calc((100% - var(--measure)) / 2)); font: italic 400 .95rem/1.55 var(--serif); color: var(--ink-2); }
.pair { display: flex; align-items: flex-start; gap: 20px; }
.evo-item, .pair > div { flex: var(--r, 1) 1 0; min-width: 0; }
.shot { display: block; }
.shot img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 12px 32px -12px #1f3a2b40; transition: box-shadow .3s var(--ease); }
.shot:hover img { box-shadow: 0 16px 40px -12px #1f3a2b66; }
.shot.plain img, .shot.plain:hover img { box-shadow: none; border-radius: 0; }
.evo-item .label, .pair .label { display: block; margin-top: 10px; }
.evo-arrow {
  flex: none;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding-bottom: 34px; /* the label's height, so the arrow centers on the images */
  color: var(--green-ink);
}
.evo-arrow svg { width: 28px; height: 28px; }

@media (max-width: 700px) {
  .prose .evolution, .pair { flex-direction: column; align-items: stretch; }
  .evo-item, .pair > div { flex: none; width: 100%; }
  .evo-arrow { align-self: center; padding: 0; transform: rotate(90deg); }
}

/* Three columns, each an example image with a short title and text */
.prose .trio {
  --w: min(var(--wide), 100vw - 2 * var(--page-pad));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 2em calc((100% - var(--w)) / 2);
  padding: 0;
  list-style: none;
}
.prose .trio > li { margin: 0; }
.trio b { display: block; font: 500 1.2rem/1.3 var(--serif); }
.trio p { margin: 6px 0 0; font-size: 1rem; line-height: 1.55; }
/* Screenshots cut to one shape, so the titles line up */
.trio .shot { margin-bottom: 14px; }
.trio .shot img { aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
@media (max-width: 800px) { .prose .trio { grid-template-columns: 1fr; } }

/* A screenshot shown on a light panel, so a small image can match a larger one */
.shot.panel { display: grid; place-items: center; aspect-ratio: var(--r); border-radius: 6px; background: #f3f4f3; }
.shot.panel img { width: 86%; box-shadow: none; border-radius: 0; }

/* What went wrong */
.prose .note.warn { background: #fbecea; }
.note.warn .label { color: #9a3b26; }
/* A What went wrong box with more than one paragraph */
.note.warn > p { margin: 0; }
.note.warn > p + p { margin-top: .8em; }
/* An image under the text of a What went wrong box, at its own size at most */
.note.warn > img { margin-top: 14px; border-radius: 8px; }
/* Named issues in a What went wrong box: a short title over its text */
.prose .note .issues { margin: 6px 0 0; padding: 0; list-style: none; }
.prose .note .issues li { margin: 0; }
.prose .note .issues li + li { margin-top: 12px; }
.note .issues b { display: block; font: 500 1.125rem/1.35 var(--serif); }
.note .issues p { margin: 2px 0 0; }
/* A wide What went wrong box holding three same-size examples */
.prose .note.wrong { --w: min(var(--wide), 100vw - 2 * var(--page-pad)); margin: 2.4em calc((100% - var(--w)) / 2); padding: 24px 28px 26px; }
.prose .opt-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 12px 0 0; padding: 0; list-style: none; }
.prose .opt-trio > li { margin: 0; }
.opt-trio > li > b { display: block; margin-top: 12px; font: 500 1.1rem/1.3 var(--serif); }
.opt-trio > li > p { margin: 4px 0 0; font-size: .9375rem; line-height: 1.5; }
.note.wrong > p { margin: 20px 0 0; }
.prose .opt-trio.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
/* Each example's frame is as tall as the taller one's content, and the titles below line up. */
.prose .opt-trio > li { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
.prose .opt-trio .opt-frame { aspect-ratio: auto; }
@media (max-width: 800px) { .prose .opt-trio, .prose .opt-trio.two { grid-template-columns: 1fr; max-width: 420px; } .prose .note.wrong { padding: 20px; } }

/* Research findings, set larger than body text */
.prose .findings { margin-top: 1.2em; padding: 0; list-style: none; counter-reset: finding; }
.prose .findings li {
  counter-increment: finding;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0 12px;
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.prose .findings li:last-child { border-bottom: 1px solid var(--rule); }
.findings li::before { content: counter(finding); grid-row: span 2; font: 500 1.75rem/1.15 var(--serif); color: var(--accent); }
.findings b { font: 500 1.375rem/1.3 var(--serif); }
.findings span { margin-top: 6px; font-size: 1rem; line-height: 1.55; color: var(--ink-2); }

/* A small image beside the text, in the right-hand margin on wide screens.
   --top lines its top edge up with the first line of the text beside it. */
.prose .inset { --w: min(var(--wide), 100vw - 2 * var(--page-pad)); --top: .35em; float: right; width: calc(var(--w) * .3); margin: var(--top) calc((100% - var(--w)) / 2) 1em 32px; }
.prose .part-head + .inset { --top: 1.95em; }
.prose p + .inset { --top: 1.45em; }
/* The same, in the left-hand margin */
.prose .inset.left { float: left; margin: var(--top) 32px 1em calc((100% - var(--w)) / 2); }
.inset a { display: block; }
.inset img { border-radius: 8px; box-shadow: 0 10px 28px -12px #1f3a2b40; }
.inset .label { display: block; margin-top: 8px; font-size: .8125rem; line-height: 1.5; }
.prose .clear { clear: both; }
/* Headings and callouts start below any inset still open beside the text above them */
.prose h2, .prose h3, .prose .part-head, .prose .note { clear: both; }
/* A paragraph that starts beside an inset keeps that width to its end,
   instead of widening halfway where the inset stops */
.prose .inset ~ p { display: flow-root; }
/* The text after an inset keeps the spacing it would have had without it */
.prose h3 + .inset + * { margin-top: .6em; }
.prose .part-head + .inset + * { margin-top: 1.6em; }
@media (max-width: 560px) { .prose .inset, .prose .inset.left { float: none; width: 100%; margin: 1.2em 0; } }

/* Text with a note beside it: the text keeps the reading column's left edge
   and the note sits in the right-hand margin, like an inset. Unlike an inset,
   the note follows the text on small screens. */
.prose .with-side { --w: min(var(--wide), 100vw - 2 * var(--page-pad)); display: grid; grid-template-columns: minmax(0, 1fr) calc(var(--w) * .3); gap: 0 32px; align-items: start; margin-right: calc((100% - var(--w)) / 2); }
.with-side > div > * { margin: 0; }
.with-side > div > * + * { margin-top: 1.1em; }
@media (max-width: 900px) {
  .prose .with-side { display: block; margin-right: 0; }
  .with-side > aside { margin-top: 1.6em; }
}
/* A short numbered list set small, e.g. the questions behind a practice */
.side-note { padding: 16px 18px 8px; border-radius: 12px; background: var(--wash); }
.side-note .label { margin: 0 0 8px; font-size: .8125rem; line-height: 1.5; color: var(--accent); }
.prose .side-note ol { margin: 0; padding: 0; list-style: none; counter-reset: side; }
.prose .side-note li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); margin: 0; padding: 10px 0; border-top: 1px solid #00000012; counter-increment: side; }
.side-note li::before { content: counter(side); grid-row: span 2; font: 500 .8125rem/1.6 var(--sans); color: var(--accent); }
.side-note b { font: 500 .9375rem/1.35 var(--serif); }
.side-note li span { margin-top: 3px; font: 400 .75rem/1.5 var(--sans); color: var(--ink-2); }

/* A usage guideline in low detail: a do and a don't, side by side */
.frame.guide-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; aspect-ratio: 4 / 3; padding: 14px; border-radius: 8px; background: var(--tint); }
.guide-mini .gm-card { --mark: #1f6b35; display: flex; flex-direction: column; gap: 7px; padding: 10px; border-radius: 8px; background: #fff; box-shadow: 0 1px 3px #0000000f; }
.guide-mini .gm-card.dont { --mark: #9a3b26; }
.guide-mini .gm-canvas { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; border-bottom: 3px solid var(--mark); border-radius: 6px 6px 0 0; background: #f8f7f9; }
.guide-mini .gm-btn { width: 32%; height: 15px; border: 1px solid #d5d0da; border-radius: 4px; background: #fff; }
.guide-mini .gm-btn.primary { border-color: var(--plum-mid); background: var(--plum-mid); }
.guide-mini .gm-tag { display: flex; align-items: center; gap: 5px; font: 600 .6875rem/1.3 var(--sans); color: var(--mark); }
.guide-mini .gm-tag::before { content: ""; width: 13px; height: 13px; border-radius: 50%; background: var(--mark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2l2 2 4-4.4' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") center / 85% no-repeat; }
.guide-mini .dont .gm-tag::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 4l4 4M8 4l-4 4' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E"); }
.guide-mini .gm-line { display: block; height: 4px; border-radius: 2px; background: #efedf1; }
.guide-mini .gm-line.short { width: 62%; }

/* An image in a narrow left column, with the text beside it */
/* Image in the left 30% of the wide column, text beside it at reading width */
.prose .aside-left { --w: min(var(--wide), 100vw - 2 * var(--page-pad)); display: grid; grid-template-columns: 30% minmax(0, var(--measure)); gap: 40px; align-items: start; margin-inline: calc((100% - var(--w)) / 2); }
.aside-left figure { margin: .35em 0 0; }
.aside-left figure a { display: block; }
.aside-left img { border-radius: 8px; box-shadow: 0 10px 28px -12px #1f3a2b40; }
.aside-left .label { display: block; margin-top: 8px; font-size: .8125rem; line-height: 1.5; }
.aside-left p { margin: 0; }
.aside-left p + p { margin-top: 1.1em; }
@media (max-width: 1000px) { .prose .aside-left { gap: 28px; } }
/* Mirror: text on the left at reading width, image in the right 30% */
.prose .aside-right { --w: min(var(--wide), 100vw - 2 * var(--page-pad)); display: grid; grid-template-columns: minmax(0, var(--measure)) 30%; justify-content: space-between; gap: 40px; align-items: start; margin-inline: calc((100% - var(--w)) / 2); }
.aside-right figure { margin: .35em 0 0; }
.aside-right figure a { display: block; }
.aside-right img { border-radius: 8px; box-shadow: 0 10px 28px -12px #1f3a2b40; }
.aside-right .label { display: block; margin-top: 8px; font-size: .8125rem; line-height: 1.5; }
.aside-right p { margin: 0; }
.aside-right p + p { margin-top: 1.1em; }
.aside-right h3 + p { margin-top: .5em; }
@media (max-width: 1000px) { .prose .aside-right { gap: 28px; } }
@media (max-width: 700px) { .prose .aside-left, .prose .aside-right { grid-template-columns: 1fr; } .aside-right figure { order: -1; } }
/* One change per section: title, image and text read together */
.prose .change { margin-top: 4em; }
/* Right under a part opener, a section keeps the opener's spacing */
.prose .part-head + .change { margin-top: 1.6em; }
.change h3 { margin-top: .2em; }
.prose .change .kicker { margin: 0; }
.change h3 + p { margin-top: .5em; }
.change figure .frame.pending { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 12px; border: 1px dashed #0000001f; border-radius: 8px; background: var(--tint); font: 400 .75rem/1.45 var(--sans); color: var(--ink-2); text-align: center; }
.change figure .frame.tpl-host { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--tint-sage); }
.change figure .frame.tpl-host, .change figure .frame.wiz-host, .change figure .frame.side-host { border: 1px solid #e3e6e4; box-shadow: 0 10px 28px -12px #1f3a2b40; }
.change figure .frame.wiz-host, .change figure .frame.side-host { border-radius: 8px; }
/* A smaller quote that stays inside the text column */
.prose .change .quote { margin: 1.4em 0; }
.change .quote::before { font-size: 3.2rem; top: -.08em; }
.change .quote p { font-size: 1.25rem; }

/* A participant's words */
.prose .quote {
  --w: min(820px, 100vw - 2 * var(--page-pad));
  position: relative;
  margin: 2em calc((100% - var(--w)) / 2);
  padding: 0;
}
/* A large opening mark hanging outside the text */
.quote::before {
  content: "“";
  position: absolute;
  top: -.12em;
  right: 100%;
  margin-right: .08em;
  font: 500 5rem/1 var(--serif);
  color: var(--quote-mark, var(--green-mid));
}
@media (max-width: 1000px) { .quote::before { position: static; display: block; height: .5em; margin: 0 0 .1em; } }
.quote p { margin: 0; font: italic 400 clamp(1.3rem, 2vw, 1.6rem)/1.45 var(--serif); }
.quote cite { display: block; margin-top: 8px; font: normal 400 .8125rem/1.5 var(--sans); letter-spacing: .02em; color: var(--ink-2); }

/* ---------- Part navigation ----------
   A small fixed list of the parts on the left, shown once the reader is
   past the overview. Only on screens wide enough to leave it a margin. */

.part-nav { display: none; }
@media (min-width: 1400px) {
  .part-nav {
    display: block;
    position: fixed;
    top: 50%;
    left: max(16px, calc((100vw - var(--page-max)) / 2 + 16px));
    z-index: 20;
    width: 140px;
    padding: 10px 8px;
    border-radius: 12px;
    background: #ffffffe6;
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transform: translate(-8px, -50%);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
  }
  .part-nav.show { opacity: 1; visibility: visible; transform: translate(0, -50%); transition: opacity .3s var(--ease), transform .3s var(--ease); }
}
.part-nav ol { margin: 0 0 6px; padding: 0 0 6px; border-bottom: 1px solid var(--rule); list-style: none; }
.part-nav a {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 2px 10px;
  padding: 7px 6px;
  border-radius: 8px;
  font: 400 .8125rem/1.35 var(--sans);
  color: var(--ink-2);
}
.part-nav a::before { content: ""; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #d6dfda; transition: background-color .2s; }
.part-nav a span { grid-column: 2; font: 400 .9375rem/1.3 var(--serif); color: var(--ink); }
.part-nav a:hover { background: var(--wash); }
.part-nav a[aria-current="true"] { color: var(--accent); }
.part-nav a[aria-current="true"]::before { background: var(--accent); }
.part-nav a[aria-current="true"] span { color: var(--accent); }
/* The next project, after the parts: an arrow in place of the dot */
.part-nav .part-next::before { content: "→"; width: auto; height: auto; margin-top: 0; border-radius: 0; background: none; font-size: .75rem; transition: transform .2s var(--ease); }
.part-nav .part-next:hover::before { transform: translateX(2px); }

/* ---------- Lightbox ----------
   Any link to an image opens it large, over the page. */

a[href^="images/"] { cursor: zoom-in; }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e8efe9;
}
.lightbox::backdrop { background: #101a14eb; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { display: grid; justify-items: center; gap: 14px; margin: 0; padding: 64px 80px 32px; }
.lightbox img {
  width: auto;
  height: auto;
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 30px 80px -20px #000a;
}
.lightbox figcaption { max-width: 60ch; font: 400 .9375rem/1.5 var(--sans); text-align: center; }
.lb-count { position: fixed; top: 26px; left: 24px; font: 400 .875rem/1 var(--sans); color: #b9c7bd; }
.lb-btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff1f;
  color: #fff;
  cursor: pointer;
}
.lb-btn:hover { background: #ffffff38; }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { top: 50%; left: 16px; transform: translateY(-50%); }
.lb-next { top: 50%; right: 16px; transform: translateY(-50%); }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] img { animation: lb-in .3s var(--ease) both; }
  @keyframes lb-in { from { opacity: 0; transform: scale(.97); } }
}
@media (max-width: 700px) {
  .lightbox figure { padding: 64px 12px 88px; }
  .lightbox img { max-width: calc(100vw - 24px); max-height: calc(100dvh - 190px); }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}

/* ---------- Statements ----------
   One key sentence, set large in the project's ink and wider than the
   reading column. Shrinks back to the column on small screens. */

.prose .statement {
  --w: min(920px, 100vw - 2 * var(--page-pad));
  margin: 2em calc((100% - var(--w)) / 2) 1.8em;
  font-size: clamp(1.6rem, 3.3vw, 2.5rem);
}
.statement .label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 .9rem;
  color: var(--green-ink);
}
.statement .label::before { content: ""; width: 28px; border-top: 1px solid currentColor; }
.statement p {
  margin: 0;
  font: italic 500 1em/1.22 var(--serif);
  letter-spacing: -.012em;
  color: var(--green-ink);
  text-wrap: balance;
}

/* ---------- Case-study head ---------- */

.cs-head {
  max-width: var(--measure);
  margin: 40px auto 0;
}
.cs-head h1 {
  margin: 8px 0 0;
  font-size: clamp(2.25rem, 4.4vw, 3.25rem);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -.01em;
}
.cs-head .subtitle {
  margin: 14px 0 0;
  font: italic 400 1.35rem/1.45 var(--serif);
  color: var(--ink);
}

/* ---------- Case-study hero ----------
   A tinted panel with an oversized title and a product visual rising from
   its bottom edge. Its color comes from --tint (see :root). */

.cs-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(120% 90% at 85% 0%, #ffffff8c 0%, #fff0 55%),
    var(--tint);
  padding: clamp(40px, 8vw, 112px) clamp(24px, 6vw, 96px) 0;
}
.cs-hero .label { color: var(--tint-ink); }
.cs-hero h1 {
  margin: 14px 0 0;
  font-size: clamp(3rem, 9.5vw, 8.5rem);
  line-height: .95;
  font-weight: 500;
  letter-spacing: -.025em;
}
.cs-hero .subtitle.one-line { max-width: none; }
.cs-hero .subtitle {
  max-width: 40ch;
  margin: clamp(16px, 2vw, 28px) 0 0;
  text-wrap: balance;
  font: italic 400 clamp(1.3rem, 2.3vw, 2rem)/1.3 var(--serif);
}
.cs-hero .visual {
  position: relative;
  margin: clamp(40px, 6vw, 80px) auto 0;
  max-width: 1080px;
  transform: translateY(1px);
}
/* A real screen or showcase image as the visual, rising from the bottom
   edge like the mocks. .crop trims a taller image to 16:9; .narrow suits
   a tablet screen, which would otherwise stand too tall. */
.cs-hero .visual.narrow { max-width: 860px; }
.hero-shot { display: block; }
.hero-shot img {
  width: 100%;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 30px 80px -20px #00000038, 0 8px 24px -12px #00000026;
}
.hero-shot.crop img { aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 560px) { .hero-shot img { border-radius: 10px 10px 0 0; } }

/* The password form of a confidential page (inc/access.php): a white card
   rising from the hero's bottom edge, where the visual would be. */
.unlock {
  max-width: 560px;
  margin-top: clamp(40px, 6vw, 80px);
  padding: 28px 32px 32px;
  border-radius: 14px 14px 0 0;
  background: var(--page);
  box-shadow: 0 30px 80px -20px #00000038, 0 8px 24px -12px #00000026;
  transform: translateY(1px);
}
.unlock label { display: block; margin-bottom: 10px; font: 500 .75rem/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.unlock-row { display: flex; flex-wrap: wrap; gap: 10px; }
.unlock input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #c9cfcc;
  border-radius: 10px;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem/1.4 var(--sans);
}
.unlock input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.unlock input[aria-invalid="true"] { border-color: #9a3b26; }
.unlock button {
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 500 .9375rem/1 var(--sans);
  cursor: pointer;
  transition: background .2s;
}
.unlock button:hover { background: var(--accent); }
.unlock button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.unlock-error { margin: 12px 0 0; font: 500 .875rem/1.5 var(--sans); color: #9a3b26; }
.unlock-note { margin: 18px 0 0; font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
.unlock-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .unlock { padding: 22px 20px 26px; border-radius: 10px 10px 0 0; } }
@media (prefers-reduced-motion: no-preference) {
  .unlock { animation: rise 1000ms 160ms var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) { .unlock button { transition: none; } }

/* Facts laid out as a strip under the hero */
.facts-strip {
  display: grid;
  grid-template-columns: 1fr 1.3fr 2fr 1.3fr 1fr;
  gap: 24px 32px;
  max-width: var(--page-max);
  margin: 32px 0 0;
  padding: 0 clamp(0px, 2vw, 24px) 28px;
  border-bottom: 1px solid var(--rule);
}
/* Four facts instead of five */
@media (min-width: 901px) { .facts-strip.four { grid-template-columns: 1fr 1.6fr 1.7fr 2.1fr; } }
.facts-strip dt { font: 400 .875rem/1.65 var(--sans); letter-spacing: .02em; color: var(--ink-2); }
.facts-strip dd { margin: 4px 0 0; font-size: 1rem; line-height: 1.5; }

/* ---------- Product mock (illustrative, like the index cards) ---------- */

.mock-app {
  border: 1px solid #0000001a;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: #fff;
  box-shadow: 0 30px 80px -20px #1f3a2b40, 0 8px 24px -12px #1f3a2b26;
  overflow: hidden;
  font: 400 12px/1.4 var(--sans);
  color: #33413a;
}
.mock-app .bar {
  display: flex; gap: 6px; align-items: center;
  height: 34px; padding: 0 14px;
  border-bottom: 1px solid #e8ecea; background: #fafbfa;
}
.mock-app .bar i { width: 9px; height: 9px; border-radius: 50%; background: #dcdfdd; }
.mock-app .bar span { margin-left: 12px; color: #8a948f; font-size: 11px; }
.mock-app .body { display: grid; grid-template-columns: 210px 1fr; min-height: 330px; }
.mock-app .side { padding: 22px 16px; background: #f4f6f5; border-right: 1px solid #e8ecea; }
.mock-app .side b { display: block; margin-bottom: 18px; font-size: 13px; font-weight: 600; color: #222; }
.mock-app .step { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #56625c; }
.mock-app .step.on { background: #fff; color: #222; font-weight: 600; box-shadow: 0 1px 2px #0000000f; }
.mock-app .main { padding: 24px 28px; min-width: 0; }
.mock-app h3 { margin: 0; font: 600 17px/1.3 var(--sans); color: #222; }
.mock-app .meta { margin-top: 4px; color: #7b8680; }

/* Design-system documentation page (Clario hero), on the same frame.
   The body is capped so the page runs on past the hero's bottom edge. */
.mock-docs { color: #3b3440; box-shadow: 0 30px 80px -20px #3a1a3440, 0 8px 24px -12px #3a1a3426; }
.mock-docs .bar { background: #fbfafb; border-color: #ece9ee; }
.mock-docs .bar em { margin-left: auto; font-style: normal; font-size: 11px; color: #8b8490; }
.mock-docs .body { grid-template-columns: 190px 1fr; max-height: 380px; overflow: hidden; }
.mock-docs .side { padding: 20px 12px; background: #faf9fb; border-color: #ece9ee; }
.mock-docs .side b { display: flex; align-items: center; gap: 8px; margin: 0 0 6px 10px; }
.mock-docs .side b svg { width: 16px; height: 16px; color: var(--plum-mid); }
.mock-docs .side small { display: block; margin: 14px 0 4px 10px; font-size: 10px; letter-spacing: .04em; color: #9a93a0; }
.mock-docs .step { justify-content: space-between; padding: 6px 10px; color: #5d5663; }
.mock-docs .step::after { content: ""; width: 5px; height: 5px; border: solid #b3adb8; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.mock-docs .step.on { background: var(--plum-wash); color: var(--plum-ink); box-shadow: none; }
.mock-docs .crumb { font-size: 11px; color: var(--plum-mid); }
.mock-docs h3 { margin-top: 4px; font-size: 22px; font-weight: 500; }
.mock-docs .meta { margin-top: 6px; color: #7d7682; }
.mock-docs .canvas { display: flex; justify-content: center; gap: 10px; margin: 16px 0 14px; padding: 36px 16px; border-radius: 10px; background: #f8f7f9; }
.mock-docs .btn { padding: 8px 16px; border-radius: 6px; background: #fff; box-shadow: 0 1px 3px #0000001f; font-weight: 500; }
.mock-docs .btn.primary { background: var(--plum-mid); color: #fff; box-shadow: none; }
.mock-docs .links { display: flex; flex-wrap: wrap; gap: 8px; }
.mock-docs .links span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid #ece9ee; border-radius: 6px; font-size: 11px; }
.mock-docs .links svg { width: 12px; height: 12px; color: #8b8490; }
.mock-docs .tabs { display: flex; gap: 20px; margin-top: 18px; border-bottom: 1px solid #ece9ee; font-size: 11px; color: #8b8490; }
.mock-docs .tabs span { padding-bottom: 8px; }
.mock-docs .tabs .on { color: var(--plum-mid); box-shadow: inset 0 -2px var(--plum-mid); }
.mock-docs .usage { margin-top: 14px; }
.mock-docs .usage b { display: block; font-size: 13px; font-weight: 500; color: #222; }
.mock-docs .usage i { display: block; height: 5px; margin-top: 10px; border-radius: 3px; background: #efedf1; }
.mock-docs .usage i:nth-child(3) { width: 82%; }
.mock-docs .usage i:nth-child(4) { width: 64%; }

/* ---------- Platforms prototype (Cytiva hero) ----------
   Pick a platform on the left; its chromatogram and key numbers appear on
   the right. Rebuilt from Eduardo's CodePen prototype in the site's style. */

.cs-hero .mock-app { border-radius: 0; }
.mock-app .bar span b { font-weight: inherit; }
.pf {
  /* Cytiva UI tokens, used only inside the prototype */
  --cy-text: #18181b; --cy-text-2: #5d5d5f; --cy-text-3: #747476;
  --cy-border: #e8e8e8; --cy-tint: #f7f7f7; --cy-focus: #429dff;
  --cy-primary: #00886f; --cy-primary-dark: #004e3f; --cy-topic: #00755f;
  display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 440px; text-align: left; color: var(--cy-text);
}
.pf-list { position: relative; display: grid; align-content: start; grid-auto-rows: max-content; gap: 12px; padding: 16px; overflow-y: auto; scrollbar-width: none; background: var(--cy-tint); border-right: 1px solid var(--cy-border); }
.pf-list::-webkit-scrollbar { display: none; }
.pf-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 112px;
  padding: 14px 14px 12px 84px;
  border: 1px solid var(--cy-border);
  border-radius: 0;
  background: #fff;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.pf-card:hover { transform: translateY(-2px); box-shadow: 0 2px 8px #0000000d; }
.pf-card[aria-pressed="true"] { border-color: var(--cy-focus); box-shadow: 0 0 0 1px var(--cy-focus); }
.pf-card:focus-visible { outline: 2px solid var(--cy-focus); outline-offset: 2px; }
/* The molecule sits half outside the card and slides in from the left. */
.pf-mol {
  position: absolute; top: 50%; left: -14px; width: 92px; height: 92px;
  background: none; border-radius: 0;
  opacity: 0; transform: translate(-30px, -50%);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  pointer-events: none;
}
.pf-mol.in { opacity: 1; transform: translate(0, -50%); }
.pf-mol video { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; mix-blend-mode: multiply; }
.pf-tag { flex: none; padding: 0 7px; font: 700 9.5px/20px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #66b8a9; }
.pf-tag.capture { background: var(--cy-focus); }
.pf-tag.none { color: var(--cy-text-2); background: var(--cy-border); }
.pf-sub { display: block; font: 600 11.5px/1.3 var(--sans); color: var(--cy-topic); }
.pf-title { display: block; margin-top: 3px; font: 700 14.5px/1.25 var(--sans); color: var(--cy-text); }
.pf-desc { display: -webkit-box; margin-top: 4px; font: 400 11.5px/1.4 var(--sans); color: #2f2f32; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-by { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font: 400 10.5px/1.3 var(--sans); color: var(--cy-text-3); }
.pf-detail { display: flex; flex-direction: column; padding: 20px 24px; min-width: 0; overflow: hidden; }
.pf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pf-head h3 { margin: 0; font: 700 18px/1.25 var(--sans); color: var(--cy-text); }
.pf-use { flex: none; padding: 9px 16px; border: 0; border-radius: 0; background: var(--cy-primary-dark); color: #fff; font: 600 11.5px/1 var(--sans); cursor: pointer; transition: background .2s; }
.pf-use:hover { background: var(--cy-primary); }
.pf-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; font: 400 11px/1.4 var(--sans); color: var(--cy-text-2); }
.pf-meta b { display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--cy-text); }
.pf-meta svg { width: 12px; height: 12px; flex: none; }
.pf-steps { display: flex; gap: 2px; }
.pf-steps span { padding: 0 6px; font: 700 9px/18px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: #8a8a8d; background: var(--cy-tint); }
.pf-steps span.on { color: #fff; background: #66b8a9; }
.pf-steps span.on.capture { background: var(--cy-focus); }
.pf-chart { position: relative; margin-top: 14px; }
.pf-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.pf-chart text { font: 400 9px var(--sans); fill: var(--cy-text-3); }
.pf-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font: 400 10.5px/1.4 var(--sans); color: var(--cy-text-2); }
.pf-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; vertical-align: 0; }
.pf-legend i.line { width: 12px; height: 0; border-radius: 0; border-top: 1.5px dashed #464649; vertical-align: 2px; }
.pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.pf-stat { padding: 9px 12px; border: 1px solid var(--cy-border); font: 400 10px/1.3 var(--sans); color: var(--cy-text-3); }
.pf-stat b { display: block; margin-top: 3px; font: 700 17px/1.2 var(--sans); color: var(--cy-text); }
.pf-empty { display: grid; place-items: center; flex: 1; min-height: 170px; margin-top: 14px; border: 1px dashed #d1d1d3; font: 400 12px/1.5 var(--sans); color: var(--cy-text-3); text-align: center; }
.pf-detail.swap > * { animation: pf-in .45s var(--ease) both; }
@keyframes pf-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .pf-mol, .pf-card { transition: none; } }
@media (max-width: 900px) {
  .pf { grid-template-columns: 1fr; height: auto; }
  .pf-list { grid-auto-flow: column; grid-auto-columns: 270px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--cy-border); }
  .pf-detail { padding: 16px; }
}
@media (max-width: 560px) { .pf-meta > div:nth-child(n+4), .pf-stat span, .mock-app .bar span b { display: none; } .pf-stat b { font-size: 15px; } .pf-list { grid-auto-columns: 250px; } }

@media (prefers-reduced-motion: no-preference) {
  .cs-hero h1, .cs-hero .subtitle, .cs-hero .label { animation: arrive 700ms var(--ease) both; }
  .cs-hero .subtitle { animation-delay: 80ms; }
  .cs-hero .visual { animation: rise 1000ms 160ms var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(1px); } }
}

@media (max-width: 900px) {
  .prose .parts { grid-template-columns: 1fr; }
  .facts-strip { grid-template-columns: 1fr 1fr; }
  .facts-strip .wide-fact { grid-column: span 2; }
  .mock-app .body { grid-template-columns: 1fr; }
  .mock-app .side { display: none; }
}
@media (max-width: 560px) {
  .cs-hero { border-radius: 16px; }
  .mock-app .main { padding: 18px; }
  .facts-strip { grid-template-columns: 1fr; padding: 0 0 24px; }
  .facts-strip .wide-fact { grid-column: auto; }
}

/* Facts: Company / Role / Team ... */
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 32px;
  margin: 40px 0 0;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.facts dt { font: 400 .875rem/1.65 var(--sans); letter-spacing: .02em; color: var(--ink-2); }
.facts dd { margin: 0; font-size: 1rem; line-height: 1.55; }

/* ---------- Figures ---------- */

.figure { margin: 2.6em 0; }
.prose > .figure { margin-top: 2.2em; margin-bottom: 2.2em; }

/* Break out of the reading column, up to --wide */
.figure.wide {
  width: min(var(--wide), 100vw - 2 * var(--page-pad));
  margin-left: 50%;
  transform: translateX(-50%);
}

.figure .frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--tint);
}
.figure .frame > img, .figure .frame > video { width: 100%; }

/* Placeholder for images still to be exported */
.figure .frame.pending {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 24px;
  text-align: center;
  font: 400 .875rem/1.6 var(--sans);
  letter-spacing: .02em;
  color: var(--ink-2);
}

.figure figcaption {
  max-width: var(--measure);
  margin-top: 12px;
  font: italic 400 .95rem/1.55 var(--serif);
  color: var(--ink-2);
}
.figure.wide figcaption { margin-left: auto; margin-right: auto; }

/* A statement as a dark band, as wide as the page */
.prose .statement.band {
  --w: calc(min(var(--page-max), 100vw) - 2 * var(--page-pad));
  margin: 1.6em calc((100% - var(--w)) / 2);
  padding: clamp(56px, 9vw, 128px) clamp(24px, 8vw, 128px);
  border-radius: 24px;
  background: radial-gradient(90% 120% at 15% 0%, var(--band-from) 0%, var(--band-to) 70%);
  font-size: clamp(2rem, 5vw, 4rem);
  text-align: center;
}
.statement.band .label { justify-content: center; color: var(--band-label); }
.statement.band .label::after { content: ""; width: 28px; border-top: 1px solid currentColor; }
.statement.band p { max-width: 22ch; margin: 0 auto; line-height: 1.12; color: #fff; }
/* A longer statement: a little smaller and wider, so it stays at three or four lines */
.prose .statement.band.long { font-size: clamp(1.75rem, 3.8vw, 3.25rem); }
.statement.band.long p { max-width: 32ch; }
/* A statement of two sentences: smaller again and looser, so it reads as a short passage */
.prose .statement.band.passage { padding-block: clamp(48px, 7vw, 104px); font-size: clamp(1.3125rem, 2.3vw, 2rem); }
.statement.band.passage p { max-width: 42ch; line-height: 1.3; }
@media (max-width: 560px) { .prose .statement.band { border-radius: 16px; } }

/* The molecules from the Platforms in a row, turning together (js/case.js),
   over a short caption: a pause between two parts */
.prose .molecules { margin-top: clamp(64px, 8vw, 96px); }
.molecule-row { display: flex; justify-content: center; gap: clamp(8px, 2.5vw, 28px); }
.molecule-row video { width: clamp(52px, 8vw, 76px); aspect-ratio: 1; mix-blend-mode: multiply; }
.molecules figcaption { max-width: 52ch; margin: 12px auto 0; font: italic 400 .9375rem/1.5 var(--serif); color: var(--ink-2); text-align: center; text-wrap: balance; }
.prose .molecules + .part-head { margin-top: clamp(64px, 8vw, 96px); }

/* ---------- Callouts ---------- */

.note {
  padding: 18px 22px;
  border-radius: 12px;
  background: var(--green-wash);
  font-size: 1rem;
  line-height: 1.6;
}
.note .label { display: block; margin-bottom: 4px; color: var(--green-ink); }
.prose .note.outcome { margin-top: 2.4em; }

/* The two-minute version, before the Overview */
.prose .tldr { margin: 48px 0 3em; padding: 24px 28px; border-radius: 12px; background: #f6f7f6; }
.tldr .label { margin: 0 0 8px; color: var(--accent); }
.tldr p:not(.label) { margin: 0; font-size: 1.125rem; line-height: 1.6; }
.tldr p:not(.label) + p { margin-top: .8em; }

/* Content still to come. Visible on purpose, so gaps can't ship unnoticed. */
.todo {
  padding: 12px 16px;
  border: 1px dashed var(--ink-4);
  border-radius: 10px;
  font: 400 .875rem/1.6 var(--sans);
  letter-spacing: .01em;
  color: var(--ink-2);
}
.figure .frame.pending { border: 1px dashed #0000001f; }

/* Inline flag on a fact that still needs confirming */
.tbc {
  display: inline-block;
  padding: 0 6px;
  border: 1px dashed var(--ink-4);
  border-radius: 6px;
  font: 400 .75rem/1.6 var(--sans);
  letter-spacing: .02em;
  color: var(--ink-2);
  white-space: nowrap;
  vertical-align: .1em;
}

/* ---------- Key numbers ----------
   A short row of results: a large figure over a small label, on the
   project's wash. Stacks on small screens. */

.prose .stats {
  --w: min(880px, 100vw - 2 * var(--page-pad));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 1.8em calc((100% - var(--w)) / 2) 0;
  padding: 0;
  list-style: none;
}
.prose .stats > li { margin: 0; padding: 22px 24px 20px; border-radius: 12px; background: var(--wash); }
.stats b { display: block; font: 500 clamp(1.875rem, 3vw, 2.375rem)/1.1 var(--serif); letter-spacing: -.01em; color: var(--accent); }
.stats span { display: block; margin-top: 8px; font: 400 .875rem/1.5 var(--sans); letter-spacing: .02em; color: var(--ink-2); }
.prose .stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .prose .stats, .prose .stats.two { grid-template-columns: 1fr; gap: 12px; } }

/* An award, with its badge at the original size */
.prose .award { display: flex; align-items: center; gap: 24px; margin-top: 2.4em; padding: 20px 0; border-block: 1px solid var(--rule); }
.award img { flex: none; width: 87px; height: auto; }
.award b { display: block; font: 500 1.2rem/1.3 var(--serif); }
.award span { display: block; margin-top: 2px; font-size: 1rem; line-height: 1.55; color: var(--ink-2); }

/* ---------- Previous and next project ----------
   The previous one on the left, the next on the right; each arrow moves
   outward on hover. */

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: var(--measure);
  margin: 96px auto 0;
}
.prev-next a { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.prev-next a + a { align-items: flex-end; text-align: right; }
.prev-next b { font-size: 1.25rem; font-weight: 500; }
.prev-next b span { display: inline-block; transition: transform .3s var(--ease); }
.prev-next a:hover b span { transform: translateX(-4px); }
.prev-next a + a:hover b span { transform: translateX(4px); }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .arrive { animation: arrive 650ms var(--ease) both; }
  @keyframes arrive {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Small screens ---------- */

@media (max-width: 700px) {
  :root { --page-pad: 20px; }
  .site-header { padding: 20px 0; }
  .site-header.sticky { padding: 10px 0; }
  .figure .frame { border-radius: 12px; }
}
@media (max-width: 500px) {
  .prose { font-size: 1.0625rem; }
  .prose h2 { font-size: 1.5rem; }
  .cs-head .subtitle { font-size: 1.15rem; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd + dt { margin-top: 10px; }
}
