/* ==========================================================================
   Self — case-study pages (Nichebox, APECS, Nebeus, HILO, PlanLab, Chop Chop, Kultura)
   Figma "Self-Reincarnations": frame A (the text large: the pictures' rail 389 wide), frame B (the pictures large: rail 971, paper 755) and frame C (the pictures
   full screen: rail 1728, the paper has gone out through the right edge).

   The page is a brown ground with three things on it, side by side:
     the rail     a stack of pictures, 389 / 971 / 1728 wide, with 1px of ground between the pictures (no corner radius)
     the divider  a 2px line, #c1c1c1, with the Texture effect (grain, noise size 7, radius 1); it replaced the perforated edge of the first template
     the paper    #e5e5e5, holding one column of text
   A page opens in frame A when it is a Tech project and in frame B when it is a Brand project (data-kind on .pj), and a CLICK moves it from one frame to the next
   (project.js: the small part grows when it is clicked; the full-screen frame C is switched off for now, FULL in project.js). The move is Figma's "Smart animate, Slow":
   a spring (stiffness 80, damping 20, mass 1) that Figma lists as 600 ms; 95 % of the way is made by then and the last of it settles by about 1.2 s.
   Everything that differs between the three frames hangs off ONE number, --pj-frame (0 = A, 1 = B, 2 = C), which eases on .pj; project.js only decides WHICH frame the page
   is in (data-state on .pj: text, visual, full).

   The two columns scroll apart. The rail is as tall as the window and stays where it is while the page goes by; its pictures scroll inside it, so the wheel over the
   pictures moves the pictures only and over the paper moves the text only. The last picture takes up what is left, so the ground beneath the pictures is never shown.
   Some pictures are the still of a short clip (a muted loop, lying over it): project.js loads it when its tile comes near and plays it while it is on screen.
   A row of the stack may hold two pictures (li.pj-pair; --a1 and --a2 are the pictures' proportions as plain numbers): one after the other in frame A, as in a single column, and side
   by side in frame B, at one height, their widths in their own proportions, with 1 design pixel of ground between them and neither cropped. The same number, --pj-frame, moves them
   from the one to the other. On a phone the pictures of a pair are just two more in the strip.

   The text block answers to the width of the paper, not to the window: that is why the narrow paper of frame B and a narrow window do the same thing.
     1. the paddings give way first: 314 left / 260 right in the 1337-wide paper of frame A, 32 / 32 in a paper of 827 (a straight line between), and 39 / 39 in frame B's
        755, whose column is 677 (the 7 more come in with --pj-frame, so that frame A and every window width keep what they had)
     2. the numbers 01, 02 ... sit 114 to the left of the column; as the left padding shrinks they slide towards the column and the headings drop to make room,
        until the numbers lie above their headings (frame B)
     3. then the column itself narrows, and the headline with it (66 holds down to a paper of 640, a column of 576, and goes on in step with it)
   Type does not scale below the design's 1728: 1 design pixel (--p) is 1px up to there and grows with the window above it.
   Schematics are pasted-in excerpts: they may leave the column (by up to 191 each side, frame A), scale with their own width, and re-flow when they get narrow.

   Text boxes in the design are trimmed to cap-height / baseline (Aguzzo: ascent .80, descent .26, cap .765): for size S and line height L the box loses
   (L/2 - .495 S) at the top and (L/2 - .27 S) at the bottom, which the margins below take back.
   ========================================================================== */

/* the number the click eases (see .pj); registered so that the browser can animate it, and inherited so that every column can read it */
@property --pj-frame { syntax: "<number>"; inherits: true; initial-value: 0; }
/* (the Home's cover and the News notice read --wide as well: its registration stays as it was) */
@property --wide { syntax: "<number>"; inherits: true; initial-value: 0; }
/* the schematics' line weight and dash, worked out once on the schematic's own type size (and rounded to whole pixels so that dashes stay crisp) */
@property --ln { syntax: "<length>"; inherits: true; initial-value: 1px; }
@property --d { syntax: "<length>"; inherits: true; initial-value: 2px; }

