/* Blueprint: the page as a drawing sheet, built of panels.

   A column stands between two rules that run the full height. The page is
   a stack of panels: each has a rule above and below that runs the full
   width of the window, and a hatched band sits between one panel and the
   next. Folders and links sit in ruled cells. The footer is a colophon
   and the name in blocks, measured like a drawing.

   Pages opt in with <body class="bp">. This file comes after site.css and
   is all these pages need besides it: the groundwork they share with
   DesignOps is carried over in section 0b, and dressed under .bp.

   Contents
     0  fonts
     0b base: the groundwork from resources.css
     1  tokens
     2  the sheet: column, full-width rules, bands, dimension line
     3  header: section tabs, networks, light / dark
     4  head panel
     5  panel titles
     6  Ask AI
     7  folders (the hub)
     8  links (a folder's page)
     9  feedback panel
    10  footer: colophon, info tip, the name
    11  toolbox
    12  buttons, focus, controls
    14  less motion */


/* ---------- 0  fonts ---------- */

/* Geist (SIL OFL), kept with the site rather than fetched from Google: one
   variable file per script covers 400 and 500, and a browser only downloads
   the scripts a page uses. Geist Mono is down to its Latin file, a fallback
   behind the pixel face (and the one the build's share picture uses) */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/geist-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/geist-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/geist-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/geist-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/geist-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: "Geist Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/geist-mono-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; }
/* Geist Pixel Square (Vercel, SIL OFL), and the rule for which face goes where:
     Geist (--text)  what is read or written as content: sentences, names
                     that aren't ours (the links' own names, any language),
                     and whatever the visitor types
     Pixel (--sans, --mono)  our own short words: the page's title and the
                     section titles (the folders' names and small headings
                     such as the banner's read better in Geist) and the interface
                     (buttons, tabs, labels, badges, dates, counts, the footer)
   in short: a sentence, or someone else's name? Geist. Our own short
   word? Pixel. ("A sentence" means written to be read, not just text that
   wraps on a phone: the footer's signature wraps there and stays pixel) */
@font-face { font-family: "Geist Pixel"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/geist-pixel-square.woff2") format("woff2"); }


/* ---------- 0b  base ---------- */

/* the pages' groundwork, carried over from resources.css (which DesignOps
   still loads): layout, the cards, Ask AI, the toolbox and Paint, before
   the blueprint dresses them below. Only what these pages use; the
   breadcrumb and section menu stayed behind with DesignOps. */

:root {
  --ink: #000000;
  --paper: #ffffff;
  --wash: rgba(0, 0, 0, 0.04);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); }
body { font: 15px/1.5 var(--sans); overflow-x: hidden; }
/* the page's frame always reaches the bottom of the window, even when the
   content is short (a % height can't, since html has no fixed height) */
body { min-height: 100vh; min-height: 100dvh; }

a { color: inherit; }
:focus-visible { outline: 1px dotted var(--ink); outline-offset: 4px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* top: back home, the page's name */
.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 8px;
  font: 12px/1 var(--mono);
}
.top a { text-decoration: none; }
.top a:hover { text-decoration: underline; text-underline-offset: 3px; }

.head { padding: clamp(40px, 9vh, 88px) 0 clamp(28px, 5vh, 48px); }
.head h1, .head h2 {
  margin: 0;
  font: 600 clamp(32px, 6vw, 56px)/1 var(--sans);
  letter-spacing: 0;
}
.head p { margin: 12px 0 0; max-width: 44ch; color: rgba(0, 0, 0, 0.6); }

.view { animation: fade 0.3s ease both; }
/* one view shows at a time (the templates' folders stay hidden) */
.js .view:not(.on) { display: none; }
@keyframes fade { from { opacity: 0; } }

/* the button to tell me how a link worked out, on X (in the preview) */
.say {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 9px;
  font: 12px/1 var(--mono);
  color: var(--paper);
  background: var(--ink);
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.say:hover, .say:focus-visible { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35); }

/* ---------- Paint, as on the home page: pencil, eraser, the eye ---------- */
body { position: relative; }
/* text can be selected and copied, except while a tool is down */
.drawing body, .blank body { -webkit-user-select: none; user-select: none; }
/* the sheet lies in a box the size of the page, which cuts off whatever
   is drawn past the page's end, so the sheet never makes the page longer */
