/* Design tokens for keithjmenezes.com (mockup, November 2026).
   Every colour, typeface, size, space, line and timing the site uses lives here, and only here.
   site.css reads these and never writes a raw value, so a reskin is a rewrite of this one file.
   Current values are borrowed from The Lived Experiment (letters.keithjmenezes.com, newsletter/DESIGN.md). */

@font-face { font-family: 'Bonum Web'; src: url(fonts/bonum-web-regular.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bonum Web'; src: url(fonts/bonum-web-bold.woff2) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bonum Sloped'; src: url(fonts/bonum-sloped-regular.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
/* Fallbacks shaped like Bonum: Georgia scaled to Bonum's average letter width, its ascent and descent set to Bonum's, so text keeps
   its lines and length while Bonum loads (the sloped fallback is matched on names and titles, which run heavy in capitals) and does not jump when it arrives (metrics measured from the woff2 files and Georgia.ttf, 15 November 2026) */
@font-face { font-family: 'Bonum Web Fallback'; src: local('Georgia'); font-weight: 400; font-style: normal; size-adjust: 111.6%; ascent-override: 95.79%; descent-override: 24.01%; line-gap-override: 0%; }
@font-face { font-family: 'Bonum Web Fallback'; src: local('Georgia Bold'), local('Georgia-Bold'); font-weight: 700; font-style: normal; size-adjust: 102.4%; ascent-override: 112.6%; descent-override: 29.88%; line-gap-override: 0%; }
@font-face { font-family: 'Bonum Sloped Fallback'; src: local('Georgia'); font-weight: 400; font-style: normal; size-adjust: 108.5%; ascent-override: 98.53%; descent-override: 24.7%; line-gap-override: 0%; }

:root {
  /* Colour: ink on warm paper, no accent hue. Saturated colour comes only from photographs. */
  --c-paper: #f0efec;        /* page ground */
  --c-print: #fdfcfa;        /* polaroid card white, a touch brighter than the paper */
  --c-ink: #141414;          /* text, focus, current state: 16.0:1 on paper */
  --c-ink-2: #5c5954;        /* secondary text: notes, dates, reading times: 6.06:1 on paper */
  --c-ink-press: #38352f;    /* filled control under the pointer */
  --c-field: #6f6c67;        /* the one rule a reader must see to use something (link underlines): 4.55:1 */
  --c-rule: #8a8782;         /* drawn marks (arrows): 3.11:1 */
  --c-rule-soft: #c6c5c2;    /* structure: section rules, list rules, print edges */
  --c-photo-fill: #2a2724;   /* behind a photograph while it loads */
  --c-globe-sea: var(--c-paper);  /* Home's globe is drawn in two tokens (cobe's render is mapped to these); the Gallery globe fills with the first */
  --c-globe-land: var(--c-ink);

  /* Type: one free Bookman in two postures. */
  --f-text: 'Bonum Web', 'Bonum Web Fallback', 'Bookman Old Style', 'URW Bookman', Georgia, serif;
  --f-display: 'Bonum Sloped', 'Bonum Sloped Fallback', 'Bookman Old Style', Georgia, serif;
  --stroke-display: .0095em;  /* Bonum Sloped is stroked to sit between regular and bold */
  --stroke-voice: .008em;

  --fs-display: clamp(50px, 6.4vw, 96px);   /* the 404's headline */
  --fs-statement: clamp(30px, 3.3vw, 52px); /* Home's headline, Keith's sentence: three lines from 1024px up */
  --fs-headline: clamp(34px, 3.6vw, 52px);  /* page and section heads */
  --fs-essay-title: clamp(36px, 4.2vw, 60px);
  --fs-lede: clamp(22px, 2vw, 30px);        /* Keith's hero sentence */
  --fs-epigraph: clamp(21px, 1.7vw, 25px);
  /* The running head and the footer hold their presence on large screens: past 1024px their sizes grow with the page, as the
     headlines do, and stop at 1680px, the grid's cap. Below 1024px each is its minimum, so tablets and phones are unchanged. */
  --fs-voice: clamp(22px, calc(14.2px + .76vw), 27px);  /* the footer line, prev/next titles */
  --fs-list-title: 22px;
  --fs-body: 19px;                          /* essay paragraphs */
  --fs-prose-h2: 30px;
  --fs-prose-h3: 22px;
  --fs-prose-h4: 19px;
  --fs-note: 16px;                          /* notes under heads, footnotes, quotes */
  --fs-nav: clamp(15px, calc(10.3px + .46vw), 18px);  /* small capitals: the running head, the Gallery's switch, the footer's field and Subscribe */
  --fs-foot: calc(var(--fs-nav) - 1px);     /* small capitals a step under the head's: the footer's To, From, its line and its foot */
  --fs-meta: 14px;                          /* small capitals: reading time, labels */
  --fs-stat-label: var(--fs-meta);          /* the label under each of the Gallery's two figures */
  --fs-date: 14px;
  --fs-stat: clamp(30px, 2.6vw, 38px);
  --fs-rail: 14px;

  --lh-tight: 1;
  --lh-head: 1.08;
  --lh-title: 1.3;
  --lh-body: 1.62;
  --lh-ui: 1.4;

  --track-display: -.022em;
  --track-head: -.01em;
  --track-caps: .075em;
  --track-figure: .06em;
  --fig-caps: .78em;   /* figures at small-capital height (Bonum's figures 681 units, small caps 485) */

  --lh-note: 1.5;
  --lh-lede: 1.42;
  --lh-statement: 1.14;
  --lh-quote: 1.45;
  --lh-fn: 1.55;
  --lh-prose-h2: 1.2;

  /* Prose rhythm, relative to the text it sits in */
  --em-para: 1em;
  --em-h2-above: 2.2em;
  --em-h2-below: .6em;
  --em-h3-above: 1.9em;
  --em-h4-above: 1.8em;
  --em-h-below: .5em;
  --em-list-indent: 1.3em;
  --em-list-gap: .25em;
  --em-list-pad: .2em;
  --em-list-nest-below: .4em;
  --em-quote-gap: 1.6em;
  --em-quote-para: .6em;
  --em-fns-above: 2.6em;
  --em-fn-para: .7em;
  --fnref-size: .68em;
  --fnref-raise: .6em;
  --fnref-pad: .2em;
  /* Footnote previews (site.css, Footnote previews; assets/notes.js): the note on a slip of paper under its number */
  --c-slip: #f7f6f3;                 /* the slip: a sheet a shade lighter than the page, so it lies on it */
  --slip-shadow: 0 1px 2px rgba(20, 20, 20, .06), 0 14px 34px -14px rgba(20, 20, 20, .26);   /* close and far: paper lifted a little off paper */
  --slip-w: 26em;                    /* at the note's size: about 60 characters a line */
  --slip-h: min(56vh, 30em);         /* a longer note scrolls inside it */
  --slip-gap: 8px;                   /* between the line and the slip */
  --slip-inset: 28px;                /* the slip starts this far left of the number, so its own number sits under it */
  --slip-wait: .14s;                 /* a pointer rests this long before a note opens: passing over the line opens nothing, */
  --slip-linger: .26s;               /* stays this long after it leaves, so it can cross to the slip, */
  --slip-skim: .5s;                  /* and a note opened within this of the last closing opens at once */
  --slip-in: .34s;                   /* the slip is drawn out of the line over this, */
  --slip-out: .16s;                  /* and put away faster */
  --slip-swipe: 64px;                /* on a phone, a swipe down past this puts the sheet away */
  --count-size: .42em;   /* the essay count beside a headline */
  --count-raise: .9em;
  --count-gap: .18em;
  --arrow-size: .62em;
  --arrow-size-sm: .55em;
  --arrow-lift: -.12em;
  --hair-gap: 3px;

  --measure: calc(34 * var(--fs-body));      /* essay column: about 70 characters of the body type. Counted in the body's size, not em, so the heading, the prose and the links under it, each set in its own size, share one column */
  --measure-lede: 30em;
  --measure-statement: 24em;   /* Home's sentence: three lines on a laptop, as on the Framer site */
  --measure-note: 24em;
  --measure-foot: 22em;
  --measure-letter: 36rem; /* on phones, where the footer's halves stack: as wide as each goes, so the field stays a line's length */

  /* Space */
  --pad: 64px;                       /* page margin */
  --gap: 24px;                       /* grid gutter */
  --max: 1680px;                     /* grid cap */
  --sp-1: 6px;
  --sp-2: 10px;
  --sp-3: 14px;
  --sp-4: 18px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-section-top: clamp(56px, 7vw, 104px);
  --sp-section-bottom: clamp(48px, 6vw, 88px);
  --sp-hero-top: clamp(48px, 7vw, 112px);
  --sp-hero-bottom: clamp(48px, 6vw, 96px);
  --head-h: clamp(64px, calc(45.3px + 1.83vw), 76px);  /* the running head, growing with its type past 1024px */
  --sp-head: clamp(32px, calc(25.8px + .61vw), 36px);  /* between the head's destinations */
  --sp-foot: clamp(48px, calc(23px + 2.44vw), 64px);   /* the footer's air above and below its line */
  --target: 44px;                    /* minimum touch target */
  --target-inline: 24px;             /* and inside a line of text, where 44px would cover the words round it: a note's reference number (WCAG 2.5.8) */
  --key: clamp(34px, calc(24.6px + .92vw), 40px);      /* square social key, and the height of Letters and Subscribe (never over --target) */
  --key-icon: clamp(18px, calc(13.3px + .46vw), 21px); /* the drawn icon in a social key */
  --print-border: clamp(8px, .8vw, 14px);
  --print-foot: clamp(40px, 3.4vw, 56px);
  --print-ratio: 4 / 5;
  --globe-size: min(100%, 440px);  /* Home */
  --c-globe-edge: var(--c-rule);     /* the sphere's outline, on Home and the Gallery */

  /* Gallery: one row of head (the heading, its note, the two figures), the Globe and Grid switch on the hairline under it, then the
     stage: the globe on the left and one large print beside it, both this height, ending at the fold. Home: the stage alone. */
  --sp-gallery-modes: var(--sp-2);   /* head row to the switch, */
  --sp-gallery-stage: var(--sp-3);   /* and the switch's hairline to the stage */
  --gallery-above: calc(var(--head-h) + var(--sp-gallery-top) + max(var(--fs-headline) * var(--lh-head) + var(--sp-3) + 2 * var(--fs-note) * var(--lh-note), var(--fs-stat) * var(--lh-tight) + var(--sp-1) + var(--fs-meta) * var(--lh-ui)) + var(--sp-gallery-modes) + var(--target) + var(--line) + var(--sp-gallery-stage));  /* the page above the stage */
  --stage-h: clamp(440px, calc(100svh - var(--gallery-above)), 860px);
  /* Home: the heading, its two figures and the whole globe share one screen. With the heading scrolled to the top (and this much
     air above it), the stage takes the rest of the screen's height, within these bounds. */
  --home-globe-above: calc(var(--sp-gallery-top) + max(var(--fs-headline) * var(--lh-head) + var(--sp-3) + 2 * var(--fs-note) * var(--lh-note), var(--fs-stat) * var(--lh-tight) + var(--sp-1) + var(--fs-meta) * var(--lh-ui)) + var(--sp-5));
  --home-globe-h: clamp(440px, calc(100svh - var(--home-globe-above)), 860px);
  --viewer-h: calc(var(--stage-h) - var(--target) - var(--sp-2) - var(--print-border) - var(--print-foot) - 2 * var(--line));  /* the large photograph */
  --viewer-ar-max: .8;                  /* the widest photograph the print's column makes room for at full height: 4 to 5 */
  --viewer-w: calc(var(--viewer-h) * var(--viewer-ar-max) + 2 * var(--print-border) + 2 * var(--line));
  --c-globe-grid: var(--c-rule-soft);   /* the wireframe: a line of latitude or longitude every --globe-grid-step degrees */
  --c-globe-coast: var(--c-rule);       /* coastlines */
  --c-globe-visited: var(--c-ink-2);    /* the countries visited: a field of fine dots, and a small ring on the smallest */
  --c-pin-on: var(--c-ink);             /* the selected photograph: its print's edge, the dot on its place and the hairline between */
  --pin: 54px;                       /* a print's photograph before it is sized to its globe (theirs is 62px across in all), */
  --pin-pad: 3px;                    /* and the paper round it, which keeps these proportions as the print grows */
  --pin-foot: 7px;
  --pin-share: .122;                 /* a print's photograph is this share of its globe's width: about 90px in all on a 650px globe, */
  --pin-min: 40px;                   /* never smaller than this, */
  --pin-max: 96px;                   /* nor larger than this (the small images are 192px, sharp at twice the density) */
  --fs-pin: 12px;
  --pin-gap: 5px;                    /* print to its place name */
  --pin-dot: 2px;                    /* the dot on the selected photograph's place */
  --pin-name-gap: 3;                 /* px of clear space a place name keeps from any print or other name; one that cannot is hidden */
  --pin-name-rate: 12;               /* how fast a name fades in or out as it gains or loses that room */
  --pin-nudge: .45;                  /* prints that would lie over each other are nudged apart on screen, each at most this share of its width, */
  --pin-nudge-gap: 6;                /* px, until this much paper shows between them (where the nudge allows), */
  --pin-nudge-rate: 8;               /* easing in and out at this rate, so a print is never seen to jump */
  --fs-caption: 18px;
  --dur-mode: .4s;
  --sp-gallery-top: var(--sp-4);
  --dur-carry: .55s;                 /* Home to the Gallery: the wireframe moves to its new place over this, */
                                     /* while the page turns around it (site.css, Page transitions); the prints leave before and arrive after */
  --dur-photo: .33s;                 /* the large print: a new photograph fades in over the old one, and the frame changes shape, over this, while its place and count change with it, the old words lifting away and the new settling by this much: */
  --photo-text-rise: 4px;
  --dur-fly: .5s;                    /* Globe to Grid: a print flies from the globe to its cell over this, */
  --fly-gap: .025s;                  /* each a little after the one before */

  /* The globe (assets/trackball.js, assets/photo-globe.js read these; unitless numbers are px, radians, or rates per second).
     The scene and its feel are polaroidarchive.com's, read from its own script: audit/polaroidarchive-notes.md */
  --globe-land: 1;              /* 1 draws coastlines on the wireframe, 0 leaves it bare (?land=0 on the page does the same) */
  --globe-visited: 1;           /* 1 marks the countries in assets/visited.json, 0 leaves them out (?visited=0 on the page does the same) */
  --globe-visited-dot: .38;     /* one dot of a visited country's field, as a share of the gap between dots */
  --globe-visited-mark: 3;      /* px: radius of the ring on a visited country too small to show */
  --globe-grid-step: 15;        /* degrees between wireframe lines */
  --globe-fit: 2.6;             /* the sphere's radius is the stage's smaller side, less a margin, divided by this (theirs: 3.05) */
  --globe-fit-x: 105;           /* px taken off the stage's width before that, */
  --globe-fit-y: 120;           /* and off its height */
  --shell-prints: 30;           /* the most prints shown at once; with more photographs, the others take turns behind the globe */
  --shell-apart: .42;           /* rad: prints are eased at least this far apart on the shell, about 24 degrees */
  --shell-lat-max: 58;          /* degrees: no print floats nearer a pole than this, so every print can be turned to the middle */
  --shell-inset-x: 58;          /* px: the outer ring of prints stops this far inside the stage's sides, */
  --shell-inset-y: 52;          /* and this far inside its top and bottom */
  --shell-inner-x: 1.44;        /* the inner ring, in sphere radii: across, */
  --shell-inner-y: 1.13;        /* and up and down */
  --shell-outer-x: 9;           /* the outer ring never reaches further than this many radii (9: no limit but the stage, as theirs), */
  --shell-outer-y: 9;           /* and the same up and down */
  --globe-tilt: .43;            /* rad the north pole leans towards you at rest, about 25 degrees */
  --globe-tilt-min: -.6;        /* a turn to a print tilts the pole by the print's latitude, kept within these */
  --globe-tilt-max: .9;
  --globe-drag: .008;           /* rad per px of drag: 100px turns the globe 46 degrees */
  --globe-slop: 5;              /* px a press may wander and still count as a click */
  --globe-fling-blend: 22;      /* rate at which pointer speed is smoothed */
  --globe-fling-max: 1200;      /* px/s: the fastest a flick can leave the hand */
  --globe-coast: 3;             /* a flick decays by exp(-3t): it coasts for speed / 3 px, most of it in the first third of a second */
  --globe-hold-grace: 40ms;     /* holding still longer than this before letting go starts to kill the flick */
  --globe-hold-kill: 100ms;     /* and each further 100ms cuts it to 37% */
  /* The return (15 Nov, Keith: "a smooth return to the normal rotational axis and rotation"): no pause. From release, the flick's
     coast decays into the idle turn rather than to a stop, and the pole eases upright alongside it, keeping the side turned to. */
  --globe-resume-ease: .6s;     /* the pole's righting comes in over this after release, and an idle turn starting from still (after an entrance) comes up to speed over it */
  --globe-spin: -.12;           /* rad/s idle turn: once round in about 52s. Negative moves the front to the left, as theirs does */
  --globe-righting: 1.6;        /* rate at which the pole eases back upright after a drag: most of the way in about 1.5s */
  --globe-wheel-blend: 24;      /* a sideways trackpad swipe turns the globe: rate at which the swipe is fed in, */
  --globe-wheel-max: 120;       /* px: the most one wheel event counts for, */
  --globe-wheel-gain: .65;      /* and the share of it that turns the globe */
  --globe-hover-slow: .12;      /* the print under the pointer drifts at this share of the idle turn */
  --globe-hover-rate: 12;       /* how fast that slowdown eases in, */
  --globe-hover-back: 1.2;      /* and how fast the print drifts home once the pointer leaves */
  --globe-turn: .55s;           /* a turn to a print lasts this long, */
  --globe-turn-per-rad: .32s;   /* plus this for each radian turned */
  --globe-lead: 35;             /* degrees short of the first print the globe starts, before turning in */
  --globe-fade-far: -.03;       /* depth runs from 1 (nearest) through 0 (the limb) to -1: a print turning further behind than this fades
                                   fully out, as it tucks under the paper (the same depth as --globe-limb): one left showing past the
                                   globe's edge read as a pale blank card, an image that had failed to load, */
  --globe-fade-near: .03;       /* and fades back in once it comes nearer than this, as it comes out over the paper (the gap keeps a print at the edge from flickering), */
  --globe-fade: .4s;            /* over this: never by depth alone, so no print rests half seen, a pale card that reads as a failed image */
  --globe-limb: .03;            /* a print tucks under the globe's paper (over --globe-fade) once this far behind the limb, and comes out once this far in front */
  --globe-alpha-back: .88;      /* a print's opacity near the limb; 1 at the front */
  --globe-fly: .8s;             /* how long a print takes to fly to its place when no time is given (placeFrom in photo-globe.js) */
  --globe-stems: .3s;           /* after prints fly in, the selected photograph's hairline draws out from its place over this */
  --globe-appear: .35s;         /* prints fade in (after the wireframe is carried from Home) or out over this */

  /* The Gallery's entrance (assets/gallery-entrance.js): prints are dealt onto a stack over the globe, then fly to their places,
     and as they land the selected photograph, the last card, is dealt into the large print.
     Once per browser session, about two seconds, finished at once by any click, key, scroll or touch, absent under reduced motion. */
  --deal-cards: 8;              /* the most cards dealt one by one; the other prints leave the stack with them */
  --deal-gap: .095s;            /* from one card setting off to the next */
  --deal-in: .34s;              /* a card's slide onto the stack, and the last card's into the large print */
  --deal-hold: .08s;            /* the full stack rests this long */
  --deal-out: .62s;             /* a print's flight from the stack to its place */
  --deal-out-gap: .018s;        /* from one print leaving the stack to the next, top card first */
  --deal-scale: 3.6;            /* a card on the stack is this many times the size of a print on the globe: about 220px */
  --deal-turn: 10;              /* degrees: the most a card lies askew on the stack */
  --deal-scatter: 16px;         /* and the most its middle sits off the stack's */
  --deal-swing: 16;             /* degrees more than that as it slides in */
  --deal-reach: .42;            /* a card slides in from this far to one side, as a share of the stage's width (alternating sides), */
  --deal-drop: .35;             /* and from below by this share of that distance */
  --deal-wait: 1.2s;            /* if the small images are not ready by now, skip the entrance and show the prints */
  --deal-landing: .3;           /* the large print's count and steps, and its caption in the card's foot, fade in from this share of the last card's slide into it (by when it has covered most of the way), so all are there as it lands */

  /* Lines: every line is 1px; 2px means state (focus) */
  --line: 1px;
  --line-state: 2px;
  --underline-offset: 4px;
  --underline-offset-title: 5px;
  --radius: 0;

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);     /* state changes */
  --ease-out: cubic-bezier(.16, 1, .3, 1); /* arrivals */
  --dur: .33s;
  --dur-reveal: .8s;
  /* Page to page (site.css, Page transitions): the page left goes quickly, the page opened settles in after it, and a carried title lands last */
  --dur-page-out: .11s;                   /* the page left fades out over this */
  --page-in-wait: .07s;                   /* the page opened waits this long, so the two are never read one through the other, */
  --page-in-wait-carry: .17s;             /* (longer when a title is carried, so the title is most of the way home before the words it crosses appear) */
  --dur-page-in: .26s;                    /* then fades in over this, */
  --page-rise: 6px;                       /* rising this far into place */
  --dur-title: .42s;                      /* a Writing row's title carried into its essay's heading, and back */
  --ease-carry: cubic-bezier(.45, 0, .15, 1); /* something carried from one place to another: it sets off gently and lands softly */
  --title-swap: .22;                      /* the carried title changes face over this share of its journey, at the row's end of it, where it is small */
  --progress-line: var(--line);           /* the essay's reading progress, a hairline across the top of the window */
  --reveal-rise: 14px;

  /* The phone menu (site.css, site.js; chosen 15 November 2026 from the phone nav lab, lab-nav.html?v=d, whose values these are).
     Below 760px the running head is one row that stays at the top: the name, Letters, and a swatch of halftone dots. Tapped, the
     swatch blooms across the screen in the hero's ink dots until they merge into a page of ink, the destinations set large in paper.
     Two greys for words and rules on that ink, which has no paper under it; still no new hue. */
  --menu-row: 56px;                  /* the head's one row, its rule included */
  --menu-icon: 16px;                 /* the swatch inside its 44px button */
  --menu-sw-dot: 5px;                /* the swatch's largest dot */
  --fs-menu: 40px;                   /* the destinations, in the headline face */
  --menu-link-row: 84px;
  --menu-underline: 6px;
  --menu-arrow: .34em;               /* Favourites' drawn arrow at that size, */
  --menu-arrow-raise: .62em;         /* standing at the cap line, */
  --menu-arrow-gap: .14em;           /* this far from the word */
  --menu-here-dot: 8px;              /* the paper dot at the end of the page you are on */
  --menu-rise: 10px;                 /* the destinations rise this far as they arrive, */
  --menu-words-in: .44s;             /* over this, */
  --menu-words-out: .22s;            /* and go over this */
  --menu-stagger: .045s;             /* each this long after the one above */
  --menu-bloom-in: .34s;             /* the ink blooms across the screen over this (a tap answered at once), */
  --menu-bloom-out: .26s;            /* and draws back into the swatch over this */
  --menu-bloom-pitch: 9px;           /* px between the bloom's dots */
  --menu-bloom-dot: 1.5;             /* a full-grown dot's diameter as a share of the pitch: above 1.42 the dots merge into solid ink */
  --menu-bloom-soft: 150px;          /* a dot grows from nothing to full over this far behind the front */
  --menu-bloom-ragged: 26px;         /* the front is this ragged, dot by dot */
  --menu-bloom-words: .3;            /* the destinations arrive from this share of the bloom */
  --menu-flip: .18s;                 /* the name, Letters and the swatch turn to paper as the ink reaches them */
  --c-menu-ink-2: #a9a6a0;           /* the count on the ink: 7.9:1 */
  --c-menu-rule: #45423e;            /* rules on the ink */

  /* The footer's letter (site.css, Footer; site.js; chosen 15 November 2026 from the footer lab, lab-footers.html F): the newsletter's
     To and From addressing under the letter's line. It posts to /api/subscribe */
  --letter-k: 36px;                  /* the To and From column at its narrowest, as on the newsletter (wider if From is), */
  --letter-gap: 10px;                /* and the space between that column and the field */
  --letter-from: 12px;               /* the From line sits this far under the field (the newsletter's row gap) */
  --fs-msg: var(--fs-foot);          /* the messages under the field: 14px, growing with the footer */
  --lh-msg: 1.36;                    /* 19px at 14px */
  --press: 1px;                      /* Subscribe goes down this far when pressed, like type into paper, */
  --press-dur: .03s;                 /* this quickly */
  --letter-write: 1.1s;              /* Keith writes himself in on the From line over this, */
  --letter-wait: .15s;               /* starting this long after the form is half in view */

  color-scheme: only light;
}

/* Home's globe: larger against its stage, with the prints' outer ring drawn in so they belong to it. */
.home-globe {
  --globe-fit: 2.3;
  --globe-fit-y: 110;
  --shell-outer-x: 1.85;
  --shell-outer-y: 1.3;
}
/* The Gallery's globe: at least as large as Home's teaser at the same width. Its margin is negative, so the globe grows faster
   than its stage: it fills a short stage (490px on a 1280x720 screen) and leaves room for prints round it on a tall one (770px at 1920x1080). */
.gallery {
  --globe-fit: 2.5;
  --globe-fit-x: 0;
  --globe-fit-y: -105;
}

/* Tablets */
@media (max-width: 1024px) {
  :root { --pad: 40px; --fs-list-title: 21px; --stage-h: min(56vw, 520px); --pin: 46px; --shell-prints: 24; }
}

/* Phones */
@media (max-width: 760px) {
  :root {
    --pad: 20px;
    --gap: 16px;
    --fs-display: clamp(44px, 13vw, 56px);
    --fs-essay-title: clamp(32px, 9vw, 40px);
    --fs-lede: 21px;
    --fs-statement: 25px;   /* five lines on a phone */
    --fs-epigraph: 20px;
    --fs-voice: 20px;
    --fs-list-title: 19px;
    --fs-body: 17.5px;
    --fs-prose-h2: 25px;
    --fs-prose-h3: 20px;
    --fs-prose-h4: 17.5px;
    --fs-note: 15px;
    --fs-nav: 15px;
    --lh-body: 1.6;
    --globe-size: min(78vw, 320px);
    --stage-h: 372px;
    --home-globe-h: 430px;
    --deal-scale: 2.8;
    --deal-scatter: 10px;
    --pin: 40px;
    --fs-pin: 13px;
    --pin-gap: 3px;
    --shell-prints: 10;        /* a phone shows fewer prints, so the globe is not buried; the others take turns behind it */
    --shell-apart: .68;
    --shell-inset-x: 30;
    --shell-inset-y: 36;
    --globe-fit: 2.2;          /* a globe near 300px across on a 390px screen */
    --globe-fit-x: 60;
    --globe-fit-y: 60;
    --sp-gallery-top: var(--sp-4);
    --fs-caption: 16px;
    /* The Gallery on a phone, a composition of its own (photo-globe.css, Phones): the heading with the Globe and Grid switch at its
       right, the note, the two figures on a row of their own over the hairline that closes the head; then the globe, the hero of
       the first screen, with the top of the large print under it; then the large print, at one height for every photograph, its
       steps under it, the two together on one screen under the running head. */
    --fs-stat: 26px;                 /* the two figures, a clear step under the heading's 34px */
    --fs-stat-label: 13px;           /* their labels, on one line each over half the page (Countries Visited is 129px wide at 320px) */
    --gallery-head-phone: 96px;      /* the running head on a phone: two rows (site.css), or one with JavaScript (below) */
    --sp-gallery-stats: var(--sp-5); /* the note to the figures, */
    --sp-gallery-rule: var(--sp-4);  /* and the figures to the hairline under them */
    --sp-gallery-stage: 0px;
    --gallery-above: calc(var(--gallery-head-phone) + var(--sp-gallery-top) + max(var(--fs-headline) * var(--lh-head), var(--target)) + var(--sp-1) + 2 * var(--fs-note) * var(--lh-note) + var(--sp-gallery-stats) + var(--fs-stat) * var(--lh-tight) + var(--sp-1) + var(--fs-stat-label) * var(--lh-ui) + var(--sp-gallery-rule) + var(--line) + var(--sp-gallery-stage));
    --gallery-peek: 150px;           /* the large print's top that shows on the first screen, where the screen is tall enough: its paper edge and the top of the photograph */
    --stage-h: clamp(360px, calc(100svh - var(--gallery-above) - var(--gallery-peek)), 372px);   /* no taller than the globe and its prints need (below), so on a tall phone the large print's photograph shows on the first screen, not more paper round the globe */
    /* The large print: the height at which the widest photograph (4 to 5) fills the page's width, or less where the screen is too
       short for the print and its steps to share it under the running head. Narrower photographs keep that height and take less width. */
    --sp-viewer: var(--sp-3);        /* the print to its steps */
    --viewer-h: min(calc((100vw - 2 * var(--pad) - 2 * var(--print-border) - 2 * var(--line)) / var(--viewer-ar-max)), calc(100svh - var(--gallery-head-phone) - 2 * var(--sp-4) - var(--print-border) - var(--print-foot) - 2 * var(--line) - var(--sp-viewer) - var(--target)));
    --vw-count-w: 4.6em;             /* the count between the steps, as wide as its widest (15 / 15), so the steps never shift as it changes */
  }
  /* The Gallery's globe on a phone: the size of Home's at the same width (so the carry between them barely scales), its prints kept
     inside the page's margins and clear of the hairline above. */
  .gallery { --globe-fit: 2.3; --globe-fit-x: 60; --globe-fit-y: 40; --shell-inset-x: 46; --shell-inset-y: 40; }   /* fit-y: the stage's height never decides the globe's size, so the shorter stage keeps it */
  html.js { --gallery-head-phone: var(--menu-row); }   /* with JavaScript the phone head is the menu's one row */
}
