/* Case study pages: the look shared by every case. The notes on layout are in case.js. */
/* Layout, spacing and type follow the Figma wireframe "Case study — Splunkbase Admin Dashboard (lo-fi,
   Auto Layout)" (file TXMMI4E1FGb62O7R5UEEkj, node 77:29). Names in comments are its frame names.
   Type scale = the Figma variables "Type scale" (16px base, Desktop / Phone modes); the text styles
   "Case/..." are the .t-* rules below. */
:root {
  --paper: #ffffff; --ink: #111111;         /* the homepage's black and white */
  --frame: color-mix(in srgb, var(--ink) 4%, var(--paper));
  --text: color-mix(in srgb, var(--ink) 84%, var(--paper));   /* reading text: a step lighter than headings so titles lead */
  --soft: color-mix(in srgb, var(--ink) 66%, var(--paper));   /* captions, contents rail: darker than before so they read on the grain */
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --serif: "Inria Serif", Georgia, serif;
  --sans: "Jost", "Futura", system-ui, sans-serif;

  /* font-size/* (Desktop) */
  --fs-xs: 13px; --fs-sm: 15px; --fs-base: 16px; --fs-body-lg: 20px;
  --fs-md: 22px; --fs-lg: 26px; --fs-xl: 36px; --fs-2xl: 44px;

  /* widths */
  --col: 640px;            /* text column: ~75 characters at 20px Jost, 63% of the 1024 pictures */
  --wide: 1024px;          /* wide figures, sections */
  --rise-dur: 1.6s;        /* scroll to appear: how long a block takes to rise in (old site: 1.6s) */
  --rise-ease: cubic-bezier(.22, 1, .36, 1);
  --gut: 48px;             /* Top bar / Page side padding */
  --pic-r: 8px;            /* pictures: corners */
  --pic-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 6px 20px rgb(0 0 0 / .07);   /* pictures: a faint lift off the wall */

  /* spacing. Bigger gaps for looser relationships, so the space itself shows what belongs together
     (proximity): a heading or caption sits close to what it labels; blocks in a section are further apart;
     a sub-topic group further still; sections furthest (the old site's 180 at this width). Each level is
     about 1.5–2× the one below it, so no two levels are close enough to be mistaken for each other. */
  --page-top: 80px;        /* Page — section gap: top padding */
  --page-bottom: 140px;    /* Page — section gap: bottom padding */
  /* level 5 — between sections */
  --section-gap: 180px;
  /* level 4 — groups inside a section, and the cover under the overview */
  --intro-gap: 120px;      /* Intro: Overview → cover picture */
  --cluster-gap: 96px;     /* Research: findings, quotes, workshop photo */
  --cluster-tight: 80px;   /* Background: intro text, pain points, our solution */
  --move-gap: 120px;       /* a new title inside a section ("Before & after") */
  --works-gap: 80px;       /* Deliverables: one text + video row to the next (each row is ~490 tall) */
  /* level 3 — blocks inside a section */
  --block-gap: 64px;       /* each section: gap between blocks */
  --head-after: 40px;      /* section title → its first block: less than the gap above it, so it reads as its heading */
  --overview-gap: 40px;    /* Overview: title → Project details */
  --quote-gap: 48px;       /* Quotes */
  --work-gap: 48px;        /* Deliverable: text ↔ video (side by side) */
  /* level 2 — parts of one block side by side */
  --pair-gap: 32px;        /* Before / after */
  /* level 1 — a label and the thing it labels */
  --heading-gap: 16px;     /* Heading: corner labels → h1 */
  --details-gap: 16px;     /* Project details: heading → rows */
  --head-gap: 12px;        /* Section head: label → h2 */
  --sub-gap: 12px;         /* h3 → its text (less than the 20 between its paragraphs) */
  --cap-gap: 8px;          /* Figure: picture → caption */
  --acc-gap: 8px;          /* "Open all" → the list */
  --spec-gap: 0px;         /* Project details: between rows (each row keeps --row-pad top and bottom) */
  --row-pad: 4px;          /* Project details: each row's top and bottom (Figma) */
  --label-w: 128px;        /* Project details: label column */
}
@media (max-width: 760px) {
  :root {
    /* font-size/* (Phone) */
    --fs-body-lg: 17px; --fs-md: 18px; --fs-lg: 20px; --fs-xl: 28px; --fs-2xl: 32px;
    --gut: 16px; --page-top: 56px; --page-bottom: 96px; 
    --section-gap: 120px; --intro-gap: 72px; --cluster-gap: 64px; --cluster-tight: 56px; --move-gap: 80px; --works-gap: 56px; --block-gap: 40px; --head-after: 28px;
  }
}

