/* Row & Loop site styles: tokens, base, textures, chart graphics, layout, page sections. */

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/playfair-display-latin-800.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/playfair-display-latin-500-italic.woff2") format("woff2");
}

:root {
  /* The app's light tokens (design rules, section 2). */
  --bg: #F4E9E5;            /* Paper */
  --surface: #FBF6F3;       /* Surface */
  --text: #2B1520;          /* Ink */
  --text-2: #74596A;        /* Pencil */
  --brand: #561A37;         /* Plum */
  --link: #561A37;
  --link-hover: #3E1128;    /* Plum Pressed */
  --hairline: #E3D2D0;      /* Hairline */
  --rose: #CB98AB;          /* Rose: decoration only, never text */
  --rose-yarn: #A8637E;     /* Rose Yarn: accent words (large text only), yarn second color */
  --chart-ink: #561A37;
  --chart-paper: #FBF6F3;
  --chart-line: #E3D2D0;
  --chart-line-5: #CB98AB;
  --chart-x: #A8637E;
  /* Graph paper: Ink at low alpha. */
  --grid-line: rgba(43, 21, 32, .04); --grid-line-5: rgba(43, 21, 32, .10);
  --sage: #7C8C6E; --sage-dark: #55634B; --linen: #E9E1D3;

  /* photo-to-chart tones (represent the photo; linen to sage-dark) */
  --tone-1: #E9E1D3; --tone-2: #C9C8B3; --tone-3: #A4AD91; --tone-4: #7C8C6E; --tone-5: #55634B;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --r-btn: 8px; --r-card: 12px;

  --font-display: "Playfair Display", ui-serif, Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-0: clamp(1.0625rem, 1.03rem + 0.17vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.18rem + 0.35vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.37rem + 0.65vw, 1.95rem);
  --step-3: clamp(1.85rem, 1.6rem + 1.25vw, 2.75rem);
  --step-4: clamp(2.3rem, 1.85rem + 2.25vw, 3.75rem);
  --step-5: clamp(2.75rem, 2.1rem + 3.25vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  color: var(--brand);
  margin: 0 0 var(--s-3);
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); }
h5 { font-size: var(--step-1); }
h6 { font-size: var(--step-0); }

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover, a:active { color: var(--link-hover); }

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  padding: var(--s-2) var(--s-4);
  background: var(--surface);
  color: var(--link);
  border-radius: var(--r-btn);
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; z-index: 100; }
.skip-link:focus-visible { transform: none; z-index: 100; }

:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
/* The skip link moves focus to <main>; it is not a control, so it shows no ring. */
main:focus { outline: none; }

/* ---- Textures ---- */

/* Fine line every --cell, heavier line every 5 cells. 1px lines. */
.graph-paper {
  --cell: 12px;
  background-color: transparent;
  background-image:
    linear-gradient(to right, var(--grid-line-5) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-5) 1px, transparent 1px),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size:
    calc(var(--cell) * 5) calc(var(--cell) * 5),
    calc(var(--cell) * 5) calc(var(--cell) * 5),
    var(--cell) var(--cell),
    var(--cell) var(--cell);
  background-position: 0 0;
}

/* Crochet chain: whole linked teardrop loops (13px pitch), so neither end is cut.
   30 links = 395px wide; below 480px viewports it switches to 18 links = 239px. */
