/* Stop phone browsers from enlarging some text and not the rest (the nav's
   Projects button rendered bigger than its neighbors on Android Chrome). */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* ═══════════════════════════════════════════════════════════════════════════
   byhoopy.com — Michael Rork

   ONE SURFACE. The desk runs edge to edge and everything sits on it: the
   headline, the four products, all of it. The previous version had a wooden
   table with a black mat on top, which nobody read as two things — it just
   read as an ugly brown border. So there is no border and no wood. One
   near-black surface, lit from a single source at the upper left.

   PERFORMANCE RULES, learned the hard way (v1 was genuinely laggy):
     · No `background-attachment: fixed`. It repaints the whole background on
       every scroll frame.
     · No `mix-blend-mode` or `background-blend-mode` on anything full-screen.
       It forces the entire page through a blend on every frame.
     · No `repeating-linear-gradient` at a tight pitch over a large area.
       One small tiled image instead — the GPU caches it once.
     · Never scale() an element containing a live iframe on hover. The browser
       re-rasterises the whole embedded app at the new scale, every time the
       pointer crosses it. Lift it with translate instead.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Fonts, self-hosted (SIL OFL; see fonts/ and CREDITS.md). Sora is the brand
   face: the wordmark at 800, headings at 600-700. Inter carries the reading
   text. JetBrains Mono is kept for the things that ARE code: the MCP readout,
   the device ports, the live pill. */
@font-face { font-family: "Sora"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("../fonts/sora-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2"); }

:root {
  /* No brown anywhere. Near-black with the faintest green-grey cast. */
  --room:       #080908;
  --surface:    #0e100f;
  --surface-lit:#191d1b;

  /* Text whites come from Pockets (--text #e8e8f0, --muted #8888aa) so the two
     brands share one white. --cream-2 is the reading-text shade: lighter than
     muted so it isn't drab next to Safety orange. */
  --cream:      #e8e8f0;
  --cream-2:    #c3c3d3;
  --cream-3:    #8f8fad;

  /* Hoopy orange (Safety, #ff6b1a) is the brand accent: it marks, selects, links and
     highlights. --hoopy-hi is the same Safety orange (owner, 2026-11-12: one
     orange everywhere, no lighter tint; it reads at about 7:1 on the near-black
     background, so small text doesn't need a lighter shade), --hoopy-lo the
     quiet underline/border, --hoopy-glow the soft halo. Mint survives ONLY
     inside the MCP device (its terminal readout and ports), where it's that
     project's own color. Sand blue is quiet reference. */
  --hoopy:      #ff6b1a;
  --hoopy-hi:   #ff6b1a;
  --hoopy-lo:   rgba(255,107,26,.45);
  --hoopy-glow: rgba(255,107,26,.16);
  --mint:       #8fc9a9;
  /* The brand wordmark's font: Sora 800, the same face as the Pockets by Hoopy
     logo. One place to swap it. */
  --brand-font: "Sora", system-ui, sans-serif;
  --sand:       #7d9db8;
  --key:        #ffe0b4;

  /* Pockets' own brand purple, lifted from its stylesheet (--accent), where
     it's described as the lighter purple chosen to stay legible as text on a
     dark surface — which is precisely what it has to do here. The escape
     hatch to Pockets is the one element on this page that belongs to a
     different product, so it wears that product's colour rather than mine. */
  --pockets:    #ada1ff;
  --pockets-lo: rgba(173,161,255,.45);

  --display: "Sora", system-ui, sans-serif;
  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --settle: cubic-bezier(.22, 1.14, .36, 1);
  --shove:  cubic-bezier(.35, .02, .18, 1);

  /* ── Lighting, A/B ──────────────────────────────────────────────────────
     HARD is the default: each shadow leads with a zero-blur layer, so objects
     throw an edge before the falloff. SOFT drops that step. Press L to
     compare — I can describe the difference but you have to see it. */
  /* Four layers, and the shape of the stack is the whole point:
       1. CONTACT — almost no offset, almost no blur. This is the hard edge
          where the object meets the surface. It's what says "sitting on"
          rather than "floating above".
       2. a tight one, just blurred enough to not be a second rectangle.
       3+4. the long diffuse throw.
     v2 had an 11px-offset ZERO-blur layer, which didn't read as a shadow at
     all — it read as a duplicate of the object slightly down and to the
     right. Hard light still gives you a soft penumbra a few millimetres out;
     only the contact point is truly sharp. */
  --sh-1: 0 1px 2px rgba(0,0,0,.88);
  --sh-2: 3px 4px 7px -1px rgba(0,0,0,.6);
  --sh-3: 14px 20px 28px -6px rgba(0,0,0,.58);
  --sh-4: 30px 42px 52px -22px rgba(0,0,0,.5);
  --sh-1h: 0 2px 3px rgba(0,0,0,.85);
  --sh-2h: 5px 7px 12px -2px rgba(0,0,0,.6);
  --sh-3h: 24px 34px 44px -8px rgba(0,0,0,.6);
  --sh-4h: 44px 60px 72px -26px rgba(0,0,0,.55);
  --keywash: radial-gradient(74% 58% at 8% -10%,
              rgba(255,222,176,.17) 0%, rgba(255,200,150,.05) 32%, rgba(0,0,0,0) 56%);

  /* Exposure on the walnut. MID is the chosen stop — enough wood to read as
     a real board, dark enough that cream type sits on it. D still cycles. */
  --desk-grade: linear-gradient(150deg,
      rgba(14,9,5,.34) 0%, rgba(10,7,4,.60) 46%, rgba(4,3,2,.88) 100%);
}
:root[data-desk="dark"] {
  --desk-grade: linear-gradient(150deg,
      rgba(14,9,5,.60) 0%, rgba(10,7,4,.80) 44%, rgba(4,3,2,.94) 100%);
}
:root[data-desk="light"] {
  --desk-grade: linear-gradient(150deg,
      rgba(20,13,7,.12) 0%, rgba(12,8,5,.38) 50%, rgba(5,3,2,.78) 100%);
}
:root[data-light="soft"] {
  --sh-1: 0 1px 3px rgba(0,0,0,.6);
  --sh-2: 5px 8px 16px -3px rgba(0,0,0,.42);
  --sh-3: 18px 28px 44px -12px rgba(0,0,0,.5);
  --sh-4: 40px 60px 92px -30px rgba(0,0,0,.45);
  --sh-2h: 8px 13px 26px -4px rgba(0,0,0,.44);
  --sh-3h: 28px 42px 62px -14px rgba(0,0,0,.52);
  --sh-4h: 60px 88px 124px -34px rgba(0,0,0,.5);
  --keywash: radial-gradient(120% 95% at 12% -14%,
              rgba(255,222,176,.13) 0%, rgba(255,200,150,.05) 40%, rgba(0,0,0,0) 72%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--room); overflow-x: clip; max-width: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--room);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 400; font-size: 15.5px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* ⚠️ clip, NOT hidden. With html at overflow-x: clip, `hidden` here made
     <body> its own scroll container, and the sticky masthead stuck to that
     (which never scrolls), so it scrolled off the page with everything else. */
  overflow-x: clip;
}

/* One tiled noise sprite, reused everywhere a surface needs tooth. Small,
   cached once, no blend mode. */
