/* ==========================================================================
   TEND — design tokens
   --------------------------------------------------------------------------
   The visual language is deliberately the house style of the reference build:
   chunky 1.6px borders, hard (un-blurred) offset shadows, generous 12–18px
   radii, and a pixel display face (Pixelify Sans) sitting on top of a plain
   system sans for body copy.

   Two themes (light / dark) driven by [data-theme] on <html>, plus one extra
   switch: [data-candles] flips the up/down colour convention.

   --------------------------------------------------------------------------
   THE PALETTE IS MONOCHROME
   --------------------------------------------------------------------------
   Black and white only, taken from the mark: a white glyph on a black tile.
   There is no brand hue to lean on, so the design carries hierarchy with
   LUMINANCE instead of colour, and the rules are:

     1. The accent IS the ink. A solid white fill is the loudest thing this
        palette can do, so it is reserved for the one action that matters —
        "Launch a coin" — and for the current nav item. Everything else is a
        border, a hairline, or a shade of the surface.
     2. "On chain" and "in your currency" are separated by contrast, not hue.
        `--accent` (white) is the chain: filled, loud, immediate. `--local`
        (mid grey) is the money that has been made local: outlined, quieter,
        set in the mono face. The product thesis survives the loss of colour —
        crypto is bright, tender is what you can actually spend.
     3. `--up` / `--down` are the ONLY chromatic values left, and they are
        data, not chrome: a green tick means the same thing on every exchange
        in the world, and a red one means a failed validation. Recolouring
        them grey would make the market columns unreadable, which is a worse
        outcome than a monochrome page having two functional colours.

   `--seg-1 … --seg-8` is the greyscale ramp for chart segments and pie
   slices, ordered brightest to darkest so a series reads in the same order in
   both themes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   DARK — the default. This is the mark's own setting: white on black.
   -------------------------------------------------------------------------- */
:root,
[data-theme="dark"] {
  /* ---- surfaces ---- */
  --bg: #08080a;
  --panel: #0e0e11;
  --panel-2: #141418;
  --panel-3: #1b1b20;
  --line: #202026;
  --line-2: #2d2d35;

  /* ---- type ---- */
  --ink: #ffffff;
  --ink-2: #d6d6dc;
  --muted: #8c8c96;
  /* 4.0:1 on --panel, so an 11px caption is legible without the fourth step
     collapsing into the third. */
  --faint: #6f6f7a;

  /* ---- brand — the accent is the ink ---- */
  --accent: #ffffff;
  --accent-text: #ffffff;
  --accent-soft: #1a1a1f;
  --accent-shadow: #3d3d47;
  --on-accent: #08080a;
  /* Hover is a named colour, not a `filter: brightness()`. A monochrome
     palette sits at both ends of the range, so brightening white and
     brightening black are both no-ops — the filter would have done nothing
     visible on either theme. */
  --accent-hover: #d6d6dc;

  /* ---- accents, kept as a luminance ramp ---- */
  --sun: #d6d6dc;
  --sun-ink: #e8e8ee;
  --sun-soft: #1c1c21;
  --sky: #8c8c96;
  --sky-ink: #c9c9d1;
  --sky-soft: #16161b;

  /* ---- local currency — the payoff, quieter than the accent ---- */
  --local: #9a9aa4;
  --local-ink: #ffffff;
  --local-soft: #16161b;
  --local-shadow: #3a3a44;
  --on-local: #08080a;
  --local-hover: #b6b6c0;

  /* ---- market / status — the only chromatic values on the site ---- */
  --up: #3ddc97;
  --up-soft: #0d2620;
  --down: #ff6b6b;
  --down-soft: #2b1518;

  /* ---- metals — rank 1/2/3, brightest first ---- */
  --silver: #26262d;
  --silver-ink: #e2e2e8;
  --bronze: #1e1e24;
  --bronze-ink: #b8b8c2;

  /* ---- depth ---- */
  --shadow: #000000;
  --dot: #1a1a1f;

  /* ---- tint families — a grey ramp. In monochrome the glyph carries the
          identity, so these only have to separate one row from the next. ---- */
  --tone-violet: #1e1e24;
  --tone-lilac: #26262e;
  --tone-mint: #16161a;
  --tone-amber: #2e2e36;
  --tone-coral: #22222a;
  --tone-sky: #1a1a20;
  --tone-teal: #121216;

  /* ---- chart segments, brightest to darkest ---- */
  --seg-1: #ffffff;
  --seg-2: #d4d4da;
  --seg-3: #a8a8b2;
  --seg-4: #83838d;
  --seg-5: #61616b;
  --seg-6: #46464f;
  --seg-7: #30303a;
  --seg-8: #202027;

  /* ---- the bloom, as the mark uses it ---- */
  --glow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent),
          0 0 22px color-mix(in srgb, var(--ink) 10%, transparent);

  /* ---- type stacks ---- */
  --font-px: "Pixelify Sans", ui-monospace, monospace;
  --font: ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  /* ---- geometry ---- */
  --radius: 18px;
  --radius-sm: 12px;
  --gap: 14px;
  --side-w: 244px;
  --top-h: 60px;
  --border: 1.6px;

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   LIGHT — the same system on paper. The accent flips to near-black, which is
   the only move a monochrome palette has; the shadow stays pure black so the
   hard offset still reads as a second layer under a dark button.
   -------------------------------------------------------------------------- */
