/* Mobile first: the base layer is the smallest screen. Every
   (min-width) block below adds room, never removes it. */

/* =========================================================================
   PAGES — index, work table, case studies, ledger, correspondence
   ========================================================================= */

/* ---------- Generic page header ------------------------------------- */

/* ---------- Home: principles ---------------------------------------- */

/* ---------- Work index ---------------------------------------------- */

/* ---------- Case study --------------------------------------------- */

/* ---------- About / ledger page ------------------------------------ */

/* ---------- Contact / correspondence ------------------------------- */

/* ---------- Responsive -------------------------------------------- */

@keyframes fade-up {
from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.page-head {
  padding-top: clamp(36px, 5.5vw, 84px);
  padding-bottom: clamp(28px, 4vw, 56px);
  border-bottom: 1px solid var(--rule-strong);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  align-items: end;
}
.page-head__kicker {
  grid-column: 1 / -1;
  margin-bottom: clamp(16px, 2.5vw, 32px);
}
.page-head__title {
  grid-column: 1 / -1;
}
.page-head__deck {
  grid-column: 1 / -1;
  font-size: clamp(0.95rem, 1.15vw, 1.0625rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
  padding-bottom: 0.35rem;
  margin-top: 1.25rem;
}
.page-head__title h1 {
  font-size: var(--md-sys-typescale-display-small-size);
  line-height: 0.98;
  letter-spacing: -0.032em;
  font-weight: 520;
  text-wrap: balance;
}
.page-head__title h1 em {
  font-style: normal;
  color: var(--accent);
}
.principles {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
}
.principle {
  grid-column: span 6;
  border-top: 1px solid var(--rule-strong);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.principle__num {
  font-family: var(--font-small);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.principle__title {
  font-size: 1.0625rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 500;
}
.principle__body {
  font-family: var(--font-small);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.more-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule-strong);
}
.index-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.index-toolbar__count {
  font-family: var(--font-small);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.entries {
  border-bottom: 1px solid var(--rule-strong);
}
.entry__mark {
  display: none;
}
.entry {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: clamp(12px, 2vw, 32px);
  align-items: baseline;
  padding-block: clamp(18px, 2.2vw, 30px);
  border-top: 1px solid var(--rule);
  transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
  row-gap: 0.5rem;
}
.entry::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gutter) * -1);
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  opacity: 0;
  transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
  pointer-events: none;
}
.entries .entry:first-child {
  border-top: 0;
}
.entry:hover::before {
  opacity: 1;
}
/* an entry described by scope has no page: no hover, no pointer */
.entry--still:hover::before { opacity: 0; }
.entry:focus-within::before {
  opacity: 1;
}
.entry__num {
  font-family: var(--font-small);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.entry__main {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Hierarchy inside the index: one leading entry, one supporting cast, one archive.
   Without this the squint test finds twelve equal bars and starts at number one. */
.entry--lead .entry__client {
  font-size: clamp(1.55rem, 2.9vw, 2.2rem);
  font-weight: 560;
  letter-spacing: -0.03em;
}
.entry__cue {
  font-family: var(--font-small);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: -0.15rem;
}
.entry--archive .entry__client {
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  font-weight: 440;
  letter-spacing: -0.015em;
  color: var(--ink-soft);
}
.entry--archive .entry__num {
  color: var(--ink-faint);   /* dimmed by colour, not opacity: it must keep 4.5:1 */
}
/* the locked entry should not out-shout the clickable one */
.entry__status .stamp,
.entry--archive .entry__status .chip {
  border-color: transparent;
  background: none;
  color: var(--ink-faint);
  padding-inline: 0;
  font-weight: 600;
}
.entry__client {
  font-size: clamp(1.3rem, 2.3vw, 1.9rem);
  line-height: 1.04;
  letter-spacing: -0.026em;
  font-weight: 480;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.entry__client .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: all var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
}
.entry:hover .entry__client .icon {
  opacity: 1;
  transform: none;
}
.entry__line {
  font-family: var(--font-small);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 44ch;
}
.entry__disc {
  font-family: var(--font-small);
  font-size: 0.6875rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  grid-column: 2 / -1;
  /* stacked, not wrapped: a ragged inline run of disciplines reads as three
     unrelated fragments on a 390px screen */
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.entry__disc span {
  display: inline;
}
.entry__year {
  font-family: var(--font-small);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  justify-self: start;
  white-space: nowrap;
  grid-column: 2;
}
.entry__status {
  justify-self: end;
  grid-column: 3;
  grid-row: 1;
}
.entry__link {
  position: absolute;
  inset: 0;
}
.entry__link:focus-visible {
  outline-offset: -3px;
}
.entry[hidden] {
  display: none;
}
.archive {
  margin-top: clamp(32px, 4vw, 56px);
}
.archive__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(12px, 2vw, 32px);
  padding-block: 0.85rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-small);
  font-size: 0.75rem;
  color: var(--ink-soft);
  align-items: baseline;
  row-gap: 0.25rem;
}
.archive__row:last-child {
  border-bottom: 1px solid var(--rule);
}
.archive__row strong {
  color: var(--ink);
  font-weight: 500;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}
.archive__year {
  justify-self: end;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
}
.case-head {
  padding-top: clamp(32px, 4.5vw, 68px);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: clamp(24px, 3vw, 40px);
}
.case-head__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin-bottom: clamp(20px, 3vw, 40px);
}
.case-head__title {
  font-size: clamp(2.6rem, 8.5vw, 7rem);
  line-height: 0.86;
  letter-spacing: -0.042em;
  font-weight: 560;
  text-wrap: balance;
}
.case-head__deck {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  margin-top: clamp(20px, 3vw, 36px);
  align-items: end;
  row-gap: 1rem;
}
.case-head__deck p {
  grid-column: 1 / -1;
  font-size: clamp(1.1rem, 1.75vw, 1.45rem);
  line-height: 1.42;
  letter-spacing: -0.012em;
  font-weight: 380;
  color: var(--ink);
  text-wrap: pretty;
  max-width: 34ch;
  justify-self: start;
}
.case-head__status {
  grid-column: 1 / -1;
  justify-self: start;
}
.case-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
  margin-top: clamp(24px, 3.5vw, 48px);
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  row-gap: 1rem;
}
.case-meta__item {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.case-meta__item dt {
  font-family: var(--font-small);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.case-meta__item dd {
  font-family: var(--font-small);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}
.case-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  padding-block: clamp(36px, 5vw, 72px);
}
.case-body__text {
  grid-column: 1 / -1;
}
.case-body__aside {
  grid-column: 1 / -1;
  position: static;
  top: calc(var(--appbar-h) + 24px);
  align-self: start;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
.case-h2 {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.14;
  letter-spacing: -0.022em;
  font-weight: 480;
}
.case-h2 .n {
  font-family: var(--font-small);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  flex: none;
}
.case-block + .case-block {
  margin-top: clamp(32px, 4vw, 56px);
}
.case-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.2rem;
}
.case-list li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.5rem;
  font-family: var(--font-small);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.case-list li::before {
  content: "—";
  color: var(--accent);
  font-weight: 600;
}
.case-figure {
  padding-block: clamp(28px, 4vw, 56px);
}
.case-figure--bleed {   /* a direct child of main: full width without 100vw (which counts the scrollbar) */
  margin: 0;
  padding-inline: var(--gutter);
}
.aside-card {
  border-top: 1px solid var(--rule-strong);
  padding-top: 0.9rem;
  font-family: var(--font-small);
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.aside-card + .aside-card {
  margin-top: 0;
}
.aside-card h3 {
  font-family: var(--font-small);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}
.aside-card ul {
  display: grid;
  gap: 0.35rem;
}
.aside-card li {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.aside-card li::before {
  content: "·";
  color: var(--accent);
}
.next-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  border-top: 1px solid var(--rule-strong);
  padding-block: clamp(32px, 4vw, 64px);
  align-items: end;
  row-gap: 1rem;
}
.next-feature__label {
  grid-column: 1 / -1;
}
.next-feature__link {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}
.next-feature__title {
  font-size: clamp(1.8rem, 5vw, 3.6rem);
  line-height: 0.94;
  letter-spacing: -0.036em;
  font-weight: 520;
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--md-sys-motion-duration-medium4) var(--md-sys-motion-easing-emphasized);
}
a.next-feature__title:hover {
  background-size: 100% 1px;
}
a.next-feature__title:focus-visible {
  background-size: 100% 1px;
}
.next-feature__link .icon {
  width: clamp(28px, 4vw, 48px);
  height: clamp(28px, 4vw, 48px);
  color: var(--accent);
  transition: transform var(--md-sys-motion-duration-medium4) var(--md-sys-motion-easing-emphasized);
}
.next-feature__link:hover .icon {
  transform: translateX(10px);
}
.about-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  padding-block: clamp(32px, 4.5vw, 72px);
  align-items: start;
  row-gap: 2rem;
}
.about-intro__portrait {
  grid-column: 1 / -1;
}
.about-intro__text {
  grid-column: 1 / -1;
}
.about-intro__text .dropcap {
  margin-bottom: 1em;
}
.about-intro__sig {
  margin-top: 2rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-small);
  font-size: 0.6875rem;
  color: var(--ink-faint);
}
.about-portrait__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--plate-blue);
  color: var(--plate-ink);
  border-radius: var(--md-sys-shape-corner-xs);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(12px, 1.7vw, 22px);
}
.about-portrait__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, color-mix(in oklab, white 14%, transparent) 1px, transparent 1px), linear-gradient(to bottom, color-mix(in oklab, white 14%, transparent) 1px, transparent 1px);
  background-size: 25% 20%;
  opacity: 0.5;
  pointer-events: none;
}
.about-portrait__frame > * {
  position: relative;
}
.about-portrait__kicker {
  font-family: var(--font-small);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.82;
}
.about-portrait__initials {
  font-family: var(--font-display);
  font-size: clamp(54px, 7.2vw, 104px);
  line-height: 0.78;
  letter-spacing: -0.055em;
  font-weight: 580;
  margin-left: -0.05em;
  white-space: nowrap;
}
.about-portrait__meta {
  font-family: var(--font-small);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  border-top: 1px solid color-mix(in oklab, white 35%, transparent);
  padding-top: 0.5rem;
}
.portrait-plate {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--paper-high);
  border-radius: var(--md-sys-shape-corner-xs);
  overflow: hidden;
  display: grid;
  place-items: center;
  max-width: 320px;
}
.portrait-plate__initials {
  font-family: var(--font-display);
  font-size: clamp(72px, 9vw, 130px);
  font-weight: 620;
  letter-spacing: -0.05em;
  color: var(--ink);
  opacity: 0.16;
  line-height: 1;
}
.portrait-plate__rule {
  position: absolute;
  inset: auto 12% 18%;
  border-top: 1px solid var(--rule-strong);
}
.portrait-plate figcaption {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 8%;
  font-family: var(--font-small);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.craft-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
  border-top: 1px solid var(--rule-strong);
  padding-top: clamp(20px, 2.5vw, 32px);
}
.craft {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-bottom: 1.5rem;
}
.craft__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}
.craft__title {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.012em;
}
.craft__n {
  font-family: var(--font-small);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.craft p {
  font-family: var(--font-small);
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.craft ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}
.craft li {
  font-family: var(--font-small);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--md-sys-shape-corner-xs);
  color: var(--ink-soft);
  white-space: nowrap;
}
.letter {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  padding-block: clamp(36px, 5vw, 80px);
  row-gap: 2.5rem;
}
.letter__main {
  grid-column: 1 / -1;
}
.letter__aside {
  grid-column: 1 / -1;
}
.letter__title {
  font-size: clamp(2.6rem, 7.5vw, 5.6rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 540;
  margin-bottom: clamp(20px, 3vw, 36px);
  text-wrap: balance;
}
.letter__body {
  max-width: 46ch;
  display: grid;
  gap: 1em;
}
.letter__body p {
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.6;
  color: var(--ink-soft);
}
.letter__sig {
  margin-top: 2.5rem;
  font-family: var(--font-small);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.contact-list {
  border-top: 1px solid var(--rule-strong);
}
.contact-list__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.contact-list__label {
  font-family: var(--font-small);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.contact-list__value {
  font-family: var(--font-small);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: right;
}
a.contact-list__value:hover {
  color: var(--accent);
}
.email-cta {
  display: block;
  margin-top: clamp(24px, 3vw, 40px);
  padding-top: 1rem;
  border-top: 1px solid var(--rule-strong);
}
.email-cta__label {
  font-family: var(--font-small);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
}
.email-cta__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.email-cta__value {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1.15rem, 3.2vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.028em;
  font-weight: 480;
  word-break: break-word;
  transition: color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.email-cta__value .icon {
  width: 0.9em;
  height: 0.9em;
  color: var(--accent);
}
.email-cta__value:hover {
  color: var(--accent);
}
.email-cta__row .icon-btn {
  color: var(--accent);
}
.archive__row > :nth-child(3) {
  grid-column: 1 / -1;
}

@media (min-width: 901px) {
  .entry--marked {
    grid-template-columns: 104px 32px minmax(0, 1fr) 200px;
    column-gap: 18px;
  }
  .entry--marked .entry__disc { grid-column: 3 / 4; }
  /* baseline alignment put the number at the top edge of a tall row and pushed
     the status chip onto a second line; start-align everything that isn't the mark */
  .entry--marked { align-items: start; }
  .entry--marked .entry__mark { align-self: center; }
  .entry--marked .entry__num { grid-row: 1; align-self: start; margin-top: 0.1em; }
  .entry--marked .entry__status { grid-row: 1; align-self: start; justify-self: end; }
  .entry__mark {
    display: block;
    grid-column: 1;
    grid-row: 1;
    width: 104px;
    aspect-ratio: 3 / 2;
    align-self: center;
    color: var(--ink);
    opacity: .82;
  }
  .entry__mark > svg {
    display: block;
    width: 100%;
    height: auto;
  }
  .entry--marked .entry__num { grid-column: 2; }
  .entry--marked .entry__main { grid-column: 3; }
  .entry--marked .entry__status { grid-column: 4; }

  .page-head {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .page-head__title {
    grid-column: 1 / span 7;
  }

  .page-head__deck {
    grid-column: 8 / -1;
    max-width: 38ch;
    margin-top: revert;
  }

  .principle {
    grid-column: span 3;
  }

  .entry {
    grid-template-columns: 48px minmax(0, 3.4fr) minmax(0, 2fr) 84px 96px;
    row-gap: revert;
  }

  .entry__disc {
    grid-column: revert;
    gap: 0.15rem;
  }

  .entry__disc span {
    display: block;
  }

  .entry__year {
    justify-self: end;
    grid-column: revert;
  }

  .entry__status {
    grid-column: revert;
    grid-row: revert;
  }

  .archive__row {
    grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) 96px;
    row-gap: revert;
  }

  .case-head__deck {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: revert;
  }

  .case-head__deck p {
    grid-column: 1 / span 6;
    justify-self: revert;
  }

  .case-head__status {
    grid-column: 10 / -1;
    justify-self: end;
  }

  .case-meta {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: revert;
  }

  .case-meta__item {
    grid-column: span 3;
  }

  .case-body {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .case-body__text {
    grid-column: 1 / span 7;
  }

  .case-body__aside {
    grid-template-columns: 1fr 1fr;
  }

  .next-feature {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: revert;
  }

  .next-feature__label {
    grid-column: 1 / span 3;
  }

  .next-feature__link {
    grid-column: 4 / -1;
  }

  .about-intro {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: revert;
  }

  .about-intro__portrait {
    grid-column: 1 / span 5;
  }

  .about-intro__text {
    grid-column: 6 / -1;
  }

  .portrait-plate {
    max-width: revert;
  }

  .craft {
    grid-column: span 6;
  }

  .letter {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: revert;
  }

  .letter__main {
    grid-column: 1 / span 7;
  }

  .letter__aside {
    grid-column: 8 / -1;
  }

  .archive__row > :nth-child(3) {
    grid-column: revert;
  }
}

@media (min-width: 1101px) {

  .page-head__title {
    grid-column: 1 / span 8;
  }

  .page-head__deck {
    grid-column: 9 / -1;
  }

  .case-body__text {
    grid-column: 2 / span 6;
  }

  .case-body__aside {
    grid-column: 9 / span 4;
    position: sticky;
    display: revert;
    grid-template-columns: revert;
    gap: revert;
    margin-top: revert;
  }

  .aside-card + .aside-card {
    margin-top: 1.75rem;
  }

  .about-intro__portrait {
    grid-column: 1 / span 4;
  }

  .craft {
    grid-column: span 4;
  }

  .letter__aside {
    grid-column: 9 / -1;
  }
}

/* desktop restore for the page-head deck (see composition.css) */
@media (min-width: 901px) {
  .page-head__deck { margin-top: 0; }
}

/* ---------- case study, card layout (MedBrief; after good-fella.com) -------
   A hero image card; the title on the ground; then light cards: facts left,
   brief right; each part = big heading left, subhead + rule + small text
   right (Montserrat, 14px), then the work. Client palettes stay inside
   their images. */
.cs-hero {
  margin: 0 var(--card-gap);
  height: min(calc(100svh - var(--topbar-h) - var(--card-gap)), 860px);
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--card-radius);
  background:
    radial-gradient(55% 75% at 85% 15%, rgb(18 160 140 / 0.55), transparent 70%),
    radial-gradient(65% 90% at 8% 100%, rgb(60 40 170 / 0.6), transparent 70%),
    #0b0b2b;
}
.cs-hero img { width: min(56%, 720px); height: auto; }
.cs-title { border-bottom: 0; }


.cs-card {
  margin: var(--card-gap) var(--card-gap) 0;
  padding: clamp(44px, 8vw, 136px) clamp(24px, 6.5vw, 112px);   /* room to breathe */
  border-radius: var(--card-radius);
  background: var(--paper);
  color: var(--ink);
}
.cs-card + .cs-card { margin-top: var(--card-gap); }
/* an in-page link to a part lands below the bar, not under it */
.cs-card [id] { scroll-margin-top: calc(var(--topbar-h) + var(--stick-gap) + 40px); }
.cs-hero + .cs-card { margin-top: var(--card-gap); }

/* the shared pattern: heading left, subhead · rule · small text right */
.cs-head, .cs-intro {
  display: grid;
  gap: 20px clamp(32px, 6vw, 96px);
}
.cs-h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}
.cs-h2--sm { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
/* section numbers: the home chapters' "01/", in the theme colour */
.cs-n {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 560;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.cs-sub {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.cs-text {
  margin-top: 18px;
  max-width: 62ch;
  font-family: var(--font-small);
  font-size: 0.875rem;
  font-weight: 450;
  line-height: 1.65;
  color: var(--ink-soft);
}
.cs-text > * + * { margin-top: 0.9em; }
.cs-text strong, .cs-text em { color: var(--ink); }
.cs-list { list-style: none; padding: 0; display: grid; gap: 0; }
.cs-list li { padding: 9px 0; border-top: 1px solid var(--rule); color: var(--ink); }
.cs-list li:last-child { border-bottom: 1px solid var(--rule); }
.cs-sub--sm { margin-top: clamp(28px, 3vw, 40px); padding-bottom: 12px; font-size: clamp(1.125rem, 1.6vw, 1.375rem); }
.cs-sub--sm + .cs-list { margin-top: 0; }

/* the facts: label · value rows on hairlines */
.cs-intro__name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}
.cs-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: clamp(20px, 3vw, 32px); }
.cs-intro__lead {
  max-width: 34ch;
  margin-top: clamp(16px, 2vw, 24px);
  font-size: clamp(1.0625rem, 1.5vw, 1.3rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}
.cs-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin-top: 6px;
  font-family: var(--font-small);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  text-underline-offset: 0.3em;
}
.cs-live .icon { width: 16px; height: 16px; fill: currentColor; }
.cs-facts { margin: 18px 0 0; font-family: var(--font-small); font-size: 0.8125rem; line-height: 1.45; }
.cs-facts > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--accent);   /* the theme, in its text-safe tone on light */
}
.cs-facts > div:last-child { border-bottom: 1px solid var(--accent); }
.cs-facts dt { font-weight: 600; color: var(--ink); }
.cs-facts dd { margin: 0; color: var(--ink-soft); }
/* the three concepts: words left, facts right, both sitting on the
   card's bottom line (MedBrief keeps its brief) */
.cs-intro--end { align-items: end; }
.cs-intro--end .cs-intro__brief > .cs-facts { margin-top: 0; }

/* the work under each part */
.cs-media { margin-top: clamp(40px, 6vw, 88px); }
.cs-media + .cs-media { margin-top: var(--card-gap); }
.cs-media--pair, .cs-media--grid { display: grid; gap: var(--card-gap); }
.cs-img { display: block; width: 100%; height: auto; border-radius: 16px; }
.cs-crop .mbframe__view { aspect-ratio: 16 / 10; overflow: hidden; }
.cs-crop .mbframe__view img { height: 100%; object-fit: cover; object-position: top; }
.cs-media--side { display: grid; gap: 18px; align-items: start; }
.cs-note { max-width: 34ch; font-family: var(--font-small); font-size: 0.875rem; line-height: 1.6; color: var(--ink-soft); }
.cs-note span { display: block; margin-top: 8px; font-size: 0.75rem; color: var(--ink-faint); }
.cs-system .plate__frame { border-radius: 16px; aspect-ratio: 4 / 3; }
@media (min-width: 761px) { .cs-system .plate__frame { aspect-ratio: 12 / 5; } }
/* the product, as MedBrief drew it for the public: their illustration on their
   own night-blue ground */
.mbproduct {
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 96px) clamp(20px, 5vw, 80px);
  border-radius: 16px;
  background: #0b0b2b url("../img/medbrief/mb-bg.webp") center / cover no-repeat;
  aspect-ratio: 4 / 3;
}
.mbproduct__ui { display: block; width: min(100%, 980px); height: auto; }
@media (min-width: 761px) { .mbproduct { aspect-ratio: 16 / 9; } }
.cs-cap { margin-top: 10px; font-family: var(--font-small); font-size: 0.75rem; color: var(--ink-soft); }

/* browser frames for the site */
.mbframe { margin: 0; border-radius: 12px; overflow: hidden; background: var(--paper-deep); box-shadow: 0 0 0 1px var(--rule); }
.mbframe__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  background: var(--paper-high);
  font-family: var(--font-small);
  font-size: 0.6875rem;
  color: var(--ink-soft);
}
.mbframe__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); }
.mbframe__bar span { margin-inline: auto; padding-right: 36px; }
.mbframe__view img { display: block; width: 100%; height: auto; }
.mbframe--scroll .mbframe__view { height: min(70svh, 620px); overflow: auto; overscroll-behavior: contain; }
.mbframe__view:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* the campaign: a carousel — three frames at a time (one on a phone), arrows
   and dots below, swipe or arrow keys; snap scrolling with the bar hidden */
