/* typefacetypes — the showcase site, in its own style (what
   this site has: the top bar, the typefaces list, a typeface's page with its specimens, weights and the
   carousel of its characters, and the welcome) */
:root {
  --ink: #111;
  --ink-rgb: 17 17 17; /* the ink as channels, for washes and strokes */
  --paper: #fcfcfb;
  --selection-bg: #8fd9a8; /* the site's own text highlights in the brand green (text in a typeface in that typeface's colour) */
  --selection-ink: #111;
  --btn: #f5f5f5;
  --btn-hover: #ededed;
  --btn-active: #e6e6e6;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); overflow: visible; touch-action: manipulation; } /* (no double-tap zoom on phones) */
/* every page scrolls top to bottom (the document itself, so the top bar can stick to the window) */
html { overflow: auto; }
.letters { position: relative; color: var(--ink); min-height: 100dvh; --sel: 2.7; } /* --sel: the selected letter is this many times its neighbours */
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.variant:focus, .variant:focus-visible { outline: none; } /* letters never show a focus ring */
a { color: inherit; }

/* ---- the top bar, stuck to the window on every page ---- */
.letters-head { position: sticky; top: 0; z-index: 2; height: 80px; padding: 22px 76px 0; background: var(--paper); }
.intro { margin: 6px 0 0; text-align: center; font-size: 13px; line-height: 30px; opacity: 0.55; }
.intro:empty { display: none; }
/* Buttons: light grey rounded containers with a faint stroke */
/* every button is the filled one (the download menu's Download all): the page's ink, its paper for the label — so white
   on dark, dark on light, and the page's own ink on a coloured page; pressed or hovered it eases a little */
.btn { display: inline-block; font-size: 13px; line-height: 1; padding: 8px 12px; border-radius: 8px; background: var(--ink); border: 1px solid var(--ink); color: var(--paper); white-space: nowrap; text-decoration: none; transition: opacity 0.15s, background 0.15s, border-color 0.15s; }
/* hover looks only where a pointer can hover: on a touch screen a tap would leave them stuck on; there the same
   look shows while the finger is down (:active) and goes with it */
@media (hover: hover) { .btn:hover { opacity: 0.88; } }
.btn:active { opacity: 0.8; }
/* the tips: the buttons' resting fill and edge, see-through */
.tip { background: var(--btn); border: 1px solid rgb(var(--ink-rgb) / 0.08); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); color: var(--ink); font-size: 12px; line-height: 1.35; padding: 7px 10px; border-radius: 8px; }
.tip kbd { font: inherit; font-weight: 600; }
/* the light/dark switch, top right: an iOS-style track and knob (on = dark) */
.switch { position: absolute; top: 30px; width: 44px; height: 26px; padding: 2px; border-radius: 13px; background: rgb(var(--ink-rgb) / 0.14); transition: background 0.25s; }
.switch .knob { display: block; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
.switch[aria-checked='true'] { background: rgb(var(--ink-rgb) / 0.55); }
.switch[aria-checked='true'] .knob { transform: translateX(18px); }
.switch:focus-visible { border-radius: 13px; }
.theme { right: 28px; }
/* its tip, just below it: the colour shortcut */
.theme-tip { position: absolute; z-index: 40; top: 66px; right: 28px; white-space: nowrap; animation: fade-in 0.15s ease-out; }
.theme-tip[hidden] { display: none; }
/* the corner buttons (a typeface's page: All fonts), level with the switch */
.corner { position: absolute; top: 28px; }
.actions { right: 84px; display: flex; gap: 8px; }
.actions:empty { display: none; }
/* the typefacetypes logo, top left, in its own font: hovered, it runs through the typefaces and grows a little */
.logo { position: absolute; top: 26px; left: 28px; height: 32px; margin: 0; font: 27px/32px 'tt-logo', -apple-system, 'Helvetica Neue', sans-serif; font-kerning: none; white-space: nowrap; transform-origin: left center; transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); cursor: pointer; -webkit-user-select: none; user-select: none; }
.logo.live { transform: scale(1.14); }
@media (prefers-reduced-motion: reduce) { .logo { transition: none; } }

