:root {
  --bg: #e9e5e0;
  --ink: #2f2d2a;
  --soft: #7a7570;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--bg); color: var(--ink); }

a { color: inherit; text-decoration: none; }

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--soft);
}

.serif {
  font-family: "Newsreader", Georgia, serif;
  font-size: 17px;
  line-height: 1.35;
}

main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

/* The list: labels right-aligned, values left-aligned, meeting at a center gutter. */
.list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  row-gap: 30px;
  width: min(100%, 560px);
  transition: opacity 0.5s ease;
}

dt {
  text-align: right;
  line-height: 23px; /* sit on the serif's first baseline */
}

dd { display: flex; flex-direction: column; align-items: flex-start; }

dd a, dd span[data-project] {
  text-decoration: underline transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s ease;
}
dd a:hover, dd span[data-project]:hover, dd [data-project].active { text-decoration-color: currentColor; }

dd [data-project] { white-space: nowrap; }

/* inline-block keeps the underline on the name only. */
.desc {
  display: inline-block;
  white-space: pre;
  color: var(--soft);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
dd [data-project]:hover .desc, dd [data-project].active .desc { opacity: 1; transform: none; }

/* Preview: a project's tiles fade in under the list on hover.
   Every tile shares one height and keeps its own width. */
.preview {
  --h: 200px;
  position: relative;
  height: calc(var(--h) + 24px);
  width: 100%;
  margin-top: 56px;
  pointer-events: none;
}

.set {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.set.on { opacity: 1; }

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.img { display: block; height: var(--h); }
.img img { height: 100%; width: auto; display: block; }

/* The Remi phone is a live page drawn at 318x663 and scaled to tile height. */
.frame {
  display: block;
  height: var(--h);
  width: calc(var(--h) * 318 / 663);
  overflow: hidden;
}
.frame iframe {
  width: 318px;
  height: 663px;
  border: 0;
  transform: scale(calc(200 / 663));
  transform-origin: top left;
}

/* NeuroNest takeover: bubbles bloom behind the list, then drift away. */
main { position: relative; z-index: 1; }

.nest {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
/* Grain, like the dashboard. */
.nest::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  mix-blend-mode: multiply;
  transition: opacity 0.6s ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body.nesting .nest::after { opacity: 0.3; }

.bub {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0;
  height: 0;
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 0.45s ease, transform 0.6s ease;
}
body.nesting .bub {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s ease var(--d), transform 1.1s cubic-bezier(0.2, 1, 0.3, 1) var(--d);
}

.bub .aura {
  position: absolute;
  width: calc(var(--r) * 2.3);
  height: calc(var(--r) * 2.3);
  left: calc(var(--r) * -1.15);
  top: calc(var(--r) * -1.15);
  border-radius: 50%;
  opacity: 0.82;
  filter: blur(calc(var(--r) * 0.5));
  animation: morph var(--m) ease-in-out infinite alternate;
}
.bub.ring .aura {
  width: calc(var(--r) * 1.6);
  height: calc(var(--r) * 1.6);
  left: calc(var(--r) * -0.8);
  top: calc(var(--r) * -0.8);
  opacity: 0.95;
  filter: blur(calc(var(--r) * 0.09));
}

.bub .word {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 22vmin;
  text-align: center;
  font-family: "Sometype Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111;
  line-height: 1.5;
}
.bub .word small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.12em;
  opacity: 0.55;
}

@keyframes morph {
  0%   { border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%; }
  33%  { border-radius: 58% 42% 47% 53% / 45% 55% 45% 55%; }
  66%  { border-radius: 44% 56% 60% 40% / 57% 43% 52% 48%; }
  100% { border-radius: 52% 48% 41% 59% / 48% 58% 42% 52%; }
}

@media (prefers-reduced-motion: reduce) {
  .bub .aura { animation: none; }
  .bub, body.nesting .bub { transition: opacity 0.3s ease; transform: none; }
}

/* Remi takeover: the page becomes the Messages thread from callmeremi.com. */
body { transition: background-color 0.5s ease; }
body.texting { background-color: #fff; }

/* In front of the faded list; it never takes the mouse, so hovering still works. */
.imsg {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  color: #000;
}
body.texting .imsg { opacity: 1; transition: opacity 0.6s ease; }

/* iOS chrome: translucent header and compose bar with hairlines. */
.im-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 0 10px;
  text-align: center;
  background: rgba(249, 249, 249, 0.9);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.14);
}
.im-avatar {
  width: 48px;
  height: 48px;
  margin: 0 auto 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: #180d12;
  background: linear-gradient(180deg, #fce7ee, #f6cfdf);
}
.im-name { font-size: 15px; font-weight: 500; }
.im-name span { color: rgba(0, 0, 0, 0.32); }

/* Sits at the head of the left column; centered would land on the list. */
.im-time {
  position: absolute;
  top: 110px;
  left: calc(5vw + 4px);
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.4);
}
.im-time b { font-weight: 600; color: rgba(0, 0, 0, 0.55); }

/* Thread fills from the top, so nothing already said moves. */
.im-thread {
  position: absolute;
  top: 136px;
  left: 5vw;
  right: 5vw;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.im-row { display: flex; }
.im-row.them { justify-content: flex-start; }
.im-row.me { justify-content: flex-end; }
.im-row.turn { margin-top: 16px; }

/* Bubbles run from phone size on a laptop to about twice that on a big screen.
   Everything is in em so the tails scale with them. The tail is a blob plus a
   cutout in the page color, the same two-shape trick as the landing page. */
.im-bubble, .im-typing { font-size: clamp(15px, 1.45vw, 21px); }
.im-bubble {
  position: relative;
  max-width: min(40vw, 19em);
  padding: 0.57em 0.95em;
  line-height: 1.28;
  letter-spacing: -0.012em;
  border-radius: 1.33em;
  animation: im-pop 0.34s cubic-bezier(0.2, 1.3, 0.44, 1) both;
}
.im-bubble.them { background: #e9e9eb; transform-origin: bottom left; }
.im-bubble.me {
  background: linear-gradient(180deg, #2d8cff, #0a7cff);
  color: #fff;
  transform-origin: bottom right;
}
.im-bubble::before, .im-bubble::after { content: ""; position: absolute; bottom: 0; height: 1.33em; }
.im-bubble.them::before { left: -0.38em; width: 1.33em; background: #e9e9eb; border-bottom-right-radius: 1.05em; z-index: 2; }
.im-bubble.them::after { left: -1.71em; width: 1.71em; background: #fff; border-bottom-right-radius: 0.76em; z-index: 3; }
.im-bubble.me::before { right: -0.38em; width: 1.33em; background: #0a7cff; border-bottom-left-radius: 1.05em; z-index: 2; }
.im-bubble.me::after { right: -1.71em; width: 1.71em; background: #fff; border-bottom-left-radius: 0.76em; z-index: 3; }
.im-bubble.notail::before, .im-bubble.notail::after { display: none; }

@keyframes im-pop {
  from { opacity: 0; transform: scale(0.6) translateY(14px); }
  to { opacity: 1; transform: none; }
}

.im-receipt {
  align-self: flex-end;
  margin: 4px 6px 0;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.42);
  animation: im-fade 0.3s ease both;
}
@keyframes im-fade { from { opacity: 0; } }

.im-typing {
  position: relative;
  display: flex;
  gap: 0.29em;
  padding: 0.76em 0.95em;
  background: #e9e9eb;
  border-radius: 1.33em;
  transform-origin: bottom left;
  animation: im-pop 0.3s cubic-bezier(0.2, 1.3, 0.44, 1) both;
}
.im-typing::before, .im-typing::after { content: ""; position: absolute; bottom: 0; height: 1.33em; }
.im-typing::before { left: -0.38em; width: 1.33em; background: #e9e9eb; border-bottom-right-radius: 1.05em; z-index: 2; }
.im-typing::after { left: -1.71em; width: 1.71em; background: #fff; border-bottom-right-radius: 0.76em; z-index: 3; }
.im-typing i {
  width: 0.52em;
  height: 0.52em;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  animation: im-blip 1.25s ease-in-out infinite;
}
.im-typing i:nth-child(2) { animation-delay: 0.18s; }
.im-typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes im-blip {
  0%, 55%, 100% { transform: none; opacity: 0.45; }
  28% { transform: translateY(-5px); opacity: 0.95; }
}

.im-compose {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 5vw 26px;
  background: rgba(249, 249, 249, 0.9);
  border-top: 0.5px solid rgba(0, 0, 0, 0.1);
}
.im-plus {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: rgba(0, 0, 0, 0.45);
  background: #e9e9eb;
}
.im-field {
  flex: 1;
  padding: 9px 18px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  font-size: 16px;
  color: rgba(0, 0, 0, 0.3);
}

/* While the thread plays, everything but "remi" steps back so text never sits on text. */
.list dt, .list dd { transition: opacity 0.4s ease; }
.list dd [data-project] { transition: opacity 0.4s ease, text-decoration-color 0.3s ease; }
body.texting .list dt,
body.texting .list dd:not(:has([data-project="remi"])),
body.texting .list dd [data-project]:not([data-project="remi"]) { opacity: 0.12; }

@media (prefers-reduced-motion: reduce) {
  .im-bubble, .im-typing, .im-receipt { animation: none; }
}

/* Toxome takeover: products from toxome.app drift past on both sides. */
.shop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}
body.shopping .shop { opacity: 1; transition: opacity 0.7s ease; }

.sp-strip { position: absolute; overflow: hidden; }
.sp-track { display: flex; gap: 14px; animation-duration: 60s; animation-timing-function: linear; animation-iteration-count: infinite; animation-play-state: paused; }
body.shopping .sp-track { animation-play-state: running; }

/* Columns: one strip down each edge, drifting opposite ways. */
.shop-columns .sp-strip { top: 0; bottom: 0; width: clamp(110px, 13vw, 190px); }
.shop-columns .sp-strip.up { left: 4vw; }
.shop-columns .sp-strip.down { right: 4vw; }
.shop-columns .sp-track { flex-direction: column; }
.shop-columns .up .sp-track { animation-name: sp-up; }
.shop-columns .down .sp-track { animation-name: sp-down; }
.shop-columns .sp-card { width: 100%; }

/* Rows: one strip along the top, one along the bottom. */
.shop-rows .sp-strip { left: 0; right: 0; height: clamp(120px, 20vh, 200px); }
.shop-rows .sp-strip.left { top: 3vh; }
.shop-rows .sp-strip.right { bottom: 3vh; }
.shop-rows .sp-track { height: 100%; width: max-content; }
.shop-rows .left .sp-track { animation-name: sp-left; }
.shop-rows .right .sp-track { animation-name: sp-right; }
.shop-rows .sp-card { height: 100%; }

/* The track holds two copies, so moving it by half loops seamlessly. */
@keyframes sp-up { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 7px)); } }
@keyframes sp-down { from { transform: translateY(calc(-50% - 7px)); } to { transform: translateY(0); } }
@keyframes sp-left { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 7px)); } }
@keyframes sp-right { from { transform: translateX(calc(-50% - 7px)); } to { transform: translateX(0); } }

.sp-card {
  position: relative;
  display: block;
  flex-shrink: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: #ddd8d0;
}
.sp-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Score pill in Toxome's green, like the shop cards. */
.sp-score {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font: 500 11px/1.2 "Inter", system-ui, sans-serif;
  color: #2b2a28;
}
.sp-score i { width: 7px; height: 7px; border-radius: 50%; }

/* Certification badges, top right, only where the site lists them. */
.sp-certs { position: absolute; top: 8px; right: 8px; display: flex; gap: 5px; }
.sp-certs img {
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .sp-track { animation: none; }
}

/* Second Order takeover: the page becomes a newspaper front page, laid out around
   the list. --t/--b/--l/--r are the list's edges, set by paper.js. */
.paper {
  --ink: #1c1b19;
  --rule: #1c1b19;
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
}
body.reading .paper { opacity: 1; transition: opacity 0.6s ease; }
body.reading .pp-zone { pointer-events: auto; }
body.reading:has(.paper-classic) { background-color: #f1ede3; }

.pp-zone { position: absolute; overflow: hidden; }
.pp-head { top: 0; left: 0; right: 0; height: var(--t); }
.pp-left { top: var(--t); bottom: 0; left: 0; width: var(--l); }
.pp-right { top: var(--t); bottom: 0; left: var(--r); right: 0; }
.pp-foot { top: var(--b); bottom: 0; left: var(--l); width: calc(var(--r) - var(--l)); }
.pp-box {
  position: absolute;
  top: var(--t);
  left: var(--l);
  width: calc(var(--r) - var(--l));
  height: calc(var(--b) - var(--t));
}

/* Masthead: ears either side of the nameplate, dateline underneath. */
.pp-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  column-gap: 24px;
  padding: 12px 28px 0;
}
/* The logo file has wide margins, so the frame crops to just the letters. */
.pp-name {
  display: block;
  height: clamp(22px, calc(var(--t) - 80px), 64px);
  aspect-ratio: 10;
  overflow: hidden;
}
.pp-name img {
  display: block;
  width: 128.57%;
  margin: -7.86% 0 0 -14.29%;
  filter: brightness(1.08) contrast(1.08);
  mix-blend-mode: multiply;
}
.pp-ear { display: flex; flex-direction: column; gap: 2px; max-width: 210px; font-size: 13px; line-height: 1.25; }
.pp-ear.left { justify-self: start; }
.pp-ear.right { justify-self: end; text-align: right; }
.pp-dateline {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  margin-top: 8px;
}

.pp-label, .pp-kicker { display: block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.pp-hed { display: block; text-wrap: balance; }
.pp-photo { display: block; flex: none; }
.pp-photo img { display: block; width: 100%; object-fit: cover; }
.pp-photo.lead img { aspect-ratio: 1200 / 628; }
.pp-right .pp-photo img { aspect-ratio: 1200 / 630; }

/* Lead story down the left: the body runs in columns and stops at the fold. */
.pp-left, .pp-right { display: flex; flex-direction: column; gap: 8px; padding: 18px 24px 18px 28px; }
.pp-right { padding: 18px 28px 18px 24px; }
.pp-hed.lead { font-size: clamp(24px, 2.5vw, 42px); line-height: 1.02; }
.pp-deck { font-size: clamp(14px, 1.1vw, 17px); font-style: italic; line-height: 1.25; }
.pp-byline { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.pp-byline span { margin-left: 8px; opacity: 0.6; }
.pp-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  column-fill: auto;
  font-size: 13px;
  line-height: 1.42;
}
.pp-jump { flex: none; font-size: 12px; font-style: italic; padding-top: 6px; }
.pp-jump::after { content: " \2192"; }

.pp-right .pp-hed { font-size: clamp(19px, 1.7vw, 30px); line-height: 1.05; }
.pp-soon { font-size: 13px; font-style: italic; }
.pp-notebook { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.pp-note { font-size: 13px; line-height: 1.35; font-style: italic; }
.pp-note p + p { margin-top: 5px; }

/* Under the list: the essay continued, and the classifieds. */
.pp-foot {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 22px;
  padding: 18px 22px;
}
.pp-cont { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.pp-cont .pp-hed { font-size: clamp(18px, 1.5vw, 24px); line-height: 1.05; }
.pp-cont .pp-photo img { aspect-ratio: 12 / 5; object-position: 50% 30%; }
/* The lead runs short (only the free part prints), so it reads as a big lede that
   balances across both columns, with a pull quote holding the bottom of the page. */
.pp-left .pp-body { flex: none; column-fill: balance; font-size: 15px; line-height: 1.4; }
.pp-left .pp-pull { margin: auto 0; }
.pp-pull { margin: auto 0; font-size: clamp(20px, 1.9vw, 28px); line-height: 1.15; font-style: italic; text-wrap: balance; }
.pp-pull cite { display: block; margin-top: 10px; font-size: 10px; font-style: normal; letter-spacing: 0.16em; text-transform: uppercase; }
.pp-classifieds { display: flex; flex-direction: column; gap: 8px; font-size: 12px; line-height: 1.35; }
.pp-classifieds b { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 10px; }
.pp-mini { display: none; }

a.pp-hed:hover, a.pp-label:hover, .pp-jump:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Classic broadsheet: heavy serif heads, ruled columns, black-and-white photos. */
.paper-classic .pp-hed { font-family: "Old Standard TT", Georgia, serif; font-weight: 700; }
.paper-classic .pp-ear { border: 1px solid var(--rule); padding: 6px 10px; text-align: center; }
.paper-classic .pp-ear-text { font-style: italic; }
.paper-classic .pp-dateline {
  border-top: 3px double var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.paper-classic .pp-left { border-right: 1px solid var(--rule); }
.paper-classic .pp-right { border-left: 1px solid var(--rule); }
.paper-classic .pp-kicker { padding-bottom: 4px; border-bottom: 1px solid var(--rule); align-self: flex-start; }
.paper-classic .pp-photo img { filter: grayscale(1) contrast(1.12); transition: filter 0.5s ease; }
/* Hovering a photo brings its color back. */
.paper-classic .pp-photo:hover img { filter: none; }
.paper-classic .pp-body { columns: 2; column-gap: 18px; column-rule: 1px solid rgba(28, 27, 25, 0.35); text-align: justify; hyphens: auto; }
.paper-classic .pp-body p + p { text-indent: 1em; }
.paper-classic .pp-jump { border-top: 1px solid var(--rule); }
.paper-classic .pp-notebook { border-top: 3px double var(--rule); }
.paper-classic .pp-note + .pp-note { padding-top: 10px; border-top: 1px solid rgba(28, 27, 25, 0.25); }
.paper-classic .pp-box { border: 3px double var(--rule); }
.paper-classic .pp-cont .pp-kicker { align-self: flex-start; }
.paper-classic .pp-pull { padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.paper-classic .pp-classifieds { padding-left: 18px; border-left: 1px solid var(--rule); }
.paper-classic .pp-classifieds .pp-label { padding-bottom: 4px; border-bottom: 3px double var(--rule); }

/* Phones: no side columns, so the lead story sits under the list instead. */
.paper.short .pp-ear { display: none; }
.paper.short .pp-head { padding-top: 6px; }
.paper.short .pp-name { grid-column: 1 / -1; justify-self: center; height: clamp(18px, calc(var(--t) - 40px), 64px); }
.paper.short .pp-dateline { margin-top: 2px; padding: 3px 0; }

.paper.narrow .pp-left, .paper.narrow .pp-right, .paper.narrow .pp-ear { display: none; }
.paper.narrow .pp-head { grid-template-columns: 1fr; justify-items: center; padding: 10px 16px 0; }
.paper.narrow .pp-name { height: auto; width: min(100%, 320px); }
.paper.narrow .pp-dateline span:first-child, .paper.narrow .pp-dateline span:last-child { display: none; }
.paper.narrow .pp-foot { left: 0; width: 100%; display: block; padding: 16px; }
.paper.narrow .pp-cont, .paper.narrow .pp-classifieds { display: none; }
.paper.narrow .pp-mini > span { min-width: 0; }
.paper.narrow .pp-mini { display: flex; gap: 12px; align-items: center; font-size: 20px; line-height: 1.1; }
.paper.narrow .pp-mini img { width: 120px; aspect-ratio: 1200 / 628; object-fit: cover; flex: none; }
.paper-classic.narrow .pp-mini { font-family: "Old Standard TT", Georgia, serif; font-weight: 700; }
.paper-classic.narrow .pp-mini img { filter: grayscale(1) contrast(1.12); }
.paper.narrow .pp-mini .pp-kicker { margin-bottom: 6px; font-family: "Newsreader", Georgia, serif; font-weight: 400; }

/* Phones: the page is pinned and scrolling steps through the projects. */
body.scrolly main {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.scroll-space { pointer-events: none; }
/* Spotlight: only the project in view is fully lit. */
body.scrolly.previewing .list dt,
body.scrolly.previewing .list dd:not(:has(.active)),
body.scrolly.previewing .list dd [data-project]:not(.active) { opacity: 0.25; }
.scroll-hint {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 3;
  text-align: center;
  transition: opacity 0.4s ease;
}
body.scrolled .scroll-hint { opacity: 0; }

@media (max-width: 700px) {
  .shop-rows .sp-strip { height: 15vh; }
  .shop-rows .sp-strip.left { top: 0; }
  .shop-rows .sp-strip.right { bottom: 0; }
  .im-bubble { max-width: 64vw; }
  .im-thread { left: 16px; right: 16px; }
  .im-time { left: 20px; }
  .im-compose { padding: 10px 16px 22px; }
  /* Labels stay on one line; a project's description shows only while it's lit, and may wrap. */
  .list { grid-template-columns: auto 1fr; }
  dt { white-space: nowrap; }
  dd [data-project] { white-space: normal; }
  .desc { display: none; white-space: normal; }
  dd [data-project].active .desc { display: inline; }
  .preview { --h: 84px; }
  /* Photo previews: a bigger strip that starts at the edge and swipes sideways. */
  .preview { height: 214px; }
  .set {
    justify-content: flex-start;
    gap: 10px;
    padding: 0 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .set::-webkit-scrollbar { display: none; }
  .set .tile { scroll-snap-align: start; flex-shrink: 0; }
  .set .img { height: 200px; }
}

@media (max-width: 700px) {
  .list { column-gap: 20px; row-gap: 26px; }
  .set { gap: 10px; }
  .preview { --h: 110px; }
  .frame iframe { transform: scale(calc(110 / 663)); }
}
