/* ============================================================
   page-workshop.css — a workshop's own page (WP-16, the her-site wave stage 2;
   design brief § 5.8, plan § 7.2 "WP-16"). Loaded after the frame and the parts
   sheets by SiteLayout, on /workshop/<key>.html and /zh/workshop/<key>.html only.
   Every colour, face and size is a token from chishan.css :root; no hex here.
   Classes are .workshop-*; a shared part is only placed from here, never restyled.

   The 2026-11-20 shine pass: the page is the programme's own card. For schools is
   the menu; this is one line of it opened out — the name wide, one ink rule, then
   the words and the button at the left and the prices large at the right. A workshop
   with only a name and a line is the same card with fewer lines, and stands in its
   audience's index below.
   ============================================================ */

/* ---- The page's 12-column grid (brief § 2.5) ---- */
.workshop-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
}

/* ============================================================
   1. The masthead — the name, one ink rule, then words | prices
   ============================================================ */
.workshop-hero { padding-top: var(--s-7); padding-bottom: var(--s-8); }
/* the next section starts one step under the masthead, so its picture rises into the first screen */
.workshop-hero + .workshop-detail { padding-top: var(--s-8); }

/* The back link: a standalone text link, 44 px tall through its box (brief § 2.6, § 8.2) */
.workshop-back { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; font-size: var(--t-small); line-height: var(--lh-small); }
/* The name runs wide — nine columns — so most names stand on one line */
.workshop-name { margin-top: var(--s-5); max-width: calc((100% + var(--grid-gap)) * 9 / 12 - var(--grid-gap)); text-wrap: balance; }
/* A Chinese name too long for its line breaks into balanced lines, not one character alone
   (chishan.css keeps a Chinese heading whole and lets it overflow-wrap; at 320 that left 饮
   on a line of its own) */
.workshop-name:lang(zh) { word-break: normal; }
/* Her Chinese name for the same workshop, on its own line under the English h1:
   the tag voice (chishan.css .zh-tag), at a size that stays a tag beside an 84 px name. */
.workshop-name-cn {
  display: block;
  margin-top: var(--s-3);
  font-size: var(--t-h4);
  line-height: var(--lh-h4);
  letter-spacing: .06em;
}
.workshop-soon { margin-top: var(--s-4); color: var(--ink); }

/* The rule is the menu table's (For schools): 1 px of ink across the content width */
.workshop-mast {
  margin-top: var(--s-7);
  border-top: 1px solid var(--ink);
  row-gap: var(--s-6);
  align-items: start;
}
.workshop-mast-words { min-width: 0; padding-top: var(--s-5); }
.workshop-mast-words:empty { padding-top: 0; }
.workshop-lede { max-width: var(--measure); }

/* With prices or facts: the words on 1–5, the card on 7–12 standing directly under the
   rule (PriceGrid's .price-grid--open: no top line of its own), the button under the
   words with its foot on the card's foot. */
.workshop-mast--card .workshop-mast-words { grid-column: 1 / 6; grid-row: 1; }
.workshop-mast--card .workshop-card { grid-column: 7 / 13; grid-row: 1 / span 2; min-width: 0; }
.workshop-mast--card .workshop-actions { grid-column: 1 / 6; grid-row: 2; align-self: end; }
.workshop-card > :not(.workshop-prices):first-child { padding-top: var(--s-5); }
.workshop-price-line { margin-top: var(--s-5); font-size: var(--t-small); color: var(--ink-soft); }
.workshop-facts { margin-top: var(--s-5); }

/* With neither: her line at the left of the rule, the button at its right. Her one line is
   all the page says of the workshop, so it is set in the display face at the h3 size (as
   the names of things are), not as a quiet lede under a larger block. */
.workshop-mast--plain .workshop-mast-words { grid-column: 1 / 8; }
.workshop-mast--plain .workshop-lede {
  font-family: var(--display);
  font-size: var(--t-h3); line-height: 1.3; font-weight: var(--w-h3);
  color: var(--ink);
  max-width: 24em;
  text-wrap: balance;
}
.workshop-mast--plain .workshop-lede:lang(zh) { font-family: var(--cjk); line-height: var(--lh-h3); }
.workshop-mast--plain .workshop-actions { grid-column: 10 / 13; padding-top: var(--s-5); }
/* The one button stands on the right content edge, level with the closing band's (review P3). */
@media (min-width: 1080px) { .workshop-mast--plain .workshop-actions { justify-content: flex-end; } }

