@layer yak-defaults, yak-app, yak-controls;
@layer yak-defaults {
/* Linen: yaks.app's colours. Light is a warm sheet of linen under cream
   cards, written in coffee, never black, with meadow green for what is lit
   and red for a fault. Dark is the same room at night: a night-brown
   ground, cocoa cards, oat ink, moss for what is lit and coral for a fault.
   linen.ts holds the dark colours for a terminal.

   The neutrals and the greens are named for what they look like (linen,
   cream, coffee, clay, taupe, shell, bark, cocoa, night, meadow, moss,
   forest, oat). The other paints are clear, saturated hues, deep enough on
   linen and bright enough at night to read as text at WCAG AA: red, orange,
   blue and raspberry; and a yellow and a grey for dots, which are never
   text: yellow a pip at work and someone away, grey someone gone. A theme
   has more roles than a palette has hues, so roles share them: meadow is
   what is lit, what went well and who; red a fault and the language's
   words; orange what is under way, a caution and a number; blue
   something to know and a moment; raspberry what is set apart. yaks.app's
   own pages wear this theme (workers/yak/public). */
:root {
  color-scheme: light dark;
  --gap: 1rem;
  --radius: 4px;
  --measure: 38rem;
  --shadow: 0 12px 32px -16px light-dark(#5238283d, #1d1714b3);

  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --size: 1.0625rem;
  --small: 0.9375rem;

  --bg: light-dark(#fdf7ee, #2b231f); /* linen; night */
  --surface: light-dark(#f7efe3, #392d27); /* a sheet behind the one in front */
  --card: light-dark(#fffbf5, #372c26); /* cream; cocoa */
  --border: light-dark(#efe3d2, #4d3d34); /* shell; bark */
  --border2: light-dark(#c9b7a6, #756255); /* the hairline, gone toward clay */

  --text: light-dark(#523828, #f1e6d8); /* coffee; oat */
  --muted: light-dark(#785b47, #c9b19c); /* clay; taupe */
  --dim: light-dark(#c9b19c, #785b47); /* taupe; clay */

  --accent: light-dark(#4c773e, #a7c080); /* meadow; moss */
  --link: light-dark(#4c773e, #a7c080);
  --heading: light-dark(#523828, #f1e6d8); /* the text's own ink */

  --info: light-dark(#1f5fbf, #8cc0ff); /* blue */
  --active: light-dark(#b84a00, #ffa057); /* orange */
  --positive: light-dark(#4c773e, #a7c080); /* meadow; moss */
  --negative: light-dark(#c4231c, #ff6b5e); /* red */
  --caution: light-dark(#b84a00, #ffa057); /* orange */
  --dot-active: light-dark(#f5b800, #ffcc33); /* yellow: a pip at work */
  --presence-away: light-dark(#f5b800, #ffcc33); /* yellow */
  --presence-offline: light-dark(#747170, #a4a09e); /* grey */
  --special: light-dark(#b52a6a, #ff8cc0); /* raspberry */

  --number: light-dark(#b84a00, #ffa057); /* orange */
  --literal: light-dark(#c4231c, #ff6b5e); /* red */
  --time: light-dark(#1f5fbf, #8cc0ff); /* blue */
  --who: light-dark(#4c773e, #a7c080); /* meadow; moss */

  --keyword: light-dark(#c4231c, #ff6b5e); /* red */
  --string: light-dark(#4c773e, #a7c080); /* meadow; moss */
  --fn: light-dark(#1f5fbf, #fffbf5); /* blue; cream */
  --type: light-dark(#b84a00, #ffa057); /* orange */
  --attr: light-dark(#b52a6a, #ff8cc0); /* raspberry */

  --hue-0: light-dark(#4c773e, #a7c080); /* meadow; moss */
  --hue-1: light-dark(#b84a00, #ffa057); /* orange */
  --hue-2: light-dark(#1f5fbf, #8cc0ff); /* blue */
  --hue-3: light-dark(#c4231c, #ff6b5e); /* red */
  --hue-4: light-dark(#b52a6a, #ff8cc0); /* raspberry */
  --hue-5: light-dark(#33493c, #f1e6d8); /* forest; oat */
}
@supports not (color: light-dark(#000, #fff)) {
:root {
  --shadow: 0 12px 32px -16px #5238283d;
  --bg: #fdf7ee;
  --surface: #f7efe3;
  --card: #fffbf5;
  --border: #efe3d2;
  --border2: #c9b7a6;
  --text: #523828;
  --muted: #785b47;
  --dim: #c9b19c;
  --accent: #4c773e;
  --link: #4c773e;
  --heading: #523828;
  --info: #1f5fbf;
  --active: #b84a00;
  --positive: #4c773e;
  --negative: #c4231c;
  --caution: #b84a00;
  --dot-active: #f5b800;
  --presence-away: #f5b800;
  --presence-offline: #747170;
  --special: #b52a6a;
  --number: #b84a00;
  --literal: #c4231c;
  --time: #1f5fbf;
  --who: #4c773e;
  --keyword: #c4231c;
  --string: #4c773e;
  --fn: #1f5fbf;
  --type: #b84a00;
  --attr: #b52a6a;
  --hue-0: #4c773e;
  --hue-1: #b84a00;
  --hue-2: #1f5fbf;
  --hue-3: #c4231c;
  --hue-4: #b52a6a;
  --hue-5: #33493c;
}
@media (prefers-color-scheme: dark) {
:root {
  --shadow: 0 12px 32px -16px #1d1714b3;
  --bg: #2b231f;
  --surface: #392d27;
  --card: #372c26;
  --border: #4d3d34;
  --border2: #756255;
  --text: #f1e6d8;
  --muted: #c9b19c;
  --dim: #785b47;
  --accent: #a7c080;
  --link: #a7c080;
  --heading: #f1e6d8;
  --info: #8cc0ff;
  --active: #ffa057;
  --positive: #a7c080;
  --negative: #ff6b5e;
  --caution: #ffa057;
  --dot-active: #ffcc33;
  --presence-away: #ffcc33;
  --presence-offline: #a4a09e;
  --special: #ff8cc0;
  --number: #ffa057;
  --literal: #ff6b5e;
  --time: #8cc0ff;
  --who: #a7c080;
  --keyword: #ff6b5e;
  --string: #a7c080;
  --fn: #fffbf5;
  --type: #ffa057;
  --attr: #ff8cc0;
  --hue-0: #a7c080;
  --hue-1: #ffa057;
  --hue-2: #8cc0ff;
  --hue-3: #ff6b5e;
  --hue-4: #ff8cc0;
  --hue-5: #f1e6d8;
}
}
}

/* What every theme derives the same way: half its gap, a faint wash of its
   text, and the touch-target floor, which grows under a coarse pointer (fat
   fingers get fat targets, and only there).

   And the type every part reads, which a theme may set: --size for what a
   thing says, --small for the line that describes it, and nothing smaller.
   Headings climb from --size by one ratio, --scale, a step each: --h3, --h2,
   --h1. Every heading reads them, prose or part, so a page's h1 is the same
   size wherever it is drawn.
   Text comes in three inks. --text is what a thing says; --muted is what
   describes it (a key, a heading over a column, a fact, a stamp, an id, a
   count), and reads on every floor; --dim is only for what is not there (a
   nil, a ghost, a placeholder, a disabled step). The mono face is for what a
   person would copy or type (an id, a sha, code, a raw stored value), never
   for a label, a moment said the human way, or a count. A part that steps
   back is muted, small or both; never mono to look quiet, and never dim.
   And the width of what sits beside a page (a chat, what an agent gets):
   --side, never narrower than --side-min. */
:where(:root) {
  --half-gap: calc(var(--gap) / 2);
  --soft: color-mix(in srgb, var(--text) 6%, transparent);
  --tap: 0px;
  --size: 14px;
  --small: 12px;
  --scale: 1.2;
  --h3: calc(var(--size) * var(--scale));
  --h2: calc(var(--h3) * var(--scale));
  --h1: calc(var(--h2) * var(--scale));
  --side: 26rem;
  --side-min: 18rem;
}
@media (pointer: coarse) {
  :where(:root) {
    --tap: 2.5rem;
  }
}

/* The shared surface paint; a skin supplies its own values. */
:where(:root) {
  --edge-width: 1px;
  --edge-color: var(--border2);
  --edge-filter: none;
  --well-filter: none;
  --raised-shadow: var(--shadow);
  --raised-hatch: none;
  --raised-ink: transparent;
  --raised-lift: 0px;
  --press-wash: var(--soft);
  --press-wash-weight: 100%;
  --press-shift: none;
  --press-down: none;
  --hover: var(--soft);
  --well: var(--surface);
  --hollow: none;
}

}
@layer yak-controls {
/* Shared paint. Existing class names are aliases for string-rendered pages;
   new parts compose Surface. Skins change tokens, never this list of parts. */
:where(.Surface, .Surface_Raised, .Surface_Press, .Card, .Button, .Menu, .Menu_Summary, .Empty, .Drop_Zone, a.Chip) {
  --pencil: initial;
  --pencil-style: initial;
  position: relative;
}
:where(.Surface, .Surface_Raised, .Surface_Press, .Card, .Button, .Menu, .Menu_Summary, .Empty, .Drop_Zone, a.Chip)::after {
  content: var(--surface-outline, none);
  position: absolute;
  inset: -1px;
  border: var(--edge-width) var(--pencil-style, solid) var(--pencil,
    var(--edge-color));
  border-radius: inherit;
  filter: var(--edge-filter);
  pointer-events: none;
}
:is(.Surface, .Surface_Raised, .Surface_Press, .Card, .Button, .Menu)::after {
  content: '';
}
:is(.Surface, .Surface_Raised, .Surface_Press) {
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font: inherit;
}

.Card_Frame {
  background: var(--frame-fill, var(--card-fill, var(--card)));
  border: var(--frame-border, 1px solid var(--border));
  border-radius: var(--frame-radius, var(--radius));
  box-shadow: var(--frame-shadow, none);
}
.Card_Frame-link {
  color: inherit;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .Card_Frame-link:hover {
    --frame-fill-on: var(--frame-hover-fill, var(--frame-fill));
    background: var(--frame-fill-on, var(--card-fill, var(--card)));
    box-shadow: var(--frame-hover-shadow, var(--frame-shadow, none));
    transform: var(--frame-hover-shift, none);
  }
}
:is(.Surface_Raised, .Surface_Press, .Menu, .Menu_Summary, .Button, .Card-button) {
  --lift: var(--raised-lift);
}
:is(.Surface_Raised, .Surface_Press) {
  box-shadow: var(--raised-shadow);
}
/* What it is raised off: a copy of its own shape --lift down and right,
   seen only past its edge. That is a hard box-shadow, which a browser draws
   outside the box's own corners whatever their radius (a pill, a circle),
   inked in --raised-ink and seen through --raised-hatch's lines. The hatch
   is laid from where the shadow is, so it stays put as --lift changes. */
:is(.Surface_Raised, .Surface_Press, .Menu, .Menu_Summary, .Button, .Card-button)::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: var(--lift) var(--lift) 0 var(--raised-ink);
  mask: var(--raised-hatch) var(--lift) var(--lift) no-clip;
  pointer-events: none;
}
:is(.Surface_Press) {
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  :where(.Surface_Press, .Button, .Card-button, .Menu_Summary):hover:not(:disabled, [aria-pressed='true']) {
    --lift: var(--raised-hover-lift, var(--raised-lift));
    transform: var(--press-shift);
    background: color-mix(in srgb, var(--button-fill, var(--card)),
      var(--press-wash) var(--press-wash-weight));
  }
}
:where(.Surface_Press, .Button, .Card-button, .Menu_Summary):active:not(:disabled),
:is(.Surface_Press, .Button)[aria-pressed='true'],
:is(.Menu_Fold)[open] > :is(.Menu_Summary) {
  --lift: var(--raised-down-lift, var(--raised-lift));
  transform: var(--press-down);
}
:is(.Surface_Press, .Button):disabled {
  --lift: 0px;
  opacity: .55;
  cursor: not-allowed;
}
:where(.Surface_Well, .Field) {
  border: var(--edge-width) solid var(--edge-color);
  border-radius: var(--radius);
  background: var(--well);
  box-shadow: var(--hollow);
  color: var(--text);
  font: inherit;
  filter: var(--well-filter);
}
:where(.Surface_Well, .Field):focus-visible {
  outline: 0;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), var(--hollow);
}

/* The text of a thing: the ink at a reading measure, its paragraphs and
   quotes as the base sets prose. A short one is the gist: muted, smaller. */
.Body {
  min-width: 0;
  max-width: var(--measure);
  color: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.Body-short {
  color: var(--muted);
  font-size: var(--small);
}
/* A text a press types into: the pointer says so, a text cursor over a
   faint wash. */
.Body-typed {
  cursor: text;
  border-radius: var(--radius);
}
@media (hover: hover) and (pointer: fine) {
  .Body-typed:hover {
    background: var(--soft);
  }
}
/* A document's source: its lines kept and wrapped at the measure, every
   character where it stands, smaller, in the face of what is typed. */
.Body-source > .Body_Source {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: var(--small);
  line-height: 1.5;
}

.Body_Source-detail {
  margin: .4rem 0 0;
  padding: .6rem .8rem;
  background: var(--card);
  font-size: var(--small);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.Body-flow :is(.Body_Paragraph, .Body_Unordered, .Body_Ordered, .Body_Heading) {
  margin: 0 0 .75rem;
  color: inherit;
}
.Body-flow > :last-child {
  margin-bottom: 0;
}
.Body-flow .Body_Source {
  padding: .6rem .8rem;
  background: var(--card);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.Body-flow .Body_Table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* A document: its title over its text, a half gap between. Typed into, the
   title takes a text cursor over a faint wash under the pointer, as a typed
   Body does, and an empty one says where a title goes until it has the
   keyboard. */
.Doc {
  display: grid;
  gap: var(--half-gap);
  min-width: 0;
}
.Doc_Title {
  margin: 0;
  font-size: var(--h3);
  font-weight: 600;
  color: var(--heading);
  overflow-wrap: anywhere;
}
.Doc-typed > .Doc_Title {
  cursor: text;
  border-radius: var(--radius);
}
@media (hover: hover) and (pointer: fine) {
  .Doc-typed > .Doc_Title:hover {
    background: var(--soft);
  }
}
.Doc-typed > .Doc_Title:not(:focus-within):has(> .Edit:empty)::before {
  content: 'Untitled';
  color: var(--dim);
}

/* Words somebody said: the words under a bar in the accent, then who, when
   and where, small and dim; a note on them dimmer still, never read as the
   words. */
.Quote {
  margin: 0;
  display: grid;
  gap: 4px;
  min-width: 0;
  max-width: var(--measure);
}
.Quote_Text {
  margin: 0;
  padding: 2px 0 2px var(--gap);
  border-left: 3px solid var(--accent);
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.Quote_By {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--half-gap);
  padding-left: calc(var(--gap) + 3px);
  font-size: var(--small);
  color: var(--muted);
}
.Quote_Sep {
  color: var(--dim);
}
.Quote_Note {
  margin: 0;
  padding-left: calc(var(--gap) + 3px);
  font-size: var(--small);
  font-style: italic;
  color: var(--muted);
}

/* A pip: a disc whose shape says a state and whose tone colours it. Shape
   and tone are separate variants, so a state is at most one of each. The
   glyphs are pseudo-elements drawn in floor ink, so they read as cutouts. */
.Dot {
  --dot: var(--dim);
  display: inline-block;
  position: relative;
  flex: none;
  width: 0.72em; /* em: the pip rides its line's font */
  height: 0.72em;
  border-radius: 50%;
  border: max(1px, 0.09em) solid var(--dot);
  background: var(--dot);
}
.Dot::before,
.Dot::after {
  position: absolute;
}

/* The shapes. */
.Dot-ring {
  background: transparent;
}
.Dot-dashed {
  background: transparent;
  border-style: dashed;
}
.Dot-half {
  background: linear-gradient(90deg, var(--dot) 50%, transparent 0);
}
/* Something happening right now: the full disc breathes. The breath is drawn
   inside the pip's own box, in a padding as wide as the breath reaches, so no
   container's overflow cuts it off. It is the only shape that draws with
   both pseudo-elements free, so the breath is the ::after. */
.Dot-pulse {
  --breath: 0.3em;
  box-sizing: content-box;
  padding: var(--breath);
  border: 0;
  background-clip: content-box;
}
.Dot-pulse::after {
  content: '';
  inset: var(--breath);
  border-radius: 50%;
  animation: DotPulse 2.2s ease-out infinite;
}
@keyframes DotPulse {
  from {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot) 55%, transparent);
  }
  to {
    box-shadow: 0 0 0 var(--breath) color-mix(in srgb, var(--dot) 0%,
      transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .Dot-pulse::after {
    animation: none; /* the full disc still says it; only the breath goes */
  }
}
.Dot-check::after {
  content: '';
  left: 50%;
  top: 50%;
  width: 0.3em;
  height: 0.16em;
  border-left: 0.09em solid var(--bg);
  border-bottom: 0.09em solid var(--bg);
  transform: translate(-50%, -65%) rotate(-45deg);
}
.Dot-cross::before,
.Dot-cross::after {
  content: '';
  left: 50%;
  top: 50%;
  width: 0.09em;
  height: 0.38em;
  border-radius: 0.04em;
  background: var(--bg);
}
.Dot-cross::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.Dot-cross::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.Dot-alert::before {
  content: '';
  left: 50%;
  top: 0.1em;
  width: 0.09em;
  height: 0.24em;
  border-radius: 0.04em;
  translate: -50%;
  background: var(--bg);
}
.Dot-alert::after {
  content: '';
  left: 50%;
  bottom: 0.08em;
  width: 0.1em;
  height: 0.1em;
  border-radius: 50%;
  translate: -50%;
  background: var(--bg);
}

/* The tones. */
.Dot-info {
  --dot: var(--info);
}
/* Under way: a theme may paint the pip apart from the text that says it
   (linen's yellow is never text). */
.Dot-active {
  --dot: var(--dot-active, var(--active));
}
.Dot-positive {
  --dot: var(--positive);
}
.Dot-negative {
  --dot: var(--negative);
}
.Dot-caution {
  --dot: var(--caution);
}
.Dot-accent {
  --dot: var(--accent);
}
.Dot-special {
  --dot: var(--special);
}

/* How something stands: a word beside a dot. The word describes, so it is
   small and muted; the dot's tone says the state. */
.State {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--muted);
  font-size: var(--small);
  line-height: 1.3;
}

/* How many wait: a number on a pill in the colour of what needs the person,
   as tall as the line it sits in. */
.Badge {
  display: inline-block;
  min-width: 1.3em;
  padding: 0 .35em;
  border-radius: 99px;
  background: var(--negative);
  color: var(--bg);
  font-size: var(--small);
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* Pressed, it opens what waits. */
:is(button, a).Badge {
  border: 0;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  :is(button, a).Badge:hover {
    background: color-mix(in srgb, var(--negative), var(--text) 18%);
  }
}
:is(button, a).Badge:focus-visible {
  outline: 2px solid var(--negative);
  outline-offset: 2px;
}
.Badge[hidden] {
  display: none;
}
/* How many there are: the number alone, in the muted colour, no pill. */
.Badge-quiet {
  background: none;
  color: var(--muted);
  font-weight: 500;
}

/* An identifier (T-123): mono, since it is copied and typed; small and
   muted; never wrapped. As a link it underlines only under the pointer. */
.Id {
  font-family: var(--mono);
  font-size: var(--small);
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .Id:hover {
    text-decoration: underline;
    color: var(--text);
  }
}
.Id-hover {
  text-decoration: underline;
  color: var(--text);
}
/* what it names is out of service: present, struck, half there */
.Id-retired {
  text-decoration: line-through;
  opacity: 0.55;
}
@media (hover: hover) and (pointer: fine) {
  .Id-retired:hover {
    text-decoration: line-through underline;
  }
}

/* A moment, said the human way (5 minutes ago): small and muted, out of the
   way, in the face the words around it are in. Its parts run in a row. */
.Stamp {
  font-size: var(--small);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  display: inline-flex;
  gap: var(--half-gap);
  white-space: nowrap;
}

/* A name as a token: mono, small, in its hue, on a faint wash of it. The hue
   rides --hue, so a variant only re-points it at one of the theme's six. */
.Chip {
  --hue: var(--muted);
  font-family: var(--mono);
  font-size: var(--small);
  white-space: nowrap;
  color: var(--hue);
  background: color-mix(in srgb, var(--hue) 12%, transparent);
  border-radius: calc(var(--radius) - 2px);
  padding: 0 4px;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  a.Chip:hover,
  .Chip[data-href]:hover {
    text-decoration: underline;
  }
}
.Chip-0 {
  --hue: var(--hue-0);
}
.Chip-1 {
  --hue: var(--hue-1);
}
.Chip-2 {
  --hue: var(--hue-2);
}
.Chip-3 {
  --hue: var(--hue-3);
}
.Chip-4 {
  --hue: var(--hue-4);
}
.Chip-5 {
  --hue: var(--hue-5);
}
/* only a possibility: absent, or not added yet */
.Chip-ghost {
  --hue: var(--dim);
  background: none;
  outline: 1px dashed var(--border2);
  outline-offset: -1px;
}
/* a label that steps back, in the words around it */
.Chip-quiet {
  --hue: var(--muted);
  font-family: inherit;
  background: none;
}
/* a label in the accent, on a place the accent tints */
.Chip-accent {
  --hue: var(--accent);
}
/* words to copy */
.Chip-code {
  --hue: var(--text);
}
.Chip-wrap {
  white-space: normal;
  overflow-wrap: anywhere;
}
/* what the name is a kind of, after it */
.Chip_Tag {
  margin-left: var(--half-gap);
  color: var(--muted);
  font-size: 0.85em;
}

/* A row of chips, wrapping, a half gap apart; a list of them loses its
   markers and its indent. */
.Chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--half-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* An address: muted, the name in it the text's own ink and weighted. */
.Address {
  color: var(--muted);
  font-weight: normal;
}
.Address_Name {
  color: var(--text);
  font-weight: 600;
}

/* A glyph in lines: the words' height and a little more, sat on their
   baseline, stroked in their colour. */
.Icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  flex: none;
  vertical-align: -.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* An integration's name with its logo: the logo a little taller than the
   words, centred on them, a narrow gap between. Alone, a logo takes the size
   its place gives it (a card's mark) or its own 24 pixels. */
.Logo {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  max-width: 100%;
  vertical-align: bottom;
}
.Logo_Mark {
  flex: none;
  object-fit: contain;
}
.Logo > .Logo_Mark {
  width: 1.25em;
  height: 1.25em;
}
/* Where there is no logo, a plug on a soft rounded square. */
.Logo_Mark-none {
  display: inline-grid;
  place-items: center;
  width: 1.5em;
  height: 1.5em;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--muted);
}
.Logo_Mark-none .Icon {
  width: 60%;
  height: 60%;
}

/* Words that match what was sought: a wash of the accent behind them, the
   words keeping their own ink. */
.Match {
  background: color-mix(in srgb, var(--accent) 25%, transparent);
  color: inherit;
  border-radius: 2px;
}

/* A stored value, coloured by its shape. Stored bytes show as stored: a
   string keeps its newlines, and an unbroken token breaks anywhere. */
.Value {
  color: var(--text);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.Value-num {
  color: var(--number);
  font-variant-numeric: tabular-nums;
}
.Value-bool {
  color: var(--literal);
}
.Value-id,
.Value-time,
.Value-json {
  font-family: var(--mono);
  font-size: var(--small);
}
.Value-id {
  color: var(--muted);
}
.Value-time {
  color: var(--time);
}
.Value-json {
  color: var(--muted);
}
.Value-nil {
  color: var(--dim);
  font-style: italic;
}

/* A bar in characters: one cell per character, so it reads the same in a
   terminal. */
.Meter {
  font-family: var(--mono);
  white-space: pre;
  letter-spacing: 0;
  line-height: 1;
}
.Meter_Fill {
  color: var(--accent);
}
.Meter_Fill-over {
  color: var(--caution);
}
.Meter_Mark {
  color: var(--text);
  font-weight: bold;
}
.Meter_Rest {
  color: var(--dim);
}

/* A series in characters: one cell per value, so it reads the same in a
   terminal. */
.Spark {
  font-family: var(--mono);
  white-space: pre;
  letter-spacing: 0;
  line-height: 1;
}
.Spark_Bar {
  color: var(--accent);
}
.Spark_Floor {
  color: var(--dim);
}

/* A chart's marks. A number's words keep the page's ink; the marks are drawn
   in the theme's roles. */
.Chart {
  position: relative;
  touch-action: pan-y;
}
/* The point a pointer, a finger or an arrow key is on (the page's listener
   sets data-on and --at), and the tip that says it, floating clear of
   whatever clips the chart. */
.Chart[data-on]::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--at);
  width: 1px;
  background: var(--muted);
  pointer-events: none;
}
.Chart-line {
  display: inline-block;
  vertical-align: middle;
}
.Chart-bars {
  display: block;
  height: 5rem;
  border-bottom: 1px solid var(--border2);
}
.Chart-bars .Chart_Plot {
  display: block;
  width: 100%;
  height: 100%;
}
.Chart_Line {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.Chart_End,
.Chart_Bar {
  fill: var(--accent);
}
.Chart_Tip {
  position: fixed;
  z-index: 200;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--card);
  font-size: var(--small);
  white-space: nowrap;
  pointer-events: none;
}

/* A tooltip: small text on a raised chip. It never takes the
   pointer; where it floats is its host's business. */
.Tip {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: min(36rem, calc(100vw - 12px));
  font: var(--small) var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: calc(var(--radius) - 2px);
  padding: 1px 6px;
  pointer-events: none;
}
.Tip[popover] {
  inset: auto;
  margin: 0;
}

/* Dates inherit the line they describe. */
.Time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* A press: a small bordered word in the accent. The variants re-point its
   colour and its border, never its size. */
:is(.Button, :where(:root, [data-yak-kit]) :where(button:not(.Modal_Backdrop, .Tabs_Tab, .Menu_Item, .Menu_Trigger, .Tile, .Chip, [role='tab'], [role='menuitem'], [role='option']), input:is([type='button'], [type='submit'], [type='reset']))) {
  --ink: var(--accent);
  --line: var(--border2);
  --pencil: var(--line);
  --raised-shadow: none;
  font: inherit;
  font-size: var(--small);
  color: var(--ink);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 2px var(--half-gap);
  cursor: pointer;
  justify-self: start;
  min-height: var(--tap);
  white-space: nowrap;

  :where(:root, [data-yak-kit]) & {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    --button-size: max(44px, var(--tap));
    min-block-size: var(--button-size) !important;
    block-size: auto !important;
    max-block-size: none !important;
    padding: var(--button-padding, 2px var(--half-gap)) !important;
    font: var(--small)/1.25 var(--font) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    background: var(--button-fill, none) !important;
    color: var(--ink) !important;
    appearance: none;
  }
  :where(:root, [data-yak-kit]) &[hidden] {
    display: none;
  }
  /* an icon sits a little apart from its words */
  &:has(> .Icon) {
    display: inline-flex;
    align-items: center;
    gap: .35em;
  }
  &[hidden] {
    display: none;
  }
  @media (hover: hover) and (pointer: fine) {
    &:hover {
      background: var(--soft);
      --button-fill: var(--soft);
    }
  }
  &:disabled {
    opacity: 0.5;
    cursor: default;
  }
  /* sent, and waiting on its answer */
  &[aria-busy='true'] {
    opacity: 0.6;
    cursor: progress;
    pointer-events: none;
  }
  :where(:root, [data-yak-kit]) &[aria-pressed='true'] {
    --line: var(--accent);
    --button-fill: color-mix(in srgb, var(--accent) 15%, var(--bg));
    --ink: var(--accent);
  }
  :where(.KitGuide) &[data-example='hover'] {
    --button-fill: var(--soft);
  }
}
/* offers what is not there yet */
.Button-add {
  --ink: var(--muted);
  --pencil-style: dashed;
}
@media (hover: hover) and (pointer: fine) {
  .Button-add:hover {
    --ink: var(--text);
  }
}
.Button-danger {
  --ink: var(--negative);
}
/* the one to press, where a sheet offers one */
.Button-go {
  --ink: var(--bg);
  --line: var(--accent);
  --button-fill: var(--accent);
  background: var(--accent);
}
@media (hover: hover) and (pointer: fine) {
  .Button-go:hover {
    background: color-mix(in srgb, var(--accent) 85%, var(--text));
    --button-fill: color-mix(in srgb, var(--accent) 85%, var(--text));
  }
}
/* a glyph that waits for the pointer */
.Button-quiet {
  --ink: var(--muted);
  --pencil: transparent;
  padding: 0 4px;
  --button-padding: 0 4px;
}
:where(:root, [data-yak-kit]) .Button-quiet {
  --line: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .Button-quiet:hover {
    --ink: var(--text);
  }
}
@media (hover: hover) and (pointer: fine) {
  .Button-quiet.Button-danger:hover {
    --ink: var(--negative);
  }
}

.IconButton {
  position: relative;
  justify-content: center;
  min-height: max(44px, var(--tap, 0px));
  min-width: max(44px, var(--tap, 0px));
  padding: 0;
}
:where(:root, [data-yak-kit]) .IconButton {
  --button-padding: 0;
  inline-size: var(--button-size) !important;
}

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

.IconButton[aria-expanded='true'] {
  background: var(--soft);
  color: var(--text);
  --button-fill: var(--soft);
  --ink: var(--text);
}

/* Words to copy, in the mono face on a faint wash, selected whole at a
   press, and the button beside them, its own width, drawn as a copy glyph
   that turns to a check once they are copied. */
.Copy {
  display: flex;
  align-items: center;
  gap: var(--half-gap);
  min-width: 0;
}
.Copy_Text {
  flex: 1;
  min-width: 0;
  padding: 2px var(--half-gap);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--text);
  font-family: var(--mono);
  font-size: var(--small);
  overflow-wrap: anywhere;
  user-select: all;
}
.Copy_Go {
  flex: none;
}
.Copy:not(.Copy-copied) .Copy_Icon-done,
.Copy-copied .Copy_Icon:not(.Copy_Icon-done) {
  display: none;
}

/* A field has a visible edge before focus, so an empty placeholder is still
   recognizably a control. Bare fields belong inside an already framed part. */
:is(.Field, :where(:root, [data-yak-kit]) :where(select, textarea, input:not([type='hidden'], [type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='file'], [type='image'], [type='button'], [type='submit'], [type='reset']))) {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: 0;
  padding: 4px var(--half-gap);
  resize: none;
  cursor: text;
  user-select: text;
  text-align: left;

  &::placeholder {
    color: var(--muted);
  }
  &:focus {
    border-color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: 1px;
  }
  :where(:root, [data-yak-kit]) &[aria-invalid='true'] {
    border-color: var(--negative);
  }
}
/* A field picked in is pressed, not typed in. */
:is(select.Field, :where(:root, [data-yak-kit]) select) {
  cursor: pointer;
}
.Field-bare,
.Field-bare:focus {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  outline: 0;
  padding: 0;
}

/* A field with a fixed ending beside it: the field takes the room, the
   ending keeps its width. */
.At {
  display: flex;
  align-items: center;
  gap: calc(var(--half-gap) / 2);
  min-width: 0;
}
.At > .Field {
  flex: 1 1 auto;
  min-width: 0;
}
.At_End {
  flex: none;
  color: var(--muted);
}

/* A box or a radio and its words, a little apart on one line, the box in
   the accent once checked. Pressing the words presses the box. */
.Check {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--half-gap);
  min-height: var(--tap);
  cursor: pointer;
}
.Check_Input {
  font: inherit;
  flex: none;
  margin: 0;
  /* Half the first line minus half the control, whatever its native size. */
  transform: translateY(calc(.5lh - 50%));
  accent-color: var(--accent);
  cursor: inherit;
}
.Check:has(.Check_Input:disabled) {
  opacity: .55;
  cursor: not-allowed;
}
/* What choosing it means, beside its words. */
.Check_Note {
  color: var(--muted);
  font-size: var(--small);
}

/* A form: every field its label over its control over its hint, on one left
   edge and one width at most the measure, and what sends it at the end. One
   field and its button share a line while they fit. */
.Form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
  margin: 0;
}
.Form_Field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(var(--half-gap) / 2);
  min-width: 0;
  max-width: var(--measure);
  text-align: start;
}
.Form_Field:where(fieldset) {
  margin: 0;
  padding: 0;
  border: 0;
}
.Form_Label {
  margin: 0;
  color: var(--text);
  font-size: var(--small);
  font-weight: 700;
}
.Form_Label:where(legend) {
  padding: 0;
  margin-block-end: calc(var(--half-gap) / 2);
}
.Form_Optional {
  color: var(--muted);
  font-weight: 400;
}
.Form_Field > .Field {
  box-sizing: border-box;
  width: 100%;
}
.Form_Hint {
  margin: 0;
  color: var(--muted);
  font-size: var(--small);
}
/* A value shown where its control would be, which nobody changes here: its
   words as they are, every line and long word kept inside the field. */
.Form_Value {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.Form_Value-none {
  color: var(--dim);
}
/* A field people never see, which only a bot fills in: off the page and
   taking no room in it. */
.Form_Trap {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.Form_Line,
.Form_Actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--half-gap);
  min-width: 0;
  margin: 0;
}
.Form_Line > .Field,
.Form_Line > .At {
  flex: 1 1 12rem;
}

.Form > .Button {
  justify-self: start;
}

/* A drop zone: a dashed place to drop files on or press, centred words in
   it, and under it what is chosen, one file a line on a well. The input is
   unseen, so the zone wears its focus. A gathering part holds its files as
   chips along its top, each taken back by the press in its corner. */
.Drop {
  display: grid;
  gap: var(--half-gap);
  min-width: 0;
}
.Drop_Zone {
  position: relative;
  display: grid;
  place-items: center;
  gap: calc(var(--half-gap) / 2);
  min-height: 6rem;
  padding: var(--gap);
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .Drop_Zone:hover {
    border-color: var(--accent);
  }
}
.Drop_Zone:has(.Drop_File:focus-visible) {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.Drop_Zone-over {
  border-style: solid;
  border-color: var(--accent);
  background: var(--card);
}
.Drop_Zone:has(.Drop_File:disabled) {
  opacity: .55;
  cursor: not-allowed;
}
.Drop_File {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.Drop_Say {
  color: var(--text);
}
.Drop_Choose {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.Drop_Hint,
.Drop_Size,
.Drop_Said,
.Drop_Note {
  color: var(--muted);
  font-size: var(--small);
}
.Drop_Chosen {
  display: grid;
  gap: calc(var(--half-gap) / 2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.Drop_Item {
  display: flex;
  align-items: center;
  gap: var(--half-gap);
  min-width: 0;
  padding: 4px var(--half-gap);
  border-radius: var(--radius);
  background: var(--surface);
}
.Drop_Picture {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  object-fit: cover;
}
.Drop_Name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.Drop_Size,
.Drop_Item > .Button {
  flex: none;
}
.Drop_Said {
  margin: 0;
}
.Drop_Note {
  flex-basis: 100%;
}
.Drop_Item-unread,
.Drop_Item-failed {
  flex-wrap: wrap;
}
.Drop-gather {
  position: relative;
}
.Drop-over {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}
/* What is empty takes no room, chips or not. */
.Drop_Chosen:empty,
.Drop_Said:empty {
  display: none;
}

.Drop_Progress {
  flex: 0 1 6rem;
  max-width: 100%;
  accent-color: var(--accent);
}
.Drop_Zone-folder {
  display: inline-grid;
  min-height: 0;
  padding: var(--half-gap);
}

/* A line said back, small and muted; a refusal in the negative. Empty, it
   takes no room. */
.Notice {
  margin: 0;
  color: var(--muted);
  font-size: var(--small);
}
.Notice:empty {
  display: none;
}
.Notice[role='status']:empty {
  position: absolute;
  display: block;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.Notice-negative {
  color: var(--negative);
}

.Notice-fine {
  margin: 0;
  color: var(--muted);
  font-size: var(--fine, var(--small));
}
.Notice-fine {
  font-size: var(--fine, var(--small));
}

.Toast {
  position: fixed;
  z-index: var(--toast-layer, 100);
  inset-inline: 1rem;
  inset-block-end: calc(var(--toast-offset, 1rem) +
    env(safe-area-inset-bottom));
  display: grid;
  justify-items: center;
  gap: var(--half-gap, .5rem);
  pointer-events: none;
}
.Toast-inline {
  position: static;
  justify-items: start;
}
.Toast_Item {
  max-inline-size: min(30rem, 100%);
  padding: .5rem .75rem;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow);
}
@media print {
  .Toast {
    display: none;
  }
}

.ErrorNotice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--half-gap);
  box-sizing: border-box;
  min-inline-size: 0;
  border: 1px solid var(--negative);
  border-radius: var(--radius);
  padding: var(--half-gap);
  background: color-mix(in srgb, var(--negative) 8%, var(--bg));
  color: var(--text);
  text-align: start;
  font-size: var(--small);
  overflow-wrap: anywhere;
}
.ErrorNotice_Mark {
  flex: none;
  margin-block-start: .12em;
  color: var(--negative);
}
.ErrorNotice_Text {
  flex: 1 1 auto;
  min-inline-size: 0;
}
.ErrorNotice_Dismiss {
  flex: none;
}
.ErrorNotice-float {
  inline-size: max-content;
  max-inline-size: min(27rem, calc(100vw - 1rem));
  box-shadow: var(--shadow);
}
.ErrorNotice:has(.ErrorNotice_Text:empty) {
  position: absolute;
  inline-size: 0;
  block-size: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
}
.ErrorNotice:has(.ErrorNotice_Text:empty) :is(.ErrorNotice_Mark, .ErrorNotice_Dismiss),
.ErrorNotice_Dismiss[hidden] {
  display: none;
}
.ErrorNotice_Slot {
  position: relative;
  flex: none;
  inline-size: 100%;
  block-size: 0;
  min-inline-size: 0;
  justify-self: stretch;
}
.ErrorNotice_Slot > .ErrorNotice {
  position: absolute;
  z-index: 5;
  inset-block-start: .25rem;
  inset-inline-start: 0;
  box-shadow: var(--shadow);
}
.ErrorNotice_Slot > .ErrorNotice:has(.ErrorNotice_Text:not(:empty)) {
  inline-size: min(100%, 30rem);
}
.ErrorNotice_Slot-above > .ErrorNotice {
  inset-block: auto .25rem;
}
.ErrorNotice_Slot-end {
  flex: none;
  inline-size: 0;
  align-self: end;
  justify-self: end;
}
.ErrorNotice_Slot-end > .ErrorNotice {
  inset-inline: auto 0;
}
.ErrorNotice_Slot-end > .ErrorNotice:has(.ErrorNotice_Text:not(:empty)) {
  inline-size: min(19rem, 75vw);
}

/* A Rows action leaves the rest of its row available for feedback. */
.ErrorNotice_Slot-side {
  position: absolute;
  inset-block-start: 50%;
  inset-inline: 0;
  inline-size: auto;
}
.ErrorNotice_Slot-side > .ErrorNotice {
  inset-block: 0 auto;
  inset-inline: auto calc(100% + var(--half-gap));
  transform: translateY(-50%);
}
.ErrorNotice_Slot-side > .ErrorNotice:has(.ErrorNotice_Text:not(:empty)) {
  inline-size: min(26rem, calc(100cqi - 100% - var(--half-gap)));
}

/* A full-width space beside controls that have no room for an overlay. */
.ErrorNotice_Slot-reserved {
  block-size: auto;
  block-size: calc(4lh + var(--gap));
  font-size: var(--small);
}
.ErrorNotice_Slot-reserved > .ErrorNotice {
  inset: 0 auto auto 0;
  max-block-size: 100%;
  overflow: auto;
  box-shadow: none;
}

/* A list of choices: a raised box of rows, each a word in the code face and a
   muted note after it, the picked one lit. Where it floats is its host's. */
.Choices {
  min-width: min(18rem, 80vw);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px;
  box-shadow: var(--shadow);
}
.Choices[role=listbox] {
  max-inline-size: calc(100vw - 12px);
  max-block-size: min(22rem, 45dvh);
  overflow: auto;
}
.Choices_Item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap);
  padding: 2px var(--half-gap);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}
.Choices_Item:where(button) {
  align-items: center;
  min-block-size: var(--tap);
  background: transparent;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-size: var(--small);
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (hover: hover) and (pointer: fine) {
  .Choices_Item:hover {
    background: color-mix(in srgb, var(--soft) 50%, transparent);
  }
}
.Choices_Item-hover {
  background: color-mix(in srgb, var(--soft) 50%, transparent);
}
.Choices_Item-on {
  background: var(--soft);
}
.Choices_Text {
  font-family: var(--mono);
  font-size: var(--small);
}
.Choices_Note {
  color: var(--muted);
  font-size: var(--small);
}

/* A value where it can be changed. The span is the value itself, typed over
   where it stands (base.css dresses it while it is contenteditable), so it
   is exactly the text around it. A control that reads as the value it holds
   has a hairline under it to say it can be changed, and the border's colour
   once it has the keyboard. */
.Edit {
  font: inherit;
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
:is(input, select).Edit {
  background: none;
  border: 0;
  border-bottom: 1px dotted var(--border2);
  border-radius: 0;
  outline: 0;
  padding: 1px 0;
  width: 100%;
  max-width: 40em;
}
:is(input, select).Edit:focus {
  border-bottom: 1px solid var(--accent);
}
:is(input, select).Edit-fit {
  width: auto;
}
.Edit_Option {
  background: var(--card);
  color: var(--text);
}

/* One line to send something on: what is typed runs as wide as it can, the
   button after it. */
.Say {
  display: flex;
  align-items: baseline;
  gap: var(--half-gap);
  margin: 0;
  min-width: 0;
}
.Say > .Field {
  flex: 1 1 auto;
  min-width: 0;
  border-bottom-color: var(--border);
}

/* The pending changes stay within the viewport, above its safe area. */
.Save {
  position: fixed;
  z-index: 110;
  inset-inline: var(--gap);
  bottom: calc(var(--gap) + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--half-gap) var(--gap);
  width: fit-content;
  max-width: calc(100% - 2 * var(--gap));
  margin-inline: auto;
  padding: var(--half-gap) var(--gap);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface, var(--card));
  color: var(--text);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--text) 15%, transparent);
}
.Save-sample {
  position: static;
}
.Save-inline {
  position: static;
  width: 100%;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.Save-inline > .Save_Actions {
  order: -1;
  grid-column: 1;
}
.Save-inline > .Save_Count:empty {
  display: none;
}
.Save_Count {
  min-inline-size: 0;
}
.Save_Actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap);
}
.Save_Field {
  min-width: 0;
}
.Save_Field > :is(.Form_Label, .Save_Label)::after {
  content: '';
  display: inline-block;
  width: .45em;
  height: .45em;
  margin-inline-start: .55em;
  vertical-align: .1em;
  border-radius: 50%;
  background: var(--accent);
  filter: var(--drawn, none);
  opacity: 0;
}
.Save_Field-changed > :is(.Form_Label, .Save_Label)::after {
  opacity: 1;
}
.Save_Notice {
  grid-column: 1 / -1;
  order: -2;
  inline-size: 100%;
  contain: inline-size;
}
.Save_Notice:where(.ErrorNotice) {
  max-block-size: min(12rem, 35dvh);
  overflow: auto;
}
.Save_Notice:where(.ErrorNotice):has(.ErrorNotice_Text:empty) {
  display: none;
}
.Save-inline > .Save_Notice {
  order: 0;
  justify-self: stretch;
}
.Save:where(:not(.Save-inline, .Save-sample)):has(> .ErrorNotice):not(:has(> .Save_Actions)) {
  width: min(26rem, calc(100% - 2 * var(--gap)));
}
/* A save that worked says so, then fades before the bar goes. */
.Save-done {
  animation: Save-fade 2.5s ease-in forwards;
}
.Save-done .Save_Count {
  color: var(--positive, var(--text));
}
@keyframes Save-fade {
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .Save-done {
    animation: none;
  }
}
body:has(.Save:not(.Save-sample, .Save-inline)) {
  padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
}

/* One menu surface and its scrollable list. Anchored menus measure their
   content within the viewport, independently of their trigger's width. */
.Menu {
  position: relative;
  min-width: 10rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--raised-shadow);
}
.Menu_List {
  position: relative;
  display: grid;
  max-height: min(34rem, 70vh);
  padding: .35rem 0;
  border-radius: inherit;
  background: var(--card-fill, var(--card));
  overflow-y: auto;
}
.Menu_Item {
  display: flex;
  align-items: center;
  gap: var(--half-gap);
  margin: 0 .35rem;
  padding: .55rem .65rem;
  min-height: var(--tap);
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.Menu_Item .Identity_Avatar {
  flex: none;
}
.Menu_Item :is(.Identity_Name, .Identity_Note) {
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (hover: hover) and (pointer: fine) {
  .Menu_Item:hover {
    background: var(--hover, var(--soft));
  }
}
.Menu_Item-hover,
.Menu_Item:focus-visible {
  background: var(--hover, var(--soft));
}
.Menu_Item[aria-current='true'] {
  background: var(--hover, var(--soft));
}
.Menu_Item-danger {
  color: var(--negative);
}
.Menu_Rule {
  width: 100%;
  margin: .35rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}
.Menu_Ask {
  margin: 0;
  padding: .5rem 1rem .6rem;
  color: var(--muted);
  font-size: var(--small);
}
.Menu_Footer {
  display: grid;
}
.Menu_Fold {
  position: relative;
}
.Menu_Fold[open] {
  z-index: var(--float, 100);
}
.Menu_Summary {
  position: relative;
  padding: var(--half-gap) var(--gap);
  border: 1px solid var(--surface-border, var(--border2));
  border-radius: var(--radius);
  background: var(--card-fill, var(--card));
  color: var(--text);
  font: inherit;
  cursor: pointer;
  list-style: none;
}
.Menu_Summary::-webkit-details-marker {
  display: none;
}
.Menu[hidden] {
  display: none;
}
.Menu-below,
.Menu-float,
.Menu-popover {
  width: max-content;
  min-width: 0;
  max-width: calc(100vw - 12px);
}
.Menu-below {
  position: absolute;
  top: calc(100% + .6rem);
  left: 0;
  min-width: min(max(100%, 18rem), calc(100vw - 12px));
  max-width: min(26rem, calc(100vw - 12px));
}
.Menu-float,
.Menu-popover {
  position: fixed;
  z-index: 100;
}
.Menu-popover {
  inset: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
}
.Menu-float .Menu_List,
.Menu-popover .Menu_List {
  max-height: calc(100dvh - 14px);
}
.Menu_Trigger {
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.Menu_Fold[open] .Identity_Action {
  color: var(--muted);
}
/* A menu opened from a trigger at the far side of what it acts on runs back
   from that side, so it stays on the page. */
.Menu-end {
  left: auto;
  right: 0;
  min-width: min(12rem, calc(100vw - 12px));
}
/* A trigger that is a glyph alone (⋯): quiet and square, with no outline or
   hatch, washed when the pointer finds it or its menu is open. */
.Menu_Summary.Menu_Summary-icon {
  display: grid;
  place-items: center;
  width: var(--control-height, 2rem);
  height: var(--control-height, 2rem);
  padding: 0;
  border-color: transparent;
  background: none;
  color: var(--muted);
  transform: none;
}
.Menu_Summary.Menu_Summary-icon::before,
.Menu_Summary.Menu_Summary-icon::after {
  content: none;
}
@media (hover: hover) and (pointer: fine) {
  .Menu_Fold > .Menu_Summary.Menu_Summary-icon:hover {
    background: var(--hover, var(--soft));
    color: var(--text);
    transform: none;
  }
}
.Menu_Fold[open] > .Menu_Summary.Menu_Summary-icon {
  background: var(--hover, var(--soft));
  color: var(--text);
  transform: none;
}
.Menu_Summary.Menu_Summary-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* A value that knows how to be changed. The value never moves: an inline
   editor takes its place at its metrics, and a popout anchors beside it. */
.Prop {
  position: relative;
  display: inline-flex;
  min-width: 0;
}
/* The face's seam is a border, so the value typed over in its place wears
   the same one and the line keeps its height. */
.Prop-live > :is(.Prop_Val, .Edit) {
  border-bottom: 1px dashed transparent;
}
.Prop-live > .Prop_Val {
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .Prop-live > .Prop_Val:hover {
    border-bottom-color: var(--dim);
  }
}
.Prop_Val-nil {
  color: var(--dim);
}
/* A link-faced value keeps navigation on its face and editing on a quiet
   handle beside it. */
.Prop_Hand {
  white-space: nowrap;
  font-size: var(--small);
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
@media (hover: hover) and (pointer: fine) {
  .Prop_Hand:hover {
    color: var(--text);
  }
}
.Prop_Hand-empty {
  opacity: 0.6;
}
@media (hover: hover) and (pointer: fine) {
  .Prop_Hand-empty:hover {
    opacity: 1;
  }
}
.Prop_Pop {
  /* floated in an Overlay: a box only, no positioning */
  display: flex;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px;
  box-shadow: 0 8px 30px color-mix(in srgb, #000 45%, transparent);
  white-space: nowrap;
}
.Prop_Pop-list {
  flex-direction: column;
  min-width: 12rem;
}
.Prop_Tab {
  display: inline-flex; /* a tab seats a dot beside its word */
  align-items: center;
  gap: calc(var(--half-gap) / 2);
  font: inherit;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 2px var(--half-gap);
  border-radius: var(--radius);
  cursor: pointer;
  min-height: var(--tap);
}
@media (hover: hover) and (pointer: fine) {
  .Prop_Tab:hover {
    background: var(--soft);
    color: var(--text);
  }
}
.Prop_Tab-on {
  background: var(--soft);
  color: var(--text);
}
.Prop_Row {
  padding: 2px var(--half-gap);
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (hover: hover) and (pointer: fine) {
  .Prop_Row:hover {
    background: var(--soft);
  }
}
.Prop_Row-none {
  color: var(--muted);
}
.Prop_Find {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--border);
  outline: none;
  padding: 2px var(--half-gap);
}
.Prop_Query {
  display: inline-flex;
  min-width: min(24rem, 60vw); /* a query is a line, not a word */
}
.Prop_Query > .Field {
  flex: 1;
}

/* A row of tabs: chips that read as controls, gapless (a tab's padding is
   the spacing), the one showing lit. A badge says what waits behind a tab
   without opening it: raised beside the face, a gap from it, never over
   it, so the tab is as wide as both. Tabs that don't fit wrap to another
   line, each kept whole, as pencil's do. */
.Tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.Tabs_Tab {
  font: inherit;
  -webkit-user-select: none; /* pressed, not read, even where it links */
  user-select: none;
  color: var(--muted);
  text-decoration: none; /* a tab that links reads as a tab */
  background: none;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  padding: 3px 4px;
  cursor: pointer;
  min-width: var(--tap);
  min-height: var(--tap);
  display: flex;
  align-items: center; /* the face stays centred as the floor grows */
  justify-content: center;
  gap: 3px;
  overflow-wrap: normal;
}
@media (hover: hover) and (pointer: fine) {
  .Tabs_Tab:hover {
    color: var(--text); /* the face alone answers the pointer: no fill */
  }
}
.Tabs_Tab-hover {
  color: var(--text); /* the face alone answers the pointer: no fill */
}
.Tabs_Tab-on,
.Tabs_Input:checked ~ .Tabs_Tab {
  color: var(--text);
  background: var(--soft);
  border-color: var(--border2);
}
/* Raised like a superscript; the shift is paint only, so the line keeps
   its height. */
.Tabs_Badge {
  position: relative;
  top: -0.5em;
  min-width: 1.1em;
  padding: 0 0.25em;
  border-radius: 1em;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.65em;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* A set (`TabSet`): the fieldset's own frame gone, its legend over the row,
   each item's radio unseen but kept, so the keyboard and a form still have
   it, and its focus ringed on its tab. Every panel wraps to a line of its
   own under the tabs, and only the checked one's shows: a panel keeps its
   own display, so a card stays a card. */
.Tabs:has(> .Tabs_Item) {
  flex-wrap: wrap;
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.Tabs_Legend {
  margin-bottom: var(--half-gap);
  padding: 0;
  color: var(--text);
  font-weight: 600;
}
.Tabs_Item {
  display: contents;
}
.Tabs_Input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.Tabs_Input:focus-visible ~ .Tabs_Tab {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.Tabs_Panel {
  order: 1;
  flex: 1 1 100%;
  min-width: 0;
}
.Tabs_Input:not(:checked) ~ .Tabs_Panel {
  display: none;
}

/* A side navigation: links one to a line, quiet until under the pointer,
   the page you are on lit as a tab is. A rule parts groups of links. With
   no room beside the page the column becomes a row that wraps. */
.SideNav {
  display: grid;
  align-content: start;
  gap: 2px;
}
.SideNav_Link {
  display: flex;
  align-items: center;
  gap: var(--half-gap);
  min-height: var(--tap);
  padding: var(--half-gap) var(--gap);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  -webkit-user-select: none; /* pressed, not read */
  user-select: none;
}
@media (hover: hover) and (pointer: fine) {
  .SideNav_Link:hover {
    color: var(--text); /* the words alone answer the pointer */
  }
}
.SideNav_Link-hover {
  color: var(--text); /* the words alone answer the pointer */
}
.SideNav_Link-on {
  color: var(--text);
  background: var(--soft);
  border-color: var(--border2);
  font-weight: 600;
}
.SideNav_Rule {
  margin: var(--half-gap) var(--gap);
  border: 0;
  border-top: 1px solid var(--border);
}
@media (max-width: 700px) {
  .SideNav {
    display: flex;
    flex-wrap: wrap;
  }
}
/* The column collapsed to a rail of its icons: each link a square around
   its icon, its label kept for a screen reader and said by its title. A
   phone's row has its words, whatever the rail. */
@media (min-width: 701px) {
  .SideNav-rail .SideNav_Link {
    position: relative;
    justify-content: center;
    padding-inline: var(--half-gap);
  }
  .SideNav-rail .SideNav_Label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* What is on this page. Beside the page, a column that stays in sight as the
   page scrolls under it: its label, then a link a line, quiet until it is the
   section in view, which a bar beside it marks. On a phone, one "On this
   page" line that opens the same list. Which of the two shows is the width
   the contents itself has: the container it sits in is the page's to size. */
.Contents {
  container-type: inline-size;
  position: sticky;
  top: var(--gap);
  align-self: start;
  font-size: var(--small);
}
.Contents[hidden] {
  display: none;
}
.Contents_Label {
  margin: 0 0 var(--half-gap);
  font-weight: 700;
}
.Contents_List {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.Contents_Item-sub {
  padding-inline-start: var(--gap);
}
.Contents_Link {
  display: block;
  padding: 3px 0 3px var(--half-gap);
  border-inline-start: 2px solid var(--border);
  color: var(--muted);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .Contents_Link:hover {
    color: var(--text);
  }
}
.Contents_Link-on {
  border-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}
.Contents_Menu {
  display: none;
}
.Contents_Summary {
  display: inline-flex;
  align-items: center;
  gap: var(--half-gap);
  min-height: var(--tap);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.Contents_Summary::-webkit-details-marker {
  display: none;
}
.Contents_Summary::after {
  content: '';
  width: .4em;
  height: .4em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform .15s;
}
.Contents_Menu[open] > .Contents_Summary::after {
  transform: rotate(225deg);
}
.Contents_Menu > .Contents_List {
  margin-top: var(--half-gap);
}
/* Wider than a column: the contents is across the top of the page, a phone's
   menu. */
@container (min-width: 20rem) {
  .Contents_Label,
  .Contents > .Contents_List {
    display: none;
  }
  .Contents_Menu {
    display: block;
  }
}

/* An index: each group a head, its entries under it, one line each and cut
   short. Where you are is lit in the accent. Given the room (a
   phone's whole width, where a nav stacks over the page) the groups flow
   into columns, so the page is not a long scroll away. */
.Index {
  columns: 9rem;
  column-gap: var(--gap);
  min-width: 0;
}
.Index_Group {
  display: grid;
  min-width: 0;
  break-inside: avoid;
  padding-bottom: var(--half-gap);
}
.Index_Head,
.Index_Item {
  display: block;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: calc(var(--radius) / 2);
  padding: 0 4px;
  min-height: var(--tap);
  align-content: center; /* the words sit in the middle of a fat target */
}
.Index_Head {
  font-weight: 600;
  color: var(--heading);
}
.Index_Item {
  color: var(--muted);
  padding-left: var(--gap);
}
@media (hover: hover) and (pointer: fine) {
  .Index_Head:hover,
  .Index_Item:hover {
    background: var(--soft);
    color: var(--text);
  }
}
.Index_Item-hover {
  background: var(--soft);
  color: var(--text);
}
.Index_Head-on,
.Index_Item-on {
  background: var(--soft);
  color: var(--accent);
}

/* A row holds an entry beside a control or a count, without stacking them. */
.Index_Row {
  display: flex;
  align-items: center;
  gap: var(--half-gap);
  min-width: 0;
}
.Index_Item {
  flex: 1;
  min-width: 0;
}
.Index_Head {
  display: flex;
  align-items: center;
  gap: var(--half-gap);
}

/* Which rows show, then a step each way: small, mono, out of the way of the
   rows above it, each step a link to another page, in the link colour. */
.Pager {
  display: flex;
  align-items: baseline;
  gap: var(--half-gap);
  font-size: var(--small);
  color: var(--muted);
  padding: 4px var(--half-gap);
}
.Pager_Span {
  font-variant-numeric: tabular-nums;
}
.Pager_Step {
  font: inherit;
  color: var(--link);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  min-height: var(--tap);
}
@media (hover: hover) and (pointer: fine) {
  .Pager_Step:hover {
    text-decoration: underline;
  }
}
.Pager_Step:disabled {
  color: var(--dim);
  opacity: 0.5;
  cursor: default;
  text-decoration: none;
}

/* One thing in a list. Its title line: id and kind small and muted, the title
   taking the room and cut short before it wraps, a note after it, a count at
   the end. With an icon, a sub or an end, the row is the icon, the words (the
   title line over the sub) and the end side by side; the row never wraps, so
   the icon keeps its title's line. As a link or a button, the whole row is
   the target; the one picked is lit. */
.Tile {
  --padding: 1px 0;
  --end-align: center;
  display: flex;
  align-items: baseline;
  gap: var(--half-gap);
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  padding: var(--padding);
  min-height: var(--tap);
}
/* A button's reset weighs no more than a class, so the states after it show
   on a button too. */
:where(button).Tile {
  width: 100%;
  font: inherit;
  text-align: start;
  background-color: transparent;
  border: 0;
  border-radius: calc(var(--radius) / 2);
  padding: 1px var(--half-gap);
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  a.Tile:hover,
  .Tile[data-href]:hover {
    background-color: var(--soft);
  }
}
@media (hover: hover) and (pointer: fine) {
  :where(button.Tile):hover {
    background-color: color-mix(in srgb, var(--soft) 50%, transparent);
  }
}
.Tile-hover {
  background-color: color-mix(in srgb, var(--soft) 50%, transparent);
}
.Tile-on {
  background-color: var(--soft);
}
.Tile-dim :is(.Tile_Icon, .Tile_Title) {
  opacity: 0.55;
}
.Tile_Icon,
.Tile_End {
  flex: none;
  align-self: var(--end-align);
  display: inline-flex;
  align-items: center;
}
.Tile_Text {
  flex: 1 1 auto;
  align-self: center;
  display: grid;
  min-width: 0;
}
.Tile_Line {
  display: flex;
  align-items: baseline;
  gap: var(--half-gap);
  min-width: 0;
}
.Tile_Id,
.Tile_Kind {
  font-size: var(--small);
  color: var(--muted);
  white-space: nowrap;
}
.Tile_Id {
  font-family: var(--mono);
}
.Tile_Title {
  --white-space: nowrap;
  --weight: inherit;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: var(--white-space);
  font-weight: var(--weight);
}
.Tile_Title-wrap {
  --white-space: normal;
  --weight: 600;
}
.Tile_Note {
  color: var(--muted);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.Tile_Count {
  margin-left: auto;
  font-size: var(--small);
  color: var(--number);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.Tile_Sub {
  --white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: var(--white-space);
  font-size: var(--small);
  color: var(--muted);
}
.Tile_Sub-wrap {
  --white-space: normal;
}
.Tile_Sub-negative,
.Tile_End-negative {
  color: var(--negative);
}
/* A tile heading the thing's own page: its title larger, and its end, what
   can be done with it, under its words where there is no room beside them. */
.Tile-head {
  flex-wrap: wrap;
}
.Tile-head > .Tile_Text {
  flex-basis: 12rem;
}
.Tile-head > .Tile_End {
  margin-left: auto;
}
.Tile-head .Tile_Title {
  --white-space: nowrap;
  --weight: inherit;
  font-size: 1.1em;
  font-weight: 600;
}
.Tile_Icon-info {
  color: var(--info);
}
.Tile_Icon-active {
  color: var(--active);
}
.Tile_Icon-positive {
  color: var(--positive);
}
.Tile_Icon-negative {
  color: var(--negative);
}
.Tile_Icon-caution {
  color: var(--caution);
}
.Tile_Icon-accent {
  color: var(--accent);
}
.Tile_Icon-special {
  color: var(--special);
}

.Tile-detail {
  --padding: var(--half-gap) 0;
  --end-align: start;
}

/* A list of rows, close together. A nested list hangs off a rule. */
.Rows {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.Rows-nested {
  margin-left: var(--half-gap);
  padding-left: var(--half-gap);
  border-left: 1px solid var(--border2);
}
.Rows_Item {
  min-width: 0;
}
.Rows_More {
  font-size: var(--small);
  color: var(--muted);
}

/* What is kept but no longer live: every word in it muted, links too. */
.Rows-quiet {
  --text: var(--muted);
  --link: var(--muted);
}
.Rows-quiet,
.Rows-quiet :is(.Rows_Link, .Tile_Title, .Body) {
  color: var(--muted);
}

/* A feed of unlike things: each entry has its own edge and breathing room. */
.Rows-ruled > .Rows_Item {
  padding: var(--half-gap) 0;
  border-bottom: 1px solid var(--border2);
}
.Rows_Kind {
  font-size: var(--small);
  color: var(--muted);
}

/* An entry's whole surface opens it, including a renderer's secondary text. */
.Rows_Link {
  display: block;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
  border-radius: var(--radius);
}
@media (hover: hover) and (pointer: fine) {
  .Rows_Link:hover {
    background: var(--soft);
  }
}
.Rows_Link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* A row that opens its page: the whole of it lit under the pointer, and
   what folds under it at the end of its second line, across the row once
   open. */
.Rows > .Rows_Item:has(> .Rows_Link) {
  display: grid;
  padding-block: 0;
}
.Rows_Item > .Rows_Link {
  grid-area: 1 / 1;
  display: grid;
  gap: 2px;
  margin-inline: -.6rem;
  padding: .5rem .6rem;
}
.Rows_Link:has(+ .More) > .Rows_Meta {
  padding-right: 4rem;
}
.Rows_Item > .Rows_Link + .More {
  grid-area: 1 / 1;
  justify-self: end;
  align-self: end;
  padding-bottom: .5rem;
}
.Rows_Item > .Rows_Link + .More[open] {
  grid-area: 2 / 1;
  justify-self: stretch;
}

/* A list put in order by dragging its rows. A row that can be picked up says
   so under the pointer, and a line says where a dragged one would land. */
.Rows-ordered > .Rows_Item[draggable='true'] {
  cursor: grab;
}
.Rows_Item-before {
  box-shadow: 0 -2px 0 var(--accent);
}
.Rows_Item-after {
  box-shadow: 0 2px 0 var(--accent);
}

/* A row that opens in place: a glyph pressed beside what it says, and, while
   open, what it opens, beneath it, hung off a rule. */
.Rows_Line {
  display: flex;
  align-items: center;
  gap: var(--half-gap);
  min-width: 0;
}
.Rows_Line > :last-child {
  flex: 1;
  min-width: 0;
}
.Rows_Toggle {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: var(--radius);
  padding: 0 4px;
  min-height: var(--tap);
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .Rows_Toggle:hover {
    color: var(--text);
    background: var(--soft);
  }
}
.Rows_Toggle:focus-visible {
  outline: 2px solid var(--accent);
}
.Rows_Toggle:disabled {
  visibility: hidden;
}
/* Beneath the row, across it, even in a row of like things that lays its
   parts side by side. */
.Rows_Detail {
  display: grid;
  flex-basis: 100%;
  gap: var(--half-gap);
  margin: var(--half-gap) 0 var(--gap) var(--gap);
  padding-left: var(--gap);
  border-left: 1px solid var(--border2);
  min-width: 0;
}

/* A row of like things: a thing's name over what describes it, and what
   acts on it at the far side, under it where there is no room beside. */
.Rows_Item:where(:has(> .Rows_Main)) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--half-gap) var(--gap);
}
.Rows_Main {
  display: grid;
  flex: 1 1 12rem;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.Rows_Name {
  color: var(--text);
  font-weight: 700;
}
/* A name or what describes it kept to one line, cut short where it runs
   past. */
.Rows_Name-line,
.Rows_Meta-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.Rows_Meta {
  color: var(--muted);
  font-size: var(--small);
}
.Rows_Actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--half-gap);
  margin-left: auto;
}
.Rows_Form {
  display: contents;
}

/* Action feedback can use the part of the row beside the controls. */
.Rows_Item-feedback {
  container-type: inline-size;
}
.Rows_Actions-feedback {
  position: relative;
}
@container (max-width: 28rem) {
  .Rows_Actions-feedback {
    flex-direction: column;
    align-items: flex-end;
  }
}

/* A row with an action at the end and an optional full-width detail. */
.Rows_Item.Rows_Item-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0;
  padding: 0;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}
.Rows_Detail-inset {
  display: block;
  grid-column: 1 / -1;
  margin: 0;
  padding: var(--gap);
  border: 0;
  background: var(--card);
}
.Rows_Note {
  color: var(--muted);
  margin: 0;
  padding-block: var(--half-gap);
  font-size: inherit;
  font-weight: normal;
}

/* A row that opens its thing: its picture before its name, and its name a
   link whose target is the whole row, lit under the pointer. What acts on it
   sits above that target, so each action is pressed on its own. */
.Rows_Item:has(.Rows_Open) {
  position: relative;
  flex-wrap: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .Rows_Item:has(.Rows_Open):hover {
    background: var(--hover, var(--soft));
  }
}
.Rows_Open {
  color: inherit;
  text-decoration: none;
}
.Rows_Open::after {
  content: '';
  position: absolute;
  inset: 0;
}
.Rows_Open:focus-visible {
  outline: none;
}
.Rows_Open:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.Rows_Item:has(.Rows_Open) .Rows_Actions {
  position: relative;
  flex-wrap: nowrap;
}
.Rows_Mark {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: calc(var(--radius) + 2px);
  object-fit: cover;
}
.Rows_Item[hidden] {
  display: none;
}

/* Keys beside their values: the keys a column as wide as the widest, small
   and muted so the value reads first, the values the rest of the row. */
.Pairs {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px var(--gap);
  align-items: baseline;
  margin: 0;
}
.Pairs_Key {
  font-size: var(--small);
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: var(--half-gap);
}
.Pairs_Value {
  margin: 0;
  min-width: 0;
}

.Pairs-nested {
  grid-template-columns: minmax(0, 1fr);
  display: grid;
  gap: .2rem;
  margin: 0;
}
.Pairs_Row {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  gap: .6rem;
}
.Pairs_Key {
  color: var(--muted);
}
.Pairs_Value {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.Pairs-nested .Pairs-nested > .Pairs_Row {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
@media (max-width: 700px) {
  .Pairs_Row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

/* The scrollport holds table content only. Decorative borders belong to
   the surface outside it, so their paint cannot create or be clipped by overflow. */
.Table_Scroll {
  min-width: 0;
  overflow-x: auto;
}

/* Things in rows, as a grid: every row a subgrid of it, so the cells line
   up; hairlines between the rows, headings small and muted. A column is as wide
   as its widest cell where there is room, and they share the room when there
   is not; what is left over runs past the last. Each cell is one line, cut
   short with an ellipsis, whatever it holds; a number is never cut and sets
   right, and prose wraps. A row a press picks lights under the pointer; the
   picked one is raised, with the accent at its edge.

   Table.ts names each column's track in --cols, by what the column holds:
   --col for text, --col-<variant> for the rest. */
.Table {
  --col: minmax(0, max-content);
  --col-num: max-content;
  --col-prose: minmax(12em, max-content);
  display: grid;
  grid-template-columns: var(--cols) 1fr;
  min-width: 0;
}
.Table_Head,
.Table_Body,
.Table_Row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
}
.Table_Row {
  align-items: baseline;
  border-bottom: 1px solid var(--border);
}
.Table_Head > .Table_Row {
  border-bottom-color: var(--border2);
}
.Table_Heading,
.Table_Cell {
  min-width: 0;
  padding: 2px var(--half-gap);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* What a cell holds keeps to the cell's line, whatever it would do on its
   own (a stored value keeps its newlines). */
.Table_Cell * {
  white-space: inherit;
}
.Table_Heading {
  font-size: var(--small);
  color: var(--muted);
}
.Table_Heading-sorts {
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .Table_Heading-sorts:hover {
    color: var(--text);
  }
}
.Table_Heading-asc,
.Table_Heading-desc {
  color: var(--accent);
}
.Table_Heading-num {
  text-align: right;
}
.Table_Cell-prose {
  white-space: normal;
  color: var(--muted);
}
.Table_Cell-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--number);
}
.Table_Cell-key {
  font-family: var(--mono);
  font-size: var(--small);
  color: var(--muted);
}
.Table_Row-picks {
  cursor: pointer;
}
/* A row telling of the rest, not naming a thing: its words muted. */
.Table_Row-quiet {
  color: var(--muted);
}
@media (hover: hover) and (pointer: fine) {
  .Table_Row-picks:hover {
    background: var(--soft);
  }
}
.Table_Row-hover {
  background: var(--soft);
}
.Table_Row-picks:focus-visible,
.Table_Row-focus {
  outline: none;
  background: var(--card);
  box-shadow: inset 2px 0 var(--accent);
}
/* A tree's rows: a toggle where a row holds rows, pointing down while they
   show; an indent as wide as a toggle for each row a row is under, and in
   place of the toggle where it holds none, so the words line up. */
.Table_Toggle,
.Table_Indent {
  display: inline-block;
  width: 1.25em;
}
.Table_Toggle {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.Table_Toggle::before {
  content: '▸';
}
.Table_Toggle-open::before {
  content: '▾';
}
@media (hover: hover) and (pointer: fine) {
  .Table_Toggle:hover {
    color: var(--text);
  }
}

.Table_Sort {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}
.Table_Sort:focus-visible {
  outline: 1px solid var(--accent);
}

/* Moments down a rule: each a line of when and who, what it was under it. */
.Timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--half-gap);
  border-left: 1px solid var(--border2);
  display: grid;
  gap: var(--half-gap);
}
.Timeline_Item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--half-gap);
  min-width: 0;
}
.Timeline_When,
.Timeline_Who {
  font-size: var(--small);
  white-space: nowrap;
}
.Timeline_When {
  color: var(--muted);
}
.Timeline_Who {
  color: var(--who);
}
.Timeline_What {
  flex-basis: 100%;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

/* A stretch of a conversation: who in a narrow column, what they said beside
   it. The turn the page is about is lit by a bar in the accent; a quiet one
   (a tool call, its answer) is small and muted. */
.Turns {
  display: grid;
  gap: 2px;
  min-width: 0;
  max-width: var(--measure);
}
.Turns_Turn {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: var(--half-gap);
  align-items: baseline;
  padding: 2px var(--half-gap);
  border-left: 3px solid transparent;
  min-width: 0;
}
.Turns_Turn-on {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.Turns_Turn-quiet {
  color: var(--muted);
  font-size: var(--small);
}
.Turns_Who {
  font-size: var(--small);
  color: var(--who);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  a.Turns_Who:hover {
    text-decoration: underline;
  }
}
.Turns_Text {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.Turns_More {
  padding-left: calc(var(--half-gap) + 3px);
  font-size: var(--small);
  color: var(--muted);
}

/* A passage of a longer text, as one row of a list: a line saying whose words
   they are, when and where, small and muted and cut short before it wraps,
   then the words, cut to two lines. As a link, the whole row is the target. */
.Passage {
  --lines: 2;
  margin: 0;
  display: grid;
  gap: 1px;
  min-width: 0;
  min-height: var(--tap);
  padding: 2px 0;
  color: var(--text);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  a.Passage:hover,
  .Passage[data-href]:hover {
    background-color: var(--soft);
  }
}
.Passage_By {
  display: flex;
  align-items: baseline;
  gap: var(--half-gap);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: var(--small);
  color: var(--muted);
}
/* Who and when keep their room; a title and where give theirs up first. */
.Passage_By > * {
  flex: none;
}
.Passage_By > :is(.Passage_Title, :last-child) {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.Passage_Title {
  font-size: var(--size);
  color: var(--text);
}
.Passage_Who {
  color: var(--who);
}
.Passage_Sep {
  color: var(--dim);
}
.Passage_Text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--lines);
  line-clamp: var(--lines);
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* Notes under a heading: its words on a line of their own, who and when on
   another, small; one seen to steps back to muted, its bar to the border. */
.Notes {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.Notes_Item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--half-gap);
  min-width: 0;
  padding-left: var(--half-gap);
  border-left: 2px solid var(--active);
}
.Notes_Item-done {
  border-left-color: var(--border2);
  color: var(--muted);
}
.Notes_Text,
.Notes_Item > .Say,
.Notes_Item > .Choices {
  flex: 1 0 100%;
  min-width: 0;
}
.Notes_Text {
  overflow-wrap: anywhere;
}
.Notes_Who,
.Notes_When {
  min-width: 0;
  overflow: hidden;
  font-size: var(--small);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.Notes_Who {
  color: var(--who);
}
.Notes_When {
  color: var(--muted);
}

.Notes_Children {
  --branch: var(--border2);
  margin-left: var(--gap);
  padding-left: var(--half-gap);
  border-left: 1px solid var(--branch);
  min-width: 0;
}

.AppShell {
  display: flex;
  flex-direction: column;
  height: var(--viewport-height, 100dvh);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--text, CanvasText);
  background: var(--bg, Canvas);
}

.AppShell-fill {
  height: 100%;
}

.AppShell_Bar,
.AppShell_Status {
  display: flex;
  align-items: center;
  flex: none;
  gap: var(--half-gap, .5rem);
  min-width: 0;
  padding-inline: max(var(--gap, 1rem), env(safe-area-inset-left))
    max(var(--gap, 1rem), env(safe-area-inset-right));
  background: var(--surface-fill, var(--surface, Canvas));
}

.AppShell_Bar {
  flex-wrap: wrap;
  min-height: 3rem;
  padding-block: calc(.375rem + env(safe-area-inset-top)) .375rem;
  border-bottom: 1px solid var(--border, light-dark(#ddd, #444));
}
@supports not (color: light-dark(#000, #fff)) {
.AppShell_Bar {
  border-bottom: 1px solid var(--border, #ddd);
}
@media (prefers-color-scheme: dark) {
.AppShell_Bar {
  border-bottom: 1px solid var(--border, #444);
}
}
}

.AppShell_Label {
  margin: 0;
  color: var(--heading, var(--text, CanvasText));
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.25;
}

.AppShell_Body,
.AppShell_Main,
.AppShell_Canvas {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
}

.AppShell_Body,
.AppShell_Canvas {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.AppShell_Body {
  display: flex;
}

.AppShell_Main,
.AppShell_Panel {
  overflow: auto;
  overscroll-behavior: contain;
}

.AppShell_Main-canvas {
  overflow: hidden;
}

.AppShell_Float {
  position: absolute;
  z-index: 3;
  inset-block-start: var(--gap, 1rem);
  inset-inline-start: var(--gap, 1rem);
  display: flex;
  gap: var(--half-gap, .5rem);
  max-width: calc(100% - 2 * var(--gap, 1rem));
  max-height: calc(100% - 2 * var(--gap, 1rem));
}

.AppShell_Float-top-end,
.AppShell_Float-bottom-end {
  inset-inline-start: auto;
  inset-inline-end: var(--gap, 1rem);
}

.AppShell_Float-bottom-start,
.AppShell_Float-bottom-end {
  inset-block-start: auto;
  inset-block-end: var(--gap, 1rem);
}

.AppShell_Panel {
  flex: 0 0 var(--app-panel-width, 20rem);
  padding: var(--gap, 1rem);
  background: var(--surface-fill, var(--surface, Canvas));
  border-inline-end: 1px solid var(--border, light-dark(#ddd, #444));
}
@supports not (color: light-dark(#000, #fff)) {
.AppShell_Panel {
  border-inline-end: 1px solid var(--border, #ddd);
}
@media (prefers-color-scheme: dark) {
.AppShell_Panel {
  border-inline-end: 1px solid var(--border, #444);
}
}
}

.AppShell_Panel-end {
  order: 1;
  border-inline-start: 1px solid var(--border, light-dark(#ddd, #444));
  border-inline-end: 0;
}
@supports not (color: light-dark(#000, #fff)) {
.AppShell_Panel-end {
  border-inline-start: 1px solid var(--border, #ddd);
}
@media (prefers-color-scheme: dark) {
.AppShell_Panel-end {
  border-inline-start: 1px solid var(--border, #444);
}
}
}

.AppShell_Panel[hidden] {
  display: none;
}

.AppShell_Status {
  min-height: 1.75rem;
  padding-block: .125rem calc(.125rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border, light-dark(#ddd, #444));
  font-size: var(--small, .8125rem);
  color: var(--muted, CanvasText);
}
@supports not (color: light-dark(#000, #fff)) {
.AppShell_Status {
  border-top: 1px solid var(--border, #ddd);
}
@media (prefers-color-scheme: dark) {
.AppShell_Status {
  border-top: 1px solid var(--border, #444);
}
}
}

@media (max-width: 44rem) {
  .AppShell_Panel {
    position: absolute;
    z-index: 1;
    inset-block: 0;
    inset-inline: 0 auto;
    width: min(90%, var(--app-panel-width, 20rem));
    box-shadow: var(--shadow, 0 2px 10px #0003);
  }

  .AppShell_Panel-end {
    inset-inline: auto 0;
  }
}

.Identity {
  -webkit-user-select: none;
  user-select: none;
}
.Identity {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  column-gap: .6rem;
  padding: .55rem .7rem;
  list-style: none;
}
.Identity.Menu_Summary {
  grid-template-columns: 2rem minmax(0, 1fr) auto;
}
.Identity_Avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  background: var(--avatar, var(--accent));
  color: var(--bg);
  font-weight: 800;
}
img.Identity_Avatar {
  object-fit: cover;
  background: none;
}
.Identity_Avatar-plain {
  background: none;
  color: inherit;
}
.Identity_Avatar-tone-0 {
  --avatar: light-dark(#495d89, #a8bde5);
}
@supports not (color: light-dark(#000, #fff)) {
.Identity_Avatar-tone-0 {
  --avatar: #495d89;
}
@media (prefers-color-scheme: dark) {
.Identity_Avatar-tone-0 {
  --avatar: #a8bde5;
}
}
}
.Identity_Avatar-tone-1 {
  --avatar: light-dark(#6a5085, #c7afe2);
}
@supports not (color: light-dark(#000, #fff)) {
.Identity_Avatar-tone-1 {
  --avatar: #6a5085;
}
@media (prefers-color-scheme: dark) {
.Identity_Avatar-tone-1 {
  --avatar: #c7afe2;
}
}
}
.Identity_Avatar-tone-2 {
  --avatar: light-dark(#894964, #dea5bd);
}
@supports not (color: light-dark(#000, #fff)) {
.Identity_Avatar-tone-2 {
  --avatar: #894964;
}
@media (prefers-color-scheme: dark) {
.Identity_Avatar-tone-2 {
  --avatar: #dea5bd;
}
}
}
.Identity_Avatar-tone-3 {
  --avatar: light-dark(#914a42, #e3a79d);
}
@supports not (color: light-dark(#000, #fff)) {
.Identity_Avatar-tone-3 {
  --avatar: #914a42;
}
@media (prefers-color-scheme: dark) {
.Identity_Avatar-tone-3 {
  --avatar: #e3a79d;
}
}
}
.Identity_Avatar-tone-4 {
  --avatar: light-dark(#465f6b, #a2c3d0);
}
@supports not (color: light-dark(#000, #fff)) {
.Identity_Avatar-tone-4 {
  --avatar: #465f6b;
}
@media (prefers-color-scheme: dark) {
.Identity_Avatar-tone-4 {
  --avatar: #a2c3d0;
}
}
}
.Identity_Avatar-tone-5 {
  --avatar: light-dark(#71564a, #cfad9f);
}
@supports not (color: light-dark(#000, #fff)) {
.Identity_Avatar-tone-5 {
  --avatar: #71564a;
}
@media (prefers-color-scheme: dark) {
.Identity_Avatar-tone-5 {
  --avatar: #cfad9f;
}
}
}
.Identity_Text {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  line-height: 1.25;
}
.Identity_Name {
  overflow-wrap: anywhere;
}
.Identity_Name,
.Identity_Note {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.Identity_Note {
  color: var(--muted);
  font-size: var(--fine, var(--small));
}
.Identity_Action {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-size: var(--fine, var(--small));
  font-weight: 700;
}
.Identity_Mark {
  color: var(--accent);
  font-weight: 800;
}
.Identity_Add {
  padding: .5rem .7rem;
  color: var(--accent);
  font-size: var(--fine, var(--small));
  font-weight: 700;
  text-decoration: none;
}
.Identity_Name,
.Identity_Note {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.Identity_Image {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: .35rem;
  object-fit: cover;
}

.Identity_Avatar-large {
  width: 4rem;
  height: 4rem;
  font-size: 1.75rem;
}

.Toolbar_Label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.Toolbar_Text {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}
.Toolbar_Sub {
  margin: 0;
  color: var(--muted);
  font-size: var(--fine, var(--small));
  overflow-wrap: anywhere;
}
.Toolbar_Title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.Toolbar {
  --toolbar-padding-block: .75rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  padding: var(--toolbar-padding-block) 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border2);
}
@media (max-width:700px) {
  .Toolbar {
    --toolbar-padding-block: .5rem;
    padding-inline: 1rem;
  }
}
.Toolbar-compact {
  gap: .6rem;
  padding: .6rem 1rem;
  background: none;
  border: 0;
}
.Toolbar-narrow {
  padding: .6rem 1rem;
}

.Toolbar-plain {
  flex-wrap: wrap;
  gap: var(--gap);
  padding: var(--half-gap) 0;
  border: 0;
  background: none;
}

.Transcript {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.Transcript_Lines {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
.Transcript_Lines > * {
  min-width: 0;
}
.Transcript_Bubble {
  width: fit-content;
  max-width: 85%;
  margin: 0 0 0 auto;
  padding: .6rem 1rem;
  border-radius: 1.1rem;
  background: var(--mine, var(--surface));
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.Transcript_Via {
  margin-right: .4em;
  color: var(--muted);
}
.Transcript_Via .Icon {
  width: .95em;
  height: .95em;
  vertical-align: -.1em;
}
.Transcript_Meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .25rem;
  color: var(--muted);
  font-size: var(--fine, var(--small));
}
.Transcript_Meta > .Transcript_Via {
  margin-right: 0;
}
.Transcript_Entry-theirs > .Transcript_Meta {
  justify-content: end;
}
/* Said by the other person, in a conversation between people: their bubble
   at the left, on the sheet behind. */
.Transcript_Entry-other > .Transcript_Bubble {
  margin: 0 auto 0 0;
  background: var(--surface);
}
.Transcript_Entry-hidden {
  opacity: .5;
}
.Transcript_Entry-actions {
  position: relative;
  padding-inline-end: 1.8rem;
}
.Transcript_Meta-actions {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  margin: 0;
  gap: 0;
}
.Transcript_Meta-actions > .Menu_Trigger {
  display: grid;
  place-items: center;
  inline-size: 1.6rem;
  block-size: 1.6rem;
  border-radius: var(--radius);
}
.Transcript_Meta-actions > .Menu_Trigger:hover,
.Transcript_Meta-actions > .Menu_Trigger:focus-visible,
.Transcript_Meta-actions > .Menu_Trigger[aria-expanded='true'] {
  background: var(--hover);
  color: var(--text);
}
.Transcript_Divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-block-end: .7rem;
  color: var(--muted);
  font-size: var(--small);
  font-variant-numeric: tabular-nums;
}
.Transcript_Divider::before,
.Transcript_Divider::after {
  content: '';
  flex: 1;
  border-block-start: 1px solid var(--border);
}
.Transcript_Step {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-inline-size: 0;
  font-weight: 500;
}
.Transcript_Step > .Icon {
  flex: none;
  width: 1em;
  height: 1em;
}
.Transcript_StepText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.Transcript_Note {
  display: grid;
  gap: .25rem;
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: var(--small);
  overflow-wrap: anywhere;
}
.Transcript_Source {
  color: var(--muted);
  font-weight: 600;
}
.Transcript_Origin {
  margin-block-end: .3rem;
  color: var(--muted);
  font-size: var(--small);
  overflow-wrap: anywhere;
}
.Transcript_Origin-mine {
  text-align: end;
}
.Transcript_App {
  color: var(--link);
  font-weight: 600;
}
.Transcript_AppIcon {
  inline-size: 1em;
  block-size: 1em;
  margin-inline-end: .25em;
  vertical-align: -.13em;
  border-radius: .2em;
  object-fit: cover;
}
.Transcript_Reply {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.Transcript_Lines[data-rows] {
  gap: .5rem;
}
.Transcript_Status {
  margin: .5rem 0 0;
  color: var(--muted);
  font-size: .875rem;
}
.Transcript_Status:empty {
  display: none;
}
.Transcript_Activity {
  block-size: 3.5rem;
  contain: layout size;
  flex: none;
  min-inline-size: 0;
  overflow: auto;
  overflow-anchor: none;
}
.Transcript_Activity .Transcript_Status {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.Transcript_Jump {
  position: sticky;
  inset-block-start: .5rem;
  z-index: 1;
  block-size: 0;
  margin-block-end: -1rem;
  align-self: center;
  overflow-anchor: none;
}
.Transcript_Newest {
  border-radius: 100vw;
  background: var(--surface);
}
.Transcript_Error {
  display: grid;
  gap: var(--half-gap);
}
.Transcript_When {
  white-space: nowrap;
}

.Attachments {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  font-size: var(--small);
}
/* A person's own, on their side. */
.Attachments-end {
  justify-content: flex-end;
  width: fit-content;
  max-width: 85%;
  margin-left: auto;
}
.Attachments_Link {
  overflow-wrap: anywhere;
}
.Attachments_Image {
  display: block;
  width: auto;
  max-width: min(100%, 16rem);
  max-height: 12rem;
  border-radius: .75rem;
  object-fit: cover;
}
.Attachments_File {
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: 16rem;
  padding: .35rem .75rem .35rem .35rem;
  border-radius: .75rem;
  background: var(--mine, var(--surface));
  color: var(--text);
  text-decoration: none;
}
.Attachments_Kind {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding-inline: .3rem;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
  font-size: var(--fine, var(--small));
  font-weight: 700;
}
.Attachments_Name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.Attachments_Size,
.Attachments_Note {
  color: var(--muted);
  font-size: var(--fine, var(--small));
}
.Attachments_Size {
  flex: none;
}
.Attachments_Note {
  flex-basis: 100%;
}
/* Files held to send, along a message box's top: small, each with a way to
   take it back at its corner. */
.Attachments-held .Attachments_Picture,
.Attachments-held .Attachments_File {
  position: relative;
  flex-wrap: wrap;
}
.Attachments-held .Attachments_File {
  padding-right: 2rem;
}
.Attachments-held .Attachments_Image {
  width: 3.5rem;
  height: 3.5rem;
}
.Attachments_Remove {
  position: absolute;
  top: .2rem;
  right: .2rem;
  --control-height: 1.6rem;
  --control-pad-inline: .45rem;
}
.Attachments:empty {
  display: none;
}
/* A file of words shown as it is, under the line that names it: its own
   page (`framed`), which takes this page's color scheme and shows through
   to its background. */
.Attachments_Frame {
  display: block;
  width: 100%;
  height: min(20rem, 60vh);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
}

.Annotated {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.5rem;
  align-items: start;
  gap: 1rem;
}
.Annotated_Content {
  min-width: 0;
}
.Annotated_Margin {
  display: grid;
  justify-items: end;
  gap: .2rem;
  color: var(--muted);
  font-size: var(--small);
  font-variant-numeric: tabular-nums;
}

.Preview_Address {
  flex: 0 0 auto;
  min-width: 0;
  padding: .25rem .5rem;
  overflow: auto;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: var(--small);
  color: var(--text);
  user-select: all;
}
.Preview_Frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: .75rem;
  background: white;
  color-scheme: normal;
  box-shadow: 0 0 0 1px var(--border2);
}

.Preview-pane {
  border-left: 1px solid var(--border2);
  background: var(--surface);
}

.Preview_Frame-flat {
  box-shadow: none;
  border-radius: calc(var(--radius) - .25rem);
}

.Preview_Choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  min-height: 0;
  height: 100%;
  align-content: start;
}
.Preview_Item {
  display: contents;
}
.Preview_Choice {
  order: 0;
  --control-height: 2rem;
  padding: 0 .5rem;
}
.Preview_View {
  order: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-width: 0;
  min-height: 0;
  flex: 1 1 100%;
  height: 100%;
}
.Preview_Choices:has(.Preview_Choice) > .Preview_Item > .Preview_View {
  height: calc(100% - 2rem);
}
.Preview_Item:has(.Preview_Choice) > .Preview_View {
  display: none;
}
.Preview_Item:has(.Check_Input:checked) > .Preview_View {
  display: flex;
}
.Preview_View > .Preview_Frame {
  flex: 1 1 auto;
  min-height: 0;
}
.Preview_View > .Notice {
  padding: .25rem .5rem 0;
}

/* A page at a width of its own, its height following its shape, for a frame
   in a flowing page rather than a pane: a desktop's 16:10, a phone's 9:16. */
.Preview_Frame-desktop,
.Preview_View > .Preview_Frame-desktop {
  height: auto;
  aspect-ratio: 16 / 10;
}
.Preview_Frame-phone,
.Preview_View > .Preview_Frame-phone {
  width: min(100%, 24rem);
  height: auto;
  aspect-ratio: 9 / 16;
  margin-inline: auto;
}

.Composer {
  position: relative;
}
.Composer_Figure {
  position: absolute;
  bottom: calc(100% - .2rem);
  left: .75rem;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  pointer-events: none;
}
.Composer {
  display: grid;
  gap: .5rem;
  padding: .5rem;
  border: 1px solid var(--border2);
  border-radius: 1rem;
  background: var(--card);
}
.Composer_Field {
  width: 100%;
  min-height: calc(var(--control-height, 2rem) * 1.5);
  max-height: calc(var(--viewport-height, 100dvh) * .4);
  resize: none;
}
/* iOS zooms the page into a field whose words are under 16px. */
@media (pointer: coarse) {
  .Composer_Field {
    font-size: max(1rem, 1em);
  }
}
.Composer_Tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.Composer_Attach {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35em;
  color: var(--muted);
  font-size: var(--small);
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .Composer_Attach:hover {
    color: var(--text);
  }
}
.Composer_File {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.Composer_Attach:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.Composer_Tools .Drop_Said {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.Composer_Stop,
.Composer_Send {
  margin-left: auto;
}
.Composer_Stop {
  display: none;
}
.Composer_Voice[hidden] {
  display: none;
}
.Composer_Voice[data-listening] {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--accent) 18%, transparent);
  animation: Composer_Listening 1.6s ease-in-out infinite alternate;
}
@keyframes Composer_Listening {
  to {
    box-shadow: 0 0 0 .45rem color-mix(in srgb, var(--accent) 8%,
      transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .Composer_Voice[data-listening] {
    animation: none;
  }
}
.Composer_Status {
  margin: .3rem 0 0;
  color: var(--muted);
  font-size: var(--fine, var(--small));
}
.Composer_Status:empty {
  display: none;
}
/* Who the words go to, where it isn't the conversation shown, along the
   field's top. */
.Composer_To {
  margin: 0;
  padding-inline: .25rem;
  color: var(--muted);
  font-size: var(--fine, var(--small));
}
.Composer_To:empty {
  display: none;
}

.Composer[data-busy] .Composer_Stop {
  display: inline-flex;
}
.Composer[data-busy] .Composer_Send {
  margin-left: 0;
}

/* Where the form rides over what scrolls under it, it covers that with the
   paper it lies on, faded in over its first rem: the floor's fill, its grain
   too, so the band reads as the page and not a flat sheet over it. The paint
   is a layer behind the form's own, masked, so the fade takes the grain with
   the colour. A page may hold the form in place (sticky), so its position is
   only a default. */
:where(.Composer_Form) {
  position: relative;
}
.Composer_Form {
  isolation: isolate;
  gap: .75rem;
}
.Composer_Form::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--floor-fill, var(--bg-fill, var(--bg)));
  mask-image: linear-gradient(transparent, #000 1rem);
  pointer-events: none;
}
.Composer_Form-inline::before {
  content: none;
}

@container workspace (min-width:54rem) {
  .Composer_Figure {
    right: calc(100% + .75rem);
    bottom: 0;
    left: auto;
    width: 4rem;
    height: 4rem;
  }
}

.Popover_Trigger {
  gap: .3rem;
  font-variant-numeric: tabular-nums;
}
.Popover_Trigger .Dot {
  width: .55rem;
  height: .55rem;
}
.Popover_Count {
  color: var(--muted);
  font-size: var(--fine, var(--small));
  font-weight: 700;
}
.Popover_Line {
  margin: 0;
}

.Popover[hidden],
.Popover [hidden] {
  display: none;
}
.Popover_Body {
  display: none;
  gap: .75rem;
  padding: var(--popover-padding, .5rem);
  background: var(--popover-background, var(--bg));
  border: var(--popover-border, 1px solid var(--border2));
  border-radius: var(--radius);
  box-shadow: var(--popover-shadow, 0 .5rem 1.5rem color-mix(in srgb,
    var(--text) 12%, transparent));
}
.Popover[data-open] .Popover_Body {
  display: grid;
}

@container workspace (min-width:76rem) {
  .Popover-responsive .Popover_Trigger {
    display: none;
  }
  .Popover-responsive .Popover_Body {
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
}

.Skip {
  position: absolute;
  top: -5rem;
  left: 1rem;
  padding: .6rem 1rem;
  background: var(--card);
  z-index: 1;
}
.Skip:focus {
  top: 1rem;
}

.Loading {
  color: var(--muted);
  padding: var(--half-gap);
}
.Loading_Words:not([hidden]) {
  display: contents;
}
.Loading:has(> .Loading_Words[hidden]):not([data-yak-loading-failed]) {
  display: none;
}
.Loading_Failed {
  color: var(--negative);
}
/* What is at work, before the words that say it, on their line. */
.Loading_Mark {
  display: inline-block;
  margin-inline-end: var(--half-gap);
  vertical-align: middle;
}
.Loading_Image {
  display: block;
}

/* Nothing here yet: a dashed edge around what will be and how to start, its
   heading in the text's ink and the rest muted, centred. */
.Empty {
  display: grid;
  justify-items: center;
  gap: var(--half-gap);
  padding: calc(2 * var(--gap)) var(--gap);
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}
.Empty > * {
  max-width: var(--measure);
  margin: 0;
}
.Empty_Title {
  color: var(--text);
  font-size: var(--h3);
  font-weight: 700;
}

.Empty_Title-welcome {
  margin: 0 0 .5rem;
  font-size: 1.5rem;
}

.Empty-welcome {
  border: 0;
  padding: 0;
  text-align: center;
}

/* An app's frame: the sidebar on the surface at the left, the page on the
   floor beside it. Search is a box at its top, the field bare inside it. A
   place is a line you can press, its icon then its name in the body's type;
   where you are is lit. The page's bar is one quiet line,
   its title in the text's ink then the page's tools; the body under it
   scrolls on its own.
   Narrower than a tablet, the sidebar folds away behind the bar's menu and
   slides over the page when opened, a shade behind it.
   --floor is the paper the page lies on, the floor itself or, in
   Shell-sheet, a sheet on it. --floor-fill is that colour under the skin's
   --texture: the body and the aside paint it, and a sidebar's tab that opens
   into the page fills with it, so the two are the one paper. The sidebar and
   the bar paint the skin's --surface-fill, so no pane is flat.
   It is as tall as what a person sees, --viewport-height where a page
   holds it (@yaks/ux's Conversation does), so a phone's keyboard shortens
   it and its body rather than scrolling the page. */
.Shell {
  --floor: var(--bg);
  --floor-fill: var(--texture, none), var(--floor);
  display: flex;
  height: var(--viewport-height, 100dvh);
  min-height: 0;
  background: var(--floor);
}
.Shell-sheet {
  --floor: var(--card);
  --floor-fill: var(--texture, none), var(--floor);
}

.Shell_Side {
  flex: 0 0 15rem;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
  overflow-y: auto;
  padding: calc(var(--gap) + env(safe-area-inset-top, 0px)) var(--half-gap)
    var(--gap);
  background: var(--surface-fill, var(--surface));
  border-right: 1px solid var(--border);
}
.Shell_Brand {
  padding: 2px 10px var(--gap);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.Shell_Find {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: max(2rem, var(--tap));
  margin: 0 0 var(--gap);
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg);
}
.Shell_Find:focus-within {
  border-color: var(--accent);
}
.Shell_Find > :not(.Shell_Icon) {
  flex: 1;
  min-width: 0;
}
.Shell_Item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: max(2rem, var(--tap));
  padding: 0 10px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--text);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .Shell_Item:hover {
    background: var(--soft);
  }
}
.Shell_Item-on {
  background: color-mix(in srgb, var(--text) 10%, transparent);
  font-weight: 600;
}
.Shell_Icon {
  flex: none;
  display: inline-flex;
  color: var(--muted);
}
.Shell_Glyph {
  width: 16px;
  height: 16px;
}
.Shell_Item-on .Shell_Icon {
  color: var(--accent);
}
.Shell_Label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.Shell_Count {
  flex: none;
  font-size: var(--small);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.Shell_Main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.Shell_Bar {
  display: flex;
  align-items: center;
  gap: var(--gap);
  min-height: 3rem;
  padding: calc(var(--half-gap) + env(safe-area-inset-top, 0px))
    calc(var(--gap) + env(safe-area-inset-right, 0px)) var(--half-gap)
    calc(var(--gap) + env(safe-area-inset-left, 0px));
  background: var(--surface-fill, var(--surface));
  border-bottom: 1px solid var(--border);
}
.Shell_Menu {
  display: none;
}
.Shell_Title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--half-gap);
  overflow: hidden;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.Shell_Tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--gap);
  min-width: 0;
}
.Shell_Tools:empty {
  display: none;
}
.Shell_Body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column; /* a page that fills the floor takes flex: 1 */
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--floor-fill);
}
.Shell_Shade {
  display: none;
}

@media (max-width: 44rem) {
  .Shell_Side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    width: min(85vw, 18rem);
    transform: translateX(-100%);
    transition: transform 0.18s ease-out;
    border-right: 0;
  }
  .Shell-open .Shell_Side {
    transform: none;
    box-shadow: var(--shadow);
  }
  .Shell-open .Shell_Shade {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9;
    padding: 0;
    border: 0;
    background: color-mix(in srgb, var(--text) 25%, transparent);
  }
  .Shell_Menu {
    display: inline-flex;
    margin-left: calc(var(--half-gap) * -1);
  }
  .Shell_Bar {
    flex-wrap: wrap;
    row-gap: var(--half-gap);
  }
  .Shell_Tools {
    flex: 1 0 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
}

.Shell_Content {
  font-size: var(--small);
}

/* What sits at the page's right: a pane the window's height that scrolls
   apart from the page, so the page centers in the width left beside it.
   Shut, it leaves the full width to the page. Narrower than a laptop it
   stands only while it is the address's target, over the page from the right,
   its edge casting a shadow on the page. */
.Shell_Aside {
  flex: 0 0 var(--shell-aside, 20rem);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: var(--viewport-height, 100dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-left: 1px solid var(--border);
  background: var(--floor-fill);
}
.Shell_Aside[hidden],
.Shell-shut .Shell_Aside {
  display: none;
}
@media (max-width: 68.75rem) {
  .Shell_Aside {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 10;
    width: min(26rem, 100vw);
    height: auto;
    box-shadow: -.25rem 0 1.5rem color-mix(in srgb, var(--text) 18%,
      transparent);
  }
  .Shell_Aside:not(:target, :has(:target)) {
    display: none;
  }
  .Shell_Aside:is(:target, :has(:target)):not([hidden]) {
    display: flex;
  }
}

/* The top of a page: the title large and ink, with its id and kind small
   beside it; what it is under it, muted; then the facts, small and muted,
   dotted apart. Whatever follows it starts a gap below. */
.Head {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.Head + * {
  margin-top: var(--gap);
}
.Head_Title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--half-gap);
  min-width: 0;
  font-size: var(--h1);
  font-weight: 600;
  line-height: 1.3;
  color: var(--heading);
  overflow-wrap: anywhere;
}
a.Head_Title {
  text-decoration: none;
}
.Head_Link {
  color: inherit;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  a.Head_Title:hover,
  .Head_Link:hover {
    text-decoration: underline;
  }
}
.Head_Id,
.Head_Kind {
  font-size: var(--small);
  font-weight: normal;
  color: var(--muted);
}
.Head_Id {
  font-family: var(--mono);
}
.Head_Sub {
  margin: 0;
  color: var(--muted);
  max-width: var(--measure);
}
.Head_Sub-refused {
  color: var(--negative);
}
.Head_Facts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--half-gap);
  font-size: var(--small);
  color: var(--muted);
}
.Head_Sep {
  color: var(--dim);
}

.Head_Eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: var(--fine, var(--small));
}
.Head_Row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--half-gap);
  min-width: 0;
}
.Head_Actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--half-gap);
  max-width: 100%;
}
.Head_Title-page {
  font-size: 1.75rem;
  line-height: 1.2;
  margin: .15rem 0 0;
}
.Head_Period {
  margin: .25rem 0 0;
  font-size: var(--small);
}
.Head_Address {
  font-size: var(--fine, var(--small));
  text-decoration: none;
  color: var(--muted);
}
@media (max-width: 700px) {
  .Head_Title-page {
    font-size: 1.5rem;
  }
}

.Head_Title-page {
  font-weight: 800;
}

/* The few numbers a page is about: tiles side by side, as many to a line as
   fit, each its number large over the words saying what it counts. The
   number keeps its digits in columns, so a value that moves does not shift. */
.Metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: var(--gap);
}
.Metrics_Item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: var(--gap);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.Metrics_Value {
  font-size: var(--h1);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.Metrics_Value-caution {
  color: var(--caution);
}
.Metrics_Value-negative {
  color: var(--negative);
}
.Metrics_Label {
  font-size: var(--small);
  color: var(--muted);
}
.Metrics_Note {
  margin-top: 4px;
  font-size: var(--small);
  color: var(--muted);
  overflow: hidden;
}

/* A titled section: a title line (words, count, note), what it is about,
   then its body. Sections stack with a gap between them; the page decides
   the rest. */
.Section {
  display: grid;
  gap: var(--half-gap);
  min-width: 0;
}
.Section + .Section {
  margin-top: calc(var(--gap) * 2);
}
.Section_Title {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: var(--half-gap);
  min-width: 0;
  font-size: var(--h2);
  font-weight: 600;
  color: var(--heading);
}
.Section_Count,
.Section_Note {
  font-weight: normal;
  font-size: var(--small);
  color: var(--muted);
}
.Section_Count {
  font-variant-numeric: tabular-nums;
}
.Section_Note-refused {
  color: var(--negative);
}
.Section_Sub {
  margin: 0;
  color: var(--muted);
  font-size: var(--small);
  max-width: var(--measure);
}

.Section-compact {
  display: block;
}
.Section-compact + .Section-compact {
  margin-top: 0;
}
.Section_Title-compact {
  display: block;
  font-size: 16px;
  font-weight: bold;
  padding-block: var(--gap) var(--half-gap);
}

/* A plain parent of visible sibling cards gets the same gap. A named layout can
   still arrange its own children, such as Cards putting them in columns. */
.Stack:not(:where([hidden])),
:where(:not([hidden]):has(> .Card:not([hidden]) ~ .Card:not([hidden]))) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--gap);
  min-width: 0;
}
.Stack > :where(*) {
  margin: 0;
}

/* A fold: its line in the accent, a chevron before it that turns as it
   opens, and what it holds a gap under it. */
.More_Summary {
  display: inline-flex;
  align-items: center;
  gap: var(--half-gap);
  color: var(--accent);
  font-size: var(--small);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.More_Summary::-webkit-details-marker {
  display: none;
}
.More_Summary::before {
  content: '';
  flex: none;
  width: .4em;
  height: .4em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
  transition: transform .15s;
}
.More[open] > .More_Summary::before {
  transform: rotate(45deg);
}
.More_Body {
  display: grid;
  gap: var(--half-gap);
  margin-top: var(--half-gap);
}
.More_Body > * {
  margin: 0;
}
.More_Label {
  font-weight: 700;
}
.More_Value {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* A step: a muted line with `›` after it that turns as it opens, accent
   while it runs and negative once it did not work, and what it holds under a
   rule at the size it is drawn. */
.More-quiet > .More_Summary {
  align-items: baseline;
  gap: .4rem;
  color: var(--muted);
  font-weight: normal;
}
.More-quiet > .More_Summary::before {
  content: none;
}
.More-quiet > .More_Summary::after {
  content: '›';
  transition: transform .15s;
}
.More-quiet[open] > .More_Summary::after {
  transform: rotate(90deg);
}
.More-step > .More_Summary {
  max-inline-size: 100%;
  align-items: center;
}
.More-on > .More_Summary {
  color: var(--accent);
}
.More-no > .More_Summary {
  color: var(--negative);
}
.More-quiet > .More_Body {
  gap: .6rem;
  margin-top: .4rem;
  padding: .6rem .8rem;
  border-left: 2px solid var(--border2);
}

/* A second way to open a fold, drawn outside it: a bare button, muted, in
   the accent while the fold it opens is open. */
.More_Mark {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.More_Mark:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.More_Mark[aria-expanded='true'] {
  color: var(--accent);
}

/* A card: one surface holding related things, flat on the page on a
   hairline. What it holds stacks a gap apart, never by margins of its own,
   and its head, when it has one, runs edge to edge across the top, ruled
   off under it: what it is on the left, its actions on the right. */
.Card {
  --card-pad: var(--gap);
  --card-gap: var(--half-gap);
  display: grid;
  align-content: start;
  gap: var(--card-gap);
  min-width: 0;
  padding: var(--card-pad);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--card-fill, var(--card));
  overflow-wrap: break-word;
}
.Card > * {
  min-width: 0;
  margin: 0;
}
/* A narrow head wraps rather than squeezing its title: how it stands goes
   under the title, and the actions under that, still at the right. */
.Card_Head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--half-gap);
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 0;
  padding: var(--half-gap) var(--card-pad);
  border-bottom: 1px solid var(--border2);
}
.Card_Head:last-child {
  margin-bottom: calc(-1 * var(--card-pad));
  border-bottom: 0;
}
.Card_Title {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
  color: var(--heading);
  font-size: var(--size);
  font-weight: 700;
  line-height: 1.3;
}
.Card_Name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem var(--half-gap);
  min-width: 0;
  overflow-wrap: anywhere;
}
.Card_Name > .Card_Title {
  flex: 0 1 auto;
}
.Card_Status {
  display: inline-flex;
  align-items: center;
  gap: var(--half-gap);
  min-width: 0;
}
.Card_Sep {
  color: var(--dim);
}
.Card_Link {
  color: inherit;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .Card_Link:hover {
    color: var(--link);
    text-decoration: underline;
  }
}
.Card_Mark {
  flex: none;
  width: 1.5em;
  height: 1.5em;
  text-align: center;
  object-fit: contain;
}
.Card_Actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  margin-inline-start: auto;
  gap: var(--half-gap);
  min-width: 0;
}
.Card_Form {
  display: contents;
}
.Card_Sub {
  color: var(--muted);
  font-size: var(--small);
}

/* Rows in a card run to its edges. */
.Card > .Rows {
  margin-inline: calc(-1 * var(--card-pad));
}
.Card > .Rows > .Rows_Item {
  padding-inline: var(--card-pad);
}

/* A whole card can be pressed. Cards without a header center their contents. */
.Card-button {
  --card-pad: var(--half-gap);
  justify-items: center;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .Card-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }
}
.Card-button:has(> .Card_Head) {
  justify-items: stretch;
  text-align: start;
}
.Card-button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.Card-button .Card_Sub {
  line-height: 1.35;
}
.Card-button > .Card_Mark {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.Card-danger .Card_Title {
  color: var(--negative);
}
.Card-accent {
  border-color: var(--accent);
}

.Card[data-compact] {
  --pad-block: .5rem;
  --pad-inline: .5rem;
}

/* A pressable card that holds a control of its own is pressed through its
   title's link, which covers the card; the control sits above it. */
.Card-button:has(.Card_Link) {
  position: relative;
}
.Card-button .Card_Link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
@media (hover: hover) and (pointer: fine) {
  .Card-button .Card_Link:hover {
    color: inherit;
    text-decoration: none;
  }
}
.Card-button .Card_Form > * {
  position: relative;
  z-index: 1;
}

/* Price, note, list, and action share rows when cards sit beside each other. */
.Plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--gap);
}

.Plan {
  grid-row: span 4;
  grid-template-rows: subgrid;
  text-align: left;
}

.Plan-current {
  --pencil: var(--accent);
  border-color: var(--accent);
}

.Plan_Price {
  color: var(--text);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}

.Plan_Label {
  display: block;
  margin-bottom: var(--half-gap);
  font-size: var(--size);
}

.Plan_Per {
  color: var(--muted);
  font-size: var(--size);
  font-weight: 400;
}

.Plan_Note {
  color: var(--muted);
  font-size: var(--small);
}

.Plan_List {
  --plan-list-indent: 1.25rem;
  display: grid;
  align-content: start;
  gap: 0.5rem;
  margin: 0;
  padding-inline-start: var(--plan-list-indent);
  color: var(--muted);
  list-style: '–  ';
  text-wrap: pretty;
}

.Plan_Item::marker {
  color: var(--accent);
}

.Plan_Credit {
  display: flex;
  align-items: start;
  gap: 0.45rem;
  margin-inline-start: calc(-1 * var(--plan-list-indent));
  color: var(--accent);
  font-weight: 800;
}

.Plan_CreditIcon {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-block-start: calc((1lh - 1rem) / 2);
}

/* The frame owns scrolling, so a long card fits a phone and its backdrop
   stays behind it. The open attribute also works before script runs. */
.Modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: var(--gap, 1rem);
  border: 0;
  background: transparent;
  pointer-events: none;
  color: var(--modal-text, var(--text, CanvasText));
  overflow: auto;
  overscroll-behavior: contain;
}
.Modal:is([open], :popover-open) {
  display: grid;
  align-items: start;
  justify-items: center;
  background: color-mix(in srgb, var(--bg, Canvas) 80%, transparent);
  pointer-events: auto;
}
.Modal::backdrop {
  background: transparent;
  pointer-events: none;
}
.Modal_Backdrop {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.Modal_Close {
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}
.Modal_Body {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 42rem);
  margin-block: auto;
}
/* A body kept in the dialog while another is shown. */
.Modal_Body[hidden] {
  display: none;
}
/* The pane under the card's head flows, so the small card of actions floats
   at its top right and what the dialog says wraps beside and under it. */
.Modal_Main {
  display: flow-root;
}
.Modal_Main > * {
  margin: 0;
}
.Modal_Main > * + * {
  margin-top: var(--card-gap);
}
.Modal_Actions {
  float: right;
  display: grid;
  gap: var(--half-gap);
  justify-items: stretch;
  width: min(100%, 12rem);
  box-sizing: border-box;
  margin: 0 0 var(--half-gap) var(--gap);
  padding: var(--half-gap);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  font-size: var(--small);
}
.Modal_Main > .Modal_Actions + * {
  margin-top: 0;
}
.Modal_Actions .Button {
  justify-content: center;
}
@media (max-width: 40rem) {
  .Modal_Actions {
    float: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
    margin: 0 0 var(--card-gap);
  }
}

/* A report: a card whose head says the total where its actions would sit,
   then a chart of the days, its first and last day under it, and short
   lists side by side, each name cut short before it would push its count
   out of its column. */
.Report {
  gap: 1.25rem;
}
.Report_Total {
  flex: none;
  margin: 0 0 0 auto;
  color: var(--text);
  font-size: var(--h3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.Report_Unit {
  color: var(--muted);
  font-size: var(--small);
  font-weight: 400;
}
.Report_Plot {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}
.Report_Span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: var(--small);
}
.Report_Tops {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.Report_Heading {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: var(--small);
  font-weight: 700;
}
/* One column as wide as the list's own, so a long name is cut short with
   an ellipsis rather than widening the row past its column and over the
   next one; the count beside it keeps its whole width and one line. */
.Report_List {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--small);
}
.Report_Item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.Report_Label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.Report_Value {
  flex: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .Report_Tops {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
}

/* A heading over a run of cards: what they share, small and muted, so the
   cards' own titles lead. */
.Group {
  margin: 0;
  color: var(--muted);
  font-size: var(--small);
  font-weight: 700;
}

/* The window in columns: a narrow nav on the surface, the page on the floor
   beside it (or whatever column follows), a hairline
   between each two. Each pane keeps its top where it is and scrolls its
   body. A phone-width window stacks them, and the page scrolls as one; a
   nav that is an aside goes after the page there. Set on an app's floor (a
   column that scrolls, such as a Shell's body) the columns fill the floor
   rather than the window. */
.Panes {
  display: flex;
  flex: 1;
  height: var(--viewport-height, 100dvh);
  min-height: 0;
}
.Panes_Pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.Panes > * + * {
  border-left: 1px solid var(--border);
}
.Panes_Pane-nav {
  flex: 0 0 15rem;
  background: var(--surface);
}
.Panes_Pane-main {
  flex: 1 1 0;
}
/* What sits beside the page, as wide as a chat beside a page is. */
.Panes_Pane-side {
  flex: 0 1 var(--side);
  min-width: var(--side-min);
}
.Panes_Top {
  padding: var(--half-gap) var(--gap);
  border-bottom: 1px solid var(--border);
}
.Panes_Body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: var(--gap);
}
@media (max-width: 56rem) {
  .Panes {
    flex: none;
    flex-direction: column;
    height: auto;
  }
  .Panes > * + * {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .Panes > .Panes_Pane-aside {
    order: 1;
    border-top: 1px solid var(--border);
  }
  .Panes > .Panes_Pane-aside + * {
    border-top: 0;
  }
  .Panes > .Panes_Pane {
    flex: none;
  }
  .Panes_Body {
    overflow: visible;
  }
}

/* What a page opens over itself, sliding in from its edge at a phone's
   width: up from the foot, or in from the left or right. Shut, it rests off
   that edge; it moves there and back on the compositor (translate alone),
   quick and easing out as it opens, easing in as it leaves, so closing plays
   the opening backwards. Its display (and a dialog's place on the top layer)
   holds until it has left. A page that lays it over itself does so at least
   at this width, by its own position, and shows it while it is open.
   A side layer's edge toward the page casts a soft shadow, and nothing dims
   the page behind it.
   Layer-under turns the motion around: the layer stands still at the left,
   under the page, and the page (Layer_Cover, after it) slides right by
   --layer-width to uncover it, then back over it. The cover comes after the
   layer, so it paints over it, and needs a background of its own. Its edge
   casts the shadow, and a press on what still shows of it (Layer_Shut)
   closes the layer. */
.Layer_Shut {
  display: none;
}
@media (max-width: 700px) {
  .Layer,
  .Layer_Cover {
    --layer-shadow: 1.5rem color-mix(in srgb, var(--text) 18%, transparent);
  }
  .Layer-left {
    box-shadow: .25rem 0 var(--layer-shadow);
  }
  .Layer-right {
    box-shadow: -.25rem 0 var(--layer-shadow);
  }
  .Layer[data-swipe],
  .Layer_Shut {
    touch-action: pan-y pinch-zoom;
  }
  .Layer-under {
    box-shadow: none;
  }
  .Layer-under ~ .Layer_Cover {
    position: relative;
    box-shadow: -.25rem 0 var(--layer-shadow);
  }
  .Layer-under:is(:target, :has(:target)) ~ .Layer_Cover {
    translate: var(--layer-width) 0;
  }
  .Layer-under:is(:target, :has(:target)) ~ .Layer_Cover .Layer_Shut {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 100;
  }
}
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .Layer {
    --layer-off: 0 100%;
    transition: translate .24s cubic-bezier(.2, .8, .2, 1),
      display .24s allow-discrete, overlay .24s allow-discrete;
  }
  .Layer-left {
    --layer-off: -100% 0;
  }
  .Layer-right {
    --layer-off: 100% 0;
  }
  .Layer-under {
    --layer-off: none;
  }
  .Layer:not(:target, :has(:target), [open], :popover-open) {
    translate: var(--layer-off);
    transition-duration: .2s;
    transition-timing-function: cubic-bezier(.8, 0, .8, .2);
  }
  @starting-style {
    .Layer {
      translate: var(--layer-off);
    }
  }
  .Layer-under ~ .Layer_Cover {
    transition: translate .2s cubic-bezier(.8, 0, .8, .2);
  }
  .Layer-under:is(:target, :has(:target)) ~ .Layer_Cover {
    transition: translate .24s cubic-bezier(.2, .8, .2, 1);
  }
}

/* What stays one press away over every page: the launcher pinned to the
   window's foot at its right, a quiet toast above it, and the panel it opens
   floating over the page's corner, a card wide, above the launcher. At a
   phone's width the panel takes the screen (a Layer, sliding up from the
   foot), as tall as what a person sees, and the launcher rides the page's bar instead (Launcher-bar). */
.Dock {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: grid;
  justify-items: end;
  gap: .5rem;
  pointer-events: none;
}
.Dock > * {
  pointer-events: auto;
}
.Dock_Launcher {
  gap: .5rem;
  border-radius: 99px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.Dock_Launcher-bar {
  position: relative;
  background: none;
  box-shadow: none;
}
/* A launcher in a bar says someone is in with a dot on its glyph. */
.Dock_Launcher-bar > .Dock_Here {
  position: absolute;
  left: 1.55rem;
  top: .35rem;
  box-shadow: 0 0 0 2px var(--bg);
}
.Dock_Presence.Dot-caution {
  --dot: var(--presence-away, var(--caution));
}
.Dock_Presence.Dot-offline {
  --dot: var(--presence-offline, var(--dim));
}
.Dock_Faces {
  display: inline-flex;
}
.Dock_Faces:empty {
  display: none;
}
.Dock_Face.Identity_Avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: .75rem;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--card);
}
.Dock_Face + .Dock_Face {
  margin-left: -.35rem;
}
.Dock_Word {
  white-space: nowrap;
}
/* It stands where it opens while shut too, so it leaves from there; only its
   display waits on its being open. */
.Dock_Panel {
  position: fixed;
  inset: auto 1rem 4.25rem auto;
  box-sizing: border-box;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(23rem, 100vw - 2rem);
  height: min(38rem, 100dvh - 6rem);
  margin: 0;
  padding: 0;
  border: 1px solid var(--border2);
  border-radius: calc(var(--radius) * 3);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.Dock_Panel:popover-open {
  display: grid;
}
.Dock_Head {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  padding: .5rem .5rem .5rem .75rem;
  border-bottom: 1px solid var(--border2);
}
.Dock_Title {
  flex: 1;
  min-width: 0;
}
.Dock_Body {
  display: grid;
  align-content: start;
  gap: .75rem;
  padding: .75rem;
  overflow: auto;
  overscroll-behavior: contain;
}
.Dock_Foot {
  display: grid;
  gap: .5rem;
  padding: .5rem .75rem .75rem;
  border-top: 1px solid var(--border2);
}
.Dock_Foot:empty {
  display: none;
}
.Dock_Toast {
  display: block;
  max-width: min(20rem, 100vw - 2rem);
  padding: .5rem .75rem;
  border: 1px solid var(--border2);
  border-radius: calc(var(--radius) * 3);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.Dock_Toast[hidden] {
  display: none;
}
@media (min-width: 701px) {
  .Dock_Launcher-bar {
    display: none;
  }
}
@media (max-width: 700px) {
  .Dock {
    right: .75rem;
    left: .75rem;
    top: calc(3.5rem + env(safe-area-inset-top));
    bottom: auto;
    justify-items: stretch;
  }
  .Dock > .Dock_Launcher {
    display: none;
  }
  .Dock_Toast {
    max-width: none;
  }
  /* As tall as what a person sees: --viewport-height while a phone's
     keyboard is up (@yaks/ux's fit holds it), so the box sits on the
     keyboard, which also covers the home bar's inset. */
  .Dock_Panel {
    inset: 0 0 auto;
    width: 100%;
    height: var(--viewport-height, 100dvh);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  }
  .Dock_Panel:has(:is(input, textarea):focus) {
    padding-bottom: 0;
  }
}

/* Fixed to the viewport at the rect of what it springs from, placed by
   script, above every card, so a picker clears what it springs from. */
.Overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
}

/* A card floating over the page, fixed to the viewport where its caller puts
   it (left and top), under every popover and menu so what opens from inside
   it clears it. It keeps one width as what it shows changes, and grows
   to most of the viewport's height; past that its body scrolls, and a wheel
   over it never moves the page beneath. Sized by hand, it keeps the size
   it was given. */
.Peek {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: min(44rem, calc(100vw - 2 * var(--gap)));
  max-height: min(75dvh, 52rem);
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.Peek-sized {
  min-width: 16rem;
  max-width: none;
  max-height: none;
}
/* The line it is held by: what it shows on one side, its presses on the
   other, on the surface like a bar. */
.Peek_Head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--half-gap);
  padding: 2px var(--half-gap) 2px var(--gap);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  font-size: var(--small);
  color: var(--muted);
  cursor: grab;
  user-select: none;
}
.Peek_Body {
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--gap) calc(var(--gap) * 1.5) calc(var(--gap) * 1.5);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* The corner it is sized by: a quiet mark until the pointer finds it. */
.Peek_Grip {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  background: linear-gradient(
    135deg,
    transparent 55%,
    var(--dim) 55%,
    var(--dim) 62%,
    transparent 62%,
    transparent 75%,
    var(--dim) 75%,
    var(--dim) 82%,
    transparent 82%
  );
  opacity: 0.5;
}
@media (hover: hover) and (pointer: fine) {
  .Peek_Grip:hover {
    opacity: 1;
  }
}

.Palette {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 45%, transparent);
}
.Palette_Box {
  width: min(600px, 92vw);
  max-height: 76dvh;
  margin: 12vh auto 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px color-mix(in srgb, #000 45%, transparent);
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.Palette_Line {
  display: flex;
  align-items: center;
  gap: var(--half-gap);
  padding-left: var(--gap);
  border-bottom: 1px solid var(--border);
  color: var(--muted); /* the glyph; the input restores its own ink */
}
.Palette_Line > .Field {
  flex: 1;
}
/* The board chip mid-flight: the veil stops catching pointers so the
   drop hit-tests through to the canvas, and fades to show the target. */
.Palette-drag {
  pointer-events: none;
  opacity: 0.15;
}
.Palette_Page {
  display: flex;
  align-items: center;
  padding: var(--half-gap);
  margin-right: var(--half-gap);
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: var(--radius);
  cursor: grab;
}
@media (hover: hover) and (pointer: fine) {
  .Palette_Page:hover {
    color: var(--text);
    background: var(--soft);
  }
}
/* A kind's section label. The demoted variant (mail, comment) carries a
   divider so the navigational sections read as the palette's top. */
.Palette_Head {
  padding: var(--half-gap) var(--gap) 2px;
  font-size: var(--small);
  color: var(--muted);
}
.Palette_Head-demoted {
  margin-top: var(--half-gap);
  border-top: 1px solid var(--border);
}
.Palette_Hit {
  padding: 2px var(--gap);
  cursor: pointer;
}
.Palette_Hit-sel {
  background: var(--soft);
}
.Palette_Message {
  display: block;
  font-size: var(--small);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  padding: var(--half-gap) var(--gap);
}

/* Things to browse, in groups. A group's heading is small, spaced capitals
   over a rule; an entry's title is large and ink, what it is muted under it,
   then what it shows. Entries stand well apart and groups further, so the
   eye finds each at a glance; a wide window gets a wider margin. The entry
   a link jumped to lights its title. */
.Catalog {
  display: grid;
  gap: calc(var(--gap) * 4);
  min-width: 0;
}
@media (min-width: 56rem) {
  .Catalog {
    padding: var(--gap) calc(var(--gap) * 2);
  }
}
.Catalog_Group {
  display: grid;
  gap: calc(var(--gap) * 2.5);
  min-width: 0;
  scroll-margin-top: var(--gap);
}
.Catalog_Heading {
  margin: 0;
  max-width: none;
  padding-bottom: var(--half-gap);
  border-bottom: 1px solid var(--border2);
  font-size: var(--small);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--heading);
}
.Catalog_Entry {
  display: grid;
  gap: 4px;
  min-width: 0;
  scroll-margin-top: var(--gap);
}
.Catalog_Title {
  margin: 0;
  font-size: var(--h3);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.Catalog_Entry:target > .Catalog_Title {
  color: var(--accent);
}
.Catalog_Sub {
  margin: 0 0 var(--gap);
  max-width: var(--measure);
  color: var(--muted);
}

/* Things side by side: as many figures to a line as fit, each as wide as
   what it shows asks, and no wider than the line. A figure is its caption,
   small and mono, over a stage: a raised panel with room all round, where
   what is shown sits as it would anywhere else. */
.Gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  min-width: 0;
}
.Gallery_Figure {
  flex: 0 1 max-content;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.Gallery_Caption {
  padding: 0 2px;
  font-family: var(--mono);
  font-size: var(--small);
  line-height: 1.4;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.Gallery_Stage {
  flex: 1 1 auto;
  min-width: 0;
  /* Roomy, and less so on a phone, where the room is the line's. */
  padding: clamp(var(--gap), 4vw, calc(var(--gap) * 1.75));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto; /* what is wider than the line scrolls within its stage */
}

/* Even: figures share the line alike, as many as fit at 16rem or more, so
   two to four choices sit side by side and a phone stacks them. */
.Gallery-even > .Gallery_Figure {
  flex: 1 1 16rem;
}

/* Like things in equal columns, as many as fit at a card's least width, each
   row as tall as its tallest cell; one column on a phone. A cell fills its
   column, so cards side by side line up. */
.Cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: var(--gap);
  min-width: 0;
}
.Cards > * {
  min-width: 0;
}

.Cards-compact {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
}

/* Like things in equal columns, as many as fit at a card's least width, each
   row as tall as its tallest cell; one column on a phone. A cell fills its
   column, so cards side by side line up. */
.Cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: var(--gap);
  min-width: 0;
}
.Cards > * {
  min-width: 0;
}

.Cards-compact {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
}

:where(:root, [data-yak-kit]) :where(button, input, select, textarea, summary, a):focus-visible,
:where(.KitGuide) [data-example='focus'] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:where(:root, [data-yak-kit]) :where(input[type='checkbox'], input[type='radio'], input[type='range']) {
  accent-color: var(--accent);
}

:where(:root, [data-yak-kit]) :where(dialog:not(.Layer, .Modal), [popover]:not(.Layer, .Modal, .Popover_Body)) {
  box-sizing: border-box;
  max-inline-size: min(42rem, calc(100% - 2 * var(--gap)));
  padding: var(--gap);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

:where(:root, [data-yak-kit]) :where(dialog:not(.Layer, .Modal))::backdrop {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}

}