/* Allo 1.0.3: the variable font (optical size, weight, roundness) and the nine obliques. SIL Open Font License 1.1. https://allo.joshpuckett.me */

@font-face {
  font-family: "Allo";
  src: url("/_site/allo-1.0.3/AlloVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Allo";
  src: url("/_site/allo-1.0.3/Allo-ThinOblique.woff2") format("woff2");
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Allo";
  src: url("/_site/allo-1.0.3/Allo-ExtraLightOblique.woff2") format("woff2");
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Allo";
  src: url("/_site/allo-1.0.3/Allo-LightOblique.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Allo";
  src: url("/_site/allo-1.0.3/Allo-Oblique.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Allo";
  src: url("/_site/allo-1.0.3/Allo-MediumOblique.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Allo";
  src: url("/_site/allo-1.0.3/Allo-SemiBoldOblique.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Allo";
  src: url("/_site/allo-1.0.3/Allo-BoldOblique.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Allo";
  src: url("/_site/allo-1.0.3/Allo-ExtraBoldOblique.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Allo";
  src: url("/_site/allo-1.0.3/Allo-BlackOblique.woff2") format("woff2");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

/*
  The base every page shares (index.html, signin.html): the two themes' tokens, the icon stroke, the page.
  site/boot.js sets data-theme (and data-auth) on <html> before the first paint.
*/
/* Bencho's two themes, measured from bencho.dev: dark (the default) and light. Everything faint is the
   ink at a low alpha (--ink-rgb), so most of the page turns over with these few values; the rest are the
   surfaces that sit on pictures or float over the page */
:root {
  --bg: #0a0a0a;
  --bg-rgb: 10, 10, 10;
  --ink: #ffffff;
  --ink-rgb: 255, 255, 255;
  --ink-3: #989898;        /* nav links, icons */
  --ink-4: #898989;        /* search placeholder */
  --wash: 0.055;           /* search pill */
  --solid-hover: #ebebeb;  /* the solid (ink) buttons on hover */
  --thumb: rgba(255, 255, 255, 0.1);                 /* a toggle switch's thumb, and pills on a card */
  --glass: rgba(28, 28, 30, 0.72);                   /* the header's pills once the page has scrolled */
  --veil: rgba(20, 20, 22, 0.72);                    /* a pill or button over a picture */
  --veil-hover: rgba(36, 36, 38, 0.86);
  --menu: rgba(24, 24, 26, 0.94);                    /* menus and popovers */
  --edge-rgb: 255, 255, 255;                         /* a picture's hairline edge */
  --shadow-rgb: 0, 0, 0;
  --shadow-k: 1;                                     /* how strong shadows are */
  --scrim: rgba(0, 0, 0, 0.55);
  --danger: #ff6369;                                 /* a wrong code's edges, an error's icon */
  --glass-shadow: 0 0 0 1px rgba(var(--ink-rgb), 0.06), 0 2px 10px rgba(var(--shadow-rgb), calc(0.25 * var(--shadow-k)));
  color-scheme: dark;
}
/* light, after bencho.dev's: white, a near-black ink with warm greys under it, white thumbs and floating
   surfaces, and shadows at about a third of their dark strength (on white they read much stronger) */
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-rgb: 255, 255, 255;
  --ink: #17181a;
  --ink-rgb: 23, 24, 26;
  --ink-3: #5c5b56;
  --ink-4: #6f6e68;
  --wash: 0.06;
  --solid-hover: #2e2f33;
  --thumb: #ffffff;
  --glass: rgba(255, 255, 255, 0.72);
  --veil: rgba(255, 255, 255, 0.8);
  --veil-hover: rgba(255, 255, 255, 0.94);
  --menu: rgba(255, 255, 255, 0.96);
  --edge-rgb: 0, 0, 0;
  --shadow-rgb: 23, 24, 26;
  --shadow-k: 0.35;
  --scrim: rgba(23, 24, 26, 0.28);
  --danger: #e5484d;
  color-scheme: light;
}
/* switching theme turns everything over at once: no colour transitions smearing across the page */
.theme-swap *, .theme-swap *::before, .theme-swap *::after { transition: none !important; }
* { box-sizing: border-box; }
/* One icon stroke across the platform: every line icon renders its stroke at 1.5px on screen, whatever
   size it's drawn at (bencho and marked.dev both render theirs at 1.5px; it sits with the 14px/500
   labels). non-scaling-stroke keeps the width in screen pixels. The two self-drawing checks (.t-check,
   .t-success-check) keep their own widths, as their draw-in is measured along the path */
svg[stroke] :is(path, line, circle, polyline, rect):not(:is(.t-check, .t-success-check) *) {
  vector-effect: non-scaling-stroke;
  stroke-width: 1.5px;
}
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 13px/1.5 "Allo", system-ui, "Helvetica Neue", Arial, sans-serif;
  font-variation-settings: "ROND" 0;   /* Allo's roundness: 0 sharp, 50 its default "friendly", 100 round */
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }

:root { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); }   /* the strong ease-out: entrances, presses */

/* a pill toggle (site/modules/toggle-switch.js): the options in the faint wash, the thumb behind the chosen one.
   The header's menu and Explore's sections have their own copies; this one serves the user menu's Theme */
.pill-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), var(--wash));
  outline: 1px solid transparent;           /* still draws an edge in forced-colours mode */
  outline-offset: -1px;
  user-select: none;
  touch-action: pan-y;
}
.pill-toggle__opt {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 14px;                           /* (14, as every word you tap: DESIGN.md › Typography) */
  font-weight: 500;
  letter-spacing: -0.006em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 80ms;
}
.pill-toggle__opt[aria-pressed="true"] { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .pill-toggle__opt:not([aria-pressed="true"]):hover { color: var(--ink); } }
.pill-toggle__opt:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(var(--ink-rgb), 0.35); }
.switch-thumb {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 999px;
  background: var(--thumb);
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), calc(0.3 * var(--shadow-k)));
  pointer-events: none;
}

/* a face we don't have: the initial, plain, on a disc a step lighter than what it sits on (the ink at 10%,
   so it works on any surface in either theme), the letter a bold light grey. No colour and no edge: it's a
   stand-in, and stays quiet beside the real faces. (The class twice: it outweighs the grey a placeholder's
   own rule gives it underneath). The tint sits on the surface it's drawn on, so the disc is solid: where
   faces overlap (a collection's makers), the one under it doesn't show through */
.av-fill.av-fill {
  background: linear-gradient(rgba(var(--ink-rgb), 0.1), rgba(var(--ink-rgb), 0.1)), var(--surface, var(--bg));
  color: rgba(var(--ink-rgb), 0.7);
  font-weight: 600;
  outline: 0;
  box-shadow: none;
}

/* ==========================================================================
   Explore: the open library, right under the hero (index.html, site/modules/explore.js).
   A masonry of reference tiles after marked.dev/explore, in the page's own dark style: each tile keeps its
   media's shape, plays its preview silently while it is on screen, and shows its title on hover (its makers are in the detail).
   While the library loads, the grid is already laid out in placeholder tiles of the right shapes, so
   nothing jumps when the pictures arrive; each picture then fades in out of a light blur.
   ========================================================================== */

.explore {
  --tile-gap: 12px;
  --tile-radius: 16px;
  --ease-out: var(--ease-out);
  position: relative;
  min-height: 100svh;      /* a short or empty section never shrinks the page under you: the bar stays put */
  padding: 8px 20px 24px;              /* (the foot's card follows, 24px further down: 48px in all; 32px on a phone) */
  scroll-margin-top: 72px; /* a search scrolls the section to just under the header */
}
@media (max-width: 520px) { .explore { --tile-gap: 10px; --tile-radius: 14px; padding: 4px 12px 20px; } }

/* ---------- The bar: the sections first, the toggle switch (site/modules/toggle-switch.js), the header menu's pill
   and thumb, since it decides everything after it; then a hairline, the filter pills and the order ---------- */
.explore-bar { display: flex; align-items: center; min-height: 40px; }
.explore-tabs {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), var(--wash));
  /* no hairline: the wash alone, like the header's pills */
  outline: 1px solid transparent;          /* still draws an edge in forced-colours mode */
  outline-offset: -1px;
  user-select: none;
  touch-action: pan-y;                      /* a sideways drag moves the thumb, not the page */
}
/* before the switch's script has put its thumb in (the page's first frames), the chosen word wears the
   thumb's fill itself, so the switch looks the same from the first frame */
.explore-tabs:not(:has(.switch-thumb)) .explore-tab[aria-pressed="true"] {
  background: var(--thumb);
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), calc(0.3 * var(--shadow-k)));
  color: var(--ink);
}
/* and a stand-in holds the place of the pill at the bar's far end (the order menu: 152px; on a phone the
   Filters button: 90px, or its 40px icon under 380px) until site/modules/explore.js puts the real one there */
.explore-bar__ghost { flex: none; width: 152px; height: 40px; margin-left: auto; border-radius: 999px; background: rgba(var(--ink-rgb), var(--wash)); }
@media (max-width: 640px) { .explore-bar__ghost { width: 90px; } }
@media (max-width: 379px) { .explore-bar__ghost { width: 40px; } }
.explore-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 80ms;                   /* brightens as the thumb arrives, like the header's */
}
.explore-tab[aria-pressed="true"] { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .explore-tab:not([aria-pressed="true"]):hover { color: var(--ink); } }
.explore-tab:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ink-rgb), 0.35); }

.explore-rule { flex: none; width: 1px; height: 20px; margin: 0 20px; background: rgba(var(--ink-rgb), 0.12); }

/* the sort menu: a pill at the bar's end, dressed like the filter pills (see "the filter pills" below),
   and a small frosted menu that opens from it */
.explore-sortmenu { position: relative; flex: none; margin-left: auto; padding-left: 16px; }
.explore-sortmenu[data-open] .explore-sortbtn__chev { rotate: 180deg; }
.explore-sortbtn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ink-rgb), 0.35); }

.explore-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 184px;
  padding: 4px;
  border: 1px solid transparent;          /* still draws an edge in forced-colours mode */
  border-radius: 14px;                    /* the items' 10px plus the 4px inset */
  background: var(--menu);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 8px 24px rgba(var(--shadow-rgb), calc(0.4 * var(--shadow-k))), 0 2px 6px rgba(var(--shadow-rgb), calc(0.3 * var(--shadow-k)));
  transform-origin: top right;            /* it opens out of its button */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease-out, visibility 0s linear 0.1s;
}
.explore-sortmenu[data-open] .explore-menu { opacity: 1; visibility: visible; transition: opacity 0.15s var(--ease-out), visibility 0s; }
@media (prefers-reduced-motion: no-preference) {
  .explore-menu { scale: 0.97; transition: opacity 0.1s ease-out, scale 0.1s ease-out, visibility 0s linear 0.1s; }
  .explore-sortmenu[data-open] .explore-menu { scale: 1; transition: opacity 0.15s var(--ease-out), scale 0.15s var(--ease-out), visibility 0s; }
}
.explore-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.explore-menu__item[aria-checked="true"] { color: var(--ink); }
.explore-menu__check { opacity: 0; }
.explore-menu__item[aria-checked="true"] .explore-menu__check { opacity: 1; }
.explore-menu__item:focus-visible { outline: none; background: rgba(var(--ink-rgb), 0.08); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .explore-menu__item:hover { background: rgba(var(--ink-rgb), 0.06); color: var(--ink); } }

@media (max-width: 520px) {
  .explore-tab { padding: 0 12px; font-size: 13px; }
}

/* ---------- The grid: columns filled shortest-first by site/modules/explore.js ---------- */
.explore-grid { display: flex; align-items: flex-start; gap: var(--tile-gap); margin-top: 24px; }   /* 24px under the bar */
.explore-col { display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; gap: var(--tile-gap); }

/* ---------- A tile ---------- */
.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--tile-radius);
  background: rgba(var(--ink-rgb), 0.045);
  color: inherit;
  text-decoration: none;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
/* the image's edge: a hairline in white at 10%, inset, so light and dark pictures both hold their shape */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(var(--edge-rgb), 0.08);
  pointer-events: none;
}
.tile:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.6); outline-offset: 3px; }

/* The placeholder (the tile's own shape in a faint fill), after transitions.dev's skeleton loader: it
   breathes, its tone going a step deeper and back (1s, ease-in-out, as theirs), and a soft highlight sweeps
   across it (2s, two breaths to a sweep). In the dark theme the highlight is a little white; on the light page it is the page's
   own white passing over the grey, which reads as a sheen. Every tile keeps the same beat, a little after its
   neighbour (--shine-delay, site/skeleton.js), so the grid ripples rather than blinks. When the picture is
   in, the placeholder fades out as the picture comes in out of its light blur. Reduced motion: it is still */
.tile__shine {
  --sheen: rgba(255, 255, 255, 0.075);
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  transition: opacity 0.3s var(--ease-out);
}
:root[data-theme="light"] .tile__shine { --sheen: rgba(255, 255, 255, 0.8); }
.tile__shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(var(--ink-rgb), 0.04);
  opacity: 0;
}
.tile__shine::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 60%;
  background: linear-gradient(100deg, transparent, var(--sheen), transparent);
  translate: -100% 0;
}
@media (prefers-reduced-motion: no-preference) {
  .tile__shine::before { animation: tile-shine 2s linear infinite; animation-delay: var(--shine-delay, 0s); }
  .tile__shine::after { animation: tile-pulse 1s ease-in-out infinite; animation-delay: var(--shine-delay, 0s); }
}
@keyframes tile-shine { to { translate: 260% 0; } }
@keyframes tile-pulse { 50% { opacity: 1; } }
.tile[data-loaded] .tile__shine { opacity: 0; }

/* the picture and its preview: they fade in out of a light blur as soon as the picture is in */
.tile__media {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .tile__media { filter: blur(4px); transition: opacity 0.3s var(--ease-out), filter 0.3s var(--ease-out); transition-delay: var(--in-delay, 0ms); }
}
@media (prefers-reduced-motion: reduce) { .tile__media { transition: opacity 0.2s ease; } }
.tile[data-loaded] .tile__media--poster { opacity: 1; filter: none; }
/* the preview takes over from the poster once it is actually playing, so there is never a black frame */
.tile__media--video { z-index: 2; }
.tile[data-playing] .tile__media--video { opacity: 1; filter: none; transition-delay: 0ms; }

/* the title, bottom left, in a frosted pill, on a mouse only on hover (the makers live in the detail) */
.tile__credit {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  max-width: calc(100% - 20px);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.tile[data-loaded] .tile__credit { opacity: 1; }
.tile__title {
  overflow: hidden;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--veil);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 13px;                          /* one title style: the same as a collection's name */
  font-weight: 500;
  letter-spacing: -0.006em;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0;
  translate: -4px 0;
  transition: opacity 0.15s ease, translate 0.15s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover .tile__title, .tile:focus-visible .tile__title { opacity: 1; translate: 0 0; }
}

/* ---------- An empty grid (site/modules/explore.js empty()): a title, one line under it, centred, and for a section
   with nothing in it yet its icon on a soft disc above (the search pill's wash, the icon in the nav's grey).
   No button: the bar right above is the way on ---------- */
.explore-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 96px 16px;
  text-align: center;
}
.explore-empty p { margin: 0; max-width: 44ch; text-wrap: balance; }
.explore-empty__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(var(--ink-rgb), var(--wash));
  color: var(--ink-3);
}
.explore-empty__title { color: var(--ink); font-size: 16px; font-weight: 500; letter-spacing: -0.011em; line-height: 1.3; }
.explore-empty .explore-empty__line { margin-top: 6px; color: var(--ink-3); font-size: 14px; line-height: 1.45; }
@media (max-width: 520px) { .tile__credit { left: 8px; bottom: 8px; } }

/* ==========================================================================
   Collections, after cosmos.so/explore: above the bar, as the page's way in, under its own heading, so
   the page reads like a magazine section, not a wall of controls. The bar then sits right on the grid.
   ========================================================================== */
.ed-picks { margin: 0 0 32px; }
.ed-picks[hidden] { display: none; }
.ed-h { margin: 0 0 14px; color: var(--ink); font-size: 18px; font-weight: 550; letter-spacing: -0.015em; line-height: 1.3; }   /* (the titles' one weight, as the sheet's and the detail's) */