.workshop-actions {
  min-width: 0;
  display: flex; flex-wrap: wrap; align-items: center;
  column-gap: var(--s-6); row-gap: var(--s-3);
}
/* The brochure: a file link — its name underlined, ↓, and "PDF, 7.8 MB" under it in --ink-soft (brief § 2.6) */
.workshop-doc {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-start;
  min-height: 52px;
  color: var(--ink);
}
.workshop-doc-name {
  display: inline-flex; align-items: center;
  font-size: var(--t-small); line-height: var(--lh-small); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--brass-deep);
  text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: text-decoration-color var(--dur-hover) var(--ease);
}
.workshop-doc:hover .workshop-doc-name { text-decoration-color: var(--ink); text-decoration-thickness: 2px; }
.workshop-doc-meta { margin-top: 2px; font-size: var(--t-label); line-height: var(--lh-label); color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .workshop-doc-name { transition: none; } }

/* ============================================================
   2. What it is — her headline, what students explore and what they make on 1–5;
      the main photo large on 7–12 (a portrait file on 8–12, never wider than it
      allows). With no main photo the makes are cards on 7–12.
   ============================================================ */
.workshop-detail-grid { align-items: start; }
.workshop-detail-text { grid-column: 1 / 6; min-width: 0; }
.workshop-detail-text .sh { max-width: none; margin-bottom: 0; }   /* placed: the column sets its width */
.workshop-photo { grid-column: 7 / 13; }
.workshop-detail-grid--portrait .workshop-photo { grid-column: 8 / 13; }
.workshop-detail-grid--portrait .workshop-detail-text { grid-column: 1 / 7; }
.workshop-makes { min-width: 0; }
.workshop-detail-grid > .workshop-makes { grid-column: 7 / 13; padding-top: var(--s-2); }
.workshop-detail-text > * + .workshop-makes { margin-top: var(--s-7); }
.workshop-detail-grid--words .workshop-detail-text { grid-column: 1 / 8; }
/* nothing but the picture, or nothing but the makes: it stands at the left, on the page's edge */
.workshop-detail-grid--bare .workshop-photo { grid-column: 1 / 7; }
.workshop-detail-grid--bare.workshop-detail-grid--portrait .workshop-photo { grid-column: 1 / 6; }
.workshop-detail-grid--bare > .workshop-makes { grid-column: 1 / 13; padding-top: 0; }
.workshop-image-note {
  margin-top: var(--s-5);
  max-width: var(--measure);
  font-size: var(--t-label); line-height: var(--lh-small);
  color: var(--ink-soft);
}

/* Her steps as ruled lines (the For schools arrangement): the name in --ink, its line in --ink-soft */
.workshop-detail-text > * + .workshop-steps { margin-top: var(--s-7); }
.workshop-steps-title { margin-bottom: var(--s-3); }
.workshop-step-list { list-style: none; max-width: var(--measure); }
.workshop-step { padding: var(--s-3) 0; color: var(--ink-soft); }
.workshop-step + .workshop-step { border-top: 1px solid var(--line); }
.workshop-step-name { color: var(--ink); font-weight: 500; }

/* ============================================================
   3. Notes — the practitioner as a feature on 1–7, her notes on 9–12
   ============================================================ */
.workshop-notes-grid { align-items: start; }
.workshop-person { grid-column: 1 / 8; min-width: 0; }
.workshop-note-list { grid-column: 9 / 13; min-width: 0; display: grid; row-gap: var(--s-6); }
.workshop-notes-grid--person .workshop-person { grid-column: 1 / 9; }
/* no practitioner: the notes side by side on the page's two halves */
.workshop-notes-grid--plain .workshop-note-list {
  grid-column: 1 / 13;
  grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--grid-gap);
}
.workshop-note { min-width: 0; border-top: 1px solid var(--line); padding-top: var(--s-5); }
.workshop-note-title { font-family: var(--label); }   /* a label voice heading (chishan.css .label) */
.workshop-note-text {
  margin-top: var(--s-3); max-width: var(--measure);
  font-size: var(--t-small); line-height: var(--lh-small); color: var(--ink);
}