.chain-divider {
  display: block;
  height: 14px;
  width: 395px;
  max-width: 100%;
  margin-inline: auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='395' height='14' viewBox='0 0 395 14'%3E%3Cg fill='none' stroke='%23CB98AB' stroke-width='1.25' stroke-linejoin='round'%3E%3Cdefs%3E%3Cpath id='l' d='M1,7 C6,2.5 14,2.5 17,7 C14,11.5 6,11.5 1,7 Z'/%3E%3C/defs%3E%3Cuse href='%23l' x='0'/%3E%3Cuse href='%23l' x='13'/%3E%3Cuse href='%23l' x='26'/%3E%3Cuse href='%23l' x='39'/%3E%3Cuse href='%23l' x='52'/%3E%3Cuse href='%23l' x='65'/%3E%3Cuse href='%23l' x='78'/%3E%3Cuse href='%23l' x='91'/%3E%3Cuse href='%23l' x='104'/%3E%3Cuse href='%23l' x='117'/%3E%3Cuse href='%23l' x='130'/%3E%3Cuse href='%23l' x='143'/%3E%3Cuse href='%23l' x='156'/%3E%3Cuse href='%23l' x='169'/%3E%3Cuse href='%23l' x='182'/%3E%3Cuse href='%23l' x='195'/%3E%3Cuse href='%23l' x='208'/%3E%3Cuse href='%23l' x='221'/%3E%3Cuse href='%23l' x='234'/%3E%3Cuse href='%23l' x='247'/%3E%3Cuse href='%23l' x='260'/%3E%3Cuse href='%23l' x='273'/%3E%3Cuse href='%23l' x='286'/%3E%3Cuse href='%23l' x='299'/%3E%3Cuse href='%23l' x='312'/%3E%3Cuse href='%23l' x='325'/%3E%3Cuse href='%23l' x='338'/%3E%3Cuse href='%23l' x='351'/%3E%3Cuse href='%23l' x='364'/%3E%3Cuse href='%23l' x='377'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
@media (max-width: 480px) {
  .chain-divider { width: 239px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='239' height='14' viewBox='0 0 239 14'%3E%3Cg fill='none' stroke='%23CB98AB' stroke-width='1.25' stroke-linejoin='round'%3E%3Cdefs%3E%3Cpath id='l' d='M1,7 C6,2.5 14,2.5 17,7 C14,11.5 6,11.5 1,7 Z'/%3E%3C/defs%3E%3Cuse href='%23l' x='0'/%3E%3Cuse href='%23l' x='13'/%3E%3Cuse href='%23l' x='26'/%3E%3Cuse href='%23l' x='39'/%3E%3Cuse href='%23l' x='52'/%3E%3Cuse href='%23l' x='65'/%3E%3Cuse href='%23l' x='78'/%3E%3Cuse href='%23l' x='91'/%3E%3Cuse href='%23l' x='104'/%3E%3Cuse href='%23l' x='117'/%3E%3Cuse href='%23l' x='130'/%3E%3Cuse href='%23l' x='143'/%3E%3Cuse href='%23l' x='156'/%3E%3Cuse href='%23l' x='169'/%3E%3Cuse href='%23l' x='182'/%3E%3Cuse href='%23l' x='195'/%3E%3Cuse href='%23l' x='208'/%3E%3Cuse href='%23l' x='221'/%3E%3C/g%3E%3C/svg%3E"); }
}

/* ---- Chart graphics (classes prefixed g-) ---- */
.g-ink { fill: var(--chart-ink); }
.g-paper { fill: var(--chart-paper); }
.g-line { stroke: var(--chart-line); }
.g-line-5 { stroke: var(--chart-line-5); }
.g-border { stroke: var(--chart-ink); }
.g-x { stroke: var(--chart-x); }
.g-num { fill: var(--text-2); font-family: var(--font-body); }
.g-rose { fill: var(--rose); }
.g-surface { fill: var(--surface); }
.g-linen { fill: var(--linen); }
.g-shadow { fill: var(--text); }
.g-vein { stroke: var(--linen); }
.g-vig { stop-color: var(--text); }
.g-stop-sage { stop-color: var(--sage); }
.g-stop-sage-dark { stop-color: var(--sage-dark); }
.g-tone-1 { fill: var(--tone-1); }
.g-tone-2 { fill: var(--tone-2); }
.g-tone-3 { fill: var(--tone-3); }
.g-tone-4 { fill: var(--tone-4); }
.g-tone-5 { fill: var(--tone-5); }
.g-grid-line { stroke: var(--text); }
.g-done { fill: var(--bg); fill-opacity: .55; }
.g-current { fill: none; stroke: var(--rose-yarn); }
.g-stem { stroke: var(--sage-dark); fill: none; }
.g-num-cur { fill: var(--brand); font-family: var(--font-body); font-weight: 600; }


/* ---------- Layout: one left edge, a narrow label column, hairline rules ---------- */

:root {
  --gutter: clamp(20px, 5vw, 60px);
  --wrap: 1200px;          /* 24 heavy chart-paper squares of 50px */
  --label-col: 200px;      /* 4 squares */
  --header-h: 5.5rem;
  --section-gap: clamp(4.5rem, 3rem + 6vw, 8rem);

  --rule-ink: var(--chart-ink);     /* opens a section */
  --rule: var(--chart-line-5);      /* divides items inside a section */

  --h1: clamp(1.75rem, 0.8rem + 5vw, 5.5rem);
  --h2: clamp(2.1rem, 1.6rem + 2vw, 3.4rem);
}

@media (min-width: 600px) {
  :root { --h1: clamp(2.125rem, 1rem + 5.3vw, 5.5rem); }
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-wrap: break-word; }

.wrap {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* Small letter-spaced caps: section labels, captions, index labels. */
.label {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* Small tabular figures: sizes and counts. */
.note {
  font-size: 0.875rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* ---------- Chart paper field ---------- */

/* The .graph-paper texture, 10px cells, registered to the content's left edge and to
   the bottom of the field, so rules placed on the 50px module land on heavy lines. */
.paper {
  --cell: 10px;
  --paper-x5: max(var(--gutter), calc(50% - 575px));
  --paper-x1: max(var(--gutter), calc(50% - 595px));
  background-position:
    var(--paper-x5) 100%,
    0 100%,
    var(--paper-x1) 100%,
    0 100%;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 2;
}
.site-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: var(--header-h);
}
.wordmark {
  display: block;
  flex: none;
  width: clamp(9.5rem, 6rem + 12vw, 15.5rem);
  line-height: 0;
}
.wordmark img { width: 100%; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 0.5rem + 1.6vw, 2.25rem);
}
.site-nav a {
  display: block;
  padding-block: 0.625rem;
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }

@media (max-width: 389px) {
  :root { --header-h: 7.5rem; }
  .site-header__in {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--s-1);
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  overflow: clip;
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
  border-bottom: 1px solid var(--rule);
}
.hero__text {
  padding-top: clamp(2.5rem, 1rem + 5vw, 4.5rem);
}
.eyebrow { margin-bottom: var(--s-5); text-wrap: balance; }

h1 {
  font-size: var(--h1);
  line-height: 1.07;
  letter-spacing: -0.012em;
  margin: 0 0 var(--s-6);
}
h1 span {
  display: block;
  text-wrap: balance;
}
h1 i { font-style: italic; font-weight: 500; color: var(--rose-yarn); }

.lead {
  max-width: 29em;
  font-size: var(--step-1);
  line-height: 1.5;
  text-wrap: balance;
}

/* Apple's App Store badge, shown unmodified. Apple asks for at least 40px of height
   and clear space of a quarter of the badge height on every side. */
.app-store {
  display: inline-block;
  margin: var(--s-5) 0 0;
  padding: var(--s-3);
  margin-left: calc(-1 * var(--s-3));
  line-height: 0;
  border-radius: 12px;
}
.app-store img { height: 40px; width: auto; }
.app-store--hero { margin-top: var(--s-6); }
.app-store--hero img { height: 52px; }
.doc-head__get { margin-top: var(--s-5); color: var(--text-2); }
.doc-head__get + .app-store { margin-top: 0; }

/* Index: a table of contents ruled onto the paper. */
.index { margin-top: clamp(3.5rem, 2rem + 5vw, 5.5rem); }
.index ul { border-top: 1px solid var(--rule-ink); }
.index li { padding-block: var(--s-4) var(--s-5); text-wrap: balance; }
.index li + li { border-top: 1px solid var(--rule); }
.index .label { display: block; margin-bottom: var(--s-2); }
.index a {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-2);
  line-height: 1.15;
}

@media (min-width: 760px) {
  .index ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 150px;   /* three heavy squares; the paper is registered to the bottom */
  }
  .index li { padding: 1.25rem var(--s-5) var(--s-5); }
  .index li:first-child { padding-left: 0; }
  .index li + li {
    border-top: 0;
    border-left: 1px solid var(--rule-ink);
  }
}

/* Row numbers in the outer margin, counted up from the bottom edge like a chart.
   Decorative; the empty alternative text keeps them out of the accessibility tree. */
@media (min-width: 1360px) {
  .hero::after {
    content: "120\A 115\A 110\A 105\A 100\A 95\A 90\A 85\A 80\A 75\A 70\A 65\A 60\A 55\A 50\A 45\A 40\A 35\A 30\A 25\A 20\A 15\A 10\A 5";
    content: "120\A 115\A 110\A 105\A 100\A 95\A 90\A 85\A 80\A 75\A 70\A 65\A 60\A 55\A 50\A 45\A 40\A 35\A 30\A 25\A 20\A 15\A 10\A 5" / "";
    position: absolute;
    right: calc(max(var(--gutter), 50% - 600px) - 40px);
    bottom: 20px;
    width: 28px;
    white-space: pre;
    text-align: right;
    font-size: 0.6875rem;
    line-height: 50px;
    letter-spacing: 0.04em;
    color: var(--text-2);
    /* Faded so they sit behind the page instead of competing with the nav (Shawn, 2026-10-14). */
    opacity: 0.5;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
  }
}

/* ---------- Ledger sections ---------- */

.row { margin-top: var(--section-gap); }
/* The first section follows the hero's own bottom rule, so it has no rule and a shorter gap. */
.row--first { margin-top: clamp(3rem, 2rem + 4vw, 5.5rem); }
.row[id] { scroll-margin-top: var(--s-5); }

.ledger {
  border-top: 1px solid var(--rule-ink);
  padding-top: var(--s-5);
}
.ledger--bare { border-top: 0; padding-top: 0; }
.ledger__label { margin-bottom: var(--s-5); }

h2 {
  font-size: var(--h2);
  line-height: 1.08;
  letter-spacing: -0.008em;
  margin: 0 0 var(--s-5);
  text-wrap: balance;
}

.prose { max-width: 33em; }
.prose p { text-wrap: pretty; }
.prose p + p { margin-top: 1em; }

@media (min-width: 900px) {
  :root { --header-h: 7rem; --label-col: 160px; }
  .ledger {
    display: grid;
    grid-template-columns: var(--label-col) minmax(0, 1fr);
    padding-top: var(--s-6);
  }
  .ledger--bare { padding-top: 0; }
  .ledger__label,
  .ledger__body { align-self: baseline; }
  .ledger__label { margin-bottom: 0; padding-right: var(--s-5); }
  .row .ledger__label {
    position: sticky;
    top: var(--s-5);
  }
  h2 { margin-bottom: var(--s-6); }
}
@media (min-width: 1100px) {
  :root { --label-col: 200px; }
}

/* Text beside a figure. */
.split {
  display: grid;
  gap: var(--s-7);
}
@media (min-width: 760px) {
  .split {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    column-gap: var(--s-7);
    align-items: end;
  }
}

/* ---------- Track ---------- */

.ruled {
  margin-top: var(--s-6);
  border-bottom: 1px solid var(--rule);
}
.ruled li {
  padding-block: 0.75rem;
  border-top: 1px solid var(--rule);
}

/* The count, set like a ledger total on the same rule that closes the list. */
.readout {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--s-3);
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--rule);
}
.readout__num {
  font-family: var(--font-display);
  font-size: clamp(6rem, 3.5rem + 9vw, 10rem);
  line-height: 0.74;
  letter-spacing: -0.01em;
  color: var(--brand);
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
}

