/* The Better Totes case study as a deck. cm.css (the ClearMile deck's system, copied as it is so the engine stays the
   same on every deck) does the grounds, masthead, deck, type, device frames, motion and the close; this file adds
   Better Totes: its colours, and its own screens. The opening, the facts, What I did, how we could work together and
   the close reuse ClearMile's layouts; the rest are new here:
   the idea and the approach (a photograph and the words), the two sizes, the colour engine, the content (five reels
   and three posts), the detail, finding its people, Spotted in the wild and the result. */

:root {
  --pink: #FC6396;
  --purple: #AC4DBA;
  /* the purple, deepened so it reads as text on the light grounds and on the fluro (7:1 on bone) */
  --purple-d: #7A2D88;
  --fluro: #98FF98;
  /* the store's plum (the Clay colourway's print): the dark ground, chalk and fluro on it */
  --plum: #651653;
  --plum-2: #DCCBD3;
}

/* ---------- grounds ---------- */
.t-pink  { --bg: var(--pink); --fg: var(--ink); --fg2: var(--ink); --acc: var(--ink); --rule: rgba(22, 20, 18, .24); --bb: var(--ink); --bf: var(--bone); --bh: var(--bone); --bhf: var(--ink); }
.t-bone, .t-paper { --acc: var(--purple-d); }
.t-white { --bg: #FFFFFF; --fg: var(--ink); --fg2: var(--ink-2); --acc: var(--purple-d); --rule: rgba(22, 20, 18, .14); }
.t-fluro { --bg: var(--fluro); --fg: var(--ink); --fg2: #2E3A2E; --acc: var(--purple-d); --rule: rgba(22, 20, 18, .2); }
.t-plum  { --bg: var(--plum); --fg: var(--chalk); --fg2: var(--plum-2); --acc: var(--fluro); --rule: rgba(243, 239, 231, .2); }
::selection { background: var(--purple-d); color: #fff; }
.t-plum .ph-in { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .2), 0 0 0 1px rgba(0, 0, 0, .35), 0 24px 44px -18px rgba(0, 0, 0, .6); }

/* =====================================================================
   1 · The opening: as ClearMile's, on the tile's pink; the phone is the store's product page (900 by 1948)
   ===================================================================== */
.op .pc-b { --pw: min(54cqw, calc(88cqh / 2.09)); }
.op .pc-b .scrn { aspect-ratio: 900 / 1948; }

/* 2 · the facts on the pink: ink rules */
.t-pink .fr::before { background: rgba(22, 20, 18, .34); }
.t-pink .fr:first-child::before, .t-pink .facts::after { background: var(--ink); }
.t-pink .fr dt { color: var(--ink); }

/* =====================================================================
   3, 4 and 8 · A photograph and the words: on a phone the photograph takes the room the words leave (the detail puts
   its words first); on a desktop they stand side by side
   ===================================================================== */
.duo { padding-bottom: var(--pb); }
.du-p { flex: 1 1 0; min-height: clamp(150px, 26svh, 1000px); margin-bottom: clamp(14px, 2.4svh, 24px); }
.du-t { flex: 0 0 auto; }
.du-zip .du-p { margin: clamp(14px, 2.4svh, 24px) 0 0; }
.photo { position: relative; height: 100%; overflow: hidden; border-radius: 10px; background: rgba(22, 20, 18, .06); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.du-idea .photo img { object-position: 50% 42%; }
.du-appr .photo img { object-position: 62% 38%; }
.du-zip .photo img { object-position: 40% 50%; }
.duo .hx { margin-top: clamp(6px, 1.2svh, 12px); font-size: min(7.4vw, 3.9svh); line-height: 1.04; }
.duo .body { margin-top: clamp(10px, 1.6svh, 16px); font-size: clamp(16px, 2.05svh, 18px); line-height: 1.5; max-width: 34em; }
.duo .body + .body { margin-top: clamp(6px, 1svh, 10px); }
.du-appr .hx, .du-zip .hx { font-size: min(9.4vw, 4.8svh); line-height: 1.02; }
.du-appr .body { font-size: clamp(16px, 2.3svh, 20px); }

/* =====================================================================
   5 · The two sizes, on white: the Big Bondi up on the left, the Little Bondi lower on the right, at one scale
   ===================================================================== */
.sz { padding-bottom: var(--pb); }
.sz .hx { margin-top: clamp(6px, 1.2svh, 12px); font-size: min(7.6vw, 3.9svh); line-height: 1.04; }
.sz-p { position: relative; flex: 1 1 0; min-height: 0; margin-top: clamp(10px, 2svh, 22px); container-type: size; }
.sz-p figure { position: absolute; display: flex; flex-direction: column; align-items: center; }
.sz-p img { width: 100%; height: auto; aspect-ratio: 1; mix-blend-mode: multiply; }
.sz-p .cap { margin-top: -3%; }
.sz-b { --w: min(88cqw, calc((100cqh - 40px) * .6)); left: -2cqw; top: 0; width: var(--w); }
.sz-l { --w: calc(min(88cqw, calc((100cqh - 40px) * .6)) * .84); right: -2cqw; bottom: 0; width: var(--w); }

/* =====================================================================
   6 · The colour engine: the store's colourways fill the screen (field = the print, words = the bag's ink); a tap
   anywhere floods the next one out from the finger and the bag drops into it
   ===================================================================== */
.cw { --acc: var(--fg); --fg2: var(--fg); background: var(--f); color: var(--fg); padding-bottom: var(--pb); transition: color .26s ease .3s; }
.fl-base, .fl-new { position: absolute; inset: 0; background: var(--f); }
/* (the class is "flood", not the current page's "run": cm.css already uses .run for ClearMile's nineteen days) */
.fl-new { z-index: 2; visibility: hidden; clip-path: circle(0 at var(--fx, 50%) var(--fy, 50%)); }
.fl-new.flood { visibility: visible; clip-path: circle(var(--fr, 150%) at var(--fx, 50%) var(--fy, 50%)); transition: clip-path 760ms cubic-bezier(.6, 0, .3, 1); }
.fl-bag { position: absolute; left: 50%; top: 57%; width: min(88vw, 47svh); height: auto; max-width: none; transform: translate(-50%, -50%); filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .16)); }
.fl-new.flood .fl-bag { animation: fl-drop 980ms cubic-bezier(.2, .9, .3, 1.12) both; }
@keyframes fl-drop { from { transform: translate(-50%, -62%) rotate(-8deg) scale(.92); } to { transform: translate(-50%, -50%) rotate(0) scale(1); } }
.fl-t { position: relative; z-index: 4; pointer-events: none; }
.cw .hx { margin-top: clamp(6px, 1.2svh, 12px); font-size: min(7.6vw, 3.9svh); line-height: 1.04; max-width: 13em; }
.fl-hit {
  position: absolute; inset: 0; z-index: 3; margin: 0; padding: 0; border: 0; background: none; color: transparent; font-size: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.fl-hit:focus-visible { outline: 2px solid var(--fg); outline-offset: -10px; border-radius: 14px; }
.fl-foot {
  position: absolute; z-index: 4; left: var(--m); right: var(--m); bottom: var(--pb); display: flex; flex-direction: column; gap: 6px; pointer-events: none;
  font-family: var(--font-mono); font-size: .75rem; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase;
}
.fl-tap { display: flex; align-items: center; gap: 10px; }
.fl-dot { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; position: relative; }
.fl-dot::after { content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: currentColor; }
.fl-now { display: flex; justify-content: space-between; gap: 16px; }
/* the count stays on one line ("1 / 9"), the name wraps first */
.fl-n { flex: 0 0 auto; white-space: nowrap; }
html:not(.js) .fl-hit, html:not(.js) .fl-tap { display: none; }

/* =====================================================================
   7 · The content: the five reels in phone frames, then three posts as a row of the grid. On a phone the reels stand
   as a fan, the middle one in front; on a desktop they stand in a row under the words and the posts
   ===================================================================== */
.ct { padding-bottom: var(--pb); }
.ct .hx { margin-top: clamp(6px, 1.2svh, 12px); font-size: min(7.6vw, 3.9svh); line-height: 1.04; }
.ct-r { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; margin-top: clamp(10px, 2svh, 22px); }
.ct-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.ct .cap { color: var(--fg2); }
.reels { --P: min(50cqw, calc(100cqh / 1.728)); --step: calc((50cqw - var(--P) * .37) / 2); position: relative; flex: 1 1 0; min-height: 0; margin-top: 8px; container-type: size; }
.rl { --s: 1; position: absolute; left: 50%; top: 50%; z-index: 3; }
/* each reel stands at its place in the fan (--k, from -2 to 2, set in the page and moved by bt.js) and at its depth
   (data-pos: 0 in front, 1 and 2 behind); it travels and grows on transforms only */
.rl .ph { --pw: var(--P); margin: calc(var(--pw) * -.864) 0 0 calc(var(--pw) * -.5); transform: translate3d(calc(var(--k) * var(--step)), 0, 0) scale(var(--s)); transition: transform .7s var(--e-out); }
.rl[data-pos="1"] { --s: .86; z-index: 2; }
.rl[data-pos="2"] { --s: .74; z-index: 1; }
/* on an upright phone a reel behind is a button: a tap brings it to the front (bt.js); the one in front does nothing */
.rl-go { position: absolute; inset: 0; z-index: 3; margin: 0; padding: 0; border: 0; border-radius: calc(var(--pw) * .15); background: none; color: transparent; font-size: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rl-go[aria-current] { cursor: default; }
.rl-go:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; }
@media (min-width: 1024px), (min-width: 560px) and (max-height: 520px) { .rl-go { display: none; } }
.rl .scrn { aspect-ratio: 9 / 16; background: #EDEBE8; }
.rl:nth-child(3) .scrn, .rl:nth-child(5) .scrn { background: #1C1C1E; }
.rl video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ct-g { flex: 0 0 auto; margin-top: clamp(12px, 2svh, 22px); }
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.posts li { border-radius: 6px; overflow: hidden; background: rgba(243, 239, 231, .08); }
.posts img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }

/* the pause control (as the homepage wall's): moving pictures that last longer than five seconds can always be stopped */
.pause {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 12px;
  border: 0; border-radius: 999px; background: var(--chalk); color: var(--plum);
  font: 500 .875rem/1 var(--font-text); cursor: pointer;
}
.pause[hidden] { display: none; }
.pause .ic { fill: currentColor; }
.pause .i-play, .pause[data-state="paused"] .i-pause { display: none; }
.pause[data-state="paused"] .i-play { display: inline; }
.pause:focus-visible { outline-color: var(--chalk); outline-offset: 3px; }

/* =====================================================================
   9 · Finding its people: the words and the slate, then the shop and the market side by side in the room left
   ===================================================================== */
.pp { padding-bottom: var(--pb); }
.pp .hx { margin-top: clamp(6px, 1.2svh, 12px); font-size: min(9vw, 4.6svh); line-height: 1.02; }
.pp .body { margin-top: clamp(8px, 1.4svh, 16px); font-size: clamp(16px, 2.05svh, 18px); line-height: 1.48; max-width: 34em; }
.slate { margin-top: clamp(10px, 1.8svh, 18px); border-top: 1px solid var(--rule); }
.slate div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); column-gap: 10px; align-items: baseline; padding: clamp(5px, .9svh, 9px) 0; border-bottom: 1px solid var(--rule); }
.slate dt { font-family: var(--font-mono); font-size: .75rem; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; color: var(--fg2); }
.slate dd { font-weight: 500; font-size: 1.0625rem; letter-spacing: -.012em; line-height: 1.25; }
.pp-p { flex: 1 1 0; min-height: clamp(110px, 18svh, 1000px); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: clamp(12px, 2svh, 22px); }
.pp-p figure { display: flex; flex-direction: column; min-height: 0; }
.pp-p .photo { flex: 1 1 0; min-height: 0; height: auto; }
.pp-p .cap { margin-top: 6px; }
.pp-p figure:first-child .photo img { object-position: 40% 50%; }
.pp-p figure:last-child .photo img { object-position: 50% 62%; }

/* =====================================================================
   10 · Spotted in the wild: one customer's photo a screen, the place its subtitle; taps on either side go back and on
   ===================================================================== */
.sp { padding: 0; background: #1A1714; color: var(--chalk); --fg: var(--chalk); --fg2: rgba(243, 239, 231, .86); }
.sp-blur { display: none; }
.sp-pics { position: absolute; inset: 0; overflow: hidden; }
.sp-pics img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity 320ms ease; }
.sp-pics img.on { opacity: 1; }
.sp-pics img.sp-ont { object-position: 0% 50%; }
/* the shade at the top holds the masthead (the wordmark, How I work and the pill, in chalk) at AA over the brightest
   photo, then fades by a quarter of the way down */
.sp-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(14, 13, 12, .9) 0, rgba(14, 13, 12, .6) 26%, rgba(14, 13, 12, 0) 50%), linear-gradient(to bottom, rgba(14, 13, 12, .7) 0, rgba(14, 13, 12, .64) calc(var(--mast) + var(--sat)), rgba(14, 13, 12, 0) 26%); }
.sp-ticks { position: absolute; z-index: 5; left: var(--m); right: var(--m); top: calc(var(--mast) + var(--sat) + 2px); display: flex; gap: 4px; pointer-events: none; }
.sp-ticks i { flex: 1; height: 2px; border-radius: 1px; background: rgba(243, 239, 231, .34); transition: background .3s ease; }
.sp-ticks i.on, .sp-ticks i.seen { background: var(--chalk); }
.sp-back, .sp-next { position: absolute; z-index: 4; top: 0; bottom: 0; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sp-back { left: 0; width: 32%; cursor: w-resize; }
.sp-next { left: 32%; right: 0; cursor: e-resize; }
.sp-back:focus-visible, .sp-next:focus-visible { outline: 2px solid var(--chalk); outline-offset: -8px; border-radius: 12px; }
.sp-words { position: absolute; z-index: 5; left: var(--m); right: var(--m); bottom: var(--pb); pointer-events: none; }
.sp-lab { color: var(--fg2); font-weight: 400; }
.sp-place { margin-top: 6px; font-weight: 500; font-size: min(11vw, 6svh); letter-spacing: -.035em; line-height: 1; }
.sp-txt { margin-top: clamp(8px, 1.4svh, 12px); font-size: clamp(16px, 2.1svh, 18px); line-height: 1.45; color: var(--fg2); max-width: 22em; }

/* =====================================================================
   11 · The result: the first line as the heading, the other two under it, then the figures, ruled like the facts
   ===================================================================== */
.rs { padding-bottom: var(--pb); }
.rs .hx { margin-top: clamp(6px, 1.2svh, 12px); font-size: min(7.6vw, 4svh); line-height: 1.04; }
.rs .body { margin-top: clamp(8px, 1.4svh, 14px); font-size: clamp(16px, 2.05svh, 18px); line-height: 1.45; max-width: 34em; }
/* the ledger takes all the room the words leave; each figure is as large as its share of that room allows (four rows,
   each a label and a figure, --ov being what a row needs besides its figure), and never wider than the ledger */
.led { --ov: 38px; position: relative; flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; margin-top: clamp(10px, 1.6svh, 20px); container-type: size; }
.lr { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 8px 0 9px; }
.lr::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(22, 20, 18, .34); transform-origin: left center; }
.lr:first-child::before { height: 2px; background: var(--ink); }
.led::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); transform-origin: left center; }
.lr dt { margin-bottom: 3px; font-family: var(--font-mono); font-size: .75rem; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; }
.lr .fact { font-size: clamp(30px, min(20cqw, calc((100cqh - 4 * var(--ov) - 2px) / 3.72)), 112px); text-align: left; white-space: nowrap; }
/* each counting digit sits at the left of its own column, where the line put it (aligned otherwise, a narrow 1 slid
   across onto the digit after it) */
