/* The page's frame and the pieces every area shares (GOAL-WEB.md §3; the frame lane, #2104): the base, the type
   styles, the buttons, people's discs, the illustrations, fields, rows, the pane bars, sheets, menus, the toast, and
   the web design's frame (.w-*: the rail, the panes, the head, the page column, the stage, fields, buttons, overlays).
   Every colour, size and type style is a token from design/tokens.json (tokens.css, written by
   `tools/keel gen-tokens`); no literal where a variable exists. Loaded in index.html's order: frame, start, chats,
   conversation, media, contact, calls, settings. */

/* The numeral face (tokens.css's --font-numeral: headings, pane titles, the brand), self-hosted: IBM Plex Sans
   Condensed 2.0.0, SIL OFL 1.1 (fonts/LICENSE.txt, LIBRARIES.md, #2136). Every style of that face is weight 600, so
   the one SemiBold file; the face's other weights are not shipped. */
@font-face {
  font-family: "IBM Plex Sans Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/IBMPlexSansCondensed-SemiBold.woff2") format("woff2");
}

/* The mono face (tokens.css's --font-mono: the safety code, the mono labels, a voice note's and the recorder's time,
   the link box, a key), self-hosted: IBM Plex Mono 2.5.0, SIL OFL 1.1 (the same fonts/LICENSE.txt, LIBRARIES.md,
   #2140). The page sets it at 500 and 600 only, upright, so those two files; the face's other weights and its
   italics are not shipped. */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/IBMPlexMono-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/IBMPlexMono-SemiBold.woff2") format("woff2");
}

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

html, body { height: 100%; margin: 0; }

body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--body-family);
  font-size: var(--body-size);
  line-height: var(--body-line);
  -webkit-font-smoothing: antialiased;
}

#app { height: 100%; }

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Type styles */
.title-large { font: var(--title-large-weight) var(--title-large-size) / var(--title-large-line) var(--title-large-family); letter-spacing: var(--title-large-tracking); margin: 0; }
.title-onboarding { font: var(--title-onboarding-weight) var(--title-onboarding-size) / var(--title-onboarding-line) var(--title-onboarding-family); letter-spacing: var(--title-onboarding-tracking); margin: 0; }
.title { font: var(--title-weight) var(--title-size) / var(--title-line) var(--title-family); letter-spacing: var(--title-tracking); margin: 0; }
.headline { font: var(--headline-weight) var(--headline-size) / var(--headline-line) var(--headline-family); margin: 0; }
.body { font: var(--body-weight) var(--body-size) / var(--body-line) var(--body-family); margin: 0; }
.callout { font: var(--callout-weight) var(--callout-size) / var(--callout-line) var(--callout-family); margin: 0; }
.body-strong { font: var(--callout-strong-weight) var(--body-size) / var(--body-line) var(--body-family); margin: 0; }
.caption { font: var(--footnote-weight) var(--footnote-size) / var(--footnote-line) var(--footnote-family); margin: 0; }
.footnote { font: var(--footnote-weight) var(--footnote-size) / var(--footnote-line) var(--footnote-family); margin: 0; }
.label { font: var(--label-weight) var(--label-size) / var(--label-line) var(--label-family); letter-spacing: var(--label-tracking); color: var(--ink-muted); }
.brand { font: var(--brand-weight) var(--headline-size) / var(--headline-line) var(--brand-family); color: var(--mesh); }
.muted { color: var(--ink-muted); }
.danger { color: var(--danger); }

/* Buttons */
.primary {
  min-height: var(--button-lg);
  padding: 0 var(--space-5);
  border: none;
  border-radius: var(--radius-md);
  background: var(--mesh);
  color: var(--on-mesh);
  font: var(--button-weight) var(--button-size) / var(--button-line) var(--button-family);
  transition: opacity var(--duration-fast);
}
.primary:active { opacity: var(--opacity-pressed); }
.primary:disabled { background: var(--surface-sunken); color: var(--ink-muted); }
.primary.small { min-height: var(--button-sm); font-size: var(--callout-size); }
.primary.wide { align-self: stretch; }
.secondary {
  min-height: var(--button-sm);
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  font: var(--callout-strong-weight) var(--callout-size) / var(--callout-line) var(--callout-family);
}
.text-button {
  min-height: var(--touch-min);
  padding: 0 var(--space-2);
  border: none;
  background: none;
  color: var(--mesh);
  font: var(--callout-strong-weight) var(--callout-size) / var(--callout-line) var(--callout-family);
}
.text-button.on-inverse { color: var(--inverse-mesh); }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--icon-button);
  height: var(--icon-button);
  border: none;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--ink);
}
.icon-button:hover { background: var(--surface-sunken); }