/* The band's frame sits 3 units inside its 465-unit viewBox; this registers the
   frame to the column edge and lets the row numbers end at the right edge. */
.band { margin-top: var(--s-7); }
.band svg {
  display: block;
  width: calc(100% * 465 / 462);
  max-width: none;
  margin-left: calc(100% * -3 / 462);
}

/* Small screens: the band's row numbers would be too small to read, so they are
   hidden and the frame takes the full width. "Row 10 of 16" is typeset above it. */
@media (max-width: 639px) {
  .band { overflow: hidden; overflow: clip; }
  .band svg {
    width: calc(100% * 465 / 434);
    margin-left: calc(100% * -2 / 434);
  }
  .band svg > g:last-of-type { display: none; }
}

/* ---------- Plates: the photo-to-chart steps and the swatches ---------- */

/* Four equal columns. A plate fills 360/404 of its column; the chart's own row
   numbers take the remaining 44/404, so all four frames are the same size. */
.plates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto auto;
  column-gap: var(--s-4);
  row-gap: 0;
  margin-top: var(--s-7);
}
.plates li {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  margin-bottom: var(--s-6);
}
.plate {
  position: relative;
  align-self: start;
  width: calc(100% * 360 / 404);
}
.plate svg {
  display: block;
  width: 100%;
}
.plate--framed { outline: 1px solid var(--rule); outline-offset: -1px; }
.plate--chart {
  width: 100%;
  margin: calc(100% * -6 / 404) 0 0 calc(100% * -6 / 404);
}
.plate--chart .g-xmarks { display: none; }