/* ============================================================
   4. The related story — its h2, then the feature: a 4/5 photo on 1–5 (the hero's
      width, so her file is never drawn wider than it allows), its words on 7–11
   ============================================================ */
.workshop-story-link { max-width: 14em; margin-bottom: var(--s-7); }
.workshop-story-feature > .story-media { grid-column: 1 / span 5; }
.workshop-story-feature > .story-body { grid-column: 7 / span 5; align-self: center; }

/* ============================================================
   5. The audience's workshops — a ruled index under the audience's own name: the
      name on 1–6, her line on 7–12; this page's own row is marked, the others link.
      The whole row is a link's target; its ring is drawn on the row.
   ============================================================ */
.workshop-index-label { margin-bottom: var(--s-5); }
.workshop-index-rows { list-style: none; border-top: 1px solid var(--ink); }
.workshop-index-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  align-items: baseline;
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--line);
}
.workshop-index-name {
  grid-column: 1 / 7; min-width: 0;
  font-size: var(--t-h3); line-height: var(--lh-h3); font-weight: var(--w-h3);
  color: var(--ink);
}
/* her Chinese name stands under the English, as on the For schools menu; an inline-block
   the row's width, so the link's underline is the English name's alone */
.workshop-index-name .zh-tag { display: inline-block; width: 100%; margin-top: var(--s-1); font-size: .7em; line-height: 1.45; }
.workshop-index-words { grid-column: 7 / 13; min-width: 0; }
.workshop-index-line { font-size: var(--t-small); line-height: var(--lh-small); color: var(--ink-soft); max-width: var(--measure); }
.workshop-index-soon { margin-bottom: var(--s-1); }
.workshop-index-link {
  text-decoration: underline;
  text-decoration-color: var(--brass-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  transition: text-decoration-color var(--dur-hover) var(--ease);
}
.workshop-index-link::after { content: ""; position: absolute; inset: 0; }
.workshop-index-link:focus-visible { outline: none; }
.workshop-index-link:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 3px; }
.workshop-index-row:hover .workshop-index-link { text-decoration-color: var(--ink); text-decoration-thickness: 2px; }
@media (prefers-reduced-motion: reduce) { .workshop-index-link { transition: none; } }
/* This page's own row: not a link, in the quieter ink, with the nav's own mark for the
   current page — the seal dot (brief § 2.1) — hung in the margin so the names keep one edge */
.workshop-index-here { color: var(--ink-soft); }
.workshop-index-here::before {
  content: "";
  position: absolute; left: calc(-1 * var(--s-4)); top: calc(var(--s-5) + .5em * var(--lh-h3));
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--seal);
}

/* ============================================================
   Between the phone and the desk
   ============================================================ */
@media (max-width: 1079px) {
  .workshop-name { max-width: none; }
  .workshop-mast--card .workshop-mast-words,
  .workshop-mast--card .workshop-actions { grid-column: 1 / 7; }
  .workshop-mast--card .workshop-card { grid-column: 7 / 13; }
  .workshop-mast--plain .workshop-actions { grid-column: 9 / 13; }
  .workshop-detail-text,
  .workshop-detail-grid--portrait .workshop-detail-text { grid-column: 1 / 7; }
  .workshop-photo,
  .workshop-detail-grid--portrait .workshop-photo { grid-column: 8 / 13; }
  .workshop-person { grid-column: 1 / 8; }
  .workshop-note-list { grid-column: 8 / 13; }
  .workshop-story-feature > .story-media { grid-column: 1 / span 6; }
  .workshop-story-feature > .story-body { grid-column: 8 / span 5; }
}
/* Below 960 the detail reads in one column, in its own order: her headline, the picture,
   what students explore, what they make */