[data-theme="light"] {
  --bg: #f1f1f4;
  --panel: #ffffff;
  --panel-2: #f8f8fa;
  --panel-3: #eeeef1;
  --line: #e2e2e7;
  --line-2: #ceced6;

  --ink: #09090b;
  --ink-2: #3d3d45;
  --muted: #6e6e78;
  --faint: #8e8e98;

  --accent: #18181b;
  --accent-text: #18181b;
  --accent-soft: #eeeef1;
  --accent-shadow: #000000;
  --on-accent: #ffffff;
  --accent-hover: #34343c;

  --sun: #52525b;
  --sun-ink: #3d3d45;
  --sun-soft: #e9e9ed;
  --sky: #71717a;
  --sky-ink: #52525b;
  --sky-soft: #e9e9ed;

  --local: #52525b;
  --local-ink: #3d3d45;
  --local-soft: #e9e9ed;
  --local-shadow: #a8a8b2;
  --on-local: #ffffff;
  --local-hover: #71717a;

  --up: #0c8a5c;
  --up-soft: #dcf6ea;
  --down: #d0342c;
  --down-soft: #ffe4e1;

  --silver: #e6e6ea;
  --silver-ink: #3d3d45;
  --bronze: #d8d8de;
  --bronze-ink: #52525b;

  --shadow: #c9c9d2;
  --dot: #d6d6dd;

  --tone-violet: #ececef;
  --tone-lilac: #f1f1f4;
  --tone-mint: #e9e9ed;
  --tone-amber: #f4f4f6;
  --tone-coral: #eeeef1;
  --tone-sky: #eaeaee;
  --tone-teal: #e6e6ea;

  --seg-1: #09090b;
  --seg-2: #2d2d35;
  --seg-3: #52525b;
  --seg-4: #6e6e78;
  --seg-5: #8c8c96;
  --seg-6: #a8a8b2;
  --seg-7: #c9c9d1;
  --seg-8: #e4e4e9;

  --glow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent),
          0 0 18px color-mix(in srgb, var(--ink) 7%, transparent);

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   Candle convention switch.

   Default follows the reference layout: green = up, red = down.
   [data-candles="cn"] swaps them to the CN market convention (red = up).
   -------------------------------------------------------------------------- */