:root {
  --tooth: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

.masthead, .foot { position: relative; z-index: 60; }

/* ── Masthead ─────────────────────────────────────────────────────────── */
.masthead {
  position: sticky; top: 0;
  /* Name on the left, the menu centered, the Pockets button on the right
     (owner, 2026-11-11). A three-column grid keeps the menu truly centered
     whatever the widths of the two ends. */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 10px 24px;
  padding: 12px clamp(14px, 3.4vw, 46px);
  /* Solid, with a real edge. The gradient fade looked soft the moment you
     scrolled anything underneath it. */
  background: var(--room);
  border-bottom: 1px solid rgba(255,224,180,.13);
  box-shadow: 0 1px 0 rgba(0,0,0,.85), 0 10px 24px -14px rgba(0,0,0,.7);
}
/* The masthead reads like an app logo: "Hoopy" in white and "by Michael Rork"
   in Hoopy orange (owner, 2026-11-11: "Michael Rork by Hoopy" read as if Hoopy
   made Michael), the way "Pockets by Hoopy" is the app name in white and the
   byline in the app's color. The footer signature is the standalone mark:
   a white "by" and an orange "Hoopy". */
.mark {
  justify-self: start;
  display: flex; align-items: baseline; gap: .3em; white-space: nowrap; text-decoration: none;
  font-family: var(--brand-font); font-weight: 800; font-size: 20px; letter-spacing: -.5px;
}
.mark-name { color: var(--cream); }
.mark-studio { color: var(--hoopy); }
.mark-studio b { font-weight: 800; color: inherit; }
.foot-mark { font-family: var(--brand-font); font-weight: 800; letter-spacing: -.5px; text-transform: none; color: #fff; }
.foot-mark b { font-weight: 800; color: var(--hoopy); }
.mast-nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); justify-self: center; }
.mast-nav a {
  color: var(--cream-2); text-decoration: none;
  font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase;
  padding-bottom: 3px; border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}
.mast-nav a:hover { color: var(--cream); border-bottom-color: var(--hoopy); }
.mast-nav a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--hoopy-lo); }

/* The "Get Pockets by Hoopy" button wears POCKETS' color, not Hoopy's: in the
   brand system each app keeps its own color and orange is Hoopy itself. It
   matches the Pockets app's primary button: --accent #ada1ff with white text,
   hover --accent-dim #7c71c9. No glow, and a tight radius (owner, 2026-11-11). */
.btn-pockets {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 3px;
  background: #ada1ff; color: #fff; text-decoration: none; white-space: nowrap;
  font-family: var(--brand-font); font-weight: 800; font-size: 14px; letter-spacing: -.3px;
  transition: background .18s, transform .18s;
}
.btn-pockets:hover { background: #7c71c9; color: #fff; transform: translateY(-1px); }
.btn-pockets:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mast-cta { justify-self: end; padding: 8px 14px; font-size: 13px; }
.cta-short { display: none; }

/* ── THE DESK ─────────────────────────────────────────────────────────────
   Edge to edge. The headline is ON it, not above it. The key light is baked
   into this element's own background rather than a fixed overlay, so it
   costs one paint instead of one per scroll frame. */
/* Real walnut, licensed (AdobeStock_284485295), graded rather than used raw.
   The brown Michael hated was a flat CSS fill; this is a photographed board
   with grain and knots in it, which is a different material entirely.

   It is deliberately NOT the bright airy desk of a stock photo. It's a dark
   walnut under a hard raking key: the grain catches the light along the upper
   left and the far corner falls away to nothing. That keeps the noir and
   still lets cream type sit on it legibly.

   Press D to run the exposure up and down. */
.bench-section {
  position: relative;
  padding: clamp(28px, 5vh, 60px) clamp(18px, 3.4vw, 46px) clamp(24px, 4vh, 44px);
  background-color: #120c07;
  background-image:
    var(--keywash),
    var(--desk-grade),
    url("../img/desk.jpg");
  /* The board is sized by WIDTH ONLY and repeats downwards. It's a
     vertically-mirrored tile, so the seam is invisible. This is what stops
     the grain zooming and reflowing every time the section's height changes —
     opening a project, an image loading, anything. Only a window resize moves
     it now. The two gradients still cover, because a lighting grade SHOULD
     span whatever it's lighting. */
  background-size: cover, cover, 100% auto;
  background-position: 50% 0;
  background-repeat: no-repeat, no-repeat, repeat-y;
  border-top: 1px solid rgba(255,224,180,.10);
  border-bottom: 1px solid rgba(0,0,0,.9);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9);
  /* Isolate layout so the live embeds can't invalidate the rest of the page.
     NOT `contain: paint` — that would clip the props that deliberately hang
     off the edge, and the shadows. */
  contain: layout style;
}
/* A 2600x960 board `cover`-ing a tall narrow section has to scale up ~4x to
   reach the bottom, and you end up looking at three enormous blurry grain
   lines. So narrow screens get a board turned the other way: same walnut,
   rotated, cropped portrait. The grain runs down the page, which is exactly
   what a narrow surface would look like anyway. */
@media (max-width: 900px) {
  .bench-section {
    background-image: var(--keywash), var(--desk-grade), url("../img/desk-tall.jpg");
  }
}

.bench-inner { max-width: 1600px; margin: 0 auto; width: 100%; }
/* The desk fills the screen under the masthead, so it never ends in a band of
   black above the fold. The stage keeps its own proportions and sits centered
   on the wood; the board repeats downward, so extra height is just more desk. */
.bench-section {
  min-height: calc(100svh - var(--mast-h, 58px));
  display: flex; flex-direction: column; justify-content: center;
}

/* The headline is a thing lying on the desk too, pinned top-left inside the
   stage rather than stacked above it. That's what frees the full height for
   the objects — Holocene can sit beside the type at the same altitude
   instead of being pushed below it. */
.bench-intro {
  max-width: 44rem;
}
.bench-intro h1 {
  font-family: var(--display);
  font-weight: 700; font-size: 3.15cqw;
  line-height: 1.08; letter-spacing: -.03em; margin: 0 0 1.15cqw;
  color: var(--cream);
}
.bench-lede { margin: 0; font-size: 1cqw; line-height: 1.6; color: var(--cream-2); max-width: 40em; }

/* ── THE ARRANGEMENT: a grid, not coordinates ─────────────────────────────
   Hand-placed absolute coordinates were the wrong tool, and I broke this
   layout with them three times running. Michael called it: the method was the
   problem, not the tuning.

   Every object owns named cells now. It cannot overlap anything, ever. It
   reflows with the window instead of being recomputed by hand. Moving one is
   editing one line, not re-deriving five objects' heights and hoping.

       col   1    2    3    4    5    6    7    8    9   10   11   12
       row1 [   headline        ][   holocene   ][  dashboard  ]
       row2 [phone][     mcp    ][         snark             ]

   The tilts stay. That's what keeps it a desk and not a dashboard. */