/* ---- text styles (Figma: Case/...) ---- */
.t-h1      { font: 400 var(--fs-2xl)/1.2 var(--serif); letter-spacing: -.005em; }
.t-h2      { font: 400 var(--fs-xl)/1.2 var(--serif); }
.t-h3      { font: 400 var(--fs-md)/1.2 var(--serif); }
.t-quote   { font: italic 400 var(--fs-lg)/1.4 var(--serif); }
.t-body-lg { font: 300 var(--fs-body-lg)/1.4 var(--sans); color: var(--text); }
.t-body    { font: 300 var(--fs-body-lg)/1.4 var(--sans); color: var(--text); }   /* accordion text: same reading size as paragraphs */
.t-pull    { font: 400 var(--fs-lg)/1.45 var(--serif); }
.t-thanks  { font: 400 var(--fs-body-lg)/1.4 var(--serif); color: var(--text); }   /* the last line, like the homepage caption */
.t-note    { font: 300 var(--fs-base)/1.4 var(--sans); color: var(--text); }   /* a short note under a narrow picture */
.t-spec    { font: 400 var(--fs-sm)/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.t-caption { font: 400 var(--fs-sm)/1.5 var(--mono); }
.t-caps    { font: 400 var(--fs-xs)/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.t-plain   { font: 400 var(--fs-xs)/1.3 var(--mono); }
.t-nav     { font: 400 var(--fs-xs)/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.t-name    { font: 400 16px/1.1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }

* { box-sizing: border-box; }
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27240%27 height=%27240%27%3E%3Cfilter id=%27n%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%27.9%27 numOctaves=%272%27 stitchTiles=%27stitch%27/%3E%3CfeColorMatrix values=%270 0 0 0 .07 0 0 0 0 .07 0 0 0 0 .07 0 0 0 -2.6 1.3%27/%3E%3C/filter%3E%3Crect width=%27240%27 height=%27240%27 filter=%27url(%23n)%27/%3E%3C/svg%3E"); }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; }
h1, h2, h3, p, figure, blockquote, ul { margin: 0; }
/* Wall grain: the same faint concrete speckle as the homepage (index.html body::before), behind everything */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: var(--grain); }
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
p, h1, h2, h3, figcaption { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

/* ---- Top bar ---- */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gut); background: var(--paper); }
/* solid, so the page scrolls away under it, but painted as the wall: same paper, same grain, tiled from the
   same corner of the window, so there's no edge to see */
.bar::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5; background-image: var(--grain); }
.bar a { text-decoration: none; }
.bar .name { display: inline-flex; align-items: center; gap: 10px; min-height: 26px; }
.bar .name > svg { display: block; height: 35px; width: auto; margin-block: -10px; overflow: visible; }   /* taller than the bar's line, without making the bar taller */
/* Back: a hand-drawn box, see-through; hovered (or focused, or pressed) it's filled with ink and the word turns
   white, like the objects in the homepage drawing. 38 tall without making the bar taller; ::after makes it 50 to tap */
.bar .back { position: relative; isolation: isolate; display: inline-flex; align-items: center; height: 38px; margin-block: -6px; padding: 0 20px;
  font-size: var(--fs-sm); text-indent: .14em; transition: color .15s ease; }   /* the indent balances the last letter's spacing */
