/*
  The layout model (the layout rebuild, 2026-10-25; doc/handover/layout-rebuild.md).

  - Three layouts, from the three design frames: phones below 40rem, tablets from 40rem, desktops from 80rem.
    Between 744 and 1440 px, type and spacing interpolate through --grow: 0 at 744, 1 px per reference pixel at
    1440 and beyond. From 390 to 744, phone type grows through --phone-grow the same way.
  - Text sizes and the gaps between pieces of text are px (or em). Art is sized from its column, and an offset
    between two pieces of art (a wave rising behind an illustration) is a percentage of the column's width, which
    is what the art's own size follows: art and offset scale together at any width, with no correction below 390.
  - The designs give hierarchy, proportions and a type scale, not per-element measurements.
  - No cascade layers: precedence is selector weight, then source order, from element defaults through shared
    components to page rules.
  - Line heights that can come out fractional are rounded to whole pixels: Safari lays a fractional line height
    out at the whole pixel below it, Chromium keeps the fraction.
*/
@font-face {
  font-family: "Abril Fatface";
  src: url("assets/fonts/AbrilFatface-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/PlayfairDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/PlayfairDisplay-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/PlayfairDisplay-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/PlayfairDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/PlayfairDisplay-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@property --river-fade-progress {
  syntax: "<number>";
  inherits: false;
  initial-value: 8;
}
@keyframes layer-fade-in {
  from {
    opacity: 0;
    visibility: hidden;
  }
  to {
    opacity: 1;
    visibility: visible;
  }
}
@keyframes river-reveal-from-left {
  from {
    --river-fade-progress: 0;
    visibility: hidden;
  }
  to {
    --river-fade-progress: 8;
    visibility: visible;
  }
}
:root {
  --phone-grow: clamp(0rem, calc((100vw - 390rem / 16) / 354), calc(1rem / 16));
  /*
    Phone drawings composed in px of their 390 frame (the case-study compositions): how far a drawing has outgrown
    that frame, per drawn px, from -70/390 at 320 to 354/390 at 744.
  */
  --phone-art-grow: clamp(-70rem / 16 / 390, (100vw - 390rem / 16) / 390, 354rem / 16 / 390);
  --grow: 0rem;
  --column-max: calc(1086rem / 16);
  /*
    The river and the footer waves keep their drawn shape and grow with the window until they cover a 1080p
    screen (the client: "to at least cover 1080p"; the user chose even growth), then centre.
  */
  --river-max: calc(1920rem / 16);
  --color-page-background: #fff;
  --color-purple: #685587;
  --color-body-purple: #463267;
  --color-gold: #c27f36;
  --color-river-gold: #d8a150;
  color-scheme: light;
  @media(width>=40rem) {
    --grow: clamp(0rem, calc((100cqw - 744rem / 16) / 696), calc(1rem / 16));
  }
}
body {
  /*
    WeChat on iOS enlarges a page by writing a percentage text-size-adjust into body's inline style, which grows
    the text but not the drawings around it; the user chose to ignore it (2026-10-23).
  */
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  margin: 0;
  background-color: var(--color-page-background);
  @media(width>=40rem) {
    container-type: inline-size;
  }
}
main {
  position: relative;
  color: var(--color-body-purple);
  text-align: center;
}
h1,
h2,
h3,
p {
  margin-block: 0;
}
h1 {
  font-family: "Abril Fatface", serif;
  font-weight: 400;
}
button {
  padding: 0;
  border-width: 0;
  background-color: transparent;
}
:where(a, button, input, textarea):focus-visible {
  outline: calc(2rem / 16) solid var(--color-purple);
  outline-offset: calc(4rem / 16);
}
img {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

/* The top corner drawing spans the window; its own preserveAspectRatio keeps each corner's art at its edge. */
.corner-decorations {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  &>img {
    inline-size: 100%;
    @media(width>=80rem) {
      block-size: calc(154rem / 16 + 140 * var(--grow));
    }
  }
}
.menu-toggle {
  position: absolute;
  inset-block-start: calc(17rem / 16);
  inset-inline-start: calc(14rem / 16);
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: calc(8rem / 16);
  cursor: pointer;
  /* Three 35 by 2 px bars, as drawn, 9 and 19 px apart. */
  &::before {
    content: "";
    position: absolute;
    inset-block-start: calc(14rem / 16);
    inset-inline-start: calc(6rem / 16);
    inline-size: calc(35rem / 16);
    block-size: calc(2rem / 16);
    border-radius: calc(1rem / 16);
    background-color: var(--color-purple);
    box-shadow:
      0 calc(9rem / 16) var(--color-purple),
      0 calc(19rem / 16) var(--color-purple);
  }
  @media(width>=40rem) {
    display: none;
  }
}
/* A popover menu on phones; a row of links beside the floral logo on wide screens. */
#portfolio-primary-navigation {
  position: fixed;
  inset: 0 auto auto 0;
  box-sizing: border-box;
  inline-size: calc(97rem / 16);
  block-size: 100dvh;
  margin: 0;
  padding: 8rem 0 0;
  border-width: 0;
  background-color: var(--color-page-background);
  color: var(--color-purple);
  font-family: "Playfair Display", serif;
  font-size: calc(15rem / 16);
  /* Regular on every page (the client, 2026-10-18), whatever weight the page around it sets. */
  font-weight: 400;
  line-height: calc(20rem / 16);
  text-align: start;
  /* The open menu takes focus itself (the user's choice, 2026-10-22); the panel is not a control. */
  &:focus {
    outline: none;
  }
  &>a {
    display: flex;
    align-items: center;
    min-inline-size: 3rem;
    min-block-size: 3rem;
    margin-block-end: calc(3rem / 16);
    padding-inline-start: calc(20rem / 16);
    color: inherit;
    text-decoration: none;
    &:hover {
      color: var(--color-body-purple);
      text-decoration: underline;
    }
    @media(width>=40rem) {
      margin-block-end: 0;
      padding-inline-start: 0;
    }
  }
  &>.floral-logo {
    display: none;
    @media(width>=40rem) {
      display: block;
      inline-size: calc(30rem / 16 + 18 * var(--grow));
      margin-block-start: calc(5rem / 16 - 5 * var(--grow));
    }
  }
  @media(width>=40rem) {
    position: absolute;
    inset-block-start: calc(20rem / 16 + 16 * var(--grow));
    /*
      The client: "Get the logo+nav bar to always stick to the left side of the screen with padding, clamped by the
      leftmost side of the river": at least the designs' 35 to 70 px from the window's edge, and in line with the
      river's left end once the centred river starts further in.
    */
    inset-inline-start: max(35rem / 16 + 35 * var(--grow), (100cqw - var(--river-max)) / 2);
    display: flex;
    align-items: start;
    column-gap: calc(25rem / 16 + 36 * var(--grow));
    inline-size: max-content;
    block-size: auto;
    padding-block: 0;
    /* The client: "Change the font size of nav to 22 for desktops" (the designs drew 25 at 1440). */
    font-size: calc(14rem / 16 + 8 * var(--grow));
    line-height: round(nearest, 20rem / 16 + 14 * var(--grow), 1px);
    overflow: visible;
  }
}
/*
  A 136 by 34 px pill on phones and tablets that grows toward each page's desktop size; the link box is 8 px
  larger each way for the drop shadow, and its block padding keeps a 48 px target.
*/
.pill {
  --pill-color: var(--color-gold);
  --pill-hover-color: var(--color-purple);
  --pill-inline-growth: 86;
  --pill-block-growth: 20;
  --pill-inline-size: calc(136rem / 16 + var(--pill-inline-growth) * var(--grow));
  --pill-block-size: calc(34rem / 16 + var(--pill-block-growth) * var(--grow));
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: content-box;
  inline-size: calc(var(--pill-inline-size) + 8rem / 16);
  block-size: var(--pill-block-size);
  margin-inline: auto;
  padding-block-end: calc(max(3rem, var(--pill-block-size) + 8rem / 16) - var(--pill-block-size));
  color: var(--color-page-background);
  font-family: "Abril Fatface", serif;
  font-size: calc(14rem / 16);
  line-height: round(nearest, 1em, 1px);
  text-box: trim-both cap alphabetic;
  text-decoration: none;
  &::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset-block-start: 0;
    inset-inline-start: calc(4rem / 16);
    inline-size: var(--pill-inline-size);
    block-size: var(--pill-block-size);
    border-radius: 100vmax;
    background-color: var(--pill-color);
    box-shadow: 0 calc(var(--pill-block-size) * 4 / 34) calc(var(--pill-block-size) * 4 / 34) rgb(0 0 0 / 25%);
  }
  &:hover::before {
    background-color: var(--pill-hover-color);
  }
  @media(width>=40rem) {
    font-family: "Playfair Display", serif;
    font-size: calc(14rem / 16 + 8 * var(--grow));
    font-weight: 700;
  }
}
/* Layered drawings: the first layer sets the size, the rest lie over it. */
.wave-composition {
  position: relative;
  pointer-events: none;
  &>:is(img, picture) {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    inline-size: 100%;
    &:first-child {
      position: relative;
    }
  }
  & picture>img {
    inline-size: 100%;
  }
}
.site-footer {
  margin-block-start: calc(86rem / 16);
  color: var(--color-purple);
  font-family: "Playfair Display", serif;
  font-size: calc(11rem / 16);
  font-weight: 400;
  line-height: calc(15rem / 16);
  text-align: center;
  /* The wave comes after the text and rises behind it. */
  &>p {
    position: relative;
    z-index: 1;
  }
  &>.credits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: calc(13rem / 16 + 4 * var(--grow));
    margin-block-start: calc(8rem / 16 + 8 * var(--grow));
  }
  /* In the footer, centred above the thank-you, so it comes into view with the footer. */
  &>.back-to-top {
    position: relative;
    display: block;
    box-sizing: border-box;
    inline-size: 3rem;
    block-size: 3rem;
    margin-block-end: calc(1rem + 16 * var(--grow));
    margin-inline: auto;
    border: calc(2rem / 16) solid var(--color-river-gold);
    border-radius: 50%;
    &::before {
      content: "";
      position: absolute;
      inset: calc(-2rem / 16);
      background-color: var(--color-purple);
      mask-image: url("assets/portfolio-back-to-top-arrow.svg");
      mask-size: 100% 100%;
    }
    /* The client (CF113): on hover the arrow turns the ring's gold. */
    &:hover::before {
      background-color: var(--color-river-gold);
    }
  }
  &>.footer-wave {
    @media(width>=40rem) {
      max-inline-size: var(--river-max);
      margin-inline: auto;
    }
  }
  @media(width>=40rem) {
    margin-block-start: calc(150rem / 16 + 131 * var(--grow));
    font-size: calc(11rem / 16 + 9 * var(--grow));
    line-height: round(nearest, 15rem / 16 + 12 * var(--grow), 1px);
  }
}

/* Home */
.home {
  &>main {
    /* Below the 120 px corner drawing (a share of the width, as the drawing scales), the hero 21 px further. */
    padding-block-start: calc(21rem / 16 + 120 / 390 * 100%);
    @media(width>=40rem) {
      padding-block-start: calc(118rem / 16 + 90 * var(--grow));
    }
  }
  & .greeting,
  & .designer-name {
    display: block;
  }
  & .greeting {
    color: var(--color-purple);
    font-size: calc(24rem / 16 + 4 * var(--phone-grow) + 12 * var(--grow));
    line-height: round(nearest, 2rem + 4 * var(--phone-grow) + 16 * var(--grow), 1px);
  }
  & .designer-name {
    margin-block-start: calc(11rem / 16);
    @media(width>=40rem) {
      margin-block-start: calc(10rem / 16 + 12 * var(--grow));
    }
    color: var(--color-gold);
    font-size: calc(2rem + 4 * var(--phone-grow) + 12 * var(--grow));
    line-height: round(nearest, 42rem / 16 + 6 * var(--phone-grow) + 16 * var(--grow), 1px);
  }
  /* Every Home design sets the summary on an 18 em measure (its longest line 17.9 to 17.95 em). */
  & .summary {
    max-inline-size: min(calc(100% - 40rem / 16), 18.2em);
    margin-block-start: calc(31rem / 16 + 2 * var(--phone-grow) + 41 * var(--grow));
    margin-inline: auto;
    font-family: "Playfair Display", serif;
    font-size: calc(15rem / 16 + var(--phone-grow) + 6 * var(--grow));
    font-weight: 700;
    line-height: round(nearest, 2rem + 8 * var(--grow), 1px);
  }
  /* The one purple pill; the client: hover to the name's gold. */
  & .about-link {
    --pill-color: var(--color-purple);
    --pill-hover-color: var(--color-gold);
    margin-block-start: calc(40rem / 16 + 7 * var(--phone-grow) + 41 * var(--grow));
  }
  /* The river rises behind the pill: 48 of its 390 drawn px on phones, 76 of 744 on tablets, 104 of 1440 on desktops. */
  & .intro-wave {
    margin-block-start: calc(-48 / 390 * 100%);
    @media(width>=40rem) {
      max-inline-size: var(--river-max);
      margin-block-start: calc(-76 / 744 * 100%);
      margin-inline: auto;
    }
    @media(width>=80rem) {
      margin-block-start: calc(-104 / 1440 * 100%);
    }
  }
  /* Each step 1 s after the previous (client, 2026-10-18); the flower 0.3 s after the river (CF90). */
  @media(prefers-reduced-motion:no-preference) {
    & :is(.greeting, .designer-name, .summary, .about-link, .purple-accent, .floral-accent) {
      animation: layer-fade-in 450ms ease-out backwards;
    }
    & .designer-name {
      animation-delay: 1s;
    }
    & :is(.summary, .about-link) {
      animation-delay: 2s;
    }
    & .purple-accent {
      animation-delay: 3s;
    }
    & .river-reveal {
      animation: river-reveal-from-left 1800ms linear 4s backwards;
      mask-image: linear-gradient(
        to right,
        rgb(0 0 0 / calc(pow(4, var(--river-fade-progress)) / 100)) 0%,
        rgb(0 0 0 / calc(pow(2, (5 * var(--river-fade-progress) - 1) / 3) / 100)) calc(100% / 3),
        rgb(0 0 0 / calc(pow(2, (3 * var(--river-fade-progress) - 1) / 2) / 100)) 50%,
        rgb(0 0 0 / calc(pow(2, (4 * var(--river-fade-progress) - 2) / 3) / 100)) calc(200% / 3),
        rgb(0 0 0 / calc(pow(2, var(--river-fade-progress) - 1) / 100)) 100%
      );
    }
    & .floral-accent {
      animation-delay: 6100ms;
    }
  }
  /*
    A project: stacked on phones, its art beside the text on wide screens. Per project, two drawn distances in px
    of the 390 px phone drawings: --gap from the art above to this illustration, --rise of the gray wave behind the
    copy's end. Wide: --art, the illustration's width in the 1440 design, of its 507 px column (1086 less the 72 px
    gap, halved), so it keeps that share of its column at every width.
  */
  & .project {
    --gap: 48;
    --rise: 0;
    --art: 409;
    margin-block-start: calc(var(--gap) / 390 * 100%);
    font-family: "Playfair Display", serif;
    font-size: calc(14rem / 16);
    font-weight: 500;
    line-height: calc(19rem / 16);
    &>.illustration {
      display: block;
      &>img {
        inline-size: 100%;
      }
      @media(width<40rem) {
        max-inline-size: calc(440rem / 16);
        margin-inline: auto;
      }
    }
    &>.description {
      position: relative;
      z-index: 1;
      /* The 310 px measure of every design, centred on phones, keeping 20 px a side on the narrowest. */
      max-inline-size: min(calc(100% - 40rem / 16), calc(310rem / 16 + 200 * var(--grow)));
      margin-inline: auto;
      &>h2 {
        margin-block-start: calc(16rem / 16);
        color: var(--color-gold);
        font-family: "Abril Fatface", serif;
        font-size: calc(28rem / 16 + 20 * var(--grow));
        font-weight: 400;
        line-height: round(nearest, 38rem / 16 + 26 * var(--grow), 1px);
      }
      &>h3 {
        margin-block-start: calc(6rem / 16 + 4 * var(--grow));
        font-size: calc(18rem / 16 + 12 * var(--grow));
        line-height: round(nearest, 24rem / 16 + 16 * var(--grow), 1px);
      }
      &>p {
        margin-block-start: calc(11rem / 16 + 7 * var(--grow));
      }
      /* Project type and role are two items, each wrapping on its own. */
      &>.role>span {
        display: block;
      }
      &>.pill {
        --pill-inline-growth: 120;
        --pill-block-growth: 29;
        margin-block-start: calc(27rem / 16 + 26 * var(--grow));
      }
    }
    /*
      The gray wave rises behind the copy's end. Below 390 it keeps its 390 drawing, centred and clipped by the
      window: the copy keeps its size there, so a wave shrinking with the screen reached into it (Matcha's role,
      the MenuMe heading, Tales' "Storytelling" from 320 to 384, measured on the wave's pixels in Safari).
    */
    &>.side-wave {
      inline-size: max(100%, 390rem / 16);
      margin-block-start: calc(var(--rise) / 390 * -1 * max(100%, 390rem / 16));
      margin-inline: min(0rem, (100% - 390rem / 16) / 2);
    }
    @media(width<40rem) {
      overflow-x: clip;
    }
    /* Wide: art and copy in two equal halves, mirrored on every other row. */
    @media(width>=40rem) {
      display: flex;
      align-items: center;
      /* The tablet design starts the text at the column's middle; the desktop one leaves 72 px between art and text. */
      column-gap: calc(72 * var(--grow));
      inline-size: calc(100% - 100rem / 16 - 254 * var(--grow));
      max-inline-size: var(--column-max);
      margin-block-start: calc(80rem / 16 + 110 * var(--grow));
      margin-inline: auto;
      font-size: calc(14rem / 16 + 8 * var(--grow));
      line-height: round(nearest, 19rem / 16 + 10 * var(--grow), 1px);
      text-align: start;
      &>:is(.illustration, .description) {
        flex: 1 1 0;
        min-inline-size: 0;
      }
      /*
        Each image starts at its half's left edge, as drawn on tablet and desktop; centred, Tales sat 49 px and Echoes
        77 px in from it at 1440.
      */
      &>.illustration>img {
        inline-size: min(100%, var(--art) / 507 * 100%);
        margin-inline: 0 auto;
      }
      &>.description {
        margin-inline: 0;
        &>h2 {
          margin-block-start: 0;
        }
        /* The pill's 4 px shadow gutter hangs outside the text edge, so its visible edge lines up with the copy. */
        &>.pill {
          margin-inline: calc(-4rem / 16) 0;
        }
      }
      &:nth-of-type(even) {
        flex-direction: row-reverse;
      }
      &>.side-wave {
        display: none;
      }
    }
  }
  & #tales-for-safer-trails-project {
    --gap: 99;
    /* Drawn 249: its tip met our full-measure copy ("young", "old.") from 328 to 480 in Safari; clear at 174. */
    --rise: 174;
    --art: 409;
    @media(width>=40rem) {
      margin-block-start: calc(120rem / 16 + 124 * var(--grow));
    }
  }
  & #menume-meal-planning-app-project {
    --gap: 48;
    --rise: 312;
    --art: 476;
  }
  & #scotties-skating-and-skiing-shop-project {
    --gap: -12;
    --rise: 75;
    --art: 533;
  }
  & #matcha-delight-japanese-bakery-project {
    --gap: 49;
    --rise: 167;
    --art: 510;
  }
  & #echoes-of-tradition-surrealist-poster-project {
    --gap: 38;
    --rise: 36;
    --art: 353;
  }
  & #youth-in-limbo-photography-project {
    --gap: 43;
    --rise: 373;
    --art: 441;
  }
  /*
    The footer wave rises behind the credits: 65 of its 390 drawn px on phones, 9 % of its width wider. Below 390 it
    rises less than its share, keeping about 10 px under the credits as at 390 (at 320 it touched them).
  */
  & .footer-wave {
    margin-block-start: calc(-65 / 390 * 100% - 42 * min(var(--phone-art-grow), 0rem));
    @media(width>=40rem) {
      margin-block-start: -9%;
    }
  }
}

/*
  Case studies: one shell for all three. One column (34 px gutters on phones, 65 to 177 px wide, at most 1086 px),
  one type scale (body 15 px on phones, 14 to 16 px wide, at line height 2), one prose measure and one set of gaps.
  Page colours are tokens; each page's drawings (bands, dividers, glyphs, compositions) come after the shell.
*/
.case-study {
  --color-case-study-text: #1e1e1e;
  --color-case-study-accent: #994198;
  --color-case-study-heading: var(--color-case-study-accent);
  --color-case-study-subheading: var(--color-case-study-text);
  --color-case-study-subtitle: var(--color-case-study-accent);
  --color-case-study-secondary: #f0de83;
  --color-case-study-note: #f3e499;
  --color-case-study-corner-base: #d8d8d7;
  --color-case-study-header-text: var(--color-page-background);
  --color-case-study-prototype-background: var(--color-case-study-secondary);
  --color-case-study-prototype-text: var(--color-case-study-accent);
  --color-case-study-secondary-prototype-background: var(--color-case-study-secondary);
  --color-case-study-secondary-prototype-text: var(--color-case-study-accent);
  --case-study-corner-accent-mask: url("assets/case-study-phone-corner-accent-mask.svg");
  --case-study-corner-base-mask: url("assets/case-study-phone-corner-base-mask.svg");
  --gutter: calc(34rem / 16);
  --column: min(100% - 2 * var(--gutter), var(--column-max));
  @media(width>=40rem) {
    --gutter: calc(65rem / 16 + 112 * var(--grow));
    --case-study-corner-accent-mask: url("assets/case-study-wide-corner-accent-mask.svg");
    --case-study-corner-base-mask: url("assets/case-study-wide-corner-base-mask.svg");
  }
  &[data-case-study="menume"] {
    --color-case-study-accent: #60b5bf;
    --color-case-study-heading: #f89e3f;
    --color-case-study-subheading: var(--color-case-study-heading);
    --color-case-study-secondary: #f5cb5c;
    --color-case-study-note: var(--color-page-background);
    --color-case-study-corner-base: #ebe4d9;
    --color-case-study-prototype-background: var(--color-case-study-accent);
    --color-case-study-prototype-text: var(--color-page-background);
    --color-case-study-secondary-prototype-background: var(--color-case-study-heading);
    --color-case-study-secondary-prototype-text: var(--color-page-background);
    --case-study-prototype-hover-chroma: 0.123646;
    --case-study-secondary-prototype-hover-chroma: 0.168313;
    --color-case-study-wireframe-frame: #474e32;
    --preview-desktop: 438;
    --summary-bullet: "•" / "";
    --summary-bullet-indent: 1rem;
  }
  &[data-case-study="scotties"] {
    --color-case-study-accent: #bdca9d;
    --color-case-study-heading: #fc6529;
    --color-case-study-subheading: #474e32;
    --color-case-study-subtitle: var(--color-case-study-subheading);
    --color-case-study-secondary: #eae4d9;
    --color-case-study-note: var(--color-page-background);
    --color-case-study-corner-base: #ebe4d9;
    --color-case-study-header-text: var(--color-case-study-heading);
    --color-case-study-prototype-text: var(--color-case-study-heading);
    --color-case-study-secondary-prototype-text: var(--color-case-study-subheading);
    --summary-bullet: "•" / "";
    --summary-bullet-indent: 1rem;
    --preview: 280;
    --preview-desktop: 551;
    /* The phone design sets the Scotties column 20 px from each edge (the others 34); its pillars are drawn on it. */
    @media(width<40rem) {
      --gutter: calc(20rem / 16);
    }
  }
  /* Every case-study design tracks its text at -1.9 %, except the navigation and the prototype links. */
  & .content {
    padding-block-start: calc(178rem / 16 + 216 * var(--grow));
    color: var(--color-case-study-text);
    font-family: "Playfair Display", serif;
    /* 15 px at 390 easing to 14 px at 744 (no step at the tablet layout), 16 px at 1440; always line height 2. */
    font-size: calc(15rem / 16 - var(--phone-grow) + 2 * var(--grow));
    font-weight: 500;
    line-height: round(nearest, 2em, 1px);
    letter-spacing: -0.019em;
    text-align: center;
    & :is(#portfolio-primary-navigation, .prototype-link) {
      letter-spacing: normal;
    }
  }
  & :is(h2, h3, h4, p, ul, ol, figure, blockquote) {
    margin-block: 0;
  }
  & .top-corner-decorations {
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    aspect-ratio: 390 / 123;
    &>span {
      position: absolute;
      inset: 0;
      background-color: var(--color-case-study-accent);
      mask-image: var(--case-study-corner-accent-mask);
      mask-size: 100% 100%;
      &:nth-child(2) {
        background-color: var(--color-case-study-corner-base);
        mask-image: var(--case-study-corner-base-mask);
      }
    }
    &>img {
      position: relative;
      inline-size: 100%;
    }
    @media(width>=40rem) {
      aspect-ratio: auto;
      block-size: calc(134rem / 16 + 160 * var(--grow));
      &>img {
        display: none;
      }
    }
  }
  /* The column every block of the page shares. */
  & :is(.project-introduction, .section-navigation, .section-content) {
    inline-size: var(--column);
    margin-inline: auto;
  }

  /* Hero: the preview over the summary, then side by side on desktops, the summary from the column's middle. */
  & .project-introduction {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(18rem / 16 + 30 * var(--grow));
    &>.project-preview {
      /* The phone and tablet designs draw it --preview px wide (240, Scotties 280), 438 by 1440. */
      inline-size: min(100%, calc(var(--preview, 240) * 1rem / 16 + (438 - var(--preview, 240)) * var(--grow)));
    }
    @media(width>=80rem) {
      /*
        The summary from about the column's middle (the designs: 555 of 1086), wide enough for each subtitle's one
        line; the art at its desktop drawing's share of its side (--preview-desktop px: Tales 422, MenuMe 438,
        Scotties 551).
      */
      flex-direction: row;
      align-items: start;
      column-gap: 0;
      &>.project-preview {
        flex: 0 0 calc(525 / 1086 * 100%);
        inline-size: auto;
        margin-inline: 0;
        &>button:not([popover]) {
          inline-size: min(100%, var(--preview-desktop, 422) / 525 * 100%);
        }
      }
      &>.project-summary {
        flex: 1 1 0;
        min-inline-size: 0;
      }
    }
  }
  & .project-summary {
    max-inline-size: calc(561rem / 16);
    &>h1 {
      color: var(--color-case-study-heading);
      font-size: calc(24rem / 16 + 6 * var(--grow));
      line-height: round(nearest, 34rem / 16 + 6 * var(--grow), 1px);
    }
    /* The phone designs break the subtitle into two lines of about 16 em; wider, it runs on one. */
    &>h2 {
      margin-block: calc(5rem / 16) 1rem;
      margin-inline: auto;
      color: var(--color-case-study-subtitle);
      font-size: calc(18rem / 16 + 4 * var(--grow));
      line-height: round(nearest, 1.5em, 1px);
      @media(width<40rem) {
        max-inline-size: 16em;
      }
    }
    /*
      The facts read as one block, each entry on its own line with its label bold, left-aligned in a centred box;
      bulleted on desktop where the page sets a bullet.
    */
    &>p {
      max-inline-size: 34em;
      margin-block: 0;
      margin-inline: auto;
      text-align: start;
      &>strong {
        font-weight: 700;
      }
      &:last-of-type {
        margin-block-end: calc(16rem / 16 + 8 * var(--grow));
      }
    }
    &>.flex-row {
      gap: calc(13rem / 16);
      &>* {
        flex: none;
        margin-inline: 0;
      }
    }
    @media(width>=80rem) {
      text-align: start;
      &>:is(h2, p) {
        margin-inline: 0;
      }
      &>h2 {
        max-inline-size: none;
      }
      &>p {
        position: relative;
        padding-inline-start: var(--summary-bullet-indent, 0px);
        &::before {
          content: var(--summary-bullet, none);
          position: absolute;
          inset-inline-start: calc(3rem / 16);
        }
      }
      &>.flex-row {
        justify-content: start;
      }
    }
  }
  & .project-divider {
    block-size: calc(16rem / 16 + 16 * var(--grow));
    margin-block-start: calc(48rem / 16 + 112 * var(--grow));
    background-color: var(--color-case-study-accent);
    border-block: calc(2rem / 16) dashed var(--color-case-study-secondary);
  }
  & .section-navigation {
    max-inline-size: calc(580rem / 16);
    margin-block: calc(80rem / 16 + 40 * var(--grow));
    &>h2 {
      color: var(--color-case-study-heading);
      font-family: "Abril Fatface", serif;
      font-size: calc(24rem / 16 + 6 * var(--grow));
      font-weight: 400;
      line-height: round(nearest, 34rem / 16 + 6 * var(--grow), 1px);
    }
    /* 32 px rows on phones and tablets, 55 px on desktops, each a 48 px target or more. */
    &>ul {
      inline-size: fit-content;
      margin-block-start: calc(2rem + 26 * var(--grow));
      margin-inline: auto;
      padding-inline-start: 1rem;
      font-size: calc(1rem + 6 * var(--grow));
      font-weight: 700;
      text-align: start;
      &>li>a {
        display: flex;
        align-items: center;
        min-block-size: calc(2rem + 23 * var(--grow));
        color: inherit;
        text-decoration: none;
        &:hover {
          color: var(--color-case-study-heading);
          text-decoration: underline;
        }
      }
    }
  }

  /* Sections: a one-line band spanning the window, its heading on the 1440 measure past 1440. */
  & .section>h2 {
    padding-block: calc(24rem / 16 + 27 * var(--grow));
    padding-inline: calc(1rem + max(0rem, (100% - 1440rem / 16) / 2));
    background-color: var(--color-case-study-accent);
    border-block: calc(2rem / 16) dashed var(--color-case-study-secondary);
    color: var(--color-case-study-header-text);
    font-family: "Abril Fatface", serif;
    font-size: calc(24rem / 16 + 6 * var(--grow));
    font-weight: 400;
    line-height: round(nearest, 34rem / 16 + 6 * var(--grow), 1px);
  }
  & .section-content {
    padding-block: calc(64rem / 16 + 56 * var(--grow));
    text-align: start;
    /* Prose keeps a 61 em measure (the desktop designs' 976 px at 16 px), centred in the column. */
    &>:is(p, ul, ol),
    &>.subsection>:is(p, ul, ol) {
      max-inline-size: 61em;
      margin-inline: auto;
    }
  }
  & .paragraph {
    margin-block: 1em;
  }
  & .note-list {
    padding-inline-start: 0;
    /* A string marker keeps the list role for VoiceOver, which list-style: none drops in WebKit. */
    list-style: "• " inside;
    &>li {
      margin-block: 1em;
    }
  }
  /* Subheadings keep the body's line box (2 em of the body size), which the designs' gaps were measured on. */
  & h3.subheading {
    margin-block-end: calc(2rem + 8 * var(--grow));
    color: var(--color-case-study-subheading);
    font-size: calc(18rem / 16 + 4 * var(--grow));
    font-weight: 700;
    text-align: center;
    /* Over text, a gap of about one line. */
    &:has(+ :is(p, ul, ol)) {
      margin-block-end: calc(1rem + 8 * var(--grow));
      &+* {
        margin-block-start: 0;
      }
    }
  }
  & :is(h4.subheading, .card-title) {
    margin-block: 1rem;
    color: var(--color-case-study-subheading);
    font-size: calc(16rem / 16 + 2 * var(--grow));
    font-weight: 700;
  }
  & .subsection {
    margin-block-start: calc(70rem / 16 + 60 * var(--grow));
  }
  & .flex-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    &>* {
      flex: 1 1 calc(240rem / 16);
      min-inline-size: 0;
    }
  }
  /* Tales' story pillars: a row of narrow columns, centred, their names a step under the card titles. */
  & .story-pillars {
    align-items: start;
    text-align: center;
    & h4 {
      font-size: calc(15rem / 16 - var(--phone-grow) + 2 * var(--grow));
    }
    &>* {
      flex-basis: calc(160rem / 16);
    }
  }
  /* Boxed text: the phone designs set it at 14 px where running prose is 15. */
  & .note {
    box-sizing: border-box;
    padding: 2rem;
    background-color: var(--color-case-study-note);
    border: calc(1rem / 16) solid var(--color-case-study-accent);
    border-radius: 1rem;
    @media(width<40rem) {
      font-size: calc(14rem / 16);
      line-height: round(nearest, 2em, 1px);
    }
  }
  & .persona {
    max-inline-size: calc(450rem / 16);
    text-align: start;
  }
  & .alternating-personas {
    max-inline-size: calc(850rem / 16);
    margin-inline: auto;
    &>.flex-row {
      margin-block-start: 3rem;
      &:nth-child(even) {
        flex-direction: row-reverse;
      }
    }
  }

  /* Artwork: each role caps its size; every picture opens full size in a popover. */
  & .zoomable-artwork {
    max-inline-size: calc(980rem / 16);
    margin-block: 2rem;
    margin-inline: auto;
    &>button:not([popover]) {
      display: block;
      inline-size: 100%;
      min-inline-size: 3rem;
      min-block-size: 3rem;
      cursor: zoom-in;
      & img {
        inline-size: 100%;
      }
    }
  }
  & .persona-photograph {
    max-inline-size: calc(320rem / 16);
  }
  & .small-illustration {
    max-inline-size: calc(180rem / 16 + 60 * var(--grow));
  }
  & .wordmark {
    max-inline-size: calc(658rem / 16);
  }
  & .portrait-artwork {
    max-inline-size: calc(400rem / 16);
  }
  & .enlarged-artwork {
    box-sizing: border-box;
    inset: 1rem;
    inline-size: calc(100% - 2rem);
    block-size: calc(100% - 2rem);
    max-inline-size: none;
    max-block-size: none;
    padding: 1rem;
    /* Browsers give every popover a solid canvas-text border. */
    border-width: 0;
    overflow: auto;
    overscroll-behavior: contain;
    background-color: var(--color-page-background);
    /* The dialog takes focus on open, so Space and Page Down scroll it; the image is the close button. */
    &>button {
      display: block;
      inline-size: 100%;
      cursor: zoom-out;
      &::before {
        content: "×";
        position: sticky;
        inset-block-start: 0;
        inset-inline-start: 0;
        display: block;
        inline-size: 3rem;
        block-size: 3rem;
        background-color: var(--color-page-background);
        color: var(--color-body-purple);
        font-size: 2rem;
        line-height: 3rem;
      }
      & img:not([src$=".png"], [src$=".webp"], [src$=".gif"]) {
        inline-size: auto;
        min-inline-size: 100%;
      }
      /* Bitmaps open at their width attribute, the size the design shows them at; wider only blurs them. */
      & img:is([src$=".png"], [src$=".webp"], [src$=".gif"]) {
        margin-inline: auto;
      }
      & .device-with-screen-recording {
        inline-size: fit-content;
        margin-inline: auto;
      }
    }
    &::backdrop {
      background-color: oklch(from var(--color-body-purple) l c h / 75%);
    }
  }
  /*
    A device mockup with a recording on its screen (the Tales laptop: the recording covers 2960 by 1974 px from
    355, 68 of the 3669 by 2289 file). With reduced motion the recording is hidden and the still screen shows.
  */
  & .device-with-screen-recording {
    display: block;
    position: relative;
    &>img.device-frame {
      position: relative;
    }
  }
  & :is(.zoomable-artwork, .enlarged-artwork) .device-with-screen-recording>img.screen-recording {
    position: absolute;
    inset-block-start: calc(68 / 2289 * 100%);
    inset-inline-start: calc(355 / 3669 * 100%);
    inline-size: calc(2960 / 3669 * 100%);
    block-size: calc(1974 / 2289 * 100%);
    margin: 0;
    @media(prefers-reduced-motion:reduce) {
      display: none;
    }
  }
  /*
    The Tales phone: the client's recording plays under the see-through frame (screen 1056 by 2348 px from 50, 27
    of the 1158 by 2421 frame), clipped to the screen's 132 px corners.
  */
  & :is(.zoomable-artwork, .enlarged-artwork) .device-with-screen-recording>picture.screen-recording {
    position: absolute;
    inset-block-start: calc(27 / 2421 * 100%);
    inset-inline-start: calc(50 / 1158 * 100%);
    inline-size: calc(1056 / 1158 * 100%);
    block-size: calc(2348 / 2421 * 100%);
    overflow: hidden;
    border-radius: calc(132 / 1056 * 100%) / calc(132 / 2348 * 100%);
    &>img {
      inline-size: 100%;
      block-size: 100%;
      object-fit: cover;
    }
  }

  /* Prototype links: a 31 px pill (42 on desktops, about 250 px wide), with a 48 px target. */
  & .prototype-link {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    min-inline-size: 3rem;
    max-inline-size: max-content;
    margin-inline: auto;
    padding-block: calc(7rem / 16 + 4 * var(--grow));
    padding-inline: calc(16rem / 16 + 2 * var(--grow));
    border-radius: 3rem;
    background-color: var(--color-case-study-prototype-background);
    box-shadow: 0 calc(4rem / 16) calc(4rem / 16) rgb(0 0 0 / 25%);
    color: var(--color-case-study-prototype-text);
    font-family: "Abril Fatface", serif;
    font-weight: 400;
    line-height: round(nearest, 17rem / 16 + 3 * var(--grow), 1px);
    text-align: center;
    text-decoration: none;
    @media(width>=80rem) {
      min-inline-size: calc(3rem + 202 * var(--grow));
    }
    &::after {
      content: "";
      position: absolute;
      inset-block: calc(50% - 1.5rem);
      inset-inline: 0;
    }
    /* The client, on Tales (CF101) and Scotties (CF105, CF106): text and background swap on hover. */
    &:hover {
      background-color: var(--color-case-study-prototype-text);
      color: var(--color-case-study-prototype-background);
    }
    /* MenuMe's pills keep their colours and deepen on hover. */
    .case-study[data-case-study="menume"] &:hover {
      background-color: oklch(from var(--color-case-study-prototype-background) l var(--case-study-prototype-hover-chroma) h);
      color: var(--color-case-study-prototype-text);
    }
  }
  & .secondary-prototype-link {
    --color-case-study-prototype-background: var(--color-case-study-secondary-prototype-background);
    --color-case-study-prototype-text: var(--color-case-study-secondary-prototype-text);
    --case-study-prototype-hover-chroma: var(--case-study-secondary-prototype-hover-chroma);
  }
  /*
    The closing quote lines up with the content just above it: the column where that content fills it, otherwise the
    same box, written with that content's own rules (Tales: the impact strip; MenuMe on desktop: the two learning
    boxes, 52 to 1032 of 1086; Scotties on desktop: the two learning boxes, 74 to 1086 of 1086). Its text wraps
    naturally, centred; closing-quote-fit.mjs then sets each line's letter and word spacing so every full line reaches
    both edges. A blockquote's own 40 px side margins would otherwise inset it.
  */
  & .closing-reflection {
    margin-block-start: calc(80rem / 16);
    margin-inline: 0;
    color: var(--color-case-study-subtitle);
    font-size: calc(1rem + 2 * var(--grow));
    font-weight: 700;
    text-align: center;
    & .closing-reflection-line {
      display: block;
      white-space: nowrap;
    }
    & .closing-reflection-probe {
      position: absolute;
      visibility: hidden;
      white-space: nowrap;
    }
    .case-study[data-case-study="tales"] & {
      inline-size: var(--strip);
      margin-inline: calc((100% - var(--strip)) / 2);
    }
    @media(width>=80rem) {
      .case-study[data-case-study="menume"] & {
        margin-inline: calc(5200% / 1086) calc(5400% / 1086);
      }
      .case-study[data-case-study="scotties"] & {
        margin-inline: calc(100% * 74 / 1086) 0;
      }
    }
  }
  /* The case-study footer wave is gray; it rises behind the credits as on Home. */
  &>.site-footer {
    margin-block-start: calc(110rem / 16);
    /* Below 390 it rises less than its share, keeping about 10 px under the credits (it touched them at 320). */
    &>.footer-wave {
      margin-block-start: calc(-65rem / 16 - 105 * min(var(--phone-art-grow), 0rem));
      & img {
        filter: brightness(0) invert(calc(217 / 255));
      }
      @media(width>=40rem) {
        margin-block-start: -9.7%;
      }
    }
  }
}

