/* Looper: a yardage book on a manila desk.
   Tokens are the app's (Sources/DesignSystem/YardageBook.swift). The pen is the plan;
   the one button is pine; the flag is the target ring at the pin and nothing else. */

/* ------------------------------------------------------------------ tokens */
:root {
  --desk:          #ECE4CF;
  --paper:         #F7F2E6;
  --paper-raised:  #ECE4CF;
  --drawing-page:  #EFE7D0;
  --ink:           #26251F;
  --ink-muted:     #6E6858;
  --hairline:      rgb(38 37 31 / 0.22);
  --pine:          #1F4A38;
  --pine-deep:     #163828;
  --pen:           #C94F16;
  --flag:          #B0372A;
  --lake:          #3E6E8E;
  --bone:          #F7F2E6;
  --pen-wash:      rgb(201 79 22 / 0.16);
  --pen-wash-cone: rgb(201 79 22 / 0.08);
  --pen-run:       rgb(201 79 22 / 0.30);
  --select:        rgb(201 79 22 / 0.25);
  /* AA shades of the same inks, for small type (pen at 15px on the desk is 3.6:1) */
  --pen-text:       #A8410F;
  --ink-muted-desk: #645F50;
  --button-label:   var(--bone);
  --corner-print:  6px;
  --corner-card:   10px;
  --page-margin:   24px;
  --font-numeral: "Sofia Sans Condensed", "Sofia Sans Condensed Fallback", "Barlow Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-name:    "Source Serif 4", "Source Serif 4 Fallback", Georgia, "Noto Serif", serif;
  --font-body:    "Atkinson Hyperlegible Next", "Atkinson Hyperlegible Next Fallback", "Helvetica Neue", Arial, Roboto, sans-serif;
  --fs-12: 0.75rem;  --fs-15: 0.9375rem; --fs-17: 1.0625rem; --fs-21: 1.3125rem;
  --fs-27: 1.6875rem; --fs-34: 2.125rem; --fs-42: 2.625rem; --fs-56: 3.5rem;
  --lh-body: 1.6;
  --measure: 62ch;
  --ease-pen: cubic-bezier(0.33, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-object: 0 5px 12px rgb(0 0 0 / 0.22);
  --shadow-soft: 0 2px 6px rgb(0 0 0 / 0.12);
  --desk-tex: url("../img/paper/desk.webp");
  --paper-tex: url("../img/paper/paper.webp");
  --section-gap: 76px;
  --gutter: 24px;
  --cover: #1F4A38;
  --cover-ink: #F7F2E6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --desk: #2B2820;  --paper: #201E19;  --paper-raised: #2B2820;  --drawing-page: #24221C;
    --ink: #EAE3D2;   --ink-muted: #A59D89;  --hairline: rgb(234 227 210 / 0.22);
    --pine: #6AA383;  --pine-deep: #55886C;  --pen: #E87433;  --flag: #D96A5C;  --lake: #6FA3C8;
    --bone: #F7F2E6;
    --pen-wash: rgb(232 116 51 / 0.18); --pen-wash-cone: rgb(232 116 51 / 0.09);
    --pen-run: rgb(232 116 51 / 0.30);  --select: rgb(232 116 51 / 0.30);
    --pen-text: #E87433; --ink-muted-desk: #A59D89;
    /* bone on the dark book's light pine is 2.6:1; the label is ink-dark instead */
    --button-label: #14130F;
    --desk-tex: url("../img/paper/desk-dark.webp");
    --paper-tex: url("../img/paper/paper-dark.webp");
    --shadow-object: 0 5px 12px rgb(0 0 0 / 0.45);
    --shadow-soft: 0 2px 6px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}
@media (max-width: 719.98px) {
  :root { --section-gap: 48px; --gutter: 16px; --page-margin: 16px; }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--ink-muted) var(--desk);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--desk) var(--desk-tex) repeat;
  background-size: 512px 512px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-17);
  line-height: var(--lh-body);
  overflow-x: hidden;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2 { font-family: var(--font-name); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; margin: 0; color: var(--ink); }
p { margin: 0; }
ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: var(--select); color: inherit; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
a { color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--pen); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--pine); }
section[id] { scroll-margin-top: 16px; }