.mbcar { --per: 1; }
.mbcar__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--per) - 1) * var(--card-gap)) / var(--per));
  gap: var(--card-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.mbcar__track::-webkit-scrollbar { display: none; }
.mbcar__track:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 14px; }
.mbcar__slide { position: relative; scroll-snap-align: start; }
.mbcar__slide img { display: block; width: 100%; height: auto; border-radius: 14px; }
.mbcar__n {
  position: absolute;
  inset-inline-start: 10px;
  inset-block-start: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font-family: var(--font-small);
  font-size: 0.6875rem;
  font-weight: 600;
}
.mbcar__nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.mbcar__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink-faint);
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 150ms ease, opacity 150ms ease;
}
.mbcar__btn:hover { background: color-mix(in oklab, var(--ink) 8%, transparent); }
.mbcar__btn:disabled { opacity: 0.35; cursor: default; background: none; }
.mbcar__btn .icon { width: 20px; height: 20px; fill: currentColor; }
.mbcar__dots { display: flex; gap: 4px; }
.mbcar__dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.mbcar__dot::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: var(--ink-faint);
  transition: background-color 200ms ease, inset 200ms ease;
}
.mbcar__dot[aria-current="true"]::before { inset: 8px 2px; background: var(--accent); }
.mbcar__dot[hidden] { display: none; }
.mbcar__dot:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; border-radius: 6px; }
@media (min-width: 761px) { .mbcar { --per: 3; } }
@media (prefers-reduced-motion: reduce) { .mbcar__track { scroll-behavior: auto; } }