/* People */
.disc {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: var(--radius-pill);
  font-weight: 600;
  user-select: none;
}
.disc-md { width: var(--avatar); height: var(--avatar); font-size: var(--callout-size); }
.disc-lg { width: var(--avatar-lg); height: var(--avatar-lg); font-size: var(--title-size); }
.disc-xl { width: var(--avatar-xl); height: var(--avatar-xl); font-size: var(--title-large-size); }
.photo { object-fit: cover; }

/* The illustrations (views/illustration.tsx); their dots and dotted links move only when motion is welcome */
.illo { display: block; flex: none; max-width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .illo .a-d1, .illo .a-d2, .illo .a-d3 { animation: illo-dot 1.4s ease-in-out infinite; }
  .illo .a-d2 { animation-delay: 0.2s; }
  .illo .a-d3 { animation-delay: 0.4s; }
  .illo .a-flow { animation: illo-flow 1.2s linear infinite; }
  @keyframes illo-dot { 0%, 60%, 100% { opacity: 0.35; } 30% { opacity: 1; } }
  @keyframes illo-flow { to { stroke-dashoffset: -10.1; } }
}

.field { display: flex; flex-direction: column; gap: var(--space-2); }
.input {
  min-height: var(--touch-min);
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-field);
  background: var(--surface-sunken);
  color: var(--ink);
  font: var(--body-weight) var(--body-size) / var(--body-line) var(--body-family);
}
.input[aria-invalid="true"] { border-color: var(--danger); }
.field .footnote { display: flex; justify-content: space-between; gap: var(--space-3); }

/* Six 40 px colour discs 12 apart, each in a 48 px hit area (4 between areas + 2 × 4 of slack = 12) */
.colours { display: flex; flex-wrap: wrap; gap: var(--space-1); border: none; margin: 0; padding: 0; }
.colours legend { width: 100%; padding: 0; margin-bottom: var(--space-2); }
.swatch {
  display: grid;
  place-items: center;
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: none;
}
.swatch-disc { display: grid; place-items: center; width: var(--avatar); height: var(--avatar); border-radius: var(--radius-pill); }
.swatch.picked .swatch-disc { box-shadow: 0 0 0 3px var(--surface-raised), 0 0 0 5px var(--mesh); }

.list-pane {
  grid-area: list;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface-raised);
  border-inline-end: 1px solid var(--line);
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--top-bar);
  padding: var(--space-4) var(--space-4) var(--space-2);
}

.chip {
  height: var(--chip);
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font: var(--subhead-strong-weight) var(--subhead-size) / var(--subhead-line) var(--subhead-family);
}
.chip.on { background: var(--mesh-tint); border-color: transparent; color: var(--mesh); }
.list-note { padding: var(--space-5) var(--space-4); }
.empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
  text-align: center;
}
.empty.illustrated { flex: none; gap: var(--space-2); padding-top: var(--space-6); }
.empty.illustrated .primary { margin-top: var(--space-3); }
.empty-art {
  display: grid;
  place-items: center;
  width: var(--avatar-xl);
  height: var(--avatar-xl);
  margin-bottom: var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--mesh-tint);
  color: var(--mesh);
}

/* A page pushed over the chat list (the invite pages): the detail pane when wide, the whole window when narrow */
.page-pane {
  grid-area: detail;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
}
.page-pane .top-bar { gap: var(--space-2); }
.top-spacer { min-width: var(--space-6); }
.page-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 560px;
  padding: var(--space-4) var(--space-5) var(--space-6);
}

/* The chat list's rows */
.rows { margin: 0; padding: 0 var(--space-2); list-style: none; overflow-y: auto; }
.row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: var(--avatar-lg);
  padding: var(--space-2) var(--space-3);
  border: none;
  border-radius: var(--radius-md);
  background: none;
  color: inherit;
  text-align: start;
}
.row:hover { background: var(--surface-sunken); }
.row-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.row-title, .row-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge {
  min-width: var(--space-5);
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--mesh);
  color: var(--on-mesh);
  text-align: center;
  font: var(--footnote-weight) var(--footnote-size) / var(--footnote-line) var(--footnote-family);
}

