/* ═══════════════════════════════════════════════════════════════
   site.css — byupasana. "A little bit of everything, by me."

   The brand lives at the top of this file: the typefaces (Allura for the wordmark, Pinyon Script for the handwritten touches,
   Lora for everything else) and the palette (blue, periwinkle, cream, sand, with a deep navy for text). Every page reads
   its fonts and colours from these tokens, so the brand is changed here.

   The pages themselves are laid out on canvases measured from their reference screenshots: every size is N * a canvas
   unit (--u on Home, the Library and the Logs; --n on the Notes; --a on About), so each page keeps its proportions as
   the window grows, and below its breakpoint the same pieces reflow.
   ═══════════════════════════════════════════════════════════════ */

/* the typefaces, all self-hosted under the SIL Open Font License: Lora, Allura and Pinyon Script (their licences sit beside them
   in assets/fonts/). */
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/lora-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/lora-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400 700; font-display: swap; src: url(../fonts/lora-italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400 700; font-display: swap; src: url(../fonts/lora-italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Allura draws the "byupasana" logo and Pinyon Script the handwritten touches. Each is scaled to the same x-height (.319em, the
   size every script setting on these pages was tuned to) and given the same line metrics, so they stand as tall and sit on the
   same baseline as the script they replaced. Overrides are scaled by size-adjust, hence the odd percentages. */
@font-face { font-family: "Allura"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/allura.woff2) format("woff2"); size-adjust: 106%; ascent-override: 96.3%; descent-override: 44.3%; line-gap-override: 2%; }
@font-face { font-family: "Pinyon Script"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/pinyon-script.woff2) format("woff2"); size-adjust: 95.5%; ascent-override: 106.9%; descent-override: 49.2%; line-gap-override: 2.2%; }
/* their stand-ins for the moment before they arrive: Lora's italic, scaled and re-measured to each one's width and baseline,
   so the swap changes the letters and moves nothing else */
@font-face { font-family: "Logo Fallback"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/lora-italic-latin.woff2) format("woff2"); size-adjust: 79.75%; ascent-override: 128%; descent-override: 58.9%; line-gap-override: 2.6%; }
@font-face { font-family: "Script Fallback"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/lora-italic-latin.woff2) format("woff2"); size-adjust: 76.5%; ascent-override: 133.5%; descent-override: 61.4%; line-gap-override: 2.7%; }

:root {
  /* the brand */
  --by-blue: #31577c;         /* the identity colour */
  --by-peri: #bfcde0;         /* periwinkle dawn: highlights, the active link, what is selected */
  --by-peri-soft: #dde5ef;    /* periwinkle, lighter: tints and soft fills */
  --by-peri-deep: #8fa6c4;    /* periwinkle, deeper: strokes and underlines that sit on cream */
  --by-cream: #f3eadf;        /* warm cream: the page */
  --by-sand: #d4cabc;         /* sand: borders, paper details, secondary accents */
  --by-sand-soft: #e6ddd1;    /* sand, lighter: cards and paper */
  --by-navy: #1d2f45;         /* deep navy: text */
  --by-logo: #1b355a;         /* the wordmark's ink: a deep navy-blue */
  --by-white: #fbf8f3;        /* soft white: paper over cream */
  --by-mute: #8c9aab;         /* muted blue-grey: quiet rules and borders */
  --by-ink-2: #4a5a6c;        /* secondary text */
  --by-script: "Pinyon Script", "Script Fallback", Georgia, serif;   /* the handwritten touches */
  --by-logo-font: "Allura", "Logo Fallback", Georgia, serif;          /* the wordmark */
  --by-serif: "Lora", Georgia, "Times New Roman", serif;
  --by-ease: 180ms cubic-bezier(.2, .7, .2, 1);

  /* the names the earlier components use, pointed at the brand */
  --ink: var(--by-navy); --ink-2: var(--by-ink-2); --ink-3: #6b7a8a;
  --emerald: var(--by-blue); --emerald-2: #284867; --bar: var(--by-blue);
  --cream: var(--by-cream); --paper: var(--by-white); --paper-2: var(--by-sand-soft); --white: #fffdf9;
  --pink: var(--by-peri-soft); --pink-2: var(--by-peri-soft); --mint: var(--by-peri-soft); --yellow: var(--by-peri); --yellow-2: var(--by-peri-soft);
  --gold: var(--by-peri-deep); --coral: var(--by-blue); --coral-ink: var(--by-blue); --brick: var(--by-blue); --mustard: var(--by-peri-deep); --teal: var(--by-blue);
  --green: var(--by-blue); --green-2: #284867;
  --rule: var(--by-sand); --line: var(--by-mute);
  --tape: rgba(212, 202, 188, .85);
  --shadow: 0 10px 24px rgba(29, 47, 69, .12), 0 2px 6px rgba(29, 47, 69, .07);
  --shadow-sm: 0 4px 12px rgba(29, 47, 69, .1);
  --display: var(--by-serif); --serif: var(--by-serif); --hand: var(--by-script); --sans: var(--by-serif); --mono: var(--by-serif);
  --max: 1456px;
  --gutter: 16px;
  --ease: var(--by-ease);
}
@media (min-width: 768px) { :root { --gutter: 28px; } }
@media (min-width: 1200px) { :root { --gutter: 40px; } }

/* ── base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; color: var(--ink); font: 400 1rem/1.6 var(--serif);
  background: var(--by-cream);
  overflow-x: clip;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  /* the canvas unit: the body is the query container, so 100cqw is the page width without the scrollbar */
  container-type: inline-size;
  --u: calc(min(100cqw, 1600px) / 1536);
}
.page { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.05; text-wrap: balance; }
p { margin: 0; } ul, ol { margin: 0; padding: 0; } figure { margin: 0; }
a { color: inherit; text-decoration: none; transition: color var(--ease); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
:focus-visible { outline: 2px solid var(--by-blue); outline-offset: 3px; border-radius: 4px; }
/* a drawn arrow beside words: drawn, never typed, so it never falls to a font outside the brand's */
.i-arrow { display: inline-block; flex: none; width: .82em; height: .82em; margin-left: .3em; vertical-align: -.07em; }
.i-arrow--left { margin: 0 .3em 0 0; }
.np-pager .i-arrow { margin-left: .55em; } .np-pager .i-arrow--left { margin: 0 .55em 0 0; }   /* room beside the tracked capitals */
.i-arrow svg { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.visually-hidden, .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; left: var(--gutter); top: -3rem; background: var(--ink); color: var(--paper); padding: .5rem .9rem; z-index: 50; font: 600 .8rem/1 var(--sans); border-radius: 999px; }
.skip:focus { top: .75rem; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; }
.hand { font-family: var(--hand); font-weight: 500; font-size: 1.3rem; line-height: 1.25; color: var(--ink); }
.hand--coral { color: var(--coral-ink); }
.mono { font-family: var(--mono); font-size: .75rem; letter-spacing: .02em; color: var(--ink-3); }
.kicker { font: 700 .7rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--coral-ink); }
.empty { color: var(--ink-2); }

/* icons & stickers (inner pages) */
.ico, .sticker { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -.3em; }
.ico svg, .sticker svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.ico .stroke, .sticker .stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sticker--img img, .ico--img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sticker--sparkle { color: var(--gold); } .sticker--star { color: var(--gold); }
.sticker--daisy .petals { fill: #fff; stroke: var(--ink); stroke-width: .6; } .sticker--daisy .eye { fill: var(--mustard); }
.sticker--smiley .face { fill: var(--yellow); stroke: var(--ink); stroke-width: .8; } .sticker--smiley .ink { fill: var(--ink); stroke: var(--ink); } .sticker--smiley .stroke { fill: none; }
.sticker--heart { color: var(--coral); }
.sticker--asterisk { color: var(--coral); } .sticker--asterisk .stroke { stroke-width: 3; }
.sticker--sprig { color: var(--emerald-2); } .sticker--sprig .stroke { stroke-width: 1.5; }
.sticker--arrow, .sticker--arrowBack, .sticker--squiggle, .sticker--check { color: var(--ink); } .sticker--squiggle { color: var(--gold); } .sticker--squiggle .stroke { stroke-width: 3; }
.stk { position: absolute; z-index: 3; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .12)); }
.inline-heart { width: 1em; height: 1em; vertical-align: -.1em; color: var(--coral); }
.inline-arrow { width: 1.4em; height: 1.4em; vertical-align: -.4em; }

/* ── site search: the panel the header's search button opens (the results come from every page's content) ── */
.search-panel { position: absolute; right: 0; top: calc(100% + 14px); width: min(380px, 90vw); z-index: 30; display: none; }
.search.is-open .search-panel { display: block; }
.search-input { width: 100%; min-height: 46px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--by-sand); background: var(--by-white); font: 400 1rem/1.2 var(--by-serif); color: var(--by-navy); -webkit-appearance: none; appearance: none; box-shadow: var(--shadow); }
.search-input::placeholder { color: #7a8796; font-style: italic; }
.search-input:focus { outline: none; border-color: var(--by-blue); box-shadow: 0 0 0 3px rgba(191, 205, 224, .7), var(--shadow); }
.search-results { position: absolute; top: calc(100% + 6px); right: 0; left: 0; list-style: none; background: var(--by-white); border: 1px solid var(--by-sand); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; max-height: 60vh; overflow: auto; }
.search-results a { display: grid; grid-template-columns: 64px 1fr; gap: 2px 10px; padding: 8px 10px; border-radius: 10px; align-items: baseline; color: var(--by-navy); }
.search-results a:hover, .search-results [aria-selected="true"] a { background: var(--by-peri-soft); }
.sr-kind { font: 600 .66rem/1.2 var(--by-serif); text-transform: uppercase; letter-spacing: .12em; color: var(--by-blue); }
.sr-title { font: 600 .95rem/1.3 var(--by-serif); grid-column: 2; }
.sr-sub { font: italic 400 .82rem/1.3 var(--by-serif); color: var(--by-ink-2); grid-column: 2; }
.sr-empty { padding: 10px 12px; font: italic 400 .95rem/1.4 var(--by-serif); color: var(--by-ink-2); }

/* ── the shared header: the byupasana wordmark, the tagline, the five links, search ── */
/* One header for every page, drawn by renderPagesHeader() in site.js. It sits across the top of the window; a page with
   stripes down its left edge sets --frame-r to the stripes' right edge so the wordmark clears them. */
.site-header--bpp { position: relative; z-index: 6; flex: none; display: flex; align-items: center; gap: 0 clamp(14px, 1.8vw, 30px); width: 100%; height: 80px; margin: 0; box-sizing: border-box;
  padding: 0 clamp(20px, 3.2vw, 56px) 0 calc(var(--frame-r, 0px) + clamp(20px, 3.2vw, 56px));
  background: var(--hdr-bg, transparent); color: var(--by-navy); font-family: var(--by-serif); }
.site-header--bpp::after { content: ""; position: absolute; left: var(--frame-r, 0px); right: 0; bottom: 0; height: 1px; background: var(--by-sand); pointer-events: none; }
.site-header--bpp > * { position: static; margin: 0; }
.by-brand { flex: none; display: inline-flex; align-items: center; color: var(--by-logo); line-height: 1; border-radius: 6px; transition: color var(--by-ease); }
.by-brand:hover { color: var(--by-blue); }
.by-wordmark { display: block; padding: .06em .1em .2em 0; font: 400 clamp(38px, 3.1vw, 50px) / 1 var(--by-logo-font); letter-spacing: 0; white-space: nowrap; translate: 0 .08em; }
.by-tagline { flex: none; padding-left: clamp(14px, 1.5vw, 24px); border-left: 1px solid var(--by-sand); font: italic 400 15.5px / 1.3 var(--by-serif); color: var(--by-ink-2); white-space: nowrap; }
.menu-toggle { display: none; }
.bpp-nav { margin-left: auto; }
.bpp-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(2px, .9vw, 14px); }
.bpp-nav li { position: static; }
.bpp-nav a { display: block; padding: 8px 16px 9px; border-radius: 999px; font: 500 clamp(16px, 1.2vw, 18.5px) / 1 var(--by-serif); letter-spacing: .01em; color: var(--by-navy); white-space: nowrap; transition: color var(--by-ease), background var(--by-ease); }
.bpp-nav a:hover { color: var(--by-blue); background: rgba(191, 205, 224, .38); }
.bpp-nav a[aria-current="page"], .bpp-nav a[aria-current="page"]:hover { font-style: italic; color: var(--by-navy); background: var(--by-peri); }
.site-header--bpp .search { position: relative; flex: none; }
.site-header--bpp .search-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--by-navy); transition: background var(--by-ease), color var(--by-ease); }
.site-header--bpp .search-btn:hover, .site-header--bpp .search-btn[aria-expanded="true"] { background: rgba(191, 205, 224, .45); color: var(--by-blue); }
.site-header--bpp .search-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.site-header--bpp .search-panel { right: -6px; top: calc(100% + 14px); }
@media (max-width: 1279px) { .by-tagline { display: none; } }
html.has-panel .by-tagline { display: none; }   /* the Library's notes drawer leaves less room */
/* below 900px: the wordmark, then search and the Menu button; the links drop down under them */
@media (max-width: 899px) {
  .site-header--bpp { height: 64px; gap: 6px; padding-right: 14px; }
  .by-wordmark { font-size: 36px; }
  .site-header--bpp .search { margin-left: auto; }
  .menu-toggle { display: inline-flex; align-items: center; flex: none; min-height: 40px; padding: 0 18px 1px; border-radius: 999px; background: var(--by-peri); color: var(--by-navy); font: italic 500 17px / 1 var(--by-serif); }
  .menu-toggle[aria-expanded="true"] { background: var(--by-navy); color: var(--by-cream); }
  .bpp-nav { position: absolute; right: 14px; top: calc(100% + 6px); z-index: 7; display: none; margin: 0; padding: 8px; background: var(--by-white); border: 1px solid var(--by-sand); border-radius: 18px; box-shadow: 0 14px 34px rgba(29, 47, 69, .14); }
  .bpp-nav.is-open, .no-js .bpp-nav { display: block; }
  .bpp-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .bpp-nav a { font-size: 20px; padding: 11px 20px 12px; }
  .site-header--bpp .search-panel { right: -60px; width: min(380px, calc(100vw - 24px)); }
}
@media (max-width: 899px) and (prefers-reduced-motion: no-preference) { .bpp-nav.is-open { animation: nav-in 160ms ease-out; } }
@keyframes nav-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ── the shared footer: a sprig, the wordmark, the tagline, the links, the handles ── */
.by-footer { position: relative; z-index: 2; flex: none; box-sizing: border-box; padding: 40px clamp(20px, 3.2vw, 56px) 34px calc(var(--frame-r, 0px) + clamp(20px, 3.2vw, 56px));
  background: var(--ft-bg, transparent); text-align: center; color: var(--by-navy); font-family: var(--by-serif); }