/* ---- Collections: picture cards, sideways ---- */
.ed-picks__track {
  display: flex;
  gap: 12px;
  margin: -9px -20px -5px;                  /* 9px of room above and below for the chosen card's ring and */
  padding: 9px 20px 9px;                    /* its focus ring outside it (9px out), which the sideways scroll would otherwise clip */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  scrollbar-width: none;
}
.ed-picks__track::-webkit-scrollbar { display: none; }
/* the row's scroll fade, as every other (32px, at the end that has more beyond it: site/modules/explore.js) */
.ed-picks__track[data-fade="end"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.ed-picks__track[data-fade="start"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px); mask-image: linear-gradient(to right, transparent, #000 32px); }
.ed-picks__track[data-fade="both"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
/* a card, kept calm beside the hero and the grid: 7:5, a touch taller than the grid tiles' 16:10,
   a grey card (the buttons' faint wash, no edge). Its cover sits in the middle of the space above the name
   at its own shape, never cropped, with grey all round; the name bottom left in plain text, no count */
.pick {
  position: relative;
  flex: none;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  width: 300px;
  aspect-ratio: 7 / 5;                      /* a touch taller than the tiles' 16:10, room for the stack */
  padding: 20px 20px 14px;                  /* the name starts 20px in and 14px up: where a tile's title text sits */
  border-radius: var(--tile-radius);
  background: rgba(var(--ink-rgb), var(--wash));
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
}
.pick__media {
  position: relative;
  min-height: 0;                            /* the pictures never stretch the card */
}
/* the stack, a peek (plans/018): the set's first three pictures behind one another, the front one whole at
   its own shape (--r, its ratio), the two behind it in the same frame (cropped to it) so their top edges
   show evenly above it: 90% and 80% of its size, 10px and 20px higher, dimmer the further back. The frame
   fits the area with room for the peeks, centred, set 10px low so the peeks sit in the middle too.
   data-k is a picture's place (0 at the front); --lift (px, site/modules/explore.js) raises one on hover and
   brightens it a touch; it moves on the site's spring, so the transform has no transition */
.pick__img {
  --y: 0px; --s: 1; --b: 1; --lift: 0;
  --pw: 172.8px; --ph: 109px;              /* the frame's widest and tallest */
  position: absolute;
  left: 50%;
  top: calc(50% + 10px);
  display: block;
  width: min(var(--pw), calc(var(--ph) * var(--r)));   /* a fixed frame, so a bigger card only adds room around it */
  aspect-ratio: var(--r);
  height: auto;
  object-fit: cover;
  border-radius: 6px;
  outline: 1px solid rgba(var(--edge-rgb), 0.08);   /* the picture's edge, as on the tiles */
  outline-offset: -1px;
  translate: -50% -50%;
  transform-origin: 50% 0;                  /* scaled from its top edge, so the peeks keep their spacing */
  transform: translateY(calc(var(--y) - var(--lift) * 1px)) scale(var(--s));
  filter: brightness(min(1, calc(var(--b) + var(--lift) * 0.025)));
  pointer-events: none;                     /* the pictures take no input: the card's link takes the click */
  user-select: none;
  -webkit-user-drag: none;
}
.pick__img[data-k="1"] { --y: -10px; --s: 0.9; --b: 0.7; }
.pick__img[data-k="2"] { --y: -20px; --s: 0.8; --b: 0.5; }
.pick__text { display: flex; min-width: 0; margin: 0 0 -4px -10px; }   /* the pill sits 10px in from the corner, as a tile's title does, so its text sits 20px in and 14px up */
/* the name in a pill, the tiles' title shape and type, always shown. The tiles' dark frosted fill vanishes
   on the card's grey, so the pill wears the toggle's thumb (index.html .switch-thumb): 0.1 on the card's
   0.055 wash, as the thumb sits on the track; no shadow, the cards have none */
.pick__name { overflow: hidden; padding: 4px 10px; border-radius: 999px; background: var(--thumb); color: var(--ink); font-size: 13px; font-weight: 500; letter-spacing: -0.006em; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
@media (hover: hover) and (pointer: fine) { .pick:hover { background: rgba(var(--ink-rgb), 0.1); } }
/* the placeholder card (before the library arrives): the card's own size and fill, the grid placeholders'
   band of light (.tile__shine) passing over it, and nothing to hover or press */
.pick--placeholder { overflow: hidden; pointer-events: none; }
.pick--placeholder .tile__shine { border-radius: inherit; }
/* a picture fades in once it's in (data-loaded, site/modules/explore.js), on the tiles' 0.3s ease-out; opacity only,
   since the filter carries the stack's dimming and the hover's spring */
.pick__img { opacity: 0; transition: opacity 0.3s var(--ease-out); }
.pick__img[data-loaded] { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .pick { transition: background-color 0.15s ease, scale 0.15s ease-out; }
  .pick:active { scale: 0.98; }
}
.pick:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.6); outline-offset: 3px; }


/* ---- a tile: dims a touch on hover and offers Save, top right ---- */
.tile__link { position: absolute; inset: 0; z-index: 5; border-radius: inherit; background: rgba(0, 0, 0, 0); transition: background-color 0.15s ease; }
.tile__link:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(var(--ink-rgb), 0.7); }
.tile__save {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;          /* still draws an edge in forced-colours mode */
  border-radius: 999px;
  background: var(--veil);                 /* the frosted pill of the tiles' title */
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
/* the two bookmarks, stacked: the outline at rest, the filled one once saved (a cross-fade with a touch of
   scale and blur, 300ms; reduced motion keeps only the fade) */
/* the icon at about 40% of the circle: the bookmark is a tall shape (its outline fills 83% of the icon's
   height), so at 18px in 32px, or 16px in 30px on a phone, its top corners crowded the curve. 16px in 36px
   (14px in 32px on a phone) leaves the corners clear of the circle. The stroke is set so it renders about
   1.2px at either size, the weight of the 14px labels beside it */
.tile__save-icon { grid-area: 1 / 1; width: 16px; height: 16px; stroke-width: 1.8; transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1); }
.tile__save-icon--on { opacity: 0; }
.tile__save[aria-pressed="true"] .tile__save-icon { opacity: 0; }
.tile__save[aria-pressed="true"] .tile__save-icon--on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .tile__save-icon { transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1), scale 0.3s cubic-bezier(0.2, 0, 0, 1), filter 0.3s cubic-bezier(0.2, 0, 0, 1); }
  .tile__save-icon--on { scale: 0.25; filter: blur(4px); }
  .tile__save[aria-pressed="true"] .tile__save-icon { scale: 0.25; filter: blur(4px); }
  .tile__save[aria-pressed="true"] .tile__save-icon--on { scale: 1; filter: blur(0); }
  .tile__save { transition: opacity 0.15s ease, background-color 0.15s ease, scale 0.15s ease-out; }
  .tile__save:active { scale: 0.96; }
}
/* shown on hover or focus; a saved tile keeps it, so you can see what you've saved */
.tile:focus-within .tile__save, .tile__save[aria-pressed="true"] { opacity: 1; }
.tile__save:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .tile:hover .tile__link { background: rgba(0, 0, 0, 0.18); }
  .tile:hover .tile__save { opacity: 1; }
  .tile__save:hover { background: var(--veil-hover); }
}

/* ---- a phone ---- */
@media (max-width: 520px) {
  .ed-h { font-size: 16px; }
  .ed-picks__track { margin: 0 -12px; padding: 0 12px 4px; scroll-padding-inline: 12px; gap: 12px; }
  .pick { width: 248px; padding: 20px 18px 12px; }   /* the tiles' title sits 8px in on a phone */
  .pick__img { --pw: 141px; --ph: 77px; }
  .ed-picks[hidden] ~ .explore-grid { margin-top: 16px; }   /* with no Collections above, the grid sits a touch closer to the bar */
  .tile__save { top: 8px; right: 8px; width: 32px; height: 32px; }
  .tile__save-icon { width: 14px; height: 14px; stroke-width: 2; }
}

/* ==========================================================================
   The filter pills, after Mobbin's. After the switch and its hairline: the filters (Type, Style), then the
   order menu at the far end, every one a pill the size and style of the switch (40px, the faint fill).
   ========================================================================== */
.explore-filters { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fx { position: relative; flex: none; }
.fx[hidden] { display: none; }

/* the pills: a filter button, and the sort button in the same dress */
.fx-btn, .explore-sortmenu .explore-sortbtn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 16px;                  /* a touch less on the chevron's side */
  border: 1px solid transparent;   /* no visible edge, like the header's pills; the transparent 1px keeps the size and still draws in forced colours */
  border-radius: 999px;
  background: rgba(var(--ink-rgb), var(--wash));
  color: var(--ink-3);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.explore-sortmenu .explore-sortbtn { color: var(--ink); }
.fx-btn .explore-sortbtn__chev, .explore-sortmenu .explore-sortbtn__chev { color: var(--ink-3); transition: rotate 0.15s var(--ease-out); }
.fx[data-open] .fx-btn, .explore-sortmenu[data-open] .explore-sortbtn { color: var(--ink); background: rgba(var(--ink-rgb), 0.1); }
.fx[data-open] .explore-sortbtn__chev { rotate: 180deg; }
@media (hover: hover) and (pointer: fine) {
  .fx-btn:hover, .explore-sortmenu .explore-sortbtn:hover { color: var(--ink); background: rgba(var(--ink-rgb), 0.1); }
}
.fx-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ink-rgb), 0.35); }
@media (prefers-reduced-motion: no-preference) {
  .fx-btn { transition: color 0.15s ease, background-color 0.15s ease, scale 0.15s ease-out; }
  .fx-btn:active, .explore-sortmenu .explore-sortbtn:active { scale: 0.96; }
}
/* how many are ticked: a small filled count, like a badge */
.fx-btn__count {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin: 0 -2px 0 -2px;
  line-height: 1;
  text-box: trim-both cap alphabetic;      /* centre the digit itself, not its line box */
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.fx-btn__count[hidden] { display: none; }

/* the panel: search, then the values as checkboxes */
.fx-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: 264px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 16px;                    /* the rows' 10px plus the 6px inset */
  background: var(--menu);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 12px 32px rgba(var(--shadow-rgb), calc(0.45 * var(--shadow-k))), 0 2px 6px rgba(var(--shadow-rgb), calc(0.3 * var(--shadow-k)));
  transform-origin: top left;             /* it opens out of its button */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease-out, visibility 0s linear 0.1s;
}
.fx[data-open] .fx-panel { opacity: 1; visibility: visible; transition: opacity 0.15s var(--ease-out), visibility 0s; }
@media (prefers-reduced-motion: no-preference) {
  .fx-panel { scale: 0.97; transition: opacity 0.1s ease-out, scale 0.1s ease-out, visibility 0s linear 0.1s; }
  .fx[data-open] .fx-panel { scale: 1; transition: opacity 0.15s var(--ease-out), scale 0.15s var(--ease-out), visibility 0s; }
}
.fx-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  margin-bottom: 4px;
  border-radius: 10px;
  background: rgba(var(--ink-rgb), 0.06);
  color: var(--ink-4);
}
.fx-search svg { flex: none; }
.fx-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.fx-search input::placeholder { color: var(--ink-4); }
.fx-search input::-webkit-search-cancel-button { display: none; }
.fx-search:focus-within { background: rgba(var(--ink-rgb), 0.09); }
.fx-list { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.fx-group { padding: 10px 10px 4px; color: var(--ink-4); font-size: 12px; font-weight: 500; }
.fx-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.1s ease, background-color 0.1s ease;
}
.fx-opt[aria-checked="true"] { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .fx-opt:hover { background: rgba(var(--ink-rgb), 0.06); color: var(--ink); } }
.fx-opt:focus-visible { outline: none; background: rgba(var(--ink-rgb), 0.08); color: var(--ink); }
.fx-opt__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-opt__count { color: var(--ink-4); font-size: 12px; font-variant-numeric: tabular-nums; }
/* the box: an outline, filled in the page's ink once ticked, then the tick draws in. This is
   transitions.dev's "Checkbox check" (.t-check, with its motion tokens), on our box */
:root {
  --check-box: 150ms;
  --check-draw: 350ms;
  --check-delay: 0ms;
  --check-uncheck: 150ms;
  --check-ease: var(--ease-out);
}
.fx-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px rgba(var(--ink-rgb), 0.28);
  color: var(--bg);
}
.t-check {
  transition:
    background var(--check-box) var(--check-ease),
    box-shadow var(--check-box) var(--check-ease);
}
.t-check svg path {
  stroke-dasharray: var(--check-len, 15);
  stroke-dashoffset: var(--check-len, 15);
  transition: stroke-dashoffset var(--check-uncheck) var(--check-ease);
}
.fx-opt[aria-checked="true"] .t-check svg path,
.detail__pick[aria-pressed="true"] .t-check svg path {   /* the same box in the detail's "Save to" */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--check-draw) var(--check-ease) var(--check-delay);
}
.fx-opt[aria-checked="true"] .fx-box, .detail__pick[aria-pressed="true"] .fx-box { background: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .t-check, .t-check svg path { transition: none; }
}
.fx-none { margin: 0; padding: 12px 10px; color: var(--ink-4); font-size: 13px; }

/* a search field only for long lists (site/modules/explore.js, renderList) */
.fx-search[hidden] { display: none; }

/* ==========================================================================
   Each filter pill carries its own values. Empty, it reads "Style ⌄"; once something is ticked it names
   the value ("Minimal"), or for two or more the filter with a count badge ("Style (2)"), and its chevron
   gives way to a cross that clears it, so the bar stays one row.
   ========================================================================== */
.explore .fx-btn__count { display: none; }
.fx-btn__value { color: var(--ink); }
.fx-btn__value[hidden], .fx-clear[hidden] { display: none; }
/* the cross is a 24px circle 8px in from the end (concentric with the 40px pill). The label stops 36px
   from the end: ~12px from the cross itself, and 5px clear of its hover circle, so the circle never
   touches the text */
.explore .fx[data-active] .fx-btn { color: var(--ink-3); padding-right: 36px; }
.explore .fx[data-active] .explore-sortbtn__chev { display: none; }
.fx-btn__value { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.fx-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.fx-clear svg { display: block; width: 20px; height: 20px; }
/* the circle is 24px, but the tap target reaches the pill's end and its full height (40 x 36) */
.fx-clear::after { content: ''; position: absolute; inset: -8px -8px -8px -4px; border-radius: 999px; }
@media (hover: hover) and (pointer: fine) { .fx-clear:hover { color: var(--ink); background: rgba(var(--ink-rgb), 0.12); } }
.fx-clear:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(var(--ink-rgb), 0.5); }
@media (prefers-reduced-motion: no-preference) {
  .fx-clear { transition: color 0.15s ease, background-color 0.15s ease, scale 0.15s ease-out; }
  .fx-clear:active { scale: 0.9; }
}

/* an active pill shows its value in place of its name ("Sites"; "Style" and the badge for two or more) */
.explore .fx[data-active] .fx-btn__name { display: none; }

/* a long list in a filter panel fades at the edge that has more (site/modules/explore.js sets data-fade) */
.fx-list[data-fade="end"] { mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); }
.fx-list[data-fade="start"] { mask-image: linear-gradient(to bottom, transparent, #000 32px); }
.fx-list[data-fade="both"] { mask-image: linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 32px), transparent); }

/* two or more values: the filter's name and the count in the filled badge, "Style (2)" (site/modules/explore.js,
   renderFacets) */
.explore .fx[data-active] .fx-btn__count:not([hidden]) { display: grid; }

/* when the row runs out of room above phone width, the pills drop to their own row and scroll sideways,
   fading where there's more, and an open panel is fixed to the screen under its button (site/modules/explore.js:
   fitBar sets .explore--wrap, placePanel places the panel) */
.explore--wrap .explore-bar { flex-wrap: wrap; row-gap: 8px; }
.explore--wrap .explore-bar .explore-rule { display: none; }
.explore--wrap .explore-bar .explore-sortmenu { order: 2; }
.explore--wrap .explore-bar .explore-filters {
  order: 3;
  flex-basis: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.explore--wrap .explore-filters::-webkit-scrollbar { display: none; }
.explore--wrap .explore-filters[data-fade="end"] { mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.explore--wrap .explore-filters[data-fade="start"] { mask-image: linear-gradient(to right, transparent, #000 32px); }
.explore--wrap .explore-filters[data-fade="both"] { mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.explore--wrap .fx-panel { position: fixed; }

/* ==========================================================================
   The phone sheet: on a phone, one row (the switch and a round Filters button); the order and the filters
   live in a sheet from the bottom
   ========================================================================== */
.fsheet-btn { display: none; }
@media (max-width: 640px) {
  .explore .explore-bar { flex-wrap: wrap; row-gap: 4px; }
  .explore .explore-bar .explore-filters,
  .explore .explore-bar .explore-sortmenu,
  .explore .explore-bar .explore-rule { display: none; }
  .explore .fsheet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: none;
    height: 40px;
    min-width: 40px;
    margin-left: auto;
    padding: 0 10px;
    border: 1px solid transparent;   /* no visible edge, like the header's pills; the transparent 1px keeps the size and still draws in forced colours */
    border-radius: 999px;
    background: rgba(var(--ink-rgb), var(--wash));
      color: var(--ink-3);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, background-color 0.15s ease;
  }
  /* filters on: the button fills like an active pill, and the count sits beside the icon */
  .explore .fsheet-btn[data-active] { color: var(--ink); background: rgba(var(--ink-rgb), 0.1); padding: 0 8px 0 10px; }
  .fsheet-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ink-rgb), 0.35); }
  @media (prefers-reduced-motion: no-preference) {
    .explore .fsheet-btn { transition: color 0.15s ease, background-color 0.15s ease, scale 0.15s ease-out; }
    .explore .fsheet-btn:active { scale: 0.96; }
  }
}
.fsheet-btn__count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  line-height: 1;
  text-box: trim-both cap alphabetic;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.fsheet-btn__count[hidden] { display: none; }

.fsheet { --fsheet-r: 32px; position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.fsheet[data-open] { pointer-events: auto; }
.fsheet__scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 240ms cubic-bezier(0.32, 0.72, 0, 1);
}
.fsheet[data-open] .fsheet__scrim { opacity: 1; transition-duration: 400ms; }
.fsheet__panel {
  /* it floats 12px off the screen's sides and bottom: the page's own gutter, so its edges line up with the
     Filters button that opens it. Inside, everything sits 24px from its edge (23px padding + the 1px
     border). Corners are 32px (--fsheet-r): the concentric 44px (button radius 20 + 24) curved
     so far that it ate the title's top padding (~5px dropped where the title starts); at 32px the edge has
     dropped 1px there, and past 24px of inset the button and sheet read as separate surfaces anyway */
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 72px);
  overflow: clip;
  border: 1px solid transparent;
  border-radius: var(--fsheet-r);
  /* the buttons' own tone: the page colour with the pills' 5.5% white wash on top (≈ #181818), so the sheet
     reads as one of the bar's surfaces lifted up; the base stays a touch see-through for the 20px blur */
  background: linear-gradient(rgba(var(--ink-rgb), var(--wash, 0.055)), rgba(var(--ink-rgb), var(--wash, 0.055))), rgba(var(--bg-rgb), 0.94);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  /* no visible edge: the surface and its shadow carry it (the 1px border stays transparent, for forced colours) */
  box-shadow: 0 24px 64px rgba(var(--shadow-rgb), calc(0.5 * var(--shadow-k)));
  outline: none;
  /* its own height plus the 12px gap and a margin, so nothing peeks while it's closed */
  transform: translateY(calc(100% + 24px));
  transition: transform 240ms cubic-bezier(0.32, 0.72, 0, 1);
}
/* on the light page the sheet is plain white: its filled chips (the 6% wash) read on it as on the page */
:root[data-theme="light"] .fsheet__panel { background: #fff; }
.fsheet[data-open] .fsheet__panel { transform: translateY(0); transition-duration: 400ms; }
@media (prefers-reduced-motion: reduce) {
  .fsheet__panel { transform: none; opacity: 0; transition: opacity 200ms ease; }
  .fsheet[data-open] .fsheet__panel { opacity: 1; }
}
/* the sheet's inside, in the bar's own parts: one 24px inset on every side; the head holds the title and the
   close button; each group's name has its own quiet "Clear"; every choice, the order included, is one kind of pill dressed like the bar's filter
   pills (40px, the faint wash and hairline), and a chosen one takes the switch thumb's brighter fill; the
   foot is one white action, 40px like the header's Join */
.fsheet__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* the title's capitals are centred on the close circle's centre, which is the sheet corner's centre (see
     the close, below): the top padding is R - half a cap height (minus the 1px border), the head set at the
     title's size so 1cap is the title's; 24px at the sides (23 + the border) */
  font-size: 18px;
  padding: calc(var(--fsheet-r) - 0.5cap - 1px) 23px 0;
  touch-action: none;
  cursor: grab;
}
/* the title's box is trimmed to its capitals (cap height to baseline), so centring it in the 40px head row
   puts the letters' optical middle on the close button's middle, not the line box's. The F's own 1.4px side
   bearing is taken back (-1px) so its stem sits on the 24px edge the pills and the Show button start on */
/* the title a step down from 20px: 18px, so it heads the sheet without outweighing the chips; 550 (Allo is
   variable) keeps its presence at the smaller size, tracked in a touch less than display sizes */
.fsheet__title { margin: 0 0 0 -1px; font-size: 18px; font-weight: 550; line-height: 1; letter-spacing: -0.015em; text-box: trim-both cap alphabetic; }
/* one rhythm, measured between what you see (capitals, chip edges, button edges): 32px from the title to
   the first group's name, 32px between groups, 32px from the last chips to the Show button. Inside a group,
   16px from its name to its chips (and to "Show all") */