[data-candles="cn"] {
  --up: #d0342c;
  --up-soft: #ffe4e1;
  --down: #0c8a5c;
  --down-soft: #dcf6ea;
}
[data-theme="dark"][data-candles="cn"] {
  --up: #ff6b6b;
  --up-soft: #2b1518;
  --down: #3ddc97;
  --down-soft: #0d2620;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Scrollbars, in the house style. */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: content-box; }

/* ==========================================================================
   Type primitives
   ========================================================================== */

.px { font-family: var(--font-px); letter-spacing: .01em; }
.mono { font-family: var(--mono); font-variant-ligatures: none; }

.title-px {
  font-family: var(--font-px);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .005em;
}
.sub { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }
.dim { color: var(--muted); }
.faint { color: var(--faint); }
.bold { font-weight: 700; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.local { color: var(--local-ink); }

/* Section heading used at the top of every page. */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.page-head .ph-ic {
  width: 46px; height: 46px;
  flex: none;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: var(--border) solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 4px 0 0 var(--accent-shadow);
  color: var(--accent-text);
}
.page-head .ph-body { min-width: 0; flex: 1; }
.page-head .ph-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ==========================================================================
   Panel — the one container shape everything is built from
   ========================================================================== */

.panel {
  background: var(--panel);
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 5px 0 0 var(--shadow);
  min-width: 0;
}
.panel.flat-shadow { box-shadow: 0 3px 0 0 var(--shadow); }
.panel.no-shadow { box-shadow: none; }

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  row-gap: 8px;
  padding: 13px 16px;
  border-bottom: var(--border) solid var(--line);
  min-height: 52px;
}
.panel-head.tight { padding: 11px 14px; }
.panel-head .ph-title {
  font-family: var(--font-px);
  font-size: 17px;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.panel-head .ph-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.panel-body { padding: 16px; }
.panel-body.tight { padding: 12px 14px; }

/* Dashed divider, used a lot between rows of a panel. */
.dash { border-top: var(--border) dashed var(--line-2); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  user-select: none;
  border: var(--border) solid transparent;
  border-radius: 13px;
  font-weight: 700;
  transition: transform 80ms ease, box-shadow 80ms ease, filter .15s, background .15s;
}
.btn:active { transform: translateY(3px); }

/* The one loud control in a monochrome palette: a solid fill of the ink. */
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 5px 0 0 var(--accent-shadow);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { box-shadow: 0 2px 0 0 var(--accent-shadow); }

.btn-local {
  background: var(--local);
  color: var(--on-local);
  box-shadow: 0 5px 0 0 var(--local-shadow);
}
.btn-local:hover { background: var(--local-hover); }
.btn-local:active { box-shadow: 0 2px 0 0 var(--local-shadow); }

.btn-sun {
  background: var(--sun);
  color: var(--on-accent);
  box-shadow: 0 5px 0 0 color-mix(in srgb, var(--sun) 55%, #000);
}
.btn-sun:hover { filter: brightness(.94); }
.btn-sun:active { box-shadow: 0 2px 0 0 color-mix(in srgb, var(--sun) 55%, #000); }
[data-theme="dark"] .btn-sun:hover { filter: brightness(1.06); }

.btn-up {
  background: var(--up);
  /* Neutral ink, not a green-tinted dark: the only chromatic values allowed on
     the site are the fills themselves. 4.6:1 on the light theme's green, 12:1
     on the dark theme's. */
  color: #0a0a0a;
  box-shadow: 0 5px 0 0 color-mix(in srgb, var(--up) 55%, #000);
}
.btn-up:active { box-shadow: 0 2px 0 0 color-mix(in srgb, var(--up) 55%, #000); }

.btn-ghost {
  background: var(--panel);
  border-color: var(--line-2);
  color: var(--ink-2);
  box-shadow: 0 3px 0 0 var(--shadow);
}
.btn-ghost:hover { background: var(--panel-2); color: var(--ink); }
.btn-ghost:active { box-shadow: 0 1px 0 0 var(--shadow); }

.btn-danger {
  background: var(--panel);
  border-color: color-mix(in srgb, var(--down) 45%, transparent);
  color: var(--down);
  box-shadow: 0 3px 0 0 color-mix(in srgb, var(--down) 30%, transparent);
}

.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn-md { height: 38px; padding: 0 15px; font-size: 13.5px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Square icon button. */
.icon-btn {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  background: var(--panel);
  border: var(--border) solid var(--line-2);
  border-radius: 11px;
  color: var(--ink-2);
  box-shadow: 0 3px 0 0 var(--shadow);
  transition: transform 80ms, background .15s;
  flex: none;
}
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--shadow); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }

/* ==========================================================================
   Chips / badges
   ========================================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  background: var(--panel);
  border: var(--border) solid var(--line-2);
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 2px 0 0 var(--shadow);
}
.chip-xs { height: 22px; padding: 0 7px; font-size: 11px; border-radius: 7px; box-shadow: 0 1.5px 0 0 var(--shadow); }
.chip-violet { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent-text); }
.chip-sun { background: var(--sun-soft); border-color: color-mix(in srgb, var(--sun) 55%, transparent); color: var(--sun-ink); }
.chip-sky { background: var(--sky-soft); border-color: color-mix(in srgb, var(--sky) 50%, transparent); color: var(--sky-ink); }
.chip-local { background: var(--local-soft); border-color: color-mix(in srgb, var(--local) 45%, transparent); color: var(--local-ink); }
.chip-up { background: var(--up-soft); border-color: color-mix(in srgb, var(--up) 45%, transparent); color: var(--up); }
.chip-down { background: var(--down-soft); border-color: color-mix(in srgb, var(--down) 45%, transparent); color: var(--down); }
.chip-mint { background: var(--tone-mint); border-color: color-mix(in srgb, var(--up) 35%, transparent); color: var(--up); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }

/* Currency badge — the code pill used wherever an amount has been made local.
   A TEND primitive, not part of the base style: outlined rather than filled,
   so "in your currency" never competes with the solid accent. */
.ccy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px 0 6px;
  background: var(--local-soft);
  border: var(--border) solid color-mix(in srgb, var(--local) 42%, transparent);
  border-radius: 7px;
  color: var(--local-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  flex: none;
}
.ccy .ccy-sym { font-family: var(--font-px); font-size: 13px; line-height: 1; }

/* Small status dot. */
.dot { width: 7px; height: 7px; border-radius: 99px; background: var(--muted); flex: none; }
.dot-up { background: var(--up); }
.dot-sun { background: var(--sun); }
.dot-down { background: var(--down); }
.dot-local { background: var(--local); }
.dot-live { background: var(--up); animation: pulse 1.8s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.82); }
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: var(--panel-2);
  border: var(--border) solid var(--line);
  border-radius: 12px;
}
.tab {
  height: 28px;
  padding: 0 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.tab:hover { color: var(--ink); }

/* Not `:disabled`. An unavailable tab keeps its click handler so it can say WHY
   it is unavailable — a `disabled` button fires nothing, which leaves the
   reason reachable only by hover. Dimmed and not-allowed is the affordance; the
   toast is the explanation. */
.tab[aria-disabled="true"] {
  opacity: .42;
  cursor: not-allowed;
}
.tab[aria-disabled="true"]:hover { color: var(--muted); }
.tab.on {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 2px 0 0 var(--shadow);
}
.tab .tab-count {
  font-size: 10.5px;
  color: var(--faint);
  background: var(--panel-3);
  border-radius: 6px;
  padding: 1px 5px;
}
.tab.on .tab-count { color: var(--accent-text); background: var(--accent-soft); }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: 6px; }
.flabel { font-size: 12.5px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.45; }

.input, .textarea, select.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--panel-2);
  border: var(--border) solid var(--line-2);
  border-radius: 12px;
  color: var(--ink);
  font-size: 13.5px;
  transition: border-color .15s, background .15s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
select.input { cursor: pointer; }

/* Character counter that sits inside a field label. */
.cnt { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--faint); }

/* Search box in the topbar. */
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px;
  background: var(--panel-2);
  border: var(--border) solid var(--line-2);
  border-radius: 99px;
  color: var(--muted);
  min-width: 0;
  flex: 1;
  max-width: 460px;
  transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: var(--accent); background: var(--panel); }
.search input {
  border: none;
  background: none;
  outline: none;
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--ink);
}
.search input::placeholder { color: var(--faint); }
.search kbd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  background: var(--panel-3);
  border: var(--border) solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}