.by-footer::before { content: ""; position: absolute; left: var(--frame-r, 0px); right: 0; top: 0; height: 1px; background: var(--by-sand); pointer-events: none; }
.by-footer-sprig { display: block; width: 46px; height: 30px; margin: 0 auto 4px; fill: none; stroke: var(--by-blue); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.by-footer .by-brand { justify-content: center; }
.by-footer .by-wordmark { font-size: 44px; translate: none; }
.by-footer-tagline { margin-top: 2px; font: italic 400 17px / 1.4 var(--by-serif); color: var(--by-ink-2); }
.by-footer-nav ul { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.by-footer-nav a, .by-footer-social a { display: inline-block; padding: 6px 0; font: 500 15px / 1.3 var(--by-serif); letter-spacing: .02em; color: var(--by-navy); }
.by-footer-nav a:hover, .by-footer-social a:hover { color: var(--by-blue); text-decoration: underline; text-decoration-color: var(--by-peri-deep); text-underline-offset: 4px; }
.by-footer-nav a[aria-current="page"] { font-style: italic; color: var(--by-blue); }
.by-footer-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin-top: 8px; }
.by-footer-social a { display: inline-flex; align-items: center; gap: 7px; }
.by-footer-social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.by-footer-small { margin-top: 14px; font: 400 13px / 1.4 var(--by-serif); letter-spacing: .04em; color: var(--by-ink-2); }

/* ── Home: the frame and the home page ── */
/* The home page is the 1536 × 864 reference drawn in canvas units: every size is N * var(--u). The left
   stripes and the bottom trim frame the viewport; the hero and cards sit on the centred canvas. */
body.bpp {
  --bpp-paper: var(--by-cream); --bpp-ink: var(--by-navy); --bpp-blue: var(--by-blue); --bpp-lavender: var(--by-peri); --bpp-amp: var(--by-peri-deep);
  --bpp-pill: var(--by-peri); --bpp-rule: var(--by-sand); --bpp-trim: var(--by-blue); --bpp-trim-a: var(--by-peri); --bpp-trim-b: var(--by-peri-soft);
  --bpp-serif: var(--by-serif); --bpp-display: var(--by-serif);
  position: relative; background: var(--bpp-paper); color: var(--bpp-ink); font-family: var(--bpp-serif);
}
body.home { --frame-r: calc(73 * var(--u)); }
body.bpp :focus-visible { outline-color: var(--by-blue); }
body.bpp .skip { font-family: var(--by-serif); background: var(--by-navy); color: var(--by-cream); }
.frame-left { position: absolute; left: calc(9 * var(--u)); top: 0; bottom: 0; width: calc(64.3 * var(--u)); z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(to right, var(--bpp-blue) 0 calc(9.3 * var(--u)), transparent calc(9.3 * var(--u)) calc(18.33 * var(--u))); }
.frame-bottom { flex: none; margin-top: auto; margin-left: calc(64 * var(--u)); height: calc(30 * var(--u)); border-top: calc(3 * var(--u)) solid var(--bpp-trim); box-sizing: border-box;
  background: repeating-linear-gradient(to right, var(--bpp-trim-a) 0 calc(10 * var(--u)), var(--bpp-trim-b) calc(10 * var(--u)) calc(22.5 * var(--u))) calc(9.5 * var(--u)) 0; }

/* hero */
.hero { position: relative; width: calc(1536 * var(--u)); height: calc(438 * var(--u)); margin: 0 auto; }
.hero-copy > * { position: absolute; margin: 0; }
.hero-title { left: calc(176 * var(--u)); top: calc(84 * var(--u)); z-index: 2; font: 400 calc(84.4 * var(--u)) / calc(83 * var(--u)) var(--bpp-display); font-optical-sizing: none; font-variation-settings: "opsz" 18; letter-spacing: calc(-4.6 * var(--u)); color: var(--bpp-ink); white-space: nowrap; text-wrap: initial; }
.hero-title em { font-style: italic; letter-spacing: calc(-4.1 * var(--u)); }
/* "by me." in the handwriting, over a periwinkle swipe */
.hero-script { font: 400 1.08em / 1 var(--by-script); letter-spacing: 0; color: var(--by-blue); }
.swipe { position: relative; display: inline-block; z-index: 0; }
.swipe::before { content: ""; position: absolute; left: -.08em; right: -.1em; bottom: .04em; height: .42em; background: url(../img/home/headline-swipe.svg) center / 100% 100% no-repeat; z-index: -1; }
.hero-sub { left: calc(180 * var(--u)); top: calc(284.3 * var(--u)); z-index: 2; font: italic 400 calc(25 * var(--u)) / 1 var(--bpp-serif); letter-spacing: calc(.5 * var(--u)); white-space: nowrap; }
.hero-rule { left: calc(181 * var(--u)); top: calc(345 * var(--u)); width: calc(87 * var(--u)); height: calc(4 * var(--u)); }
.hero-art { position: absolute; left: calc(785 * var(--u)); top: calc(-9 * var(--u)); width: calc(642 * var(--u)); height: calc(411 * var(--u)); }

/* the three cards */
.cards { position: relative; width: calc(1536 * var(--u)); height: calc(242 * var(--u)); margin: 0 auto; }
.page--home { padding-bottom: calc(40 * var(--u)); }
.card { position: absolute; top: 0; height: calc(242 * var(--u)); border-radius: calc(24 * var(--u)); color: var(--bpp-ink); transition: transform var(--ease), box-shadow var(--ease); }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(29, 47, 69, .1); }
.card--library { left: calc(132 * var(--u)); width: calc(427 * var(--u)); background: linear-gradient(#ece3d6, #e8ded0); }
.card--logs { left: calc(581 * var(--u)); width: calc(427 * var(--u)); background: linear-gradient(#d6dfea, #ccd7e6); }
.card--notes { left: calc(1031 * var(--u)); width: calc(432 * var(--u)); background: linear-gradient(#faf6f0, #f7f1e9); }
.card > * { position: absolute; margin: 0; }
.card-icon--books { left: calc(163.5 * var(--u)); top: calc(27 * var(--u)); width: calc(107 * var(--u)); height: calc(66 * var(--u)); }
.card-icon--mountains { left: calc(138 * var(--u)); top: calc(27.5 * var(--u)); width: calc(157 * var(--u)); height: calc(69 * var(--u)); }
.card-icon--pen { left: calc(180.5 * var(--u)); top: calc(15.5 * var(--u)); width: calc(81 * var(--u)); height: calc(84 * var(--u)); }
.card-title { left: 0; right: 0; top: calc(103.8 * var(--u)); text-align: center; font: 400 calc(42.4 * var(--u)) / 1 var(--bpp-serif); letter-spacing: calc(1.1 * var(--u)); color: var(--bpp-ink); white-space: nowrap; text-wrap: initial; }
.card-text { left: 0; right: 0; top: calc(158 * var(--u)); text-align: center; font: 400 calc(21.5 * var(--u)) / calc(26 * var(--u)) var(--bpp-serif); letter-spacing: calc(.75 * var(--u)); white-space: nowrap; }
.card-arrow { right: calc(36.6 * var(--u)); top: calc(195.2 * var(--u)); width: calc(25 * var(--u)); height: calc(23 * var(--u)); transition: transform var(--ease); }
.card:hover .card-arrow { transform: translateX(4px); }

/* below 1024px the composition reflows: a menu button, the art under the copy, the cards stacked */
@media (max-width: 1023px) {
  .frame-left { left: 0; width: 22px; background: repeating-linear-gradient(to right, transparent 0 3px, var(--bpp-blue) 3px 6px, transparent 6px 6.5px); }
  html body.home, html body.lib, html body.logs { --frame-r: 22px; }   /* the narrow stripes of the smaller screens */
  .frame-bottom { margin-left: 22px; height: 18px; border-top-width: 2px; background: repeating-linear-gradient(to right, var(--bpp-trim-a) 0 6px, var(--bpp-trim-b) 6px 14px) 0 0; }
  .hero { width: auto; height: auto; display: flex; flex-direction: column; padding: 14px 20px 0 36px; }
  .hero-copy { position: relative; }
  .hero-copy > * { position: static; }
  .hero-title { font-size: clamp(42px, 11.4vw, 82px); line-height: .98; letter-spacing: -.048em; white-space: normal; }
  .hero-title em { letter-spacing: -.046em; }
  .hero-sub { margin-top: 18px; font-size: clamp(17px, 4.4vw, 24px); letter-spacing: .6px; white-space: normal; max-width: 34ch; }
  .hero-rule { display: block; margin-top: 18px; width: 72px; height: 4px; }
  .hero-art { position: static; width: min(100%, 560px); height: auto; margin: 22px auto 0; }
  .cards { width: auto; height: auto; display: grid; grid-template-columns: 1fr; gap: 16px; padding: 26px 20px 0 36px; max-width: 560px; margin: 0 auto; box-sizing: content-box; }
  .page--home { padding-bottom: 30px; }
  .card { position: relative; left: auto !important; width: auto !important; height: auto; border-radius: 20px; padding: 24px 24px 28px; text-align: center; }
  .card > * { position: static; }
  .card-icon { display: block; width: auto !important; height: 56px !important; margin: 0 auto; }
  .card-title { font-size: 36px; margin-top: 14px; }
  .card-text { font-size: 18px; line-height: 1.3; letter-spacing: .3px; margin-top: 8px; white-space: normal; }
  .card-arrow { position: absolute; right: 22px; bottom: 20px; top: auto; width: 22px; height: 21px; }
}
@media (min-width: 700px) and (max-width: 1023px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; gap: 14px; }
  .card { padding: 22px 14px 48px; }
  .card-title { font-size: 30px; }
  .card-text { font-size: 16px; }
  .card-arrow { right: 18px; bottom: 16px; }
}

/* ── pages ── */
.page { padding: 0; }

/* ── not found: a card on cream, in the brand ── */
.page--missing { display: grid; place-items: center; padding: clamp(40px, 8vw, 110px) 20px; }
.mi-card { width: min(100%, 620px); padding: clamp(30px, 5vw, 52px) clamp(24px, 5vw, 56px); text-align: center; background: var(--by-white); border: 1px solid var(--by-sand); border-radius: 22px; box-shadow: var(--shadow); }
.mi-kicker { font: 600 .78rem/1 var(--by-serif); letter-spacing: .32em; text-transform: uppercase; color: var(--by-blue); }
.mi-title { margin-top: 16px; font: 500 clamp(2.2rem, 6vw, 3.4rem) / 1.08 var(--by-serif); color: var(--by-navy); }
.mi-script { font: 400 1.3em / 1 var(--by-script); color: var(--by-blue); }
.mi-text { margin: 16px auto 0; max-width: 34ch; font: italic 400 1.15rem / 1.55 var(--by-serif); color: var(--by-ink-2); }
.mi-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.mi-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border: 1px solid var(--by-blue); border-radius: 999px; font: 500 1rem/1 var(--by-serif); color: var(--by-blue); transition: background var(--by-ease), color var(--by-ease); }
.mi-btn:hover { background: var(--by-peri-soft); }
.mi-btn--solid { background: var(--by-blue); color: var(--by-cream); }
.mi-btn--solid:hover { background: #284867; color: var(--by-cream); }

/* ── covers ───────────────────────────────────────────────────── */
.cover { display: block; width: 132px; aspect-ratio: 2 / 3; position: relative; border-radius: 3px 8px 8px 3px; box-shadow: 3px 4px 10px rgba(31, 27, 23, .25), inset 6px 0 0 -3px rgba(0, 0, 0, .18); overflow: hidden; }
.cover--img img { width: 100%; height: 100%; object-fit: cover; }
.cover--type { background: var(--cloth, var(--teal)); color: var(--ink); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 10px 9px 8px; text-align: center; }
.cover-mid { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 0; overflow: hidden; padding: 4px 0; }
.cover--dark { color: #fff8ee; }
.cover-top, .cover-foot { font: 600 .55rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.cover-top { border-bottom: 1px solid currentColor; padding-bottom: 5px; min-height: 1.2em; }
.cover-foot { border-top: 1px solid currentColor; padding-top: 5px; min-height: 1.2em; }
.cover-title { font: 600 .95rem/1.15 var(--serif); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cover-author { font: italic 400 .68rem/1.2 var(--serif); opacity: .85; }
.pbook .cover-title { font-size: .72rem; -webkit-line-clamp: 3; } .pbook .cover-author { font-size: .55rem; } .pbook .cover-top, .pbook .cover-foot { font-size: .42rem; }
.stars { display: inline-flex; gap: 1px; }
.star { position: relative; width: 14px; height: 14px; display: inline-block; }
.star span { position: absolute; inset: 0; } .star svg { width: 100%; height: 100%; display: block; }
.star-off svg { fill: #d8cfc1; } .star-on { z-index: 1; clip-path: inset(0 calc((1 - var(--fill, 0)) * 100%) 0 0); } .star-on svg { fill: var(--gold); }

/* ── library ─────────────────────────────────────────────────── */
/* Built to the 1536 × 865 Library reference. Sizes are N * var(--k): on a window of 1200px or more --k is one canvas
   unit (the window ÷ 1536, capped at 1600px), so the page is the reference at 1536px and keeps its proportions at
   other widths; below 1200px --k is one CSS pixel and the pieces re-flow. The header and the frame keep var(--u).
   When the notes drawer narrows the page the layout re-flows at the same scale: it never zooms. */
body.lib {
  --bpp-paper: var(--by-cream); --bpp-serif: var(--by-serif); --bpp-display: var(--by-serif); --bpp-sans: var(--by-serif); --spine-serif: var(--by-serif);
  --bpp-amp: var(--by-peri-deep); --bpp-pill: var(--by-peri); --bpp-rule: var(--by-mute); --bpp-line: var(--by-peri); --bpp-muted: var(--by-ink-2); --bpp-text: var(--by-navy); --bpp-chip: var(--by-peri); --bpp-cream: var(--by-white);
  --lib-edge: var(--by-sand); --lib-rule: var(--by-mute); --lib-bar: var(--by-blue); --lib-pale: var(--by-peri-soft); --lib-gold: var(--by-peri-deep);
  --u: calc(min(100vw, 1600px) / 1536); --k: 1px; container-type: normal; --frame-r: calc(46 * var(--u));
}
@media (min-width: 1200px) { body.lib { --k: var(--u); } }

/* the Library's frame and header, to its own reference: three bars down the left, lavender stripes along the bottom,
   a smaller wordmark and navigation (the Home page keeps its own) */
@media (min-width: 1024px) {
  body.lib .frame-left { left: calc(11.3 * var(--u)); width: calc(34.6 * var(--u)); background: linear-gradient(to right, var(--lib-bar) 0 calc(6.6 * var(--u)), var(--bpp-paper) calc(6.6 * var(--u)) calc(13.9 * var(--u)), var(--lib-bar) calc(13.9 * var(--u)) calc(20.1 * var(--u)), var(--bpp-paper) calc(20.1 * var(--u)) calc(28.1 * var(--u)), var(--lib-bar) calc(28.1 * var(--u)) calc(34.6 * var(--u))); }
  body.lib .frame-bottom { margin-left: 0; height: calc(26 * var(--u)); border-top: 0; background: linear-gradient(#dde5ef, #dde5ef) 0 0 / calc(16 * var(--u)) 100% no-repeat, repeating-linear-gradient(to right, #b3c3d8 0 calc(12.5 * var(--u)), #dde5ef calc(12.5 * var(--u)) calc(24.5 * var(--u))) calc(16 * var(--u)) 0 / 100% 100%; }
}

.page--library { padding: 0; min-width: 0; }

/* the hero: the hills, the welcome with its gold stroke, the count, the button, the note asking for a recommendation */
.lib-hero { position: relative; height: calc(201 * var(--k)); text-align: center; color: var(--bpp-ink); }
.lib-hero > * { position: absolute; margin: 0; }
.lib-kicker, .lib-count { left: 0; right: 0; font: 600 calc(13.3 * var(--k)) / 1 var(--bpp-sans); text-transform: uppercase; white-space: nowrap; }
.lib-kicker { top: calc(16.8 * var(--k)); letter-spacing: calc(5.23 * var(--k)); padding-left: calc(5.23 * var(--k)); }
.lib-title { left: 0; right: 0; top: calc(36 * var(--k)); padding-left: calc(28 * var(--k)); font: italic 400 calc(73.4 * var(--k)) / 1 var(--bpp-serif); letter-spacing: calc(.36 * var(--k)); color: var(--bpp-ink); white-space: nowrap; text-wrap: initial; }
.lib-swash { left: calc(50% - 156 * var(--k)); top: calc(90 * var(--k)); width: calc(310 * var(--k)); height: calc(52 * var(--k)); overflow: visible; pointer-events: none; }
.lib-swash path { fill: none; stroke: var(--lib-gold); stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.lib-count { top: calc(138.4 * var(--k)); letter-spacing: calc(4.34 * var(--k)); padding-left: calc(2.3 * var(--k)); }
.lib-recommend { left: calc(50% - 117.5 * var(--k)); top: calc(165 * var(--k)); width: calc(235 * var(--k)); height: calc(35 * var(--k)); box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: calc(6.5 * var(--k)); padding: 0 0 0 calc(2.5 * var(--k)); border: max(1px, calc(1.2 * var(--k))) solid #8c9aab; border-radius: 999px; background: transparent; font: 700 calc(13 * var(--k)) / 1 var(--bpp-sans); letter-spacing: calc(1.62 * var(--k)); text-transform: uppercase; color: var(--bpp-ink); white-space: nowrap; transition: background var(--ease), color var(--ease), border-color var(--ease); }
.lib-recommend svg { width: calc(20.5 * var(--k)); height: calc(20.5 * var(--k)); flex: none; fill: none; stroke: currentColor; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.lib-recommend:hover { background: var(--bpp-ink); border-color: var(--bpp-ink); color: var(--bpp-paper); }
.lib-mountain, .lib-note { display: none; }
.lib-note { padding: 0; transition: transform var(--ease); }
.lib-note img { display: block; width: 100%; height: 100%; }
.lib-note-text { position: absolute; left: 23%; top: 31%; font: 400 calc(31 * var(--k)) / .98 var(--by-script); color: var(--by-navy); text-align: left; white-space: nowrap; rotate: -7deg; transform-origin: 0 50%; pointer-events: none; }   /* the note's lettering, in the handwriting */
.lib-note-text br + * { margin-left: -.06em; }
.lib-note-arrow { display: inline-block; width: 1.1em; height: .55em; margin-left: .08em; vertical-align: .02em; overflow: visible; }   /* drawn, like every arrow on the site */
.lib-note-arrow path { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.lib-note:hover { transform: translateY(-2px) rotate(-.6deg); }

/* search and sort */
.lib-tools { display: flex; justify-content: space-between; align-items: center; gap: calc(16 * var(--k)); margin: 0 calc(73 * var(--k)) 0 calc(110 * var(--k)); }
.lib-search { position: relative; flex: 0 1 calc(319 * var(--k)); height: calc(31.6 * var(--k)); }
.lib-search svg { position: absolute; left: calc(11.6 * var(--k)); top: calc(.4 * var(--k)); width: calc(31 * var(--k)); height: calc(31 * var(--k)); fill: none; stroke: var(--bpp-ink); stroke-width: 2.7; stroke-linecap: round; pointer-events: none; }
.lib-search input { display: block; width: 100%; height: 100%; box-sizing: border-box; margin: 0; padding: 0 calc(14 * var(--k)) calc(2.6 * var(--k)) calc(47 * var(--k)); border: 1px solid var(--lib-edge); border-radius: 999px; background: transparent; font: italic 400 calc(17 * var(--k)) / 1 var(--bpp-serif); color: var(--bpp-ink); -webkit-appearance: none; appearance: none; }
.lib-search input::placeholder { color: #7a8796; opacity: 1; }
.lib-search input:focus { outline: none; border-color: var(--bpp-ink); box-shadow: 0 0 0 3px rgba(191, 205, 224, .5); }
.lib-sort { position: relative; display: inline-flex; align-items: center; gap: calc(6 * var(--k)); flex: none; height: calc(31.6 * var(--k)); box-sizing: border-box; padding: 0 calc(16 * var(--k)) calc(1 * var(--k)) calc(20.5 * var(--k)); border: 1px solid var(--lib-edge); border-radius: 999px; font: 600 calc(14.5 * var(--k)) / 1 var(--bpp-serif); color: var(--bpp-ink); white-space: nowrap; }
.lib-sort select { -webkit-appearance: none; appearance: none; margin: 0; padding: 0 calc(18 * var(--k)) 0 0; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; }
.lib-sort select:focus-visible { outline: none; }
.lib-sort:focus-within { border-color: var(--bpp-ink); box-shadow: 0 0 0 3px rgba(191, 205, 224, .5); }
.lib-sort svg { position: absolute; right: calc(13.4 * var(--k)); top: 50%; width: calc(14.4 * var(--k)); height: calc(6.8 * var(--k)); margin-top: calc(-3 * var(--k)); fill: var(--bpp-ink); pointer-events: none; }

/* the filters: reading status, a thin rule, then the genres; they work together */
.lib-filters { display: flex; flex-wrap: wrap; align-items: flex-start; gap: calc(12.5 * var(--k)) calc(30 * var(--k)); margin: calc(14.9 * var(--k)) calc(73 * var(--k)) 0 calc(109.5 * var(--k)); }
.lib-chips { display: flex; align-items: center; gap: calc(12.5 * var(--k)); min-width: 0; }
.lib-chips--status { flex: none; gap: calc(12 * var(--k)); }
.lib-chips--genre { --fit: 1; flex: 1 1 calc(250 * var(--k)); }
.lib-chips--genre.is-full { justify-content: space-between; gap: calc(7 * var(--k)); }
.lib-chips--genre.is-open { flex-wrap: wrap; }
.lib-chips-rule { flex: none; width: max(1px, calc(1.5 * var(--k))); height: calc(27 * var(--k)); margin-top: calc(1.75 * var(--k)); background: var(--lib-rule); }
.lib-filters.is-split .lib-chips-rule { display: none; }
.lib-filters:empty { min-height: calc(30.5 * var(--k)); }   /* the chips are drawn by the script: keep their row while it loads, so the books do not jump */
.lib-chip { display: inline-flex; align-items: center; justify-content: center; gap: calc(9.5 * var(--k)); flex: none; height: calc(30.5 * var(--k)); box-sizing: border-box; padding: 0 calc(20.8 * var(--k)) calc(2.4 * var(--k)); border: 1px solid var(--lib-edge); border-radius: 999px; background: transparent; font: 600 calc(13.6 * var(--k)) / 1 var(--bpp-serif); font-variant-numeric: lining-nums; color: var(--bpp-ink); white-space: nowrap; transition: background var(--ease), border-color var(--ease); }
.lib-chip:hover { border-color: var(--lib-rule); }
.lib-chip.is-on { background: var(--bpp-chip); border-color: var(--bpp-chip); }
.lib-chip--all { padding-left: calc(31.4 * var(--k)); padding-right: calc(31.4 * var(--k)); }
.lib-chip--ico { gap: calc(10.5 * var(--k)); padding-left: calc(23 * var(--k)); padding-right: calc(19 * var(--k)); }
.chip-ico { display: block; flex: none; width: calc(var(--iw, 20) * var(--k)); height: calc(var(--ih, 18) * var(--k)); margin-top: calc(2 * var(--k)); }
.chip-ico svg { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: calc(1.6 * var(--k)); stroke-linecap: round; stroke-linejoin: round; }
.chip-ico svg path { vector-effect: non-scaling-stroke; }
@media (min-width: 1024px) {
  .lib-chip[data-status="read"] { gap: calc(10.1 * var(--k)); padding-left: calc(22.8 * var(--k)); padding-right: calc(14.2 * var(--k)); }
  .lib-chip[data-status="reading"] { gap: calc(12.1 * var(--k)); padding-left: calc(23.8 * var(--k)); padding-right: calc(18.2 * var(--k)); }
  .lib-chip[data-status="tbr"] { gap: calc(10.1 * var(--k)); padding-left: calc(24.8 * var(--k)); padding-right: calc(23.2 * var(--k)); }
}
.lib-chip--more { width: calc(44 * var(--k)); padding: 0; }
.lib-chip--more svg { display: block; width: calc(27 * var(--k)); height: calc(27 * var(--k)); fill: currentColor; }

/* the row: one scroller, two arrows, no shelf */
.lib-row { position: relative; margin-top: calc(26 * var(--k)); }
.lib-scroller { display: flex; align-items: flex-end; gap: calc(3 * var(--k)); contain: inline-size; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; box-sizing: border-box; min-height: calc(275 * var(--k)); margin: 0 calc(103 * var(--k)) 0 calc(137 * var(--k)); padding: calc(24 * var(--k)) calc(10 * var(--k)) calc(40 * var(--k)); scroll-padding: 0 calc(10 * var(--k)); }
.lib-scroller::-webkit-scrollbar { display: none; }
.lib-row::after { content: ""; position: absolute; left: calc(147 * var(--k)); right: calc(113 * var(--k)); bottom: calc(20 * var(--k)); height: calc(18 * var(--k)); background: radial-gradient(50% 100% at 50% 50%, rgba(29, 47, 69, .12), transparent 70%); pointer-events: none; }
.row-empty { margin: 0 auto; align-self: center; padding: calc(60 * var(--k)) 0; font: italic 400 calc(17.5 * var(--k)) / 1.4 var(--bpp-serif); color: var(--bpp-muted); }
.row-arrow { position: absolute; top: calc(101.2 * var(--k)); z-index: 3; width: calc(44 * var(--k)); height: calc(44 * var(--k)); display: grid; place-items: center; border-radius: 50%; color: var(--bpp-ink); transition: transform var(--ease), opacity var(--ease), background var(--ease); }
.row-arrow svg { display: block; width: calc(47.4 * var(--k)); height: calc(47.4 * var(--k)); flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row-arrow--prev { left: calc(79.9 * var(--k)); } .row-arrow--next { right: calc(52.4 * var(--k)); }
.row-arrow:hover { background: rgba(191, 205, 224, .35); } .row-arrow--prev:hover { transform: translateX(-3px); } .row-arrow--next:hover { transform: translateX(3px); }

/* a spine: its size from the page count, its cloth from the cover, the cover art showing through the cloth */
.spine { position: relative; isolation: isolate; flex: none; display: flex; flex-direction: column; align-items: center; width: calc(var(--w) * var(--k)); height: calc(var(--h) * var(--k)); padding: calc(14 * var(--k)) 0 calc(10 * var(--k)); border-radius: 2px 3px 3px 2px; overflow: hidden; color: var(--st); text-align: center; cursor: pointer; background: rgb(var(--sc));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 12px 20px -10px rgba(29, 47, 69, .5);
  transition: transform .22s ease, box-shadow .22s ease, width .35s ease, margin .35s ease, opacity .25s ease, visibility 0s linear 0s; }
.spine:hover, .spine:focus-visible { transform: translateY(calc(-8 * var(--k))); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 22px 30px -14px rgba(29, 47, 69, .55); z-index: 1; }
.spine:focus-visible { outline: 2px solid var(--bpp-blue); outline-offset: 3px; }
.spine[aria-expanded="true"] { transform: translateY(calc(-10 * var(--k))); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 22px 30px -14px rgba(29, 47, 69, .55), 0 0 0 2px var(--bpp-paper), 0 0 0 4px var(--bpp-lavender); }
.spine-art { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; opacity: .17; }   /* the cover art, faint under the cloth */
.spine::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(0, 0, 0, .3), rgba(255, 255, 255, .16) 12%, rgba(255, 255, 255, .04) 40%, rgba(0, 0, 0, .06) 78%, rgba(0, 0, 0, .32)); pointer-events: none; }
.spine-title, .spine-author, .spine-band { z-index: 2; }
.spine--out { width: 0 !important; margin: 0 calc(-1.5 * var(--k)); opacity: 0; visibility: hidden; pointer-events: none; transition: transform .22s ease, width .35s ease, margin .35s ease, opacity .25s ease, visibility 0s linear .35s; }
/* the lettering runs down the spine as a column: the title has the height the rule and the name leave it, so they never meet */
.spine-title { flex: 1 1 0; min-height: 0; writing-mode: vertical-rl; text-align: center; font: 600 calc(var(--fs) * var(--k)) / 1.3 var(--spine-serif); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.spine--light .spine-title { text-shadow: none; }
.spine-title--two { line-height: 1.15; } .spine-title--two > span { display: block; max-height: 100%; overflow: hidden; text-overflow: ellipsis; }   /* a very long title, in two lines */
.spine-band { position: relative; flex: none; align-self: stretch; height: 1px; margin: calc(10 * var(--k)) calc(4 * var(--k)) calc(5 * var(--k)); background: currentColor; opacity: .5; }
.spine-band:last-child { margin-bottom: calc(24 * var(--k)); }   /* no name beneath it: the rule keeps its place above the foot */
.spine-band--double::before { content: ""; position: absolute; left: 0; right: 0; top: calc(-4 * var(--k)); height: 1px; background: currentColor; }
.spine-author { flex: none; max-height: 48%; overflow: hidden; writing-mode: vertical-rl; font: 400 calc(9 * var(--k)) / 1.3 var(--spine-serif); letter-spacing: .06em; white-space: nowrap; opacity: .85; }

/* the card that lifts off a spine: live text on a cream card with a notch that points at its book */
.spine-card { position: absolute; z-index: 6; width: calc(215.5 * var(--k)); box-sizing: border-box; padding: calc(16.5 * var(--k)) calc(20 * var(--k)) calc(17.6 * var(--k)) calc(21.5 * var(--k)); border-radius: calc(18 * var(--k)); background: var(--bpp-cream); box-shadow: 0 calc(7 * var(--k)) calc(18 * var(--k)) rgba(74, 52, 34, .27), 0 0 0 1px rgba(240, 232, 224, .85); text-align: left; cursor: pointer; opacity: 0; transform: translateY(4px); transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.spine-card.is-on { opacity: 1; transform: none; pointer-events: auto; }
.spine-card::before { content: ""; position: absolute; left: calc(-6.6 * var(--k)); top: var(--notch, 50%); width: calc(13.2 * var(--k)); height: calc(13.2 * var(--k)); margin-top: calc(-6.6 * var(--k)); background: var(--bpp-cream); transform: rotate(45deg); border-radius: calc(2 * var(--k)); }
.spine-card.is-left::before { left: auto; right: calc(-6.6 * var(--k)); }
.spine-card > * { position: relative; }
.tip-heart { position: absolute; right: calc(10.5 * var(--k)); top: calc(15.6 * var(--k)); width: calc(22.6 * var(--k)); height: calc(22.6 * var(--k)); }
.tip-heart svg { display: block; width: 100%; height: 100%; fill: none; stroke: var(--bpp-ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.tip-heart.is-fav svg { fill: var(--bpp-chip); }
.tip-title { margin: 0 calc(24 * var(--k)) 0 0; font: italic 500 calc(21.2 * var(--k)) / calc(23 * var(--k)) var(--bpp-serif); letter-spacing: calc(-.4 * var(--k)); color: var(--bpp-ink); }
.tip-author { margin: calc(5.5 * var(--k)) 0 0; font: 400 calc(16.4 * var(--k)) / 1 var(--bpp-serif); color: var(--bpp-muted); }
.tip-rating { display: flex; align-items: center; gap: calc(16 * var(--k)); margin: calc(8.5 * var(--k)) 0 0; font: 600 calc(14.2 * var(--k)) / 1 var(--bpp-serif); font-variant-numeric: lining-nums; color: var(--bpp-ink); }
.tip-rating .stars { gap: calc(2.6 * var(--k)); } .tip-rating .star { width: calc(15 * var(--k)); height: calc(15 * var(--k)); }
.tip-rating .star-on svg { fill: #31577c; } .tip-rating .star-off svg { fill: #d6cdc1; }
.tip-text { margin: calc(9 * var(--k)) 0 0; font: 500 calc(14 * var(--k)) / calc(16 * var(--k)) var(--bpp-serif); color: var(--bpp-text); display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tip-chips { display: flex; flex-wrap: wrap; gap: calc(8 * var(--k)) calc(14.5 * var(--k)); margin: calc(15.5 * var(--k)) 0 0; }
.tip-chip { display: inline-flex; align-items: center; height: calc(24 * var(--k)); box-sizing: border-box; padding: 0 calc(13.5 * var(--k)) calc(1.6 * var(--k)); border-radius: 999px; background: var(--lib-pale); font: 600 calc(13.5 * var(--k)) / 1 var(--bpp-serif); color: var(--bpp-ink); white-space: nowrap; }

/* below the books: what is being read now, a passage, the reading goal. Two columns with the passage beneath them;
   on the full canvas (further down) the three sit in one row as the reference has them */
.lib-foot { position: relative; display: grid; grid-template-columns: calc(437 * var(--k)) minmax(0, 1fr); column-gap: calc(40 * var(--k)); margin: calc(25 * var(--k)) calc(31 * var(--k)) 0 calc(64 * var(--k)); color: var(--bpp-ink); }
.lib-foot::before { content: ""; position: absolute; left: calc(32 * var(--k)); right: calc(49 * var(--k)); top: calc(.3 * var(--k)); height: max(1px, calc(1.5 * var(--k))); background: #cfc6b9; }
.foot-col { position: relative; height: calc(175 * var(--k)); min-width: 0; }
.foot-col--reading { grid-row: 1; grid-column: 1; } .foot-col--goal { grid-row: 1; grid-column: 2; }
.foot-col > * { position: absolute; margin: 0; }
.foot-books { left: 0; top: calc(25 * var(--k)); width: calc(180 * var(--k)); height: calc(137 * var(--k)); }
.foot-body { left: calc(191 * var(--k)); top: calc(31.4 * var(--k)); white-space: nowrap; }
.foot-head { position: relative; margin: 0; font: italic 500 calc(25.8 * var(--k)) / 1 var(--bpp-serif); letter-spacing: calc(-.38 * var(--k)); color: var(--bpp-ink); white-space: nowrap; text-wrap: initial; }
.foot-underline { position: absolute; pointer-events: none; }
.foot-underline svg { display: block; width: 100%; height: 100%; overflow: visible; }
.foot-underline path { fill: none; stroke: var(--lib-gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.foot-underline--reading { left: calc(-5 * var(--k)); top: calc(24.6 * var(--k)); width: calc(196 * var(--k)); height: calc(22 * var(--k)); }
.foot-underline--goal { left: calc(-7.4 * var(--k)); top: calc(21 * var(--k)); width: calc(166 * var(--k)); height: calc(24 * var(--k)); }
.foot-book { margin: calc(23.8 * var(--k)) 0 0 calc(2.4 * var(--k)); display: flex; flex-direction: column; }
.foot-book-title { font: 500 calc(22.9 * var(--k)) / 1 var(--bpp-serif); max-width: calc(200 * var(--k)); overflow: hidden; text-overflow: ellipsis; padding-block: .1em; margin-block: -.1em; }   /* room inside the clip for the tall letters */
.foot-book-author { margin-top: calc(3.5 * var(--k)); font: 500 calc(17.6 * var(--k)) / 1 var(--bpp-serif); max-width: calc(200 * var(--k)); overflow: hidden; text-overflow: ellipsis; }
.foot-more { display: block; margin-top: calc(9 * var(--k)); font: italic 500 calc(16 * var(--k)) / 1 var(--bpp-serif); color: var(--bpp-blue); text-decoration: underline; text-underline-offset: calc(3 * var(--k)); text-decoration-color: var(--bpp-chip); }
.foot-more:hover { color: var(--bpp-ink); }
.foot-go { left: calc(397 * var(--k)); top: calc(91 * var(--k)); width: calc(38.5 * var(--k)); height: calc(38.5 * var(--k)); display: grid; place-items: center; border-radius: 50%; background: #dde5ef; color: var(--bpp-ink); transition: transform var(--ease), background var(--ease); }
.foot-go svg { display: block; width: calc(27.7 * var(--k)); height: calc(27.7 * var(--k)); fill: none; stroke: currentColor; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.foot-go:hover { transform: translateX(3px); background: var(--bpp-chip); }
.foot-target { left: calc(54 * var(--k)); top: calc(29 * var(--k)); width: calc(75 * var(--k)); height: calc(69 * var(--k)); }
.foot-col--goal .foot-body { left: calc(138.4 * var(--k)); top: calc(31.6 * var(--k)); }
.foot-col--goal .foot-head { letter-spacing: calc(.64 * var(--k)); }
.foot-goal-count { margin: calc(24.5 * var(--k)) 0 0 calc(1 * var(--k)); font: italic 500 calc(19.4 * var(--k)) / 1 var(--bpp-serif); font-variant-numeric: lining-nums; }
.foot-progress { left: calc(65.5 * var(--k)); top: calc(117.3 * var(--k)); width: calc(265 * var(--k)); height: calc(13.5 * var(--k)); border-radius: 999px; background: #e3e9f1; overflow: hidden; }
.foot-progress-fill { display: block; height: 100%; min-width: calc(13.5 * var(--k)); border-radius: 999px; background: #8fa6c4; }
.foot-goal-pct { left: calc(353.6 * var(--k)); top: calc(109.9 * var(--k)); font: 500 calc(20.3 * var(--k)) / 1 var(--bpp-serif); font-variant-numeric: lining-nums; }
.foot-flowers { left: calc(401 * var(--k)); top: calc(14 * var(--k)); width: calc(129 * var(--k)); height: calc(141 * var(--k)); }
.foot-col--passage { grid-row: 2; grid-column: 1 / -1; height: auto; display: flex; justify-content: center; align-items: flex-start; gap: calc(12 * var(--k)); padding: calc(22 * var(--k)) 0 calc(26 * var(--k)); border-top: 1px solid #ddd4c8; }
.foot-col--passage > * { position: static; }
.foot-quote-mark { display: block; flex: none; width: calc(37.6 * var(--k)); height: calc(32.4 * var(--k)); margin-top: calc(-4 * var(--k)); }
.foot-quote-mark svg { display: block; width: 100%; height: 100%; fill: #bfcde0; }
.foot-passage { margin: 0; max-width: calc(312 * var(--k)); text-align: center; font: italic 500 calc(20.2 * var(--k)) / calc(25.8 * var(--k)) var(--bpp-serif); letter-spacing: calc(.5 * var(--k)); word-spacing: calc(4.5 * var(--k)); color: var(--bpp-ink); }
.foot-passage p { margin: 0; }
.foot-passage cite { display: block; margin-top: calc(6 * var(--k)); font: 500 calc(15 * var(--k)) / 1.2 var(--bpp-serif); font-style: normal; color: var(--bpp-muted); }
@media (max-width: 1099px) { .foot-flowers { display: none; } }

/* the full canvas: a window of 1200px or more with the drawer shut. Everything lands on the reference's coordinates. */
@media (min-width: 1200px) {
  html:not(.has-panel) body.lib .page--library { width: calc(1536 * var(--k)); margin: 0 auto; flex: none; }
  html:not(.has-panel) body.lib .lib-mountain { display: block; left: calc(112 * var(--k)); top: calc(46 * var(--k)); width: calc(258 * var(--k)); height: calc(121 * var(--k)); }
  html:not(.has-panel) body.lib .lib-note { display: block; right: calc(64 * var(--k)); top: calc(16 * var(--k)); width: calc(285 * var(--k)); height: calc(156 * var(--k)); }
  html:not(.has-panel) body.lib .lib-filters { flex-wrap: nowrap; }
  html:not(.has-panel) body.lib .lib-foot { display: block; height: calc(175 * var(--k)); margin: calc(25 * var(--k)) 0 0; }
  html:not(.has-panel) body.lib .lib-foot::before { left: calc(96 * var(--k)); right: calc(80 * var(--k)); }
  html:not(.has-panel) body.lib .foot-col { position: absolute; top: 0; height: 100%; }
  html:not(.has-panel) body.lib .foot-col--reading { left: calc(64 * var(--k)); width: calc(473 * var(--k)); }
  html:not(.has-panel) body.lib .foot-col--goal { left: calc(975 * var(--k)); width: calc(530 * var(--k)); }
  html:not(.has-panel) body.lib .foot-col--passage { left: calc(537.5 * var(--k)); width: calc(437.5 * var(--k)); display: block; padding: 0; border: 0; }
  html:not(.has-panel) body.lib .foot-col--passage::before, html:not(.has-panel) body.lib .foot-col--passage::after { content: ""; position: absolute; top: calc(38.6 * var(--k)); width: max(1px, calc(1.5 * var(--k))); height: calc(95.6 * var(--k)); background: #c4bbae; }
  html:not(.has-panel) body.lib .foot-col--passage::before { left: calc(-.7 * var(--k)); } html:not(.has-panel) body.lib .foot-col--passage::after { right: calc(-.7 * var(--k)); }
  html:not(.has-panel) body.lib .foot-col--passage:first-child::before, html:not(.has-panel) body.lib .foot-col--passage:last-child::after { content: none; }   /* a rule only where a column follows */
  html:not(.has-panel) body.lib .foot-quote-mark { position: absolute; left: calc(51.6 * var(--k)); top: calc(37 * var(--k)); margin: 0; }
  html:not(.has-panel) body.lib .foot-passage { position: absolute; left: calc(73 * var(--k)); top: calc(42 * var(--k)); width: calc(312 * var(--k)); max-width: none; }
}

/* the notes: a drawer on the right of wide screens, a sheet from the bottom elsewhere */
.book-panel { position: fixed; z-index: 40; display: flex; flex-direction: column; box-sizing: border-box; background: var(--bpp-paper); color: var(--bpp-ink); font-family: var(--bpp-serif); outline: none; }
.book-panel[hidden] { display: none; }
.book-panel:focus-visible { outline: 2px solid var(--bpp-blue); outline-offset: -4px; }
.book-panel.is-swapping .panel-body, .book-panel.is-swapping .panel-foot { opacity: 0; }
.panel-body, .panel-foot { transition: opacity .18s ease; }
.panel-grip { flex: none; }
.panel-handle { display: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 20px 14px 28px; border-bottom: 1px solid var(--bpp-line); }
.panel-title { margin: 0; font: italic 500 1.7rem/1.1 var(--bpp-serif); color: var(--bpp-ink); }
.panel-close, .panel-nav-btn { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: var(--bpp-ink); transition: background var(--ease); }
.panel-close svg, .panel-nav-btn svg { width: 24px; height: 24px; display: block; }
.panel-close:hover, .panel-nav-btn:hover { background: rgba(191, 205, 224, .4); }
.panel-close:focus-visible, .panel-nav-btn:focus-visible { outline: 2px solid var(--bpp-blue); outline-offset: 2px; }
.panel-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 24px 28px; }
.panel-book { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 22px; align-items: start; }
.panel-cover { display: block; }
.panel-cover img, .panel-cover .cover { display: block; width: 96px; height: 144px; object-fit: cover; border-radius: 3px; box-shadow: 0 8px 18px -8px rgba(29, 47, 69, .5); }
.panel-cover .cover { padding: 6px 5px; } .panel-cover .cover-title { font-size: .62rem; } .panel-cover .cover-author, .panel-cover .cover-top, .panel-cover .cover-foot { display: none; }
.panel-meta { min-width: 0; }
.panel-book-title { margin: 0; font: 500 1.6rem/1.15 var(--bpp-serif); color: var(--bpp-ink); overflow-wrap: anywhere; text-wrap: balance; }
.panel-author { margin: 6px 0 0; font: 400 1.1rem/1.3 var(--bpp-serif); color: var(--bpp-muted); }
.panel-rating { display: flex; align-items: center; gap: 10px; margin-top: 10px; font: 600 1rem/1 var(--bpp-serif); font-variant-numeric: lining-nums; } .panel-rating .star { width: 18px; height: 18px; } .panel-rating .stars { gap: 3px; }
.panel-rating .star-on svg { fill: #31577c; } .panel-rating .star-off svg { fill: #d6cdc1; }
.panel-when { margin: 12px 0 0; font: italic 500 1.15rem/1.2 var(--bpp-serif); color: var(--bpp-blue); }
.panel-facts { margin: 8px 0 0; font: 400 1rem/1.5 var(--bpp-serif); color: var(--bpp-muted); }
.panel-rule { border: 0; border-top: 1px solid var(--bpp-line); margin: 22px 0 18px; }
.panel-heading { margin: 0; font: italic 500 1.5rem/1.1 var(--bpp-serif); color: var(--bpp-ink); }
.panel-text { margin: 14px 0 0; font: 400 1.14rem/1.5 var(--bpp-serif); color: var(--bpp-text); }
.panel-text p { margin: 0; } .panel-text p + p, .panel-text ul, .panel-text ol, .panel-text blockquote { margin-top: 1em; }
.panel-text ul, .panel-text ol { padding-left: 1.3em; } .panel-text blockquote { padding-left: 1em; border-left: 3px solid var(--bpp-chip); font-style: italic; }
.panel-empty { color: var(--bpp-muted); }
.panel-more { margin: 12px 0 0; }
.readfull { font: italic 500 1.1rem/1.3 var(--bpp-serif); color: var(--bpp-ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--bpp-chip); }
.readfull:hover { color: var(--bpp-blue); }
.panel-foot { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)) 28px; border-top: 1px solid var(--bpp-line); }
.panel-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font: 500 1.1rem/1.3 var(--bpp-serif); color: var(--bpp-blue); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.panel-link:hover { color: var(--bpp-ink); }
.panel-nav { display: flex; gap: 6px; margin-left: auto; }
/* wide screens: a drawer a quarter of the window wide, never narrower than 350px; the page reflows into the rest */
@media (min-width: 1200px) {
  :root { --panel-w: max(350px, 25vw); }
  .book-panel { top: 0; right: 0; bottom: 0; width: var(--panel-w); border-left: 1px solid var(--bpp-line); box-shadow: -8px 0 24px rgba(29, 47, 69, .12); transform: translateX(100%); transition: transform .26s ease; }
  .book-panel.is-open { transform: none; }
  html.has-panel body { width: calc(100% - var(--panel-w)); }
}
/* narrower screens: a sheet from the bottom, about half the window, with the row still in view above it */
@media (max-width: 1199px) {
  .book-panel { left: 0; right: 0; bottom: 0; height: 45vh; height: 45dvh; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 24px rgba(29, 47, 69, .16); transform: translateY(100%); transition: transform .26s ease; }
  .book-panel.is-open { transform: none; }
  .book-panel.is-dragging { transition: none; }
  .panel-grip { touch-action: none; cursor: grab; }
  .panel-handle { display: block; width: 44px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: rgba(29, 47, 69, .25); }
  .panel-head { padding: 4px 10px 8px 18px; }
  .panel-title { font-size: 1.35rem; }
  .panel-body { padding: 12px 18px 14px; }
  .panel-book { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
  .panel-cover img, .panel-cover .cover { width: 48px; height: 72px; }
  .panel-book-title { font-size: 1.15rem; } .panel-author { font-size: 1rem; margin-top: 3px; } .panel-rating { margin-top: 6px; } .panel-rating .star { width: 15px; height: 15px; } .panel-when { font-size: 1.05rem; margin-top: 8px; } .panel-facts { font-size: .95rem; }
  .panel-rule { margin: 14px 0 10px; } .panel-heading { font-size: 1.3rem; } .panel-text { font-size: 1.05rem; margin-top: 8px; }
  .panel-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) 18px; } .panel-link { font-size: 1rem; }
  html.has-panel body { padding-bottom: 45vh; padding-bottom: 45dvh; }
  @media (max-height: 480px) { .book-panel { height: 62vh; height: 62dvh; } .panel-handle { margin-top: 5px; } .panel-head { padding-bottom: 4px; } html.has-panel body { padding-bottom: 62vh; padding-bottom: 62dvh; } }
}

/* recommend a book: a small form in a dialog */
.rec-dialog { position: fixed; inset: 0; margin: auto; border: 0; border-radius: 22px; padding: 30px 32px 28px; width: min(92vw, 460px); max-height: min(92vh, 92dvh); box-sizing: border-box; overflow: auto; background: var(--bpp-cream); color: var(--bpp-ink); font-family: var(--bpp-serif); box-shadow: 0 30px 60px -20px rgba(29, 47, 69, .45); }
.rec-dialog::backdrop { background: rgba(29, 47, 69, .32); }
.rec-close { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--bpp-ink); } .rec-close svg { width: 22px; height: 22px; } .rec-close:hover { background: rgba(191, 205, 224, .4); }
.rec-kicker { margin: 0; font: 700 .72rem/1 var(--bpp-sans); letter-spacing: .24em; text-transform: uppercase; }
.rec-title { margin: 12px 0 0; font: italic 500 2.2rem/1.05 var(--bpp-serif); }
.rec-lead { margin: 12px 0 0; font: 400 1.1rem/1.45 var(--bpp-serif); color: var(--bpp-text); }
.rec-form { margin-top: 18px; display: grid; gap: 12px; }
.rec-field label { display: block; margin-bottom: 6px; font: 600 1rem/1 var(--bpp-serif); } .rec-field .req { color: var(--bpp-blue); }
.rec-field input, .rec-field textarea { width: 100%; box-sizing: border-box; padding: 10px 14px; border: 1px solid #d4cabc; border-radius: 12px; background: #fff; font: 400 1.1rem/1.3 var(--bpp-serif); color: var(--bpp-ink); resize: vertical; }
.rec-field input:focus, .rec-field textarea:focus { outline: none; border-color: var(--bpp-ink); box-shadow: 0 0 0 3px rgba(191, 205, 224, .5); }
.rec-field [aria-invalid="true"] { border-color: #b84a5a; }
.rec-field .field-err { display: block; font: italic 400 .95rem/1.3 var(--bpp-serif); color: #b84a5a; }
.rec-status { margin: 0; font: italic 400 1rem/1.3 var(--bpp-serif); color: var(--bpp-muted); } .rec-status[data-kind="error"] { color: #b84a5a; } .rec-status code { font: inherit; font-style: normal; background: #ece4d9; padding: 0 4px; border-radius: 4px; }
.rec-actions { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.rec-send { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: var(--bpp-ink); color: var(--bpp-paper); font: 700 .74rem/1 var(--bpp-sans); letter-spacing: .16em; text-transform: uppercase; transition: transform var(--ease), background var(--ease); }
.rec-send svg { width: 16px; height: 16px; } .rec-send:hover { transform: translateY(-1px); background: #1d2f45; } .rec-send:disabled { opacity: .6; }
.rec-cancel { font: italic 400 1.05rem/1 var(--bpp-serif); color: var(--bpp-muted); text-decoration: underline; text-underline-offset: 4px; }
.rec-done-title { margin: 18px 0 0; font: italic 500 2rem/1.1 var(--bpp-serif); } .rec-done-text { margin: 10px 0 0; font: 400 1.1rem/1.45 var(--bpp-serif); }

/* below 1024px: the same pieces in one orderly column. The hero stacks, the tools stack, the chip rows scroll,
   the spines shrink a little, the three notes under the books sit one above the other. */
@media (max-width: 1023px) {
  body.lib .frame-left { background: linear-gradient(to right, transparent 0 4px, var(--lib-bar) 4px 6.5px, transparent 6.5px 10px, var(--lib-bar) 10px 12.5px, transparent 12.5px 16px, var(--lib-bar) 16px 18.5px, transparent 18.5px); }
  body.lib .frame-bottom { margin-left: 0; height: 18px; border-top: 0; background: repeating-linear-gradient(to right, #b3c3d8 0 7px, #dde5ef 7px 14px); }
  .page--library { padding: 0 20px 30px 36px; }
  .lib-hero { height: auto; padding-top: 10px; }
  .lib-hero > * { position: static; }
  .lib-kicker, .lib-count { font-size: 11.5px; letter-spacing: 4px; padding-left: 4px; white-space: normal; }
  .lib-title { padding: 0; margin-top: 12px; font-size: clamp(2.5rem, 10.5vw, 4.2rem); line-height: 1.02; white-space: normal; text-wrap: balance; }
  .lib-swash { display: block; width: min(300px, 82%); height: auto; margin: -2px auto 0; }
  .lib-count { margin-top: 2px; }
  .lib-recommend { margin-top: 16px; width: auto; height: 40px; padding: 0 26px; font-size: 12.5px; }
  .lib-tools { flex-direction: column; align-items: stretch; gap: 12px; margin: 24px 0 0; }
  .lib-search { flex: none; height: 42px; }
  .lib-search svg { left: 12px; top: 5px; width: 32px; height: 32px; }
  .lib-search input { padding: 0 16px 1px 50px; font-size: 17px; }
  .lib-sort { align-self: flex-start; height: 40px; font-size: 16px; padding: 0 16px 1px 20px; }
  .lib-sort select { padding-right: 22px; } .lib-sort svg { width: 12px; height: 7px; margin-top: -3px; }
  .lib-filters { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 10px; margin: 16px 0 0; }
  .lib-filters:empty { min-height: 102px; }
  .lib-chips { contain: inline-size; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; gap: 10px; } .lib-chips::-webkit-scrollbar { display: none; }
  .lib-chips--genre { --fit: 0; flex: none; } .lib-chips--genre.is-full { justify-content: flex-start; } .lib-chips--genre.is-open { flex-wrap: nowrap; }
  .lib-chips-rule { display: none; }
  .lib-chip { height: 38px; font-size: 15.5px; padding: 0 20px 1px; } .lib-chip--all { padding-left: 26px; padding-right: 26px; } .lib-chip--ico { padding-left: 18px; padding-right: 18px; }
  .chip-ico { width: calc(var(--iw, 20) * 1.2px); height: calc(var(--ih, 18) * 1.2px); margin-top: 1px; } .chip-ico svg { stroke-width: 1.8px; } .lib-chip--more { width: 48px; padding: 0; }
  .lib-row { margin: 14px -20px 0 -14px; }
  .lib-scroller { margin: 0; min-height: 0; padding: 26px 48px 40px 52px; gap: 3px; scroll-padding: 0 48px 0 52px; }
  .lib-row::after { left: 52px; right: 48px; bottom: 22px; }
  .row-arrow { top: calc(50% - 26px); width: 44px; height: 44px; background: rgba(243, 234, 223, .88); } .row-arrow svg { width: 38px; height: 38px; } .row-arrow--prev { left: 6px; } .row-arrow--next { right: 4px; }
  .row-arrow.is-end { visibility: hidden; }   /* over the spines, an arrow shows only where there is more that way */
  .lib-foot { display: block; margin: 6px 0 0; }
  .lib-foot::before { left: 0; right: 0; }
  .foot-col { height: auto; padding: 22px 0; }
  .foot-col + .foot-col { border-top: 1px solid #ddd4c8; }
  .foot-col--reading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 16px; }
  .foot-col--reading > *, .foot-col--goal > * { position: static; }
  .foot-books { width: 132px; height: auto; }
  .foot-body { white-space: normal; }
  .foot-head { font-size: 25px; }
  .foot-book { margin-top: 26px; } .foot-book-title { font-size: 21px; max-width: none; white-space: normal; } .foot-book-author { font-size: 17px; max-width: none; white-space: normal; }
  .foot-more { font-size: 16px; }
  .foot-go { width: 44px; height: 44px; } .foot-go svg { width: 26px; height: 26px; }
  .foot-col--passage { padding: 22px 0 24px; border-top: 1px solid #ddd4c8; }
  .foot-passage { max-width: 30ch; font-size: 20px; line-height: 1.3; }
  .foot-col--goal { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "target body flowers" "bar bar pct"; align-items: center; column-gap: 14px; row-gap: 14px; }
  .foot-target { grid-area: target; width: 66px; height: auto; }
  .foot-col--goal .foot-body { grid-area: body; }
  .foot-goal-count { margin-top: 24px; font-size: 18px; }
  .foot-flowers { display: block; grid-area: flowers; width: 78px; height: auto; align-self: start; }
  .foot-progress { grid-area: bar; width: auto; height: 13px; }
  .foot-goal-pct { grid-area: pct; font-size: 20px; }
  .spine-card { display: none; }
  .lib-search input, .rec-field input { min-height: 42px; }
}
@media (max-width: 599px) {
  .foot-books { width: 96px; } .foot-col--reading { column-gap: 10px; }
  .foot-head { font-size: 23px; } .foot-underline--reading { width: 176px; height: 20px; top: 22px; } .foot-underline--goal { width: 150px; height: 22px; top: 19px; }
  .foot-book { margin-top: 22px; } .foot-book-title { font-size: 20px; } .foot-book-author { font-size: 16.5px; }
  .foot-flowers { width: 60px; }
  .rec-dialog { padding: 26px 22px 22px; }
}
@media (max-width: 400px) {
  .foot-books { width: 84px; } .foot-go { width: 40px; height: 40px; }
}

/* ── logs: My piece of the Story ──────────────────────────────── */
/* Built to the 1536 × 1024 Logs reference. Like the Library, sizes are N * var(--k): on a window of 1200px or more --k is one
   canvas unit, so at 1536px the page is the reference (the trim begins at y = 1004) and on wider screens it keeps the same
   proportions; below 1200px --k is one CSS pixel and the pieces reflow, the card under the calendar. The header and the
   frame use var(--u) from 1024px up, to the reference's own coordinates (the Library and the Home page keep theirs). */
body.logs {
  --bpp-paper: var(--by-cream); --bpp-serif: var(--by-serif); --bpp-display: var(--by-serif); --bpp-sans: var(--by-serif);
  --bpp-amp: var(--by-peri-deep); --bpp-pill: var(--by-peri); --bpp-rule: var(--by-navy);
  --logs-bar: var(--by-blue); --logs-edge: var(--by-sand); --logs-line: #e2d9cd; --logs-chip: var(--by-sand); --logs-lav: var(--by-peri); --logs-out: #a1978b;
  --logs-card: var(--by-white); --logs-heart: var(--by-blue); --logs-cols: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  --k: 1px; --frame-r: calc(48 * var(--u));
}
@media (min-width: 1200px) { body.logs { --k: var(--u); } }

/* the frame and the header, to the reference: three navy lines down the left, lavender stripes along the bottom */
@media (min-width: 1024px) {
  body.logs .frame-left { left: calc(11.5 * var(--u)); width: calc(36.5 * var(--u)); background: linear-gradient(to right, var(--logs-bar) 0 calc(4.5 * var(--u)), transparent calc(4.5 * var(--u)) calc(15.5 * var(--u)), var(--logs-bar) calc(15.5 * var(--u)) calc(20 * var(--u)), transparent calc(20 * var(--u)) calc(32 * var(--u)), var(--logs-bar) calc(32 * var(--u)) calc(36.5 * var(--u))); }
  body.logs .frame-bottom { margin-left: 0; height: calc(20 * var(--u)); border-top: 0; box-shadow: inset 0 max(1px, calc(1 * var(--u))) rgba(255, 255, 255, .5); background: repeating-linear-gradient(to right, #b3c3d8 0 calc(12 * var(--u)), #dde5ef calc(12 * var(--u)) calc(23.5 * var(--u))) calc(1.5 * var(--u)) 0 / 100% 100%; }
}

.page--logs { padding: 0; min-width: 0; color: var(--bpp-ink); }

/* the hero: the tracked line, the title over its gold stroke, the gold flash and the camera */
.logs-hero { position: relative; text-align: center; }
.logs-kicker { font: 700 calc(15 * var(--k)) / 1 var(--bpp-serif); letter-spacing: calc(8.6 * var(--k)); text-transform: uppercase; }
.logs-title { font: italic 400 calc(70 * var(--k)) / 1 var(--bpp-serif); letter-spacing: calc(1.6 * var(--k)); color: var(--bpp-ink); white-space: nowrap; text-wrap: initial; }
.logs-swoosh, .logs-rays, .logs-camera { pointer-events: none; user-select: none; }

/* the chips: a rule, four ovals, a rule */
.logs-filters { display: flex; align-items: center; gap: calc(23 * var(--k)); }
.logs-rule { flex: 1 1 0; height: max(1px, calc(2 * var(--k))); background: #d4cabc; }
.logs-chip { flex: none; box-sizing: border-box; height: calc(33.5 * var(--k)); min-width: calc(129 * var(--k)); padding: 0 calc(30 * var(--k)) calc(1 * var(--k)); border: max(1px, calc(1 * var(--k))) solid var(--logs-chip); border-radius: 999px; text-align: center; font: 500 calc(18 * var(--k)) / 1 var(--bpp-serif); letter-spacing: calc(.2 * var(--k)); color: var(--bpp-ink); white-space: nowrap; transition: background var(--ease), border-color var(--ease); }
.logs-chip:hover { background: rgba(191, 205, 224, .35); }
.logs-chip[aria-pressed="true"] { background: var(--logs-lav); border-color: var(--logs-lav); }
.logs-chip:focus-visible { outline: 2px solid var(--bpp-blue); outline-offset: 2px; }

/* the calendar: the month, the weekdays, then the days in a softly ruled box */
.cal-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: calc(18 * var(--k)); row-gap: 4px; }
.cal-intro { font: italic 400 calc(20 * var(--k)) / 1.25 var(--bpp-serif); color: #5d6b7b; }
.cal-steps { align-self: center; }
.cal-title { font: 400 calc(45.5 * var(--k)) / 1 var(--bpp-serif); letter-spacing: calc(-3 * var(--k)); word-spacing: calc(7 * var(--k)); color: var(--bpp-ink); outline: none; }
.cal-title em { font-size: 1.066em; font-style: italic; font-weight: 400; letter-spacing: calc(-.3 * var(--k)); }
.cal-steps { display: flex; gap: 4px; margin-left: auto; }
.cal-step { display: grid; place-items: center; width: calc(36 * var(--k)); height: calc(36 * var(--k)); min-width: 32px; min-height: 32px; border-radius: 50%; color: var(--bpp-ink); transition: background var(--ease); }
.cal-step svg { width: 60%; height: 60%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cal-step:hover { background: rgba(191, 205, 224, .45); }
.cal-row { display: grid; grid-template-columns: var(--logs-cols); }
.cal-wd { text-align: center; font: 500 calc(23.5 * var(--k)) / 1 var(--bpp-serif); color: var(--bpp-ink); }
.cal-body { display: grid; grid-template-rows: repeat(var(--rows, 5), minmax(0, 1fr)); box-sizing: border-box; border: max(1px, calc(1 * var(--k))) solid var(--logs-edge); border-radius: calc(18 * var(--k)); }
.cal-body[data-rows="4"] { --rows: 4; } .cal-body[data-rows="6"] { --rows: 6; }
.cal-body .cal-row + .cal-row { border-top: max(1px, calc(1 * var(--k))) solid var(--logs-line); }
.cal-day { position: relative; min-width: 0; min-height: 0; }
.cal-day + .cal-day { border-left: max(1px, calc(1 * var(--k))) solid var(--logs-line); }
.cal-num { position: absolute; right: calc(13 * var(--k)); top: calc(4.8 * var(--k)); font: 400 calc(22.5 * var(--k)) / 1 var(--bpp-serif); font-variant-numeric: lining-nums; color: var(--bpp-ink); }
.cal-day.is-out .cal-num { color: var(--logs-out); }
/* a photo keeps its own shape, as tall as its row allows, centred on its day */
.cal-photo { position: absolute; left: 50%; bottom: calc(7 * var(--k)); height: calc(100% - 38 * var(--k)); aspect-ratio: var(--ar, 4 / 3); max-width: calc(100% - 22 * var(--k)); transform: translateX(-50%); border-radius: calc(6 * var(--k)); overflow: hidden; box-shadow: 0 1px 2px rgba(29, 47, 69, .08); transition: transform var(--ease), box-shadow var(--ease); }
.cal-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cal-photo:hover { transform: translateX(-50%) translateY(-2px) scale(1.04); box-shadow: 0 6px 14px rgba(29, 47, 69, .18); }
.cal-photo:focus-visible { outline: 2px solid var(--bpp-blue); outline-offset: 2px; border-radius: calc(6 * var(--k)); }
.logs-empty { font: italic 400 1.2rem/1.4 var(--bpp-serif); color: var(--logs-out); }

/* the card: the day's photo, its date, its words, a heart and a small menu */
.journal { position: relative; box-sizing: border-box; background: var(--logs-card); border: max(1px, calc(1 * var(--k))) solid #e2d9cd; border-radius: calc(22 * var(--k)); box-shadow: calc(-5 * var(--k)) calc(10 * var(--k)) calc(22 * var(--k)) calc(-2 * var(--k)) rgba(84, 56, 58, .3), 0 calc(1 * var(--k)) calc(3 * var(--k)) rgba(84, 56, 58, .1), 0 0 calc(20 * var(--k)) rgba(84, 56, 58, .05); color: var(--bpp-ink); outline: none; }
.journal:focus-visible { outline: 2px solid var(--bpp-blue); outline-offset: 3px; }
.journal > *:not(.journal-photo):not(.journal-close) { transition: opacity .16s ease; }
.journal.is-swapping > * { opacity: 0; }
.journal-photo { overflow: hidden; border-radius: calc(14 * var(--k)); background: #ebe3d8; }
.journal-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.journal-close { position: absolute; display: grid; place-items: center; width: calc(35 * var(--k)); height: calc(35 * var(--k)); min-width: 32px; min-height: 32px; border-radius: 50%; background: rgba(251, 248, 243, .92); color: #1d2f45; transition: background var(--ease), transform var(--ease); }
.journal-close svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.journal-close:hover { background: #fff; transform: scale(1.06); }
.journal-close:focus-visible { outline: 2px solid var(--bpp-blue); outline-offset: 2px; }
.journal-date { font: 700 calc(13.5 * var(--k)) / 1 var(--bpp-sans); letter-spacing: calc(4.8 * var(--k)); text-transform: uppercase; }
.journal-title { font: italic 400 calc(27.3 * var(--k)) / 1.1 var(--bpp-serif); letter-spacing: calc(-.15 * var(--k)); color: var(--bpp-ink); text-wrap: pretty; }
.journal-text { font: 400 calc(20.4 * var(--k)) / calc(23.4 * var(--k)) var(--bpp-serif); letter-spacing: calc(.1 * var(--k)); color: #1d2f45; text-wrap: pretty; }
.journal-text--empty { font-style: italic; color: #6b7a8a; }
.journal-foot { display: flex; justify-content: space-between; align-items: center; border-top: max(1px, calc(1 * var(--k))) solid #ddd3c6; }
.journal-like, .journal-dots { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--bpp-ink); transition: background var(--ease), color var(--ease); }
.journal-like:hover, .journal-dots:hover, .journal-dots[aria-expanded="true"] { background: rgba(191, 205, 224, .35); }
.journal-like svg { width: calc(29 * var(--k)); height: calc(29 * var(--k)); fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: fill var(--ease), stroke var(--ease), transform var(--ease); }
.journal-like.is-on svg { fill: var(--logs-heart); stroke: var(--logs-heart); }
@media (prefers-reduced-motion: no-preference) { .journal-like.is-on svg { animation: logs-pop .32s ease-out; } }
@keyframes logs-pop { 40% { transform: scale(1.22); } }
.journal-dots svg { width: calc(29 * var(--k)); height: calc(14.5 * var(--k)); fill: currentColor; }
.journal-dots.is-copied { color: var(--bpp-blue); }
.journal-like:focus-visible, .journal-dots:focus-visible { outline: 2px solid var(--bpp-blue); outline-offset: 0; }
.journal-more { position: relative; }
.journal-menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 6; list-style: none; margin: 0; padding: 6px; min-width: 15.5rem; background: #fffdf9; border: 1px solid #e2d9cd; border-radius: 14px; box-shadow: 0 14px 30px rgba(29, 47, 69, .16); }
.journal-menu [role="menuitem"] { display: block; width: 100%; box-sizing: border-box; padding: 10px 14px; border-radius: 10px; font: 400 1.05rem/1.25 var(--bpp-serif); color: var(--bpp-ink); text-align: left; white-space: nowrap; }
.journal-menu [role="menuitem"]:hover, .journal-menu [role="menuitem"]:focus-visible { background: rgba(191, 205, 224, .4); outline: none; }

/* the full canvas: a window of 1200px or more. Everything lands on the reference's coordinates (y less the 76 of the header). */
@media (min-width: 1200px) {
  body.logs .page--logs { position: relative; width: calc(1536 * var(--k)); height: calc(928 * var(--k)); margin: calc(18 * var(--k)) auto 0; flex: none; }   /* a breath under the shared header */
  body.logs .page--logs > *, .logs-hero > *, .logs-cal > *, .journal > * { position: absolute; margin: 0; }
  .logs-hero { left: 0; top: 0; width: 100%; height: calc(165 * var(--k)); }
  .logs-kicker { left: 0; right: 0; top: calc(3 * var(--k)); padding-left: calc(8.6 * var(--k)); }
  .logs-title { left: 0; right: 0; top: calc(34 * var(--k)); padding-right: calc(5 * var(--k)); }
  .logs-swoosh { left: calc(616 * var(--k)); top: calc(105 * var(--k)); width: calc(301 * var(--k)); height: calc(31 * var(--k)); }
  .logs-rays { left: calc(1020 * var(--k)); top: calc(7 * var(--k)); width: calc(71 * var(--k)); height: calc(49 * var(--k)); }
  .logs-camera { left: calc(1209 * var(--k)); top: calc(46 * var(--k)); width: calc(133 * var(--k)); height: calc(85 * var(--k)); }
  .logs-filters { left: calc(152 * var(--k)); top: calc(163.5 * var(--k)); width: calc(1225 * var(--k)); }
  .logs-filters .logs-rule { align-self: flex-start; margin-top: calc(17.5 * var(--k)); }
  .logs-filters .logs-rule:first-child { flex: none; width: calc(242 * var(--k)); }
  .logs-filters .logs-rule:last-child { margin-left: calc(5 * var(--k)); }
  .logs-chip { padding: 0 0 calc(1 * var(--k)); }   /* the reference's ovals, each its own width */
  .logs-chip:nth-of-type(1) { width: calc(153 * var(--k)); padding-left: calc(9 * var(--k)); } .logs-chip:nth-of-type(2) { width: calc(177 * var(--k)); }
  .logs-chip:nth-of-type(3) { width: calc(129 * var(--k)); } .logs-chip:nth-of-type(4) { width: calc(147 * var(--k)); }
  .logs-cal { left: calc(88 * var(--k)); top: calc(224 * var(--k)); width: calc(974 * var(--k)); height: calc(673 * var(--k)); }
  .cal-head { left: calc(10 * var(--k)); top: calc(6 * var(--k)); z-index: 1; }
  .cal { position: absolute; inset: 0; }
  .cal-wds { position: absolute; left: calc(14 * var(--k)); top: calc(80 * var(--k)); width: calc(958 * var(--k)); }
  .cal-body { position: absolute; left: 0; top: calc(121 * var(--k)); width: calc(974 * var(--k)); height: calc(550 * var(--k)); }
  .cal-body .cal-row { --logs-cols: 143fr 138fr 137.5fr 136.5fr 137.5fr 142fr 138.5fr; }   /* the reference's own columns, a little uneven */
  .cal-body[data-rows="5"] { grid-template-rows: 115fr 115fr 113fr 106.5fr 100fr; }        /* and its rows */
  .journal { left: calc(1093 * var(--k)); top: calc(264 * var(--k)); width: calc(418 * var(--k)); height: calc(579 * var(--k)); }
  .journal-photo { left: calc(25 * var(--k)); top: calc(22 * var(--k)); width: calc(369 * var(--k)); height: calc(345 * var(--k)); }
  .journal-close { left: calc(350 * var(--k)); top: calc(30 * var(--k)); }
  /* under the photo the words flow, so a long title takes a second line and pushes the text down instead of over it */
  .journal { display: flex; flex-direction: column; height: auto; min-height: calc(579 * var(--k)); padding: calc(386.3 * var(--k)) calc(24 * var(--k)) 0 calc(33 * var(--k)); }
  .journal > .journal-date, .journal > .journal-title, .journal > .journal-text, .journal > .journal-foot { position: static; }
  .journal-date { margin-left: calc(.5 * var(--k)); }
  .journal-title { margin-top: calc(12 * var(--k)); }
  .journal-text { margin: calc(10 * var(--k)) 0 calc(16 * var(--k)) calc(-1 * var(--k)); max-width: calc(340 * var(--k)); }
  .journal-foot { margin-top: auto; width: calc(359 * var(--k)); height: calc(60 * var(--k)); flex: none; }
  .journal-like { margin-left: calc(-8 * var(--k)); margin-top: calc(-11 * var(--k)); }
  .journal-dots { margin-right: calc(-6.5 * var(--k)); margin-top: calc(-6 * var(--k)); }
}

/* below 1200px: one column. The hero and chips centre, the calendar keeps its seven days with smaller photos, the card sits under it */
@media (max-width: 1199px) {
  .page--logs { padding: 20px 28px 36px 44px; display: flex; flex-direction: column; }
  .logs-hero { display: flex; flex-direction: column; align-items: center; position: relative; max-width: 760px; margin: 0 auto; width: 100%; }
  .logs-kicker { font-size: 13px; letter-spacing: 6px; padding-left: 6px; }
  .logs-title { margin-top: 10px; font-size: clamp(2.6rem, 8.6vw, 4.2rem); white-space: normal; text-wrap: balance; line-height: 1.02; position: relative; z-index: 1; }
  .logs-swoosh { width: min(260px, 62%); height: auto; margin-top: 2px; }
  .logs-rays { position: absolute; right: 2%; top: 4px; width: clamp(34px, 6vw, 56px); height: auto; }
  .logs-camera { display: none; }
  .logs-filters { margin: 22px auto 0; width: 100%; max-width: 980px; gap: 12px; }
  .logs-chip { height: 38px; min-width: 0; padding: 0 20px 1px; font-size: 17px; }
  .cal-head { margin-top: 26px; }
  .cal-title { font-size: clamp(2rem, 5vw, 2.8rem); }
  .cal-wds { margin-top: 14px; }
  .cal-wd { font-size: clamp(14px, 2.4vw, 20px); padding-bottom: 10px; }
  .cal-body { border-radius: 14px; }
  .cal-body .cal-row { height: clamp(64px, 11.5vw, 112px); }
  .cal-num { right: 8px; top: 6px; font-size: clamp(13px, 2.2vw, 19px); }
  .cal-photo { bottom: 6px; height: calc(100% - clamp(26px, 4.6vw, 36px)); max-width: calc(100% - 12px); border-radius: 5px; }
  .journal { margin: 28px auto 0; width: min(100%, 460px); padding: 18px 18px 6px; border-radius: 20px; }
  .journal-photo { aspect-ratio: 369 / 345; border-radius: 12px; }
  .journal-close { right: 28px; top: 28px; width: 38px; height: 38px; }
  .journal-date { margin: 18px 6px 0; font-size: 12.5px; letter-spacing: 4.4px; }
  .journal-title { margin: 12px 6px 0; font-size: 26px; }
  .journal-text { margin: 10px 6px 0; font-size: 19px; line-height: 1.22; }
  .journal-foot { margin: 18px 6px 0; padding: 6px 0; }
  .journal-like { margin-left: -10px; } .journal-dots { margin-right: -8px; }
  .journal-like svg { width: 30px; height: 30px; } .journal-dots svg { width: 27px; height: 14px; }
}
@media (max-width: 1023px) {
  body.logs .frame-left { background: linear-gradient(to right, transparent 0 4px, var(--logs-bar) 4px 6.5px, transparent 6.5px 10px, var(--logs-bar) 10px 12.5px, transparent 12.5px 16px, var(--logs-bar) 16px 18.5px, transparent 18.5px); }
  body.logs .frame-bottom { margin-left: 0; height: 16px; border-top: 0; background: repeating-linear-gradient(to right, #b3c3d8 0 7px, #dde5ef 7px 14px); }
  .page--logs { padding: 18px 20px 30px 36px; }
}
@media (max-width: 639px) {
  .logs-rule { display: none; }
  .logs-filters { flex-wrap: wrap; justify-content: center; margin-top: 18px; gap: 8px; }   /* two short lines of chips, all in view */
  .logs-chip { height: 38px; padding: 0 16px 1px; font-size: 16px; }
  .cal-head { margin-top: 20px; }
  .cal-wd { padding-bottom: 8px; }
  .cal-body { border-radius: 11px; }
  .cal-num { right: 5px; top: 4px; }
  .cal-photo { bottom: 4px; max-width: calc(100% - 6px); border-radius: 4px; }
  .journal { padding: 14px 14px 4px; border-radius: 18px; }
  .journal-close { right: 22px; top: 22px; }
  .journal-title { font-size: 24px; } .journal-text { font-size: 18px; }
}
@media (max-width: 400px) {
  .page--logs { padding-right: 14px; padding-left: 30px; }
}


/* ── notes: On the Notes ──────────────────────────────────────── */
/* Built to the 1024 × 1536 Notes reference: a newspaper page on warm paper. From 1024px up every size is N * var(--n), one
   unit of the reference (the window ÷ 1024, no more than 1.25, so a wide screen gets a slightly larger paper, centred); below
   1024px --n is one CSS pixel and the rows reflow: two columns on a tablet, one on a phone. No frame stripes on this page,
   as drawn. */
body.notes {
  --bpp-paper: var(--by-cream); --bpp-ink: var(--by-navy); --bpp-serif: var(--by-serif);
  --bpp-amp: var(--by-peri-deep); --bpp-pill: var(--by-peri); --bpp-rule: var(--by-mute);
  --np-ink: var(--by-navy); --np-text: #24364c; --np-rule: rgba(29, 47, 69, .78); --np-rule-soft: rgba(29, 47, 69, .45); --np-mark: var(--by-blue);
  --np-body: var(--by-serif); --np-mast: var(--by-serif); --np-sans: var(--by-serif);
  --n: 1px;
  background: var(--by-cream) url(../img/notes/paper.webp) 0 0 / 512px 512px repeat;
}
@media (min-width: 1024px) { body.notes { --n: calc(min(100cqw, 1280px) / 1024); } }


.page--notes { padding: 0; min-width: 0; color: var(--np-ink); }

/* the masthead: the issue line, a double rule, ON THE NOTES, its line, a double rule */
.np-mast { position: relative; text-align: center; }
.np-issue { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; font: 600 calc(15.7 * var(--n)) / 1 var(--np-sans); letter-spacing: calc(2 * var(--n)); text-transform: uppercase; color: var(--np-ink); }
.np-issue > :first-child { justify-self: start; } .np-issue > :last-child { justify-self: end; }
.np-issue-name { letter-spacing: calc(4.4 * var(--n)); }
.np-title { margin: 0; font: italic 700 calc(107.9 * var(--n)) / 1 var(--np-mast); letter-spacing: calc(-2.94 * var(--n)); text-transform: uppercase; color: var(--np-ink); white-space: nowrap; text-wrap: initial; }
.np-title a { color: inherit; }
.np-tagline { font: italic 400 calc(15.7 * var(--n)) / 1 var(--np-body); letter-spacing: calc(2.53 * var(--n)); text-transform: uppercase; color: var(--np-ink); }
.np-mast::before, .np-mast::after { content: ""; position: absolute; border-top: max(1px, calc(1 * var(--n))) solid var(--np-rule); border-bottom: max(1px, calc(1 * var(--n))) solid var(--np-rule); pointer-events: none; }

/* a note: its headline, the date and kind, a line or two, Read more */
.np-note { position: relative; }
.np-note + .np-note { border-top: max(1px, calc(1 * var(--n))) solid var(--np-rule); }
.np-head { margin: 0; font: italic 600 calc(37.3 * var(--n)) / calc(39 * var(--n)) var(--bpp-serif); letter-spacing: calc(-.3 * var(--n)); color: var(--np-ink); text-wrap: initial; }
.np-head a { color: inherit; }
.np-head a:hover { text-decoration: underline; text-decoration-thickness: max(1px, calc(1.2 * var(--n))); text-underline-offset: calc(5 * var(--n)); }
.np-meta { margin: 0; font: 600 calc(13.6 * var(--n)) / 1 var(--np-sans); letter-spacing: calc(3.5 * var(--n)); text-transform: uppercase; color: var(--np-ink); white-space: nowrap; }
.np-sep { display: inline-block; margin: 0 calc(14 * var(--n)) 0 calc(14 * var(--n)); font-weight: 400; }
.np-summary { margin: 0; font: 400 calc(16.9 * var(--n)) / calc(23.25 * var(--n)) var(--np-body); letter-spacing: calc(.75 * var(--n)); color: var(--np-text); }
.np-more { display: inline-flex; align-items: center; gap: calc(9 * var(--n)); font: 700 calc(14.3 * var(--n)) / 1 var(--np-sans); letter-spacing: calc(5.4 * var(--n)); text-transform: uppercase; color: var(--np-ink); white-space: nowrap; }
.np-arrow { display: inline-block; width: calc(20 * var(--n)); height: calc(20 * var(--n)); transition: transform var(--ease); }
.np-arrow svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.np-more:hover .np-arrow { transform: translateX(3px); }
.np-more:hover { text-decoration: underline; text-underline-offset: calc(5 * var(--n)); }
.np-photo { display: block; overflow: hidden; }
.np-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.np-photo:hover img { transform: scale(1.02); }
.np-underline { display: block; pointer-events: none; }
.np-doodle { display: block; pointer-events: none; }
.page--notes a:focus-visible { outline: 2px solid var(--np-ink); outline-offset: 3px; border-radius: 2px; }
.np-empty { padding: 40px 0; text-align: center; font: italic 400 1.2rem/1.4 var(--np-body); }
/* the quote on torn paper: the paper and its flowers are a picture, the words are live text sized to the paper */
.np-quote { position: relative; margin: 0; container-type: inline-size; aspect-ratio: 367 / 258; }
.np-quote-paper { position: absolute; inset: 0; width: 100%; height: 100%; }
.np-quote-text { position: absolute; left: 10%; width: 66%; top: 27.6%; margin: 0; text-align: center; font: italic 500 6.5cqw / 7.7cqw var(--bpp-serif); letter-spacing: 0; color: var(--bpp-ink); white-space: pre-line; text-wrap: balance; }
.np-quote-text p { margin: 0; }
/* the end of the page: a double rule either side of a flourish */
.np-end { position: relative; }
.np-end-rule { position: absolute; border-top: max(1px, calc(1 * var(--n))) solid var(--np-rule); border-bottom: max(1px, calc(1 * var(--n))) solid var(--np-rule); }
.np-flourish { position: absolute; }

/* one note on its own page */
.np-article { max-width: 720px; margin: 0 auto; padding: 34px 0 30px; }
.np-article-title { margin: 14px 0 0; font: italic 600 clamp(2.3rem, 6vw, 3.4rem) / 1.08 var(--bpp-serif); letter-spacing: -.01em; color: var(--np-ink); text-wrap: balance; }
.np-article-dek { margin: 16px 0 0; font: italic 400 1.2rem / 1.55 var(--np-body); color: var(--np-text); }
.np-article-photo { margin: 26px 0 0; }
.np-article-photo img { display: block; width: 100%; height: auto; }
.np-article .np-quote { width: min(100%, 367px); margin: 30px auto 0; }
.np-article-body { margin-top: 28px; font: 400 1.06rem / 1.8 var(--np-body); letter-spacing: .01em; color: var(--np-text); }
.np-article-body p, .np-article-body ul, .np-article-body ol, .np-article-body blockquote { margin: 0 0 1.1em; }
.np-article-body ul, .np-article-body ol { padding-left: 1.4em; }
.np-article-body blockquote { padding-left: 1em; border-left: 2px solid var(--np-rule); font-style: italic; }
.np-article-body a { text-decoration: underline; text-underline-offset: 3px; }
.np-article-tbc { margin-top: 28px; font: italic 400 1.06rem / 1.6 var(--np-body); color: #5d6b7b; }
.np-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: baseline; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--np-rule); font: 700 .78rem / 1.4 var(--np-sans); letter-spacing: .18em; text-transform: uppercase; }
.np-pager a { color: var(--np-ink); } .np-pager a:hover { text-decoration: underline; text-underline-offset: 4px; }
.np-pager a:last-child { text-align: right; } .np-pager-all { text-align: center; }

/* the full canvas: everything on the reference's coordinates (y less the 96 of the header for the masthead) */
@media (min-width: 1024px) {
  body.notes .page--notes { width: calc(1024 * var(--n)); margin: 0 auto; flex: none; }
  .np-mast { height: calc(207 * var(--n)); }
  .np-mast > * { position: absolute; margin: 0; }
  .np-mast::before { left: calc(37 * var(--n)); right: calc(37 * var(--n)); top: calc(40 * var(--n)); height: calc(8 * var(--n)); }
  .np-mast::after { left: calc(31 * var(--n)); right: calc(31 * var(--n)); top: calc(200 * var(--n)); height: calc(7 * var(--n)); }
  .np-issue { left: calc(51 * var(--n)); right: calc(46 * var(--n)); top: calc(11.8 * var(--n)); }
  .np-issue-name { position: relative; left: calc(3 * var(--n)); }
  .np-title { left: 0; right: 0; top: calc(60 * var(--n)); padding-left: calc(14 * var(--n)); }
  .np-tagline { left: 0; right: 0; top: calc(165 * var(--n)); padding-left: calc(27 * var(--n)); }
  .np-list { padding: 0 calc(33 * var(--n)) 0 calc(32 * var(--n)); }
  .np-note { display: grid; align-items: start; }
  /* the lead: the words, a divider, the photograph */
  .np-lead { grid-template-columns: calc(354 * var(--n)) calc(589 * var(--n)); column-gap: calc(16 * var(--n)); padding: calc(25 * var(--n)) 0 calc(27 * var(--n)); align-items: stretch; }
  .np-lead .np-text { position: relative; padding-left: calc(12 * var(--n)); }
  .np-lead .np-text::after { content: ""; position: absolute; right: 0; top: 0; bottom: calc(-9 * var(--n)); width: max(1px, calc(1 * var(--n))); background: var(--np-rule); }
  .np-lead .np-photo { width: calc(589 * var(--n)); height: calc(379 * var(--n)); }
  .np-lead .np-head { font-size: calc(43.5 * var(--n)); line-height: calc(49 * var(--n)); margin-top: calc(-8 * var(--n)); }
  .np-lead .np-underline { width: calc(238 * var(--n)); height: calc(26 * var(--n)); margin: calc(1 * var(--n)) 0 calc(-2 * var(--n)); }
  .np-lead .np-meta { margin-top: calc(10.5 * var(--n)); }
  .np-lead .np-sep { margin: 0 calc(18 * var(--n)) 0 calc(20 * var(--n)); }
  .np-lead .np-summary { margin: calc(18 * var(--n)) 0 0 calc(6 * var(--n)); width: calc(295.3 * var(--n)); letter-spacing: calc(1 * var(--n)); }   /* the lead's lines are set a touch wider in the reference */
  .np-lead .np-more { margin-top: calc(20 * var(--n)); margin-left: calc(8 * var(--n)); letter-spacing: calc(5.1 * var(--n)); }
  /* a note after its photograph, its drawing (if any) beside it */
  .np-plain { grid-template-columns: calc(390 * var(--n)) calc(24 * var(--n)) 1fr; padding: calc(18 * var(--n)) 0; }
  .np-plain .np-photo { grid-column: 1; width: calc(390 * var(--n)); height: calc(202 * var(--n)); }
  .np-plain .np-text { grid-column: 3; }
  .np-plain .np-summary { margin-top: calc(10 * var(--n)); width: calc(360 * var(--n)); line-height: calc(22 * var(--n)); }
  .np-plain .np-meta { margin-top: calc(17.5 * var(--n)); }
  .np-plain .np-more { margin-top: calc(17 * var(--n)); }
  .np-plain--coins .np-doodle { position: absolute; left: calc(814 * var(--n)); top: calc(103 * var(--n)); width: calc(153 * var(--n)); height: calc(123 * var(--n)); }
  .np-plain--mountains { grid-template-columns: calc(349 * var(--n)) calc(35 * var(--n)) calc(405 * var(--n)) calc(12 * var(--n)) calc(168 * var(--n)); margin-right: calc(-11 * var(--n)); }
  .np-plain--mountains .np-photo { width: calc(349 * var(--n)); height: calc(188 * var(--n)); }
  .np-plain--mountains .np-text { position: relative; align-self: stretch; }
  .np-plain--mountains .np-text::after { content: ""; position: absolute; right: calc(-2.5 * var(--n)); top: calc(21 * var(--n)); bottom: calc(15 * var(--n)); width: max(1px, calc(1 * var(--n))); background: var(--np-rule-soft); }
  .np-plain--mountains .np-text { padding-top: calc(5 * var(--n)); }
  .np-plain--mountains .np-head { font-size: calc(38.5 * var(--n)); line-height: calc(44 * var(--n)); }
  .np-plain--mountains .np-meta { margin-top: calc(16.5 * var(--n)); }
  .np-plain--mountains .np-summary { margin-top: calc(12 * var(--n)); width: calc(312 * var(--n)); line-height: calc(23 * var(--n)); }
  .np-plain--mountains .np-more { margin-top: calc(16 * var(--n)); }
  .np-plain--mountains .np-meta, .np-plain--mountains .np-summary, .np-plain--mountains .np-more { margin-left: calc(4 * var(--n)); }
  .np-plain--mountains .np-doodle { grid-column: 5; width: calc(168 * var(--n)); height: calc(132 * var(--n)); margin: calc(33 * var(--n)) 0 0 calc(1 * var(--n)); }
  /* a note between its words and its quote */
  .np-quoted { grid-template-columns: calc(312 * var(--n)) calc(276 * var(--n)) calc(21 * var(--n)) 1fr; padding: calc(23 * var(--n)) 0 calc(17 * var(--n)); margin-right: calc(-21 * var(--n)); }
  .np-quoted .np-text { padding-left: calc(9 * var(--n)); }
  .np-quoted .np-photo { width: calc(276 * var(--n)); height: calc(242 * var(--n)); }
  .np-quoted .np-head { font-size: calc(45.3 * var(--n)); line-height: calc(44 * var(--n)); margin-top: calc(-6 * var(--n)); }
  .np-quoted .np-meta { margin-top: calc(22.5 * var(--n)); }
  .np-quoted .np-summary { margin-top: calc(15 * var(--n)); width: calc(285 * var(--n)); line-height: calc(24.5 * var(--n)); }
  .np-quoted .np-more { margin-top: calc(10 * var(--n)); }
  .np-quoted .np-quote { grid-column: 4; width: calc(367 * var(--n)); margin: calc(-5 * var(--n)) 0 calc(-11 * var(--n)) calc(4 * var(--n)); }
  .np-quoted::after { content: ""; position: absolute; left: calc(609 * var(--n)); top: calc(13 * var(--n)); height: calc(251 * var(--n)); width: max(1px, calc(1 * var(--n))); background: var(--np-rule); }   /* on the row: inside the quote, cqw means the quote's own width */
  /* a note with no photograph: the words take the row */
  .np-note--words.np-plain .np-text, .np-note--words.np-quoted .np-text { grid-column: 1 / 4; }
  .np-note--words.np-lead { grid-template-columns: 1fr; }
  .np-note--words.np-lead .np-text::after { content: none; }
  /* the end */
  .np-end { width: calc(1024 * var(--n)); height: calc(55 * var(--n)); }
  .np-end-rule { top: calc(11 * var(--n)); height: calc(6 * var(--n)); }
  .np-end-rule:first-child { left: calc(33 * var(--n)); width: calc(414 * var(--n)); }
  .np-end-rule:last-child { left: calc(579 * var(--n)); width: calc(411 * var(--n)); }
  .np-flourish { left: calc(461 * var(--n)); top: calc(-7 * var(--n)); width: calc(97 * var(--n)); height: calc(44 * var(--n)); }
  .np-article { max-width: calc(720 * var(--n)); }
}

/* below 1024px: the same pieces in order. Tablets keep a photograph beside its words; phones take one column. */
@media (max-width: 1023px) {
  .page--notes { padding: 0 24px 24px; }
  .np-mast { display: flex; flex-direction: column; padding: 12px 0 18px; }   /* the issue line, then the double rule, as drawn */
  .np-issue { order: 0; } .np-title { order: 2; } .np-tagline { order: 3; }
  .np-mast::before { order: 1; position: static; display: block; height: 6px; margin: 10px 0 0; }
  .np-mast::after { order: 4; position: static; display: block; height: 6px; margin: 16px 0 0; }
  .np-issue { font-size: 11px; letter-spacing: 1.6px; column-gap: 10px; }
  .np-issue-name { letter-spacing: 3px; }
  .np-title { margin-top: 10px; font-size: clamp(3rem, 11.6vw, 6.6rem); letter-spacing: -.025em; white-space: normal; line-height: .98; }
  .np-tagline { margin: 12px auto 0; max-width: 34em; font-size: 12px; line-height: 1.7; letter-spacing: 2.4px; }
  .np-note { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: 0 22px; align-items: start; padding: 22px 0; }
  .np-note--words { grid-template-columns: 1fr; }
  .np-head { font-size: clamp(1.75rem, 4.2vw, 2.4rem); line-height: 1.08; }
  .np-meta { margin-top: 12px; font-size: 11.5px; letter-spacing: 2.6px; white-space: normal; }
  .np-sep { margin: 0 6px; }
  .np-summary { margin-top: 12px; font-size: 16px; line-height: 1.5; letter-spacing: .3px; }
  .np-more { margin-top: 16px; font-size: 12px; letter-spacing: 4px; min-height: 44px; }
  .np-arrow { width: 18px; height: 18px; }
  .np-photo { aspect-ratio: 16 / 10; }
  .np-lead { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); padding-top: 24px; }
  .np-lead .np-text { padding-right: 22px; border-right: 1px solid var(--np-rule); align-self: stretch; }
  .np-lead .np-head { font-size: clamp(2rem, 5vw, 2.9rem); }
  .np-lead .np-underline { width: min(238px, 80%); height: auto; margin-top: 2px; }
  .np-lead .np-photo { aspect-ratio: 589 / 379; }
  .np-plain .np-photo { grid-row: 1 / span 2; }
  .np-doodle { width: auto; height: 64px; margin-top: -58px; justify-self: end; grid-column: 2; }   /* beside Read more, not below it */
  .np-quoted .np-photo { aspect-ratio: 276 / 242; }
  .np-quoted .np-photo { grid-column: 2; grid-row: 1 / span 2; }
  .np-quoted .np-quote { grid-column: 1; grid-row: 2; width: min(100%, 380px); margin: 18px 0 0; }   /* under the words, beside the tall photograph */
  .np-end { height: 50px; margin-top: 4px; }
  .np-end-rule { top: 22px; height: 5px; width: calc(50% - 64px); }
  .np-end-rule:first-child { left: 0; } .np-end-rule:last-child { right: 0; }
  .np-flourish { left: calc(50% - 44px); top: 6px; width: 88px; height: auto; }
}
@media (max-width: 639px) {
  .page--notes { padding: 0 16px 20px; }
  .np-issue { grid-template-columns: 1fr 1fr; row-gap: 6px; font-size: 10px; letter-spacing: 1.3px; }
  .np-issue-name { grid-column: 1 / -1; grid-row: 2; justify-self: center; letter-spacing: 2.6px; }
  .np-title { font-size: clamp(2.6rem, 14vw, 4rem); }
  .np-tagline { font-size: 11px; letter-spacing: 2px; }
  .np-note, .np-lead { grid-template-columns: 1fr; padding: 20px 0; }
  .np-lead .np-text { padding-right: 0; border-right: 0; }
  .np-note .np-photo { grid-row: auto; margin: 0 0 16px; }
  .np-lead .np-photo { order: -1; }
  .np-quoted .np-photo { order: -1; grid-column: 1; grid-row: auto; aspect-ratio: 16 / 11; }
  .np-quoted .np-quote { grid-column: 1; grid-row: auto; width: min(100%, 420px); margin: 18px auto 0; }
  .np-doodle { grid-column: 1; height: 60px; margin-top: -54px; }
  .np-br { display: none; }   /* phones let a headline wrap where it falls */
  .np-head, .np-lead .np-head { font-size: clamp(1.7rem, 7.6vw, 2.2rem); }
  .np-article { padding-top: 24px; }
  .np-pager { grid-template-columns: 1fr; text-align: center; } .np-pager a:last-child { text-align: center; }
}

/* ── about: Allow me to re-introduce myself ─────────────────────── */
/* Built to the 1122 × 1402 About reference: a scrapbook on blue stripes. Each piece is a small canvas of its own (the
   intro, the note, the polaroid, the portrait, each annotation, the band, the flowers) whose sizes are N * var(--u), in
   reference pixels. From 700px up every piece sits at its reference coordinates and --u is the page's unit, --a (the window
   ÷ 1122, no more than 1600px wide), so at 1122 × 1402 the page is the screenshot; below 700px the same pieces stack and
   each sets its own --u from the width it is given. Nothing is a flattened picture: the words are live text. */
body.about {
  --a: calc(min(100cqw, 1600px) / 1122); --u: var(--a);
  --ab-navy: var(--by-navy); --ab-ink: #fffdf9; --ab-bar: var(--by-cream); --ab-pill: var(--by-peri); --ab-rule: var(--by-mute);
  --ab-hand: var(--by-script); --ab-serif: var(--by-serif); --ab-script: var(--by-script); --bpp-serif: var(--by-serif);
  --hdr-bg: var(--by-cream); --ft-bg: var(--by-cream);
  background: var(--by-blue) url(../img/about/stripes.webp) center top / calc(1122 * var(--a)) auto repeat;
  color: var(--ab-ink);
}
body.about :focus-visible { outline: 3px solid var(--ab-pill); outline-offset: 3px; }


.page--about { position: relative; padding: 0; min-width: 0; color: var(--ab-ink); }
.page--about img { max-width: none; }
.ab-intro, .ab-note, .ab-polaroid, .ab-portrait, .ab-fact, .ab-book, .ab-rays-head, .ab-band, .ab-sun, .ab-colours { position: absolute; margin: 0; }
.ab-intro > *, .ab-note > *, .ab-polaroid > *, .ab-fact > *, .ab-fact-text > * { position: absolute; margin: 0; }

/* the intro: an arc of words, Hi, I'm Upasana!, a dash, rays and a gold swoosh. Box: x 290–845, y 84–340 */
.ab-intro { width: calc(555 * var(--u)); height: calc(256 * var(--u)); }
.ab-arc { left: 0; top: 0; width: 100%; height: 100%; }
.ab-arc svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ab-arc path { fill: none; }
.ab-arc text { font: italic 400 33px var(--ab-serif); fill: var(--ab-ink); }
.ab-title { left: 0; top: 0; width: 100%; height: 100%; font-weight: 400; color: var(--ab-ink); }
.ab-title > span { position: absolute; white-space: nowrap; line-height: 1; }
.ab-hi { left: calc(225 * var(--u)); top: calc(88 * var(--u)); font: 700 calc(55.3 * var(--u)) / 1 var(--ab-serif); letter-spacing: calc(-2.5 * var(--u)); }
.ab-im { left: calc(75 * var(--u)); top: calc(188 * var(--u)); font: 400 calc(66.3 * var(--u)) / 1 var(--ab-serif); letter-spacing: calc(-4.5 * var(--u)); }
.ab-name { left: calc(196 * var(--u)); top: calc(144 * var(--u)); font: 400 calc(90 * var(--u)) / 1 var(--ab-script); transform: rotate(-12deg); transform-origin: 0 100%; }
.ab-dash { left: calc(244 * var(--u)); top: calc(56 * var(--u)); width: calc(54 * var(--u)); height: calc(9 * var(--u)); }
.ab-rays-hi { left: calc(82 * var(--u)); top: calc(107 * var(--u)); width: calc(59 * var(--u)); height: calc(61 * var(--u)); }
.ab-swoosh { left: calc(270 * var(--u)); top: calc(205 * var(--u)); width: calc(186 * var(--u)); height: calc(41 * var(--u)); }

/* the note: a button. Its paper and tape are a picture; its words are live */
.ab-note { width: calc(238 * var(--u)); height: calc(209 * var(--u)); padding: 0; z-index: 3; color: var(--ab-navy); transition: transform var(--ease); }
.ab-note:hover { transform: rotate(-1.2deg) translateY(-2px); }
.ab-note-paper { left: 0; top: 0; width: 100%; height: 100%; }
.ab-note-text { left: calc(33 * var(--u)); top: calc(66 * var(--u)); font: 400 calc(31.5 * var(--u)) / calc(43 * var(--u)) var(--ab-hand); text-align: left; transform: rotate(-10deg); transform-origin: 0 0; color: var(--ab-navy); white-space: nowrap; }
.ab-note-text > span { display: block; margin-left: calc(var(--x) * var(--u)); }
.ab-note-heart { left: calc(159 * var(--u)); top: calc(57 * var(--u)); width: calc(37 * var(--u)); height: calc(43 * var(--u)); }

/* the polaroid: the photo sits in the frame's window, turned with it; the frame, tape and heart are a picture over it */
.ab-polaroid { width: calc(238 * var(--u)); height: calc(254 * var(--u)); z-index: 3; }
.ab-polaroid-window { left: calc(31.6 * var(--u)); top: calc(35.3 * var(--u)); width: calc(179.4 * var(--u)); height: calc(157.2 * var(--u)); overflow: hidden; transform: rotate(11.69deg); }
.ab-polaroid-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.ab-polaroid-frame { left: 0; top: 0; width: 100%; height: 100%; }

/* the portrait: the screenshot's own cut-out, its white sticker border and all */
.ab-portrait { width: calc(638 * var(--u)); height: calc(729 * var(--u)); z-index: 1; }

/* the annotations: white handwriting, each line where it was written, with its drawing and arrow */
.ab-facts { list-style: none; margin: 0; padding: 0; }
.ab-fact { z-index: 2; }
.ab-fact-text { position: absolute; left: 0; top: 0; font: 400 calc(30 * var(--u)) / 1 var(--ab-hand); color: var(--ab-ink); white-space: nowrap; }
.ab-l { left: calc(var(--x) * var(--u)); top: calc((var(--y) - 22) * var(--u)); }
.ab-heart { display: inline-block; width: .95em; height: .95em; margin-left: .1em; vertical-align: -.08em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.ab-d { display: block; }
.ab-fact--bake { width: calc(205 * var(--u)); height: calc(166 * var(--u)); }
.ab-d--whisk { left: calc(155 * var(--u)); top: calc(7 * var(--u)); width: calc(46 * var(--u)); }
.ab-d--arrow1 { left: calc(146 * var(--u)); top: calc(114 * var(--u)); width: calc(59 * var(--u)); }
.ab-fact--hiker { width: calc(202 * var(--u)); height: calc(157 * var(--u)); }
.ab-d--hiker { left: calc(60 * var(--u)); top: calc(42 * var(--u)); width: calc(142 * var(--u)); }
.ab-fact--coffee { width: calc(162 * var(--u)); height: calc(137 * var(--u)); }
.ab-d--coffee { left: calc(105 * var(--u)); top: calc(67 * var(--u)); width: calc(55 * var(--u)); }
.ab-fact--plant { width: calc(317 * var(--u)); height: calc(168 * var(--u)); }
.ab-d--plant { left: calc(243 * var(--u)); top: calc(21 * var(--u)); width: calc(72 * var(--u)); }
.ab-d--arrow2 { left: calc(2 * var(--u)); top: calc(107 * var(--u)); width: calc(44 * var(--u)); }
.ab-fact--blue { width: calc(235 * var(--u)); height: calc(167 * var(--u)); }
.ab-d--rays { left: calc(174 * var(--u)); top: calc(5 * var(--u)); width: calc(48 * var(--u)); }
.ab-d--arrow3 { left: calc(4 * var(--u)); top: calc(51 * var(--u)); width: calc(62 * var(--u)); }
.ab-d--bigheart { left: calc(193 * var(--u)); top: calc(121 * var(--u)); width: calc(40 * var(--u)); }
.ab-fact--cat { width: calc(212 * var(--u)); height: calc(161 * var(--u)); }
.ab-d--cat { left: calc(83 * var(--u)); top: calc(97 * var(--u)); width: calc(107 * var(--u)); }
.ab-d--arrow4 { left: calc(2 * var(--u)); top: calc(43 * var(--u)); width: calc(57 * var(--u)); }
.ab-book { width: calc(131 * var(--u)); height: calc(104 * var(--u)); z-index: 2; }
.ab-rays-head { width: calc(56 * var(--u)); height: calc(52 * var(--u)); z-index: 2; }

/* the band: torn cream paper in three pieces (its top edge, its middle, its bottom edge), the six loves on it */
.ab-band { z-index: 3; color: var(--ab-navy);
  background: url(../img/about/band-top.webp) center top / 100% auto no-repeat, url(../img/about/band-bottom.webp) center bottom / 100% auto no-repeat,
              url(../img/about/band-middle.webp) center calc(87 * var(--u)) / 100% calc(100% - 141 * var(--u)) no-repeat; }
.ab-loves { list-style: none; margin: 0; padding: 0; display: grid; }
.ab-love { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.ab-love img { display: block; height: auto; }
.ab-love > span { display: block; font: 400 calc(22 * var(--u)) / calc(29 * var(--u)) var(--ab-hand); color: var(--ab-navy); }
.ab-love-small { font-size: .8em; }
.ab-love-heart { margin: calc(3 * var(--u)) auto 0; width: calc(27 * var(--u)) !important; }
.ab-sun { z-index: 4; pointer-events: none; }
.ab-colours { z-index: 0; background: url(../img/about/colour-stripes.webp) left top / calc(1122 * var(--u)) 100% repeat-x; }

/* the full canvas, from 700px: each piece on the reference's coordinates (y less the 64 of the header) */
@media (min-width: 700px) {
  body.about .page--about { width: calc(1122 * var(--a)); height: auto; min-height: max(calc(1338 * var(--a)), calc(100vh - 64 * var(--a))); margin: 0 auto; flex: none; }
  .ab-intro { left: calc(290 * var(--u)); top: calc(20 * var(--u)); }
  .ab-note { left: calc(39 * var(--u)); top: calc(94 * var(--u)); }
  .ab-polaroid { left: calc(856 * var(--u)); top: calc(91 * var(--u)); }
  .ab-portrait { left: calc(261 * var(--u)); top: calc(319 * var(--u)); }
  .ab-fact--bake { left: calc(126 * var(--u)); top: calc(348 * var(--u)); }
  .ab-fact--hiker { left: calc(106 * var(--u)); top: calc(506 * var(--u)); }
  .ab-fact--coffee { left: calc(92 * var(--u)); top: calc(680 * var(--u)); }
  .ab-fact--plant { left: calc(732 * var(--u)); top: calc(362 * var(--u)); }
  .ab-fact--blue { left: calc(812 * var(--u)); top: calc(522 * var(--u)); }
  .ab-fact--cat { left: calc(849 * var(--u)); top: calc(728 * var(--u)); }
  .ab-book { left: calc(84 * var(--u)); top: calc(850 * var(--u)); }
  .ab-rays-head { left: calc(681 * var(--u)); top: calc(357 * var(--u)); }
  .ab-band { left: 0; top: calc(974 * var(--u)); width: calc(1122 * var(--u)); height: calc(326 * var(--u)); }
  .ab-loves { position: absolute; left: 0; top: calc(116 * var(--u)); width: 100%; grid-template-columns: calc(203 * var(--u)) calc(193 * var(--u)) calc(161 * var(--u)) calc(191 * var(--u)) calc(165 * var(--u)) calc(209 * var(--u)); }
  .ab-love { height: calc(196 * var(--u)); }
  .ab-love + .ab-love { background: linear-gradient(var(--ab-rule), var(--ab-rule)) 0 calc(57 * var(--u)) / max(1px, calc(1 * var(--u))) calc(106 * var(--u)) no-repeat; box-shadow: none; }
  .ab-love--reading { padding-left: calc(34 * var(--u)); }
  .ab-love--cat { padding-right: calc(41 * var(--u)); }
  .ab-love > img { height: calc(var(--ih) * var(--u)); width: auto; margin-top: calc((74 - var(--ih)) * var(--u) - var(--lift, 0px)); }
  .ab-love--reading { --ih: 68; } .ab-love--hiking { --ih: 69; } .ab-love--food { --ih: 74; } .ab-love--travel { --ih: 66; --lift: calc(4 * var(--u)); } .ab-love--plants { --ih: 70; --lift: calc(2 * var(--u)); } .ab-love--cat { --ih: 64; --lift: calc(1 * var(--u)); }
  .ab-love > span { margin-top: calc(10 * var(--u)); }
  .ab-love--travel img { margin-left: calc(-14 * var(--u)); }
  .ab-sun--left { left: 0; top: calc(-20 * var(--u)); width: calc(186 * var(--u)); height: calc(158 * var(--u)); }       /* on the band: page (0, 1018) */
  .ab-sun--right { left: calc(912 * var(--u)); top: calc(-81 * var(--u)); width: calc(210 * var(--u)); height: calc(209 * var(--u)); }
  .ab-colours { left: 0; top: calc(1248 * var(--u)); bottom: 0; width: calc(1122 * var(--u)); }   /* to the foot of the window when it is taller than the page */
}

/* the note's dialog: the handwritten line, the paragraphs and the links, on cream paper */
.ab-dialog { width: min(92vw, 520px); max-height: min(88vh, 88dvh); overflow: auto; padding: 36px 34px 30px; border: 0; border-radius: 18px; background: #f6efe6; color: var(--ab-navy); box-shadow: 0 28px 60px -18px rgba(29, 47, 69, .55); }
.ab-dialog::backdrop { background: rgba(29, 47, 69, .45); }
.ab-dialog-close { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ab-navy); }
.ab-dialog-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ab-dialog-close:hover { background: rgba(191, 205, 224, .45); }
.ab-dialog-title { margin: 0; font: 400 2rem/1.15 var(--ab-hand); color: var(--ab-navy); }
.ab-dialog-tagline { margin: 10px 0 0; font: italic 500 1.3rem/1.4 var(--bpp-serif); color: #31577c; }
.ab-dialog-body { margin-top: 16px; font: 400 1.12rem/1.6 var(--bpp-serif); color: #1d2f45; }
.ab-dialog-body p + p { margin-top: .8em; }
.ab-dialog-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 20px; }
.ab-dialog-link { display: inline-flex; align-items: center; min-height: 44px; font: italic 400 1.08rem/1.2 var(--bpp-serif); color: var(--ab-navy); text-decoration: underline; text-decoration-color: #8fa6c4; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ab-dialog-link:hover { color: #31577c; }
.ab-dialog-sign { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--by-sand); text-align: right; }
.ab-dialog-sign .by-wordmark { display: inline-block; font-size: 2.3rem; color: var(--by-logo); rotate: -3deg; }

/* below 700px: the pieces in order, each its own size. The header is the site's phone header on the lavender bar; the intro,
   then the note and the polaroid side by side, the portrait, the annotations two by two, the band with its loves three by two */
@media (max-width: 699px) {
  body.about { background-size: calc(1122 * 100vw / 760) auto; }
  .page--about { display: flex; flex-wrap: wrap; justify-content: space-between; align-content: flex-start; padding: 18px 16px 0; container-type: inline-size; }
  .page--about > * { position: relative; }
  .ab-intro { --u: calc(100cqw / 555); flex: 0 0 100%; }
  .ab-note { --u: calc(46cqw / 238); margin-top: 14px; }
  .ab-polaroid { --u: calc(46cqw / 238); margin-top: 6px; }
  .ab-portrait { --u: calc(100cqw / 638); margin: 18px auto 0; height: auto; }
  .ab-facts { position: relative; flex: 0 0 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; margin-top: 18px; }
  /* one size for every annotation; each box is cut to what it shows here (the arrows point at the portrait, so they go) */
  .ab-fact { position: relative; --u: calc(46cqw / 253); margin: 0 auto; width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); }
  .ab-fact > * { translate: calc(var(--cx, 0) * -1 * var(--u)) 0; }
  .ab-d--arrow1, .ab-d--arrow2, .ab-d--arrow3, .ab-d--arrow4, .ab-rays-head, .ab-book { display: none; }
  .ab-fact--bake { --w: 201; --h: 112; } .ab-fact--hiker { --w: 202; --h: 157; } .ab-fact--coffee { --w: 162; --h: 137; }
  .ab-fact--plant { --cx: 64; --w: 253; --h: 140; } .ab-fact--blue { --cx: 76; --w: 159; --h: 167; } .ab-fact--cat { --cx: 62; --w: 130; --h: 161; }
  .ab-band { --u: calc((100cqw + 32px) / 1122); flex: 0 0 auto; width: calc(100cqw + 32px); margin: 64px -16px 0; padding: calc(150 * var(--u)) 6px calc(120 * var(--u)); }
  .ab-loves { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 4px; }
  .ab-love > img { height: 52px; width: auto; }
  .ab-love > span { margin-top: 8px; font-size: 16px; line-height: 21px; }
  .ab-love-heart { width: 22px !important; }
  .ab-sun { position: absolute; z-index: 4; height: auto; }
  .ab-sun--left { left: 0; top: -30px; width: 100px; }      /* their flat white bases on the band's torn edge */
  .ab-sun--right { right: 0; top: -45px; width: 110px; }
  .ab-colours { --u: calc((100cqw + 32px) / 1122); flex: 0 0 auto; width: calc(100cqw + 32px); height: 34px; margin: calc(-56 * var(--u)) -16px 0; background-size: calc(1122 * var(--u)) 100%; }
}

/* touch screens: 44px targets without changing the desktop look */
@media (pointer: coarse) {
  .nav a { padding-top: 15px; padding-bottom: 15px; }
  .chip--btn, .chips--tabs .chip { min-height: 44px; }
  .search-btn { min-width: 44px; min-height: 44px; display: grid; place-items: center; } .search-btn img { width: 30px; height: 30px; }
  .social { width: 44px; height: 44px; }
  .seeall, .linkbtn { padding: 13px 0; margin: -13px 0; }
  .lib-search input, .rec-field input { min-height: 44px; }
}

@media print { .site-header, .site-footer, .skip, .frame-left, .frame-bottom { display: none !important; } body { background: #fff; } }