.fsheet__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 32px 23px; }
.fsheet__body[data-fade="end"] { mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); }
.fsheet__body[data-fade="start"] { mask-image: linear-gradient(to bottom, transparent, #000 32px); }
.fsheet__body[data-fade="both"] { mask-image: linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.fsheet__group + .fsheet__group { margin-top: 32px; }
/* the name row is exactly the name's cap height (the h3 trimmed to its capitals), so the 32px and 16px
   gaps above and below it are the gaps you see */
.fsheet__group-head { display: flex; align-items: center; height: 1cap; margin-bottom: 16px; font-size: 14px; }
/* the sheet's type is three sizes, the platform's own: 18 for the title, 14 for every word you read or
   tap (group names, chips, Clear, Show all, the Show button: the size of the bar's pills and buttons),
   12 for the numbers in the counts. Hierarchy within the 14s comes from colour and form, not a 1px step:
   names muted, chips filled, text controls white and underlined, the action a white pill. Every gap is a
   multiple of 4 (8 between chips, 12 to Show all, 16 under a name, 32 between groups), measured between
   capitals and edges */
.fsheet__group h3 { margin: 0; color: var(--ink-3); font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: -0.006em; text-box: trim-both cap alphabetic; }
.fsheet__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fsheet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;   /* no visible edge, like the bar's pills; the transparent 1px keeps the size and still draws in forced colours */
  border-radius: 999px;
  background: rgba(var(--ink-rgb), var(--wash));
  color: var(--ink-3);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* chosen: the pill turns over, white with dark text, and its count badge goes dark on it. Only colour
   changes, never the size, so the rows never move.
   The white is a layer under the words that grows as a circle from the touch point (--tx, --ty,
   radius --tr, set by site/modules/explore.js) and shrinks back into it. The layer is the whole pill, edge included
   (inset -1px over the transparent 1px border, rounded like the pill), so the fill arrives complete: no
   ring left for a border to fill in afterwards, and nothing to fade in late. The touch point is measured
   from the pill's outer edge, which is now the layer's own edge, so the circle grows from right under the
   finger. The words and the count turn over on the fill's own curve and time (see the timing below),
   so they darken as the white reaches them, not ahead of it */
.fsheet .fsheet-chip { position: relative; isolation: isolate; }
.fsheet .fsheet-chip::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: var(--ink);
  clip-path: circle(0 at var(--tx, 50%) var(--ty, 50%));
  transition: clip-path 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
.fsheet .fsheet-chip[aria-pressed="true"]::before { clip-path: circle(var(--tr, 100px) at var(--tx, 50%) var(--ty, 50%)); transition-duration: 450ms; }
/* the timing: the drawer's own curve (0.32, 0.72, 0, 1), 450ms in and 280ms back out. The strong ease-out
   it had covered 70% of the radius in the first fifth of the time, and a circle's area grows with the
   square of its radius, so the pill was white almost at once and then sat still: fast and stiff. This curve
   still starts at once (the 0.96 press already answers the tap) but spreads the growth, so the white
   visibly travels across the pill and settles. Taking it back is quicker, as exits are */
.fsheet .fsheet-chip,
.fsheet .fsheet-chip .fsheet-chip__n { transition: color 280ms cubic-bezier(0.32, 0.72, 0, 1), background-color 280ms cubic-bezier(0.32, 0.72, 0, 1), opacity 0.15s ease, scale 0.15s ease-out; }
.fsheet .fsheet-chip[aria-pressed="true"],
.fsheet .fsheet-chip[aria-pressed="true"] .fsheet-chip__n { transition: color 450ms cubic-bezier(0.32, 0.72, 0, 1), background-color 450ms cubic-bezier(0.32, 0.72, 0, 1), opacity 0.15s ease, scale 0.15s ease-out; }
.fsheet .fsheet-chip[aria-pressed="true"] { color: var(--bg); box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .fsheet .fsheet-chip::before { clip-path: none; opacity: 0; transition: opacity 0.15s ease; }
  .fsheet .fsheet-chip[aria-pressed="true"]::before { opacity: 1; }
}
.fsheet .fsheet-chip[aria-pressed="true"] .fsheet-chip__n { background: rgba(var(--bg-rgb), 0.1); color: var(--bg); }
.fsheet-chip[data-empty] { opacity: 0.35; }
/* "Show all styles" / "Show fewer styles": a line of text the group heading's size, on the same left edge
   as the heading and the chips, tucked 12px under the faded row. The 32px hit area hangs over the cap
   height (negative margins), so the visible gaps stay what they read as: 12px to the fade, 32px to the
   next group. It sits under the chips, never among them, so it stays where it is when tapped (see
   holdInPlace in site/modules/explore.js); its colour is a text control's (below) */
.fsheet-more {
  display: flex;
  align-items: center;
  width: fit-content;
  height: 32px;
  margin: calc(12px + (1cap - 32px) / 2) 0 calc((1cap - 32px) / 2) -9px;   /* -9: the padding and the 1px edge */
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background-color 0.15s ease, scale 0.15s ease-out;
}
.fsheet-more__label { line-height: 1; text-box: trim-both cap alphabetic; }

/* Two roles for the sheet's small text, told apart by more than colour:
   - a heading ("Sort by", "Type", "Style") names a group and does nothing: muted (#989898, 6.2:1 on the
     sheet), never decorated
   - a text control ("Clear", "Show all styles") does something: full ink (#fff, 2.9:1 brighter than the
     headings, where 80% was only 1.9:1 and read as the same grey) and underlined with a faint line from
     the font's metrics. The line is the cue that survives without colour; it brightens on hover.
   The underline sits on an inner span so Clear's "·" separator stays plain */
.fsheet__clear, .fsheet-more { color: var(--ink); }
.fsheet-link {
  text-decoration: underline;
  text-decoration-color: rgba(var(--ink-rgb), 0.35);
  text-decoration-thickness: from-font;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .fsheet__clear:hover .fsheet-link, .fsheet-more:hover .fsheet-link { text-decoration-color: var(--ink); }
}
.fsheet-more[hidden] { display: none; }
.fsheet-more:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ink-rgb), 0.35); }
@media (prefers-reduced-motion: no-preference) { .fsheet-more:active { scale: 0.96; } }
/* fade: a folded group shows three rows of chips (36px, 8px apart) and 18px of the fourth, which fades
   out over its last 28px (the peek and the gap above it, never the third row), so there is plainly more below. The box has 4px of padding (cancelled by a -4px
   margin, so the spacing is unchanged) so focus rings aren't cut by the clip. While it opens or closes the
   fade length itself animates (--fade), melting away as the rows appear */
@property --fade { syntax: '<length>'; inherits: false; initial-value: 0px; }
.fsheet__chips[data-fade] { padding: 4px; margin: -4px; }
.fsheet__chips[data-clamp] { --fade: 32px; max-height: calc(3 * 36px + 2 * 8px + 18px + 8px); overflow: clip; }
.fsheet__chips[data-clamp], .fsheet__chips[data-moving] {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent);
}
.fsheet-chip:focus-visible, .fsheet__clear:focus-visible, .fsheet__close:focus-visible, .fsheet__done:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ink-rgb), 0.35); }
@media (prefers-reduced-motion: no-preference) {
  .fsheet-chip:active, .fsheet__done:active { scale: 0.96; }
}
.fsheet__foot { padding: 0 23px max(23px, calc(env(safe-area-inset-bottom) - 12px)); }
/* Clear: right after the group's name ("Style · Clear"), only while that group has a choice, so it reads as
   part of the heading it clears. Its 32px hit area hangs over the 20px row so the row keeps its height;
   hidden, it stays in place, faded and inert */
.fsheet__clear {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 32px;
  margin: calc((1cap - 32px) / 2) -8px calc((1cap - 32px) / 2) 0;
  padding: 0 8px 0 6px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);   /* a text control: see .fsheet-link */
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.fsheet__clear::before { content: '·'; margin-right: 6px; color: var(--ink-4); }
.fsheet__clear[data-off] { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .fsheet__clear:hover { color: var(--ink); } }
/* close: a 32px filled circle around a 12px cross, concentric in the sheet's corner, so the gap around it
   follows the curve evenly: its centre is the corner's centre, R from the top and from the right (R = the
   sheet radius, --fsheet-r), so it sits R - 16px in (16px at 32). The head row is exactly the title's cap
   height and the circle hangs over it by (32px - 1cap) / 2 above and below, so it never pushes the row
   taller; the title's capitals are centred on the same line (see the head, above) */
.fsheet__close {
  /* the detail's own ghost button (site/styles/detail.css .detail__icon): 36px, no fill at rest, the cross in the nav's
     grey; pressed (or hovered, with a mouse) a soft round wash grows in from 0.86 and the cross comes up to
     the ink. Its cross keeps its place on the title's capitals */
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  margin: calc((1cap - 36px) / 2) calc(var(--fsheet-r) - 42px) calc((1cap - 36px) / 2) 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 18px;   /* the title's size, so 1cap centres it on the title's capitals */
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease;
}
.fsheet__close::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(var(--ink-rgb), 0.08);
  opacity: 0;
  scale: 0.86;
  transition: opacity 0.15s ease, scale 0.25s var(--ease-out);
}
.fsheet__close svg { position: relative; width: 24px; height: 24px; }   /* Iconsax add turned 45°, as the detail's */
@media (hover: hover) and (pointer: fine) {
  .fsheet__close:hover { color: var(--ink); }
  .fsheet__close:hover::before { opacity: 1; scale: 1; }
}
.fsheet__close:active { color: var(--ink); }
.fsheet__close:active::before { opacity: 1; scale: 1; }
@media (prefers-reduced-motion: reduce) { .fsheet__close::before { scale: 1; } }
.fsheet__done {
  width: 100%;
  height: 40px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, scale 0.15s ease-out;
}
.fsheet__done-text { display: inline-flex; align-items: center; gap: 8px; vertical-align: top; }

/* the count badge, one look everywhere (the pills, the phone's Filters button, the sheet's values): no
   edge, just a soft fill of white at 14% that steps up the same amount from whatever it sits on (a
   filled pill, the sheet's pills, the sheet itself), and the digits in full ink */
.fx-btn__count, .fsheet-btn__count, .fsheet-chip__n {
  background: rgba(var(--ink-rgb), 0.14);
  color: var(--ink);
  box-shadow: none;
}
/* the numbers in every count (the badges on the bar, the Filters button and the chips, the Show button's
   count), as Allo sets them:
   - tabular figures: a count changes as you filter, and every digit keeps one width, so 9 → 10 → 11 never
     jitters and the badge's width glide stays clean. Allo's tabular 1 is footed, so it fills its wide slot
     and "11" or "14" don't look gappy (its proportional 1 is a bare stroke 60% the width)
   - lining figures at cap height (measured: 1, 4 at the H's height; 0, 8, 9 overshoot evenly above and
     below), so the cap trim on each number centres the digits themselves in the pill
   - no added letter-spacing: Allo's optical size follows the font size, and below 14px it opens the
     spacing on its own (its opsz 9 to 14 range changes only spacing), so 12px figures are already spaced
     for their size
   - weight by polarity: light digits on a dark fill bloom and read heavier than dark digits on a light
     one, so white-on-grey counts are 550 and black-on-white ones (a chosen chip, the Show button) 600, and
     both look the same weight */
.fx-btn__count, .fsheet-btn__count, .fsheet-chip__n, .fsheet__done-n { font-weight: 550; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.fsheet__done-n, .fsheet .fsheet-chip[aria-pressed="true"] .fsheet-chip__n { font-weight: 600; }

/* the phone Filters button: icon, "Filters", then the count once any are on. An 18px icon (20px read bigger than the 20px count beside it), both on the
   pill's centre line, each inset so its edge runs concentric with the pill: the count 10px from the end
   (40 - 20 = 2 x 10), the icon 11px from the start (40 - 18 = 2 x 11), counting the 1px border */
@media (max-width: 640px) {
  .explore .fsheet-btn { gap: 6px; padding: 0 14px 0 10px; color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.006em; white-space: nowrap; }
  .explore .fsheet-btn svg { color: var(--ink-3); }
  .explore .fsheet-btn[data-active] { padding: 0 9px 0 10px; }
  .explore .fsheet-btn__count { margin-left: 2px; }   /* 8px from the label, 6px between icon and label */
  .explore .fsheet-btn svg { display: block; flex: none; }
}
.fsheet-btn__count { min-width: 20px; height: 20px; }
/* the narrowest phones (under 380px, an iPhone SE) have no room for the word beside the switch: the
   button goes back to the icon and the count, and its accessible name still says "Filters" */
@media (max-width: 379px) {
  .explore .fsheet-btn__label { display: none; }
  .explore .fsheet-btn { padding: 0 10px; }
  .explore .fsheet-btn[data-active] { padding: 0 9px 0 10px; }
}
/* in a pill with a cross, the count keeps its full edge, so it sits as far from the cross as a word does */
.explore .fx[data-active] .fx-btn__count { margin-right: 0; }

/* the sheet's pills at 36px, and their counts in the bar's count style: a 20px grey pill with the number
   in full ink. The count sits 8px from the pill's end, concentric with it (36 - 20 = 2 x 8); the word
   keeps 14px on its side. A pill without a count (Sort by) has 14px both sides. Chosen, the pill turns
   white and its count turns with it: a faint dark pill with dark digits */
.fsheet-chip { height: 36px; gap: 8px; padding: 0 14px; }
.fsheet-chip:has(.fsheet-chip__n) { padding-right: 7px; }   /* + the 1px border = 8px */
.fsheet-chip__n {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  line-height: 1;
  text-box: trim-both cap alphabetic;      /* centre the digit itself, not its line box */
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;   /* see "the numbers in every count" */
  font-variant-numeric: tabular-nums;
  transition: color 0.15s ease, background-color 0.15s ease;
}

/* the filter pills wear the toggle switch's dress, on or off: the same faint wash, the same hairline
   ring, the same 40px. A pill that's on says so with its words in full ink, its count and its cross, not
   with a brighter fill (that brightness is the switch's thumb, the chosen option) */
.explore .fx-btn,
.explore .fx[data-active] .fx-btn,
.explore .fx[data-open] .fx-btn {
  background: rgba(var(--ink-rgb), var(--wash));
  border-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .explore .fx-btn:hover, .explore .fx[data-active]:hover .fx-btn { background: rgba(var(--ink-rgb), 0.1); }
}

/* a count badge's digits (site/modules/explore.js, setCount): each number is a block trimmed to its cap height, so
   the figures themselves centre in the circle; old and new share the one grid cell while they roll, and
   the circle clips them */
.fx-btn__count, .fsheet-btn__count, .fsheet-chip__n { position: relative; overflow: hidden; }
.fx-btn__count, .fsheet-btn__count, .fsheet-chip__num { display: grid; place-items: center; }
/* while the width glides the number can be wider or narrower than the badge for a moment: the track
   centres either way, so the digits never slide to one side */
.fx-btn__count, .fsheet-btn__count, .fsheet-chip__num, .fsheet__done-n { place-content: center; }
.fsheet-chip__num { grid-area: 1 / 1; }
.fsheet-chip__num { position: relative; }
.count-d {
  grid-area: 1 / 1;
  display: block;
  line-height: 1;
  text-box: trim-both cap alphabetic;
  font-variant-numeric: tabular-nums;
}

/* "Show 34": the number is a little count of its own, rolling inside a clipped box like the badges */
.fsheet__done-text[hidden], .fsheet__done-none[hidden] { display: none; }
/* the result count as the count badge, inverted for the white button: a dark 10% wash, black digits, the
   same 20px pill, 12px/600 and digit roll as the badges on the bar and the chips */
.fsheet__done-n {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.1);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---- a collection in the grid (variants B and C, site/modules/explore.js enterScope) ----
   In place of the bar: Back as one of the bar's pills (40px, the wash, a chevron), then, 20px on with
   nothing between (the space parts them; the pill is the control and the name what's shown), the
   collection's name a size up from the bar's words, as the title of the grid under it, with its count as
   the filter pills' badge; and Save collection at the end (the wash pill; the bookmark fills and the word
   rolls to "Saved", as the detail's Save does). The card it came from
   stays marked in the row (an ink edge on the inside) while the others step back to 45%. */
.explore-scope { display: flex; align-items: center; gap: 0; min-height: 40px; scroll-margin-top: 88px; }
.explore-bar { scroll-margin-top: 88px; }
.explore-scope[hidden], .explore-bar[hidden] { display: none; }
.explore-scope__back, .explore-scope__save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), var(--wash));
  outline: 1px solid transparent;
  outline-offset: -1px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, scale 0.15s ease-out;
}
.explore-scope__back { padding: 0 16px 0 10px; }
.explore-scope__back svg { width: 16px; height: 16px; color: var(--ink-3); }
@media (hover: hover) and (pointer: fine) { .explore-scope__back:hover, .explore-scope__save:hover { background: rgba(var(--ink-rgb), 0.1); } }
.explore-scope__back:active, .explore-scope__save:active { scale: 0.96; }
.explore-scope__back:focus-visible, .explore-scope__save:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ink-rgb), 0.35); }
.explore-scope__id { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0 16px 0 20px; }
.explore-scope__title { overflow: hidden; color: var(--ink); font-size: 16px; font-weight: 500; letter-spacing: -0.011em; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.explore-scope__count {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.08);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.explore-scope__save { position: relative; margin-left: auto; padding: 0 16px 0 12px; }
.explore-scope__save-icons { display: grid; flex: none; }
.explore-scope__save-icon { grid-area: 1 / 1; width: 16px; height: 16px; transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1); }
.explore-scope__save-icon--on, .explore-scope__save[aria-pressed="true"] .explore-scope__save-icon:not(.explore-scope__save-icon--on) { opacity: 0; }
.explore-scope__save[aria-pressed="true"] .explore-scope__save-icon--on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .explore-scope__save-icon { transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1), scale 0.3s cubic-bezier(0.2, 0, 0, 1), filter 0.3s cubic-bezier(0.2, 0, 0, 1); }
  .explore-scope__save-icon--on, .explore-scope__save[aria-pressed="true"] .explore-scope__save-icon:not(.explore-scope__save-icon--on) { scale: 0.25; filter: blur(4px); }
  .explore-scope__save[aria-pressed="true"] .explore-scope__save-icon--on { scale: 1; filter: blur(0); }
}
.explore-scope__save-label { display: grid; place-content: center; overflow: hidden; }
/* a phone: the name closer, and Save as its bookmark alone (the word still read out) */
@media (max-width: 520px) {
  .explore-scope__id { margin: 0 8px 0 14px; }
  .explore-scope__title { font-size: 15px; }
  .explore-scope__save { width: 40px; padding: 0; justify-content: center; }
  .explore-scope__save-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.ed-picks__track[data-scoped] .pick { transition: opacity 0.2s ease, background-color 0.15s ease, scale 0.15s ease-out; }
.ed-picks__track[data-scoped] .pick:not([aria-current="true"]) { opacity: 0.45; }
/* the chosen card: a ring 3px off its edge, after a selected block in an editor. One rounded border on its
   own layer (a border anti-aliases cleanly where stacked shadows leave dark specks at the corners), its
   corners the card's plus the gap and the line (16 + 3 + 2). Whole pixels only, a 2px line 5px out: at
   1.5px it rounded to a thin 1px on a standard screen and sat between pixels, soft and stepped. Choosing a card, the press pushes the ring
   out of it: it starts on the card's edge (0.97) and opens out to its place (opacity and scale, 200ms, the
   strong ease-out); the card you leave pulls its ring back in, faster (120ms). With reduced motion it only fades. A border, so forced colours draw it too */
.pick::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid var(--ink);
  border-radius: calc(var(--tile-radius) + 5px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease-out, scale 120ms ease-out;
}
.pick[aria-current="true"]::after { opacity: 1; transition: opacity 200ms var(--ease-out), scale 200ms var(--ease-out); }
@media (prefers-reduced-motion: no-preference) {
  .pick:not([aria-current="true"])::after { scale: 0.97; }
}
.pick[aria-current="true"]:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.6); outline-offset: 7px; }
@media (hover: hover) and (pointer: fine) { .ed-picks__track[data-scoped] .pick:not([aria-current="true"]):hover { opacity: 0.8; } }