.bar .back::after { content: ""; position: absolute; inset: -6px; }
.back-box { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.back-box path { fill: transparent; stroke: var(--ink); stroke-width: 1.6px; stroke-linecap: round; stroke-linejoin: round; transition: fill .15s ease; }
.bar .back:is(:focus-visible, :active) { color: var(--paper); outline: none; }
.bar .back:is(:focus-visible, :active) .back-box path { fill: var(--ink); }
@media (hover: hover) {
  .bar .back:hover { color: var(--paper); }
  .bar .back:hover .back-box path { fill: var(--ink); }
}
.progress { position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---- Page — section gap ---- */
main { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: var(--section-gap);
  padding: var(--page-top) var(--gut) var(--page-bottom); }
.col  { width: 100%; max-width: var(--col); }
.wide { width: 100%; max-width: var(--wide); }
.stack { display: flex; flex-direction: column; }

/* Intro: Overview → hero */
.intro { gap: var(--intro-gap); align-items: center; }
.overview { gap: var(--overview-gap); }
.heading { gap: var(--heading-gap); }
.corner { display: flex; justify-content: space-between; }
/* "Project details": the old site's layout (a small heading, then two plain columns, labels a shade lighter),
   in this page's own spec type: mono 15, sentence case, each row --row-pad top and bottom as in Figma. */
.details { display: flex; flex-direction: column; gap: var(--details-gap); }
.details > h2 { color: var(--soft); }
.rows { text-transform: none; letter-spacing: .02em; padding: 0; margin: 0; list-style: none; display: grid; grid-template-columns: var(--label-w) 1fr; column-gap: 16px; row-gap: var(--spec-gap); }
.rows li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: baseline; padding: var(--row-pad) 0; }
.rows .k { color: var(--soft); }

/* figures: the picture on its own, no mat or frame, caption centred under it. Small round corners and a faint
   shadow, only on pictures that fill their box (.solid, set by case.js): a cut-out has its own shape already */
figure { display: flex; flex-direction: column; gap: var(--cap-gap); }
.frame img, .frame video { display: block; width: 100%; height: auto; }
main img.solid, .frame video { border-radius: var(--pic-r); box-shadow: var(--pic-shadow); }
figcaption { color: var(--soft); text-align: center; }   /* centred under the picture */
.pair { display: grid; grid-template-columns: var(--tpl, 1fr 1fr); gap: var(--pair-gap); }

/* ---- sections: one column of blocks, text 640 wide, figures up to 1024 ---- */
section { display: flex; flex-direction: column; align-items: center; gap: var(--block-gap); scroll-margin-top: 72px; }
.head { gap: var(--head-gap); }
section > .head { margin-bottom: calc(var(--head-after) - var(--block-gap)); }
.label { display: flex; gap: 12px; }
/* a run of blocks spaced further apart than the section's own gap (Figma: Research › Frame 2) */
.cluster { display: flex; flex-direction: column; align-items: center; gap: var(--cluster-gap); }
.cluster.tight { gap: var(--cluster-tight); }
.group { gap: var(--sub-gap); }
.group p + p { margin-top: calc(var(--sub-gap) * -1 + 1em); }

/* accordions: only the headings show, the long text folds away under each */
.accs { gap: var(--acc-gap); }   /* Figma: accordion group gap ('Open all' → first line) */
.acc-tools { display: flex; justify-content: flex-end; }
.acc-tools button { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; color: var(--soft); }
.acc-tools button:hover, .acc-tools button:focus-visible { color: var(--ink); }
.acc { position: relative; padding-bottom: 9px; interpolate-size: allow-keywords; }   /* room for the bottom line, as in Figma */
/* dividers: the homepage drawing's floor line ("Ground line" in Figma), the same brush stroke as the
   About links' underline. Drawn in left to right when the list scrolls in; boils while a row is hovered. */
.hand-rule { position: absolute; left: 0; width: 100%; height: 9px; overflow: visible; pointer-events: none; }
.acc summary .hand-rule { top: -4.5px; }
.acc > .hand-rule { bottom: 0; }
.hand-ul { position: absolute; left: -2%; width: 104%; bottom: -.45em; height: .5em; overflow: visible; pointer-events: none; }
:is(.hand-rule, .hand-ul, .pull-rule, .stat-rule, .dash, .note-rule, .note-top) path { fill: none; stroke: var(--ink); stroke-width: var(--rule-w, 1.3px); stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .8s cubic-bezier(.3,.6,.3,1) calc(.15s + var(--r, 0) * .12s); }
:is(.accs.in .hand-rule, .pull.in .pull-rule, .stats.in .stat-rule, .bullets.in .dash, .note.in :is(.note-rule, .note-top)) path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { :is(.hand-rule, .pull-rule, .stat-rule, .dash, .note-rule, .note-top) path { stroke-dashoffset: 0; transition: none; } }
.acc summary { position: relative; list-style: none; cursor: pointer; display: grid; grid-template-columns: 39px 1fr 14px; align-items: center; gap: 8px; padding: 8px 0; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:focus-visible { outline: none; }
.acc .pm { position: relative; width: 14px; height: 14px; }
.acc .pm::before, .acc .pm::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--ink); transition: transform .3s ease; }
.acc .pm::after { transform: rotate(90deg); }
.acc details[open] .pm::after { transform: rotate(0deg); }
.acc .body { padding: 0 0 22px 47px; }
.acc .body p + p { margin-top: 1em; }
.acc .body figure { margin-top: 24px; }
.acc details::details-content { block-size: 0; overflow-y: clip; transition: block-size .35s ease, content-visibility .35s allow-discrete; }
.acc details[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) { .acc details::details-content { transition: none; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.chips li { padding: 8px 11px; border: 1px solid currentColor; border-radius: 99px; }

.quotes { gap: var(--quote-gap); }
.quotes.side { display: grid; }
@media (min-width: 761px) { .quotes.side { grid-template-columns: 1fr 1fr; column-gap: var(--pair-gap); } }
/* quotes: hand-drawn ink quote marks instead of a side line. The opening one hangs in the margin,
   the closing one follows the last word; both pop in with the quote and boil while it's hovered. */
blockquote { position: relative; padding-left: 1.9em; }
.nb { white-space: nowrap; }   /* the closing mark stays with the last word */
.qm { overflow: visible; pointer-events: none; --qd: .2s; }
.qm path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .45s cubic-bezier(.4,.1,.3,1) calc(var(--qd) + var(--j) * .18s); }
.qm-open { position: absolute; left: 0; top: .1em; width: 1.5em; height: 1.03em; }
.qm-close { display: inline-block; width: 1em; height: .69em; margin-left: .2em; vertical-align: .3em; rotate: 180deg; --qd: .7s; }
blockquote.in .qm path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .qm path { stroke-dashoffset: 0; transition: none; } }