/* Checkbox line, used by the launch gate. */
.checkline {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  cursor: pointer;
}
.checkline input { margin: 2px 0 0; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.checkline a { color: var(--accent-text); text-decoration: underline; }

/* A field whose value is fixed — reads as an input, is not one. */
.lockedfield {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--panel-3);
  border: var(--border) dashed var(--line-2);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
}

/* ==========================================================================
   Utility layout
   ========================================================================== */

.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; min-height: 0; }
.grow { flex: 1; min-width: 0; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; }
.mt-6 { margin-top: 6px; } .mt-10 { margin-top: 10px; } .mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.hide { display: none !important; }

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Skeleton loading
   ========================================================================== */

.skel {
  background: linear-gradient(90deg, var(--panel-2) 25%, var(--panel-3) 37%, var(--panel-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.skel-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; }
.skel-rows { display: flex; flex-direction: column; }

/* ==========================================================================
   Empty state
   ========================================================================== */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
}
.empty .empty-ic { opacity: .85; }
.empty p { font-size: 13px; max-width: 40ch; }

/* ==========================================================================
   Toasts
   ========================================================================== */

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  background: var(--panel);
  border: var(--border) solid var(--line-2);
  border-radius: 13px;
  box-shadow: 0 5px 0 0 var(--shadow);
  font-size: 13px;
  font-weight: 600;
  max-width: 360px;
  animation: toast-in .22s ease;
}
.toast-err { border-color: color-mix(in srgb, var(--down) 50%, transparent); color: var(--down); }
.toast-ok { border-color: color-mix(in srgb, var(--up) 50%, transparent); }
/* A statement of fact, not a success and not a failure. */
.toast-info { border-color: var(--line-2); color: var(--ink-2); }
.toast-local { border-color: color-mix(in srgb, var(--local) 50%, transparent); color: var(--local-ink); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Motion
   ========================================================================== */

.bob { animation: bob 3.4s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.spin { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