/*
  The page's foot (index.html .foot, site/modules/footer.js), after unicorn.studio's and bencho.dev's: at the left
  what this is, in a line and a few words under it; at the right three columns of links; under them, where
  unicorn.studio has a huge wordmark cut off by the page's edge, the year at the left and the legal pages at
  the right; and under them a heap of our mascot (site/modules/foot-drops.js), all in one card.

  It keeps the page's own edges: 20px from the sides like the header and Explore, so its first words stand
  under the logo and its last column ends under the header's button. No line and no other colour sets it
  off; the room above it does.
*/
.foot {
  position: relative;
  overflow: hidden;                          /* the mascot is cut off by the page's bottom edge */
  padding: 72px 20px 0;
  color: var(--ink);
}
.foot__in { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 48px 64px; }

/* the lead: the name as a small wordmark, "Orch" at 600 in the ink, its top on the columns' headings' top; under it, 14px down, in the links' grey, what it holds
   (what the library holds, in Explore's own words: its sections and "references"), a short measure (one group) */
.foot__lead { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.foot__mark { margin: -1px 0 0; font-size: 20px; font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variation-settings: "ROND" 100; }   /* (the wordmark in Allo at its roundest; the rest of the site is sharp, base.css) */
.foot__say { margin: 14px 0 0; max-width: 34ch; color: var(--ink-3); font-size: 13px; line-height: 1.5; text-wrap: pretty; }

/* ask an AI about us: four marks in a row under the line above, as bencho.dev sets its links, on the site's
   own round buttons (the spec of the bar's tab group and the tiles' save button): 36px, fully round, the
   ink at 6% with a transparent hairline (an edge in forced colours), 6px apart, the first on the words' left
   edge. The marks are 18px in the links' grey, each sized by eye so the four read alike (the open knot a
   touch larger, the solid sparkle a touch smaller). Hovered (with a mouse) the button deepens to 10% and the
   mark comes up to the ink; pressed, it gives (0.96), as the site's buttons do */
.foot__ais { position: relative; display: flex; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }

/* their tooltip (site/modules/footer.js), transitions.dev's "Tooltip open/close" in this site's materials: the Join
   button's solid fill (the ink, the words in the page's colour), so it stands out on the card in either theme,
   the menus' shadow, 12px/500, a 10px round, 8px over the buttons. Delayed in (80ms,
   then 150ms from 0.98), travelling between buttons (160ms, var(--ease-out), its width
   with it), and gone at once (50ms). With reduced motion it just shows and hides */
.foot__tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;                                  /* (the script writes the measured width) */
  height: 28px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--ink);                    /* the Join button's fill: the ink, the words in the page's colour */
  box-shadow: 0 2px 6px rgba(var(--shadow-rgb), calc(0.25 * var(--shadow-k))), 0 4px 24px rgba(var(--shadow-rgb), calc(0.3 * var(--shadow-k)));
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  translate: var(--tip-x, 0px) 0;
  scale: 0.98;
  transform-origin: 50% 100%;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 50ms ease-out,
    scale 50ms ease-out,
    translate 160ms var(--ease-out),
    width 160ms var(--ease-out);
}
.foot__tip[data-show="true"] {
  opacity: 1;
  scale: 1;
  transition:
    opacity 150ms ease-out 80ms,
    scale 150ms ease-out 80ms,
    translate 160ms var(--ease-out),
    width 160ms var(--ease-out);
}
.foot__tip-text { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .foot__tip { transition: none !important; } }
.foot__ais a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.06);
  color: var(--ink-3);                       /* (the token for nav links and icons) */
  -webkit-tap-highlight-color: transparent;
  transition: color 150ms ease, background-color 150ms ease, scale 150ms ease-out;
}
.foot__ais svg { width: 18px; height: 18px; fill: currentColor; }
.foot__ais li:nth-child(1) svg { width: 19px; height: 19px; }   /* the knot: open, so a touch larger */
.foot__ais li:nth-child(3) svg { width: 17px; height: 17px; }   /* the sparkle: solid, so a touch smaller */
@media (hover: hover) and (pointer: fine) {
  .foot__ais a:hover { color: var(--ink); background: rgba(var(--ink-rgb), 0.1); }
}
.foot__ais a:active { scale: 0.96; }
.foot__ais a:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.5); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .foot__ais a:active { scale: none; } }

/* the base, after bencho.dev's: the year at the left, the legal pages at the right, small and quiet (the
   year a step quieter than the links), a row of its own in the card under the links */
.foot__base {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  color: var(--ink-4);
  font-size: 13px;
  line-height: 1.5;
}
.foot__legal { display: flex; gap: 24px; }
.foot__legal a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 6px;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .foot__legal a:hover { color: var(--ink); }
}
.foot__legal a:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.5); outline-offset: 3px; }

/* the columns: each as wide as its own words, 48px apart (a step closer than the wide page's 64px; sharing
   the width out, they stood over 100px apart on a phone), wrapping to a row of their own when out of room:
   on the narrowest phone two side by side and the third below */
.foot__nav { flex: 1 1 400px; min-width: 0; display: flex; flex-wrap: wrap; gap: 32px 48px; max-width: 528px; }
/* with room for the three side by side, each column as wide as its own words, 64px apart, together at the
   nav's right: the last ending on the edge the base's last link ("Terms") ends on, so the foot's right side
   is one line, and the columns read as one group */
@media (min-width: 640px) {
  .foot__nav { display: flex; justify-content: flex-end; gap: 64px; }
}
.foot__h { margin: 0 0 6px; font-size: 13px; font-weight: 500; line-height: 1.5; }
.foot__col ul { margin: 0; padding: 0; list-style: none; }
.foot__col a,
.foot__col button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;                          /* a 30px row to press, the words 13px */
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-3);
  font: inherit;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .foot__col a:hover, .foot__col button:hover { color: var(--ink); }
}
.foot__col a:focus-visible,
.foot__col button:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.5); outline-offset: 3px; }

/* signed out or in (data-auth on <html>, site/boot.js): each sees the one that applies */
:root[data-auth="signed-in"] .foot [data-when="signed-out"],
:root:not([data-auth="signed-in"]) .foot [data-when="signed-in"] { display: none; }


/* ---- a variant (&foot=drops, site/modules/foot-drops.js): one solid foot. A card the page's whole width, in the
   header's 20px gutters (as wide as the bar above, so it lines up with the logo and the button), in the
   site's card fill with a 28px round. Its words keep a narrower measure inside it, 1280px at the most and
   centred (--inset, the card's padding at the sides: 36px at the least): the name and its line at the left
   and the links at the right, as before; and under them, across the card's whole width and down to its rounded foot, a
   stage the mascot (the 3D logo itself, tumbling) falls into and piles up on, after ReactDrops' Shape
   Physics: the card's bottom edge is their floor. The stage has no top: it fades in from the card over its
   upper part (a mask, so the figures fade too as they drop in or are thrown up); it is the card itself, no
   colour of its own. The base, the year and the legal pages, is in the card: a row of its own under the
   words and over the stage (the stage clips the figures, so none can come over it), on the same text edges,
   its last link ending where the last column does. The card stands in the page's gutter on all sides. A
   figure can be taken (the hand shows over one), dragged and thrown ---- */
.foot[data-foot="drops"] {
  --card-pad: 36px;
  --card-top: 56px;                                          /* (more room over the words than at their sides) */
  --card-r: 28px;
  --inset: max(var(--card-pad), (100cqw - 1280px) / 2);   /* (cqw: of the foot, which is as wide as the card) */
  container-type: inline-size;
  padding-top: 24px;                         /* (a card: its own edge sets it off, so less air over it than the bare foot's 72px) */
  padding-bottom: 20px;                      /* (the gutter at its sides, so the card stands evenly in the page) */
}
.foot[data-foot="drops"] .foot__in {
  padding: var(--card-top) var(--inset) 0;
  border: 1px solid transparent;
  border-radius: var(--card-r);
  background: rgba(var(--ink-rgb), 0.035);
  overflow: hidden;
}
/* too narrow for the name and the links side by side (the card under 860px): they stack, and the columns
   start on the name's left edge, as everything in the card then does (left as a 528px block flush right, the
   wrapped columns stood off in the middle, on no edge) */
@container (max-width: 859px) {
  .foot[data-foot="drops"] .foot__nav { flex-basis: 100%; max-width: none; justify-content: flex-start; }
}
.foot__drops {
  position: relative;
  isolation: isolate;
  /* a row of its own, out to the card's edges: its basis counts the margins that take it there (with 100%
     its outer width came to 100% less twice the inset, and on a wide page it fitted in beside the words) */
  flex: 0 0 calc(100% + 2 * var(--inset, 36px));
  height: 136px;                             /* only as tall as the heap: two rows of figures, and room over them (the
                                                script sizes them as on a taller stage, so they keep their size) */
  margin: -40px calc(var(--inset, 36px) * -1) 0;   /* (8px under the base, with the card's 48px gap: its top is faded, so
                                                      the base never meets a figure, and they stand close under it) */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%);
          mask-image: linear-gradient(to bottom, transparent, #000 20%);
  touch-action: pan-y;                       /* on a phone the stage still scrolls with the page */
}
.foot__drops canvas { display: block; width: 100%; height: 100%; }
.foot__drops[data-over] canvas { cursor: grab; }
.foot__drops[data-grabbing] canvas { cursor: grabbing; }
/* a phone: the card in the page's 12px gutters, its padding 20px and its round 22px */
@media (max-width: 520px) {
  .foot[data-foot="drops"] { --card-pad: 20px; --card-top: 32px; --card-r: 22px; padding-top: 12px; padding-bottom: 12px; }
  /* (the groups 32px apart, not 48: on a phone they stack, and the foot would grow long) */
  .foot[data-foot="drops"] .foot__in { row-gap: 32px; }
  .foot__drops { margin-top: -24px; }   /* (8px under the base, with the phone's 32px gap) */
}

/* a phone: the page's own gutters there (the header's and Explore's 12px), so the foot's first words stay
   under the logo */
@media (max-width: 520px) {
  .foot { padding: 56px 12px 0; }
}

/*
  The search view (site/modules/explore.js, "the search view"), laid out after transitions.dev's: over the page, dimmed
  and softly blurred, a panel near the top: a rounded field with a round close beside it, popular categories
  as chips, then the references as the grid's tiles, three across (two on a phone).
  In this site's materials: the scrim and the menus' surface and shadow, round pills, the tiles' hairline
  edge, the header's search icon.

  Motion, transitions.dev's: the page dims in 200ms; the panel grows in from 0.96 with a fade, 250ms on the
  way in and 150ms on the way out, on var(--ease-out). With reduced motion it only fades.
*/
.sv {
  --sv-ease: var(--ease-out);
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 14vh 16px 16px;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--sv-ease);
}
.sv[data-open="true"] { opacity: 1; pointer-events: auto; }
html.sv-lock { overflow: hidden; }

.sv__panel {
  /* inset as the filter drawer is: everything 24px from the edge (--sv-pad), its corner the drawer's 32px
     (a tile's 12px plus 24px is past where concentric rounds read; the two read as separate surfaces) */
  --sv-pad: 24px;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: min(640px, calc(100dvh - 14vh - 16px));
  overflow: hidden;
  border: 1px solid transparent;            /* (an edge in forced colours) */
  border-radius: 32px;
  background: var(--menu);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
          backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    0 0 0 1px rgba(var(--ink-rgb), 0.06),
    0 4px 42px rgba(var(--shadow-rgb), calc(0.5 * var(--shadow-k))),
    0 2px 6px rgba(var(--shadow-rgb), calc(0.3 * var(--shadow-k)));
  transform-origin: 50% 0;
  scale: 0.96;
  opacity: 0;
  transition: scale 150ms var(--sv-ease), opacity 150ms var(--sv-ease);
}
/* on the light page the panel is plain white, as the filter drawer is (its chips read on it the same) */
:root[data-theme="light"] .sv__panel { background: #fff; }
.sv[data-open="true"] .sv__panel { scale: 1; opacity: 1; transition: scale 250ms var(--sv-ease), opacity 250ms var(--sv-ease); }

/* the top row: the field and the close, a pair. The field is the header's own rounded search (index.html
   .bar-find: a pill, the icon in the nav's grey) on the chips' own fill, so field, close and chips are one
   material (it stays so while typing: the caret says it is active); the close is a circle on the same fill,
   as tall as the field (44px), a touch deeper on hover, a 0.96 press. No divider under the row: the panel is
   one surface, as the filter drawer is. The row sits on the panel's 24px frame, the field on its left edge
   and the close on its right edge where the tiles end, 16px down to the chips */
.sv__bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--sv-pad) var(--sv-pad) 0;
}
.sv__field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), var(--wash));
  outline: 1px solid transparent;           /* (an edge in forced colours) */
  outline-offset: -1px;
  cursor: text;
}
.sv__field svg { flex: none; width: 18px; height: 18px; color: var(--ink-3); }
.sv__input {
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.sv__input::placeholder { color: var(--ink-4); }
.sv__input::-webkit-search-cancel-button { display: none; }
.sv__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), var(--wash));
  color: var(--ink-3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background-color 0.15s ease, scale 0.15s ease-out;
}
.sv__close svg { width: 24px; height: 24px; }   /* (Iconsax add turned 45°, a 1.25 line, as the detail's close) */
@media (hover: hover) and (pointer: fine) { .sv__close:hover { background: rgba(var(--ink-rgb), 0.1); color: var(--ink); } }
.sv__close:active { scale: 0.96; }
.sv__close:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.5); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .sv__close:active { scale: none; } }

/* the chips: popular categories in one row that scrolls sideways (a mouse's wheel too), the filter
   drawer's own chips (site/styles/explore.css .fsheet-chip: 40px filled pills, 14px/500, a count badge), and as there
   the chosen one turns over, its dark fill growing as a circle from where it was touched (450ms in, 280ms
   back, on the drawer's curve); one with nothing for what is typed fades back. The row's own scroll fade is
   above */
.sv__chips { flex: none; display: flex; gap: 8px; padding: 16px var(--sv-pad); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: var(--sv-pad); }   /* (flex: none: a scrolling row would otherwise give up its height) */
.sv__chips::-webkit-scrollbar { display: none; }
.sv .sv__chip { flex: none; position: relative; isolation: isolate; }
.sv .sv__chip::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: var(--ink);
  clip-path: circle(0 at var(--tx, 50%) var(--ty, 50%));
  transition: clip-path 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
.sv .sv__chip[aria-pressed="true"]::before { clip-path: circle(var(--tr, 100px) at var(--tx, 50%) var(--ty, 50%)); transition-duration: 450ms; }
.sv .sv__chip,
.sv .sv__chip .fsheet-chip__n { transition: color 280ms cubic-bezier(0.32, 0.72, 0, 1), background-color 280ms cubic-bezier(0.32, 0.72, 0, 1), opacity 0.15s ease, scale 0.15s ease-out; }
.sv .sv__chip[aria-pressed="true"],
.sv .sv__chip[aria-pressed="true"] .fsheet-chip__n { transition: color 450ms cubic-bezier(0.32, 0.72, 0, 1), background-color 450ms cubic-bezier(0.32, 0.72, 0, 1), opacity 0.15s ease, scale 0.15s ease-out; }
.sv .sv__chip[aria-pressed="true"] { color: var(--bg); }
.sv .sv__chip[aria-pressed="true"] .fsheet-chip__n { background: rgba(var(--bg-rgb), 0.1); color: var(--bg); font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .sv .sv__chip:not([aria-pressed="true"]):hover { color: var(--ink); }
}
.sv .sv__chip:active { scale: 0.96; }
.sv .sv__chip:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.5); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .sv .sv__chip::before { clip-path: none; opacity: 0; transition: opacity 0.15s ease; }
  .sv .sv__chip[aria-pressed="true"]::before { opacity: 1; }
}

/* the references: the grid's own tiles (site/styles/explore.css .tile), three across, 8px apart: the picture alone,
   cropped to 4:3, on the tiles' faint fill with their hairline edge, its corner 12px; no name under it. The one under the pointer or the
   arrow keys darkens a touch, as a tile does on hover, and its name comes in as the tiles' pill, bottom left;
   none shows until then (the first is still the one Enter opens) */
.sv__list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sv-pad) var(--sv-pad); }
/* the scroll fade, as elsewhere (site/styles/detail.css): 32px at the edge that has more
   beyond it (site/modules/explore.js sets data-fade); the chips' row the same sideways, 40px, as Explore's filters */