.stage {
  container-type: inline-size;
  position: relative;
  display: grid;
  /* ── THE DESK IS AN ARTBOARD, AND ITS HEIGHT COMES FROM ITS WIDTH ────────
     Rows are equal `1fr` tracks, so row 5 is always half way down and a
     rectangle drawn in the diagram is the rectangle you get. `auto` rows
     don't do that: an auto row sizes to whatever starts and ends inside it,
     an empty one collapses, and the lines land wherever content pushes them.

     But equal rows on their own were only half the job, and the missing half
     caused every "why is that label miles away / why is it overlapping"
     problem. The cells were sized from viewport HEIGHT while everything
     inside them was sized from viewport WIDTH — type in cqw, devices in
     percentages. Two independent numbers. Change the window's aspect ratio
     and they diverge: wide-and-short gives you big contents in short cells,
     which overflow (a grid cell does not clip, so they paint straight over
     the neighbours); tall-and-narrow gives you small contents in tall cells,
     which is the enormous gaps.

     So the height comes from the WIDTH now. One number drives the columns,
     the rows, the type and the devices, which makes the desk geometrically
     similar at every size — the same picture, scaled, never re-proportioned.
     Nothing can outgrow its cell because the ratio between them never moves.

     The width is capped three ways: the container, a maximum, and a figure
     derived from viewport height so the artboard stays on screen on a short
     window. That's fitting a picture in a frame, not squashing it. */
  /* Full width, edge to edge. The aspect is chosen so that on the landscape
     screens people actually use, the desk lands close to a screenful: at
     1900 wide it's ~950 tall, at 2560 ~1300. Michael's observation is the
     trade being made here — with the proportions locked, a wider window
     makes a TALLER desk, so the fold cuts higher up in the composition. A
     flatter ratio is what keeps that honest without capping the width. */
  aspect-ratio: 1.9;
  width: 100%;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(12, minmax(0, 1fr));
  gap: 1.5% 1.2%;
  align-items: start;
  /* Height is whatever the content needs. Pinning it was an attempt to stop
     the desk texture rescaling, and it just clipped the objects instead —
     see the background rules, which solve that properly. */
}

/* Slots for real photographed props. See PROPS.md. */
.prop { position: absolute; pointer-events: none; z-index: 2; }
/* `drop-shadow` follows the image's ALPHA CHANNEL, not its bounding box, so a
   cut-out camera throws a camera-shaped shadow — and if the key light ever
   moves, every prop follows it. */
.prop img {
  display: block; width: 100%; height: auto;
  filter:
    drop-shadow(0 1px 1px rgba(0,0,0,.85))
    drop-shadow(3px 4px 7px rgba(0,0,0,.55))
    drop-shadow(14px 20px 26px rgba(0,0,0,.5));
}
.prop-bricks { left: 1%; bottom: 2%; width: 11%; }
.prop-camera { right: 0; top: -2%;   width: 19%; }
.stage[data-focus] .prop { opacity: 0; transition: opacity .4s ease; }

/* ── Objects ──────────────────────────────────────────────────────────── */
.obj {
  position: relative;
  min-width: 0;
  margin: 0; padding: 0; border: 0; background: none;
  cursor: pointer;
  transform: translateY(var(--lift, 0px)) rotate(var(--r, 0deg));
  transition: transform .32s var(--settle), opacity .3s ease, filter .3s ease;
}
.obj:focus-visible { outline: none; }
.obj:focus-visible .device { box-shadow: 0 0 0 2px var(--hoopy), var(--drop); }

/*  12 columns x 12 rows.

    THE THING THAT WAS CAUSING THE OVERLAPS: every caption had a ONE-ROW cell,
    and a caption is a name plus three or four lines of note — about 6.9cqw
    tall against a row of 3.66cqw. Barely half the room it needed. A grid cell
    doesn't clip, so the text simply painted over whatever was beneath it.
    Every label gets two rows now. Worked out from the grid, not guessed:

        1 row  = 3.66cqw      1 col = 7.23cqw
        label  ≈ 6.9cqw tall  ->  2 rows

    Devices are capped at the height their rows give them, converted through
    each device's own aspect ratio — so every one is height-limited and none
    can reach its neighbour:

        pockets  7 rows -> 14cqw      holocene 5 rows -> 33cqw
        snark    4 rows -> 26cqw      mcp      2 rows -> 13cqw

    col   1    2    3    4    5    6    7    8    9   10   11   12
    r1  |--- INTRO (1-5) ---|  ·  |---- HOLOCENE (7-11) -----|  ·
    r3  |-------------------|  ·  |                          |  ·
    r4   (clear row)           ·  |                          |  ·
    r5  |- PK -|- pk lbl -|  ·    |--------------------------|  ·
    r6  |device| (4-5)    |  ·    |holo lbl (7-9)|-- snark lbl (10-12)|
    r7  |(1-3) |----------|  ·    |              |                    |
    r8  |      |   ·   ·  ·  ·         ·         |--- SNARK (9-12) ---|
    r9  |      |  |-- MCP ---|         ·         |                    |
    r10 |      |  |  (5-7)   |         ·         |                    |
    r11 |------|  |----------|         ·         |--------------------|
    r12          |- mcp lbl -|

    Clear column 4 between the phone and MCP, column 8 between MCP and Snark,
    column 6 between the intro and Holocene, row 4 between the intro and the
    phone, rows 6-7 between Holocene and Snark. */
.bench-intro   { grid-column: 1 / 6;   grid-row: 1 / 4;   align-self: center; min-width: 0; }

.obj-holocene  { grid-column: 7 / 12;  grid-row: 1 / 6;   align-self: end;   --r:  1.4deg; }
.tag-holocene  { grid-column: 7 / 10;  grid-row: 6 / 8;   align-self: start; --r:  1.4deg; }

.obj-pockets   { grid-column: 1 / 3;   grid-row: 5 / 12;  align-self: center; --r: -2.6deg; }
.tag-pockets   { grid-column: 3 / 6;   grid-row: 5 / 8;   align-self: center; --r: -2.6deg; }

.obj-mcp       { grid-column: 5 / 8;   grid-row: 8 / 11;  align-self: end;   --r:  3deg; }
.tag-mcp       { grid-column: 5 / 8;   grid-row: 11 / 13; align-self: start; --r:  3deg; }

.obj-snark     { grid-column: 9 / 13;  grid-row: 8 / 12;  align-self: start; --r: -1.4deg; }
.tag-snark     { grid-column: 10 / 13; grid-row: 6 / 8;   align-self: end;   --r: -1.4deg; text-align: right; }
.tag-snark .tag-head { justify-content: flex-end; }
.tag-snark .tag-note { margin-left: auto; }

.obj-pockets   .device { max-width: 14cqw; }
.obj-holocene  .device { max-width: 33cqw; }
.obj-snark     .device { max-width: 26cqw; margin-left: auto; }
.obj-mcp       .device { max-width: 20cqw; }

/* ── Labels ───────────────────────────────────────────────────────────────
   Their own grid items, so grid guarantees they never collide — but they
   carry their object's tilt, so a caption reads as having been set down with
   the thing it names rather than typed onto the desk afterwards. Paired back
   to the object by data-for in bench.js: click either, hover either. */
.tag {
  min-width: 0; cursor: pointer; align-self: start;
  transform: rotate(var(--r, 0deg));
  transform-origin: 0 0;
}

/* Hover LIFTS, it does not scale — scaling an ancestor of a live iframe makes
   the browser re-rasterise the whole embedded app on every pointer cross. */
@media (hover: hover) {
  .stage:not([data-focus]) .obj:hover,
  .stage:not([data-focus]) .obj.is-hot { --lift: -7px; z-index: 5; }
  .obj:hover .device, .obj.is-hot .device { box-shadow: var(--drop-hi); }
  .tag:hover .tag-name, .tag.is-hot .tag-name { color: var(--cream); }
}

