/* Work cases (1 October 2026; the owner, 14:35 ICT: "WE HAVE TO BE CONSISTENT"): one small card shape on Work, two to a
   row (one on a phone), and one case page shape. A route layer on the flagship system: it reads the band tokens
   (--fg, --sub, --rule) of flagship-system-20260926.css. Screens are the computer and phone together (16:10); up to
   640 px the lead screen is the phone alone (4:5). */
.case-band { box-shadow: inset 0 1px 0 var(--rule); }
/* Work: one grid of identical small cards (the owner, 1 Oct 2026, 17:26 and 17:32 ICT: "NO CHAOS"). Two to a row from
   641 px, one on a phone; the same with 2 cases or 20. The whole card is one link. */
.case-grid__title { margin: 0 0 var(--s-24); }
.case-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-72); }
.case-card__link { display: flex; flex-direction: column; gap: var(--s-16); color: inherit; text-decoration: none; }
.case-card__link picture { display: block; }
.case-card img, .case-shot img, .case-figure img { width: 100%; height: auto; aspect-ratio: 16 / 10; box-shadow: 0 0 0 1px var(--rule); }
.case-card__text { display: flex; flex-direction: column; gap: var(--s-8); }
.case-card__name { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
.case-card__line { max-width: 52ch; font-size: 17px; line-height: 1.5; color: var(--sub); }
.case-card__more { margin-top: var(--s-4); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.case-card__link:hover .case-card__name, .case-card__link:focus-visible .case-card__name { text-decoration: underline; text-underline-offset: 0.1em; text-decoration-thickness: 2px; }
@media (max-width: 640px) { .case-grid { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-48); } }
/* An odd number of cases (5, 7, ...) on a computer: the newest rows keep two cards, the last row takes three, so no card
   sits alone beside an empty half (9 Oct 2026, Pattaya Gym as the fifth case). */
@media (min-width: 64rem) {
  .case-grid:not(.work-grid):has(> li:last-child:nth-child(odd):nth-child(n+5)) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .case-grid:not(.work-grid):has(> li:last-child:nth-child(odd):nth-child(n+5)) > li { grid-column: span 3; }
  .case-grid:not(.work-grid):has(> li:last-child:nth-child(odd):nth-child(n+5)) > li:nth-last-child(-n+3) { grid-column: span 2; }
}
.case-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-24); margin: var(--s-8) 0; }
.case-nums > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--s-8); padding-top: var(--s-12); box-shadow: inset 0 1px 0 var(--fg); }
.case-nums dd { margin: 0; font-size: clamp(1.75rem, 2.4vw, 2.5rem); line-height: 1; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.case-nums dt { font-size: 14px; line-height: 20px; color: var(--sub); }
.case-nums--lg { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: var(--s-72) 0 0; }
.case-nums--lg dd { font-size: var(--display-m); }
.case-nums--scores { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: var(--s-32); }
.case-page__body { display: flex; flex-direction: column; }
.case-shot { display: flex; flex-direction: column; gap: var(--s-12); }
.case-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-48); margin-top: var(--s-96); }
.case-figure { display: flex; flex-direction: column; gap: var(--s-12); }
.case-figure figcaption { font-size: 15px; line-height: 24px; color: var(--sub); }
.case-facts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-48); }
.case-did { grid-column: 1 / span 7; display: flex; flex-direction: column; gap: var(--s-24); }
.case-did h2, .case-measured h2 { font-size: var(--display-m); }
.case-did ul { box-shadow: inset 0 -1px 0 var(--rule); }
/* 14 October 2026 (owner, 15:33 ICT: "what changed and why"): why the site was rebuilt, in one or two sentences, before the list. */
.case-why { max-width: 40rem; font-size: 18px; line-height: 1.6; color: var(--fg); }
.case-did li { padding: 15px 0 16px; font-size: 17px; line-height: 1.55; box-shadow: inset 0 1px 0 var(--rule); }
.case-glance { grid-column: 9 / span 4; display: flex; flex-direction: column; gap: var(--s-12); padding-top: var(--s-12); }
.case-glance dl { box-shadow: inset 0 -1px 0 var(--rule); }
.case-glance dl > div { display: flex; justify-content: space-between; gap: var(--s-16); padding: 12px 0; font-size: 15px; line-height: 22px; box-shadow: inset 0 1px 0 var(--rule); }
.case-glance dt { color: var(--sub); }
.case-glance dd { margin: 0; text-align: right; }
.case-measured { display: flex; flex-direction: column; gap: var(--s-16); }
.case-measurement-record > summary { min-block-size: 44px; padding-block: 9px; cursor: pointer; }
.case-back { margin-top: var(--s-48); display: flex; flex-wrap: wrap; gap: var(--s-16) var(--s-32); }
.case-band--grid { padding-top: var(--s-72); }
/* The phones one by one: a strip that swipes on a phone, a row of four on a computer; the next case closes the page. */
.case-strip { display: flex; flex-direction: column; gap: var(--s-16); margin-top: var(--s-72); }
.case-strip figcaption { font-size: 15px; line-height: 24px; color: var(--sub); }
.case-phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gutter); }
.case-phones img { width: 100%; height: auto; aspect-ratio: 13 / 27; }
.case-swipe { display: none; }
.case-next { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; margin-top: var(--s-96); padding-top: var(--s-24); box-shadow: inset 0 1px 0 var(--fg); }
.case-next picture { grid-column: 1 / span 7; }
.case-next img { width: 100%; height: auto; aspect-ratio: 16 / 10; box-shadow: 0 0 0 1px var(--rule); }
.case-next__text { grid-column: 9 / span 4; display: flex; flex-direction: column; gap: var(--s-12); }
.case-next__name { font-size: var(--display-m); line-height: 1; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
.case-next:hover .case-next__name { text-decoration: underline; text-underline-offset: 0.1em; text-decoration-thickness: 2px; }
@media (max-width: 1023px) {
  .case-gallery { grid-template-columns: minmax(0, 1fr); }
  .case-phones { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62vw; column-gap: var(--s-16); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s-8); }
  .case-phones li { scroll-snap-align: start; }
  .case-swipe { display: inline; }
  .case-next { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-24); }
  .case-next picture, .case-next__text { grid-column: 1 / -1; }
  .case-nums--scores { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .case-nums--scores > div:nth-child(-n+2) { grid-column: span 3; }
  .case-nums--scores > div:nth-child(n+3) { grid-column: span 2; }
  .case-nums--lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-did, .case-glance { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .case-shot .has-phone img, .case-card .has-phone img { aspect-ratio: 4 / 5; }
}
@media (max-width: 400px) {
  .case-nums { column-gap: var(--s-16); }
  .case-nums dd { font-size: 1.75rem; }
  .case-nums dt { font-size: 14px; line-height: 20px; }
}

/* 14 October 2026, 22:08 ICT (owner: "German and Thai parity"): a case told in English, German and Thai names its other
   versions under the lead, as the service pages do. */
.case-languages { margin-top: var(--s-24); }

/* 14 October 2026: a case named in one long word (PattayaStream) sizes its title to its column, so the word never runs
   past it: the title column is the full width up to 56rem and about half the page above it. */
.case-title--long { font-size: min(var(--display-xl), calc((100vw - 48px) / 9.6)); }
@media (min-width: 56.0625rem) { .case-title--long { font-size: min(var(--display-xl), 5.5vw); } }
/* The generic Work h1 rule is more specific than the original long-name rule.
   Fit the longest unbroken case name on a narrow phone without clipping or word splitting. */
@media (max-width: 40rem) {
  .page-work .hero-text h1.case-title--long { font-size: min(2.25rem, calc((100vw - 48px) / 8.6)); }
}
/* Work, 5 Nov 2026 (the owner, 02:10 ICT: "Everything in a good visible UI way, where its fun to browse around"): every
   site in three groups, the screens big; the chips jump to a group, and with work-filter-20261105.js they filter it. A group
   with an odd number of cases opens with one card across the row on a computer. Without the script every card stays. */
.case-grid__title { margin: 0 0 var(--s-24); }
.case-grid__note { max-width: 60ch; margin: 0 0 var(--s-32); font-size: 17px; line-height: 1.5; color: var(--sub); }
.work-filter { margin: 0 0 var(--s-72); }
.work-filter__list { display: flex; flex-wrap: wrap; gap: var(--s-12); margin: 0; padding: 0; list-style: none; }
.work-filter__chip { display: inline-flex; align-items: center; gap: var(--s-8); min-height: 44px; margin: 0; padding: 0 var(--s-16); border: 1px solid var(--rule); border-radius: 0; background: transparent; color: var(--fg); font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; touch-action: manipulation; }
.work-filter__chip:hover { border-color: var(--fg); }
.work-filter__chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.work-filter__count { font-size: 14px; font-weight: 400; color: var(--sub); font-variant-numeric: tabular-nums; }
.work-filter__chip[aria-pressed="true"] .work-filter__count { color: inherit; }
.work-groups { display: grid; gap: var(--s-120); }
.work-group { display: grid; gap: var(--s-48); min-width: 0; scroll-margin-top: calc(var(--header) + var(--s-24)); }
.work-group[hidden] { display: none; }
.work-group__head { display: grid; gap: var(--s-12); max-width: 60ch; padding-top: var(--s-24); box-shadow: inset 0 1px 0 var(--fg); }
.work-group__head h3 { margin: 0; font-size: var(--display-m); line-height: 1; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
.work-group__head p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--sub); }
.case-card__kind { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--sub); }
.work-grid .case-card__link:hover img, .work-grid .case-card__link:focus-visible img { box-shadow: 0 0 0 1px var(--fg); }
@media (min-width: 64rem) {
  .work-grid > .case-card--feature { grid-column: 1 / -1; }
  .case-card--feature .case-card__link { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-48); align-items: center; }
  .case-card--feature .case-card__name { font-size: var(--display-m); }
}
@media (max-width: 640px) { .work-groups { gap: var(--s-96); } .work-filter { margin-bottom: var(--s-48); } }
