/* Chip: the handoff's chip (sheet 1a). JetBrains Mono capitals, spaced out, on a square, in one of
   four forms: filled with ink and lettered in the shell's colour (ours, staged, the ask is
   approval), outlined in ink on nothing (theirs, a look), or dashed (set aside, coming). The word
   carries the meaning; the form only whose it is.

   The uppercase is the stylesheet's, so the words stay as written for a screen reader and for
   anybody who copies them. */
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-mono-chip);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-chip);
  text-transform: uppercase;
  line-height: 1;
  padding: var(--chip-padding);
  border: var(--hairline) solid var(--color-ink);
  border-radius: var(--radius-chip);
  white-space: nowrap;
  vertical-align: middle;
}

/* Filled: ours, staged, or the ask is approval. */
.chip-filled {
  background: var(--color-ink);
  color: var(--color-bg);
}

/* Outlined: theirs, or a look. */
.chip-outlined {
  background: transparent;
  color: var(--color-ink);
}

/* Dashed: set aside, or coming. */
.chip-dashed {
  background: transparent;
  border-style: dashed;
  color: var(--color-ink);
}

/* Neutral: nobody's. A word that belongs to no one, an item's kind or what a change did: a light grey
   fill and no rim (17 Oct 2026, the polish round; the artboards' `.open`). */
.chip-neutral {
  background: var(--color-chip-neutral);
  border-color: var(--color-chip-neutral);
  color: var(--color-ink);
}

/* The dot: theirs to answer, and nothing else (dot.rs). Round is a person's act; blue is the
   customer's. */
.dot {
  display: inline-block;
  flex: none;
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  background: var(--color-answer);
  vertical-align: middle;
}

/* What came from the customer (dot.rs, THEIRS): blue for as long as it shows, bold while new. Never
   underlined unless it is a link, and a link keeps its underline, so blue words do not read as
   links. */
.theirs {
  color: var(--color-answer);
}

.theirs-new {
  font-weight: var(--weight-strong);
}

/* The diamond (diamond.rs): a change put to you. A square turned 45°, filled in its tone, or hollow
   with a rim of it. Ready is the ink; a proposal its colour; your own staged change the ink, hollow. */
.diamond {
  display: inline-block;
  flex: none;
  width: var(--diamond-size);
  height: var(--diamond-size);
  background: currentColor;
  border: var(--hairline) solid currentColor;
  transform: rotate(45deg);
  vertical-align: middle;
}

.diamond.diamond-hollow {
  background: transparent;
}

.diamond.diamond-large {
  width: var(--diamond-size-line);
  height: var(--diamond-size-line);
}

.diamond-words {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* Each tone also names its colour as `--tone`, for a rule that fills or rims with it where the
   words on it are another colour (the tray's chosen tab). */
.tone-ink {
  --tone: var(--color-ink);
  color: var(--color-ink);
}

.tone-proposal-1 {
  --tone: var(--color-proposal-1);
  color: var(--color-proposal-1);
}

.tone-proposal-2 {
  --tone: var(--color-proposal-2);
  color: var(--color-proposal-2);
}

.tone-proposal-3 {
  --tone: var(--color-proposal-3);
  color: var(--color-proposal-3);
}

.tone-proposal-4 {
  --tone: var(--color-proposal-4);
  color: var(--color-proposal-4);
}

.tone-proposal-5 {
  --tone: var(--color-proposal-5);
  color: var(--color-proposal-5);
}

.tone-proposal-6 {
  --tone: var(--color-proposal-6);
  color: var(--color-proposal-6);
}

.tone-proposal-7 {
  --tone: var(--color-proposal-7);
  color: var(--color-proposal-7);
}

.tone-proposal-8 {
  --tone: var(--color-proposal-8);
  color: var(--color-proposal-8);
}

/* An agent's chip in a proposal's colour, on its own order (agent_mark.rs): its rim and its word
   take the tone the span carries; its name beside it does too (`.proposer`). */
.agent-mark-toned .chip {
  border-color: currentColor;
  color: inherit;
}

/* Who proposed something, on its order (agent_mark.rs, Proposer): the diamond, the name and the chip,
   all in the proposal's colour. */
.proposer {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.proposer-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A change where it would land (diamond.rs, ChangePart): yours on the staged ground with the hollow
   diamond; a proposal's on its colour's wash. */
.change-part {
  display: inline-flex;
  justify-self: start;
  align-self: center;
  width: fit-content;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-2);
  border-radius: var(--radius-chip);
  /* Its own leading, so its ground hugs its words where it sits in a ruled row (Details' fields
     take the row's pitch as their line height, which drew the ground the row's full height). */
  line-height: var(--leading-lead);
}

.change-part-own {
  background: var(--color-staged-ground);
  color: var(--color-ink);
}

.change-part-proposal {
  background: color-mix(in oklab, currentColor var(--proposal-wash), transparent);
}

/* A proposal's part while its drawer is not the one chosen: a ghost, on another layer. */
.change-part-ghost {
  background: transparent;
  opacity: var(--proposal-ghost);
}