/* ---- the strip: every character side by side, the selected one large in the middle ---- */
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x; /* phones: swiped sideways; a pinch is the strip's own zoom (app.js), not the page's */
}
.stage::-webkit-scrollbar { display: none; }
/* a typeface's page: the strip's letters fade out towards the window's sides rather than being sliced there */
.letters.detail .stage { -webkit-mask-image: linear-gradient(to right, transparent, #000 min(10vw, 140px), #000 calc(100% - min(10vw, 140px)), transparent); mask-image: linear-gradient(to right, transparent, #000 min(10vw, 140px), #000 calc(100% - min(10vw, 140px)), transparent); }
/* room on both sides so the first and last can sit in the middle (set exactly in app.js: syncTrackEdges) */
.track { display: flex; align-items: center; gap: calc(min(5.75vw, 64.4px) * var(--zoom, 1)); height: 100%; padding: 0 50vw; }
/* the strip moves up or down so the selected letter sits on the zone's middle (--lift) */
.track { transform: translateY(var(--lift, 0px)); transition: transform 0.42s cubic-bezier(0.2, 0.7, 0.2, 1); }
.track.zooming { transition: none; }
/* the item is the snap target and must never move; the selection animates the letter inside it */
.item { position: relative; flex: 0 0 auto; scroll-snap-align: center; pointer-events: none; }
.item .variant { pointer-events: auto; }
/* a letter's box: its height from the layout (--letter-h), its width from the letter's own advance (--ar) */
.variant { display: block; --vh: var(--letter-h, 80px); height: var(--vh); width: calc(var(--vh) * var(--ar, 0.6)); font-size: calc(var(--vh) * 0.8475); line-height: var(--vh); opacity: 0.18; transform-origin: 50% var(--oy, 54.2%); transition: opacity 0.25s, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), height 180ms cubic-bezier(0.2, 0.75, 0.25, 1), width 180ms cubic-bezier(0.2, 0.75, 0.25, 1); }
@media (hover: hover) { .variant:hover { opacity: 0.38; } }
.item.on .variant { opacity: 1; transform: scale(var(--fit, var(--sel))); cursor: default; }
.item.before .variant { transform: translateX(calc(-1 * var(--push, 0px))); }
.item.after .variant { transform: translateX(var(--push, 0px)); }
.track.zooming .variant { transition: opacity 0.25s; }
/* the character itself, on one baseline for every typeface (--base, set per font in app.js) */
.glyph { display: block; white-space: pre; text-align: left; font-kerning: none; font-variant-ligatures: none; transform: translateY(calc(var(--vh) * var(--base, 0))); }

/* ---- home: the field of letters over two windows' height, and the typefaces' panel in the lower right ---- */
/* the field runs from the very top of the page, under the see-through bar, so nothing is cut off at the bar */
.field { position: relative; margin-top: -80px; height: 200vh; overflow: hidden; }
/* hover fades (letters, rows, a letter's name) all ease the same way: half a second, in and out, nothing abrupt */
:root { --fade: 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.field-item { position: absolute; display: block; color: inherit; text-decoration: none; transition: opacity var(--fade), left 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), top 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.field-glyph { position: absolute; left: 0; top: 0; display: block; line-height: 1; white-space: pre; font-kerning: none; transform: rotate(var(--r, 0deg)) scale(var(--s, 1)); transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), font-size 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) { .field-item:hover .field-glyph { --s: 1.08; } }
.field-item.hot .field-glyph { --s: 1.08; }
/* the typeface's name, small grey capitals under the letter, while the cursor is on it */
.field-name { position: absolute; transform: translateX(-50%); font: 11px/1 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; opacity: 0; transition: opacity var(--fade); pointer-events: none; }
@media (hover: hover) { .field-item:hover .field-name { opacity: 0.5; } }
.field-item.hot .field-name { opacity: 0.5; }
/* a letter just spawned by a click grows out of the click */
.field-item.spawn { opacity: 0; }
.field-item.spawn .field-glyph { --s: 0; }
/* a letter the text has no use for (it is shorter) shrinks and fades where it stands, and comes back the same way */
.field-item.gone { opacity: 0 !important; pointer-events: none; }
.field-item.gone .field-glyph { --s: 0.15; }
/* with the cursor on a letter, every other letter steps back to 10% (the typefaces' rows stay as they are, 2026-11-11);
   with the cursor over the typefaces' panel, every letter steps back to 10% */
.letters.dimmed .field-item:not(.hot), .letters.list-hot .field-item { opacity: 0.1; }
/* the maker's credit: three lines in the brand's face at the field's bottom right, a link; on hover it grows the
   way a letter does (and steps back with the letters when another is hovered) */
.credit { left: auto; top: auto; right: 28px; bottom: 28px; width: auto; height: auto; }
.credit-text { display: block; text-align: right; font: 21px/29px 'tt-logo', -apple-system, 'Helvetica Neue', sans-serif; font-kerning: none; white-space: pre-line; transform: scale(var(--s, 1)); transform-origin: right bottom; transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) { .credit:hover .credit-text { --s: 1.08; } }
.credit.hot .credit-text { --s: 1.08; }
.typeface { transition: opacity var(--fade); }
.typefaces {
  position: absolute;
  z-index: 3;
  top: 50vh;
  right: 28px;
  width: 50vw;
  touch-action: pan-y; /* phones: a pinch sizes the previews (app.js), not the page */
}
/* no box round the list: its rows sit on the page, and the field's letters keep clear of them */
.tf-rows { touch-action: pan-y; padding-bottom: env(safe-area-inset-bottom, 0px); }
.typefaces .typeface { background: transparent; }
/* a zoom keeps the point under the pointer where it is (app.js: zoomAround); the browser's own scroll anchoring
   would pull against that */
.typefaces, .grid { overflow-anchor: none; }
/* on home the bar is see-through and lets the cursor through to the letters under it (its controls still take it) */
.letters.has-field .letters-head { background: transparent; pointer-events: none; }
.letters.has-field .letters-head > * { pointer-events: auto; }
/* on a typeface's page the bar is see-through over the content column, so an entry scrolls up to the window's top
   in full; its two ends stay paper: the left one as wide as the label rail (a caption slides under it, below the
   logo), the right one as wide as the margin (the Download Font button and the switch sit on it) */
@media (min-width: 701px) {
  .letters.detail .letters-head {
    --bar-left: calc(var(--side, 28px) + var(--rail, 220px) + var(--rail-gap, 40px));
    --bar-right: max(220px, calc(var(--side, 28px) + var(--rail-pad, 260px)));
    background: linear-gradient(to right, var(--paper) 0 var(--bar-left), transparent var(--bar-left) calc(100% - var(--bar-right)), var(--paper) calc(100% - var(--bar-right)));
    pointer-events: none;
  }
  .letters.detail .letters-head > * { pointer-events: auto; }
}
/* a fresh layout puts every letter straight in its place: no sliding in (the field fades in round them) */
.field.still .field-item, .field.still .field-glyph { transition: none !important; }
/* ---- a typeface's page, a LEDGER: the preview (the weights, typed into) as the first entry, then the specimen
   sections, every entry the page's full width with its small grey caption in a rail at the left and a hairline
   above it; the entry's body is the column between the rail and an equal margin on the right (phones: the
   caption above its body, the column the full width) ---- */
.grid { display: flex; flex-direction: column; padding: 44px var(--side, 28px) 28px; }
/* the credit closes a typeface's page: in the flow under the last entry, at the right, the page's bottom inset under it */
.grid .credit { position: static; align-self: flex-end; margin-top: 96px; opacity: 0.2; } /* (quiet here, full ink under the cursor) */
@media (hover: hover) { .grid .credit:hover { opacity: 1; } }
.grid .credit.hot { opacity: 1; }
.grid .typefaces { position: static; width: auto; }
.grid .typeface { padding: 12px 0; }
/* the preview entry closes with its last row: no hairline under it, and little room before the next entry's line */
.grid .typeface:last-child { border-bottom: 0; }
.grid .tf-rows { padding-bottom: 0; }
.blk.blk-preview { padding-bottom: 12px; } /* (outranks .blk's own padding, which follows) */
.blk { display: grid; grid-template-columns: var(--rail, 220px) minmax(0, 1fr); column-gap: var(--rail-gap, 40px); align-items: start; padding: 48px var(--rail-pad, 0px) 48px 0; /* (the right margin mirrors the rail and its gap: app.js gridSpec) */ border-top: 1px solid rgb(var(--ink-rgb) / 0.12); touch-action: pan-y; /* phones: a pinch zooms the entry (app.js), not the page */ }
/* an entry zoomed past 1: its lines wrap in the column (at 1 they fit it by construction) */
.blk.zoomed .blk-line { white-space: normal; overflow-wrap: anywhere; }
.blk-cap { padding-top: 6px; font: 11px/1 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.5; }
.blk-body { min-width: 0; }
.blk-line { white-space: nowrap; line-height: 1.1; font-kerning: normal; }
.blk-grid { display: grid; justify-content: space-between; row-gap: 0.12em; line-height: 1.15; font-kerning: normal; }
.blk-pair { white-space: nowrap; }
/* in text: an editorial page — the headline (balanced over two lines when it wraps), the deck, the body */
.blk-page { max-width: 100%; }
.blk-head { margin: 0; line-height: 1.02; text-wrap: balance; font-kerning: normal; }
.blk-deck { margin: 0.5em 0 0; line-height: 1.3; font-kerning: normal; }
.blk-text { margin: 1.1em 0 0; line-height: 1.45; font-kerning: normal; }
/* the three pieces are typed into on their own (app.js fieldEditable): no ring, the typeface's own caret */
.blk-page [contenteditable] { outline: none; cursor: text; caret-color: var(--selection-bg, var(--ink)); white-space: pre-wrap; }
:root.neon .blk-page [contenteditable] { caret-color: var(--ink); }
.style-row .tf-num { flex-basis: 36px; }
/* ---- the rows: a typeface each (the list), or a weight each (a typeface's page) ---- */
.typeface { display: flex; align-items: center; gap: 20px; padding: 16px 28px; background: var(--paper); border-bottom: 1px solid rgb(var(--ink-rgb) / 0.07); }
/* the typeface's number (or the weight's) in the left margin, in the one small-label style every label on the
   site shares: the sections' captions (.blk-cap) and the letters' names on home (.field-name) */
.tf-num { flex: 0 0 44px; text-align: right; font: 11px/1 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; opacity: 0.5; user-select: none; } /* (set against the text: every row's text starts at the same place) */
/* live preview text in the row's own typeface: click to type, double-click to select */
.tf-text { color: var(--ink); flex: 1; min-width: 0; line-height: 1.3; white-space: pre-wrap; overflow-wrap: anywhere; outline: none; cursor: text; caret-color: var(--selection-bg, var(--ink)); font-kerning: normal; transition: color 0.25s; }
/* every highlight on the site is coloured: text in a typeface in that typeface's colour — a row's on home (set on
   the row's text), the whole of a typeface's page (set on its ledger), a letter in the field (set on the letter)
   — and the site's own text in the brand green (the root's) */
::selection { background: var(--selection-bg); color: var(--selection-ink); }
/* landing: the first row's highlight sweeps in from the left (app.js: landHighlight) before it is the selection */
.tf-text.sweep { background: linear-gradient(var(--selection-bg), var(--selection-bg)) no-repeat 0 0 / var(--sweep, 0px) 100%; transition: background-size 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.2s; }
.tf-text.sweep.done { color: var(--selection-ink); } /* (a touch screen keeps the sweep as the highlight: dark text on the green) */
.tf-text.loading { color: transparent; transition: none; }
/* a typeface's button shows only while the cursor is on its row (or it has keyboard focus) */
.typeface .btn { opacity: 0; transition: opacity 0.15s, background 0.15s, border-color 0.15s; }
.typeface:hover .btn, .typeface:focus-within .btn { opacity: 1; }
@media (hover: hover) { .typeface:hover .btn:hover { opacity: 0.88; } }
.typeface .btn:active { opacity: 0.8; }
@media (hover: none) { .typeface .btn { opacity: 1; } }
/* on a coloured page (Control + C) the highlight and cursor go neutral: the page's own black or white, see-through */
:root.neon ::selection { background: rgb(var(--ink-rgb) / 0.22); color: var(--ink); }
:root.neon .tf-text { caret-color: var(--ink); }

/* ---- a typeface's page: the bar stays on top; the specimens, the weights, the characters ---- */
/* the hero: six specimen slides, swiped or scrolled sideways, dots under them */
.hero { padding: 6px 28px 0; }
.hero-slides { display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x pan-y; }
.hero-slides::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 100%; scroll-snap-align: center; height: clamp(320px, 60vh, 720px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4% 5%; border-radius: 14px; background: rgb(var(--ink-rgb) / 0.05); color: var(--ink); opacity: 0; transition: opacity 0.3s; }
.hero.ready .hero-slide { opacity: 1; }
.hero-slide.left { align-items: flex-start; }
/* the second ink of a slide (its scheme's accent) */
.hero-slide .b { color: var(--c-b, inherit); }
/* a free composition: pieces placed about the whole card, bleeding off its edges like a printed page */
.hero-slide.compose { display: block; padding: 0; overflow: hidden; }
.hero-stage { position: relative; width: 100%; height: 100%; }
.hero-free { position: absolute; line-height: 1; white-space: nowrap; transform-origin: center; font-kerning: normal; }
.hero-free.upright { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 0.05em; }
/* the weights by name: words gathered in the middle, wrapping as they need */
.hero-cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0.1em 0.5em; line-height: 1.2; text-align: center; }
.hero-line { white-space: nowrap; line-height: 1.15; font-kerning: normal; }
.hero-line.left { align-self: flex-start; }
/* one letter huge, every weight of it down its side */
.hero-pick { display: flex; align-items: center; gap: 48px; max-width: 100%; }
.hero-bigwrap { position: relative; flex: none; overflow: hidden; }
.hero-big { position: absolute; display: block; line-height: 1; white-space: pre; }
.hero-col { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
/* the glyph table: a character to a cell */
.hero-grid { display: grid; justify-content: center; }
.hero-cell { display: block; width: var(--cell); height: var(--cell); line-height: var(--cell); font-size: calc(var(--cell) * 0.6); text-align: center; }
/* figures in use: six settings in a grid */
.hero-figs { display: grid; width: 100%; height: 100%; align-items: center; justify-items: center; }
.hero-fig { white-space: nowrap; line-height: 1.1; }
/* the typeface in text */
.hero-text { margin: 0; line-height: 1.32; font-kerning: normal; }
.hero-text + .hero-text { margin-top: 0.8em; }
.hero-dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0 6px; }
.hero-dot { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--ink-rgb) / 0.2); transition: background 0.2s; }
.hero-dot[aria-current='true'] { background: var(--ink); }
.hero-dot:focus-visible { border-radius: 50%; }
/* the weights: a row each, the upright on the left and its italic on the right, each half the width and set
   from its left edge; a weight without an italic keeps the whole width */