.caption {
  align-self: start;
  width: calc(100% * 360 / 404);
  margin-top: var(--s-3);
}
.caption .label,
.caption .note { display: block; }
.caption .note { margin-top: 2px; }

/* Step numbers hang in their own narrow column so wrapped captions stay aligned. */
.steps { counter-reset: step; }
.steps li { counter-increment: step; }
.steps .caption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.625rem;
}
.steps .caption::before {
  content: counter(step);
  content: counter(step) / "";
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.steps .caption .label,
.steps .caption .note { grid-column: 2; }

.caption--pair {
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 1000px) {
  .caption--pair {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    column-gap: var(--s-3);
  }
  .caption--pair .note { margin-top: 0; }
}

@media (min-width: 640px) {
  .plates {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: var(--s-5);
    margin-top: var(--s-8);
  }
  .plates li { margin-bottom: 0; }

  /* A small arrow in each gap between steps. */
  .steps li:not(:last-child) .plate::before,
  .steps li:not(:last-child) .plate::after {
    content: "";
    position: absolute;
    top: 50%;
  }
  .steps li:not(:last-child) .plate::before {
    left: calc(100% + 12px);
    width: calc(100% * 44 / 360 + var(--s-5) - 24px);
    border-top: 1px solid var(--text-2);
  }
  .steps li:not(:last-child) .plate::after {
    left: calc(100% * 404 / 360 + var(--s-5) - 12px - 7px);
    width: 7px;
    height: 7px;
    margin-top: -3px;
    border-top: 1px solid var(--text-2);
    border-right: 1px solid var(--text-2);
    transform: rotate(45deg);
  }
}

/* ---------- Accessibility band ---------- */

/* Full-bleed surface band. Its content sits on the .wrap edges. */
.access {
  margin-top: var(--section-gap);
  padding-block: var(--section-gap);
  background: var(--surface);
}
.access h2 {
  margin: 0 0 var(--s-5);
  font-size: var(--step-5);
  line-height: 1.04;
  letter-spacing: -0.012em;
}
.access h2 span { display: block; }
.access p {
  max-width: 27em;
  font-size: var(--step-1);
  line-height: 1.55;
}

/* ---------- Price note and closing line ---------- */

.colophon { padding-block: var(--section-gap); }
.colophon h2 {
  margin: 0 0 var(--s-3);
  font-size: var(--step-2);
  line-height: 1.15;
}
.colophon__close { margin-top: var(--s-8); }
.colophon__loops {
  display: block;
  width: 4.5rem;
  line-height: 0;
  margin-bottom: var(--s-5);
}
.colophon__loops img { width: 100%; }
.colophon__close .prose { margin: 0 0 var(--s-3); }
.closing {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--brand);
  text-wrap: balance;
}

