/* Public pages and link pages (src/public-templates.js), on top of /landing/site.css.

   They follow the app's design system (zero-social-app/docs/design-system.md): calm, dense and
   photo-first. White is the only accent, colour comes from photos and from low-alpha seeded tints,
   radius is 16 by default, 26 for sheets and large containers, 9999 for anything pressed. Nothing
   glows and nothing bounces.

   Phone: photos run edge to edge and swipe, the words sit on a sheet over them, the next step sits
   in a bar at the bottom. Computer: a photo mosaic, then words on the left and a card that stays
   in view on the right. */

:root { --bar-h: 76px; }

/* Which buttons show: the .os rules are in /landing/base.css. data-os is set before the body paints. */
html[data-os="ios"] .only-desktop, html[data-os="android"] .only-desktop { display: none; }
html[data-os="ios"] body.has-bar, html[data-os="android"] body.has-bar { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px)); }

/* People write long words and whole paragraphs in Hindi; none of it may push a page sideways. */
.pp-page, .pp-page p, .pp-page h1, .pp-page h2, .pp-page h3, .pp-page dd, .pp-page li { overflow-wrap: anywhere; }
.pp-page { max-width: 1200px; padding-top: calc(96px + env(safe-area-inset-top, 0px)); padding-bottom: 72px; }