.column { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.paper { background: var(--paper) var(--paper-tex) repeat; background-size: 512px 512px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 50;
  background: var(--paper); padding: 10px 14px; border-radius: var(--corner-print);
}
.skip:focus { top: 12px; }

/* stamped labels and numerals */
.stamp {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-12);
  line-height: 1.5;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.num, .hole-no, .card-yds, .folio, .leg-stamp, .ring-label, .w-big, .w-fb {
  font-family: var(--font-numeral);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.muted { color: var(--ink-muted); }
/* Atkinson's zero is slashed, which reads as a different number in running text; digits that
   matter are set in the book's numeral face instead. */
.fig { font-family: var(--font-numeral); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.pen-label .fig { letter-spacing: 0.1em; font-size: 1.15em; }

/* the one button */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: 13px 20px;
  font: 600 var(--fs-17)/1.1 var(--font-body);
  color: var(--button-label);
  background: var(--pine);
  border-radius: var(--corner-print);
  text-decoration: none;
}
.button:hover { color: var(--button-label); }
.button:active { background: var(--pine-deep); }

/* ------------------------------------------------------------------ masthead */
.masthead-row {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font: 600 var(--fs-21)/1 var(--font-name);
}
.wordmark img { width: 28px; height: 28px; border-radius: 3px; }
.masthead-invite { font-weight: 600; font-size: var(--fs-15); line-height: 22px; }

/* ------------------------------------------------------------------ pages, bands, plates */
.page-band {
  display: flex; justify-content: space-between;
  padding-inline: var(--page-margin);
}
.page-band-top { height: 56px; align-items: center; }
.page-band-foot { height: 48px; align-items: center; gap: 16px; }
.par-yds { text-align: right; }
.par-yds .stamp { line-height: 1.2; margin-bottom: 3px; }
.hole-no  { font-size: 42px; color: var(--ink); }
.card-yds { font-size: 27px; color: var(--ink); display: block; }
.key { font-size: var(--fs-12); line-height: 18px; color: var(--ink-muted); }
.folio { font-size: var(--fs-15); color: var(--ink-muted); }

.plate {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  margin-inline: var(--page-margin);
  background: var(--drawing-page);
  box-shadow: 0 0 0 1px var(--hairline);
  --ref: 352;            /* the plate width (px) the label type below was set for */
}
.plate-hero { aspect-ratio: 645 / 1100; }
.plate-hero .plate-img { width: 100%; height: 100%; object-fit: cover; }
.plate .overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.plate .marks { position: absolute; inset: 0; pointer-events: none; }
.marks > span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; }

/* the plan leaf shows a window of the Oak Brook 3 plate: x 40-640, y 400-980 of 893 x 1100 */
.plate-plan { aspect-ratio: 600 / 580; --ref: 620; }
.plate-plan picture {
  position: absolute;
  width: calc(100% * 893 / 600);
  left: calc(-100% * 40 / 600);
  top: calc(-100% * 400 / 580);
}
.plate-plan .plate-img { width: 100%; max-width: none; height: auto; }

/* label type scales with its drawing, floored for legibility */
.leg-stamp {
  font-size: 18px;
  font-size: clamp(15px, calc(21 * 100cqw / var(--ref)), 21px);
  color: var(--pen-text);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 3px 6px 2px;
}
.ring-label {
  font-size: 13px;
  font-size: clamp(12px, calc(15 * 100cqw / var(--ref)), 15px);
  color: var(--ink-muted);
  background: var(--drawing-page);
  padding: 1px 3px;
  border-radius: 2px;
}
.pen-label {
  font: 600 var(--fs-12)/1.2 var(--font-body);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--pen-text);
  background: var(--drawing-page);
  padding: 2px 4px;
  border-radius: 2px;
}
.marks > .pen-label-start { transform: translate(0, -50%); }