.doodle-box { position: absolute; inset: 0; z-index: 5; overflow: hidden; pointer-events: none; }
.doodle { left: 0; top: 0; }
.tools {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
html:not(.js) .tools { display: none; }
/* while you read down the page the toolbox steps out of the way: its tools
   tip over and drop out one after another, and when you scroll up they
   spring back in turn, the box first */
.tools { transition: translate 0.55s cubic-bezier(.34, 1.45, .64, 1); }
.tools .tool {
  transition: translate 0.55s cubic-bezier(.34, 1.6, .64, 1), rotate 0.55s cubic-bezier(.34, 1.6, .64, 1);
  transition-delay: calc(var(--n) * 70ms + 60ms);
}
.tools .tool:nth-child(1) { --n: 0; --tilt: -16deg; }
.tools .tool:nth-child(2) { --n: 1; --tilt: 12deg; }
.tools .tool:nth-child(3) { --n: 2; --tilt: -9deg; }
.tools-away .tools {
  translate: 0 calc(100% + 48px);
  pointer-events: none;
  transition: translate 0.32s cubic-bezier(.55, 0, .8, .2) 0.16s;
}
.tools-away .tools .tool {
  translate: 0 70%;
  rotate: var(--tilt);
  transition-duration: 0.28s;
  transition-timing-function: cubic-bezier(.55, 0, .8, .2);
  transition-delay: calc(var(--n) * 45ms);
}
.tool .ink { display: block; width: 100%; height: 100%; overflow: visible; }
.tool .ink path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pixel .tool .ink { visibility: hidden; }
.tool:focus-visible { outline: 1px dotted var(--ink); outline-offset: 0; }
/* the eye pressed: the page steps aside for drawing, and a finger draws too */
.blank .wrap { visibility: hidden; }
.blank, .blank body { touch-action: none; }
/* drawing on a touch screen: one finger draws, two fingers scroll and zoom */
.drawing, .drawing body { touch-action: pinch-zoom; }
.wrap { padding-bottom: 64px; }
/* the toolbox as the machine sees it, as on the home page: every box
   outlined, its tag on a chip */
.box { position: relative; outline: 1px solid var(--ink); background-color: rgba(0, 0, 0, 0.025); }
/* the page's own box: its frame on the window's edge, its tag in the corner */
.page.box { outline-offset: -1px; }
.page.box::before { left: 0; top: 0; bottom: auto; }
.tools.box { position: fixed; background: linear-gradient(rgba(0, 0, 0, 0.025), rgba(0, 0, 0, 0.025)) var(--paper); }
.box::before {
  content: attr(data-tag);
  position: absolute;
  left: -1px;
  bottom: 100%;
  z-index: 2;
  padding: 2px 4px 1px;
  font: 10px/1 var(--mono);
  color: var(--paper);
  background: var(--ink);
  white-space: nowrap;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- ask an AI which of these fit ---------- */
/* closed, it's one twinkling button; pressed, the box below unfolds */
.ask-toggle {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 7px 10px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: 12px/1 var(--mono);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.ask-toggle:hover, .ask-toggle:focus-visible { transform: translate(-2px, -2px); box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35); }
/* open, the button becomes the box's tab: white, joined to it, with an x to close */
.ask-toggle .x { display: none; margin-left: 6px; font: 15px/1 var(--mono); }
.ask-toggle[aria-expanded="true"] .x { display: inline; }
.ask-toggle[aria-expanded="true"]:hover .x { text-decoration: underline; }
html:not(.js) .ask-toggle, html:not(.js) .ask-panel { display: none; }   /* both need script */
/* a pixel ghost, a little soul: it floats, and its eyes look around, blink now and then, and follow the
   pointer while it moves (resources.js sets --ex and --ey, in pixels) */
.face { flex: none; overflow: visible; fill: currentColor; }
.face .beak { fill: #f08a24; }   /* the ghoose: a goose under the ghost, its beak the one colour */
.face .eye { transform-box: fill-box; transform-origin: center; transform: translate(calc(var(--ex, 0) * 1px), calc(var(--ey, 0) * 1px)); transition: transform 0.12s steps(1); }
/* now and then the eyes turn to stars, and little stars fly off across the face */
.face .stars { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .face:not(.track) .eye { animation: look 5s steps(1) infinite, starred 7s steps(1) infinite; }
  .face:not(.track) .stars { animation: stars 7s steps(1) infinite; }
  .face:not(.track) .stars .p { animation: 7s linear infinite; }
  .face:not(.track) .stars .p1 { animation-name: fly1; }
  .face:not(.track) .stars .p2 { animation-name: fly2; }
  .face:not(.track) .stars .p3 { animation-name: fly3; }
  .face:not(.track) .stars .p4 { animation-name: fly4; }
}
@keyframes starred { 0%, 79% { opacity: 1; } 80%, 95% { opacity: 0; } 96%, 100% { opacity: 1; } }
@keyframes stars { 0%, 79% { opacity: 0; } 80%, 95% { opacity: 1; } 96%, 100% { opacity: 0; } }
/* each star leaves an eye and crosses the face, out past its edge */
@keyframes fly1 { 0%, 80% { transform: translate(0, 0); opacity: 1; } 95% { transform: translate(-7px, -6px); opacity: 0; } 100% { opacity: 0; } }
@keyframes fly2 { 0%, 81% { transform: translate(0, 0); opacity: 1; } 95% { transform: translate(7px, -6px); opacity: 0; } 100% { opacity: 0; } }
@keyframes fly3 { 0%, 82% { transform: translate(0, 0); opacity: 1; } 95% { transform: translate(1px, 9px); opacity: 0; } 100% { opacity: 0; } }
@keyframes fly4 { 0%, 83% { transform: translate(0, 0); opacity: 1; } 95% { transform: translate(10px, 8px); opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .face { animation: float 2.8s steps(2) infinite; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
@keyframes look {
  0%, 18% { transform: translate(0, 0); }
  20%, 38% { transform: translate(-1px, 0); }
  40%, 58% { transform: translate(1px, 0); }
  60%, 78% { transform: translate(0, 0); }
  80%, 82% { transform: translate(0, 0) scaleY(0.34); }
  84%, 100% { transform: translate(0, 0); }
}

/* the box unfolds from nothing: its row grows from 0 to its full height */
.ask-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease); }
.ask-panel > .ask { overflow: hidden; min-height: 0; opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.35s var(--ease), padding 0.35s var(--ease); }
.ask-panel.open { grid-template-rows: 1fr; }
/* closed, the box gives back its padding and border too, so it takes no room */
.ask-panel:not(.open) > .ask { padding-top: 0; padding-bottom: 0; border-top-width: 0; border-bottom-width: 0; }
.ask-panel.open > .ask { opacity: 1; transform: none; overflow: visible; }
.ask { display: grid; gap: 14px; margin: 0; padding: 20px; border: 1px solid var(--ink); background: var(--paper); }
.ask-panel.open > .ask { margin: 0 0 44px; }
.ask-hint { margin: 0; font-size: 14px; color: rgba(0, 0, 0, 0.6); }
/* one bar: the smiley, the question and the button that sends it */
.ask-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 16px;
  outline: 1px solid var(--ink);
  outline-offset: -1px;
  background: var(--paper);
  transition: box-shadow 0.2s, transform 0.2s;
}
.ask-bar:focus-within { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--ink); }
/* pressed with nothing written: the bar shakes its head, no */
.ask-bar.nudge { animation: nudge 0.4s steps(6); }
@keyframes nudge { 0%, 100% { translate: 0 0; } 20%, 60% { translate: -4px 0; } 40%, 80% { translate: 4px 0; } }
.ask-bar .face { width: 18px; height: 18px; }
.ask-bar input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: 17px var(--sans);
}
.ask-bar input::placeholder { color: rgba(0, 0, 0, 0.4); }
.ask-go {
  flex: none;
  padding: 13px 16px 12px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: 13px/1 var(--mono);
  -webkit-tap-highlight-color: transparent;
}
.ask-go:hover, .ask-go:focus-visible { background: #333; }
/* under it: tasks to try in one tap, and the other ways out */
.ask-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 12px/1 var(--mono); color: rgba(0, 0, 0, 0.55); }
.ask-tries { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ask-try {
  padding: 6px 9px 5px;
  border: 1px dashed rgba(0, 0, 0, 0.4);
  background: none;
  color: var(--ink);
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.ask-try:hover, .ask-try:focus-visible { border-style: solid; border-color: var(--ink); }
.ask-alt { margin-left: auto; }
.ask-alt button { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* a phone, top to bottom: the field, the examples to try, the button,
   and the other ways out; the bar and the row under it step aside
   (display: contents) so their parts can take these places */
@media (max-width: 560px) {
  .ask { gap: 12px; padding: 16px; }
  .ask-hint { font-size: 13px; }
  .ask-bar, .ask-more { display: contents; }
  .ask-bar .face { display: none; }   /* the tab above already wears it */
  .ask-bar input { order: 1; padding: 12px; outline: 1px solid var(--ink); outline-offset: -1px; font-size: 16px; }
  .ask-bar input:focus { outline-width: 2px; outline-offset: -2px; }
  .ask-bar.nudge input { animation: nudge 0.4s steps(6); }
  .ask-tries { order: 2; gap: 8px 6px; margin-bottom: 8px; font: 12px/1 var(--mono); color: rgba(0, 0, 0, 0.55); }
  .ask-go { order: 3; width: 100%; padding: 14px 16px 13px; }
  .ask-alt { order: 4; display: flex; flex-direction: column; gap: 14px; width: 100%; margin: 8px 0 0; font: 12px/1 var(--mono); color: rgba(0, 0, 0, 0.55); text-align: center; }
  /* under the button: ── or open in ──, then the two ways, centred */
  .ask-or { display: flex; align-items: center; gap: 12px; }
  .ask-or::before, .ask-or::after { content: ""; flex: 1; height: 1px; background: var(--rule, rgba(0, 0, 0, 0.12)); }
  .ask-ais { display: flex; justify-content: center; align-items: center; gap: 14px; font-size: 14px; }   /* the two ways, bigger for a thumb, apart */
}


/* ---------- 1  tokens ---------- */

.bp {
  --sans: "Geist Pixel", "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Pixel", "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --text: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;   /* body text: plain Geist, easier to read at length */
  /* light: builtbydesigners.com's palette (a warm paper, one ink, the rest
     that ink at a strength), mixed as solid colours so where two lines meet
     they stay one shade; the dark below is chanhdai.com's zinc (MIT) */
  --paper: #f5f5f3;                                              /* background */
  --ink: #171a1d;                                                /* text */
  --muted: color-mix(in srgb, #171a1d 55%, #f5f5f3);             /* muted */
  --chip-ink: color-mix(in srgb, #171a1d 64%, #f5f5f3);          /* words on a chip's grey ground: 4.5:1 and up */
  --ring: color-mix(in srgb, #171a1d 30%, #f5f5f3);              /* a hovered frame */
  --dim: color-mix(in srgb, #171a1d 30%, #f5f5f3);               /* the measurements */
  --card: #fbfbfa;                                               /* details background: the preview */
  --sheet: #fbfbfa;                                              /* the preview's ground (the dark keeps its paper) */
  --tag: color-mix(in srgb, #171a1d 3.5%, #f5f5f3);              /* chip */
  --border: color-mix(in srgb, #171a1d 8.6%, #f5f5f3);           /* a frame; the rules come out at their border (5.5%) */
  --accent: color-mix(in srgb, #171a1d 5%, #f5f5f3);             /* a picked row */
  --rule: color-mix(in oklab, var(--border) 64%, var(--paper));   /* line: the sheet's structure */
  --line: color-mix(in oklab, var(--dim) 60%, var(--paper));      /* dimension: the outline of a thing on it */
  --faint: var(--border);                      /* the lightest frame: round a cover picture */
  --ink-90: color-mix(in oklab, var(--ink) 90%, var(--paper));    /* primary/90, a button's hover */
  --wash: color-mix(in oklab, var(--accent) 50%, transparent);   /* accent-muted, a card's hover */
  --hatch: repeating-linear-gradient(315deg, color-mix(in oklab, var(--rule) 56%, transparent) 0 1px, transparent 0 50%) 0 0 / 10px 10px;
  --band: 32px;        /* the hatched band between panels */
  --pad: 16px;         /* the inner margin, everywhere */
  font-family: var(--sans);
  /* grayscale smoothing (as Akira does): on macOS the type comes out thinner */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* the full-width rules reach past both edges of the window; clip them
   there, so nothing can scroll or pan sideways (overflow-x: hidden alone
   still lets a phone drag the page left and right) */
html:has(body.bp), body.bp { overflow-x: clip; }
/* no frame round the window and no tag on it: the sheet has its own lines,
   and the name is signed at the bottom instead */
.bp.page.box { outline: 0; }
.bp.page.box { background-color: var(--paper); }
/* nothing heavier than 500: Geist is loaded at 400 and 500 only */
.bp h1, .bp h2, .bp h3, .bp h4, .bp b, .bp strong { font-weight: 500; }
:root:has(body.bp) { color-scheme: light; background: #f5f5f3; }   /* the window behind the page, in the light */
/* a cover with no picture: ruled, in the palette */
.bp ::selection { background: var(--ink); color: var(--paper); }
/* resources.css's see-through greys, in the palette */
.bp .head p, .bp .pv-say p, .bp .ask-hint, .bp .ask-more, .bp .ask-tries, .bp .ask-alt { color: var(--muted); }
.bp .ask-go:hover, .bp .ask-go:focus-visible { background: var(--ink-90); }
.bp.page.box::before { display: none; }


/* ---------- 1b  dark ---------- */

/* chanhdai.com's .dark (zinc), on when the system is dark, or when the
   header's switch says so (data-theme on <html>, kept in localStorage; set
   before the first paint by the line in the page's head). The two blocks
   are the same: one for the system, one for the switch. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bp {
    --paper: oklch(0.141 0.005 285.823);         /* background: zinc-950 */
    --ink: oklch(0.985 0 0);                     /* foreground, primary: zinc-50 */
    --muted: oklch(0.705 0.015 286.067);         /* muted-foreground: zinc-400 */
    --chip-ink: var(--muted);
    --ring: oklch(0.552 0.016 285.938);          /* ring: zinc-500 */
    --dim: oklch(0.37 0.013 285.805);            /* dimension-foreground */
    --card: oklch(0.21 0.006 285.885);           /* card: zinc-900 */
    --tag: oklch(0.21 0.006 285.885);            /* a tag's ground: zinc-900 */
    --border: oklch(0.274 0.006 286.033);        /* border: zinc-800 */
    --accent: oklch(0.274 0.006 286.033);        /* accent: zinc-800 */
    --line: color-mix(in oklab, var(--dim) 80%, var(--paper));
    --wash: color-mix(in oklab, var(--accent) 20%, transparent);
    --sheet: var(--paper);
  }
  :root:not([data-theme="light"]):has(body.bp) { color-scheme: dark; background: oklch(0.141 0.005 285.823); }
  :root:not([data-theme="light"]) .bp .ask-bar::before { --h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect x='.5' y='.5' width='7' height='7' fill='%2309090b' stroke='%23fff' stroke-opacity='.25'/%3E%3C/svg%3E"); }
  :root:not([data-theme="light"]) .bp .mark .dim::after {
    --arrow-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M.5 3.5 L6.5 .5 V6.5 Z' fill='none' stroke='%2352525c'/%3E%3C/svg%3E");
    --arrow-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M6.5 3.5 L.5 .5 V6.5 Z' fill='none' stroke='%2352525c'/%3E%3C/svg%3E");
  }
  :root:not([data-theme="light"]) .bp .theme .moon { display: none; }
  :root:not([data-theme="light"]) .bp .theme .sun { display: block; }
}
:root[data-theme="dark"] .bp {
  --paper: oklch(0.141 0.005 285.823);         /* background: zinc-950 */
  --ink: oklch(0.985 0 0);                     /* foreground, primary: zinc-50 */
  --muted: oklch(0.705 0.015 286.067);         /* muted-foreground: zinc-400 */
  --chip-ink: var(--muted);                    /* zinc-400 reads on the dark chips */
  --ring: oklch(0.552 0.016 285.938);          /* ring: zinc-500 */
  --dim: oklch(0.37 0.013 285.805);            /* dimension-foreground */
  --card: oklch(0.21 0.006 285.885);           /* card: zinc-900 */
  --tag: oklch(0.21 0.006 285.885);            /* a tag's ground: zinc-900 */
  --border: oklch(0.274 0.006 286.033);        /* border: zinc-800 */
  --accent: oklch(0.274 0.006 286.033);        /* accent: zinc-800 */
  --line: color-mix(in oklab, var(--dim) 80%, var(--paper));
  --wash: color-mix(in oklab, var(--accent) 20%, transparent);
  --sheet: var(--paper);
}
:root[data-theme="dark"]:has(body.bp) { color-scheme: dark; background: oklch(0.141 0.005 285.823); }
:root[data-theme="dark"] .bp .ask-bar::before { --h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect x='.5' y='.5' width='7' height='7' fill='%2309090b' stroke='%23fff' stroke-opacity='.25'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .bp .mark .dim::after {
  --arrow-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M.5 3.5 L6.5 .5 V6.5 Z' fill='none' stroke='%2352525c'/%3E%3C/svg%3E");
  --arrow-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M6.5 3.5 L.5 .5 V6.5 Z' fill='none' stroke='%2352525c'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .bp .theme .moon { display: none; }
:root[data-theme="dark"] .bp .theme .sun { display: block; }


/* the switch between them: the new page comes in over the old in square
   blocks (resources.js masks it); no cross-fade underneath */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 1; }


/* ---------- 2  the sheet ---------- */

/* the column */
.bp .wrap {
  position: relative;
  max-width: 1080px;
  box-sizing: border-box;
  padding: 0 var(--pad);
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
@media (max-width: 1112px) { .bp .wrap { border-left: 0; border-right: 0; } }

/* a rule that runs the full width of the window (the body hides what
   spills over): above an element (::before) or below it (::after) */
.bp .top, .bp .head { position: relative; }
.bp .top::before, .bp .top::after,
.bp .head::after, .bp .head h1::after,
.bp .lib::after {
  content: "";
  position: absolute;
  left: -100vw;
  right: -100vw;
  height: 1px;
  background: var(--rule);
  pointer-events: none;
}
.bp .top::before { top: 0; }
.bp .top::after, .bp .head::after, .bp .head h1::after, .bp .lib::after { bottom: 0; }

/* the hatched band above a panel */
.bp .head, .bp .sign { margin-top: var(--band); }
.bp .head::before, .bp .lib::before, .bp .sign::before {
  content: "";
  position: absolute;
  left: -100vw;
  right: -100vw;
  bottom: 100%;
  height: var(--band);
  background: var(--hatch);
  pointer-events: none;
}



/* ---------- 3  header ---------- */

.bp .top { padding: 0; align-items: stretch; font-family: var(--mono); }

/* the sections, a row of ruled tabs from the column's left edge; the one
   you're in is lit */
.bp .tabs { display: flex; margin-left: calc(-1 * var(--pad)); }
.bp .tabs a, .bp .tabs .tab-soon { display: flex; align-items: center; height: 52px; padding: 0 20px; border-right: 1px solid var(--rule); font: 13px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color 0.15s, background-color 0.15s; }
.bp .tabs a:hover, .bp .tabs a:focus-visible { color: var(--ink); background: var(--wash); }
.bp .tabs a[aria-current] { color: var(--ink); background: var(--accent); }
.bp .tabs a:focus-visible { outline-offset: -1px; }
.bp .tabs .tab-soon { gap: 8px; cursor: default; }   /* a section on its way: no link yet */
/* its name grey, a dark wave passing through it now and then, left to right */
.bp .tabs .shim { background: linear-gradient(90deg, var(--muted) 0 35%, var(--ink) 50%, var(--muted) 65% 100%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke-color: transparent; animation: shim 2.8s ease-in-out infinite; }
@keyframes shim { 0% { background-position: 100% 0; } 60%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .bp .tabs .shim { background: none; color: var(--muted); } }
.bp .top { justify-content: flex-start; }
@media (max-width: 560px) {
  .bp .tabs a, .bp .tabs .tab-soon { height: 44px; padding: 0 10px; font-size: 11px; letter-spacing: 0.02em; }
  .bp .tabs .tab-soon { gap: 6px; }
}

/* light / dark, a small ruled square after the networks */
.bp .top .theme { position: relative; flex: none; align-self: center; display: grid; place-items: center; width: 26px; height: 26px; margin-left: auto; padding: 0; box-sizing: border-box; border: 0; background: none; color: var(--muted); cursor: pointer; transition: color 0.2s; }
.bp .top .theme:hover, .bp .top .theme:focus-visible { color: var(--ink); }
.bp .theme svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bp .theme .sun { display: none; }
@media (max-width: 560px) { .bp .top .theme { width: 22px; height: 22px; } .bp .theme svg { width: 14px; height: 14px; } }
.info-tip button svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }


/* ---------- 4  head panel: the page's name on a ruled row, then its note ---------- */

.bp .head { padding: 0; }
.bp .head h1 { position: relative; margin: 0; padding: 22px 0 18px; font: 500 40px/1 var(--sans); letter-spacing: 0; }
.bp .head p { margin: 0; max-width: 58ch; padding: var(--pad) 0 0; font-size: 15px; }
/* body text: paragraphs, the notes under titles, the card descriptions */
.bp p { line-height: 1.625; }
/* a folder's page: a plain way back to all the folders, above the name */
.bp .head .back { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--pad); font: 13px/1 var(--mono); color: var(--muted); text-decoration: none; transition: color 0.2s; }
.bp .head .back:hover, .bp .head .back:focus-visible { color: var(--ink); }
.bp .head .back span { transition: transform 0.2s var(--ease); }   /* the arrow as a letter, as on "on X →" */
.bp .head .back:hover span, .bp .head .back:focus-visible span { transform: translateX(-3px); }
.bp .head > :last-child { padding-bottom: var(--pad); }


/* on a phone, or any touch screen: the theme button at 28px */
@media (max-width: 640px), (pointer: coarse) {
  .bp .top .theme { width: 28px; height: 28px; }
  .bp .theme svg { width: 16px; height: 16px; }
}


/* ---------- 6  Ask AI ---------- */

.bp .ask-toggle { position: relative; flex: none; }
/* in the library's search row, at its right end; pressed, it lights like a
   picked folder and its box opens under the row, the list's width */
.bp .find .ask-toggle[aria-expanded="true"], .bp .find .ask-toggle[aria-expanded="true"]:hover { margin: 0; border-color: var(--accent); background: var(--accent); color: var(--ink); }
.bp .ask-panel.open > .ask { margin: 0; }
.bp .ask { gap: 12px; padding: var(--pad); border: 0; border-bottom: 1px solid var(--rule); background: var(--paper); }
.bp .ask-hint { font-size: 14px; }

/* the field, drawn like a selected frame: a light outline with a small
   square handle on each corner, the question in mono */
.bp .ask-bar { position: relative; outline-color: var(--rule); background: var(--paper); }
.bp .ask-bar::before {
  --h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect x='.5' y='.5' width='7' height='7' fill='%23fff' stroke='%23000' stroke-opacity='.25'/%3E%3C/svg%3E");
  content: "";
  position: absolute;
  inset: -4px;
  background: var(--h) 0 0 / 8px no-repeat, var(--h) 100% 0 / 8px no-repeat, var(--h) 0 100% / 8px no-repeat, var(--h) 100% 100% / 8px no-repeat;
  pointer-events: none;
}
.bp .ask-bar:focus-within { transform: none; box-shadow: none; outline-color: var(--ring); }
.bp .ask-bar input { font: 15px var(--text); }   /* the visitor's own words: plain Geist, any language */
.bp .ask-bar input::placeholder { color: var(--muted); }
.bp .ask-bar input:focus-visible { outline: 0; }   /* the frame darkens instead */
/* a phone or tablet: 16px, or iOS zooms the page in when the field is tapped */
@media (max-width: 560px), (pointer: coarse) { .bp .ask-bar input { font-size: 16px; } }
@media (min-width: 561px) { .bp .ask-go { align-self: stretch; padding: 0 16px; } }   /* the button fills the field's height */
@media (max-width: 560px) {   /* on a phone the field is its own frame */
  .bp .ask-bar::before { display: none; }   /* no handles: the bar has no box of its own here */
  .bp .ask-bar input { outline-color: var(--rule); }
  .bp .ask-bar input:focus, .bp .ask-bar input:focus-visible { outline: 1px solid var(--ring); outline-offset: -1px; }
}

/* the examples: light solid chips */
/* the examples as chanhdai.com's tags: border, bg-zinc-50 (zinc-900 in the
   dark), px-1.5 py-0.5, font-mono text-xs, text-muted-foreground */
.bp .ask-try { position: relative; padding: 3px 8px; border: 0; background: var(--accent); color: var(--chip-ink); font: 12px/16px var(--mono); cursor: pointer; transition: color 0.15s, background-color 0.15s; }   /* quiet chips: a soft ground, no frame */
.bp .ask-try:hover, .bp .ask-try:focus-visible { color: var(--ink); background: color-mix(in oklab, var(--ink) 9%, var(--paper)); }
.bp .ask-tries { gap: 6px; }   /* gap-1.5, as between their tags */
@media (max-width: 560px) { .bp .ask-tries { gap: 8px 6px; } }   /* rows of examples a little apart on a phone */


/* ---------- 7  the library: the folders down the left, every link in one list ---------- */

/* one panel, edge to edge of the column: the folders in a ruled column on
   the left, the search and the links beside them */
.bp .lib { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); margin: var(--band) calc(-1 * var(--pad)) 0; border-top: 1px solid var(--rule); }   /* a rule under the band, the library's width */
@media (min-width: 1113px) { .bp .lib { margin-left: calc(-1 * var(--pad) - 1px); margin-right: calc(-1 * var(--pad) - 1px); } }   /* its outer lines on the column's rules */
.bp .side { border-right: 1px solid var(--rule); }
.bp .side-list { position: sticky; top: 0; display: flex; flex-direction: column; padding: 12px 0 16px; }
.bp .side-label { padding: 8px var(--pad) 10px; font: 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.bp .side-list a { display: flex; align-items: center; gap: 8px; padding: 7px var(--pad); font: 15px/1.2 var(--text); color: var(--muted); text-decoration: none; transition: color 0.15s, background-color 0.15s; }
.bp .side-list a:hover, .bp .side-list a:focus-visible { color: var(--ink); background: var(--wash); text-decoration: none; }
.bp .side-list a[aria-current] { color: var(--ink); background: var(--accent); font-weight: 500; }
.bp .side-list a:focus-visible { outline-offset: -1px; }
/* the hover as one highlight that slides between the rows, the folders'
   and the links' (js/resources.js) */
.bp .side-list a, .bp .link, .bp .links { position: relative; }   /* the rows above the highlight, the list its frame */
.bp .slide-hl { position: absolute; top: 0; left: 0; right: 0; height: 0; background: var(--wash); opacity: 0; pointer-events: none; transition: transform 0.25s var(--ease), height 0.25s var(--ease), opacity 0.15s; }
.bp .side-list:has(.slide-hl) a:hover:not(:focus-visible):not([aria-current]),
.bp .links:has(.slide-hl) li:not(.sel) .link:hover:not(:focus-visible) { background: transparent; }
@media (prefers-reduced-motion: reduce) { .bp .slide-hl { transition: opacity 0.15s; } }
.bp .side-label .n, .bp .side-label .side-x { display: none; }   /* the count and Esc belong to the phone's sheet */
.bp .side-list .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* New sits beside the name */
.bp .side .n { flex: none; margin-left: auto; font: 12px/1 var(--mono); color: var(--muted); }
.bp .side-toggle { display: none; }

/* the search: the list's first row */
.bp .find { position: sticky; top: 0; z-index: 3; background: var(--paper); display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 16px 0 24px; border-bottom: 1px solid var(--rule); color: var(--muted); transition: color 0.15s; }
@media (min-width: 1113px) { .bp .find, .bp .ask { background: linear-gradient(var(--paper), var(--paper)) 0 0 / calc(100% - 1px) 100% no-repeat; } }   /* the pinned search leaves the column's right rule showing */
.bp .find:focus-within { color: var(--ink); }
.bp .find .i { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.bp .find input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; font: 18px var(--text); color: var(--ink); -webkit-appearance: none; appearance: none; }
.bp .find input::placeholder { color: var(--muted); }
.bp .find input::-webkit-search-cancel-button { -webkit-appearance: none; }
.bp .find kbd { flex: none; padding: 3px 6px 2px; border: 1px solid var(--line); font: 11px/1 var(--mono); color: var(--muted); }
.bp .find:focus-within kbd { visibility: hidden; }
@media (hover: none) { .bp .find kbd { display: none; } }   /* no keyboard to press it on */
html:not(.js) .bp .find { display: none; }

/* a link a row: the site's icon, its name, large, and New, an arrow on hover */
.bp .links { margin: 0; padding: 0; list-style: none; }
.bp .links li { border-bottom: 1px solid var(--rule); }
.bp .links li:last-child { border-bottom: 0; }
.bp .links li[hidden] { display: none; }
.bp .link { display: grid; grid-template-columns: 28px minmax(0, 1fr) 14px; align-items: center; gap: 16px; box-sizing: border-box; padding: 24px; color: var(--ink); text-decoration: none; transition: background-color 0.15s; }
.bp .link:hover, .bp .link:focus-visible { background: var(--wash); text-decoration: none; }
.bp .link:focus-visible { outline-offset: -1px; }
.bp .link .tile { width: 28px; height: 28px; }   /* the site's icon, as much room round it as above and below */
/* a site's own dark-mode icon, where it has one, in the dark */
.bp .link .fav.fav-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bp .link .tile:has(.fav-dark) .fav:not(.fav-dark) { display: none; }
  :root:not([data-theme="light"]) .bp .link .fav.fav-dark { display: block; }
}
:root[data-theme="dark"] .bp .link .tile:has(.fav-dark) .fav:not(.fav-dark) { display: none; }
:root[data-theme="dark"] .bp .link .fav.fav-dark { display: block; }
.bp .link .fav { display: block; width: 100%; height: 100%; object-fit: contain; }
.bp .link .t { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bp .link .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 24px/28px var(--sans); letter-spacing: 0; -webkit-text-stroke: 0.02em currentColor; }
.bp .link .ds { display: none; }   /* the list is names only; the words show in the preview (and the search still reads them) */
/* a search that finds nothing: the goose out looking with its glass,
   on a grid of dots, and the way to ask for the link */
.bp .none-found { display: flex; flex-direction: column; align-items: center; padding: 56px var(--pad) 64px; text-align: center; background: radial-gradient(circle, color-mix(in oklab, var(--ink) 6%, transparent) 1px, transparent 1.5px) 8px 8px / 16px 16px; }
.bp .none-found[hidden] { display: none; }
.bp .lost { overflow: visible; fill: var(--ink); }
.bp .lost-shadow { fill: var(--ink); opacity: 0.15; transform-box: fill-box; transform-origin: center; }
.bp .lost-glint { fill: var(--muted); opacity: 0.5; }
.bp .lost-q, .bp .lost-dust rect { fill: var(--muted); }
.bp .lost-beak { fill: #f08a24; }   /* the goose's beak: the scene's one colour */
.bp .lost-nostril { fill: #b85f12; }
.bp .lost-eyes { transform-box: fill-box; transform-origin: center; }   /* a blink stays where the eyes are */
.bp .none-found .nf-t { margin: 28px 0 0; font: 500 24px/1.2 var(--sans); letter-spacing: 0; -webkit-text-stroke: 0.02em currentColor; color: var(--ink); }
.bp .none-found .nf-d { max-width: 42ch; margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.bp .nf-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.bp .none-found .say { box-sizing: border-box; height: 32px; padding: 0 12px; gap: 6px; font-size: 13px; }
.bp .nf-clear { position: relative; box-sizing: border-box; height: 32px; padding: 0 12px; border: 1px dashed var(--border); background: none; font: 13px/1 var(--mono); color: var(--muted); cursor: pointer; transition: color 0.15s; }
.bp .nf-clear:hover, .bp .nf-clear:focus-visible { color: var(--ink); }
.bp .nf-clear:hover::before, .bp .nf-clear:focus-visible::before { --c: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .bp .none-found:not([hidden]) .lost-body { animation: lost-float 2.4s steps(2) infinite; }
  .bp .none-found:not([hidden]) .lost-shadow { animation: lost-shadow 2.4s steps(2) infinite; }
  .bp .none-found:not([hidden]) .lost-eyes { animation: lost-look 3.2s steps(1) infinite; }
  .bp .none-found:not([hidden]) .lost-q { animation: lost-blink 1.6s steps(1) infinite; }
  .bp .none-found:not([hidden]) .lost-dust rect { animation: lost-blink 2.2s steps(1) infinite; }
  .bp .lost-dust rect:nth-child(2) { animation-delay: -0.6s !important; }
  .bp .lost-dust rect:nth-child(3) { animation-delay: -1.2s !important; }
  .bp .lost-dust rect:nth-child(4) { animation-delay: -1.7s !important; }
}
@keyframes lost-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
@keyframes lost-shadow { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(0.75); } }
/* the eyes search: left, right, at you, a blink */
@keyframes lost-look { 0%, 24% { transform: translateX(-1px); } 25%, 49% { transform: translateX(1px); } 50%, 74% { transform: translateX(0); } 75%, 79% { transform: translateY(1px) scaleY(0.34); } 80%, 100% { transform: translateX(0); } }
@keyframes lost-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
/* the latest additions, while they're recent */
.bp .new { position: relative; flex: none; padding: 4px 6px 3px; border: 1px dashed var(--border); font: 500 10px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.bp .new::before { --c: var(--ink); --l: 4px; }

/* a phone: the folders behind a button pinned to the foot of the screen
   (the tools step up above it), each link's name over its words */
@media (max-width: 719px) {
  .bp .lib { grid-template-columns: minmax(0, 1fr); }
  .bp .side { border-right: 0; border-bottom: 1px solid var(--rule); }
  .js .bp .side { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--rule); background: var(--paper); }   /* a bar at the foot of the screen, the list behind it */
  .bp .view { animation: none; }   /* its fade would hold the pinned folders inside its own layer, under the page */
  .js .bp .side-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 44px; padding: 0 16px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 14px/1 var(--mono); -webkit-text-stroke: 0.02em currentColor; cursor: pointer; }
  .js .bp .side-toggle .n { color: inherit; opacity: 0.6; -webkit-text-stroke: 0; }
  /* the list as a sheet that rises from the foot of the screen, drawn as the
     rest of the site: the page behind it darkened and hatched like the bands
     between the panels, the sheet flush to the edges, a head like the site's header, the
     rows ruled like the links. It rises, and its top rule draws across as it
     lands */
  .js .bp .side::before { content: ""; position: fixed; inset: 0; background: repeating-linear-gradient(315deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 0 50%) 0 0 / 10px 10px, rgba(0, 0, 0, 0.8); opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease); }
  .js .bp .side.open::before { opacity: 1; pointer-events: auto; }
  .js .bp .side-list { position: fixed; left: 0; right: 0; top: auto; bottom: 0; max-height: 75vh; overflow: auto; overscroll-behavior: contain; padding: 0 0 calc(8px + env(safe-area-inset-bottom)); border: 0; background: var(--paper); visibility: hidden; transform: translateY(100%); transition: transform 0.35s var(--ease), visibility 0s linear 0.35s; }
  .js .bp .side.open .side-list { visibility: visible; transform: none; transition: transform 0.35s var(--ease); }
  .js .bp .side-list .side-label { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; flex: none; height: 52px; box-sizing: border-box; padding: 0 12px 0 var(--pad); border-bottom: 1px solid var(--rule); background: var(--paper); font: 500 20px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); -webkit-text-stroke: 0.02em currentColor; }
  .js .bp .side-list .side-label::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--rule); transform: scaleX(0); transform-origin: left; transition: transform 0s 0.35s; }   /* the top rule */
  .js .bp .side.open .side-label::before { transform: none; transition: transform 0.3s var(--ease) 0.15s; }
  .js .bp .side-list .side-label .n { display: inline; margin-left: 0; -webkit-text-stroke: 0; }
  .js .bp .side-x { display: grid; margin-left: auto; -webkit-text-stroke: 0; }
  .js .bp .side-list a { padding-top: 13px; padding-bottom: 13px; border-bottom: 1px solid var(--rule); }   /* rows a thumb can hit, ruled */
  .js .bp .side-list a:last-child { border-bottom: 0; }
  .js .bp .side-toggle { transition: opacity 0.2s; }
  .js .bp .side.open .side-toggle { opacity: 0; }   /* the sheet takes its place */
  .js .bp .side-list a { padding-top: 13px; padding-bottom: 13px; }   /* rows a thumb can hit */
  .js .bp:has(.side) .tools { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .js body.bp:has(.side) { padding-bottom: calc(65px + env(safe-area-inset-bottom)); }
  .bp .link { grid-template-columns: 24px minmax(0, 1fr); gap: 14px; padding: 18px; }
  .bp .link .tile { width: 24px; height: 24px; }
  .bp .link .nm { font-size: 20px; line-height: 24px; }
  .bp .find { padding-left: 18px; }
  .bp .find input { font-size: 17px; }
}

/* a link's preview: a sheet in from the right (resources.js), the page's
   ruled paper with the link's name and own words in Geist, its facts as
   tags, the way to the site, and its cover */
.pv { position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: var(--pv-w); box-sizing: border-box; overflow-y: auto; --pv-pad: 28px; padding: 0 var(--pv-pad) 40px; border-left: 1px solid var(--rule); background: var(--sheet); box-shadow: -16px 0 48px rgba(0, 0, 0, 0.08); transform: translateX(100%); transition: transform 0.3s var(--ease), width 0.3s var(--ease), padding 0.3s var(--ease); }
.pv.on { transform: none; }
.pv-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; height: 52px; margin: 0 calc(-1 * var(--pv-pad)); padding: 0 16px 0 var(--pv-pad); transition: margin 0.3s var(--ease), padding 0.3s var(--ease); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--sheet); font: 12px/1 var(--mono); color: var(--muted); }
.pv-ctl { display: flex; gap: 8px; }
.bp .pv-x, .bp .side-x, .bp .pv-full { position: relative; display: grid; place-items: center; height: 32px; padding: 0 10px; border: 1px dashed var(--border); background: none; font: 13px/1 var(--mono); letter-spacing: 0.04em; color: var(--muted); cursor: pointer; transition: color 0.15s; }
.bp .pv-x:hover, .bp .pv-x:focus-visible, .bp .side-x:hover, .bp .side-x:focus-visible, .bp .pv-full:hover, .bp .pv-full:focus-visible { color: var(--ink); }
.bp .pv-full { width: 32px; padding: 0; }
.pv-full svg { fill: currentColor; }
.pv-full .in, .pv.full .pv-full .out { display: none; }
.pv.full .pv-full .in { display: block; }
.bp .pv .pv-nm { margin: 48px 0 0; font: 500 44px/1.1 var(--sans); letter-spacing: 0; -webkit-text-stroke: 0.02em currentColor; overflow-wrap: anywhere; }
.bp .pv .pv-ds { margin: 14px 0 0; font: 18px/1.5 var(--text); color: var(--ink); }
/* its folder and date on the left, Visit and Copy on the right, one height */
.pv-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.pv-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-facts > * { padding: 4px 8px 3px; border: 1px solid var(--border); background: var(--tag); font: 12px/16px var(--mono); color: var(--chip-ink); text-decoration: none; }
.pv-facts a:hover, .pv-facts a:focus-visible { border-color: var(--ring); color: var(--ink); text-decoration: none; }
.pv-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.bp .pv-visit { display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; height: 25px; padding: 0 10px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 12px/1 var(--mono); -webkit-text-stroke: 0.02em currentColor; text-decoration: none; transition: background-color 0.15s, border-color 0.15s; }
.bp .pv-visit:hover, .bp .pv-visit:focus-visible { background: var(--ink-90); border-color: var(--ink-90); text-decoration: none; }
.bp .pv-copy { position: relative; box-sizing: border-box; height: 25px; padding: 0 10px; border: 1px dashed var(--border); background: none; font: 12px/1 var(--mono); color: var(--muted); cursor: pointer; transition: color 0.15s; }
.bp .pv-copy:hover, .bp .pv-copy:focus-visible { color: var(--ink); }
.bp .pv-x:hover::before, .bp .pv-x:focus-visible::before, .bp .pv-full:hover::before, .bp .pv-full:focus-visible::before, .bp .side-x:hover::before, .bp .side-x:focus-visible::before, .bp .pv-copy:hover::before, .bp .pv-copy:focus-visible::before { --c: var(--ink); }
/* at the foot of the preview: tell me how this one worked out, on X */
.bp .pv-say { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 56px; margin-top: 32px; padding: 12px 12px 12px 16px; border: 1px dashed var(--border); }   /* a card under the cover, framed as Copy link is */
.bp .pv-say > div { flex: 1 1 260px; min-width: 0; }
.bp .pv-say b { display: block; font: 500 15px/1.4 var(--text); }
.bp .pv .pv-say p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; }
.bp .pv-say .say { box-sizing: border-box; height: 25px; padding: 0 10px; gap: 6px; font-size: 12px; }   /* as small as Visit site above */
.pv-shot { position: relative; margin-top: 32px; aspect-ratio: 1200 / 630; border: 1px solid var(--faint); background: var(--wash); overflow: hidden; }
.pv-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-shot:has(img:not([src])) { display: none; }
.bp .links li.sel .link { background: var(--accent); }
/* on a wide screen the page steps aside for it: the sheet opens beside the
   page, not over it (the tools step aside too) */
:root { --pv-w: min(560px, 100vw); }
@media (min-width: 1100px) {
  :root { --pv-w: 56vw; }   /* 56% of the screen */
  body.bp { transition: padding-right 0.3s var(--ease); }
  .pv-open body.bp { padding-right: var(--pv-w); }
  .pv { box-shadow: none; }
  /* full screen: the panel takes the window, its content stays the width it had, in the middle */
  .pv.full { width: 100vw; --pv-pad: calc((100vw - var(--pv-w)) / 2 + 28px); }
}
@media (max-width: 1099px) { .bp .pv-full { display: none; } }   /* a phone's preview is the whole screen already */
.pv-open .bp .tools { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 719px) { .bp .tools { display: none; } }   /* drawing with a finger fights the scroll: the tools stay on bigger screens */   /* the drawing tools step aside while a preview is open */
/* the column's right rule meets the panel's left one: one line, not two */
@media (min-width: 1113px) and (max-width: 2454px) {
  .pv-open .bp .wrap { border-right-color: transparent; }
  .pv-open .bp .colophon { margin-right: calc(-1 * var(--pad) - 2px); }   /* its cells' right rules slide under the panel's */
}
@media (max-width: 719px) {
  .pv { padding: 0 16px calc(90px + env(safe-area-inset-bottom)); border-left: 0; }   /* room for the actions pinned below */
  /* on a phone Visit and Copy sit at the foot of the screen, bigger, for a thumb */
  .pv-acts { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--sheet); }
  .bp .pv-visit, .bp .pv-copy { justify-content: center; height: 38px; font-size: 14px; }
  .pv-bar { margin: 0 -16px; padding: 0 12px 0 16px; }
  .bp .pv-say { padding: 12px; }
  .bp .pv .pv-nm { margin-top: 32px; font-size: 34px; }
  .bp .pv .pv-ds { font-size: 16px; }
}

/* the hover preview: the link's cover by the pointer (resources.js) */
.peek { position: fixed; left: 0; top: 0; z-index: 20; width: 320px; transform-origin: 50% 0; aspect-ratio: 1200 / 630; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.peek.on { opacity: 1; }
.peek img { display: block; width: 100%; height: 100%; box-sizing: border-box; object-fit: cover; border: 1px solid var(--faint); background: var(--card); }
.peek img:not([src]) { display: none; }
.peek canvas, .pv-shot canvas { position: absolute; inset: 0; display: none; width: 100%; height: 100%; box-sizing: border-box; image-rendering: pixelated; }
.peek canvas { border: 1px solid var(--faint); background: var(--card); }
.peek.px canvas, .pv-shot.px canvas { display: block; }   /* the cover as pixels, coming into focus (js/resources.js) */
.peek.px img, .pv-shot.px img { visibility: hidden; }


/* ---------- 9  feedback panel ---------- */



/* ---------- 10  footer ---------- */

/* the colophon in ruled cells */
.sign { position: relative; }
.sign::before { border-top: 1px solid var(--rule); }
.colophon { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); margin: 0 calc(-1 * var(--pad)); font: 13px/1.85 var(--mono); }
@media (min-width: 700px) { .colophon { grid-template-columns: repeat(4, 1fr); } .colophon .wide { grid-column: span 2; } }
@media (min-width: 1113px) { .colophon { margin-right: calc(-1 * var(--pad) - 1px); } }
.colophon::before, .colophon::after { content: ""; position: absolute; left: -100vw; right: -100vw; height: 1px; background: var(--rule); }
.colophon::before { top: 0; left: 0; right: 0; }   /* the top stays inside the column */
.colophon::after { bottom: 0; }
.colophon > div { padding: 14px var(--pad) 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.colophon dt { margin-bottom: 4px; font: 10px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.colophon dd { margin: 0; }
.colophon dd a { display: table; text-underline-offset: 3px; text-decoration-color: var(--ring); }
.colophon dd a:hover { text-decoration-color: currentColor; }
.colophon .wide dd { display: flex; flex-wrap: wrap; gap: 0 20px; }
.colophon .wide dd a { display: inline; }

/* a small "i" beside a value, its note in a black chip above it (opening
   to the left, so it never runs off a narrow screen), shown on hover or
   keyboard focus */
.colophon dd:has(.info-tip) { display: flex; align-items: center; gap: 8px; }
.info-tip { position: relative; display: flex; }
.info-tip button { display: grid; place-items: center; width: 15px; height: 15px; box-sizing: border-box; padding: 0; border: 1px solid var(--line); background: none; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.info-tip button svg { stroke-width: 3; }
.info-tip:hover button, .info-tip button:focus-visible { border-color: var(--ink); color: var(--ink); }
.info-tip .tip { position: absolute; right: -4px; bottom: calc(100% + 6px); padding: 4px 6px 3px; font: 11px/1 var(--mono); color: var(--paper); background: var(--ink); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.info-tip:hover .tip, .info-tip:focus-within .tip { opacity: 1; }

/* the name in blocks: outside the column, wider than it, centred on the
   window, standing on a baseline that runs the full width of the window,
   with a dimension line under it that carries the signature where its
   measurement would be */
.mark { position: relative; width: min(1280px, calc(100% - 48px)); margin: 72px auto 0; }
.mark .word { display: block; width: 100%; height: auto; }
.mark .fill { fill: url(#hatch); }
.mark pattern path { stroke: var(--line); stroke-width: 0.5; }
.mark .edge { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mark .dim { position: relative; min-height: 64px; padding: 14px 0 24px; }
.mark .dim::before { content: ""; position: absolute; left: -100vw; right: -100vw; top: 0; height: 1px; background: var(--rule); }
.mark .dim::after {
  --arrow-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M.5 3.5 L6.5 .5 V6.5 Z' fill='none' stroke='%239f9fa9'/%3E%3C/svg%3E");
  --arrow-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M6.5 3.5 L.5 .5 V6.5 Z' fill='none' stroke='%239f9fa9'/%3E%3C/svg%3E");
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 14px;
  height: 21px;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  background:
    var(--arrow-l) 1px 50% / 7px 7px no-repeat,
    var(--arrow-r) calc(100% - 1px) 50% / 7px 7px no-repeat,
    linear-gradient(var(--rule), var(--rule)) 0 50% / 100% 1px no-repeat;
}
/* the signature on the line, its ground hiding the line behind it */
.mark .made {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: calc(100% - 40px);
  margin: 0 auto;
  padding: 0 10px;
  background: var(--paper);
  font: 12px/21px var(--mono);
  color: var(--dim);
  text-align: center;
  text-wrap: balance;
}
/* on a phone too the signature sits on the line, in one row: a size that fits the width */
@media (max-width: 639px) { .mark .made { max-width: none; padding: 0 6px; white-space: nowrap; font-size: min(12px, 2.85vw); } }
.mark .heart { display: inline-block; vertical-align: -1px; margin: 0 1px; fill: currentColor; transform-origin: 50% 60%; animation: beat 1.2s ease-in-out infinite; }
/* a heartbeat: two quick beats, then a rest (still with less motion, section 14) */
@keyframes beat {
  0%, 40%, 100% { transform: scale(1); }
  10% { transform: scale(1.3); }
  20% { transform: scale(1.05); }
  30% { transform: scale(1.25); }
}


/* ---------- 11  toolbox ---------- */

/* one ruled panel; the tools in cells split by light rules; each tool's
   name shows as a black chip beside it on hover. It leaves and comes back
   whole: no tool tips over or drops out on its own */
.bp .tools.box { gap: 0; outline: 1px solid var(--rule); outline-offset: 0; background: var(--paper); }
.bp .tools .tool.box { width: 40px; height: 40px; padding: 11px; outline: 0; background: var(--paper); color: var(--muted); }
.pixel .bp .tool .ink, .bp .tool .ink { visibility: visible; }
.bp .tool .ink path { stroke-width: 2; }
.bp .tools .tool, .tools-away .bp .tools .tool { translate: none; rotate: none; transition: color 0.15s, background-color 0.15s; }
.bp .tools .tool + .tool { border-left: 1px solid var(--rule); }
.bp .tools .tool:hover, .bp .tools .tool:focus-visible { color: var(--ink); }
.bp .tools .tool[aria-pressed="true"], .bp .tools .tool[aria-pressed="true"]:hover { color: var(--paper); background: var(--ink); }
.bp .tools .tool.box::before { left: 50%; top: auto; bottom: calc(100% + 8px); transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.bp .tools .tool:hover::before, .bp .tools .tool:focus-visible::before { opacity: 1; }
/* on a wide screen: a column in the right margin, halfway down; scrolling
   down it steps out to the right */
@media (min-width: 1024px) {
  .bp .tools { left: auto; right: 20px; top: 50%; bottom: auto; transform: translateY(-50%); flex-direction: column; }
  .tools-away .bp .tools { translate: calc(100% + 48px) 0; }
  .bp .tools .tool + .tool { border-left: 0; border-top: 1px solid var(--rule); }
  .bp .tools .tool.box::before { left: auto; right: calc(100% + 8px); bottom: auto; top: 50%; transform: translateY(-50%); }
}


/* ---------- 12  buttons, focus, controls ---------- */

/* primary buttons are ink and flat (Ask AI closed, Copy for AI, the
   feedback link): no jump or shadow; pointed at, a dark grey */
.bp .ask-toggle, .bp .ask-go, .bp .say {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  -webkit-text-stroke: 0.02em currentColor;   /* 500 in the one-weight pixel face (section 13a) */
  box-shadow: none;
  transform: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.bp .ask-toggle:hover, .bp .ask-toggle:focus-visible,
.bp .ask-go:hover, .bp .ask-go:focus-visible,
.bp .say:hover, .bp .say:focus-visible { background: var(--ink-90); border-color: var(--ink-90); box-shadow: none; transform: none; }
/* open, the Ask AI tab belongs to its box: paper, with the box's rule */

/* focus: a thin solid ink ring */
.bp :focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.bp .tool:focus-visible { outline-offset: -1px; }

/* every control in Geist too, unless it says otherwise (no specificity) */
:where(.bp) :where(button, input, select, textarea) { font-family: var(--sans); }


/* ---------- 12b  cornered frame: a dashed light border with solid corners
   drawn over it (the social icons, the theme button, the New badge, the
   examples to try) ---------- */

.bp .new::before, .bp .pv-x::before, .bp .pv-full::before, .bp .side-x::before, .bp .pv-copy::before, .bp .pv-say::before, .bp .nf-clear::before {
  --c: var(--muted);
  --l: 5px;
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) 0 0 / 1px var(--l),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) 100% 0 / 1px var(--l),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) 0 100% / 1px var(--l),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) 100% 100% / 1px var(--l);
  background-repeat: no-repeat;
}


/* ---------- 13a  medium: the pixel face has one weight, so the titles at
   500 get a hairline stroke, in step with their size (0.3px at 16px) ---------- */

.bp .head h1, .bp .colophon dd, .bp .tabs a, .bp .tabs .tab-soon { -webkit-text-stroke: 0.02em currentColor; }
.bp .colophon dd .info-tip { -webkit-text-stroke: 0; }   /* the info button and its tip stay light */
.bp .colophon dd { letter-spacing: 0.8px; }   /* the stroked values, given a little air */


/* ---------- 13b  body text: plain Geist, one size for every paragraph ---------- */

/* 16px, 14px on a phone (as Akira does); after the rules above so it wins */
.bp p:not(.made) { font-family: var(--text); font-size: 16px; }
@media (max-width: 639px) { .bp p:not(.made) { font-size: 14px; } }


/* ---------- 14  less motion ---------- */

/* for whoever asked their system for less: no hover tilts, slides or fades
   (the theme switch checks this itself) */
@media (prefers-reduced-motion: reduce) {
  .bp *, .bp *::before, .bp *::after, .peek { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}


/* ---------- 15  the scrollbar: a thin square bar in the sheet's greys ---------- */

/* its colours sit on the root, where the window's own bar reads them */
:root:has(body.bp) { --sb: #171a1d; --sb-hover: #3a3d40; }   /* the ink: the bar reads at a glance */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):has(body.bp) { --sb: #fafafa; --sb-hover: #d4d4d8; } }
:root[data-theme="dark"]:has(body.bp) { --sb: #fafafa; --sb-hover: #d4d4d8; }
/* WebKit and Blink draw it from these (Safari, Chrome, Edge): square, inset
   from the edge by a clear border */
:root:has(body.bp)::-webkit-scrollbar, .bp ::-webkit-scrollbar { width: 6px; height: 6px; }
:root:has(body.bp)::-webkit-scrollbar-track, .bp ::-webkit-scrollbar-track, :root:has(body.bp)::-webkit-scrollbar-corner, .bp ::-webkit-scrollbar-corner { background: transparent; }
:root:has(body.bp)::-webkit-scrollbar-thumb, .bp ::-webkit-scrollbar-thumb { background: var(--sb) padding-box; border: 1px solid transparent; border-radius: 0; }   /* plain ink */
/* with a preview open its own bar is the one: the page's steps aside, so
   the two don't stand side by side at the window's edge */
:root.pv-open:has(body.bp) { scrollbar-width: none; }
:root.pv-open:has(body.bp)::-webkit-scrollbar { width: 0; }
/* Firefox has only a colour and a width */
@supports not selector(::-webkit-scrollbar) {
  :root:has(body.bp), .bp * { scrollbar-width: thin; scrollbar-color: var(--sb) transparent; }
}
.bp .ask .ask-hint { font-size: 15px; }   /* the Ask box's hint, a touch under the body size */
@media (max-width: 560px) { .bp .ask .ask-hint { font-size: 13px; } }