/* ── the seeded tint: a near-black tile washed a slightly different dusty hue ──────────────── */
.tint { background: var(--card); background: linear-gradient(145deg, color-mix(in srgb, var(--wa, #8b9bc4) 26%, #141416), color-mix(in srgb, var(--wb, #5a6a90) 10%, #0a0a0a)); }

/* ── the phone's bar ───────────────────────────────────────────────────────────────────────── */
.cta-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(13, 13, 17, 0.9); border-top: 0.5px solid var(--edge); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); view-transition-name: cta-bar; animation: bar-in 0.3s var(--ease) both; }
html[data-os="ios"] .cta-bar, html[data-os="android"] .cta-bar { display: flex; align-items: center; gap: 14px; }
.cta-say { flex: 1; min-width: 0; }
.cta-say b, .cta-say small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cta-say b { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.cta-say small { font-size: 12px; line-height: 16px; color: var(--tertiary); }
html[data-os="ios"] .cta-say small.os-ios { display: block; }
.cta-say a { padding: 12px 6px; margin: -12px -6px; color: var(--ink); text-decoration: underline; text-decoration-color: rgba(232, 232, 232, 0.35); text-underline-offset: 3px; }
.cta-bar .btn { flex: none; height: 52px; padding: 0 22px; }
.cta-bar.alone .btn { flex: 1; }
@keyframes bar-in { from { transform: translateY(100%); } to { transform: none; } }
/* On wedge, door and campaign pages the bar waits until the first store buttons have scrolled away (motion.js). */
.cta-bar.wait { transform: translateY(110%); transition: transform 0.3s var(--ease); animation: none; }
.cta-bar.wait.show { transform: none; }


/* A door's long opening shows three lines on a phone, the rest a tap away (motion.js). Without
   script, or on a wider screen, it shows whole; the words are always in the page. */
.lede-more { display: none; }
@media (max-width: 760px) {
  html[data-os] .lede-clamp:not(.open) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  html[data-os] .lede-more:not([hidden]) { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; padding: 0; border: 0; background: none; color: var(--ink); font: 600 14px/20px var(--sans); text-decoration: underline; text-decoration-color: rgba(232, 232, 232, 0.35); text-underline-offset: 3px; cursor: pointer; }
}

/* ── photos ────────────────────────────────────────────────────────────────────────────────── */
.photos { position: relative; margin: 0 calc(-1 * var(--gutter)); background: var(--card); }
.photo-track { display: flex; margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.photo-track::-webkit-scrollbar { display: none; }
.photo-track li { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.photo-link { display: block; height: 100%; overflow: hidden; cursor: zoom-in; }
.photo-link img { width: 100%; height: 100%; aspect-ratio: 4 / 3; max-height: 68svh; object-fit: cover; transition: opacity 0.15s linear, transform 0.5s var(--ease); }
.photo-pill { position: absolute; right: 12px; bottom: 38px; z-index: 2; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 0; border-radius: 9999px; background: rgba(13, 13, 17, 0.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font: 600 12px/16px var(--sans); font-variant-numeric: tabular-nums; }
.photo-all { display: none; }
.pp-sheet { position: relative; z-index: 1; }
.has-photos .pp-sheet { margin: -26px calc(-1 * var(--gutter)) 0; padding: 22px var(--gutter) 0; border-radius: 26px 26px 0 0; background: var(--canvas); }
.has-photos .pp-page { padding-top: 0; }
/* The first screen of a page with no photos: its words on a washed tile. */
.word-hero { margin: 0 0 8px; padding: 28px 20px; border-radius: 26px; }
.word-hero .eyebrow { color: rgba(232, 232, 232, 0.72); }

/* ── the two columns of a detail page ──────────────────────────────────────────────────────── */
.pp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
/* The padding holds each link's 44px tap area inside the scroller, and the negative margins keep the row where it was. */
.crumbs { display: flex; margin: -14px 0 -2px; padding: 14px 0; list-style: none; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--tertiary); white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs li + li::before { content: '/'; margin: 0 6px; color: var(--secondary); }
.crumbs a { position: relative; transition: color 0.2s; }
.crumbs a::after { content: ''; position: absolute; inset: -14px -4px; }
.crumbs a:hover { color: var(--ink); }
.pp-title { margin: 0; font-weight: 300; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -0.032em; color: var(--ink-bright); text-wrap: balance; }
.pp-head .eyebrow { margin: 0 0 10px; }
.host { display: flex; align-items: center; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 20px; }
.host b { display: block; font-weight: 600; color: var(--ink); }
.host small { display: block; font-size: 12px; line-height: 16px; color: var(--tertiary); }
.hex-md { --h: 44px; font-size: 16px; }

/* The card that stays in view on a computer. On a phone it is just the rows of facts. */
.action-card { padding: 4px 16px; border-radius: 16px; background: var(--card); border: 0.5px solid var(--edge); }
.action-go { display: none; }
.fact { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 12px; padding: 13px 0; }
.fact + .fact { border-top: 0.5px solid var(--edge); }
.fact svg { grid-row: span 2; width: 20px; height: 20px; margin-top: 2px; color: var(--tertiary); }
.fact dt { font-size: 12px; line-height: 16px; color: var(--tertiary); }
.fact dd { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ink); }
.fact dd a { text-decoration: underline; text-decoration-color: rgba(232, 232, 232, 0.35); text-underline-offset: 3px; }
.facts-list { margin: 0; }

.pp-main { min-width: 0; }
.pp-main > :first-child { margin-top: 0; }
.pp-head:empty { display: none; }
.pp-body { font-size: 16px; line-height: 26px; color: var(--muted); }
.pp-body p { margin: 0 0 14px; max-width: 68ch; }
.pp-body p:last-child { margin-bottom: 0; }
.pp-section { margin-top: 36px; }
.pp-lede { margin: 16px 0 20px; }
.diary-meta { margin: 12px 0 0; font-size: 13px; line-height: 20px; }
.pp-section > h2, .sec-row h2 { margin: 0 0 14px; font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.external { margin: 18px 0 0; }

/* ── text tiles: a 14/600 label over its value, in two independent columns ─────────────────── */
.masonry { columns: 2; column-gap: 8px; }
.masonry.one { columns: 1; }
.ttile { display: block; break-inside: avoid; margin: 0 0 8px; padding: 18px 16px 20px; border-radius: 16px; border: 0.5px solid var(--edge); }
.ttile h3 { margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.ttile p { margin: 0; font-size: 14px; line-height: 21px; color: rgba(232, 232, 232, 0.72); white-space: pre-line; }
.ttile ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; line-height: 20px; font-weight: 500; color: rgba(232, 232, 232, 0.72); }
.photo-tile { display: block; break-inside: avoid; margin: 0 0 8px; }
.photo-tile img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; background: var(--card); transition: opacity 0.15s linear; }

/* ── chips ─────────────────────────────────────────────────────────────────────────────────── */
.chip-group + .chip-group { margin-top: 16px; }
.chip-group .eyebrow { margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 13px; border-radius: 9999px; background: var(--fill); color: var(--ink); font-size: 13px; line-height: 18px; font-weight: 500; }

/* ── a tile: the picture does the work ─────────────────────────────────────────────────────── */
.pic-tile { display: block; color: inherit; border-radius: 16px; transition: transform 0.14s var(--press); }
.pic-tile:active { transform: scale(0.985); }
.shot { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 16px; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.15s linear, transform 0.5s var(--ease); }
/* A tile with no photo carries its words on the tint, as the app's text tiles do: a pin (or the date) in the
   corner, the name and where it is at the foot, and the cooler hairline of a text tile. */
.shot-words { display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 16px 16px; border: 0.5px solid rgba(180, 192, 220, 0.16); transition: border-color 0.2s; }
.shot-pin { position: absolute; left: 14px; top: 14px; display: flex; width: 20px; height: 20px; color: rgba(232, 232, 232, 0.6); }
.shot-pin svg { width: 20px; height: 20px; }
.shot-title { display: -webkit-box; font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.shot-meta { display: -webkit-box; margin-top: 2px; font-size: 13px; line-height: 18px; color: rgba(232, 232, 232, 0.66); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.pic-tile:hover .shot-words { border-color: rgba(180, 192, 220, 0.3); }
.shot-date { position: absolute; left: 8px; top: 8px; display: grid; justify-items: center; min-width: 40px; padding: 5px 7px 4px; border-radius: 12px; background: rgba(13, 13, 17, 0.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; }
.shot-date b { font-size: 15px; line-height: 17px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.shot-date small { font-size: 9px; line-height: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.shot-price { position: absolute; left: 8px; bottom: 8px; padding: 4px 9px; border-radius: 9999px; background: rgba(13, 13, 17, 0.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font-size: 12px; line-height: 16px; font-weight: 600; }
.cap-title { display: -webkit-box; margin-top: 10px; font-size: 15px; line-height: 21px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cap-meta { display: -webkit-box; margin-top: 3px; font-size: 13px; line-height: 18px; color: var(--tertiary); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) {
  a.pic-tile:hover .shot img { transform: scale(1.035); }
  .photo-link:hover img { transform: scale(1.02); }
}

/* On a phone a section is one row that swipes; on a computer it is a grid. */
.rail { display: flex; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > li { flex: 0 0 min(66vw, 260px); min-width: 0; scroll-snap-align: start; scroll-margin-left: var(--gutter); }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; margin: 0; padding: 0; list-style: none; }
.sec-live { margin-top: 48px; }
.sec-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; margin-bottom: 14px; }
.sec-row h2 { margin: 0; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.25; }
.see-all { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--muted); text-decoration: underline; text-decoration-color: rgba(232, 232, 232, 0.25); text-underline-offset: 3px; transition: color 0.2s; }
.see-all:hover { color: var(--ink); }
/* A 44px-tall tap area that moves nothing. */
.see-all { position: relative; }
.see-all::after { content: ''; position: absolute; inset: -12px -6px; }

/* A question as a tile: its words, then the latest answer. */
.q-tile { display: block; color: inherit; transition: transform 0.14s var(--press), border-color 0.2s; }
a.q-tile:active { transform: scale(0.985); }
a.q-tile:hover { border-color: var(--edge-strong); }
.q-tile b { display: block; font-size: 15px; line-height: 21px; font-weight: 600; color: var(--ink); }
.q-tile span { display: block; margin-top: 8px; font-size: 13px; line-height: 19px; color: rgba(232, 232, 232, 0.66); }

/* ── answers ───────────────────────────────────────────────────────────────────────────────── */
.answer-card { padding: 16px; }
.answer-who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.answer-card p { font-size: 15px; line-height: 23px; color: rgba(232, 232, 232, 0.82); }
.answer-card.lead { padding: 20px; border-radius: 26px; }
.answer-card.lead p { font-size: 18px; line-height: 28px; color: var(--ink); }

/* ── a person ──────────────────────────────────────────────────────────────────────────────── */
.person { max-width: 920px; margin: 0 auto; }
.person-head { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.person-head .eyebrow { margin: 8px 0 0; }
.person-art { position: relative; flex: none; display: block; }
.hex-xl { --h: 112px; font-size: 40px; object-fit: cover; }
.verified { position: absolute; left: -2px; bottom: 6px; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--verified); color: #fff; box-shadow: 0 0 0 3px var(--canvas); }
.verified svg { width: 14px; height: 14px; }
.person-line { margin: 0 0 20px; font-size: 18px; line-height: 27px; color: var(--ink); }
/* Who this is, in a sentence, with links to the goal and the city. */
.person-about { margin: 0 0 20px; max-width: 62ch; font-size: 15px; line-height: 23px; color: var(--muted); }
.person-about a, .diary-meta a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(232, 232, 232, 0.25); text-underline-offset: 3px; }

/* ── a diary ───────────────────────────────────────────────────────────────────────────────── */
.diary { max-width: 760px; margin: 0 auto; }
.diary .pp-cover { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 26px; background: var(--card); margin: 0 0 24px; }
.chapter { padding: 20px; margin: 0 0 8px; border-radius: 16px; border: 0.5px solid var(--edge); }
.chapter small { display: block; margin-bottom: 4px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tertiary); }
.chapter h2, .chapter h3 { margin: 0 0 6px; font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.chapter p { margin: 0; font-size: 15px; line-height: 24px; color: rgba(232, 232, 232, 0.76); white-space: pre-line; }
.chapter.lead { border-radius: 26px; }
.chapter.lead p { font-size: 16px; line-height: 26px; color: var(--ink); }

/* ── the opening of a community, goal or list ──────────────────────────────────────────────── */
.hub-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hub-art { height: 96px; width: auto; max-width: 132px; object-fit: contain; object-position: left center; }
.goal-group + .goal-group { margin-top: 24px; }
.goal-group .eyebrow { margin-bottom: 10px; }
.goal-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.goal-tile { display: block; height: 100%; color: inherit; transition: transform 0.14s var(--press), border-color 0.2s; }
a.goal-tile:active { transform: scale(0.985); }
a.goal-tile:hover { border-color: var(--edge-strong); }
.goal-tile b { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.goal-tile span { display: -webkit-box; margin-top: 6px; font-size: 13px; line-height: 18px; color: rgba(232, 232, 232, 0.66); -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── a quiet line about safety ─────────────────────────────────────────────────────────────── */
.safety-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 36px; padding: 14px 16px; border-radius: 16px; border: 0.5px solid var(--edge); font-size: 13px; line-height: 19px; color: var(--muted); transition: border-color 0.2s; }
.safety-line:hover { border-color: var(--edge-strong); }
.safety-line svg { flex: none; width: 14px; height: 14px; color: var(--tertiary); }

/* ── sharing and the full-screen photos ────────────────────────────────────────────────────── */
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 10px; border: 0; border-radius: 9999px; background: transparent; color: var(--muted); font: 600 14px/20px var(--sans); cursor: pointer; transition: color 0.2s, background 0.2s; }
.share-btn:hover { color: var(--ink); background: var(--fill); }
.share-btn svg { width: 16px; height: 16px; }
.lightbox { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 8, 11, 0.97); color: #fff; }
.lightbox::backdrop { background: rgba(8, 8, 11, 0.97); }
.lightbox[open] { display: flex; animation: lb-in 0.2s var(--ease) both; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 64px 16px 24px; scroll-snap-align: center; }
.lb-slide img { max-width: 100%; max-height: calc(100% - 44px); min-height: 0; object-fit: contain; border-radius: 16px; }
.lb-slide figcaption { font-size: 14px; line-height: 20px; color: var(--muted); text-align: center; }
.lb-btn { position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--tint); color: #fff; cursor: pointer; transition: background 0.2s; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.2); }
.lb-btn svg { width: 18px; height: 18px; }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.lb-prev, .lb-next { top: 50%; margin-top: -22px; display: none; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-count { position: absolute; top: calc(24px + env(safe-area-inset-top, 0px)); left: 20px; font-size: 13px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (min-width: 760px) { .lb-prev, .lb-next { display: flex; } }

/* ── motion: short and functional. Below the first screen, things rise as they come into view ─ */
@keyframes rise { from { opacity: 0.01; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.4s var(--ease) both; animation-delay: var(--d, 0s); }
.rv-wait { opacity: 0.01; transform: translateY(14px); transition: opacity 0.45s var(--ease), transform 0.5s var(--ease); }
.rv-wait.in { opacity: 1; transform: none; }
img.loading { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.18s; }
  ::view-transition-group(*) { animation-duration: 0.28s; animation-timing-function: var(--ease); }
}
.nav { view-transition-name: site-nav; }
@media (prefers-reduced-motion: reduce) {
  .rise, .cta-bar, .lightbox[open] { animation: none; }
  .cta-bar.wait { transition: none; }
  .rv-wait { opacity: 1; transform: none; transition: none; }
  .photo-link img, .shot img, .pic-tile, .q-tile, .goal-tile { transition: none; }
  a.pic-tile:hover .shot img, .photo-link:hover img { transform: none; }
}
@media print { .rv-wait { opacity: 1; transform: none; } .cta-bar, .nav { display: none !important; } }

/* ── wider screens ─────────────────────────────────────────────────────────────────────────── */
@media (min-width: 600px) {
  .goal-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .answer-card.lead { padding: 28px; }
  .word-hero { padding: 40px 32px; }
}
.rail.solo > li { flex-basis: 100%; }
@media (min-width: 760px) {
  .rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; margin: 0; padding: 0; overflow: visible; }
  .rail > li:nth-child(n+7) { display: none; }
  .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 16px; }
  .masonry.three { columns: 3; }
  .sec-live { margin-top: 64px; }
}
@media (min-width: 900px) {
  /* The mosaic: one large photo and up to four smaller ones. */
  .photos { margin: 0; background: none; }
  .photo-track { display: grid; gap: 8px; height: clamp(320px, 38vw, 500px); overflow: hidden; border-radius: 26px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); scroll-snap-type: none; }
  .photo-track li { flex: none; }
  .photo-track li:nth-child(n+6) { display: none; }
  .photo-link img { aspect-ratio: auto; max-height: none; }
  .n-1 .photo-track li { grid-column: 1 / -1; grid-row: 1 / -1; }
  .n-2 .photo-track li { grid-column: span 2; grid-row: 1 / -1; }
  .n-3 .photo-track li:first-child, .n-4 .photo-track li:first-child, .n-5 .photo-track li:first-child { grid-column: span 2; grid-row: 1 / -1; }
  .n-3 .photo-track li:not(:first-child) { grid-column: span 2; }
  .n-4 .photo-track li:nth-child(2) { grid-column: span 2; }
  .photo-pill { display: none; }
  .photo-all { position: absolute; right: 16px; bottom: 16px; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 0; border-radius: 9999px; background: rgba(13, 13, 17, 0.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font: 600 13px/18px var(--sans); cursor: pointer; transition: background 0.2s; }
  .photo-all:hover { background: rgba(13, 13, 17, 0.9); }
  .has-photos .pp-page { padding-top: calc(96px + env(safe-area-inset-top, 0px)); }
  .has-photos .pp-sheet { margin: 32px 0 0; padding: 0; border-radius: 0; background: none; }
  .word-hero { padding: 56px 48px; margin-bottom: 32px; }
  .goal-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .pp-grid { grid-template-columns: minmax(0, 1fr) 372px; grid-template-areas: "head card" "main card"; column-gap: 64px; row-gap: 24px; align-items: start; }
  .pp-head { grid-area: head; }
  .pp-main { grid-area: main; }
  .action-card { grid-area: card; position: sticky; top: 88px; padding: 10px 24px 20px; border-radius: 26px; }
  .action-go { display: block; margin-top: 12px; padding-top: 16px; border-top: 0.5px solid var(--edge); }
  .action-go p { margin: 0 0 12px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
  .action-go > small { display: block; margin-top: 12px; font-size: 12px; line-height: 16px; color: var(--tertiary); }
  .action-go .btn { width: 100%; }
  .action-go .btn + .btn { margin-top: 8px; }
  .rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rail > li:nth-child(n+7) { display: block; }
  /* Beside the sticky card there is room for three across. */
  .pp-main .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pp-section { margin-top: 44px; }
}
@media (max-width: 759px) {
  .pp-page { padding-bottom: 56px; }
  .hex-xl { --h: 92px; font-size: 32px; }
}
/* A phone on its side: keep the photo from filling the whole screen. */
@media (max-height: 500px) and (orientation: landscape) {
  .photo-link img { max-height: 78svh; aspect-ratio: 16 / 9; }
  html[data-os="ios"] body.has-bar, html[data-os="android"] body.has-bar { padding-bottom: 64px; }
  .cta-bar .btn { height: 44px; }
}
/* The smallest phones. */
@media (max-width: 359px) {
  .cta-bar { gap: 10px; }
  .cta-bar .btn { padding: 0 16px; font-size: 14px; }
  .rail > li { flex-basis: 74vw; }
}

/* ── a person's tile, and who wrote a diary ─────────────────────────────────────────────── */
.person-tile { display: flex; align-items: center; gap: 12px; }
.person-tile .hex-md { flex: none; margin: 0; object-fit: cover; }
.person-tile span.hex-md { display: flex; font-size: 16px; line-height: 1; color: var(--ink); -webkit-line-clamp: unset; overflow: visible; }
.person-tile .person-tile-words { display: block; min-width: 0; margin: 0; overflow: visible; }
.tile-by { display: block; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--tertiary); }
.diary .eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
