.cousin-page { width: min(64rem, calc(100% - clamp(36px, 9vw, 104px))); padding-bottom: 32px; }
.cousin-heading { margin: clamp(25px, 3.7vw, 45px) 0 22px; }
.cousin-heading h1 { margin: 0 0 9px; }
.cousin-heading > p { max-width: 77ch; margin: 0; }
.process-book { overflow-anchor: none; }
.process-stages { display: flex; min-inline-size: 0; padding: 0; border: 0; margin: 0; }
.process-stages label { position: relative; display: block; cursor: pointer; }
.process-stages input {
  position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
.process-stages label > span { display: flex; align-items: center; min-height: 44px; }
.process-stages input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.process-stages { margin-top: 13px; border-bottom: 1px solid var(--rule); }
.process-stages label > span { gap: 7px; padding: 4px 16px; border-bottom: 3px solid transparent; color: var(--secondary); }
.process-stages b { font-size: 1rem; font-weight: 610; }
.process-stages small { font: 500 1.05rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.process-stages input:checked + span { border-color: var(--teal); color: var(--teal); }
.process-sheet {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-areas: "drawing caption"; align-items: center;
  column-gap: clamp(22px, 4vw, 56px); margin: 0; padding: 20px 0; min-width: 0;
}
#cohort-drawing { grid-area: drawing; display: block; width: 100%; max-width: 470px; height: auto; margin-inline: auto; }
.process-sheet figcaption { grid-area: caption; }
.process-sheet h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); margin: 0 0 7px; }
.process-sheet figcaption > p { margin: 0; max-width: 43ch; }
#profile-comparison { display: inline-block; margin-top: .45rem; font-size: .94rem; }
.fold-picker { display: flex; align-items: center; gap: 9px; width: fit-content; margin-top: 14px; color: var(--secondary); font-size: .93rem; }
.fold-picker select { min-height: 42px; padding: 4px 8px; border: 1px solid #9eaca7; border-radius: 3px; background: white; color: var(--ink); }
.process-fold { border-block-start: 1px solid var(--rule); scroll-margin-top: 12px; }
.process-fold summary { min-height: 44px; padding: 10px 2px; color: var(--teal); font-weight: 620; cursor: pointer; }
.process-fold summary::marker { font-size: .83em; }
.fold-copy { max-width: 80ch; padding: 0 2px 12px 1.1rem; }
.fold-copy > p { margin: .3em 0 .65em; }
.equation { color: var(--record-ink); font: 1.16rem/1.5 var(--serif); }
.equations {
  display: grid; justify-items: start; align-items: center; gap: .55rem; margin: .7rem 0 .85rem;
  color: var(--record-ink); font-size: 1.12rem;
}
.equations math { math-style: normal; }
.fold-copy h2 { margin: .25rem 0 .6rem; font-size: 1.5rem; }
.fold-copy h3 { margin: 1.25rem 0 .4rem; font-size: 1.25rem; }
.residual-figure { display: grid; grid-template-columns: minmax(0, 22.5rem) minmax(10rem, 1fr); gap: 1rem 1.5rem; align-items: center; margin: 1rem 0; }
.residual-figure svg { display: block; width: 100%; height: auto; }
.residual-figure figcaption { max-width: 30ch; font-size: .95rem; }
.plot-legend { display: flex; flex-wrap: wrap; gap: .25rem .85rem; margin-bottom: .5rem; font-weight: 600; }
.plot-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.plot-legend i { width: .93rem; height: .93rem; border: 2px solid; }
.lower-mark { border-radius: 50%; color: #216b38; background: #e1efe3; }
.higher-mark { color: #733e87; background: #eadfec; }
.residual-result { margin: 15px 0; padding-left: 13px; border-left: 2px solid #73548b; }
.residual-result > span { color: var(--secondary); font-size: .91rem; }
.residual-result p { margin: 2px 0 0; }
.case-links, .source-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .94rem; }
.case-links { margin: 0; padding: 14px 0 10px; border-top: 1px solid var(--rule); }
@media (max-width: 920px) {
  .process-sheet {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "caption" "drawing";
    gap: 12px; padding-block: 15px;
  }
  .process-sheet figcaption > p { max-width: 67ch; }
}
@media (max-width: 640px) {
  .residual-figure { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
  .residual-figure svg { max-width: 24rem; }
  .residual-figure figcaption { max-width: 55ch; }
}
@media (max-width: 740px) {
  .cousin-page { width: calc(100% - 36px); }
  .process-sheet figcaption { min-height: 10.5rem; }
}
@media (max-width: 470px) {
  .cousin-heading { margin: 20px 0 14px; }
  .process-stages { margin-top: 8px; }
  .process-stages label { flex: 1; }
  .process-stages label > span { justify-content: center; padding: 4px 1px; gap: 5px; }
  .process-sheet figcaption { min-height: 12.4rem; }
  .fold-copy { padding-left: .3rem; }
  .fold-picker { margin-top: 7px; }
}
@media (max-width: 350px) {
  .process-sheet figcaption { min-height: 13.5rem; }
}
@media print {
  .process-stages input:not(:checked) + span, .fold-picker { display: none; }
  .process-sheet { break-inside: avoid; }
}