.sv__list[data-fade="end"] { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); }
.sv__list[data-fade="start"] { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32px); mask-image: linear-gradient(to bottom, transparent, #000 32px); }
.sv__list[data-fade="both"] { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.sv__chips[data-fade="end"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.sv__chips[data-fade="start"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px); mask-image: linear-gradient(to right, transparent, #000 32px); }
.sv__chips[data-fade="both"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.sv__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sv__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(var(--ink-rgb), 0.045);
  color: var(--ink);
  text-decoration: none;
  outline: none;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.sv__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the darkening (the tiles' hover) and, over it, the picture's hairline edge */
.sv__item::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0); transition: background-color 150ms ease; }
.sv__item::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(var(--edge-rgb), 0.08); pointer-events: none; }
.sv[data-nav="keys"] .sv__item[aria-selected="true"]::before { background: rgba(0, 0, 0, 0.18); }
@media (hover: hover) and (pointer: fine) { .sv__item:hover::before { background: rgba(0, 0, 0, 0.18); } }
.sv__item:focus-visible { box-shadow: inset 0 0 0 2px rgba(var(--ink-rgb), 0.7); }
/* the name: the tiles' pill (the veil, 13px/500), sliding in 4px from the left */
.sv__title {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  max-width: calc(100% - 16px);
  overflow: hidden;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--veil);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.006em;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0;
  translate: -4px 0;
  transition: opacity 150ms ease, translate 150ms var(--sv-ease);
}
.sv[data-nav="keys"] .sv__item[aria-selected="true"] .sv__title { opacity: 1; translate: 0 0; }
@media (hover: hover) and (pointer: fine) { .sv__item:hover .sv__title { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sv__title { translate: none; transition: opacity 150ms ease; } }

.sv__empty { display: grid; justify-items: center; gap: 12px; padding: 48px 16px 56px; color: var(--ink-3); font-size: 14px; text-align: center; }
.sv__empty-title { margin: 0; color: var(--ink); font-weight: 500; }
.sv__clear {
  height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.06);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, scale 150ms ease-out;
}
@media (hover: hover) and (pointer: fine) { .sv__clear:hover { background: rgba(var(--ink-rgb), 0.1); } }
.sv__clear:active { scale: 0.96; }

/* a phone: nearer the top, two across */
@media (max-width: 560px) {
  .sv { padding: 8vh 12px 12px; }
  .sv__panel { --sv-pad: 16px; max-height: calc(100dvh - 8vh - 12px); border-radius: 24px; }
  .sv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .sv__panel, .sv[data-open="true"] .sv__panel { scale: 1; transition: opacity 150ms ease; }
}

/*
  Settings (site/modules/settings.js): a modal over the dimmed, softly blurred page (the search view's scrim and
  blur). The panel is the menus' surface with the search view's shadow and 32px corners; 6px inside it the
  section list at the left (on the panel) and the chosen section in a card a step lighter at the right
  (26px corners, the panel's 32 less the 6, so the two curves run together).
  The card: its title and line at the top with a ghost close, then rows of a label (and a line under it) at
  the left and its control at the right, apart by a hairline, 24px in. Controls are the site's: 40px pills on
  the buttons' wash, the Theme pill toggle, a red pill for the one destructive act.
  A phone: a sheet from the foot, the sections as a row of tabs on top, each row's control under its label.
*/
.st {
  --st-ease: var(--ease-out);
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 32px 16px;
  border: 0;
  background: none;
  color: var(--ink);
  overflow: hidden;
}
.st[open] { display: grid; place-items: center; }
.st::backdrop {
  background: var(--scrim);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}
.st[data-open]::backdrop { opacity: 1; }
html:has(.st[open]) { overflow: hidden; }

.st__panel {
  display: flex;
  gap: 6px;
  width: min(880px, 100%);
  height: min(540px, 100%);
  padding: 6px;
  border: 1px solid transparent;            /* (an edge in forced colours) */
  border-radius: 32px;
  background: var(--menu);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
          backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    0 0 0 1px rgba(var(--ink-rgb), 0.06),
    0 4px 42px rgba(var(--shadow-rgb), calc(0.5 * var(--shadow-k))),
    0 2px 6px rgba(var(--shadow-rgb), calc(0.3 * var(--shadow-k)));
  scale: 0.96;
  opacity: 0;
  transition: scale 150ms var(--st-ease), opacity 150ms var(--st-ease);
}
:root[data-theme="light"] .st__panel { background: #fff; }
.st[data-open] .st__panel { scale: 1; opacity: 1; transition: scale 250ms var(--st-ease), opacity 250ms var(--st-ease); }
@media (prefers-reduced-motion: reduce) { .st__panel { scale: none !important; } }

/* the section list */
.st__nav { flex: none; display: flex; flex-direction: column; gap: 2px; width: 208px; padding: 18px 12px; }
.st__kicker { margin: 0 0 8px; padding: 0 10px; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.st__tab {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 150ms ease, background-color 150ms ease;
}
.st__tab svg { flex: none; width: 18px; height: 18px; }
.st__tab[aria-current] { background: rgba(var(--ink-rgb), var(--wash)); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .st__tab:not([aria-current]):hover { color: var(--ink); } }
.st__tab:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.5); outline-offset: -2px; }

/* the card */
.st__pane {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  background: rgba(var(--ink-rgb), 0.035);
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), 0.05);
}
:root[data-theme="light"] .st__pane { background: #f7f7f6; box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), 0.05); }
.st__head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 16px 20px 24px; }
.st__title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }
.st__note { margin: 4px 0 0; color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.st__close {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: -6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 150ms ease, scale 150ms ease-out;
}
.st__close::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(var(--ink-rgb), 0.08); opacity: 0; scale: 0.8; transition: opacity 150ms ease, scale 150ms var(--st-ease); }
.st__close svg { position: relative; width: 24px; height: 24px; }
@media (hover: hover) and (pointer: fine) { .st__close:hover { color: var(--ink); } .st__close:hover::before { opacity: 1; scale: 1; } }
.st__close:active { scale: 0.96; }
.st__close:focus-visible { outline: none; } .st__close:focus-visible::before { opacity: 1; scale: 1; box-shadow: 0 0 0 2px rgba(var(--ink-rgb), 0.4); }
.st__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 0 24px 24px; }
.st__body::-webkit-scrollbar { display: none; }

/* who you are, at the top of Account */
.st-who { display: flex; align-items: center; gap: 12px; padding: 4px 0 20px; }
/* the avatar keeps the site's fill (base.css .av-fill), and a hairline ring inside its edge draws it out of the
   card's lighter surface, where the fill alone all but disappears (an edge in forced colours too) */
.st .st-who__avatar.av-fill.av-fill { width: 40px; height: 40px; border: 1px solid transparent; font-size: 14px; box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), 0.14); }
.st-who__id { display: flex; flex-direction: column; min-width: 0; }
.st-who__name { font-size: 14px; font-weight: 500; }
.st-who__email { overflow: hidden; color: var(--ink-3); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

/* a row: its label at the left, its control at the right, a hairline over it */
.st-row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px 32px; align-items: center; padding: 20px 0; border-top: 1px solid rgba(var(--ink-rgb), 0.07); }
.st__section > .st-row:first-child { border-top: 0; padding-top: 4px; }
.st-row__title { margin: 0; font-size: 14px; font-weight: 500; }
.st-row__note { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; line-height: 1.5; text-wrap: pretty; }
.st-row__control { display: flex; justify-content: flex-end; min-width: 0; }

/* the controls */
.st-input {
  width: 100%;
  max-width: 320px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), var(--wash));
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: box-shadow 150ms ease;
}
.st-input:focus-visible { box-shadow: 0 0 0 2px rgba(var(--ink-rgb), 0.35); }
/* a field that can't be changed (Email: your Google account's): the same pill, its words a step back, and the
   not-allowed cursor over it */
.st-input:disabled { color: var(--ink-3); cursor: not-allowed; -webkit-text-fill-color: var(--ink-3); opacity: 1; }
.st-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), var(--wash));
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 150ms ease, color 150ms ease, scale 150ms ease-out;
}
@media (hover: hover) and (pointer: fine) { .st-btn:hover { background: rgba(var(--ink-rgb), 0.1); } }
.st-btn:active { scale: 0.96; }
.st-btn:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.5); outline-offset: 2px; }
.st-btn--icon { width: 40px; padding: 0; color: var(--ink-3); }
.st-btn--icon svg { width: 18px; height: 18px; }
/* copied: the drawer's swap (site/styles/detail.css .detail__swap, the copy icon into the filled check) and its tick
   drawn in; the pill a step deeper, as Copy prompt's, and the icon in the ink */
.st-btn--icon[data-done] { background: rgba(var(--ink-rgb), 0.09); color: var(--ink); }
.st-btn[data-done] .t-success-tick { animation: t-check-draw 240ms var(--ease-out) 120ms forwards; }
@media (prefers-reduced-motion: reduce) { .st-btn[data-done] .t-success-tick { animation: none; stroke-dashoffset: 0; } }
.st__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .st-btn--icon:hover { color: var(--ink); } }
.st-btn--danger { color: var(--danger); }
.st-btn--solid-danger { background: var(--danger); color: #fff; }
@media (hover: hover) and (pointer: fine) { .st-btn--danger:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); } .st-btn--solid-danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); } }
@media (prefers-reduced-motion: reduce) { .st-btn:active, .st__close:active { scale: none; } }

.st-danger { display: flex; justify-content: flex-end; width: 100%; }
.st-confirm { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; text-align: end; }
.st-confirm[hidden] { display: none; }
.st-confirm__text { margin: 0; max-width: 32ch; color: var(--ink); font-size: 13px; line-height: 1.5; }
.st-confirm__acts { display: flex; gap: 8px; }

/* the Theme dropdown: Explore's sort pill and menu (site/styles/explore.css .explore-sortmenu, .explore-menu), its
   value and options as words alone, the menu opening out of the pill's right edge, as wide as the pill at the
   least */
.st-select { margin-left: 0; padding-left: 0; }
.st-select__menu { min-width: 100%; }
@media (max-width: 860px) { .st-select__menu { right: auto; left: 0; transform-origin: top left; } }   /* (the row stacked: it opens from the left edge, where the pill is) */

/* a value to copy: in a pill on the wash, Copy beside it. A long one scrolls sideways inside the pill (all of
   it can be read; none cut off with an ellipsis), its ends fading out over the pill's 16px of padding, so a
   word running under the edge reads as more to come. A click selects all of it, in the site's own highlight:
   the ink at 20% behind the words, in place of the browser's blue. (Its end fades only while there's more
   beyond it: below) */