.menu {
  display: flex; flex-direction: column; margin-top: var(--space-2); padding: var(--space-1);
  border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-toast); color: var(--ink);
}

.menu-item { padding: var(--space-2) var(--space-3); border: none; background: none; text-align: start; color: inherit; }
.menu-item:hover { background: var(--surface-sunken); }

.sheet-back { position: fixed; inset: 0; display: grid; place-items: center; background: var(--scrim); z-index: 10; }
.sheet {
  display: flex; flex-direction: column; gap: var(--space-3); width: min(420px, calc(100% - 2 * var(--space-4)));
  max-height: 80vh; overflow-y: auto; padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface);
}
.choices { display: flex; flex-direction: column; }
.choice { padding: var(--space-2) var(--space-3); border: none; border-radius: var(--radius-md); background: none; text-align: left; color: inherit; }
.choice.on { background: var(--mesh-tint); color: var(--mesh); }

.primary.danger { background: var(--danger); }

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-5);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: calc(100% - 2 * var(--space-4));
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--inverse-surface);
  color: var(--on-inverse);
  box-shadow: var(--shadow-toast);
  font: var(--callout-weight) var(--callout-size) / var(--callout-line) var(--callout-family);
}

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

.icon-button:disabled { opacity: 0.4; }

.row.danger { color: var(--danger); }
label.row { cursor: pointer; justify-content: space-between; }

.message-banner {
  position: fixed; top: var(--space-2); left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: var(--space-2); width: min(420px, calc(100% - 2 * var(--space-4)));
  padding: var(--space-1) var(--space-2); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-toast);
}

/* ---- The web design's frame (canvas "MeshLink Web Screens", project/web.css; GOAL-WEB.md §3) ----
   rail | list | main | side, one window high. The shell (views/shell.tsx) places each route the core sends in its
   pane; overlays are children of .w-app, laid over the panes. The frame's own widths have no token (they are the
   canvas's literals, named once here); everything else is a tokens.css variable. Logical properties only, so right to
   left mirrors. Version 1 has no narrow layout: below the frame's width the window scrolls sideways. */
.w-app {
  --w-rail: 72px;
  --w-rail-tab: 60px;
  --w-pane: 380px;
  --w-main-min: 480px;
  --w-page: 640px;
  position: relative;
  display: flex;
  inline-size: 100%;
  min-inline-size: calc(var(--w-rail) + var(--w-pane) + var(--w-main-min));
  block-size: 100%;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
}
.w-app a { text-decoration: none; }

/* The rail: the app's mark, the tabs Rust owns (Chats, Calls), then Settings. */
.w-rail {
  inline-size: var(--w-rail);
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding-block: var(--space-3) var(--space-3-half);
  background: var(--surface-sunken);
  border-inline-end: var(--stroke-hairline) solid var(--line);
}
.w-rail__mark {
  display: grid;
  place-items: center;
  inline-size: var(--avatar);
  block-size: var(--avatar);
  margin-block-end: var(--space-2-half);
  border-radius: var(--radius-md);
  background: var(--mesh);
  color: var(--on-mesh);
}
.w-rail__tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-half);
  inline-size: var(--w-rail-tab);
  min-block-size: var(--row-min);
  padding: var(--space-2) 0 var(--space-1-half);
  border: none;
  border-radius: var(--radius-menu);
  background: none;
  color: var(--ink-muted);
  font: var(--micro-weight) var(--micro-size) / var(--micro-line) var(--micro-family);
}
.w-rail__tab:hover { color: var(--ink); }
.w-rail__tab[aria-current] { background: var(--mesh-tint); color: var(--ink); font-weight: var(--callout-strong-weight); }
.w-rail__tab .badge { position: absolute; inset-block-start: var(--space-half); inset-inline-end: var(--space-1); }
.w-rail__sp { flex: 1 1 auto; }
/* My own face at the rail's foot: opens Settings' Profile. */
.w-rail__me { display: grid; place-items: center; margin-block-start: var(--space-1); padding: 0; border: none; border-radius: var(--radius-pill); background: none; }
/* With the side pane open the frame needs its width too. */
.w-app:has(> .w-side) { min-inline-size: calc(var(--w-rail) + 2 * var(--w-pane) + var(--w-main-min)); }