/* ── Devices ──────────────────────────────────────────────────────────── */
.device {
  width: 100%;
  /* A lit screen spills a little of its own colour onto the wood around it.
     One extra tinted layer on the end of the shadow stack, per device — cheap,
     and it's the difference between "on the desk" and "pasted over the desk". */
  --drop:    var(--sh-1), var(--sh-2), var(--sh-3), var(--sh-4), 0 0 70px -14px var(--glow, transparent);
  --drop-hi: var(--sh-1h), var(--sh-2h), var(--sh-3h), var(--sh-4h), 0 0 100px -16px var(--glow, transparent);
  position: relative;
  background: linear-gradient(148deg, #2c2f2e 0%, #141716 58%, #0a0c0b 100%);
  box-shadow: var(--drop);
  transition: box-shadow .4s var(--shove);
  border-top: 1px solid rgba(255,224,180,.22);
  border-left: 1px solid rgba(255,224,180,.11);
  border-right: 1px solid rgba(0,0,0,.6);
  border-bottom: 1px solid rgba(0,0,0,.7);
}
/* PHONE. Thin bezel all round, a chin barely bigger than the forehead, a
   punch-hole camera, and buttons standing proud of the right edge. The tell
   on a fake phone is always a uniform border and no thickness. */
.device-phone {
  border-radius: 26px;
  padding: 4px;
  background: linear-gradient(140deg, #4a4e4d 0%, #232726 18%, #0e100f 55%, #1b1e1d 100%);
  --glow: rgba(140,120,255,.16);
}
.device-phone .screen { aspect-ratio: 412 / 884; border-radius: 22px; }
/* Punch-hole. */
.device-phone::before {
  content: ""; position: absolute; z-index: 3;
  top: 2.4%; left: 50%; transform: translateX(-50%);
  width: 3.4%; aspect-ratio: 1; border-radius: 50%;
  background: #050605; box-shadow: 0 0 0 1px rgba(255,255,255,.06);
}
/* Power and volume, proud of the right edge, catching the key.
   NB: box-shadow offsets cannot be percentages — a `0 12%` in here silently
   invalidated the whole declaration and the second button never rendered.
   Two stacked gradient stops instead, which also scale with the phone. */
.device-phone::after {
  content: ""; position: absolute; z-index: 1;
  right: -2px; top: 19%; width: 2px; height: 20%;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg,
    #6a6f6e 0%, #6a6f6e 32%,
    transparent 32%, transparent 46%,
    #6a6f6e 46%, #6a6f6e 100%);
}

/* TABLET. The two web products live in tablets now — a landscape site in a
   landscape device, at a size somebody would actually read, and physically
   plausible lying on a desk next to a phone. */
.device-wide { --glow: rgba(255,214,160,.16); }
.device-slab {
  border-radius: 14px;
  padding: 11px;
  background: linear-gradient(140deg, #4a4e4d 0%, #232726 20%, #0e100f 58%, #1b1e1d 100%);
  --glow: rgba(120,180,255,.10);
}
/* 16:10, not 4:3. Plenty of real tablets are 16:10, and it matches the shape
   a website actually wants — at 4:3 both sites sat letterboxed in a box that
   was the wrong shape for them. The screen aspect and the iframe's own
   dimensions below have to agree, or the content doesn't land. */
.device-slab .screen { aspect-ratio: 16 / 10; border-radius: 5px; }
.device-wide .screen { aspect-ratio: 1400 / 949; }
/* Front camera, centred on the long edge the way a tablet's is. */
.device-slab::before {
  content: ""; position: absolute; z-index: 3;
  left: 5px; top: 50%; transform: translateY(-50%);
  width: 4px; aspect-ratio: 1; border-radius: 50%;
  background: #0a0c0b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}

.device-box {
  /* overflow:hidden is what holds the aspect ratio. Without it the box's
     automatic minimum height is its content, so it grew and shrank as the
     readout typed each line, and everything below it (the "How I think"
     cue) bobbed up and down with it (owner, 2026-11-11). */
  overflow: hidden;
  border-radius: 4px; padding: 3%;
  --glow: rgba(143,201,169,.12);
  aspect-ratio: 1.8;
  display: flex; flex-direction: column;
}

.screen {
  position: relative; overflow: hidden; background: #060706;
  box-shadow: inset 0 1px 6px rgba(0,0,0,.95);
  /* Forces a clip layer. `overflow: hidden` alone does not reliably clip a
     TRANSFORMED descendant against a rounded corner, which is how the phone's
     bleed was escaping over its own bezel. */
  contain: paint;
}

/* ── Asleep / awake ───────────────────────────────────────────────────────
   Every screen holds a still of the real thing, captured from the real thing
   (headless Chrome, `--hide-scrollbars`, checked into img/). Picking the
   object up boots the actual site behind it and crossfades.

   Three full websites booting on page load is what made this slow, and it
   bought nothing: nobody can interact with an inert 500px tablet anyway. This
   way the desk paints instantly off ~330KB of stills, and the live thing
   arrives the moment somebody asks for it — which also makes it a reveal
   rather than a claim. */
.shot {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  display: block;
  transition: opacity .45s ease;
}
/* Every screen shows a real screenshot the instant the page paints, then the
   live product fades in over it once it has FULLY loaded behind. The still is
   what makes the desk feel instant; the swap is what keeps it honest.

   Captured at exactly the viewport the live frame renders at — 412x884 and
   1280x800 — so the two are the same picture and the swap is invisible.

   Regenerating them: see CREDITS.md. Capture through an IFRAME of the target
   width, never `--window-size`: headless Chrome on Windows clamps the window
   to ~511px, so a narrow --window-size lays the page out wide and then crops
   the screenshot, which looks exactly like the app overflowing. That
   artefact cost a lot of time and one wrong bug report. */
/* Set by JS once the real frame has painted. Once a product is awake it stays
   awake — putting it back down doesn't send it to sleep again. */
.shot.hidden { opacity: 0; }


.screen .live {
  position: absolute; top: 0; left: 0; z-index: 2; border: 0; display: block;
  transform-origin: 0 0;
  opacity: 0; transition: opacity .55s ease;
  pointer-events: none;
}
.screen .live.ready { opacity: 1; }
/* Real device viewports, rendered 1:1 and scaled down to frame size. No
   compensation, no clipping: the frame shows exactly what the app lays out,
   which is also exactly what the still shows, so opening one doesn't shift. */
.device-phone .live { width: 412px;  height: 884px; }   /* a real phone */
.device-slab  .live { width: 1280px; height: 800px; }   /* a real tablet, 16:10 */

.screen-idle { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .5s ease; }
.screen-idle.gone { opacity: 0; }
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid rgba(236,230,218,.14); border-top-color: var(--mint);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MCP box ──────────────────────────────────────────────────────────── */
.device-box { background: linear-gradient(148deg, #303432 0%, #141716 66%); }
.box-ports { flex: 0 0 auto; }
.box-ports { display: flex; gap: .35cqw; margin-bottom: .6cqw; }
.port {
  flex: 1; text-align: center; font-family: var(--mono);
  font-size: .52cqw; letter-spacing: .1em; text-transform: uppercase;
  color: var(--cream-3); padding: .2cqw .15cqw .25cqw;
  background: rgba(0,0,0,.45);
  border-top: 1px solid rgba(255,224,180,.09);
  border-radius: 2px; transition: color .3s, background .3s;
}
.port.hot { color: #0a0c0b; background: var(--mint); }
.readout {
  margin: 0; padding: .7cqw .8cqw;
  flex: 1 1 auto; min-height: 0;
  background: #060706; box-shadow: inset 0 1px 6px rgba(0,0,0,.95);
  border-radius: 2px;
  font-family: var(--mono); font-size: .62cqw; line-height: 1.5;
  color: var(--mint); white-space: pre-wrap; overflow: hidden;
}
.readout .in { color: var(--cream-3); }
.readout .cur { background: var(--mint); color: #060706; }

/* ── Captions ─────────────────────────────────────────────────────────── */
.tag { transition: opacity .35s ease; }
.tag-head { display: flex; align-items: baseline; gap: .6cqw; flex-wrap: wrap; }
.tag-num { font-family: var(--display); font-size: .72cqw; font-weight: 700; color: var(--hoopy); letter-spacing: .04em; }
.tag-name {
  font-family: var(--display);
  font-size: 1.28cqw; font-weight: 600;
  color: var(--cream-2); letter-spacing: -.005em; transition: color .3s;
}
.tag-note {
  display: block; margin-top: .35cqw; max-width: 34ch;
  font-size: .83cqw; line-height: 1.55;
  color: var(--cream-2); letter-spacing: .01em;
}


/* ── Focus: the same grid, rearranged ─────────────────────────────────────
   No flying, no parking coordinates, no runtime scale maths. The opened
   object takes the left half, its write-up the right, and the other four drop
   to a strip along the bottom. Grid does all of it. */
.stage[data-focus] .bench-intro { display: none; }

/* ⚠️ THE OPENED VIEW LEAVES THE ARTBOARD (2026-11-11). It used to reuse the
   12x12 desk grid, whose rows are 1/12 of a 1.9-aspect board: the opened
   device got a ~60px-tall row and painted far past it, a phone ran ~1500px
   tall off the bottom of the screen, and the strip of other objects sat in
   row 2 under the write-up. Now: two auto rows, and the opened device is
   capped by the VIEWPORT HEIGHT through its own aspect ratio, so it is always
   a whole thing on one screen. */
.stage[data-focus] {
  aspect-ratio: auto;
  grid-template-rows: auto auto;
  row-gap: clamp(18px, 3vh, 34px);
  --fit-h: calc(100svh - 230px);
}

.stage[data-focus] .obj.is-focused {
  grid-column: 1 / 8; grid-row: 1; align-self: start; justify-self: stretch;
  --r: 0deg; --lift: 0px; z-index: 10; cursor: default;
}
.stage[data-focus] .obj.is-focused .device { box-shadow: var(--drop-hi); margin: 0 auto; }
.stage[data-focus] .obj-pockets.is-focused  .device { max-width: min(100%, calc(var(--fit-h) * 412 / 884 + 8px)); }
.stage[data-focus] .obj-holocene.is-focused .device,
.stage[data-focus] .obj-snark.is-focused    .device { max-width: min(100%, calc(var(--fit-h) * 1.6 + 22px)); }
.stage[data-focus] .obj-mcp.is-focused      .device { max-width: min(100%, 640px); }
.stage[data-focus] .obj-mcp.is-focused .port    { font-size: 11px; padding: 4px 3px 5px; }
.stage[data-focus] .obj-mcp.is-focused .readout { font-size: 13px; padding: 12px 14px; }
.stage[data-focus] .obj-mcp.is-focused .box-ports { gap: 6px; margin-bottom: 10px; }
.stage[data-focus] .obj.is-focused .live { pointer-events: auto; }

.stage[data-focus] .dossier.open { display: block; grid-column: 8 / 13; grid-row: 1; align-self: start; }

/* The other three: a strip under both, one per four columns. */
.stage[data-focus] .obj:not(.is-focused) {
  grid-column: span 4; grid-row: 2;
  --r: 0deg; opacity: .42;
  filter: saturate(.4) brightness(.7);
  justify-self: center; align-self: center;
}
/* Centred items shrink to their content, and every device is width:100% of
   its item, so without a width the strip collapsed to 10-24px dots. */
.stage[data-focus] .obj:not(.is-focused) { width: clamp(96px, 11cqw, 150px); }
.stage[data-focus] .obj-pockets:not(.is-focused) { width: clamp(44px, 4.6cqw, 64px); }
.stage[data-focus] .obj:not(.is-focused) .device { max-width: none; margin: 0 auto; }
/* The MCP box's type is sized for the DESK (cqw), which at thumbnail size
   spilled out of it: the port labels ran past the box edge. Thumbnail-sized
   type in the strip. */
.stage[data-focus] .obj-mcp:not(.is-focused) .box-ports { gap: 2px; margin-bottom: 3px; }
.stage[data-focus] .obj-mcp:not(.is-focused) .port { font-size: 5px; padding: 1px 0 2px; letter-spacing: .04em; overflow: hidden; white-space: nowrap; }
.stage[data-focus] .obj-mcp:not(.is-focused) .readout { font-size: 6px; padding: 3px 4px; }
.stage[data-focus] .tag { display: none; }
@media (hover: hover) {
  .stage[data-focus] .obj:not(.is-focused):hover { opacity: 1; filter: none; --lift: -4px; }
}

/* Close: an X at the top right, under the masthead, on every screen size
   (owner, 2026-11-11: not at the bottom). Lives in <body> (see bench.js). */
.put-back {
  position: fixed; z-index: 90;
  top: calc(var(--mast-h, 58px) + 14px); right: clamp(12px, 3.4vw, 46px);
  width: 42px; height: 42px; padding: 0;
  display: inline-grid; place-items: center;
  background: rgba(6,7,6,.86);
  border: 1px solid rgba(236,230,218,.18); border-radius: 50%;
  color: var(--cream); cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.8);
  transition: color .2s, border-color .2s, background .2s;
}
.put-back:hover, .put-back:focus-visible { color: #fff; border-color: var(--hoopy); background: rgba(20,14,10,.92); outline: none; }
.put-back[hidden] { display: none; }
.put-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.others-head { display: none; }

/* ── Dossier ──────────────────────────────────────────────────────────── */
.dossier { display: none; min-width: 0; }

.dossier-kicker { margin: 0 0 8px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--hoopy); }
.dossier h2 {
  font-family: var(--display);
  font-weight: 600; font-size: clamp(20px, 2.1vw, 34px);
  line-height: 1.08; letter-spacing: -.02em; margin: 0 0 18px; color: var(--cream);
}
.dossier-cols { display: grid; gap: 18px; }
.dossier h3 {
  margin: 0 0 6px; font-size: 9.5px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--sand);
  padding-bottom: 5px; border-bottom: 1px solid rgba(125,157,184,.24);
}
.dossier p { margin: 0; font-size: clamp(12px, .95vw, 14px); color: var(--cream-2); line-height: 1.62; }
.dossier-links { margin-top: 18px !important; display: flex; gap: 16px; flex-wrap: wrap; }
.dossier-links a {
  color: var(--hoopy); text-decoration: none;
  font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase;
  border-bottom: 1px solid var(--hoopy-lo); padding-bottom: 2px;
}
.dossier-links a:hover { color: var(--cream); border-bottom-color: var(--cream); }

/* ═══ THE THINKING ════════════════════════════════════════════════════════ */
.thinking {
  padding: clamp(70px, 13vh, 150px) clamp(18px, 3.4vw, 46px);
  max-width: 1240px; margin: 0 auto;
}
.thinking, .contact { scroll-margin-top: 68px; }

.th-open { max-width: 54rem; margin-bottom: clamp(50px, 9vh, 110px); }
.th-eyebrow { margin: 0 0 22px; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--hoopy); }
.th-thesis {
  font-family: var(--display);
  font-weight: 600; font-size: clamp(22px, 3.5vw, 44px);
  line-height: 1.2; letter-spacing: -.02em; margin: 0 0 26px; color: var(--cream);
}
.th-thesis em { font-style: normal; color: inherit; }
.th-sub { margin: 0; max-width: 40rem; color: var(--cream-2); }

.th-slab {
  position: relative; max-width: 40rem;
  padding: clamp(24px, 3vw, 38px) clamp(22px, 3vw, 40px);
  margin-bottom: clamp(40px, 7vh, 84px);
  background-color: rgba(26,30,28,.72);
  background-image: var(--tooth);
  border-top: 1px solid rgba(255,224,180,.14);
  border-left: 1px solid rgba(255,224,180,.07);
  border-radius: 2px;
  box-shadow: var(--sh-2), var(--sh-3);
}
.th-slab-a { margin-left: 0;    transform: rotate(-.35deg); }
.th-slab-b { margin-left: auto; margin-right: 0; transform: rotate(.4deg); }
.th-slab-c { margin-left: clamp(0px, 9vw, 150px); transform: rotate(-.25deg); }
.th-slab-d { margin-left: auto; margin-right: clamp(0px, 5vw, 90px); transform: rotate(.3deg); }
.th-slab-e { margin-left: clamp(0px, 4vw, 70px); transform: rotate(-.2deg); }

.th-slab h3 {
  font-family: var(--display);
  font-weight: 600; font-size: clamp(17px, 2.1vw, 26px);
  line-height: 1.2; letter-spacing: -.015em; margin: 0 0 16px; color: var(--cream);
}
.th-slab p { margin: 0 0 13px; color: var(--cream-2); }
.th-slab p:last-child { margin-bottom: 0; }
.th-slab em { color: inherit; font-style: normal; }
.th-link { color: var(--pockets); text-decoration: none; border-bottom: 1px solid var(--pockets-lo); }
.th-link:hover { color: #cfc7ff; border-bottom-color: var(--pockets); }

/* ═══ SUBPAGES: Experience, About, Contact ═══════════════════════════════
   Same room, same slabs. `.page` is the column every subpage sits in. */
.page {
  padding: clamp(56px, 11vh, 130px) clamp(16px, 3.4vw, 46px) clamp(30px, 6vh, 70px);
  max-width: 1240px; margin: 0 auto;
}
.page .th-thesis { max-width: 52rem; }
.page-about .th-slab { margin-left: 0; margin-right: 0; transform: none; max-width: 44rem; }
.th-slab h2 {
  font-family: var(--display);
  font-weight: 600; font-size: clamp(17px, 2.1vw, 26px);
  line-height: 1.2; letter-spacing: -.015em; margin: 0 0 16px; color: var(--cream);
}

.xp {
  max-width: 50rem;
  padding: clamp(24px, 3vw, 38px) 0 clamp(30px, 5vh, 56px);
  border-top: 1px solid rgba(236,230,218,.10);
}
.xp-head h2 {
  font-family: var(--display);
  font-weight: 600; font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -.02em; margin: 0 0 8px; color: var(--cream);
}
.xp-role { margin: 0 0 18px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--hoopy); line-height: 1.7; }
.xp-role span { color: var(--cream-3); padding: 0 .2em; }
.xp-intro { margin: 0 0 18px; color: var(--cream-2); max-width: 44rem; }
.xp-eng {
  margin: 26px 0 12px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--hoopy-hi); font-weight: 500;
}
.xp-list { margin: 0; padding: 0; list-style: none; }
.xp-list li {
  position: relative; margin: 0 0 14px; padding-left: 22px;
  color: var(--cream-2); max-width: 46rem;
}
.xp-list li::before {
  content: ""; position: absolute; left: 2px; top: .72em;
  width: 9px; height: 1px; background: var(--hoopy);
}
.xp-list em, .xp-intro em { color: var(--cream); font-style: italic; }
.xp-small .xp-intro { margin-bottom: 0; }
.xp-stack { max-width: 50rem; padding: clamp(24px, 3vw, 38px) 0 0; border-top: 1px solid rgba(236,230,218,.10); }
.xp-stack h2 { margin: 0 0 12px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--hoopy); font-weight: 500; }
.xp-stack p { margin: 0; color: var(--cream-2); line-height: 1.9; }
.xp-next { margin: clamp(36px, 6vh, 64px) 0 0; color: var(--cream-3); }
.xp-next a, .build-next a { color: var(--cream); text-decoration: none; border-bottom: 1px solid var(--hoopy-lo); }
.xp-next a:hover { border-bottom-color: var(--hoopy); }

.build-next { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: clamp(10px, 3vh, 30px); }
.build-next a {
  display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px;
  color: var(--cream-2); font-size: 14px; border-bottom-color: rgba(236,230,218,.14);
  transition: border-color .18s, color .18s;
}
.build-next a span {
  font-family: var(--display);
  font-size: clamp(20px, 2.4vw, 28px); color: var(--cream); letter-spacing: -.015em;
}
.build-next a:hover { color: var(--cream); border-bottom-color: var(--hoopy); }

.page-contact .ct-mail { display: inline-block; margin-top: 4px; }
.page-contact { min-height: calc(100svh - 160px); }

/* ── Contact ──────────────────────────────────────────────────────────── */
.contact {
  padding: clamp(60px, 11vh, 130px) clamp(18px, 3.4vw, 46px) clamp(50px, 8vh, 90px);
  max-width: 1240px; margin: 0 auto;
  border-top: 1px solid rgba(236,230,218,.09);
}
.ct-line { margin: 0 0 14px; color: var(--cream-3); font-size: 13px; }
.ct-mail {
  font-family: var(--display);
  font-weight: 600; font-size: clamp(24px, 4.6vw, 54px);
  letter-spacing: -.025em; color: var(--cream); text-decoration: none;
  border-bottom: 2px solid var(--hoopy-lo);
  transition: border-color .25s, color .25s;
}
.ct-mail:hover { color: var(--hoopy-hi); border-bottom-color: var(--hoopy); }
.ct-sub { margin: 22px 0 0; font-size: 11.5px; color: var(--cream-3); letter-spacing: .06em; }
.ct-sub a { color: var(--cream-2); text-decoration: none; border-bottom: 1px solid rgba(236,230,218,.2); }
.ct-sub a:hover { color: var(--cream); border-bottom-color: var(--hoopy); }

.foot {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px clamp(18px, 3.4vw, 46px) 30px;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--cream-3);
}
.foot-mark { font-size: 13px; }


/* ── Narrow ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    height: auto;
    gap: clamp(10px, 2.5vw, 18px) 0;
    padding: 4px 6px 10px;
  }
  .prop { display: none; }
  /* One column. Every object and every label auto-places in DOM order, which
     is already object-then-its-label. */
  .bench-intro, .obj, .tag,
  .stage[data-focus] .obj.is-focused,
  .stage[data-focus] .obj:not(.is-focused) {
    grid-column: 1; grid-row: auto; align-self: auto; justify-self: stretch;
    text-align: left;
  }
  .bench-intro { margin-bottom: clamp(14px, 3vw, 26px); }
  .tag { margin-bottom: clamp(18px, 4vw, 34px); }
  .tag-snark .tag-head { justify-content: flex-start; }
  .tag-snark .tag-note { margin-left: 0; }
  /* ⚠️ AN OPENED PROJECT IS ITS OWN PAGE ON A PHONE (owner, 2026-11-11). It
     used to open in place with everything else blurred around it, the intro
     blurred at the top. Now: the project, its write-up, then "More projects",
     a plain list of the OTHER projects' captions (no images, no blur, the
     open one left out). Tapping one opens it. `order` does the arranging. */
  .stage[data-focus] .bench-intro,
  .stage[data-focus] .obj:not(.is-focused) { display: none; }
  .stage[data-focus] .obj.is-focused { order: 1; }
  /* Room for the X above the opened project, so it never sits on the device. */
  .stage[data-focus] { padding-top: 50px; }
  .stage[data-focus] .dossier.open   { order: 2; }
  .stage[data-focus] .others-head {
    display: block; order: 3; margin: 6px 0 2px;
    font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--hoopy);
    padding-top: 18px; border-top: 1px solid rgba(236,230,218,.12);
  }
  .stage[data-focus] .tag { display: block; order: 4; margin-bottom: 14px; padding: 12px 0; border-bottom: 1px solid rgba(236,230,218,.08); }
  .stage[data-focus] .tag:last-of-type { border-bottom: 0; }
  .stage[data-focus] .tag.is-open { display: none; }
  /* Tilts are for the desk. In one column a tilted device and the caption
     under it overlapped (13-33px measured at 390 and 820 wide). */
  .obj, .tag { --r: 0deg; }
  /* The write-up kept its DESKTOP placement (column 8 / 13), so one tap made
     the grid invent twelve columns: the write-up jumped to the top of the page
     and every caption collapsed to one word per line. It is moved in the DOM
     to sit right after the opened object (bench.js); here it just flows. */
  .stage[data-focus] .dossier.open { grid-column: 1; grid-row: auto; margin: 4px 0 clamp(18px, 4vw, 30px); }
  .stage[data-focus] { aspect-ratio: auto; grid-template-rows: none; }
  .stage[data-focus] .obj.is-focused { z-index: 3; }

  .obj .device { max-width: none !important; margin: 0 !important; }
  .obj-pockets .device { max-width: 260px !important; }

  /* Proportional type is for the desk. In one column it goes back to real
     sizes, or cqw would carry on shrinking it against a narrow stage. */
  .bench-intro h1 { font-size: clamp(28px, 6.4vw, 44px); margin-bottom: 16px; }
  .bench-lede     { font-size: clamp(13px, 3.1vw, 15px); max-width: 40rem; }
  .tag-head { gap: 9px; }
  .tag-num  { font-size: 11px; }
  .tag-name { font-size: 17px; }
  .tag-note { max-width: none; font-size: 12px; margin-top: 5px; }

  .device-phone .live { width: 412px;  height: 884px; }
  .device-slab  .live { width: 1280px; height: 800px; }

  /* The MCP box's type is in cqw of the DESK, which in one phone-width column
     came out ~2px: an empty black box (owner, 2026-11-11). Real sizes here,
     and a shorter box so it isn't mostly empty screen. */
  .device-box { aspect-ratio: 1.6; padding: 10px; }
  .box-ports { gap: 6px; margin-bottom: 8px; }
  .port { font-size: 10px; padding: 4px 2px 5px; letter-spacing: .08em; }
  .readout { font-size: 12.5px; line-height: 1.55; padding: 10px 12px; }

  .th-slab { transform: none !important; margin-left: 0 !important; margin-right: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .obj, .device, .dossier, .live { transition-duration: .01ms !important; }
  .spinner { animation: none; }
}

/* ── "It is a real one" ───────────────────────────────────────────────────
   A live site inside a small frame is indistinguishable from a screenshot of
   one until you touch it, so an opened product wears a label for a few
   seconds and then gets out of the way. */
.livemark {
  position: absolute; z-index: 6; right: 9px; bottom: 9px;
  display: none; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px;
  background: rgba(6,8,7,.8);
  border: 1px solid var(--hoopy-lo);
  color: var(--hoopy-hi);
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .14em; text-transform: uppercase;
  pointer-events: none;
}
.obj.is-focused .livemark { display: inline-flex; animation: livemark 8s ease forwards; }
.livemark i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--hoopy);
  animation: livepulse 1.8s ease-in-out infinite;
}
@keyframes livemark { 0%,10% { opacity: 0; } 20%,78% { opacity: 1; } 100% { opacity: 0; } }
@keyframes livepulse { 0%,100% { opacity: 1; } 50% { opacity: .28; } }
@media (prefers-reduced-motion: reduce) {
  .obj.is-focused .livemark { animation: none; opacity: 1; }
  .livemark i { animation: none; }
}