.view--project {
  --paper: #e5e5e5;
  --ground: #4f2917;
  --hair: rgba(0, 0, 0, .1);
  --p: max(1px, var(--u));                                               /* one design pixel */
  --medium: .017em;                                                      /* stand-in for Aguzzo Medium (not among the font files): a hairline round Regular's outlines */
  --bold: .04em;                                                         /* ... and for Bold */
  background: var(--ground); color: #000;
}
body[data-kind="project"] { background: var(--ground); }
/* the design's top bar is a fixed bar with its own dark fade, which stays on all the way down (over the light paper the white type needs it) */
body[data-kind="project"].is-past-hero .topbar::before { background: linear-gradient(to bottom, rgba(0, 0, 0, calc(.2 * var(--tn-fade, 1))), transparent); }

/* the page carries no dock (the design has none); it goes with the page change, on the same 0.3 s */
.dock { transition: opacity var(--pass-fade, 300ms) cubic-bezier(0, 0, .58, 1), visibility 0s linear 0s; }
body[data-kind="project"] .dock { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--pass-fade, 300ms) cubic-bezier(0, 0, .58, 1), visibility 0s linear var(--pass-fade, 300ms); }

/* a case study is one layer deeper than the page it was opened from: the top bar keeps the logo (top left) and gives its "Hi" to a close button (top right; pass.js takes the layer
   away again and returns to the place it came from). It all goes with the page change, on the same 0.3 s as the dock. */
.topbar__hi { transition: opacity var(--pass-fade, 300ms) cubic-bezier(0, 0, .58, 1), visibility 0s linear 0s; }
body[data-kind="project"] .topbar__hi { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--pass-fade, 300ms) cubic-bezier(0, 0, .58, 1), visibility 0s linear var(--pass-fade, 300ms); }
.topbar .topbar__close { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--pass-fade, 300ms) cubic-bezier(0, 0, .58, 1), visibility 0s linear var(--pass-fade, 300ms); }
body[data-kind="project"] .topbar .topbar__close { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity var(--pass-fade, 300ms) cubic-bezier(0, 0, .58, 1), visibility 0s linear 0s; }

/* ---------- The three columns ---------- */
.pj {
  --pj-frame: 0;                                                                /* 0 the text large (A) · 1 the pictures large (B) · 2 the pictures full screen (C) */
  --rail: calc((389 + 582 * min(var(--pj-frame), 1) + 757 * max(var(--pj-frame) - 1, 0)) * var(--u));         /* the rail's width: 389 · 971 · 1728 */
  display: flex; align-items: stretch; min-height: 100vh; min-height: 100svh;
  overflow-x: clip;                                                      /* in C the paper has gone out through the right edge: it is cut off there, and it leaves no scroll bar behind */
  background: var(--ground);
  transition: --pj-frame 1.2s cubic-bezier(.2, .85, .3, 1);                     /* Figma: smart animate, Slow (a spring: 600 ms to 95 %, 1.2 s to the last pixel) */
}
@supports (transition-timing-function: linear(0, 1)) {
  .pj { transition-timing-function: linear(0, 0.0213, 0.0726, 0.1402, 0.2149, 0.2911, 0.3652, 0.435, 0.4997, 0.5585, 0.6116, 0.6591, 0.7014, 0.7388, 0.7718, 0.8009, 0.8264, 0.8487, 0.8683, 0.8854, 0.9004, 0.9134, 0.9248, 0.9348, 0.9434, 0.951, 0.9576, 0.9633, 0.9683, 0.9727, 0.9765, 0.9798, 0.9827, 0.9852, 0.9874, 0.9893, 0.9909, 0.9924, 0.9936, 0.9947, 0.9957, 0.9965, 0.9972, 0.9979, 0.9984, 0.9989, 0.9993, 0.9997, 1); }   /* the spring itself, sampled */
}
.pj[data-kind="brand"] { --pj-frame: 1; }                                       /* a Brand project opens with the pictures large ... */
.pj[data-state="text"] { --pj-frame: 0; }                                       /* ... and from then on project.js says which of the three frames it is in */
.pj[data-state="visual"] { --pj-frame: 1; }
.pj[data-state="full"] { --pj-frame: 2; }
.pj[data-snap] { transition: none; }                                     /* a page that is being opened or put back is in its place at once */