/* The panes. Each holds one view, which fills it and scrolls inside it. */
.w-list, .w-main, .w-side { display: flex; flex-direction: column; min-block-size: 0; }
.w-list > *, .w-main > *, .w-side > * { flex: 1 1 auto; min-block-size: 0; overflow-y: auto; }
.w-list { inline-size: var(--w-pane); flex: none; background: var(--surface); }
.w-main { flex: 1 1 0; min-inline-size: 0; background: var(--chat-background); }
.w-main--plain { background: var(--surface); }
.w-side { inline-size: var(--w-pane); flex: none; background: var(--surface); border-inline-start: var(--stroke-hairline) solid var(--line); }

/* A pane's head: a top bar high, the title in the numeral face, actions at the end. */
.w-head {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-block-size: var(--top-bar);
  padding-inline: var(--space-4-half) var(--space-2);
  flex: none;
}
.w-head--line { background: var(--surface-raised); border-block-end: var(--stroke-hairline) solid var(--line); }
.w-title {
  flex: 1 1 auto;
  min-inline-size: 0;
  margin: 0;
  font: var(--title-condensed-weight) var(--brand-size) / var(--brand-line) var(--font-numeral);
  letter-spacing: var(--brand-tracking);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.w-title--sm { font: var(--headline-weight) var(--headline-size) / var(--headline-line) var(--headline-family); letter-spacing: 0; }

/* The open row of a list pane. */
.w-row--on { background: var(--mesh-tint); }

/* A page in the main pane (Settings' pages, Contact info): one column. */
.w-page {
  flex: 1 1 auto;
  min-block-size: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3-half);
  padding: var(--space-2) var(--space-5) calc(2 * var(--space-4));
}
.w-page > * { inline-size: 100%; max-inline-size: var(--w-page); flex: none; }

/* Nothing is open in the main pane: an illustration and one line. */
.w-blank {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2-half);
  padding: var(--space-6);
  text-align: center;
  color: var(--ink-muted);
}
.w-blank h2 {
  margin: var(--space-1-half) 0 0;
  font: var(--title-onboarding-weight) var(--title-onboarding-size) / var(--title-onboarding-line) var(--title-onboarding-family);
  color: var(--ink);
}
.w-blank p { margin: 0; max-inline-size: 420px; font: var(--callout-weight) var(--callout-size) / var(--callout-line) var(--callout-family); }

/* The stage: first run, the vault and start-over stand alone, without the rail. */
.w-stage { flex: 1 1 auto; min-inline-size: 0; display: grid; place-items: center; padding: calc(2 * var(--space-4)); background: var(--surface); }
.w-panel {
  inline-size: 480px;
  max-inline-size: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-composer);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 var(--stroke-hairline) var(--line);
}
.w-panel--wide { inline-size: 560px; }
.w-panel h1 {
  margin: 0;
  font: var(--large-title-weight) var(--large-title-size) / var(--large-title-line) var(--large-title-family);
  letter-spacing: var(--large-title-tracking);
}
.w-panel p:where(:not([class])) { margin: 0; font: var(--callout-weight) var(--callout-size) / var(--callout-line) var(--callout-family); color: var(--ink-muted); }
.w-panel .w-btn { inline-size: 100%; }

/* Buttons as the kit draws them (ml-btn): primary, secondary, tint, danger, quiet; small; full width. */
.w-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-block-size: var(--button-lg);
  padding-inline: var(--space-5);
  border: none;
  border-radius: var(--radius-menu);
  background: var(--mesh);
  color: var(--on-mesh);
  font: var(--button-weight) var(--button-size) / var(--button-line) var(--button-family);
}
.w-btn:active { opacity: var(--opacity-pressed); }
.w-btn--secondary { background: transparent; color: var(--mesh); box-shadow: inset 0 0 0 var(--stroke-fine) var(--line-strong); }
.w-btn--tint { background: var(--mesh-tint); color: var(--ink); }
.w-btn--danger { background: var(--danger); color: var(--on-danger); }
.w-btn--quiet { min-block-size: var(--touch-min); padding-inline: var(--space-3); background: transparent; color: var(--mesh); }
.w-btn--quiet-danger { min-block-size: var(--touch-min); padding-inline: var(--space-3); background: transparent; color: var(--danger); }
.w-btn:disabled { background: var(--surface-sunken); color: var(--ink-muted); box-shadow: none; }
.w-btn--sm {
  min-block-size: var(--button-sm);
  padding-inline: var(--space-3-half);
  border-radius: var(--radius-pill);
  font: var(--callout-strong-weight) var(--callout-size) / var(--callout-line) var(--callout-family);
}
.w-btn--block { inline-size: 100%; }