/*
  Scotties' drawings, ported from the old styles.css (2026-10-25) unchanged except for variable names: the challenge
  cloud and its shaped text floats, the positioning note, the persona plates and grid, the core-value pillars and
  their chevron trails, the sitemap tree and its chevron cluster, the lo-fi and hi-fi wireframe compositions with
  their connectors, the learning badges, the bands' chevrons and the divider tile. Each keeps the client fixes
  recorded in its comments (CF74, CF75, CF77, CF78, CF85, CF107, CF108, CF114, CF118, CF119, CF121); the shared
  sitemap tree and shaped-note bases came with them. Simplified rule by rule as the shell covers them.
*/
.case-study {
  &:is([data-case-study="menume"], [data-case-study="scotties"]) .flex-row:has(>article):not(:has(>figure)) {
    align-items: start;
  }
  & .spiral-notepad,
  & .play-speech-bubble,
  & .trust-speech-bubble,
  & .scotties-challenge-bubble {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-width: 0;
    border-radius: 0;
    background-color: transparent;
    background-size: 100% 100%;
    /* Scale copy with the artwork's 322px phone layout width. */
    padding-block: 0;
    padding-inline: 0;
    text-align: center;
    &>* {
      margin-inline: 13% 21%;
      line-height: round(nearest, 1.6em, 1px);
    }
    &>h4 {
      margin-block: 0;
      font-size: min(
        calc(1em + 2rem / 16),
        calc(16 * 100cqi / 322)
      );
    }
    &>p {
      margin-block-start: 1em;
      margin-block-end: 0;
      font-size: min(1em, calc(14 * 100cqi / 322));
    }
  }
  & .scotties-challenge-bubble {
    aspect-ratio: 551 / 449;
    max-inline-size: calc(551rem / 16);
    margin-inline: auto;
    background-image: url("assets/scotties-core-challenge-speech-bubble.svg");
    &>p {
      margin-block: 20%;
      margin-inline: 21%;
      font-size: min(1em, calc(12 * 100cqi / 322));
    }
  }
  & .scotties-positioning-note {
    max-inline-size: calc(451rem / 16);
    margin-inline: auto;
    /*
      Every design strokes this box 5 px inside with 20 px dashes and 20 px gaps (fig "Rectangle 65", dashPattern
      [20, 20]); a dashed border cannot set its dash length. The outline draws a 10 px stroke on the box's edge,
      whose outer half the box clips, over the border's 5 px of room.
    */
    border: calc(5rem / 16) solid transparent;
    border-radius: calc(50rem / 16);
    background: url("assets/scotties-positioning-note-dashed-outline.svg") border-box, var(--color-case-study-secondary)
      border-box;
    text-align: center;
  }
  /* Case study sitemaps: one nested-list tree shared by the Scotties and MenuMe sitemap figures. */
  &[data-case-study="menume"] {
    --color-case-study-sitemap-root: #98cfd5;
    --color-case-study-sitemap-branch: #fab66f;
    --color-case-study-sitemap-leaf: #efd99d;
    --color-case-study-sitemap-line: #3f968e;
    --case-study-sitemap-line-width: calc(1rem / 16);
    --case-study-sitemap-box-radius: calc(2rem / 16);
  }
  &[data-case-study="scotties"] {
    --color-case-study-sitemap-root: #eb996e;
    --color-case-study-sitemap-branch: var(--color-case-study-accent);
    --color-case-study-sitemap-leaf: var(--color-case-study-secondary);
    --color-case-study-sitemap-line: var(--color-case-study-subheading);
    --case-study-sitemap-line-width: calc(2rem / 16);
    --case-study-sitemap-box-radius: calc(10rem / 16);
  }
  & .sitemap {
    --case-study-sitemap-gap: calc(16rem / 16);
    --case-study-sitemap-trunk: calc(12rem / 16);
    --case-study-sitemap-indent: calc(16rem / 16);
    --case-study-sitemap-column-padding: calc(6rem / 16);
    margin-block: 2rem;
    margin-inline: 0;
    /*
      The client (CF93): "sitemap的字尺寸保持与正文文字一样大吧" (keep the sitemap text the same size as the body
      text). Bold letters run wider than the body's Medium at one size, so the labels sit at 0.98 of the body
      text: there a label word measures the body's width by pixel count in Safari 17.5 at 1x and 2x ("Menu
      Planner" 174 px in both at 790 to 838 px, 2x). Desktop sets its own sizes from 1280 px.
    */
    font-size: 0.98em;
    font-weight: 700;
    line-height: calc(20rem / 16);
    & ul {
      margin-block: 0;
      margin-inline: 0;
      padding-block: 0;
      padding-inline: 0;
      list-style: none;
    }
    /*
      Phones and narrow tablets (below 52rem, where the side-by-side tree would wrap its labels): the tree sits
      centred in the column as one block, keeping its indents (the client, CF125:
      "这个sitmap是不是无法居中？", can't this sitemap be centred?; the phone designs centre the sitemap too).
    */
    @media(width<52rem) {
      &>ul {
        inline-size: fit-content;
        margin-inline: auto;
      }
    }
    & span {
      position: relative;
      display: block;
      box-sizing: border-box;
      inline-size: fit-content;
      max-inline-size: 100%;
      padding-block: calc(8rem / 16);
      padding-inline: calc(12rem / 16);
      border-radius: var(--case-study-sitemap-box-radius);
      background-color: var(--color-case-study-sitemap-leaf);
      text-align: center;
    }
    &>ul>li>span {
      background-color: var(--color-case-study-sitemap-root);
    }
    &>ul>li>ul>li>span {
      background-color: var(--color-case-study-sitemap-branch);
    }
    & ul ul {
      margin-inline-start: var(--case-study-sitemap-trunk);
      &>li {
        position: relative;
        padding-block-start: var(--case-study-sitemap-gap);
        padding-inline-start: var(--case-study-sitemap-indent);
        &:where(:not(:last-child))::before {
          content: "";
          position: absolute;
          inset-block: 0;
          inset-inline-start: 0;
          border-inline-start: var(--case-study-sitemap-line-width) solid var(--color-case-study-sitemap-line);
        }
        &>span::before {
          content: "";
          position: absolute;
          inset-block: calc(-1 * var(--case-study-sitemap-gap)) calc(50% - var(--case-study-sitemap-line-width) / 2);
          inset-inline-end: 100%;
          box-sizing: border-box;
          inline-size: var(--case-study-sitemap-indent);
          border-block-end: var(--case-study-sitemap-line-width) solid var(--color-case-study-sitemap-line);
        }
        &:last-child>span::before {
          border-inline-start: var(--case-study-sitemap-line-width) solid var(--color-case-study-sitemap-line);
        }
        &>span::after {
          content: "";
          position: absolute;
          inset-block-start: 50%;
          inset-inline-end: 100%;
          translate: 0 -50%;
          border-block: calc(5rem / 16) solid transparent;
          border-inline-start: calc(8rem / 16) solid var(--color-case-study-sitemap-line);
        }
      }
    }
  }
  @media(width>=52rem) {
    /* Wide enough for the side-by-side tree with every label on one line (measured: Scotties from 784 px, MenuMe 808). */
    & .sitemap span {
      white-space: nowrap;
    }
    & .sitemap>ul>li {
      display: flex;
      flex-direction: column;
      align-items: center;
      &>span::before {
        content: "";
        position: absolute;
        inset-block-start: 100%;
        inset-inline-start: 50%;
        block-size: var(--case-study-sitemap-gap);
        border-inline-start: var(--case-study-sitemap-line-width) solid var(--color-case-study-sitemap-line);
      }
      &>ul {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        margin-inline: 0;
        padding-block-start: var(--case-study-sitemap-gap);
        &>li {
          padding-block-start: var(--case-study-sitemap-gap);
          padding-inline: var(--case-study-sitemap-column-padding);
          &::before {
            display: none;
          }
          &::after {
            content: "";
            position: absolute;
            inset-block-start: 0;
            inset-inline: 0;
            border-block-start: var(--case-study-sitemap-line-width) solid var(--color-case-study-sitemap-line);
          }
          &:first-child::after {
            inset-inline-start: calc(var(--case-study-sitemap-column-padding) + var(--case-study-sitemap-trunk));
          }
          &:last-child::after {
            inset-inline-end: calc(
              100% - var(--case-study-sitemap-column-padding) - var(--case-study-sitemap-trunk)
              - var(--case-study-sitemap-line-width)
            );
          }
          &>span::before {
            inset-block: calc(-1 * var(--case-study-sitemap-gap)) 100%;
            inset-inline: var(--case-study-sitemap-trunk) auto;
            inline-size: 0;
            border-inline-start: var(--case-study-sitemap-line-width) solid var(--color-case-study-sitemap-line);
            border-block-end: 0;
          }
          &>span::after {
            inset-block: auto 100%;
            inset-inline: calc(var(--case-study-sitemap-trunk) - 5rem / 16 + var(--case-study-sitemap-line-width) / 2) auto;
            translate: none;
            border-inline: calc(5rem / 16) solid transparent;
            border-block-start: calc(8rem / 16) solid var(--color-case-study-sitemap-line);
            border-block-end: 0;
          }
        }
      }
    }
  }
  &[data-case-study="scotties"] {
    /* The positioning and value-pillar notes stay Medium on every width; their lead phrase is Bold 15, 16 and 18. */
    &>.content :is(.scotties-positioning-note, .small-illustration~.flex-row>article)>p {
      font-weight: 500;
      &>span {
        font-size: calc(15rem / 16 + var(--phone-grow) + 2 * var(--grow));
        font-weight: 700;
      }
    }
    /* All three designs set the two Visual Strategy subsection headings in Abril Fatface, not Playfair Bold. */
    &>.content>:where(#scotties-visual-strategy)>.section-content>.subsection>h3 {
      font-family: "Abril Fatface", serif;
      font-weight: 400;
    }
    @media(width>=40rem) and (width<80rem) {
      /*
        Tablet Scotties draws the type panel 620 px wide, its "Body Text" label at 16 px over 14 px body copy. Grown
        with the column it reached 976 px in a 1280 Safari window, the label about 25 px; like the Tales charts, the
        panel keeps its drawn size in wider columns until the desktop art takes over.
      */
      &>.content .subsection>figure:has(img[src*="type-specimens"]) {
        max-inline-size: calc(620rem / 16);
        margin-inline: auto;
      }
    }
    /* Desktop Scotties draws the type panel across the whole column. */
    @media(width>=80rem) {
      &>.content .subsection>figure:has(img[src*="type-specimens"]) {
        max-inline-size: none;
      }
    }
    /* The phone design sets the Scotties column 20 px from each edge (Phone/Scotties.png), where the others use 34. */
    @media(width<40rem) {
      /*
        The phone design centres each persona: a 222 px photo with its plate 14 px up and to the start, and the
        name, role and description centred below (Phone/Scotties.pdf).
      */
      &>.content .persona {
        --persona-unit: calc(1rem / 16 + var(--phone-art-grow));
        /* One persona per row: from 552 px two fit the row's 240 px basis, and their grown photos overflowed it. */
        flex-basis: 100%;
        text-align: center;
        &>.persona-photograph {
          inline-size: calc(222 * var(--persona-unit));
          margin-block-end: calc(22 * var(--persona-unit));
          margin-inline: auto;
          translate: calc(7 * var(--persona-unit)) 0;
          &::before {
            inset: calc(-14 * var(--persona-unit)) calc(14 * var(--persona-unit)) calc(14 * var(--persona-unit))
              calc(-14 * var(--persona-unit));
          }
        }
        &>h4 {
          margin-block-end: 0;
          line-height: round(nearest, 32 * var(--persona-unit), 1px);
        }
        &>p {
          max-inline-size: calc(285 * var(--persona-unit));
          margin-block-start: 0;
          margin-inline: auto;
        }
      }
    }
    /*
      The tablet design centres Jake alone, then Gwen and Jonathan side by side, the photos 222 by 279 px as on
      phones, their centres 304.5 px apart, and the text centred in 285 px boxes; the desktop sets all three in a
      row, photos 245 by 308, 359.5 px apart, the names centred over left-aligned descriptions (Scotties.pdf).
    */
    @media(width>=40rem) {
      &>.content .flex-row:has(>.persona) {
        align-items: start;
        gap: calc(27rem / 16) calc(19.5rem / 16 + 55 * var(--grow));
        /* 285 px columns on tablets; on desktops a 310 px measure, the widest the design draws (Gwen's two lines). */
        &>.persona {
          flex: 0 1 calc(285rem / 16);
          @media(width>=80rem) {
            flex-basis: calc(310rem / 16);
          }
        }
        /* Its side margins fill the line, so Jake has the first row to himself on tablets. */
        &>.persona:first-child {
          margin-inline: calc((100% - min(100%, 285rem / 16)) / 2);
          @media(width>=64rem) {
            margin-inline: 0;
          }
        }
      }
      &>.content .persona {
        max-inline-size: none;
        text-align: center;
        &>.persona-photograph {
          inline-size: calc(222rem / 16 + 23 * var(--grow));
          max-inline-size: none;
          margin-block-end: calc(22rem / 16);
          margin-inline: auto;
          translate: calc(7rem / 16 + 1 * var(--grow)) 0;
          &::before {
            inset: calc(-14rem / 16 - 1.5 * var(--grow)) calc(14rem / 16 + 1.5 * var(--grow)) calc(14rem / 16 + 1.5 * var(--grow))
              calc(-14rem / 16 - 1.5 * var(--grow));
          }
        }
        &>h4 {
          margin-block-end: 0;
          line-height: round(nearest, 2em, 1px);
        }
        &>p {
          margin-block-start: 0;
          @media(width>=64rem) {
            text-align: start;
          }
        }
      }
    }
    /*
      The tablet design sets the three pillars around the skateboard: Excitement top right, Confidence left, and
      Belonging bottom right, each tied to the board by a pale chevron trail, with Confidence's name running into
      its text. Lengths are the design's pixels on its 624 px column (Tablet/Scotties.pdf), scaled to the column.
    */
    @media(width>=40rem) {
      &>.content .subsection:has(>.small-illustration+.flex-row>article) {
        /* A container, so the unit follows the column; the wide growth is then restated against the viewport. */
        --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
        --u: calc(100cqw / 624);
        container-type: inline-size;
        display: grid;
        &>.small-illustration,
        &>.flex-row>article {
          grid-area: 3 / 1;
          align-self: start;
          justify-self: start;
        }
        &>.small-illustration {
          position: relative;
          inline-size: calc(146 * var(--u));
          max-inline-size: none;
          margin-block: calc(91 * var(--u)) 0;
          margin-inline: calc(233 * var(--u)) 0;
          &::after {
            content: "";
            position: absolute;
            inset-block-start: calc(-20 * var(--u));
            inset-inline-start: calc(-43 * var(--u));
            inline-size: calc(221 * var(--u));
            block-size: calc(256 * var(--u));
            background: url("assets/scotties-tablet-core-value-chevron-trails.svg") center / 100% 100% no-repeat;
            pointer-events: none;
          }
        }
        &>.flex-row {
          display: contents;
          &>article {
            margin-block: 0;
            &::before {
              content: none;
            }
            &>p {
              margin-block: 0;
              &>span {
                display: block;
              }
            }
            /*
              Below the 744 design width the copy shrinks with its column, so it keeps the 744 lines; at 14 px it
              gained a line from 704 down and the trails ran into it (in Safari at 672 the Confidence trail met
              "trusted"). From 744 up the shared sizes apply as before; desktop sets its own lines.
            */
            @media(width<80rem) {
              &>p {
                font-size: min(calc(14rem / 16 + 2 * var(--grow)), calc(14 * var(--u)));
                line-height: round(nearest, 2em, 1px);
                &>span {
                  font-size: min(
                    calc(15rem / 16 + var(--phone-grow) + 2 * var(--grow)),
                    calc(16 * var(--u))
                  );
                }
              }
            }
          }
          /* Tree order is Confidence, Belonging, Excitement. */
          &>article:nth-child(1) {
            inline-size: calc(186 * var(--u));
            margin-block-start: calc(155 * var(--u));
            margin-inline-start: calc(6 * var(--u));
            /*
              Its box ends about where its trail starts, so above 744, where the column outgrows the copy, a full
              line reached the trail (Safari: "...feel assured" 4 px from it at 900). The copy keeps 1 rem off that
              end, never narrower than its 744 measure in ems, so 744 and below are unchanged.
            */
            @media(width<80rem) {
              &>p {
                max-inline-size: max(calc(186 * var(--u) - 1rem), calc(186em / 14));
              }
            }
          }
          &>article:nth-child(2) {
            inline-size: calc(209 * var(--u));
            margin-block-start: calc(296 * var(--u));
            margin-inline-start: calc(369 * var(--u));
          }
          &>article:nth-child(3) {
            inline-size: calc(193 * var(--u));
            margin-block-start: calc(23 * var(--u));
            margin-inline-start: calc(427 * var(--u));
          }
        }
        /*
          The desktop composition from 1280 px, on its 1086 px column (Desktop/Scotties.pdf): the same three around
          a 247 px board, each name on its own line. Its trails are rasters of the tablet chevron, scaled 1.692, laid
          out differently: each trail ends about 21 px from its text.
        */
        @media(width>=80rem) {
          --u: calc(100cqw / 1086);
          &>.small-illustration {
            inline-size: calc(247 * var(--u));
            margin-block-start: calc(103 * var(--u));
            margin-inline-start: calc(430 * var(--u));
            /*
              The client (CF114): "箭头根部与右边的文字距离有点宽" (the trail's root is a bit far from the text on its
              right). The desktop trails, the tablet chevron set on each desktop raster chevron, from 60 px left
              of the board and 52 above it.
            */
            &::after {
              inset-block-start: calc(-52 * var(--u));
              inset-inline-start: calc(-60 * var(--u));
              inline-size: calc(370 * var(--u));
              block-size: calc(402 * var(--u));
              background-image: url("assets/scotties-desktop-core-value-chevron-trails.svg");
            }
          }
          &>.flex-row {
            &>article:nth-child(1) {
              inline-size: calc(278 * var(--u));
              margin-block-start: calc(253 * var(--u));
              margin-inline-start: calc(72 * var(--u));
            }
            &>article:nth-child(2) {
              inline-size: calc(271 * var(--u));
              margin-block-start: calc(383 * var(--u));
              margin-inline-start: calc(685 * var(--u));
            }
            &>article:nth-child(3) {
              /* 291 px: Excitement wraps as drawn from 284 to 299 px in Chromium and Safari. */
              inline-size: calc(291 * var(--u));
              margin-block-start: calc(23 * var(--u));
              margin-inline-start: calc(761 * var(--u));
            }
          }
        }
      }
    }
    @media(width<40rem) {
      /*
        The phone design loops the three pillars around the skateboard: Excitement first and indented, the
        skateboard, then Confidence and Belonging side by side, joined by pale chevron trails, each pillar name
        running into its text (Phone/Scotties.pdf).
      */
      &>.content .subsection:has(>.small-illustration+.flex-row>article) {
        --pillar-unit: calc(1rem / 16 + var(--phone-art-grow));
        display: grid;
        &>.small-illustration {
          grid-row: 4;
          position: relative;
          inline-size: calc(146 * var(--pillar-unit));
          max-inline-size: none;
          /*
            10 below the design's 45: its trail starts 51 above the board, and Excitement's last line, which wraps
            freely, can run as far right as the trail's top chevrons.
          */
          margin-block: calc(55 * var(--pillar-unit)) 0;
          margin-inline: calc(102 * var(--pillar-unit)) 0;
          &::after {
            content: "";
            position: absolute;
            inset-block-start: calc(-51 * var(--pillar-unit));
            inset-inline-start: calc(-42 * var(--pillar-unit));
            inline-size: calc(204 * var(--pillar-unit));
            block-size: calc(277.4 * var(--pillar-unit));
            background: url("assets/scotties-phone-core-value-chevron-trails.svg") center / 100% 100% no-repeat;
            pointer-events: none;
          }
        }
        &>.flex-row {
          display: contents;
          &>article {
            grid-column: 1;
            align-self: start;
            margin-block: 0;
            &::before {
              content: none;
            }
            &>p {
              margin-block: 0;
              &>span {
                display: inline;
              }
            }
          }
          /* Tree order is Confidence, Belonging, Excitement. */
          &>article:nth-child(3) {
            grid-row: 3;
            inline-size: calc(236 * var(--pillar-unit));
            margin-block-start: calc(40 * var(--pillar-unit));
            margin-inline-start: calc(100 * var(--pillar-unit));
          }
          &>article:nth-child(1) {
            grid-row: 5;
            inline-size: calc(170 * var(--pillar-unit));
            margin-block-start: calc(28 * var(--pillar-unit));
          }
          &>article:nth-child(2) {
            grid-row: 5;
            inline-size: calc(165 * var(--pillar-unit));
            margin-block-start: calc(99 * var(--pillar-unit));
            margin-inline-start: calc(185 * var(--pillar-unit));
          }
        }
      }
    }
    &>.content>.project-introduction>.project-summary {
      font-weight: 500;
      /*
        On phones the facts sit 34 px from each edge, as drawn (35 in the 390 px phone frame) and as before the
        2026-10-25 shell; the page's 20 px gutter is for the drawings below, and the shell had set the facts on it.
      */
      @media(width<40rem) {
        &>p {
          margin-inline: calc(14rem / 16);
        }
      }
    }
    &>.content>.section>h2 {
      position: relative;
      border-width: 0;
      padding-block: calc(26rem / 16 + 27 * var(--grow));
      padding-inline: calc(70rem / 16 + 150 * var(--grow) + max(0rem, (100% - 1440rem / 16) / 2));
      /*
        On phones the text box is the phone design's 225 px, centred, which keeps it clear of the chevron notch.
        Narrower than 390 the chevrons keep their 26% while the words would keep their size, so "Context", "Reflection"
        and "Strategy" ran onto the white notch at 320 to 375 (Safari 17.5). There the band's type, line and box
        shrink with the screen, as the phone art does, so each band looks as it does at 390.
      */
      @media(width<40rem) {
        --banner-shrink: min(0rem, var(--phone-art-grow));
        padding-block: calc(26rem / 16 + 26 * var(--banner-shrink));
        padding-inline: calc((100% - 225rem / 16 - 225 * var(--banner-shrink)) / 2);
        font-size: calc(24rem / 16 + 24 * var(--banner-shrink));
        line-height: calc(34rem / 16 + 34 * var(--banner-shrink));
      }
      /*
        The tablet layout does the same below its 744 design: at 640 "Reflection" ran 44 px past the chevron's edge
        onto the white notch, against the design's 20 at 744.
      */
      @media(40rem<=width<46.5rem) {
        --banner-shrink: calc((100vw - 744rem / 16) / 744);
        padding-block: calc(26rem / 16 + 26 * var(--banner-shrink));
        padding-inline: calc(70rem / 16 + 70 * var(--banner-shrink));
        font-size: calc(24rem / 16 + 24 * var(--banner-shrink));
        line-height: calc(34rem / 16 + 34 * var(--banner-shrink));
      }
      &::after {
        content: "";
        position: absolute;
        inset-block: 0;
        inline-size: calc(80rem / 16 + 252 * var(--grow));
        background-image: url("assets/scotties-section-directional-chevrons.svg");
      }
    }
    /*
      Phone and Tablet Scotties draw the strip as 12.67 by 14 px chevrons 14 apart with a 0.5 px pale edge, which
      is the tile at its own 15 px, 86 and 87 px below the "Mobile" button's text and 76 and 80 above "Jump To
      Section"; Desktop draws a 22 px raster strip.
    */
    &>.content>.project-divider {
      block-size: calc(15rem / 16);
      @media(width>=80rem) {
        block-size: calc(20rem / 16);
      }
      border-width: 0;
      background-size: auto 100%;
    }
  }
  &[data-case-study="scotties"] {
    /* The logo as the designs place it: 291, 450 and 635 px wide (its drawing's box; the ink is 645 at 1440). */
    & .wordmark {
      max-inline-size: calc(
        291rem / 16 + 159 * var(--phone-grow) + 185 * var(--grow)
      );
    }
    &>.content>.project-divider {
      background-color: transparent;
      background-image: url("assets/scotties-hero-divider-chevron-tile.svg");
    }
    &>.content>.section>h2 {
      overflow: clip;
      isolation: isolate;
      &::after {
        z-index: -1;
        inset-inline: auto 0;
        inline-size: auto;
        max-inline-size: 26%;
        aspect-ratio: 664 / 292;
        background-size: auto 100%;
        background-position: left;
        background-repeat: no-repeat;
        transform: none;
      }
    }
    /*
      Up to the 744px tablet design every band keeps its chevrons on the right; wider, even bands use a mirrored
      left copy instead. The body is the query container, as for the wide growth value.
    */
    @container(width>744px) {
      &>.content>.section:nth-of-type(even)>h2 {
        &::before {
          content: "";
          position: absolute;
          z-index: -1;
          inset-block: 0;
          inset-inline: 0 auto;
          max-inline-size: 26%;
          aspect-ratio: 664 / 292;
          background-image: url("assets/scotties-section-directional-chevrons.svg");
          background-size: auto 100%;
          background-position: right;
          background-repeat: no-repeat;
          transform: scaleX(-1);
        }
        &::after {
          content: none;
        }
      }
    }
    /*
      Tablet and Desktop Scotties stroke the moodboard 5 px sage inside its box (fig "moodboard_final 1"). The file
      carries that frame 20 of its 3924 px wide, so it renders 5 px at the desktop's 980 but 3.2 at the tablet's
      624; from the tablet layout up the stroke is drawn over it at 5. (Phone draws 1 px; the file gives 1.8.)
    */
    @media(width>=40rem) {
      & img[src$="scotties-street-culture-visual-moodboard.webp"] {
        outline: calc(5rem / 16) solid var(--color-case-study-accent);
        outline-offset: calc(-5rem / 16);
      }
    }
    /* The designs draw the skateboard 23 by 13 px (phone, tablet) and 32 by 17 (desktop), 3, 11 and 19 px from the text. */
    &>.content h3.subheading::before {
      content: "";
      display: inline-block;
      inline-size: calc(23rem / 16 + 9 * var(--grow));
      block-size: calc(13rem / 16 + 4 * var(--grow));
      /* The heading's first letter adds about 3 px of side bearing. */
      margin-inline-end: calc(8 * var(--phone-grow) + 8 * var(--grow));
      background: url("assets/scotties-subheading-skate-glyph.svg") center / contain no-repeat;
      vertical-align: -0.1em;
    }
    /*
      The designs (exports of 2026-10-23) set the Wireframing Execution headings a step under the other
      subheadings: Sitemap and the two lo-fi pages 16 / 16 / 18 (phone, tablet, desktop), Hi-fi Homepage 18 / 18 / 18.
      At the shared 22 on desktop the lo-fi and hi-fi headings came within 7 to 8 px of their screens (Safari 1440
      and 1905; design 15 to 20). Past 1440 Hi-fi Homepage grows with the lo-fi ones, never smaller than them.
    */
    & #scotties-wireframing-heading+.section-content {
      &>h3.subheading,
      &>.subsection:not(:nth-child(5))>h3.subheading {
        font-size: calc(16rem / 16 + 2 * var(--grow));
      }
      &>.subsection:nth-child(5)>h3.subheading {
        font-size: max(calc(18rem / 16), calc(16rem / 16 + 2 * var(--grow)));
      }
    }
    .subsection:has(>.scotties-challenge-bubble) {
      position: relative;
      @media(width<40rem) {
        margin-block-end: calc(170rem / 16);
      }
      /*
        The phone design, measured on its pixels from the heading's ink top: the chevrons' ink from 65 px, the cloud
        from 130 with its text from 183.5 (ours 174) and clear of the bolt, and the skate 37 px in from the column's
        end, 23 px under the cloud.
      */
      &>.scotties-challenge-bubble {
        /*
          The client: "文字超出了框" (the text runs outside the cloud). Phone Scotties sets the copy in its 346.8 px
          cloud at 14 px on a 22 px pitch, centred, in nine lines that follow the outline; here it wraps freely
          around the cloud's shaped floats from 40 px under the cloud's top (in a 350 px cloud); from 49, as drawn,
          the last line falls through the cloud's foot.
        */
        @media(width<40rem) {
          --cloud-copy-top: calc(40 * 100cqi / 350);
          margin-block-start: calc(108.7rem / 16);
          &>p {
            font-size: calc(14 * 100cqi / 346.8);
            line-height: round(nearest, 22em / 14, 1px);
          }
          /*
            Phone/Scotties in the .fig draws the desktop bolt 3.7% taller than its own shape, its lower tip 31.3% of
            the cloud's width under the cloud's top, ending on the third line's baseline in the gap before "e-".
            Keeping the shape and pinning that tip there lifts the bolt off "no".
          */
          &::before {
            inset-block-start: -0.84cqw;
          }
        }
      }
      &::before,
      &::after {
        content: "";
        position: absolute;
        background-size: contain;
        background-repeat: no-repeat;
      }
      &::before {
        inset-block-start: calc(60rem / 16 - 24 * var(--phone-grow) + 54 * var(--grow));
        inset-inline-start: 0;
        block-size: calc(41.4rem / 16 + 17.6 * var(--phone-grow) + 4 * var(--grow));
        aspect-ratio: 375 / 126;
        background-image: url("assets/scotties-challenge-dotted-chevron-arrow.svg");
      }
      &::after {
        inset-block-end: calc(-60rem / 16 + 60 * var(--grow));
        inset-inline-end: 0;
        inline-size: calc(73rem / 16 + 28 * var(--grow));
        aspect-ratio: 1;
        background-image: url("assets/scotties-challenge-ice-skate.svg");
      }
      /* The query wraps the pseudo-element: iOS 17.0 Safari ignores a query nested inside `::after`. */
      @media(width<40rem) {
        &::before {
          inset-block-start: calc(71.5rem / 16);
        }
        &::after {
          inset-block-end: calc(-95rem / 16);
          inset-inline-end: calc(37rem / 16);
        }
      }
    }
    /*
      The tablet design (Tablet/Scotties in the .fig, on its 624 px column): the chevron arrows 56 px tall from 11 px
      in, their top 53 under the heading's middle (the group is turned 180 degrees, so its box runs back from the
      reported corner); the cloud straight under them, its text 14 px on a 28 px pitch; the bolt from 9 px above
      the cloud's top end; the skate 74 px wide, its foot level with the cloud's, 22 px in from the end.
    */
    @media(width>=40rem) and (width<80rem) {
      .subsection:has(>.scotties-challenge-bubble) {
        --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
        --u: calc(100cqw / 624);
        container-type: inline-size;
        &::before {
          inset-block-start: calc(67 * var(--u));
          inset-inline-start: calc(11 * var(--u));
          block-size: calc(56 * var(--u));
        }
        &::after {
          inset-block-end: 0;
          inset-inline-end: calc(22 * var(--u));
          inline-size: calc(74 * var(--u));
        }
        /*
          Tablet/Scotties in the .fig: the cloud 433 by 352 from 96 px in, its top 109 under the heading's middle;
          the copy in a 364 px box 34 in from each side, its first line box 80 under the cloud's top. The copy
          wraps freely in that box and between the outline's two shaped floats.
        */
        &>.scotties-challenge-bubble {
          /* The cloud is its own container, so these are in its 433rds. */
          --cloud-copy-top: calc(80 * 100cqw / 433);
          /* At most 26 em to a line, the design's 364 px box of 14 px copy, where the cloud grows wider. */
          --cloud-copy-inset: max(calc(34 * 100cqw / 433), calc((100cqw - 26em) / 2));
          inline-size: calc(433 * var(--u));
          max-inline-size: none;
          margin-block-start: calc(95 * var(--u));
          margin-inline: calc(96 * var(--u)) 0;
          &::before {
            inset-block-start: calc(-9 * 100cqw / 433);
          }
          /*
            14 px in the 433 px cloud: below the 744 design width the copy shrinks with the cloud (it held at 14 px
            and ran out of the cloud from 640 to 728); from 744 up the 1em cap applies as before.
          */
          &>p {
            font-size: min(1em, calc(14 * 100cqw / 433));
            line-height: round(nearest, 2em, 1px);
          }
        }
      }
    }
    .scotties-challenge-bubble {
      position: relative;
      /* The copy starts where each range puts it, not centred: the shaped floats inside it must start at the
        cloud's top. */
      justify-content: start;
      /* Every Scotties frame in the .fig layers the copy over the bolt; positioned after it, the copy paints on top. */
      &>p {
        position: relative;
        margin-block: var(--cloud-copy-top) 0;
        margin-inline: var(--cloud-copy-inset, 0px);
        /*
          The copy wraps freely between two floats shaped to the outline's inner edge less 4 px, so no line runs
          into the scallops at any width (the designs break it into lines that follow the outline). Traced from the
          cloud artwork alone in 4 px bands of a 350 px cloud, each band as far in as the outline reaches anywhere
          within it, down to 262 px, where the outline closes; every frame draws the same cloud.
          The floats start at the cloud's top, above the copy, so one pair of shapes fits every copy offset, and
          reach out past the copy's side insets to the cloud's edges, so the shapes stay where the outline is.
        */
        &::before,
        &>.scotties-challenge-edge {
          content: "";
          inline-size: 50cqi;
          block-size: calc(262 * 100cqi / 350);
          margin-block-start: calc(-1 * var(--cloud-copy-top));
        }
        &::before {
          float: inline-start;
          margin-inline-start: calc(-1 * var(--cloud-copy-inset, 0px));
          shape-outside: border-box polygon(0 0, 100% 0%, 100% 7.63%, 99.47% 7.63%, 99.47% 9.16%, 95.21% 9.16%, 95.21% 10.69%, 91.85% 10.69%, 91.85% 12.21%, 88.95% 12.21%, 88.95% 13.74%, 86.5% 13.74%, 86.5% 15.27%, 84.23% 15.27%, 84.23% 16.79%, 82.23% 16.79%, 82.23% 18.32%, 80.42% 18.32%, 80.42% 19.85%, 78.69% 19.85%, 78.69% 21.37%, 37.4% 21.37%, 37.4% 22.9%, 36.59% 22.9%, 36.59% 24.43%, 35.77% 24.43%, 35.77% 25.95%, 35.14% 25.95%, 35.14% 27.48%, 34.68% 27.48%, 34.68% 29.01%, 34.23% 29.01%, 34.23% 30.53%, 33.96% 30.53%, 33.96% 32.06%, 33.68% 32.06%, 33.68% 33.59%, 33.5% 33.59%, 33.5% 35.11%, 33.41% 35.11%, 33.41% 36.64%, 16.9% 36.64%, 16.9% 38.17%, 15.17% 38.17%, 15.17% 39.69%, 13.72% 39.69%, 13.72% 41.22%, 12.36% 41.22%, 12.36% 42.75%, 20.71% 42.75%, 20.71% 44.27%, 18.98% 44.27%, 18.98% 45.8%, 16.35% 45.8%, 16.35% 47.33%, 14.26% 47.33%, 14.26% 48.85%, 12.45% 48.85%, 12.45% 50.38%, 11% 50.38%, 11% 51.91%, 9.82% 51.91%, 9.82% 53.44%, 9% 53.44%, 9% 54.96%, 8.37% 54.96%, 8.37% 56.49%, 8% 56.49%, 8% 58.02%, 7.82% 58.02%, 7.82% 59.54%, 8% 59.54%, 8% 61.07%, 8.27% 61.07%, 8.27% 62.6%, 8.73% 62.6%, 8.73% 64.12%, 9.45% 64.12%, 9.45% 65.65%, 10.36% 65.65%, 10.36% 67.18%, 11.45% 67.18%, 11.45% 68.7%, 12.81% 68.7%, 12.81% 70.23%, 14.45% 70.23%, 14.45% 71.76%, 16.53% 71.76%, 16.53% 73.28%, 18.89% 73.28%, 18.89% 74.81%, 43.48% 74.81%, 43.48% 76.34%, 43.76% 76.34%, 43.76% 77.86%, 44.03% 77.86%, 44.03% 79.39%, 44.48% 79.39%, 44.48% 80.92%, 45.21% 80.92%, 45.21% 82.44%, 46.12% 82.44%, 46.12% 83.97%, 47.29% 83.97%, 47.29% 85.5%, 48.75% 85.5%, 48.75% 87.02%, 50.47% 87.02%, 50.47% 88.55%, 52.74% 88.55%, 52.74% 90.08%, 55.55% 90.08%, 55.55% 91.6%, 59.27% 91.6%, 59.27% 93.13%, 91.4% 93.13%, 91.4% 94.66%, 89.31% 94.66%, 89.31% 96.18%, 85.5% 96.18%, 85.5% 97.71%, 99.84% 97.71%, 99.84% 99.24%, 100% 99.24%, 100% 100%, 0 100%);
        }
        &>.scotties-challenge-edge {
          float: inline-end;
          margin-inline-end: calc(-1 * var(--cloud-copy-inset, 0px));
          shape-outside: border-box polygon(100% 0, 0% 0%, 0% 7.63%, 41.27% 7.63%, 41.27% 9.16%, 32.2% 9.16%, 32.2% 10.69%, 30.75% 10.69%, 30.75% 12.21%, 43.09% 12.21%, 43.09% 13.74%, 49.71% 13.74%, 49.71% 15.27%, 53.7% 15.27%, 53.7% 16.79%, 56.88% 16.79%, 56.88% 18.32%, 59.33% 18.32%, 59.33% 19.85%, 61.24% 19.85%, 61.24% 21.37%, 62.78% 21.37%, 62.78% 22.9%, 63.96% 22.9%, 63.96% 24.43%, 65.05% 24.43%, 65.05% 25.95%, 65.86% 25.95%, 65.86% 27.48%, 66.41% 27.48%, 66.41% 29.01%, 66.77% 29.01%, 66.77% 30.53%, 66.86% 30.53%, 66.86% 32.06%, 63.96% 32.06%, 63.96% 33.59%, 59.15% 33.59%, 59.15% 35.11%, 65.59% 35.11%, 65.59% 36.64%, 65.32% 36.64%, 65.32% 38.17%, 78.39% 38.17%, 78.39% 39.69%, 81.56% 39.69%, 81.56% 41.22%, 84.1% 41.22%, 84.1% 42.75%, 86.1% 42.75%, 86.1% 44.27%, 87.82% 44.27%, 87.82% 45.8%, 89.18% 45.8%, 89.18% 47.33%, 90.36% 47.33%, 90.36% 48.85%, 91.27% 48.85%, 91.27% 50.38%, 91.82% 50.38%, 91.82% 51.91%, 91.91% 51.91%, 91.91% 53.44%, 91.73% 53.44%, 91.73% 54.96%, 91.27% 54.96%, 91.27% 56.49%, 90.64% 56.49%, 90.64% 58.02%, 89.82% 58.02%, 89.82% 59.54%, 88.91% 59.54%, 88.91% 61.07%, 87.73% 61.07%, 87.73% 62.6%, 86.28% 62.6%, 86.28% 64.12%, 84.37% 64.12%, 84.37% 65.65%, 82.29% 65.65%, 82.29% 67.18%, 80.11% 67.18%, 80.11% 70.23%, 62.6% 70.23%, 62.6% 71.76%, 62.41% 71.76%, 62.41% 73.28%, 62.23% 73.28%, 62.23% 74.81%, 62.05% 74.81%, 62.05% 76.34%, 61.78% 76.34%, 61.78% 77.86%, 61.42% 77.86%, 61.42% 79.39%, 60.96% 79.39%, 60.96% 80.92%, 60.42% 80.92%, 60.42% 82.44%, 59.69% 82.44%, 59.69% 83.97%, 58.79% 83.97%, 58.79% 85.5%, 57.79% 85.5%, 57.79% 87.02%, 56.52% 87.02%, 56.52% 88.55%, 54.97% 88.55%, 54.97% 90.08%, 53.25% 90.08%, 53.25% 91.6%, 51.16% 91.6%, 51.16% 93.13%, 48.53% 93.13%, 48.53% 94.66%, 45.26% 94.66%, 45.26% 96.18%, 41.27% 96.18%, 41.27% 97.71%, 36.46% 97.71%, 36.46% 99.24%, 0% 99.24%, 0% 100%, 100% 100%);
        }
      }
      &::before {
        content: "";
        position: absolute;
        inset-block-start: 0;
        inset-inline-start: 72%;
        inline-size: 25.6%;
        aspect-ratio: 141 / 177;
        background: url("assets/scotties-challenge-lightning-bolt.svg") center / contain no-repeat;
      }
      @media(width>=40rem) {
        &::before {
          inset-inline-start: 75.5%;
        }
      }
    }
    .scotties-positioning-note {
      position: relative;
      &>p>span {
        display: block;
        color: var(--color-case-study-heading);
      }
      /* Phone Scotties draws the skater 37 px before and 22 px above the box; wider designs place it themselves. */
      &::before {
        content: "";
        position: absolute;
        inset-block-start: calc(-22rem / 16);
        inset-inline-start: calc(-37rem / 16);
        inline-size: calc(62rem / 16);
        aspect-ratio: 149 / 158;
        background: url("assets/scotties-positioning-skater-figure.svg") center / contain no-repeat;
      }
    }
    /* The starburst comes before the positioned note in tree order, so the note paints over it. */
    .subsection:has(>.scotties-positioning-note) {
      position: relative;
      /*
        The client: "这个框离上下标题的间距太窄了，参考原设计。" (the box sits too close to the headings above and
        below; follow the design). Phone Scotties draws the box 74.5 px under the heading's text and 130 px over
        the Research band. The box's margin collapses with the heading's 32 px one, so it carries the whole 72.5
        (the heading's line box adds 2); the section's 64 px padding gets 66 more below. The box is 241 by 309 px
        from 36 px into the column, its copy centred on 197 px, where plain wrapping gives the drawn lines (any
        inline padding from 10 to 24 px does); the lead phrase on 160 px splits at its comma (138 to 187 px all do).
      */
      @media(width<40rem) {
        margin-block-end: calc(66rem / 16);
        &>.scotties-positioning-note {
          display: flex;
          flex-direction: column;
          justify-content: center;
          box-sizing: border-box;
          inline-size: calc(241rem / 16);
          min-block-size: calc(309rem / 16);
          margin-block-start: calc(72.5rem / 16);
          margin-inline: calc(36rem / 16) 0;
          padding-block: 0;
          padding-inline: calc(17rem / 16);
          &>p>span {
            max-inline-size: calc(160rem / 16);
            margin-inline: auto;
          }
        }
      }
    }
    .subsection:has(>.scotties-positioning-note)::before {
      content: "";
      position: absolute;
      /*
        Phone Scotties draws the splat 175 px wide from the column's middle, 55 px below the box, so it shows at the
        box's lower right; from the middle, it ends at the column's end on phones under 390. Wider designs place it
        themselves.
      */
      inset-block-end: calc(-55rem / 16);
      inset-inline-start: 50%;
      inline-size: calc(175rem / 16);
      max-inline-size: 50%;
      aspect-ratio: 319 / 274;
      background: url("assets/scotties-positioning-starburst.svg") center / contain no-repeat;
    }
    /*
      The desktop design (Desktop/Scotties.pdf, on its 1086 px column): the cloud 550 by 447 px from 268 px in,
      41 under the heading, which sits 143 px under the About copy; the chevrons 188 px wide from 21 px in, 99
      under the heading's top; the skate 101 px wide, 70 from the column's end, 4 above the cloud's foot. The
      copy wraps freely, its lines 32 px apart, its first glyph 122 under the
      cloud's top. Brand Message 122 px under the cloud; its box 449 by 288 px from 318 px in, 105 under the
      heading, its copy on 327 px (it wraps as drawn from 308 to 347 px in Chromium and Safari); the skater 149
      px wide, 98 px before and 72 above the box; the splat 318 px wide from 577 px in, 103 below the box; the
      next band 323 px under the box.
    */
    @media(width>=80rem) {
      .subsection:has(>.scotties-challenge-bubble) {
        --grow: calc(1rem / 16);
        --u: calc(100cqw / 1086);
        container-type: inline-size;
        margin-block-start: calc(115rem / 16);
        &>h3 {
          margin-block-end: 0;
        }
        &::before {
          inset-block-start: calc(99 * var(--u));
          inset-inline-start: calc(21 * var(--u));
          block-size: calc(63 * var(--u));
        }
        &::after {
          inset-block-end: calc(4 * var(--u));
          inset-inline-end: calc(70 * var(--u));
          inline-size: calc(101 * var(--u));
        }
        &>.scotties-challenge-bubble {
          box-sizing: border-box;
          inline-size: calc(550 * var(--u));
          max-inline-size: none;
          aspect-ratio: 550 / 447;
          margin-block-start: calc(41 * var(--u));
          margin-inline: calc(268 * var(--u)) 0;
          /* The cloud is its own container, so these are in its 550ths. */
          --cloud-copy-top: calc(117 * 100cqw / 550);
          /* At most 24.5 em to a line: the design's longest line is 387 px of 16 px copy. */
          --cloud-copy-inset: max(calc(65 * 100cqw / 550), calc((100cqw - 24.5em) / 2));
          &>p {
            line-height: round(nearest, 2em, 1px);
          }
        }
      }
      .subsection:has(>.scotties-positioning-note) {
        --grow: calc(1rem / 16);
        --u: calc(100cqw / 1086);
        container-type: inline-size;
        margin-block: calc(122rem / 16) calc(203rem / 16);
        &>h3 {
          margin-block-end: 0;
        }
        &::before {
          inset-block-end: calc(-103 * var(--u));
          inset-inline-start: calc(577 * var(--u));
          inline-size: calc(318 * var(--u));
          max-inline-size: none;
        }
        &>.scotties-positioning-note {
          display: flex;
          flex-direction: column;
          justify-content: center;
          inline-size: calc(449 * var(--u));
          max-inline-size: none;
          min-block-size: calc(288 * var(--u));
          margin-block-start: calc(105 * var(--u));
          margin-inline: calc(318 * var(--u)) 0;
          padding-block: 0;
          padding-inline: calc(56 * var(--u));
          &>p {
            margin-block: 0;
          }
          &::before {
            inset-block-start: calc(-72 * var(--u));
            inset-inline-start: calc(-98 * var(--u));
            inline-size: calc(149 * var(--u));
          }
        }
      }
    }
    /*
      The tablet design's positioning callout, on its 624 px column: the box 397 by 251 px from 101 px in, its
      copy centred; the skater 193 px wide over its top-left corner; the splat 260 px wide from 358 px in, 97 px
      below the box (Tablet/Scotties.pdf).
    */
    @media(width>=40rem) and (width<80rem) {
      .subsection:has(>.scotties-positioning-note) {
        --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
        --u: calc(100cqw / 624);
        container-type: inline-size;
        /*
          A percentage, not --u: this element is the container, so its own units would read the viewport.
          113.6 of 624: the box's foot to the next band is 177.6 px in the tablet design.
        */
        margin-block-end: calc(11360% / 624);
        &::before {
          inset-block-end: calc(-97 * var(--u));
          inset-inline-start: calc(358 * var(--u));
          inline-size: calc(260 * var(--u));
          max-inline-size: none;
        }
        &>.scotties-positioning-note {
          display: flex;
          flex-direction: column;
          justify-content: center;
          box-sizing: border-box;
          inline-size: calc(397 * var(--u));
          max-inline-size: none;
          min-block-size: calc(251 * var(--u));
          margin-block-start: calc(107 * var(--u));
          margin-inline: calc(101 * var(--u)) 0;
          &::before {
            inset-block-start: calc(-36 * var(--u));
            inset-inline-start: calc(-55 * var(--u));
            inline-size: calc(108 * var(--u));
          }
        }
      }
    }
    .persona-photograph {
      position: relative;
      isolation: isolate;
      /*
        Jonathan's photo is 492 by 616 and the other two 490 by 616; at one width it came out 1.1 px shorter and
        lifted his name. Every Scotties design keeps the three photos one height, so the names sit level.
      */
      &>button>img {
        aspect-ratio: 490 / 616;
        object-fit: cover;
      }
      &::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset: -5% 6.5% 19% -6.5%;
        background-color: var(--scotties-persona-plate);
      }
    }
    .persona {
      &:nth-child(1) {
        --scotties-persona-plate: var(--color-case-study-heading);
      }
      &:nth-child(2) {
        --scotties-persona-plate: var(--color-case-study-accent);
      }
      &:nth-child(3) {
        --scotties-persona-plate: var(--color-case-study-subheading);
      }
      &>h4>span {
        display: block;
        color: var(--color-case-study-heading);
      }
    }
    .small-illustration~.flex-row>article {
      &>p>span {
        color: var(--color-case-study-heading);
      }
      &::before {
        content: "";
        display: block;
        block-size: calc(56rem / 16);
        background: url("assets/scotties-core-value-pale-chevron-column.svg") left top / 1rem auto repeat-y;
      }
    }
    .sitemap {
      position: relative;
      &::after {
        content: "";
        position: absolute;
        inset-block-end: 0;
        inset-inline-end: 0;
        /* 190, 274 and 476 px across the phone, tablet and desktop designs. */
        inline-size: calc(
          190rem / 16 + 84 * var(--phone-grow) + 202 * var(--grow)
        );
        aspect-ratio: 952 / 158;
        background: url("assets/scotties-sitemap-chevron-cluster.svg") center / contain no-repeat;
      }
      /*
        The client: "这个图案放在sitmap的正下方吧，也是居中。" (put this pattern directly under the sitemap,
        centred). On the phone's one-column tree it sat beside the last page; it now follows the tree, 32 px under
        it like the sitemap's own spacing. The query wraps the pseudo-element: iOS 17.0 Safari ignores a query
        nested inside `::after`.
      */
      @media(width<52rem) {
        &::after {
          position: static;
          display: block;
          margin-block-start: calc(32rem / 16);
          margin-inline: auto;
        }
      }
      /*
        Desktop Scotties draws the sitemap larger: 47 px boxes, 17 px labels padded 26 px (at least 121 px wide,
        seven boxes at their own drawn widths); the root's stem 67 px down to the bar, the sections 34 px under it
        and starting 4, 322, 579 and 915 px into the 1086 px column; each section's trunk 32 px in, its pages 37
        past the trunk, the first 49 px under the section and the rest 96 px apart; the chevrons 4 px in from the
        column's end and 7 below the last page. The heading 220 px under the band's top, the root 69 under the
        heading's glyph top, and Lo-fi Homepage 129 under the chevrons.
      */
      @media(width>=80rem) {
        :where(#scotties-wireframing)>.section-content:has(>&) {
          padding-block-start: calc(125rem / 16);
        }
        &+.subsection {
          margin-block-start: calc(135rem / 16);
        }
        --case-study-sitemap-gap: calc(49rem / 16);
        --case-study-sitemap-trunk: calc(32rem / 16);
        --case-study-sitemap-indent: calc(37rem / 16);
        --case-study-sitemap-column-padding: 0px;
        margin-block-start: calc(39rem / 16);
        &::after {
          inset-block-end: calc(-7rem / 16);
          inset-inline-end: calc(4rem / 16);
        }
        font-size: calc(17rem / 16);
        & span {
          min-inline-size: calc(121rem / 16);
          padding-block: calc(13.5rem / 16);
          padding-inline: calc(26rem / 16);
        }
        &>ul>li {
          &>span::before {
            block-size: calc(67rem / 16);
          }
          /*
            The column scales but the boxes do not: below the design's 1086 px column (windows under about 1410
            px) Profile's pages (32 + 37 + 99 px past its start) ran up to 10.7 px past the column at 1280, past the
            chevrons' end and off centre. The third section's column gives up that space, keeping the design's 3 px
            to the column's end; its widest page still fits.
          */
          &>ul {
            justify-content: start;
            align-self: stretch;
            margin-inline-start: calc(400% / 1086);
            padding-block-start: calc(67rem / 16);
            &>li {
              padding-block-start: calc(34rem / 16);
              &:nth-child(1) {
                flex: 0 0 calc(31800% / 1086);
              }
              &:nth-child(2) {
                flex: 0 0 calc(25700% / 1086);
              }
              &:nth-child(3) {
                flex: 0 0 min(calc(33600% / 1086), calc(100% - 57500% / 1086 - 171rem / 16));
              }
              &:nth-child(4) {
                flex: 0 0 auto;
              }
              &>span::before {
                inset-block-start: calc(-34rem / 16);
              }
              &:nth-child(1)>ul>li:nth-child(4)>span,
              &:nth-child(3)>ul>li:nth-child(2)>span {
                inline-size: calc(216rem / 16);
                padding-inline: 0;
              }
              &:nth-child(2)>ul>li:first-child>span {
                inline-size: calc(121rem / 16);
                padding-inline: 0;
              }
              &:nth-child(3)>span {
                inline-size: calc(256rem / 16);
              }
              &:nth-child(4) span {
                min-inline-size: 0;
                inline-size: calc(99rem / 16);
                padding-inline: 0;
              }
              &:nth-child(4)>span {
                inline-size: calc(92rem / 16);
              }
            }
          }
        }
      }
    }
    :where(#scotties-wireframing) {
      & .note {
        border-width: calc(3rem / 16);
        border-color: var(--color-case-study-accent);
        border-radius: calc(24rem / 16);
      }
      & .subsection:nth-child(3)>.flex-row>.note:last-child,
      & .subsection:nth-child(4)>.flex-row>.note:nth-child(2),
      & .subsection:nth-child(5) article>.note:nth-child(2) {
        border-width: calc(4rem / 16);
        border-color: var(--color-case-study-heading);
      }
      & .subsection:nth-child(4)>.flex-row>.note:first-child,
      & .subsection:nth-child(5) article>.note:is(:first-child,:last-child) {
        border-width: calc(4rem / 16);
        border-color: var(--color-case-study-subheading);
      }
      & .subsection:nth-child(3)>.flex-row>.note:first-child,
      & .subsection:nth-child(5)>h3+p {
        position: relative;
        padding-block: calc(2.5rem - 1rem / 16) calc(2rem - 1rem / 16);
        padding-inline: calc(2rem - 1rem / 16);
        /*
          Every design strokes these boxes 5 px inside with 20 px dashes and 20 px gaps at a 50 px radius (fig
          "Rectangle 73" and "Rectangle 74"), as the brand message box; a dashed border cannot set its dash length.
          The padding gives back the border's extra pixel, so the boxes keep their size.
        */
        border: calc(5rem / 16) solid transparent;
        border-radius: calc(50rem / 16);
        background:
          url("assets/scotties-wireframe-note-dashed-outline.svg") border-box,
          color-mix(in srgb, var(--color-case-study-accent) 47%, #fff) border-box;
        &::before {
          content: "";
          position: absolute;
          inset-block-start: calc(-0.6 * (50rem / 16 + 38 * var(--grow)));
          inline-size: calc(50rem / 16 + 38 * var(--grow));
          background: var(--scotties-note-icon) center / contain no-repeat;
        }
      }
      & .subsection:nth-child(3)>.flex-row>.note:first-child::before {
        --scotties-note-icon: url("assets/scotties-lo-fi-ice-boot-corner-icon.svg");
        /*
          The designs' skate ink, in each layout's design pixels and measured inside the 5 px outline: phone and
          tablet 77.5 wide, 45.7 from the box's right edge and rising 33 above its top; desktop 87.6, 15.5 and 37.6
          (Phone, Tablet and Desktop/Scotties.pdf).
        */
        /* Not past the 390 design size: the box grows to 639 but the gap to the heading does not. */
        --skate-unit: min(var(--lofi-unit), 1rem / 16);
        inline-size: calc(77.5 * var(--skate-unit));
        inset-inline-end: calc(40.7 * var(--skate-unit));
        inset-block-start: calc(-38 * var(--skate-unit));
        aspect-ratio: 88 / 71;
        @media(width>=40rem) {
          inline-size: calc(77.5 * var(--u));
          inset-inline-end: calc(40.7 * var(--u));
          inset-block-start: calc(-38 * var(--u));
        }
        @media(width>=68.25rem) {
          inline-size: calc(87.6 * var(--u));
          inset-inline-end: calc(10.5 * var(--u));
          inset-block-start: calc(-42.6 * var(--u));
        }
      }
      /* The tablet design leaves about 70 px under the headings over the three wireframe pages, 80 over hi-fi's skater. */
      @media(width>=40rem) and (width<80rem) {
        & .subsection:has(.portrait-artwork)>h3.subheading {
          margin-block-end: calc(69rem / 16);
        }
        & .subsection:nth-child(5)>h3.subheading {
          margin-block-end: calc(79rem / 16);
        }
      }
      /* The hi-fi intro is a boxed note under its skater, not running text: it keeps its wider gap below desktop. */
      @media(width<80rem) {
        & .subsection:nth-child(5)>h3 {
          margin-block-end: 2rem;
          & + p {
            margin-block-start: 1rem;
          }
        }
      }
      /*
        The client: "这个间距要增加" (this spacing should grow), of the hi-fi box's gaps. Phone Scotties draws the box
        64.5 px under its heading's text (the heading's line box adds 2) and the first callout 39 px under the box.
      */
      @media(width<40rem) {
        & .subsection:nth-child(5)>h3 {
          margin-block-end: calc(62.5rem / 16);
          & + p {
            margin-block-end: calc(39rem / 16);
          }
        }
      }
      & .subsection:nth-child(5)>h3+p::before {
        --scotties-note-icon: url("assets/scotties-hi-fi-skater-corner-icon.svg");
        inset-inline-start: 5%;
        aspect-ratio: 90 / 87;
      }
      & .portrait-artwork {
        position: relative;
        &::after {
          content: "";
          position: absolute;
          inset-block: 0;
          inset-inline: -4.2%;
          background: var(--scotties-wireframe-highlights) 0 0 / 100% 100% no-repeat;
          pointer-events: none;
        }
      }
      & .subsection:nth-child(3) .portrait-artwork {
        --scotties-wireframe-highlights: url("assets/scotties-lo-fi-homepage-highlights.svg");
      }
      & .subsection:nth-child(4) .portrait-artwork {
        --scotties-wireframe-highlights: url("assets/scotties-lo-fi-product-listing-highlights.svg");
      }
      /*
        Every design frames these screens with a 1 px sage stroke inside the box (fig "Desktop - 2 1" and "Home 1"
        or "Home 2", strokeAlign INSIDE), as the lo-fi homepage's picture carries in its pixels. The listing's file
        was cropped at its right edge when rebuilt (`aba53f4`), keeping only slivers of that frame, and the hi-fi
        screenshot has none, so the stroke is drawn over them.
      */
      & :is(
        img[src$="scotties-low-fidelity-product-listing-wireframe.webp"],
        img[src$="scotties-high-fidelity-community-homepage.png"]
      ) {
        outline: calc(1rem / 16) solid var(--color-case-study-accent);
        outline-offset: calc(-1rem / 16);
      }
      & .subsection:nth-child(5) .portrait-artwork {
        --scotties-wireframe-highlights: url("assets/scotties-hi-fi-homepage-highlights.svg");
      }
      /*
        The tablet and desktop designs' lo-fi pages, in each design's proportions (624 or 1085 to 1089 px wide, scaled
        to the column): the screen beside its callouts, each callout as tall as the design's box with its text
        centred, and tied to its part of the screen by a 3 px connector ending in an arrowhead. A connector is a
        mask on its callout: a straight one (`--x`, `--y`, `--w`), mirrored with `scale` when it runs right, or an
        elbow with its own layers. Lengths are the designs' pixels (Tablet and Desktop/Scotties.pdf).
      */
      @media(width>=40rem) {
        & .subsection:is(:nth-child(3), :nth-child(4))>.flex-row {
          /* Being a container would make the type growth measure this row; keep measuring the page. */
          --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
          container-type: inline-size;
          display: grid;
          gap: 0;
          &>* {
            align-self: start;
            justify-self: start;
            margin: 0;
          }
          &>figure {
            justify-self: stretch;
            inline-size: auto;
            max-inline-size: none;
          }
          &>.note {
            --x: 0;
            --y: 0;
            --w: 0;
            /* Above the screen, which the desktop filters connector crosses. */
            position: relative;
            z-index: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            box-sizing: border-box;
            inline-size: calc(var(--box) * var(--u));
            min-block-size: calc(var(--h) * var(--u));
            /* The designs' text insets are from the box's outer edge, so the 4 px border comes off them. */
            padding-block: calc(20 * var(--u));
            padding-inline: calc(var(--ps) * var(--u) - 4rem / 16) calc(var(--pe) * var(--u) - 4rem / 16);
            /*
              The client (CF118), of the listing's orange arrow at 728 px: "箭头要往上移一点" (move the arrow up a
              little). Each callout grew past its design height, pushing the later callouts and their connectors
              down (25 design px at 728, 128 at 640): 20 px insets left the 114 px box no room for its three lines
              (the design insets them 14 px from the outer edge), and below the design's width the 14 px text
              wrapped into more lines in the narrower boxes. The text now scales with the callout there, keeping
              the design's line breaks.
            */
            @media(width<68.25rem) {
              padding-block: calc(14 * var(--u) - 4rem / 16);
              font-size: min(calc(14rem / 16 + 2 * var(--grow)), calc(14 * var(--u)));
              line-height: round(nearest, min(28rem / 16 + 4 * var(--grow), 28 * var(--u)), 1px);
              letter-spacing: -0.019em;
            }
            /* The desktop composition's 16 px on 32 px text, scaled the same way below its 1440 px design. */
            @media(68.25rem<=width<90rem) {
              font-size: min(calc(14rem / 16 + 2 * var(--grow)), calc(16 * var(--u)));
              line-height: round(nearest, min(28rem / 16 + 4 * var(--grow), 32 * var(--u)), 1px);
              letter-spacing: -0.019em;
            }
            &>p {
              margin-block: 0;
            }
            &::after {
              content: "";
              position: absolute;
              inset-block-start: calc(var(--y) * var(--u));
              inset-inline-start: calc(var(--x) * var(--u));
              inline-size: calc(var(--w) * var(--u));
              block-size: calc(17.4 * var(--u));
              background-color: var(--tint);
              mask:
                url("assets/scotties-connector-arrowhead-left.svg") 0 50% / calc(15 * var(--u)) calc(17.4 * var(--u))
                no-repeat,
                linear-gradient(#000 0 0) 100% 50% / calc(100% - 13.5 * var(--u)) calc(3 * var(--u)) no-repeat;
              pointer-events: none;
            }
          }
        }
        /* Runs right, from the callout's end into the screen. */
        & .subsection:nth-child(4)>.flex-row>.note:is(:first-child, :last-child)::after {
          inset-inline-start: 100%;
          scale: -1 1;
        }
        /* The homepage's orange connector: from the screen's navigation, down the gap, into the callout. */
        & .subsection:nth-child(3)>.flex-row>.note:last-child {
          --tint: var(--color-case-study-heading);
          &::after {
            inset-inline-start: calc(100% - 7 * var(--u));
            inset-block-start: calc(-247.5 * var(--u));
            inline-size: calc(101 * var(--u));
            block-size: calc(301.2 * var(--u));
            /* The arrowhead's tip touches the callout's border from outside (7 px plus the 4 px border out). */
            mask:
              url("assets/scotties-connector-arrowhead-left.svg") calc(7 * var(--u) + 4rem / 16) 100% /
              calc(15 * var(--u)) calc(17.4 * var(--u)) no-repeat,
              linear-gradient(#000 0 0) calc(20.5 * var(--u) + 4rem / 16) calc(100% - 7.2 * var(--u)) /
              calc(14 * var(--u) - 4rem / 16) calc(3 * var(--u)) no-repeat,
              linear-gradient(#000 0 0) calc(31.5 * var(--u)) 0 / calc(3 * var(--u)) calc(100% - 8.7 * var(--u))
              no-repeat,
              linear-gradient(#000 0 0) calc(31.5 * var(--u)) 0 / calc(100% - 31.5 * var(--u)) calc(3 * var(--u))
              no-repeat;
          }
        }
        /* The listing's filters connector: from the callout's end, up the gap, into the filters. */
        & .subsection:nth-child(4)>.flex-row>.note:nth-child(2) {
          --tint: var(--color-case-study-heading);
          &::after {
            inset-inline-start: calc(100% - 6.5 * var(--u));
            inset-block-start: calc(-208.7 * var(--u));
            /*
              7.5 longer than the design's run, with the bend kept in place: the shared highlights put the filters
              box about 4 px right of where the tablet design draws it, and the head ended 7 px short of its line.
            */
            inline-size: calc(75 * var(--u));
            block-size: calc(288.6 * var(--u));
            scale: -1 1;
            mask:
              url("assets/scotties-connector-arrowhead-left.svg") 0 0 / calc(15 * var(--u)) calc(17.4 * var(--u))
              no-repeat,
              linear-gradient(#000 0 0) calc(13.5 * var(--u)) calc(7.2 * var(--u)) /
              calc(28.5 * var(--u)) calc(3 * var(--u)) no-repeat,
              linear-gradient(#000 0 0) calc(39 * var(--u)) calc(7.2 * var(--u)) /
              calc(3 * var(--u)) calc(100% - 7.2 * var(--u)) no-repeat,
              /* Stops at the callout's inner border edge, 6.5 px short of the box's end. */
              linear-gradient(#000 0 0) calc(39 * var(--u)) 100% / calc(100% - 45.5 * var(--u)) calc(3 * var(--u))
              no-repeat;
          }
        }
        & .subsection:nth-child(3)>.flex-row {
          --u: calc(100cqw / 624);
          grid-template-columns: minmax(0, 265fr) minmax(0, 46fr) minmax(0, 288fr) minmax(0, 25fr);
          &>figure {
            grid-area: 1 / 3 / 3;
          }
          &>.note:first-child {
            --box: 253;
            --h: 214;
            --ps: 26;
            --pe: 10;
            grid-area: 1 / 1;
            margin-block-start: calc(1 * var(--u));
            margin-inline-start: calc(6 * var(--u));
            /*
              Outranks the intro cloud's own padding, set for the stacked phone layout. Its dashed outline is 5 px,
              not the other callouts' 4 px border.
            */
            padding-block: calc(20 * var(--u));
            padding-inline: calc(var(--ps) * var(--u) - 5rem / 16) calc(var(--pe) * var(--u) - 5rem / 16);
          }
          &>.note:last-child {
            --box: 265;
            --h: 199;
            --ps: 23;
            --pe: 21;
            grid-area: 2 / 1;
            margin-block-start: calc(45 * var(--u));
          }
        }
        & .subsection:nth-child(4)>.flex-row {
          --u: calc(100cqw / 624);
          grid-template-columns: minmax(0, 249fr) minmax(0, 63fr) minmax(0, 288fr) minmax(0, 24fr);
          &>figure {
            grid-area: 1 / 3 / 4;
          }
          &>.note:first-child {
            --box: 217;
            --h: 114;
            /*
              Tablet/Scotties.pdf: box x 61 to 278, text x 87 to 256.4. With no end inset the text ran to the
              border's inner edge from 640 to 1024 (Safari) and wrapped wider than drawn.
            */
            --ps: 26;
            --pe: 21.6;
            --y: 49.3;
            /* The design's 89 plus 10.5: the shared highlights draw the dark box right of the tablet design's. */
            --w: 99.5;
            --tint: var(--color-case-study-subheading);
            grid-area: 1 / 1;
            margin-block-start: calc(5 * var(--u));
          }
          &>.note:last-child {
            --box: 249;
            --h: 160;
            --ps: 25;
            --pe: 26;
            --y: 72.8;
            /* The design's 133.7 plus 3, for the same shift of the sage box. */
            --w: 136.7;
            --tint: var(--color-case-study-accent);
            grid-area: 2 / 1;
            margin-block-start: calc(23 * var(--u));
          }
          &>.note:nth-child(2) {
            --box: 248;
            --h: 151;
            --ps: 30;
            --pe: 17;
            grid-area: 3 / 1;
            margin-block-start: calc(21 * var(--u));
          }
        }
        /*
          Desktop Scotties sets the listing 48 px under the homepage's wireframe and the hi-fi homepage 122 under the
          listing's. The 2026-10-23 export draws each heading's ink about 16, 17 and 17 px above its screen (the
          lo-fi homepage, the listing, the hi-fi homepage); at 18 px type the site had 11, 11 and 10 (Safari 1440),
          the listing's ink also 6 px too far under the wireframe above. Each heading rises by that difference
          (negative margin above, the same added below), so every screen and callout stays where it was.
        */
        @media(width>=80rem) {
          & .subsection:nth-child(3)>h3 {
            margin-block: calc(-5rem / 16) calc(10rem / 16);
          }
          & .subsection:nth-child(4) {
            margin-block-start: calc(47rem / 16);
            &>h3 {
              margin-block: calc(-6rem / 16) calc(11rem / 16);
            }
          }
          & .subsection:nth-child(5) {
            margin-block-start: calc(121rem / 16);
            &>h3 {
              margin-block: calc(-7rem / 16) calc(11rem / 16);
            }
          }
          /* And 132 px from the last prototype link down to the Key Learnings band. */
          &>.section-content {
            padding-block-end: calc(136rem / 16);
          }
        }
        /* The desktop design: the homepage's intro left and navigation callout right; the listing's grid callout right. */
        @media(width>=68.25rem) {
          & .subsection:nth-child(3)>.flex-row {
            --u: calc(100cqw / 1085);
            grid-template-columns:
              minmax(0, 355fr) minmax(0, 40fr) minmax(0, 288fr) minmax(0, 76fr) minmax(0, 326fr);
            &>.note:first-child {
              --box: 355;
              --h: 241;
              --ps: 49;
              --pe: 39;
              margin-block-start: calc(47 * var(--u));
              margin-inline-start: 0;
            }
            &>.note:last-child {
              --box: 326;
              --h: 251;
              --ps: 43;
              --pe: 22;
              grid-area: 1 / 5;
              margin-block-start: calc(133 * var(--u));
              /*
                3 longer than the design's 172.6, with the bend kept in place: the design ends the head 1.6 px inside
                the navigation box, and at 172.6 it stopped 2 to 4 px short of the dashed line.
              */
              &::after {
                inset-inline-start: calc(-175.6 * var(--u));
                inset-block-start: calc(-135.4 * var(--u));
                inline-size: calc(175.6 * var(--u));
                block-size: calc(224.1 * var(--u));
                mask:
                  url("assets/scotties-connector-arrowhead-left.svg") 0 0 / calc(12.8 * var(--u)) calc(22.4 * var(--u))
                  no-repeat,
                  linear-gradient(#000 0 0) calc(11 * var(--u)) calc(9.7 * var(--u)) /
                  calc(113.5 * var(--u)) calc(3 * var(--u)) no-repeat,
                  linear-gradient(#000 0 0) calc(121.5 * var(--u)) calc(11.2 * var(--u)) /
                  calc(3 * var(--u)) calc(100% - 11.2 * var(--u)) no-repeat,
                  linear-gradient(#000 0 0) 100% 100% / calc(100% - 121.5 * var(--u)) calc(3 * var(--u)) no-repeat;
              }
            }
          }
          & .subsection:nth-child(4)>.flex-row {
            --u: calc(100cqw / 1089);
            grid-template-columns:
              minmax(0, 335fr) minmax(0, 67fr) minmax(0, 288fr) minmax(0, 97fr) minmax(0, 274fr) minmax(0, 28fr);
            &>figure {
              grid-area: 1 / 3 / 3;
            }
            &>.note:first-child {
              --box: 301;
              --h: 160;
              --ps: 56;
              --pe: 47;
              --y: 51.8;
              /* 3 longer than the design's 102, so the head ends in the dashed line (3 to 4 px short at 102). */
              --w: 105;
              margin-block: calc(-4 * var(--u)) calc(42 * var(--u));
            }
            &>.note:nth-child(2) {
              --box: 283;
              --h: 199;
              --ps: 34;
              --pe: 29;
              grid-area: 2 / 1;
              margin-block-start: 0;
              margin-inline-start: calc(52 * var(--u));
              &::after {
                inset-inline-start: calc(100% - 5 * var(--u));
                /* The tip ends in the filters box's bottom line, as the design draws it (7 px short at -61). */
                inset-block-start: calc(-69 * var(--u));
                inline-size: calc(111.7 * var(--u));
                block-size: calc(137.7 * var(--u));
                scale: none;
                mask:
                  url("assets/scotties-connector-arrowhead-orange-up.svg") calc(94.3 * var(--u)) 0 /
                  calc(17.4 * var(--u)) calc(15 * var(--u)) no-repeat,
                  linear-gradient(#000 0 0) calc(101.5 * var(--u)) calc(13.5 * var(--u)) /
                  calc(3 * var(--u)) calc(100% - 13.5 * var(--u)) no-repeat,
                  /* Starts at the callout's inner border edge, 5 px into the box. */
                  linear-gradient(#000 0 0) calc(5 * var(--u)) 100% / calc(99.5 * var(--u)) calc(3 * var(--u))
                  no-repeat;
              }
            }
            /* Right of the screen, so its connector runs left again. */
            /* 47.5: the copy wraps as drawn from 183 to 202.5 px in Chromium and Safari. */
            &>.note:last-child {
              --box: 274;
              --h: 238;
              --ps: 35;
              --pe: 47.5;
              /* Ends in the sage line, as the design draws it (4 px short at 98). */
              --x: -103;
              --y: 122;
              --w: 103;
              grid-area: 1 / 5 / 3;
              margin-block-start: calc(14 * var(--u));
              &::after {
                inset-inline-start: calc(var(--x) * var(--u));
                scale: none;
              }
            }
          }
        }
      }
      /*
        The phone design's lo-fi pages: callouts narrower than the column, above and below the screenshot, each
        tied to its part of the screenshot by a 3 px arrow. Lengths are the design's pixels at 390
        (Phone/Scotties.pdf); the arrows between fixed gaps are fixed, the one passing a callout spans grid rows.
      */
      @media(width<40rem) {
        & .subsection:is(:nth-child(3), :nth-child(4))>.flex-row {
          --lofi-unit: calc(1rem / 16 + var(--phone-art-grow));
          display: grid;
          gap: 0;
          &>* {
            grid-column: 1;
            justify-self: start;
            margin-inline: 0;
          }
          /* Above the screenshot, which is positioned too, so each arrowhead lands on it. */
          &>.note {
            position: relative;
            z-index: 1;
            padding-block: calc(18 * var(--lofi-unit));
            padding-inline: calc(22 * var(--lofi-unit));
            &>p {
              margin-block: 0;
            }
            &>p+p {
              margin-block-start: 1em;
            }
          }
          &>.note::after,
          &::after {
            --line: linear-gradient(var(--arrow-color) 0 0);
            inline-size: calc(17.4 * var(--lofi-unit));
            background-image: var(--line), var(--arrow-head);
            background-repeat: no-repeat;
            pointer-events: none;
          }
        }
        & .subsection:nth-child(3)>.flex-row {
          &>.note:first-child {
            grid-row: 1;
            justify-self: center;
            inline-size: calc(263 * var(--lofi-unit));
            /* Less the 5 px dashed outline's extra pixel over a 4 px border, as on the shared rule. */
            padding-block: calc(2.5rem - 1rem / 16) calc(2rem - 1rem / 16);
            padding-inline: calc(2rem - 1rem / 16);
          }
          &>.note:last-child {
            grid-row: 2;
            justify-self: center;
            inline-size: calc(265 * var(--lofi-unit));
            margin-block-start: calc(39 * var(--lofi-unit));
            &::after {
              --arrow-color: var(--color-case-study-heading);
              --arrow-head: url("assets/scotties-connector-arrowhead-orange-down.svg");
              content: "";
              position: absolute;
              inset-block-start: 100%;
              inset-inline-start: calc(112.4 * var(--lofi-unit));
              /*
                Ends in the navigation box's top line, as the design draws it 3 px in (4 px short at 58). It hangs
                from inside the 4 px border, which does not scale, so the border is added on its own: a scaled 63
                overshot the line by 4 to 6 px from 520 px.
              */
              block-size: calc(59 * var(--lofi-unit) + 4rem / 16);
              background-position: calc(7.1 * var(--lofi-unit)) 0, 0 100%;
              background-size: calc(3 * var(--lofi-unit)) calc(100% - 13.5 * var(--lofi-unit)), 100% auto;
            }
          }
          &>figure {
            grid-row: 3;
            justify-self: center;
            inline-size: calc(288 * var(--lofi-unit));
            max-inline-size: none;
            margin-block: calc(54 * var(--lofi-unit)) 0;
          }
        }
        & .subsection:nth-child(4)>.flex-row {
          &>.note:first-child {
            grid-row: 1;
            inline-size: calc(217 * var(--lofi-unit));
            margin-inline-start: calc(21 * var(--lofi-unit));
            &::after {
              --arrow-color: var(--color-case-study-subheading);
              --arrow-head: url("assets/scotties-hi-fi-connector-arrowhead-down.svg");
              content: "";
              position: absolute;
              inset-block-start: 100%;
              inset-inline-start: calc(44.3 * var(--lofi-unit));
              /*
                Ends in the dashed line, as the design draws it (measured 3 px short at 63), plus the callout's 4 px
                border it hangs inside, unscaled (a scaled 67 went 6 px past the line at 639).
              */
              block-size: calc(63 * var(--lofi-unit) + 4rem / 16);
              background-position: calc(7.1 * var(--lofi-unit)) 0, 0 100%;
              background-size: calc(3 * var(--lofi-unit)) calc(100% - 13.5 * var(--lofi-unit)), 100% auto;
            }
          }
          &>figure {
            grid-row: 2;
            inline-size: calc(291 * var(--lofi-unit));
            max-inline-size: none;
            margin-block: calc(40 * var(--lofi-unit)) 0;
            margin-inline-start: calc(30 * var(--lofi-unit));
          }
          &>.note:nth-child(2) {
            grid-row: 3;
            inline-size: calc(248 * var(--lofi-unit));
            margin-block-start: calc(14 * var(--lofi-unit));
            margin-inline-start: calc(21 * var(--lofi-unit));
            &::after {
              --arrow-color: var(--color-case-study-heading);
              --arrow-head: url("assets/scotties-connector-arrowhead-orange-up.svg");
              content: "";
              position: absolute;
              inset-block-end: 100%;
              inset-inline-start: calc(36.2 * var(--lofi-unit));
              /*
                Ends at the dashed line, as the design draws it (measured 5 px short at 285), plus the callout's 4 px
                border it rises inside, unscaled (a scaled 291 went 5 px past the line at 639).
              */
              block-size: calc(287 * var(--lofi-unit) + 4rem / 16);
              background-position: calc(7.1 * var(--lofi-unit)) 100%, 0 0;
              background-size: calc(3 * var(--lofi-unit)) calc(100% - 13.5 * var(--lofi-unit)), 100% auto;
            }
          }
          &>.note:last-child {
            grid-row: 4;
            inline-size: calc(249 * var(--lofi-unit));
            margin-block-start: calc(25 * var(--lofi-unit));
            margin-inline-start: calc(94 * var(--lofi-unit));
          }
          /* The grid callout's arrow passes the filter callout, so it spans the screen's and that callout's rows. */
          &::after {
            --arrow-color: var(--color-case-study-accent);
            --arrow-head: url("assets/scotties-connector-arrowhead-sage-up.svg");
            content: "";
            z-index: 1;
            grid-area: 2 / 1 / 4;
            place-self: stretch start;
            /*
              The client (CF121, of an iPhone): "箭头刺穿了线框" (the arrow pierces the dashed box's line). The tip
              now ends in the sage line instead of 10 px past it. Down to the grid callout's inner border edge: its
              25 px gap plus its 3 px border.
            */
            margin-block: calc(379.2 * var(--lofi-unit)) calc(-25 * var(--lofi-unit) - 3rem / 16);
            margin-inline-start: calc(285.3 * var(--lofi-unit));
            background-position: calc(7.1 * var(--lofi-unit)) 100%, 0 0;
            background-size: calc(3 * var(--lofi-unit)) calc(100% - 13.5 * var(--lofi-unit)), 100% auto;
          }
        }
      }
      /*
        The phone design's hi-fi page: two callouts above the screenshot and two below, narrower than the column,
        each tied to its part of the screenshot by a connector. One grid holds the screenshot in row 3 and, through a
        subgrid, the callouts in rows 1, 2, 4 and 5, so each connector can span the rows between its two ends.
        Lengths are the design's pixels at 390 (Phone/Scotties.pdf).
      */
      @media(width<40rem) {
        & .subsection:nth-child(5)>.flex-row:has(>article) {
          --hifi-unit: calc(1rem / 16 + var(--phone-art-grow));
          display: grid;
          grid-template-rows: repeat(5, auto);
          gap: 0;
          &>figure {
            grid-area: 3 / 1;
            inline-size: calc(286 * var(--hifi-unit));
            /* The connectors scale with the screen, so it may not stop at the 400 px artwork cap (from 545 px). */
            max-inline-size: none;
            margin-block-start: calc(22 * var(--hifi-unit));
            margin-inline: auto;
          }
          &>article {
            display: grid;
            grid-area: 1 / 1 / 6;
            grid-template-rows: subgrid;
            pointer-events: none;
            &>.note {
              grid-column: 1;
              justify-self: start;
              padding-block: calc(24 * var(--hifi-unit));
              padding-inline: calc(26 * var(--hifi-unit));
              pointer-events: auto;
              &>p {
                margin-block: 0;
              }
            }
            &>.note:nth-child(1) {
              grid-row: 1;
              inline-size: calc(258 * var(--hifi-unit));
              margin-inline-start: calc(46 * var(--hifi-unit));
            }
            &>.note:nth-child(2) {
              grid-row: 2;
              inline-size: calc(254 * var(--hifi-unit));
              margin-block-start: calc(14 * var(--hifi-unit));
              margin-inline-start: calc(50 * var(--hifi-unit));
            }
            /* A 23 px end inset sets the copy about 199.5 px wide at 393, inside the 196.75 to 202.5 px where
               Chromium and Safari both break it as drawn; the drawn 26 left it on Safari's edge. */
            &>.note:nth-child(3) {
              grid-row: 4;
              inline-size: calc(253 * var(--hifi-unit));
              margin-block-start: calc(35 * var(--hifi-unit));
              margin-inline-start: calc(36 * var(--hifi-unit));
              padding-inline-end: calc(23 * var(--hifi-unit));
            }
            &>.note:nth-child(4) {
              grid-row: 5;
              inline-size: calc(279 * var(--hifi-unit));
              margin-block-start: calc(8 * var(--hifi-unit));
              margin-inline-start: calc(61 * var(--hifi-unit));
            }
          }
          /* Connectors: 3 px lines drawn as background layers, so each can stretch between rows; arrowheads last. */
          &::before,
          &::after,
          &>article::before,
          &>article::after {
            content: "";
            z-index: 1;
            grid-column: 1;
            place-self: stretch start;
            background-repeat: no-repeat;
            pointer-events: none;
          }
          &::before {
            --line: linear-gradient(var(--color-case-study-subheading) 0 0);
            grid-row: 1 / 3;
            /* To the first callout's inner border edge: it starts 46 px in, behind a 4 px border. */
            inline-size: calc(23.7 * var(--hifi-unit) + 4rem / 16);
            margin-block: calc(100.9 * var(--hifi-unit)) calc(-41 * var(--hifi-unit));
            margin-inline-start: calc(22.3 * var(--hifi-unit));
            background-image: var(--line), var(--line), url("assets/scotties-hi-fi-connector-arrowhead-down.svg");
            background-position: calc(6.9 * var(--hifi-unit)) 0, calc(6.9 * var(--hifi-unit)) 0, 0 100%;
            background-size:
              calc(100% - 6.9 * var(--hifi-unit)) calc(3 * var(--hifi-unit)),
              calc(3 * var(--hifi-unit)) calc(100% - 13.5 * var(--hifi-unit)),
              calc(17.3 * var(--hifi-unit)) calc(15 * var(--hifi-unit));
          }
          &::after {
            --line: linear-gradient(var(--color-case-study-heading) 0 0);
            grid-row: 2 / 4;
            inline-size: calc(53 * var(--hifi-unit));
            margin-block: calc(162 * var(--hifi-unit)) calc(586.8 * var(--hifi-unit));
            margin-inline-start: calc(295 * var(--hifi-unit));
            background-image:
              var(--line), var(--line), var(--line), url("assets/scotties-hi-fi-connector-arrowhead-left.svg");
            /* The top line starts at the second callout's inner border edge (it ends 304 px in, 4 px border). */
            background-position:
              calc(9 * var(--hifi-unit) - 4rem / 16) 0, 100% 0,
              calc(44.5 * var(--hifi-unit)) calc(100% - 7.2 * var(--hifi-unit)), calc(31 * var(--hifi-unit)) 100%;
            background-size:
              calc(100% - 9 * var(--hifi-unit) + 4rem / 16) calc(3 * var(--hifi-unit)),
              calc(3 * var(--hifi-unit)) calc(100% - 7.2 * var(--hifi-unit)),
              calc(8.5 * var(--hifi-unit)) calc(3 * var(--hifi-unit)),
              calc(15 * var(--hifi-unit)) calc(17.4 * var(--hifi-unit));
          }
          &>article::before {
            --line: linear-gradient(var(--color-case-study-accent) 0 0);
            grid-row: 3 / 4;
            inline-size: calc(43 * var(--hifi-unit));
            margin-block: calc(595.3 * var(--hifi-unit)) calc(-121.5 * var(--hifi-unit));
            margin-inline-start: calc(1.5 * var(--hifi-unit));
            background-image:
              url("assets/scotties-hi-fi-connector-arrowhead-right.svg"), var(--line), var(--line), var(--line);
            background-position:
              calc(10.5 * var(--hifi-unit)) 0, 0 calc(7.2 * var(--hifi-unit)), 0 calc(7.2 * var(--hifi-unit)), 0 100%;
            /* The bottom line stops at the third callout's inner border edge (it starts 36 px in, 3 px border). */
            background-size:
              calc(15 * var(--hifi-unit)) calc(17.4 * var(--hifi-unit)),
              calc(12 * var(--hifi-unit)) calc(3 * var(--hifi-unit)),
              calc(3 * var(--hifi-unit)) calc(100% - 7.2 * var(--hifi-unit)),
              calc(34.5 * var(--hifi-unit) + 3rem / 16) calc(3 * var(--hifi-unit));
          }
          &>article::after {
            --line: linear-gradient(var(--color-case-study-subheading) 0 0);
            grid-row: 3 / 5;
            inline-size: calc(17.4 * var(--hifi-unit));
            /* Down to the last callout's inner border edge: its 8 px gap plus its 4 px border. */
            margin-block: calc(855.5 * var(--hifi-unit)) calc(-8 * var(--hifi-unit) - 4rem / 16);
            margin-inline-start: calc(299.8 * var(--hifi-unit));
            background-image: url("assets/scotties-hi-fi-connector-arrowhead-up.svg"), var(--line);
            background-position: 0 0, calc(7.2 * var(--hifi-unit)) calc(13.5 * var(--hifi-unit));
            background-size:
              calc(17.4 * var(--hifi-unit)) calc(15 * var(--hifi-unit)),
              calc(3 * var(--hifi-unit)) calc(100% - 13.5 * var(--hifi-unit));
          }
        }
      }
      /*
        The tablet and desktop designs' hi-fi page, in each design's proportions (620 and 1088 px wide, scaled to the
        column): the screen with its callouts beside it, each tied to its part of the screen by a 3 px connector
        ending in an arrowhead; the desktop design moves the intro and the third callout to the screen's left.
        Lengths are the designs' pixels (Tablet and Desktop/Scotties.pdf).
      */
      @media(width>=40rem) {
        & .subsection:nth-child(5) {
          --u: var(--hifi-wide-unit);
          --hifi-wide-unit: calc(100cqw / 620);
          /* Being a container would make the type growth measure this subsection; keep measuring the page. */
          --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
          container-type: inline-size;
          display: grid;
          grid-template-columns: minmax(0, 12fr) minmax(0, 288fr) minmax(0, 62fr) minmax(0, 258fr);
          &>:is(h3, p) {
            grid-column: 1 / -1;
          }
          &>.flex-row:has(>article),
          & article {
            display: contents;
          }
          & .portrait-artwork {
            grid-area: 3 / 2 / 7;
            align-self: start;
            inline-size: auto;
            max-inline-size: none;
            margin: 0;
          }
          & article>.note {
            --x: -53;
            --y: 113.8;
            --w: 53;
            --ps: 27;
            --pe: 12;
            --h: 219;
            --tint: var(--color-case-study-subheading);
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            grid-column: 4;
            align-self: start;
            box-sizing: border-box;
            /* The design's box height, so the rows keep the design's spacing beside the screen. */
            min-block-size: calc(var(--h) * var(--u));
            margin: 0;
            padding-block: calc(23 * var(--u));
            padding-inline: calc(var(--ps) * var(--u)) calc(var(--pe) * var(--u));
            /*
              Below the tablet design's width the 14 px text wrapped into more lines in the narrower boxes, and each
              callout grew, pushing the later ones and their connectors down (the last one 38 design px below its
              box at 728, 248 at 640). The text now scales with the callout there, keeping the design's line
              breaks, and the design's 23 px inset comes from the box's outer edge, so the border comes off it.
            */
            @media(width<80rem) {
              padding-block: calc(23 * var(--u) - 4rem / 16);
              font-size: min(calc(14rem / 16 + 2 * var(--grow)), calc(14 * var(--u)));
              line-height: round(nearest, min(28rem / 16 + 4 * var(--grow), 28 * var(--u)), 1px);
              letter-spacing: -0.019em;
            }
            /* The desktop composition's 16 px on 32 px text, scaled the same way below its 1440 px design. */
            @media(80rem<=width<90rem) {
              font-size: min(calc(14rem / 16 + 2 * var(--grow)), calc(16 * var(--u)));
              line-height: round(nearest, min(28rem / 16 + 4 * var(--grow), 32 * var(--u)), 1px);
              letter-spacing: -0.019em;
            }
            &>p {
              margin-block: 0;
            }
            &::after {
              content: "";
              position: absolute;
              inset-block-start: calc(var(--y) * var(--u));
              inset-inline-start: calc(var(--x) * var(--u));
              inline-size: calc(var(--w) * var(--u));
              block-size: calc(17.4 * var(--u));
              background-color: var(--tint);
              mask:
                url("assets/scotties-connector-arrowhead-left.svg") 0 50% / calc(15 * var(--u)) calc(17.4 * var(--u))
                no-repeat,
                linear-gradient(#000 0 0) 100% 50% / calc(100% - 13.5 * var(--u)) calc(3 * var(--u)) no-repeat;
              pointer-events: none;
            }
            /*
              The tablet design measures each straight connector from the box's outer edge, but it hangs from inside
              the 4 px border, so its head ended 3 to 4 px short of the dashed line at every width.
            */
            @media(width<80rem) {
              &:not(:nth-child(4))::after {
                inset-inline-start: calc(var(--x) * var(--u) - 4rem / 16);
                inline-size: calc(var(--w) * var(--u) + 4rem / 16);
              }
            }
            &:nth-child(1) {
              grid-row: 3;
              margin-block: calc(12 * var(--u)) calc(15 * var(--u));
            }
            &:nth-child(2) {
              --x: -54.6;
              --y: 131.7;
              --w: 54.6;
              --ps: 22;
              --pe: 10;
              --h: 253;
              --tint: var(--color-case-study-heading);
              grid-row: 4;
              margin-block-end: calc(15 * var(--u));
              margin-inline: calc(2 * var(--u));
            }
            /*
              The client (CF119): "浅绿色的箭头还没有对准绿色虚线框" (the light green arrow is still not aimed at the
              green dashed box). The tablet design draws it to the dark box's top edge, 62 px under the sage box's
              centre; the desktop design aims it at that centre, as here.
            */
            /* 2 longer than the design's 57.6: aimed at the sage box's centre, its line sits further right. */
            &:nth-child(3) {
              --x: -59.6;
              --y: 63.7;
              --w: 59.6;
              --ps: 27;
              --pe: 20;
              --h: 278;
              --tint: var(--color-case-study-accent);
              grid-row: 5;
              margin-block-end: calc(8 * var(--u));
              margin-inline-start: calc(5 * var(--u));
            }
            /* The last connector is an elbow: from the callout's edge, up its vertical, then left to the screen. */
            /* 1.5 longer than the design's 36, bend kept in place, so the head ends in the line (2 px short at 640). */
            &:nth-child(4) {
              --x: -37.5;
              --y: 2.4;
              --w: 37.5;
              --h: 282;
              --elbow: 102.6;
              --v: 25.5;
              --ps: 31;
              --pe: 16;
              grid-row: 6;
              margin-inline-start: calc(-21 * var(--u));
              &::after {
                block-size: calc(var(--elbow) * var(--u));
                mask:
                  url("assets/scotties-connector-arrowhead-left.svg") 0 0 / calc(15 * var(--u)) calc(17.4 * var(--u))
                  no-repeat,
                  linear-gradient(#000 0 0) calc(13.5 * var(--u)) calc(7.2 * var(--u)) /
                  calc((var(--v) - 10.5) * var(--u)) calc(3 * var(--u)) no-repeat,
                  linear-gradient(#000 0 0) calc(var(--v) * var(--u)) calc(7.2 * var(--u)) /
                  calc(3 * var(--u)) calc(100% - 7.2 * var(--u)) no-repeat,
                  linear-gradient(#000 0 0) 100% 100% / calc(100% - var(--v) * var(--u)) calc(3 * var(--u)) no-repeat;
              }
            }
          }
          /* Under the screen, centred on it, and as wide as the labels need. */
          &>.flex-row:has(>.prototype-link) {
            grid-area: 7 / 2;
            justify-self: center;
            align-items: center;
            inline-size: max-content;
            margin-block-start: calc(36 * var(--u));
          }
          /*
            The desktop composition from 1280 px: narrower, its 16 px text outgrows the scaled boxes and pushes the
            last callout past the screen (measured from 1092 up), while the tablet one still lands every arrow.
          */
          @media(width>=80rem) {
            --hifi-wide-unit: calc(100cqw / 1088);
            grid-template-columns:
              minmax(0, 360fr) minmax(0, 39fr) minmax(0, 288fr) minmax(0, 60fr) minmax(0, 341fr);
            /*
              End insets set each copy's measure inside the window where Chromium and Safari both break it as the
              design does at 1440: the intro 268 to 269.5 px, the callouts 255.4 to 255.65, 200 to 228.5, 225 to
              231.5 and 240.3 to 241.85.
            */
            &>h3+p {
              grid-area: 2 / 1 / 4 / 2;
              align-self: start;
              margin-block: calc(64 * var(--u)) 0;
              margin-inline: 0;
              /* Less the 5 px dashed outline's extra pixel over the 4 px border these insets were set against. */
              padding-block: calc(46 * var(--u) - 1rem / 16);
              padding-inline: calc(51 * var(--u) - 1rem / 16) calc(31.7 * var(--u) - 1rem / 16);
            }
            & .portrait-artwork {
              grid-area: 2 / 3 / 6;
            }
            /*
              Each arrowhead ends in its dashed line, as the design draws it: at 1920 the dark and orange tips
              stopped 2 and 5 px short (measured against the overlay's lines).
            */
            & article>.note {
              --x: -55;
              --y: 91.3;
              --w: 55;
              --ps: 33;
              --pe: 44;
              --h: 232;
              grid-column: 5;
              padding-block: calc(32 * var(--u));
              &:nth-child(1) {
                grid-row: 2;
                margin-block: calc(7 * var(--u)) calc(34 * var(--u));
              }
              &:nth-child(2) {
                --x: -60;
                --y: 83.6;
                --w: 60;
                --ps: 43;
                --pe: 28;
                --h: 332;
                grid-row: 3;
                inline-size: calc(307 * var(--u));
                margin-block: 0 calc(36 * var(--u));
                margin-inline: calc(5 * var(--u)) 0;
              }
              /* Left of the screen, so its connector runs the other way. */
              &:nth-child(3) {
                --x: 0;
                --y: 32.3;
                --w: 61.5;
                --ps: 42;
                --pe: 43;
                --h: 317;
                grid-area: 3 / 1 / 5 / 2;
                inline-size: calc(319 * var(--u));
                margin-block: calc(271 * var(--u)) 0;
                margin-inline-start: calc(17 * var(--u));
                &::after {
                  inset-inline-start: 100%;
                  scale: -1 1;
                }
              }
              /* 3.5 longer than the design measure, with the bend kept in place, so the head ends in the dashed line. */
              &:nth-child(4) {
                --x: -50;
                --y: 107.3;
                --w: 50;
                --h: 354;
                --elbow: 118.2;
                --v: 30.5;
                --ps: 42;
                --pe: 34.5;
                grid-row: 4;
                inline-size: calc(326 * var(--u));
                margin-block: 0;
                margin-inline-start: calc(-5 * var(--u));
              }
            }
            &>.flex-row:has(>.prototype-link) {
              grid-area: 6 / 3;
            }
          }
        }
      }
      /*
        All three designs stack the closing links, Mobile over Desktop, with the chevron trail beside the first on
        the desktop and on its own line above them, at the column start, on phones and tablets.
      */
      & .flex-row:has(>.prototype-link) {
        flex-direction: column;
        gap: calc(8rem / 16 + 8 * var(--grow));
        &>* {
          flex: none;
        }
        &::before,
        &>.prototype-link:first-child::before {
          aspect-ratio: 206 / 71;
          background: url("assets/scotties-hi-fi-chevron-trail.svg") center / contain no-repeat;
        }
        @media(width<80rem) {
          &::before {
            content: "";
            align-self: start;
            inline-size: calc(75rem / 16);
            /* The tablet design leaves 31 px between the trail and the first link. */
            margin-block-end: calc(16rem / 16 + 15 * var(--phone-grow));
          }
        }
        /* Phone Scotties sets the trail 31.5 px under the last callout's ink; it sat about 1 px under. */
        @media(width<40rem) {
          &::before {
            margin-block-start: calc(30.5rem / 16);
          }
        }
        @media(width>=80rem) {
          &>.prototype-link:first-child {
            position: relative;
            &::before {
              content: "";
              position: absolute;
              inset-block-start: 50%;
              inset-inline-end: calc(100% + 8rem / 16 + 12 * var(--grow));
              translate: 0 -50%;
              inline-size: calc(40rem / 16 + 63 * var(--grow));
            }
          }
        }
      }
    }
    /*
      The tablet design stacks the two learnings, the first box 416 px from 24 px into its 624 px column, the second
      396 px from 227 px, the boxes 205 px apart under the second badge (Tablet/Scotties.pdf); the desktop sets them
      side by side.
    */
    @media(width>=40rem) and (width<64rem) {
      :where(#scotties-reflection) .flex-row:has(>.note) {
        flex-direction: column;
        align-items: start;
        row-gap: calc(93rem / 16);
        &>.note {
          flex: none;
          &:nth-child(1) {
            inline-size: calc(100% * 416 / 624);
            margin-inline-start: calc(100% * 24 / 624);
          }
          &:nth-child(2) {
            inline-size: calc(100% * 396 / 624);
            margin-inline-start: calc(100% * 227 / 624);
          }
        }
      }
    }
    /*
      The designs' badges, measured outside their 3 px stroke: Phone 118 and 124 px, Tablet 144, Desktop 164; the
      icon about 56 % of the white disc's inside, and the dark disc 10 px left and 2 up of it on the phone, 12 and 3
      on the tablet (Phone, Tablet and Desktop/Scotties.pdf).
    */
    :where(#scotties-reflection) .note {
      --scotties-badge-size: calc(
        120rem / 16 + 24 * var(--phone-grow) + 20 * var(--grow)
      );
      position: relative;
      margin-block-start: calc(var(--scotties-badge-size) - 8rem / 16);
      border: calc(3rem / 16) solid var(--color-case-study-subheading);
      border-radius: calc(20rem / 16);
      box-shadow: calc(-24rem / 16) calc(-15rem / 16) 0 0 var(--color-case-study-subheading);
      &>h3 {
        color: var(--color-case-study-heading);
      }
      &::after {
        content: "";
        position: absolute;
        inset-block-end: calc(100% - 8rem / 16);
        inset-inline-start: 15%;
        box-sizing: border-box;
        inline-size: var(--scotties-badge-size);
        aspect-ratio: 1;
        border: calc(3rem / 16) solid var(--color-case-study-subheading);
        border-radius: 50%;
        box-shadow: calc(-10rem / 16 - 2 * var(--phone-grow))
          calc(-2rem / 16 - 1 * var(--phone-grow)) 0 0 var(--color-case-study-subheading);
        background: var(--scotties-badge-icon) center / 56% no-repeat #fff;
      }
      &:nth-child(1) {
        --scotties-badge-icon: url("assets/scotties-key-learning-skateboard-badge-icon.svg");
      }
      &:nth-child(2) {
        --scotties-badge-icon: url("assets/scotties-key-learning-helmet-badge-icon.svg");
      }
      /*
        The client: "框的左边需要留出边距。" (leave a margin left of the box). Phone Scotties draws the box from 34
        px and its dark backing from 20 px, 14 px left of and 11 px above the box; the backing ran to the screen's edge.
      */
      @media(width<40rem) {
        margin-inline-start: calc(14rem / 16);
        box-shadow: calc(-14rem / 16) calc(-11rem / 16) 0 0 var(--color-case-study-subheading);
      }
    }
    /*
      Desktop Scotties draws the learnings as two 483 px boxes side by side: the first 476 px wide from 74 px into
      the 1086 px column and 280 px under the band, the second 453 px wide 83 px after it and 61 px lower. Each badge
      sits 92 px in and 15 px over its box, the shadows 21 and 12 px up-left of the boxes and 14 and 3 of the
      badges. The second box sets its heading 8 px in from its copy and 9 px further above it. The insets set the
      copy 395 and 379 px wide, inside the 389.5 to 400.5 and 372.5 to 383 px where
      Chromium and Safari both break it as drawn.
    */
    @media(width>=80rem) {
      :where(#scotties-reflection) .flex-row:has(>.note) {
        flex-wrap: nowrap;
        justify-content: start;
        align-items: start;
        gap: 0;
        &>.note {
          flex: none;
          box-sizing: border-box;
          min-block-size: calc(483rem / 16);
          box-shadow: calc(-21rem / 16) calc(-12rem / 16) 0 0 var(--color-case-study-subheading);
          &::after {
            inset-block-end: calc(100% - 12rem / 16);
            inset-inline-start: calc(89rem / 16);
            box-shadow: calc(-14rem / 16) calc(-3rem / 16) 0 0 var(--color-case-study-subheading);
          }
          &:nth-child(1) {
            inline-size: calc(100% * 476 / 1086);
            margin-block-start: calc(160rem / 16);
            margin-inline-start: calc(100% * 74 / 1086);
            padding-block-start: calc(29rem / 16);
            padding-inline: calc(41rem / 16) calc(34rem / 16);
          }
          &:nth-child(2) {
            inline-size: calc(100% * 453 / 1086);
            margin-block-start: calc(221rem / 16);
            margin-inline-start: calc(100% * 83 / 1086);
            padding-block-start: calc(33rem / 16);
            padding-inline: calc(35rem / 16) calc(33rem / 16);
            &>h3 {
              margin-inline-start: calc(8rem / 16);
            }
            &>p {
              margin-block-start: calc(25rem / 16);
            }
          }
        }
      }
    }
  }
}

/* menume: drawings ported from the old styles.css (2026-10-25) unchanged except for variable names. */
.case-study {
  &[data-case-study="menume"] .flex-row:has(>aside):not(:has(>figure)) {
    align-items: stretch;
  }
  &[data-case-study="menume"] {
    &>.content>.project-divider {
      background-color: transparent;
      border-width: 0;
    }
    /* Phone MenuMe draws its one-line band 91 px, the squiggle clear below the text; tablet 86, desktop 146. */
    &>.content>.section>h2 {
      position: relative;
      border-width: 0;
      padding-block:
        calc(26rem / 16 + 27 * var(--grow))
        calc(31rem / 16 - 5 * var(--phone-grow) + 27 * var(--grow));
      &::after {
        content: "";
        position: absolute;
        inset-inline: 0;
      }
    }
  }
  &[data-case-study="menume"] {
    /* The token list runs on from its introduction, at the same pitch. */
    & #menume-design-system>.section-content {
      &>p:has(+ ul) {
        margin-block-end: 0;
      }
      &>p + ul {
        margin-block-start: 0;
      }
    }
    /*
      The delivery list's two bold lead-ins and the contribution card titles: body size on phones and tablets, 18
      over the 16 px body on Desktop (exports of 2026-10-23; Desktop's "Audience Research & Journey Mapping" alone
      at 16 beside three titles at 18 is read as a slip).
    */
    & #menume-design-system ol.paragraph>li>strong,
    & :where(#menume-contributions) .contribution-cards>aside>p:first-child {
      font-size: calc(1em + 2 * var(--grow));
    }
    /* The phone and tablet designs stack the two prototype buttons, 13 px apart; the desktop sets them in a row. */
    @container(width<64rem) {
      & .content>header>.project-summary>.flex-row {
        flex-direction: column;
        align-items: center;
        gap: calc(13rem / 16);
        &>* {
          flex: none;
        }
      }
    }
    --menume-honey: #f7d781;
    --menume-drip: calc(48rem / 16 + 24 * var(--grow));
    --menume-disc: calc(56rem / 16 + 34 * var(--grow));
    --menume-arrow: calc(30rem / 16 + 50 * var(--grow));
    &>.content>.project-divider {
      block-size: calc(26rem / 16 + 23 * var(--grow));
      @media(width<80rem) {
        margin-block-start: calc(35rem / 16 + 148 * var(--grow));
      }
      background-image: url("assets/menume-gold-squiggle-one-period.svg");
      background-size: calc(291rem / 16 + 216 * var(--grow)) 100%;
    }
    &>.content>.section {
      &>h2::after {
        inset-block-end: calc(3rem / 16 + 3 * var(--grow));
        block-size: calc(26rem / 16 + 7 * var(--grow));
        background-image: url("assets/menume-gold-squiggle-one-period.svg");
        background-size: calc(291rem / 16 + 96 * var(--grow)) 100%;
      }
      &>.section-content {
        &>h3:not(.menume-inspiration-quote),
        &>.subsection>h3 {
          &::before {
            content: "";
            display: inline-block;
            inline-size: calc(26rem / 16 + 14 * var(--grow));
            block-size: calc(24rem / 16 + 13 * var(--grow));
            margin-block: -1em;
            margin-inline-end: calc(8rem / 16 + 4 * var(--grow));
            vertical-align: middle;
            background: url("assets/menume-orange-steaming-bowl-glyph.svg") center / contain no-repeat;
          }
        }
      }
      &:where(#menume-overview)>.section-content {
        &>.menume-inspiration-quote {
          --menume-drip-color: var(--menume-honey);
          position: relative;
          box-sizing: border-box;
          --menume-disc: calc(57.7rem / 16 + 10.5 * var(--phone-grow) + 45.2 * var(--grow));
          inline-size: min(calc(100% - var(--menume-disc) / 2), calc(291.5rem / 16 + 53.3 * var(--phone-grow) + 227.2 * var(--grow)));
          margin-block-end: calc(90rem / 16 - 1.6 * var(--phone-grow) + 46.1 * var(--grow));
          margin-inline-start: calc(58 * var(--grow));
          padding-block: calc(23rem / 16 + 5.5 * var(--phone-grow) + 24 * var(--grow));
          padding-inline: 1rem calc(var(--menume-disc) / 2);
          border-radius: calc(24rem / 16) calc(24rem / 16) 0 0;
          background-color: var(--menume-honey);
          color: #000;
          font-family: "Abril Fatface", serif;
          font-size: calc(18rem / 16 + 2 * var(--phone-grow) + 8 * var(--grow));
          font-weight: 400;
          line-height: round(nearest, 2em, 1px);
          text-align: center;
          /*
            Desktop/MenuMe.pdf: the box 94 px under the paragraph's glyph top, its line's glyph top 71 px into it and
            centred 270 px in, and the story card 163 px above the next heading's glyph top.
          */
          @media(width>=80rem) {
            margin-block-start: calc(67rem / 16);
            padding-block: calc(61.5rem / 16) calc(43.5rem / 16);
            padding-inline-start: 2rem;
            &+aside {
              margin-block-end: calc(158rem / 16);
            }
          }
          &::before {
            content: "";
            position: absolute;
            inset-block-start: calc(var(--menume-disc) * 0.13);
            inset-inline-end: calc(var(--menume-disc) / -2);
            inline-size: var(--menume-disc);
            block-size: var(--menume-disc);
            background: url("assets/menume-teal-question-mark-disc.svg") center / contain no-repeat;
            filter: drop-shadow(0 calc(4rem / 16) calc(4rem / 16) rgb(0 0 0 / 25%));
          }
        }
        /*
          The story box, as all three designs draw it: offset toward the column's end under the quote, a thin honey
          border with a soft honey shadow 6 px down, the orange squiggle from the quote's drip over its top corner,
          the pot inside its bottom corner, and an orange brush stroke over that corner (the Phone, Tablet and Desktop MenuMe.pdf).
        */
        &>aside {
          --menume-story-inset: calc(35.5rem / 16 + 121 * var(--phone-grow) + 187 * var(--grow));
          --menume-pot-size: calc(44rem / 16 + 10 * var(--phone-grow) + 10.8 * var(--grow));
          --menume-pot-end: calc(37.5rem / 16 - 10.7 * var(--phone-grow) + 15.8 * var(--grow));
          position: relative;
          box-sizing: border-box;
          /* Never past the column's end, so the brush stroke over its corner stays on narrow phones' screens. */
          inline-size: min(100% - var(--menume-story-inset), calc(265rem / 16 + 167.3 * var(--phone-grow) + 187.7 * var(--grow)));
          margin-inline-start: var(--menume-story-inset);
          padding-block: calc(21rem / 16 + 11 * var(--phone-grow) - 2 * var(--grow)) calc(44rem / 16 - 8 * var(--phone-grow) - 11 * var(--grow));
          padding-inline: calc(18.9rem / 16 + 14 * var(--phone-grow) + 20 * var(--grow)) calc(20.1rem / 16 + 19.4 * var(--phone-grow) + 11.6 * var(--grow));
          border-color: var(--menume-honey);
          border-width: calc(1.5rem / 16);
          border-radius: 0;
          box-shadow: 0 calc(6rem / 16) calc(4rem / 16) var(--menume-honey);
          &>p {
            margin-block: 0;
            /*
              Phones: the pot sits beside the copy's last line only, so that line alone leaves the pot's room: a
              blank box as wide as the pot after the last word. When the last word and the box don't fit together,
              the box takes a line of its own and the pot sits under the copy.
            */
            @media(width<40rem) {
              &::after {
                content: "";
                display: inline-block;
                inline-size: calc(var(--menume-pot-end) + var(--menume-pot-size) + 10rem / 16 - 20.1rem / 16);
              }
            }
            &::before {
              content: "";
              position: absolute;
              inset-block-end: calc(-41rem / 16 + 11.5 * var(--phone-grow) - 39.8 * var(--grow));
              inset-inline-end: calc(-28.5rem / 16 - 1.9 * var(--phone-grow) - 46 * var(--grow));
              inline-size: calc(79.8rem / 16 - 5.7 * var(--phone-grow) + 77.6 * var(--grow));
              block-size: calc(73.5rem / 16 + 3.3 * var(--phone-grow) + 42.5 * var(--grow));
              background: url("assets/menume-inspiration-orange-brush-stroke.svg") center / 100% 100% no-repeat;
            }
          }
          &::before {
            content: "";
            position: absolute;
            inset-block-start: calc(-61.6rem / 16 - 1.2 * var(--phone-grow) - 36 * var(--grow));
            inset-inline-start: calc(-2.3rem / 16 - 12.6 * var(--phone-grow) - 45 * var(--grow));
            inline-size: calc(55.7rem / 16 + 4.7 * var(--phone-grow) + 34.8 * var(--grow));
            aspect-ratio: 557 / 843;
            background: url("assets/menume-inspiration-orange-squiggle.svg") center / contain no-repeat;
          }
          /*
            Wider screens draw the pot beside the copy's last two lines; wrapping freely ran them into it, so the
            copy wraps in a gutter as wide as the pot. On phones that gutter leaves too narrow a column (the
            paragraph's own rule keeps only its last line clear there).
          */
          @media(width>=40rem) {
            padding-inline-end: calc(var(--menume-pot-end) + var(--menume-pot-size) + 10rem / 16);
          }
          &::after {
            content: "";
            position: absolute;
            inset-block-end: calc(18.8rem / 16 + 4.7 * var(--phone-grow) - 6.9 * var(--grow));
            inset-inline-end: var(--menume-pot-end);
            inline-size: var(--menume-pot-size);
            aspect-ratio: 1;
            background: url("assets/menume-teal-cooking-pot-icon.svg") center / contain no-repeat;
          }
        }
        &>.subsection>h3:nth-of-type(2)::before {
          content: none;
        }
        &>.subsection .flex-row>aside {
          --menume-drip-color: var(--color-case-study-heading);
          --menume-box-border: calc(3rem / 16);
          position: relative;
          margin-block-end: calc(var(--menume-drip) * 0.75);
          border-color: var(--color-case-study-heading);
          border-width: var(--menume-box-border);
          border-radius: 0;
          &>h4 {
            color: var(--color-case-study-accent);
          }
          /*
            The phone design centres each heading above a 225 px box (Phone/MenuMe.pdf): the border moves to a
            pseudo-element around the text's row, and the drip still hangs from the box.
          */
          @media(width<40rem) {
            --menume-box-border: 0px;
            --dual-loop-unit: calc(1rem / 16 + var(--phone-art-grow));
            --menume-drip: calc(34 * var(--dual-loop-unit));
            display: grid;
            isolation: isolate;
            flex: none;
            inline-size: calc(225 * var(--dual-loop-unit));
            margin-block-end: calc(33 * var(--dual-loop-unit));
            margin-inline: auto;
            padding: 0;
            border-width: 0;
            &::before {
              content: "";
              z-index: -1;
              grid-area: 2 / 1;
              border: calc(3rem / 16) solid var(--color-case-study-heading);
            }
            /* A grid row of its own: Safari placed the absolutely positioned drip 8 px narrower than the box. */
            &::after {
              position: static;
              grid-area: 3 / 1;
              margin-block-start: calc(var(--menume-drip) / -4);
            }
            /* The design breaks before the parenthesis. */
            &>h4 {
              grid-area: 1 / 1;
              margin-block: 0 calc(10 * var(--dual-loop-unit));
              text-align: center;
              &>span {
                display: block;
              }
            }
            &>p {
              grid-area: 2 / 1;
              margin-block: 0;
              padding-block: calc(22 * var(--dual-loop-unit));
              padding-inline: calc(16 * var(--dual-loop-unit));
            }
          }
        }
        /*
          The bulb's two base bars (y 3262 to 3280 in Desktop/MenuMe.pdf, drawn in all three designs) add 26/216 of
          its width below the old artwork; the phone gap to the label gives that back. Phone MenuMe draws the bulb
          75 px wide, so the 216-unit drawing is 145 px there.
        */
        &>.subsection>.small-illustration:has(img[src*="dual-loop"]) {
          @media(width<40rem) {
            max-inline-size: calc(145rem / 16);
            /* 27.5 px from the bulb's base bar to the label's glyph top, as drawn. */
            margin-block-end: calc(35.5rem / 16 - 145rem / 16 * 26 / 216);
            /*
              The client: "灯泡需要居中" (the bulb needs centring), as Phone/MenuMe.pdf centres it with its squiggle
              off to the right. The bulb's middle is 46 of the drawing's 216 units in, so the drawing moves 62.
            */
            translate: calc(100% * 62 / 216) 0;
          }
        }
        /*
          The phone design breaks the framework heading before "Culinary Framework" and sets it at 16 px on 32 px
          lines (fig 2365:68709).
        */
        &>.subsection:has(>.small-illustration img[src*="dual-loop"])>h3:nth-of-type(2) {
          @media(width<40rem) {
            font-size: calc(16rem / 16);
            line-height: round(nearest, 2em, 1px);
          }
        }
        &>.subsection>h3>span {
          @media(width<40rem) {
            display: block;
          }
        }
        /*
          Tablet MenuMe sets the dual loop three across on its 614 px column: each loop's two-line title centred
          over a 225 and a 229 px box at the column's edges, the bulb (144 px, its squiggle reaching over the second
          title) and the two-line framework label between them, the label 35 px under the bulb and the titles 84 px
          under its top, and 81 px from the drips to the next band. Each box's copy starts 25 px in and 16 px down, at line height 2, over a 34 px drip, and
          wraps at the drawn breaks (186.5 px fits the first box's 183.5 to 189.6 px window in our face).
          Desktop MenuMe keeps the arrangement on its 1086 px column with its own numbers (in `@media(width>=80rem)`).
        */
        @media(width>=40rem) {
          &>.subsection:has(>.small-illustration img[src*="dual-loop"]) {
            --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
            --u: calc(100cqw / 614);
            container-type: inline-size;
            &>.small-illustration {
              inline-size: calc(144 * var(--u));
              max-inline-size: none;
              margin-block-end: 0;
              margin-inline: calc(276 * var(--u)) auto;
            }
            &>h3:nth-of-type(2) {
              margin-block: calc((35 - 144 * 26 / 216) * var(--u)) 0;
              font-size: calc(16 * var(--u));
              line-height: round(nearest, 2em, 1px);
              &>span {
                display: block;
              }
            }
            &>.flex-row:last-child {
              display: grid;
              grid-template-columns: calc(225 * var(--u)) 1fr calc(229 * var(--u));
              gap: 0;
              margin-block: calc(-147 * var(--u)) calc(17 * var(--u));
              &>aside {
                --menume-box-border: 0px;
                --menume-drip: calc(34 * var(--u));
                display: grid;
                /* Equal boxes where the copy wraps into unequal lines. */
                grid-template-rows: auto 1fr auto;
                isolation: isolate;
                margin: 0;
                padding: 0;
                border-width: 0;
                &:last-child {
                  grid-column: 3;
                }
                &::before {
                  content: "";
                  z-index: -1;
                  grid-area: 2 / 1;
                  border: calc(3rem / 16) solid var(--color-case-study-heading);
                }
                &::after {
                  position: static;
                  grid-area: 3 / 1;
                  margin-block-start: calc(var(--menume-drip) / -4);
                }
                &>h4 {
                  grid-area: 1 / 1;
                  margin-block: 0 calc(7 * var(--u));
                  font-size: calc(16 * var(--u));
                  line-height: round(nearest, 1.5em, 1px);
                  text-align: center;
                  &>span {
                    display: block;
                  }
                }
                &>p {
                  grid-area: 2 / 1;
                  margin-block: 0;
                  padding-block: calc(16 * var(--u)) calc(19 * var(--u));
                  padding-inline: calc(25 * var(--u)) calc(13.5 * var(--u));
                }
              }
            }
            /*
              Desktop/MenuMe.pdf: a 301 and a 358 px box from 106 and 677 px into the column, each titled on one
              line 3 px in from its edge, the bulb (exported from this design, 216 px) 495 px in, its 18 px label
              at line height 2 centred 534 px in (under the bulb, not its squiggle), and 121 px from the drips to the
              next band.
            */
            @media(width>=80rem) {
              --u: calc(100cqw / 1086);
              /* 46 px from the last problem line's glyph top to the bulb's top. */
              &>.small-illustration {
                inline-size: calc(216 * var(--u));
                margin-block-start: calc(3 * var(--u));
                margin-inline: calc(495 * var(--u)) auto;
              }
              &>h3:nth-of-type(2) {
                inline-size: calc(216 * var(--u));
                /* 18 px from the bulb's base to the label's glyph top. */
                margin-block-start: calc(11 * var(--u));
                margin-inline-start: calc(426 * var(--u));
                font-size: calc(18 * var(--u));
              }
              &>.flex-row:last-child {
                grid-template-columns: calc(301 * var(--u)) 1fr calc(358 * var(--u));
                margin-block: calc(-134 * var(--u)) calc(11 * var(--u));
                margin-inline: calc(106 * var(--u)) calc(51 * var(--u));
                &>aside {
                  --menume-drip: calc(45 * var(--u));
                  &>h4 {
                    margin-block-end: calc(9 * var(--u));
                    padding-inline-start: calc(3 * var(--u));
                    font-size: calc(18 * var(--u));
                    text-align: start;
                    &>span {
                      display: inline;
                    }
                  }
                  &>p {
                    padding-block: calc(15 * var(--u)) calc(24 * var(--u));
                    padding-inline: calc(30 * var(--u));
                  }
                }
              }
            }
          }
        }
      }
      &:where(#menume-research)>.section-content {
        /*
          The findings, as all three designs draw them: the designer's hand-drawn bubble (263.5 by 211.6 px, 295.6
          wide on desktop) with a looping tail, exported from Phone/MenuMe.pdf and tinted by mask, a 70 px number
          disc (79 on desktop); one column on phones, one over two on tablets, three in a row on desktops.
        */
        &>.flex-row {
          --bubble-inline: calc(263.5rem / 16 + 32.1 * var(--grow));
          --menume-disc: calc(70.3rem / 16 + 8.7 * var(--grow));
          display: flex;
          flex-wrap: wrap;
          justify-content: center;
          gap: calc(119rem / 16 + 3.5 * var(--phone-grow) - 3.6 * var(--grow)) calc(42.4rem / 16 + 5 * var(--grow));
          margin-block: calc(var(--menume-disc) / 2 + 2rem) calc(56rem / 16 + 2rem);
          /* Desktop MenuMe: 146 px from the tails to the persona heading's glyph top. */
          @media(width>=80rem) {
            margin-block-end: calc(177rem / 16);
          }
          @media(width<40rem) {
            flex-direction: column;
            align-items: center;
          }
          @media(40rem<=width<68.25rem) {
            &>:first-child {
              margin-inline: calc((100% - var(--bubble-inline)) / 2);
            }
          }
        }
        &>.flex-row>aside {
          position: relative;
          box-sizing: border-box;
          flex: none;
          inline-size: min(100%, var(--bubble-inline));
          aspect-ratio: 2635 / 2116;
          margin: 0;
          padding-block: calc(35rem / 16 + 4 * var(--grow)) calc(36rem / 16 + 2 * var(--grow));
          padding-inline: calc(27rem / 16 + 3.3 * var(--grow)) calc(14.5rem / 16 - 2.2 * var(--grow));
          border-width: 0;
          border-radius: 0;
          &>p {
            margin-block: 0;
          }
          @media(width>=68.25rem) {
            inline-size: min(var(--bubble-inline), (100% - 2 * (42.4rem / 16 + 5 * var(--grow))) / 3);
          }
          /*
            The bubble, body and tail, as one closed outline (the client: "Why isn't this one shape?"). It was an
            outline mask and a separate tail mask: they met only while the box kept the drawing's proportions, and
            a larger reader font (the client's iPhone set the text a line longer) made the box taller, so the
            outline kept its shape while the tail moved down and the joins broke. This drawing stretches with the
            box instead (`preserveAspectRatio="none"`), the tail 243.64 units deep below the body's 211.6.
          */
          &::before {
            content: "";
            position: absolute;
            inset-block-start: 0;
            inset-inline: 0;
            block-size: calc(100% * 243.64 / 211.6);
            background-color: var(--menume-tint);
            mask: url("assets/menume-finding-bubble.svg") 0 0 / 100% 100% no-repeat;
          }
          &:nth-child(1) {
            --menume-tint: var(--menume-honey);
          }
          &:nth-child(2) {
            --menume-tint: var(--color-case-study-accent);
          }
          &:nth-child(3) {
            --menume-tint: var(--color-case-study-heading);
          }
          &>.menume-finding-number {
            position: absolute;
            inset-block-start: calc(var(--menume-disc) / -2);
            inset-inline-end: 13.5%;
            z-index: 1;
            inline-size: var(--menume-disc);
            margin-block: 0;
            border-radius: 50%;
            background-color: var(--menume-tint);
            box-shadow: 0 calc(4rem / 16) calc(4rem / 16) rgb(0 0 0 / 25%);
            color: var(--color-page-background);
            /* Every design draws the digits 30.6 px tall: Inter's are 0.7275 em. */
            font-family: "Inter", sans-serif;
            font-size: calc(42rem / 16);
            font-weight: 500;
            line-height: round(nearest, var(--menume-disc), 1px);
            text-align: center;
          }
        }
        &>.subsection .alternating-personas {
          isolation: isolate;
          @media(width>=40rem) {
            --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
            --u: calc(100cqw / 614);
            container-type: inline-size;
          }
          /* Desktop MenuMe: 182 px from the last photo's foot to the next band's glyph top. */
          @media(width>=80rem) {
            --u: calc(100cqw / 1086);
            max-inline-size: none;
            /* A percentage, not --u: this element is the container, so cqw here would read the viewport. */
            margin-block-end: calc(1000% / 1086);
          }
          &>.flex-row {
            position: relative;
            &::before,
            &:not(:last-child)::after {
              position: absolute;
              z-index: -1;
              background: center / 100% 100% no-repeat;
            }
            &:not(:last-child)::after {
              content: "";
              inset-block-start: 62%;
              inset-inline-start: 6%;
              inline-size: 62%;
              aspect-ratio: 491 / 320;
              background-image: url("assets/menume-gold-persona-scribble.svg");
            }
            &:nth-child(even)::after {
              scale: -1 1;
              inset-inline: auto 6%;
            }
            &>article {
              &>h4 {
                inline-size: fit-content;
                min-inline-size: calc(120rem / 16 + 48 * var(--grow));
                padding-block: calc(8rem / 16 + 4 * var(--grow));
                padding-inline: calc(24rem / 16);
                font-size: calc(18rem / 16 + 6 * var(--grow));
                text-align: center;
                color: var(--color-case-study-accent);
                position: relative;
                isolation: isolate;
                /*
                  The designs draw the brush as wide as the plate, at its own proportions, centred on the name
                  (MenuMe in the .fig: 108.6 by 34.6 under Alicia and 119.5 by 37.3 under Matthew on phones, 167.9
                  by 53.6 under Alicia on desktops). As the plate's background it kept its proportions inside the
                  box and shrank to the box's height, leaving "Matthew" past both ends; drawn behind the name it
                  can stand taller than the box without moving anything.
                */
                &::before {
                  content: "";
                  position: absolute;
                  z-index: -1;
                  inset-block-start: 50%;
                  inset-inline: 0;
                  aspect-ratio: 1019 / 333;
                  translate: 0 -50%;
                  background: url("assets/menume-yellow-brush-name-plate.svg") center / 100% 100% no-repeat;
                }
              }
              &>p:first-of-type {
                color: var(--color-case-study-accent);
                font-size: calc(1rem + 2 * var(--grow));
                font-weight: 700;
                /* The phone and tablet designs break the longest role before its second part; the desktop does not. */
                &>span {
                  @media(width>=80rem) {
                    display: inline;
                  }
                }
              }
            }
            /*
              The phone design: half-width photos on alternating sides, each text block beside the open side, and
              the scribble in four pieces (vectors from Phone/MenuMe.pdf) running down that side from photo to photo.
              Lengths are the design's pixels at 390.
            */
            @media(width<40rem) {
              --persona-unit: calc(1rem / 16 + var(--phone-art-grow));
              --persona-photo-block-size: calc(190 * 748 / 586 * var(--persona-unit));
              display: block;
              &>figure {
                inline-size: calc(190 * var(--persona-unit));
                margin-inline: 0;
              }
              &>article {
                /*
                  The scribble keeps the 97 px lane it has beside the text at 390; below 390 the drawing shrinks but
                  the body text does not, so the lane stays 97 px and the text narrows.
                */
                max-inline-size: min(225 * var(--persona-unit), 100% - 97rem / 16);
                margin-block-start: calc(29 * var(--persona-unit));
                &>* {
                  margin-block: 0;
                }
                /* Ink gaps from the design (13 and 18), less the subtitle's and body's half-leading. */
                /* The design's plates: 108 wide for the short names, just past the column edge. */
                &>h4 {
                  min-inline-size: calc(54 * var(--persona-unit));
                  margin-block-end: calc(7 * var(--persona-unit));
                  margin-inline-start: calc(-5 * var(--persona-unit));
                  padding-inline: calc(27 * var(--persona-unit));
                  line-height: round(nearest, 19 * var(--persona-unit), 1px);
                }
                /* Below 390 the subtitle shrinks with the photos and scribble, so it stays clear of the loops. */
                &>p:first-of-type {
                  margin-block-end: calc(5 * var(--persona-unit));
                  font-size: min(1rem, 16 * var(--persona-unit));
                }
              }
              &:nth-child(even) {
                &>figure,
                &>article {
                  margin-inline-start: auto;
                }
                &>article {
                  text-align: end;
                  &>h4 {
                    margin-inline: auto calc(-3 * var(--persona-unit));
                  }
                }
              }
              &:first-child::before {
                content: "";
                inset-block-start: calc(-8.5 * var(--persona-unit));
                inset-inline-end: calc(-9.5 * var(--persona-unit));
                inline-size: calc(298.7 * var(--persona-unit));
                aspect-ratio: 298.7 / 249.9;
                background-image: url("assets/menume-phone-persona-scribble-lead-in.svg");
              }
              &:first-child::after {
                inset-block: calc(var(--persona-photo-block-size) - 49 * var(--persona-unit))
                  calc(-3rem - 44.7 * var(--persona-unit));
                inset-inline: auto calc(5.1 * var(--persona-unit));
                inline-size: calc(176.1 * var(--persona-unit));
                aspect-ratio: auto;
                background-image: url("assets/menume-phone-persona-scribble-first-to-second.svg");
              }
              &:nth-child(2)::after {
                inset-block: calc(var(--persona-photo-block-size) - 58.9 * var(--persona-unit))
                  calc(-3rem - 27.1 * var(--persona-unit));
                inset-inline: calc(3.3 * var(--persona-unit)) auto;
                inline-size: calc(201.5 * var(--persona-unit));
                aspect-ratio: auto;
                scale: none;
                background-image: url("assets/menume-phone-persona-scribble-second-to-third.svg");
              }
              &:last-child::before {
                content: "";
                inset-block-start: calc(20.7 * var(--persona-unit));
                inset-inline-end: calc(-6.8 * var(--persona-unit));
                inline-size: calc(307.6 * var(--persona-unit));
                aspect-ratio: 307.6 / 242.8;
                background-image: url("assets/menume-phone-persona-scribble-trail-out.svg");
              }
            }
            /*
              The tablet design: 190 px photos on alternating sides at 62, 386 and 72 px into its 614 px column,
              each text block beside the open side (235, 236 and 280 px wide, the second set to its end) 60, 63 and
              70 px under the photo's top, the rows 46 and 63 px apart, and its own four scribble pieces (vectors
              from Tablet/MenuMe.pdf) running from photo to photo. The plates are the phone's 108 by 35 px.
            */
            @media(width>=40rem) and (width<80rem) {
              /* From the row's own start, which the even rows reverse. */
              justify-content: flex-start;
              align-items: start;
              gap: 0;
              margin-block-start: calc(46 * var(--u));
              &:first-child {
                margin-block-start: calc(22 * var(--u));
              }
              &:last-child {
                margin-block-start: calc(63 * var(--u));
              }
              &>figure {
                flex: none;
                inline-size: calc(190 * var(--u));
                max-inline-size: none;
                margin: 0 0 0 calc(62 * var(--u));
              }
              &>article {
                flex: none;
                inline-size: calc(235 * var(--u));
                margin-block-start: calc(60 * var(--u));
                margin-inline-start: calc(54 * var(--u));
                &>* {
                  margin-block: 0;
                }
                &>h4 {
                  min-inline-size: calc(54rem / 16);
                  margin-block-end: calc(7rem / 16);
                  margin-inline-start: calc(-13 * var(--u));
                  padding-block: calc(8rem / 16);
                  padding-inline: calc(27rem / 16);
                  font-size: calc(18rem / 16);
                  line-height: calc(19rem / 16);
                }
                &>p:first-of-type {
                  margin-block-end: calc(6rem / 16);
                  font-size: 1rem;
                  line-height: round(nearest, 1.5em, 1px);
                }
                /*
                  Below the 744 design width the copy shrinks with its column, so it keeps the 744 lines (4, 4 and
                  3); at 14 px Alicia's ran to a fifth line below 720, and that line crossed the scribble (seen in
                  Safari at 704). From 744 up the shared size applies as before.
                */
                &>p+p {
                  font-size: min(calc(14rem / 16 + 2 * var(--grow)), calc(14 * var(--u)));
                  line-height: round(nearest, 2em, 1px);
                }
              }
              &:nth-child(2) {
                &>figure {
                  margin-inline: 0 calc(38 * var(--u));
                }
                &>article {
                  inline-size: calc(236 * var(--u));
                  margin-block-start: calc(63 * var(--u));
                  margin-inline: 0 calc(81 * var(--u));
                  text-align: end;
                  &>h4 {
                    margin-inline: auto calc(-5 * var(--u));
                  }
                }
              }
              &:nth-child(3) {
                &>figure {
                  margin-inline-start: calc(72 * var(--u));
                }
                &>article {
                  inline-size: calc(280 * var(--u));
                  margin-block-start: calc(70 * var(--u));
                  margin-inline-start: calc(46 * var(--u));
                }
              }
              &::before,
              &::after {
                content: none;
                scale: none;
              }
              &:first-child::before {
                content: "";
                inset-block-start: calc(87 * var(--u));
                inset-inline-start: calc(-1 * var(--u));
                inline-size: calc(245 * var(--u));
                aspect-ratio: 245 / 131;
                background-image: url("assets/menume-tablet-persona-scribble-lead-in.svg");
              }
              &:first-child::after {
                content: "";
                inset-block-start: calc(187 * var(--u));
                inset-inline: calc(199 * var(--u)) auto;
                inline-size: calc(318 * var(--u));
                aspect-ratio: 318 / 208;
                background-image: url("assets/menume-tablet-persona-scribble-first-to-second.svg");
              }
              &:nth-child(2)::after {
                content: "";
                scale: none;
                inset-block-start: calc(147 * var(--u));
                inset-inline: calc(150 * var(--u)) auto;
                inline-size: calc(329 * var(--u));
                aspect-ratio: 329 / 258;
                background-image: url("assets/menume-tablet-persona-scribble-second-to-third.svg");
              }
              &:last-child::before {
                content: "";
                inset-block-start: calc(63 * var(--u));
                inset-inline-start: 0;
                inline-size: calc(251 * var(--u));
                aspect-ratio: 251 / 150;
                background-image: url("assets/menume-tablet-persona-scribble-trail-out.svg");
              }
            }
            /*
              The desktop design: 294 px photos at 170, 656 (136 from the end) and 117 px into its 1086 px column,
              each row starting where the last photo ends; the copy meets an edge 543 px in (the first and third
              start there, the second ends there), 340, 360 and 370 px wide, its plate 115, 82 and 130 px under the
              photo's top; 168 by 53 px plates; and its own four scribble pieces (vectors from Desktop/MenuMe.pdf).
            */
            @media(width>=80rem) {
              justify-content: flex-start;
              align-items: start;
              gap: 0;
              margin-block-start: 0;
              &:first-child {
                margin-block-start: calc(51 * var(--u));
              }
              &:last-child {
                margin-block-start: calc(-2 * var(--u));
              }
              &>figure {
                flex: none;
                inline-size: calc(294 * var(--u));
                max-inline-size: none;
                margin: 0 0 0 calc(170 * var(--u));
              }
              &>article {
                flex: none;
                inline-size: calc(340 * var(--u));
                margin-block-start: calc(115 * var(--u));
                margin-inline-start: calc(79 * var(--u));
                &>* {
                  margin-block: 0;
                }
                /* The design sets each name low on its plate: 17 px from the plate's top to the name's glyph top. */
                &>h4 {
                  min-inline-size: calc(77rem / 16);
                  margin-block-end: calc(12rem / 16);
                  margin-inline-start: calc(-24 * var(--u));
                  padding-block: calc(19rem / 16) calc(5rem / 16);
                  padding-inline: calc(45.5rem / 16);
                  line-height: calc(29rem / 16);
                }
                &>p:first-of-type {
                  margin-block-end: calc(3rem / 16);
                  line-height: round(nearest, 1.5em, 1px);
                }
              }
              &:nth-child(2) {
                &>figure {
                  margin-inline: 0 calc(136 * var(--u));
                }
                &>article {
                  inline-size: calc(360 * var(--u));
                  margin-block-start: calc(82 * var(--u));
                  margin-inline: 0 calc(114 * var(--u));
                  text-align: end;
                  &>h4 {
                    margin-inline: auto calc(-23 * var(--u));
                  }
                }
              }
              &:nth-child(3) {
                &>figure {
                  margin-inline-start: calc(117 * var(--u));
                }
                &>article {
                  inline-size: calc(370 * var(--u));
                  margin-block-start: calc(130 * var(--u));
                  margin-inline-start: calc(132 * var(--u));
                  /* Its plate is drawn 4 px taller, with its role 10 px further down. */
                  &>h4 {
                    margin-block-end: calc(22rem / 16);
                  }
                }
              }
              &::before,
              &::after {
                content: none;
                scale: none;
              }
              &:first-child::before {
                content: "";
                inset-block-start: calc(71 * var(--u));
                inset-inline-start: calc(39 * var(--u));
                inline-size: calc(394 * var(--u));
                aspect-ratio: 394 / 174;
                background-image: url("assets/menume-desktop-persona-scribble-lead-in.svg");
              }
              &:first-child::after {
                content: "";
                inset-block-start: calc(239 * var(--u));
                inset-inline: calc(438 * var(--u)) auto;
                inline-size: calc(492 * var(--u));
                aspect-ratio: 492 / 320;
                background-image: url("assets/menume-desktop-persona-scribble-first-to-second.svg");
              }
              &:nth-child(2)::after {
                content: "";
                scale: none;
                inset-block-start: calc(144 * var(--u));
                inset-inline: calc(263 * var(--u)) auto;
                inline-size: calc(506 * var(--u));
                aspect-ratio: 506 / 397;
                background-image: url("assets/menume-desktop-persona-scribble-second-to-third.svg");
              }
              &:last-child::before {
                content: "";
                inset-block-start: calc(117 * var(--u));
                inset-inline-start: calc(7 * var(--u));
                inline-size: calc(384 * var(--u));
                aspect-ratio: 384 / 230;
                background-image: url("assets/menume-desktop-persona-scribble-trail-out.svg");
              }
            }
          }
        }
      }
      &:where(#menume-information-architecture)>.section-content>.subsection {
        &>h4,
        &:nth-of-type(n+2)>h3 {
          color: var(--color-case-study-accent);
        }
        &:nth-of-type(n+2)>h3::before {
          content: none;
        }
        /*
          Every design numbers the three task flows and centres their headings, the first at 18 px and the other
          two at 16 (18 on the desktop). The tablet gaps are Tablet/MenuMe.png's ink gaps at 744: 51 from the
          introduction to the first heading, 27 and 29 from a heading to its copy, 48 from the copy to the diagram
          and about 52 from a diagram to the next heading.
        */
        &>h4,
        &:nth-of-type(n+2)>h3 {
          text-align: center;
        }
        &>h4 {
          font-size: calc(18rem / 16);
        }
        &:nth-of-type(n+2)>h3 {
          font-size: calc(1rem + 2 * var(--grow));
        }
        @media(width>=40rem) and (width<80rem) {
          &:nth-of-type(n+2) {
            margin-block-start: calc(44rem / 16);
          }
          &>h4 {
            margin-block: calc(34rem / 16) calc(14rem / 16);
          }
          &:nth-of-type(n+2)>h3 {
            margin-block-end: calc(17rem / 16);
          }
          &>.zoomable-artwork {
            margin-block-start: calc(40rem / 16);
          }
          /* 83 from the last diagram to the next section's band. */
          &:last-child>.zoomable-artwork {
            margin-block-end: calc(18rem / 16);
          }
        }
        /*
          The desktop gaps, from Desktop/MenuMe.png's glyph tops and diagram ink at 1440: 92 from the introduction
          to the first heading, 64 from a heading to its copy, about 66 from the copy to its diagram, 79 from a
          diagram to the next heading and 132 from the last diagram to the band.
        */
        @media(width>=80rem) {
          &:nth-of-type(n+2) {
            margin-block-start: calc(72rem / 16);
          }
          &>h4 {
            margin-block: calc(61rem / 16) calc(31rem / 16);
          }
          &>.zoomable-artwork {
            margin-block-start: calc(38rem / 16);
          }
          &:last-child>.zoomable-artwork {
            margin-block-end: calc(12rem / 16);
          }
        }
      }
      /*
        Desktop MenuMe: 149 px from the band to the sitemap heading's glyph top, 94 from the copy to the sitemap
        and 127 from it to the next heading.
      */
      &:where(#menume-information-architecture)>.section-content {
        /* The client, of the phone's one-column tree: "整个居中" (centre the whole thing). */
        @media(width<52rem) {
          &>.sitemap {
            inline-size: fit-content;
            margin-inline: auto;
          }
        }
        @media(width>=80rem) {
          padding-block-start: calc(148rem / 16);
          &>.sitemap {
            margin-block: calc(68rem / 16) 0;
          }
          &>.subsection:first-of-type {
            margin-block-start: calc(128rem / 16);
          }
        }
      }
      /*
        From 1024 px, where the row fits our 14 px labels, the sitemap sets each section's pages side by side under
        it on a bus of their own, as the screenshot in every MenuMe design arranges them; narrower they stack under
        their section (at 744 the row would need 696 px of the 614 px column). From 1280 px the desktop tree follows.
      */
      @media(width>=64rem) and (width<80rem) {
        & .sitemap>ul>li>ul>li>ul {
          position: relative;
          display: flex;
          align-items: flex-start;
          margin-inline-start: 0;
          padding-block-start: var(--case-study-sitemap-gap);
          &::before {
            content: "";
            position: absolute;
            inset-block-start: 0;
            inset-inline-start: var(--case-study-sitemap-trunk);
            block-size: var(--case-study-sitemap-gap);
            border-inline-start: var(--case-study-sitemap-line-width) solid var(--color-case-study-sitemap-line);
          }
          &>li {
            padding-inline: 0 calc(2 * var(--case-study-sitemap-column-padding));
            &::before {
              display: none;
            }
            &::after {
              content: "";
              position: absolute;
              inset-block-start: 0;
              inset-inline: 0;
              border-block-start: var(--case-study-sitemap-line-width) solid var(--color-case-study-sitemap-line);
            }
            &:first-child::after {
              inset-inline-start: var(--case-study-sitemap-trunk);
            }
            &:last-child::after {
              inset-inline-end: calc(100% - var(--case-study-sitemap-trunk) - var(--case-study-sitemap-line-width));
            }
            &>span::before {
              inset-block: calc(-1 * var(--case-study-sitemap-gap)) 100%;
              inset-inline: var(--case-study-sitemap-trunk) auto;
              inline-size: 0;
              border-inline-start: var(--case-study-sitemap-line-width) solid var(--color-case-study-sitemap-line);
              border-block-end: 0;
            }
            &>span::after {
              inset-block: auto 100%;
              inset-inline: calc(var(--case-study-sitemap-trunk) - 5rem / 16 + var(--case-study-sitemap-line-width) / 2) auto;
              translate: none;
              border-inline: calc(5rem / 16) solid transparent;
              border-block-start: calc(8rem / 16) solid var(--color-case-study-sitemap-line);
              border-block-end: 0;
            }
          }
        }
      }
      /*
        Desktop MenuMe draws the sitemap as a centred top-down tree (a FigJam raster in Desktop/MenuMe.pdf): labels
        with an 8 to 9 px cap height, which ours reach at 13 px, in boxes 37 px tall and at least 113 wide; levels
        87 px apart, each line meeting its boxes' middles and each chain running straight down. The sections take
        307, 206, 206 and 258 px of the 977 px tree. Menu Planner sits 150 px into its column over Weekly special
        and Diet Preferences, 37 px apart. Profile & Settings is 65 px tall over Profile and Settings, 7 px in, 25
        apart and 39 px under it. Bars run 24 px under their parent (19 under Profile & Settings). Select from
        fridge needs 131 px for our label where the drawing has 114, and stays centred on its chain.
      */
      @media(width>=80rem) {
        & .sitemap {
          font-size: calc(13rem / 16);
          & li::before,
          & li::after,
          & span::before,
          & span::after,
          & ul::before,
          & ul::after {
            content: none;
          }
          & span {
            min-inline-size: calc(113rem / 16);
            padding-block: calc(8.5rem / 16);
          }
          & ul ul {
            --sitemap-in: calc(50rem / 16);
            display: flex;
            align-items: flex-start;
            margin-inline: 0;
            padding-block-start: calc(50rem / 16);
            &>li {
              display: flex;
              flex-direction: column;
              align-items: center;
              padding: 0;
              /* The incoming line from the bar or the parent, then its arrowhead, both on the box's middle. */
              &>span::before,
              &>span::after {
                content: "";
                position: absolute;
                inset-block: auto 100%;
                inset-inline: 50% auto;
                translate: -50% 0;
              }
              &>span::before {
                inline-size: 0;
                block-size: var(--sitemap-in);
                border-block-end: 0;
                border-inline-start: var(--case-study-sitemap-line-width) solid var(--color-case-study-sitemap-line);
              }
              &>span::after {
                border-inline: calc(5rem / 16) solid transparent;
                border-block-start: calc(8rem / 16) solid var(--color-case-study-sitemap-line);
                border-block-end: 0;
              }
            }
          }
          /*
            The three bars: the parent's drop (`--drop` from the list's start, `--bar-y` long), then the bar from
            `--bar` on. Unweighted, so each list's own rule sets them.
          */
          & ul:where(.sitemap>ul>li>ul, .sitemap>ul>li>ul>li:is(:first-child, :last-child)>ul) {
            --bar-y: calc(24rem / 16);
            position: relative;
            &::before,
            &::after {
              content: "";
              position: absolute;
              inset-block-start: 0;
              border-color: var(--color-case-study-sitemap-line);
              border-style: solid;
              border-width: 0;
            }
            &::before {
              inset-inline-start: var(--drop);
              block-size: var(--bar-y);
              border-inline-start-width: var(--case-study-sitemap-line-width);
            }
            &::after {
              inset-block-start: var(--bar-y);
              inset-inline-start: var(--bar);
              inline-size: var(--bar-size);
              border-block-start-width: var(--case-study-sitemap-line-width);
            }
          }
          &>ul>li {
            &>span {
              min-inline-size: calc(114rem / 16);
            }
            &>ul {
              --sitemap-in: calc(25rem / 16);
              --drop: 50%;
              --bar: calc(206.5rem / 16);
              --bar-size: calc(575.5rem / 16);
              display: grid;
              grid-template-columns: calc(307rem / 16) calc(206rem / 16) calc(206rem / 16) auto;
              &>li {
                align-items: start;
              }
              &>li:nth-child(1) {
                &>span {
                  margin-inline-start: calc(150rem / 16);
                }
                &>ul {
                  --sitemap-in: calc(25rem / 16);
                  --drop: calc(206.5rem / 16);
                  --bar: calc(56.5rem / 16);
                  --bar-size: calc(168.5rem / 16);
                  column-gap: calc(37rem / 16);
                  &>li:nth-child(2)>span {
                    min-inline-size: calc(150rem / 16);
                  }
                }
              }
              &>li:nth-child(2) {
                justify-self: start;
                align-items: center;
                &>span {
                  min-inline-size: calc(162rem / 16);
                }
              }
              &>li:nth-child(3)>span {
                min-inline-size: calc(163rem / 16);
              }
              &>li:nth-child(4) {
                &>span {
                  min-inline-size: calc(126rem / 16);
                  padding-block: calc(22.5rem / 16);
                }
                &>ul {
                  --sitemap-in: calc(20rem / 16);
                  --bar-y: calc(19rem / 16);
                  --drop: calc(56rem / 16);
                  --bar: calc(56rem / 16);
                  --bar-size: calc(138.5rem / 16);
                  column-gap: calc(25rem / 16);
                  margin-inline-start: calc(7rem / 16);
                  padding-block-start: calc(39rem / 16);
                }
              }
            }
          }
        }
      }
      /*
        The end-to-end showcase: the desktop design draws the phone and tablet screens side by side (209 and 600
        px, 25 apart) with both buttons in a row under them; the phone design puts each button under its device.
        The client asked for each button centred under its own device (2026-10-19, "分别中间对齐"), at every width.
      */
      /* Both designs hang the token and delivery lists 22 px in, the delivery bullets in line with its numbers. */
      & :is(ul, ol).paragraph {
        padding-inline-start: calc(22rem / 16);
        & ul {
          padding-inline-start: 0;
          list-style-type: disc;
        }
      }
      & .device-showcase {
        --showcase-unit: calc(1rem / 16 + var(--phone-art-grow));
        display: grid;
        grid-template-columns: minmax(0, 209fr) minmax(0, 600fr);
        align-items: end;
        gap: calc(40rem / 16) calc(25rem / 16);
        max-inline-size: calc(834rem / 16);
        margin-block: 2rem;
        margin-inline: auto;
        &>figure {
          max-inline-size: none;
          margin: 0;
        }
        &>.flex-row {
          display: contents;
        }
        /* A button may outgrow the phone's column; it stays one line, centred on the device. */
        & .prototype-link {
          justify-self: center;
          margin-inline: 0;
          white-space: nowrap;
        }
        @media(width<40rem) {
          grid-template-columns: minmax(0, 1fr);
          row-gap: 0;
          &>figure:first-child {
            grid-row: 1;
            justify-self: center;
            inline-size: calc(153 * var(--showcase-unit));
          }
          & .prototype-link:first-child {
            grid-row: 2;
            margin-block-start: calc(32 * var(--showcase-unit));
          }
          &>figure:nth-child(2) {
            grid-row: 3;
            margin-block-start: calc(50 * var(--showcase-unit));
          }
          & .prototype-link:last-child {
            grid-row: 4;
            margin-block-start: calc(27 * var(--showcase-unit));
          }
        }
      }
      /*
        The Problem & Solution items: centred, with a smaller icon (102, 115 and 152 px wide in the Phone, Tablet and
        Desktop designs) and a teal title; the tablet and desktop designs align each description to its start.
      */
      & .subsection:has(img[src*="mental-overload"])>.flex-row>article {
        text-align: center;
        &>.small-illustration {
          inline-size: calc(
            102rem / 16 + 13 * var(--phone-grow) + 37 * var(--grow)
          );
          margin-block: 0;
          margin-inline: auto;
        }
        &>h4 {
          margin-block: calc(8rem / 16) 0;
          color: var(--color-case-study-accent);
        }
        &>p {
          margin-block-start: 0;
          @media(width>=40rem) {
            text-align: start;
          }
        }
      }
      /*
        Tablet MenuMe leads with the problem at 16 px, line height 2, and sets the two items 47 px under it in
        columns of 260 and 290 px, from 16 px into its 614 px column and at the column's end.
        Desktop MenuMe centres each icon and title 309 and 769 px into its 1086 px column (columns of 252 and 282
        px from 183 and 628), with each description starting at its column's start and wrapping at the drawn
        breaks in 300 and 340 px.
      */
      @media(width>=40rem) {
        & .subsection:has(img[src*="mental-overload"]) {
          &>p {
            font-size: 1rem;
            line-height: round(nearest, 2em, 1px);
          }
          &>.flex-row:has(>article) {
            flex-wrap: nowrap;
            justify-content: space-between;
            align-items: stretch;
            gap: 0;
            margin-block-start: calc(47rem / 16);
            &>article {
              flex: 0 0 calc(260% / 6.14);
              margin-inline-start: calc(16% / 6.14);
              &:last-child {
                flex-basis: calc(290% / 6.14);
                margin-inline-start: 0;
              }
            }
            @media(width>=80rem) {
              justify-content: start;
              margin-block-start: calc(40rem / 16);
              &>article {
                flex-basis: calc(25200% / 1086);
                margin-inline-start: calc(18300% / 1086);
                &:last-child {
                  flex-basis: calc(28200% / 1086);
                  margin-inline-start: calc(19300% / 1086);
                }
              }
              /* Glyph tops: 23 px from the icon to its title, 46 from the title to its description. */
              &>article>h4 {
                margin-block: calc(19rem / 16) calc(13rem / 16);
                white-space: nowrap;
              }
              &>article>p {
                inline-size: calc(300rem / 16);
              }
              &>article:last-child>p {
                inline-size: calc(340rem / 16);
              }
            }
          }
        }
      }
      &:where(#menume-usability)>.section-content {
        /* Desktop MenuMe: 122 px from the band to the introduction's glyph top, 64 from it to the first flow's. */
        @media(width>=80rem) {
          padding-block-start: calc(101rem / 16);
          &>.subsection:first-of-type {
            margin-block-start: calc(33rem / 16);
          }
        }
        &>.subsection {
          /*
            Every design numbers the two flows, at 16 px (18 on the desktop); the phone's two lines 32 apart and
            35 above the first card.
          */
          &>h3 {
            font-size: calc(1rem + 2 * var(--grow));
            @media(width<40rem) {
              margin-block-end: calc(35rem / 16);
              /* Narrow enough to break the second heading after "Balancing", as drawn. */
              padding-inline: calc(20rem / 16);
              line-height: round(nearest, 2em, 1px);
            }
          }
          &>h3::before {
            content: none;
          }
          &>.flex-row:has(>aside) {
            margin-block-end: calc(50 * var(--grow));
          }
          &>.flex-row>aside {
            position: relative;
            border-width: calc(4rem / 16);
            border-radius: calc(24rem / 16);
            &::after {
              content: "";
              position: absolute;
              inset-block-start: calc(100% + 2rem / 16);
              inset-inline-end: 12%;
              inline-size: calc(var(--menume-arrow) * 0.54);
              block-size: var(--menume-arrow);
              background: url("assets/menume-orange-squiggle-arrow-tall.svg") center / contain no-repeat;
            }
            /* The iteration: second in its row, or first in the second row where each note leads its screens. */
            &:is(:last-child, .flex-row + .flex-row>*) {
              border-color: var(--color-case-study-secondary);
              &::after {
                background-image: url("assets/menume-orange-squiggle-arrow-short.svg");
              }
            }
            &:not(:last-child):is(.flex-row + .flex-row>*)::after {
              content: none;
            }
          }
          /*
            The Weekly Specials flow: each note shares a row with its three screens, as the desktop design draws it
            (note 288 wide, centred against screens 211 wide, 16 apart, at 1440).
          */
          &>.flex-row:has(>.screen-set) {
            align-items: center;
            &>aside {
              flex: 288 1 0;
            }
            &>.screen-set {
              display: flex;
              flex: 665 1 0;
              align-items: start;
              gap: calc(8rem / 16 + 8 * var(--grow));
              &>figure {
                flex: 1 1 0;
                min-inline-size: 0;
              }
            }
          }
        }
        & .zoomable-artwork {
          position: relative;
          /*
            The design's highlights, drawn over each weekly-special screen plus a 2 px margin (the last overhangs its
            screen). The personalization screens' picture, rendered from the design, already carries its own.
          */
          &:has(img[src*="weekly-specials-high"])::after {
            content: "";
            position: absolute;
            inset: calc(-200% / 457) calc(-200% / 211.2);
            background-size: 100% 100%;
            pointer-events: none;
          }
          /* The design frames each screen in a 1 px line, olive round the wireframes and teal round the UI. */
          &>button>img[src*="weekly-specials-low"] {
            box-shadow: 0 0 0 calc(1rem / 16) var(--color-case-study-wireframe-frame);
          }
          &>button>img[src*="weekly-specials-high"] {
            box-shadow: 0 0 0 calc(1rem / 16) var(--color-case-study-accent);
          }
          &:has(img[src$="high-fidelity-weekly-special.png"])::after {
            background-image: url("assets/menume-weekly-specials-high-fidelity-weekly-special-highlights.svg");
          }
          &:has(img[src$="high-fidelity-authentic-recipes.png"])::after {
            background-image: url("assets/menume-weekly-specials-high-fidelity-authentic-recipes-highlights.svg");
          }
          &:has(img[src$="high-fidelity-shopping-list.png"])::after {
            background-image: url("assets/menume-weekly-specials-high-fidelity-shopping-list-highlights.svg");
          }
        }
        /*
          The phone design's first flow: the finding beside the lo-fi screen, an orange squiggle down to the hi-fi
          pair, and a yellow elbow from the pair into the iteration, which comes last. The two rows give up their
          boxes so all four parts share one grid. Lengths are the design's pixels at 390 (Phone/MenuMe.pdf).
        */
        @media(width<40rem) {
          &>.subsection:has(img[src*="personalization-low"]) {
            --usability-unit: calc(1rem / 16 + var(--phone-art-grow));
            display: grid;
            &>.flex-row {
              display: contents;
              &>* {
                grid-column: 1;
                align-self: start;
              }
              &>aside {
                padding-block: calc(24 * var(--usability-unit));
                /*
                  Below 390 the box narrows with the art but its text does not, so the side padding gives up more
                  than its share: at 320 "dietary restrictions." fits the line instead of running 5 px past it.
                */
                padding-inline: min(22 * var(--usability-unit), 22rem / 16 + 40 * var(--phone-art-grow));
                &::after {
                  content: none;
                }
                &>p {
                  margin-block: 0;
                }
              }
              &>aside:first-child {
                grid-row: 2;
                justify-self: start;
                inline-size: calc(194 * var(--usability-unit));
                margin-inline-start: calc(-19 * var(--usability-unit));
              }
              &>aside:last-child {
                grid-row: 4;
                justify-self: start;
                inline-size: calc(234 * var(--usability-unit));
                margin-block-start: calc(38 * var(--usability-unit));
                margin-inline-start: calc(39 * var(--usability-unit));
                /*
                  The elbow: from the hi-fi pair's start edge down into this box, a 3 px line and arrowhead, drawn
                  on the box so the head can follow the box's height. It starts 180.5 units below the pair's top
                  (the pair is 292 units wide at 1756 by 1828, then its 2rem margin and this box's 38 units) and
                  45.5 units left of the box; the tip ends in the middle of the 4 px border. The head sits 126
                  units below the box's top, as at 390, but no lower than the end of the box's straight edge (24
                  px corner, half the head): the box's text does not scale with the units, so from about 620 the
                  box is shorter than drawn and the head fell onto its corner, then below it at 639.
                */
                &::before {
                  --line: linear-gradient(var(--color-case-study-secondary) 0 0);
                  content: "";
                  position: absolute;
                  z-index: 1;
                  inset-block-start: calc(
                    (180.5 - 292 * 1828 / 1756 - 38) * var(--usability-unit) - 2rem - 4rem / 16
                  );
                  inset-inline-start: calc(-45.5 * var(--usability-unit) - 4rem / 16);
                  inline-size: calc(45.5 * var(--usability-unit) + 2rem / 16);
                  block-size: calc(
                    (292 * 1828 / 1756 + 38 - 180.5 + 8.7) * var(--usability-unit) + 2rem
                    + min(126 * var(--usability-unit), 100% - 1rem - 8.7 * var(--usability-unit))
                  );
                  background-image:
                    var(--line), var(--line), var(--line), url("assets/menume-usability-connector-arrowhead-right.svg");
                  background-position:
                    0 0, 0 0, 0 calc(100% - 7.2 * var(--usability-unit)),
                    calc(30.5 * var(--usability-unit) + 2rem / 16) 100%;
                  background-size:
                    calc(26 * var(--usability-unit)) calc(3 * var(--usability-unit)),
                    calc(3 * var(--usability-unit)) calc(100% - 7.2 * var(--usability-unit)),
                    calc(32 * var(--usability-unit) + 2rem / 16) calc(3 * var(--usability-unit)),
                    calc(15 * var(--usability-unit)) calc(17.4 * var(--usability-unit));
                  background-repeat: no-repeat;
                  pointer-events: none;
                }
              }
              &>figure:first-child {
                grid-row: 2;
                justify-self: end;
                inline-size: calc(142 * var(--usability-unit));
                margin-block-start: calc(4 * var(--usability-unit));
                margin-inline-end: calc(-16 * var(--usability-unit));
                /* The design's own squiggle (Phone/MenuMe.pdf), its ink 15.75 in and 14.25 under the screen. */
                &::after {
                  content: "";
                  position: absolute;
                  inset-block-start: calc(100% + 14.25 * var(--usability-unit));
                  inset-inline-start: calc(15.75 * var(--usability-unit));
                  inline-size: calc(50.5 * var(--usability-unit));
                  block-size: calc(82.87 * var(--usability-unit));
                  background: url("assets/menume-usability-phone-squiggle-personalization.svg") center / contain no-repeat;
                }
              }
              &>figure:last-child {
                grid-row: 3;
                justify-self: start;
                inline-size: calc(292 * var(--usability-unit));
                margin-block-start: calc(103 * var(--usability-unit));
                margin-inline-start: calc(16 * var(--usability-unit));
              }
            }
          }
          /*
            The phone design's second flow: the finding beside the first lo-fi screen, the other two below, a
            squiggle down to the hi-fi screens in two rows, the iteration beside the third, and a yellow elbow from
            the second screen down into the iteration.
          */
          &>.subsection:has(img[src*="weekly-specials-low"]) {
            --usability-unit: calc(1rem / 16 + var(--phone-art-grow));
            display: grid;
            /* 74 from the iteration to the next section's band, with the section's 64 px padding. */
            margin-block-end: calc(10 * var(--usability-unit));
            &>.flex-row,
            &>.flex-row>.screen-set {
              display: contents;
            }
            & aside,
            & figure {
              grid-column: 1;
              align-self: start;
              justify-self: start;
              flex: none;
              margin-inline: 0;
            }
            /* The design's gaps are all above each screen; its screens are 131 and 132 px inside 1 px frames. */
            & figure {
              margin-block-end: 0;
            }
            & aside {
              padding-block: calc(24 * var(--usability-unit));
              /* As in the first flow: at 320 "visual hierarchies." fits instead of running 4 px past the line. */
              padding-inline: min(22 * var(--usability-unit), 22rem / 16 + 40 * var(--phone-art-grow));
              &::after {
                content: none;
              }
              &>p {
                margin-block: 0;
              }
            }
            &>.flex-row:first-of-type {
              &>aside {
                grid-row: 2;
                inline-size: calc(184 * var(--usability-unit));
                margin-inline-start: calc(-4 * var(--usability-unit));
              }
              & figure:nth-child(1) {
                grid-row: 2;
                inline-size: calc(131 * var(--usability-unit));
                margin-block-start: calc(6 * var(--usability-unit));
                margin-inline-start: calc(190 * var(--usability-unit));
              }
              & figure:nth-child(n+2) {
                grid-row: 3;
                inline-size: calc(132 * var(--usability-unit));
                margin-block-start: calc(20 * var(--usability-unit));
              }
              & figure:nth-child(2) {
                margin-inline-start: calc(37 * var(--usability-unit));
                /* The design's own squiggle (Phone/MenuMe.pdf), its ink 131.25 in and 22.88 under the screen. */
                &::after {
                  content: "";
                  position: absolute;
                  inset-block-start: calc(100% + 22.88 * var(--usability-unit));
                  inset-inline-start: calc(131.25 * var(--usability-unit));
                  inline-size: calc(59.63 * var(--usability-unit));
                  block-size: calc(87.5 * var(--usability-unit));
                  background: url("assets/menume-usability-phone-squiggle-weekly-specials.svg") center / contain no-repeat;
                }
              }
              & figure:nth-child(3) {
                margin-inline-start: calc(188 * var(--usability-unit));
              }
            }
            &>.flex-row:last-of-type {
              &>aside {
                grid-row: 5;
                inline-size: calc(215 * var(--usability-unit));
                margin-block-start: calc(20 * var(--usability-unit));
                margin-inline-start: calc(127 * var(--usability-unit));
                /* The design's text box inside the 4 px border, so the copy wraps line for line as drawn. */
                padding-block: calc(16.4 * var(--usability-unit)) calc(17.6 * var(--usability-unit));
                padding-inline: calc(26 * var(--usability-unit)) calc(20.5 * var(--usability-unit));
              }
              & figure {
                inline-size: calc(132 * var(--usability-unit));
              }
              & figure:nth-child(-n+2) {
                grid-row: 4;
                margin-block-start: calc(134 * var(--usability-unit));
              }
              & figure:nth-child(1) {
                margin-inline-start: calc(-14 * var(--usability-unit));
              }
              & figure:nth-child(2) {
                margin-inline-start: calc(137 * var(--usability-unit));
              }
              & figure:nth-child(3) {
                grid-row: 5;
                margin-block-start: calc(32 * var(--usability-unit));
                margin-inline-start: calc(-15 * var(--usability-unit));
              }
            }
            &::before {
              --line: linear-gradient(var(--color-case-study-secondary) 0 0);
              content: "";
              z-index: 1;
              grid-area: 4 / 1 / 5;
              place-self: stretch start;
              inline-size: calc(39.5 * var(--usability-unit));
              /*
                The foot reaches into the iteration's row by the iteration's 20 unit top margin plus half its 4 px
                border, so it ends in the border as the design draws it, not inside the box (the client, CF116,
                on phone too).
              */
              margin-block: calc(254.3 * var(--usability-unit)) calc(-20 * var(--usability-unit) - 2rem / 16);
              margin-inline-start: calc(271 * var(--usability-unit));
              background-image: url("assets/menume-usability-connector-arrowhead-left.svg"), var(--line), var(--line);
              background-position:
                0 0, calc(13.5 * var(--usability-unit)) calc(7.2 * var(--usability-unit)),
                calc(36.5 * var(--usability-unit)) calc(7.2 * var(--usability-unit));
              background-size:
                calc(15 * var(--usability-unit)) calc(17.4 * var(--usability-unit)),
                calc(26 * var(--usability-unit)) calc(3 * var(--usability-unit)),
                calc(3 * var(--usability-unit)) calc(100% - 7.2 * var(--usability-unit));
              background-repeat: no-repeat;
              pointer-events: none;
            }
          }
        }
        /*
          The desktop design's flows (Desktop/MenuMe.pdf, lengths in its 1086 px column from x 177). The first: the
          finding (378 px) and the iteration (400) 132 apart at 81 px in, an orange squiggle between them, the lo-fi
          screen (213) and the hi-fi pair (440) 50 below with another squiggle between those, and a yellow elbow
          from the iteration's end edge into the second hi-fi screen. The second: the finding (288) beside the
          three lo-fi screens (211 px images, 15 and 16 apart, from 368 px in), the iteration (284) beside the
          three hi-fi screens 131 below, squiggles down from the finding and the second screen, and a yellow arrow
          from the iteration into the first hi-fi screen. The vectors are the design's own; each note's padding
          makes its copy wrap line for line as drawn.
        */
        @media(width>=80rem) {
          &>.subsection:has(img[src*="personalization-low"]) {
            --u: calc(100cqw / 1086);
            /* Being a container would make the type growth measure this flow; keep measuring the page. */
            --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
            container-type: inline-size;
            &>.flex-row {
              justify-content: flex-start;
              gap: 0;
              margin-block: 0;
              &>* {
                flex: none;
                margin-block: 0;
                margin-inline-end: 0;
              }
            }
            &>.flex-row>aside {
              min-block-size: calc(229 * var(--u));
              padding-block: calc(34.5 * var(--u)) calc(26.5 * var(--u));
              &>p {
                margin-block: 0;
              }
              &::after {
                inset-block-start: calc(76 * var(--u));
                inset-inline: calc(416 * var(--u)) auto;
                inline-size: calc(65 * var(--u));
                block-size: calc(92 * var(--u));
                background-image: url("assets/menume-usability-desktop-squiggle-between-notes.svg");
              }
              &:first-child {
                inline-size: calc(378 * var(--u));
                margin-inline-start: calc(81 * var(--u));
                padding-inline: calc(41 * var(--u)) calc(32 * var(--u));
              }
              &:last-child {
                inline-size: calc(400 * var(--u));
                margin-inline-start: calc(132 * var(--u));
                padding-inline: calc(39 * var(--u)) calc(43 * var(--u));
                &::after {
                  content: none;
                }
              }
            }
            &>.flex-row:has(>figure) {
              position: relative;
              align-items: start;
              margin-block-start: calc(50 * var(--u));
              /*
                The elbow hangs from the screens, leaving the iteration 160 px under its top. Its root starts 7
                units into the drawing, 2 units inside the iteration's outer edge, so it ends in the middle of the
                4 px border (the client, CF123: "箭头根部刺穿了线框", the root pierced the box); from x 1 it ran
                4 px into the box.
              */
              &::after {
                content: "";
                position: absolute;
                z-index: 1;
                inset-block-start: calc(-120 * var(--u));
                inset-inline-start: calc(982 * var(--u));
                inline-size: calc(54 * var(--u));
                block-size: calc(215 * var(--u));
                background: url("assets/menume-usability-desktop-connector-elbow.svg") center / 100% 100% no-repeat;
                pointer-events: none;
              }
              &>figure:first-child {
                inline-size: calc(213 * var(--u));
                max-inline-size: none;
                margin-inline-start: calc(156 * var(--u));
                &::after {
                  content: "";
                  position: absolute;
                  inset-block-start: calc(191 * var(--u));
                  inset-inline-start: calc(279 * var(--u));
                  inline-size: calc(82 * var(--u));
                  block-size: calc(116 * var(--u));
                  background: url("assets/menume-usability-desktop-squiggle-between-screens.svg") center / 100% 100%
                    no-repeat;
                }
              }
              &>figure:last-child {
                inline-size: calc(440 * var(--u));
                margin-inline-start: calc(192 * var(--u));
              }
            }
          }
          &>.subsection:has(img[src*="weekly-specials-low"]) {
            --u: calc(100cqw / 1086);
            --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
            container-type: inline-size;
            display: grid;
            grid-template-columns:
              minmax(0, 47fr) minmax(0, 288fr) minmax(0, 33fr) minmax(0, 211fr) minmax(0, 15fr) minmax(0, 211fr)
              minmax(0, 16fr) minmax(0, 211fr) minmax(0, 54fr);
            &>:not(.flex-row) {
              grid-column: 1 / -1;
            }
            &>.flex-row,
            &>.flex-row>.screen-set {
              display: contents;
            }
            & aside,
            & figure {
              grid-column: 2;
              align-self: start;
              justify-self: start;
              flex: none;
              margin: 0;
            }
            & figure {
              inline-size: 100%;
              &:nth-child(1) {
                grid-column: 4;
              }
              &:nth-child(2) {
                grid-column: 6;
              }
              &:nth-child(3) {
                grid-column: 8;
              }
            }
            & aside>p {
              margin-block: 0;
            }
            &>.flex-row:first-of-type {
              & figure {
                grid-row: 2;
              }
              &>aside {
                grid-row: 2;
                inline-size: calc(288 * var(--u));
                margin-block-start: calc(163 * var(--u));
                padding-block: calc(45.5 * var(--u)) calc(37.5 * var(--u));
                padding-inline: calc(38 * var(--u)) calc(10 * var(--u));
                &::after {
                  inset-block-start: calc(100% + 76 * var(--u));
                  inset-inline: calc(125 * var(--u)) auto;
                  inline-size: calc(72 * var(--u));
                  block-size: calc(135 * var(--u));
                  background-image: url("assets/menume-usability-desktop-squiggle-under-finding.svg");
                }
              }
              & figure:nth-child(2)::after {
                content: "";
                position: absolute;
                inset-block-start: calc(100% + 31 * var(--u));
                inset-inline-start: calc(47 * var(--u));
                inline-size: calc(55 * var(--u));
                block-size: calc(105 * var(--u));
                background: url("assets/menume-usability-desktop-squiggle-under-screens.svg") center / 100% 100%
                  no-repeat;
              }
            }
            &>.flex-row:last-of-type {
              & figure {
                grid-row: 3;
                margin-block-start: calc(131 * var(--u));
              }
              &>aside {
                grid-row: 3;
                inline-size: calc(284 * var(--u));
                margin-block-start: calc(152 * var(--u));
                padding-block: calc(43.5 * var(--u)) calc(35.5 * var(--u));
                padding-inline: calc(30 * var(--u)) calc(24 * var(--u));
                /*
                  `:not(:last-child)` matches the weight of the rule that drops the squiggle from second-row notes
                  (`&:not(:last-child):is(.flex-row + .flex-row>*)::after`), which otherwise also removed this
                  arrow; being later, this one wins. Its head reaches over the screen's edge to the dashed card, as
                  drawn, so it paints above the screens.
                */
                &:not(:last-child)::after {
                  content: "";
                  z-index: 1;
                  inset-block-start: calc(148 * var(--u));
                  inset-inline: calc(278 * var(--u)) auto;
                  inline-size: calc(53 * var(--u));
                  block-size: calc(20 * var(--u));
                  background-image: url("assets/menume-usability-desktop-connector-arrow.svg");
                }
              }
            }
          }
        }
        /*
          The tablet design's first flow (Tablet/MenuMe.pdf at 744, lengths in its 614 px column from x 70): the
          finding (221 px) and the iteration (234 px) 82 apart with an orange squiggle between them, the lo-fi
          screen (142 px) and the hi-fi pair (292 px) 58 below with the same squiggle between those, and a yellow
          elbow from the iteration's end edge into the second hi-fi screen; 34 above the heading and 103 under the
          screens. The vectors are the design's own. It holds until the desktop layout: from 1092 px the plain row
          drew the lo-fi screen 400 px wide and 862 tall beside 234 px hi-fi screens.
        */
        @media(40rem<=width<80rem) {
          &>.subsection:has(img[src*="personalization-low"]) {
            --u: calc(100cqw / 614);
            /* Being a container would make the type growth measure this flow; keep measuring the page. */
            --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
            container-type: inline-size;
            /* Its own margin cannot use its own container unit; a share of the column is the same length. */
            margin-block-start: calc(3400% / 614);
            &>h3 {
              margin-block-end: calc(17 * var(--u));
            }
            &>.flex-row {
              justify-content: flex-start;
              gap: 0;
              margin-block: 0;
              &>* {
                flex: none;
                margin-block: 0;
                margin-inline-end: 0;
              }
            }
            &>.flex-row>aside {
              padding-block: calc(18 * var(--u)) calc(13 * var(--u));
              &>p {
                margin-block: 0;
              }
              &::after {
                inset-block-start: calc(107 * var(--u));
                inset-inline: calc(236 * var(--u)) auto;
                inline-size: calc(55 * var(--u));
                block-size: calc(77 * var(--u));
                background-image: url("assets/menume-usability-tablet-squiggle-across.svg");
              }
              &:first-child {
                inline-size: calc(221 * var(--u));
                margin-inline-start: calc(16 * var(--u));
                padding-inline: calc(26 * var(--u)) calc(20 * var(--u));
              }
              &:last-child {
                inline-size: calc(234 * var(--u));
                margin-inline-start: calc(82 * var(--u));
                padding-inline: calc(26 * var(--u)) calc(19 * var(--u));
                &::after {
                  content: none;
                }
              }
            }
            &>.flex-row:has(>figure) {
              position: relative;
              align-items: start;
              /*
                The elbow hangs from the screens, so it leaves the iteration 92 px above its foot however tall. Its
                root starts 10.5 units into the drawing, 2 units inside the iteration's outer edge, so it ends in
                the 4 px border at every tablet width (as the desktop one does after CF123); from 7.5 it ran up to
                3.9 px into the box, more as the column grew.
              */
              &::after {
                content: "";
                position: absolute;
                z-index: 1;
                inset-block-start: calc(-151.8 * var(--u));
                inset-inline-start: calc(540.5 * var(--u));
                inline-size: calc(60.8 * var(--u));
                block-size: calc(240.4 * var(--u));
                background: url("assets/menume-usability-tablet-connector-elbow.svg") center / 100% 100% no-repeat;
                pointer-events: none;
              }
              /* With the next flow's 70 px margin, which this container does not collapse with. */
              margin-block: calc(58 * var(--u)) calc(33 * var(--u));
              &>figure:first-child {
                inline-size: calc(142 * var(--u));
                max-inline-size: none;
                margin-inline-start: calc(20 * var(--u));
                &::after {
                  content: "";
                  position: absolute;
                  inset-block-start: calc(122 * var(--u));
                  inset-inline-start: calc(165 * var(--u));
                  inline-size: calc(55 * var(--u));
                  block-size: calc(77 * var(--u));
                  background: url("assets/menume-usability-tablet-squiggle-across.svg") center / 100% 100% no-repeat;
                }
              }
              &>figure:last-child {
                inline-size: calc(292 * var(--u));
                margin-inline-start: calc(94 * var(--u));
              }
            }
          }
        }
        /*
          The tablet design's second flow (620 px wide at 744, scaled to the column): the finding beside the three
          lo-fi screens, squiggles down from the finding and from the second screen to the hi-fi screens, and the
          iteration under them, joined to the first hi-fi screen by a yellow elbow. It holds until the desktop
          layout: from 1092 px the plain row put the iteration beside the hi-fi screens with no squiggle or arrow.
        */
        @media(40rem<=width<80rem) {
          &>.subsection:has(img[src*="weekly-specials-low"]) {
            --usability-unit: calc(100cqw / 620);
            /* Being a container would make the type growth measure this flow; keep measuring the page. */
            --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
            container-type: inline-size;
            display: grid;
            /* 75 from the iteration to the next section's band, with the section's 64 px padding. */
            margin-block-end: calc(1100% / 620);
            grid-template-columns:
              minmax(0, 184fr) minmax(0, 17fr) minmax(0, 134fr) minmax(0, 9fr) minmax(0, 134fr) minmax(0, 7fr)
              minmax(0, 135fr);
            &>:not(.flex-row) {
              grid-column: 1 / -1;
            }
            &>h3 {
              margin-block-end: calc(41 * var(--usability-unit));
            }
            &>.flex-row,
            &>.flex-row>.screen-set {
              display: contents;
            }
            & aside,
            & figure {
              align-self: start;
              flex: none;
              margin: 0;
            }
            /* The columns are the design's 1 px frames; each screen sits inside its own. */
            & figure {
              margin: calc(1 * var(--usability-unit));
              &:nth-child(1) {
                grid-column: 3;
              }
              &:nth-child(2) {
                grid-column: 5;
              }
              &:nth-child(3) {
                grid-column: 7;
              }
            }
            & aside>p {
              margin-block: 0;
            }
            &>.flex-row:first-of-type {
              & figure {
                grid-row: 2;
              }
              &>aside {
                grid-area: 2 / 1;
                margin-block-start: calc(57 * var(--usability-unit));
                /* The design's text box inside the 4 px border, so the copy wraps line for line as drawn. */
                padding-block: calc(21.4 * var(--usability-unit)) calc(27.6 * var(--usability-unit));
                padding-inline: calc(25 * var(--usability-unit)) calc(7.5 * var(--usability-unit));
                &::after {
                  inset-block-start: calc(100% + 32 * var(--usability-unit));
                  inset-inline-start: calc(83.6 * var(--usability-unit));
                  inline-size: calc(61.4 * var(--usability-unit));
                  block-size: calc(114 * var(--usability-unit));
                  background-image: url("assets/menume-usability-tablet-squiggle-down-left.svg");
                }
              }
              /*
                The design draws this squiggle as a body plus a separate arrowhead; the artwork now carries both
                (the client, CF116: "这个箭头的末端没有显示", the arrow's end was missing), its box grown by the head
                so the body stays put.
              */
              & figure:nth-child(2)::after {
                content: "";
                position: absolute;
                inset-block-start: calc(100% + 6.07 * var(--usability-unit));
                inset-inline-start: calc(25.28 * var(--usability-unit));
                inline-size: calc(48.42 * var(--usability-unit));
                block-size: calc(95.1 * var(--usability-unit));
                background: url("assets/menume-usability-tablet-squiggle-down.svg") center / contain no-repeat;
              }
            }
            &>.flex-row:last-of-type {
              & figure {
                grid-row: 3;
                margin-block-start: calc(92 * var(--usability-unit));
              }
              &>aside {
                --line: linear-gradient(var(--color-case-study-secondary) 0 0);
                grid-area: 4 / 1 / 5 / 6;
                justify-self: start;
                inline-size: calc(430 * var(--usability-unit));
                margin-block-start: calc(25 * var(--usability-unit));
                padding-block: calc(20.4 * var(--usability-unit)) calc(18.6 * var(--usability-unit));
                padding-inline: calc(26 * var(--usability-unit)) calc(10.2 * var(--usability-unit));
                &::after {
                  content: none;
                }
                /*
                  Offsets are from the padding edge, inside the 4 px border. The design stops the elbow at the box's
                  edge (the client, CF116: "箭头的根部刺穿了文字框", the root pierced the text box), so its foot
                  ends in the middle of the border instead of 5 px inside the box.
                */
                &::before {
                  content: "";
                  position: absolute;
                  z-index: 1;
                  inset-block-start: calc(-212.2 * var(--usability-unit));
                  inset-inline-start: calc(147.5 * var(--usability-unit));
                  /*
                    The design's tip is 1.4 px past the Ground Beef dashed line's outer edge (Arrow 36 tip x 274.0,
                    Rectangle 97 x 272.6). With the design's full 61.5 run the head landed 4 to 6 px past it, onto
                    the photo, at 640 to 1091, so the run is 3.5 units shorter and the root stays put.
                  */
                  inline-size: calc(58 * var(--usability-unit));
                  block-size: calc(212.2 * var(--usability-unit) - 2rem / 16);
                  background-image: url("assets/menume-usability-connector-arrowhead-right.svg"), var(--line), var(--line);
                  background-position:
                    calc(43 * var(--usability-unit)) 0, 0 calc(7.2 * var(--usability-unit)),
                    0 calc(7.2 * var(--usability-unit));
                  background-size:
                    calc(15 * var(--usability-unit)) calc(17.4 * var(--usability-unit)),
                    calc(44.5 * var(--usability-unit)) calc(3 * var(--usability-unit)),
                    calc(3 * var(--usability-unit)) calc(100% - 7.2 * var(--usability-unit));
                  background-repeat: no-repeat;
                  pointer-events: none;
                }
              }
            }
          }
        }
      }
      &:where(#menume-contributions)>.section-content {
        &>.contribution-cards {
          counter-reset: menume-card;
          &>aside {
            --menume-tint: var(--color-case-study-heading);
            counter-increment: menume-card;
            position: relative;
            border-color: var(--menume-tint);
            border-width: calc(4rem / 16);
            border-block-end-width: calc(8rem / 16);
            border-radius: 0;
            &:nth-child(2) {
              --menume-tint: var(--menume-honey);
            }
            &:nth-child(3) {
              --menume-tint: var(--color-case-study-accent);
            }
            &>p:first-child {
              font-weight: 700;
            }
            &::before {
              content: "";
              position: absolute;
              inset-block-start: calc(-30rem / 16);
              inset-inline-start: calc(-26rem / 16);
              inline-size: calc(96rem / 16);
              block-size: calc(51rem / 16);
              background: url("assets/menume-contribution-brush-tape.svg") center / contain no-repeat;
            }
            &::after {
              content: counter(menume-card);
              content: counter(menume-card) / "";
              position: absolute;
              inset-block-end: calc(var(--menume-disc) / -3);
              inset-inline-end: calc(var(--menume-disc) / -3);
              display: flex;
              justify-content: center;
              align-items: center;
              inline-size: var(--menume-disc);
              block-size: var(--menume-disc);
              border-radius: 50%;
              background-color: var(--menume-tint);
              box-shadow: 0 calc(4rem / 16) calc(4rem / 16) rgb(0 0 0 / 25%);
              color: var(--color-page-background);
              /* Every design draws the digits 30.6 px tall: Inter's are 0.7275 em. */
              font-family: "Inter", sans-serif;
              font-size: calc(42rem / 16);
              font-weight: 500;
              line-height: round(nearest, 1em, 1px);
            }
          }
          /*
            The phone and tablet designs draw the same card: 260 px wide, the title right above the text, a 64 px
            badge 12 px past the end and 30 below, and the brush tape over the top corner (Phone/MenuMe.pdf).
            The phone alternates them, the odd ones 23 px into the column and the even ones at its end, 103 px
            apart; the tablet sets them two across, 37 px into its 614 px column from x 70 and 42 apart, the rows
            335 px from top to top, with 50 px numerals (Tablet/MenuMe.pdf).
          */
          @media(width<40rem) {
            flex-direction: column;
            align-items: start;
            gap: calc(103 * var(--card-unit));
            &>aside {
              margin-inline: calc(23 * var(--card-unit)) 0;
              &:nth-child(even) {
                margin-inline-start: auto;
              }
            }
          }
          @media(width<80rem) {
            --card-unit: calc(1rem / 16 + var(--phone-art-grow));
            @media(width>=40rem) {
              --card-unit: calc(1rem / 16);
            }
            &>aside {
              --menume-disc: calc(64 * var(--card-unit));
              flex: none;
              inline-size: calc(260 * var(--card-unit));
              margin-block: 0;
              padding-block: calc(16 * var(--card-unit)) calc(20 * var(--card-unit));
              padding-inline: calc(24 * var(--card-unit));
              &>p {
                margin-block: 0;
              }
              &::before {
                inset-block-start: calc(-34 * var(--card-unit));
                inset-inline-start: calc(-43 * var(--card-unit));
                inline-size: calc(92 * var(--card-unit));
                block-size: calc(70 * var(--card-unit));
              }
              &::after {
                inset-block-end: calc(-30 * var(--card-unit) - 8rem / 16);
                inset-inline-end: calc(-12.5 * var(--card-unit) - 4rem / 16);
                font-size: calc(42 * var(--card-unit));
              }
            }
          }
          @media(40rem<=width<80rem) {
            display: flex;
            flex-wrap: wrap;
            justify-content: start;
            align-items: stretch;
            gap: calc(34rem / 16) 0;
            &>aside {
              flex: 0 0 calc(26000% / 614);
              inline-size: auto;
              min-block-size: calc(301rem / 16);
              margin-inline: calc(3740% / 614) 0;
              /* The design's text box is 214 px; ours keeps its thicker border, so the end padding gives way. */
              padding-inline-end: calc(13.5rem / 16);
              &:nth-child(even) {
                margin-inline-start: calc(4200% / 614);
              }
              padding-block-start: calc(19rem / 16);
            }
          }
          /*
            The desktop design sets the cards two by two: 434 by 253 px, 67 px into its 1086 px column and 67
            apart, the rows 96 apart, each card's copy on a 360 px measure, its tape 72 px before and 57 above the
            corner, and a 90 px badge 31 past the end and 34 below (Desktop/MenuMe.pdf).
          */
          @media(width>=80rem) {
            display: flex;
            flex-wrap: wrap;
            justify-content: start;
            align-items: stretch;
            gap: calc(96rem / 16) 0;
            &>aside {
              --menume-disc: calc(90rem / 16);
              flex: 0 0 calc(43400% / 1086);
              min-block-size: calc(253rem / 16);
              margin: 0 0 0 calc(6700% / 1086);
              padding-block: calc(22rem / 16) calc(16rem / 16);
              padding-inline: calc(43rem / 16) calc(23rem / 16);
              /* The fourth card's copy starts 60 px in and wraps on 341. */
              &:nth-child(4) {
                padding-inline: calc(56rem / 16) calc(29rem / 16);
              }
              &>p {
                margin-block: 0;
              }
              /*
                The badge reaches 36 px into the copy's last line, which below 1426 px can run that far: a
                spacer after the last word keeps it clear, and moves to a line of its own only when the line
                is full.
              */
              &>p:last-child::after {
                content: "";
                display: inline-block;
                inline-size: calc(40rem / 16);
              }
              &::before {
                inset-block-start: calc(-57rem / 16);
                inset-inline-start: calc(-72rem / 16);
                inline-size: calc(152rem / 16);
                block-size: calc(118rem / 16);
              }
              &::after {
                inset-block-end: calc(-34rem / 16);
                inset-inline-end: calc(-31rem / 16);
                font-size: calc(50rem / 16);
              }
            }
          }
        }
        /*
          The tablet design: the section heading 156 px under the band and the cards' tops 77 under its baseline,
          and Key Learnings 124 under the second row; that heading is 16 px on the phone and tablet, 22 on the
          desktop.
        */
        @media(40rem<=width<80rem) {
          padding-block-start: calc(49rem / 16);
          &>h3 {
            margin-block-end: calc(70rem / 16);
          }
          &>.subsection {
            margin-block-start: calc(96.5rem / 16);
            &>h3 {
              margin-block-end: calc(37rem / 16);
            }
          }
          /* 158 from the second learning's box to the closing quote's first baseline. */
          &>.closing-reflection {
            margin-block-start: calc(138rem / 16);
          }
        }
        /*
          The desktop design: the cards' tops 149 px under the heading's glyph top, Key Learnings 161 under the
          second row, and its first learning heading 149 under it.
        */
        @media(width>=80rem) {
          &>h3 {
            margin-block-end: calc(116rem / 16);
          }
          &>.subsection {
            margin-block-start: calc(160rem / 16);
            &>h3 {
              margin-block-end: calc(112rem / 16);
            }
          }
          /* The closing quote 140 under the drips (its margin collapses with the last learning's). */
          &>.closing-reflection {
            margin-block-start: calc(213rem / 16);
          }
        }
        &>.subsection>h3 {
          font-size: calc(1rem + 6 * var(--grow));
        }
        &>.subsection {
          &>h4 {
            color: var(--color-case-study-accent);
            &::before {
              content: "";
              display: inline-block;
              inline-size: calc(20rem / 16 + 8 * var(--grow));
              block-size: calc(20rem / 16 + 8 * var(--grow));
              margin-inline-end: calc(8rem / 16);
              vertical-align: middle;
              background: url("assets/menume-teal-lightbulb-icon.svg") center / contain no-repeat;
            }
            &:nth-of-type(2)::before {
              background-image: url("assets/menume-teal-network-icon.svg");
            }
          }
          &>aside {
            --menume-drip-color: var(--menume-honey);
            position: relative;
            margin-block-end: calc(var(--menume-drip) * 0.75);
            border-width: 0;
            border-radius: calc(24rem / 16) calc(24rem / 16) 0 0;
            background-color: var(--menume-honey);
            /*
              The designs draw the copy above the drip, which starts a quarter of its depth inside the box; the
              tablet copy's last line sits in that band (Tablet/MenuMe in the .fig: drip from 12012, copy to 12024).
            */
            &>p {
              position: relative;
              z-index: 1;
            }
          }
          /*
            The tablet and desktop designs stagger the two learnings: each box 83.5% of the column, the second at
            its end, each heading starting in line with its box's text.
          */
          @media(width>=40rem) {
            &>:is(h4, aside) {
              box-sizing: border-box;
              inline-size: 83.5%;
              &:nth-of-type(2) {
                margin-inline-start: auto;
              }
            }
            &>h4 {
              padding-inline-start: 2rem;
            }
            /* The drip clears the next heading by 49 px at 744 and 80 at 1440. */
            &>aside {
              margin-block-end: calc(var(--menume-drip) * 0.75 + 33rem / 16 + 31 * var(--grow));
            }
          }
          /*
            The tablet design puts each heading's icon at its box's edge and its text in line with the box's copy,
            the copy 20 px under the box's top on a 458 px measure, and drips 83 px deep (Tablet/MenuMe.pdf).
          */
          @media(40rem<=width<80rem) {
            &>h4 {
              margin-block-end: calc(22rem / 16);
              padding-inline-start: calc(4rem / 16);
            }
            &>aside {
              --menume-drip: calc(83rem / 16);
              margin-block-end: calc(var(--menume-drip) * 0.75 + 43rem / 16);
              padding-block: calc(20rem / 16) calc(11rem / 16);
              padding-inline: 2rem calc(22.5rem / 16);
              &>p {
                margin-block: 0;
              }
            }
          }
          /*
            The desktop design: an 818 and an 828 px box from 52 and 204 px into the 1086 px column, each heading's
            icon at its box's edge and its text in line with the copy, 44 and 49 px into the box, the copy on 736
            and 745 px measures 40 px under the box's top, and drips about 69 px deep.
          */
          @media(width>=80rem) {
            &>:is(h4, aside) {
              margin-inline-start: calc(5200% / 1086);
            }
            &>:is(h4, aside):nth-of-type(1) {
              inline-size: calc(81800% / 1086);
            }
            &>:is(h4, aside):nth-of-type(2) {
              inline-size: calc(82800% / 1086);
              margin-inline-start: calc(20400% / 1086);
            }
            &>h4 {
              margin-block-end: calc(37rem / 16);
              padding-inline-start: 0;
              &::before {
                margin-inline-end: calc(16rem / 16);
              }
            }
            &>aside {
              --menume-drip: calc(92rem / 16);
              margin-block-end: calc(var(--menume-drip) * 0.75 + 73rem / 16);
              padding-block: calc(35rem / 16) calc(26rem / 16);
              padding-inline: calc(44rem / 16) calc(38rem / 16);
              &:nth-of-type(2) {
                padding-inline: calc(49rem / 16) calc(40rem / 16);
              }
              &>p {
                margin-block: 0;
              }
            }
          }
          /* The phone design centres the headings over full-width boxes with a 60 px drip (Phone/MenuMe.pdf). */
          @media(width<40rem) {
            --learning-unit: calc(1rem / 16 + var(--phone-art-grow));
            &>h4 {
              margin-block: 0 calc(24 * var(--learning-unit));
              text-align: center;
            }
            &>aside {
              --menume-drip: calc(60 * var(--learning-unit));
              margin-block-end: calc(var(--menume-drip) * 0.75 + 100 * var(--learning-unit));
              padding-block: calc(20 * var(--learning-unit));
              padding-inline: calc(23 * var(--learning-unit));
            }
          }
        }
        &>.closing-reflection {
          color: #000;
        }
      }
    }
    &>.content :is(
      .menume-inspiration-quote,
      :where(#menume-overview) .flex-row>aside,
      :where(#menume-contributions) .subsection>aside
    )::after {
      content: "";
      position: absolute;
      inset-block-start: calc(100% - var(--menume-drip) / 4 + var(--menume-box-border, 0px));
      inset-inline: calc(-1 * var(--menume-box-border, 0px));
      block-size: var(--menume-drip);
      background-color: var(--menume-drip-color);
      /*
        The designs' own drip path (Phone/MenuMe.pdf), stretched to each box as every design stretches it; the box
        overlaps only its solid top quarter, so the gaps between drips show the page.
      */
      mask: url("assets/menume-honey-drip.svg") 0 0 / 100% 100% no-repeat;
    }
  }
}

/* tales: drawings ported from the old styles.css (2026-10-25) unchanged except for variable names. */
.case-study {
  & .spiral-notepad {
    aspect-ratio: 486 / 346;
    max-inline-size: calc(322rem / 16 + 164 * var(--grow));
    text-align: start;
    &>p {
      margin-block-start: 12%;
      /* Line pitch grows from 1.6 toward the design's 2 as the pad widens past its 322px phone width. */
      line-height: round(nearest, 1.6em + 0.039 * clamp(0rem, 100cqi - 322rem / 16, 164rem / 16), 1px);
    }
  }
  /*
    The client's bubbles: a yellow fill under a purple outline, two files each. These base insets are the layers'
    place relative to the bubble box in the earlier desktop design (box units: play 411 by 392, trust 413 by 415,
    the box's own ratio), kept for tablet and phone, whose designs did not change; the Key Insights `width>=80rem`
    block overrides them from the 2026OCT222006 file. The box, and the text in it, stay where they were; the fills
    reach past the box as drawn.
  */
  & :is(.play-speech-bubble, .trust-speech-bubble) {
    position: relative;
    isolation: isolate;
    &::before,
    &::after {
      content: "";
      position: absolute;
      z-index: -1;
      background-size: 100% 100%;
      background-repeat: no-repeat;
    }
  }
  & .play-speech-bubble {
    aspect-ratio: 411 / 392;
    /*
      Phone: the client's fill narrows toward the tail, so at the shared 21% end inset "stories." ran off the yellow
      (320 to 424 and 584 to 639 px). 23% keeps every line on the fill, balanced or plainly wrapped, and plain
      wrapping then ends on "stories." alone, as the phone design does.
    */
    &>* {
      margin-inline: 13% 23%;
    }
    &::before {
      inset-block-start: calc(-15.38 / 392 * 100%);
      inset-inline-start: calc(7.14 / 411 * 100%);
      inline-size: calc(399.82 / 411 * 100%);
      block-size: calc(364.49 / 392 * 100%);
      background-image: url("assets/tales-play-insight-speech-bubble-fill.svg");
    }
    &::after {
      inset-block-start: calc(5.53 / 392 * 100%);
      inset-inline-start: calc(0.77 / 411 * 100%);
      inline-size: calc(409.92 / 411 * 100%);
      block-size: calc(372.57 / 392 * 100%);
      background-image: url("assets/tales-play-insight-speech-bubble-outline.svg");
    }
  }
  & .trust-speech-bubble {
    aspect-ratio: 413 / 415;
    &::before {
      inset-block-start: calc(29.16 / 415 * 100%);
      inset-inline-start: calc(57.45 / 413 * 100%);
      inline-size: calc(362.76 / 413 * 100%);
      block-size: calc(397.61 / 415 * 100%);
      background-image: url("assets/tales-trust-insight-speech-bubble-fill.svg");
    }
    &::after {
      inset-block-start: calc(5.61 / 415 * 100%);
      inset-inline-start: calc(8.8 / 413 * 100%);
      inline-size: calc(389.31 / 413 * 100%);
      block-size: calc(409.92 / 415 * 100%);
      background-image: url("assets/tales-trust-insight-speech-bubble-outline.svg");
    }
    &>* {
      margin-inline: 23% 11%;
    }
  }
  &[data-case-study="tales"] {
    /* Phone and Tablet Tales draw the Doodle pill 178.5 and 180 px wide round its 14 px label: 21 px each side. */
    & .prototype-link {
      padding-inline: calc(21rem / 16);
      font-size: calc(14rem / 16 + 4 * var(--grow));
    }
    /*
      Phone and Tablet Tales set the three long section titles at 22 px where the short ones keep 24; Desktop sets
      all at 30 (fig 2319:50217, 2332:52202, 2197:8071, 2209:9268, 2410:78176). Phone wraps them in a 292 px box,
      centred, breaking "Digital Touchpoint: OPH" from "Resource Hub & Online Tool".
    */
    & :is(#tales-core-solution, #tales-digital-touchpoint, #tales-campaign-and-impact)>h2 {
      font-size: calc(22rem / 16 + 8 * var(--grow));
      @media(width<40rem) {
        padding-inline: calc((100% - 292rem / 16) / 2);
      }
    }
    /*
      The Tablet and Desktop designs start a subheading at the text's edge, its glyph hanging into the margin, when
      prose follows it; over the personas every design starts it with them: 17 px into the column on phones, at the
      photos' tape (the column's start) on tablets, and at the descriptions 53 px into it on desktops.
    */
    & .subsection:has(>.flex-row>.persona)>h3 {
      text-align: start;
      /* The glyph and its gap are 4/3 of the glyph size. */
      margin-inline-start: calc(
        17rem / 16 - 18 * var(--phone-grow) + 54 * var(--grow) -
          var(--glyph-size) * 4 / 3
      );
    }
    @media(width>=40rem) {
      & h3.subheading:has(+ :is(p, ul)) {
        text-align: start;
        margin-inline-start: calc(var(--glyph-size) * -4 / 3);
      }
    }
    /*
      The logo as the Tales designs place it: on phones 264 px wide, centred, 58 px under the copy's box; on Tablet
      and Desktop 466 and 657 px wide, its box 44 and 75 px under the last line of the copy before it, which both
      set at line height 1.5; Desktop Tales sets Core Product 138 px under it.
    */
    & .wordmark {
      max-inline-size: calc(264rem / 16);
      margin-block-start: calc(58rem / 16);
    }
    @media(width>=40rem) {
      & p:has(+ .wordmark) {
        line-height: round(nearest, 1.5em, 1px);
      }
      & .wordmark {
        max-inline-size: calc(466rem / 16 + 191 * var(--grow));
        margin-block-start: calc(44rem / 16 + 31 * var(--grow));
      }
    }
    @media(width>=80rem) {
      & .wordmark+.subsection {
        margin-block-start: calc(138rem / 16);
      }
    }
    /*
      The Doodle tablet as Phone and Tablet Tales draw its bezel, 279.5 and 371.5 px wide (measured on the exports);
      the image is 322/310 of its bezel, so 290 and 386 px, the 386 Desktop already sets.
    */
    & .portrait-artwork:has(img[src*="doodle-editor"]) {
      max-inline-size: calc(290rem / 16);
      @media(width>=40rem) {
        max-inline-size: calc(386rem / 16);
      }
    }
    /* Patchy's card as the designs frame it: 240, 240 and 363 px, which is 249 to 376 px of this canvas. */
    & figure:has(img[src*="tales-patchy-guardian"]) {
      max-inline-size: calc(249rem / 16 + 127 * var(--grow));
    }
    /*
      The OPH hub and the social ads, two device images each: stacked and centred on phones, side by side with their
      bottoms aligned wider (the desktop design starts the hub at the column's edge). Widths and gaps are the
      designs' pixels at 390, 744 and 1440 (Phone, Tablet and Desktop Tales).
    */
    & .device-pair {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: calc(51rem / 16);
      margin-block: 2rem;
      &>figure {
        /* Below 361 px a device keeps 20 px from each window edge instead of reaching past it. */
        inline-size: min(var(--device-inline-size), 100vw - 40rem / 16);
        max-inline-size: none;
        margin: 0;
      }
      @media(width>=40rem) {
        flex-direction: row;
        justify-content: center;
        align-items: end;
      }
    }
    & .device-pair:has(img[src*="tales-oph"]) {
      &>:first-child {
        --device-inline-size: calc(318rem / 16 + 70 * var(--phone-grow) + 227 * var(--grow));
      }
      &>:last-child {
        --device-inline-size: calc(155rem / 16 - 36 * var(--phone-grow) + 74 * var(--grow));
      }
      @media(width>=40rem) {
        column-gap: calc(36rem / 16 + 41 * var(--grow));
      }
      @media(width>=68.25rem) {
        justify-content: start;
      }
    }
    & .device-pair:has(img[src*="tales-social"]) {
      &>:first-child {
        --device-inline-size: calc(321rem / 16 - 8 * var(--phone-grow) + 115 * var(--grow));
      }
      &>:last-child {
        --device-inline-size: calc(201rem / 16 - 39 * var(--phone-grow) + 58 * var(--grow));
      }
      @media(width>=40rem) {
        column-gap: calc(68rem / 16 - 2 * var(--grow));
      }
    }
    /*
      The age trail on phones: Phone Tales draws it 336 px wide from the text column's start, 14 px past its end;
      Tablet Tales draws it 610 px wide from 7 px before the column, a size it keeps, centred, in wider columns up
      to the desktop trail. Only the desktop design prints the footnote its asterisks point to, so narrower windows
      show it as text under the trail.
    */
    & figure:has(img[src*="tales-age-tier-progression"]) {
      /*
        The client: the footnote and the next paragraph "属于不同的部分，间距需要增加" (belong to different parts; the
        gap must grow), on phones and tablets. Desktop Tales sets its footnote 94 px above the paragraph's glyph tops
        at 20 px text; 56 px here gives about 76 px at the phone's 16 px text and 69 at the tablet's 14.
      */
      margin-block-end: calc(56rem / 16);
      &>figcaption {
        margin-block-start: 1rem;
        font-size: calc(13rem / 16);
        line-height: round(nearest, 1.5em, 1px);
      }
      @media(width<40rem) {
        inline-size: calc(336rem / 16 + 336 * var(--phone-art-grow));
        max-inline-size: none;
        margin-inline: 0 auto;
      }
      @media(width>=40rem) and (width<80rem) {
        inline-size: min(610% / 6.14, 610rem / 16);
        max-inline-size: none;
        margin-inline: max(-7% / 6.14, 50% - 314rem / 16) auto;
      }
      /*
        Desktop Tales draws the trail 969 px wide from 64 px into the 1086 px column, 113 px under the pillars' last
        glyph top and 100 above the paragraph's.
      */
      @media(width>=80rem) {
        inline-size: calc(96900% / 1086);
        max-inline-size: none;
        margin-block: calc(70rem / 16) calc(99rem / 16);
        margin-inline: calc(6400% / 1086) auto;
        &>figcaption {
          display: none;
        }
      }
    }
    /* The character cards on phones: Phone Tales stacks them, staggered, 240 px wide, 36 px into the column. */
    & figure:has(img[src*="tales-milo-and-mia-character-age-studies"]) {
      @media(width<40rem) {
        inline-size: calc(240rem / 16 + 240 * var(--phone-art-grow));
        max-inline-size: none;
        margin-inline: calc(36rem / 16 + 36 * var(--phone-art-grow)) auto;
      }
    }
    /*
      The ecosystem map on phones: Phone Tales stacks its two chains 320 px wide from the text column's start.
      Tablet Tales draws it 522 px wide from 2 px before the column, a size it keeps, centred, in wider columns up to
      the desktop map.
    */
    & figure:has(img[src*="tales-school-poster-and-social"]) {
      @media(width<40rem) {
        inline-size: calc(320rem / 16 + 320 * var(--phone-art-grow));
        max-inline-size: none;
        margin-inline: 0 auto;
      }
      @media(width>=40rem) and (width<80rem) {
        inline-size: min(522% / 6.14, 522rem / 16);
        max-inline-size: none;
        margin-inline: max(-2% / 6.14, 50% - 309rem / 16) auto;
      }
    }
    /* The poster as the designs draw it: 321, 338 and 397 px wide, centred. */
    & figure:has(img[src*="tales-one-page-poster-campaign"]) {
      max-inline-size: calc(
        321rem / 16 + 17 * var(--phone-grow) + 59 * var(--grow)
      );
    }
    /*
      The metrics chart on phones: Phone Tales sets it 340 px wide, 4 px left of the text column. Tablet Tales draws
      it 538 px wide from 53 px into the column, a size it keeps in wider columns up to the desktop chart, its pie
      8 px past the column's centre.
    */
    & figure:has(img[src*="tales-campaign-performance-metrics"]) {
      @media(width<40rem) {
        inline-size: calc(340rem / 16 + 340 * var(--phone-art-grow));
        max-inline-size: none;
        margin-inline: calc(-4rem / 16) auto;
      }
      @media(width>=40rem) and (width<80rem) {
        inline-size: min(538% / 6.14, 538rem / 16);
        max-inline-size: none;
        margin-inline: max(53% / 6.14, 50% - 254rem / 16) auto;
      }
    }
    /* Every Tales design hangs the one-pager and channel lists about 22 px in, the items without gaps. */
    /*
      Key Insights on phones, as Phone Tales draws them on its 322 px column (outlines measured on the export: Play
      295.5 px wide from the column start, Trust 278 px from 27.5 px in): boxes of 296.28 and 294.92 px, Trust 21.22
      px in. The copy is one size, title bold, left-aligned at line height 2, its top 40.5 and 87.5 px under each
      box's top and its start 64.1 and 69.8 px in (fig nodes 2313:49628, 2319:49860). Play's measure stops short of
      "stories." so that word does not run into the tail's notch, as the design breaks it; Trust's (200 px of the
      drawn 206.5) breaks after "must", as drawn, where the full box let "align" reach the outline. Play starts 24
      px lower than the row and Trust ends 85 px above the next band, as drawn. Trust's fill starts 7.5 px further
      out than the base inset, where the phone export draws it, so its white gap by the tail clears the last line.
      Past 390 px the pair keeps the design's 322 px column, centred: the copy then scales only with its bubble and
      keeps the 390 lines at every phone width (with a 1em cap and a wider bubble it re-wrapped into the notch).
    */
    @media(width<40rem) {
      & .flex-row:has(>.play-speech-bubble) {
        max-inline-size: calc(322rem / 16);
        margin-inline: auto;
      }
      & :is(.play-speech-bubble, .trust-speech-bubble) {
        /* Their own widths, not the row's grow-to-fill basis, and placed from the start, not centred. */
        flex: none;
        margin-inline-end: auto;
        justify-content: start;
        text-align: start;
        &>* {
          line-height: round(nearest, 2em, 1px);
        }
        &>p {
          margin-block-start: 0;
        }
      }
      & .play-speech-bubble {
        inline-size: calc(29628% / 322);
        margin-block-start: calc(24rem / 16);
        &>* {
          margin-inline: calc(6410% / 296.28) calc(3220% / 296.28);
        }
        &>:is(h4, p) {
          font-size: min(1em, calc(14 * 100cqi / 296.28));
        }
        &>h4 {
          margin-block-start: calc(40.5 * 100cqi / 296.28);
        }
      }
      & .trust-speech-bubble {
        inline-size: calc(29492% / 322);
        margin-inline-start: calc(2122% / 322);
        margin-block-end: calc(21rem / 16);
        &>* {
          margin-inline: calc(6980% / 294.92) calc(2512% / 294.92);
        }
        &>:is(h4, p) {
          font-size: min(1em, calc(14 * 100cqi / 294.92));
        }
        &>h4 {
          margin-block-start: calc(87.5 * 100cqi / 294.92);
        }
        &::before {
          inset-inline-start: calc(46.6 / 413 * 100%);
        }
      }
    }
    /*
      Key Insights: both wide designs overlap the two bubbles, Play first and Trust lower and to the end, their text
      left-aligned at line height 2. Tablet (on its 614 px column): Play 325 px wide at the column start, Trust 333
      px from 281 px in, 260 px lower; desktop (on 1086 px): 403 and 399 px wide at 83 and 595 px, 145 px apart.
    */
    @media(width>=40rem) {
      & .flex-row:has(>.play-speech-bubble) {
        --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
        --u: calc(100cqw / 614);
        container-type: inline-size;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        &>.note {
          grid-area: 1 / 1;
          align-self: start;
          justify-self: start;
          max-inline-size: none;
          margin: 0;
          text-align: start;
          &>* {
            line-height: round(nearest, 2em, 1px);
          }
          &>p {
            margin-block-start: 0;
          }
        }
        /*
          The copy scales against each bubble's own width at 744 (325 and 333 px), not the phone's 322, so below
          744 it shrinks exactly with the bubble and keeps the 744 lines (it gained a fifth line that crossed the
          fill from 640 to 736); from 744 up the 1em caps apply as before. Tablet only: desktop keeps the phone
          reference, which sets its 1280 lines. Tablet Tales sets the title in the copy's size, bold (fig nodes
          2197:7938, 2197:8067); only Desktop Tales sets it 2 px larger.
        */
        &>.play-speech-bubble {
          inline-size: calc(325 * var(--u));
          margin-block-start: calc(52 * var(--u));
          &>* {
            margin-inline: 13% 9%;
          }
          @media(width<80rem) {
            &>:is(h4, p) {
              font-size: min(1em, calc(14 * 100cqi / 325));
            }
          }
        }
        &>.trust-speech-bubble {
          inline-size: calc(333 * var(--u));
          margin-block-start: calc(312 * var(--u));
          margin-inline-start: calc(281 * var(--u));
          &>* {
            margin-inline: 20% 11%;
          }
          @media(width<80rem) {
            &>:is(h4, p) {
              font-size: min(1em, calc(14 * 100cqi / 333));
            }
          }
        }
        /*
          Desktop Tales: the copy on 254 and 247 px measures (it wraps as drawn from 241 to 267.5 and 236.5 to
          256.5 px), the next band 140 px under the second bubble's fill. The 2026OCT222006 .fig redraws the two
          bubbles as vectors (Group 239398 and 239399): each layer below sits where that file draws it relative to
          its title (true curve bounds through the group matrices, `fig-222006/tales/bubble-boxes.py`), in the
          box's own units (play 411 by 392, trust 413 by 415). The text did not move; the outlines now sit 67 and
          106.5 px above the titles.
        */
        @media(width>=80rem) {
          --u: calc(100cqw / 1086);
          &>.play-speech-bubble {
            inline-size: calc(403 * var(--u));
            margin-block-start: calc(17 * var(--u));
            margin-inline-start: calc(83 * var(--u));
            padding-block-end: calc(20 * var(--u));
            &>* {
              margin-inline: 16% 21%;
            }
            &::before {
              inset-block-start: calc(-6.39 / 392 * 100%);
              inset-inline-start: calc(-1.04 / 411 * 100%);
              inline-size: calc(403.8 / 411 * 100%);
              block-size: calc(367.86 / 392 * 100%);
            }
            &::after {
              inset-block-start: calc(17.16 / 392 * 100%);
              inset-inline-start: calc(-9.05 / 411 * 100%);
              inline-size: calc(414.05 / 411 * 100%);
              block-size: calc(375.78 / 392 * 100%);
            }
          }
          &>.trust-speech-bubble {
            inline-size: calc(399 * var(--u));
            margin-block: calc(146 * var(--u)) calc(21 * var(--u));
            margin-inline-start: calc(595 * var(--u));
            padding-block-start: calc(6 * var(--u));
            &>* {
              margin-inline: 26% 12%;
            }
            &::before {
              inset-block-start: calc(15.31 / 415 * 100%);
              inset-inline-start: calc(37.9 / 413 * 100%);
              inline-size: calc(366.25 / 413 * 100%);
              block-size: calc(401.33 / 415 * 100%);
            }
            &::after {
              inset-block-start: calc(-1.12 / 415 * 100%);
              inset-inline-start: calc(-6.44 / 413 * 100%);
              inline-size: calc(390.46 / 413 * 100%);
              block-size: calc(411.57 / 415 * 100%);
            }
          }
        }
      }
    }
    & ul.paragraph {
      padding-inline-start: calc(22rem / 16);
    }
    & .project-summary>p>strong {
      font-weight: 800;
      @media(width<40rem) {
        display: block;
      }
    }
    &>.content>.project-divider,
    &>.content>.section>h2 {
      border-block-color: transparent;
      background-image: url("assets/tales-section-band-gold-dash-row.svg");
      background-origin: border-box;
      background-position: center calc(7rem / 16 + 5 * var(--grow));
      background-repeat: repeat-x;
      background-size: calc(24rem / 16 + 36 * var(--grow)) calc(5rem / 16 + 5 * var(--grow));
    }
    &>.content>.project-divider {
      background-position-y: center;
    }
    & :where(h3.subheading),
    & [data-glyph] {
      --glyph: url("assets/tales-subheading-two-leaf-glyph.svg");
      --glyph-size: calc(24rem / 16 + 11 * var(--grow));
    }
    /*
      The designs draw every leaf 21.75 px tall at 390 and 744, and Desktop Tales its heading leaves 26.5 px, all
      with a 3 px stroke; the drawing keeps that stroke as it grows.
    */
    & [data-glyph="leaf"] {
      --glyph: url("assets/tales-subheading-single-leaf-glyph.svg");
      --glyph-size: calc(21.87rem / 16 + 5.56 * var(--grow));
    }
    /* Desktop Tales draws the persona leaves 29 px tall. */
    & .persona>h4[data-glyph] {
      --glyph-size: calc(21.87rem / 16 + 8.47 * var(--grow));
    }
    & [data-glyph="sprout"] {
      --glyph: url("assets/tales-subheading-sprout-glyph.svg");
      --glyph-size: calc(21rem / 16 + 3 * var(--grow));
    }
    /*
      Every design draws The Challenge with a filled leaf whose vein tapers inside it, 19 px at 390 and 744 and 27 on
      Desktop; Desktop draws the channel labels with it too. The path is the designs' own.
    */
    & [data-glyph="veined-leaf"] {
      --glyph: url("assets/tales-subheading-veined-leaf-glyph.svg");
      --glyph-size: calc(19rem / 16 + 8 * var(--grow));
    }
    /*
      The channel labels: body size on phones (15 in Phone Tales), 16 over the 14 px body in Tablet Tales and the
      16 of the body on Desktop (exports of 2026-10-23).
    */
    & p[data-glyph] {
      --glyph-size: calc(21.87rem / 16);
      @media(width>=40rem) {
        font-size: max(1em, calc(16rem / 16));
      }
      @media(width>=80rem) {
        --glyph: url("assets/tales-subheading-veined-leaf-glyph.svg");
        --glyph-size: calc(18rem / 16);
      }
    }
    & :is(h3.subheading, [data-glyph])::before {
      content: "";
      display: inline-block;
      vertical-align: top;
      inline-size: var(--glyph-size);
      block-size: var(--glyph-size);
      margin-block: calc((1lh - var(--glyph-size)) / 2);
      margin-inline-end: calc(var(--glyph-size) / 3);
      background: var(--glyph) center / contain no-repeat;
    }
    & .persona>h4 {
      color: var(--color-case-study-accent);
    }
    /* Equal column tops: the shorter persona's copy no longer drops to centre against the taller one. */
    & .flex-row:has(>.persona) {
      align-items: start;
    }
    /*
      Phone Tales sets each persona's photo 280 px wide, centred on its 322 px column, 74 px under the heading's top
      and 43 under the copy before it; the name 15 px under the photo on a 32 px line, the copy straight after it,
      both 40 px into the column and ending under the photo's edge (fig 2309:49311, 2309:49314, 2309:49325).
    */
    @media(width<40rem) {
      & .persona {
        &>figure {
          max-inline-size: calc(280rem / 16);
          margin-block: calc(12rem / 16) calc(15rem / 16);
        }
        &>:is(h4, p) {
          margin-block: 0;
          margin-inline: calc(40rem / 16) calc(21rem / 16);
        }
        &>h4 {
          line-height: round(nearest, 2em, 1px);
        }
      }
    }
    /*
      Tablet and Desktop Tales centre the two personas, 280 and 423 px wide and 54 and 183 px apart, and set each
      name and description from the photo's frame (19 and 22 px in from its tape), the descriptions 240 and 372 px
      wide. They leave 40 and 19 px from the heading's line to the photos, 22 and 30 to the names, none to the
      descriptions, and 72 and 120 from those to the band. Below 744 px the pair keeps the tablet's proportions of
      its 614 px column.
    */
    @media(width>=40rem) {
      & .flex-row:has(>.persona) {
        justify-content: center;
        gap: calc(min(54% / 6.14, 54rem / 16) + 129 * var(--grow));
        &>.persona {
          flex: 0 0 calc(min(280% / 6.14, 280rem / 16) + 143 * var(--grow));
          max-inline-size: none;
          &>figure {
            max-inline-size: none;
            margin-block: calc(8rem / 16 - 21 * var(--grow))
              calc(22rem / 16 + 8 * var(--grow));
          }
          &>:is(h4, p) {
            margin-block: 0;
            margin-inline: calc(13.1rem / 16 + 2.1%) 0;
          }
          &>p {
            margin-block-end: calc(8rem / 16 - 8 * var(--grow));
            margin-inline-end: calc(5.3rem / 16 + 5.6%);
          }
        }
      }
    }
    /*
      The pillar icons at the designs' sizes: Desktop Tales draws them at their own 157, 204 and 164 px, Phone and
      Tablet at 0.73 of that. Titles centre over left-aligned copy in every design.
    */
    & .story-pillars {
      &>* {
        text-align: start;
        &>h4 {
          text-align: center;
        }
      }
      &>:nth-child(1) {
        --pillar-icon: 157;
      }
      &>:nth-child(2) {
        --pillar-icon: 204;
      }
      &>:nth-child(3) {
        --pillar-icon: 164;
      }
      & .small-illustration {
        --pillar-scale: calc(0.73rem / 16 + 0.27 * var(--grow));
        inline-size: calc(var(--pillar-icon) * var(--pillar-scale));
        max-inline-size: none;
        margin-inline: auto;
        /*
          From the width where two pillars share a row: equal boxes as tall as the tallest icon, the icons centred
          in them as the desktop design centres them, keep the titles on one line.
        */
        @media(width>=26.25rem) {
          display: flex;
          flex-direction: column;
          justify-content: center;
          block-size: calc(154 * var(--pillar-scale));
        }
      }
      /*
        Tablet Tales sets the first pillar alone, centred and 292 px wide, over the other two in columns 64 px apart
        across the 614 px column; the third pillar's copy wraps at 256 px. From ink to ink: intro to
        icon 78, icon to title 32 (30 in the second row), title to copy 31, copy to the second row's icons 49.
      */
      @media(width>=40rem) and (width<80rem) {
        gap: 0 calc(64% / 6.14);
        &>* {
          flex: 0 0 calc((100% - 64% / 6.14) / 2);
        }
        & .small-illustration {
          margin-block: calc(20rem / 16) calc(14rem / 16);
        }
        & h4 {
          margin-block: 0;
        }
        & p {
          margin-block: calc(3rem / 16) calc(16rem / 16);
        }
        /* Its side margins fill the line, so the first pillar has a row to itself. */
        &>:nth-child(1) {
          flex-basis: calc(292% / 6.14);
          margin-inline: calc((100% - 292% / 6.14) / 2);
          &>.small-illustration {
            margin-block: calc(54rem / 16) calc(23rem / 16);
          }
        }
        &>:nth-child(3)>p {
          margin-inline-end: calc(20% / 2.75);
        }
      }
      /*
        Desktop Tales starts the pillars' copy 53, 421 and 783 px into the 1086 px column, centres each icon and
        title 135, 124 and 124 px past that, and runs the copy on 304.5, 282 and 259 px measures (inside the 303 to
        306, 263.5 to 300.5 and 243.5 to 274.5 px windows where it wraps as drawn), so the copy overhangs its box.
        Icon centres 218 px under the intro's glyph top, titles 111 under them, copy 37 under the titles.
      */
      @media(width>=80rem) {
        flex-wrap: nowrap;
        justify-content: start;
        gap: 0;
        margin-block-start: calc(79rem / 16);
        &>* {
          flex: 0 0 calc(27000% / 1086);
          margin-inline-start: calc(5300% / 1086);
          /* The title's margin collapses into the icon's. */
          &>.small-illustration {
            margin-block-end: calc(28rem / 16);
          }
          &>p {
            margin-block-start: calc(-11rem / 16);
            margin-inline-end: calc(-34.5rem / 16);
          }
        }
        &>:nth-child(2) {
          flex-basis: calc(24800% / 1086);
          margin-inline-start: calc(9800% / 1086);
          &>p {
            margin-inline-end: calc(-34rem / 16);
          }
        }
        &>:nth-child(3) {
          flex-basis: calc(24800% / 1086);
          margin-inline-start: calc(11400% / 1086);
          &>p {
            margin-inline-end: calc(-11rem / 16);
          }
        }
      }
      /* Stacked, the Phone design's gaps from ink to ink: icon to title 31, title to copy 32, copy to icon 47. */
      @media(width<26.25rem) {
        row-gap: 0;
        & .small-illustration {
          margin-block: calc(22rem / 16) calc(19rem / 16);
        }
        & h4 {
          margin-block: 0 calc(2rem / 16);
        }
        & p {
          margin-block-start: 0;
        }
      }
    }
    /*
      The quote wraps to the design's text box: 320 px on Phone Tales (five lines, "conversations as a routine /
      part of daily parenting for"), 608 px on Tablet Tales ("... daily parenting for / children").
    */
    & :where(#tales-how-might-we)>h2 {
      --quote-measure: calc(320rem / 16);
      padding-inline: max(1rem, calc((100% - var(--quote-measure)) / 2));
      line-height: round(nearest, 48rem / 16 + 12 * var(--grow), 1px);
      /* 1066 px at 1440 breaks before "of daily", as Desktop Tales does (1050.5 to 1082.5 px in our face). */
      @media(width>=40rem) {
        --quote-measure: calc(608rem / 16 + 458 * var(--grow));
      }
    }
    /*
      The Challenge: every design puts the heading over the notepad, the worried figure first. Phones stack figure,
      heading and pad; wider, the figure stands left of the heading and pad. Lengths are the designs' pixels at 390,
      744 and 1440 (Phone, Tablet and Desktop Tales), measured to the figure's drawing, which the designs frame in a
      larger square.
    */
    & .flex-row:has(>.spiral-notepad) {
      display: grid;
      justify-content: center;
      justify-items: center;
      gap: 0;
      &>figure {
        inline-size: calc(142rem / 16 + 94 * var(--grow));
        max-inline-size: none;
        margin: 0;
      }
      /* The glyph hangs into the margin, so the heading's text starts where the design's does. */
      &>h3 {
        justify-self: start;
        margin-block: calc(32rem / 16) 0;
        margin-inline: calc(-17rem / 16) 0;
      }
      &>.spiral-notepad {
        justify-self: start;
        /* Below 374 px the pad shrinks whole, copy included, to keep 20 px from each window edge. */
        inline-size: min(
          334rem / 16 + 11 * var(--phone-grow) + 161 * var(--grow),
          100vw - 40rem / 16
        );
        max-inline-size: none;
        margin-block-start: calc(21rem / 16 + 12 * var(--phone-grow) + 6 * var(--grow));
        margin-inline-start: calc(-13rem / 16);
      }
      @media(width>=40rem) {
        grid-template-columns: auto auto;
        justify-content: start;
        align-items: start;
        column-gap: calc(40rem / 16 + 6 * var(--grow));
        margin-inline-start: calc(34rem / 16 - 10 * var(--grow));
        &>figure {
          grid-area: 1 / 1 / 3;
        }
        &>h3 {
          grid-area: 1 / 2;
          margin-block-start: calc(14rem / 16 + 51 * var(--grow));
          margin-inline-start: calc(4rem / 16 + 1 * var(--grow));
        }
        /*
          The pad's last 24 px of growth (height 346/486 of it) draw past the box: the copy, not the pad, sets the gap.
          Tablet Tales in the .fig draws the outline 345 px wide inside a 360.6 px group with the yellow backing, as
          desktop does at 478 of 504; the pad is the group, so its outline is 345 here, not 328.
        */
        &>.spiral-notepad {
          grid-area: 2 / 2;
          inline-size: calc((334rem / 16 + 11 * var(--phone-grow)) * 360.6 / 345 + 145.4 * var(--grow));
          margin-block-end: calc(-24 * 346 / 486 * var(--grow));
          margin-inline-start: 0;
        }
      }
    }
    /*
      Desktop Tales sets text 42 px under a heading's glyph top, and a paragraph after a list on the list's line
      pitch.
    */
    @media(width>=80rem) {
      /* Its text in line with the copy, 53 px into the 1086 px column, the icon hanging before it. */
      & :is(.section-content, .subsection)>h3:has(+ :is(p, ul)) {
        margin-block-end: calc(6rem / 16);
        margin-inline-start: calc(5300% / 1086 - var(--glyph-size) * 4 / 3);
      }
      & .subsection>ul:has(+ p) {
        margin-block-end: 0;
        &+p {
          margin-block-start: 0;
        }
      }
    }
    /* Desktop Tales: the figure 60 px under the band, and Dual-Persona Framing 236 under the pad's last glyph top. */
    & .section-content:has(>.flex-row>.spiral-notepad) {
      @media(width>=80rem) {
        padding-block-start: calc(59rem / 16);
        &>.subsection {
          margin-block-start: calc(144rem / 16);
        }
      }
    }
    & .spiral-notepad {
      background-image:
        url("assets/tales-challenge-spiral-notepad-background.svg"),
        linear-gradient(var(--color-case-study-note), var(--color-case-study-note));
      background-position: 0 0, 100% 100%;
      background-repeat: no-repeat;
      background-size: 95.1% 95%, 94.3% 86.5%;
      /* Keep the copy inside the outline, which is now 5 percent smaller on the right and bottom. */
      padding-block-end: 7%;
      &>* {
        margin-inline: 11%;
      }
      /*
        Tablet and Desktop Tales start the copy an eighth of the pad in at line height 2, its lines breaking where a
        290 and a 353 px measure break them (279 to 316 and 347 to 359 px fit the drawn breaks). Its first line
        starts 58.6 and 87.3 px down the 360.6 and 506 px pads; the copy stays at the tablet's 14 px per 360.6 px of
        pad, so it keeps those breaks inside the outline where the body text is still a little larger, just past 640.
      */
      @media(width>=40rem) {
        --grow: clamp(0rem, calc((100vw - 744rem / 16) / 696), calc(1rem / 16));
        justify-content: start;
        padding-block-end: 0;
        &>p {
          margin-block-start: calc(19.74% - 12.6rem / 16);
          font-size: min(1em, calc(14 * 100cqi / 360.6));
        }
        &>* {
          margin-inline: 12.5% calc(25.6rem / 16 + 64 * var(--grow));
          line-height: round(nearest, 2em, 1px);
        }
      }
    }
    /*
      Phone Tales draws each story's spread and its note 350 px wide at 390, 14 px past the text column on each side,
      the note 20 px under the spread; the note's copy comes back to the column, 15 px in.
    */
    @media(width<40rem) {
      & .subsection:has(>.note) {
        &>:is(figure, .note) {
          margin-inline: calc(-14rem / 16);
        }
        &>figure {
          margin-block-end: calc(20rem / 16);
        }
      }
    }
    & .subsection>.note {
      /*
        Every Tales design runs the curriculum notes line after line, with no gap between items. Phone insets the copy
        16 px at the top, 15 at the sides and 22 at the bottom (the padding plus the transparent 1 px border), the
        story line 12 px above the notes; Tablet and Desktop pad it 21 and 16 px at the top, 19 and 31 at the sides,
        and 27 and 20 at the bottom, the story line 33 and 3 px above the notes.
      */
      padding-block: calc(15rem / 16) calc(21rem / 16);
      padding-inline: calc(14rem / 16);
      border-color: transparent;
      border-radius: 0;
      background-color: color-mix(in srgb, var(--color-case-study-note) 80%, transparent);
      & :is(p, ul, li) {
        margin-block: 0;
      }
      &>p:first-of-type {
        margin-block-end: calc(12rem / 16);
      }
      &>p:first-of-type~:is(p, ul) {
        color: var(--color-case-study-accent);
      }
      @media(width>=40rem) {
        padding-block: calc(21rem / 16 - 5 * var(--grow))
          calc(27rem / 16 - 7 * var(--grow));
        padding-inline: calc(19rem / 16 + 12 * var(--grow));
        &>p:first-of-type {
          margin-block-end: calc(33rem / 16 - 30 * var(--grow));
        }
      }
    }
    /*
      Desktop Tales opens the Digital Touchpoint and Campaign sections with one line of copy 124 px under the band
      and 5 px into the 1086 px column, at line height 1.5 like the channel lists after it, whose labels sit 38 px
      under the line before them with their icons hanging; the next heading's glyph 86 px under the last line. The
      OPH devices start 47 px in, 57 under the copy; the Doodle Editor 120 under them, its copy 85 px in and 45
      under the heading, the tablet 386 px wide and 64 under it, the demo link 44 under that and 135 above the next
      band.
    */
    @media(width>=80rem) {
      & :where(#tales-digital-touchpoint, #tales-campaign-and-impact)>.section-content {
        &>:is(p, ul) {
          margin-block: 0;
          line-height: round(nearest, 1.5em, 1px);
        }
        &>p:first-child {
          margin-block-start: calc(3rem / 16);
          margin-inline: calc(500% / 1086) 0;
        }
        &>p[data-glyph] {
          margin-block-start: calc(14rem / 16);
          margin-inline-start: calc(5300% / 1086 - 27rem / 16);
        }
        &>:is(p, ul)+.subsection {
          margin-block-start: calc(62rem / 16);
        }
      }
      & .subsection>p+.device-pair:not(:has(img[src*="tales-social"])) {
        margin-block-start: calc(57rem / 16);
        margin-inline-start: calc(4700% / 1086);
      }
      & .subsection:has(>.device-pair)+.subsection:has(>.portrait-artwork) {
        margin-block-start: calc(120rem / 16);
        &>h3 {
          margin-block-end: calc(9rem / 16);
        }
        &>p {
          margin-inline: calc(8500% / 1086) calc(2500% / 1086);
        }
        &>.portrait-artwork {
          max-inline-size: calc(386rem / 16);
          margin-block-start: calc(64rem / 16);
        }
        &>.prototype-link {
          margin-block: calc(44rem / 16) calc(21rem / 16);
        }
      }
    }
    /*
      Desktop Tales draws the campaign's figures at their own sizes and spaces them by hand: the ecosystem map 766
      px wide from 113 px into the 1086 px column and 37 under its heading; Poster 114 under the map, its poster 39
      under the heading; Social Media Ads 90 under the poster, the two ads 39 under the heading with their tops
      aligned, from 179 px in; Performance Metrics 121 under them, the chart 949 px wide from 100 px in and 37
      under the heading; Potential for Impact 119 under the chart.
    */
    @media(width>=80rem) {
      & .subsection:is(
        :has(img[src*="tales-school-poster-and-social"]),
        :has(img[src*="tales-one-page-poster-campaign"]),
        :has(img[src*="tales-social"]),
        :has(img[src*="tales-campaign-performance-metrics"])
      )>h3 {
        margin-block-end: 0;
      }
      & figure:has(img[src*="tales-school-poster-and-social"]) {
        inline-size: calc(76600% / 1086);
        max-inline-size: none;
        margin-block-start: calc(37rem / 16);
        margin-inline: calc(11300% / 1086) auto;
      }
      & .subsection:has(img[src*="tales-one-page-poster-campaign"]) {
        margin-block-start: calc(114rem / 16);
        &>figure {
          margin-block-start: calc(39rem / 16);
        }
      }
      & .subsection:has(img[src*="tales-social"]) {
        margin-block-start: calc(90rem / 16);
        &>.device-pair {
          align-items: start;
          justify-content: start;
          margin-block-start: calc(39rem / 16);
          margin-inline-start: calc(17900% / 1086);
        }
      }
      & .subsection:has(img[src*="tales-campaign-performance-metrics"]) {
        margin-block-start: calc(121rem / 16);
        &>figure {
          inline-size: calc(94900% / 1086);
          max-inline-size: none;
          margin-block-start: calc(37rem / 16);
          margin-inline: calc(10000% / 1086) auto;
        }
        &+.subsection {
          margin-block-start: calc(119rem / 16);
        }
      }
      /* The closing quote 138 px under the impact copy; its measure is the shared case-study rule's. */
      & .closing-reflection {
        margin-block-start: calc(89rem / 16);
      }
    }
    /*
      Desktop Tales spaces the characters and stories by hand: Main Characters 78 px under the One-Pager copy, its
      cards 37 under the heading and 1002 px wide from 67 px into the 1086 px column; Guardian 89 under them, Patchy
      23 under its heading; then each story 119 or 71 px under what comes before, its spread 39 under the heading,
      and its note, as wide as the spread, 20 under it; the last note 130 above the next band.
    */
    @media(width>=80rem) {
      & .subsection:has(img[src*="milo-and-mia-character"]) {
        margin-block-start: calc(78rem / 16);
        &>h3 {
          margin-block-end: 0;
        }
        &>figure {
          inline-size: calc(100200% / 1086);
          max-inline-size: none;
          margin-block-start: calc(37rem / 16);
          margin-inline: calc(6700% / 1086) auto;
        }
      }
      & .subsection:has(img[src*="patchy-guardian"]) {
        margin-block-start: calc(89rem / 16);
        &>h3 {
          margin-block-end: 0;
        }
        &>figure {
          margin-block-start: calc(23rem / 16);
        }
      }
      & .subsection:has(>.note) {
        margin-block-start: calc(71rem / 16);
        &>h3 {
          margin-block-end: 0;
        }
        &>figure {
          margin-block: calc(39rem / 16) calc(20rem / 16);
          margin-inline: calc(5500% / 1086) calc(5100% / 1086);
        }
        &>.note {
          margin-inline: calc(5500% / 1086) calc(5100% / 1086);
        }
        &:last-child {
          margin-block-end: calc(10rem / 16);
        }
      }
      & .subsection:has(img[src*="patchy-guardian"])+.subsection {
        margin-block-start: calc(119rem / 16);
      }
    }
    /*
      The impact strip's width, shared with the closing quote under it. Below 390 px the strip keeps the 20 px it leaves
      at each window edge there, instead of running off-screen.
    */
    & #tales-campaign-and-impact>.section-content {
      --strip: min(
        350rem / 16 + 321 * var(--phone-grow) + 309 * var(--grow),
        100vw - 40rem / 16
      );
    }
    & .impact-cards {
      --tip: calc(24rem / 16 + 10 * var(--grow));
      --stem: calc(24rem / 16 + 11 * var(--grow));
      /* The designs' rings measure 56, 54.5 and 80 px across at 390, 744 and 1440. */
      --ring: calc(
        56rem / 16 - 1.5 * var(--phone-grow) + 25.5 * var(--grow)
      );
      --mid: calc((100% - var(--tip)) / 2);
      /*
        One strip of overlapping chevrons, each earlier one drawn over the next, as wide as the designs draw it (350,
        671 and 980 px at 390, 744 and 1440): two per row on phones overlapping by 0.196 of a chevron, four in a row
        wider by 0.15. Each chevron is the strip's width over (count - overlaps), each overlap pulled back by a
        negative margin; the copy starts about 11 px before the overlap ends. On phones the rings centre on the whole
        chevron, as Phone Tales places them.
      */
      /*
        The strip's width, --strip, is set on the section's content box so the closing quote below can line up with it.
      */
      /*
        Two chevrons fill a phone row exactly, and sub-pixel rounding could push the second onto its own row; a
        quarter pixel less keeps both on it.
      */
      --chevron: calc(var(--strip) / 1.804 - 1px / 4);
      --overlap: calc(var(--strip) * 0.196 / 1.804);
      --mid: 50%;
      counter-reset: impact;
      align-items: flex-start;
      column-gap: 0;
      box-sizing: border-box;
      inline-size: var(--strip);
      margin-inline: calc((100% - var(--strip)) / 2);
      /*
        Below 390 and from 640 to 744 the strip narrows with the screen while its words kept their size, so glued
        line ends ran past their columns: "Community Reach" under the first chevron's tip at 320, "institutional
        resources." to within a few px of the screen edge (Safari 17.5). There the titles and copy narrow with the
        strip, per design px of its 350 (phone) or 671 (tablet), so each card keeps its 390 or 744 line breaks.
      */
      @media(width<40rem) {
        --card-shrink: min(0rem, (100vw - 390rem / 16) / 350);
      }
      @media(40rem<=width<46.5rem) {
        --card-shrink: calc((100vw - 744rem / 16) * 321 / 354 / 671);
      }
      @media(width>=40rem) {
        --chevron: calc(var(--strip) / 3.55);
        --overlap: calc(var(--strip) * 0.15 / 3.55);
        --mid: calc((100% - var(--tip)) / 2);
        /* The four chevrons fill the strip exactly, so sub-pixel rounding could otherwise wrap the last one. */
        flex-wrap: nowrap;
      }
      &>* {
        position: relative;
        flex: 0 0 var(--chevron);
        counter-increment: impact;
        /* The designs set this copy at line height 1.5, against the page's 2. */
        &>p {
          padding-inline: calc(15rem / 16 - 15 * var(--phone-grow)) var(--tip);
          font-size: calc(1em + 16 * var(--card-shrink, 0rem));
          line-height: round(nearest, 1.5em, 1px);
        }
        /* Tablet Tales wraps every card's copy at about 148 px, the first card's too. */
        @media(width>=40rem) and (width<80rem) {
          &:first-child>p {
            padding-inline-end: calc(var(--tip) + 17rem / 16 - 17 * var(--grow));
          }
        }
        &:nth-child(1) {
          z-index: 4;
        }
        &:nth-child(2) {
          z-index: 3;
        }
        &:nth-child(3) {
          z-index: 2;
        }
        &:nth-child(4) {
          z-index: 1;
        }
        /* Every chevron after the first in its row: two per row on phones, four wider. */
        &:nth-child(even) {
          --title-start: var(--overlap);
          margin-inline-start: calc(-1 * var(--overlap));
          &>p {
            padding-inline-start: calc(var(--overlap) - 11rem / 16);
          }
        }
        @media(width>=40rem) {
          &:nth-child(3) {
            --title-start: var(--overlap);
            margin-inline-start: calc(-1 * var(--overlap));
            &>p {
              padding-inline-start: calc(var(--overlap) - 11rem / 16);
            }
          }
        }
        &:nth-child(1) {
          --c: var(--color-case-study-accent);
        }
        &:nth-child(2) {
          --c: var(--color-case-study-secondary);
        }
        &:nth-child(3) {
          --c: #6682dd;
        }
        &:nth-child(4) {
          --c: var(--color-case-study-note);
        }
        &:nth-child(odd) {
          --on: #fff;
          --num: var(--c);
        }
        &:nth-child(even) {
          --on: #263238;
          --num: var(--on);
        }
        &::before {
          content: counter(impact, decimal-leading-zero);
          display: block;
          box-sizing: border-box;
          inline-size: var(--ring);
          block-size: var(--ring);
          margin-inline-start: calc(var(--mid) - var(--ring) / 2);
          border: calc(3rem / 16) solid var(--c);
          border-radius: 50%;
          color: var(--num);
          font-size: calc(var(--ring) * 0.45);
          line-height: round(nearest, var(--ring) - 6rem / 16, 1px);
          text-align: center;
        }
        &>h4 {
          display: flex;
          align-items: center;
          justify-content: center;
          box-sizing: border-box;
          min-block-size: calc(var(--stem) + 72rem / 16);
          /* Phone Tales draws the band 73.5 px tall, which still holds a title's three lines. */
          @media(width<40rem) {
            min-block-size: calc(var(--stem) + 74rem / 16);
          }
          margin-block-start: 0;
          padding-block-start: var(--stem);
          /* Clear of the earlier chevron's tip over this one, and of this one's tip; Figma's line height 1.5. */
          padding-inline: var(--title-start, calc(16rem / 16)) calc(var(--tip) + 4rem / 16);
          line-height: round(nearest, 1.5em, 1px);
          font-size: calc(14rem / 16 + 2 * var(--grow) + 14 * var(--card-shrink, 0rem));
          background-color: var(--c);
          color: var(--on);
          text-align: center;
          clip-path: polygon(
            calc(var(--mid) - 1.5rem / 16) 0,
            calc(var(--mid) + 1.5rem / 16) 0,
            calc(var(--mid) + 1.5rem / 16) var(--stem),
            calc(100% - var(--tip)) var(--stem),
            100% calc((100% + var(--stem)) / 2),
            calc(100% - var(--tip)) 100%,
            0 100%,
            0 var(--stem),
            calc(var(--mid) - 1.5rem / 16) var(--stem)
          );
        }
      }
      /*
        Desktop Tales overlaps its four 276.5 px chevrons by 32.5, 39.5 and 54.5 px, centres the rings 120, 123,
        138 and 145 px into them on 34 px stems over 69 px title bands, centres the titles 121, 140, 142 and 155 px
        in and 5 px below the band's middle, and starts the copy 0, 27, 36 and 59 px in on 244, 210, 218 and 217.5
        px measures at line height 2 (inside the windows where each wraps as drawn: 226.5 to 263, 199 to 222, 209.5
        to 226.5 and 215.5 to 227 px), its first glyph 29 px under the band; the strip 2 px right of centre.
        Lengths are in the strip's 980ths, so they narrow with it.
      */
      @media(width>=80rem) {
        --u980: calc(var(--strip) / 980);
        --chevron: calc(276.5 * var(--u980));
        --stem: calc(34 * var(--u980));
        margin-inline-start: calc((100% - var(--strip)) / 2 + 2 * var(--u980));
        &>* {
          &>h4 {
            min-block-size: calc(var(--stem) + 69 * var(--u980));
            padding-block-start: calc(var(--stem) + 10 * var(--u980));
            padding-inline-end: calc(var(--tip) + 4rem / 16);
          }
        }
        &>:nth-child(1) {
          --mid: calc(120 * var(--u980));
          --title-start: calc(3.5 * var(--u980));
        }
        &>:nth-child(2) {
          --mid: calc(123 * var(--u980));
          --title-start: calc(41.5 * var(--u980));
          margin-inline-start: calc(-32.5 * var(--u980));
        }
        &>:nth-child(3) {
          --mid: calc(138 * var(--u980));
          --title-start: calc(45.5 * var(--u980));
          margin-inline-start: calc(-39.5 * var(--u980));
        }
        /* The last title runs into the tip, as drawn, so it fits one line. */
        &>:nth-child(4) {
          --mid: calc(145 * var(--u980));
          --title-start: calc(63.5 * var(--u980));
          margin-inline-start: calc(-54.5 * var(--u980));
          &>h4 {
            padding-inline-end: calc(30 * var(--u980));
          }
        }
        &>:nth-child(n)>p {
          margin-block-start: calc(24rem / 16);
          line-height: round(nearest, 2em, 1px);
        }
        &>:nth-child(1)>p {
          padding-inline: 0 calc(32.5 * var(--u980));
        }
        &>:nth-child(2)>p {
          padding-inline: calc(27 * var(--u980)) calc(39.5 * var(--u980));
        }
        &>:nth-child(3)>p {
          padding-inline: calc(36 * var(--u980)) calc(22.5 * var(--u980));
        }
        &>:nth-child(4)>p {
          padding-inline: calc(59 * var(--u980)) 0;
        }
      }
    }
  }
}

/*
  About and Contact, ported from the old styles.css (2026-10-25) unchanged except for variable names, under the old
  base's main padding (below the corner drawing), which Home sets for itself.
*/
:is(.about, .contact)>main {
  padding-block-start: calc(169rem / 16 + 120 * var(--phone-art-grow));
  @media(width>=40rem) {
    padding-block-start: calc(118rem / 16 + 90 * var(--grow));
  }
}
.about {
  &>main {
    &>h1 {
      color: var(--color-gold);
      font-size: calc(24rem / 16 + 12 * var(--phone-grow) + 12 * var(--grow));
      line-height: round(nearest, 2rem + 16 * var(--phone-grow) + 16 * var(--grow), 1px);
    }
    @media(width>=40rem) {
      padding-block-start: calc(158rem / 16 + 120 * var(--grow));
      &>.corner-decorations>img {
        block-size: calc(134rem / 16 + 160 * var(--grow));
      }
    }
  }
  & .portrait-wave {
    /* A cut river that never spans the window (the user, 2026-10-22), so it stays at its 1440 drawing. */
    max-inline-size: calc(1440rem / 16);
    margin-block-start: calc(19rem / 16);
    margin-inline: auto;
    &>.portrait {
      inset-block-start: calc(45rem / 16 + 45 * var(--phone-art-grow));
      inset-inline-end: 0;
      inline-size: 61%;
      margin-inline: auto;
      @media(width>=40rem) {
        inset-block-start: calc(8rem / 16);
        inline-size: calc(350rem / 16 + 306 * var(--grow));
      }
    }
    @media(width>=40rem) {
      margin-block-start: calc(54rem / 16 + 24 * var(--grow));
      /* The wide river drawing's 1440 by 690 shape at every width. */
      &>picture>img {
        aspect-ratio: 1440 / 690;
      }
    }
  }
  & :is(.biography, .interests) {
    font-family: "Playfair Display", serif;
    font-weight: 600;
  }
  & .biography {
    inline-size: calc(100% - 68rem / 16);
    max-inline-size: var(--column-max);
    margin-block-start: calc(72rem / 16);
    margin-inline: auto;
    font-size: calc(15rem / 16);
    line-height: calc(30rem / 16);
    text-align: start;
    &>p {
      margin-block: 0;
      &+p {
        margin-block-start: calc(30rem / 16);
        @media(width>=40rem) {
          margin-block-start: calc(35rem / 16);
        }
      }
      &>strong {
        font-weight: 800;
      }
    }
    @media(width>=40rem) {
      inline-size: calc(100% - 246rem / 16 - 108 * var(--grow));
      margin-block-start: calc(66rem / 16 + 54 * var(--grow));
      font-size: calc(14rem / 16 + 2 * var(--grow));
      line-height: calc(35rem / 16);
    }
  }
  & .pill {
    --pill-inline-growth: 197;
    --pill-block-growth: 29;
    inset-inline-start: 0;
    margin-block-start: calc(70rem / 16);
    @media(width>=40rem) {
      margin-block-start: calc(68rem / 16 + 10 * var(--grow));
    }
  }
  & .interests {
    margin-block-start: 5rem;
    &>h2 {
      max-inline-size: calc(300rem / 16);
      margin-block: 0;
      margin-inline: auto;
      font-size: calc(20rem / 16 + 2 * var(--phone-grow) + 8 * var(--grow));
      font-weight: 700;
      line-height: round(nearest, 28rem / 16 + 2 * var(--phone-grow) + 10 * var(--grow), 1px);
      @media(width>=40rem) {
        max-inline-size: var(--column-max);
      }
    }
    @media(width>=40rem) {
      margin-block-start: calc(108rem / 16 + 3 * var(--grow));
    }
  }
  & .gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
    gap: calc(43rem / 16) calc(20rem / 16);
    inline-size: calc(100% - 68rem / 16);
    max-inline-size: var(--column-max);
    margin-block-start: calc(42rem / 16);
    margin-inline: auto;
    &>figure {
      inline-size: calc(180rem / 16);
      margin-block: 0;
      margin-inline: 0;
      &>picture {
        display: block;
        aspect-ratio: 3 / 4;
        &>img {
          position: relative;
          inset-block-start: calc(5rem / 16);
          display: block;
          inline-size: calc(100% - 14rem / 16);
          block-size: auto;
          margin-inline: auto;
          border-radius: calc(50rem / 16);
          box-shadow: 0 calc(6rem / 16) calc(5rem / 16) var(--color-river-gold);
          @media(width>=40rem) {
            inset-block-start: calc(5rem / 16 - 3 * var(--grow));
          }
        }
        @media(width>=40rem) {
          aspect-ratio: 34 / 45;
        }
      }
      &>figcaption {
        margin-block-start: calc(10rem / 16);
        font-size: 1rem;
        line-height: calc(22rem / 16);
        @media(width>=40rem) {
          margin-block-start: calc(19rem / 16 + 24 * var(--grow));
          font-size: calc(16rem / 16 + 6 * var(--grow));
          line-height: round(nearest, 24rem / 16 + 6 * var(--grow), 1px);
        }
      }
      @media(width>=40rem) {
        inline-size: calc(180rem / 16 + 92 * var(--grow));
      }
    }
    /*
      The tablet design fills this row exactly with three photos, so a desktop window's 15 px scrollbar at 744
      would push the third onto its own line; the photos shrink a little instead.
    */
    @media(width>=40rem) {
      flex-direction: row;
      flex-wrap: nowrap;
      justify-content: space-between;
      align-items: start;
      inline-size: calc(100% - 150rem / 16 - 204 * var(--grow));
      margin-block-start: calc(74rem / 16 + 31 * var(--grow));
    }
  }
  &>.site-footer {
    margin-block-start: calc(90rem / 16);
    @media(width>=40rem) {
      margin-block-start: calc(157rem / 16 + 58 * var(--grow));
    }
  }
  & .footer-wave {
    margin-block-start: calc(-60rem / 16 - 60 * var(--phone-art-grow));
  }
}
/* Home's wide footer is drawn like About's (client's Desktop Home, 2026-10-18). */
.about .footer-wave {
  @media(width>=40rem) {
    margin-block-start: calc(-67rem / 16 - 64 * var(--grow));
    &>picture>img {
      aspect-ratio: 1440 / 360;
    }
  }
}
.contact {
  &>main {
    font-family: "Playfair Display", serif;
    font-weight: 600;
    text-align: start;
    &>h1 {
      color: var(--color-gold);
      font-family: inherit;
      font-size: calc(24rem / 16 + 4 * var(--phone-grow) + 20 * var(--grow));
      font-weight: 700;
      line-height: round(nearest, 2rem + 6 * var(--phone-grow) + 26 * var(--grow), 1px);
      text-align: center;
    }
    @media(width>=40rem) {
      padding-block-start: calc(150rem / 16 + 114 * var(--grow));
    }
  }
  & .column {
    inline-size: calc(100% - 42rem / 16);
    max-inline-size: var(--column-max);
    margin-inline: auto;
    font-size: calc(15rem / 16 + 7 * var(--grow));
    line-height: round(nearest, 30rem / 16 + 5 * var(--grow), 1px);
    @media(width>=40rem) {
      inline-size: 75.3%;
      font-size: calc(14rem / 16 + 8 * var(--grow));
      line-height: calc(35rem / 16);
    }
  }
  & .invitation {
    margin-block: calc(36rem / 16) 0;
    @media(width>=40rem) {
      margin-block-start: calc(24rem / 16 + 69 * var(--grow));
    }
  }
  & .email-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: calc(28rem / 16) calc(34rem / 16 + 30 * var(--grow));
    margin-block-start: 2rem;
    &>div>h2 {
      margin-block: 0;
      font-size: calc(20rem / 16 + 10 * var(--grow));
      line-height: round(nearest, 28rem / 16 + 14 * var(--grow), 1px);
    }
    @media(width>=40rem) {
      /* The wide designs end the email wave on the fields' edge, 13 pixels inside the column at 1440. */
      inline-size: calc(100% - 13 * var(--grow));
      margin-block-start: calc(10rem / 16 + 54 * var(--grow));
    }
  }
  & .email-link {
    display: inline-flex;
    align-items: center;
    min-inline-size: 3rem;
    min-block-size: 3rem;
    margin-block-start: calc(7rem / 16);
    color: inherit;
    @media(width>=40rem) {
      margin-block-start: 0;
    }
  }
  & .email-wave {
    flex: 1 1 calc(250rem / 16);
    @media(width>=40rem) {
      align-self: start;
      margin-block-start: calc(7rem / 16 - 12 * var(--grow));
    }
  }
  & .message-form {
    display: flex;
    flex-direction: column;
    gap: calc(33rem / 16);
    inline-size: calc(100% - 13rem / 16);
    margin-block-start: calc(44rem / 16);
    @media(width>=40rem) {
      gap: calc(12rem / 16 + 59 * var(--grow));
      inline-size: calc(100% - 13 * var(--grow));
      margin-block-start: calc(24rem / 16 + 84 * var(--grow));
    }
  }
  & .field-row {
    display: flex;
    flex-wrap: wrap;
    gap: inherit;
    &>label {
      flex: 1 1 100%;
      @media(width>=40rem) {
        flex-basis: calc(237rem / 16 + 142 * var(--grow));
        &:last-child {
          flex-basis: calc(280rem / 16 + 248 * var(--grow));
        }
      }
    }
    /*
      Name and Phone fill the tablet design's row exactly, so a desktop window's 15 px scrollbar at 744 would
      stack them; they narrow a little instead.
    */
    @media(width>=40rem) {
      flex-wrap: nowrap;
      column-gap: calc(43rem / 16 + 120 * var(--grow));
    }
  }
  & .field {
    display: block;
    min-inline-size: 0;
    font-size: calc(20rem / 16 + 10 * var(--grow));
    font-weight: 700;
    line-height: round(nearest, 28rem / 16 + 14 * var(--grow), 1px);
    &>span {
      color: var(--color-river-gold);
    }
    &>input,
    &>textarea {
      display: block;
      box-sizing: border-box;
      inline-size: 100%;
      block-size: calc(48rem / 16 + 9 * var(--grow));
      min-inline-size: 3rem;
      min-block-size: 3rem;
      margin-block-start: calc(18rem / 16);
      padding-block: calc(8rem / 16);
      padding-inline: calc(12rem / 16);
      border-width: calc(1rem / 16);
      border-style: solid;
      border-color: var(--color-body-purple);
      border-radius: calc(5rem / 16 + 5 * var(--grow));
      background-color: var(--color-page-background);
      color: inherit;
      font-family: inherit;
      font-size: calc(15rem / 16 + 7 * var(--grow));
      font-weight: 600;
      @media(width>=40rem) {
        margin-block-start: calc(13rem / 16 + 8 * var(--grow));
      }
    }
    &>textarea {
      block-size: calc(155rem / 16 + 127 * var(--grow));
      resize: block;
      @media(width<40rem) {
        margin-block-start: calc(22rem / 16);
      }
    }
  }
  & .captcha-reminder {
    /* Inserted above the captcha when Send is pressed without it; aligned like the captcha and Send. */
    margin-block: 0;
    text-align: center;
    @media(width>=40rem) {
      text-align: end;
    }
  }
  & .h-captcha {
    /*
      Reserve the compact hCaptcha frame before its third-party script loads, so the
      Send button does not jump; the frame is sized in pixels whatever the font size.
    */
    min-block-size: 138px;
    /* Centred over the Send button, as the client asked, with the button's same nudge. */
    position: relative;
    inset-inline-start: calc(13rem / 32);
    display: flex;
    justify-content: center;
    @media(width>=40rem) {
      /* As wide as the Send button below it (its 144 by 74 growth), so the frame centres over the pill. */
      inset-inline-start: 0;
      align-self: end;
      inline-size: calc(144rem / 16 + 74 * var(--grow));
      min-inline-size: max-content;
    }
  }
  & .pill {
    --pill-inline-growth: 74;
    --pill-block-growth: 29;
    margin-block-start: calc(17rem / 16);
    cursor: pointer;
    @media(width<40rem) {
      inset-inline-start: calc(13rem / 32);
    }
    @media(width>=40rem) {
      margin-block-start: calc(38rem / 16 - 29 * var(--grow));
      margin-inline-end: 0;
      font-family: "Abril Fatface", serif;
      font-weight: 400;
    }
  }
  &>.site-footer {
    @media(width>=40rem) {
      margin-block-start: calc(24rem / 16 + 168 * var(--grow));
    }
  }
  /*
    Phone/Contact.pdf leaves 8.2 px between "© 2026 Xinyan Chen" and the wave below it at 390; pulled up 72 the wave
    came within 2.5 px (Safari), so it rises 66, and below 390 less again to keep that 8 (it reached 3 px into
    "Chen" at 320).
  */
  & .footer-wave {
    margin-block-start: calc(-66rem / 16 - 66 * var(--phone-art-grow) - 36.5 * min(var(--phone-art-grow), 0rem));
    @media(width>=40rem) {
      margin-block-start: calc(-80rem / 16 - 60 * var(--grow));
      &>picture>img {
        aspect-ratio: 1440 / 360;
      }
    }
  }
}
