/* The shared pieces, built once (R7): buttons, rows, the view switch, sheets, notices, the paste box,
   the pack. Every clickable piece has a hover state and a visible keyboard focus; no scrolling area
   shows a scroll bar, and a fade marks a cut edge
   (spec/standards.md). Logical properties throughout, so right-to-left mirrors from `dir` alone. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  background: var(--paper); color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; text-size-adjust: 100%;
}
body { background: var(--paper); min-height: 100vh; }
/* The page is shown once its fonts are in (src/ui/page.ts), fading in, so the first thing seen is the final
   layout; nothing moves on its own before then (spec/motion.md, Loading). */
html.fl body > * { opacity: 0; }
html.fl *, html.fl *::before, html.fl *::after { animation-play-state: paused !important; }
html.fl-in body > * { transition: opacity .35s ease-out; }
@media (prefers-reduced-motion: reduce) { html.fl-in body > * { transition: none; } }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-underline-offset: .16em; text-decoration-thickness: 1px; transition: text-decoration-color var(--t-hover); }
/* A link in text: on hover the underline thickens and dims (spec/reading-mode.md). */
a:hover { text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.serif { font-family: var(--serif); }
/* Something a screen is not showing stays hidden, whatever display its own class gives it. */
[hidden] { display: none !important; }

/* No scroll bars, anywhere, not even while scrolling. */
html, body, .scroller { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, .scroller::-webkit-scrollbar { display: none; }

/* A scrolling strip marks each cut edge with a fade; client/scroller.ts says which edges are cut. */
.scroller { overflow: auto; --fade: 18px; }
.scroller[data-cut~=start] { --fade-start: var(--fade); }
.scroller[data-cut~=end] { --fade-end: var(--fade); }
.scroller.scroller--x {
  overflow-y: hidden;
  mask-image: linear-gradient(to right, transparent, #000 var(--fade-left, 0px), #000 calc(100% - var(--fade-right, 0px)), transparent);
}
.scroller--x[data-cut~=start]:dir(ltr), .scroller--x[data-cut~=end]:dir(rtl) { --fade-left: var(--fade); }
.scroller--x[data-cut~=end]:dir(ltr), .scroller--x[data-cut~=start]:dir(rtl) { --fade-right: var(--fade); }
.scroller.scroller--y {
  overflow-x: hidden;
  mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-start, 0px), #000 calc(100% - var(--fade-end, 0px)), transparent);
}

/* ---- buttons ------------------------------------------------------------------------------------ */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
  padding: 12px 16px; border-radius: var(--radius-m); font-size: var(--text-button); font-weight: 500;
  border: 1px solid var(--rule); background: var(--paper); text-decoration: none; text-align: center;
  transition: background var(--t-hover), border-color var(--t-hover), filter var(--t-hover), transform .1s;
}
.btn:hover { background: var(--tint); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
/* Not yet usable (Install, before the browser offers it): visibly so, and no hover or press. */
.btn:disabled { opacity: .45; cursor: default; pointer-events: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.btn--primary:hover { background: var(--accent); border-color: transparent; filter: brightness(1.08); }
.btn--quiet { border-color: transparent; color: var(--muted); font-size: 14px; padding: 10px; }
.btn--quiet:hover { background: var(--tint); color: var(--ink); border-color: transparent; }
.btn--ink { background: var(--ink); color: var(--paper); border-color: transparent; font-weight: 600; }
.btn--ink:hover { background: var(--ink); border-color: transparent; filter: brightness(1.15); }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn svg { flex: 0 0 auto; }
.stack { display: flex; flex-direction: column; gap: 9px; }

/* Held, not pressed (spec/motion.md): the fill grows while held and empties if let go. */
.btn--hold {
  position: relative; overflow: hidden; color: var(--danger); border: 1.5px solid var(--danger); font-weight: 600;
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.btn--hold:hover { background: var(--danger-bg); }
.btn--hold .btn__fill {
  position: absolute; inset: 0; background: var(--danger); opacity: .2;
  transform: scaleX(var(--held, 0)); transform-origin: left center;
}
.btn--hold:dir(rtl) .btn__fill { transform-origin: right center; }
.btn--hold .btn__label { position: relative; }
/* Held to the end: the mark drawing itself before what it is now doing. */
.btn--hold .btn__done-mark { display: none; position: relative; }
.btn--hold[data-done] .btn__done-mark { display: inline-flex; }
.btn--hold .btn__done-mark .brand__mark { width: 18px; height: 18px; transform: none; margin: 0; }
.btn--hold .btn__done-mark .brand__edge { stroke: none; }
.btn--hold[data-done] { background: var(--danger); color: var(--paper); }

/* A small square control: a close button, a bar's menu. */
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--radius-s); display: grid; place-items: center;
  color: var(--muted); flex: 0 0 auto; transition: background var(--t-hover), color var(--t-hover);
}
.icon-btn:hover { background: var(--tint); color: var(--ink); }

/* ---- the bar at the top of a screen ------------------------------------------------------------ */
.appbar {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 13px var(--gutter); border-block-end: 1px solid var(--rule); background: var(--paper);
}
.appbar__title { flex: 1; font-size: var(--text-screen); font-weight: 600; letter-spacing: -.005em; }

/* ---- the name (src/ui/brand.ts; spec/brand.md) ------------------------------------------------ */
/* The original stroke is the text colour of what it sits on; the translation is the accent, on top,
   with an edge of the background under it. Sizes from design/preview/site.html. */
.brand { display: flex; align-items: center; direction: ltr; font-weight: 700; text-decoration: none; color: var(--ink); }
.brand span { font-size: 23px; letter-spacing: -.015em; }
.brand__mark { width: 25px; height: 25px; flex: 0 0 auto; overflow: visible; margin-inline-end: 1px; transform: translateY(1px); }
.brand__mark path { fill: none; stroke-width: 15; stroke-linecap: round; }
.brand__original { stroke: currentColor; }
.brand__edge { stroke: var(--paper); stroke-width: 22; }
.brand__translation { stroke: var(--accent); }
/* Written once, about a second: the original, then the translation across it; then still. */
.brand--write path { stroke-dasharray: 1; animation: brand-write .5s var(--ease-arrive) both; }
.brand--write .brand__edge, .brand--write .brand__translation { animation-delay: .45s; }
@keyframes brand-write { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* The mark drawing itself where something is waited on: the ink stroke, then the blue stroke across it,
   holding, then both lifting away, every 1.9 s (spec/motion.md, Waiting). Still with reduced motion. */
.brand__mark--drawing path { stroke-dasharray: 1; animation: mark-ink 1.9s ease-in-out infinite; }
.brand__mark--drawing .brand__edge, .brand__mark--drawing .brand__translation { animation-name: mark-blue; }
@keyframes mark-ink { 0% { stroke-dashoffset: 1; } 25%, 82% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@keyframes mark-blue { 0%, 18% { stroke-dashoffset: 1; } 44%, 84% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }

/* ---- the footer of the public page, the Guide, Privacy and Terms (src/ui/brand.ts) -------------- */
.site-footer {
  display: flex; flex-wrap: wrap; gap: 20px; padding: 34px var(--gutter) 60px;
  border-block-start: 1px solid var(--rule); color: var(--faint); font-size: 13.5px;
}
.site-footer > span:first-child { margin-inline-end: auto; }
.site-footer a { text-decoration: none; transition: color var(--t-hover); }
.site-footer a:hover { color: var(--ink); }

/* ---- rows --------------------------------------------------------------------------------------- */
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; text-decoration: none;
  padding: 13px var(--gutter); border-block-end: 1px solid var(--rule); transition: background var(--t-hover);
}
.row:hover { background: var(--tint); }
.row__text { min-width: 0; display: flex; flex-direction: column; }
.row__title { font-size: var(--text-label); line-height: 1.35; }
.row__sub { font-size: var(--text-meta); color: var(--faint); margin-block-start: 2px; }
.row__end { margin-inline-start: auto; color: var(--faint); font-size: var(--text-sub); display: flex; align-items: center; gap: 8px; }
.row__chevron:dir(rtl) { transform: scaleX(-1); }
.row--danger .row__title { color: var(--danger); }
.row--article { display: block; padding: 14px var(--gutter); }
.row--article .row__title, .row--article .row__sub { display: block; }
.row--article .row__title { font-family: var(--serif); font-size: 15.5px; font-weight: 600; }
.row--article .row__sub { margin-block-start: 4px; }
/* The current choice in a list, such as the language picker's. */
.row[aria-current=true] .row__end::after,
.row[aria-checked=true] .row__end::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

/* ---- the view switch: a thumb that slides and settles ------------------------------------------ */
.switch {
  position: relative; display: flex; gap: 2px; padding: 3px; background: var(--tint); border-radius: 9px;
}
.switch__option {
  position: relative; z-index: 1; flex: 1; font-size: 13px; padding: 7px 10px; border-radius: var(--radius-s);
  color: var(--muted); white-space: nowrap; transition: color var(--t-hover), background var(--t-hover);
}
.switch__option:hover { color: var(--ink); }
.switch__option[aria-checked=true] { color: var(--ink); font-weight: 500; cursor: default; }
/* The current option answers the pointer too: its thumb lifts a little. */
.switch__option[aria-checked=true]:hover { text-shadow: 0 0 .01px currentColor; }
.switch:has(.switch__option[aria-checked=true]:hover) .switch__thumb { box-shadow: 0 1px 4px rgba(20, 24, 33, .16); }
/* Before the script places the thumb, the current option carries its own background. */
.switch:not([data-thumb]) .switch__option[aria-checked=true] { background: var(--paper); box-shadow: 0 1px 2px rgba(20, 24, 33, .07); }
.switch__thumb {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: var(--radius-s);
  background: var(--paper); box-shadow: 0 1px 2px rgba(20, 24, 33, .07);
  transition: transform var(--t-move) var(--ease-pushed), width var(--t-move) var(--ease-pushed);
}
.switch:not([data-thumb]) .switch__thumb { display: none; }

/* ---- sheets: rise from the bottom and settle --------------------------------------------------- */
.sheet {
  margin: auto auto 0; width: 100%; max-width: 520px; max-height: min(86vh, 720px); border: 0;
  color: var(--ink); background: var(--paper); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-sheet);
  padding: 9px 0 calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.sheet:not([open]) { display: none; }
.sheet::backdrop { background: var(--scrim); }
.sheet[open] { animation: sheet-in .42s var(--ease-arrive); }
.sheet[open]::backdrop { animation: fade-in .3s ease-out; }
.sheet[data-closing] { animation: sheet-out .2s var(--ease-leave) forwards; }
.sheet[data-closing]::backdrop { animation: fade-out .2s ease-in forwards; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.sheet__grab { width: 36px; height: 4px; border-radius: 2px; background: var(--rule); margin: 0 auto 6px; flex: 0 0 auto; }
.sheet__head { display: flex; align-items: center; gap: 10px; padding: 4px 12px 10px var(--gutter); }
.sheet__head:dir(rtl) { padding: 4px var(--gutter) 10px 12px; }
.sheet__title { flex: 1; font-size: var(--text-screen); font-weight: 600; }
.sheet__body { padding: 0 var(--gutter); }
.sheet__body.scroller { flex: 1 1 auto; }
.sheet__body--flush { padding: 0; }
.sheet__sub { display: block; font-size: var(--text-meta); font-weight: 400; color: var(--muted); margin-block-start: 1px; }
@media (min-width: 720px) {
  /* On a computer a sheet is a centred card, not a drawer. */
  .sheet { margin: auto; border-radius: 18px; padding-block-end: 20px; }
  .sheet__grab { visibility: hidden; height: 0; margin-block-end: 6px; }
  .sheet[open] { animation-name: card-in; }
  .sheet[data-closing] { animation-name: card-out; }
  @keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
  @keyframes card-out { to { opacity: 0; transform: translateY(10px); } }
}

/* ---- the language list: search, then every language under its own name ------------------------- */
.language-picker__search { position: sticky; top: 0; z-index: 1; background: var(--paper); padding: 2px var(--gutter) 8px; }
.language-picker__input {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--radius-m);
  background: var(--tint); color: var(--ink); font: inherit; font-size: var(--text-label);
}
.language-picker__input:hover { border-color: var(--rule); }
.language-picker__input:focus { outline: none; border-color: var(--accent); background: var(--paper); }
.language-picker__confirm { margin: 2px var(--gutter) 10px; padding: 14px; border-radius: 14px; background: var(--tint); }
.language-picker__confirm p { font-size: 14px; line-height: 1.5; }
.language-picker__choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block-start: 12px; }
.language-picker__choices .btn { height: 42px; }
/* Only matches stay in the list; a row's own display must not bring a hidden one back. */
.language-picker [hidden] { display: none !important; }
/* The panel keeps its height while the list narrows, so the search field never moves (spec/website.md). */
.sheet:has(.language-picker) { height: min(86vh, 720px); }
.language-picker__none { padding: 14px var(--gutter); font-size: var(--text-sub); color: var(--muted); }
@media (min-width: 720px) {
  /* On a computer the list is a panel in the middle of the page, in two columns (spec/website.md). */
  .sheet:has(.language-picker) { max-width: 640px; }
  .language-picker__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 8px; padding-inline: 8px; }
  .language-picker__list .row { border-radius: var(--radius-s); }
}

/* ---- notices ------------------------------------------------------------------------------------ */
.notice { padding: 13px 14px; border-radius: var(--radius-m); background: var(--tint); font-size: var(--text-sub); line-height: var(--leading-ui); }
.notice--warn { background: var(--warn-bg); color: var(--warn); }
.notice:has(.notice__mark), .notice:has(> .tick) { display: flex; align-items: center; gap: 10px; }
.notice__mark .brand__mark { display: block; width: 20px; height: 20px; transform: none; margin: 0; }
.notice > .tick { flex: 0 0 auto; }
.notice--done { background: color-mix(in srgb, var(--accent) 13%, var(--paper)); color: var(--accent); font-weight: 600; }
/* A line in the page with one thing to do; the low-balance line is one. */
.notice--action {
  display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--pin) 13%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--pin) 60%, var(--rule)); color: var(--ink); padding: 9px 9px 9px 13px;
}
.notice--action:dir(rtl) { padding: 9px 13px 9px 9px; }
.notice__action {
  margin-inline-start: auto; font-weight: 600; color: var(--accent); padding: 5px 9px; border-radius: var(--radius-s);
  white-space: nowrap; text-decoration: none; transition: background var(--t-hover);
}
.notice__action:hover { background: var(--tint); }
/* Slides into the page and moves what is below it down; it never covers anything. */
.slide-in { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-move) var(--ease-arrive); }
.slide-in > * { overflow: hidden; min-height: 0; }
.slide-in[data-in] { grid-template-rows: 1fr; }