.lr .fact .fls { text-align: left; }
.lr .fact .fl { display: inline; }

/* =====================================================================
   12 · How we could work together, on the plum, and the way on to how I work
   ===================================================================== */
.ws .pts .n { color: var(--fluro); }
.hiw {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: clamp(46px, 6.4svh, 58px);
  font-size: clamp(1.0625rem, 2.3svh, 1.25rem); font-weight: 500; letter-spacing: -.015em; text-decoration: none;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.hiw .arr { font-size: 1.1em; color: var(--fluro); }
@media (hover: hover) and (pointer: fine) { .hiw:hover .arr { transform: translateX(6px); } .hiw:hover span:first-child { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1.5px; } }

/* =====================================================================
   Short phones: a little less of everything, so nothing is cut off
   ===================================================================== */
@media (max-width: 599px) and (max-height: 740px) and (min-height: 521px), (max-width: 559px) and (max-height: 520px) {
  .duo .hx, .sz .hx, .cw .hx, .ct .hx, .rs .hx { font-size: min(7vw, 3.8svh); }
  .du-appr .hx, .du-zip .hx { font-size: min(8.6vw, 4.6svh); }
  .duo .body, .pp .body, .rs .body { font-size: 16px; line-height: 1.42; }
  .pp .hx { font-size: min(8vw, 4.2svh); }
  .posts { gap: 5px; }
  .ct-g { margin-top: 10px; }
  .slate div { padding: 4px 0; }
  .led { --ov: 34px; }
  .lr { padding: 6px 0 7px; }
  .lr dt { margin-bottom: 2px; }
}

/* =====================================================================
   Desktop, and a phone on its side (cm.css): a short, wide window takes the same arrangement
   ===================================================================== */
@media (min-width: 1024px), (min-width: 560px) and (max-height: 520px) {
  /* 3, 4 and 8 · the words on one side, the photograph on the other, full height */
  .duo { grid-template-rows: minmax(0, 1fr); align-items: center; }
  .du-p { grid-row: 1; align-self: stretch; min-height: 0; margin: 0; }
  .du-t { grid-row: 1; }
  .du-idea .du-t { grid-column: 1 / 7; padding-right: 2vw; }
  .du-idea .du-p { grid-column: 7 / 13; }
  .du-appr .du-p { grid-column: 1 / 7; }
  .du-appr .du-t { grid-column: 8 / 13; }
  .du-zip .du-t { grid-column: 1 / 7; }
  .du-zip .du-p { grid-column: 7 / 13; margin: 0; display: flex; align-items: center; justify-content: center; container-type: size; }
  .du-zip .photo { height: auto; width: min(100cqw, 100cqh); aspect-ratio: 1; }
  .duo .hx { font-size: min(3.9vw, 6.8svh); }
  .du-appr .hx, .du-zip .hx { font-size: min(4.6vw, 8svh); }
  .duo .body { font-size: clamp(1.125rem, 2.4svh, 1.3125rem); max-width: 30em; margin-top: clamp(16px, 3svh, 30px); }
  .du-appr .body { font-size: clamp(1.125rem, 2.6svh, 1.4375rem); }

  /* 5 · the words on the left, the two sizes side by side on the right */
  .sz { grid-template-rows: minmax(0, 1fr); align-items: center; }
  .sz .did-t { grid-column: 1 / 6; grid-row: 1; padding-bottom: clamp(0px, 4svh, 48px); }
  .sz .hx { font-size: min(4vw, 6.8svh); }
  .sz-p { grid-column: 6 / 13; grid-row: 1; align-self: stretch; margin: 0; }
  .sz-b { --w: min(60cqw, calc((100cqh - 40px) * .9)); left: 0; top: auto; bottom: 6cqh; }
  .sz-l { --w: calc(min(60cqw, calc((100cqh - 40px) * .9)) * .84); right: 0; bottom: 6cqh; }

  /* 6 · the words on the left, the bag on the right */
  .cw { display: flex; flex-direction: column; justify-content: center; }
  .fl-t { width: min(34vw, 30rem); }
  .cw .hx { font-size: min(4vw, 7svh); }
  .fl-bag { left: 66%; top: 53%; width: min(44vw, 76svh); }
  .fl-foot { right: auto; width: min(34vw, 30rem); font-size: .78125rem; }

  /* 7 · the words and the posts across the top, the five reels in a row under them */
  .ct { grid-template-rows: auto minmax(0, 1fr); }
  .ct-t { grid-column: 1 / 7; grid-row: 1; align-self: end; }
  .ct .hx { font-size: min(3.4vw, 5.6svh); }
  .ct-g { grid-column: 8 / 13; grid-row: 1; margin: 0; container-type: inline-size; }
  .posts { width: min(100cqw, calc(26svh * 3 * .8 + 16px)); gap: 8px; }
  .ct-r { grid-column: 1 / 13; grid-row: 2; margin-top: clamp(14px, 2.6svh, 30px); }
  .reels { --gap: clamp(16px, 2vw, 32px); --P: min(calc((100cqw - 4 * var(--gap)) / 5), calc(100cqh / 1.728)); --step: calc(var(--P) + var(--gap)); margin-top: 6px; }
  .rl, .rl[data-pos] { --s: 1; }

  /* 9 · the words and the slate on the left, the shop and the market on the right */
  .pp { grid-template-rows: minmax(0, 1fr); align-items: center; }
  .pp-t { grid-column: 1 / 6; grid-row: 1; }
  .pp .hx { font-size: min(4.4vw, 7.6svh); }
  .pp .body { font-size: clamp(1.125rem, 2.4svh, 1.3125rem); max-width: 30em; margin-top: clamp(14px, 2.6svh, 26px); }
  .slate { margin-top: clamp(18px, 3svh, 32px); }
  .slate div { padding: clamp(8px, 1.4svh, 12px) 0; }
  .slate dd { font-size: 1.1875rem; }
  .pp-p { grid-column: 7 / 13; grid-row: 1; align-self: stretch; margin: 0; gap: var(--gut); }
  .pp-p .cap { margin-top: 10px; }

  /* 10 · the photo framed on the right over a blur of itself, the words on the left */
  .sp-blur { display: block; position: absolute; inset: 0; overflow: hidden; }
  .sp-blur img { position: absolute; inset: -10%; width: 120%; height: 120%; max-width: none; object-fit: cover; filter: blur(36px) saturate(1.2) brightness(.42); }
  .sp-pics { inset: auto; right: calc(var(--m) + 4vw); top: calc(var(--pt) + 14px); height: calc(100% - var(--pt) - 14px - var(--pb)); aspect-ratio: 4 / 5; border-radius: 8px; box-shadow: 0 30px 70px rgba(0, 0, 0, .5); }
  .sp-shade { display: none; }
  .sp-pics img.sp-ont { object-position: 12% 50%; }
  .sp-ticks { left: auto; right: calc(var(--m) + 4vw); top: calc(var(--pt) + 2px); width: calc((100svh - var(--pt) - 14px - var(--pb)) * .8); }
  .sp-words { left: var(--m); right: auto; width: min(34vw, 30rem); top: 50%; bottom: auto; transform: translateY(-50%); }
  .sp-place { font-size: min(5.6vw, 10svh); margin-top: 10px; }
  .sp-txt { font-size: clamp(1.125rem, 2.4svh, 1.3125rem); }
  .sp-lab { font-size: .78125rem; }

  /* 11 · the lines on the left, the figures ruled on the right */
  .rs { grid-template-rows: minmax(0, 1fr); align-items: center; }
  .rs-t { grid-column: 1 / 6; grid-row: 1; }
  .rs .hx { font-size: min(3.9vw, 6.8svh); }
  .rs .body { font-size: clamp(1.125rem, 2.4svh, 1.3125rem); max-width: 28em; margin-top: clamp(14px, 2.4svh, 24px); }
  .led { --ov: 52px; grid-column: 7 / 13; grid-row: 1; align-self: stretch; margin: 0; }
  .lr { padding: clamp(10px, 1.8svh, 18px) 0 clamp(8px, 1.4svh, 14px); }
  .lr dt { margin-bottom: 6px; font-size: .8125rem; }
  .lr .fact { font-size: clamp(40px, min(17cqw, calc((100cqh - 4 * var(--ov) - 2px) / 3.72)), 108px); }

  /* 12 · the way on to how I work under the points */
  .ws { grid-template-rows: auto minmax(0, 1fr) auto; }
  .hiw { grid-column: 2 / 11; grid-row: 3; font-size: clamp(1.25rem, 2.8svh, 1.5rem); min-height: clamp(58px, 7.6svh, 72px); border-bottom: 0; }
}

/* =====================================================================
   Tablets: the phone's layouts, with more room
   ===================================================================== */
@media (min-width: 600px) and (max-width: 1023px) and (min-height: 521px) {
  .duo .hx, .sz .hx, .cw .hx, .ct .hx, .rs .hx { font-size: min(5.6vw, 4.6svh); }
  .du-appr .hx, .du-zip .hx, .pp .hx { font-size: min(7vw, 5.4svh); }
  .reels { --P: min(30cqw, calc(100cqh / 1.728)); }
  .posts { width: min(100%, 520px); }
}

/* =====================================================================
   A phone on its side, or any window under 521px tall and 560px or more wide (cases/ENGINE.md): the desktop's
   arrangement (above, and cm.css's sideways block), sized to the short window. Every screen is exactly one window
   tall: the words on one side, the pictures on the other
   ===================================================================== */
@media (min-width: 560px) and (max-height: 520px) {
  .duo, .sz, .pp, .ct, .rs { --room: calc(100svh - var(--pt) - var(--pb)); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; align-items: center; }
  .duo, .sz, .pp, .rs { grid-template-rows: minmax(0, 1fr); }
  .duo .du-p, .duo .du-t, .sz .did-t, .sz-p, .pp-t, .pp-p, .rs-t, .led { grid-row: 1; }
  .duo .hx, .sz .hx, .cw .hx, .ct .hx, .rs .hx, .pp .hx { font-size: clamp(20px, 6svh, 26px); }
  .du-appr .hx, .du-zip .hx { font-size: clamp(22px, 7svh, 30px); }
  .duo .body, .du-appr .body, .pp .body, .rs .body, .sp-txt { font-size: 1rem; }
  /* 3, 4 and 8 · the photograph fills its side, the zip pocket's too */
  .du-p { height: var(--room); margin: 0; }
  .du-idea .du-t { grid-column: 1 / 7; }
  .du-idea .du-p { grid-column: 7 / 13; }
  .du-appr .du-p { grid-column: 1 / 6; }
  .du-appr .du-t { grid-column: 6 / 13; }
  .du-zip .du-t { grid-column: 1 / 7; }
  .du-zip .du-p { grid-column: 7 / 13; margin: 0; display: block; }
  .du-zip .photo { width: auto; height: 100%; aspect-ratio: auto; }
  .duo .body { margin-top: 10px; }
  /* 5 · the two sizes side by side, at one scale */
  .sz .did-t { grid-column: 1 / 6; padding-bottom: 0; }
  .sz-p { grid-column: 6 / 13; height: var(--room); margin: 0; display: flex; justify-content: center; align-items: center; gap: 2vw; }
  .sz-p figure { position: static; }
  .sz-b { width: min(52%, calc((var(--room) - 24px) * .86)); }
  .sz-l { width: calc(min(52%, calc((var(--room) - 24px) * .86)) * .84); }
  /* 6 · the words at the top left, the bag on the right */
  .cw { justify-content: flex-start; }
  .fl-bag { width: min(60vh, 46vw); left: 72%; top: 58%; }
  .fl-t { width: 48vw; }
  .fl-foot { right: auto; width: 46vw; font-size: .75rem; }
  /* 9 · the words and the slate, the shop over the market */
  .pp-t { grid-column: 1 / 9; }
  .pp-p { grid-column: 9 / 13; height: var(--room); margin: 0; grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .pp-p .cap { margin-top: 4px; }
  .pp .body { margin-top: 6px; line-height: 1.42; }
  .slate { margin-top: 10px; }
  .slate div { padding: 3px 0; }
  .slate dd { font-size: 1.0625rem; }
  /* 11 · the lines on the left, the figures ruled on the right */
  .rs-t { grid-column: 1 / 7; }
  .rs .body { margin-top: clamp(8px, 1.4svh, 14px); }
  .led { --ov: 26px; grid-column: 7 / 13; height: var(--room); margin: 0; }
  .lr { padding: 4px 0 2px; }
  .lr dt { margin-bottom: 0; font-size: .75rem; }
  .lr .fact { font-size: clamp(24px, min(15cqw, calc((100cqh - 4 * var(--ov) - 2px) / 3.72)), 64px); }
  /* 7 · the content: the words and the posts on the left, the five reels on the right as a fan, a screen high */
  .ct { grid-template-rows: auto minmax(0, 1fr); height: 100svh; }
  .ct-t { grid-column: 1 / 6; grid-row: 1; align-self: start; }
  .ct-g { grid-column: 1 / 6; grid-row: 2; align-self: end; margin: 0; }
  .ct-r { grid-column: 6 / 13; grid-row: 1 / 3; align-self: stretch; margin: 0; flex: 1 1 auto; }
  .reels { flex: 1 1 0; height: auto; --P: min(34cqw, calc(100cqh / 1.728)); --step: calc((50cqw - var(--P) * .37) / 2); }
  .rl { --s: 1; }
  .rl[data-pos="1"] { --s: .86; }
  .rl[data-pos="2"] { --s: .74; }
  .posts { width: 100%; }
  /* 1 · the opening: the name, the fact and the line on the left, the two pictures on the right */
  .op { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; grid-template-rows: minmax(0, 1fr); height: 100svh; padding: 0 var(--m); }
  .op-t { grid-column: 1 / 7; grid-row: 1; display: flex; flex-direction: column; justify-content: center; padding: var(--pt) 0 var(--pb); }
  .op .fact { font-size: min(10vw, 20svh); }
  .op .fact .fl { display: block; }
  .op .res { font-size: 16px; }
  .op-p { grid-column: 7 / 13; grid-row: 1; height: 100svh; margin: 0 calc(var(--m) * -1) 0 0; }
  .op .pc-a { left: 0; top: max(var(--pt), 16cqh); width: max(110cqw, 460px); }
  .op .pc-b { --pw: min(34cqw, 46cqh, 190px); right: calc(var(--m) + 2cqw); bottom: auto; top: max(28cqh, calc(100cqh - var(--pw) * 2.09 * .8)); }
  /* 10 · Spotted in the wild: the photo framed on the right over a blur of itself, the words on the left */
  .sp-blur img { filter: blur(30px) saturate(1.2) brightness(.42); }
  .sp-pics { right: var(--m); top: calc(var(--pt) + 10px); height: calc(100% - var(--pt) - 10px - var(--pb)); box-shadow: 0 24px 50px rgba(0, 0, 0, .5); }
  .sp-ticks { right: var(--m); width: calc((100svh - var(--pt) - 10px - var(--pb)) * .8); }
  .sp-words { width: 46vw; }
  .sp-place { font-size: clamp(28px, 10svh, 44px); margin-top: 6px; }
  .sp-lab { font-size: .75rem; }
  /* 12 · how we could work together, sized for the short window (the facts are cm.css's, ../FACTS.md) */
  .pts p { font-size: clamp(1rem, 5.2svh, 1.375rem); line-height: 1.2; }
  .hiw { min-height: clamp(36px, 10svh, 46px); font-size: 1rem; }
  /* 13 · the close is cm.css's, the same on every case study */
}

/* =====================================================================
   A window under 560px wide and 520px or less tall (a phone app in split screen): the phone's arrangement, and here
   only the screens grow to their content (cm.css), so the flexible parts take fixed heights and the type is set by
   the width alone. The words over the colour engine and over Spotted in the wild take a tap themselves (bt.js does
   the same with it), so each line can be read with nothing over it
   ===================================================================== */
@media (max-width: 559px) and (max-height: 520px) {
  .duo .hx, .sz .hx, .cw .hx, .ct .hx, .rs .hx { font-size: min(7vw, 30px); }
  .du-appr .hx, .du-zip .hx { font-size: min(8.6vw, 34px); }
  .pp .hx { font-size: min(8vw, 32px); }
  .bk .hx { font-size: min(8.8vw, 34px); }
  .du-p { flex: 0 0 auto; height: min(84vw, 300px); }
  .sz-p { flex: 0 0 auto; height: min(116vw, 420px); }
  .ct-r { flex: 0 0 auto; }
  .reels { flex: 0 0 auto; height: 300px; }
  .pp-p { flex: 0 0 auto; height: min(56vw, 240px); }
  .led { flex: 0 0 auto; height: 300px; }
  .sp-place { font-size: min(11vw, 48px); }
  .fl-t, .fl-foot, .sp-words { pointer-events: auto; }
}

/* =====================================================================
   Motion: the slate and the ledger's rules draw across as they land; reduced motion keeps everything still
   ===================================================================== */
.js .lr::before, .js .led::after { transform: scaleX(0); transition: transform .3s var(--e-in); }
.js .in .lr::before { transform: none; transition: transform 1.1s var(--e-out) calc(320ms + var(--li, 0) * 120ms); }
.js .in .led::after { transform: none; transition: transform 1.1s var(--e-out) 820ms; }
.lr:nth-child(2) { --li: 1; } .lr:nth-child(3) { --li: 2; } .lr:nth-child(4) { --li: 3; }
.rm .lr::before, .rm .led::after { transform: none !important; }
.rm .fl-new.flood { transition: none; }
.rm .fl-new.flood .fl-bag { animation: none; }
.rm .sp-pics img { transition: opacity .2s ease; }
.rm .hiw .arr { transition: none !important; }
.rm .rl .ph { transition: none; }