.weights { margin-top: 8px; border-top: 1px solid rgb(var(--ink-rgb) / 0.07); touch-action: pan-y; }
.tf-pair { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: baseline; }
.tf-pair.single { grid-template-columns: 1fr; }
.tf-pair .tf-text { min-width: 0; }
/* the characters, at the bottom: their zone's height is the zoom's (app.js: zoneFor) */
.letters.detail .stage { flex: none; height: 60vh; }

/* ---- Welcome: typefacetypes big in the middle of the page, running through the typefaces; everything else steps aside ---- */
.welcome { position: fixed; inset: 0; z-index: 5; display: none; align-items: center; justify-content: center; pointer-events: none; }
.welcoming .welcome { display: flex; }
.welcoming .logo, .welcoming .theme, .welcoming .theme-tip, .welcoming .track, .welcoming .intro, .welcoming .actions { visibility: hidden; }
.welcoming .typefaces, .welcoming .field { visibility: hidden; }
/* the word's highlight, sweeping in at the landing: the brand green with sharp corners, the text in black on it */
.welcome-logo { display: inline-block; padding: 0.02em 0.12em; border-radius: 0; font-family: 'tt-logo', sans-serif; font-kerning: none; white-space: nowrap; line-height: 1.2; color: var(--ink); background: linear-gradient(#8fd9a8, #8fd9a8) no-repeat left / 0% 100%; transition: background-size 0.5s cubic-bezier(0.25, 0.6, 0.2, 1), color 0.35s; transform-origin: left top; } /* (the highlight sweeps in over half a second, easing out, after the run has stopped: app.js land) */
.welcome-logo.lit { background-size: 100% 100%; color: #111; }
.welcome-logo.moving { transition: transform 0.37s cubic-bezier(0.2, 0.8, 0.2, 1), background-size 0.5s cubic-bezier(0.25, 0.6, 0.2, 1), color 0.35s; }
/* after the welcome, the page's parts fade in */
.letters.arriving .theme, .letters.arriving .track, .letters.arriving .intro, .letters.arriving .actions { animation: fade-in 0.5s ease-out both; }
.letters.arriving .typefaces, .letters.arriving .field { animation: fade-in 0.5s ease-out both; }
@keyframes fade-in { from { opacity: 0; } }

/* the logo's click on home: the page's letters, lifted off and dropped (letterfx.js) */
.fx-layer { position: fixed; inset: 0; z-index: 300; pointer-events: none; overflow: hidden; transition: opacity 0.45s ease; }
.fx-layer.out { opacity: 0; }
.fx-letter { position: absolute; display: block; white-space: pre; transform-origin: center; will-change: transform; font-kerning: none; }

/* Download Font: the weights menu (download.js); a tray from the bottom on phones */
.dl-backdrop { position: fixed; inset: 0; z-index: 70; }
.dl-backdrop.tray { background: rgb(0 0 0 / 0.25); }
.dl-menu { position: fixed; width: 220px; padding: 8px; display: grid; gap: 6px; background: var(--paper); color: var(--ink); border: 1px solid rgb(var(--ink-rgb) / 0.1); border-radius: 12px; box-shadow: 0 10px 40px rgb(0 0 0 / 0.16); font-size: 13px; }
.dl-menu.tray { left: 0; right: 0; bottom: 0; width: auto; border-radius: 16px 16px 0 0; border-bottom: 0; padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)); font-size: 15px; animation: tray-up 0.28s cubic-bezier(0.2, 0.75, 0.25, 1); }
@keyframes tray-up { from { transform: translateY(100%); } }
.dl-weights { display: grid; }
.dl-weight { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-height: 32px; padding: 0 6px; border-radius: 7px; cursor: pointer; }
.dl-menu.tray .dl-weight { min-height: 44px; }
@media (hover: hover) { .dl-weight:hover { background: var(--btn-hover); } }
.dl-weight:active { background: var(--btn-hover); }
/* a weight's box is a circle: a faint wash of the ink with a hairline ring, and, ticked, a thick dot in its
   middle. All in the ink, so it is black on a light page and white in the dark (and follows a coloured page) */
.dl-weight input { appearance: none; -webkit-appearance: none; margin: 0; width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%; border: 1px solid rgb(var(--ink-rgb) / 0.2); background: rgb(var(--ink-rgb) / 0.15); background-clip: padding-box; /* (the wash stops at the ring: one even stroke, no darker rim) */ display: grid; place-items: center; cursor: pointer; }
@media (min-resolution: 2dppx) { .dl-weight input { border-width: 0.5px; } } /* (a hairline where the screen can draw one) */
.dl-weight input::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--ink-rgb) / 0.75); opacity: 0; transition: opacity 0.15s; }
.dl-weight input:checked::after { opacity: 1; }
.dl-weight input:focus-visible { outline: 2px solid rgb(var(--ink-rgb) / 0.4); outline-offset: 2px; }
.dl-menu.tray .dl-weight input { width: 20px; height: 20px; }
.dl-menu.tray .dl-weight input::after { width: 9px; height: 9px; }
.dl-class { opacity: 0.45; font-variant-numeric: tabular-nums; }
.dl-italics { grid-template-columns: auto 1fr; border-top: 1px solid rgb(var(--ink-rgb) / 0.1); border-radius: 0; padding-top: 6px; }
.dl-status { margin: 4px 6px; opacity: 0.65; }
.dl-status[hidden] { display: none; }
.dl-go { margin-top: 2px; text-align: center; } /* (the filled .btn, full width) */
.dl-go:disabled { opacity: 0.35; cursor: default; }