/* Phones: the name and the button share the first row; the menu gets its own
   row underneath, spread across the width, so every page stays one tap away. */
@media (max-width: 760px) {
  .masthead { grid-template-columns: 1fr auto; row-gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .mark { grid-column: 1; grid-row: 1; font-size: 18px; }
  .mast-cta { grid-column: 2; grid-row: 1; }
  .mast-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-content: space-between; gap: 0; }
  .mast-nav a { font-size: 10.5px; letter-spacing: .1em; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
}
@media (max-width: 380px) {
  .mark { font-size: 16px; }
  .mast-cta { padding: 7px 11px; font-size: 12px; }
}


/* ═══ NAV: the Projects menu ══════════════════════════════════════════════
   A button, not a hover menu: it has to work by tap and by keyboard. js/nav.js
   toggles aria-expanded; Escape and a click outside close it. */
.nav-drop { position: relative; display: flex; align-items: center; }
.nav-drop-btn {
  font: inherit; background: none; border: 0; cursor: pointer;
  color: var(--cream-2); padding: 0 0 3px;
  font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase;
  border-bottom: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .18s, border-color .18s;
}
.nav-drop-btn svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .18s; }
.nav-drop-btn:hover, .nav-drop-btn[aria-expanded="true"] { color: var(--cream); border-bottom-color: var(--hoopy); }
.nav-drop-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-drop-btn.is-current { color: var(--cream); border-bottom-color: var(--hoopy-lo); }
.nav-drop-btn:focus-visible, .nav-menu a:focus-visible, .mast-nav a:focus-visible { outline: 2px solid var(--hoopy); outline-offset: 3px; border-radius: 2px; }
.nav-menu {
  position: absolute; top: calc(100% + 12px); left: -14px; z-index: 80;
  min-width: 240px; margin: 0; padding: 8px; list-style: none;
  background: #111312; border: 1px solid rgba(255,224,180,.14); border-radius: 6px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.9);
}
.nav-menu[hidden] { display: none; }
.nav-menu a {
  display: block; padding: 9px 12px; border-radius: 4px; border: 0 !important;
  color: var(--cream-2); text-decoration: none; text-transform: none; letter-spacing: 0;
  font-size: 14px;
}
.nav-menu a small { display: block; font-size: 12px; color: var(--cream-3); margin-top: 1px; }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { background: rgba(255,107,26,.10); color: var(--cream); }
.nav-menu .nav-all { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(236,230,218,.08); }