/* ---------- The rail ---------- */
.pj-rail {
  position: sticky; top: 0; align-self: flex-start; flex: none;
  height: 100vh; height: 100svh;                                         /* as tall as the window: the pictures scroll inside it, on their own, apart from the text */
  overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain;                                          /* at the end of the pictures the wheel does not carry on to the page */
  scrollbar-width: none;
  overflow-anchor: none;                                                 /* project.js keeps the picture at the top of the rail in place while the rail grows; the browser must not do it twice */
  width: var(--rail);                                                    /* 389 · 971 · 1728 */
  outline: none; cursor: zoom-in;                                        /* a click gives the pictures more room (frame B: see below) */
}
.pj[data-state="full"] .pj-rail { cursor: zoom-out; }
.pj[data-state="visual"]:not([data-full]) .pj-rail { cursor: default; }  /* frame B with full screen off: nothing more to click the pictures for */
.pj-rail, .pj-read { -webkit-tap-highlight-color: transparent; }          /* a tap is answered by the move itself, not by a grey flash over the picture */
@media (min-width: 801px) {
  .pj[data-state="visual"] .pj-read { cursor: zoom-in; }                  /* frame B: the small part is the text, and a click on it gives it its room back (links keep their own hand) */
}
.pj-rail::-webkit-scrollbar { display: none; }
/* the keyboard's ring: a frame 4 inside the rail's edge. The pictures scroll, so it cannot be drawn on the rail (it would scroll with them, or lie under them): the divider, which stays, draws it */
.pj-rail:focus-visible + .pj-sow::after {                                /* (the divider is as tall as the page, so the frame sticks to the window, as the rail does) */
  content: ""; display: block; position: sticky; top: calc(4 * var(--u)); box-sizing: border-box;
  width: calc(var(--rail) - 8 * var(--u)); height: calc(100svh - 8 * var(--u));
  margin-left: calc(4 * var(--u) - var(--rail));
  border: 1px solid rgba(255, 255, 255, .6); pointer-events: none;
}
.pj-tiles { display: flex; flex-direction: column; gap: var(--p); min-height: 100svh; margin: 0; padding: 0; list-style: none; }
.pj-tile {
  position: relative; display: block; flex: none; width: 100%;
  aspect-ratio: var(--ar);                                               /* every picture keeps its proportions: 2.5 times taller open, with no further sums */
  overflow: hidden; background: #1b0f09;
}
.pj-tile:last-child { flex: 1 0 auto; }                                  /* on a window taller than the stack the last picture takes up the rest: no ground is ever shown below the pictures */

/* two pictures in a row (a pair): stacked in frame A, side by side in frame B, and --pj-frame (0 to 1) takes them from the one to the other, so they keep their proportions all the way.
   pw is the width of the row (the rail's); side by side both pictures are ph high, ph = (pw - the ground between) / (a1 + a2), so the row is exactly full; stacked they are pw wide;
   pf is the share of the way from the one to the other (--pj-frame, from A to B). */