.st-copy { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 420px; }
[data-st-token-made] { width: 100%; max-width: 420px; }
.st-btn[hidden], [data-st-token-made][hidden] { display: none; }
.st-copy__field { flex: 1; min-width: 0; overflow: hidden; border-radius: 999px; background: rgba(var(--ink-rgb), var(--wash)); }
.st-copy__value {
  display: block;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  height: 40px;
  padding: 0 16px;
  color: var(--ink);
  font: 13px/40px ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  user-select: all;
}
/* its scroll fade, as every other: 32px, only at the end that has more beyond it (site/modules/settings.js) */
.st-copy__value[data-fade="end"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.st-copy__value[data-fade="start"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px); mask-image: linear-gradient(to right, transparent, #000 32px); }
.st-copy__value[data-fade="both"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.st-copy__value::-webkit-scrollbar { display: none; }
.st-copy__value::selection { background: rgba(var(--ink-rgb), 0.2); color: var(--ink); }

/* a narrower window: the rows stack (the label, then its control under it, at its left) */
@media (max-width: 860px) {
  .st-row { grid-template-columns: minmax(0, 1fr); }
  .st-row__control, .st-danger { justify-content: flex-start; }
  .st-confirm { align-items: flex-start; text-align: start; }
  .st-input, .st-copy { max-width: none; }
}

/* a phone: a sheet from the foot, the sections as tabs in a row along its top */
@media (max-width: 640px) {
  .st { padding: 16px 0 0; }
  .st[open] { place-items: end stretch; }
  .st__panel { flex-direction: column; width: 100%; height: min(88dvh, 100%); padding: 6px 6px max(6px, env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; scale: 1; translate: 0 16px; transition: translate 150ms var(--st-ease), opacity 150ms var(--st-ease); }
  .st[data-open] .st__panel { translate: 0 0; transition: translate 250ms var(--st-ease), opacity 250ms var(--st-ease); }
  .st__nav { flex-direction: row; width: auto; padding: 10px 10px 4px; overflow-x: auto; scrollbar-width: none; }
  .st__nav::-webkit-scrollbar { display: none; }
  .st__kicker { display: none; }
  .st__tab { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; }
  .st__pane { border-radius: 22px; }
  .st__head { padding: 20px 12px 16px 20px; }
  .st__body { padding: 0 20px 20px; }
  .st-theme { width: 100%; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) { .st__panel { translate: none !important; } }



  /* ---------- The iPhone's status bar ----------
     Safari on iPhone colours the status bar from an element fixed at the top edge, and the header is see-through,
     so the grid showed through behind the clock. This hairline in the page's colour gives it the page's colour
     ("No not transparent", Simon, 2026-11-27). It sits under the header and is invisible on the page itself */
  .status-tint { position: fixed; inset: 0 0 auto; z-index: 39; height: 1px; background: var(--bg); pointer-events: none; }

  /* ---------- Header: Bencho's bar, marked.dev's menu ---------- */

  .bar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 72px;
    padding: 4px 20px;
  }
  /* The soft edge under the bar: three layers of blur, strongest at the top, fading out */
  .bar-edge { position: absolute; inset: 0 0 auto; z-index: -1; height: 96px; pointer-events: none; }
  .bar-edge i { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 1%, transparent); }
  .bar-edge i:nth-child(1) { backdrop-filter: blur(1.5px); mask-image: linear-gradient(transparent 25%, #000 50%, #000 75%, transparent); }
  .bar-edge i:nth-child(2) { backdrop-filter: blur(5px); mask-image: linear-gradient(transparent 0%, #000 25%, #000 50%, transparent 75%); }
  .bar-edge i:nth-child(3) { backdrop-filter: blur(14px); mask-image: linear-gradient(#000 0%, #000 25%, transparent 50%); }
  /* and over the blur, the page's own colour at the very top, eased out over 32px: what scrolls up melts into the
     status bar's colour instead of meeting it at a hard edge ("there's a hard edge, can we fix that?", Simon,
     2026-11-27) */
  .bar-edge::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 32px;
    background: linear-gradient(var(--bg), color-mix(in srgb, var(--bg) 82%, transparent) 25%, color-mix(in srgb, var(--bg) 45%, transparent) 55%, color-mix(in srgb, var(--bg) 14%, transparent) 80%, color-mix(in srgb, var(--bg) 0%, transparent));
  }
  /* It softens what scrolls under the bar, and reaches 24px below it. At the top of the page nothing has
     scrolled under yet, so there it is away: it would only blur whatever sits right under the bar at rest
     (Explore's "Collections" title). It fades in as the page starts to move (data-scroll, set below) */
  .bar-edge { transition: opacity 200ms ease; }
  .bar[data-scroll="top"] .bar-edge { opacity: 0; }

  .bar-lead { display: flex; align-items: center; gap: 24px; min-width: 0; }

  /* The logo: our mascot, live. The slot is Bencho's 32 by 36; the canvas is drawn larger and centred on
     it, so the character itself is about as big as Bencho's mark. */
  .bar-logo { position: relative; display: block; flex: none; width: 32px; height: 36px; }
  .bar-logo .logo { position: absolute; inset: 0; display: block; }
  .bar-logo canvas, .bar-logo svg {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;                         /* (a little bigger than Bencho's now: was 46) */
    height: 52px;
    translate: -50% -50%;
    pointer-events: none;
  }
  .bar-logo:focus-visible { outline: none; }
  .bar-logo:focus-visible::after { content: ""; position: absolute; inset: 0 -2px; border-radius: 10px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ink-rgb), 0.35); }
  /* Like Bencho's, it pops in when the page loads */
  @media (prefers-reduced-motion: no-preference) {
    .bar-logo .logo { animation: logo-pop 0.36s cubic-bezier(0.34, 1.56, 0.5, 1) both; }
  }
  @keyframes logo-pop { from { opacity: 0; scale: 0.6; } }

  /* The menu sits in a pill like the search: 40px tall, the same faint fill. The page you are on gets
     a brighter pill inside it, 4px in, so the two curves stay concentric. */
  .bar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 40px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(var(--ink-rgb), var(--wash));
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    outline: 1px solid transparent;                           /* still draws an edge in forced-colours mode */
    outline-offset: -1px;
    transition: background-color 0.2s, box-shadow 0.2s;
  }
  .bar-nav { position: relative; user-select: none; touch-action: pan-y; }
  .bar-nav a {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--ink-3);
    font-size: 14px;
    font-weight: 500;
    line-height: 19.5px;
    text-decoration: none;
    -webkit-user-drag: none;
    transition: color 80ms;      /* the label brightens as the thumb arrives, like the switch's */
  }
  .bar-nav a[aria-current="page"] { color: var(--ink); }
  @media (hover: hover) and (pointer: fine) { .bar-nav a:not([aria-current]):hover { color: var(--ink); } }
  .bar-nav a:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ink-rgb), 0.35); }

  /* The thumb: the brighter pill behind the chosen option, in every toggle switch (site/modules/toggle-switch.js:
     the menu here, Explore's sections). It moves like the Fluid Functionalism switch's thumb: springs to a new spot, stretches on hover, stretches and
     squashes on press, and can be dragged. Placed only by transform; width and height carry the shape. */
  /* (.switch-thumb itself lives in site/styles/base.css, shared with the user menu's Theme toggle) */

  /* Search, centred on the page */
  .bar-mid { position: absolute; left: 50%; translate: -50%; display: flex; justify-content: center; pointer-events: none; }
  .bar-find {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 280px;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(var(--ink-rgb), var(--wash));
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    outline: 1px solid transparent;                           /* still draws an edge in forced-colours mode */
    outline-offset: -1px;
    color: var(--ink-4);
    pointer-events: auto;
    cursor: text;
    transition: background-color 0.2s, box-shadow 0.2s;
  }
  /* Once the page has scrolled, the pills turn to frosted glass over the content, with a faint ring */
  .bar[data-scroll="moved"] .bar-nav,
  .bar[data-scroll="moved"] .bar-find {
    background: var(--glass);
    box-shadow: var(--glass-shadow);
  }
  .bar-find:focus-within { background: rgba(var(--ink-rgb), 0.09); }
  .bar-find svg { flex: none; width: 18px; height: 18px; color: var(--ink-3); }
  .bar-find input {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
  }
  .bar-find input::placeholder { color: var(--ink-4); }
  .bar-find input::-webkit-search-cancel-button { display: none; }

  .bar-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

  /* Join for free: a plain white pill. The bar is 40px, but a solid white shape on near-black reads
     1-2px larger than it measures (light spreads), while the translucent pills beside it show little
     edge. So the button is matched by eye rather than by number: 38px, on the same centre line. */
  .join {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 17px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.006em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, scale 0.15s ease-out;
  }
  @media (hover: hover) and (pointer: fine) { .join:hover { background: var(--solid-hover); } }
  .join:active { scale: 0.96; }
  .join:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ink-rgb), 0.5); }
  @media (prefers-reduced-motion: reduce) { .join:active { scale: 1; } }

  /* ---------- Signed in: the avatar and the user menu (site/modules/account.js) ----------
     data-auth on <html> (site/boot.js) picks the header: Join for free signed out, the avatar signed in.
     The avatar is a 40px circle like the hamburger: your initials on the pills' wash (glass once scrolled).
     It opens the user menu under it, dressed like the sort menu (the menus' surface and shadow, 4px inset,
     10px rows in a 16px panel, 6px in) and opening the same way, out of the avatar (top right): 150ms fade and
     scale from 0.97 in, 100ms out. After the user menus in the references (an anatomy sheet, Atlas,
     boards): who you are first (your avatar beside your name and address, not a control), then rows of
     Theme with its toggle at the end, then rows of an Iconsax icon and a name (MCP: connecting your agent;
     Settings; Give feedback), then Sign out on its own under a hairline. Your saved references and
     collections are Library, in the main menu, one click from anywhere. Icons: MCP code; Settings
     setting-2; Give feedback message-text; Sign out logout (the newer set). The toggle: sun
     (its rays drawn at their designed 2px), moon, and monitor without its inner chin line (cleaner at
     16px); a desktop monitor is the common sign for "follow the system" (macOS, GitHub, Vercel). On phones (680px and
     down) the header has only the hamburger, so the same things sit in the menu sheet's foot instead. */
  .bar-account { display: none; position: relative; flex: none; }
  :root[data-auth="signed-in"] .bar-account { display: block; }
  :root[data-auth="signed-in"] .bar .join,
  :root[data-auth="signed-in"] .hero .join,
  :root[data-auth="signed-in"] .bar .bar-sheet .sheet-join { display: none; }
  .bar-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(var(--ink-rgb), var(--wash));
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    outline: 1px solid transparent;          /* still draws an edge in forced-colours mode */
    outline-offset: -1px;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 550;
    letter-spacing: 0.01em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s, scale 0.15s ease-out;
  }
  .bar[data-scroll="moved"] .bar-avatar { background: var(--glass); box-shadow: var(--glass-shadow); }
  @media (hover: hover) and (pointer: fine) { .bar-avatar:hover { background: rgba(var(--ink-rgb), 0.1); } }
  .bar .bar-avatar[aria-expanded="true"] { background: rgba(var(--ink-rgb), 0.1); }
  .bar-avatar:active { scale: 0.96; }
  .bar-avatar:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.5); outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) { .bar-avatar:active { scale: 1; } }

  .account-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    width: 264px;
    padding: 6px;
    border: 1px solid transparent;          /* still draws an edge in forced-colours mode */
    border-radius: 16px;                    /* the rows' 10px plus the 6px inset */
    background: var(--menu);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 8px 24px rgba(var(--shadow-rgb), calc(0.4 * var(--shadow-k))), 0 2px 6px rgba(var(--shadow-rgb), calc(0.3 * var(--shadow-k)));
    transform-origin: top right;            /* it opens out of the avatar */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease-out, visibility 0s linear 0.1s;
  }
  .bar-account[data-open] .account-menu { opacity: 1; visibility: visible; transition: opacity 0.15s var(--ease-out), visibility 0s; }
  @media (prefers-reduced-motion: no-preference) {
    .account-menu { scale: 0.97; transition: opacity 0.1s ease-out, scale 0.1s ease-out, visibility 0s linear 0.1s; }
    .bar-account[data-open] .account-menu { scale: 1; transition: opacity 0.15s var(--ease-out), scale 0.15s var(--ease-out), visibility 0s; }
  }
  /* who you are: your avatar beside your name and address (not a control) */
  .account-menu__who { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px 10px; }
  .account-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(var(--ink-rgb), 0.1);
    color: var(--ink);
    font-size: 12px;
    font-weight: 550;
    letter-spacing: 0.01em;
  }
  .account-menu__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .account-menu__name { overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 500; letter-spacing: -0.006em; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
  .account-menu__email { overflow: hidden; color: var(--ink-3); font-size: 12px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
  .account-menu__sep { flex: none; height: 1px; margin: 6px 4px; border: 0; background: rgba(var(--ink-rgb), 0.08); }
  /* a row: an 18px Iconsax icon in the quiet grey, then its name in ink; the wash on hover, the icon
     turning ink with it */
  .account-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.006em;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
  }
  .account-menu__item { cursor: pointer; }
  .account-menu__icon { flex: none; width: 18px; height: 18px; color: var(--ink-3); }
  .account-menu__item:focus-visible { outline: none; background: rgba(var(--ink-rgb), 0.08); }
  .account-menu__item:focus-visible .account-menu__icon { color: var(--ink); }
  @media (hover: hover) and (pointer: fine) {
    .account-menu__item:hover { background: rgba(var(--ink-rgb), 0.06); }
    .account-menu__item:hover .account-menu__icon { color: var(--ink); }
  }
  /* Theme, a section of its own between hairlines: its name, then the round toggle at the row's end (Light,
     Dark, System as icons). The row isn't a control itself, so it has no hover; 44px tall, for the 36px
     toggle with 4px around it, which sits 4px in from the menu's edge as the rows' wash does */



  /* Between phone and desktop (681-999px): the search stays the 280px field, centred on the viewport.
     There is no room for it beside the full menu pill, so the menu folds into a hamburger: the logo stays
     bare and the hamburger is a 40px glass circle on the right, as on the phone. Wherever the hamburger
     shows, Join for free leaves the bar: it is in the hamburger's menu (.sheet-join), so it isn't said twice */
  @media (min-width: 681px) and (max-width: 999px) {
    .bar-nav { display: none; }
    .bar .join { display: none; }
    .bar .bar-menu--tools { display: flex; }
    .bar[data-scroll="moved"] .bar-menu--tools {
      background: var(--glass);
      box-shadow: var(--glass-shadow);
    }
  }

  /* ---------- Phones (680px and below): the menu becomes a hamburger, the search stays ----------
     As on the tablet: the logo on its own, the search field, the hamburger as a glass circle on the right.
     The hamburger opens the menu (below) and crosses into an X. */
  .bar-menu {
    display: none;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(var(--ink-rgb), var(--wash));
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    outline: 1px solid transparent;
    outline-offset: -1px;
    color: var(--ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s, scale 0.15s ease-out;
  }
  /* The icon, as transitions.dev's: a 16px box, two 14 by 1.5px lines 4.5px apart. Opening slides both
     to the middle while they turn to ±45° (300ms, the same ease-out); closing starts the unturn 50ms after
     the lines begin to part, so the X opens up before it straightens. Muted, brightening on hover and
     while open. */
  .burger { position: relative; display: block; width: 16px; height: 16px; color: var(--ink-3); transition: color 0.15s; }
  @media (hover: hover) and (pointer: fine) { .bar-menu:hover .burger { color: var(--ink); } }
  .bar-menu[aria-expanded="true"] .burger { color: var(--ink); }
  .burger__line {
    position: absolute;
    left: 1px;
    right: 1px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transform-origin: center center;
    will-change: transform;        /* its own layer, so both 1.5px lines draw equally thick at rest (Chrome
                                      otherwise snaps the lower one, at a half-pixel top, to a thinner line) */
    transition: top 0.3s var(--ease-out), transform 0.3s var(--ease-out) 0.05s;
  }
  .burger__line--top { top: 5px; }
  .burger__line--bottom { top: 9.5px; }
  .bar-menu[aria-expanded="true"] .burger__line {
    top: 7.25px;
    transition: top 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  }
  .bar-menu[aria-expanded="true"] .burger__line--top { transform: rotate(45deg); }
  .bar-menu[aria-expanded="true"] .burger__line--bottom { transform: rotate(-45deg); }
  @media (prefers-reduced-motion: reduce) { .burger__line { transition: none !important; } }

  @media (hover: hover) and (pointer: fine) { .bar-menu:hover { background: rgba(var(--ink-rgb), 0.1); } }
  .bar-menu:active { scale: 0.96; }
  /* an outline, not a shadow: the scrolled state restyles box-shadow, and forced-colours mode drops
     shadows, so the ring must not depend on it */
  .bar-menu:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.5); outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) { .bar-menu:active { scale: 1; } }

  @media (max-width: 680px) {
    .bar { gap: 8px; }
    .bar-nav { display: none; }
    .bar-mid { position: static; translate: none; flex: 1; min-width: 0; }
    .bar-find { width: 100%; }
    /* the logo on its own (no pill), the search field in the middle, and the hamburger as a 40px glass
       circle on the right, the same height as the field (no Join: it's in the menu) */
    .bar .join { display: none; }
    /* the field centred on the screen as on the tablet, not stretched: as wide as it can be while keeping
       clear of the logo and the hamburger, up to 240px */
    .bar .bar-mid { display: flex; position: absolute; left: 50%; translate: -50%; flex: none; }
    .bar .bar-find { width: min(240px, calc(100vw - 2 * (12px + 40px + 12px))); }
    /* signed in, your avatar sits beside the hamburger (its menu opens under it, as on the desktop): the
       field stays centred and up to 240px, as signed out, only narrower where it must keep clear of the
       two circles on the right (40px, 8px apart, 12px from the edge) */
    :root[data-auth="signed-in"] .bar .bar-find { width: min(240px, calc(100vw - 2 * (12px + 40px + 8px + 40px + 12px))); }
    .bar .bar-menu--tools { display: flex; }
    .bar[data-scroll="moved"] .bar-menu--tools {
      background: var(--glass);
      box-shadow: var(--glass-shadow);
    }
  }

  /* ---------- The phone menu (site/modules/mobile-menu.js) ----------
     Layout's full-screen menu (Sites/Intern/Layout: styles/layout/shell.css, scripts/components/menu.js),
     with its values: a frosted sheet over the whole screen (the page's colour at 90%, blurred 20px) fades in
     over 400ms and out over 250ms on Layout's one curve; the bar stays on top of it, its own soft edge
     stepping aside since the sheet is frosted already. The links are 20px plain text, muted, with the page
     you're on in full white, 16px apart and lined up with the logo; they rise out of a blur one after
     another (transitions.dev's Texts reveal, below, whose numbers are Layout's: 12px, 3px, 500ms, 40ms
     apart) and fade out together on close. Join for free sits at the foot. Page scroll is locked while
     it's open. */
  .bar-sheet { display: none; }
  @media (max-width: 999px) {
    .bar-lead, .bar-tools { position: relative; z-index: 2; }
    .bar-sheet {
      position: fixed;
      inset: 0;
      z-index: 1;
      display: flex;
      flex-direction: column;
      gap: 32px;
      padding: calc(72px + 16px) 24px calc(24px + env(safe-area-inset-bottom));
      background: rgba(var(--bg-rgb), 0.9);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      overscroll-behavior: contain;
      overflow-y: auto;
      transition: opacity 250ms var(--ease-out), visibility 0s 250ms;
    }
    .bar[data-menu="open"] .bar-sheet { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 400ms var(--ease-out), visibility 0s; }
    .bar[data-menu="closing"] .bar-sheet { opacity: 0; visibility: visible; transition: opacity 250ms var(--ease-out); }
    /* the bar's soft edge steps aside: the sheet is frosted already */
    .bar-edge { transition: opacity 250ms var(--ease-out); }
    .bar[data-menu="open"] .bar-edge { opacity: 0; }
    /* only the logo and the X stay over the sheet: the search and Join step aside while it's open */
    .bar-mid, .bar-tools > :not(.bar-menu--tools) { transition: opacity 0.2s, background-color 0.15s, scale 0.15s ease-out; }
    .bar[data-menu="open"] .bar-mid, .bar[data-menu="open"] .bar-tools > :not(.bar-menu--tools) { opacity: 0; pointer-events: none; }
  }
  @media (max-width: 520px) { .bar-sheet { padding-left: 16px; padding-right: 16px; } }
  /* a phone (520px and under): the search is a round 40px icon button, the header's circles' size and fill,
     at the right beside your avatar (or the hamburger, signed out), 8px apart, not a field squeezed between
     the logo and the circles. The field's input stays, unseen, over the whole circle: a tap focuses it and
     opens the search view as the field does (site/modules/explore.js), and it keeps the field's name for a screen
     reader. A press gives (0.96), as the circles' does */
  @media (max-width: 520px) {
    .bar .bar-mid { position: static; translate: none; flex: none; margin-left: auto; }
    .bar .bar-find, :root[data-auth="signed-in"] .bar .bar-find { position: relative; justify-content: center; width: 40px; padding: 0; cursor: pointer; transition: background-color 0.15s, box-shadow 0.2s, scale 0.15s ease-out; }
    .bar .bar-find input { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; opacity: 0; cursor: pointer; font-size: 16px; }
    .bar .bar-find:has(input:focus-visible) { outline: 2px solid rgba(var(--ink-rgb), 0.5); outline-offset: 2px; }
    .bar .bar-find:active { scale: 0.96; }
  }
  @media (max-width: 520px) and (hover: hover) and (pointer: fine) { .bar .bar-find:hover { background: rgba(var(--ink-rgb), 0.1); } }
  @media (max-width: 520px) and (prefers-reduced-motion: reduce) { .bar .bar-find:active { scale: none; } }
  body.is-locked { overflow: hidden; }
  .sheet-main { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
  .sheet-main a {
    display: inline-block;
    color: var(--ink-3);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .sheet-main a[aria-current="page"] { color: var(--ink); }
  @media (hover: hover) and (pointer: fine) { .sheet-main a:not([aria-current]):hover { color: var(--ink); } }
  .sheet-main a:focus-visible { outline: 2px solid rgba(var(--ink-rgb), 0.5); outline-offset: 4px; border-radius: 4px; }
  .sheet-foot { display: grid; gap: 8px; margin-top: auto; }
  /* full width at the foot, and a touch taller than the bar's for a thumb (the phone bar hides its own Join) */
  .bar .bar-sheet .sheet-join.join { display: flex; align-items: center; justify-content: center; width: 100%; height: 44px; }

  /* Transitions.dev — Texts reveal (transitions.dev/detail.html?t=texts-reveal), as published.
     Lines rise 12px out of a 3px blur over 500ms; .is-shown plays it, .is-hiding fades them out in place
     over 200ms. One change: the stagger runs on --i (the line's place) rather than one class per line,
     so the menu can have any number of lines, and it starts --stagger-start after the menu opens. */
  :root {
    --stagger-dur: 500ms;
    --stagger-distance: 12px;
    --stagger-stagger: 40ms;
    --stagger-blur: 3px;
    --stagger-ease: var(--ease-out);
  }
  .t-stagger-line {
    display: block;
    opacity: 0;
    transform: translateY(var(--stagger-distance));
    filter: blur(var(--stagger-blur));
    transition:
      opacity   var(--stagger-dur) var(--stagger-ease),
      transform var(--stagger-dur) var(--stagger-ease),
      filter    var(--stagger-dur) var(--stagger-ease);
    will-change: transform, opacity, filter;
  }
  .t-stagger.is-shown .t-stagger-line {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition-delay: calc(var(--stagger-start, 0ms) + var(--stagger-stagger) * var(--i, 0));
  }
  .t-stagger.is-hiding .t-stagger-line {
    opacity: 0;
    transform: translateY(0);
    filter: blur(0);
    transition:
      opacity 200ms ease,
      transform 0s linear,
      filter 0s linear;
    transition-delay: 0s;
  }
  @media (prefers-reduced-motion: reduce) {
    .t-stagger-line { transition: none !important; }
  }

  /* ---------- Hero ----------
     Slim, like bencho.dev's. Laid out like
     Layout's hero: one centred column (headline, lede, one action), one gap between every element, running
     up under the translucent header. No visuals. */
  /* The page's three views (site/modules/views.js), after cosmos.so: the front page (home), for visitors, is the
     hero alone; Explore, browsing straight away, no hero; Library, what you've saved. On the front page the
     header's menu has nothing chosen (its thumb hides). The hero's entrance plays the first time it shows */
  html:not([data-view="home"]) .hero,
  html:not([data-view="library"]) .library,
  html[data-view="home"] .explore,
  html[data-view="library"] .explore { display: none; }
  html[data-view="home"] .bar-nav .switch-thumb { opacity: 0; }
  .bar-nav .switch-thumb { transition: opacity 150ms ease-out; }
  .hero[data-shown] .enter { animation: none; }

  /* Library: what you've saved, under its own heading (Explore's "Collections" type); for now the empty
     state Explore's sections use (site/styles/explore.css .explore-empty) */
  .library { min-height: 100svh; padding: 8px 20px 24px; }   /* (the foot's card follows, 24px further down: 48px in all; 32px on a phone) */
  .library .explore-empty { padding-top: 120px; }
  @media (max-width: 520px) { .library { padding: 4px 12px 20px; } }

  /* The front page is the hero alone: it fills the screen (the small viewport, so a phone's toolbars never
     cut it), the words (.hero__in) in the middle, the air above and below them growing
     together; the hero never gets shorter than they need */
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100svh;
    margin-top: -72px;             /* under the header */
    text-align: center;
  }
  .hero__in {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 224px 20px 136px;     /* 40px more air under the header than before */
  }
  .hero h1 {
    max-width: 580px;              /* Layout's --measure-title */
    /* Spacing is set by the ink, not the boxes: 16px from the headline's descenders to the lede's
       ascenders (one group), then 32px, twice that, from the lede to the button (the action). The line
       boxes carry their own air (the lede's text sits 5px inside its box), so the margins are smaller. */
    margin: 0 0 12.5px;
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.025em;      /* Allo's display cut is already set closer than its text cut */
    text-wrap: balance;
  }
  .hero p { max-width: 520px; margin: 0 0 28.5px; color: var(--ink-3); font-size: 15px; line-height: 1.55; text-wrap: balance; }
  @media (max-width: 699px) { .hero__in { padding: 180px 16px 96px; } .hero h1 { margin-bottom: 11.5px; } }   /* the smaller headline's line box has 1px more air below its descenders */

  /* Entrance (first load only), like Layout's .enter: each block rises 10px and fades in, 80ms apart */
  @media (prefers-reduced-motion: no-preference) {
    .enter { animation: enter 620ms var(--ease-out) both; animation-delay: calc(60ms + var(--step) * 80ms); }
  }
  @keyframes enter { from { opacity: 0; transform: translateY(10px); } }

  /* ---------- The hero's own entrance, after unicorn.studio's (data-headline="wave", site/boot.js) ----------
     The headline: a wave runs through it in reading order (site/modules/headline-wave.js lays a letter over each
     real one and gives it its start, --d). Theirs is a wave of light: each letter arrives as bevelled glass
     with a glint swinging round it. Without the glass there is no light to travel, so ours is a wave you
     can see in the line itself: each letter swings up from below out of a blur, rides over its place and
     bobs back to rest (a damped swing: 0.6em under, 0.12em over, 0.045em under, home), and because the
     letters start one after another the line is a crest moving left to right that leaves still letters
     behind it. A letter is in the full ink from the moment it shows (it came up grey first and turned
     black half a second later, which read as the colour arriving late).
     Their timing is kept: 2.5s in all, a letter's own part 1s, the starts spread over the first 1.5s.
     Then the rest, at their moments (1.4s and 1.6s): the lede and the buttons come in on the same swing,
     each as one piece and smaller (20px under, 4px over).
     The real headline holds the layout underneath, invisible, until the wave has passed. Never with reduced
     motion; and if the script never runs, site/boot.js takes the switch off again after 4s */
  html[data-headline="wave"] .hero h1 { position: relative; animation: none; }
  html[data-headline="wave"] .hero h1:not([data-waved]) { color: transparent; text-shadow: none; }
  html[data-headline="wave"] .hero p.enter { animation: hero-swing 900ms linear 1400ms both; }
  html[data-headline="wave"] .hero .hero__actions.enter { animation: hero-swing 900ms linear 1600ms both; }
  @keyframes hero-swing {
    0% { opacity: 0; transform: translateY(20px); animation-timing-function: var(--ease-out); }
    35% { opacity: 1; }
    42% { transform: translateY(-4px); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
    70% { transform: translateY(1.5px); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
    100% { transform: none; }
  }
  .hw { position: absolute; inset: 0; pointer-events: none; }
  .hw__g {
    position: absolute;
    white-space: pre;
    color: var(--ink);
    text-shadow: 0 0 2px var(--bg), 0 0 14px rgba(var(--bg-rgb), 0.9);   /* the headline's own halo, so nothing changes at the handover */
    transform-origin: 50% 80%;
    animation: hw-swing var(--hw-ms, 1000ms) linear var(--d) both;
  }
  /* each stretch eases in and out, so the letter's path is a smooth swing; the first leaves fast */
  @keyframes hw-swing {
    0% { opacity: 0; filter: blur(6px); transform: translateY(0.6em) rotate(5deg); animation-timing-function: var(--ease-out); }
    30% { opacity: 1; filter: blur(0); }
    40% { transform: translateY(-0.12em) rotate(-1.5deg); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
    64% { transform: translateY(0.045em) rotate(0.5deg); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
    84% { transform: translateY(-0.012em) rotate(0deg); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
    100% { transform: none; }
  }

  /* ---------- The hero, after marked.dev's (the default; site/modules/hero-tiles.js) ----------
     No globe: round the words, nine pictures float on three layers of depth, half off the screen's edges,
     fading out at the hero's top and bottom. Their places, sizes, blurs, dimming and drift are marked.dev's
     (site/modules/hero-tiles.js says more). The words, their wave and the buttons are ours, unchanged */
  .hero-tiles { display: none; }
  html[data-hero="marked"] .hero { position: relative; isolation: isolate; overflow: hidden; }
  html[data-hero="marked"] .hero-tiles {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 120px, #000 calc(100% - 180px), transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 120px, #000 calc(100% - 180px), transparent);
  }
  /* On a phone the header's buttons are bare circles on the page (no bar behind them until it scrolls), and
     the pictures' top band reaches up under them, further the shorter the screen: so here no picture shows
     behind the header at all. Clear to 64px (the buttons end at 56), then in by 136px */
  @media (max-width: 640px) {
    html[data-hero="marked"] .hero-tiles {
      -webkit-mask-image: linear-gradient(to bottom, transparent 64px, #000 136px, #000 calc(100% - 180px), transparent);
      mask-image: linear-gradient(to bottom, transparent 64px, #000 136px, #000 calc(100% - 180px), transparent);
    }
  }
  .hero-tiles__layer { position: absolute; inset: 0; }
  .hero-tiles__layer[data-layer="far"] { z-index: 1; }
  .hero-tiles__layer[data-layer="mid"] { z-index: 2; }
  .hero-tiles__layer[data-layer="near"] { z-index: 3; }
  .hero-tiles__layer[data-layer="far"] .hero-tile { filter: brightness(0.42) blur(1.5px); }
  :root[data-theme="light"] .hero-tiles__layer[data-layer="far"] .hero-tile { filter: blur(1.5px); opacity: 0.45; }   /* dimmed into a white page, not darkened */
  .hero-tiles__layer[data-layer="near"] .hero-tile { filter: blur(12px); }
  .hero-tile__place { position: absolute; will-change: transform, opacity; }
  .hero-tile__dx, .hero-tile__dy { display: block; width: 100%; height: 100%; }
  .hero-tile__dx { animation: hero-drift-x var(--dx) ease-in-out infinite alternate; }
  .hero-tile__dy { animation: hero-drift-y var(--dy) ease-in-out infinite alternate; }
  @keyframes hero-drift-x { from { translate: -12px 0; } to { translate: 12px 0; } }
  @keyframes hero-drift-y { from { translate: 0 -10px; } to { translate: 0 10px; } }
  .hero-tile {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: calc(28px * var(--k));
    background: #181818;
  }
  :root[data-theme="light"] .hero-tile { background: #efefef; }
  .hero-tile > img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .hero-tile::after, .hero-tile__face::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(var(--edge-rgb), 0.08); pointer-events: none; }
  .hero-tile__face { position: absolute; left: calc(14px * var(--k)); bottom: calc(14px * var(--k)); width: calc(30px * var(--k)); height: calc(30px * var(--k)); border-radius: 50%; overflow: hidden; }
  .hero-tile__face img { display: block; width: 100%; height: 100%; object-fit: cover; }
  @media (prefers-reduced-motion: reduce) { .hero-tile__dx, .hero-tile__dy { animation: none; } }

  /* the hero's button stands alone, so it takes the bar's true 40px (the header's 38px is an optical match
     for the pills beside it); its padding grows with it */
  .hero .join { height: 40px; padding: 0 18px; }
  /* beside it, the way into Explore: the same pill in the buttons' faint wash, so Join stays the one solid
     action. Signed in, Join goes and Explore stands alone */
  .hero__actions { display: flex; justify-content: center; gap: 8px; }
  .hero__explore {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(var(--ink-rgb), var(--wash));
    outline: 1px solid transparent;           /* still draws an edge in forced-colours mode */
    outline-offset: -1px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.006em;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s, scale 0.15s ease-out;
  }
  @media (hover: hover) and (pointer: fine) { .hero__explore:hover { background: rgba(var(--ink-rgb), 0.1); } }
  .hero__explore:active { scale: 0.96; }
  .hero__explore:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--ink-rgb), 0.5); }
  @media (prefers-reduced-motion: reduce) { .hero__explore:active { scale: 1; } }
  /* Phones: the header has to fit 390px, so the menu tightens and the button says just "Join" */
  .join__short { display: none; }
  @media (max-width: 520px) {
    .bar { padding: 4px 12px; gap: 8px; }
    .bar-nav a { padding: 0 9px; font-size: 13px; }
    .join { padding: 0 14px; }
    .join__long { display: none; }
    .join__short { display: inline; }
  }

/* the toast (site/modules/toast.js): a 44px pill on the menus' surface and shadow, bottom centre, 24px up */
.toaster {
  position: fixed;
  inset: auto 0 calc(24px + env(safe-area-inset-bottom));
  z-index: 100;
  display: grid;
  justify-items: center;
  padding: 0 16px;
  pointer-events: none;
}
.toast {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border: 1px solid transparent;            /* still draws an edge in forced-colours mode */
  border-radius: 999px;
  background: var(--menu);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 0 0 1px rgba(var(--edge-rgb), 0.06), 0 8px 24px rgba(var(--shadow-rgb), calc(0.4 * var(--shadow-k)));
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  pointer-events: auto;
  transition: opacity 200ms var(--ease-out), translate 200ms var(--ease-out);
}
.toast:not([class*="--"]) { padding-left: 18px; }
.toast > svg { flex: none; width: 18px; height: 18px; color: var(--ink-3); }
.toast--error > svg { color: var(--danger); }
@starting-style { .toast { opacity: 0; translate: 0 8px; } }
.toast.is-leaving { opacity: 0; translate: 0 4px; transition-duration: 150ms; transition-timing-function: ease-out; }
@media (prefers-reduced-motion: reduce) {
  .toast { transition-property: opacity; }
  @starting-style { .toast { translate: none; } }
  .toast.is-leaving { translate: none; }
}

/* ==========================================================================
   The detail: one reference opened over the grid (site/modules/detail.js), after bencho.dev's finds, in the page's
   own dark style. The media floats on the left, lifted off a blurred page; a panel hugs the right edge.
   The panel reads like a caption (after cosmos.so and are.na), in groups set apart by space: a top bar
   (when it was added; Share, Close); the header (the title, its credit, the note); where it's from (the
   source); the tags. Space, measured between what you see: 8px between siblings (buttons, chips), 20px
   inside the header, 24–32px between groups (28 from the note to the source, 24 from the source to the
   tags, 32 around the top bar). Each part takes its space from the gap above it, so a missing credit or
   note never doubles a gap. Save, its one white pill, and Copy prompt are pinned to its foot.
   The panel is the filter sheet's surface (the page with the pills' 5.5% wash, 32px corners, 24px inside)
   and its type is the platform's three sizes: 18 for the title, 14 for what you read or tap, 12 for the
   small print. Gaps are multiples of 4, measured between capitals and edges.
   ========================================================================== */
.detail {
  --side: 300px;
  --hug: 16px;                              /* the panel's distance from the screen's edges */
  --surface: #181818;                       /* #0a0a0a with 5.5% white on top, opaque (the sheet's tone) */
  --surface-2: #222222;                     /* the panel lifted a step: the Save to popover */
  --avatar: #2a2a2a;                        /* a face that hasn't loaded, a source's tile */
  --tile-bg: #1c1c1e;
  --copy-fill: rgb(37, 37, 37);             /* the Copy pill's wash on the panel, opaque: the tick is drawn in it */
  --media-r: 16px;                          /* the tiles' corner, so the morph keeps its shape */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --lift: 0 2px 5px rgba(0, 0, 0, 0.22), 0 10px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.07);
  --flat: 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 1px rgba(255, 255, 255, 0);   /* --lift at rest, for the morph */
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: var(--ink);
  outline: none;
}
/* light (index.html's light tokens): the panel and its popover are white on the page's white veil, lifted
   by the same shadow at a third of its strength and a black hairline */
:root[data-theme="light"] .detail {
  --surface: #ffffff;
  --surface-2: #ffffff;
  --avatar: #ebebe9;
  --tile-bg: #f1f1f0;
  --copy-fill: rgb(241, 241, 241);
  --lift: 0 2px 5px rgba(23, 24, 26, 0.06), 0 10px 24px rgba(23, 24, 26, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.07);
  --flat: 0 0 0 rgba(23, 24, 26, 0), 0 0 0 rgba(23, 24, 26, 0), 0 0 0 1px rgba(0, 0, 0, 0);
}
.detail::backdrop { background: transparent; }

/* the page behind: dimmed by the page colour at 55% and blurred, so the media and panel lift off it.
   The blur itself grows, from none, on the drawer's curve and in step with the picture and the page:
   fading a blurred layer in by its opacity left iPhones showing the page sharp and the blur arriving at the
   end ("so blur isn't delayed and it's super smooth", Simon, 2026-11-27). Each dress sets --scrim-tint and
   --scrim-blur; the veil takes them only while open */
.detail__scrim {
  --scrim-tint: color-mix(in srgb, var(--bg) 55%, transparent);
  --scrim-blur: 12px;
  position: absolute;
  inset: 0;
  background-color: transparent;
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  backdrop-filter: blur(0px) saturate(100%);
  transition: background-color 300ms cubic-bezier(0.32, 0.72, 0, 1), -webkit-backdrop-filter 300ms cubic-bezier(0.32, 0.72, 0, 1), backdrop-filter 300ms cubic-bezier(0.32, 0.72, 0, 1);
}
.detail[data-on] .detail__scrim {
  background-color: var(--scrim-tint);
  -webkit-backdrop-filter: blur(var(--scrim-blur)) saturate(130%);
  backdrop-filter: blur(var(--scrim-blur)) saturate(130%);
  transition-duration: 380ms;
}

/* the shell holds the media and the panel, so a drag on a phone moves them as one */
.detail__shell { position: absolute; inset: 0; pointer-events: none; transition: transform 280ms cubic-bezier(0.22, 0.9, 0.28, 1); }
/* the room the media is centred in: left of the panel, 24px from the other edges. It takes no clicks on a
   computer, so a click beside the picture lands on the backdrop and closes */
.detail__stage { position: absolute; top: 24px; bottom: 24px; left: 24px; right: calc(var(--side) + var(--hug) * 2); }

.detail__media {
  position: absolute;
  overflow: hidden;
  border-radius: var(--media-r);
  background: rgba(var(--ink-rgb), 0.045);
  box-shadow: var(--lift);
  pointer-events: auto;
  isolation: isolate;
}
.detail__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
/* the tile's poster is there at once; the large poster and then the video fade in over it */
.detail__img--large, .detail__video { opacity: 0; transition: opacity 300ms var(--ease-out); }
.detail__img--large[data-in], .detail__video[data-in] { opacity: 1; }

/* ---- the panel ---- */
.detail__side {
  position: absolute;
  top: var(--hug);
  right: var(--hug);
  bottom: var(--hug);
  width: var(--side);
  display: flex;
  flex-direction: column;
  overflow: hidden;                         /* the body scrolls, between the fixed top bar and foot */
  border: 1px solid transparent;            /* no visible edge; still draws one in forced colours */
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--lift);
  pointer-events: auto;
  outline: none;
  transform: translateX(calc(100% + var(--hug) + 8px));
  transition: transform 240ms var(--ease-drawer);
}
/* built as the filter sheet: the top bar and the foot keep their height, the body between them scrolls and
   fades (32px, as the sheet's) at whichever end has more; inside, 24px from every edge (23 + the border) */
.detail__side > * { flex-shrink: 0; }
.detail__side > .detail__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 23px 23px 32px;                  /* 23 under the bar + the icons' 9px of air = 32 to the title */
}
.detail__body::-webkit-scrollbar { display: none; }
.detail__body[data-fade="end"] { mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); }
.detail__body[data-fade="start"] { mask-image: linear-gradient(to bottom, transparent, #000 32px); }
.detail__body[data-fade="both"] { mask-image: linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.detail[data-on] .detail__side { transform: none; transition-delay: 150ms; transition-duration: 380ms; }

/* the top bar: when it was added, quiet metadata at the left; Share and Close at the right, the page's
   ghost icon buttons (a circle of white at 8% grows in behind the icon on hover), pulled out to the
   corner so their glyphs sit on the 24px inset */
.detail__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 15px 0 23px; touch-action: none; }   /* the icons' glyphs 24px from the top and right edges */
.detail__acts { display: flex; flex: none; gap: 6px; margin-left: auto; }   /* stays right when there is no date; 6px between the two (they touched, washes and all), as the footer's round buttons */
.detail__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease;
}
.detail__icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(var(--ink-rgb), 0.08);
  opacity: 0;
  scale: 0.86;
  transition: opacity 0.15s ease, scale 0.25s var(--ease-out);
}
.detail__icon svg { position: relative; grid-area: 1 / 1; width: 18px; height: 18px; }
.detail__icon .detail__x { width: 24px; height: 24px; stroke-width: 1.25; }   /* Iconsax add turned 45°: drawn larger so the cross matches the 18px link icon, its line the same weight */
.detail__icon:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(var(--ink-rgb), 0.35); }
.detail__icon:focus-visible::before { opacity: 1; scale: 1; }
@media (hover: hover) and (pointer: fine) {
  .detail__icon:hover { color: var(--ink); }
  .detail__icon:hover::before { opacity: 1; scale: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .detail__icon:active { scale: 0.96; transition: color 0.15s ease, scale 0.15s ease-out; }
}
/* the swaps, one recipe everywhere (the tiles' Save): two icons stacked, the new one crossing in from a
   quarter of its size out of a 4px blur, 300ms. The bookmark outline → filled once saved; link or copy →
   a tick for a moment after copying. Reduced motion keeps the fade */
.detail__swap { display: grid; flex: none; }
.detail__swap svg, .detail__icon svg { grid-area: 1 / 1; transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1); }
.detail__save-on, .detail__swap-b { opacity: 0; }
.detail__save[aria-pressed="true"] .detail__save-off, [data-done] .detail__swap-a { opacity: 0; }
.detail__save[aria-pressed="true"] .detail__save-on, [data-done] .detail__swap-b { opacity: 1; }
[data-done].detail__icon { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .detail__swap svg, .detail__icon svg { transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1), scale 0.3s cubic-bezier(0.2, 0, 0, 1), filter 0.3s cubic-bezier(0.2, 0, 0, 1); }
  .detail__save-on, .detail__swap-b { scale: 0.25; filter: blur(4px); }
  .detail__save[aria-pressed="true"] .detail__save-off, [data-done] .detail__swap-a { scale: 0.25; filter: blur(4px); }
  .detail__save[aria-pressed="true"] .detail__save-on, [data-done] .detail__swap-b { scale: 1; filter: blur(0); }
}