/* ═══ Desk captions: the way through to each case study ════════════════════ */
.tag-more {
  display: inline-block; margin-top: .45cqw;
  color: var(--hoopy-hi); text-decoration: none; font-size: .78cqw; font-weight: 500;
  border-bottom: 1px solid var(--hoopy-lo); padding-bottom: 1px;
  transition: color .18s, border-color .18s;
}
.tag-more:hover, .tag-more:focus-visible { color: var(--cream); border-bottom-color: var(--hoopy); outline: none; }
.tag-snark .tag-more { float: right; clear: both; }
.dossier-links a.is-internal { color: var(--cream); border-bottom-color: var(--hoopy); }

/* ═══ CASE STUDIES ═══════════════════════════════════════════════════════ */
.cs-head { max-width: 56rem; margin-bottom: clamp(30px, 6vh, 60px); }
.cs-kicker { margin: 0 0 16px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--hoopy); font-weight: 500; }
.cs-head h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 4.6vw, 58px); line-height: 1.06; letter-spacing: -.03em;
  margin: 0 0 18px; color: var(--cream); text-wrap: balance;
}
.cs-sum { margin: 0; max-width: 44rem; font-size: clamp(16px, 1.4vw, 19px); color: var(--cream-2); line-height: 1.6; }
.cs-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px 28px;
  max-width: 56rem; margin: 0 0 clamp(36px, 7vh, 70px); padding: 20px 0;
  border-top: 1px solid rgba(236,230,218,.10); border-bottom: 1px solid rgba(236,230,218,.10);
}
.cs-meta dt { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--cream-3); margin: 0 0 6px; }
.cs-meta dd { margin: 0; color: var(--cream); font-size: 14.5px; line-height: 1.5; }
.cs-meta a { color: var(--hoopy-hi); text-decoration: none; border-bottom: 1px solid var(--hoopy-lo); }
.cs-meta a:hover { color: var(--cream); border-bottom-color: var(--hoopy); }
.cs-sec { max-width: 46rem; margin: 0 0 clamp(36px, 6vh, 60px); }
.cs-sec h2 {
  font-family: var(--display); font-weight: 600; font-size: clamp(21px, 2.3vw, 28px);
  letter-spacing: -.02em; line-height: 1.2; margin: 0 0 14px; color: var(--cream);
}
.cs-sec p { margin: 0 0 14px; color: var(--cream-2); }
.cs-sec ul { margin: 0; padding: 0; list-style: none; }
.cs-sec li { position: relative; padding-left: 22px; margin: 0 0 14px; color: var(--cream-2); }
.cs-sec li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 9px; height: 1px; background: var(--hoopy); }
.cs-sec li b { color: var(--cream); font-weight: 600; }
.cs-shots { display: grid; gap: clamp(16px, 2vw, 26px); margin: 0 0 clamp(40px, 7vh, 70px); padding: 4px 0 8px; }
.cs-shots.wide  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cs-shots.phone { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); max-width: 980px; }
.cs-shots figure { margin: 0; min-width: 0; }
.cs-shots img {
  display: block; width: 100%; height: auto; border-radius: 6px;
  border: 1px solid rgba(255,224,180,.12); box-shadow: var(--sh-2), var(--sh-3);
  background: #060706;
}
.cs-shots.phone img { border-radius: 18px; }
.cs-shots figcaption { margin-top: 10px; font-size: 13px; color: var(--cream-3); line-height: 1.5; }
.cs-stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cs-stack li {
  padding: 5px 11px; border-radius: 999px; font-size: 13px; color: var(--cream);
  background: rgba(255,224,180,.05); border: 1px solid rgba(255,224,180,.12);
}
.cs-stack li::before { display: none; }
.cs-next {
  display: flex; justify-content: space-between; gap: 16px 30px; flex-wrap: wrap;
  max-width: 56rem; padding-top: 24px; border-top: 1px solid rgba(236,230,218,.10);
}
.cs-next a { color: var(--cream-2); text-decoration: none; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.cs-next a span { font-family: var(--display); font-weight: 600; font-size: clamp(18px, 2vw, 24px); color: var(--cream); letter-spacing: -.015em; }
.cs-next a:hover span { color: var(--hoopy-hi); }

@media (max-width: 900px) {
  .tag-more { font-size: 13px; margin-top: 8px; }
  .tag-snark .tag-more { float: none; }
}
@media (max-width: 620px) {
  .nav-menu { left: 0; min-width: min(260px, calc(100vw - 32px)); }
}

/* The call to action at the end of the Pockets case study. */
.cs-cta {
  max-width: 56rem; margin: 0 0 clamp(40px, 7vh, 70px); padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(173,161,255,.30); border-radius: 8px;
  background: linear-gradient(140deg, rgba(173,161,255,.12), rgba(173,161,255,.02));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
}
.cs-cta p { margin: 0; color: var(--cream); font-family: var(--display); font-weight: 600; font-size: clamp(17px, 1.8vw, 21px); letter-spacing: -.015em; max-width: 26rem; }
.cs-cta .btn-pockets { padding: 13px 22px; font-size: 15.5px; }
/* The Projects button and the plain links share one line box, so their
   underlines sit on the same line. */
.mast-nav > a, .nav-drop-btn { display: inline-flex; align-items: center; line-height: 1.4; }
/* Phone row: Projects matches its neighbors' size (this sits after the base
   .nav-drop-btn rule so it wins). */
@media (max-width: 760px) { .nav-drop-btn { font-size: 10.5px; letter-spacing: .1em; } }

/* Orange emphasis: a phrase in Safety orange, upright. Used sparingly. */
.hl { color: var(--hoopy); font-style: normal; }

/* Case study screenshots: a row side by side on a wide screen, a swipe
   carousel (one at a time, with dots) on a phone; each opens larger in a
   light box (js/shots.js, borrowed from the Pockets marketing site). */
.shot-btn {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; transition: transform .25s var(--settle);
}
.shot-btn:hover { transform: translateY(-3px); }
.shot-btn:focus-visible { outline: 2px solid var(--hoopy); outline-offset: 4px; border-radius: 8px; }
.strip-dots { display: none; justify-content: center; gap: 8px; margin: 12px 0 clamp(40px, 7vh, 70px); }
.strip-dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(232,232,240,.22); cursor: pointer; transition: background .2s, transform .2s; }
.strip-dots button.active { background: var(--hoopy); transform: scale(1.25); }
@media (max-width: 880px) {
  .cs-shots.wide, .cs-shots.phone {
    grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-left: -16px; margin-right: -16px; padding: 6px 9% 10px; max-width: none;
  }
  .cs-shots.phone { grid-auto-columns: 64%; padding-left: 18%; padding-right: 18%; }
  .cs-shots::-webkit-scrollbar { display: none; }
  .cs-shots figure { scroll-snap-align: center; }
  .cs-shots:has(> :nth-child(2)) { margin-bottom: 0; }
  .cs-shots:has(> :nth-child(2)) + .strip-dots { display: flex; }
}
html.zoom-open { overflow: hidden; }
.zoom-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(6,7,7,.96); display: flex; align-items: center; justify-content: center; gap: 18px; padding: 20px; }
.zoom-overlay[hidden] { display: none; }
.zoom-fig { margin: 0; display: flex; flex-direction: column; align-items: center; max-height: 100%; min-width: 0; }
.zoom-fig img { max-height: calc(100vh - 100px); max-width: min(1400px, 84vw); width: auto; height: auto; border-radius: 6px; box-shadow: 0 0 0 1px rgba(232,232,240,.16); cursor: zoom-out; }
.zoom-overlay.is-phone .zoom-fig img { max-width: min(460px, 82vw); border-radius: 24px; }
.zoom-fig figcaption { color: var(--cream); margin-top: 12px; font-size: 15px; text-align: center; max-width: 60ch; }
.zoom-close { position: absolute; top: 16px; right: 18px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(232,232,240,.22); background: #141716; color: var(--cream); font-size: 16px; cursor: pointer; }
.zoom-prev, .zoom-next { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(232,232,240,.22); background: #141716; color: var(--cream); font-size: 28px; line-height: 1; cursor: pointer; }
.zoom-prev[hidden], .zoom-next[hidden] { display: none; }
.zoom-close:focus-visible, .zoom-prev:focus-visible, .zoom-next:focus-visible { outline: 2px solid var(--hoopy); outline-offset: 3px; }
@media (max-width: 600px) {
  .zoom-overlay { padding: 64px 16px 92px; }
  .zoom-prev, .zoom-next { position: absolute; bottom: 22px; }
  .zoom-prev { left: calc(50% - 60px); } .zoom-next { right: calc(50% - 60px); }
  .zoom-fig img { max-width: 92vw; }
}

/* ?notrack=1 / ?notrack=0 confirmation (see the analytics block in sync-chrome.py). */
.notrack-toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 100; background: #16151b; color: var(--cream); border: 1px solid rgba(255,255,255,.14);
  padding: 10px 16px; border-radius: 6px; font-size: 14px; max-width: calc(100vw - 32px);
}