/* the overlay's inks */
.ov-rings circle { fill: none; stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 1; stroke-dasharray: 6 5; }
.run-0 { stop-color: var(--pen-run); }
.run-1 { stop-color: var(--pen); stop-opacity: 0; }
.ov-cone { fill: var(--pen-wash-cone); stroke: var(--pen); stroke-opacity: 0.5; stroke-width: 1; }
.ov-arc  { fill: none; stroke: var(--pen); stroke-width: 2.5; stroke-linecap: round; }
.ov-band { fill: var(--pen-wash); stroke: var(--pen); stroke-width: 1.5; stroke-linejoin: round; }
.ov-band-still { fill: none; stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 1; stroke-dasharray: 4 3; }
.ov-plan { fill: none; stroke: var(--pen); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.ov-tee  { fill: var(--ink); }
.ov-land { fill: var(--pen); stroke: var(--paper); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; }
.ov-pin circle { fill: none; stroke: var(--flag); stroke-width: 3; }
.ov-pin .ov-pin-hole { fill: var(--flag); stroke: none; }
.ov-push line { stroke: var(--pen); stroke-width: 1.5; }
.ov-push polygon { fill: var(--pen); }
.ov-handset circle { fill: var(--pen); }
.ov-handset path { fill: var(--paper); }
.ov-handset line { stroke: var(--paper); stroke-width: 1.5; }

/* ------------------------------------------------------------------ the one moment: the pen draws the plan
   The end state is the default. An inline script marks <html class="js"> before first paint, so the
   undrawn marks are hidden until book.js has decoded the plate, measured the line and set
   --L (its length) and --land (ms at which the pen reaches the landing). Without JS, or with
   reduced motion, the plate is simply finished. */
@media (prefers-reduced-motion: no-preference) {
  .js .plate-hero:not(.is-drawn):not(.is-drawing) :is(.ov-plan, .ov-cone, .ov-land, .ov-late, .leg-stamp) { opacity: 0; }
  .plate-hero.is-drawing .ov-plan  { opacity: 1; stroke-dasharray: var(--L) var(--L); animation: pen-draw 1300ms var(--ease-pen) 150ms both; }
  .plate-hero.is-drawing .ov-cone-1 { opacity: 1; animation: pen-fade calc(var(--land) * 1ms - 150ms) linear 150ms both; }
  .plate-hero.is-drawing .ov-land  { opacity: 1; animation: pen-set 160ms var(--ease-out) calc(var(--land) * 1ms) both; }
  .plate-hero.is-drawing .ov-cone-2 { opacity: 1; animation: pen-fade calc(1450ms - var(--land) * 1ms) linear calc(var(--land) * 1ms) both; }
  .plate-hero.is-drawing .ov-late  { opacity: 1; animation: pen-fade 300ms linear 1450ms both; }
  .plate-hero.is-drawing .leg-stamp-1 { opacity: 1; animation: pen-press 140ms var(--ease-out) 1750ms both; }
  .plate-hero.is-drawing .leg-stamp-2 { opacity: 1; animation: pen-press 140ms var(--ease-out) 1830ms both; }
}
@keyframes pen-draw  { from { stroke-dashoffset: var(--L); } to { stroke-dashoffset: 0; } }
@keyframes pen-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes pen-set   { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes pen-press { from { opacity: 0; transform: translate(-50%, -50%) scale(1.06); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* ------------------------------------------------------------------ hero: the open book */
.hero { padding-top: 8px; }
.book {
  --page-w: 400px;
  width: min(calc(var(--page-w) * 2 + 24px), 100%);
  margin-inline: auto;
  padding-top: 34px;
  position: relative;
}
.spread {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  box-shadow: var(--shadow-object);
  background: var(--paper);
}
.gutter {
  background: var(--paper) linear-gradient(90deg, rgb(0 0 0 / 0.10), rgb(0 0 0 / 0) 40%, rgb(0 0 0 / 0) 60%, rgb(0 0 0 / 0.10));
}
.page-left { display: flex; flex-direction: column; }
.page-right {
  padding: 28px var(--page-margin) 0 8px;
  display: flex; flex-direction: column;
}
.page-right h1 { font-size: var(--fs-42); line-height: 46px; }
.lede { margin-top: 16px; font-size: var(--fs-15); line-height: 23px; }
.cta-row { margin-top: 20px; }
.requires { text-wrap: pretty; margin-top: 10px; font-size: var(--fs-12); line-height: 18px; color: var(--ink-muted); }

.approach { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.approach > .stamp { margin-bottom: 10px; }
.fcb { display: grid; grid-template-columns: auto auto auto; justify-content: start; column-gap: 28px; align-items: start; }
.fcb dt { line-height: 1.2; margin-bottom: 4px; }
.fcb dd { height: 34px; display: flex; align-items: flex-end; }
.num-side { font-size: 24px; color: var(--ink-muted); }
.num-center { font-size: 34px; color: var(--ink); display: block; }
.approach-row { display: flex; align-items: flex-end; gap: 16px; margin-top: 12px; }
.approach-row .stamp { line-height: 1.2; margin-bottom: 4px; }
.approach-note { font-size: var(--fs-15); line-height: 22px; color: var(--ink-muted); padding-bottom: 2px; }
.approach-club { margin-top: 10px; font-size: var(--fs-15); }
.club-name { font: 600 var(--fs-21)/1.2 var(--font-name); color: var(--ink); margin-right: 6px; }

.page-foot { margin-top: auto; height: 48px; display: flex; align-items: center; gap: 12px; }
.page-foot .credit { font-size: var(--fs-12); line-height: 16px; color: var(--ink-muted); }
.page-foot .credit a { color: var(--ink-muted); }

/* folder tabs on the book's top edge */
.tabs {
  position: absolute; top: 0; left: 12px; right: 12px;
  height: 34px;
  display: flex; align-items: flex-end;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: none;
  height: 34px;
  display: inline-flex; align-items: center;
  padding: 1px 16px 0;
  margin-left: -6px;
  font: 600 var(--fs-12)/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted-desk);
  text-decoration: none;
  transform: translateY(4px);
  z-index: var(--z, 1);
}
.tab:first-child { margin-left: 0; }
.tab::before, .tab::after {
  content: "";
  position: absolute; inset: 0;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
  z-index: -1;
}
.tab::before { background: var(--hairline); }
.tab::after  { inset: 1px 1px 0 1px; background: var(--paper-raised); clip-path: polygon(7.6px 0, calc(100% - 7.6px) 0, 100% 100%, 0 100%); }
.tab:hover { color: var(--ink); }
.tab.is-chosen { color: var(--ink); transform: none; z-index: 12; }
.tab.is-chosen::after { background: var(--paper); }
.tab:focus-visible { outline-offset: -4px; }
.tabs.is-pressing .tab { transition: transform 180ms var(--ease-out); }
.tabs.is-pressing .tab.is-chosen { transform: translateY(-4px); }
.tabs .tab:nth-child(2) { --z: 9; } .tabs .tab:nth-child(3) { --z: 8; } .tabs .tab:nth-child(4) { --z: 7; }
.tabs .tab:nth-child(5) { --z: 6; } .tabs .tab:nth-child(6) { --z: 5; }

/* ------------------------------------------------------------------ the number */
.number {
  margin-top: var(--section-gap);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.number-text h2, .prose h2, .plan-text h2, .after-text h2, .index-leaf h2 { font-size: var(--fs-34); line-height: 38px; }
.number-text p, .prose p, .plan-text p, .after-text p { max-width: var(--measure); }
:is(.number-text, .prose, .plan-text, .after-text) h2 + p { margin-top: 20px; }
.refusals { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.pill {
  display: inline-block;
  padding: 10px 20px 11px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  color: var(--pen-text);
  font-weight: 600;
  font-size: var(--fs-17);
  line-height: 24px;
}

/* ------------------------------------------------------------------ the wrist: the watch's play page, drawn */
.wrist {
  margin-top: var(--section-gap);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.watch {
  /* Apple's 46 mm Series 11 bezel (Apple Design Resources) over the drawn
     play page. The PNG is 560 × 880 with the display opening at
     (71, 191, 417 × 497): two PNG pixels to a watch point, 208 × 248 pt. */
  --pt: 1.25px;            /* one watch point */
  position: relative;
  margin: 0;
  width: calc(280 * var(--pt));
  height: calc(440 * var(--pt));
  filter: drop-shadow(0 14px 18px rgb(0 0 0 / 0.22));
  /* the watch is the book after dark, in either page theme */
  --w-ink: #EAE3D2; --w-muted: #A59D89; --w-pine: #6AA383; --w-pen: #E87433; --w-flag: #D96A5C; --w-paper: #201E19;
  color: var(--w-ink);
  /* the watch sets its words in the system face (SF on Apple devices) */
  --w-system: system-ui, -apple-system, "SF Pro Text", Roboto, var(--font-body);
  font-family: var(--w-system);
}
.watch-bezel {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.watch-face {
  position: absolute;
  left: calc(35.5 * var(--pt)); top: calc(95.5 * var(--pt));
  width: calc(208.5 * var(--pt)); height: calc(248.5 * var(--pt));
  background: #000;
  border-radius: calc(40 * var(--pt));
  padding: calc(14 * var(--pt)) calc(12 * var(--pt)) calc(12 * var(--pt));
  display: flex; flex-direction: column; gap: calc(3 * var(--pt));
}
.w-stamp {
  font: 600 calc(11 * var(--pt))/1.1 var(--w-system);
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--w-muted);
}
.w-head { display: flex; justify-content: space-between; align-items: center; padding-inline: calc(4 * var(--pt)); }
.w-gps { display: inline-flex; align-items: center; gap: calc(3 * var(--pt)); font-size: calc(10 * var(--pt)); line-height: 1; color: var(--w-muted); }
.w-gps i { width: calc(5 * var(--pt)); height: calc(5 * var(--pt)); border-radius: 50%; background: var(--w-pine); }
.w-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 40% 1fr; gap: calc(5 * var(--pt)); }
.w-strip { border-radius: calc(8 * var(--pt)); overflow: hidden; background: #24221C; }
.w-strip svg { width: 100%; height: 100%; }
.w-flag line { stroke: var(--w-ink); stroke-width: 5; }
.w-flag polygon { fill: var(--w-flag); }
.w-me-rim { fill: var(--w-paper); }
.w-me { fill: #007AFF; }
.w-right { display: flex; flex-direction: column; justify-content: space-between; gap: calc(2 * var(--pt)); min-width: 0; }
.w-numbers { display: flex; flex-direction: column; gap: calc(1 * var(--pt)); }
.w-cap { font-size: calc(10 * var(--pt)); }
.w-big { font-size: calc(46 * var(--pt)); line-height: 0.9; color: var(--w-ink); }
.w-fb { display: flex; gap: calc(8 * var(--pt)); font-size: calc(15 * var(--pt)); color: var(--w-ink); }
.w-fb b { font: 400 calc(10 * var(--pt))/1 var(--w-system); color: var(--w-muted); margin-right: calc(2 * var(--pt)); }
.w-plays { font: 600 calc(11 * var(--pt))/1.2 var(--w-system); color: var(--w-ink); }
.w-club {
  display: flex; align-items: center; justify-content: space-between; gap: calc(3 * var(--pt));
  min-height: calc(44 * var(--pt));
  padding-inline: calc(6 * var(--pt));
  border-radius: calc(9 * var(--pt));
  background: rgb(165 157 137 / 0.22);
  font: 700 calc(12.5 * var(--pt))/1.1 var(--font-name);
  white-space: nowrap;
}
.w-club svg { width: calc(7 * var(--pt)); flex: none; fill: none; stroke: var(--w-muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.w-log {
  margin-top: calc(8 * var(--pt));
  height: calc(40 * var(--pt));
  display: flex; align-items: center; justify-content: center;
  border-radius: calc(20 * var(--pt));
  background: var(--w-pine);
  color: #0B0B0A;
  font: 600 calc(15 * var(--pt))/1 var(--w-system);
}
.prose { max-width: calc(var(--measure) + 2ch); }

/* ------------------------------------------------------------------ the plan */
.plan {
  margin-top: var(--section-gap);
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: 56px;
  align-items: center;
}
.leaf { box-shadow: var(--shadow-object); }
.plan .leaf { padding-bottom: var(--page-margin); }
.margin-notes { margin-top: 32px; }
.margin-notes li {
  position: relative;
  padding-left: 28px;
  font-style: italic;
  font-size: var(--fs-15);
  line-height: 22px;
  max-width: 44ch;
}
.margin-notes li + li { margin-top: 16px; }
.margin-notes li::before { content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 12px; }
.margin-notes .note-dot::before  { background: var(--pen); border-radius: 50%; box-shadow: 0 0 0 1.5px var(--paper) inset; }
.margin-notes .note-hand::before { background: var(--pen); border-radius: 50%; }
.margin-notes .note-hand::after {
  content: ""; position: absolute; left: 3px; top: 8px; width: 6px; height: 6px;
  background: var(--paper);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.margin-notes .note-line::before { height: 2.5px; top: 10px; background: var(--pen); border-radius: 2px; }

/* ------------------------------------------------------------------ after the round */
.after {
  margin-top: var(--section-gap);
  display: grid;
  grid-template-columns: 40fr 60fr;
  gap: 48px;
  align-items: center;
}
.passport { margin: 0; justify-self: end; width: 100%; max-width: 720px; }
.passport img { width: 100%; height: auto; }
.passport figcaption { margin-top: 10px; font-size: var(--fs-12); line-height: 18px; color: var(--ink-muted-desk); }

/* ------------------------------------------------------------------ what's in the book */
.contents { margin-top: var(--section-gap); }
.index-leaf { padding: 48px; }
.index-leaf h2 { margin-bottom: 24px; }
.index-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 24px;
  padding-block: 16px;
  border-bottom: 1px solid var(--hairline);
}
.index-row dt { font: 600 var(--fs-21)/1.3 var(--font-name); }
.index-row ul { display: flex; flex-wrap: wrap; gap: 4px 24px; padding-top: 2px; }

/* ------------------------------------------------------------------ back cover: full bleed, always pine */
.cover { margin-top: var(--section-gap); }
.cover, .cover-foot { background: var(--cover); color: var(--cover-ink); }
.cover-inner, .cover-foot { padding-inline: max(var(--gutter), calc((100% - 1152px) / 2)); }
.cover-inner {
  padding-top: 96px; padding-bottom: 72px;
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 64px;
  align-items: start;
}
.cover-plate { width: 120px; height: 120px; border-radius: 8px; box-shadow: 0 5px 12px rgb(0 0 0 / 0.3); margin-bottom: 32px; }
.cover h2 { color: var(--cover-ink); font-size: var(--fs-42); line-height: 46px; }
.cover-main p { color: rgb(247 242 230 / 0.86); max-width: 48ch; }
.cover-main h2 + p { margin-top: 16px; }
.cover .cta-row { margin-top: 28px; }
.button-inverse, .button-inverse:hover { background: var(--cover-ink); color: var(--cover); }
.button-inverse:active { background: #E6DFCD; }
.cover-main .address { margin-top: 12px; font-size: var(--fs-15); color: rgb(247 242 230 / 0.86); }
.cover-list { border-top: 1px solid rgb(247 242 230 / 0.28); margin-top: 152px; }
.cover-list li {
  padding-block: 14px;
  border-bottom: 1px solid rgb(247 242 230 / 0.28);
  color: rgb(247 242 230 / 0.92);
}
.cover a:focus-visible, .cover-foot a:focus-visible { outline-color: var(--cover-ink); }
.cover-foot {
  padding-top: 24px; padding-bottom: 40px;
  font-size: var(--fs-12); line-height: 18px;
}
.cover-foot p { color: rgb(247 242 230 / 0.78); max-width: 1152px; }
.cover-foot a { color: var(--cover-ink); text-decoration-color: var(--cover-ink); }
.cover-foot a:hover { color: #FFFFFF; }

/* ------------------------------------------------------------------ touch: 44 px targets */
@media (pointer: coarse) {
  .wordmark, .masthead-invite { min-height: 44px; display: inline-flex; align-items: center; }
  .credit a, .cover-foot a { display: inline-block; padding-block: 12px; margin-block: -12px; }
}

/* ------------------------------------------------------------------ tablet, 720 to 1023 */
@media (max-width: 1023.98px) {
  .book { --page-w: 360px; }
  .page-right h1 { font-size: var(--fs-34); line-height: 38px; }
  .number { grid-template-columns: 1fr; gap: 32px; }
  .plan { grid-template-columns: 1fr; gap: 40px; }
  .plan .leaf { max-width: 640px; }
  .after { grid-template-columns: 1fr; }
  .after .passport { justify-self: start; }
  .cover-inner { grid-template-columns: 1fr; gap: 40px; }
  .cover-list { margin-top: 0; }
}

/* ------------------------------------------------------------------ phone, under 720 */
@media (max-width: 719.98px) {
  .book { width: 100%; }
  .spread { grid-template-columns: minmax(0, 1fr); }
  .gutter { height: 16px; background: var(--paper) linear-gradient(180deg, rgb(0 0 0 / 0.10), rgb(0 0 0 / 0) 40%, rgb(0 0 0 / 0) 60%, rgb(0 0 0 / 0.10)); }
  .page-right { padding: 20px var(--page-margin) 0; }
  .page-left .page-band-foot { flex-direction: row-reverse; }
  .page-left .key { text-align: right; }
  .page-foot { flex-direction: row-reverse; justify-content: space-between; height: auto; padding-block: 16px; }
  .page-right h1 { font-size: var(--fs-34); line-height: 38px; }
  .lede { font-size: var(--fs-17); line-height: 27px; }
  .requires { font-size: var(--fs-15); line-height: 22px; }
  .number-text h2, .prose h2, .plan-text h2, .after-text h2,
  .index-leaf h2 { font-size: var(--fs-27); line-height: 32px; }
  .cover h2 { font-size: var(--fs-34); line-height: 38px; }
  .pill { font-size: var(--fs-15); line-height: 22px; padding: 9px 16px; border-radius: 22px; }
  .wrist { grid-template-columns: 1fr; gap: 40px; justify-items: center; }
  .watch { --pt: 1.15px; }
  .wrist .prose { justify-self: stretch; }
  .after { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 32px; }
  .index-leaf { padding: 28px 20px; }
  .index-row { grid-template-columns: 1fr; gap: 6px; }
  .cover-inner { padding-top: 64px; padding-bottom: 48px; }
  .cover-plate { width: 96px; height: 96px; }
}

/* consecutive paragraphs in a section's text */
.number-text p + p, .prose p + p, .plan-text p + p, .after-text p + p, .cover-main p + p:not(.cta-row):not(.address) { margin-top: 0.8em; }

/* ------------------------------------------------------------------ hero: the phone on the desk beside the book */
/* Apple's iPhone 18 Pro bezel (Apple Design Resources) around a real
   simulator screenshot of the play screen. */
.hero-phone { margin: 40px auto 0; width: min(300px, 72%); position: relative; z-index: 20; }
.hero-phone img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgb(0 0 0 / 0.24)); }
@media (min-width: 1024px) {
  .hero { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; }
  .hero .book { width: calc(var(--page-w) * 2 + 24px); margin-inline: 0; }
  .hero-phone { margin: 34px 0 0 -72px; width: 290px; }
  .page-right { padding-right: 80px; }
}

/* the play screen beside the distances copy */
.number { align-items: center; }
.number .refusals { margin-top: 28px; }
.section-phone { margin: 0; justify-self: center; width: 290px; }
.section-phone img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgb(0 0 0 / 0.22)); }
@media (max-width: 719.98px) { .section-phone { width: min(280px, 72%); } }

/* ------------------------------------------------------------------ phone: lead with the words */
@media (max-width: 719.98px) {
  /* the headline and the invite come first; the drawn hole follows */
  .page-right { order: -1; padding-bottom: 24px; }
  .gutter { order: 0; }
  .page-left { order: 1; }
  /* the drawing already carries these numbers */
  .approach { display: none; }
  /* the course credit belongs under the drawing; the footer credits OpenStreetMap */
  .page-right .page-foot { display: none; }
  /* heading first, then the passport */
  .after { flex-direction: column; }
}

/* WebKit sizes an image in an aspect-ratio box by its natural width when
   asked for a minimum; without these the phone's single column grew to fit
   the hole drawing and the page ran past the screen (iOS stretches a frame
   to its content). */
.page, .plate { min-width: 0; }
.plate-img { max-width: 100%; }
@media (max-width: 719.98px) { .wrist { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 359.98px) { .watch { --pt: 1px; } }

/* tab labels: the full name, or a short one where six tabs must share a phone's width */
.tab-short { display: none; }
@media (max-width: 719.98px) {
  .tab-full { display: none; }
  .tab-short { display: inline; }
}
@media (max-width: 719.98px) {
  .tabs { left: 4px; right: 4px; }
  .tab { padding: 1px 9px 0; margin-left: -5px; font-size: 10.5px; letter-spacing: 0.1em; }
  /* where even the short tabs overflow (a 320 px phone), fade the edge so the strip reads as one that scrolls */
  .tabs.is-overflowing { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
}

/* ------------------------------------------------------------------ sections as pages under folder tabs
   Each section is a sheet of the book with its name on a manila tab cut from
   the same paper (FolderTabs in the app): the tab is the heading. */
.sheet-section { margin-top: var(--section-gap); display: flex; flex-direction: column; align-items: flex-start; }
.sheet-section > .sheet, .sheet-section > .leaf { align-self: stretch; }
.sheet {
  margin-top: 0;                       /* the section carries the gap now */
  position: relative;
  background: var(--paper) var(--paper-tex);
  box-shadow: var(--shadow-object);
  padding: 48px 56px;
  border-radius: 0 4px 4px 4px;
}
.sheet-tab {
  position: relative; z-index: 2;
  margin: 0 0 -1px 20px;
  height: 42px;
  display: inline-flex; align-items: center;
  padding: 2px 26px 0;
  font: 600 var(--fs-12)/1 var(--font-body);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.sheet-tab::before, .sheet-tab::after {
  content: ""; position: absolute; z-index: -1;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
}
.sheet-tab::before { inset: 0; background: var(--hairline); }
.sheet-tab::after  { inset: 1px 1px 0 1px; background: var(--paper) var(--paper-tex); clip-path: polygon(9.6px 0, calc(100% - 9.6px) 0, 100% 100%, 0 100%); }
/* the plan's drawing and the index sit on the sheet, not above it */
.sheet .leaf { box-shadow: 0 0 0 1px var(--hairline); }
.contents .leaf { border-radius: 0 4px 4px 4px; }
/* the back cover's tab is cut from the pine */
.cover { margin-top: 0; }
.cover-tab-row { margin-top: var(--section-gap); }
.sheet-tab-pine { color: var(--cover-ink); }
.sheet-tab-pine::before { background: transparent; }
.sheet-tab-pine::after { inset: 0; background: var(--cover); clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%); }
.cover-plate { margin-bottom: 28px; }
.cover-main h2 + p, .cover-main .cover-plate + p { margin-top: 0; }
/* the hero no longer carries a tab strip */
.book { padding-top: 0; }
@media (max-width: 1023.98px) { .sheet { padding: 40px 36px; } }
@media (max-width: 719.98px) {
  .sheet { padding: 28px 20px; }
  .sheet-tab { margin-left: 12px; height: 40px; padding: 2px 20px 0; font-size: 12px; }
}
.cover { background: none; }
.cover-inner { background: var(--cover); }
/* tab size: a heading's job, at the app's stamp proportions */
.sheet-tab, .cover h2.sheet-tab { font-size: 14px; line-height: 1; height: 46px; padding: 2px 28px 0; letter-spacing: 0.14em; }
@media (max-width: 719.98px) { .sheet-tab, .cover h2.sheet-tab { font-size: 12.5px; height: 42px; padding: 2px 22px 0; } }
/* the approach's aim, beside the flag rather than on it */
.ov-aim { fill: var(--pen); stroke: var(--paper); stroke-width: 2.5; }
/* WebKit sizes an aspect-ratio flex item from its stretched width, ignoring
   its margins, so the hero plate came out taller than its drawing and the
   pen's overlay slid off the hole on iPhone. Give it its width outright. */
.page-left > .plate { align-self: center; width: calc(100% - 2 * var(--page-margin)); }

/* after the round: the words, then the shot map and the trends side by side */
.sheet.after { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.after-phones { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; justify-items: center; }
.after-phone { margin: 0; width: 100%; max-width: 260px; }
.after-phone img { display: block; width: 100%; height: auto; filter: drop-shadow(0 16px 22px rgb(0 0 0 / 0.22)); }
.sample-note { grid-column: 2; justify-self: center; margin-top: -24px; font-size: var(--fs-12); color: var(--ink-muted); }
@media (max-width: 1023.98px) {
  .sheet.after { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sample-note { grid-column: 1; margin-top: -16px; }
}
@media (max-width: 719.98px) { .after-phones { gap: 12px; } }

/* ------------------------------------------------------------------ hero: the page and the phone
   A real screen recording of the plan being built, in Apple's iPhone 18 Pro
   bezel, twice: satellite under, paper over, the paper clipped at the divider. */
.hero { display: block; }
.hero-page {
  position: relative; z-index: 1;
  background: var(--paper) var(--paper-tex);
  box-shadow: var(--shadow-object);
  border-radius: 4px;
  padding: 40px var(--page-margin) 36px;
}
.hero-page h1 { font-size: var(--fs-34); line-height: 38px; }
.hero-page .lede { margin-top: 18px; font-size: var(--fs-17); line-height: 27px; max-width: 44ch; }
.hero-page .cta-row { margin-top: 24px; }
.hero-page .requires { margin-top: 12px; font-size: var(--fs-15); line-height: 22px; }

.hero-phone.compare { position: relative; z-index: 2; width: min(300px, 78%); margin: 40px auto 0; --pos: 50%; }
.phone-bezel { position: relative; z-index: 2; display: block; width: 100%; height: auto; pointer-events: none;
  filter: drop-shadow(0 18px 24px rgb(0 0 0 / 0.24)); }
/* the bezel's screen opening: 603 x 1311 at (36, 34.5) in its 675 x 1380 */
.phone-screen {
  position: absolute; z-index: 1;
  left: 5.3333%; top: 2.5%; width: 89.3333%; height: 95%;
  overflow: hidden; background: #000;
  border-radius: 13% / 6%;
  touch-action: pan-y; cursor: ew-resize;
  -webkit-user-select: none; user-select: none;
}
.phone-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; display: block; }
.compare-over { clip-path: inset(0 0 0 var(--pos)); }
.compare-divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: 2px; margin-left: -1px;
  background: var(--bone);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.18);
}
.compare-divider:focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; }
.compare-knob {
  position: absolute; left: 50%; top: 46%;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: var(--bone);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.3), 0 0 0 1px rgb(0 0 0 / 0.12);
}
.compare-knob::before, .compare-knob::after {
  content: ""; position: absolute; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px;
  border: solid #26251F; border-width: 0 0 2px 2px;
}
.compare-knob::before { left: 8px; transform: rotate(45deg); }
.compare-knob::after { right: 8px; transform: rotate(-135deg); }
.compare-labels {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 14px; padding-inline: 6%;
  font: 600 11px/1 var(--font-body); letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-muted-desk);
}
.compare-labels span:nth-child(2) { letter-spacing: 0.06em; text-transform: none; font-weight: 400; font-size: 12px; }

@media (min-width: 1024px) {
  .hero { display: grid; grid-template-columns: minmax(0, 560px) 300px; justify-content: center; align-items: center; }
  .hero-page { padding: 56px 104px 52px 56px; margin-right: -64px; }
  .hero-page h1 { font-size: var(--fs-42); line-height: 46px; }
  .hero-phone.compare { width: 300px; margin: 0; }
}
.phone { position: relative; }
/* the caption's middle line is the point, the sides are the choices */
.compare-labels span:nth-child(2) { font: 600 13px/1 var(--font-body); letter-spacing: 0.02em; text-transform: none; color: var(--ink); }
/* tablets (and the artifact viewer's thumbnail) keep the phone beside the page */
@media (min-width: 720px) and (max-width: 1023.98px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) 236px; align-items: center; }
  .hero-page { padding: 44px 84px 40px 40px; margin-right: -52px; }
  .hero-page h1 { font-size: var(--fs-34); line-height: 38px; }
  .hero-phone.compare { width: 236px; margin: 0; }
  .compare-labels { padding-inline: 2%; }
  .compare-labels span:nth-child(2) { font-size: 12px; }
}

/* distances: the big-number view and a second tee, side by side */
.number-phones { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; justify-items: center; }
.number-phone { margin: 0; width: 100%; max-width: 250px; }
.number-phone img { display: block; width: 100%; height: auto; filter: drop-shadow(0 16px 22px rgb(0 0 0 / 0.22)); }
@media (max-width: 719.98px) { .number-phones { gap: 12px; } }

/* beta coming soon: a stamp, not a button (there is nothing to press yet) */
.soon-row { margin-top: 24px; }
.soon {
  display: inline-block;
  padding: 9px 16px 8px;
  border: 1.5px solid var(--pine);
  border-radius: 6px;
  font: 600 13px/1 var(--font-body);
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--pine);
  transform: rotate(-2deg);
}

/* the wrist: three real watch screens in Apple's Series 11 bezel */
.sheet.wrist { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: center; }
.watches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.watch-shot { margin: 0; display: block; text-align: center; }
.watch-shot img { display: block; margin: 0 auto; width: 100%; max-width: 230px; height: auto; aspect-ratio: 560 / 880; filter: drop-shadow(0 14px 18px rgb(0 0 0 / 0.2)); }
.watch-shot figcaption { display: block; margin-top: 10px; font: 600 11px/1 var(--font-body); letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-muted); }
@media (max-width: 1023.98px) { .sheet.wrist { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
@media (max-width: 719.98px) { .watches { gap: 6px; } .watch-shot figcaption { font-size: 10px; letter-spacing: 0.1em; } }

/* distances: the words, then four phones (a tee shot, the green read, aiming, the lock screen) */
.sheet.number { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; align-items: center; }
.number-phones { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.number-phone .phone { width: 100%; }
.number-phone .phone-bezel { filter: none; }
.number-phone .phone { filter: drop-shadow(0 16px 22px rgb(0 0 0 / 0.22)); }
.phone-screen.still { cursor: auto; touch-action: auto; }
@media (max-width: 1023.98px) { .sheet.number { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
@media (max-width: 719.98px) {
  /* a row to swipe: each phone snaps to the middle, the next one peeks in */
  .number-phones {
    display: flex; gap: 14px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: -20px; padding: 4px 20px 20px;
  }
  .number-phones::-webkit-scrollbar { display: none; }
  .number-phone { flex: 0 0 62%; max-width: none; scroll-snap-align: center; }
}

/* Safari sizes an image in a flex item by its natural height unless told the ratio */
.number-phone img, .after-phone img, .hero-phone img.phone-bezel, .number-phone .phone-bezel { aspect-ratio: auto 900 / 1840; height: auto; }
.phone-bezel { aspect-ratio: 675 / 1380; }
@media (max-width: 719.98px) {
  .watches {
    display: flex; gap: 10px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: -20px; padding: 4px 20px 12px;
  }
  .watches::-webkit-scrollbar { display: none; }
  .watch-shot { flex: 0 0 56%; scroll-snap-align: center; }
  .watch-shot img { max-width: none; }
  .watch-shot figcaption { font-size: 11px; }
}
/* four phones: the words above, the phones in a row across the sheet */
@media (min-width: 720px) {
  .sheet.number { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .sheet.number .number-text p { max-width: 62ch; }
  .number-phones { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
}
.hero-page .lede + .lede { margin-top: 10px; }

/* the watch tucks over the phone's bottom right corner, clear of the map and its slider.
   `.hero-phone img` sets every image in the hero to full width, so these name the figure too. */
.hero-phone .hero-watch {
  position: absolute; z-index: 3;
  width: 40%; height: auto; aspect-ratio: 560 / 880;
  right: -26%; bottom: -3%;
  pointer-events: none;
  filter: drop-shadow(0 12px 16px rgb(0 0 0 / 0.26));
}
@media (min-width: 720px) and (max-width: 1023.98px) {
  .hero .hero-phone.compare { margin-right: 44px; }
}
@media (max-width: 719.98px) {
  .hero-phone.compare { width: 66%; margin-left: 6%; margin-right: 0; transform: none; }
  .compare-labels { padding-inline: 0; gap: 10px; white-space: nowrap; font-size: 10px; letter-spacing: 0.1em; justify-content: flex-start; }
  .compare-labels span:nth-child(2) { font-size: 12px; }
}
@media (min-width: 720px) and (max-width: 1023.98px) {
  .hero .hero-phone.compare { margin-right: 0; }
  .hero.column { padding-right: calc(var(--gutter) + 64px); }
}
/* the hero screen: two posters (until the recording plays), the canvas, the hidden source */
.phone-screen img.compare-under, .phone-screen img.compare-over, .compare-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none;
}
.compare-canvas { visibility: hidden; }
.compare.is-playing .compare-canvas { visibility: visible; }
.compare.is-playing img.compare-under, .compare.is-playing img.compare-over { visibility: hidden; }
/* The source plays full size under the canvas: Safari stops decoding a video
   it thinks is hidden or tiny, and the canvas would then get no frames. */
.phone-screen .compare-src { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.phone-screen img.compare-under { z-index: 1; }
.phone-screen img.compare-over { z-index: 2; }
.compare-canvas { z-index: 3; }
.compare-divider { z-index: 4; }

/* ------------------------------------------------------------------ extras
   Three real pieces of the app, side by side: a friend's round followed live
   (a simulator recording under Apple's bezel), the shared hole video (the
   app's own export), and one printed sheet of the yardage book (the app's own
   PDF, rasterised). The figures sit on a common baseline so the three
   headings line up. */
.extras-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 40px;
  align-items: start;
}
.extra { display: flex; flex-direction: column; min-width: 0; }
.extra-fig {
  margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  height: 500px;
}
.extra-fig img, .extra-fig video { display: block; max-width: 100%; height: auto; min-height: 0; }
/* the live-share recording plays under the bezel, as the Distances phones do */
.extra-device { width: 240px; max-width: 100%; filter: drop-shadow(0 16px 22px rgb(0 0 0 / 0.22)); }
.extra-device .phone-bezel { filter: none; }
.extra-video {
  width: 320px; aspect-ratio: 720 / 900;
  background: var(--drawing-page);
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-object);
}
.extra-book {
  /* the pages are the app's own PDF; the leather holder round them is drawn
     for the page, a frame like the phone's bezel */
  height: 100%; width: auto; aspect-ratio: 600 / 1430;
  filter: drop-shadow(0 14px 18px rgb(0 0 0 / 0.24));
}
.extra-fig figcaption {
  margin-top: 16px;
  font: 600 11px/1 var(--font-body); letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-muted);
}
.extra h3 {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font: 600 var(--fs-21)/1.25 var(--font-name);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.extra p { margin-top: 10px; font-size: var(--fs-15); line-height: 23px; text-wrap: pretty; }

/* under desktop: a row to swipe, like the phones and watches above; each
   extra snaps to the middle and the next one peeks in */
@media (max-width: 1023.98px) {
  .extras-row {
    display: flex; gap: 32px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: -36px; padding: 4px 36px 20px; scroll-padding-inline: 36px;
  }
  .extras-row::-webkit-scrollbar { display: none; }
  .extra { flex: 0 0 min(400px, 46%); scroll-snap-align: center; }
  .extra-fig { height: 460px; }
}
@media (max-width: 719.98px) {
  .extras-row { gap: 20px; margin-inline: -20px; padding-inline: 20px; scroll-padding-inline: 20px; }
  .extra { flex-basis: 82%; }
  .extra-fig { height: 400px; }
  .extra-device { width: min(190px, 62%); }
  .extra-video { width: min(300px, 100%); }
  .extra-fig figcaption { font-size: 10.5px; letter-spacing: 0.1em; }
  .extra h3 { margin-top: 20px; font-size: var(--fs-21); }
  .extra p { font-size: var(--fs-17); line-height: 27px; }
}
