/* E7 — case study after plus-ex.com/experience (Yanzi 2026-11-08):
   one big photo first (full width, rounded, a strip of the page showing under it), then the content;
   text fades in section by section as it scrolls into view. */

/* hero: inset 10px from the top, the page's 24px from the sides, rounded like theirs */
#pj-hero.pj7-hero {
  aspect-ratio: auto !important;
  height: calc(100svh - 97px - 10px - 84px); min-height: 360px;
  margin: 10px 0 0; border-radius: 16px; overflow: hidden; background: #eee;
}
#pj-hero.pj7-hero > img, #pj-hero.pj7-hero > video {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
/* opened on its own (not slid up from the homepage): the photo settles in once */
html:not(.is-embed) #pj-hero.pj7-hero > * { animation: pj7-settle 1.4s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes pj7-settle { from { transform: scale(1.06); } }

/* inside the slide-up view: no site bar (the homepage's is behind it), so the photo gets the room */
.is-embed .bar { display: none; }
.is-embed #pj-hero.pj7-hero { height: calc(100svh - 10px - 84px); }

/* text fades in when it reaches the screen (opacity only, 0.6s — their timing) */
.pj7-fade { opacity: 0; transition: opacity .6s cubic-bezier(.45, 0, .55, 1); }
.pj7-fade.in { opacity: 1; }

@media (max-width: 700px) {
  #pj-hero.pj7-hero { height: 62svh; min-height: 0; border-radius: 10px; }
  .is-embed #pj-hero.pj7-hero { height: 70svh; }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.is-embed) #pj-hero.pj7-hero > * { animation: none; }
  .pj7-fade { opacity: 1; transition: none; }
}

/* Yanzi: the photo fills the screen edge to edge, square corners like every other image */
#pj-hero.pj7-hero {
  margin: 0 calc(var(--m) * -1); border-radius: 0; max-width: none; width: auto;
  height: calc(100svh - 97px); min-height: 360px;
}
.is-embed #pj-hero.pj7-hero { height: 100svh; }
@media (max-width: 700px) {
  #pj-hero.pj7-hero { height: calc(100svh - 69px); border-radius: 0; }
  .is-embed #pj-hero.pj7-hero { height: 100svh; }
}

/* Yanzi: Next + the two Related projects = three equal cards on one line (same width, same
   image shape, titles on one level); "Next" over the first, "Related" over the other two */
