.section-kicker {
  display: block;
  margin: 0 0 clamp(6px, 1vh, 12px);
  color: #655f50;
  font: 500 .85rem/1.35 var(--font-chinese-body);
  letter-spacing: .035em;
  text-align: start;
}
.story-heading h2 { top: auto; }
#home #hero-title { margin-inline: auto; text-align: center; }
#home:lang(zh) .hero-line { white-space: nowrap; }
@media (max-width: 600px) {
  #home:lang(zh) .hero-copy { container-type: inline-size; }
  #home:lang(zh) #hero-title { font-size: min(clamp(32px, 8.2vw, 40px), 11cqi); }
}
#home .hero-description { text-wrap: balance; }
#home .hero-description span { white-space: nowrap; }
.hero .hero-line > span, .hero .hero-description, .hero .hero-actions { animation: none; opacity: 1; }
.hero .hero-description, html[lang="en"] .hero .hero-description,
.about-description, .story-copy > p:not(.eyebrow) { font-size: clamp(16px, 1.18vw, 18px); }
.about-description { line-height: 1.7; }

/* The first and last markers sit on the outer edges of the chapter grid. */
@media (min-width: 901px) {
  .story-navigation { grid-template-columns: repeat(3,minmax(0,1fr)) 0; width: 100%; }
  .story-navigation .story-progress { left: 0; right: 0; }
  .story-navigation button { width: max-content; transform: translateX(-50%); }
  .story-navigation button:first-of-type { transform: none; padding-left: 0; }
  .story-navigation button:last-of-type { transform: translateX(-100%); padding-right: 0; }
  .story-navigation button:first-of-type::before { left: 0; }
  .story-navigation button:last-of-type::before { left: 100%; }
}
.process-ring .process-node.is-active {
  background: #eeeadc; border-color: #a49e88;
}
.story-navigation .story-progress span { background: #868470; }
.story-progress span::after { background: #f5f1e4; border-color: #827f69; }
@keyframes process-arrival {
  from { box-shadow: 0 0 0 1px #b8b39d; }
  to { box-shadow: 0 0 0 1px transparent; }
}
.story-copy h3 { white-space: pre-line; }
.story-copy-area .story-copy[hidden] { display: block !important; visibility: hidden; pointer-events: none; }
#work .project-notes { --project-card-paper: var(--content-paper); }
.project-notes[data-home-projects="data"] .project-name {
  word-break: keep-all;
  text-wrap: balance;
}
.project-notes[data-home-projects="data"] .project-note { text-wrap: balance; }

/* Each chapter draws on the same particle field, directly on the paper. */
.work-art-rail { display: none; }
#work { scroll-margin-block-start: var(--header-height); }
#work .offering-card, html.chapter-paging #work .offering-card {
  border-top: 0;
  /* The small section label's text sits 1px above the top of its line box. */
  padding-block-start: calc(var(--content-start-offset) + 1px);
  justify-content: flex-start;
}
#work .offering-copy > p { text-wrap: balance; }
#work .offering-visual {
  display: block; position: relative; justify-self: center; margin: 0;
  width: 100%; height: auto; max-width: none; perspective: none; pointer-events: auto;
}
#work .work-particle-field {
  display: block; width: 100%; height: auto; aspect-ratio: 6 / 5;
  touch-action: auto;
}
#work [data-work-diagram] { width: 100%; }
.work-diagram-description {
  margin: 0; color: #665a4a; font: 1rem/1.6 var(--font-heading);
}
#work [data-work-diagram]:not(:empty) + figcaption, #work .shared-art .offering-visual {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); margin: -1px; padding: 0; white-space: nowrap;
}

/* The type and cards share the header and footer measure. The wider canvas
   is a background inside the chapter range and can bleed under the cards. */