@media (max-width: 960px) {
  /* one flex column whose gap spaces the parts, whichever of them the workshop has (the
     words' wrapper lays out no box here, so its parts and the picture are ordered together) */
  .workshop-detail-grid { display: flex; flex-direction: column; align-items: stretch; row-gap: var(--s-7); }
  .workshop-detail-text { display: contents; }
  .workshop-detail-head { order: 1; }
  .workshop-photo { order: 2; }
  .workshop-steps { order: 3; }
  .workshop-makes { order: 4; }
  .workshop-detail-text > * + .workshop-steps,
  .workshop-detail-text > * + .workshop-makes { margin-top: 0; }
  .workshop-detail-grid > .workshop-makes { padding-top: 0; }
  .workshop-detail-head, .workshop-steps, .workshop-makes { max-width: 640px; }
  .workshop-makes--rows { max-width: none; }   /* ruled rows: their lines run the column, as the index's do */
  .workshop-detail-grid--portrait .workshop-photo { max-width: 410px; }
  .workshop-step-list { max-width: 640px; }
  /* the picture across the column in its phone crop (Photo's own --ratio-phone and
     --focus-phone: 4/3 for a landscape file), not a 4/5 well taller than the screen */
  .workshop-photo .photo-well { aspect-ratio: var(--ratio-phone, var(--ratio, 3 / 2)); }
  .workshop-photo .photo-well img { object-position: var(--focus-phone, var(--focus, 50% 50%)); }

  /* the practitioner across the page, her notes side by side under her */
  .workshop-notes-grid { row-gap: var(--s-7); }
  .workshop-person,
  .workshop-notes-grid--person .workshop-person { grid-column: 1 / 13; }
  .workshop-note-list {
    grid-column: 1 / 13;
    grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--grid-gap);
  }
}

/* ============================================================
   The phone (≤ 760): one column
   ============================================================ */
@media (max-width: 760px) {
  .workshop-grid { grid-template-columns: minmax(0, 1fr); }
  .workshop-grid > * { grid-column: 1 / -1; }

  .workshop-hero { padding-top: var(--s-4); padding-bottom: var(--s-8); }
  .workshop-name { margin-top: var(--s-3); }
  .workshop-mast { margin-top: var(--s-6); row-gap: 0; }
  .workshop-mast--card .workshop-mast-words,
  .workshop-mast--card .workshop-card,
  .workshop-mast--card .workshop-actions,
  .workshop-mast--plain .workshop-mast-words,
  .workshop-mast--plain .workshop-actions { grid-column: 1 / -1; grid-row: auto; }
  .workshop-card { margin-top: var(--s-6); }
  .workshop-actions,
  .workshop-mast--plain .workshop-actions { margin-top: var(--s-6); padding-top: 0; flex-direction: column; align-items: stretch; }
  .workshop-cta { width: 100%; }

  .workshop-detail-head, .workshop-steps, .workshop-makes, .workshop-photo,
  .workshop-detail-grid--portrait .workshop-photo { max-width: none; }
  .workshop-photo .photo-cap { margin-top: var(--s-3); }

  .workshop-person,
  .workshop-notes-grid--person .workshop-person,
  .workshop-note-list,
  .workshop-notes-grid--plain .workshop-note-list { grid-column: 1 / -1; }
  .workshop-note-list,
  .workshop-notes-grid--plain .workshop-note-list { grid-template-columns: minmax(0, 1fr); }

  .workshop-story-link { margin-bottom: var(--s-6); }

  .workshop-index-row { display: block; padding: var(--s-4) 0 var(--s-5); }
  .workshop-index-words { margin-top: var(--s-2); }
  .workshop-index-name { font-size: 22px; line-height: 1.2; }
  .workshop-index-name:lang(zh) { font-size: 20px; line-height: 1.45; }
  /* the row is the hit area; the link's own box is 44 px tall too */
  .workshop-index-link, .workshop-index-here { display: inline-block; min-height: 44px; padding-top: var(--s-2); }
  .workshop-index-here::before { left: calc(-1 * var(--s-3)); top: calc(var(--s-4) + var(--s-2) + .5em * 1.2); }
}

/* Her Chinese make names break only at her spaces, never inside a word
   ("新中式茶 / 饮" at 1024); a name too long for its column may still break */
.workshop-makes .make-name:lang(zh) { word-break: keep-all; overflow-wrap: anywhere; }
