:root {
  --ink: #24211c;
  --muted: #857d6e;
  --paper: #f2ede2;
  --hud: #fffaf0;
  --sans: Manrope, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1a140f; color: var(--ink); font-family: var(--sans); font-synthesis: none; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only:focus-within { position: fixed; left: 16px; right: 16px; bottom: 16px; width: auto; height: auto; clip: auto; z-index: 30; display: flex; flex-wrap: wrap; gap: 8px; }
.sr-only:focus-within button { font: 500 13px var(--sans); padding: 8px 12px; border-radius: 99px; border: 0; background: var(--hud); }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
/* holding a finger on the desk winds up a smack: no text selection, magnifier or callout
   on the way (reading the portfolio and the inspect panel stay selectable) */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.reader, .panel { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

.loader { position: fixed; inset: 0; display: grid; place-items: center; background: #1a140f; color: #cbbfa9; font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; z-index: 40; transition: opacity 1.2s ease, visibility 0s 1.2s; }
.ready .loader { opacity: 0; visibility: hidden; }
.loader { grid-auto-rows: min-content; align-content: center; gap: 18px; text-align: center; }
.loader-note { margin: 0; max-width: 34em; font: 400 13px/1.6 var(--sans); letter-spacing: 0; text-transform: none; color: #a89c87; }
.loader-note a { color: #e6d9c0; text-decoration: underline; }
.loader:not(.ready) .loader-note { pointer-events: auto; }

/* ---------- HUD ---------- */
.hud { position: fixed; z-index: 10; color: var(--hud); text-shadow: 0 1px 12px rgba(20, 12, 4, .45); transition: opacity .5s ease; }
.inspecting .hud, .reading .hud { opacity: 0; pointer-events: none; }
.top { top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 26px; pointer-events: none; }
.top a { pointer-events: auto; text-decoration: none; }
.name { font: 500 15px/1.3 var(--sans); display: flex; flex-direction: column; }
.name small { font-size: 12.5px; opacity: .85; font-weight: 400; }
.links { display: flex; gap: 18px; }
.classic, .work { font: 500 13px/1.3 var(--sans); opacity: .8; }
.classic:hover, .work:hover { opacity: 1; }
/* soft shades in the top corners, so the name, the clock and the links read over a bright desk or the laptop */
.top::before, .top::after { content: ''; position: fixed; top: 0; width: 460px; height: 260px; max-width: 80vw; pointer-events: none; z-index: -1; background: radial-gradient(ellipse 100% 100% at var(--corner) 0, rgba(20, 12, 4, .4), rgba(20, 12, 4, .16) 50%, transparent 75%); }
.top::before { left: 0; --corner: 0; }
.top::after { right: 0; width: 380px; height: 180px; --corner: 100%; }
/* under "Classic site", level with the line under the name */
.hud-contact { top: 42px; right: 26px; font: 500 13px/1.3 var(--sans); opacity: .8; text-decoration: none; }
.hud-contact:hover { opacity: 1; }
.hud-credits { position: fixed; right: 26px; bottom: 22px; font: 500 11px/1 var(--sans); opacity: .6; color: var(--hud); text-decoration: none; }
.hud-credits:hover { opacity: 1; }
.clock { left: 26px; top: 76px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
#time { font: 500 22px/1 var(--mono); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
#mood { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.hint { left: 50%; bottom: 22px; margin: 0; transform: translateX(-50%); font: 500 12.5px/1 var(--sans); opacity: .82; white-space: nowrap; transition: opacity .6s ease, transform .6s var(--ease); }
.hint.gone { opacity: 0; transform: translate(-50%, 6px); }

/* the label and the time readout beside it: one height */
.tip { position: fixed; left: 0; top: 0; z-index: 20; pointer-events: none; display: flex; align-items: center; height: 30px; padding: 0 10px; background: rgba(255, 250, 240, .92); color: var(--ink); font: 500 12px/1 var(--sans); white-space: nowrap; box-shadow: 0 6px 20px rgba(20, 12, 4, .18); opacity: 0; transition: opacity .18s ease; }
.tip.on { opacity: 1; }
.inspecting .tip, .reading .tip { opacity: 0; }
/* the time while it is being turned: square, like a dial's readout, beside the label */
.clocktip { position: fixed; left: 0; top: 0; z-index: 20; pointer-events: none; display: flex; align-items: baseline; gap: 9px; height: 30px; padding: 7px 10px 0; background: rgba(255, 250, 240, .92); color: var(--ink); white-space: nowrap; box-shadow: 0 6px 20px rgba(20, 12, 4, .18); opacity: 0; transition: opacity .18s ease; }
.clocktip.on { opacity: 1; }
.clocktip b { font: 500 13px/1 var(--mono); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
/* as wide as the longest light's name ("Late afternoon"), so the readout keeps its size all day */
.clocktip span { min-width: calc(14ch + 14 * .14em); font: 500 9.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* the day, midnight to midnight: a hairline scale ticked every six hours, the hour marked in red */
.clocktip i { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 3px; color: rgba(36, 33, 28, .3); border-right: 1px solid; box-shadow: inset 0 -1px; background: linear-gradient(to right, currentColor 1px, transparent 1px) 0 0 / 25% 100%; }
.clocktip i::after { content: ''; position: absolute; left: calc(var(--day, 0) * 100%); bottom: 0; width: 2px; height: 6px; margin-left: -1px; background: #d3311f; }
.inspecting .clocktip, .reading .clocktip { opacity: 0; }
/* how close the view is, 100% to 200%, while a pinch or ctrl + wheel changes it: the same readout, a quarter a tick */
.zoomtip b { min-width: 4ch; text-align: right; }
.zoomtip span { min-width: 0; }
.inspecting .zoomtip.on { opacity: 1; }
/* "Scroll to explore", over the laptop's screen the first time it is picked up: square like the tips,
   with a small red mark running down a hairline, like the one on the time readout */
.screenhint { position: fixed; left: 0; top: 0; z-index: 14; pointer-events: none; display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 11px 0 10px; background: rgba(255, 250, 240, .92); color: var(--ink); font: 500 12px/1 var(--sans); white-space: nowrap; box-shadow: 0 6px 20px rgba(20, 12, 4, .18); opacity: 0; transition: opacity .6s ease; }
.screenhint.on { opacity: 1; transition-delay: .25s; }
.screenhint i { position: relative; width: 1px; height: 14px; background: rgba(36, 33, 28, .28); }
.screenhint i::after { content: ''; position: absolute; left: -1px; top: 0; width: 3px; height: 5px; background: #d3311f; animation: screenhint-run 1.8s var(--ease) infinite; }
@keyframes screenhint-run { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 65% { transform: translateY(9px); opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }
@media (max-width: 760px) { .screenhint { height: 24px; gap: 7px; padding: 0 8px 0 7px; font-size: 11px; } .screenhint i { height: 11px; } }
@media (prefers-reduced-motion: reduce) { .screenhint i::after { animation: none; transform: translateY(4px); } }

/* ---------- Inspect panel (loadout-style) ---------- */
.scrim { position: fixed; inset: 0; z-index: 14; pointer-events: none; opacity: 0; background: linear-gradient(to right, rgba(12, 8, 4, 0) 35%, rgba(12, 8, 4, .5) 70%, rgba(12, 8, 4, .62)); transition: opacity .8s ease; }
.inspecting .scrim { opacity: 1; }
.panel { position: fixed; z-index: 15; top: 50%; right: clamp(24px, 6vw, 96px); width: min(400px, 38vw); transform: translate(24px, -50%); opacity: 0; pointer-events: none; color: #f6f1e7; transition: opacity .45s ease, transform .7s var(--ease); }
.panel.on { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.panel .kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #d8cdb8; }
.panel .kicker span { padding: 4px 6px; border: 1px solid rgba(246, 241, 231, .35); color: #f6f1e7; }
.panel .draft { margin-left: auto; font-weight: 500; font-size: 9.5px; padding: 3px 6px; border: 1px dashed rgba(246, 241, 231, .45); color: #f3c98b; }
.panel h2 { margin: 0; font: 500 clamp(34px, 3.6vw, 52px)/1.04 var(--sans); letter-spacing: -.028em; text-wrap: balance; }
.panel .stats { display: flex; gap: 0; margin: 22px 0 0; border-top: 1px solid rgba(246, 241, 231, .16); border-bottom: 1px solid rgba(246, 241, 231, .16); }
.panel .stats div { flex: 1; padding: 12px 0 11px; display: flex; flex-direction: column-reverse; gap: 6px; }
.panel .stats div + div { padding-left: 14px; border-left: 1px solid rgba(246, 241, 231, .16); }
.panel .stats dd { margin: 0; font: 500 26px/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.panel .stats dt { font: 500 10px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #bfb39e; }
.panel .body { margin: 18px 0 26px; font: 400 15px/1.6 var(--sans); color: #e6ddcd; max-width: 36ch; }
.panel .list { margin-top: 20px; }
.panel .label { margin: 0 0 8px; font: 500 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #bfb39e; }
.panel ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(246, 241, 231, .16); }
.panel li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid rgba(246, 241, 231, .16); font: 500 14px/1.3 var(--sans); }
.panel li a { display: flex; justify-content: space-between; gap: 16px; width: 100%; text-decoration: none; }
.panel li a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.panel li em { font: 500 11px/1.3 var(--mono); font-style: normal; color: #bfb39e; letter-spacing: .06em; white-space: nowrap; }
.panel .keys { margin-top: 28px; font: 500 11px/1 var(--mono); color: #bfb39e; letter-spacing: .06em; }
.panel .keys span { margin: 0 6px; }
.panel kbd { font: inherit; padding: 3px 5px; border: 1px solid rgba(246, 241, 231, .35); border-radius: 3px; color: #f6f1e7; margin-right: 4px; }
.panel .close { position: absolute; top: -48px; right: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(246, 241, 231, .35); background: transparent; color: #f6f1e7; font: 400 20px/1 var(--sans); cursor: pointer; }
.panel .close:hover { background: rgba(246, 241, 231, .12); }

@media (max-aspect-ratio: 1/1) {
  .scrim { background: linear-gradient(to top, rgba(12, 8, 4, .7), rgba(12, 8, 4, 0) 60%); }
  .panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; padding: 24px 20px 28px; transform: translateY(24px); background: linear-gradient(to top, rgba(18, 12, 6, .7), rgba(18, 12, 6, 0)); }
  .panel.on { transform: none; }
  .panel h2 { font-size: 32px; }
  .panel .body { margin: 12px 0 10px; font-size: 14px; }
  .panel .stats { margin-top: 14px; }
  .panel .stats div { padding: 9px 0 8px; }
  .panel .stats dd { font-size: 20px; }
  .panel .list { margin-top: 12px; }
  .panel .list + .list, .panel .keys { display: none; }
  .panel .close { top: -44px; right: 20px; }
}

/* ---------- Reader: the book as a web page ---------- */
.reader { --crop: 0; --rule: rgba(36, 33, 28, .14); --tile: #e7e0d2; --spine: rgba(60, 45, 25, .16); position: fixed; inset: 0; z-index: 25; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); color: var(--ink); opacity: 0; transition: opacity .6s ease, background-color .5s ease, color .5s ease; outline: none; }
/* the book at night: the same pages in dark ink */
.reader.dark { --paper: #191714; --ink: #ece7dc; --muted: #a39c8f; --rule: rgba(236, 231, 220, .14); --tile: #24211d; --spine: rgba(0, 0, 0, .55); }
.reader.on { opacity: 1; }
.back { position: fixed; top: 18px; right: 20px; z-index: 26; padding: 9px 14px; border: 1px solid rgba(36, 33, 28, .16); border-radius: 99px; background: rgba(242, 237, 226, .86); backdrop-filter: blur(8px); font: 500 13px/1 var(--sans); color: var(--ink); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity .4s ease .5s, transform .5s var(--ease) .5s; }
.reading .back { opacity: 1; pointer-events: auto; transform: none; }
.back:hover { background: #fff; }

.spread { display: grid; grid-template-columns: 1fr 1fr; min-height: 100%; }
.page { position: relative; container-type: inline-size; background-color: var(--paper); transition: background-color .5s ease; background-image: var(--grain); background-size: 160px, 100% 100%; }
.page.left { position: sticky; top: 0; height: 100vh; overflow: hidden; background-image: var(--grain), linear-gradient(to left, var(--spine), transparent 10%); }
.page.right { background-image: var(--grain), linear-gradient(to right, var(--spine), transparent 10%); background-attachment: local; }
.page.right { background-repeat: repeat, no-repeat; }

/* Absolutely placed words, in page units (1u = 1cqw). */
.u { position: absolute; margin: 0; left: calc(var(--x) * 1cqw); top: calc((var(--y) - var(--crop)) * 1cqw); font-size: calc(var(--s) * 1cqw); line-height: calc(var(--l) * 1cqw); letter-spacing: calc(var(--t) * 1em); font-weight: var(--wt); white-space: nowrap; text-decoration: none; color: var(--ink); }
.u.muted { color: var(--muted); }
.u.italic { font-style: italic; }
.u.underline { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: .06em; }
.f-sans { font-family: var(--sans); }
.f-serif { font-family: var(--serif); }
.f-mono { font-family: var(--mono); }
.u.rule { height: max(1px, .12cqw); width: calc(var(--w) * 1cqw); background: var(--rule); }
a.u:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .22em; }

.flow { padding: 0 12cqw 10cqw; }
.entry { padding-top: 12cqw; }
.entry .kicker { margin: 0 0 1cqw; font: 600 1.8cqw/3cqw var(--sans); letter-spacing: .24em; color: var(--muted); }
.entry h2 { margin: 0; font: 400 7.5cqw/8.5cqw var(--serif); }
.entry .lede { margin: .5cqw 0 3cqw; font: italic 400 3.4cqw/4.4cqw var(--serif); color: var(--muted); }
.entry figure { margin: 0 0 3.5cqw; overflow: hidden; background: var(--tile); }
.entry figure img { display: block; width: 100%; height: auto; }
.entry figure.app { padding: 6cqw; background: var(--tile); }
.entry figure.app img { box-shadow: 0 1cqw 4cqw rgba(36, 33, 28, .15); }
.entry .body { margin: 0 0 1.4cqw; font: 400 2.7cqw/4.2cqw var(--sans); max-width: 70cqw; }
.entry .more { font: 500 2.2cqw/3.6cqw var(--sans); text-underline-offset: .22em; text-decoration-thickness: .06em; }
.entry.cont { padding-top: 2cqw; }
.meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; margin: 4cqw 0 2cqw; padding: 2.4cqw 0; border-block: 1px solid var(--rule); }
.meta div { margin: 0; }
.meta dt { font: 600 1.6cqw/2.4cqw var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: .6cqw 0 0; font: 400 2.4cqw/3.4cqw var(--sans); }
.part { margin-top: 5cqw; }
.part h3 { display: flex; align-items: center; gap: 1.6cqw; margin: 0 0 1.4cqw; font: 400 4cqw/5cqw var(--serif); }
.part p { margin: 0; font: 400 2.7cqw/4.2cqw var(--sans); max-width: 70cqw; }
.draft { font: 500 1.4cqw/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: .5cqw .8cqw; border: 1px dashed rgba(156, 79, 54, .6); color: #9c4f36; }
.dark .draft { color: #d98a6c; border-color: rgba(217, 138, 108, .6); }
.entry figure.placeholder { display: grid; place-items: center; aspect-ratio: 16 / 10; border: 1px dashed rgba(36, 33, 28, .25); background: rgba(36, 33, 28, .03); }
.entry figure.placeholder span { font: 500 1.8cqw/1.4 var(--mono); letter-spacing: .06em; color: var(--muted); }
.entry .grid { margin-top: 5cqw; }
.entry .more { display: inline-block; margin-top: 4cqw; }
.mini { margin-top: 5cqw; }
.mini h3 { margin: 0 0 1cqw; font: 400 4cqw/5cqw var(--serif); }
.mini h3 span { font: 600 1.6cqw/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-left: 1.2cqw; vertical-align: middle; }
.mini p { margin: 0; font: 400 2.7cqw/4.2cqw var(--sans); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; }
.grid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--tile); }
.colophon { display: flex; gap: 4cqw; margin-top: 12cqw; padding-top: 3cqw; border-top: 1px solid var(--rule); font: 500 2.2cqw/1 var(--sans); }
.colophon a { text-decoration: none; }
.credits { margin: 4cqw 0 0; font: 400 1.7cqw/2.8cqw var(--sans); color: var(--muted); }
.credits a { color: inherit; text-underline-offset: .2em; }
.colophon a:hover { text-decoration: underline; text-underline-offset: .22em; }

@media (max-width: 759px) {
  .spread { grid-template-columns: 1fr; }
  .page.left { position: relative; height: auto; background-image: var(--grain); }
  .page.right { background-image: var(--grain); }
  .back { top: auto; bottom: 16px; right: 16px; }
  .entry .body, .part p, .mini p { font-size: 3.6cqw; line-height: 5.4cqw; max-width: none; }
  .meta dd { font-size: 3cqw; line-height: 4.2cqw; }
}

/* ---------- A case: its words on the left page, its pictures as a bento on the right ---------- */
/* The tabs: one per case along the top of the left page, on a rule (sizes from spread.js).
   The open one is taller and joins its page; the others lift a little under the pointer. */
.tabs { position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: calc(var(--tab-on) * 1cqw); }
.tabs::after { content: ""; position: absolute; left: 12cqw; right: 12cqw; bottom: 0; height: max(1px, .12cqw); background: var(--rule); }
.tab { appearance: none; position: absolute; z-index: 1; bottom: 0; left: calc(var(--x) * 1cqw); width: calc(var(--w) * 1cqw); height: calc(var(--tab-h) * 1cqw); margin: 0; padding: 0; border: 0; background: var(--tile); color: var(--muted); font: inherit; text-align: left; cursor: pointer; transition: height .26s var(--ease), color .26s ease, background-color .5s ease; }
.tab .n, .tab .name { position: absolute; left: calc(var(--tab-pad) * 1cqw); right: calc(var(--tab-pad) * 1cqw); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tab .n { bottom: 5.2cqw; font: 400 1.4cqw/2cqw var(--mono); color: var(--muted); }
.tab .name { bottom: 2cqw; font: 500 1.7cqw/2.6cqw var(--sans); }
.tab:hover { height: calc((var(--tab-h) + .9) * 1cqw); color: var(--ink); }
.tab[aria-selected="true"] { z-index: 2; bottom: calc(max(1px, .12cqw) * -1); height: calc((var(--tab-on) + .2) * 1cqw); background: var(--paper) var(--grain); background-size: 160px; color: var(--ink); box-shadow: inset 0 max(1px, .12cqw) var(--rule), inset max(1px, .12cqw) 0 var(--rule), inset calc(max(1px, .12cqw) * -1) 0 var(--rule); cursor: default; }
.tab:focus-visible { outline: 2px solid var(--muted); outline-offset: 2px; }
/* the open case's words, placed in page units like the texture under them */
.case-words { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .16s ease, visibility 0s linear .16s; }
.case-words.on { opacity: 1; visibility: visible; transition: none; }
.case-head { display: none; }
.case-head h2 { margin: 0; font: 400 7.5cqw/8.5cqw var(--serif); }
.case-head .lede { margin: .5cqw 0 3cqw; font: italic 400 3.4cqw/4.4cqw var(--serif); color: var(--muted); }
.case-head .body { margin: 0; font: 400 2.7cqw/4.2cqw var(--sans); }
.case-head .more { display: inline-block; margin-top: 2cqw; font: 500 2.2cqw/3.6cqw var(--sans); text-underline-offset: .22em; text-decoration-thickness: .06em; }
/* the open case's pictures, from the top of the right page */
.case { position: relative; padding: max(8cqw, calc((var(--bento-y) - var(--crop)) * 1cqw)) 12cqw 10cqw; }
.case .cue { position: absolute; left: 0; right: 0; top: max(2cqw, calc((var(--hint-y) - var(--crop)) * 1cqw)); margin: 0; text-align: center; font: 600 1.6cqw/3cqw var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
/* changing case: everything on both pages rises in, one after another */
@keyframes rise { from { opacity: 0; transform: translateY(1.4cqw); } }
.reader.anim .case-words.on .u, .reader.anim .case:not([hidden]) .bento > .t, .reader.anim .case:not([hidden]) .cue, .reader.anim .case:not([hidden]) .case-head { animation: rise .6s var(--ease) both; animation-delay: calc(140ms + min(var(--i, 0), 14) * 45ms); }
.reader.anim .case:not([hidden]) .bento > .t { animation-delay: calc(260ms + min(var(--i, 0), 10) * 55ms); }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 9cqw; gap: 1.2cqw; }
.bento .t { margin: 0; min-width: 0; min-height: 0; overflow: hidden; background: var(--tile); }
.bento .media video, .bento .media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bento .phone img { object-position: top; }
.bento .app { display: flex; align-items: center; justify-content: center; padding: 5cqw; }
.bento .app img { display: block; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 1cqw 4cqw rgba(36, 33, 28, .15); }
.bento .label { display: flex; align-items: center; gap: 1.2cqw; font: 600 1.4cqw/2cqw var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.bento .words, .bento .stat { display: flex; flex-direction: column; justify-content: space-between; gap: 2cqw; padding: 2.4cqw; }
.bento .words p { margin: 0; font: 400 2.1cqw/3.2cqw var(--sans); }
.bento .stat p { margin: 0; font: 400 1.9cqw/2.8cqw var(--sans); color: var(--muted); }
.bento .stat p > b { display: block; font: 400 6cqw/1 var(--serif); color: var(--ink); }
.bento .stat.small p > b { font-size: 3.6cqw; line-height: 4.2cqw; }
.bento .todo { display: flex; align-items: flex-end; padding: 2.4cqw; background: transparent; border: 1px dashed var(--rule); }
.bento .todo span { font: 500 1.6cqw/1.5 var(--mono); letter-spacing: .04em; color: var(--muted); }
.bento .next { display: flex; justify-content: space-between; align-items: flex-end; padding: 2.4cqw; background: var(--ink); color: var(--paper); text-decoration: none; transition: opacity .2s ease; }
.bento .next span { font: 600 1.4cqw/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.bento .next > b { font: 400 4.4cqw/1 var(--serif); }
.bento .next:hover { opacity: .88; }
@media (max-width: 759px) {
  .case-words { display: none; }
  .page.left { position: sticky; top: 0; z-index: 3; }
  .tabs { position: relative; top: 0; height: 16cqw; }
  .tabs::after { left: 4cqw; right: 4cqw; }
  .tab { left: calc(4cqw + var(--k) * 23.3cqw); width: 22.7cqw; height: 13cqw; }
  .tab:hover { height: 13cqw; }
  .tab[aria-selected="true"] { height: 14.5cqw; }
  .tab .n { left: 2.4cqw; bottom: 7.4cqw; font-size: 2.6cqw; line-height: 3.4cqw; }
  .tab .n { left: 2cqw; }
  .tab .name { left: 2cqw; right: 1cqw; bottom: 2.8cqw; font-size: 2.9cqw; line-height: 4.4cqw; }
  .case-head .more { font-size: 3.4cqw; line-height: 5cqw; }
  .case { padding: 8cqw 6cqw 14cqw; }
  .case .cue { display: none; }
  .case-head { display: block; margin-bottom: 5cqw; }
  .case-head .body { font-size: 3.6cqw; line-height: 5.4cqw; max-width: none; }
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: 2cqw; }
  .bento .t { grid-column: span 2 !important; grid-row: auto !important; }
  .bento .media, .bento .app, .bento .todo { aspect-ratio: 16 / 10; }
  .bento .phone { grid-column: span 1 !important; aspect-ratio: 9 / 19; }
  .bento .words p { font-size: 3.6cqw; line-height: 5.4cqw; }
  .bento .label, .bento .next span { font-size: 2.4cqw; line-height: 3.2cqw; }
  .bento .stat p > b { font-size: 9cqw; }
  .bento .stat p, .bento .todo span { font-size: 3cqw; line-height: 4.4cqw; }
  .bento .next > b { font-size: 7cqw; }
}

/* ---------- The laptop's screen, full screen: a twin of the page in its 3D browser ---------- */
/* (sizes are the 3D page's pixels over 13.56: its column is 1356 of them wide) */
.explore .page { width: min(100%, 1480px); margin: 0 auto; min-height: 100%; padding: 0 calc(min(100vw, 1480px) * .09) 7cqw; background-image: var(--grain); }
.explore .head { padding-top: 6.84cqw; }
.explore .head .kicker { display: flex; justify-content: space-between; margin: 0; font: 600 max(11px, 1.47cqw)/1.4 var(--sans); letter-spacing: .24em; color: var(--muted); }
.explore .head .kicker span + span { font: 500 max(10.5px, 1.4cqw)/1.4 var(--mono); letter-spacing: .12em; }
.explore .head h2 { margin: 1.95cqw 0 0; font: 400 max(48px, 9.4cqw)/1 var(--serif); letter-spacing: -.01em; }
.explore .head .lede { margin: 1.47cqw 0 0; font: italic 400 max(20px, 3.24cqw)/1.2 var(--serif); color: var(--muted); }
.explore .head .body { margin: 1.95cqw 0 0; font: 400 max(15px, 1.92cqw)/1.55 var(--sans); max-width: 60ch; }
.explore .site { padding-top: 8.3cqw; }
.explore .head + .site { padding-top: 6.35cqw; }
.explore .site h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2.69cqw; margin: 0; padding: 3.18cqw 0 2.44cqw; border-top: 1px solid rgba(36, 33, 28, .16); font: 400 max(28px, 4.58cqw)/1 var(--serif); }
.explore .site h3 .n { font: 500 max(11px, 1.62cqw)/1 var(--mono); color: var(--muted); }
.explore .site h3 .kind { margin-left: auto; font: 600 max(10.5px, 1.33cqw)/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.explore figure { margin: 0 0 2.08cqw; background: #e2dace; box-shadow: inset 0 0 0 1px rgba(36, 33, 28, .1); }
.explore figure img, .explore figure video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.explore figure.phone img, .explore figure.phone video { aspect-ratio: 780 / 1688; }
.explore .pair { display: grid; grid-template-columns: 1030fr 298fr; gap: 2.08cqw; align-items: start; }
.explore .pair.single { grid-template-columns: 1fr; }
.explore .pair figure { margin: 0; }
.explore .more { display: inline-block; margin-top: 2.44cqw; font: 500 max(13px, 1.77cqw)/1 var(--sans); text-underline-offset: .22em; text-decoration-thickness: .06em; }
.explore .end { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8.3cqw; padding-top: 3.18cqw; border-top: 1px solid rgba(36, 33, 28, .16); }
.explore .end p { margin: 0; font: italic 400 max(20px, 3.24cqw)/1 var(--serif); color: var(--muted); }
.explore .end a { font: 500 max(13px, 1.77cqw)/1 var(--sans); text-underline-offset: .22em; text-decoration-thickness: .06em; }
.explore-back, .reading .explore-back { opacity: 0; pointer-events: none; }
.explore.on + .explore-back { opacity: 1; pointer-events: auto; transform: none; }
.browsing .scrim { opacity: 0; }
@media (max-width: 759px) {
  .explore .page { padding: 0 20px 72px; }
  .explore .head { padding-top: 64px; }
  .explore .site { padding-top: 48px; }
  .explore .pair { grid-template-columns: 1fr; }
  .explore .pair figure.phone { width: 42%; }
  .explore .end { flex-direction: column; gap: 16px; }
}

/* the laptop's panel: a button into the screen, and lists set as one line of names */
.panel .action { display: inline-flex; align-items: center; gap: 10px; margin: -8px 0 4px; padding: 10px 14px; border: 1px solid rgba(246, 241, 231, .4); background: transparent; color: #f6f1e7; font: 500 13px/1 var(--sans); cursor: pointer; transition: background .2s ease; }
.panel .action:hover { background: rgba(246, 241, 231, .12); }
.panel .list.inline ul { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 10px; }
.panel .list.inline li { display: inline-flex; gap: 6px; align-items: baseline; padding: 0; border: 0; font-size: 13.5px; }
.panel .list.inline li a { width: auto; gap: 6px; }
.panel .list.inline li a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.panel .list.inline li em { font-size: 10px; }
@media (max-aspect-ratio: 1/1) {
  .panel .action { margin: 0 0 2px; padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; }
}

@media (max-width: 600px) {
  .top { padding: 16px; }
  .clock { left: 16px; top: 64px; }
  .hud-contact { top: 36px; right: 16px; }
  .hint { bottom: 14px; width: calc(100% - 32px); white-space: normal; text-align: center; line-height: 1.4; }
}

/* ---------- The finding game (discover.js): a count under the clock, then a note ---------- */
.found { left: 26px; top: 128px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.hud.found:not(.on) { opacity: 0; pointer-events: none; }
.found-count { margin: 0; padding: 0; border: 0; background: none; color: inherit; text-shadow: inherit; font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; font-variant-numeric: tabular-nums; opacity: .75; cursor: default; transition: opacity .3s ease; }
.found-count:disabled { color: inherit; }
.found-n { position: relative; display: inline-block; }
.found-n i { display: inline-block; font-style: normal; }
.found-n i.in { animation: found-in .55s var(--ease) both; }
.found-n i.out { position: absolute; left: 0; top: 0; animation: found-out .45s var(--ease) both; }
@keyframes found-in { from { opacity: 0; transform: translateY(.7em); } }
@keyframes found-out { to { opacity: 0; transform: translateY(-.7em); } }
.found-note { display: none; }
.complete .found-count { cursor: pointer; opacity: .9; }
.complete .found-count:hover { opacity: 1; }
.complete .found-note { display: inline; }
.complete .found-count:hover .found-note { text-decoration: underline; text-underline-offset: 3px; }
/* one hairline per thing to find, like the marks on a dial */
.found-ticks { display: flex; gap: 3px; }
.found-ticks i { width: 1px; height: 7px; background: currentColor; opacity: .28; box-shadow: 0 1px 6px rgba(20, 12, 4, .35); transform-origin: bottom; transition: opacity .6s ease; }
.found-ticks i.lit { opacity: .85; }
.found-ticks i.new { animation: found-tick .7s var(--ease) both; }
@keyframes found-tick { from { transform: scaleY(0); opacity: .28; } }

.note-wrap { position: fixed; inset: 0; z-index: 28; display: grid; place-items: center; padding: 24px; }
.note-wrap[hidden] { display: none; }
.note-scrim { position: absolute; inset: 0; background: rgba(12, 8, 4, .34); opacity: 0; transition: opacity .6s ease; }
.note { --ink-hand: #2e3a55; position: relative; width: min(380px, 100%); max-height: calc(100% - 16px); overflow: auto; padding: 26px 30px 22px; color: var(--ink); background-color: #f6f0e1; background-image: var(--note-grain), linear-gradient(to bottom, rgba(60, 45, 25, 0) 49.6%, rgba(60, 45, 25, .07) 50%, rgba(255, 255, 255, .45) 50.4%, rgba(60, 45, 25, .025) 51%, rgba(60, 45, 25, .035)); background-size: 160px, 100% 100%; box-shadow: 0 1px 1px rgba(20, 12, 4, .08), 0 2px 6px rgba(20, 12, 4, .1), 0 24px 48px rgba(20, 12, 4, .3); outline: none; -webkit-user-select: text; user-select: text; opacity: 0; transform: translateY(18px) rotate(-3deg); transition: opacity .5s ease, transform .9s var(--ease); }
.note-wrap.on .note-scrim { opacity: 1; }
.note-wrap.on .note { opacity: 1; transform: rotate(-1.2deg); }
.note-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.note-draft { margin-left: auto; font: 500 9px/1 var(--mono); letter-spacing: .12em; padding: 3px 5px; border: 1px dashed rgba(156, 79, 54, .6); color: #9c4f36; }
.note-hi, .note-body, .note-sign { font-family: Caveat, var(--serif); color: var(--ink-hand); }
.note-hi { margin: 0 0 6px; font-size: 30px; font-weight: 500; line-height: 1.1; }
.note-body p { margin: 0 0 10px; font-size: 21px; line-height: 1.22; }
.note-body a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap; }
.note-sign { margin: 14px 0 0; font-size: 26px; font-weight: 600; text-align: right; transform: rotate(-2deg); }
.note-close { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 12px 0 0; width: 100%; border: 0; border-top: 1px solid rgba(36, 33, 28, .12); background: none; color: var(--muted); font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.note-close kbd { margin-left: auto; font: inherit; letter-spacing: .06em; padding: 3px 5px; border: 1px solid rgba(36, 33, 28, .2); }
.note-close:hover { color: var(--ink); }
.note :focus-visible { border-radius: 0; }

@media (max-width: 600px) {
  .found { left: 16px; top: 114px; }
  .note { padding: 22px 22px 18px; }
  .note-body p { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .found-n i.in, .found-n i.out, .found-ticks i.new { animation: none; }
  .note, .note-wrap.on .note { transform: rotate(-1.2deg); }
}
@media (hover: none) {
  .note-close kbd { display: none; }
}
.found-count:focus-visible { border-radius: 0; }

/* ---------- the arrangements to choose between (layouts.js, with ?layouts) ---------- */
.layouts { left: 26px; bottom: 22px; display: flex; align-items: center; gap: 0; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; text-shadow: none; }
.layouts span { margin-right: 10px; opacity: .8; text-shadow: 0 1px 12px rgba(20, 12, 4, .45); }
.layouts em { margin-left: 10px; font-style: normal; opacity: .8; text-shadow: 0 1px 12px rgba(20, 12, 4, .45); }
.layouts button { width: 30px; height: 30px; margin-left: -1px; border: 1px solid rgba(255, 250, 240, .55); border-radius: 0; background: rgba(36, 33, 28, .28); color: var(--hud); font: inherit; letter-spacing: 0; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.layouts button:hover { background: rgba(36, 33, 28, .45); }
.layouts button[aria-pressed="true"] { position: relative; background: var(--hud); color: var(--ink); border-color: var(--hud); }
@media (max-width: 600px) { .layouts { left: 16px; bottom: 54px; } }