/* a statement set apart: centred, between two short brush lines ("The vision") */
.pull { align-items: center; gap: 16px; text-align: center; }
.pull > .t-caps { color: var(--soft); margin-bottom: calc(var(--head-gap) - 16px); }
.pull .t-pull { text-wrap: balance; }
.pull-rule { width: 96px; height: 9px; overflow: visible; pointer-events: none; }
.pull-rule:first-child { margin-bottom: 16px; }
.pull-rule:last-child { margin-top: 16px; }

.alone { display: flex; justify-content: center; }   /* a question on its own between two sections */
.alone .t-pull { font-size: var(--fs-xl); line-height: 1.3; }
.alone.long .t-pull { font-size: var(--fs-lg); line-height: 1.45; text-wrap: pretty; }   /* a paragraph, not a question */

/* numbered steps, all open */
.steps { gap: var(--pair-gap); padding: 0; margin: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 39px 1fr; gap: 8px; align-items: baseline; }
.steps li > div { display: flex; flex-direction: column; gap: 4px; }

/* a word on the side */
.note { position: relative; display: flex; flex-direction: column; gap: var(--sub-gap); padding-left: 39px; }
.note-rule { position: absolute; left: 8px; top: 0; width: 9px; height: 100%; overflow: visible; pointer-events: none; }
.note-top { display: none; position: absolute; left: 0; top: -4px; width: 100%; height: 9px; overflow: visible; pointer-events: none; }
@media (min-width: 1360px) {   /* room beside the text column */
  section:has(> .note-margin) { position: relative; }
  .note-margin { position: absolute; left: calc(50% + var(--col) / 2 + 48px); top: 0; width: 240px; padding: 24px 0 0; }
  .note-margin .note-rule { display: none; }
  .note-margin .note-top { display: block; }
}

/* numbers that matter: a brush line over each, the number large, what it counts under it */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pair-gap); padding: 0; list-style: none; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stats .t-note { text-wrap: balance; }
.stats li { position: relative; display: flex; flex-direction: column; gap: 8px; padding-top: 24px; }
.stat-rule { position: absolute; left: 0; top: -4px; width: 100%; height: 9px; overflow: visible; pointer-events: none; }
.bullets { gap: 16px; padding: 0; list-style: none; }
.bullets li { position: relative; padding-left: 39px; }
.dash { position: absolute; left: 0; top: calc(.7em - 4px); width: 20px; height: 9px; overflow: visible; pointer-events: none; }

/* many pictures as one */
.grid { gap: 16px; }
.grid-row { display: grid; gap: 16px; }
.grid-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-row img { display: block; width: 100%; height: auto; }
.grid-row:is(.cols-3, .cols-4) img { aspect-ratio: var(--ar); object-fit: cover; }   /* a row of one keeps the picture's own shape */

/* a small square picture with its point beside it */
.picrows { gap: var(--pair-gap); }
.picrow { display: grid; grid-template-columns: 160px 1fr; gap: var(--pair-gap); align-items: center; }
.picrow img { display: block; width: 100%; height: auto; }
.picrow > div { display: flex; flex-direction: column; gap: 4px; }

/* short points side by side, or each under its own square picture */
.textcols, .cards { display: grid; gap: 40px var(--pair-gap); }
.textcols > div, .card > div { display: flex; flex-direction: column; gap: 8px; }
.pic-icon { width: 40px; height: 40px; margin: 8px 0 20px -4px; fill: none; stroke: currentColor; stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; }
.card { display: flex; flex-direction: column; gap: 16px; }
.card img { display: block; width: 100%; height: auto; }
@media (min-width: 761px) { :is(.textcols, .cards).n-2 { grid-template-columns: 1fr 1fr; } .textcols.n-3 { grid-template-columns: repeat(3, 1fr); } :is(.textcols, .cards).n-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 904px) { :is(.textcols, .cards).n-4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .cards.n-4 .card { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: center; } }