@media (min-width: 901px) {
  #work { overflow-x: clip; }
  #work .offering-deck {
    container-type: inline-size;
    --copy-width: 61.8%;
    /* Distance from the card edge to the viewport edge, including the gutter. */
    --art-room: calc(50vw - 11.8cqi);
    --field-width: min(67vw, 1.14 * var(--art-room));
    --field-offset: min(calc((min(var(--art-room), 64svh) - var(--field-width)) / 2),
                        calc(var(--art-room) - var(--field-width) + .6vw));
    --reading-height: calc(100svh - var(--header-height));
    --release-gap: clamp(64px, 9svh, 120px);
    width: min(var(--content-width), calc(100% - 2 * var(--chapter-gutter)));
    margin-inline: auto;
    isolation: isolate;
  }
  #work .offering-card, html.chapter-paging #work .offering-card {
    padding-inline: 0; min-width: 0;
  }
  #work .offering-layout {
    grid-template-columns: var(--copy-width) minmax(0, 1fr); gap: 0; max-width: none;
  }
  #work .offering-copy { position: relative; z-index: 1; align-self: start; }
  #work .offering-deck:not(.shared-art) .offering-visual {
    width: var(--field-width); justify-self: start; align-self: start; margin-inline-start: var(--field-offset);
  }
  #work .offering-deck:not(.shared-art) .offering-visual .work-particle-field {
    height: min(var(--reading-height), 84svh, 1230px);
  }
  #work .shared-art {
    display: grid; grid-template-columns: var(--copy-width) minmax(0,1fr);
  }
  #work .shared-art .offering-card, html.chapter-paging #work .shared-art .offering-card {
    grid-column: 1; z-index: 1;
    padding-block-end: clamp(48px, 6vw, 88px);
  }
  #work .shared-art .offering-layout { display: block; }
  #work .shared-art .offering-copy > :is(.offering-heading, p) { position: relative; isolation: isolate; }
  #work .shared-art .offering-copy > :is(.offering-heading, p)::before {
    content: ''; position: absolute; inset: 0 -1em 0 0; z-index: -1; pointer-events: none;
    background: linear-gradient(to right, var(--content-paper) calc(100% - 1em), transparent);
  }
  #work .shared-art .offering-card:last-child, html.chapter-paging #work .shared-art .offering-card:last-child {
    min-height: var(--reading-height);
    padding-block-end: calc(clamp(48px, 6vw, 88px) + var(--release-gap) * 2);
  }
  .shared-art .work-art-rail {
    --drawing-height: min(var(--reading-height), 84svh, 1230px);
    --drawing-inset: calc((var(--reading-height) - var(--drawing-height)) / 2);
    display: block; grid-column: 2; grid-row: 1 / span 4;
    justify-self: start; align-self: start; z-index: 0;
    position: sticky; top: calc(var(--header-height) + var(--drawing-inset));
    width: var(--field-width); height: var(--drawing-height);
    margin-inline-start: var(--field-offset);
    margin-block: var(--drawing-inset) calc(var(--drawing-inset) + var(--release-gap));
  }
  #work .work-art-rail > .work-particle-field { width: 100%; height: 100%; }
  #work .work-particle-field {
    mask-image: linear-gradient(90deg, transparent, #000 max(1px, calc(-1 * var(--field-offset))), #000);
  }
}
@media (max-width: 900px) {
  #work .offering-layout { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  #work .offering-copy { display: contents; }
  #work .offering-visual {
    grid-row: 3; justify-self: center;
    width: min(calc(100% + 2 * var(--chapter-gutter)), 720px);
    margin-inline: calc(-1 * var(--chapter-gutter)); margin-block: 8px;
  }
  #work .work-particle-field {
    height: min(80vw, 48svh, 500px);
    aspect-ratio: auto;
  }
  #work .project-notes { grid-row: 4; }
}
@media (max-width: 600px) {
  #about .about-description { font-size: 16px; margin-top: 16px; }
  .project-shortcuts { column-gap: 16px; font-size: 14px; }
}
@media (max-width: 600px) and (max-height: 640px) {
  .hero { padding-block: calc(var(--header-height) + 12px) 32px; }
  .story-stage, html.chapter-paging .story-stage {
    padding-block: calc(var(--header-height) + 8px) 8px;
  }
  .process-diagram.process-ring { min-height: 7.7rem; row-gap: 10px; }
  .process-ring .process-node { padding-block: 2px; }
  .story-copy > p:not(.eyebrow) { font-size: 15px; line-height: 1.48; }
  .story-workbench { margin-top: 8px; gap: 9px; }
  .project-shortcuts { margin-top: 3px; column-gap: 12px; }
}
@media (min-width: 901px) and (min-height: 520px) and (max-height: 660px) {
  .story-visual.process-visual { height: clamp(252px, calc(100svh - 268px), 393px); }
}

.project-shortcuts[data-home-projects="data"] {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 4px clamp(16px, 2.8vw, 38px);
  margin-top: 12px;
}

/* The Chinese index pairs the two finance and two legal evaluations. */
.project-shortcuts:lang(zh) {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 4px clamp(16px, 2vw, 30px);
  align-items: baseline;
  justify-content: start;
  margin-top: 14px;
  line-height: 1.45;
}
.project-shortcuts:lang(zh):is([data-home-projects="benchmarks"], [data-home-projects="environments"]) > li:first-child {
  grid-column: 1 / -1;
}
.project-shortcuts:lang(zh)[data-home-projects="data"] {
  grid-template-columns: repeat(3, max-content);
}
.project-shortcuts .project-name {
  display: inline-flex;
  align-items: center;
  gap: .5em;
}
.project-shortcuts .project-name::before {
  content: "";
  flex: none;
  width: .52em;
  height: 1px;
  background: #a69a80;
}
.project-shortcuts > li:last-child {
  grid-column: 1 / -1;
  flex-basis: 100%;
  margin-top: 7px;
}
@media (max-width: 600px) {
  .project-shortcuts:lang(zh) {
    margin-top: 10px;
    gap: 3px 16px;
  }
  .project-shortcuts > li:last-child { margin-top: 3px; }
  .project-shortcuts:lang(zh) .story-more {
    display: inline-flex;
    align-items: center;
    gap: .3em;
    min-height: 44px;
  }
}
@media (max-width: 600px) and (max-height: 640px) {
  .project-shortcuts:lang(zh) { margin-top: 5px; row-gap: 1px; }
  .project-shortcuts > li:last-child { margin-top: 0; }
}
@media (max-width: 600px) and (max-height: 700px) {
  #data-story .story-copy > p { line-height: 1.48; }
}
@media (max-width: 600px) and (min-height: 641px) {
  .process-diagram.process-ring { min-height: clamp(10rem, 24svh, 14rem); }
}