@media (min-width: 900px) {
  .access__in,
  .colophon {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--s-5);
  }
  .access__in { align-items: end; }
  .access h2 { grid-column: 1 / 8; margin-bottom: 0; }
  .access p { grid-column: 8 / 13; padding-bottom: 0.3em; }

  .colophon { align-items: end; }
  .colophon__price { grid-column: 1 / 6; }
  .colophon__close { grid-column: 7 / 13; margin-top: 0; }
}

/* ---------- Document pages: privacy, terms, support ---------- */

/* Title band on chart paper, sliding under the header like the home page hero. */
.doc-head {
  position: relative;
  overflow: hidden;
  overflow: clip;
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
  border-bottom: 1px solid var(--rule);
}
.doc-head .wrap { padding-block: clamp(2.5rem, 1rem + 5vw, 4.5rem) var(--s-7); }
.doc-head h1 {
  font-size: var(--step-5);
  line-height: 1.05;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}
.doc-head__date { color: var(--text-2); }
.doc-head .lead { margin-top: var(--s-2); text-wrap: pretty; }

.doc { padding-block: var(--s-8) var(--section-gap); }

.doc__toc { margin-bottom: var(--s-7); }
.doc__toc h2 {
  font-family: var(--font-body);
  font-weight: 600;
  margin: 0 0 var(--s-3);
  text-wrap: wrap;
}
.doc__toc ol { border-top: 1px solid var(--rule); }
.doc__toc li { border-bottom: 1px solid var(--rule); }
.doc__toc a {
  display: block;
  padding-block: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
}
.doc__toc a:hover { text-decoration: underline; }