.prose p + p { margin-top: 1em; }
/* a title inside a section: more space above than between blocks, less below */
section > .head:has(+ .move) { margin-bottom: 0; }
section > .move { margin-top: calc(var(--move-gap) - var(--block-gap)); margin-bottom: calc(var(--head-after) - var(--block-gap)); }
section > .head + .move { margin-top: calc(var(--head-gap) - var(--block-gap)); }   /* right under a label with no title of its own: it's that title */

/* phone screens in a row, a short note under each */
.phones { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--pair-gap); }
.phones figure { gap: 16px; }
.phones .frame img { aspect-ratio: 423 / 725; object-fit: contain; }   /* same height, so the notes line up */
.phones figcaption { text-align: left; display: flex; flex-direction: column; gap: 4px; color: var(--ink); }

/* before and after: two phones together, their notes on the outer sides */
.marked { display: flex; flex-direction: column; gap: 72px; }
.mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.marked figure { position: relative; display: flex; flex-direction: column; gap: 20px; }
.screen { position: relative; }
.screen img { display: block; width: 108%; max-width: none; height: auto; margin-left: -2.7%; aspect-ratio: 423 / 725; object-fit: contain; }
.marked figcaption { margin-top: 4px; text-align: left; }
.marked ul { padding: 0; list-style: none; display: flex; flex-direction: column; gap: 20px; }
.marked .t-note { line-height: 1.35 !important; text-wrap: pretty; }   /* tight lines, wide gaps: each note reads as one thing */
.leads { display: none; }
.marked .pin, .mswitch, .mfold { display: none; }   /* only in the modern look's ?ba=list / tabs (modern.css) */
@media (min-width: 601px) and (max-width: 903px) {   /* no room for notes on both sides: the two phones stay together and the notes go beside them, under the phone's name */
  .mrow { grid-template-columns: minmax(0, 25fr) minmax(0, 25fr) minmax(0, 46fr); grid-template-rows: auto 1fr; column-gap: 20px; row-gap: 40px; align-items: start; }
  .marked figure { display: contents; }
  .marked .shot { grid-row: 1 / span 2; grid-column: 1; }
  .marked figure + figure .shot { grid-column: 2; }
  .marked ul { grid-column: 3; margin-left: 24px; padding-top: 16px; gap: 12px; border-top: 1px solid color-mix(in srgb, var(--ink) 16%, var(--paper)); }
  .marked ul::before { content: attr(data-t); font: 400 var(--fs-md)/1.3 var(--sans); color: var(--ink); }
}
@media (min-width: 904px) {
  .marked figure { display: grid; grid-template-columns: minmax(0, 1fr) 48%; gap: 52px; align-items: start; }
  .marked .shot { grid-column: 2; grid-row: 1; }
  .marked ul { grid-column: 1; grid-row: 1; position: relative; }
  .marked figure + figure { grid-template-columns: 48% minmax(0, 1fr); }
  .marked figure + figure .shot { grid-column: 1; }
  .marked figure + figure ul { grid-column: 2; }
  .marked li { position: absolute; left: 0; right: 0; }
  .leads { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
  .leads path { fill: none; stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1; }
  .leads circle { fill: var(--ink); stroke: var(--paper); stroke-width: 2; }
}

/* screens joined by arrows, a line of text under each */
.flow-in { position: relative; }
.flow ol { position: relative; padding: 0; list-style: none; min-height: 140px; }
.flow li { position: absolute; top: 12px; }

/* before and after on top of each other */
@property --x { syntax: "<percentage>"; inherits: true; initial-value: 45%; }
.compare .frame { --x: 45%; position: relative; overflow: hidden; border-radius: var(--pic-r); }
.compare .frame img { aspect-ratio: 1520 / 1080; object-fit: cover; object-position: top; user-select: none; }
.compare .frame img + img { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--x)); }
.compare .cut { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: var(--ink); box-shadow: 0 0 0 1px var(--paper); pointer-events: none; }
.compare .cut svg { position: absolute; left: 50%; top: 50%; width: 52px; height: 32px; padding: 9px 12px; box-sizing: border-box; transform: translate(-50%, -50%); background: var(--ink); border-radius: 16px; box-shadow: 0 0 0 1px var(--paper); transition: transform .2s ease; }
.compare .cut path { fill: none; stroke: var(--paper); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.compare .frame:has(input:focus-visible) { outline: 1.5px solid var(--ink); outline-offset: 4px; }
.compare figcaption { display: flex; justify-content: space-between; gap: 20px; }
html.rv-on .compare:not(.in) .frame { --x: 100%; }   /* all of the first one, for a moment, then the line sweeps back over it */
html.rv-on .compare:not(.held) .frame { transition: --x 1.4s cubic-bezier(.65,0,.2,1) 1.4s; }
@media (hover: hover) { .compare .frame:hover .cut svg { transform: translate(-50%, -50%) scale(1.08); } }
@media (max-width: 760px) { .marked { gap: 48px; } .mrow { gap: 20px; } }

/* pictures wider than their frame, scrolled sideways */
.pan { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.pan::-webkit-scrollbar { display: none; }
/* room for the shadow, which a scrolling box would cut off */
:is(.fig-pan, .strip.slides) .pan { padding-block: 8px 32px; margin-block: -8px -32px; }
@media (min-width: 761px) { .fig-pan .pan { overflow: visible; } }   /* fits there, nothing to scroll */
@media (min-width: 1400px) { .strip.slides .pan { padding-left: 24px; margin-left: -24px; } }
.pan:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 4px; }
main { overflow-x: clip; }
/* the strip runs from the pictures' left edge out to the right edge of the window */
.strip { align-self: flex-start; width: calc(100% + (100vw - 100%) / 2); gap: 24px; }
.strip .pan { cursor: grab; padding-right: var(--gut); }
.strip .pan.drag { cursor: grabbing; }
.strip .pan img { width: auto; height: 480px; max-width: none; user-select: none; }
.strip.scrolled .pan { mask-image: linear-gradient(90deg, transparent, #000 48px); }
@media (max-width: 1399px) {   /* no contents rail there, so it can run from edge to edge */
  .strip { width: 100vw; margin-left: calc((100% - 100vw) / 2); }
  .strip .pan { padding-inline: calc((100vw - min(100vw - 2 * var(--gut), var(--wide))) / 2); }
  .strip.scrolled .pan { mask-image: none; }
  .strip .pan-btns { margin-left: calc((100vw - min(100vw - 2 * var(--gut), var(--wide))) / 2); }
}
/* a deck: slides side by side, room at the end for the last one to come to the left edge */
.slides { --slide: min(800px, 86vw); gap: 16px; }
.slides .pan { display: flex; gap: 16px; padding-right: calc(100% - var(--slide)); }
.strip.slides .pan img { flex: none; width: var(--slide); height: auto; }
.strip.slides.scrolled .pan { mask-image: none; }
.slides figcaption, .slides-foot { width: 100%; max-width: var(--wide); }
.slides-foot { display: flex; align-items: center; justify-content: space-between; min-height: 38px; }
@media (hover: none) { .slides .pan { scroll-snap-type: x mandatory; } .slides .pan img { scroll-snap-align: start; scroll-margin-left: var(--pl, 0px); } }
@media (max-width: 1399px) {
  .slides { --pl: calc((100vw - min(100vw - 2 * var(--gut), var(--wide))) / 2); }
  .strip.slides .pan { padding-inline: var(--pl) calc(100% - var(--slide) - var(--pl)); }
  .slides figcaption, .slides-foot { margin-left: var(--pl); max-width: calc(100vw - 2 * var(--pl)); }
  .strip.slides .pan-btns { margin-left: 0; }
}
/* photos in one line */
.film .pan { display: flex; gap: 12px; padding-block: 2px; }
.strip.film .pan img { flex: none; height: 400px; width: auto; }
.film .pan img.stage { margin-left: 40px; }
@media (max-width: 760px) { .strip.film .pan img { height: 300px; } .film .pan { gap: 8px; } .film .pan img.stage { margin-left: 24px; } }
.pan-btns { display: flex; gap: 12px; }
.pan-btn { position: relative; isolation: isolate; appearance: none; background: none; border: 0; padding: 0; width: 60px; height: 38px; color: var(--ink); cursor: pointer; transition: color .15s ease, opacity .2s ease; }
.pan-btn:disabled { opacity: .3; cursor: default; }
.pan-arrow { display: block; width: 36px; height: 26px; margin: auto; }
.pan-arrow path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pan-btn:not(:disabled):is(:focus-visible, :active) { color: var(--paper); outline: none; }
.pan-btn:not(:disabled):is(:focus-visible, :active) .back-box path { fill: var(--ink); }
@media (hover: hover) {
  .pan-btn:not(:disabled):hover { color: var(--paper); }
  .pan-btn:not(:disabled):hover .back-box path { fill: var(--ink); }
}
@media (hover: none) { .pan-btns { display: none; } }

/* Deliverables (text beside video) */
.works { gap: var(--works-gap); }
.work { display: grid; grid-template-columns: 336fr 640fr; gap: var(--work-gap); align-items: center; }
.work > div { display: flex; flex-direction: column; gap: var(--sub-gap); }
.work p + p { margin-top: calc(var(--sub-gap) * -1 + 1em); }

/* ---- contents rail (wide screens) ---- */
.toc { position: fixed; left: var(--gut); top: 50%; transform: translateY(-50%); z-index: 4; margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 14px; opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.toc.on { opacity: 1; pointer-events: auto; }
.toc a { display: flex; gap: 10px; text-decoration: none; color: var(--soft); transition: color .2s ease; }
.toc a[aria-current="true"], .toc a:hover { color: var(--ink); }
/* the section you're in (and the one hovered) gets the brush line underneath, drawn in left to right */
.toc .ul-text { position: relative; }
.toc .hand-ul path { transition: stroke-dashoffset .18s ease-in; }
.toc a:is([aria-current="true"], :hover, :focus-visible) .hand-ul path { stroke-dashoffset: 0; transition: stroke-dashoffset .4s cubic-bezier(.3,.6,.3,1); }
@media (max-width: 1399px) { .toc { display: none; } }

/* ---- the gate of a locked case (lock.js) ---- */
/* where the case is cut: the perforation it was torn off along, and a button to bring the sheet back */
.stub { gap: 20px; align-items: flex-start; margin-top: calc(var(--move-gap) - var(--section-gap)); }
.stub p { color: var(--soft); }
.perf { align-self: stretch; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 9px, transparent 9px 16px); margin-bottom: 12px; }
/* the sheet: a pop-up over the blurred page (the homepage's veil), one square of its toilet paper */
html.gated { overflow: hidden; padding-right: var(--bar-w, 0px); }
dialog.gate { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 24px 16px; border: 0; background: none; color: var(--ink);
  overflow: hidden auto; overscroll-behavior: contain; }
dialog.gate[open] { display: flex; }
dialog.gate::backdrop { background: none; }
.gate-veil { position: fixed; inset: 0; background: rgba(255, 255, 255, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet { position: relative; isolation: isolate; width: 100%; max-width: 520px; margin: auto; outline: none; will-change: transform; }
.sheet-paper { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sheet-paper path { fill: none; stroke: var(--ink); stroke-width: 1.8px; stroke-linejoin: round; stroke-linecap: round; }
.sheet-paper .edge { fill: var(--paper); }
.sheet-paper .crease { stroke-width: 1px; }
.sheet form { display: flex; flex-direction: column; padding: 48px 32px 44px; }
.sheet-corner { display: flex; justify-content: space-between; align-items: center; text-transform: none; }
.sheet-title { font: 400 34px/1.2 var(--mono); margin: 56px 0 12px; }
.sheet .t-caption { color: var(--soft); }
.sheet.vacant .sheet-title + p { visibility: hidden; }
.gate-row { display: flex; gap: 12px; margin-top: 32px; }
.gate-field, .gate-btn { position: relative; isolation: isolate; height: 52px; }
.gate-field { flex: 1; min-width: 0; }
.gate-field .back-box { left: -1.6%; width: 103.2%; }   /* the box is drawn a little inside its frame, which shows when it's this wide */
.gate-field input { appearance: none; width: 100%; height: 100%; padding: 0 20px; border: 0; border-radius: 0; background: none; color: var(--ink); font: 400 16px/1 var(--mono); outline: none; }
.gate-field input::placeholder { color: var(--soft); opacity: 1; }
.gate-field:focus-within .back-box path { stroke-width: 2.6px; }
.gate-btn { appearance: none; background: none; border: 0; padding: 0 28px; color: var(--ink); font-size: var(--fs-sm); text-indent: .14em; cursor: pointer; transition: color .15s ease; }
.gate-btn:disabled { cursor: default; opacity: .5; }
.gate-btn:not(:disabled):is(:focus-visible, :active) { color: var(--paper); outline: none; }
.gate-btn:not(:disabled):is(:focus-visible, :active) .back-box path { fill: var(--ink); }
@media (hover: hover) { .gate-btn:not(:disabled):hover { color: var(--paper); } .gate-btn:not(:disabled):hover .back-box path { fill: var(--ink); } }
.sheet .gate-msg { min-height: 1.5em; margin-top: 12px; color: var(--ink); }
/* the cross: bigger to tap than it's drawn; heavier when hovered */
.sheet-close { display: grid; place-items: center; width: 44px; height: 44px; margin: -14px -12px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; outline: none; }
.sheet-close svg { width: 20px; height: 20px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.2px; stroke-linecap: round; transition: stroke-width .15s ease; }
.sheet-close:focus-visible svg { stroke-width: 4px; }
@media (hover: hover) { .sheet-close:hover svg { stroke-width: 4px; } }
@keyframes gate-no { 20% { transform: translateX(-9px) rotate(-.7deg); } 45% { transform: translateX(8px) rotate(.6deg); } 70% { transform: translateX(-5px) rotate(-.3deg); } 88% { transform: translateX(2px); } }
.sheet.wrong { animation: gate-no .4s ease; }
@media (max-width: 480px) {
  .sheet form { padding: 44px 24px 40px; }
  .sheet-title { font-size: 28px; margin-top: 40px; }
  .gate-row { flex-direction: column; }
  .gate-field { flex: none; }
  .gate-row .gate-btn .back-box { left: -1.6%; width: 103.2%; }   /* as wide as the field above it */
}
@media (prefers-reduced-motion: reduce) { .sheet.wrong { animation: none; } }

/* ---- End ---- */
.end { gap: var(--end-gap); align-items: center; margin: calc(var(--end-above) - var(--section-gap)) 0 calc(var(--end-below) - var(--page-bottom)); }   /* END in case.js */
/* the way home: the homepage's toilet roll (case.js, wireRoll) */
.home { display: block; padding: 8px; margin: -8px; }   /* a little more to press than is drawn */
.home:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 2px; }
.roll { display: block; height: var(--end-roll); width: auto; overflow: visible; }
/* the last line; its glitch layers lie over it (case.js, wireThanks) */
.thanks { text-align: center; font-size: var(--end-text); }
main:has(.stub) .thanks { display: none; }   /* nothing's been read yet while the case is locked */
.say { position: relative; display: inline-grid; justify-items: center; cursor: default; white-space: nowrap; }
.say code { font: 400 .84em/1.2 var(--mono); letter-spacing: -.02em; padding: .1em .28em; border-radius: 3px; background: var(--ink); color: var(--paper); }
.say .glitch { position: absolute; inset: 0; pointer-events: none; }
.say .glitch > span { position: absolute; inset: 0; color: var(--ink); }
.say .ghost { mix-blend-mode: multiply; }
.say .ghost code { background: none; color: inherit; }
.say .glitch i { position: absolute; }

/* words come up softly as you reach them */
/* Scroll to appear, as on the old site: each block rises 18px and fades in once, slowly, on the old site's
   curve; pictures only fade (travel makes big boxes feel heavy). An animation, not a transition, so a block
   that's already on screen when the page opens still plays it. Hidden only once the script has run (html.rv-on). */
@keyframes rv-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rv-fade { from { opacity: 0; } to { opacity: 1; } }
html.rv-on .rv { opacity: 0; }
html.rv-on .rv.in { animation: rv-rise var(--rise-dur) var(--rise-ease) var(--rise-delay, 0s) both; }
html.rv-on :is(figure, .pair, .phones, .grid, .mrow).rv.in { animation-name: rv-fade; }

@media (max-width: 760px) {
  .pair { grid-template-columns: 1fr; }
  .work { grid-template-columns: 1fr; gap: 20px; }
  /* phone screens: one a row, the note beside it */
  .phones { grid-template-columns: 1fr; gap: 32px; }
  .phones figure { display: grid; grid-template-columns: 5fr 6fr; gap: 20px; align-items: center; }
  .stats { grid-template-columns: 1fr; gap: 40px; }
  .stats.four { grid-template-columns: 1fr 1fr; gap: 40px 20px; }
  .grid, .grid-row { gap: 8px; }
  .grid-row.cols-4 { grid-template-columns: 1fr 1fr; }
  .picrow { grid-template-columns: 96px 1fr; gap: 20px; }
  .bullets li { padding-left: 32px; }
  .strip .pan img { height: 360px; }
  .fig-pan { width: 100vw; max-width: none; margin-inline: calc((100% - 100vw) / 2); }
  .fig-pan .pan { padding-inline: var(--gut); }
  .fig-pan figcaption { padding-inline: var(--gut); }
  .flow .flow-in { width: 900px; }
  .fig-pan.flow .pan img { width: 100%; height: auto; }
  .fig-pan .pan img { width: auto; height: 320px; max-width: none; }
}