.pj4 .pj-more-work { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.pj-more-work .pj-related { grid-column: span 2; }
.pj-more-work .pj-related #pj-related { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pj-more-work .pj-card .img { aspect-ratio: 4 / 3; }
.pj-more-work .pj-card .t, .pj-more-work .pj-related .t { font: 500 20px/1.15 var(--sans); letter-spacing: -.01em; text-transform: none; }
.pj-more-work .pj-card .s, .pj-more-work .pj-related .s { font-size: 13px; }
@media (max-width: 700px) {
  .pj4 .pj-more-work { grid-template-columns: 1fr; gap: 40px; }
  .pj-more-work .pj-related { grid-column: auto; }
}

/* Yanzi 2026-11-14: an image under Context / Challenge / Solution, filling the text column down to the
   bottom of the image beside it (so the two columns end on one line) */
.pj4-intro > .pj4-info:has(.pj7-asidefig) { display: flex; flex-direction: column; align-self: stretch; }
.pj7-asidefig { flex: 1 1 auto; min-height: 220px; margin: 40px 0 0; overflow: hidden; background: #111; }
.pj7-asidefig > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 78% 45%; }
@media (max-width: 700px) { .pj7-asidefig { flex: none; aspect-ratio: 16 / 10; margin-top: 28px; } }

/* Yanzi 2026-11-14 (after dommaroon.info/nmm), projects with layout "rail": text in the ¼ column stays in view
   while its group of images scrolls by in the ¾ column — the text never breaks the run of images */
.pj4 #pj-gallery > .pj7-group {
  grid-column: 1 / -1; display: grid; align-items: start;
  grid-template-columns: calc((100% - var(--m)) / 4) minmax(0, 1fr); column-gap: var(--m);
}
.pj7-group > aside { position: sticky; top: 130px; }
.pj7-imgs { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pj7-imgs > figure { margin: 0; width: 100% !important; }
@media (max-width: 700px) {
  .pj4 #pj-gallery > .pj7-group { grid-template-columns: 1fr; row-gap: 20px; }
  .pj7-group > aside { position: static; }
}

/* Yanzi: each text belongs to its own image — it slides down with that image only, and stops at its bottom;
   images without text stay in the same right column */
.pj4 #pj-gallery > .pj7-right { grid-column: 1 / -1; margin-left: calc((100% - var(--m)) / 4 + var(--m)); }
@media (max-width: 700px) { .pj4 #pj-gallery > .pj7-right { margin-left: 0; } }

/* Yanzi 2026-11-14: a Process block led by one large film (the space walkthrough), with the stills
   smaller underneath: three renders in a row, then the axonometric and the SketchUp studies */
.pj4-step-media.pj7-feature { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.pj7-feature > figure { margin: 0; aspect-ratio: auto; background: none; grid-column: span 3; }
.pj7-feature > figure:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; background: #000; }
.pj7-feature > figure:nth-child(2), .pj7-feature > figure:nth-child(3), .pj7-feature > figure:nth-child(4) { grid-column: span 2; }
.pj7-feature > figure > img, .pj7-feature > figure > video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .pj7-feature > figure, .pj7-feature > figure:nth-child(n) { grid-column: 1 / -1; } }

/* Yanzi 2026-11-14: space photos full screen — edge to edge, one screen high */
.pj4 #pj-gallery > figure.pj7-full { grid-column: 1 / -1; width: 100vw !important; max-width: none; margin: 0 0 0 calc(50% - 50vw); height: 100svh; min-height: 420px; overflow: hidden; }
.pj4 #pj-gallery > figure.pj7-full > img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .pj4 #pj-gallery > figure.pj7-full { height: auto; min-height: 0; } .pj4 #pj-gallery > figure.pj7-full > img { height: auto; } }

/* Yanzi 2026-11-14: the workshop poster (portrait) at half the ¾ column, so it doesn't run two screens tall */
.pj4 #pj-gallery > figure:has(img[src*="workshop-poster"]) { max-width: calc(((100% - var(--m)) * 3 / 4 - 16px) / 2); }
@media (max-width: 700px) { .pj4 #pj-gallery > figure:has(img[src*="workshop-poster"]) { max-width: none; } }

/* Yanzi 2026-11-14: the brand book — spreads side by side on a black band, edge to edge; scroll sideways */
.pj7-band { width: 100vw; margin: 56px 0 0 calc(50% - 50vw); background: #000; }
.pj7-band-row { display: flex; gap: 24px; overflow-x: auto; padding: 72px var(--m); scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #444 #000; }
.pj7-band-row > figure { flex: 0 0 auto; height: min(52vh, 520px); aspect-ratio: 1425 / 690; margin: 0; scroll-snap-align: start; background: none; }
.pj7-band-row > figure > img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 700px) { .pj7-band-row { padding: 40px var(--m); gap: 16px; } .pj7-band-row > figure { height: auto; width: 86vw; } }

/* Yanzi: the book band the same width as the walkthrough above (the ¾ column), not edge to edge;
   the spreads smaller inside it, side by side */
.pj7-band { width: auto; margin: 16px 0 0 calc((100% - var(--m)) / 4 + var(--m)); }
.pj7-band-row { padding: 40px 32px; gap: 20px; }
.pj7-band-row > figure { height: auto; width: calc((100% - 20px) / 2.15); aspect-ratio: 1425 / 690; }
@media (max-width: 700px) { .pj7-band { margin-left: 0; } .pj7-band-row { padding: 24px 16px; } .pj7-band-row > figure { width: 80%; } }

/* the workshop poster + Instagram story pair sits in the ¾ column, under the workshop room */
.pj4 #pj-gallery > .pj-row:has(img[src*="workshop-poster"]) { margin-left: calc((100% - var(--m)) / 4 + var(--m)); }
@media (max-width: 700px) { .pj4 #pj-gallery > .pj-row:has(img[src*="workshop-poster"]) { margin-left: 0; } }
.pj4 #pj-gallery > .pj-row:has(img[src*="fermologie-net-bag"]) { margin-left: calc((100% - var(--m)) / 4 + var(--m)); }
@media (max-width: 700px) { .pj4 #pj-gallery > .pj-row:has(img[src*="fermologie-net-bag"]) { margin-left: 0; } }
.pj4 #pj-gallery > .pj-row:has(img[src*="stay-in-lign-3"]) { margin-left: calc((100% - var(--m)) / 4 + var(--m)); }
@media (max-width: 700px) { .pj4 #pj-gallery > .pj-row:has(img[src*="stay-in-lign-3"]) { margin-left: 0; } }

.pj7-full-link { color: #000; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.pj7-full-link:hover { opacity: .55; }

/* Yanzi 2026-11-16: locked case study (not ready yet) — only the password box shows */
.pj-locked > :not(.pj-lock) { display: none !important; }
.pj-lock { min-height: calc(100svh - 97px - 45px); display: flex; flex-direction: column; justify-content: center;
  padding: 48px 12px; max-width: 560px; }
.pj-lock-name { margin: 0 0 20px; font: 500 clamp(48px, 7vw, 96px)/.95 var(--sans); letter-spacing: -.03em; }
.pj-lock-msg { margin: 0 0 20px; font: 400 17px/1.4 var(--sans); }
.pj-lock-form { display: flex; gap: 8px; }
.pj-lock-form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #000; border-radius: 4px;
  font: 400 16px var(--sans); background: #fff; color: #000; outline: none; }
.pj-lock-form input:focus { box-shadow: 0 0 0 1px #000; }
.pj-lock-form button { height: 40px; padding: 0 18px; border: 1px solid #000; border-radius: 4px; background: #000; color: #fff;
  font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.pj-lock-err { margin: 12px 0 0; font: 400 13px/1.3 var(--sans); color: #c00; }
.pj-lock-ask { margin: 24px 0 0; font: 400 13px/1.3 var(--sans); color: #8a8a8a; }
.pj-lock-ask a { color: #000; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* E9 (Yanzi 2026-11-27 "这里也得有 space"): the book band under the brand board — same 16px below as above */
.pj7-band.pj9-afterlead { margin-bottom: 16px; }

/* E9 (Yanzi 2026-11-27): the band's spreads open large */
.pj7-band-row > figure { cursor: zoom-in; }
.pj7-band-row > figure:focus-visible { outline: 1px solid #fff; outline-offset: 4px; }
.pj9-lb { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: #000; color: #fff; }
.pj9-lb[hidden] { display: none; }
.pj9-lb-fig { margin: 0; width: calc(100vw - 160px); height: calc(100vh - 140px); display: grid; place-items: center; }
.pj9-lb-fig > img, .pj9-lb-fig > video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.pj9-lb-n { position: absolute; left: var(--m, 24px); bottom: 20px; margin: 0; font: 400 12px/1 var(--mono); letter-spacing: .04em; }
/* Yanzi 2026-11-28: the × was a thin glyph tucked in the corner and got covered — now a white rounded box, set in from the edge */
.pj9-lb-x { position: absolute; top: 22px; right: 36px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid #000; border-radius: 6px; color: #000; background: #fff; transition: background .2s, color .2s; }   /* Yanzi 2026-11-28: exactly where and like the ⌄ it replaces */
.pj9-lb .pj9-lb-x:hover { opacity: 1; background: #000; color: #fff; border-color: #fff; }
@media (max-width: 700px) { .pj9-lb-x { top: 14px; right: 18px; } }
.pj9-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font: 400 26px/1 var(--sans); color: #fff; padding: 16px; }
.pj9-lb-prev { left: 12px; } .pj9-lb-next { right: 12px; }
.pj9-lb.one .pj9-lb-nav, .pj9-lb.one .pj9-lb-n { display: none; }
.pj9-lb button:hover { opacity: .6; }
.pj9-lb-x svg { display: block; }   /* a drawn × sits exactly in the middle (the text × sat low) */
@media (max-width: 700px) { .pj9-lb-fig { width: 100vw; height: calc(100vh - 120px); } .pj9-lb-nav { top: auto; bottom: 8px; transform: none; } .pj9-lb-n { left: 50%; transform: translateX(-50%); } }
/* E9: two images side by side in one beside block (Pear Syrup Candy: the hand + the pears) */
.pj9-duo { display: grid !important; grid-template-columns: 1fr 1fr; gap: var(--m, 24px); align-items: start; }
.pj9-duo > span { display: block; }
.pj9-duo > span > img, .pj9-duo > span > video { display: block; width: 100%; height: auto; }
@media (max-width: 700px) { .pj9-duo { grid-template-columns: 1fr; } }
.pj9-duo > span { aspect-ratio: 5 / 6; overflow: hidden; }
.pj9-duo > span > img, .pj9-duo > span > video { height: 100%; object-fit: cover; }

/* ===== E9: Sentire glyph viewer (after displaay.net/typeface/post) ===== */
@font-face { font-family: "Sentire"; src: url("fonts/Sentire-Regular.otf") format("opentype"); font-display: swap; }
.pj9-glyphs { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #000; border-bottom: 1px solid #000; height: min(78vh, 720px); margin: 24px 0; }
.g9-stage { position: relative; display: grid; grid-template-rows: auto 1fr auto; border-right: 1px solid #000; min-width: 0; }
.g9-head { display: flex; justify-content: space-between; padding: 12px 16px; font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.g9-big { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.g9-ch { font: 400 clamp(180px, 26vw, 420px)/1 "Sentire", serif; color: #000; position: relative; z-index: 1; }
.g9-p { display: inline-block; width: 0; height: 0; vertical-align: baseline; }   /* baseline probe */
.g9-l { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid #c8c8c8; z-index: 0; }
.g9-xh { border-top-style: dashed; border-top-color: #9a9a9a; }
.g9-base { border-top-color: #e8553e; }
.g9-info { display: grid; grid-template-columns: 80px 1fr; gap: 4px 12px; margin: 0; padding: 12px 16px 16px; font: 400 13px/1.3 var(--sans); }
.g9-info dt { color: #6b6b6b; } .g9-info dd { margin: 0; }
.g9-grid { display: grid; grid-template-columns: repeat(6, 1fr); align-content: start; overflow-y: auto; overscroll-behavior: contain; outline: none; scrollbar-width: thin; }
.g9-grid > button { aspect-ratio: 1; display: grid; place-items: center; border-right: 1px solid #000; border-bottom: 1px solid #000; font: 400 clamp(32px, 3.6vw, 56px)/1 "Sentire", serif; color: #000; background: #fff; transition: none; }
.g9-grid > button:nth-child(6n) { border-right: 0; }
.g9-grid > button:hover { background: #a5b3b9; }
.g9-grid > button[aria-selected="true"] { background: #a5b3b9; }   /* Yanzi: the grey-blue from the Sentire posters, not yellow */
.g9-grid:focus-visible { box-shadow: inset 0 0 0 2px #000; }
@media (max-width: 760px) {
  .pj9-glyphs { grid-template-columns: 1fr; height: auto; }
  .g9-stage { border-right: 0; border-bottom: 1px solid #000; height: 60vh; }
  .g9-grid { height: 50vh; grid-template-columns: repeat(5, 1fr); }
  .g9-grid > button:nth-child(6n) { border-right: 1px solid #000; } .g9-grid > button:nth-child(5n) { border-right: 0; }
}
/* E9: every Next / Related card image is the same box — the picture fills it, whatever its own shape,
   so the titles under the cards line up */
.pj-more-work .pj-card .img { display: block; position: relative; }
.pj-more-work .pj-card .img > img, .pj-more-work .pj-card .img > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the card's rows stretched when its description was shorter than its neighbours' — keep them packed at the top */
.pj-more-work .pj-card { align-content: start; }
/* E9: the Fermologie menu cards band — each card at its own 3 : 2 shape, readable, click to open large */
.pj9-inband { grid-column: 1 / -1; }
.pj9-inband .pj7-band-row > figure { aspect-ratio: var(--r, 829 / 554); height: auto; }   /* width from the band rule (about two and a bit across); height follows each picture's own shape */
@media (max-width: 700px) { .pj9-inband .pj7-band-row > figure { height: auto; width: 86vw; } }
/* Yanzi 2026-11-28: every still picture in a case study can be opened large */
#pj-hero img, #pj-hero video, #pj-gallery img, #pj-gallery video, #pj-lead img, #pj-lead video, #pj-process img, #pj-process video, .pj7-asidefig img { cursor: zoom-in; }
.pj9-glyphs img { cursor: auto; }
/* E9 (Yanzi 2026-11-28): Rite Aid brand board, built live — 3 × 2 tiles, the palette bands take turns opening */
.pj9-board { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); width: 100%; overflow: hidden; background: #fff; }
.pj9-bd-t { position: relative; overflow: hidden; min-height: 0; }
.pj9-bd-t > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.pj9-bd-t.swap > img { opacity: 0; transition: opacity 1s ease; }
.pj9-bd-t.swap > img.on { opacity: 1; }
.pj9-bd-pal { display: flex; flex-direction: column; min-height: 0; }
.pj9-bd-pal > span { flex: 1 1 0; display: grid; place-items: center; min-height: 0; overflow: hidden;
  font: 400 clamp(8px, 1.1vw, 16px)/1 var(--sans); letter-spacing: .02em; transition: flex-grow .9s cubic-bezier(.65, 0, .35, 1); }
.pj9-bd-pal > span.on { flex-grow: 2.6; }
/* E9 (Yanzi 2026-11-28): Rite Aid icon set — 5 across, name above, each icon draws itself in */
.pj9-icons { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 32px 16px;
  padding: clamp(40px, 6vw, 88px) 0; background: #fff; color: #023433; }   /* Yanzi: the outer columns line up with the edges of the board above */
.pj9-icons figure, .pj4-lead .pj9-icons figure { margin: 0; display: flex !important; flex-direction: column; align-items: center; gap: 14px; overflow: visible !important; min-width: 0; width: auto; aspect-ratio: auto; background: none; }
.pj9-icons figcaption { width: 100%; text-align: center; white-space: nowrap; }
.pj9-icons figcaption { font: 600 12px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: #000; }
.pj9-icons svg { height: 104px; width: auto; max-width: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: butt; stroke-linejoin: miter; }
.pj9-icons svg > * { stroke-dasharray: 1.02 1.02; stroke-dashoffset: 1.02; }   /* a touch over 1, so a finished line closes without a hairline gap */
.pj9-icons.in svg > * { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s cubic-bezier(.65, 0, .35, 1) calc(var(--k) * .12s); }
.pj9-icons.in figure.re svg > * { stroke-dashoffset: 1.02; transition: none; }
@media (max-width: 700px) { .pj9-icons { grid-template-columns: repeat(2, 1fr); justify-content: stretch; gap: 32px 12px; } .pj9-icons svg { height: 88px; } .pj9-icons figcaption { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .pj9-icons svg > * { stroke-dashoffset: 0; } }
.pj6-beside > .pj9-icons { grid-column: 2; grid-row: 1; padding-top: 0; }   /* beside its text: icons in the ¾ column */
@media (max-width: 700px) { .pj6-beside > .pj9-icons { grid-column: 1; grid-row: auto; } }
.pj9-icons > figure { grid-column: auto !important; grid-row: auto !important; width: auto !important; }   /* the gallery's own figure rules don't reach the icons */
.pj4 #pj-gallery > .pj6-beside:has(> .pj9-icons) { margin-top: 0; padding: clamp(28px, 3vw, 44px) 0; }   /* Yanzi: the same space above and below the icon set; text and icons start together */
.pj6-beside > .pj9-icons { padding: 0 !important; }
/* Yanzi 2026-11-28 ("靠近 edge"): snapping kept pulling the first picture flush to the band's edge — keep the side margin */
.pj7-band-row { scroll-padding-inline: 32px; }
@media (max-width: 700px) { .pj7-band-row { scroll-padding-inline: 16px; } }
/* a band beside its text (Rite Aid brand bible): the band fills the ¾ column */
.pj6-beside > .pj7-band { grid-column: 2; grid-row: 1; margin: 0; width: auto; min-width: 0; }
@media (max-width: 700px) { .pj6-beside > .pj7-band { grid-column: 1; grid-row: auto; } }
/* E9 (Yanzi 2026-11-28): the small things in three free columns, each picture at its own shape (after her reference) */
.pj9-collage { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pj9-collage > div { display: flex; flex-direction: column; gap: 16px; }
.pj9-collage > div:nth-child(2) { margin-top: clamp(40px, 8vw, 120px); }   /* the middle column starts lower, as on the reference */
.pj9-collage figure { margin: 0 !important; width: 100% !important; grid-column: auto !important; }
.pj9-collage img { display: block; width: 100%; height: auto; }
@media (max-width: 700px) { .pj9-collage { grid-template-columns: 1fr 1fr; } .pj9-collage > div:nth-child(2) { margin-top: 40px; } .pj9-collage > div:nth-child(3) { grid-column: 1 / -1; flex-direction: row; } .pj9-collage > div:nth-child(3) > figure { flex: 1 1 0; } }
.pj9-collage > div:nth-child(3):has(> figure:only-child) { margin-top: clamp(80px, 14vw, 200px); }   /* a lone picture in the last column floats lower */
/* E9 (Yanzi 2026-11-28): three pictures in a row, all the same shape */
.pj9-trio { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pj9-trio > figure { margin: 0 !important; width: 100% !important; grid-column: auto !important; }
.pj9-trio img { display: block; width: 100%; height: auto; }
.pj9-collage > div:nth-child(3):has(> figure:only-child) { margin-top: clamp(80px, 14vw, 200px); }
@media (max-width: 700px) { .pj9-trio { gap: 8px; } }

/* ===== Yanzi 2026-11-28: FIXED TEXT WIDTH ("固定宽度") =====
   Every body text block on a project page is exactly 22em wide, at every screen width: on wide screens the type
   is 14px; when its column is narrower the type shrinks with it (container units), so the words break into the
   same lines everywhere — the wording is checked once, and no line ends on a lone word at any width.
   The title summary works the same way: 30em on laptops/tablets, 16em on phones. */
#pj-overview, .pj6-side, .pj4 .pj-sec .pj4-info, #pj-process .pj4-text { container-type: inline-size; }
/* Yanzi 2026-11-29 ("阅读、hierarchy、professional"): one type scale per text column —
   body = column / 24 (fills the column, 13–17px), section heading = body × 1.3 (always clearly larger),
   bold lead-in = body size in black; the body text is grey. Line breaks stay the same on every screen. */
#pj-overview p, .pj6-side p, .pj4 .pj-sec .pj4-info p, #pj-process .pj4-text p { font-size: min(17px, 100cqw / 24); width: 24em; max-width: none; text-wrap: wrap; }
#pj-overview h3, .pj6-side h3, .pj4 .pj-sec .pj4-info h3 { font-size: calc(min(17px, 100cqw / 24) * 1.3); line-height: 1.25; }
/* below 1180px the ¼ text column would get too narrow for comfortable type: text goes above its pictures instead */
@media (max-width: 1340px) {
  .pj4-intro, .pj4 .pj-sec { grid-template-columns: 1fr; }
  .pj4 #pj-gallery > .pj6-beside { grid-template-columns: 1fr; row-gap: 24px; }
  .pj6-beside > figure, .pj6-beside > aside, .pj6-beside > .pj9-icons, .pj6-beside > .pj7-band { grid-column: 1 !important; grid-row: auto; }
}
.pj-summary { width: 30em; max-width: none; text-wrap: wrap; }
@media (max-width: 700px) { .pj4 .pj-summary, .pj-summary { font-size: calc((100vw - 2 * var(--m, 16px)) / 16); width: 16em; } }
/* Yanzi 2026-11-29: no blue focus ring on the viewer's × when it opens; keyboard users get a thin white outline */
.pj9-lb-x:focus { outline: none; }
.pj9-lb-x:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }

/* Yanzi 2026-11-29 ("中文不能有落单的"): short Chinese facts (客户 / 个人项目 / 特别感谢) never split mid-word in the
   narrow facts column — Chinese there breaks only at spaces and punctuation (、) */
html[data-lang="zh"] .pj4-hfacts .pj4-b > * { word-break: keep-all; overflow-wrap: anywhere; }

/* Yanzi 2026-11-29 ("把length变短些"): Next / Related card lines get a fixed, shorter measure (23em) — every line
   breaks into two even lines, the same on every screen (type scales down with the card when it is narrower) */
.pj-more-work .pj-card { container-type: inline-size; }
.pj-more-work .pj-card .s, .pj-more-work .pj-related .s { font-size: min(13px, 100cqw / 23); width: 23em; max-width: 100%; }

/* Yanzi 2026-11-29 ("不能是单独一个词"): the facts still start under "contact" on wide screens, but never get narrower
   than 14em — on mid-size screens they move left just enough that names and tools never break apart */
@media (min-width: 901px) { .pj4-headrow .pj4-hfacts { margin-left: max(0px, min(var(--fx, 0px), 100% - 14em)); } }
/* phones: the cards are narrow, so the line wraps instead of shrinking (never under 12px) */
.pj-more-work .pj-card .s, .pj-more-work .pj-related .s { font-size: max(12px, min(13px, 100cqw / 23)); }
.pj-more-work .pj-card .s, .pj-more-work .pj-related .s { width: auto; max-width: 23em; }   /* the same 23em measure on desktop; never wider than the card on phones */
.pj-more-work .pj-card { min-width: 0; }

/* Yanzi 2026-11-29 (phone): the first picture shows whole — a full-screen crop cut the Rite Aid logo to "iteai" —
   and the year in the label row stays left of the ⌄ button */
@media (max-width: 700px) {
  #pj-hero.pj7-hero, .is-embed #pj-hero.pj7-hero { height: auto !important; min-height: 0; background: none; }
  #pj-hero.pj7-hero > img, #pj-hero.pj7-hero > video { height: auto; object-fit: contain; }
  .is-embed .pj-count { padding-right: 60px; }
}