/* dark mode: the system's choice, or the switch's (data-theme on <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { --ink: #f2f2f0; --ink-rgb: 242 242 240; --paper: #121212; --btn: #1f1f1f; --btn-hover: #282828; --btn-active: #303030; color-scheme: dark; }
}
:root[data-theme='dark'] { --ink: #f2f2f0; --ink-rgb: 242 242 240; --paper: #121212; --btn: #1f1f1f; --btn-hover: #282828; --btn-active: #303030; color-scheme: dark; }

/* phones */
@media (max-width: 700px) {
  .letters { --sel: 1.8; }
  .letters-head { padding: 12px 64px 0; height: 52px; }
  .field { margin-top: -52px; height: 200svh; }
  .typefaces { top: 55svh; left: 12px; right: 12px; width: auto; }
  .credit { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .credit-text { font-size: 18px; line-height: 26px; }
  .intro { margin: 0; min-height: 36px; font-size: 12px; line-height: 18px; }
  .corner { top: 12px; }
  .switch { top: 14px; }
  .theme { right: 12px; }
  .theme-tip { display: none; }
  .actions { right: 64px; }
  .logo { top: 16px; left: 12px; height: 18px; font-size: 15px; line-height: 18px; }
  .track { gap: calc(12px * var(--zoom, 1)); }
  .typeface { gap: 10px; padding: 12px; }
  .tf-num { flex-basis: 34px; font-size: 9.4px; } /* (15% smaller; a fixed column so the text always starts at the same x) */
  .style-row .tf-num { flex-basis: 26px; }
  .tf-text { line-height: 1.2; }
  .grid { padding: 20px var(--side, 12px) calc(12px + env(safe-area-inset-bottom, 0px)); }
  .grid .credit { margin-top: 64px; }
  .blk { grid-template-columns: minmax(0, 1fr); row-gap: 12px; padding: 32px 0; }
  .blk.blk-preview { padding-bottom: 8px; }
  .blk-cap { padding-top: 0; }
  .typeface .btn { font-size: 12px; padding: 7px 9px; }
  .hero { padding: 4px 12px 0; }
  .hero-slides { gap: 10px; }
  .hero-slide { height: clamp(240px, 46svh, 520px); border-radius: 12px; }
  /* a weight's italic under it, not beside it: half a phone's width is too little for a line */
  .tf-pair { grid-template-columns: 1fr; gap: 2px; }
  .letters.detail .stage { height: 50svh; }
}