/* ---- the gate: one line, one button, and the way to X ------------------------------------------ */
.gate { padding: 17px 16px; border: 1px solid var(--rule); border-radius: var(--radius-l); background: var(--paper); }
.gate__line { font-size: var(--text-label); line-height: var(--leading-ui); margin-block-end: 13px; }
.gate .btn--quiet { margin-block-start: 6px; font-size: 13px; }

/* ---- a text field on its own (an address, a search) ------------------------------------------------ */
.field {
  width: 100%; height: 44px; padding-inline: 13px; font: inherit; font-size: 15.5px; color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--paper-2);
  transition: border-color var(--t-hover), box-shadow var(--t-hover);
}
.field::placeholder { color: var(--faint); }
.field:hover { border-color: var(--faint); }
.field:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }

/* ---- a control's own working state (src/ui/components.ts, waiting; client/wait.ts) -------------
   The control keeps its place: the mark drawing itself before its words for what is happening; a
   compact control shows the mark alone and its words go in the line under it (spec/motion.md, Waiting). */
[data-idle][hidden], [data-waiting][hidden], [data-wait-line][hidden], [data-wait-line] [hidden] { display: none !important; }
.waiting__idle { display: contents; }
.waiting__work { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.waiting__work .brand__mark { width: 18px; height: 18px; transform: none; margin: 0; }
[data-working] { pointer-events: none; }
/* On the accent the blue stroke would vanish: there it is the control's own ink, lighter. */
:is(.btn--primary, .paste__go, .go, .pack--featured) .waiting__work .brand__edge { stroke: none; }
:is(.btn--primary, .paste__go, .go) .waiting__work .brand__translation { stroke: currentColor; opacity: .55; }
/* The end of a wait, drawn once: the tick, then the result in words. */
.tick path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: tick .4s .05s var(--ease-arrive) forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .tick path { animation: none; stroke-dashoffset: 0; } }
.wait-line { font-size: 13px; line-height: 1.45; color: var(--faint); text-align: center; margin: 10px 4px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---- the paste box ------------------------------------------------------------------------------ */
.paste {
  display: flex; gap: 6px; padding: 5px; border-radius: 15px; background: var(--paper);
  border: 1.5px solid var(--rule); transition: border-color .25s, box-shadow .25s;
}
.paste:hover { border-color: var(--faint); }
.paste:focus-within { border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
.paste__input { flex: 1; min-width: 0; border: 0; background: none; font-size: 15.5px; padding: 0 13px; outline: none; }
.paste__input::placeholder { color: var(--faint); }
.paste__go {
  padding: 12px 20px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: var(--text-button);
  white-space: nowrap; transition: transform .3s var(--ease-pushed), filter .2s;
}
.paste__go:hover { transform: scale(1.045); filter: brightness(1.1); }
.paste__go:active { transform: scale(.97); }
.paste__go:focus-visible { outline-offset: 3px; }

/* ---- the pack ---------------------------------------------------------------------------------- */
.pack {
  display: flex; align-items: baseline; gap: 12px; width: 100%; padding: 16px 17px; text-align: start;
  border: 1px solid var(--rule); border-radius: 12px; transition: border-color var(--t-hover), background var(--t-hover);
}
.pack:hover { border-color: var(--accent); background: var(--tint); }
/* The 100, shown first (spec/pricing.md): an accent border and a small label on its edge. */
.pack--featured { position: relative; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--paper)); }
.pack__label {
  position: absolute; inset-block-start: -10px; inset-inline-start: 14px; padding: 2px 9px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 600; white-space: nowrap;
}
.pack__quantity { font-size: 16px; font-weight: 500; }
.pack__price { margin-inline-start: auto; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.packs { display: flex; flex-direction: column; gap: 9px; }
.packs__never { font-size: var(--text-sub); color: var(--faint); margin-block-start: 4px; }

/* ---- the balance --------------------------------------------------------------------------------- */
.balance__figure { font-family: var(--serif); font-size: var(--text-figure); font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.balance__label { font-size: 14px; color: var(--muted); margin-block-start: 8px; }

/* ---- the copy control, over dark code ---------------------------------------------------------- */
.copy {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; color: var(--code-muted);
  padding: 3px 7px; border-radius: 6px; transition: background .2s, color .2s;
}
.copy:hover { background: var(--code-hover); color: #fff; }
.copy svg { width: 12px; height: 12px; }
.copy .copy__tick { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .4s .05s; }
.copy[data-done] { color: var(--code-done); }
.copy[data-done] .copy__tick { stroke-dashoffset: 0; }
.copy[data-done] .copy__icon { display: none; }
.copy:not([data-done]) .copy__tick-svg { display: none; }

/* ---- people who want less ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .sheet[open], .sheet[open]::backdrop, .sheet[data-closing], .sheet[data-closing]::backdrop { animation: none; }
  .switch__thumb, .slide-in { transition: none; }
  .brand--write path, .brand__mark--drawing path { animation: none; }
}

/* ---- text changing language (client/morph.ts; spec/motion.md) ---------------------------------- */
.w { display: inline-block; white-space: nowrap; }
.morphing { position: relative; }
/* The old words blur out as one layer, on the leaving curve, not glyph by glyph: a filter on each of a
   page's ~900 glyphs is ~900 blurred layers every frame, and the change stutters (frames of 200 ms). */
.morph-ghost { position: absolute; inset: 0 0 auto 0; padding: inherit; pointer-events: none; animation: ghost-blur .3s var(--ease-leave) both; }
.morphing .ch, .morphing .arrive { display: inline-block; animation: glyph-in .55s var(--ease-arrive) both; animation-delay: var(--d, 0ms); }
.morphing :is(a, code, [data-fixed]) { display: inline-block; max-width: 100%; } /* so they can travel */
.morph-ghost .ch { animation: glyph-out .3s var(--ease-leave) both; animation-delay: var(--d, 0ms); }
@keyframes glyph-in { from { opacity: 0; transform: translateY(.55em) rotate(4deg); } }
/* How a translation arrives: the sweep runs line by line (each glyph's --d); the old words lift and blur
   out as it passes them, a line or two at a time, and the new ones are written in wet ink that dries. */
.sweeping .ch { animation: glyph-wet 1.5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); }
.sweeping > .morph-ghost { animation: none; }
.sweeping > .morph-ghost .ch { animation: glyph-sweep-out .28s cubic-bezier(.4, 0, 1, 1) both; animation-delay: var(--d, 0ms); }
@keyframes glyph-wet {
  0% { opacity: 0; transform: translateY(.42em); color: var(--accent); }
  30% { opacity: 1; transform: none; color: var(--accent); }
  55% { color: var(--accent); }
  100% { opacity: 1; transform: none; }
}
@keyframes glyph-sweep-out { to { opacity: 0; transform: translateY(-.45em); filter: blur(3px); } }
@keyframes glyph-out { to { opacity: 0; transform: translateY(-.5em); } }
@keyframes ghost-blur { to { filter: blur(6px); } }
/* Fixed parts stay marked through a change (spec/motion.md, The one rule), and never break across
   lines, so where one lands while moving is where it stays. */
.fixed-mark {
  display: inline-block; white-space: nowrap; border-radius: 4px; padding: 0 .14em;
  background: linear-gradient(to top, color-mix(in srgb, var(--pin) 46%, transparent) 0 42%, transparent 42%);
}

/* ---- Privacy and Terms beside signing in and buying (R24; src/ui/components.ts, legalLinks) ---- */
.legal-links { margin-top: 12px; text-align: center; font-size: var(--text-meta); color: var(--faint); }
.legal-links a { color: inherit; text-decoration: none; transition: color var(--t-hover); }
.legal-links a:hover { color: var(--ink); }