/* the tags: the bar's pills a size down (32px). Each one shows the grid filtered by it */
.detail__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.detail__tags[hidden] { display: none; }
.detail__tag {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.07);
  color: var(--ink-3);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.detail__tag:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(var(--ink-rgb), 0.35); }
@media (hover: hover) and (pointer: fine) { .detail__tag:hover { background: rgba(var(--ink-rgb), 0.11); color: var(--ink); } }

/* the header, one group 20px apart: the title (trimmed to its capitals, so the gaps are the gaps you see),
   its credit, the note */
.detail__title {
  margin: 0;
  font-size: 18px;                          /* the platform's title size, as the filter sheet's */
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
  text-box: trim-both cap alphabetic;
  user-select: text;
}

/* who made it: the maker's avatar, 40px;  a person is a circle, a company or studio a rounded square. The
   brand it was made for is a 20px rounded square on its lower right, cut out of the avatar by a 2px ring
   of the panel's colour (the reference's "person at company" mark). Beside it the maker's name over "for
   ElevenLabs", or their handle */
.detail__credit { display: flex; align-items: center; gap: 12px; min-height: 40px; margin-top: 20px; }
/* the brand badge hangs 5px below the avatar; the gap to the note is measured from the badge */
.detail__credit:has(.detail__av--badge) + .detail__note { margin-top: 25px; }
.detail__credit[hidden] { display: none; }
.detail__faces { position: relative; flex: none; width: 40px; height: 40px; }
.detail__av {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--avatar);
  color: var(--ink-3);
  font-weight: 550;
  object-fit: cover;
  outline: 1px solid rgba(var(--edge-rgb), 0.1);
  outline-offset: -1px;
}
.detail__av--main { width: 40px; height: 40px; font-size: 16px; }
.detail__av--main.detail__av--org { border-radius: 10px; }
.detail__av--badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 10px;
  box-shadow: 0 0 0 2px var(--surface);
}
.detail__av--badge:not(.detail__av--org) { border-radius: 999px; }
/* a site's icon (its favicon, made for a browser tab: often black or white on nothing) inset on a white plate,
   as a tab or a launcher shows one, so it reads on the dark panel and the light one alike, whole: 20px in the
   40px avatar, 14px in the 20px badge (a favicon is 32px at most, so it's never blown up) */
.detail__av.detail__av--logo.av-fill.av-fill { background: #fff; }
.detail__av--logo img { display: block; width: 20px; height: 20px; border-radius: 4px; object-fit: contain; }
.detail__av--badge.detail__av--logo img { width: 14px; height: 14px; border-radius: 3px; }
/* a placeholder badge keeps its cut-out ring */
.detail__av--badge.av-fill.av-fill { box-shadow: 0 0 0 2px var(--surface); }
.detail__credit-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.detail__credit-name, .detail__credit-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.3; }
.detail__credit-name { color: var(--ink); font-size: 14px; font-weight: 500; letter-spacing: -0.006em; }
.detail__credit-sub { color: var(--ink-4); font-size: 12px; }
.detail__credit-brand { color: var(--ink-3); font-weight: 500; }