/* A text field as the browser draws one: a label above a sunken field. */
.w-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1-half);
  font: var(--footnote-strong-weight) var(--footnote-strong-size) / var(--footnote-strong-line) var(--footnote-strong-family);
  color: var(--ink-muted);
}
.w-input {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--touch-min);
  padding-inline: var(--space-3-half);
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  box-shadow: inset 0 0 0 var(--stroke-hairline) var(--line);
  color: var(--ink);
  font: var(--body-weight) var(--body-size) / var(--body-line) var(--body-family);
}
.w-input:focus-visible, .w-input:focus-within { outline: none; box-shadow: inset 0 0 0 var(--stroke-regular) var(--focus); }
.w-input[aria-invalid="true"] { box-shadow: inset 0 0 0 var(--stroke-regular) var(--danger); }
.w-input::placeholder { color: var(--ink-muted); }
.w-input--area { min-block-size: 160px; align-items: flex-start; padding-block-start: var(--space-3); resize: vertical; }
.w-hint {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--ink-muted);
  font: var(--footnote-weight) var(--footnote-size) / var(--footnote-line) var(--footnote-family);
}
.w-hint--error { color: var(--danger); }

/* Overlays, each a child of .w-app: a dialog in a scrim (centred), a menu, a toast, a floating card. */
.w-scrim { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: var(--space-5); background: var(--scrim); }
.w-dialog {
  inline-size: 440px;
  max-inline-size: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--surface-overlay);
  color: var(--ink);
  box-shadow: var(--shadow-toast);
}
.w-dialog--wide { inline-size: 560px; }
.w-dialog h2 { margin: 0; font: var(--app-bar-title-weight) var(--app-bar-title-size) / var(--app-bar-title-line) var(--app-bar-title-family); }
.w-dialog p { margin: 0; font: var(--callout-weight) var(--callout-size) / var(--callout-line) var(--callout-family); color: var(--ink-muted); }
.w-dialog__foot { display: flex; justify-content: flex-end; gap: var(--space-2); margin-block-start: var(--space-2); }
.w-dialog__foot .w-btn { min-block-size: var(--icon-button); }
.w-pop {
  position: absolute;
  z-index: 6;
  display: flex;
  flex-direction: column;
  min-inline-size: var(--menu-min);
  overflow: hidden;
  border-radius: var(--radius-menu);
  background: var(--surface-overlay);
  color: var(--ink);
  box-shadow: var(--shadow-toast);
}
.w-toast {
  position: absolute;
  inset-inline-start: calc(var(--w-rail) + var(--space-5));
  inset-block-end: var(--space-5);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-block-size: var(--touch-min);
  max-inline-size: 420px;
  padding-block: var(--space-1);
  padding-inline: var(--space-4) var(--space-1);
  border-radius: var(--radius-md);
  background: var(--inverse-surface);
  color: var(--on-inverse);
  box-shadow: var(--shadow-toast);
  font: var(--callout-weight) var(--callout-size) / var(--callout-line) var(--callout-family);
}
.w-toast .text-button { color: var(--inverse-mesh); margin-inline-start: auto; }
.w-float {
  position: absolute;
  inset-inline-end: var(--space-5);
  inset-block-start: calc(var(--top-bar) + var(--space-3));
  z-index: 6;
  inline-size: 360px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-fab);
  background: var(--surface-overlay);
  color: var(--ink);
  box-shadow: var(--shadow-toast);
}
/* A floating card's row: a face, then what fills the rest. */
.w-float__row { display: flex; align-items: center; gap: var(--space-3); }
.w-float__row > :last-child { flex: 1 1 auto; min-inline-size: 0; }

/* Small things the browser adds. */
.w-kbd {
  display: inline-block;
  padding-inline: var(--space-1-half);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--ink-muted);
  font: var(--metric-weight) var(--label-size) / var(--badge-line) var(--font-mono);
}
.w-link { color: var(--mesh); font-weight: var(--callout-strong-weight); }
.w-linkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--touch-min);
  padding-inline: var(--space-3-half) var(--space-1-half);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  color: var(--ink);
  font: var(--metric-weight) var(--callout-size) / var(--callout-line) var(--font-mono);
  overflow: hidden;
}
.w-linkbox span { flex: 1 1 auto; min-inline-size: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