@media (min-width: 801px) {
  .pj-pair {
    --pf: min(var(--pj-frame), 1);
    --pw: var(--rail);
    --ph: calc((var(--pw) - var(--p)) / (var(--a1) + var(--a2)));
    position: relative; flex: none; width: 100%;
    height: calc((var(--pw) / var(--a1) + var(--p) + var(--pw) / var(--a2)) * (1 - var(--pf)) + var(--ph) * var(--pf));        /* stacked · side by side */
  }
  .pj-pair > .pj-tile { position: absolute; flex: none; }
  .pj-pair > .pj-tile:first-child { left: 0; top: 0; width: calc(var(--pw) + (var(--ph) * var(--a1) - var(--pw)) * var(--pf)); }
  .pj-pair > .pj-tile:last-child {
    left: calc((var(--ph) * var(--a1) + var(--p)) * var(--pf));
    top: calc((var(--pw) / var(--a1) + var(--p)) * (1 - var(--pf)));
    width: calc(var(--pw) + (var(--ph) * var(--a2) - var(--pw)) * var(--pf));
  }
}
.pj-tile img, .pj-tile video {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover;
  -webkit-user-drag: none; user-select: none;
}
/* a clip lies over its still (the still is its poster, and all there is where motion is not wanted) and fades in once it is playing */
.pj-tile video { opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.pj-tile video.is-on { opacity: 1; }

/* ---------- The divider: 2px, #c1c1c1, with grain ---------- */
.pj-sow { position: relative; z-index: 1; flex: none; width: calc(2 * var(--p)); pointer-events: none; }
.pj-sow::before {                                                        /* the Texture effect roughens the edge by about a pixel: the grain is a 4px strip, centred on the line */
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(-1 * var(--p)); right: calc(-1 * var(--p));
  background: url("assets/project/divider-grain.png") 0 0 / calc(4 * var(--p)) calc(512 * var(--p)) repeat-y;
}

/* ---------- The paper ---------- */
.pj-read {
  flex: 1 1 0; background: var(--paper);
  min-width: calc(755 * var(--u) * min(var(--pj-frame), 1));                    /* from frame B on the paper keeps its 755 and goes out through the edge, instead of being squeezed to nothing */
  container: pjread / inline-size;                                       /* the text block answers to the width of the paper (cqw below), and the queries read em as one design pixel */
  font-size: var(--p);
}
.pj-doc {
  /* the paddings, as a straight line of the paper's width: 314 / 260 at 1337, 32 / 32 at 827 and below (the column is 763 until then) ... */
  --pl0: clamp(calc(32 * var(--p)), calc(.55294 * 100cqw - 425.27 * var(--p)), calc(314 * var(--p)));
  --pr0: clamp(calc(32 * var(--p)), calc(.44706 * 100cqw - 337.7 * var(--p)), calc(260 * var(--p)));
  /* ... and the 7 that frame B has over them (39 / 39), which come in as the pictures take the room */
  --pl: calc(var(--pl0) + 7 * var(--p) * min(var(--pj-frame), 1));
  --pr: calc(var(--pr0) + 7 * var(--p) * min(var(--pj-frame), 1));
  --b: clamp(0px, calc(min(var(--pl), var(--pr)) - 39 * var(--p)), calc(191 * var(--p)));     /* how far a schematic may leave the column on each side: 191 in frame A, none in frame B */
  display: flex; flex-direction: column; gap: calc(90 * var(--p));
  padding: calc(51 * var(--p)) var(--pr) calc(120 * var(--p)) var(--pl);
}

/* ---------- Header: kicker, headline, facts ---------- */
.pj-head { display: flex; flex-direction: column; gap: calc(90 * var(--p)); }
.pj-head__top { display: flex; flex-direction: column; gap: calc(22 * var(--p)); }
.pj-kicker {                                                             /* 16, tracking +3 %, box trimmed to the cap height (16 x .765 = 12.2) */
  margin: calc(-.58 * var(--p)) 0 calc(-4.18 * var(--p));
  font-size: calc(16 * var(--p)); line-height: calc(17 * var(--p)); font-weight: 400; letter-spacing: .03em; color: #000;
}
.pj-title {
  --fs: clamp(calc(30 * var(--p)), calc((100cqw - 64 * var(--p)) * .1146), calc(66 * var(--p)));      /* 66 holds down to a paper of 640 (frame B's 755 keeps it), then in step with the column */
  margin: calc(-.0353 * var(--fs)) 0 calc(-.2603 * var(--fs));
  font-weight: 400; font-size: var(--fs); line-height: 1.0606; letter-spacing: -.03em;
  color: #1a1a1a;                                                        /* the design's white type in "difference" over #e5e5e5 */
}
.pj-title .nb { white-space: nowrap; }                                   /* the last two words stay together, so the title does not end on a lone word ... */
@media (min-width: 801px) {
  @container pjread (max-width: 700px) { .pj-title .nb { white-space: normal; } }      /* ... unless the column is too narrow to hold them (frame B's is 677, and PlanLab's two words take 610) */
}
.pj-meta { display: flex; flex-direction: column; gap: calc(12 * var(--p)); margin: 0; }
.pj-meta__row {
  position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: calc(42 * var(--p)); margin: 0;
  padding: calc(6 * var(--p)) 0;
  font-family: var(--mono); font-size: max(12px, calc(14 * var(--p))); line-height: 1.2143; letter-spacing: var(--tls); text-transform: uppercase;
  font-feature-settings: "lnum" 1, "tnum" 1; color: #000;
}
.pj-meta__row + .pj-meta__row::before {                                   /* the hairline: 1px, 10 % black, in the middle of the 12 between two rows */
  content: ""; position: absolute; left: 0; right: 0; top: calc(-6 * var(--p) - .5px); height: 1px; background: var(--hair); pointer-events: none;
}
.pj-meta dt { flex: none; width: calc(160 * var(--p)); margin: 0; opacity: .6; }
.pj-meta dd { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; column-gap: calc(12 * var(--p)); min-width: 0; margin: 0; text-align: right; }
.pj-meta dd > * { white-space: nowrap; }                                   /* an item is never broken in the middle; when the row is too short the next one goes down whole */
.pj-meta dd > :not(:last-child)::after {                                   /* the separator: the design's five-armed star (5.19 x 4.96) with Figma's Texture effect on it (size 4, radius 14), which breaks it into a scatter of black fragments; between two items, 12 from each; it stays on the line of the item before it */
  content: ""; display: inline-block; box-sizing: content-box; pointer-events: none; vertical-align: .05em;
  width: calc(5.19 * var(--p)); height: calc(4.96 * var(--p));            /* the star's own box is all the layout sees: */
  padding: calc(8 * var(--p)); margin: calc(-8 * var(--p)); margin-left: calc(4 * var(--p));     /* ... the fragments fly up to 8 beyond it (the 12 before it is 4 + the 8 of the padding) */
  background: currentColor;
  -webkit-mask: url("assets/project/sep.svg") 0 0 / 100% 100% no-repeat; mask: url("assets/project/sep.svg") 0 0 / 100% 100% no-repeat;
}
.pj-meta a { color: inherit; text-decoration: none; cursor: pointer; }

/* ---------- Text: Aguzzo Book 18 / 30; the second paragraph is pushed in (the design indents it with 9 spaces) ---------- */
.pj-text { margin: calc(-6.09 * var(--p)) 0 calc(-10.14 * var(--p)); }
.pj-text p { margin: 0; font-size: calc(18 * var(--p)); line-height: calc(30 * var(--p)); font-weight: 400; color: #000; }
.pj-text p + p { text-indent: calc(38 * var(--p)); }
.pj-text a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* a paragraph inside a section: 18 / 32, trimmed like a row */
.pj-p { margin: calc(-7.09 * var(--p)) 0 calc(-10.91 * var(--p)); font-size: calc(18 * var(--p)); line-height: calc(32 * var(--p)); font-weight: 400; color: #000; }
/* a second paragraph in a section is set like the intro's: pushed in by the same 38 and no gap, the lines keep their pitch of 32 across the break.
   (Between two paragraphs the section's gap of 36 and the two trims of 10.91 and 7.09 leave 18 more than a line break would; the margin takes those 18 back.) */
.pj-p + .pj-p { margin-top: calc(-25.09 * var(--p)); text-indent: calc(38 * var(--p)); }

/* ---------- A section: number, heading, content ---------- */
.pj-sec {
  position: relative; display: flex; flex-direction: column; gap: calc(36 * var(--p));
  /* the headings drop by the room the number needs above them (94: its 17 and 77 of air) as the numbers slide in from the side; none while they have the gutter */
  padding-top: clamp(0px, calc(94 * var(--p) - .8246 * (var(--pl0) - 32 * var(--p))), calc(94 * var(--p)));
}
.pj-num {                                                                  /* Relative Mono 14, tracking 6 %; 114 to the left of the column, sliding in as the padding shrinks (it keeps 32 from the paper's edge) */
  position: absolute; top: 0; margin: 0;
  left: clamp(calc(-114 * var(--p)), calc(32 * var(--p) - var(--pl0)), 0px);
  font-family: var(--mono); font-size: max(12px, calc(14 * var(--p))); line-height: 1.2143; letter-spacing: var(--tls); font-feature-settings: "lnum" 1, "tnum" 1; color: #000;
}
.pj-h {                                                                     /* Aguzzo Medium 21, tracking -3 % */
  margin: 0; font-family: var(--serif); font-weight: 500; font-size: calc(21 * var(--p)); line-height: 1.058; letter-spacing: -.03em; color: #000;
  -webkit-text-stroke: var(--medium) currentColor;
}

/* rows with a figure in front of them (Notable Outcomes): the figure column is as wide as the widest figure; a hairline between rows */
.pj-rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: calc(32 * var(--p)); row-gap: calc(44 * var(--p)); margin: 0; padding: 0; list-style: none; }
.pj-rows > li { position: relative; display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: start; min-height: calc(17 * var(--p)); padding-top: calc(1.62 * var(--p)); }
.pj-rows > li + li::before { content: ""; position: absolute; left: 0; right: 0; top: calc(-22 * var(--p) - .5px); height: 1px; background: var(--hair); pointer-events: none; }
.pj-rows .pj-v, .pj-rows .pj-l { display: block; margin: calc(-7.09 * var(--p)) 0 calc(-10.91 * var(--p)); font-size: calc(18 * var(--p)); line-height: calc(32 * var(--p)); color: #000; }
.pj-rows .pj-v { font-weight: 500; -webkit-text-stroke: var(--bold) currentColor; white-space: nowrap; }       /* Aguzzo Bold */

/* single lines under hairlines (Challenges, a list of features) */
.pj-list { display: flex; flex-direction: column; gap: calc(44 * var(--p)); margin: 0; padding: 0; list-style: none; }
.pj-list > li { position: relative; margin: calc(-7.09 * var(--p)) 0 calc(-10.91 * var(--p)); font-size: calc(18 * var(--p)); line-height: calc(32 * var(--p)); color: #000; }
.pj-list > li + li::before { content: ""; position: absolute; left: 0; right: 0; top: calc(7.09 * var(--p) - 22 * var(--p) - .5px); height: 1px; background: var(--hair); pointer-events: none; }

/* a question over its answer, for what cannot be a list (Risks and Solutions): the answer is the same line at 30 % */
.pj-qa { display: flex; flex-direction: column; gap: calc(32 * var(--p)); margin: 0; }
.pj-qa__i { display: flex; flex-direction: column; gap: calc(18 * var(--p)); margin: 0; }
.pj-qa__q, .pj-qa__a { position: relative; margin: calc(-7.09 * var(--p)) 0 calc(-10.91 * var(--p)); font-size: calc(18 * var(--p)); line-height: calc(32 * var(--p)); color: #000; }
.pj-qa__a { color: rgba(0, 0, 0, .3); }
.pj-qa__a::before { content: ""; position: absolute; left: 0; right: 0; top: calc(7.09 * var(--p) - 9 * var(--p) - .5px); height: 1px; background: var(--hair); pointer-events: none; }

/* a quotation, in the same two-line manner: the words, then who said them and when */
.pj-quotes { display: flex; flex-direction: column; gap: calc(32 * var(--p)); margin: 0; }
.pj-quote { display: flex; flex-direction: column; gap: calc(18 * var(--p)); margin: 0; }
.pj-quote blockquote { margin: calc(-7.09 * var(--p)) 0 calc(-10.91 * var(--p)); font-size: calc(18 * var(--p)); line-height: calc(32 * var(--p)); color: #000; }
.pj-quote figcaption {
  position: relative; margin: 0; padding: 0;
  font-family: var(--mono); font-size: max(12px, calc(14 * var(--p))); line-height: 1.2143; letter-spacing: var(--tls); text-transform: uppercase; font-feature-settings: "lnum" 1, "tnum" 1; color: rgba(0, 0, 0, .6);
}
.pj-quote figcaption::before { content: ""; position: absolute; left: 0; right: 0; top: calc(-9 * var(--p) - .5px); height: 1px; background: var(--hair); pointer-events: none; }

/* the closing line */
.pj-cta { margin: calc(-6.09 * var(--p)) 0 calc(-10.14 * var(--p)); font-size: calc(18 * var(--p)); line-height: calc(30 * var(--p)); font-weight: 400; color: #000; }
.pj-cta a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ==========================================================================
   Schematics: pasted-in excerpts. Relative Mono only, black lines 1px dashed 2 / 2, on #cecece. They may break out of the column (--b: 191 each side in frame A,
   none in frame B) and scale with their own width: the type is 14 at the 1145 of frame A, 8.95 at a column of 562 (the floor of 10px takes over below 683; frame B's column is 677), and everything
   inside is in em, so padding, cells and dashes follow it. Narrow (under 520), they re-flow: the cells give way to two a row, the columns to one.
   ========================================================================== */
.pj-sch { container: pjsch / inline-size; margin: 0 calc(-1 * var(--b)); font-size: var(--p); }
.pj-sch__in {
  --f: clamp(10px, calc(8.954 * var(--p) + (100cqw - 562 * var(--p)) * .008655), calc(14 * var(--p)));
  --ln: max(1px, .0714em);
  --d: max(2px, round(.1429em, 1px));
  --dash: repeating-linear-gradient(to right, #000 0 var(--d), transparent var(--d) calc(2 * var(--d)));
  --dashv: repeating-linear-gradient(to bottom, #000 0 var(--d), transparent var(--d) calc(2 * var(--d)));
  box-sizing: border-box; padding: 6.4286em; background: #cecece;
  font-family: var(--mono); font-size: var(--f); line-height: 1.2143; letter-spacing: var(--tls); text-transform: uppercase; font-weight: 400;
  font-feature-settings: "lnum" 1, "tnum" 1; color: #000;
}
.pj-sch :where(p, ul, ol, li) { margin: 0; padding: 0; list-style: none; overflow-wrap: break-word; }

/* a row of cells: a dashed line down the right of every cell but the last, and one under the row */
.sx-row { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); background: var(--dash) left bottom / 100% var(--ln) no-repeat; }
.sx-cell {
  --r: none; --t: none;
  display: flex; flex-direction: column; gap: 3em; padding: .857em;
  background: var(--r), var(--t); background-repeat: no-repeat; background-position: right top, left top; background-size: var(--ln) 100%, 100% var(--ln);
}
.sx-cell:not(:last-child) { --r: var(--dashv); }
.sx-link { display: block; width: var(--ln); height: 6.5em; margin: 0 auto; background: var(--dashv); }        /* the line from one band to the next */
.sx-head {                                                                  /* the title of a band: centred between two dashed lines */
  padding: .857em 0; text-align: center;
  background: var(--dash) left top / 100% var(--ln) no-repeat, var(--dash) left bottom / 100% var(--ln) no-repeat;
}
.sx-cols { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.sx-col {
  --r: none; --t: none;
  display: flex; flex-direction: column; gap: .857em; padding: 3em .857em 0;
  background: var(--r), var(--t); background-repeat: no-repeat; background-position: right top, left top; background-size: var(--ln) 100%, 100% var(--ln);
}
.sx-col:not(:last-child) { --r: var(--dashv); }

/* a timeline: a row for each moment, its date and words on the left, the moment itself on a time axis on the right (month or year lines, dashed) */
.sx-tl { position: relative; --tw: 42%; --dw: 8.2em; }
.sx-axis { position: relative; height: 2.4286em; margin-left: calc(100% - var(--tw)); background: var(--dash) left bottom / 100% var(--ln) no-repeat; }
.sx-axis b { position: absolute; top: 0; left: var(--x); padding-left: .5em; font-weight: 400; }
.sx-grid { position: absolute; top: 0; bottom: 0; right: 0; width: var(--tw); pointer-events: none; }
.sx-grid i { position: absolute; top: 0; bottom: 0; left: var(--x); width: var(--ln); background: var(--dashv); }
.sx-rows { position: relative; }
.sx-rows > li { position: relative; display: grid; grid-template-columns: var(--dw) minmax(0, 1fr) var(--tw); align-items: start; padding: .643em 0; }
.sx-d { padding-right: .857em; white-space: nowrap; }
.sx-l { padding-right: 1.5em; }
.sx-k { position: relative; height: 1.2143em; }
.sx-k i { position: absolute; top: 50%; left: calc(var(--at) * 100%); width: .5em; height: .5em; margin: -.25em 0 0 -.25em; background: #000; box-sizing: border-box; }
.sx-rows > .sx-plan .sx-k i { background: transparent; border: var(--ln) solid #000; }
.sx-rows > .sx-key .sx-k i { width: .8em; height: .8em; margin: -.4em 0 0 -.4em; }
.sx-legend { display: flex; flex-wrap: wrap; gap: .4em 2.4em; margin-top: 3em; }
.sx-legend span { display: inline-flex; align-items: center; gap: .7em; }
.sx-legend i { display: inline-block; width: .5em; height: .5em; background: #000; box-sizing: border-box; }
.sx-legend .sx-plan i { background: transparent; border: var(--ln) solid #000; }
.sx-legend .sx-key i { width: .8em; height: .8em; }

/* a survey: a question over its answers, each answer a solid bar drawn on a dashed line that stands for every respondent (--v = the share who chose it), and the count at the end.
   Nothing here depends on the width of the schematic, so the narrow re-flow below leaves it alone (it only gets less room for the bar) */
.sx-poll + .sx-poll { margin-top: 3em; }
.sx-q { padding-bottom: .857em; background: var(--dash) left bottom / 100% var(--ln) no-repeat; }
.sx-bars > li { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr) 3.2em; align-items: center; column-gap: 1em; padding: .643em 0; }
.sx-bt { position: relative; display: block; height: .9em; background: var(--dash) left center / 100% var(--ln) no-repeat; }
.sx-bt i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 100%); background: #000; }
.sx-bn { text-align: right; }
.sx-foot { margin-top: 3em; }

/* re-flow: the schematic is narrower than 520 design pixels (in a query em is the container's own size, which is one design pixel here). Frame B's column is 677, and keeps the four across */
@container pjsch (max-width: 520em) {
  .sx-row .sx-cell { --r: none; --t: none; }
  .sx-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-row .sx-cell:nth-child(odd):not(:last-child) { --r: var(--dashv); }
  .sx-row .sx-cell:nth-child(n+3) { --t: var(--dash); }
  .sx-cols { grid-template-columns: minmax(0, 1fr); }
  .sx-col, .sx-col:not(:last-child) { --r: none; --t: var(--dash); padding: 1.714em .857em; }                /* one under another: a dashed line over every one but the first */
  .sx-col:first-child { --t: none; padding-top: 3em; }
  .sx-col:last-child { padding-bottom: 0; }
  .sx-cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }                                            /* short columns stay two to a row */
  .sx-cols--2 .sx-col:nth-child(odd):not(:last-child) { --r: var(--dashv); }
  .sx-cols--2 .sx-col:nth-child(-n+2) { --t: none; padding-top: 3em; }
  .sx-cols--2 .sx-col:nth-child(n+3) { --t: var(--dash); padding-top: 1.714em; }
  .sx-cols--2 .sx-col:nth-last-child(-n+2) { padding-bottom: 0; }
  .sx-tl { --tw: 0px; --dw: 7.4em; }
  .sx-axis, .sx-grid, .sx-k { display: none; }
  .sx-d::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .6em; vertical-align: .05em; background: #000; box-sizing: border-box; }
  .sx-rows > .sx-plan .sx-d::before { background: transparent; border: var(--ln) solid #000; }
  .sx-rows > .sx-key .sx-d::before { width: .8em; height: .8em; margin-right: .4em; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .pj { transition: none; }
  .pj-tile video { display: none; }                                      /* stills only */
}

/* ==========================================================================
   Phone (the file has no mobile frame): the rail becomes a strip across the top that grows when it is tapped (small, tall, the whole screen), the divider lies down, the numbers are above
   their headings, the schematics run to the edges of the screen and re-flow.
   ========================================================================== */
@media (max-width: 800px) {
  .pj-p + .pj-p { text-indent: 0; margin-top: calc(-1.09 * var(--p)); }   /* the same on a phone for a section's paragraphs: flush, half a line (16) off the one above (the section's gap here is 28) */
  .pj-text p + p { text-indent: 0; margin-top: calc(15 * var(--p)); }   /* on a phone a paragraph starts at the margin, no indent, and is set off from the one above by half a line (the desktop frames keep the design's indent and no gap) */
  .pj { display: block; --h0: min(76vw, 54svh); --h1: min(148vw, 82svh); }
  .pj-read { min-width: 0; }
  .pj-rail { position: relative; top: auto; width: auto; height: calc(var(--h0) + (var(--h1) - var(--h0)) * min(var(--pj-frame), 1) + (100svh - var(--h1)) * max(var(--pj-frame) - 1, 0)); overflow: hidden; }   /* small · tall · the whole screen */
  .pj-rail:focus-visible + .pj-sow::after { content: none; }
  .pj-rail:focus-visible::after { content: ""; position: absolute; inset: calc(4 * var(--u)); border: 1px solid rgba(255, 255, 255, .6); pointer-events: none; z-index: 2; }
  .pj-tiles { flex-direction: row; gap: 1px; height: 100%; min-height: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .pj-tiles::-webkit-scrollbar { display: none; }
  .pj-tile, .pj-tile:last-child { flex: none; width: auto; height: 100%; scroll-snap-align: start; }
  .pj-pair { display: contents; }                                       /* the two pictures of a pair are two more in the strip, one after the other */
  .pj-sow { display: block; width: auto; height: 2px; }
  .pj-sow::before { top: -1px; bottom: -1px; left: 0; right: 0; background: url("assets/project/divider-grain-h.png") 0 0 / 512px 4px repeat-x; }
  .pj-doc { --pl: 24px; --pr: 24px; --b: 24px; gap: 56px; padding: 40px 24px 84px; }
  .pj-head { gap: 40px; }
  .pj-head__top { gap: 18px; }
  .pj-title { --fs: clamp(32px, 9vw, 52px); }
  .pj-meta__row { gap: 18px; font-size: 12px; }
  .pj-meta dt { width: 112px; }
  .pj-sec { gap: 28px; padding-top: 0; }
  .pj-num { position: static; margin: 0 0 8px; }
  .pj-rows { column-gap: 22px; row-gap: 36px; }
  .pj-rows > li + li::before { top: -18.5px; }
  .pj-list { gap: 36px; }
  .pj-list > li + li::before { top: calc(7.09px - 18px - .5px); }
  .pj-sch__in { padding: 36px 20px; --f: 10px; }
}