/* the credit's avatar and words in a row: plain, not a link (the source is the panel's one link out) */
.detail__credit-link { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; }
.detail__note {
  margin: 20px 0 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
  text-box: trim-both cap alphabetic;
  user-select: text;
}
.detail__note[hidden], .detail__age[hidden] { display: none; }
.detail__age { margin: 0; min-width: 0; color: var(--ink-4); font-size: 12px; line-height: 1; white-space: nowrap; }
/* where it's from starts a group of its own, 28px down, so the source never reads as part of the credit */
.detail__source { margin-top: 28px; }

/* a row you can open (the source): the page's faint fill, a picture, a name, and an arrow out at the end
   that leans a pixel toward where it goes on hover. Corners 16px: the picture's 8 + the 8px inset */
.detail__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px 8px 8px;
  border-radius: 16px;
  background: rgba(var(--ink-rgb), 0.055);
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
}
.detail__row[hidden] { display: none; }
.detail__row:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(var(--ink-rgb), 0.5); }
.detail__thumb {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--tile-bg);
  object-fit: cover;
  outline: 1px solid rgba(var(--edge-rgb), 0.08);
  outline-offset: -1px;
}
/* the source is a plain link, no container: its icon and the name, as long as its words and no longer */
.detail__source.detail__source { width: fit-content; gap: 8px; max-width: 100%; min-height: 0; padding: 0; border-radius: 6px; background: none; }
.detail__source .detail__row-name { flex: 0 1 auto; min-width: 0; }
.detail__source:focus-visible { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px rgba(var(--ink-rgb), 0.5); }
/* its icon alone, in ink, no tile behind it: the link icon, for every source */
.detail__source .detail__source-icon { width: 20px; height: 20px; background: none; outline: 0; color: var(--ink); }   /* as wide as the icon, so the name sits close */
.detail__source-icon svg { width: 20px; height: 20px; }
.detail__row-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.detail__row-name, .detail__row-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.3; }
.detail__row-name { font-size: 14px; font-weight: 500; letter-spacing: -0.006em; }
.detail__row-sub { color: var(--ink-4); font-size: 12px; }
@media (hover: hover) and (pointer: fine) {
  .detail__row:not(.detail__source):hover { background: rgba(var(--ink-rgb), 0.09); }
}


/* the foot, as the filter sheet's: right under the body's fade, 24px from the sides and bottom (more where a
   phone's home bar needs it). Save, the one white pill (the header's Join), and Copy prompt under it in the
   bar's filled pill. Saved, the pill stays white: the bookmark fills and the word rolls to "Saved" */
.detail__foot { display: flex; flex-direction: column; gap: 8px; padding: 0 23px max(23px, calc(env(safe-area-inset-bottom) - 12px)); }
/* a computer (a mouse, and the room for the side panel), the default dress (the panel on the desk, no surface of
   its own): the words 16px inside the panel at its sides, top and foot (15 + the border; the icons' glyphs on
   that inset too), so 32px from the screen's edges and from the page's card, not 40. Phones and tablets keep 24 */
@media (min-width: 761px) and (hover: hover) and (pointer: fine) {
  .detail[data-drawer="outside"] .detail__head { padding: 0 0 0 7px; }   /* (the icons in the panel's top corner, level with the card's top) */
  .detail[data-drawer="outside"] .detail__side > .detail__body { padding-inline: 7px; }   /* (on the buttons' edges: 24px from the card and the screen's edge) */
  .detail[data-drawer="outside"] .detail__foot { padding: 0 7px 7px; }   /* (the buttons 8px in: 24px from the card, the screen's edge and foot) */
}
.detail__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.detail__btn svg { flex: none; width: 18px; height: 18px; }
.detail__btn[hidden] { display: none; }
.detail__btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(var(--ink-rgb), 0.5); }
.detail__save { border: 1px solid transparent; background: var(--ink); color: var(--bg); }
/* the word rolls in its own clipped cell, both words centred while the cell glides to the new width
   (site/modules/detail.js rollLabel, after the count badges) */
.detail__save-label, .detail__copy-label { display: grid; place-content: center; overflow: hidden; }
.detail__roll { grid-area: 1 / 1; white-space: nowrap; text-align: center; }
/* Copy prompt in the bar's pill dress (the order pill, "Recommended"): the faint wash, no visible edge (the
   transparent 1px still draws in forced colours), white words; a touch brighter on hover */
.detail__copy { border: 1px solid transparent; background: rgba(var(--ink-rgb), var(--wash, 0.055)); color: var(--ink); }
.detail__copy[data-done] { background: rgba(var(--ink-rgb), 0.09); }
@media (hover: hover) and (pointer: fine) {
  .detail__save:hover { background: var(--solid-hover); }
  .detail__copy:hover { background: rgba(var(--ink-rgb), 0.1); }
}
@media (prefers-reduced-motion: no-preference) {
  .detail__btn { transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, scale 0.15s ease-out; }
  .detail__btn:active { scale: 0.96; }
}

/* The done icon of Copy prompt and Copy link (plans 009, 013): the filled check takes the icon's place with
   the swaps' cross-fade; its tick, in the colour behind it (--tick), draws in from 120ms, 240ms strong
   ease-out. Copy link has no fill of its own, so its tick is the panel's colour */
.detail__face { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.t-success-tick { stroke: var(--tick, var(--bg)); stroke-dasharray: 12; stroke-dashoffset: 12; }
.detail__copy[data-done] .t-success-tick, .detail__share[data-done] .t-success-tick { animation: t-check-draw 240ms var(--ease-out) 120ms forwards; }
@keyframes t-check-draw { to { stroke-dashoffset: 0; } }
.detail__copy { --tick: var(--copy-fill); }    /* the wash pill's colour on the panel */
.detail__share { --tick: var(--surface, var(--bg)); }
@media (prefers-reduced-motion: reduce) {
  .detail__copy[data-done] .t-success-tick, .detail__share[data-done] .t-success-tick { animation: none; stroke-dashoffset: 0; }
}

/* ---- the "Save to" popover (plans/014-save-to-collections.md, after Spotify's add-to-playlist) ----
   It rises from the Save button: anchored 8px above it, as wide, its transform origin at the button
   (bottom centre), from 96% and 6px down with its fade, 200ms strong ease-out; the rows follow 30ms apart
   (4px rise and fade). Closing is faster and quieter: 120ms ease-out back toward the button, no stagger.
   The surface is the panel lifted a step (#222, the menu's shadow); corners 20px = the rows' 12 + the
   8px inset. Rows: a 32px cover, the name over a quiet count, and the filter's checkbox at the end */
.detail__foot { position: relative; }
.detail__pop {
  position: absolute;
  left: 23px;
  right: 23px;
  bottom: calc(100% + 8px);
  z-index: 5;
  max-height: min(360px, 60vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px rgba(var(--edge-rgb), 0.06), 0 16px 40px rgba(var(--shadow-rgb), calc(0.5 * var(--shadow-k)));
  transform-origin: 50% 100%;
  opacity: 0;
  scale: 0.96;
  translate: 0 6px;
  visibility: hidden;
  transition: opacity 120ms ease-out, scale 120ms ease-out, translate 120ms ease-out, visibility 0s linear 120ms;
}
.detail__pop[data-open] {
  opacity: 1;
  scale: 1;
  translate: 0 0;
  visibility: visible;
  transition: opacity 200ms var(--ease-out), scale 200ms var(--ease-out), translate 200ms var(--ease-out), visibility 0s;
}
.detail__pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 4px 8px; }
.detail__pop-title { margin: 0; color: var(--ink-3); font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: -0.006em; }
/* "New": the heading's quiet action, a text button in the muted ink that only takes the faint fill on
   hover; it stays out of the list so the list is only collections */
.detail__pop-new {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.detail__pop-new svg { width: 16px; height: 16px; }
.detail__pop-new:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(var(--ink-rgb), 0.45); }
@media (hover: hover) and (pointer: fine) { .detail__pop-new:hover { color: var(--ink); background: rgba(var(--ink-rgb), 0.06); } }
@media (prefers-reduced-motion: no-preference) { .detail__pop-new:active { scale: 0.96; transition: color 0.15s ease, background-color 0.15s ease, scale 0.15s ease-out; } }
/* the name field arrives as the first row, rising 4px with its fade (200ms strong ease-out) */
.detail__pick-draft { animation: detail-draft-in 200ms var(--ease-out); }
@keyframes detail-draft-in { from { opacity: 0; translate: 0 -4px; } }
@media (prefers-reduced-motion: reduce) { .detail__pick-draft { animation-name: detail-fade-in; } @keyframes detail-fade-in { from { opacity: 0; } } }
.detail__pop-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.detail__pop-list > li { opacity: 0; translate: 0 4px; transition: opacity 120ms ease-out, translate 120ms ease-out; }
.detail__pop[data-open] .detail__pop-list > li {
  opacity: 1;
  translate: 0 0;
  transition: opacity 200ms var(--ease-out), translate 200ms var(--ease-out);
  transition-delay: calc(40ms + var(--i, 0) * 30ms);
}
.detail__pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px 8px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
}
.detail__pick:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(var(--ink-rgb), 0.45); }
@media (hover: hover) and (pointer: fine) { .detail__pick:hover { background: rgba(var(--ink-rgb), 0.06); } }
.detail__pick-cover {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(var(--ink-rgb), 0.08);
  color: var(--ink-3);
  outline: 1px solid rgba(var(--edge-rgb), 0.08);
  outline-offset: -1px;
}
.detail__pick-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail__pick-cover svg { width: 18px; height: 18px; }
.detail__pick-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.detail__pick-name, .detail__pick-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.3; }
.detail__pick-name { font-size: 14px; font-weight: 500; letter-spacing: -0.006em; }
.detail__pick-sub { color: var(--ink-4); font-size: 12px; }
.detail__pick-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.006em;
}
.detail__pick-input::placeholder { color: var(--ink-4); }

/* the checkbox is the filter's own (site/styles/explore.css .fx-box, .t-check): a 16px outlined box that fills
   with the ink and draws its tick when ticked. Pressing a row squeezes it to 0.9 */
@media (prefers-reduced-motion: no-preference) {
  .detail__pick .fx-box { transition: background 150ms var(--ease-out), box-shadow 150ms var(--ease-out), scale 150ms ease-out; }
  .detail__pick:active .fx-box { scale: 0.9; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .detail__pick-input { font-size: 16px; }   /* iOS zooms the page into anything smaller */
}
@media (prefers-reduced-motion: reduce) {
  .detail__pop, .detail__pop[data-open] { scale: 1; translate: 0 0; }
  .detail__pop-list > li, .detail__pop[data-open] .detail__pop-list > li { translate: 0 0; transition-delay: 0ms; }
}

.detail__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- a phone, upright: the media on top (46%), the panel under it (54%), 12px from the edges and 8px
   apart. The panel scrolls under its pinned foot. The media and the panel's head can be dragged down to
   close ---- */
@media (max-width: 760px) and (orientation: portrait) {
  .detail__stage { top: 12px; left: 12px; right: 12px; bottom: auto; height: calc((100% - 24px) * 0.46 - 8px); pointer-events: auto; touch-action: none; }
  .detail__media { touch-action: none; }
  .detail__side {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    height: calc((100% - 24px) * 0.54);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 200ms ease, transform 240ms var(--ease-drawer);
  }
  .detail[data-on] .detail__side { opacity: 1; transform: none; transition-delay: 60ms; transition-duration: 300ms, 380ms; }
  .detail__head { padding: 13px 13px 0 23px; }           /* 40px icons: their glyphs stay 24px in */
  .detail__side > .detail__body { padding-top: 21px; }  /* 21 + the icons' 11px of air = 32 to the title */
  .detail__head .detail__icon { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .detail__side, .detail[data-on] .detail__side { transform: none; transition: opacity 200ms ease; transition-delay: 0ms; }
  .detail__side { opacity: 0; }
  .detail[data-on] .detail__side { opacity: 1; }
}

/* ==========================================================================
   The drawer's dress (site/modules/detail.js DRAWER): everything above is the panel's base, a lifted card over the
   blurred page; outside, below, dresses it
   ========================================================================== */

/* ---- outside (the default): the page itself steps aside. It becomes a card, cut to the screen with
   24px corners (site/modules/detail.js pageAside sets the transform and the cut on <body>). Behind it is the desk,
   and the panel is simply on that desk beside the card: no surface, shadow or corners of its own, as if it
   had been under the page all along. So the page is the lifted thing and the panel the ground. The veil
   that dims and blurs the page keeps to the card.
   - A computer (and a phone on its side): the card is scaled so its top and bottom edges land level with
     the panel's and moved left until its right edge stops 16px short of it; its left side runs off the screen.
   - A phone, upright: the same turned a quarter. The card keeps the screen's full width (side gutters made
     it a box inside a box round the picture) and is moved up until its bottom edge stops 8px short of the
     panel; its top runs off the screen. The picture sits over the card, the panel on the desk under it.
     Dragging down takes the card along (it comes back down with the finger) and lets it home on release.
   The desk is the tone of the page's own washes (the buttons, the search pill, the collection cards: the
   ink at --wash over the page), as one opaque colour, so the ground the panel is on is a tone the page
   already uses. The Copy pill is that wash once more over the desk ---- */
:root { --desk: color-mix(in srgb, rgb(var(--ink-rgb)) calc(var(--wash) * 100%), var(--bg)); }
html.detail-aside { background: var(--desk); }
html.detail-aside body { transition: transform 380ms cubic-bezier(0.32, 0.72, 0, 1), clip-path 380ms cubic-bezier(0.32, 0.72, 0, 1); }
html.detail-aside[data-aside="back"] body { transition-duration: 300ms; }
@media (prefers-reduced-motion: reduce) { html.detail-aside body { transition: none; } }
/* (:root, to outweigh the light theme's own values for these two) */
:root .detail[data-drawer="outside"] { --surface: var(--desk); --copy-fill: color-mix(in srgb, rgb(var(--ink-rgb)) calc(var(--wash) * 100%), var(--desk)); }
.detail[data-drawer="outside"] .detail__side {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  opacity: 0;
  transition: opacity 160ms ease-out;
}
.detail[data-drawer="outside"][data-on] .detail__side { opacity: 1; transition-delay: 140ms; transition-duration: 260ms; }
.detail[data-drawer="outside"] .detail__scrim { --scrim-tint: color-mix(in srgb, var(--bg) 45%, transparent); --scrim-blur: 8px; }
@media (min-width: 761px), (orientation: landscape) {
  .detail[data-drawer="outside"] .detail__scrim { inset: var(--hug) calc(var(--side) + var(--hug) * 2) var(--hug) 0; border-radius: 0 24px 24px 0; }
}
@media (max-width: 760px) and (orientation: portrait) {
  /* the veil over the card: edge to edge, down to the card's bottom edge (the stage's: 12px + 46% of the
     room - 8px), and well past the top, so the card stays veiled when a drag brings it down. Stronger than
     on a computer (60% of the page's colour, a 16px blur): the picture takes most of the card here, and a
     light veil left the page's own boxes showing round it as a second, ghostly frame */
  .detail[data-drawer="outside"] .detail__scrim {
    inset: -60vh 0 calc(100% - 4px - (100% - 24px) * 0.46) 0;
    border-radius: 0 0 24px 24px;
    --scrim-tint: color-mix(in srgb, var(--bg) 60%, transparent);
    --scrim-blur: 16px;
  }
  /* on the desk the panel has no box to be inset in: it spans the screen and runs to its foot. Its words
     and the glyphs of its two icons keep to the picture's edges above (24px in); its two actions are 12px
     from the sides and from the bottom (or the home bar's height, where that is more) */
  .detail[data-drawer="outside"] .detail__side { left: 0; right: 0; bottom: 0; height: calc((100% - 24px) * 0.54 + 12px); }
  .detail[data-drawer="outside"] .detail__head { padding: 13px 15px 0 23px; }
  .detail[data-drawer="outside"] .detail__foot { padding: 0 11px max(12px, env(safe-area-inset-bottom)); }
}

/*
  Saving while signed out (site/modules/save-gate.js): Settings' modal (.st in site/styles/settings.css gives the
  scrim, the blur behind, the panel's surface and shadow, and its way in and out), set out as the sign-in page
  (site/styles/signin.css): a centred heading and line at the top, then a stack of full-width pills 8px apart,
  the solid one first, at the foot. Between them, a space of its own for the depth field (the hero's pictures
  on the move: the script says how). The × is Settings' ghost close, top right. A centred modal on a phone
  too, never a sheet.

  One inset all round, --sg-in: the pills sit as far from the panel's sides as from its foot. The heading
  starts lower than that, clear of the ×.

  The field runs to the panel's sides and fades at its four edges over 32px (the site's fade), so a picture
  leaves under the edge, as the hero's fade out at their top and bottom, and never reaches the words or the
  pills.
*/
.sg__panel {
  --sg-in: 24px;
  position: relative;
  flex-direction: column;
  gap: 0;
  width: min(480px, 100%);
  height: auto;
  max-height: 100%;
  padding: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
}
.sg__close { position: absolute; top: 18px; right: 18px; z-index: 2; margin: 0; }

.sg__head { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(320px, calc(100% - 2 * var(--sg-in))); margin: 0 auto; padding-top: 48px; text-align: center; }
.sg__title { margin: 0; color: var(--ink); font-size: 18px; font-weight: 550; letter-spacing: -0.015em; line-height: 1.3; }
.sg__line { margin: 0; color: var(--ink-3); font-size: 14px; line-height: 1.55; text-wrap: balance; }

.sg__stage { position: relative; flex: none; height: 280px; margin: 8px 0; overflow: hidden; }
.sg__field {
  position: absolute;
  inset: 0;
  perspective: 600px;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 32px), transparent),
    linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
          mask-image:
    linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 32px), transparent),
    linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.sg-pic { position: absolute; left: 50%; top: 50%; display: block; opacity: 0; will-change: transform, opacity; }
.sg-pic > .hero-tile { position: absolute; inset: 0; }
.sg-pic__near { filter: blur(10px); opacity: 0; will-change: opacity; }

.sg__acts { display: flex; flex-direction: column; gap: 8px; padding: 0 var(--sg-in) var(--sg-in); }
.sg .sg__join, .sg__signin { width: 100%; height: 40px; text-decoration: none; }

/* a phone: still a centred modal (Settings turns into a sheet from the foot here; this does not), the
   desktop's way in and out, 16px from the screen's sides */
@media (max-width: 640px) {
  .sg { padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
  .sg[open] { place-items: center; }
  .sg .sg__panel {
    --sg-in: 20px;
    width: 100%;
    height: auto;
    padding: 0;
    border-radius: 32px;
    translate: none;
    scale: 0.96;
    transition: scale 150ms var(--st-ease), opacity 150ms var(--st-ease);
  }
  .sg[data-open] .sg__panel { scale: 1; transition: scale 250ms var(--st-ease), opacity 250ms var(--st-ease); }
  .sg__head { padding-top: 44px; }
  .sg__stage { height: 232px; }
  .sg .sg__join, .sg__signin { height: 44px; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) { .sg .sg__panel { scale: none !important; } }