.doc__body { max-width: 68ch; }
.doc__body h2 {
  font-size: var(--step-3);
  line-height: 1.15;
  letter-spacing: 0;
  margin: var(--s-8) 0 0;
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule-ink);
  scroll-margin-top: var(--s-5);
}
.doc__body > :first-child { margin-top: 0; }
.doc__body h3 {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin: var(--s-6) 0 0;
}
.doc__body p,
.doc__body ul,
.doc__body .table-scroll { margin-top: 1em; }
.doc__body h3 + p { margin-top: var(--s-2); }
.doc__body p { text-wrap: pretty; }
.doc__body ul { list-style: disc; padding-left: 1.25em; }
.doc__body li + li { margin-top: 0.5em; }
.doc__body li::marker { color: var(--text-2); }

/* A wide table scrolls inside its own frame, never the page. */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule);
  /* Edge cue: the shadows stay put; the covers travel with the content and hide a shadow at its end. */
  background:
    linear-gradient(to right, var(--bg) 30%, transparent) left center / 2rem 100% no-repeat local,
    linear-gradient(to left, var(--bg) 30%, transparent) right center / 2rem 100% no-repeat local,
    linear-gradient(to right, color-mix(in srgb, var(--rule-ink) 45%, transparent), transparent) left center / 0.75rem 100% no-repeat scroll,
    linear-gradient(to left, color-mix(in srgb, var(--rule-ink) 45%, transparent), transparent) right center / 0.75rem 100% no-repeat scroll;
}
.table-scroll table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.table-scroll th,
.table-scroll td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.table-scroll th { font-weight: 600; white-space: nowrap; background: var(--surface); }
.table-scroll tr:last-child td { border-bottom: 0; }

.doc__end { margin-top: var(--s-8); }
.doc__end .chain-divider { margin-inline: 0; }

@media (min-width: 1100px) {
  .doc {
    display: grid;
    grid-template-columns: var(--label-col) minmax(0, 1fr);
    row-gap: 0;
  }
  .doc__toc {
    position: sticky;
    top: var(--s-5);
    align-self: start;
    max-height: calc(100vh - 2 * var(--s-5));
    overflow-y: auto;
    margin-bottom: 0;
    padding-right: var(--s-5);
  }
  .doc__body,
  .doc__end { grid-column: 2; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: var(--s-8);
  background: var(--surface);
  border-top: 1px solid var(--rule);
  font-size: 1.0625rem;
}
/* Two rows on the wrap's edges: about text left and links right, then a ruled line with
   the copyright left and the trademark note right. Both rows stack on narrow screens. */
.site-footer__top,
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
}
.site-footer__top { gap: var(--s-5) var(--s-7); }
.site-footer__about p + p { margin-top: var(--s-2); }
.site-footer__about a { overflow-wrap: anywhere; }
.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
}
.site-footer__nav a {
  display: block;
  padding-block: 0.25rem;
}
.site-footer__bottom {
  gap: var(--s-2) var(--s-6);
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--text-2);
}
.site-footer__copy { font-variant-numeric: tabular-nums; }