/* results: credits left, dark stat tiles right */
.cs-results { display: grid; gap: clamp(28px, 4vw, 56px); }
.cs-results .cs-text { margin-top: 14px; }
.cs-stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-self: start; }
.cs-stats li {
  position: relative;
  display: grid;
  align-content: space-between;
  aspect-ratio: 1 / 1;   /* square tiles, so an image tile shows whole and the row stays even */
  padding: clamp(10px, 1.4vw, 14px);
  border-radius: 14px;
  overflow: hidden;
  background: var(--accent-deep);        /* the theme as a fill */
  color: var(--dark);
}
.cs-stats b { font-family: var(--font-display); font-size: clamp(1.05rem, 2.4vw, 2.1rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.cs-stats span { font-family: var(--font-small); font-size: 0.625rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: color-mix(in oklab, var(--dark) 78%, var(--accent-deep)); }
/* a tile that is an image: no tint, no text over it, and all of it shown —
   the tile takes the image's own shape (the image carries its words) */
.cs-stats li.cs-stats__img { padding: 0; background: none; }
.cs-stats__img img { display: block; width: 100%; height: 100%; object-fit: contain; }

@media (min-width: 761px) { .cs-stats span { font-size: 0.6875rem; letter-spacing: 0.08em; } }
@media (min-width: 901px) {
  .cs-head, .cs-intro { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .cs-media--pair { grid-template-columns: 1.6fr 1fr; align-items: center; }
  .cs-media--grid { grid-template-columns: 1fr 1fr; }
  .cs-media--side { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .cs-results { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* ---------- Steady in the case pattern ------------------------------------
   The hero is the identity on Steady's own ground (its base grey with the
   daylight and green washes from the app), the plumb line and the wordmark
   in Inter Tight — a brand specimen, so it keeps Steady's pair. */
.cs-hero--steady {
  background:
    url("../img/stipje/stipje-bg.webp") center / cover no-repeat,   /* her background (Nov 2026) */
    #dcdddb;
  color: #101112;
}
.st-herolock { display: flex; align-items: center; gap: clamp(20px, 3.4vw, 56px); }
.st-herolock .st-mark { width: clamp(64px, 11.5vw, 168px); height: auto; }
.st-herolock .st-word { font-size: clamp(4rem, 13vw, 12rem); line-height: 1; letter-spacing: -0.05em; }
.st-platefig .plate__frame { border-radius: 16px; border: 1px solid var(--rule); }

/* ---------- TweetSpot in the case pattern ---------------------------------
   Hero: a placeholder in the app's own paper and moss until her image comes
   (then an <img> as on MedBrief). The intro's brief is the dedication. */
@font-face {
  font-family: "Taste Bread";                  /* her wordmark face for TweetSpot (free for personal use) */
  src: url("../fonts/TasteBread.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
.cs-hero--tweetspot { position: relative; isolation: isolate; background: rgb(52 94 75); }   /* the image's own flat green */
.cs-hero .cs-hero__bg { position: absolute;   inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
/* portrait: a screen-tall card would crop the splash to its plain green
   middle, so the card takes the image's own shape and shows it whole */
@media (max-aspect-ratio: 1/1) {
  .cs-hero--tweetspot { height: auto; min-height: 0; aspect-ratio: 3748 / 2101; }
  /* the leaves grow past the card's edge (it clips) so they clear the word */
  .cs-hero--tweetspot .cs-hero__bg { transform: scale(var(--tw-leaf-zoom, 1.4)); }
}
/* the dedication: a small full-width band under the hero, on the splash's
   own ground green (#35614d, her colour), in the site's light, centred */
.cs-memory {
  text-wrap: balance;   /* no lone "this." or "2026." */
  margin: var(--card-gap) var(--card-gap) 0;
  padding: clamp(36px, 5vw, 64px) clamp(24px, 6.5vw, 112px);
  border-radius: var(--card-radius);
  background: #35614d;
  color: var(--light);
  text-align: center;
}
.cs-memory__kicker {
  font-family: var(--font-small);
  font-size: 0.75rem;
  font-weight: 500;   /* lighter (her call) */
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cs-memory__dates { display: inline-block; margin-top: 4px; font-size: 1rem; font-weight: 400; letter-spacing: 0.01em; opacity: 0.9; }
.cs-memory__name {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 500;
  line-height: 1.2;
}
.cs-memory__text {
  max-width: 82ch;   /* the paragraph in two balanced lines on desktop */
  margin: 12px auto 0;
  font-family: var(--font-small);
  font-size: 0.875rem;
  line-height: 1.6;
}
.cs-memory + .cs-card { margin-top: var(--card-gap); }
/* landscape: the word at about 70% of the first size */
@media (min-aspect-ratio: 1/1) { .cs-hero--tweetspot .tw-herolock { font-size: clamp(2.925rem, 9.45vw, 8.82rem); } }
.tw-herolock {
  font-family: "Taste Bread", var(--font-display);
  font-size: clamp(2.925rem, 13.5vw, 12.6rem);   /* 90% of the first cut */
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: #c2db80;
  text-shadow: 0 4px 0 #35614d;   /* her drop in the ground green: blocks the texture under the word */
  text-align: center;
}
.cs-kicker-sm {
  margin-bottom: 8px;
  font-family: var(--font-small);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
/* the prototype sits under its header, inside the card; on a phone the
   card gives the device more of the width (the 390px phone must never
   push the page sideways) */
.cs-card .tw-layout { margin-top: clamp(32px, 5vw, 64px); grid-template-columns: minmax(0, 1fr); }
.cs-card.stage { padding-block: clamp(44px, 8vw, 136px); padding-inline: clamp(12px, 6.5vw, 112px); }   /* the card's own top and bottom; .stage's 28–56px was for bare sections */
.cs-card.stage .cs-head { padding-inline: clamp(12px, 3vw, 0px); }
/* the prototype alone, centred; the screen notes live in the header, the
   caption under the phone (Steady's and Thursdays' order) */
.cs-card .tw-layout { justify-items: center; }
.cs-card .tw-note { max-width: 62ch; margin-inline: auto; }
.cs-lede .tw-screens { border-top: 0; }   /* the subhead's rule above is the only line it needs */
.cs-card.tw-credits { border-top: 0; padding-block: clamp(32px, 5vw, 64px); }

/* ---------- Thursdays in the case pattern ---------------------------------
   Hero: the identity on the college's night blue, the one lamp lit. The
   brand specimens and the live window sit inside light cards. */
.cs-hero--thursdays {
  background:
    radial-gradient(45% 60% at 78% 22%, oklch(0.735 0.155 68 / 0.28), transparent 70%),
    radial-gradient(60% 80% at 10% 100%, oklch(0.315 0.04 277), transparent 70%),
    oklch(0.235 0.035 277);
  color: oklch(0.977 0.012 84);
}
.th-herolock { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.th-herolock .th-mark { width: clamp(64px, 9vw, 132px); height: auto; }
.th-herolock .th-word { color: inherit; font-size: clamp(3.5rem, 11.5vw, 10.5rem); line-height: 1; letter-spacing: -0.05em; }
.cs-card .th-brand { margin-top: 0; padding-top: 0; border-top: 0; }
.cs-card .th-stage .studio { margin-top: clamp(32px, 5vw, 64px); }

/* ---------- the next case (build.py next_case, nextcase.js) --------------
   The end of a case page: a dark card, stuck under the bar, the next case's
   title over stars. While it is stuck the page keeps going (--next-run of
   scroll); a primary line across the bottom of the screen fills with it,
   and full, it opens the next case. "Next case" is the quick way. */
.nextcase {
  --next-card: calc(100svh - var(--topbar-h) - var(--stick-gap) - var(--card-gap));
  --next-run: 150svh;                       /* how far they scroll before it opens */
  position: relative;
  height: calc(var(--next-card) + var(--next-run));
  margin: 0 var(--card-gap);   /* the contact card above already leaves a gap */
}
.nextcase__card {
  position: sticky;
  top: calc(var(--bar-y) + var(--stick-gap));
  display: grid;
  align-content: end;
  justify-items: start;
  gap: clamp(18px, 2.4vw, 28px);
  height: var(--next-card);
  padding: clamp(24px, 5vw, 72px);
  border-radius: var(--card-radius);
  background: var(--surface);
  /* the ground between the bar and the card, so nothing shows through */
  box-shadow: 0 0 0 var(--stick-gap) var(--dark);
  color: var(--ink);
  overflow: hidden;
  transition: transform 500ms var(--md-sys-motion-easing-emphasized);
}
.nextcase__card > :not(.nextcase__bars):not(.type-field) { position: relative; z-index: 1; }
.nextcase__title {
  max-width: 12ch;
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 10rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.nextcase__go {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 0 8px 8px 8px;            /* like Get in touch */
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-small);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.nextcase__go .icon { width: 18px; height: 18px; fill: currentColor; transition: transform 200ms ease; }
.nextcase__go:hover .icon { transform: translateX(3px); }
.nextcase__go:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.nextcase__tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--light);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 140ms ease, transform 140ms ease;
}
.nextcase__go:hover .nextcase__tip, .nextcase__go:focus-visible .nextcase__tip { opacity: 1; transform: none; transition-delay: 200ms; }
.nextcase__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.nextcase__hint { font-family: var(--font-small); font-size: 0.8125rem; font-weight: 500; color: var(--ink-soft); }

/* the case's own motif: three redaction bars, drawn in on arrival */
.nextcase__bars { position: absolute; z-index: 1; top: clamp(24px, 5vw, 72px); right: clamp(24px, 5vw, 72px); display: grid; gap: 10px; justify-items: end; }
.nextcase__bars i { display: block; height: 14px; border-radius: 3px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 900ms var(--md-sys-motion-easing-emphasized); }
.nextcase__bars i:nth-child(1) { width: clamp(90px, 14vw, 220px); }
.nextcase__bars i:nth-child(2) { width: clamp(60px, 9vw, 150px); transition-delay: 120ms; }
.nextcase__bars i:nth-child(3) { width: clamp(110px, 18vw, 280px); transition-delay: 240ms; }
.nextcase.is-near .nextcase__bars i, html:not(.js) .nextcase__bars i { transform: none; }

/* the progress line: the full width of the screen, on its bottom edge */
.nextcase__track {
  position: fixed;
  z-index: 75;
  inset-inline: 0;
  bottom: 0;
  height: 4px;
  background: color-mix(in oklab, var(--light) 12%, transparent);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}
.nextcase.is-near .nextcase__track { opacity: 1; }
.nextcase__fill { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.nextcase.is-going .nextcase__card { transform: translateY(-24px) scale(0.985); }

/* without JavaScript, or without motion: no run, the card is the end */
html:not(.js) .nextcase { height: auto; }
html:not(.js) .nextcase__card { position: relative; top: 0; }
html:not(.js) .nextcase__hint, html:not(.js) .nextcase__track { display: none; }
@media (prefers-reduced-motion: reduce) {
  .nextcase { height: auto; }
  .nextcase__card { position: relative; top: 0; transition: none; }
  .nextcase__bars i { transition: none; }
  .nextcase__hint, .nextcase__track { display: none; }
}
html[data-type-motion="off"] .nextcase { height: auto; }
html[data-type-motion="off"] .nextcase__card { position: relative; top: 0; }
html[data-type-motion="off"] .nextcase__hint, html[data-type-motion="off"] .nextcase__track { display: none; }

/* the credits split into species, the sample birder's photos and the calls */
.tw-credits__sub {
  margin: 28px 0 10px;
  font-family: var(--font-small);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* the prototype-only note under all three prototypes (her call): no rule,
   on the content's left edge, a little wider */
.cs-card :is(.tw-note, .st-pagenote, .th-note) {
  margin-inline: 0;
  padding-top: 0;
  border-top: 0;
  max-width: 104ch;
}

/* the Self-initiated chip and the "what it proves" tiles take the theme
   colour itself, not its brighter -deep twin: quieter, still the theme */
.cs-stats li:not(.cs-stats__img) { background: var(--accent-base); }   /* the chip follows --accent-soft (tokens) */
.cs-stats span { color: color-mix(in oklab, var(--dark) 78%, var(--accent-base)); }

/* ---------- the results card (her brief, Nov 2026) ------------------------
   List rows sit in the middle of their rules, like the screens table in
   the first card; the first row needs no rule of its own (the subhead is
   enough). On a wide screen the three stat tiles stay in view while the
   column beside them scrolls. */
.cs-results__lead { margin-bottom: 4px; }
.cs-results .cs-list li { padding: 10px 0 9px; line-height: 1.5; }   /* 11px of air above and below the words (measured) */
.cs-results .cs-list li:first-child { border-top: 0; }
@media (min-width: 901px) {
  .cs-results .cs-stats { position: sticky; top: calc(var(--topbar-h, 80px) + 16px); }
}

/* TweetSpot: the name footnote, in the first card under the facts */
.cs-intro .tw-note--name { margin-top: 1.4rem; }


/* ---------- About: the intro in a light card, with her photograph (Nov 2026) */
.about-card .about-intro { padding-block: 0; }
.about-portrait__frame--photo { padding: 0; background: var(--surface); border-radius: var(--card-radius); }
.about-portrait__frame--photo::before { display: none; }
.about-portrait__frame--photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }

/* the photo is set in type first (portrait.js): the canvas sits over the
   photo on the card's own ground, then fades as the photo comes in */
.about-portrait__frame--photo { color: var(--ink-faint); }
.about-portrait__frame--photo img { transition: opacity 700ms var(--tempo); }
.about-portrait__frame--photo.is-veiled img { opacity: 0; }
.portrait-veil {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
  border-radius: inherit; background: var(--paper);
  transition: opacity 700ms var(--tempo);   /* = HAND in portrait.js */
}
.portrait-veil.is-leaving { opacity: 0; }


/* ---------- About: Craft in a dark card (her brief, Nov 2026) --------------
   Mobile first: one column. From 901px the head sits in the left column and
   sticks under the bar; the six disciplines and the ledger run down the right.
   The head's column spans the whole body, so it lets go at the ledger's end. */
.about-craft__top { display: grid; gap: clamp(28px, 4vw, 48px); }
.about-craft__title {
  margin-top: 12px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.25rem, 4.6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.04em;
  text-wrap: balance;
}
.about-craft__aside {
  margin-top: clamp(14px, 2vw, 24px);
  font-family: var(--font-small); font-size: 0.875rem; font-weight: 600; color: var(--ink-soft);
}
.about-craft .craft-grid { grid-template-columns: minmax(0, 1fr); }
.about-craft .craft { grid-column: 1 / -1; }
.about-craft__ledger { margin-top: clamp(28px, 4vw, 52px); }
@media (min-width: 901px) {
  /* the sticky head is held by .about-craft__top (head + disciplines), so it
     lets go where the full-width ledger begins */
  .about-craft__top { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: clamp(32px, 5vw, 88px); }
  .about-craft__head { position: sticky; top: calc(var(--bar-y) + var(--stick-gap) + 24px); }
  .about-craft .craft { grid-column: 1 / -1; }
  /* the ledger runs full width under both columns; the head's grid area ends
     where it starts, so the title lets go as the ledger reaches it */

}

/* the coda's lead line (About): set like the coda line itself, the two read
   as one statement, with room above and below for weight (her call) */
.coda__lead {
  max-width: 26ch; margin: 0 auto 0.4em;
  font-family: var(--font-display); font-size: clamp(1.25rem, 2.6vw, 2rem); line-height: 1.25;
  letter-spacing: -0.028em; font-weight: 460; color: var(--ink);
  text-wrap: balance;
}
.coda:has(.coda__lead) { padding-block: clamp(96px, 14vw, 220px); }
/* no closing rule under the last ledger row in the Craft card */
.about-craft .ledger__row:last-child { border-bottom: 0; }
