/* "Keep this on Reports" under a finished answer (2026-10-04). Tokens only. */
.ffo-keep { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 4px; }
.ffo-keep__btn {
  border: 1px solid var(--pill-border); background: var(--pill-translucent); color: var(--text-secondary);
  font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: var(--radius-pill); cursor: pointer;
}
.ffo-keep__btn--keep { border-color: var(--amber-border-hover); color: var(--text-primary); }
.ffo-keep__btn:disabled { opacity: 0.55; cursor: progress; }
.ffo-keep__done { margin: 0; font-size: 12.5px; color: var(--sage-text); }
.ffo-keep__fail { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--amber-text); }
/* Attachments — the composer rail, the chips, the drop state and the
 * thumbnails on a sent turn. Everything here is one tier quieter than the
 * thing it sits next to: the rail is quieter than the composer, a chip is
 * quieter than the turn it hangs off. */

/* The rail takes over the composer's job of pinning the pair to the bottom of
 * the panel — it is now the first of the two, and `margin-top: auto` has to
 * live on whichever comes first or the thread stops filling the space. */
.ffo-attach {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 26px;
}

/* …and the composer, now that something sits directly above it, closes the
 * gap rather than adding its own 30px on top of the rail's. */
.ffo-convo .ffo-attach + .ffo-convo__composer {
  margin-top: 0;
  padding-top: 12px;
}

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

/* One chip plus, when there is one, its refusal sentence beneath it. A chip
 * carrying a reason takes the full rail width so the sentence has somewhere to
 * go; a healthy chip stays inline with its neighbours. */
.ffo-attach__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}
.ffo-attach__item--blocked,
.ffo-attach__item--error {
  flex: 1 1 100%;
}

.ffo-attach__reason {
  padding-left: 2px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--severe);
}

/* The chip. Hairline border, translucent fill — the same recipe as the
 * `[About: …]` scope chip, because they are the same kind of object: a small
 * removable thing the founder has put on this message. */
.ffo-attach__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 9px 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: var(--pill-translucent);
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--text-nav);
}

.ffo-attach__chip-mark {
  display: flex;
  flex: none;
  color: var(--text-faint);
}

.ffo-attach__chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.ffo-attach__chip-meta {
  flex: none;
  color: var(--text-faint);
  font-size: 11.5px;
}

.ffo-attach__chip-x {
  display: flex;
  flex: none;
  padding: 2px;
  margin-right: -2px;
  color: var(--text-gated);
  cursor: pointer;
  transition: color var(--motion-hover) ease;
}
.ffo-attach__chip-x:hover {
  color: var(--text-secondary);
}

/* Refused before it ever left the browser, or a failed upload waiting to be
 * retried. The reason takes the place of the size — the chip says what is
 * wrong with it, in the agent's own words, on the chip itself. */
.ffo-attach__chip--blocked,
.ffo-attach__chip--error {
  border-color: rgba(180, 67, 47, 0.28);
  color: var(--text-muted);
  align-self: flex-start;
}
.ffo-attach__chip--blocked .ffo-attach__chip-mark,
.ffo-attach__chip--error .ffo-attach__chip-mark {
  color: var(--severe);
}

.ffo-attach__chip--uploading .ffo-attach__chip-meta {
  font-style: italic;
}

/* Per-chip progress. Indeterminate on purpose: a multipart POST reports no
 * usable per-file progress, and a bar that invented one would be a lie about
 * something the browser genuinely does not know. */
.ffo-attach__spinner {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--hairline);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: ffo-attach-spin 0.7s linear infinite;
}
@keyframes ffo-attach-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ffo-attach__spinner {
    animation: none;
    border-top-color: var(--text-faint);
  }
}

/* The affordance itself — a text link at the panel's quietest readable tier. */
.ffo-attach__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.ffo-attach__add {
  flex: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-faint);
  cursor: pointer;
  transition: color var(--motion-hover) ease;
}
.ffo-attach__add:hover:not(:disabled) {
  color: var(--text-secondary);
}
.ffo-attach__add:disabled {
  opacity: 0.5;
  cursor: default;
}

/* The honest line after a drop that couldn't take everything. Click to
 * dismiss — it is a notice, not a state. */
.ffo-attach__note {
  min-width: 0;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: left;
  color: var(--severe);
  cursor: pointer;
}

/* --- The drop state -----------------------------------------------------
 * A drag over the open panel warms the whole surface rather than drawing a
 * dashed rectangle: the panel IS the target, so the panel is what responds.
 * The frost stays; only an amber wash and the border move. */

.ffo-panel.ffo-convo[data-dragover]::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  background: rgba(224, 168, 120, 0.1);
  box-shadow: inset 0 0 0 1.5px rgba(224, 168, 120, 0.5);
}

.ffo-convo__droplabel {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  /* Under the panel head, not above the composer: the rail's height changes
     with the number of chips, and a caption pinned to the bottom lands on top
     of the composer the moment there are two rows of them. */
  top: 56px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  font-size: 12.5px;
  color: var(--amber-text);
}

/* --- On a sent turn ----------------------------------------------------- */

.ffo-attach__sent {
  display: flex;
  flex-wrap: wrap;
  /* Without this a chip beside a 92px thumbnail stretches to its height and
     stops looking like a chip. */
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  max-width: 300px;
}

.ffo-attach__thumb {
  display: block;
  border-radius: var(--radius-message);
  overflow: hidden;
  border: 1px solid var(--hairline);
  line-height: 0;
}

.ffo-attach__thumb img {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: cover;
}
/* Markdown inside an agent reply, styled to the V2 design system rather than
 * to react-markdown's (nonexistent) defaults.
 *
 * Two rules run through all of it:
 *   * This is a CHAT PANEL, not a document. The whole product lives between
 *     10.5px and 22px and hierarchy comes from SPACING, not size — so h1 tops
 *     out at 17px and h3 is barely larger than body. A reply that shouted
 *     would break the panel's voice.
 *   * Anything that can be wide — a code block, a table — scrolls INSIDE its
 *     own box. Nothing in a reply may widen the panel.
 *
 * The code surface is defined locally rather than in styles/tokens.css: it is
 * used by exactly this file, and a shared token would be a shared-file edit
 * for one consumer. Both themes are declared here, in the same order the
 * token table declares them.
 */

.ffo-md {
  /* Markdown only renders inside light surfaces (reply cards, panels), in both
   * modes, so the code ground is ink-on-card, one definition. */
  --ffo-md-code-bg: color-mix(in srgb, var(--text-primary) 6%, transparent);
  --ffo-md-code-border: var(--hairline);
  --ffo-md-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  font-size: 14px;
  line-height: 1.65;
  color: var(--text-body);
  /* A fenced block is `min-width: max-content` by nature; without this the
   * flex/grid parent would let it push the reply card past the panel. */
  min-width: 0;
}

/* The error-boundary fallback: the reply's own text, unformatted but whole. */
.ffo-md--raw {
  white-space: pre-wrap;
}

/* --- Block rhythm -------------------------------------------------------
 * Hierarchy by spacing. One margin rule, then first/last collapsed so a card
 * never carries dead space at either end. */

.ffo-md > :first-child {
  margin-top: 0;
}
.ffo-md > :last-child {
  margin-bottom: 0;
}

.ffo-md p {
  margin: 0 0 12px;
}
.ffo-md p:last-child {
  margin-bottom: 0;
}

.ffo-md strong,
.ffo-md b {
  /* 500 is the heaviest weight in the product — there is no 600/700. */
  font-weight: 500;
  color: var(--text-primary);
}

.ffo-md em,
.ffo-md i {
  font-style: italic;
}

.ffo-md del {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* --- Headings, mapped DOWN into the panel's scale ------------------------ */

.ffo-md h1,
.ffo-md h2,
.ffo-md h3,
.ffo-md h4,
.ffo-md h5,
.ffo-md h6 {
  margin: 22px 0 9px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.ffo-md h1 {
  font-size: 17px;
}
.ffo-md h2 {
  font-size: 15.5px;
}
.ffo-md h3 {
  font-size: 14.5px;
}

/* h4–h6 stop being sizes and become labels — the only honest way to render a
 * sixth level in a scale this shallow. */
.ffo-md h4,
.ffo-md h5,
.ffo-md h6 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --- Lists --------------------------------------------------------------- */

.ffo-md ul,
.ffo-md ol {
  margin: 10px 0 14px;
  padding-left: 22px;
}

.ffo-md li {
  margin: 0 0 6px;
}
.ffo-md li:last-child {
  margin-bottom: 0;
}

.ffo-md li::marker {
  color: var(--text-faint);
}

/* Nested lists tighten rather than repeat the full block rhythm. */
.ffo-md li > ul,
.ffo-md li > ol {
  margin: 6px 0 0;
}

.ffo-md li > p {
  margin: 0 0 6px;
}

/* GFM task lists. */
.ffo-md li input[type='checkbox'] {
  margin-right: 8px;
  accent-color: var(--amber);
}
.ffo-md li:has(> input[type='checkbox']) {
  list-style: none;
  margin-left: -22px;
}

/* --- Code ---------------------------------------------------------------- */

.ffo-md code {
  font-family: var(--ffo-md-mono);
  font-size: 12.5px;
  padding: 1.5px 5px;
  border-radius: 5px;
  background: var(--ffo-md-code-bg);
  border: 1px solid var(--ffo-md-code-border);
  color: var(--text-primary);
}

.ffo-md pre {
  margin: 12px 0 14px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--ffo-md-code-bg);
  border: 1px solid var(--ffo-md-code-border);
  /* Long lines scroll inside the block. They never widen the panel, and they
   * are never wrapped either — a wrapped code line reads as a syntax error.
   * Scrollbar styling is the app-wide base rule in styles/base.css. */
  overflow-x: auto;
  max-width: 100%;
}

.ffo-md pre code {
  display: block;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-body);
  white-space: pre;
}

/* --- Quotes and rules ---------------------------------------------------- */

.ffo-md blockquote {
  margin: 12px 0 14px;
  padding: 1px 0 1px 15px;
  border-left: 2px solid var(--hairline);
  color: var(--text-muted);
}

.ffo-md hr {
  margin: 20px 0;
  height: 0;
  border: none;
  border-top: 1px solid var(--hairline);
}

/* --- Tables -------------------------------------------------------------- */

.ffo-md__scroll {
  margin: 12px 0 14px;
  overflow-x: auto;
  max-width: 100%;
  /* Scrollbar styling is the app-wide base rule in styles/base.css. */
}

.ffo-md table {
  border-collapse: collapse;
  /* max-content, so a wide table scrolls in the wrapper rather than crushing
   * its own columns. */
  width: max-content;
  min-width: 100%;
  font-size: 13px;
}

.ffo-md th,
.ffo-md td {
  padding: 8px 14px 8px 0;
  text-align: left;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
  white-space: nowrap;
}

.ffo-md th {
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
  border-bottom-color: var(--hairline);
}

.ffo-md tr:last-child td {
  border-bottom: none;
}

/* --- Links and media ----------------------------------------------------- */

.ffo-md a {
  color: var(--amber-text);
  text-decoration: underline;
  text-decoration-color: var(--amber-border-hover);
  text-underline-offset: 2px;
  transition: text-decoration-color var(--motion-hover) ease;
}
.ffo-md a:hover {
  text-decoration-color: var(--amber);
}

.ffo-md img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Webkit scrollbars, matching the thread's own hairline treatment. */
.ffo-md pre::-webkit-scrollbar,
.ffo-md__scroll::-webkit-scrollbar {
  height: 5px;
}
.ffo-md pre::-webkit-scrollbar-thumb,
.ffo-md__scroll::-webkit-scrollbar-thumb {
  background: var(--hairline);
  border-radius: 3px;
}
.ffo-md pre::-webkit-scrollbar-track,
.ffo-md__scroll::-webkit-scrollbar-track {
  background: transparent;
}
.ffo-working-glyph {
  display: inline-block;
  width: 1.2em;
  text-align: center;
  color: var(--text-secondary);
}
@media (prefers-reduced-motion: no-preference) {
  .ffo-working-glyph {
    animation: ffo-working-spin 1.6s linear infinite;
  }
}
@keyframes ffo-working-spin {
  to {
    transform: rotate(360deg);
  }
}
.ffo-helper {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 10px 12px;
  margin: 8px 0;
}
.ffo-helper__head {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  cursor: pointer;
}
.ffo-helper__head:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 6px;
}
.ffo-helper__glyph {
  display: inline-block;
  width: 1.2em;
  text-align: center;
  color: var(--text-secondary);
}
.ffo-helper__title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ffo-helper__word,
.ffo-helper__time {
  font-size: 12px;
  color: var(--text-secondary);
}
.ffo-helper__time {
  font-variant-numeric: tabular-nums;
}
.ffo-helper__line {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}
/* The status word is always printed; colour only reinforces it. */
.ffo-helper[data-status='failed'] .ffo-helper__glyph,
.ffo-helper[data-status='failed'] .ffo-helper__word,
.ffo-helper[data-status='timed_out'] .ffo-helper__glyph,
.ffo-helper[data-status='timed_out'] .ffo-helper__word {
  color: var(--severe);
}
.ffo-helper[data-status='done'] .ffo-helper__glyph {
  color: var(--amber-text);
}
/* The working glyph and its spin live in WorkingGlyph.css, shared with the
   agent's own working row. */
.ffo-helper__steps {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--text-primary);
}
.ffo-helper__steps ol {
  margin: 0 0 8px;
  padding-left: 18px;
}
.ffo-helper__at {
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
.ffo-helper__muted {
  color: var(--text-secondary);
}
.ffo-helper__error {
  margin: 8px 0 0;
  white-space: pre-wrap;
  color: var(--severe);
  font-size: 12px;
}
.ffo-sessions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ffo-sessions__trigger,
.ffo-sessions__name,
.ffo-sessions__more {
  font: inherit;
  color: var(--text-primary);
  background: none;
  border: 0;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 8px;
}
.ffo-sessions__trigger:focus-visible,
.ffo-sessions__name:focus-visible,
.ffo-sessions__more:focus-visible,
.ffo-sessions__item:focus-visible,
.ffo-sessions__new:focus-visible,
.ffo-sessions__actions button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}
.ffo-sessions__name {
  font-size: 13px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* An attached thread (an onboarding step, a Tasks thread): named, not renamable. */
.ffo-sessions__name[data-attached] {
  cursor: default;
}
.ffo-sessions__back {
  display: block;
  width: 100%;
  margin-bottom: 4px;
  padding: 10px 8px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--amber-text);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
}
.ffo-sessions__back:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}
.ffo-sessions__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  width: 320px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 6px;
  /* A light popover (data-surface="card" in SessionMenu.tsx): opaque, no blur. */
  background: var(--card-bg);
  border: 1px solid var(--card-edge);
  box-shadow: var(--float-shadow);
  border-radius: var(--radius-card);
}
.ffo-sessions--voice .ffo-sessions__menu {
  max-width: calc(100vw - 32px);
}
.ffo-sessions__row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 40px;
}
.ffo-sessions__row[data-current] {
  background: var(--band);
  border-radius: 10px;
}
.ffo-sessions__item {
  all: unset;
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 8px;
  min-height: 40px;
  padding: 0 8px;
  cursor: pointer;
}
.ffo-sessions__label {
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ffo-sessions__meta {
  grid-column: 1;
  font-size: 11px;
  color: var(--text-secondary);
}
.ffo-sessions__dot {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}
.ffo-sessions__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* Inline, on its own line under the row — the menu scrolls (overflow-y: auto),
 * so an absolutely positioned popover on the last row was clipped. */
.ffo-sessions__actions {
  flex: 0 0 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  gap: 4px;
  margin: 2px 0 4px;
  padding: 4px;
  background: var(--band);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}
.ffo-sessions__actions button {
  font: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--text-primary);
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
}
.ffo-sessions__rename {
  flex: 1;
  padding: 4px 8px;
}
.ffo-sessions__field {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 6px 8px;
}
.ffo-sessions__error {
  margin-top: 4px;
  font-size: 12px;
  color: var(--severe);
}
.ffo-sessions__note {
  padding: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.ffo-sessions__note[data-tone='warn'] {
  color: var(--severe);
}
.ffo-sessions__new {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 8px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--amber-text);
  background: none;
  border: 0;
  border-top: 1px solid var(--hairline);
  cursor: pointer;
}
/* The panel header's New session control. Quiet by default (the header's own
   close X is the same faint tier), amber only for the keyboard focus ring. */
.ffo-newsession {
  position: relative;
  display: inline-flex;
}
.ffo-newsession__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition:
    color var(--motion-hover) ease,
    border-color var(--motion-hover) ease;
}
.ffo-newsession__button:hover:not(:disabled) {
  color: var(--text-primary);
}
.ffo-newsession__button:disabled {
  opacity: 0.6;
  cursor: default;
}
.ffo-newsession__button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
/* The failure, in words, under the button: the adapter's own line where it
   gave one. Right-aligned to the button so it stays inside the panel. */
.ffo-newsession__error {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: max-content;
  max-width: min(260px, calc(100vw - 32px));
  padding: 8px 6px 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--severe);
  background: var(--overlay-bg-panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}
/* It floats over the thread, so it can always be put away (review M5). */
.ffo-newsession__dismiss {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: -4px 0;
  padding: 0;
  color: var(--text-secondary);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.ffo-newsession__dismiss:hover {
  color: var(--text-primary);
}
.ffo-newsession__dismiss:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}
.ffo-stop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ffo-stop__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.ffo-stop__button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.ffo-stop__note {
  font-size: 12px;
  color: var(--severe);
}
.ffo-working-slot:not([data-active]) {
  /* A flex gap would leave a hole where nothing is shown. */
  margin-top: calc(-1 * var(--ffo-working-gap, 0px));
}
.ffo-working {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 2px;
  font-size: 13px;
  color: var(--text-secondary);
}
/* The announcement: heard, never seen (the row is the visible half). */
.ffo-working__live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* Files from the agent, under its reply (ffos 2.4.8). One tier quieter than
 * the reply they hang off, and tokens only — so light, dark and the voice
 * split all inherit them. Everything is width-bound to its container: the
 * 390px phone, the 468px panel, and the panel dragged to full screen. */

.ffo-files {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  max-width: 100%;
  min-width: 0;
}

.ffo-files__item {
  min-width: 0;
  max-width: 100%;
}

.ffo-files__media {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(100%, 520px);
  min-width: 0;
}

.ffo-files__image-link {
  display: block;
  align-self: flex-start;
  max-width: 100%;
  line-height: 0;
  border-radius: var(--radius-message);
  overflow: hidden;
  border: 1px solid var(--hairline);
}

.ffo-files__image-link img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  height: auto;
  object-fit: contain;
}

.ffo-files__media video {
  display: block;
  width: 100%;
  max-height: 360px;
  border-radius: var(--radius-message);
  border: 1px solid var(--hairline);
  background: var(--card-bg);
}

.ffo-files__media audio {
  display: block;
  width: 100%;
  min-width: 0;
}

.ffo-files__caption {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--text-nav);
}

.ffo-files__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.ffo-files__meta {
  flex: none;
  font-size: 11.5px;
  color: var(--text-faint);
}

.ffo-files__link {
  flex: none;
  margin-left: auto;
  color: var(--amber-text);
  text-decoration: underline;
  text-decoration-color: var(--amber-border-hover);
  text-underline-offset: 2px;
  transition: text-decoration-color var(--motion-hover) ease;
}
.ffo-files__link:hover {
  text-decoration-color: var(--amber);
}

.ffo-files__card {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(100%, 420px);
  min-width: 0;
  padding: 10px 10px 10px 12px;
  border-radius: var(--radius-message);
  border: 1px solid var(--hairline);
  background: var(--pill-translucent);
}

/* A file that could not be attached: the same card, one tier quieter, and
 * nothing in it to press. */
.ffo-files__card--unavailable {
  background: transparent;
  border-style: dashed;
}
.ffo-files__card--unavailable .ffo-files__card-text {
  color: var(--text-muted);
}

.ffo-files__glyph {
  display: flex;
  flex: none;
  color: var(--text-faint);
}

.ffo-files__card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--text-primary);
}

.ffo-files__button {
  flex: none;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--amber-border-hover);
  background: var(--amber-chip);
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--amber-text-strong);
  text-decoration: none;
  transition: border-color var(--motion-hover) ease;
}
.ffo-files__button:hover {
  border-color: var(--amber);
}

.ffo-files__too-large {
  flex: none;
  font-size: 11.5px;
  color: var(--text-muted);
}

.ffo-files__link:focus-visible,
.ffo-files__button:focus-visible,
.ffo-files__image-link:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
/* --- Card: the frosted surface every list sits on ----------------------- */

.ffo-card {
  border-radius: var(--radius-card);
  background: var(--card-bg);
  /* Opaque: glass is gone for cards (Evening Desk). */
  border: 1px solid var(--card-edge);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition:
    transform var(--motion-lift) var(--ease-overlay),
    box-shadow var(--motion-lift) var(--ease-overlay),
    border-color var(--motion-lift) var(--ease-overlay),
    background-color var(--motion-lift) var(--ease-overlay);
}

/* --- Card hover: a small, neutral lift (Jay, 2026-10-14) -----------------
 *
 * "Over a number or a card, highlight and pop up just subtly, to give the
 * dashboard a bit of life." So: 2px up, a deeper and softer shadow, and the
 * surface a shade brighter. Colours are tokens (tokens.css) and NEUTRAL —
 * amber is signal, and a cursor passing over a card is not one.
 *
 * THE HOVER TARGET IS NOT THE CARD. `.ffo-card-hit` wraps every `Card`, stays
 * where it is, and is what `:hover` is asked of; the card inside it is what
 * moves. If the card were its own target, a cursor resting on its bottom 2px
 * would lose the hover the instant the card rose out from under it, the card
 * would fall back, regain the hover, and strobe on that edge. The usual fix —
 * a transparent ::after that reaches down past the edge — cannot work here:
 * `.ffo-card` is `overflow: hidden` (row hover fills bleed to its rounded
 * edge and are clipped by it), and that clips the pseudo-element's hit area
 * too. A static parent sidesteps the whole thing. It carries no styling of
 * its own, so layout is untouched: a plain block, and the card's own margins
 * still collapse through it.
 *
 * Transform only (no scale: it would soften the type and the frosted
 * backdrop). The shadow/border/background changes are paint rather than
 * composite, which the "transform and opacity" rule in tokens.css warns
 * about; they are on ONE surface at a time under a pointer, not an overlay
 * entering over a fetch, and that is the whole of the cost.
 *
 * Gated twice. `(hover: hover) and (pointer: fine)` keeps touch (and the
 * bottom sheets at <=840px) from ever sticking a hover state after a tap.
 * `no-preference` keeps the TRANSFORM off for reduced-motion viewers — the
 * global rule in base.css already zeroes the transition, but a snap to
 * translateY(-2px) is still movement, so it is simply not applied; the
 * colour change stays, as a highlight is not motion.
 *
 * Not a card, so not lifted: rows inside a card (they have their own tint
 * tier), the ambient header (its numbers lift instead), the conversation
 * panel, sheets, the palette and nav. There are no cards inside cards today
 * (checked); if one appears, give the OUTER one a no-lift class rather than
 * letting both rise at once. */
@media (hover: hover) and (pointer: fine) {
  .ffo-card-hit:hover > .ffo-card {
    background-color: var(--card-bg-lift);
    border-color: var(--card-border-lift);
    box-shadow: var(--card-shadow-lift);
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ffo-card-hit:hover > .ffo-card {
    transform: translateY(var(--lift-y));
  }
}

/* --- Card entrance: the wrapper rises, the card inside it fades ----------
 *
 * Why two elements carry one entrance (Jay, 2026-10-14: "fade in and rise ~8px
 * one after another"; src/entrance.tsx decides the order).
 *
 * THE RISE IS ON THE WRAPPER because the hover lift is a `transform` on
 * `.ffo-card`, and two transforms on one element cannot both win. The wrapper
 * has no other transform, so the two never meet: the card is free to lift
 * under the cursor the moment the entrance ends — and `backwards` fill (not
 * `forwards`) means the entrance lets go of the wrapper the instant it ends,
 * so nothing is left pinned either.
 *
 * THE FADE IS ON THE CARD, not the wrapper, and this one is not stylistic.
 * `.ffo-card` carries a `backdrop-filter`. An ancestor with `opacity < 1`
 * becomes the "backdrop root" and the blur can then only see what is inside
 * that ancestor — nothing, here — so for the length of the fade the card
 * would paint with no frosted glass and snap to blurred the frame the opacity
 * reached 1. Fading the element that owns the backdrop-filter fades the
 * filtered result with it, which is the version that composites. (Same reason
 * VoiceMode fades a pre-blurred layer rather than the blur.) Opacity is not
 * among the properties the card's hover transition touches, so that stays
 * clear too.
 *
 * Both run on the same delay (`--ffo-enter-i` inherits from the wrapper), so
 * they read as one motion. */
.ffo-enter-card {
  animation: ffo-rise var(--motion-in) var(--ease-overlay) backwards;
  animation-delay: calc(var(--ffo-enter-i, 0) * var(--motion-enter-step));
}
.ffo-enter-card > .ffo-card {
  animation: ffo-fade var(--motion-in) var(--ease-overlay) backwards;
  animation-delay: calc(var(--ffo-enter-i, 0) * var(--motion-enter-step));
}

/* --- Dot: severity / status, with the concentric pulse ------------------ */

.ffo-dot {
  position: relative;
  flex: none;
  border-radius: 50%;
  display: inline-block;
}

.ffo-dot--pending {
  background: var(--amber);
}
.ffo-dot--severe {
  background: var(--severe);
}
.ffo-dot--neutral {
  background: var(--dot-neutral);
}

/* The pulse is a ring drawn OUTSIDE the dot, so the dot itself never moves.
 * `prefers-reduced-motion` kills the animation in base.css, leaving a static
 * dot — which is exactly what the spec asks for. */
.ffo-dot--pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ffo-pulse 2.8s ease-out infinite;
  pointer-events: none;
}

/* --- Pill: the only button shape in the product ------------------------- */

.ffo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background var(--motion-hover) ease,
    border-color var(--motion-hover) ease,
    color var(--motion-hover) ease,
    scale var(--motion-hover) var(--ease-overlay);
}

.ffo-pill--primary {
  padding: 12px 24px;
  background: var(--button-primary-bg);
  color: var(--button-primary-fg);
  border: 1px solid transparent;
}
.ffo-pill--primary:hover {
  background: var(--button-primary-hover);
}

.ffo-pill--secondary {
  padding: 12px 24px;
  background: var(--pill-translucent);
  border: 1px solid var(--pill-border);
  color: var(--text-secondary);
}
/* Amber on hover — the accent as emphasis, never as the resting fill. */
.ffo-pill--secondary:hover {
  border-color: var(--amber-border-hover);
  color: var(--amber-text-strong);
}

/* The in-row action: smaller, 12.5px, sits inside the 26px row padding. */
.ffo-pill--row {
  padding: 8px 17px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: var(--text-secondary);
  font-size: 12.5px;
}
.ffo-pill--row:hover {
  border-color: var(--amber-border-hover);
  color: var(--amber-text-strong);
}

.ffo-pill[disabled] {
  cursor: default;
  opacity: 0.55;
}

/* --- Press: the thing under your finger gives a little ---------------------
 *
 * (Jay, 2026-10-14.) Clickable cards, clickable number tiles and primary
 * buttons shrink to --press-scale while held and spring back on release. ONE
 * list, here, so the set is legible and the next primary button has an obvious
 * place to be added; each member also carries `scale ... --motion-hover` in its
 * OWN transition list (a shared rule here could not append to them, and a
 * transition that is missing is a press that snaps back instead of springing).
 *
 * `scale`, the individual property, and not `transform: scale()`. The tiles
 * already move on `transform` (the hover lift, 2px up): writing a second
 * transform for the press would have to restate the translate or erase it, and
 * the two would have to be kept in step in every file. `scale` composes with
 * `transform` for free, so lifting and pressing are independent, and a tile
 * that is both hovered and pressed is simply lifted and smaller.
 *
 * `:active` is the browser's own press state — set on pointer-down, cleared on
 * pointer-up or when the gesture is cancelled (a touch that turns into a
 * scroll, a drag off the element). There is no JS and no hover in it, so
 * unlike :hover it cannot stick on a touch screen; `touch-action:
 * manipulation` drops the double-tap-zoom wait that otherwise keeps a tap
 * looking pressed for a few hundred ms on older mobile browsers.
 *
 * NOT in the list, deliberately: ⌘K palette items, nav items, text inputs
 * (they are surfaces you type into or move through, not things you press), and
 * the board's deal cards (draggable; a shrink on mouse-down would be in the
 * drag image, and they carry their own lift and menu). A disabled button does
 * not press. Reduced motion: the global rule below zeroes the transition, but a
 * snap to 0.98 is still movement, so the scale is simply not applied. */
@media (prefers-reduced-motion: no-preference) {
  .ffo-pill--primary:active:not(:disabled),
  .login__submit:active:not(:disabled),
  .ffo-brain__pill:active:not(:disabled),
  .ffo-convo__signoff-pill--primary:active:not(:disabled),
  .ffo-convo__ask:active:not(:disabled),
  .ffo-vsplit__send:active:not(:disabled),
  .ffo-update__btn:active:not(:disabled),
  .ffo-summary__pair--door:active,
  .ffos-layout__tile:active {
    scale: var(--press-scale);
  }
}
.ffo-pill--primary,
.login__submit,
.ffo-brain__pill,
.ffo-convo__signoff-pill--primary,
.ffo-convo__ask,
.ffo-vsplit__send,
.ffo-update__btn,
.ffo-summary__pair--door,
.ffos-layout__tile {
  touch-action: manipulation;
}

/* --- Row: the grammar every list in the product uses -------------------- */

.ffo-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 30px;
  width: 100%;
  text-align: left;
  transition: background var(--motion-hover) ease;
}

.ffo-row--clickable {
  cursor: pointer;
}
.ffo-row--clickable:hover {
  background: var(--row-hover);
}
.ffo-row--selected,
.ffo-row--selected:hover {
  background: var(--row-selected);
}

/* Clause 2. Fixed width is the ONLY alignment device in the product — it must
 * never grow a column header above it. */
.ffo-row__name {
  width: var(--width-name);
  flex: none;
  /* Names: 15px/600 (Evening Desk). */
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.ffo-row__name--wide {
  width: var(--width-name-wide);
}
.ffo-row__name--title {
  width: var(--width-name-title);
}

/* Clause 3. Plain English, lowercase, em-dash joined. */
.ffo-row__reason {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* Clause 4. */
.ffo-row__value {
  flex: none;
  font-size: 14px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Mobile (≤840px): the row grammar stacks. Line 1 is dot + name (+ value,
 * inline, per the handoff's "Sales rows put the value inline on the name
 * row"). Line 2 is the reason, indented 19px to sit under the name (7px dot
 * + 12px gap). A real pill action (Today's Follow up / Content's Review /
 * Operations' Choose — always the row's LAST child when present) drops to
 * its own full-width centred line; a hover-only text link action (Sales'
 * Discuss, Content's Pull back) keeps its own screen-owned `order` so it
 * lands after the reason without being forced full-width. `flex-wrap` plus
 * explicit `order` reproduces the artboards' column layout without
 * restructuring the flat dot/name/reason/value/action sibling markup every
 * screen already renders through <Row>. */
@media (max-width: 840px) {
  .ffo-row {
    flex-wrap: wrap;
    row-gap: 10px;
    column-gap: 12px;
    padding: 20px 22px;
  }
  .ffo-row__name {
    order: 1;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }
  .ffo-row__value {
    order: 2;
  }
  .ffo-row__reason {
    order: 3;
    flex: 0 0 100%;
    padding-left: 19px;
  }
  /* A Pill (variant="row") used as the row's action — never a hover-only
   * text link, which keeps its own ordering in its screen's stylesheet. */
  .ffo-row > .ffo-pill--row {
    order: 4;
    flex: 0 0 100%;
    width: 100%;
    padding: 12px 0;
    text-align: center;
  }
}

/* Inside a side panel (`.ffo-panel`, `--width-panel` = 468px, fixed
 * regardless of viewport) the desktop row grammar doesn't fit: a `wideName`
 * row's 220px name column plus gaps and the panel's own padding leaves the
 * reason column ~50px wide, so it wraps one word per line
 * (FollowUpsPanel.tsx's rows, 2026-09-29). The panel's own width IS the
 * mobile case, so this reuses the mobile stacking rules above verbatim —
 * name-over-reason, indented 19px — rather than inventing a second layout,
 * just scoped to `.ffo-panel` instead of gated on viewport width. Scoping to
 * `.ffo-panel` alone means only rows rendered inside a side panel stack; the
 * unscoped `.ffo-row` rules above (Today, Sales, Content's own lists, none of
 * which mount inside `.ffo-panel`) are untouched at every width. */
.ffo-panel .ffo-row {
  flex-wrap: wrap;
  row-gap: 10px;
  column-gap: 12px;
}
.ffo-panel .ffo-row__name {
  order: 1;
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}
.ffo-panel .ffo-row__value {
  order: 2;
}
.ffo-panel .ffo-row__reason {
  order: 3;
  flex: 0 0 100%;
  padding-left: 19px;
}
.ffo-panel .ffo-row > .ffo-pill--row {
  order: 4;
  flex: 0 0 100%;
  width: 100%;
  padding: 12px 0;
  text-align: center;
}

/* Hairline dividers are inset — never full-bleed. */
.ffo-divider {
  height: 1px;
  background: var(--divider);
  margin: 0 30px;
}

/* --- SectionLabel ------------------------------------------------------- */

.ffo-section-label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --- Scrim -------------------------------------------------------------- */

.ffo-scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(var(--scrim-blur));
  -webkit-backdrop-filter: blur(var(--scrim-blur));
  border: none;
  cursor: default;
  /* Was `200ms ease` — a duration and an easing that belonged to nothing else
   * in the product. The scrim lifts WITH the surface it sits under, so it has
   * to be on the same clock and the same curve as everything else. */
  animation: ffo-fade var(--motion-in) var(--ease-overlay);
  z-index: 40;
}

/* Exit: the mirror fade, on the exit clock, so the scrim clears in step with
 * the panel rather than lingering behind it. Its own keyframes — see
 * styles/base.css for why a reversed entrance never plays. */
.ffo-scrim[data-closing] {
  animation: ffo-fade-out var(--motion-out) var(--ease-overlay) forwards;
  pointer-events: none;
}
/* --- The inline sign-off card ------------------------------------------- */

.ffo-convo__signoff {
  border-radius: var(--radius-message);
  background: var(--signoff-bg);
  border: 1px solid var(--signoff-border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ffo-convo__signoff-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-text-strong);
}

.ffo-convo__signoff-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
}

.ffo-convo__signoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 2px;
}

.ffo-convo__signoff-pill {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  background: var(--pill-translucent);
  border: 1px solid var(--pill-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background var(--motion-hover) ease,
    border-color var(--motion-hover) ease,
    color var(--motion-hover) ease,
    scale var(--motion-hover) var(--ease-overlay);
}
.ffo-convo__signoff-pill:hover {
  border-color: rgba(224, 168, 120, 0.45);
  color: var(--amber-text);
}

.ffo-convo__signoff-pill--primary {
  background: var(--button-primary-bg);
  border-color: transparent;
  color: var(--button-primary-fg);
}
.ffo-convo__signoff-pill--primary:hover {
  background: var(--button-primary-hover);
  border-color: transparent;
  color: var(--button-primary-fg);
}
/* States B/C — the conversation inside the standard 468px panel. The panel
 * geometry itself comes from SidePanel.css's `.ffo-panel`; everything here is
 * the thread grammar layered on top. */

.ffo-convo {
  padding-bottom: 34px;
}

/* --- Resizable width ----------------------------------------------------
 * Jay, 2026-08-26: "I should be able to drag it across the full screen or
 * anywhere in between."
 *
 * SidePanel.css owns `.ffo-panel { width: var(--width-panel) }` and is shared
 * with the contact drill-in, so the override is done from the conversation's
 * OWN class at higher specificity (`.ffo-panel.ffo-convo`, 0-2-0) rather than
 * by editing the shared file. `--ffo-convo-width` is set inline by
 * ConversationPanel from the persisted store, and painted directly by the
 * drag; `min(…, 100vw)` is the ceiling, so no drag and no window resize can
 * ever leave the panel wider than the screen.
 *
 * The measure column is 72ch — about 66–72 characters of Instrument Sans at
 * 14px, which is the readable line length a full-screen panel has to respect
 * to stop being a stretched sidebar. */
.ffo-panel.ffo-convo {
  --ffo-convo-measure: 72ch;

  /* `100%`, not `100vw`: the panel is `position: fixed`, so 100% is the layout
   * viewport EXCLUDING the classic scrollbar, which is exactly where the
   * panel's right edge already sits. 100vw includes the scrollbar and would
   * let a full-width panel overhang the page by its width. */
  width: min(var(--ffo-convo-width, var(--width-panel)), 100%);
  /* The 28px left radius is a drawer rounding off the page edge. At full
   * bleed there IS no page edge behind it, so the radius (and the left
   * hairline, which would draw a line down the screen edge) go — over the
   * same 120ms as every other hover-tier transition, so the corner eases out
   * instead of snapping. */
  transition:
    border-radius var(--motion-hover) ease,
    border-left-color var(--motion-hover) ease;
}

@media (min-width: 841px) {
  .ffo-panel.ffo-convo[data-convo-full] {
    border-radius: 0;
    border-left-color: transparent;
  }
}

/* Mobile (≤840px) the panel is a bottom sheet — SidePanel.css's own media
 * query sets `width: 100%`, but the desktop rule above outranks it, so the
 * sheet's full-bleed width is restored here at the same breakpoint. The grip
 * is not rendered at all below this width (ConversationPanel.tsx), so nothing
 * else about the sheet changes. */
@media (max-width: 840px) {
  .ffo-panel.ffo-convo {
    width: 100%;
  }

  /* Belt to the JS braces. ConversationPanel doesn't render the grip below
   * this width, but CSS owns the breakpoint and can never be a render behind
   * it — so a sheet cannot be dragged even for the frame after a rotation. */
  .ffo-convo__grip {
    display: none;
  }
}

/* --- The drag grip -------------------------------------------------------
 * An 8px hit area sitting inside the panel's left edge, over a hairline that
 * is invisible until the pointer is on it. It must not read as chrome: the
 * affordance is the col-resize cursor, and the amber warm-up is confirmation
 * rather than an invitation. */

.ffo-convo__grip {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 8px;
  z-index: 2;
  cursor: col-resize;
  /* Without this a touch drag scrolls the page instead of resizing. */
  touch-action: none;
}

.ffo-convo__grip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: transparent;
  transition: background var(--motion-hover) ease;
}

/* The grab mark. The panel's edge used to be invisible until the pointer was
 * on it, and Jay asked for the ability to drag it "all the way over" — which
 * it already had; he could not see where. A short, faint bar at mid-height says
 * "this edge moves" without drawing a handle down the whole side. */
.ffo-convo__grip::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  width: 4px;
  height: 44px;
  transform: translateY(-50%);
  border-radius: var(--radius-pill);
  /* --text-muted: ≥3:1 against the panel in both themes (the fainter tiers
   * are about 1.4-2.5:1 and the mark vanished). */
  background: var(--text-muted);
  transition: background var(--motion-hover) ease;
}
.ffo-convo__grip:hover::before,
.ffo-convo__grip:focus-visible::before {
  background: var(--text-secondary);
}
[data-convo-full] > .ffo-convo__grip::before {
  /* Full bleed: the bar would sit on the screen edge. */
  left: 4px;
}

.ffo-convo__grip:hover::after,
.ffo-convo__grip:focus-visible::after {
  background: var(--amber-border-hover);
}

.ffo-convo__grip:focus-visible {
  outline: none;
}
.ffo-convo__grip:focus-visible::after {
  width: 2px;
}

/* Held for the life of a drag. Without it the pointer selects the thread's
 * text on the way across the screen. */
body.ffo-resizing {
  user-select: none;
  -webkit-user-select: none;
  cursor: col-resize;
}

/* --- State C: the removable context chip -------------------------------- */

/* Keeps the chip in the same centred column as the thread at wide widths. */
.ffo-convo__chip-rail {
  width: 100%;
  max-width: var(--ffo-convo-measure);
  margin-inline: auto;
}

.ffo-convo__chip {
  margin-top: 16px;
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: var(--pill-translucent);
  font-size: 12.5px;
  color: var(--text-nav);
}

.ffo-convo__chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ffo-convo__chip button {
  display: flex;
  flex: none;
  color: var(--text-faint);
  transition: color var(--motion-hover) ease;
}
.ffo-convo__chip button:hover {
  color: var(--text-secondary);
}

/* --- The thread --------------------------------------------------------- */

/* The scroll container. The thread's LAYOUT moved to `__thread-inner` when the
 * panel became resizable: the container has to span the whole panel (so the
 * scrollbar stays on the panel edge where it belongs) while the conversation
 * itself caps at the measure and centres. */
.ffo-convo__thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 40px;
  /* Scrollbar styling (thin, quiet, both themes) is the app-wide base rule
   * in styles/base.css — no per-surface repeat needed here. */
}

.ffo-convo__thread-inner {
  width: 100%;
  max-width: var(--ffo-convo-measure);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
  --ffo-working-gap: 26px;
}

/* The chip takes 34px of the 40px lead-in when it's present. */
.ffo-convo__thread--scoped {
  margin-top: 34px;
}

/* Mobile: the panel is now a height-constrained bottom sheet (SidePanel.css's
 * `.ffo-panel` media query), so the thread's lead-in tightens to match. */
@media (max-width: 840px) {
  .ffo-convo__thread {
    margin-top: 26px;
  }
  .ffo-convo__thread--scoped {
    margin-top: 22px;
  }
}

/* A founder turn: plain right-aligned text. No bubble — the design is
 * explicit that only the AGENT gets a surface. */
.ffo-convo__turn {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.ffo-convo__turn-text {
  max-width: 300px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  text-align: right;
  white-space: pre-wrap;
}

/* Hover-only, at the faintest tier — a timestamp is never the point. */
.ffo-convo__time {
  font-size: 10.5px;
  color: var(--text-gated);
  opacity: 0;
  transition: opacity var(--motion-hover) ease;
}
.ffo-convo__turn:hover .ffo-convo__time {
  opacity: 1;
}

/* An agent reply is MARKDOWN (components/Markdown.tsx) — the `pre-wrap` this
 * rule used to carry is gone, because the renderer now owns block layout and
 * pre-wrap would double every paragraph gap. The card keeps the type defaults
 * so the honest-error strings, which are plain sentences, look identical to
 * how they always did. */
.ffo-convo__reply {
  border-radius: var(--radius-message);
  background: var(--message-bg);
  border: 1px solid var(--message-border);
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-body);
  /* A fenced code block or a wide table scrolls inside itself; without this
   * the flex item would take its max-content width and push the card past the
   * panel instead. */
  min-width: 0;
}

/* --- Working / blank ---------------------------------------------------- */

.ffo-convo__blank {
  font-size: 13.5px;
  color: var(--text-faint);
}

/* The opening wait on a just-seeded step conversation. Caption tier on
   purpose: it is the panel talking, not the agent, so it must not borrow the
   reply card's surface or its text weight. */
.ffo-convo__getting-ready {
  font-size: 13px;
  color: var(--text-faint);
  padding-left: 2px;
}

/* A plain line about his message (a send that stopped the running turn).
   The dashboard speaking, not the agent: no bubble, caption tier. */
.ffo-convo__note {
  align-self: stretch;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
  padding-left: 2px;
}

/* --- Composer, pinned to the bottom ------------------------------------- */

.ffo-convo__composer {
  margin-top: auto;
  padding-top: 30px;
  display: flex;
  /* The Send button stays level with the LAST line as the field grows. */
  align-items: flex-end;
  gap: 12px;
}

/* The Stop pill (StopButton.css, not edited here) sits between the attach row
 * and the composer. Seen in a browser: it hugged the attach row and floated
 * 30px above the field it belongs to. Give it air above, and tuck the
 * composer under it. */
.ffo-convo .ffo-stop {
  margin-top: 12px;
}
.ffo-convo .ffo-stop + .ffo-convo__composer {
  padding-top: 12px;
}

.ffo-convo__field {
  flex: 1;
  min-width: 0;
  padding: 12px 18px;
  /* A pill at one line (24px is more than half its height), a rounded box once
   * it has grown — --radius-pill would balloon into an oval. */
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  background: var(--pill-translucent);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-primary);
  outline: none;
  /* The height is set by composerGrow.ts from the content; the user does not
   * drag it (the panel is what is resizable). */
  resize: none;
  overflow-y: hidden;
  transition: border-color var(--motion-hover) ease;
}
.ffo-convo__field::placeholder {
  color: var(--text-faintest);
}
.ffo-convo__field:focus {
  border-color: rgba(224, 168, 120, 0.45);
}

.ffo-convo__ask {
  flex: none;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--button-primary-bg);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--button-primary-fg);
  cursor: pointer;
  transition:
    background var(--motion-hover) ease,
    opacity var(--motion-hover) ease,
    scale var(--motion-hover) var(--ease-overlay);
}
.ffo-convo__ask:hover:not(:disabled) {
  background: var(--button-primary-hover);
}
.ffo-convo__ask:disabled {
  opacity: 0.45;
  cursor: default;
}

.ffo-convo__down {
  margin-top: auto;
  padding-top: 30px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* The composer is open while the agent works; this says what a send does.
   Caption tier, like the "getting ready" line: the panel talking, not the agent. */
.ffo-convo__busy-hint {
  margin-top: 10px;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-faint);
}
.ffo-convo .ffo-convo__busy-hint + .ffo-convo__composer {
  padding-top: 8px;
}

/* The header's right-hand group: New session, then the close X. */
.ffo-convo__head-actions {
  display: flex;
  align-items: center;
  /* .ffo-panel__close sits 6px out of its box (negative margin), so this is
     the gap that shows. */
  gap: 20px;
}

/* The palette's old rows, now in the empty thread. */
.ffo-convo__suggestions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-top: 14px;
}
.ffo-convo__suggestion {
  padding: 8px 0;
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  color: var(--text-secondary);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color var(--motion-hover) ease;
}
.ffo-convo__suggestion:hover {
  color: var(--text-primary);
}
.ffo-convo__suggestion:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 6px;
}
.ffo-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--width-drawer);
  z-index: 50;
  display: flex;
  flex-direction: column;
  /* Square corners — the drawer is a wall, not a card. */
  /* --canvas follows data-surface: card ground when light, page when flipped. */
  background: var(--canvas);
  border-right: 1px solid var(--hairline);
  box-shadow: var(--drawer-shadow);
  animation: ffo-slide-left var(--motion-in) var(--ease-overlay);
}

/* Exit: the mirror slide, on the exit clock. Its own keyframes rather than
 * `ffo-slide-left` reversed — that never played a frame; see the note in
 * styles/base.css. */
.ffo-drawer[data-closing] {
  animation: ffo-slide-left-out var(--motion-out) var(--ease-overlay) forwards;
  pointer-events: none;
}

/* The menu affordance: two stacked 1.5px bars, 18px and 12px. Repeated at the
 * top of the drawer where tapping it closes — the same object, not a
 * different control. */
.ffo-affordance {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
  padding: 10px;
  margin: -10px;
  cursor: pointer;
  transition: opacity var(--motion-hover) ease;
}
.ffo-affordance:hover {
  opacity: 0.6;
}
.ffo-affordance span {
  display: block;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text-nav);
}
.ffo-affordance span:last-child {
  width: 12px;
}

.ffo-drawer__affordance {
  padding: 30px 30px 0;
}
.ffo-drawer__affordance .ffo-affordance {
  margin: 0 0 0 -10px;
}

.ffo-drawer__items {
  margin-top: 88px;
  display: flex;
  flex-direction: column;
}

.ffo-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 30px;
  width: 100%;
  text-align: left;
  color: var(--text-nav);
  font-size: 14px;
  transition: background var(--motion-hover) ease;
}
.ffo-nav-item:hover {
  background: var(--row-hover);
}

.ffo-nav-item__icon {
  flex: none;
  display: flex;
  color: var(--icon-nav);
}

/* Active: translucent fill, weight 500, primary-ish text, amber icon. */
.ffo-nav-item--active,
.ffo-nav-item--active:hover {
  background: var(--row-selected);
  font-weight: 500;
  color: var(--text-secondary);
}
.ffo-nav-item--active .ffo-nav-item__icon {
  color: var(--amber-text-strong);
}

/* Gated: icon AND label at the faintest tier. No fill, no lock, no badge, no
 * strikethrough — the item keeps its position, because the point is "more
 * road ahead", not "a door you can't open". */
.ffo-nav-item--gated {
  align-items: flex-start;
  color: var(--text-gated);
}
.ffo-nav-item--gated .ffo-nav-item__icon {
  /* icon-gated (#b8b3aa) is ~1.9:1 on the light panel; the muted nav icon at
   * reduced opacity keeps 'quieter than live' and stays >= 3:1. */
  color: var(--icon-nav);
  opacity: 0.8;
  margin-top: 2px;
}
.ffo-nav-item--gated:hover {
  background: var(--row-hover);
}

.ffo-nav-item__stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* The hover subline only exists on hover — it is the upsell, and an upsell
 * that is always visible becomes chrome. */
/* "Coming soon", under an unavailable pillar.
 *
 * It used to be `display: none` -> `display: block`, which is a hard blink in
 * both directions and cannot be transitioned — `display` is not an animatable
 * property. It is now always in the layout at zero opacity and fades on the
 * hover clock, so it arrives and leaves the way everything else in the product
 * does (the "nothing vanishes" rule, 2026-08-29).
 *
 * `grid-template-rows: 0fr -> 1fr` is what collapses the SPACE, and it is the
 * one layout-property animation kept in the system on purpose: there is no
 * transform that can reclaim vertical space in a flex column, and the
 * alternative — reserving the row permanently — would push every gated nav
 * item taller whether or not it is hovered. It is a 12.5px line inside a
 * 312px drawer, so the layout cost is a rounding error, and it never runs
 * during a scroll. */
.ffo-nav-item__subline {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  font-size: 12.5px;
  color: var(--text-faint);
  transition:
    grid-template-rows var(--motion-hover) var(--ease-overlay),
    opacity var(--motion-hover) var(--ease-overlay);
}

/* The child a `0fr` row actually collapses. A bare text node would not
 * shrink; `min-height: 0` + `overflow: hidden` is what lets it. */
.ffo-nav-item__subline > * {
  min-height: 0;
  overflow: hidden;
}

.ffo-nav-item--gated:hover .ffo-nav-item__subline,
.ffo-nav-item--gated:focus-visible .ffo-nav-item__subline {
  grid-template-rows: 1fr;
  opacity: 1;
}

.ffo-drawer__footer {
  margin-top: auto;
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.ffo-drawer__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--amber-avatar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--amber-text-strong);
}

.ffo-drawer__name {
  font-size: 12.5px;
  color: var(--text-faint);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Theme toggle — icon-only, right edge of the footer row. Same faint-lift
 * hover as the rest of the chrome, nothing louder: it's a utility, not a
 * feature. */
/* Sits beside the theme toggle and speaks the same quiet language — the faint
 * nav colour, the same hover tint and lift, the same focus ring. It is words
 * rather than an icon on purpose; see the note at the markup in Drawer.tsx.
 *
 * `margin-right` opens a real gap to the toggle: same family, but far enough
 * apart that reaching for dark mode cannot end the session. */
.ffo-drawer__logout {
  flex: none;
  margin-right: 4px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  color: var(--icon-nav);
  white-space: nowrap;
  transition:
    background var(--motion-hover) var(--ease-overlay),
    color var(--motion-hover) var(--ease-overlay);
}
.ffo-drawer__logout:hover {
  background: var(--row-hover);
  color: var(--text-secondary);
}
.ffo-drawer__logout:focus-visible {
  outline: 1px solid var(--amber-text-strong);
  outline-offset: 2px;
}

.ffo-drawer__theme {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: -5px;
  border-radius: 50%;
  color: var(--icon-nav);
  transition:
    background var(--motion-hover) ease,
    color var(--motion-hover) ease,
    transform var(--motion-hover) ease;
}
.ffo-drawer__theme:hover {
  background: var(--row-hover);
  color: var(--text-secondary);
  transform: translateY(-1px);
}
.ffo-drawer__theme:focus-visible {
  outline: 1px solid var(--amber-text-strong);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .ffo-drawer__theme {
    transition: none;
  }
  .ffo-drawer__theme:hover {
    transform: none;
  }
}

/* --- Mobile (≤840px): the drawer becomes a full-screen sheet (artboard 8c) —
 * same five items, 15px labels, 17px icons, close ✕ top-left. The desktop
 * affordance is two stacked bars; rather than branching the markup for a
 * mobile-only close icon, the two bars are rotated into an X in place —
 * same control, same click target, the shape the artboard asks for. */
@media (max-width: 840px) {
  .ffo-drawer {
    width: 100%;
    border-right: none;
  }

  .ffo-drawer__affordance {
    padding: 22px 20px 0;
  }
  .ffo-drawer__affordance .ffo-affordance {
    position: relative;
    width: 14px;
    height: 14px;
    gap: 0;
  }
  .ffo-drawer__affordance .ffo-affordance span {
    position: absolute;
    top: 50%;
    left: 0;
    width: 14px !important;
    height: 1.3px;
  }
  .ffo-drawer__affordance .ffo-affordance span:first-child {
    transform: translateY(-50%) rotate(45deg);
  }
  .ffo-drawer__affordance .ffo-affordance span:last-child {
    transform: translateY(-50%) rotate(-45deg);
  }

  .ffo-drawer__items {
    margin-top: 60px;
  }

  .ffo-nav-item {
    font-size: 15px;
  }
  .ffo-nav-item__icon svg {
    width: 17px;
    height: 17px;
  }
}
/* The Files block on a record's drill-in panel.
 *
 * Sits inside SidePanel's existing geometry as one direct child of
 * `.ffo-panel__body`, so the body's own 30px flex gap does the separating —
 * nothing here sets a width, a panel background, or a font family. Same rule
 * the rest of ContactPanel.css follows: hierarchy is spacing and type size,
 * never a badge, a table or a rule.
 *
 * Every colour is a token, so both themes come for free. */

.ffo-recordfiles {
  display: flex;
  flex-direction: column;
}

/* The exact heading treatment "HISTORY" gets one block down
 * (`.ffo-contact-row__label` + `.ffo-contact-heading`). Restated rather than
 * borrowed so this component carries its own appearance and can be mounted on
 * a panel that never loads ContactPanel.css — the values are duplicated, the
 * decision is not: if that heading changes, this follows it. */
.ffo-recordfiles__heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
}

/* The count rides the heading rather than sitting on its own line. Tabular so
 * a 2 and a 12 hold the same left edge as the panel refetches. */
.ffo-recordfiles__count {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.ffo-recordfiles__list {
  display: flex;
  flex-direction: column;
}

/* One file. An anchor, so it keeps the browser's own affordances — middle
 * click, "save link as", the status-bar target on hover. Negative inline
 * margin lets the hover tint bleed to the block's edges without the row's text
 * shifting off the panel's own left alignment. */
.ffo-recordfile {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin: 0 -10px;
  padding: 9px 10px;
  border-radius: 7px;
  text-decoration: none;
  color: inherit;
  transition: background var(--motion-hover) ease;
}

.ffo-recordfile:hover {
  background: var(--row-hover);
}

/* "PDF". A quiet type marker, not a coloured badge — the extension is how a
 * founder tells the quote from the drawing at a glance, and colouring it would
 * spend attention this panel has already committed to the status dot. */
.ffo-recordfile__kind {
  flex: none;
  min-width: 34px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-faintest);
}

/* Long filenames are the norm here ("SP-QTN-ERP-2026-07-revB-final.pdf"), and
 * the panel is 468px. Ellipsis keeps one file to one line; the full name is on
 * the anchor's title. */
.ffo-recordfile__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.ffo-recordfile__when {
  flex: none;
  font-size: 11.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* Shown ONLY when the list could not be read — never for a record that simply
 * has no files, which renders no block at all. Muted, not amber: nothing has
 * gone wrong for the founder, we just cannot answer, and the sentence says so
 * rather than implying an absence. */
.ffo-recordfiles__failed {
  font-size: 13.5px;
  color: var(--text-muted);
}
.ffo-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: var(--width-panel);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 34px 40px 40px;
  /* Rounded on the LEFT edge only — it's a drawer off the page edge. */
  border-radius: var(--radius-panel) 0 0 var(--radius-panel);
  /* --canvas follows data-surface (card ground, or page when flipped). */
  background: var(--canvas);
  border-left: 1px solid var(--hairline);
  box-shadow: var(--panel-shadow);
  animation: ffo-slide-right var(--motion-in) var(--ease-overlay);
}

/* Exit: the mirror slide, on the exit clock. Its OWN keyframes rather than
 * `ffo-slide-right` reversed — that never played a frame; see styles/base.css.
 * Overridden below on the bottom-sheet breakpoint, which slides down. */
.ffo-panel[data-closing] {
  animation: ffo-slide-right-out var(--motion-out) var(--ease-overlay) forwards;
  pointer-events: none;
}

/* Mobile (≤840px): both the drill-in (SidePanel) and the conversation
 * (ConversationPanel, which composes this same class) become bottom sheets
 * — artboards 8d/8f. Rounded top corners only, a 44×4px grab handle, slide
 * up instead of in from the right. The handle is a pseudo-element rather
 * than new markup: `.ffo-panel` is already `position: fixed`, which is a
 * valid containing block for an absolutely-positioned ::before. */
@media (max-width: 840px) {
  .ffo-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 82vh;
    padding: 30px 22px 26px;
    border-radius: 28px 28px 0 0;
    border-left: none;
    border-top: 1px solid var(--hairline);
    box-shadow: var(--sheet-shadow);
    animation: ffo-sheet-up var(--motion-in) var(--ease-overlay);
  }

  /* Exit on the bottom sheet: slide back down, not sideways — the desktop
   * rule above moves the wrong axis for this layout. */
  .ffo-panel[data-closing] {
    animation: ffo-sheet-up-out var(--motion-out) var(--ease-overlay) forwards;
  }

  .ffo-panel::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 4px;
    border-radius: var(--radius-pill);
    background: var(--hairline);
  }

  .ffo-panel__title {
    margin-top: 30px;
  }

  .ffo-panel__body {
    margin-top: 34px;
    overflow-y: auto;
  }

  /* Panel actions (drill-in "Draft follow-up"/"Snooze a week", draft
   * "Approve & schedule"/"Edit with Friday") stack full-width. */
  .ffo-panel__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .ffo-panel__actions .ffo-pill {
    width: 100%;
  }
}

@keyframes ffo-sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Its mirror. See the note above the `-out` block in styles/base.css for why
 * this cannot be the same keyframes played in reverse. */
@keyframes ffo-sheet-up-out {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(100%);
  }
}

.ffo-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ffo-panel__close {
  display: flex;
  color: var(--text-faint);
  padding: 6px;
  margin: -6px;
  transition: color var(--motion-hover) ease;
}
.ffo-panel__close:hover {
  color: var(--text-secondary);
}

.ffo-panel__title {
  margin-top: 60px;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* Aligned under the title text, past the 7px dot + 13px gap. */
.ffo-panel__subline {
  margin-top: 10px;
  padding-left: 20px;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* A subline that carries more than one line (a record reference above the
 * company — see ContactPanel's `subline`) keeps them tight enough to read as
 * one block under the heading rather than as two competing lines. */
.ffo-panel__subline > * + * {
  margin-top: 4px;
}

/* The record's OWN reference, on the line under the title. Tabular figures and
 * a touch of letter-spacing for the same reason `.ffo-contact-code__value` has
 * them: this is a value a person reads character by character because they are
 * copying it into another system, and an O/0 confusion costs them the lookup.
 * Selectable for the same reason. Faint, because it identifies the record and
 * is not the point of it. */
.ffo-panel__ref {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  user-select: all;
}

.ffo-panel__body {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-left: 3px;
  overflow-y: auto;
  /* `overflow-y: auto` above was inert until this pair was added. In a flex
   * COLUMN a child's implied `min-height: auto` refuses to shrink below its
   * own content, so the body grew instead of scrolling and pushed
   * `.ffo-panel__actions` (which follows it at `margin-top: auto`) off the
   * bottom of the panel. Nothing noticed while every body was a four-line
   * timeline; the full lead record (ContactPanel) overflows immediately.
   * Caught in the browser on the built page — no type checker was ever going
   * to find it. Applies to the desktop rail and the 82vh mobile sheet alike:
   * both are fixed-height flex columns with the same behaviour. */
  flex: 1 1 auto;
  min-height: 0;
}

/* --- Mini-timeline ------------------------------------------------------ */

.ffo-timeline-entry {
  display: flex;
  gap: 20px;
}

.ffo-timeline-entry__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5px;
}

.ffo-timeline-entry__line {
  flex: 1;
  width: 1px;
  background: var(--hairline);
  margin-top: 6px;
}

.ffo-timeline-entry__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ffo-timeline-entry__label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
}

.ffo-timeline-entry__value {
  font-size: 14px;
  color: var(--text-secondary);
  /* A call's brief is several short lines (Who / Last touched / ...); keep its
   * line breaks, and let a long unbroken word wrap instead of widening the panel. */
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.ffo-panel__empty {
  font-size: 13.5px;
  color: var(--text-faint);
}

.ffo-panel__actions {
  margin-top: auto;
  padding-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Action feedback. Not a toast: a quiet line in the panel that says exactly
 * what happened, including when nothing did. */
.ffo-panel__note {
  /* Full-row so it wraps under the pills rather than squeezing between
   * them — it is a sentence, not a third button. */
  width: 100%;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-faint);
}
/* The lead detail panel's blocks. Lives inside SidePanel's existing 468px
 * geometry (a bottom sheet under 840px) — nothing here sets a width, a
 * background for the panel itself, or a font family. Hierarchy is spacing and
 * type size, never a badge, a table or a rule.
 *
 * `.ffo-panel__body` is already `display: flex; flex-direction: column;
 * gap: 30px; overflow-y: auto`, so every direct child below is one block in
 * that stack and the 30px gap does the separating. */

/* --- The maintained "state of play" (currentState) ----------------------- */
/* First block on the panel when it exists — leads even the source line. 2-3
 * sentences of maintained prose, so it gets real line-height rather than the
 * tighter treatment used elsewhere. */

.ffo-contact-state {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ffo-contact-state__text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Same 10.5px uppercase-tracked treatment as every other faint label on this
 * panel (`.ffo-contact-row__label`, `.ffo-contact-touch__when`) — the age is
 * metadata about the sentence above it, not a second piece of content. */
.ffo-contact-state__age {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
}

/* A summary older than ~3 weeks reads as stale — muted amber, never the
 * severity red, which this design reserves for the one status dot per
 * screen. */
.ffo-contact-state__age--stale {
  color: var(--amber-text);
}

/* --- The "who is this" line ---------------------------------------------- */
/* First block, and given room: it is the one field every single lead has, and
 * the only sentence on the panel that answers what this person is. */
.ffo-contact-source {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* --- Time in stage (Board card diet drill-in addition, Board cards only,
 * docs/superpowers/specs/2026-09-26-board-card-diet-design.md) ------------ */
.ffo-contact-stage {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ffo-contact-stage__now {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.ffo-contact-stage__limit {
  color: var(--text-faint);
}
.ffo-contact-stage__limit--over {
  color: var(--amber-text);
}
.ffo-contact-stage__earlier {
  margin: 0;
  font-size: 12px;
  color: var(--text-faintest);
}

/* --- Contact rows / standing facts --------------------------------------- */

.ffo-contact-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ffo-contact-row {
  display: flex;
  flex-direction: column;
  /* Not `stretch` (the flex default): the value can be a link, and a
   * full-width underline reads as a table rule across the panel rather than
   * as a link on the text. */
  align-items: flex-start;
  gap: 5px;
}

.ffo-contact-row__label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
}

.ffo-contact-heading {
  margin-bottom: 18px;
}

/* The one-off amber label. This is the panel's confirmation that a copy
 * landed, and it is allowed the accent for the 1.6s it exists — it is a
 * SIGNAL (something just happened), which is the only thing amber is for
 * here. `--amber-text` and not `--amber`: this is text, and the fill tone
 * fails contrast at 10.5px on the light canvas. */
.ffo-contact-row__label--copied {
  color: var(--amber-text);
}

.ffo-contact-row__value {
  font-size: 13.5px;
  color: var(--text-secondary);
  /* Long emails and URLs must wrap inside 468px rather than widen the panel
   * — and on the mobile sheet, rather than scroll the page sideways. */
  overflow-wrap: anywhere;
}

.ffo-contact-row__link {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1px;
  transition: color var(--motion-hover) ease, border-color var(--motion-hover) ease;
}
.ffo-contact-row__link:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-faint);
}

/* Click-to-copy phone. A real <button>, so it resets the UA button box back
 * to the row's own type — and it borrows the link's hairline underline and
 * hover lift, because it sits in the same three-row block and a control that
 * looked different would read as a different KIND of thing. */
.ffo-contact-row__copy {
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--hairline);
  padding: 0 0 1px;
  cursor: pointer;
  transition: color var(--motion-hover) ease, border-color var(--motion-hover) ease;
}
.ffo-contact-row__copy:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-faint);
}
/* Same ring the drawer's theme toggle uses — one focus treatment product-wide. */
.ffo-contact-row__copy:focus-visible {
  outline: 1px solid var(--amber-text-strong);
  outline-offset: 3px;
}

/* "8 touches · owned by Jay · referral" and the follow-up line. Quiet: these
 * are context, not the reason the panel is open. */
.ffo-contact-standing {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* The client's own ERP reference ("C02800"). Tabular figures and a touch of
 * letter-spacing because this is the one value on the panel a person reads
 * CHARACTER BY CHARACTER — they are copying it into another system, and an
 * O/0 confusion costs them the lookup. Selectable for the same reason.
 * Quiet like the standing line: it is a reference, not the headline. */
.ffo-contact-code {
  font-size: 13.5px;
  color: var(--text-muted);
}

.ffo-contact-code__value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--text-primary, inherit);
  user-select: all;
}

/* --- The touch history --------------------------------------------------- */

.ffo-contact-touches {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* The label row carries the relative time on its right — same 10.5px uppercase
 * tracked treatment, so it reads as part of the label rather than as a second
 * piece of content. */
.ffo-contact-touch__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  /* Wraps rather than clips. On the 390px sheet the longest real pairing
   * ("REFERRAL — OUTBOUND" + "2 WEEKS AGO") is about ten pixels too wide, and
   * a clipped timestamp on a timeline is precisely the wrong thing to lose.
   * When it wraps, the time takes its own line; on every other width nothing
   * changes. Needs `min-width: 0` on the column too — see below. */
  flex-wrap: wrap;
  min-width: 0;
}

.ffo-contact-touch__when {
  color: var(--text-faintest);
  text-transform: uppercase;
}

/* `.ffo-timeline-entry__text` is a flex column inside a flex row; without
 * releasing its implied `min-width: auto` it refuses to narrow below its
 * widest line, so the label above overflows the panel instead of wrapping. */
.ffo-contact-touches .ffo-timeline-entry__text {
  min-width: 0;
}

/* --- AI Gap Score (conditional, 7% of contacts) -------------------------- */

.ffo-contact-aigap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.ffo-contact-aigap__summary {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.ffo-contact-aigap__points {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Their own words about what eats their week. A leading hairline dash rather
 * than a list marker — a bullet list would read as a feature table. */
.ffo-contact-aigap__point {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.ffo-contact-aigap__point::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1px;
  background: var(--text-faintest);
}

/* The fix that makes a full record scroll inside the panel instead of pushing
 * the actions off the bottom lives in SidePanel.css, next to the rules it
 * corrects — it is the panel's own bug, not this content's. */

/* --- The delete control (the product's ONE destructive action) ------------ */
/*
 * Read the block comment above `DeleteControl` in ContactPanel.tsx before
 * changing any of this — every value here is an argument about how a rare,
 * irreversible control should be drawn.
 *
 * It lives inside `.ffo-panel__actions` (a wrapping flex row), so both states
 * take a full row of their own: this is not a third pill, and it must never
 * come to sit BESIDE "Update status".
 */

/* The resting state: a quiet line of text under the pills. 12.5px, the faintest
 * tier, no border, no fill — present for the founder who is looking for it,
 * invisible to the founder who is not. The hover lift to `--text-muted` is the
 * only affordance it gets. */
.ffo-contact-delete__open {
  width: 100%;
  margin-top: 4px;
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  color: var(--text-faintest);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color var(--motion-hover) ease;
}
.ffo-contact-delete__open:hover {
  color: var(--text-muted);
}
.ffo-contact-delete__open:focus-visible {
  outline: 1px solid var(--amber-text-strong);
  outline-offset: 3px;
}

/* The confirm, INLINE — it replaces the line above rather than overlaying the
 * panel, so the founder can still see whose record they are looking at while
 * they decide. */
.ffo-contact-delete {
  width: 100%;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* "Delete <name> from the CRM forever? This can't be undone from here."
 * 13px and the secondary tier — a sentence to read, not a warning banner. The
 * name in it IS the warning. */
.ffo-contact-delete__question {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Same 10.5px uppercase tracked treatment as every other label on this panel. */
.ffo-contact-delete__label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
}

.ffo-contact-delete__input {
  font: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--canvas);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  padding: 9px 14px;
  outline: none;
  transition: border-color var(--motion-hover) ease;
}
.ffo-contact-delete__input:focus-visible {
  border-color: var(--text-faint);
}
.ffo-contact-delete__input:disabled {
  color: var(--text-faint);
}

/* The CRM's own refusal, verbatim. `pre-wrap` because the guarded script lists
 * the offending opportunities on their own lines and reflowing them into a
 * paragraph would bury the record the founder has to go look at.
 *
 * MUTED, not red: this is an explanation of why nothing happened, and the one
 * red on this panel belongs to the button that would make something happen. */
.ffo-contact-delete__refusal {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ffo-contact-delete__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* THE ONE PLACE `--severe` IS ALLOWED ON AN ACTION.
 *
 * styles/tokens.css says it plainly: "One dot per screen. Ever. No red text,
 * borders, fills, or banners." This is the deliberate, single exception, and it
 * exists because this is the only irreversible control in the product — the one
 * button that should not look like every other button. Spending the colour here
 * is the point of having reserved it. If a second red action ever ships, delete
 * this comment and this rule, because by then it will have stopped meaning
 * anything.
 *
 * Outline, not a fill: a solid red button reads as the primary action of the
 * panel, and this is emphatically not that. It is severe AND secondary at the
 * same time, which is exactly what a well-guarded destructive control is. */
.ffo-contact-delete__confirm {
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--severe);
  background: none;
  border: 1px solid var(--severe);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  cursor: pointer;
  transition: color var(--motion-hover) ease, background var(--motion-hover) ease,
    border-color var(--motion-hover) ease, opacity var(--motion-hover) ease;
}
.ffo-contact-delete__confirm:hover:not(:disabled) {
  color: var(--canvas);
  background: var(--severe);
}
.ffo-contact-delete__confirm:focus-visible {
  outline: 1px solid var(--severe);
  outline-offset: 3px;
}

/* Disabled until the typed name matches. It stays VISIBLE and keeps its shape
 * — the founder has to be able to see what they are working towards — but it
 * loses the red, because a control that cannot fire must not look armed. */
.ffo-contact-delete__confirm:disabled {
  color: var(--text-faintest);
  border-color: var(--hairline);
  cursor: not-allowed;
}

/* "Keep them" — the way out, and the one that should feel effortless. Plain
 * text at the same size, so backing out costs less attention than going
 * ahead. */
.ffo-contact-delete__cancel {
  font: inherit;
  font-size: 12.5px;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 7px 4px;
  cursor: pointer;
  transition: color var(--motion-hover) ease;
}
.ffo-contact-delete__cancel:hover:not(:disabled) {
  color: var(--text-primary);
}
.ffo-contact-delete__cancel:focus-visible {
  outline: 1px solid var(--amber-text-strong);
  outline-offset: 3px;
}
/* No persistent navigation. The top bar is two affordances floating over the
 * page, not a chrome band — it has no background and no border. */

.ffo-topbar__menu {
  position: fixed;
  top: 30px;
  left: 40px;
  z-index: 30;
}

.ffo-askpill {
  position: fixed;
  top: 30px;
  right: 40px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--topbar-pill-border);
  background: var(--topbar-pill-bg);
  font-size: 12px;
  color: var(--text-faint);
  transition:
    border-color var(--motion-hover) ease,
    color var(--motion-hover) ease;
}
.ffo-askpill:hover {
  border-color: var(--amber-border-hover);
  color: var(--text-muted);
}

.ffo-askpill__key {
  font-size: 11.5px;
  color: var(--text-gated);
}

/* The avatar that replaces the ⌘K pill top-right on mobile (artboard 8a/8e).
 * Hidden by default — it only ever appears below the mobile breakpoint, so
 * desktop rendering is untouched. */
.ffo-topbar__avatar {
  display: none;
  position: fixed;
  top: 22px;
  right: 20px;
  z-index: 30;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--amber-avatar);
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--amber-text-strong);
}

@media (max-width: 840px) {
  /* Menu affordance moves to the mobile frame's own offset. */
  .ffo-topbar__menu {
    top: 22px;
    left: 20px;
  }

  .ffo-topbar__avatar {
    display: flex;
  }

  /* The ⌘K pill is gone — replaced by a floating "Ask" pill bottom-centre. */
  .ffo-askpill {
    top: auto;
    left: 50%;
    right: auto;
    bottom: 30px;
    transform: translateX(-50%);
    gap: 0;
    padding: 13px 26px;
    /* Page chrome, not a card: an opaque page-ground pill with the page
     * control style (hairline, page ink). No blur: glass is gone. */
    background: var(--page-bg);
    border-color: var(--topbar-pill-border);
    box-shadow: var(--float-shadow);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
  }
  .ffo-askpill:hover {
    border-color: var(--amber-border-hover);
    color: var(--text-secondary);
  }
  /* Both children ("Ask anything" and the "⌘K" hint) are replaced by one
   * word — there's no physical ⌘K on mobile, and the pill is now a plain
   * floating action, not an input affordance. */
  .ffo-askpill > span {
    display: none;
  }
  .ffo-askpill::after {
    content: 'Ask';
  }
}
/* Feedback button + panel. Bottom-left: the docked orb owns bottom-right and the mobile Ask pill bottom-centre. */

.ffo-feedback__button {
  position: fixed;
  left: 40px;
  bottom: 28px;
  z-index: 34;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--topbar-pill-border);
  background: var(--topbar-pill-bg);
  font-size: 12px;
  color: var(--text-faint);
  transition:
    border-color var(--motion-hover) ease,
    color var(--motion-hover) ease;
}
.ffo-feedback__button:hover,
.ffo-feedback__button[aria-expanded='true'] {
  border-color: var(--amber-border-hover);
  color: var(--text-muted);
}
.ffo-feedback__button:focus-visible,
.ffo-feedback__panel button:focus-visible,
.ffo-feedback__text:focus-visible {
  outline: 2px solid var(--amber-border-select);
  outline-offset: 2px;
}

.ffo-feedback__panel {
  position: fixed;
  left: 40px;
  bottom: 68px;
  z-index: 56;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 18px 18px 16px;
  border-radius: var(--radius-card);
  /* Light popover: data-surface="card" in Feedback.tsx. Opaque, no blur. */
  border: 1px solid var(--card-edge);
  background: var(--card-bg);
  box-shadow: var(--float-shadow);
  color: var(--text-body);
  font-size: 13px;
}

.ffo-feedback__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ffo-feedback__title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}
.ffo-feedback__close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
}
.ffo-feedback__close:hover {
  background: var(--row-hover);
}

.ffo-feedback__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ffo-feedback__hint,
.ffo-feedback__meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}
.ffo-feedback__label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: -8px;
}
.ffo-feedback__text {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 84px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-primary);
  font: inherit;
}

.ffo-feedback__voice,
.ffo-feedback__files {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ffo-feedback__audio {
  width: 100%;
  height: 36px;
}
.ffo-feedback__rec {
  color: var(--severe);
  font-variant-numeric: tabular-nums;
}
.ffo-feedback__fileinput {
  display: none;
}
.ffo-feedback__list {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ffo-feedback__list li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ffo-feedback__fname {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.ffo-feedback__secondary,
.ffo-feedback__remove {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 12px;
}
.ffo-feedback__secondary:hover,
.ffo-feedback__remove:hover {
  border-color: var(--amber-border-hover);
}
.ffo-feedback__remove {
  padding: 3px 10px;
}

.ffo-feedback__primary {
  align-self: flex-end;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  background: var(--button-primary-bg);
  color: var(--button-primary-fg);
  font-size: 13px;
}
.ffo-feedback__primary:hover:not(:disabled) {
  background: var(--button-primary-hover);
}
.ffo-feedback__panel button:disabled {
  opacity: 0.55;
  cursor: default;
}

.ffo-feedback__note,
.ffo-feedback__error {
  width: 100%;
  margin: 0;
  font-size: 12px;
  color: var(--severe);
}

.ffo-feedback__thanks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ffo-feedback__thanks p {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
}

@media (max-width: 840px) {
  /* The Ask pill sits bottom-centre at 30px; this stays small and to its left. */
  .ffo-feedback__button {
    left: 16px;
    bottom: 36px;
    padding: 6px 10px;
  }
  .ffo-feedback__panel {
    left: 16px;
    right: 16px;
    bottom: 84px;
    width: auto;
  }
}

/* Screen-reader-only live line for the recorder's state changes. */
.ffo-feedback__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* The orb. Warm light in a dim room, never a UI widget: no border, no shadow
 * ring, no glassmorphism, no icon, no badge, no attached label.
 *
 * Every visual parameter is a custom property written by OrbEngine's single
 * rAF loop. Nothing here transitions, animates or paints text — the whole orb
 * is composited, which is what makes it safe to run permanently docked.
 *
 * Geometry is authored against the 180px orb and expressed in PERCENTAGES so
 * one rule serves 44 / 48 / 140 / 180px. `--orb-k` (= size / 180) scales the
 * one blur that can't be a percentage. */

.ffo-orb {
  position: relative;
  width: var(--orb-size);
  height: var(--orb-size);
  flex: none;

  /* Amber. The product's single accent — the blue variant on artboard 14a was
   * rejected: it is the only cool thing in the product and reads as a guest
   * from another one. */
  --orb-edge: #7e4527;
}

/* Light theme ends the sphere one stop lighter so the orb doesn't punch a
 * hole in a pale page. The dark value is the default above because the
 * product ships :root as LIGHT — so this override is the light one. */
:root:not([data-theme='dark']) .ffo-orb {
  --orb-edge: #8e5230;
}

/* 1 — Bloom. The light spilling into the room. Sits OUTSIDE the sphere and
 * must never read as a glow ring. -58px on the 180px orb = ~32% of diameter. */
.ffo-orb__bloom {
  position: absolute;
  inset: -32%;
  border-radius: 50%;
  background: radial-gradient(closest-side, #e0a878, rgba(224, 168, 120, 0));
  opacity: var(--bloom, 0.3);
  will-change: opacity;
  /* Decorative, and it spills far past the sphere. Never a click target. */
  pointer-events: none;
}

/* 2 — Ripple rings. Listening only; opacity 0 at rest, driven per frame. */
.ffo-orb__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid #e0a878;
  opacity: 0;
  will-change: transform, opacity;
  /* OrbEngine scales these to ~2-3x every frame, and `opacity: 0` still
   * hit-tests: they sat on top of the voice controls and swallowed every click
   * on End and Mute. Decorative and aria-hidden, so they never take a pointer. */
  pointer-events: none;
}

/* 3 — Sphere. */
.ffo-orb__sphere {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  transform: scale(var(--scale, 1));
  will-change: transform;
}

.ffo-orb__base {
  position: absolute;
  inset: 0;
  background: radial-gradient(118% 118% at 32% 26%, #fff7ec 0%, #f9d2a9 24%, #e0a878 46%, #be7842 72%, var(--orb-edge) 100%);
}

/* The same stops shifted cooler and darker, cross-faded on top via --dim.
 * Cross-fading two gradient layers is how brightness changes without
 * interpolating colour stops. */
.ffo-orb__dim {
  position: absolute;
  inset: 0;
  background: radial-gradient(118% 118% at 32% 26%, #f2dcc4 0%, #e6bc96 24%, #ce9668 46%, #a9663a 72%, #6e3d23 100%);
  opacity: var(--dim, 0);
  will-change: opacity;
}

/* Gas-planet banding. KEEP the blur and the low alphas — at full strength the
 * conic seam reads as a hard spoke from the centre. */
.ffo-orb__drift {
  position: absolute;
  inset: -30%;
  background: conic-gradient(
    from 20deg,
    rgba(255, 244, 230, 0.1),
    rgba(126, 69, 39, 0.15),
    rgba(255, 244, 230, 0.07),
    rgba(126, 69, 39, 0.16),
    rgba(255, 244, 230, 0.1)
  );
  filter: blur(calc(14px * var(--orb-k, 1)));
  transform: rotate(var(--drift, 0deg));
  will-change: transform;
}

/* The brightness lever. */
.ffo-orb__core {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, #fffbf4, rgba(255, 251, 244, 0));
  opacity: var(--core, 0);
  will-change: opacity;
}

.ffo-orb__band {
  position: absolute;
  left: -30%;
  top: 36%;
  width: 160%;
  height: 24%;
  background: linear-gradient(90deg, rgba(255, 244, 230, 0), rgba(255, 244, 230, 1), rgba(255, 244, 230, 0));
  opacity: var(--band, 0.66);
  filter: blur(var(--band-blur, 10px));
  transform: rotate(var(--band-rot, -18deg)) translateY(var(--band-y, 0%)) scaleX(var(--band-x, 1));
  will-change: transform, opacity, filter;
}

/* --- Docked presence ----------------------------------------------------- */

/* 44px, 28px from the right and bottom edges, above all content and above the
 * scrollbar. No label, no chrome, no badge attached to it. */
.ffo-orb-dock {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* The drill-in panels (SidePanel/ContactPanel, z 50) portal themselves over
 * their own scrim (z 40). The orb stays reachable above them so voice can
 * INHERIT the record that is open — that is the whole scoped-voice case
 * (artboards 12a/12b). It is still the only moving thing on screen. */
.ffo-orb-dock--over-panel {
  z-index: 55;
}

/* "Talk to Friday" — text on the canvas, 14px to the orb's left. Not a
 * tooltip, not a pill. */
.ffo-orb-dock__label {
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--motion-hover) ease;
  pointer-events: none;
}

.ffo-orb-dock:hover .ffo-orb-dock__label,
.ffo-orb-dock:focus-visible .ffo-orb-dock__label {
  opacity: 1;
}

/* Hover: core +8%, bloom +.06 alpha, 120ms. Done as an additive overlay pair
 * rather than by touching --core/--bloom, which the rAF loop owns and would
 * overwrite on the very next frame. */
.ffo-orb-dock .ffo-orb__core,
.ffo-orb-dock .ffo-orb__bloom {
  transition: none;
}

.ffo-orb-dock__hover-core,
.ffo-orb-dock__hover-bloom {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--motion-hover) ease;
  pointer-events: none;
}
.ffo-orb-dock__hover-bloom {
  inset: -32%;
  background: radial-gradient(closest-side, #e0a878, rgba(224, 168, 120, 0));
}
.ffo-orb-dock__hover-core {
  inset: 10%;
  background: radial-gradient(closest-side, #fffbf4, rgba(255, 251, 244, 0));
}
.ffo-orb-dock:hover .ffo-orb-dock__hover-bloom,
.ffo-orb-dock:focus-visible .ffo-orb-dock__hover-bloom {
  opacity: 0.06;
}
.ffo-orb-dock:hover .ffo-orb-dock__hover-core,
.ffo-orb-dock:focus-visible .ffo-orb-dock__hover-core {
  opacity: 0.08;
}

/* Mobile: 48px at right 20 / bottom 96 — clearing the floating "Ask" pill
 * (bottom 30px, ~46px tall) by 20px. They must never collide or read as one
 * control. */
@media (max-width: 840px) {
  .ffo-orb-dock {
    right: 20px;
    bottom: 96px;
  }
  /* No hover on touch — the label would never fade out. */
  .ffo-orb-dock__label {
    display: none;
  }
}
/* Voice, split (spec §6). Conversation left, orb right; on phones the orb is a
 * 72px strip on top and the conversation fills the rest. Tokens only. */

.ffo-vsplit {
  position: fixed;
  inset: 0;
  z-index: 70; /* voice's layer */
  display: grid;
  /* The page ground: the orb stage is decoration and sits on the page. The
   * conversation (content someone reads) is the light card below. No blur. */
  background: var(--page-bg);
  /* Opens the way the chat panel does: in from the right (base.css keyframes,
   * the same ones SidePanel uses). Phones override below. */
  animation: ffo-slide-right var(--motion-in) var(--ease-overlay);
  color: var(--page-text);
}
.ffo-vsplit[data-closing] {
  animation: ffo-slide-right-out var(--motion-out) var(--ease-overlay) forwards;
  pointer-events: none;
}

.ffo-vsplit[data-layout='desk'] {
  grid-template-columns: 55fr 45fr;
}
.ffo-vsplit[data-layout='phone'] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 72px minmax(0, 1fr);
  /* ≤840px the chat is a bottom sheet (SidePanel.css), so voice rises the same
   * way instead of arriving from a side the sheet never uses. */
  animation: ffo-sheet-up var(--motion-in) var(--ease-overlay);
}
.ffo-vsplit[data-layout='phone'][data-closing] {
  animation: ffo-sheet-up-out var(--motion-out) var(--ease-overlay) forwards;
}
.ffo-vsplit[data-layout='phone'] .ffo-vsplit__stage {
  grid-row: 1;
}
.ffo-vsplit[data-layout='phone'] .ffo-vsplit__convo {
  grid-row: 2;
}

/* --- Conversation -------------------------------------------------------- */

.ffo-vsplit__convo {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  padding: 20px 0 20px 32px;
  /* data-surface="card" in VoiceSplit.tsx: a light panel on the dark page. */
  margin: 16px 0 16px 16px;
  border-radius: var(--radius-panel) 0 0 var(--radius-panel);
  background: var(--canvas);
  box-shadow: var(--card-shadow);
  color: var(--text-body);
}
.ffo-vsplit[data-layout='phone'] .ffo-vsplit__convo {
  margin: 0;
  border-radius: var(--radius-message) var(--radius-message) 0 0;
  /* The keyboard offset lives in THIS rule: a separate padding-bottom rule
   * earlier in the file was overridden by this shorthand and never applied. */
  padding: 0 16px calc(12px + var(--ffo-kb, 0px));
}

.ffo-vsplit__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding-right: 24px;
}
.ffo-vsplit__started {
  font-size: 12.5px;
  color: var(--text-faint);
}

.ffo-vsplit__chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--pill-translucent);
  border: 1px solid var(--pill-border);
  font-size: 12.5px;
  color: var(--text-secondary);
}
.ffo-vsplit__chip button {
  all: unset;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0 2px;
}

.ffo-vsplit__note,
.ffo-vsplit__down {
  margin: 6px 24px 6px 0;
  font-size: 12.5px;
  color: var(--text-muted);
}
.ffo-vsplit__down {
  color: var(--severe);
}

.ffo-vsplit__thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  --ffo-working-gap: 14px;
  padding: 8px 24px 12px 0;
}
.ffo-vsplit[data-layout='phone'] .ffo-vsplit__thread {
  padding-right: 0;
}

/* A plain line about his message (a send that stopped the running turn), as
   in the text panel: the dashboard speaking, never a reply. */
.ffo-vsplit__thread-note {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* His words: plain, right-aligned, no bubble — as in the text panel. */
.ffo-vsplit__turn {
  align-self: flex-end;
  max-width: 80%;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ffo-vsplit__reply-text {
  align-self: flex-start;
  max-width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-message);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.ffo-vsplit__jump {
  all: unset;
  align-self: center;
  cursor: pointer;
  margin-bottom: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* --- Reply box ----------------------------------------------------------- */

.ffo-vsplit__reply {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-right: 24px;
}
.ffo-vsplit[data-layout='phone'] .ffo-vsplit__reply {
  padding-right: 0;
}
.ffo-vsplit__field {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
}
.ffo-vsplit__field:disabled {
  color: var(--text-faint);
}
.ffo-vsplit__send {
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  background: var(--button-primary-bg);
  color: var(--button-primary-fg);
  cursor: pointer;
  transition: scale var(--motion-hover) var(--ease-overlay);
}
.ffo-vsplit__send:hover:not(:disabled) {
  background: var(--button-primary-hover);
}
.ffo-vsplit__send:disabled {
  opacity: 0.45;
  cursor: default;
}
.ffo-vsplit__speak {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pill-translucent);
  border: 1px solid var(--pill-border);
  color: var(--text-faint);
  cursor: pointer;
}
.ffo-vsplit__speak[aria-pressed='true'] {
  color: var(--text-secondary);
}
.ffo-vsplit__send-note {
  flex-basis: 100%;
  font-size: 12.5px;
  color: var(--severe);
}

/* --- Stage: the orb ------------------------------------------------------ */

.ffo-vsplit__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 0;
}
.ffo-vsplit__announce,
.ffo-vsplit__announce-poor {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.ffo-vsplit__status {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
}
.ffo-vsplit__voice-note {
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
  max-width: 320px;
}
.ffo-vsplit__controls {
  display: flex;
  gap: 12px;
  /* Belt and braces: whatever the orb paints, the controls are above it. */
  position: relative;
  z-index: 1;
}
.ffo-vsplit__control {
  height: 44px;
  min-width: 44px;
  padding: 0 18px 0 14px;
  box-sizing: border-box;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pill-translucent);
  border: 1px solid var(--pill-border);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--motion-hover) ease,
    color var(--motion-hover) ease;
}
.ffo-vsplit__control:hover {
  color: var(--text-primary);
}
.ffo-vsplit__control--muted {
  color: var(--text-muted);
}
.ffo-vsplit__hint {
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
}

/* Poor connection (v2.2.3). A plain block in the flow, amber as signal and
 * never red: it is a note about his network, not an error. It is NOT a layer —
 * no position, no inset, no z-index — and ignores the pointer outright, the
 * lesson of the orb rings that once swallowed clicks meant for Mute and End.
 * No animation either (this file may name only the panel's slide keyframes), so
 * there is nothing for reduced motion to switch off. */
.ffo-vsplit__poor {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  box-sizing: border-box;
  max-width: 320px;
  padding: 8px 12px;
  border-radius: var(--radius-message);
  background: var(--amber-chip);
  border: 1px solid var(--amber-border-hover);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--amber-text-strong);
  pointer-events: none;
}
.ffo-vsplit__poor-icon {
  flex: none;
  margin-top: 1px;
}
.ffo-vsplit[data-layout='phone'] .ffo-vsplit__poor {
  align-self: flex-start;
  max-width: none;
  margin: 6px 0;
  padding: 6px 10px;
}

/* Phone: the stage is a horizontal strip — orb, status, mute, end. */
.ffo-vsplit[data-layout='phone'] .ffo-vsplit__stage {
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 16px 0 28px; /* the orb's glow reaches ~24px past its 44px disc */
}
.ffo-vsplit[data-layout='phone'] .ffo-vsplit__status {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 14px;
}
.ffo-vsplit[data-layout='phone'] .ffo-vsplit__voice-note {
  display: none;
}
.ffo-vsplit[data-layout='phone'] .ffo-vsplit__controls {
  gap: 8px;
}

/* No Esc on a phone. */
.ffo-vsplit[data-layout='phone'] .ffo-vsplit__hint {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .ffo-vsplit,
  .ffo-vsplit[data-closing],
  .ffo-vsplit[data-layout='phone'],
  .ffo-vsplit[data-layout='phone'][data-closing] {
    animation: none;
  }
}
/* Voice mode, active. Artboards 10a/10b (and 12a/12b scoped, 13a mobile).
 *
 * Nothing on this screen but the orb, one caption line, two controls and the
 * inert menu affordance. No second colour, no red, no blue. */

.ffo-voice {
  position: fixed;
  inset: 0;
  /* Above every other overlay (palette 60, drawer/panel 50, scrim 40). Voice
     is mutually exclusive with all of them, so nothing should ever be mounted
     alongside it — this is a belt, not a layering scheme. */
  z-index: 70;
  animation: ffo-fade var(--motion-in) var(--ease-overlay);
}

/* Exit: the mirror fade — the session underneath is untouched, only the
 * surface goes. */
.ffo-voice[data-closing] {
  animation: ffo-fade-out var(--motion-out) var(--ease-overlay) forwards;
  pointer-events: none;
}

/* A deeper scrim than the rest of the product — you should JUST sense the
 * dashboard is still there behind it. The standard .14 / .42 is not enough. */
.ffo-voice__scrim {
  position: absolute;
  inset: 0;
  /* A wash of the PAGE ground (sand in light, near-black in dark). 88%, not
   * 70%: in dark mode the light cards behind it showed through the blur as a
   * mid-grey, and the page-coloured status text sat at about 3:1 on it. */
  background: color-mix(in srgb, var(--page-bg) 88%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: none;
  cursor: default;
  /* The frost arrives as its own beat rather than inheriting the parent's
   * fade. It is OPACITY that animates, never `backdrop-filter` itself: an
   * animated blur radius re-rasterises the whole backdrop every frame and is
   * the single most reliable way to drop frames on a laptop. Fading a layer
   * that already carries a fixed blur looks identical and composites. */
  animation: ffo-frost-in var(--motion-in) var(--ease-overlay);
}
@keyframes ffo-frost-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* The frost melts. Its own keyframes, not `ffo-frost-in` reversed — see the
 * note in styles/base.css for why that never plays. */
@keyframes ffo-frost-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.ffo-voice[data-closing] .ffo-voice__scrim {
  animation: ffo-frost-out var(--motion-out) var(--ease-overlay) forwards;
}

/* No backdrop-filter (older Firefox, and anything with the feature disabled):
 * blur is decoration, but "you can still read the dashboard through this" is
 * not — so the dim goes most of the way opaque instead. Without this the
 * fallback is a 70%-transparent wash over live text, which is harder to look
 * at than either the blurred or the solid version. */
@supports not ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
  .ffo-voice__scrim {
    background: color-mix(in srgb, var(--page-bg) 94%, transparent);
  }
}

/* Visible but inert, so the founder still knows where they are. */
.ffo-voice__menu {
  position: absolute;
  top: 30px;
  left: 40px;
  opacity: 0.45;
  pointer-events: none;
}

/* The orb: 180px, centred horizontally, top 196px — the upper third. It is
 * NOT a button in this state. */
.ffo-voice__orb {
  position: absolute;
  top: 196px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  /* Born from a dot. The orb does not fade up at full size — it starts as a
   * point and grows into itself, which is what makes voice feel summoned
   * rather than merely displayed. */
  animation: ffo-orb-born var(--motion-in) var(--ease-overlay);
}

/* `translateX(-50%)` is the orb's own horizontal centring, set above, and
 * every frame has to restate it — a keyframe that only said `scale()` would
 * drop the centring and throw the orb into the right-hand half of the screen
 * for the duration. Scale comes after translate so the offset is not
 * multiplied by it.
 *
 * Opacity finishes early (by 55%) so the growth reads as a SHAPE arriving
 * rather than as a fade; the last half of the curve is pure scale, which is
 * the part that looks alive. OrbEngine's own render loop is untouched — this
 * choreographs the element the orb draws into, never the drawing. */
@keyframes ffo-orb-born {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.06);
  }
  55% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

/* And it shrinks back to a dot on the way out. Mirror of `ffo-orb-born`,
 * written out for the same reason every other exit here is. */
@keyframes ffo-orb-gone {
  from {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  45% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateX(-50%) scale(0.06);
  }
}

.ffo-voice[data-closing] .ffo-voice__orb {
  animation: ffo-orb-gone var(--motion-out) var(--ease-overlay) forwards;
}

/* The scoped chip, 60px above the caption. Never beside the orb. */
.ffo-voice__chip {
  position: absolute;
  top: 476px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(560px, calc(100% - 60px));
  padding: 7px 12px 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: var(--pill-translucent);
  font-size: 12.5px;
  color: var(--text-nav);
}
.ffo-voice__chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ffo-voice__chip button {
  display: flex;
  flex: none;
  color: var(--text-faint);
  transition: color var(--motion-hover) ease;
}
.ffo-voice__chip button:hover {
  color: var(--text-secondary);
}

/* One live caption line — the last sentence. Never a transcript, never more
 * than one line of history. */
.ffo-voice__caption {
  position: absolute;
  top: 520px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(560px, calc(100% - 60px));
  text-align: center;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  /* Between utterances. This line was hand-authored at 200ms out / 240ms in
   * before the motion system existed — the same asymmetry the tokens now
   * encode, arrived at independently, which is a decent sign the tokens are
   * tuned right. It reads from them now; "in" moved 240ms -> 260ms. */
  transition: opacity var(--motion-out) var(--ease-overlay);
  opacity: 1;
}
.ffo-voice__caption--in {
  transition-duration: var(--motion-in);
}
.ffo-voice__caption--out {
  opacity: 0;
}

/* A spoken filler — "One second, looking now." — occupies the same line as
   Friday's words but must never be mistaken for them. The faint tier plus a
   touch of italic is the whole treatment: no second colour (voice mode has
   none), no badge, no separate slot. It reads as the machine keeping you
   company while it works, and it is never part of the conversation. */
.ffo-voice__caption--filler {
  color: var(--text-faint);
  font-style: italic;
  font-size: 14px;
}

/* "Still listening…" — shown ONLY while a heard fragment is deliberately being
 * held past the base silence window (a trailing "can you check", or too few
 * words to be a whole request). It is the one thing that makes the longer wait
 * read as attention rather than as a hang, and it is a BUTTON: the founder who
 * knows he is done taps it and the sentence goes at once, instead of sitting
 * out a window designed for the times he was not.
 *
 * Faintest tier, no colour, no dot, no motion — it must not compete with the
 * orb, which is already saying "listening" in the language this screen speaks. */
.ffo-voice__hold {
  position: absolute;
  top: 552px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(560px, calc(100% - 60px));
  padding: 2px 8px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--text-faint);
  cursor: pointer;
  opacity: 0;
  animation: ffo-voice-hold-in var(--motion-in) ease forwards;
}
.ffo-voice__hold:hover,
.ffo-voice__hold:focus-visible {
  color: var(--text-secondary);
}
@keyframes ffo-voice-hold-in {
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ffo-voice__hold {
    animation: none;
    opacity: 1;
  }
}

/* The single honest line about a degraded path — no mic, or no voice
 * configured. One line, quiet, never a banner. */
.ffo-voice__note {
  position: absolute;
  top: 574px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(560px, calc(100% - 60px));
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* Two controls only, bottom-centre, 16px apart. */
.ffo-voice__controls {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
}

.ffo-voice__control {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Page chrome on the page wash: the page control style. */
  background: var(--topbar-pill-bg);
  border: 1px solid var(--topbar-pill-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background var(--motion-hover) ease,
    color var(--motion-hover) ease;
}
.ffo-voice__control:hover {
  color: var(--text-primary);
}
/* Muted reads as the mic struck through, not as a second colour. */
.ffo-voice__control--muted {
  color: var(--text-faint);
}

@media (max-width: 840px) {
  .ffo-voice__menu {
    top: 22px;
    left: 20px;
  }
  .ffo-voice__orb {
    top: 230px;
  }
  .ffo-voice__chip {
    top: 426px;
    max-width: calc(100% - 60px);
  }
  .ffo-voice__caption {
    top: 470px;
    max-width: calc(100% - 60px);
  }
  .ffo-voice__hold {
    top: 502px;
    max-width: calc(100% - 60px);
  }
  .ffo-voice__note {
    top: 524px;
    max-width: calc(100% - 60px);
  }
  .ffo-voice__controls {
    bottom: 48px;
  }
}

/* Reduced motion: the orb is already static (OrbEngine skips its loop). The
 * surface must not fade in either. */
@media (prefers-reduced-motion: reduce) {
  .ffo-voice,
  .ffo-voice__scrim,
  .ffo-voice__orb,
  .ffo-voice[data-closing] .ffo-voice__scrim,
  .ffo-voice[data-closing] .ffo-voice__orb {
    animation: none;
  }
  .ffo-voice__caption {
    transition: none;
  }
  /* The orb is a full-size orb immediately, not a dot that never grew. The
   * `animation: none` above is enough for that — `.ffo-voice__orb` keeps its
   * own `transform: translateX(-50%)` from the base rule and never enters the
   * keyframe's scaled first frame. Stated here because "born from a dot" is
   * exactly the kind of effect that strands an element at 6% if the
   * animation is cancelled the wrong way. */
}
/* Business Brain — artboards 15a-15e.
 *
 * ONE COMPONENT, TWO THEMES. There is not a single light/dark branch below:
 * every colour is a token from styles/tokens.css, and the theme switch changes
 * the table, never the layout.
 *
 * ── THE GEOMETRY, AND WHY IT IS ONE CONSTANT ───────────────────────────────
 *
 * `--brain-spine-x` is the spine's LEFT edge inside the card. The spine is 1px
 * wide, so its centre line is `--brain-spine-x + 0.5px`. Everything that has to
 * sit on that centre line is DERIVED from it below — nothing is hand-tuned,
 * because hand-tuning two paddings is exactly how this broke once:
 *
 *   spine        left: var(--brain-spine-x)                  centre 70.5
 *   piece node   left: calc(var(--brain-spine-x) - 3px)      7px circle -> 70.5
 *   day column   width: calc(var(--brain-spine-x) - 21px)    -> 49px
 *   section label / expansion link / exit pill
 *                padding-left: calc(var(--brain-spine-x) + 1px)  -> 71px
 *
 * The day column is the subtle one. The nightly rows sit on the BARE CANVAS,
 * outside the card, and the card has a 1px border — so the spine's centre,
 * measured from the content column's left edge, is 70.5 + 1 = 71.5. The feed
 * dot's centre is `dayColumn + 20px gap + 2.5px` (half of a 5px dot), so the
 * column must be 71.5 - 22.5 = 49px. At 44px the dot lands 5px left of the
 * spine and the line visibly jogs where the card ends. That was a real defect
 * caught in design review; `calc(var(--brain-spine-x) - 21px)` is what stops it
 * coming back the next time the spine moves.
 *
 * Mobile redefines the single constant (22px) and every derived value follows.
 *
 * ── AMBER IS SIGNAL ONLY ───────────────────────────────────────────────────
 * On this page amber means exactly four things: a tool with something
 * outstanding, a stale piece, the offer link, and the travelling light. No
 * amber fills, no amber buttons. And NEVER red — the product's one severe
 * colour is reserved for a single overdue dot elsewhere and appears nowhere
 * here, in any state.
 */

.ffo-brain {
  --brain-spine-x: 70px;
  --brain-row-indent: 100px;
  --brain-node: 7px;
  /* Derived. Do not replace either of these with a literal. */
  --brain-node-x: calc(var(--brain-spine-x) - 3px);
  --brain-day-col: calc(var(--brain-spine-x) - 21px);
  --brain-rail: calc(var(--brain-spine-x) + 1px);

  padding-top: 120px;
}

.ffo-brain__label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
}

.ffo-brain__degraded {
  margin-top: 22px;
  max-width: 620px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* --- The self-report ------------------------------------------------------
 * One 17px line, and the only summary on the page. There is deliberately no
 * meter, no count and no percentage beside it. */

.ffo-brain__report {
  margin-top: 22px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.ffo-brain__report-dot {
  position: relative;
  flex: none;
  width: var(--brain-node);
  height: var(--brain-node);
  /* Sits on the first line of a 17px/1.5 sentence. */
  margin-top: 9px;
}

.ffo-brain__report-dot-core,
.ffo-brain__report-dot-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--amber);
}

/* The product's standard status pulse — a concentric ring, not a throb. */
.ffo-brain__report-dot-ring {
  animation: ffo-pulse 2.8s ease-out infinite;
}

.ffo-brain__report-line {
  margin: 0;
  max-width: 700px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-primary);
}

/* The clause that names what is missing. Muted, never hidden. */
.ffo-brain__report-gap {
  color: var(--text-muted);
}

/* --- The spine card ------------------------------------------------------
 * Rows carry their own horizontal padding so hover fills bleed to the card
 * edge — hence `padding: 42px 0` here rather than a uniform inset. */

.ffo-brain__card {
  position: relative;
  margin-top: 46px;
  padding: 42px 0;
  border-radius: var(--radius-card);
  background: var(--card-bg);
  /* data-surface="card" in BusinessBrain.tsx; opaque, no blur (Evening Desk). */
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  transition:
    transform var(--motion-lift) var(--ease-overlay),
    box-shadow var(--motion-lift) var(--ease-overlay),
    border-color var(--motion-lift) var(--ease-overlay),
    background-color var(--motion-lift) var(--ease-overlay);
}

/* The card hover (see primitives.css for the full reasoning). This card is not
 * a `Card`, but unlike `.ffo-card` it is not `overflow: hidden`, so it can use
 * the other cure for the edge strobe: a transparent strip that reaches 3px
 * below the card and rises with it, keeping the cursor over the card's old
 * bottom edge. It paints nothing and takes the same hover it is part of. */
.ffo-brain__card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 3px;
}
@media (hover: hover) and (pointer: fine) {
  .ffo-brain__card:hover {
    background-color: var(--card-bg-lift);
    border-color: var(--card-border-lift);
    box-shadow: var(--card-shadow-lift);
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ffo-brain__card:hover {
    transform: translateY(var(--lift-y));
  }
}

.ffo-brain__spine {
  position: absolute;
  left: var(--brain-spine-x);
  top: 52px;
  bottom: 52px;
  width: 1px;
  overflow: hidden;
  background: var(--hairline);
  pointer-events: none;
}

/* The one moving thing on the page besides the status pulse. An absolutely-
 * positioned child inside a 1px overflow-hidden column: cheap, composited, no
 * layout. Never animate background-position on the spine itself.
 *
 * 8s ease-in-out — the SAME clock as the voice orb's breath, so the page reads
 * as the same organism rather than as two things ticking past each other. */
.ffo-brain__spine-light {
  position: absolute;
  left: 0;
  width: 1px;
  height: 40%;
  background: linear-gradient(
    180deg,
    rgba(224, 168, 120, 0),
    rgba(224, 168, 120, 0.85),
    rgba(224, 168, 120, 0)
  );
  animation: brain-flow 8s ease-in-out infinite;
}

[data-theme='dark'] .ffo-brain__spine-light {
  background: linear-gradient(
    180deg,
    rgba(224, 168, 120, 0),
    rgba(224, 168, 120, 0.95),
    rgba(224, 168, 120, 0)
  );
}

@keyframes brain-flow {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100%);
  }
}

/* base.css already stops every animation under reduced motion — but a STOPPED
 * gradient child is a visible amber blob parked on the hairline, not a
 * hairline. The spec asks for a static hairline with no gradient child at all,
 * so it is removed rather than frozen. */
@media (prefers-reduced-motion: reduce) {
  .ffo-brain__spine-light {
    display: none;
  }
}

/* --- A piece row --------------------------------------------------------- */

.ffo-brain__row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  padding: 16px 40px 16px var(--brain-row-indent);
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background var(--motion-hover) var(--ease-overlay);
}

.ffo-brain__row:hover,
.ffo-brain__row:focus-visible {
  background: var(--row-hover);
}

/* A stale row takes a wash — the fourth-loudest of the five stale signals, and
 * still nowhere near a warning banner. */
.ffo-brain__row--stale {
  background: rgba(224, 168, 120, 0.05);
}

.ffo-brain__node {
  position: absolute;
  left: var(--brain-node-x);
  top: 22px;
  width: var(--brain-node);
  height: var(--brain-node);
  border-radius: 50%;
  box-sizing: border-box;
  background: var(--dot-neutral);
}

/* Something outstanding — a tool waiting on a key. SOLID amber. */
.ffo-brain__node--attention {
  background: var(--amber);
}

/* Stale — an unfilled amber ring. The hollow shape is the point: the piece is
 * still there, it is just no longer filled in. */
.ffo-brain__node--stale {
  background: transparent;
  border: 1.5px solid var(--amber);
}

/* The open end of the spine. Unfilled, neutral, and the whole row it sits on
 * is the drop target — the invitation is structural, not a button. */
.ffo-brain__node--hollow {
  top: 26px;
  background: var(--pill-translucent);
  border: 1.5px solid var(--text-gated);
}

.ffo-brain__row-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-width: 0;
}

.ffo-brain__row-name {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.ffo-brain__row-line {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* `display: inline`, not the button default of inline-block: the report link
 * is the tail of the offer's own sentence and has to flow with it. As an
 * inline-block it cannot break, so it dropped to a line of its own the moment
 * the sentence ran past the column — which is what Friday's real, longer offer
 * line did on the first live render. */
.ffo-brain__inline-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--amber-text);
  cursor: pointer;
}

.ffo-brain__inline-link:hover {
  color: var(--amber-text-strong);
}

.ffo-brain__row-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: none;
  padding-top: 2px;
}

.ffo-brain__freshness {
  font-size: 12.5px;
  color: var(--text-faintest);
  white-space: nowrap;
}

.ffo-brain__freshness--stale {
  color: var(--amber-text);
}

/* Hover-only. The row itself is the click target; this is a label naming what
 * the click does, not the only way in — which is why it can be invisible at
 * rest without stranding anybody. Focus reveals it too, so keyboard users are
 * not the ones left guessing. */
.ffo-brain__revisit {
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--motion-hover) var(--ease-overlay);
}

.ffo-brain__row:hover .ffo-brain__revisit,
.ffo-brain__row:focus-visible .ffo-brain__revisit {
  opacity: 1;
  color: var(--amber-text);
}

/* --- The hollow node / drop target --------------------------------------- */

.ffo-brain__feed {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-top: 10px;
  padding: 20px 40px 4px var(--brain-row-indent);
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background var(--motion-hover) var(--ease-overlay);
}

.ffo-brain__feed:hover,
.ffo-brain__feed:focus-visible {
  background: var(--row-hover);
}

/* Drag-over: the ring fills amber and the row takes the hover fill. No dashed
 * border, no upload icon, no "browse" button — the shape already said it. */
.ffo-brain__feed--over {
  background: var(--row-hover);
}

.ffo-brain__feed--over .ffo-brain__node--hollow {
  background: var(--amber);
  border-color: var(--amber);
}

.ffo-brain__feed-line {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* --- While you slept ------------------------------------------------------
 * On the bare canvas, no card. The spine's x is picked back up here: inside
 * the card is what it was taught, outside is what it worked out alone. */

.ffo-brain__section-label {
  margin-top: 68px;
  padding-left: var(--brain-rail);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.ffo-brain__nightly-empty {
  margin: 20px 0 0;
  padding-left: var(--brain-rail);
  max-width: 620px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.ffo-brain__nightly {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ffo-brain__nightly-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.ffo-brain__day {
  width: var(--brain-day-col);
  flex: none;
  padding-top: 3px;
  text-align: right;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-gated);
}

.ffo-brain__feed-dot {
  width: 5px;
  height: 5px;
  flex: none;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--dot-neutral);
}

/* Secondary-muted: quieter than the card, louder than a timestamp. This must
 * read as evidence of life, not a changelog — hence no icons, no "AI" badge,
 * no expand chevrons anywhere in this block. */
.ffo-brain__nightly-line {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-nav);
}

[data-theme='dark'] .ffo-brain__nightly-line {
  color: var(--text-secondary);
}

.ffo-brain__more {
  display: block;
  margin-top: 30px;
  margin-left: var(--brain-rail);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-faintest);
  cursor: pointer;
  transition: color var(--motion-hover) var(--ease-overlay);
}

.ffo-brain__more:hover {
  color: var(--text-muted);
}

/* --- First arrival: the one primary pill --------------------------------- */

.ffo-brain__exit {
  margin-top: 56px;
  padding-left: var(--brain-rail);
}

.ffo-brain__pill {
  padding: 12px 26px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--button-primary-bg);
  color: var(--button-primary-fg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--motion-hover) var(--ease-overlay),
    scale var(--motion-hover) var(--ease-overlay);
}

.ffo-brain__pill:hover {
  background: var(--button-primary-hover);
}

/* --- Mobile (15e) --------------------------------------------------------
 * The constant moves; every derived value follows. Rows STACK — name,
 * knowledge line, freshness — so there is no right-aligned column and no
 * hover-only "Revisit" (the row is tapped). The feed lines stack too and drop
 * their dots: the spine doesn't continue at this width, and the stacking
 * already carries the rhythm. */

@media (max-width: 840px) {
  .ffo-brain {
    --brain-spine-x: 22px;
    --brain-row-indent: 46px;
    padding-top: 78px;
  }

  .ffo-brain__card {
    margin-top: 32px;
    padding: 28px 0;
  }

  .ffo-brain__spine {
    top: 36px;
    bottom: 36px;
  }

  .ffo-brain__row {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    padding: 14px 22px 14px var(--brain-row-indent);
  }

  .ffo-brain__node {
    top: 20px;
  }

  .ffo-brain__row-body {
    gap: 7px;
  }

  .ffo-brain__row-meta {
    padding-top: 0;
  }

  /* No hover on a touch screen, so a hover-only label would be a label nobody
     ever sees. The row is the affordance. */
  .ffo-brain__revisit {
    display: none;
  }

  .ffo-brain__feed {
    padding: 18px 22px 4px var(--brain-row-indent);
  }

  .ffo-brain__node--hollow {
    top: 24px;
  }

  .ffo-brain__section-label {
    margin-top: 48px;
    padding-left: 0;
  }

  .ffo-brain__nightly-empty,
  .ffo-brain__more,
  .ffo-brain__exit {
    padding-left: 0;
    margin-left: 0;
  }

  .ffo-brain__nightly-row {
    flex-direction: column;
    gap: 6px;
  }

  .ffo-brain__day {
    width: auto;
    text-align: left;
    padding-top: 0;
  }

  .ffo-brain__feed-dot {
    display: none;
  }
}
/* V2 login screen. Uses V2's own tokens (styles/tokens.css) rather than V1's
   orange set, so it inherits light/dark with the rest of the shell. */

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  /* The page around the card: the dark page (sand in light mode). */
  background: var(--page-bg);
  color: var(--page-text);
}

.login__card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  /* data-surface="card" in Login.tsx: everything inside reads card ink. */
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 32px 28px;
}

.login__brand {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.login__title {
  margin: 20px 0 4px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
}

.login__sub {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.login__hint {
  /* Sits under its field (which already has 16px below it), then 16px to the next field. */
  margin: -8px 0 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.login__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.login__input {
  font: inherit;
  font-size: 15px;
  color: var(--text-primary);
  /* A field on a light card: the sand band ground, never the dark page. */
  background: var(--band);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  margin-bottom: 16px;
  outline: none;
  transition: border-color var(--motion-hover, 120ms) ease;
}

.login__input:focus-visible {
  border-color: var(--button-primary-bg);
  box-shadow: 0 0 0 3px var(--row-selected);
}

.login__error {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--severe);
}

.login__submit {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--button-primary-fg);
  background: var(--button-primary-bg);
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 16px;
  cursor: pointer;
  transition:
    background var(--motion-hover, 120ms) ease,
    scale var(--motion-hover) var(--ease-overlay);
}

.login__submit:hover:not(:disabled) {
  background: var(--button-primary-hover);
}

.login__submit:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Blank frame while /api/auth/me is in flight — never a flash of the shell
   or of the login form before we know which one is correct. */
.auth-gate-blank {
  min-height: 100dvh;
  background: var(--page-bg);
}
/* The Offer report — 720px column, per the design's own width token. */

.ffo-offer-page {
  width: min(var(--width-offer), 100%);
  margin: 0 auto;
  padding: 120px 0 88px;
}

@media (max-width: 840px) {
  .ffo-offer-page {
    padding: 96px 20px 88px;
  }
}

/* Embedded (OnboardingV2's "Your Offer" step, confirmed state): the wizard
 * column already owns the width and the top-of-screen spacing, so the report
 * drops both and just flows as the step body. Nothing else about it changes —
 * radar, document, action pills render identically to the standalone page. */
.ffo-offer-page--embedded {
  width: 100%;
  padding: 0;
}

.ffo-offer-kicker {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.ffo-offer-name {
  margin: 10px 0 6px;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.ffo-offer-verdict {
  margin: 0 0 34px;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* --- Radar card ---------------------------------------------------------- */

.ffo-offer-radar-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ffo-offer-radar {
  width: 100%;
  max-width: 520px;
  height: auto;
}

.ffo-offer-radar__ring {
  fill: none;
  stroke: var(--hairline);
  stroke-width: 1;
  opacity: 0.7;
}

.ffo-offer-radar__axis {
  stroke: var(--hairline);
  stroke-width: 1;
}

.ffo-offer-radar__shape {
  fill: rgba(224, 168, 120, 0.08);
  stroke: var(--amber);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.ffo-offer-radar__dot {
  fill: var(--amber);
  transition: r var(--motion-in) var(--ease-overlay);
}
.ffo-offer-radar__dot--severe {
  fill: var(--severe);
}

.ffo-offer-radar__label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  fill: var(--text-faint);
}
.ffo-offer-radar__label-name {
  text-transform: uppercase;
}
.ffo-offer-radar__label-score {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  fill: var(--text-faint);
}
.ffo-offer-radar__label--focus,
.ffo-offer-radar__label--focus .ffo-offer-radar__label-score {
  fill: var(--text-secondary);
}

.ffo-offer-radar-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* --- The offer document, flowing text on the canvas ---------------------- */

.ffo-offer-doc {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.ffo-offer-doc__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ffo-offer-doc__heading {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.ffo-offer-doc__line {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-body);
}
.ffo-offer-doc__line-text {
  flex: 1;
  min-width: 0;
}

.ffo-offer-doc__value {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

/* --- Prose blocks ---------------------------------------------------------
 * The body is rendered by the shared <Markdown> component (the conversation
 * panel's — react-markdown, raw HTML off). That component is tuned for a chat
 * panel; this is a DOCUMENT. Everything below re-registers it: the report's
 * 14px/1.7 body, headings that read as labels rather than as shouts, and a
 * checklist that sits flush in the column instead of hanging off a bullet.
 * No second renderer, no forked styles — an override layer, scoped here. */

.ffo-offer-doc__prose .ffo-md {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-body);
}

.ffo-offer-doc__prose .ffo-md p {
  margin: 0 0 12px;
}

/* A heading INSIDE a section body (the agent's own sub-heading) takes the
 * same tracked-label treatment as a section label, one step quieter — the
 * document has exactly one level of hierarchy and this keeps it that way. */
.ffo-offer-doc__prose .ffo-md h1,
.ffo-offer-doc__prose .ffo-md h2,
.ffo-offer-doc__prose .ffo-md h3,
.ffo-offer-doc__prose .ffo-md h4 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 20px 0 8px;
}

.ffo-offer-doc__prose .ffo-md ul,
.ffo-offer-doc__prose .ffo-md ol {
  margin: 0 0 12px;
  padding-left: 20px;
}
.ffo-offer-doc__prose .ffo-md li {
  margin: 0 0 6px;
}

/* BEFORE YOU SELL THIS: a GFM task list. The marker is the point of the
 * section, so it keeps its box and loses the list indent. */
.ffo-offer-doc__prose .ffo-md li:has(> input[type='checkbox']) {
  list-style: none;
  margin-left: -20px;
}
.ffo-offer-doc__prose .ffo-md input[type='checkbox'] {
  margin-right: 8px;
  accent-color: var(--text-faint);
}

.ffo-offer-doc__prose .ffo-md blockquote {
  margin: 0 0 12px;
  padding-left: 14px;
  border-left: 2px solid var(--hairline);
  color: var(--text-secondary);
}

/* A legacy document may still carry a table. It stays inside its own scroll
 * box (the component's own rule) and picks up the document's type. */
.ffo-offer-doc__prose .ffo-md table {
  font-size: 13px;
}

/* --- Actions --------------------------------------------------------------- */

.ffo-offer-actions {
  margin-top: 52px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.ffo-offer-pdf-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* OFFER-3 (freshness): the report stays on screen after a failed refresh —
 * never blanked, never silently shown as if it were current — but says so.
 * Same house register as Today's overdue note (Today.css): faint, reports,
 * doesn't alarm. Never a red banner. */
.ffo-offer-stale {
  margin: 0 0 20px;
  font-size: 12.5px;
  color: var(--text-nav);
}

.ffo-offer-stale__retry {
  margin-left: 4px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-nav);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color var(--motion-hover) ease;
}
.ffo-offer-stale__retry:hover,
.ffo-offer-stale__retry:focus-visible {
  color: var(--amber-text-strong);
}

/* OFFER-11: the other offer documents on file, reachable without leaving the
 * report — a quiet inline text link row, not a pill. */
.ffo-offer-others {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.ffo-offer-other {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: transparent;
  cursor: pointer;
  transition: text-decoration-color var(--motion-hover) ease, color var(--motion-hover) ease;
}
.ffo-offer-other:hover,
.ffo-offer-other:focus-visible {
  color: var(--amber-text-strong);
  text-decoration-color: currentColor;
}

/* --- Empty / loading ------------------------------------------------------- */

.ffo-offer-empty {
  padding: 60px 0;
  font-size: 14.5px;
  color: var(--text-muted);
}

.ffo-offer-skel {
  border-radius: 999px;
  background: var(--divider);
  animation: ffo-skeleton 1.6s ease-in-out infinite;
}
.ffo-offer-skel--label {
  width: 160px;
  height: 9px;
}
.ffo-offer-skel--name {
  margin-top: 14px;
  width: 260px;
  height: 20px;
}
.ffo-offer-skel--verdict {
  margin-top: 12px;
  margin-bottom: 34px;
  width: 340px;
  height: 9px;
}
.ffo-offer-skel--radar {
  width: 100%;
  height: 340px;
  border-radius: var(--radius-card);
}
/* "Connect your Telegram" (TelegramConnect.tsx): the waiting link as a button and a QR, side by side; stacked on a phone. */
.ffo-tg {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
  margin: 12px 0 4px;
}
.ffo-tg__go {
  flex: 1 1 240px;
  min-width: 0;
}
.ffo-tg__go .ffo-pill {
  display: inline-block;
  text-decoration: none;
}
.ffo-tg__how {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-muted);
}
.ffo-tg__qr {
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: #ffffff;
}
.ffo-tg__waiting {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 6px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.ffo-tg__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: ffo-tg-pulse 1.2s infinite;
}
@keyframes ffo-tg-pulse {
  50% {
    opacity: 0.25;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ffo-tg__dot {
    animation: none;
  }
}
@media (max-width: 520px) {
  .ffo-tg__qr {
    display: none; /* on a phone the button is the way: a QR on the same screen cannot be scanned */
  }
}
/* The WhatsApp numbers rows (WhatsappNumbers.tsx), shared by Settings → Channels and the onboarding card. */
.ffos-ch-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.ffos-ch-note a {
  color: var(--amber-text-strong);
}

.ffos-ch-said {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--severe);
}
.ffos-ch-said--ok {
  color: var(--amber-text);
}

.ffos-ch-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-secondary);
}

.ffos-ch-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
}
.ffos-ch-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}
.ffos-ch-row__full {
  flex: 1 1 100%;
}
.ffos-ch-row__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.ffos-ch-row__phone {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.ffos-ch-row__detail {
  font-size: 12.5px;
  color: var(--text-faint);
}
/* "How {agent} answers your leads": the sample chat, the follow-up samples, what is on. Tokens only (styles/tokens.css),
 * so both themes follow. */

.ffo-lr-chat {
  list-style: none;
  margin: 22px 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
}
.ffo-lr-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.ffo-lr-msg--lead {
  align-self: flex-start;
  background: var(--card-bg);
  color: var(--text-primary);
}
.ffo-lr-msg--agent {
  align-self: flex-end;
  background: var(--pill-bg);
  color: var(--text-primary);
}
.ffo-lr-msg__who {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--text-faint);
}

.ffo-lr-sub {
  margin: 26px 0 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}
.ffo-lr-chase ul,
.ffo-lr-on ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
}
.ffo-lr-chase li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.ffo-lr-chase__when {
  font-size: 12px;
  color: var(--text-faint);
}
.ffo-lr-on li {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}
.ffo-lr-why {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
}

.ffo-lr-draft {
  margin-top: 10px;
  max-width: 520px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--card-bg);
}
.ffo-lr-draft summary {
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-primary);
}
.ffo-lr-draft ol {
  margin: 10px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ffo-lr-draft li {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.ffo-lr-draft li span {
  display: block;
}

/* Who the turn-on also starts messaging among the uploaded people, and the tick that says yes to it. */
.ffo-lr-reach {
  margin: 12px 0 0;
}
.ffo-lr-reach__yes {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 6px;
  cursor: pointer;
}
.ffo-lr-reach__yes input {
  margin-top: 3px;
  flex: none;
}

/* "Change them here": the follow-up editor (Jay, 27 Nov 2026: ready-made or own words, up to six per channel). */
.ffo-lr-edit {
  margin-top: 12px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ffo-lr-edit__step {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ffo-lr-edit__step input,
.ffo-lr-edit__step select,
.ffo-lr-edit__step textarea {
  font: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 6px 8px;
  max-width: 100%;
  box-sizing: border-box;
}
.ffo-lr-edit__step textarea {
  min-height: 88px;
  resize: vertical;
}
.ffo-lr-edit__day {
  font-size: 12px;
  color: var(--text-faint);
}
.ffo-lr-edit__day input {
  width: 64px;
  margin-left: 6px;
}
/* Onboarding V2 — full-screen calm canvas. No drawer, no ⌘K: nothing
 * competes. Centred 640px column. */

.ffo-onb-shell {
  min-height: 100vh;
  width: 100%;
  background: var(--canvas);
  display: flex;
  justify-content: center;
  position: relative;
}

/* --- The way out (top-right) ----------------------------------------------
 * "Skip for now" is deliberately the smallest text on the screen and the
 * faintest colour in the system. Leaving is ALLOWED — a founder who wants to
 * look around first must be able to — but it is not what is being offered, so
 * it is never a Pill and never sits beside the primary action. */

.ffo-onb-escape {
  position: absolute;
  top: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 60vw;
}

.ffo-onb-escape__link {
  font-size: 12.5px;
  color: var(--text-faint);
  transition: color var(--motion-hover) ease;
}
.ffo-onb-escape__link:hover:not(:disabled) {
  color: var(--text-muted);
}
.ffo-onb-escape__link:disabled {
  opacity: 0.5;
}

.ffo-onb-escape__note {
  font-size: 12.5px;
  color: var(--amber-text-strong);
  text-align: right;
}

.ffo-onb-col {
  width: min(var(--width-onboarding), 100%);
  padding: 96px 24px 88px;
}

/* --- Progress dots -------------------------------------------------------- */

.ffo-onb-dots {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 56px;
}

.ffo-onb-dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}

/* Each dot is a BUTTON now (ONB-5): it carries the step's name and state in
 * `aria-label`/`title`, not colour alone, and takes the founder back to that
 * step. The visible mark is the `::before` circle; state is a SHAPE
 * difference (filled+check / hollow+bar / ring / faint fill), not just a hue,
 * so it reads the same to someone who can't tell amber from neutral. */
.ffo-onb-dot {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex: none;
}
.ffo-onb-dot:disabled {
  cursor: default;
}
.ffo-onb-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-sizing: border-box;
}
.ffo-onb-dot--done::before {
  width: 11px;
  height: 11px;
  background: var(--text-secondary);
  /* A check, drawn in the page colour, so "done" is a shape and not a hue. */
  box-shadow: inset 0 0 0 2px var(--canvas);
}
.ffo-onb-dot--skipped::before {
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--text-faint);
  background: linear-gradient(var(--text-faint), var(--text-faint)) center / 5px 1.5px no-repeat;
}
.ffo-onb-dot--current::before {
  border: 1.5px solid var(--amber);
}
.ffo-onb-dot--ahead::before {
  background: var(--dot-neutral);
  opacity: 0.6;
}

.ffo-onb-dot-label {
  position: absolute;
  /* The dot grew from a 7px mark to a 24px button (ONB-5, so it has room for
   * an aria-label/click target) — the label sits below the button now, not
   * below the old small mark. */
  top: 30px;
  width: max-content;
  max-width: 120px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-text);
}
/* Centred under its dot, a wide label hangs past the rail's ends: at 375px
 * the first one sat 13px off-screen (Task 15 visual check). The end labels
 * are anchored to the rail's edges instead, so every label stays in view. */
.ffo-onb-dot-wrap:first-child .ffo-onb-dot-label {
  left: 0;
  text-align: left;
}
.ffo-onb-dot-wrap:last-child .ffo-onb-dot-label {
  right: 0;
  text-align: right;
}

.ffo-onb-body {
  min-height: 320px;
}

.ffo-onb-line {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 18px;
}

.ffo-onb-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
}
.ffo-onb-actions--end {
  justify-content: flex-end;
}

.ffo-onb-textlink {
  font-size: 13.5px;
  color: var(--text-faint);
  transition: color var(--motion-hover) ease;
}
.ffo-onb-textlink:hover {
  color: var(--amber-text-strong);
}

/* "Skip →" — the pill's own label, arrow glyph included. Matches the
 * design system's 12px/stroke-1.2 icon family (components/icons.tsx) rather
 * than a typographic "→": crisper across themes and pixel densities, and one
 * fewer ad hoc glyph in the codebase. */
.ffo-onb-skippill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --- Conversation steps ---------------------------------------------------- */

.ffo-onb-step__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 480px;
}

/* Where this step actually stands, per the adapter — not per the browser. */
.ffo-onb-step__status {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-faint);
}

/* The refusal line. Amber, not red: the adapter declining to tick a step
 * because the page it needs isn't written yet is guidance, not an error. */
.ffo-onb-step__note {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--amber-text-strong);
  max-width: 480px;
}

.ffo-onb-step__paste {
  margin-top: 24px;
}

.ffo-onb-step__textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  resize: vertical;
}
.ffo-onb-step__textarea:focus {
  outline: none;
  border-color: var(--amber-text-strong);
}

/* "Skip all of this for now" / "Back" — both quieter than the text links in
 * the action row, because both are ways of NOT doing the thing on screen.
 * `.ffo-onb-skipstep` used to be "Come back to this later"; it is now the
 * whole-onboarding skip (see SkipAllLink) and kept the identical quiet
 * treatment since nothing about how loud it should be has changed. */
.ffo-onb-skipstep,
.ffo-onb-back {
  margin-top: 30px;
  font-size: 12.5px;
  color: var(--text-faint);
  transition: color var(--motion-hover) ease;
}
.ffo-onb-skipstep:hover,
.ffo-onb-back:hover {
  color: var(--text-muted);
}
.ffo-onb-skipstep:disabled {
  opacity: 0.5;
}
.ffo-onb-back {
  display: block;
  margin-top: 48px;
}

.ffo-onb-skipall-wrap .ffo-onb-step__note {
  margin-top: 10px;
}

/* --- Exit ------------------------------------------------------------------- */

.ffo-onb-exit__line {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 14px;
}

.ffo-onb-exit__sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 34px;
}

.ffo-onb-finish-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 420px;
}
.ffo-onb-finish-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 14.5px;
  color: var(--text-primary);
}

.ffo-onb-open {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Each open step: a way BACK, not a way out — the opposite treatment from
 * `.ffo-onb-skipstep`'s quiet faint-grey text. A visible pill invites the
 * click that finishes setup, rather than reading as one more exit next to
 * the real one below it (Jev n-open-steps, Task 12 deferred minor). */
.ffo-onb-openstep {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  font-size: 13.5px;
  color: var(--text-secondary);
  transition:
    color var(--motion-hover) ease,
    background var(--motion-hover) ease,
    border-color var(--motion-hover) ease;
}
.ffo-onb-openstep:hover {
  color: var(--text-primary);
  background: var(--row-hover);
  border-color: var(--amber-border-hover);
}


/* --- The Messaging stop ----------------------------------------------------
 * "Get your messaging ready": up to three numbered cards on the calm canvas.
 * State is a word as well as a colour (the chip says Done / Skipped). */

.ffo-newtag {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--amber-chip);
  color: var(--amber-text-strong);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 4px;
}

.ffo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--amber-chip);
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.55;
}

.ffo-card {
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}
.ffo-card__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.ffo-card__num {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--pill-bg);
  color: var(--text-muted);
  font-size: 13px;
}
.ffo-card--done .ffo-card__num {
  background: var(--sage-text);
  border-color: var(--sage-text);
  color: var(--card-bg); /* on the sage-text disc, inside a light card */
}
.ffo-card--skipped .ffo-card__num {
  background: var(--amber-chip);
  border-color: transparent;
  color: var(--amber-text-strong);
}
.ffo-card__body {
  flex: 1;
  min-width: 0;
}
.ffo-card__title {
  margin: 2px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}
.ffo-card__text,
.ffo-card__sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 480px;
}
.ffo-card__sub {
  margin-top: 8px;
}
.ffo-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 14px;
}

.ffo-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 400;
  vertical-align: 2px;
}
.ffo-chip--ok {
  background: var(--hairline);
  color: var(--sage-text);
}
.ffo-chip--skip {
  background: var(--amber-chip);
  color: var(--amber-text-strong);
}
.ffo-chip--wait {
  background: var(--pill-bg);
  border: 1px solid var(--hairline);
  color: var(--text-muted);
}

.ffo-waiting {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 6px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.ffo-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: ffo-pulse 1.2s infinite;
}
@keyframes ffo-pulse {
  50% {
    opacity: 0.25;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ffo-pulse {
    animation: none;
  }
}

.ffo-msg__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
}
.ffo-msg__foot .ffo-onb-skipall-wrap {
  margin-right: auto;
}
.ffo-msg__foot .ffo-onb-skipstep {
  margin-top: 0;
}
.ffo-msg__foot > .ffo-pill:last-child {
  margin-left: auto;
}

/* WhatsApp card: the number picker, the Meta card step, the profile. */
.ffo-wa__panel,
.ffo-wa__sub {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  max-width: 520px;
}
.ffo-wa__panel-title,
.ffo-wa__subtitle {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.ffo-wa__field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.ffo-wa__field--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.ffo-wa__field select,
.ffo-wa__field input,
.ffo-wa__field textarea {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--card-bg);
  color: var(--text-primary);
  font: inherit;
  max-width: 100%;
}
.ffo-wa__line {
  margin: 8px 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.ffo-wa__muted {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-faint);
}
.ffo-wa__note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--amber-text-strong);
  max-width: 480px;
}
.ffo-wa__roles {
  border: 0;
  margin: 12px 0 0;
  padding: 0;
  min-width: 0;
}
.ffo-wa__roles-label {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.ffo-wa__roles-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ffo-wa__role {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--pill-border);
  border-radius: var(--radius-pill);
  background: var(--pill-translucent);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  cursor: pointer;
}
.ffo-wa__role input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.ffo-wa__role:has(input:checked) {
  border-color: var(--amber-border-select);
  background: var(--pill-bg);
  color: var(--text-primary);
  font-weight: 500;
}
.ffo-wa__role:has(input:checked)::before {
  content: '\2713';
  font-size: 12px;
}
.ffo-wa__role:has(input:focus-visible) {
  outline: 2px solid var(--amber-border-select);
  outline-offset: 2px;
}
.ffo-wa__link {
  text-decoration: none;
}
.ffo-wa__tick {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.ffo-wa__profile {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}
.ffo-wa__prow {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.ffo-wa__prow > span:first-child {
  color: var(--text-muted);
}
.ffo-wa__count {
  align-self: flex-end;
  font-size: 12px;
  color: var(--text-faint);
}
.ffo-wa__count--over {
  color: var(--amber-text-strong);
  font-weight: 500;
}
.ffo-wa__saved {
  font-size: 13px;
  color: var(--sage-text);
}
/* Channels: one column of frosted cards. Same container, tokens and form
 * vocabulary as Settings (.ffos-settings-page / .ffos-pass-field), defined
 * locally so this screen owns its own stylesheet. Status is always WORDS next
 * to a dot, never the dot's colour alone. */

.ffos-ch-page {
  width: min(var(--width-content), 100%);
  margin: 0 auto;
  padding: 176px 0 88px;
}
@media (max-width: 1180px) {
  .ffos-ch-page {
    padding-left: 40px;
    padding-right: 40px;
  }
}
@media (max-width: 840px) {
  .ffos-ch-page {
    padding: 96px 20px 88px;
  }
}

.ffos-ch-pagetitle {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.ffos-ch-pagesub {
  margin: 0 0 24px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.ffos-ch-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.ffos-ch-attention {
  margin: 0 0 18px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--amber-border-hover);
  background: var(--amber-drop-fill);
}
.ffos-ch-attention__title {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--amber-text-strong);
}

.ffos-ch-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ffos-ch-card section {
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ffos-ch-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ffos-ch-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
}
.ffos-ch-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.ffos-ch-statusline,
.ffos-ch-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.ffos-ch-actions__group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.ffos-ch-confirm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ffos-ch-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
.ffos-ch-step__title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}
.ffos-ch-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.ffos-ch-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.ffos-ch-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  font-size: 13px;
  color: var(--text-muted);
}
.ffos-ch-field input,
.ffos-ch-field textarea {
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--pill-translucent);
  border: 1px solid var(--pill-border);
  border-radius: 12px;
  padding: 11px 14px;
  resize: vertical;
}
.ffos-ch-field input:focus,
.ffos-ch-field textarea:focus {
  outline: none;
  border-color: var(--amber-border-hover);
}

.ffos-ch-code {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--pill-translucent);
  border: 1px solid var(--pill-border);
  font-size: 12.5px;
  color: var(--text-secondary);
  overflow-x: auto;
}
.ffos-ch-file {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 100%;
}

.ffos-ch-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.ffos-ch-result {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ffos-ch-family {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}
.ffos-ch-family__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.ffos-ch-words summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
}
.ffos-ch-messages {
  margin: 10px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ffos-ch-messages li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-primary);
}
.ffos-ch-messages__when {
  display: block;
  font-size: 12px;
  color: var(--text-faint);
}
.ffos-ch-messages__subject {
  display: block;
  font-weight: 500;
}
.ffos-ch-messages__words {
  display: block;
  white-space: pre-wrap;
}

/* The briefing. Portalled to <body>: a card's hover lift is a transform, and a
 * fixed element inside a transformed ancestor is fixed to the ancestor. */
.ffos-ch-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--scrim);
}
.ffos-ch-dialog {
  width: min(560px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 30px;
  border-radius: var(--radius-card);
  /* data-surface="card" in Channels.tsx: a light dialog over the scrim. */
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: var(--card-shadow);
}
.ffos-ch-dialog__text {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.6;
}

.ffos-ch-dismiss {
  font: inherit;
  font-size: 12.5px;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0 0 0 6px;
  cursor: pointer;
  text-decoration: underline;
}
.ffos-ch-dialog:focus {
  outline: none;
}
/* --- LiveCount: the amber glow behind a number that just changed -----------
 *
 * (Jay, 2026-10-14.) The roll is NumberFlow's, in JS. This is the other half:
 * for --motion-glow a soft amber halo sits behind the figure and fades out, so
 * a count that moved while you were looking says so.
 *
 * AMBER IS SIGNAL, and this is one: "this changed". It appears only on a real
 * change after first paint (LiveCount.tsx — never on load, never when the value
 * is the same), and it is the accent at an alpha (`--amber-glow`), not a second
 * colour. It never pulses, never loops, and never carries the red dot's job.
 *
 * A PSEUDO-ELEMENT ON THE NUMBER'S OWN BOX, animating opacity only. Not a
 * box-shadow animation (that repaints every frame) and nothing on the card or
 * header around it: the Today header and every `.ffo-card` are surfaces other
 * things sit behind or blur through, and an animated layer on them would drag
 * their whole layer into the animation. The halo is a small sibling-level layer
 * that composites on its own.
 *
 * `isolation: isolate` + `z-index: -1` put the halo behind the digits without
 * dropping it behind the card behind them. `inset` is negative so the halo
 * reaches past the figure; the radial gradient reaches zero at its edge, so no
 * rectangle is ever visible. (The one place it can be clipped is the Sales
 * strip's collapsed-row wrapper, which clips at its own edge — the halo is soft
 * enough that a trimmed top edge on the second row does not read.)
 *
 * TWO KEYFRAMES, ALTERNATED (`data-glow="a"` / `"b"`), because a CSS animation
 * is identified by its name: set the same name again and the browser sees the
 * animation it already finished and plays nothing. Swapping the name is what
 * starts a new one, which is how a second change inside the first glow's
 * lifetime restarts the glow instead of being swallowed. Same lesson, and the
 * same cure, as the `-out` keyframes in styles/base.css.
 *
 * No `data-glow` attribute means no pseudo-element animation at all. The global
 * reduced-motion rule (base.css) would kill the animation anyway, and
 * LiveCount does not set the attribute under it. */

.ffo-live {
  position: relative;
  isolation: isolate;
}

.ffo-live::before {
  content: '';
  position: absolute;
  inset: -22px -32px;
  z-index: -1;
  border-radius: 32px;
  background: radial-gradient(closest-side, var(--amber-glow), transparent);
  opacity: 0;
  pointer-events: none;
}

.ffo-live[data-glow='a']::before {
  animation: ffo-glow-a var(--motion-glow) var(--ease-overlay);
}
.ffo-live[data-glow='b']::before {
  animation: ffo-glow-b var(--motion-glow) var(--ease-overlay);
}

/* Up fast (it has to catch the eye while the digits are still moving), down
 * slow. Identical frames, different names — see above. */
@keyframes ffo-glow-a {
  0% {
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes ffo-glow-b {
  0% {
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
/* Pipeline bars on Reports (Jay, 2026-10-14). One row per stage — label, a
 * neutral bar, the count — on a shared scale (api/salesBars.ts), drawn inside a
 * Reports card. They began life on the Sales page and moved here: Sales keeps
 * its number strip, Reports is where the picture of the pipeline lives. Tokens
 * only; amber is the live-change glow's (components/LiveCount.css), never a bar's. */

/* --- The strip's expander (Jay, 2026-08-29) -----------------------------
 *
 * The spine grew from 9 stages to 20 and the strip went with it: sixteen
 * counters over three wrapped rows, ten of them zero. What stays on screen is
 * the funnel segment plus whatever is actually holding work; the rest of the
 * lifecycle drops in behind this control. The split is decided in
 * api/sales.ts — nothing here knows a stage name. */

.ffo-pbars-block {
  display: flex;
  flex-direction: column;
}

/* The nested rows inside the reveal must not re-apply the strip's top margin,
 * or opening the panel would push the hidden bars away from the visible ones. */
.ffo-pbars__rest .ffo-pbars {
  margin-top: 0;
}

/* Quiet by design: this is a way to see more, not a call to action. It sits
 * on the counters' own baseline so the row reads as one line of items. */
.ffo-pbars__more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  color: var(--text-faint);
  transition: color var(--motion-hover) var(--ease-overlay);
}
.ffo-pbars__more:hover {
  color: var(--text-secondary);
}

/* A chevron drawn from a rotated square — no icon import for six pixels. It
 * points down when there is more to see and up when there is not, turning on
 * the hover clock so the control answers the press immediately even while the
 * panel below is still opening. */
.ffo-pbars__more-chevron {
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform var(--motion-hover) var(--ease-overlay);
}
.ffo-pbars__more[aria-expanded='true'] .ffo-pbars__more-chevron {
  transform: rotate(-135deg) translate(-1px, -1px);
}

/* The drop.
 *
 * `grid-template-rows: 0fr -> 1fr` is the product's declared exception to the
 * transform/opacity-only rule (see motion.test.ts, which whitelists this
 * property by name and nothing else). Nothing composited can reclaim vertical
 * space, and the alternatives are worse: a fixed max-height would need a magic
 * number that is wrong the moment the spine changes length again — which is
 * exactly the change that created this control.
 *
 * Opening uses the entrance clock and closing the exit clock, so it obeys the
 * same asymmetry as every overlay: arriving is information, leaving is
 * already decided. Opacity rides along so the counters fade as they drop
 * rather than sliding in fully formed. */
.ffo-pbars__rest {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows var(--motion-out) var(--ease-overlay),
    opacity var(--motion-out) var(--ease-overlay);
}
.ffo-pbars__rest--open {
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows var(--motion-in) var(--ease-overlay),
    opacity var(--motion-in) var(--ease-overlay);
}

/* The child a `0fr` row actually collapses — it needs both of these or the
 * content holds the row open at its natural height. */
.ffo-pbars__rest-inner {
  min-height: 0;
  overflow: hidden;
  /* Breathing room between the two rows of counters once open. Padding rather
   * than margin: a margin here would escape the collapsed row and leave a gap
   * under the strip while it is shut. */
  padding-top: 18px;
}


.ffo-pbars {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* Bars are a glance, not a chart: past ~640px a bar is a ruler, and the
   * count drifts a long way from the label it belongs to. */
  max-width: 640px;
}

.ffo-pbars__group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* The lane caption: same faint uppercase tier the strip's captions used. */
.ffo-pbars__group-label {
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  opacity: 0.75;
}

.ffo-pbars__rows {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* One stage: label · bar · count. Three fixed columns so every bar starts and
 * every count ends on the same line down the whole page — alignment is the
 * only device here, as in the row grammar. */
.ffo-pbar {
  display: grid;
  grid-template-columns: 168px 1fr 56px;
  align-items: center;
  column-gap: 16px;
}

.ffo-pbar__label {
  min-width: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.ffo-pbar__track {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--bar-track);
  overflow: hidden;
}

/* THE BAR IS A TRANSFORM, never a width. It is always full width and scaled
 * from its left edge by `--w` (0..1, set by Sales.tsx from api/salesBars.ts),
 * so drawing in and easing to a new length are both composited — no layout, no
 * paint — however many bars move at once. A flat right end on purpose: a
 * rounded one would be squashed by the scale at every length but the longest.
 *
 * EASING TO A NEW LENGTH is the transition. A live change is a new `--w`, and
 * the fill glides there on the same clock the digits roll on (`--motion-roll`),
 * so bar and number arrive together. */
.ffo-pbar__fill {
  display: block;
  height: 100%;
  background: var(--bar-fill);
  transform: scaleX(var(--w, 0));
  transform-origin: left center;
  transition: transform var(--motion-roll) var(--ease-overlay);
}
/* The win is one tier stronger, never a colour: amber is for the live glow. */
.ffo-pbar--closed .ffo-pbar__fill {
  background: var(--bar-fill-closed);
}
.ffo-pbar--closed .ffo-pbar__label {
  color: var(--text-secondary);
}

/* DRAWING IN, once per visit (entrance.tsx hands the step, on the bars' own
 * queue; a strip that appears later in the visit, or remounts, gets no class
 * and simply is). From scaleX(0) to the bar's own length, `backwards` so a bar
 * waiting its turn holds at nothing rather than flashing full and vanishing,
 * and so the animation lets go of `transform` the moment it ends — the
 * transition above owns every move after that. Reduced motion: the global rule
 * in base.css removes both, so bars appear at full size and change instantly. */
.ffo-pbar--enter .ffo-pbar__fill {
  animation: ffo-bar-draw var(--motion-roll) var(--ease-overlay) backwards;
  animation-delay: calc(var(--ffo-bar-i, 0) * var(--motion-bar-step));
}
@keyframes ffo-bar-draw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(var(--w, 0));
  }
}

/* The count, right-aligned on the shared tabular figure. */
.ffo-pbar__count {
  justify-self: end;
  font-size: 15px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.ffo-pbar--closed .ffo-pbar__count {
  color: var(--text-primary);
}
/* The glow behind a changed count (LiveCount.css), sized for a 20px row rather
 * than a 21px headline: the default halo would wash over the rows above and
 * below it. */
.ffo-pbar__count::before {
  inset: -7px -14px;
  border-radius: 14px;
}

/* One quiet line under the bars (api/salesBars.ts `deriveOfferClose`). The
 * faintest text tier: it is a footnote to the picture, not a second headline. */
.ffo-pbars__rate {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-faint);
}


/* Phone width: a 124px label column would cut "AI GAP not qualified" and a
 * label that ends in an ellipsis is a stage nobody can name. Below this the row
 * stacks — label and count on one line, the bar full-width under them — so
 * nothing is ever truncated. */
@media (max-width: 560px) {
  .ffo-pbar {
    grid-template-columns: 1fr auto;
    row-gap: 6px;
  }
  .ffo-pbar__track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .ffo-pbar__label {
    grid-row: 1;
  }
  .ffo-pbar__count {
    grid-row: 1;
    grid-column: 2;
  }
  .ffo-pbars__rows {
    gap: 13px;
  }
}


@media (max-width: 840px) {
  .ffo-pbars {
    margin-top: 22px;
    gap: 20px;
  }
  .ffo-pbar {
    grid-template-columns: 124px 1fr 44px;
    column-gap: 12px;
  }
  .ffo-pbars__rate {
    margin-top: 14px;
  }
}

/* Inside a Reports card the card's own padding does the spacing, and the card
 * is already as wide as it should be. */
.ffo-report__card .ffo-pbars {
  margin-top: 0;
  max-width: none;
}
.ffo-report__card .ffo-pbars__rest .ffo-pbars {
  margin-top: 0;
}
/* Reports (2026-10-04; design-refs/board-reports-handoff §5 and §10). One
 * 840px column, Settings' page geometry. Tokens only — every colour is a
 * var(--…) from styles/tokens.css. Amber is a signal (needs the founder, or
 * the CRM is unreachable); sage is "the agent is on it". No red dot on this page. */

.ffo-reports {
  width: min(var(--width-content), 100%);
  margin: 0 auto;
  padding: 176px 0 88px;
}
@media (max-width: 1180px) {
  .ffo-reports { padding-left: 40px; padding-right: 40px; }
}
@media (max-width: 840px) {
  .ffo-reports { padding: 96px 16px 88px; }
}

.ffo-reports__title-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ffo-reports__title { margin: 0; font-family: var(--font-display); font-size: 36px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.15; color: var(--text-primary); }
.ffo-reports__period { font-size: 13.5px; color: var(--text-muted); }
.ffo-reports__controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.ffo-reports__seg { display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: var(--pill-translucent); border: 1px solid var(--pill-border); }
.ffo-reports__seg-btn {
  border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--text-muted);
  padding: 6px 14px; border-radius: var(--radius-pill); cursor: pointer;
  transition: color var(--motion-hover) var(--ease-overlay), background var(--motion-hover) var(--ease-overlay);
}
.ffo-reports__seg-btn--on { background: var(--page-line); color: var(--text-primary); box-shadow: var(--board-seg-on-shadow); }
.ffo-reports__money { border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--text-faint); padding: 6px 2px; cursor: pointer; }
.ffo-reports__money:hover { color: var(--text-muted); }
.ffo-reports__money[data-hidden='true'] { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }

.ffo-reports__chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.ffo-reports__chip {
  border: 1px solid var(--pill-border); background: var(--pill-translucent); color: var(--text-secondary);
  font: inherit; font-size: 12.5px; padding: 6px 14px; border-radius: var(--radius-pill); cursor: pointer;
}
.ffo-reports__chip--on { background: var(--page-line); color: var(--text-primary); border-color: var(--amber-border-select); }

.ffo-reports__degraded { display: flex; align-items: center; gap: 10px; margin: 28px 0 0; font-size: 13.5px; color: var(--text-secondary); }
.ffo-reports__notice { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 40px; font-size: 14px; color: var(--text-secondary); }
.ffo-reports__notice p { margin: 0; }
.ffo-reports__loading, .ffo-reports__stale { margin: 28px 0 0; font-size: 13px; color: var(--text-faint); }
.ffo-reports__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 48px; font-size: 13px; color: var(--text-muted); }

.ffo-report { margin-top: 40px; }
.ffo-report__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.ffo-report__head h2 { margin: 0; }
.ffo-report__asof { font-size: 11.5px; color: var(--text-faintest); text-align: right; }
.ffo-report__card { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px; }
.ffo-report__numbers { display: flex; flex-wrap: wrap; gap: 18px 32px; margin: 0; }
.ffo-report__number { display: flex; flex-direction: column-reverse; gap: 4px; }
.ffo-report__number dt { font-size: 11.5px; color: var(--text-muted); }
.ffo-report__number dd { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 26px; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.ffo-report__steps { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--text-muted); }
.ffo-report__steps li { display: flex; justify-content: space-between; gap: 12px; max-width: 320px; }
.ffo-report__steps-pct { font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.ffo-report__caveat { margin: 0; font-size: 12.5px; color: var(--text-faint); }
.ffo-report__meaning { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-body); overflow-wrap: anywhere; }
.ffo-report__next {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--hairline); font-size: 13.5px; color: var(--text-secondary);
}
.ffo-report__next-text { overflow-wrap: anywhere; min-width: 0; }
.ffo-report__next-status { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.ffo-report__dot { width: 6px; height: 6px; border-radius: 50%; flex: none; align-self: center; }
.ffo-report__dot--agent { background: var(--sage-text); }
.ffo-report__dot--you { background: var(--amber); }
.ffo-report__outdated { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-faint); }
.ffo-report__dims { align-self: flex-start; max-width: 100%; flex-wrap: wrap; }
.ffo-report__tablewrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ffo-report__tablewrap:focus-visible { outline: 2px solid var(--text-faint); outline-offset: 2px; }
.ffo-report__table { border-collapse: collapse; width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ffo-report__caption { text-align: left; font-size: 11.5px; color: var(--text-muted); padding-bottom: 6px; }
.ffo-report__table th, .ffo-report__table td { padding: 6px 12px 6px 0; border-top: 1px solid var(--hairline); text-align: left; white-space: nowrap; font-weight: 400; }
.ffo-report__table thead th { border-top: 0; font-size: 11.5px; color: var(--text-muted); }
.ffo-report__table tbody th { color: var(--text-secondary); }
.ffo-report__table .ffo-report__num { text-align: right; padding-right: 0; padding-left: 12px; color: var(--text-primary); }
.ffo-report__table thead .ffo-report__num { color: var(--text-muted); }
.ffo-report__nodata { color: var(--text-faint); font-style: italic; }
.ffo-report__listwrap { display: flex; flex-direction: column; gap: 6px; }
.ffo-report__listtitle { margin: 0; font-size: 11.5px; color: var(--text-muted); }
.ffo-report__list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.ffo-report__list li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.ffo-report__list-label { color: var(--text-primary); overflow-wrap: anywhere; }
.ffo-report__list-text { color: var(--text-muted); overflow-wrap: anywhere; }
.ffo-report__muted { margin: 0; font-size: 13.5px; color: var(--text-muted); }
.ffo-report__todo { display: flex; gap: 14px; align-items: flex-start; }
.ffo-report__ring { width: 18px; height: 18px; border-radius: 50%; border: 1.5px dashed var(--text-faint); flex: none; }
.ffo-report__ring--amber { width: 12px; height: 12px; border: 1.5px solid var(--amber); }
.ffo-report__todo-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.ffo-report__todo-title { margin: 0; font-size: 14px; color: var(--text-secondary); overflow-wrap: anywhere; }
.ffo-report__ask { align-self: flex-start; border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; color: var(--text-faint); cursor: pointer; }
.ffo-report__ask:hover { color: var(--text-muted); }
.ffo-report--degraded .ffo-report__number dd,
.ffo-report--degraded .ffo-report__meaning { color: var(--text-muted); }
.ffo-report--degraded .ffo-report__dot--you { background: var(--dot-neutral); }

.ffo-reports__pins { margin-top: 48px; }
.ffo-reports__pins h2 { margin: 0 0 10px; }
.ffo-pin + .ffo-pin { border-top: 1px solid var(--divider); padding-top: 14px; }
.ffo-pin__q { margin: 0 0 6px; font-size: 14px; font-weight: 500; color: var(--text-primary); overflow-wrap: anywhere; }
.ffo-pin__a { font-size: 13.5px; color: var(--text-body); overflow-wrap: anywhere; }
.ffo-pin__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.ffo-pin__unpin { border: 0; background: none; font: inherit; font-size: 12px; color: var(--text-faint); cursor: pointer; }
.ffo-pin__unpin:disabled { cursor: progress; }
.ffo-pin__fail { margin: 6px 0 0; font-size: 12.5px; color: var(--amber-text); }

@media (max-width: 840px) {
  .ffo-report__card { padding: 18px 16px; }
  .ffo-report__number dd { font-size: 22px; }
  .ffo-reports__title { font-size: 28px; }
  .ffo-report__next-status { margin-left: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ffo-reports__seg-btn { transition: none; }
}
/* Stage colours (Evening Desk, idea 1). A surface sets data-stage-tone to one
 * of seven slots (src/lib/stageColor.ts decides which); this file turns the
 * slot into three custom properties the surface's own CSS reads:
 *   --st-hue  the stage's hue (edges, hue-filled pills; text on it is
 *             --stage-pill-ink)
 *   --st-bg   tinted pill background
 *   --st-fg   tinted pill text
 * The values come from tokens.css; there are no fallbacks here, so a missing
 * token shows up instead of a second copy of the hex quietly winning. */
[data-stage-tone='open1'] {
  --st-hue: var(--stage-open1-hue);
  --st-bg: var(--stage-open1-bg);
  --st-fg: var(--stage-open1-fg);
}
[data-stage-tone='open2'] {
  --st-hue: var(--stage-open2-hue);
  --st-bg: var(--stage-open2-bg);
  --st-fg: var(--stage-open2-fg);
}
[data-stage-tone='open3'] {
  --st-hue: var(--stage-open3-hue);
  --st-bg: var(--stage-open3-bg);
  --st-fg: var(--stage-open3-fg);
}
[data-stage-tone='open4'] {
  --st-hue: var(--stage-open4-hue);
  --st-bg: var(--stage-open4-bg);
  --st-fg: var(--stage-open4-fg);
}
[data-stage-tone='open5'] {
  --st-hue: var(--stage-open5-hue);
  --st-bg: var(--stage-open5-bg);
  --st-fg: var(--stage-open5-fg);
}
[data-stage-tone='won'] {
  --st-hue: var(--stage-won-hue);
  --st-bg: var(--stage-won-bg);
  --st-fg: var(--stage-won-fg);
}
[data-stage-tone='lost'] {
  --st-hue: var(--stage-lost-hue);
  --st-bg: var(--stage-lost-bg);
  --st-fg: var(--stage-lost-fg);
}

/* Hue-filled pill: the count on a board column, the label on a Sales list
 * section. Dark ink on the hue is 4.56:1 or better on every hue. */
.ffo-stage-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--st-hue);
  color: var(--stage-pill-ink);
  font-variant-numeric: tabular-nums;
}
/* No tone (no pipeline config, or a stage the tones do not know): a plain
 * neutral pill in the surrounding surface's own ink. Taupe would claim
 * "stage 1", and an untinted pill claims nothing. Words unchanged. */
.ffo-stage-pill:not([data-stage-tone]) {
  background: var(--pill-bg);
  box-shadow: inset 0 0 0 1px var(--pill-border);
  color: var(--text-secondary);
}
/* Incoming leads. Tokens only; light and dark come from styles/tokens.css. */

.ffo-incoming {
  width: min(var(--width-content), 100%);
  margin: 0 auto;
  padding: 176px 0 88px;
}
@media (max-width: 1180px) { .ffo-incoming { padding-left: 40px; padding-right: 40px; } }
@media (max-width: 840px) { .ffo-incoming { padding: 96px 16px 88px; } }

.ffo-incoming__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ffo-incoming__title { margin: 0; font-family: var(--font-display); font-size: 36px; font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; color: var(--text-primary); }
.ffo-incoming__lede { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-muted); max-width: 640px; }
.ffo-incoming__hint { margin: 4px 0 0; font-size: 12.5px; color: var(--text-faint); }

.ffo-incoming__btn {
  border: 1px solid var(--pill-border); background: var(--pill-translucent); color: var(--text-secondary);
  font: inherit; font-size: 12.5px; padding: 6px 14px; border-radius: var(--radius-pill); cursor: pointer;
}
.ffo-incoming__btn:hover:not(:disabled) { color: var(--text-primary); border-color: var(--amber-border-select); }
.ffo-incoming__btn:disabled { opacity: 0.6; cursor: default; }
.ffo-incoming__more { margin-top: 18px; }

.ffo-incoming__state { margin: 28px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.ffo-incoming__state--warn { color: var(--amber-text); }

.ffo-incoming__table {
  margin-top: 24px; overflow-x: auto;
  /* A light panel (data-surface="card" in the TSX): opaque, 16px. */
  background: var(--card-bg); border: 1px solid var(--card-edge); border-radius: 16px; box-shadow: var(--card-shadow);
}
.ffo-incoming__row:last-child { border-bottom: 0; }
.ffo-incoming__row--head { background: var(--table-head); }
/* Sand bands on even data rows (the head is row 0, so data rows 2, 4... are
 * the even ones of the data rows via the class set in Incoming.tsx). */
.ffo-incoming__row.ffo-band-row--even { background: var(--band); }
.ffo-incoming__row:not(.ffo-incoming__row--head):hover { background: var(--card-row-hover); }
.ffo-incoming__row {
  display: grid;
  grid-template-columns: 76px minmax(80px, 0.9fr) minmax(80px, 0.9fr) minmax(110px, 1fr) minmax(150px, 1.6fr) 112px minmax(100px, 1.2fr);
  gap: 0 12px; padding: 10px 16px; border-bottom: 1px solid var(--hairline); align-items: start;
  font-size: 13px; color: var(--text-primary);
}
.ffo-incoming__row--head { padding: 10px 16px; }
.ffo-incoming__th { font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-faint); }
.ffo-incoming__cell { min-width: 0; overflow-wrap: break-word; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.ffo-incoming__cell[data-label='Email'] { overflow-wrap: anywhere; }
.ffo-incoming__cell[data-label='When'] { color: var(--text-muted); }
.ffo-incoming__row[data-optout] .ffo-incoming__cell--name { color: var(--text-muted); }

.ffo-incoming__edit {
  border: 0; background: none; font: inherit; color: inherit; text-align: left; padding: 2px 4px; margin: -2px -4px;
  border-radius: 6px; cursor: text; max-width: 100%;
}
.ffo-incoming__edit:hover, .ffo-incoming__edit:focus-visible { background: var(--pill-translucent); }
.ffo-incoming__placeholder { color: var(--text-faint); }
.ffo-incoming__input, .ffo-incoming__select {
  font: inherit; font-size: 13px; color: var(--text-primary); background: var(--card-bg);
  border: 1px solid var(--amber-border-select); border-radius: 6px; padding: 4px 6px; width: 100%; box-sizing: border-box;
}
.ffo-incoming__select { border-color: var(--pill-border); }
/* Stage colour: the stage word on a tinted pill (the word stays; colour backs it up). */
.ffo-incoming__select[data-stage-tone] {
  background: var(--st-bg);
  color: var(--st-fg);
  border-color: var(--st-hue);
  border-radius: 999px;
  padding-left: 10px;
}
.ffo-incoming__extras { font-size: 11.5px; color: var(--text-faint); }
.ffo-incoming__saving { font-size: 11.5px; color: var(--text-faint); }
.ffo-incoming__error { font-size: 12px; color: var(--amber-text); }
.ffo-incoming__tag { font-size: 11.5px; color: var(--amber-text); }

@media (max-width: 720px) {
  .ffo-incoming__row--head { display: none; }
  .ffo-incoming__table { display: flex; flex-direction: column; gap: 12px; background: none; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
  .ffo-incoming__row {
    grid-template-columns: 1fr; gap: 8px; padding: 14px;
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-card);
  }
  /* Mobile row-cards stay light and carry their own card ink. */
  .ffo-incoming__row, .ffo-incoming__row.ffo-band-row--even { background: var(--card-bg); }
  .ffo-incoming__row:last-child { border-bottom: 1px solid var(--card-border); }
  .ffo-incoming__cell { flex-direction: column; }
  .ffo-incoming__cell::before {
    content: attr(data-label); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-faint);
  }
}
/* The project detail panel's blocks (components/ProjectPanel.tsx).
 *
 * Same geometry and same grammar as ContactPanel.css — a 10.5px uppercase
 * tracked heading over 13.5px values, hierarchy by spacing, no badges, no
 * tables, no rules. Nothing here sets a width, a panel background or a font
 * family: `.ffo-panel__body` is already the 468px flex column with its own
 * 30px gap, so every direct child below is one block in that stack.
 *
 * Two colour rules this file obeys and does not extend:
 *   - RED (`--severe`) belongs to the risk dot alone. It is the CRM's own
 *     traffic light, set by a human who looked at the order.
 *   - AMBER is a SIGNAL — the blocker's left edge on an amber order, and a
 *     last-update line that has gone past its threshold. Never decoration.
 */

.ffo-project__block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ffo-project__heading {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
  margin-bottom: 2px;
}

.ffo-project__value {
  font-size: 13.5px;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

/* Prose, not a field: the blocker's detail and the next action are sentences
 * someone wrote, and they get the line-height a sentence needs. */
.ffo-project__prose {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* The deal's details: a label and its value on one row each, the label quiet. */
.ffo-project__details {
  margin: 0;
  display: grid;
  gap: 6px;
}
.ffo-project__detail {
  display: grid;
  grid-template-columns: minmax(96px, 38%) 1fr;
  gap: 10px;
  font-size: 13.5px;
}
.ffo-project__detail dt {
  color: var(--text-faint);
}
.ffo-project__detail dd {
  margin: 0;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.ffo-project__muted {
  font-size: 12.5px;
  color: var(--text-faint);
}

/* WHO HAS IT. The one value on this panel drawn a size up and in the primary
 * tone — Jay asked for the responsible rep prominently, and on a panel with no
 * badges the only ways to say "prominent" are position and weight. It has
 * both: first block, 15px, primary. */
.ffo-project__owner {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.ffo-project__risk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* The blocker block. Indented behind a hairline rather than boxed: a card here
 * would be the only card on the panel and would read as a different kind of
 * content, when it is the same kind — one more fact about this order, and the
 * one the founder is most likely to act on. */
.ffo-project__blocker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 14px;
  border-left: 2px solid var(--hairline);
}

.ffo-project__blocker--pending {
  border-left-color: var(--amber);
}

/* The one non-dot use of the severity colour in this file, and it is a 2px
 * edge, never a fill: a red panel would spend the screen's loudest signal on a
 * block that is already the loudest thing on it by position. */
.ffo-project__blocker--severe {
  border-left-color: var(--severe);
}

/* An order nobody has touched past the adapter's threshold. Amber TEXT, not
 * the fill tone — the fill fails contrast at this size on the light canvas
 * (same note as ContactPanel's `--stale` age line). */
.ffo-project__value--stale {
  color: var(--amber-text);
}

.ffo-project__link {
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1px;
  align-self: flex-start;
  overflow-wrap: anywhere;
  transition: color var(--motion-hover) ease, border-color var(--motion-hover) ease;
}
.ffo-project__link:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-faint);
}

/* The escape hatch, drawn as quietly as ContactPanel draws its delete control
 * and for the mirror-image reason: this is where the founder goes when the
 * panel could not answer him, which should be rare. */
.ffo-project__open {
  font-size: 12.5px;
  color: var(--text-faintest);
  text-decoration: none;
  align-self: flex-start;
  transition: color var(--motion-hover) ease;
}
.ffo-project__open:hover {
  color: var(--text-secondary);
}

/* HISTORY — what has been happening to this order.
 *
 * A list of sentences, not a table and not a timeline graphic. The only
 * ornament is the same 6px Dot the risk flag uses, in the neutral tone: this
 * block is a record of what happened, never a judgement about it, so nothing
 * in it is ever red. The dot's job is purely to give the eye a left edge to
 * run down when the entries wrap to two lines. */
.ffo-project__history {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ffo-project__event {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* The dot sits on the first line's optical centre rather than its top. */
.ffo-project__event > :first-child {
  margin-top: 6px;
  flex: 0 0 auto;
}

.ffo-project__event-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ffo-project__event-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

/* When and who — the same faint 12.5px the muted line already uses, so the
 * history reads as one texture with the rest of the panel. */
.ffo-project__event-meta {
  font-size: 12.5px;
  color: var(--text-faintest);
}

.ffo-project__history-more {
  align-self: flex-start;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-faintest);
  cursor: pointer;
  transition: color var(--motion-hover) ease;
}
.ffo-project__history-more:hover {
  color: var(--text-secondary);
}

/* The Region line (components/RegionPicker.tsx): the value and how it was set on
 * the first line, a quiet Change under it, and while editing a select beside
 * Save and Cancel. Same grammar as every other block here - no badge, no rule. */
.ffo-region {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ffo-region__edit,
.ffo-region__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ffo-region__select {
  min-width: 0;
  max-width: 100%;
  font: inherit;
  font-size: 13.5px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border, rgba(127, 127, 127, 0.35));
  border-radius: 8px;
  padding: 5px 8px;
}

.ffo-region__saved {
  margin: 0;
}

.ffo-region__failed {
  margin: 0;
  color: var(--text-secondary);
}
/* Going quiet. The wash itself lives with each surface (card, list row); the
 * values come from tokens.css (--quiet-*), with no fallbacks. */
.ffo-quiet-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--quiet-1-fg);
}
.ffo-quiet-line[data-quiet-line='2'] {
  color: var(--quiet-2-fg);
}
/* Follow-up traffic light. Colours come from tokens.css (--fu-*), with no
 * fallbacks: one place holds each value. */
.ffo-fu {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--fu-note-edge, transparent);
  background: var(--fu-note-bg);
  color: var(--fu-note-fg);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.ffo-fu__icon { flex: none; }
.ffo-fu[data-fu='overdue'] {
  background: var(--fu-overdue-bg);
  color: var(--fu-overdue-fg);
  border-color: var(--fu-overdue-edge, transparent);
}
.ffo-fu[data-fu='today'] {
  background: var(--fu-today-bg);
  color: var(--fu-today-fg);
  border-color: var(--fu-today-edge, transparent);
}
.ffo-fu[data-fu='booked'] {
  background: var(--fu-booked-bg);
  color: var(--fu-booked-fg);
  border-color: var(--fu-booked-edge, transparent);
}
/* No next step needs the founder: amber, but an outline, not a fill. */
.ffo-fu[data-fu='none'] {
  background: var(--fu-none-bg, transparent);
  color: var(--fu-none-fg);
  border: 1px dashed var(--fu-none-edge);
}
/* "Next: <the CRM's own text>" can be any length: trimmed with an ellipsis,
 * full words on title. */
.ffo-fu[data-fu='note'] {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Board (beta), Phase 1 — design-refs/board-reports-handoff/gen/board-kit.js.
 * Columns 196px, 18px gap, rails 34px, 72px right-edge fade. Tokens only:
 * every colour here is a var() from styles/tokens.css. */

/* The Board breaks out of the 840px content column: it starts at the page's
 * left margin (x=64 in the 1440 artboard) and runs off the right edge under
 * the fade. The header keeps its own right margin. */
.ffo-page.ffo-page--board {
  width: 100%;
  padding-left: 64px;
  padding-right: 0;
  transform: none;
}
.ffo-page--board .ffo-sales-head,
.ffo-page--board .ffo-sales-notice {
  padding-right: 64px;
}

/* --- Header controls: Sections · Board, and "Hide amounts" -------------- */

.ffo-viewswitch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: var(--topbar-pill-bg);
}
.ffo-viewswitch__opt {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-faint);
  cursor: pointer;
  transition: color var(--motion-hover) var(--ease-overlay);
}
.ffo-viewswitch__opt:hover {
  color: var(--text-muted);
}
.ffo-viewswitch__opt[aria-pressed='true'] {
  color: var(--text-primary);
  background: var(--pill-bg);
  box-shadow: var(--board-seg-on-shadow);
  cursor: default;
}
.ffo-viewswitch__opt:focus-visible {
  outline: 1px solid var(--amber-border-select);
  outline-offset: 2px;
}
.ffo-viewswitch__beta {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.ffo-amounts-toggle {
  flex: none;
  padding: 6px 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-faint);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--motion-hover) var(--ease-overlay);
}
.ffo-amounts-toggle:hover {
  color: var(--text-muted);
}
.ffo-amounts-toggle:focus-visible {
  outline: none;
  text-decoration: underline;
}

/* --- The board ---------------------------------------------------------- */

.ffo-board {
  position: relative;
  margin-top: 56px;
}
.ffo-board-notice {
  margin: 0 64px 18px 0;
  font-size: 12.5px;
  color: var(--text-muted);
}
.ffo-board-frame {
  position: relative;
}
.ffo-board-scroll {
  overflow-x: auto;
  padding-bottom: 24px;
}
/* An absolutely positioned sibling rather than a sticky ::after: it sits
 * over the scroller's edge whatever the scroll position. Only rendered on
 * the edge that genuinely has more board past it (SalesBoard.tsx's `edges`,
 * mirrored from the same scroll measurement the edge buttons use) — never a
 * fade claiming continuation where there is none. */
.ffo-board-fade {
  position: absolute;
  top: 0;
  bottom: 24px;
  width: 72px;
  pointer-events: none;
}
.ffo-board-fade--right {
  right: 0;
  background: linear-gradient(90deg, transparent, var(--board-fade-to));
}
.ffo-board-fade--left {
  left: 0;
  background: linear-gradient(270deg, transparent, var(--board-fade-to));
}
.ffo-board-track {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: max-content;
  padding-right: 72px;
  min-height: 320px;
  /* Board (beta), Phase 2, Task 13 — room for `.ffo-board-dropcap`, which
   * sits at `bottom: -34px` off whichever column/rail is the current drop
   * target, so it never clips against `.ffo-board-scroll`'s own edge. */
  padding-bottom: 40px;
}

/* Edge scroll controls (Jay, 2026-09-27) — a mouse-only user has no
 * trackpad/touch gesture to reach a column that bleeds off the right (or,
 * once scrolled, the left one it scrolled past). Real `<button>`s, rendered
 * only when `SalesBoard.tsx`'s own scroll measurement says there is more
 * board in that direction — never just hidden by CSS, so one can never sit
 * over a card and steal its click while claiming to not be there. Sized and
 * placed to read level with the column headers (`.ffo-board-colhead`), well
 * above where a card's own Move menu opens (under the card, further down)
 * and nowhere near the toast (fixed to the page's own bottom) — `z-index`
 * still keeps both of those above this if a wide Move menu ever reaches
 * this far. Colour only from tokens, both themes. */
.ffo-board-edge {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 0;
  z-index: 20;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: var(--pill-bg);
  color: var(--text-muted);
  box-shadow: var(--card-shadow);
  transition: color var(--motion-hover) var(--ease-overlay), border-color var(--motion-hover) var(--ease-overlay);
}
.ffo-board-edge:hover {
  color: var(--text-primary);
  border-color: var(--amber-border-hover);
}
.ffo-board-edge:focus-visible {
  outline: 1px solid var(--amber-border-select);
  outline-offset: 2px;
}
/* Left sits in the page's own 64px gutter (`.ffo-page--board`'s
 * `padding-left`), not over the track — the Outreach rail starts flush at
 * the frame's own left edge with no inset of its own, so a button inset
 * INSIDE the frame would sit on top of its "Outreach" label (and, scrolled
 * further, its numbers) for as long as any of Outreach is still on screen.
 * Right has no such neighbour — the track already reserves 72px of empty
 * padding there for the fade, so 8px in from the frame's own edge never
 * touches a card. */
.ffo-board-edge--left {
  left: -44px;
}
.ffo-board-edge--right {
  right: 8px;
}
/* A chevron drawn from a rotated square border — same technique as
 * Sales.css's `.ffo-sales-summary__more-chevron` ("no icon import for six
 * pixels"), just pointed sideways instead of up/down. */
.ffo-board-edge__chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}
.ffo-board-edge__chevron--right {
  transform: rotate(-45deg) translate(-1px, -1px);
}
.ffo-board-edge__chevron--left {
  transform: rotate(135deg) translate(-1px, -1px);
}
@media (prefers-reduced-motion: reduce) {
  .ffo-board-edge {
    transition: none;
  }
}

.ffo-outreach {
  flex: none;
  width: 136px;
  display: flex;
  flex-direction: column;
}
.ffo-board-sep {
  flex: none;
  width: 1px;
  height: 320px;
  /* Kit: outreach ends at x=200, the rule sits at 222, the first column at
   * 246 — i.e. 4px + 18px gap before it, 5px + 18px gap after its 1px. */
  margin: 0 5px 0 4px;
  background: var(--divider);
}
.ffo-board-col {
  flex: none;
  width: 196px;
  display: flex;
  flex-direction: column;
  /* Board (beta), Phase 2, Task 13 — the drop-target outline is an absolutely
   * positioned ::before sized past the column's own box (`inset: -12px`);
   * `isolation` keeps its `z-index: -1` from escaping behind an ancestor's
   * own stacking context (the horizontally-scrolling track) rather than just
   * behind this column. */
  position: relative;
  isolation: isolate;
}
/* Board (beta), Phase 2, Task 13 — the amber "you can drop here" outline
 * (handoff b2a: "the target column outlines amber with 'Let go to move to
 * …'"). A ::before rather than a border/background on `.ffo-board-col`
 * itself so the column's own layout never shifts when it becomes a target. */
/* Stacking fix (2026-09-26) — the menu is 236px wide from a 12px inset on a
 * 196px column (18px gap), so it overflows into the NEXT column's box. That
 * column is its own stacking context too (`isolation: isolate` above), and as
 * the later DOM sibling it would paint over the overflow even after the card
 * itself is raised (`.ffo-deal--menu-open`) — raise the owning column past
 * its siblings while any of its cards has a menu open. `:has()` already used
 * elsewhere in this codebase (Settings.css, Offer.css, Markdown.css). */
.ffo-board-col:has(.ffo-deal--menu-open) {
  z-index: 1;
}
.ffo-board-col--drop::before {
  content: '';
  position: absolute;
  inset: -12px;
  z-index: -1;
  border-radius: 22px;
  border: 1px solid var(--amber-border-hover);
  background: var(--amber-drop-fill);
  pointer-events: none;
}
/* The caption sits under the column, past its last card — `.ffo-board-track`
 * carries the extra bottom padding this needs (below) so it never clips
 * against the scroller's edge. */
.ffo-board-dropcap {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  color: var(--amber-text);
  pointer-events: none;
}
.ffo-board-dropcap--off {
  color: var(--text-faint);
}
.ffo-board-colhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.ffo-board-colhead__label {
  min-width: 0;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ffo-board-colhead__count {
  flex: none;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
/* Stage colour (Evening Desk idea 1): a 3px edge in the stage's hue over the
 * header, the count in a hue-filled pill (dark ink on the hue), and the stage
 * word unchanged. The Outreach header has no tone, so it gets the same top
 * padding to stay level with its neighbours. */
.ffo-board-colhead {
  padding-top: 8px;
}
.ffo-board-col[data-stage-tone] > .ffo-board-colhead {
  box-shadow: inset 0 3px 0 var(--st-hue);
}
.ffo-board-col[data-stage-tone] .ffo-board-colhead__count {
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--st-hue);
  color: var(--stage-pill-ink);
  font-weight: 500;
}
.ffo-board-rail[data-stage-tone]:not(.ffo-board-rail--drop) {
  border-color: var(--st-hue);
}
.ffo-board-colsub {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
/* Always present, so hiding amounts (or a column with nothing priced) never
 * shifts the cards up. */
.ffo-board-colsub--money {
  min-height: 18px;
  /* One line in every column, so the cards start level across the board;
   * the full line is on hover (title) when a long one is cut. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ffo-board-cards {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ffo-board-rail {
  flex: none;
  width: 34px;
  height: 250px;
  box-sizing: border-box;
  border-radius: var(--radius-pill);
  border: 1px solid var(--board-rail-border);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Board (beta), Phase 2, Task 13 — a folded rail is a real config stage
   * `dropCheck` treats the same as an open column, so it needs the same
   * relative anchor for its own dropcap. */
  position: relative;
  isolation: isolate;
}
/* Board (beta), Phase 2, Task 13 — the rail equivalent of `.ffo-board-col--
 * drop`: a rail has no card slots to outline around, so the amber reads
 * directly on its own pill rather than a separate ::before. */
.ffo-board-rail--drop {
  border-color: var(--amber-border-hover);
  background: var(--amber-drop-fill);
}
.ffo-board-rail span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faintest);
  white-space: nowrap;
}
.ffo-board-more {
  padding-left: 2px;
  font-size: 12px;
  color: var(--text-faintest);
}

/* --- Deal card (kit `card()`) ------------------------------------------- */

.ffo-deal {
  position: relative;
  border-radius: var(--radius-deal);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 15px 16px 14px;
  display: flex;
  flex-direction: column;
  transition:
    transform var(--motion-hover) var(--ease-overlay),
    border-color var(--motion-hover) var(--ease-overlay),
    background-color var(--motion-hover) var(--ease-overlay);
}
/* Board (beta), Phase 2, Task 12 — a card mid-save reads half-lit rather
 * than gone: never optimistic (it hasn't moved columns until the CRM
 * confirms), just quietly less present than a settled card. */
.ffo-deal--saving {
  opacity: 0.62;
}
/* Board (beta), Phase 2, Task 13 — the ORIGIN slot while its own card is
 * being dragged (handoff b2a: "the old slot keeps a hairline outline"): the
 * card's own face is hidden (its content would otherwise still show through
 * behind the browser's native drag image), leaving just the plain outline a
 * `.ffo-deal-ghost` would draw for a saving move. */
.ffo-deal--picked {
  background: transparent;
  box-shadow: none;
  border-color: var(--board-rail-border);
  transform: none;
}
/* Compound selector (not just `.ffo-deal--picked > *`), deliberately: at
 * equal specificity `.ffo-deal__open { all: unset; ... }` (below) sits later
 * in this file and its `all: unset` resets `visibility` back to `unset`,
 * which quietly wins the cascade by source order and left the card's face
 * showing through while picked (task-16 verification, 2026-09-26) — the
 * opposite of "hidden" this rule exists to say. The extra `.ffo-deal` class
 * gives this rule strictly higher specificity than `.ffo-deal__open`'s
 * single-class selector, so it always wins regardless of source order. */
.ffo-deal.ffo-deal--picked > * {
  visibility: hidden;
}
/* The dragged image `startDragImage` (parts.tsx) builds from a clone of the
 * card itself — tilted 1.6° (handoff b2a), flat under reduced motion. */
.ffo-deal--lifted {
  transform: rotate(1.6deg) translateY(-2px);
  background: var(--board-card-hover-bg);
  border-color: var(--amber-border-hover);
}
.ffo-deal--lifted-flat {
  transform: none;
}
.ffo-deal[draggable='true'] {
  cursor: grab;
}
/* Task 12 fix wave (2026-09-26) — a card `moveBlock` refuses is left plain
 * `draggable={undefined}` (no attribute at all), so it needed its own signal
 * rather than relying on the ABSENCE of `.ffo-deal[draggable='true']`'s
 * `grab` cursor (which a read-only board — no `moves` at all — also lacks,
 * silently, by design). `not-allowed` on the grab area itself, whatever's
 * blocking it (paused, no contact, another move saving); the `title`
 * (parts.tsx) carries the actual reason for anyone who hovers to ask. */
.ffo-deal--blocked {
  cursor: not-allowed;
}
/* Stacking fix (2026-09-26) — `.ffo-deal`'s own `transform`/`backdrop-filter`
 * make every card a stacking context with z-index auto, so `.ffo-move-menu`'s
 * z-index 30 (below) only wins INSIDE its own card: the next card in DOM
 * order, also its own stacking context, paints over the menu regardless. Only
 * the card with its menu open gets raised — below the toast's 40, above every
 * sibling card's auto stacking — so a mouse click actually lands on the menu
 * instead of the card underneath. */
.ffo-deal--menu-open {
  z-index: 35;
}
/* Going quiet (Evening Desk idea 3): a warm wash for a deal at its stage's
 * limit, a red one at twice it. Words ("Quiet 9d") sit on the card too. Card
 * surface colours, so identical in light and dark. */
.ffo-deal[data-quiet='1'] {
  background: var(--quiet-1-bg);
  border-color: var(--quiet-1-edge);
}
.ffo-deal[data-quiet='2'] {
  background: var(--quiet-2-bg);
  border-color: var(--quiet-2-edge);
}
.ffo-deal__quiet {
  margin-top: 6px;
}
.ffo-deal:hover,
.ffo-deal:focus-within {
  background: var(--board-card-hover-bg);
  border-color: var(--amber-border-hover);
  transform: translateY(-2px);
}
.ffo-deal--selected,
.ffo-deal--selected:hover {
  background: var(--board-card-hover-bg);
  border-color: var(--amber-border-select);
  transform: none;
}
/* A quiet card keeps its wash through hover, focus and selection: the rules
 * above reset the background, so these restate it (they are more specific and
 * come later). Only the border takes the usual amber. */
.ffo-deal[data-quiet='1']:hover,
.ffo-deal[data-quiet='1']:focus-within,
.ffo-deal[data-quiet='1'].ffo-deal--selected {
  background: var(--quiet-1-bg);
}
.ffo-deal[data-quiet='2']:hover,
.ffo-deal[data-quiet='2']:focus-within,
.ffo-deal[data-quiet='2'].ffo-deal--selected {
  background: var(--quiet-2-bg);
}
.ffo-deal[data-quiet]:hover,
.ffo-deal[data-quiet]:focus-within {
  border-color: var(--amber-border-hover);
}
.ffo-deal[data-quiet].ffo-deal--selected,
.ffo-deal[data-quiet].ffo-deal--selected:hover {
  border-color: var(--amber-border-select);
}
.ffo-deal__open {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ffo-deal__open:focus-visible {
  outline: 1px solid var(--amber-border-select);
  outline-offset: 4px;
  border-radius: 8px;
}
.ffo-deal__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
/* Line break after the At risk chip (only the severe card renders it). */
.ffo-deal__break {
  flex: 0 0 100%;
  height: 0;
  margin: -4px 0;
}
/* The NAME has priority over the amount. `flex: 1 1 auto` makes the name's
 * wrap size its full text, so when name + amount do not both fit on the line
 * the amount wraps onto its own line instead of squeezing the name to "Vikr...".
 * `min-width: 9ch` is the floor for a name too long for any line (it then
 * ellipsises on its own line, never down to a few letters). */
/* Dot (needs you) + name: one unit that never wraps inside itself. The unit sizes to its text and wraps as a whole, so the
 * amount drops below the name rather than the dot being stranded on a line of its own. */
.ffo-deal__id {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: min(100%, calc(9ch + 14px));
  max-width: 100%;
}
.ffo-deal__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ffo-deal__value {
  flex: none;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--board-text-sec);
  font-variant-numeric: tabular-nums;
}
/* The single most-at-risk card's VISIBLE flag (repo CLAUDE.md: never colour
 * alone) — quiet by design: small, muted, no background chip. The full
 * phrase lives on `title`/`aria-label`; this word is the on-screen cue. */
.ffo-deal__flag {
  flex: none;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--severe);
  white-space: nowrap;
}
/* At risk: a solid chip, white on #963a24, warning icon, the words in sentence case. */
.ffo-deal__flag--severe {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--severe-bg);
  color: var(--severe-fg);
  font-size: 11.5px;
  text-transform: none;
}
.ffo-deal__co {
  margin-top: 3px;
  min-height: 1.4em;
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--motion-hover) var(--ease-overlay);
}
/* Deal details under the company line (B2): grade, quantity, GSM ... one quiet
 * line, only on a deploy whose config marks details for the card. */
.ffo-card__facts {
  margin-top: 2px;
  min-height: 1.4em;
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ffo-deal__foot {
  position: relative;
  margin-top: 11px;
  min-height: 16px;
}
/* Card diet (2026-09-26 spec): line 3 — the follow-up badge, in words.
 * Replaces the old .ffo-deal__age/.ffo-deal__age--stale (time-in-stage moved
 * to the drill-in, `openFacts`). Short by construction ("Overdue 29d", "Due
 * Tue", "No next step"), so — unlike the age line it replaces — it needs no
 * line-clamp/wrap treatment to stay legible under the actions overlay. */
/* Colour, fill and font now come from FollowUpChip (`.ffo-fu`, data-fu); this
 * class keeps only the layout and the hover fade. */
.ffo-deal__badge {
  transition: opacity var(--motion-hover) var(--ease-overlay);
}
/* nextStepField: "Next: <the CRM's own text>" can be any length, so unlike the
 * date badges it is trimmed with an ellipsis (the full text rides in the
 * element's title). Only a client with next_step_source "field" has one. */
.ffo-deal__badge--note {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ffo-deal__flag--severe {
  text-transform: none;
  letter-spacing: 0.01em;
}
/* Open/Discuss (·Move) overlay the foot's right side instead of sharing its
 * flex width — revealed on hover AND focus-within (keyboard access unchanged
 * from before; `:focus-within` already covers "the Move menu is open", since
 * `MoveMenu` focuses itself and lives inside this same `.ffo-deal`).
 * `pointer-events` tracks `opacity` so an invisible Open/Discuss can never
 * intercept a click.
 *
 * Calmer hover (Jay, 2026-09-27): the old "solid buffer" (dcb832f) painted a
 * background behind these to keep the label text off whatever age/badge text
 * was underneath — that buffer is gone. The badge line fades to opacity 0
 * instead (below, alongside `.ffo-deal__co`), so there is nothing left for
 * this overlay to sit over, and the actions need no background of their own
 * on a hover-capable device. The three actions are separated by the gap
 * alone — the old ` · ` before Discuss read as a stray dot (Jay,
 * 2026-09-27) — and aligned by text baseline. */
.ffo-deal__actions {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: baseline;
  /* Task 12: 10px, not the Phase 1 12px — "Open · Move · Discuss" is a third
   * label wider than the "Open · Discuss" this overlay was sized for at the
   * 196px column width; a hair tighter gap keeps it inside the fade without
   * dropping Move (brief: shrink the gap rather than the action). */
  gap: 10px;
  padding: 3px 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-hover) var(--ease-overlay);
}
.ffo-deal:hover .ffo-deal__actions,
.ffo-deal:focus-within .ffo-deal__actions {
  opacity: 1;
  pointer-events: auto;
}
/* Calmer hover, desktop mouse only (`min-width` keeps this off the <=840px
 * phone layout below, `hover: hover` keeps it off the touch-at-desktop-width
 * case just below, which has no hover state to hang a fade off of): line 2
 * (company/job title) and line 3's badge fade out together with the actions
 * fading in, so a hovered/focused/menu-open card shows only name+amount on
 * top and Open · Move · Discuss on the bottom — never one printed over the
 * other. Opacity only, height untouched, so the card's own height never
 * changes. `.ffo-deal__foot > span:first-child` is the badge-or-placeholder
 * span (parts.tsx) — targeted structurally so an EMPTY badge slot (no
 * `.ffo-deal__badge` class at all, by design: SalesBoard.test.tsx pins that a
 * badgeless card never carries that class) still fades the same way. */
@media (min-width: 841px) and (hover: hover) {
  .ffo-deal:hover .ffo-deal__co,
  .ffo-deal:focus-within .ffo-deal__co,
  .ffo-deal:hover .ffo-deal__foot > span:first-child,
  .ffo-deal:focus-within .ffo-deal__foot > span:first-child {
    opacity: 0;
  }
}
/* Board (beta), Phase 2, Task 12 fix round 1, finding 1 — a touch device at
 * DESKTOP width (iPad landscape and similar; this is still the 196px-column
 * track, not the <840px phone layout below) never fires :hover/:focus-within
 * from a tap the way a mouse does, so Move was reachable only by accident.
 * Keep the actions permanently visible and tappable there — and, since the
 * badge behind them is never hidden on a device with no hover state, keep
 * the same solid buffer they have always needed here, off the card's own
 * REST background (`--card-bg`, not the hover tint: a touch card sits at
 * rest, not hovered, so the hover tint would leave a permanently mismatched
 * patch over every untouched card). */
@media (hover: none) {
  .ffo-deal__actions {
    opacity: 1;
    pointer-events: auto;
    padding-left: 40px;
    background: linear-gradient(90deg, transparent, var(--card-bg) 24px, var(--card-bg) 100%);
  }
}
.ffo-deal__act {
  all: unset;
  cursor: pointer;
  font-size: 11.5px;
  color: var(--board-text-sec);
}
.ffo-deal__act--discuss {
  color: var(--amber-text);
}
.ffo-deal__act:focus-visible {
  text-decoration: underline;
}

/* --- Move to…, card states, toast (Board (beta), Phase 2, Task 12) ------ */

/* The ORIGIN column's placeholder while this card is saving to its NEW
 * column (the half-lit "saving" card itself is drawn as a separate entry in
 * the TARGET column — `.ffo-deal--saving` above) — never drawn as moved.
 * Height matches the diet card's own measured height (Task 5: 97–102px
 * depending on whether it carries a follow-up badge; 102px — the
 * badge-carrying figure — so a ghost standing in for either kind of card
 * never leaves a gap or a jump when the real card lands). */
.ffo-deal-ghost {
  min-height: 102px;
  border-radius: var(--radius-deal);
  border: 1px solid var(--board-rail-border);
}
.ffo-move-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: -4px;
  padding: 2px 4px;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5;
}
.ffo-move-line--failed {
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  color: var(--board-text-sec);
}
.ffo-move-line__acts {
  display: flex;
  gap: 14px;
}
.ffo-move-line__retry,
.ffo-move-line__leave {
  all: unset;
  cursor: pointer;
  font-size: 12.5px;
}
.ffo-move-line__retry {
  color: var(--amber-text);
}
.ffo-move-line__leave {
  color: var(--text-faint);
}
.ffo-move-line__retry:focus-visible,
.ffo-move-line__leave:focus-visible {
  outline: 1px solid var(--amber-border-select);
  outline-offset: 3px;
  border-radius: 6px;
}
.ffo-move-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.ffo-move-note > :first-child {
  margin-top: 6px;
  flex: none;
}
.ffo-move-spin {
  flex: none;
  margin-top: 2px;
  animation: ffo-board-spin 1.1s linear infinite;
}
.ffo-move-spin__track {
  fill: none;
  stroke: var(--board-rail-border);
  stroke-width: 2.4;
}
.ffo-move-spin__arc {
  fill: none;
  stroke: var(--amber);
  stroke-width: 2.4;
  stroke-linecap: round;
}
@keyframes ffo-board-spin {
  to {
    transform: rotate(360deg);
  }
}
.ffo-move-menu {
  position: absolute;
  top: calc(100% - 8px);
  left: 12px;
  z-index: 30;
  width: 236px;
  padding: 8px;
  border-radius: 18px;
  background: var(--overlay-bg-panel);
  border: 1px solid var(--message-border);
  box-shadow: var(--panel-shadow);
  display: flex;
  flex-direction: column;
  outline: none;
}
.ffo-move-menu__head {
  padding: 10px 12px 8px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
}
.ffo-move-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.ffo-move-menu__item--active {
  background: var(--hairline);
}
.ffo-move-menu__item--off {
  color: var(--text-faint);
  cursor: default;
}
.ffo-move-menu__hint {
  font-size: 12px;
  color: var(--text-faint);
}
.ffo-move-menu__block {
  margin: 0;
  padding: 6px 12px 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--board-text-sec);
}
/* The phone sheet (Task 14, handoff §8/b8b): opened from a card's Move pill,
 * 50px rows, same rules (`moveOptions`/`blockLine`) as the desktop menu. */
.ffo-move-sheet {
  display: flex;
  flex-direction: column;
}
.ffo-move-sheet__row {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
}
.ffo-move-sheet__row:disabled {
  color: var(--text-faint);
  cursor: default;
}
.ffo-move-sheet__row:focus-visible {
  outline: 1px solid var(--amber-border-select);
  outline-offset: -2px;
  border-radius: 10px;
}
.ffo-move-sheet__block,
.ffo-move-sheet__foot {
  margin: 16px 4px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-faint);
}
/* The card's own Move pill (Task 14) — an always-visible, ≥44px thumb
 * target next to the follow-up badge; the desktop hover "Move" action and
 * inline `MoveMenu` are never rendered on a `move.mobile` card (parts.tsx). */
.ffo-deal__movepill {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  min-height: 44px;
  min-width: 64px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--text-secondary);
}
.ffo-deal__movepill:focus-visible {
  outline: 1px solid var(--amber-border-select);
  outline-offset: 2px;
}
.ffo-move-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px 12px 18px;
  border-radius: 999px;
  background: var(--overlay-bg-panel);
  border: 1px solid var(--message-border);
  box-shadow: var(--panel-shadow);
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-secondary);
}
.ffo-move-toast__undo {
  all: unset;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-faint);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
}
.ffo-move-toast__undo:focus-visible {
  outline: 1px solid var(--amber-border-select);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .ffo-move-spin {
    animation: none;
  }
}
/* Phone (Task 14): the centred pill would otherwise sit under the thumb or
 * clip against the safe area — anchor it to both edges instead, and let a
 * longer failure/undo line wrap rather than force horizontal scroll. */
@media (max-width: 840px) {
  .ffo-move-toast {
    left: 16px;
    right: 16px;
    transform: none;
    bottom: calc(16px + env(safe-area-inset-bottom));
    white-space: normal;
  }
}

/* --- Board Phase 3: outcome rows, the reason box, an off-board failure ---- */
.ffo-move-menu__rule,
.ffo-move-sheet__rule {
  height: 1px;
  margin: 6px 10px;
  background: var(--hairline);
}
/* Jev finding, controller-authorised 2026-09-28: the rule above carried no
 * words, so the label makes the outcome group readable in plain text too —
 * same quiet uppercase treatment as `.ffo-move-menu__head`. The `__outcomes`
 * wrappers are `role="group"` for assistive tech, not a layout — `display:
 * contents` removes them from the box tree entirely, so the rows inside
 * still stack exactly like ungrouped siblings of `.ffo-move-menu`/
 * `.ffo-move-sheet` did before this fix. */
.ffo-move-menu__grouplabel {
  padding: 8px 12px 4px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
}
.ffo-move-sheet__grouplabel {
  padding: 12px 4px 4px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faintest);
}
.ffo-move-menu__outcomes,
.ffo-move-sheet__outcomes {
  display: contents;
}
.ffo-move-toast--failed {
  white-space: normal;
}
.ffo-reason {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 46;
  width: min(420px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 16px 18px;
  border-radius: var(--radius-panel);
  background: var(--overlay-bg-panel);
  border: 1px solid var(--message-border);
  box-shadow: var(--panel-shadow);
  /* A long pick-list must not run off the top of the screen: the box is
     capped to the room above its 28px bottom offset (and the same below), and
     only the list scrolls — the title, hint and buttons stay in view. */
  max-height: calc(100vh - 56px);
  max-height: calc(100dvh - 56px);
  display: flex;
  flex-direction: column;
}
.ffo-reason > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ffo-reason--sheet {
  max-height: none;
  display: block;
  position: static;
  transform: none;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.ffo-reason__title {
  display: block;
  margin-bottom: 8px;
  font-size: 13.5px;
  color: var(--text-primary);
}
.ffo-reason__opt {
  color: var(--text-faint);
}
.ffo-reason__input {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--card-bg);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
}
.ffo-reason__input:focus-visible {
  outline: 1px solid var(--amber-border-select);
  outline-offset: 1px;
}
/* 2026-10-05: a SELECT reason is a pick-list, not a text box. Native radios
   in a role="radiogroup"; two columns in the 420px desktop box, one on a
   phone. The picked row shows a check glyph and a heavier border as well as
   the radio itself, so it never reads on colour alone. */
.ffo-reason__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding: 2px; /* room for the focus outline inside the scroller */
}
.ffo-reason__err {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--text-primary);
}
.ffo-reason__opt-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 44px;
  padding: 8px 32px 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--card-bg);
  color: var(--text-primary);
  font: inherit;
  font-size: 16px;
  line-height: 1.25;
  cursor: pointer;
}
.ffo-reason__opt-row input {
  flex: none;
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--amber-text-strong);
}
.ffo-reason__opt-row--on {
  border-width: 2px;
  padding: 7px 31px 7px 11px; /* the heavier border takes no room */
  border-color: var(--amber-border-select);
  font-weight: 600;
}
.ffo-reason__opt-row--on::after {
  content: "\2713";
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber-text-strong);
  font-weight: 700;
}
.ffo-reason__opt-row:focus-within {
  outline: 2px solid var(--amber-border-select);
  outline-offset: 1px;
}
.ffo-reason__foot {
  margin: 8px 0 12px;
  font-size: 11.5px;
  color: var(--text-faint);
}
.ffo-reason__acts {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.ffo-reason__acts button {
  all: unset;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  font-size: 12.5px;
  color: var(--text-secondary);
}
.ffo-reason__acts .ffo-reason__save {
  border-color: var(--amber-border-select);
  color: var(--amber-text-strong);
}
.ffo-reason__acts .ffo-reason__save:disabled {
  cursor: not-allowed;
  border-color: var(--hairline);
  color: var(--text-faint);
}
.ffo-reason__acts button:focus-visible {
  outline: 1px solid var(--amber-border-select);
  outline-offset: 2px;
}
@media (max-width: 840px) {
  .ffo-reason__list {
    grid-template-columns: minmax(0, 1fr);
  }
  .ffo-reason__input {
    font-size: 16px; /* no zoom-on-focus on iOS */
    min-height: 44px;
  }
  .ffo-reason__acts button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* --- Board Phase 3: the drop bar (handoff §9) ----------------------------- */
.ffo-dropbar {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none; /* only the tiles take a drop */
}
.ffo-dropbar__caption {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--overlay-bg-panel);
  border: 1px solid var(--message-border);
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.ffo-dropbar__tiles {
  display: flex;
  gap: 12px;
  pointer-events: auto;
}
.ffo-dropbar__tile {
  width: 156px;
  height: 68px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 0 16px;
  border-radius: var(--radius-deal);
  background: var(--overlay-bg-panel);
  border: 1px solid var(--message-border);
  box-shadow: var(--panel-shadow);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.ffo-dropbar__label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}
.ffo-dropbar__hint {
  font-size: 11.5px;
  color: var(--text-faint);
}
/* Hovered: amber hairline + a tint layered over the frosted panel, and a lift.
 * The caption above says the same thing in words. */
.ffo-dropbar__tile--over {
  border-color: var(--amber-border-hover);
  background: linear-gradient(var(--amber-drop-fill), var(--amber-drop-fill)), var(--overlay-bg-panel);
  transform: translateY(-4px) scale(1.04);
}
.ffo-dropbar__tile--over .ffo-dropbar__hint {
  color: var(--amber-text);
}
@media (prefers-reduced-motion: reduce) {
  .ffo-dropbar__tile {
    transition: none;
  }
  .ffo-dropbar__tile--over {
    transform: none;
  }
}

/* --- Outreach (count-only stages; never cards) -------------------------- */

.ffo-outreach__channels {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.ffo-outreach__ch {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ffo-outreach__chlabel {
  font-size: 12px;
  color: var(--text-faint);
}
.ffo-outreach__num {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.2;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.ffo-outreach__replied {
  font-size: 12.5px;
  color: var(--text-muted);
}
.ffo-outreach__stages {
  margin: 22px 0 0;
  font-size: 12px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.ffo-outreach__rule {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-faintest);
}
.ffo-outreach__who {
  all: unset;
  cursor: pointer;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.ffo-outreach__who:hover {
  color: var(--text-muted);
}
.ffo-outreach__who:focus-visible {
  text-decoration: underline;
}
.ffo-outreach__list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}
.ffo-outreach__list button {
  all: unset;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.ffo-outreach__list button:focus-visible {
  text-decoration: underline;
}
.ffo-outreach__more {
  font-size: 12px;
  color: var(--text-faintest);
}

/* --- Foot line ---------------------------------------------------------- */

.ffo-board-foot {
  margin: 20px 64px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 12.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
/* Board Phase 3: the drop bar owns the bottom while a card is dragged. */
.ffo-board-foot--away {
  visibility: hidden;
}
.ffo-board-foot__strong {
  color: var(--board-text-sec);
}
.ffo-board-foot__tick {
  color: var(--amber);
}
.ffo-board-foot__side {
  color: var(--text-faintest);
  white-space: pre;
}

/* Screen-reader-only text: what a dot or an amber age means, in words. */
.ffo-board-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Narrow screens: the phone pass (Task 9) — one stage at a time behind a
 * chip row, rendered by MobileBoard.tsx instead of the track above. Keep the
 * Board inside the phone gutter rather than off the left edge. */
@media (max-width: 840px) {
  .ffo-page.ffo-page--board {
    padding-left: 20px;
  }
  .ffo-page--board .ffo-sales-head,
  .ffo-page--board .ffo-sales-notice {
    padding-right: 20px;
  }
  .ffo-board-notice,
  .ffo-board-foot {
    margin-right: 20px;
  }
}

/* --- Mobile board (Task 9, handoff §8 / b8a) ----------------------------- */

@media (max-width: 840px) {
  .ffo-page.ffo-page--board { padding: 96px 20px 88px; }
  .ffo-page--board .ffo-sales-head { padding-right: 0; }
  /* Phone cards are full-width, not the desktop's 196px column — the badge
   * (short by construction, unlike the old age line) fits with no extra
   * treatment: a normal flex row, Open/Discuss always visible in flow (no
   * hover on a touch board) as a >=44px tap target each. */
  .ffo-deal__foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    min-height: 0;
  }
  /* Task 14: with the Move pill now a third element in this row, push
   * Open/Discuss to the far end instead of letting `space-between` spread
   * three items evenly — the pill reads as "beside the badge" (handoff
   * §8/b8b), not centred between two unrelated groups. */
  .ffo-deal__actions {
    position: static;
    flex: none;
    margin-left: auto;
    padding: 0;
    background: none;
    opacity: 1;
    pointer-events: auto;
  }
  .ffo-deal__act { min-height: 44px; display: inline-flex; align-items: center; }
}
.ffo-mboard { margin-top: 24px; }
.ffo-mboard__chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 10px;
  /* #000 here is a mask alpha (opaque = shown, transparent = hidden), not a
   * colour — the soft edge mask so the chip row's ends fade rather than hard
   * -crop, per the tokens-only rule (colour literals only, not mask alpha). */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
.ffo-mboard__chips::-webkit-scrollbar { display: none; }
.ffo-mboard__chip {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: var(--pill-bg);
  color: var(--text-muted);
  font-size: 13px;
}
.ffo-mboard__chip[aria-selected='true'] { color: var(--text-primary); border-color: var(--amber-border-select); }
.ffo-mboard__chip span { color: var(--text-faint); margin-left: 4px; font-variant-numeric: tabular-nums; }
.ffo-mboard__sub { margin: 8px 0 14px; font-size: 12.5px; color: var(--text-muted); }
/* The column subline carries money (Amendment A2): one line, tabular
 * figures, cut rather than wrapped — so Hide amounts never changes its
 * height and the cards below never jump. */
.ffo-mboard__sub--column {
  min-height: 18px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ffo-mboard__list { display: flex; flex-direction: column; gap: 10px; }
.ffo-mboard .ffo-outreach { width: auto; }
.ffo-mboard .ffo-board-foot { margin-right: 0; flex-direction: column; align-items: flex-start; gap: 6px; }

@media (prefers-reduced-motion: reduce) {
  .ffo-deal,
  .ffo-deal__actions,
  .ffo-deal__co,
  .ffo-deal__badge {
    transition: none;
  }
  .ffo-deal:hover,
  .ffo-deal:focus-within {
    transform: none;
  }
}

/* --- Board Phase 3: the Outcomes panel (Jay, 2026-09-28) ----------------- */
.ffo-board-foot__count {
  all: unset;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 3px;
}
.ffo-board-foot__count:hover { text-decoration-color: var(--amber-border-hover); }
.ffo-board-foot__count:focus-visible { outline: 1px solid var(--amber-border-select); outline-offset: 2px; }
.ffo-outcomes__tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.ffo-outcomes__tab {
  all: unset; cursor: pointer; padding: 6px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--hairline); font-size: 12.5px; color: var(--text-secondary);
}
/* Task 16 fix — this used to be `border-color`/`color` alone (the same
 * text/border shift `.ffo-mboard__chip[aria-selected]` already used, but
 * never carried its OWN a11y story past the border either — caught here
 * because this brief named this spot, not because the older chip passed a
 * check this file re-derives). Global rule: "status is never carried by
 * colour alone." `.ffo-viewswitch__opt[aria-pressed='true']` right above in
 * this same file already solves this exact shape (a segmented control's
 * selected option) with a filled pill + shadow, not just a colour swap — same
 * two tokens, reused rather than inventing a third way to say "selected". */
.ffo-outcomes__tab[aria-selected='true'] {
  border-color: var(--amber-border-select);
  color: var(--amber-text-strong);
  background: var(--pill-bg);
  box-shadow: var(--board-seg-on-shadow);
}
.ffo-outcomes__tab:focus-visible { outline: 1px solid var(--amber-border-select); outline-offset: 2px; }
.ffo-outcomes__find {
  width: 100%; box-sizing: border-box; min-height: 38px; margin-bottom: 12px; padding: 8px 12px;
  border-radius: 12px; border: 1px solid var(--hairline); background: var(--card-bg); color: var(--text-primary); font: inherit;
}
/* `position: relative` (Task 16 fix): the containing block for this row's own
 * `.ffo-move-menu` ("Move to…") — see the long comment on `OutcomeRow` in
 * OutcomesPanel.tsx for what went wrong without it (the menu anchored to the
 * whole `position: fixed` panel instead of the row, pinning it off the
 * bottom of the screen). Same role `.ffo-deal`'s own `position: relative`
 * plays for the Board's card-level Move menu. */
.ffo-outcome { position: relative; padding: 12px 0; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 4px; }
.ffo-outcome--saving { opacity: 0.62; }
.ffo-outcome__who { display: flex; gap: 8px; align-items: baseline; }
.ffo-outcome__name { font-size: 14px; color: var(--text-primary); }
.ffo-outcome__co, .ffo-outcome__meta { font-size: 12px; color: var(--text-faint); }
.ffo-outcome__why { font-size: 12.5px; color: var(--text-secondary); }
.ffo-outcome__act {
  all: unset; align-self: flex-start; cursor: pointer; margin-top: 4px; padding: 5px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--hairline); font-size: 12.5px; color: var(--text-secondary);
}
.ffo-outcome__act:disabled { cursor: not-allowed; color: var(--text-faint); }
.ffo-outcome__act:focus-visible { outline: 1px solid var(--amber-border-select); outline-offset: 2px; }
.ffo-outcomes__empty, .ffo-outcomes__more, .ffo-outcomes__foot { font-size: 12.5px; color: var(--text-faint); }
@media (max-width: 840px) {
  .ffo-outcomes__tab, .ffo-outcome__act { min-height: 44px; display: inline-flex; align-items: center; }
  .ffo-outcomes__find { font-size: 16px; min-height: 44px; }
}
/* Sales screen (design handoff "Sales" section, artboards 2a-2f). No ambient
 * header card here — Today owns that. Title + subline, then the pipeline
 * zone as vertical stage sections, then Money. Reuses .ffo-page/.ffo-page-title/
 * .ffo-subline from styles/base.css and the row grammar from primitives.css —
 * nothing in this file redefines a colour or the row layout itself. */

/* --- Summary strip (below title/subline) --------------------------------- *
 * Today-header style but boxless: no ambient header card on this screen, so
 * this is a plain flex row in normal page flow rather than pinned inside an
 * absolutely-positioned header. Same numbers as .ffo-summary/.ffo-summary__*
 * in Today.css (21px number, 11.5px muted label, 64px gap, wraps on mobile)
 * — kept as its own class here since Sales owns its file per the repo's
 * per-screen ownership convention. */

.ffo-sales-summary {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 64px;
}

/* --- The strip's expander (Jay, 2026-08-29) -----------------------------
 *
 * The spine grew from 9 stages to 20 and the strip went with it: sixteen
 * counters over three wrapped rows, ten of them zero. What stays on screen is
 * the funnel segment plus whatever is actually holding work; the rest of the
 * lifecycle drops in behind this control. The split is decided in
 * api/sales.ts — nothing here knows a stage name. */

.ffo-sales-summary-block {
  display: flex;
  flex-direction: column;
}

/* The nested strip inside the reveal must not re-apply the block's top
 * margin, or opening the panel would push the hidden counters away from the
 * visible ones by 28px. */
.ffo-sales-summary__rest .ffo-sales-summary {
  margin-top: 0;
}

/* Quiet by design: this is a way to see more, not a call to action. It sits
 * on the counters' own baseline so the row reads as one line of items. */
.ffo-sales-summary__more {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  color: var(--text-faint);
  transition: color var(--motion-hover) var(--ease-overlay);
}
.ffo-sales-summary__more:hover {
  color: var(--text-secondary);
}

/* A chevron drawn from a rotated square — no icon import for six pixels. It
 * points down when there is more to see and up when there is not, turning on
 * the hover clock so the control answers the press immediately even while the
 * panel below is still opening. */
.ffo-sales-summary__more-chevron {
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform var(--motion-hover) var(--ease-overlay);
}
.ffo-sales-summary__more[aria-expanded='true'] .ffo-sales-summary__more-chevron {
  transform: rotate(-135deg) translate(-1px, -1px);
}

/* The drop.
 *
 * `grid-template-rows: 0fr -> 1fr` is the product's declared exception to the
 * transform/opacity-only rule (see motion.test.ts, which whitelists this
 * property by name and nothing else). Nothing composited can reclaim vertical
 * space, and the alternatives are worse: a fixed max-height would need a magic
 * number that is wrong the moment the spine changes length again — which is
 * exactly the change that created this control.
 *
 * Opening uses the entrance clock and closing the exit clock, so it obeys the
 * same asymmetry as every overlay: arriving is information, leaving is
 * already decided. Opacity rides along so the counters fade as they drop
 * rather than sliding in fully formed. */
.ffo-sales-summary__rest {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows var(--motion-out) var(--ease-overlay),
    opacity var(--motion-out) var(--ease-overlay);
}
.ffo-sales-summary__rest--open {
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows var(--motion-in) var(--ease-overlay),
    opacity var(--motion-in) var(--ease-overlay);
}

/* The child a `0fr` row actually collapses — it needs both of these or the
 * content holds the row open at its natural height. */
.ffo-sales-summary__rest-inner {
  min-height: 0;
  overflow: hidden;
  /* Breathing room between the two rows of counters once open. Padding rather
   * than margin: a margin here would escape the collapsed row and leave a gap
   * under the strip while it is shut. */
  padding-top: 18px;
}

.ffo-sales-summary__pair {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: transform var(--motion-lift) var(--ease-overlay);
}

/* A number rises on hover (same lift as Today's header numbers). 2px up and the figure brightens one tier to full ink —
 * neutral, never amber. The pair has no surface to lift, so the number going
 * to --text-primary is its "highlight".
 *
 * The hover target is the pair itself, which moves, so the cursor resting on
 * its bottom edge would strobe. A transparent strip under it, 3px tall,
 * rises with it and keeps the old bottom edge covered. Nothing here is
 * `overflow: hidden`, so unlike a Card the pseudo-element is a real hit area.
 * Transform off under reduced motion; the brightening stays. */
.ffo-sales-summary__pair::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 3px;
}
.ffo-sales-summary__number {
  transition: color var(--motion-lift) var(--ease-overlay);
}
@media (hover: hover) and (pointer: fine) {
  .ffo-sales-summary__pair:hover .ffo-sales-summary__number {
    color: var(--text-primary);
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ffo-sales-summary__pair:hover {
    transform: translateY(var(--lift-y));
  }
}

.ffo-sales-summary__number {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.ffo-sales-summary__label {
  font-size: 11.5px;
  color: var(--text-faint);
}

/* Grouped variant: the pairs sit under a faint lane caption instead of in one
 * flat row. Column-gap between GROUPS is wider than between pairs, so the
 * grouping reads from spacing rather than from a rule or a box — the same
 * device the rest of the product uses for hierarchy. */

.ffo-sales-summary--grouped {
  gap: 22px 56px;
  align-items: flex-start;
}

.ffo-sales-summary__group {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.ffo-sales-summary__group-label {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.ffo-sales-summary__pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
}

/* --- Lane -----------------------------------------------------------------
 *
 * A lane is a heading plus its stages. It draws no box and no border: the
 * separation is 52px of air above the header and the stages' own 40px
 * rhythm below it, which is one step of hierarchy above a stage without
 * introducing a second kind of container to the page. */

.ffo-sales-lane {
  margin-top: 52px;
}

.ffo-sales-lane__header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 18px;
}

/* The channel split, one tier quieter than the lane label it sits beside —
 * it annotates the lane, it isn't a second heading. */
.ffo-sales-lane__channels {
  font-size: 12.5px;
  color: var(--text-faint);
}

/* Names the deploy's ONE configured rep once, beside the lane header, rather
 * than repeating them on every row below (PORTING.md §10b). Only rendered
 * when `reps.length === 1` — 2+ reps show per-row instead, via
 * `.ffo-sales-rep`; 0 reps render nothing here at all. */
.ffo-sales-lane__rep {
  font-size: 12.5px;
  color: var(--text-faint);
}

/* Inside a lane the first stage sits close to its own header rather than
 * taking the full 40px inter-stage gap — that gap is what separates stages
 * from each other, and reusing it here would detach the header from what it
 * labels. */
.ffo-sales-lane .ffo-sales-stage:first-of-type {
  margin-top: 22px;
}

.ffo-sales-stage {
  margin-top: 40px;
}
.ffo-sales-stage:first-of-type {
  margin-top: 44px;
}

/* An empty step of the funnel: header only, no card. Kept visible — the
 * shape of the funnel is the information — but dropped a tier so a run of
 * zeros never competes with the stages that actually hold someone. */
.ffo-sales-stage--empty {
  margin-top: 26px;
  opacity: 0.55;
}

/* --- The "no pipeline config" notice --------------------------------------
 *
 * One line, faintest tier, no card, no icon: it is a caveat about where the
 * numbers came from, not an error the founder has to act on. */

.ffo-sales-notice {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.ffo-sales-stage__label {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ffo-sales-stage__card {
  margin-top: 18px;
  /* Lists and tables are 16px (Evening Desk). */
  border-radius: 16px;
}

/* --- Sand bands (Evening Desk) -------------------------------------------
 * Keyed on the row wrapper (.ffo-band-row, even by row index, set in
 * Sales.tsx) so the Returning-customers sub-header never shifts parity.
 * Hover is an amber tint and selected an inset amber hairline, both distinct
 * from the sand band. */
.ffo-sales-stage__card .ffo-band-row--even {
  background: var(--band);
}
.ffo-sales-stage__card .ffo-band-row .ffo-row--clickable:hover {
  background: var(--card-row-hover);
}
.ffo-sales-stage__card .ffo-band-row .ffo-row--selected,
.ffo-sales-stage__card .ffo-band-row .ffo-row--selected:hover {
  background: var(--card-row-selected-fill);
  box-shadow: inset 0 0 0 1.5px var(--card-row-selected);
}

/* --- Returning-customer sub-header ----------------------------------------
 *
 * Sits where a `.ffo-divider` would between two rows — same quiet-label
 * language as `.ffo-sales-summary__group-label` (10.5px, uppercase, faint,
 * dialled back with opacity) rather than a new visual device. Only Unisource
 * rows ever reach a stage with both populations, so this never paints on any
 * other deploy. */
.ffo-sales-subheader {
  padding: 16px 0 6px;
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  opacity: 0.75;
}

.ffo-sales-more {
  margin-top: 18px;
  padding-left: 4px;
  font-size: 12.5px;
  color: var(--text-faint);
  transition: color var(--motion-hover) ease;
}
.ffo-sales-more:hover {
  color: var(--text-muted);
}

/* --- Reason + acquisition channel ---------------------------------------
 *
 * The channel rides the END of the reason column rather than taking a column
 * of its own: `margin-left: auto` pushes it right, the reason keeps its
 * flex-1 slot, and the row's fixed-width name column — the product's only
 * alignment device (primitives.css) — is untouched. One step quieter than the
 * reason (12.5px/--text-faint vs 13.5px/--text-muted) so it reads as an
 * annotation, not a second fact competing with why the row is here. */

.ffo-sales-reason {
  display: flex;
  align-items: baseline;
  gap: 14px;
  width: 100%;
  min-width: 0;
}
.ffo-sales-reason__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ffo-sales-channel {
  margin-left: auto;
  flex: none;
  font-size: 12.5px;
  color: var(--text-faint);
}
/* The rep label — same quiet treatment as the channel, right after it when
 * both are present (channel's own auto margin already pushed the pair to
 * the row's right edge as a group), or pushed right on its own when a lead
 * has no channel data. Only ever rendered with 2+ reps configured — see
 * `stageHandlers`'s `showRep`. */
.ffo-sales-rep {
  margin-left: auto;
  flex: none;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* The quotation board's first column: the job title, in the row's fixed-width
 * name slot. Fixed width is the only alignment device in this product
 * (primitives.css clause 2), so a long title ellipsises inside the column
 * instead of widening it — the full text is on the row's `title` attribute and
 * on the drill-in. */
.ffo-sales-project {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- The three-field row title (Jay, 2026-09-02) --------------------------
 *
 * Navdeep's board only. His rows read PROJECT, CODE, COMPANY — three facts a
 * founder scans, not one composed sentence. Every other deploy renders the
 * plain string it always did and never reaches these rules.
 *
 * The code sits BETWEEN the two, not down the left-hand edge: a column of
 * machine text is what the 2026-08-28 decision took off the row, and putting
 * it back at the front would undo that. Next to the project it reads as the
 * project's number, which is what it is.
 */
.ffo-sales-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

/* The one thing being read. Gets priority for space: a floor of 8ch means it
 * only starts giving ground once the company clause (below) has already been
 * squeezed to nothing — `flex-shrink: 1` alone let it and the company shrink
 * in lockstep, which is how it ended up the one- and two-character stub this
 * rule replaced. */
.ffo-sales-title__project {
  /* Never shrinks below its own text; the cap (column minus room for the
   * reference) is what ellipsises a name longer than the column. The company clause (flex 3) gives ground
   * first. Seen on a built bundle: with flex-shrink 1 the name and company
   * shrank in lockstep and "Isla Fernandes" read "Isla Fernan...". */
  flex: 0 0 auto;
  max-width: calc(100% - 7.5em);
  min-width: 8ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Quiet, tabular, and never shrunk: a reference that has lost its last three
 * characters to an ellipsis is worse than no reference, because it still looks
 * like one. */
.ffo-sales-title__ref {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--text-faint);
}

/* Last in reading order and first to give: shrinks ahead of the project name
 * (higher shrink factor, no floor) so a tight row loses the company clause's
 * tail before it touches the project at all. */
.ffo-sales-title__company {
  flex: 3 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

/* The quotation board's second column. Same right-aligned end of the reason
 * slot a lead row gives its channel, one step less faint because on this board
 * the company is a COLUMN somebody reads down, not an aside. */
.ffo-sales-company {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-secondary);
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* "I worked this one out." Quiet on purpose — it is a question, not a warning,
 * and on this board eight of seventeen rows carry it. Both themes inherit,
 * since every value here is a token. */
.ffo-sales-unconfirmed {
  flex: none;
  display: inline-block;
  min-width: 13px;
  padding: 0 3px;
  border: 1px solid var(--divider);
  border-radius: 4px;
  font-size: 10px;
  line-height: 13px;
  text-align: center;
  color: var(--text-faint);
  cursor: help;
}

/* --- Hover-only "Discuss" text link, sits after the value in the row ----- */

.ffo-sales-discuss {
  flex: none;
  font-size: 12.5px;
  color: var(--text-faint);
  opacity: 0;
  transition:
    opacity var(--motion-hover) ease,
    color var(--motion-hover) ease;
}
.ffo-row:hover .ffo-sales-discuss,
.ffo-row:focus-within .ffo-sales-discuss {
  opacity: 1;
}
.ffo-sales-discuss:hover {
  color: var(--amber-text-strong);
}

/* Going quiet on a list row: the wash overrides the sand band; "Quiet Nd"
 * follows the reason. The selector is deliberately specific so it wins over
 * the band rule whichever file defines it. */
.ffo-sales-stage__card .ffo-band-row[data-quiet='1'] {
  background: var(--quiet-1-bg);
  box-shadow: inset 0 0 0 1px var(--quiet-1-edge);
}
.ffo-sales-stage__card .ffo-band-row[data-quiet='2'] {
  background: var(--quiet-2-bg);
  box-shadow: inset 0 0 0 1px var(--quiet-2-edge);
}
.ffo-sales-quiet {
  margin-left: 12px;
}

/* The follow-up chip sits at the right end of the row, before Discuss. */
.ffo-row .ffo-sales-fu {
  flex: none;
}

/* --- Won/Closed, collapsed to one handled line --------------------------- */

.ffo-sales-closed {
  margin-top: 18px;
  padding: 22px 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14.5px;
  color: var(--text-body);
}

.ffo-sales-closed__check {
  font-size: 14px;
  color: var(--amber);
}

.ffo-sales-closed__more {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-faint);
  transition: color var(--motion-hover) ease;
}
.ffo-sales-closed__more:hover {
  color: var(--text-muted);
}

/* Post-sale (Delivery, Renewal/Referral) and the named Closed section now
 * render as ordinary StageSection cards — see Sales.tsx. No boxless tail
 * treatment any more: Jay, 2026-08-26, wanted the actual members visible,
 * not a count. */

/* --- Find a lead ----------------------------------------------------------
 *
 * Sits on the title line, right-aligned. A hairline field and nothing else:
 * no toolbar, no fill, no button — it should read as part of the page until
 * it is being used, at which point the border warms one step. The magnifier
 * is a 1.2-stroke glyph at the faintest tier; it is an affordance, not
 * decoration. */

.ffo-sales-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ffo-sales-search {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 240px;
  padding: 9px 13px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  transition:
    border-color var(--motion-hover) ease,
    background var(--motion-hover) ease;
}
.ffo-sales-search:focus-within {
  border-color: var(--amber-chip);
}

.ffo-sales-search__glyph {
  flex: none;
  color: var(--text-faint);
}

.ffo-sales-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font: inherit;
  font-size: 13.5px;
  color: var(--text-body);
}
.ffo-sales-search__input::placeholder {
  color: var(--text-faint);
}

.ffo-sales-search__clear {
  flex: none;
  font-size: 13px;
  line-height: 1;
  color: var(--text-faint);
  transition: color var(--motion-hover) ease;
}
.ffo-sales-search__clear:hover {
  color: var(--amber-text-strong);
}

/* The empty result. One line, no card, no illustration — the same posture as
 * every other "nothing here" state in the product. */
.ffo-sales-noresults {
  margin-top: 44px;
  padding-left: 4px;
  font-size: 14.5px;
  color: var(--text-muted);
}

/* --- Money zone ----------------------------------------------------------- */

.ffo-sales-money {
  margin-top: 40px;
}

.ffo-sales-money__card {
  margin-top: 18px;
}

/* --- The couldn't-check state, same single-line format as Today's --------- */

.ffo-sales-failed {
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14.5px;
  color: var(--text-body);
}

.ffo-sales-retry {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-faint);
  transition: color var(--motion-hover) ease;
}
.ffo-sales-retry:hover {
  color: var(--amber-text-strong);
}

/* --- Loading skeleton (mirrors Today's ffo-skeleton-row) ------------------ */

.ffo-sales-skeleton-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 30px;
  min-height: 73px;
}
.ffo-sales-skeleton-bar {
  height: 9px;
  border-radius: 999px;
  background: var(--divider);
  animation: ffo-skeleton 1.6s ease-in-out infinite;
}

@media (max-width: 840px) {
  .ffo-sales-summary {
    gap: 14px 28px;
  }
  .ffo-sales-summary--grouped {
    gap: 18px 32px;
  }
  .ffo-sales-summary__pairs {
    gap: 14px 26px;
  }
  .ffo-sales-summary__number {
    font-size: 19px;
  }

  /* The search field drops under the title rather than squeezing it — at
   * 390px a 240px field beside a 22px title leaves neither room to breathe. */
  .ffo-sales-head {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  /* The Board added two more controls (Hide amounts, Sections · Board) to
   * this same row. At >=210px `.ffo-sales-search` alone already fills the
   * whole 375px gutter, so without a wrap those extra pills push the page
   * itself wider than the viewport — a horizontal scrollbar on Sales that
   * did not exist before the switch (commit a0fc7f7). Wrap the row and let
   * the search field claim its own line; the toggle and switch fall to the
   * next line together, same as everything else here already stacks.
   *
   * Scoped to `--board` (final-review fix, 2026-09-26): only a deploy whose
   * header carries the Board controls wraps. Every other client's phone
   * header — including a rep-filter deploy, where an unscoped wrap pushed
   * the RepFilter onto its own line above search — stays exactly as it was
   * at 0a5f677. */
  .ffo-sales-tools--board {
    flex-wrap: wrap;
  }
  .ffo-sales-search {
    width: 100%;
  }
  .ffo-sales-tools--board .ffo-sales-search {
    flex: 1 1 100%;
  }

  .ffo-sales-lane {
    margin-top: 44px;
  }
  .ffo-sales-lane__channels {
    font-size: 12px;
  }
  .ffo-sales-lane__rep {
    font-size: 12px;
  }

  /* The row grammar stacks (primitives.css); Discuss is a hover-only text
   * link, not a pill, so it keeps its own order rather than the generic
   * full-width-pill rule — it lands after the reason line, left-aligned.
   * Touch has no hover state, so it stays visible instead of vanishing. */
  .ffo-row .ffo-sales-fu {
    order: 4;
    margin-left: 19px;
  }
  .ffo-row .ffo-sales-discuss {
    order: 4;
    opacity: 1;
    padding-left: 19px;
  }
}

/* --- Filter by rep (2026-09-03) ------------------------------------------
 *
 * Sits beside "Find a project…", built from the same pill as the search field
 * so the two read as one control strip rather than two unrelated widgets. */

.ffo-sales-tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ffo-rep-filter {
  position: relative;
  flex: none;
}

.ffo-rep-filter__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 200px;
  padding: 9px 13px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text-body);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--motion-hover) ease;
}
.ffo-rep-filter__trigger:hover,
.ffo-rep-filter__trigger[aria-expanded='true'] {
  border-color: var(--amber-chip);
}

/* The one accent on this control: a filter is ON, and the founder must be able
 * to see that at a glance rather than by reading the label. */
.ffo-rep-filter__trigger--active {
  border-color: var(--amber-chip);
  color: var(--amber-text);
}

.ffo-rep-filter__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ffo-rep-filter__caret {
  flex: none;
  color: var(--text-faint);
}

.ffo-rep-filter__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 216px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.ffo-rep-filter__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 9px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text-body);
  text-align: left;
  cursor: pointer;
  transition: background var(--motion-hover) ease;
}
.ffo-rep-filter__option:hover {
  background: var(--pill-translucent);
}

.ffo-rep-filter__box {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid var(--divider);
  font-size: 10px;
  line-height: 1;
  color: transparent;
}
.ffo-rep-filter__box--on {
  border-color: var(--amber-chip);
  color: var(--amber-text);
}

.ffo-rep-filter__sep {
  height: 1px;
  margin: 5px 4px;
  background: var(--divider);
}

/* Money on a list row: Jost, like every deal value (Evening Desk). */
.ffo-sales-stage__card .ffo-row__value {
  font-family: var(--font-display);
  font-size: 15px;
}
/* Settings (design handoff step 5, artboards 5a–5d). Its Connections
 * sub-view was removed 2026-09-29 (Jay's decision — the connectors are gone
 * for now); the shared form vocabulary it left behind survives below because
 * Settings -> Rhythm still uses it.
 *
 * Page container mirrors Today's .ffo-page (840px content column, centred)
 * but is defined locally rather than imported from Today.css — this screen's
 * file ownership doesn't include Today's stylesheet, and duplicating one
 * rule block is cheaper than a cross-screen CSS dependency. Values are the
 * same tokens either way. Settings' own top offset is 176px, per the
 * handoff's "Page top ... Settings top: 176px". */

.ffos-settings-page {
  width: min(var(--width-content), 100%);
  margin: 0 auto;
  padding: 176px 0 88px;
}

@media (max-width: 1180px) {
  .ffos-settings-page {
    padding-left: 40px;
    padding-right: 40px;
  }
}

@media (max-width: 840px) {
  .ffos-settings-page {
    padding: 96px 20px 88px;
  }
  .ffos-settings-title {
    font-size: 28px;
  }
}

.ffos-settings-title {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 30px;
}

/* Amber-only status line: a live SSE stream is invisible by design, this
 * shows only for the in-between "reconnecting" state. */
.ffos-settings-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: -18px 0 20px;
  font-size: 12px;
  color: var(--amber-text);
}

/* --- Settings home: three frosted single-line rows ---------------------- */

.ffos-settings-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ffos-settings-card {
  /* Card already supplies radius/background/border/shadow/blur. */
}

.ffos-settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 26px 30px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--motion-hover) ease;
}
.ffos-settings-row:hover {
  background: var(--row-hover);
}

/* A row that is genuinely not a door yet (Business Brain before onboarding is
 * finished). No pointer, no hover lift — nothing that reads as clickable. */
.ffos-settings-row--inert {
  cursor: default;
}
.ffos-settings-row--inert:hover {
  background: none;
}

.ffos-settings-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ffos-settings-row__name-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ffos-settings-row__name {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.ffos-settings-row__sub {
  font-size: 13.5px;
  color: var(--text-muted);
}
.ffos-settings-row__sub--faint {
  color: var(--text-faint);
}

/* "match my system" — a quiet inline text link inside the Appearance row's
 * subline, not a pill or a button; it only appears once a manual preference
 * is stored, so there's always something real to clear back to. */
.ffos-settings-row__link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--motion-hover) ease, color var(--motion-hover) ease;
}
.ffos-settings-row__link:hover,
.ffos-settings-row__link:focus-visible {
  color: var(--amber-text-strong);
  text-decoration-color: currentColor;
}
.ffos-settings-row__link:focus-visible {
  outline: none;
}

.ffos-settings-row__chevron {
  flex: none;
  display: flex;
  color: var(--text-faint);
  transition: transform var(--motion-hover) ease;
}
.ffos-settings-row__chevron--open {
  transform: rotate(90deg);
}

/* --- Background picker ---------------------------------------------------
 * The only row here that shows instead of telling. It never collapses: the
 * options are the row, so the head is plain text, not a button.
 * Padding matches .ffos-settings-row's 26px/30px so the card reads as one of
 * the family rather than a special case. */

.ffos-bg-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 30px 18px;
}

.ffos-bg-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0 30px 26px;
}

.ffos-bg-swatch {
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: pointer;
}

/* Visually hidden, still focusable and still the thing that owns keyboard
 * behaviour — never `display: none`, which would take the radio out of the
 * tab order and kill arrow-key navigation with it. */
.ffos-bg-swatch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* The miniature. Same recipe class as the live layer, so the image, opacity,
 * mask and tint are the real ones for the theme that's currently on. */
.ffos-bg-swatch__tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  /* Not --radius-card (24px): that's the radius of a real card, and at tile
   * size it would round the corners away to nothing. */
  border-radius: 12px;
  /* The tile previews the PAGE (the ambient layer sits on the page ground),
   * so it keeps the page ground even though the Settings card around it is a
   * light surface. Its label below reads card ink. */
  background: var(--page-bg);
  border: 1px solid var(--hairline);
  transition: outline-color var(--motion-hover) ease;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* Height is proportional here where the live layer's is absolute: a 560px
 * horizon inside a 64px tile would be the whole tile. The mask is a gradient
 * over the layer's own height, so it scales with it and the miniature keeps
 * the full-size proportion of clear zone to imagery. */
.ffos-bg-swatch__layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72%;
  -webkit-mask-image: var(--amb-mask);
  mask-image: var(--amb-mask);
  background-image: var(--amb-image);
  background-size: cover;
  background-position: var(--amb-position);
  background-repeat: no-repeat;
  opacity: var(--amb-opacity);
}
/* The tint rides on top of the image inside the mask, exactly as it does on
 * the live layer — as a sibling overlay it would sit outside the mask and
 * wash the whole tile. */
.ffos-bg-swatch__layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--amb-tint);
}

/* Amber marks the current choice, the same way it marks the current nav item
 * in the drawer — this is "where you are", not a new signal colour. */
.ffos-bg-swatch--on .ffos-bg-swatch__tile {
  outline-color: var(--amber-text);
}
.ffos-bg-swatch--on .ffos-bg-swatch__label {
  color: var(--text-secondary);
  font-weight: 500;
}

.ffos-bg-swatch:hover .ffos-bg-swatch__tile {
  outline-color: var(--hairline);
}
.ffos-bg-swatch--on:hover .ffos-bg-swatch__tile {
  outline-color: var(--amber-text);
}

.ffos-bg-swatch__input:focus-visible + .ffos-bg-swatch__tile {
  outline-color: var(--amber-text-strong);
}

.ffos-bg-swatch__label {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* Two up rather than four when the card narrows — four 16:10 tiles in a
 * phone-width column are too small to tell a landscape from a texture, which
 * is the entire job of the swatch. */
@media (max-width: 560px) {
  .ffos-bg-swatches {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Sales layout (Board beta) — handoff b7c/b7d. ------------------------ */

.ffos-layout {
  padding: 4px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ffos-layout__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ffos-layout__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-deal);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  cursor: pointer;
}
.ffos-layout__tile {
  transition:
    transform var(--motion-lift) var(--ease-overlay),
    box-shadow var(--motion-lift) var(--ease-overlay),
    border-color var(--motion-lift) var(--ease-overlay),
    background-color var(--motion-lift) var(--ease-overlay),
    scale var(--motion-hover) var(--ease-overlay);
}
.ffos-layout__tile--on {
  border-color: var(--amber-border-select);
}
/* A choice tile is small, pointer-clickable and not clipped, so it takes the
 * card hover directly (primitives.css has the reasoning) with the strip-under
 * cure for the edge strobe. The chosen tile keeps its amber border: that is
 * "where you are", and a hover must not repaint it neutral. */
.ffos-layout__tile::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 3px;
}
@media (hover: hover) and (pointer: fine) {
  .ffos-layout__tile:hover {
    background-color: var(--card-bg-lift);
    box-shadow: var(--card-shadow-lift);
  }
  .ffos-layout__tile:hover:not(.ffos-layout__tile--on) {
    border-color: var(--card-border-lift);
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ffos-layout__tile:hover {
    transform: translateY(var(--lift-y));
  }
}
.ffos-layout__tile input {
  position: absolute;
  top: 14px;
  right: 14px;
  accent-color: var(--amber);
}
.ffos-layout__schema {
  display: flex;
  gap: 3px;
  height: 34px;
  margin-bottom: 4px;
}
.ffos-layout__schema i {
  display: block;
  border-radius: 3px;
  background: var(--hairline);
}
.ffos-layout__schema--sections {
  flex-direction: column;
  width: 60px;
}
.ffos-layout__schema--sections i {
  height: 4px;
}
.ffos-layout__schema--board i {
  width: 12px;
}
.ffos-layout__name {
  font-size: 13.5px;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.ffos-layout__beta {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.ffos-layout__desc {
  font-size: 12.5px;
  color: var(--text-muted);
}
.ffos-layout__note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-faint);
}
.ffos-layout__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-faintest);
}
.ffos-layout__saved {
  color: var(--sage-text);
}
.ffos-layout__visit {
  color: var(--text-muted);
}
@media (max-width: 560px) {
  .ffos-layout__tiles {
    grid-template-columns: 1fr;
  }
}

/* --- Password inline flow ------------------------------------------------ */

.ffos-pass-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 30px 26px;
}

.ffos-pass-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
}
.ffos-pass-field input {
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--pill-translucent);
  border: 1px solid var(--pill-border);
  border-radius: 12px;
  padding: 11px 14px;
}
.ffos-pass-field input:focus {
  outline: none;
  border-color: var(--amber-border-hover);
}

.ffos-pass-result {
  font-size: 13px;
  color: var(--severe);
}
.ffos-pass-result--ok {
  color: var(--amber-text);
}

/* --- Shared Settings form vocabulary ---------------------------------------
 *
 * Built for the Connections sub-view; the Connections screen itself was
 * removed 2026-09-29 (Jay's decision — the connectors are gone for now), but
 * Settings -> Rhythm below still uses this exact vocabulary, so the classes
 * stay. Only what Rhythm actually uses is kept; the row/pill/steps/address/
 * consent classes that had no surviving caller were removed with the screen
 * they were built for. */

.ffos-conn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--text-faint);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--motion-hover) ease;
}
.ffos-conn-back:hover {
  color: var(--amber-text-strong);
}
.ffos-conn-back__chevron {
  display: flex;
  transform: rotate(180deg);
}

.ffos-conn-banner {
  margin: 0 0 18px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.ffos-conn-groups {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.ffos-conn-skeleton {
  height: 140px;
  border-radius: var(--radius-card);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  animation: ffo-skeleton 1.6s ease-in-out infinite;
}

.ffos-conn-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
}
.ffos-conn-field input,
.ffos-conn-field textarea {
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--pill-translucent);
  border: 1px solid var(--pill-border);
  border-radius: 12px;
  padding: 11px 14px;
  resize: vertical;
}
.ffos-conn-field input:focus,
.ffos-conn-field textarea:focus {
  outline: none;
  border-color: var(--amber-border-hover);
}

.ffos-conn-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-faint);
}

.ffos-conn-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--amber-text);
}

.ffos-conn-feedback {
  margin: 0;
  font-size: 13px;
  color: var(--severe);
}
.ffos-conn-feedback--ok {
  color: var(--amber-text);
}

/* --- Settings -> Rhythm ---------------------------------------------------
 *
 * Reuses the shared form vocabulary above (.ffos-conn-field, -hint, -note,
 * -feedback, -back) rather than starting a second one: Rhythm is a Settings
 * sub-view, not a new surface, and two form idioms inside one screen is how
 * a settings page starts looking assembled rather than designed. What is new
 * here is only what Rhythm itself needs: a day read back as a sentence,
 * choice chips, and the schedule preview. */

.ffos-rhythm-form {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.ffos-rhythm-lede {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-body);
  max-width: 56ch;
}

.ffos-rhythm-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ffos-rhythm-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 18px 20px;
}

.ffos-rhythm-divider {
  height: 1px;
  background: var(--pill-border);
  margin: 0 -18px;
}

.ffos-rhythm-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
}
.ffos-rhythm-field__label {
  font-size: 13px;
  color: var(--text-muted);
}
.ffos-rhythm-field__hint {
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.5;
}
.ffos-rhythm-field input,
.ffos-rhythm-field select {
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--pill-translucent);
  border: 1px solid var(--pill-border);
  border-radius: 12px;
  padding: 11px 14px;
  /* A native time/select control on iOS grows to fill its parent and looks
   * like a text field that has lost its label; a width cap keeps it reading
   * as the small control it is on a phone as well as on a desk. */
  max-width: 280px;
}
.ffos-rhythm-field input:focus,
.ffos-rhythm-field select:focus {
  outline: none;
  border-color: var(--amber-border-hover);
}
.ffos-rhythm-field input:disabled,
.ffos-rhythm-field select:disabled {
  opacity: 0.55;
}

.ffos-rhythm-row2 {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.ffos-rhythm-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ffos-rhythm-choices--stack {
  flex-direction: column;
  align-items: flex-start;
}

/* Chips rather than a bare radio list: the choices here are short, mutually
 * exclusive and worth reading at a glance, and a chip that is ON is legible
 * across the room in a way a filled 14px circle is not. Native inputs stay in
 * the DOM (visually hidden) so grouping, arrow-key navigation and the focus
 * ring all come for free. */
.ffos-rhythm-choice,
.ffos-rhythm-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--pill-translucent);
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}
.ffos-rhythm-choice input,
.ffos-rhythm-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.ffos-rhythm-choice--on,
.ffos-rhythm-toggle--on {
  border-color: var(--amber-border-select);
  color: var(--text-primary);
  background: var(--amber-chip, var(--pill-translucent));
}
.ffos-rhythm-choice:focus-within,
.ffos-rhythm-toggle:focus-within {
  outline: 2px solid var(--amber-border-select);
  outline-offset: 2px;
}
.ffos-rhythm-choice:has(input:disabled),
.ffos-rhythm-toggle:has(input:disabled) {
  opacity: 0.55;
  cursor: default;
}

.ffos-rhythm-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.ffos-rhythm-job {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
}
.ffos-rhythm-job__time {
  flex: 0 0 auto;
  min-width: 52px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.ffos-rhythm-job__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ffos-rhythm-job__name {
  font-size: 14px;
  color: var(--text-primary);
}
.ffos-rhythm-job__sub {
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.5;
}

.ffos-rhythm-working__toggle {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-faint);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ffos-rhythm-working {
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.6;
}
.ffos-rhythm-working p {
  margin: 6px 0 8px;
}
.ffos-rhythm-working ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ffos-rhythm-working li {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.ffos-rhythm-working code {
  font-size: 12px;
  background: var(--pill-translucent);
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

.ffos-rhythm-save {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* --- Settings → Reports (2026-10-04) --------------------------------------
 * Monthly targets, one row per rep. The toggle shows only what the server
 * confirmed, and sits at .55 while a save is in flight (handoff §10-D). */
.ffos-targets {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 30px 26px;
}
.ffos-targets__lead {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.ffos-target {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
}
.ffos-target__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.ffos-target__toggle {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  border-radius: var(--radius-pill);
  background: var(--hairline);
  cursor: pointer;
  transition:
    background var(--motion-hover) var(--ease-overlay),
    opacity var(--motion-hover) var(--ease-overlay);
}
.ffos-target__toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.ffos-target__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--pill-bg);
  box-shadow: var(--board-seg-on-shadow);
  transition: transform var(--motion-hover) var(--ease-overlay);
  pointer-events: none;
}
.ffos-target__toggle--on {
  background: var(--sage-text);
}
.ffos-target__toggle--on .ffos-target__knob {
  transform: translateX(14px);
}
.ffos-target__toggle--saving {
  opacity: 0.55;
  cursor: progress;
}
.ffos-target__toggle:has(input:focus-visible) {
  outline: 2px solid var(--amber-border-select);
  outline-offset: 2px;
}
.ffos-target__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.ffos-target__field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.ffos-target__field input {
  width: 120px;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--pill-border);
  border-radius: 10px;
  background: var(--pill-translucent);
  color: var(--text-primary);
  font: inherit;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.ffos-target__field input:focus-visible {
  outline: 2px solid var(--amber-border-select);
  outline-offset: 1px;
}
.ffos-target__field input:disabled {
  opacity: 0.55;
}
.ffos-target__live {
  grid-column: 1 / -1;
}
/* Empty, the region stays in the accessibility tree (a screen reader only
   announces changes to a live region it already knows), but takes no room:
   no height, and it gives back the grid's 8px row gap above it. */
.ffos-target__live:empty {
  height: 0;
  margin-top: -8px;
}
.ffos-target__line {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}
.ffos-target__line--saved {
  color: var(--sage-text);
}
.ffos-target__line--failed {
  color: var(--text-secondary);
}
.ffos-target__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}
.ffos-target__retry {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--amber-text);
  text-decoration: underline;
  cursor: pointer;
}
.ffos-target__retry:hover,
.ffos-target__retry:focus-visible {
  color: var(--amber-text-strong);
}
@media (max-width: 840px) {
  .ffos-targets {
    padding: 4px 20px 22px;
  }
  .ffos-target {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .ffos-target__controls {
    grid-column: 1 / -1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ffos-target__toggle,
  .ffos-target__knob {
    transition: none;
  }
}

/* --- Settings -> Setup -----------------------------------------------------
 * One card, three groups. A status is a word in a chip (Done / Skipped / Not
 * done), never colour alone. */

.ffos-setup-intro {
  margin: -14px 0 24px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 520px;
}

.ffos-setup-card {
  padding: 8px 30px 22px;
}

.ffos-setup-group {
  margin-top: 22px;
  padding-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ffos-setup-group:first-child {
  margin-top: 14px;
}

.ffos-setup-note {
  margin: 4px 0 4px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

.ffos-setup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 14.5px;
  color: var(--text-primary);
}
.ffos-setup-row__end {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 12px;
}
.ffos-setup-row__open {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13.5px;
  color: var(--amber-text);
  text-decoration: underline;
  cursor: pointer;
}
.ffos-setup-row__open:hover,
.ffos-setup-row__open:focus-visible {
  color: var(--amber-text-strong);
}

.ffos-setup-chat {
  max-width: 640px;
  padding-top: 24px;
}

@media (max-width: 840px) {
  .ffos-setup-card {
    padding: 8px 20px 20px;
  }
}

/* --- Settings -> Call recordings (Fathom, 2026-11-24) ---------------------- */
.ffos-calls-form,
.ffos-calls-connected {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

/* The email-only "How {agent} follows up" row's way to connect a leads number, under the row (Jay, 27 Nov 2026). */
.ffos-settings-row__extra {
  display: block;
  margin: -14px 30px 22px;
}
/* --- Ambient backgrounds -------------------------------------------------
 *
 * Treatment A, "horizon under the content", from the ambient-backgrounds
 * design handoff (2026-09-01). One absolutely-positioned layer pinned to the
 * BOTTOM OF THE VIEWPORT behind everything; the mask dissolves the image to
 * nothing well before the content column's type begins, so text never sits on
 * imagery at any strength that competes.
 *
 * Pinned to the viewport (`fixed`), not the document, deliberately: the
 * handoff's rule for tall pages is that the horizon stays put and content
 * scrolls over it through the frost. Every page in V2 scrolls, so every page
 * gets the fixed treatment — there is no document-bottom variant.
 *
 * The numbers below are lifted verbatim from the handoff's recipe table. They
 * are not free parameters — opacity, mask stop and tint were tuned per set
 * per theme against the real screens. Change one and re-prove it on Today AND
 * on a tall dense page (Sales), in both themes.
 */

/* --- The recipe ----------------------------------------------------------
 * Deliberately expressed as custom properties on a class rather than as
 * rules keyed off `html[data-bg]`, because Settings' preview swatches render
 * all three sets AT ONCE while only one is live. A swatch that hardcoded its
 * own opacity would drift from the real thing and start lying about what
 * you're choosing. One definition, two consumers. */

.ffo-recipe-mountains {
  --amb-image: url('/backgrounds/mountains-light.webp');
  --amb-height: 560px;
  --amb-mask: linear-gradient(180deg, transparent 0%, black 55%);
  --amb-opacity: 0.38;
  /* Cool-toned image, so a canvas-colour wash pulls it back to tone and
   * keeps amber the only colour on the screen. */
  --amb-tint: rgba(238, 234, 227, 0.35);
  --amb-position: center bottom;
}

/* ALL THREE dark images were re-cut warm on 2026-09-01. The originals were
 * cool — blue-grey haze on the mountain ridge, graphite dunes, slate-blue
 * contour lines — and against this product's single amber accent that read as
 * a second hue arguing with the first. The replacements carry no blue at all.
 *
 * Every dark tint below stays at the handoff's value even though its FIRST job
 * is gone (there is no longer a cool cast to wash back toward the canvas),
 * because its second job now matters more, not less: holding the image down so
 * the amber status dot is still the only real colour on the screen. Dropping a
 * tint over warm artwork is what would put the dot in competition.
 *
 * A note for whoever re-encodes these: the dark set is WebP q96, not the q88
 * the light set uses. These are smooth near-black gradients, and q88 mottles
 * them visibly in the flat upper area — the artefact survives the mask and
 * reads as dirt on the screen. The extra ~90KB across three files is worth it. */
[data-theme='dark'] .ffo-recipe-mountains {
  --amb-image: url('/backgrounds/mountains-dark.webp');
  --amb-height: 600px;
  --amb-mask: linear-gradient(180deg, transparent 0%, black 58%);
  --amb-opacity: 0.5;
  --amb-tint: rgba(28, 26, 24, 0.45);
}

.ffo-recipe-dunes {
  --amb-image: url('/backgrounds/dunes-light.webp');
  --amb-height: 560px;
  --amb-mask: linear-gradient(180deg, transparent 0%, black 55%);
  --amb-opacity: 0.55;
  /* No tint: the dunes already carry the system's warmth. */
  --amb-tint: transparent;
  --amb-position: center bottom;
}

[data-theme='dark'] .ffo-recipe-dunes {
  --amb-image: url('/backgrounds/dunes-dark.webp');
  --amb-height: 560px;
  --amb-mask: linear-gradient(180deg, transparent 0%, black 55%);
  --amb-opacity: 0.8;
  /* Light hand only — the image carries its own near-black ground, and a
   * heavier tint irons the wave out entirely. */
  --amb-tint: rgba(28, 26, 24, 0.2);
}

/* Contours are texture, not landscape: anchored bottom-right behind a
 * DIAGONAL mask so they live in the corner, away from the 840px content
 * column entirely. This is the quietest of the three. */
.ffo-recipe-contours {
  --amb-image: url('/backgrounds/contours-light.webp');
  --amb-height: 720px;
  --amb-mask: linear-gradient(160deg, transparent 30%, black 75%);
  --amb-opacity: 0.7;
  --amb-tint: transparent;
  --amb-position: right bottom;
}

[data-theme='dark'] .ffo-recipe-contours {
  --amb-image: url('/backgrounds/contours-dark.webp');
  --amb-height: 720px;
  --amb-mask: linear-gradient(160deg, transparent 30%, black 75%);
  --amb-opacity: 0.55;
  --amb-tint: rgba(28, 26, 24, 0.3);
}

/* --- The live layer ------------------------------------------------------ */

.ffo-ambient {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--amb-height);
  /* Behind every column, card and piece of chrome, but above the canvas
   * colour body paints. Negative rather than 0 because most screen content is
   * unpositioned, and unpositioned blocks paint UNDER positioned siblings —
   * at z-index 0 this layer would cover the page text it exists to sit
   * behind. */
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: var(--amb-mask);
  mask-image: var(--amb-mask);
}

.ffo-ambient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--amb-image);
  background-size: cover;
  background-position: var(--amb-position);
  background-repeat: no-repeat;
  opacity: var(--amb-opacity);
}

.ffo-ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--amb-tint);
}

/* Below the drawer's breakpoint the content column runs nearly full-bleed and
 * the viewport is short, so the horizon is scaled back rather than dropped —
 * same recipe, less of it, so the reading zone stays as empty as it is on
 * desktop. */
@media (max-width: 840px) {
  .ffo-ambient {
    height: min(var(--amb-height), 46vh);
  }
}
/* The 840px content column. The handoff calls it "a deliberate left bias
 * leaving a quiet right gutter", but its own artboard numbers are
 * left:300px in a 1440 frame — 300px of gutter on BOTH sides, i.e. centred.
 * The artboard is the authority on exact values, so the bias defaults to 0
 * and lives in a token: set --ffo-left-bias if the intended nudge is ever
 * pinned down, rather than re-deriving the layout.
 *
 * Below ~1180 the column centres at 40px minimum margins; below ~840 the
 * mobile rules take over. */

.ffo-page {
  width: min(var(--width-content), 100%);
  margin: 0 auto;
  padding: 130px 0 88px;
  transform: translateX(calc(-1 * var(--ffo-left-bias, 0px)));
}

@media (max-width: 1180px) {
  .ffo-page {
    transform: none;
    padding-left: 40px;
    padding-right: 40px;
  }
}

@media (max-width: 840px) {
  .ffo-page {
    padding: 96px 20px 88px;
  }
}

/* --- Ambient header card ------------------------------------------------ */

.ffo-header {
  position: relative;
  height: 264px;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--card-edge);
  box-shadow: var(--header-shadow);
  /* Opaque: card ink sits on this and nothing else (AA). */
  background: var(--card-bg);
}

/* The one amber bloom, bleeding off the top-right. Atmospheric only. */
.ffo-header__bloom {
  position: absolute;
  top: -120px;
  right: -60px;
  width: 460px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 168, 120, 0.34), rgba(224, 168, 120, 0));
  pointer-events: none;
}

.ffo-header__content {
  position: absolute;
  inset: 0;
  padding: 38px 40px;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

/* The greeting — "Good morning, Jay" — sits above the status line. Sized
 * like the panel-contact-name role (22px/400/-.01em): calm, a touch larger
 * than the status line beneath it, never competing with the ambient image. */
.ffo-header__greeting {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text-primary);
}

.ffo-summary {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 64px;
}

.ffo-summary__pair {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  /* `.ffo-header__content` is pointer-events: none (decorative); a number that
   * reacts to the cursor has to be reachable. The doors set this too. */
  pointer-events: auto;
  transition:
    transform var(--motion-lift) var(--ease-overlay),
    scale var(--motion-hover) var(--ease-overlay);
}

/* A number rises on hover (Jay, 2026-10-14; the card version is in
 * primitives.css). 2px up and the figure brightens one tier to full ink —
 * neutral, never amber. The pair has no surface to lift, so the number going
 * to --text-primary is its "highlight".
 *
 * The hover target is the pair itself, which moves, so the cursor resting on
 * its bottom edge would strobe. A transparent strip under it, 3px tall,
 * rises with it and keeps the old bottom edge covered. Nothing here is
 * `overflow: hidden`, so unlike a Card the pseudo-element is a real hit area.
 * Transform off under reduced motion; the brightening stays. */
.ffo-summary__pair::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 3px;
}
.ffo-summary__number {
  transition: color var(--motion-lift) var(--ease-overlay);
}
@media (hover: hover) and (pointer: fine) {
  .ffo-summary__pair:hover .ffo-summary__number {
    color: var(--text-primary);
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ffo-summary__pair:hover {
    transform: translateY(var(--lift-y));
  }
}

.ffo-summary__number {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.ffo-summary__label {
  font-size: 11.5px;
  color: var(--text-faint);
}

/* A tile that is a door (Tasks, follow-ups): the same pair, as a button. */
.ffo-summary__pair--door {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  /* `.ffo-header__content` is pointer-events: none (the header was all
   * atmosphere until its tiles became doors); without this a real click lands
   * on the header and the door never opens. */
  pointer-events: auto;
}

.ffo-summary__pair--door .ffo-summary__number,
.ffo-summary__pair--door .ffo-summary__label {
  display: block;
}

.ffo-summary__pair--door:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 4px;
}
/* A door is focusable, so the keyboard gets the same answer the mouse does. */
.ffo-summary__pair--door:focus-visible .ffo-summary__number {
  color: var(--text-primary);
}
@media (prefers-reduced-motion: no-preference) {
  .ffo-summary__pair--door:focus-visible {
    transform: translateY(var(--lift-y));
  }
}

/* A real number that is not a proven current count (Part 1 C2, or a Content
 * read that was partial). These words are the ONLY non-colour signal, so they
 * must be readable: the notes' 12.5px, in --text-nav — the quietest text token
 * above 4.5:1 on the header in both themes (--text-muted is ~3:1 on the light
 * header). It reports; it doesn't alarm. */
.ffo-summary__caveat {
  display: block;
  font-size: 12.5px;
  color: var(--text-nav);
}

@media (max-width: 840px) {
  .ffo-header {
    height: 244px;
  }
  .ffo-header__content {
    padding: 26px 24px;
  }
  .ffo-header__greeting {
    font-size: 26px;
  }
  .ffo-summary {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 18px 34px;
  }
  .ffo-summary__number {
    font-size: 24px;
  }
}

/* --- Overdue ------------------------------------------------------------ */

.ffo-overdue__label {
  margin-top: 64px;
}

.ffo-overdue__card {
  margin-top: 18px;
}

.ffo-overdue__more {
  margin-top: 18px;
  padding-left: 4px;
  font-size: 12.5px;
  color: var(--text-faint);
  transition: color var(--motion-hover) ease;
}
.ffo-overdue__more:hover {
  color: var(--text-muted);
}

/* Rows beyond the cap: always mounted, height-animated open/closed via
 * the grid-template-rows 0fr/1fr trick so "+N more" / "Show less" is a
 * reversible slide, not a swap. `prefers-reduced-motion` already kills all
 * transitions globally (base.css), which is exactly the static open/closed
 * jump the spec asks for. */
.ffo-overdue__extra {
  display: grid;
  grid-template-rows: 0fr;
  /* On the exit clock (200ms, was a hand-picked 180ms) — a disclosure that
   * collapses is a surface leaving, and it should move at the speed everything
   * else leaves at. This and the nav subline are the two places in the product
   * that animate a LAYOUT property, both for the same reason: nothing
   * composited can reclaim vertical space. Argued for here rather than
   * exempted quietly; see motion.test.ts. */
  transition: grid-template-rows var(--motion-out) var(--ease-overlay);
}
.ffo-overdue__extra--open {
  grid-template-rows: 1fr;
}
.ffo-overdue__extra-inner {
  overflow: hidden;
  min-height: 0;
}

/* The handled line collapses the WHOLE card to one line. It must read as
 * handled, not empty — no illustration, no CTA. */
.ffo-overdue__handled {
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14.5px;
  color: var(--text-body);
}

.ffo-overdue__check {
  font-size: 14px;
  color: var(--amber);
}

.ffo-overdue__checked-at {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-faintest);
}

/* The failed check uses the SAME single-line format. Never a red banner —
 * red is one dot per screen, and it is not this. */
.ffo-overdue__retry {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-faint);
  transition: color var(--motion-hover) ease;
}
.ffo-overdue__retry:hover {
  color: var(--amber-text-strong);
}
/* The same Retry, beside a note under a list that still has rows. */
.ffo-overdue__retry--inline {
  margin-left: 8px;
}

/* An honest note under the card: a slice that could not be checked, a list
 * that could not refresh, or where to answer when chat is down. Deliberately the same faint size as
 * "+N more" and NOT a red banner — it reports, it doesn't alarm. Never a
 * toast: this text has to still be there when the founder looks back. */
.ffo-overdue__note {
  margin-top: 14px;
  padding-left: 4px;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* The row's own kind badge ("Decision"), read BEFORE the title (review
 * 06-decision-row): a small amber chip, same family as the decision dot next
 * to it, never colour alone — the word is what carries the meaning. */
.ffo-task-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-right: 8px;
  border-radius: var(--radius-pill);
  background: var(--amber-chip);
  color: var(--amber-text-strong);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  vertical-align: middle;
}

/* --- Loading: skeleton rows, never a spinner ---------------------------- */

/* Same box as a real row (26px padding around a 14.5px/1.45 line), so the
 * card doesn't resize when the data lands. */
.ffo-skeleton-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 30px;
  min-height: 73px;
}

.ffo-skeleton-bar {
  height: 9px;
  border-radius: 999px;
  background: var(--divider);
  animation: ffo-skeleton 1.6s ease-in-out infinite;
}

/* --- This week (7a/7b) --------------------------------------------------- */

/* The card holds three things that are NOT peers — a diagnosis, the reason
 * behind it, and a timestamp — so it no longer spaces them with one uniform
 * flex gap. Each interval is set on the element below it, largest before the
 * metadata, which is what makes the card read as "here is the thing, here is
 * why, and by the way this is how old it is" rather than as three stacked
 * paragraphs of equal weight.
 *
 * `gap: 0` is load-bearing: both lower blocks are conditional (a card can be
 * headline-only), and a gap plus a margin would double up on whichever
 * combination happened to render. */
.ffo-week__card {
  margin-top: 18px;
  /* Slightly wider than tall at the sides, and a shade less at the foot: the
   * meta line is 10.5px uppercase and carries its own optical air, so equal
   * padding there reads as a gap rather than an edge. */
  padding: 34px 36px 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.ffo-week__constraint {
  font-size: 17px;
  /* It wraps to two or three lines at most real widths, and until now it did
   * so on the browser's default leading — the single biggest reason the card
   * felt squeezed. */
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}

/* The pre-onboarding empty state. Same card, quieter voice: this is a note
 * about when something starts, not a diagnosis to act on today. */
.ffo-week__constraint--pending {
  font-size: 15px;
  color: var(--text-muted);
}

.ffo-week__why {
  /* Was `margin-top: -6px`, which pulled this up INTO the headline and left
   * the two sharing about eight pixels. They are separate thoughts and now sit
   * apart like it. */
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  /* A comfortable measure. The card is wide enough that this paragraph would
   * otherwise run past the point where the eye reliably finds the next line;
   * the headline above is deliberately left unconstrained, since narrowing it
   * would buy readability by adding a wrap. */
  max-width: 62ch;
}

/* When the constraint was generated and when the next Weekly Roundup is due
 * (Jay, 2026-08-26). Same 10.5px uppercase-tracked treatment as the lead
 * panel's "Updated …" age line (.ffo-contact-state__age) — this is metadata
 * about the card above it, not a second piece of content. */
.ffo-week__age {
  /* The largest interval in the card. This is metadata about everything above
   * it, so it sits further from the body than the body sits from the headline
   * — the step down in relationship made visible as a step up in space. */
  margin-top: 26px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  /* Uppercase at 10.5px with this much tracking needs its own leading — the
   * line runs long enough on a narrow screen to wrap. */
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--text-faintest);
}

/* A missed Roundup (older than one cycle + a day of slack) reads as muted
 * amber — same convention as .ffo-contact-state__age--stale, never the
 * severity red this design reserves for the one status dot per screen. */
.ffo-week__age--stale {
  color: var(--amber-text);
}

.ffo-week__activity {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ffo-week__activity-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.ffo-week__activity-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot-neutral);
  align-self: center;
}
.ffo-week__activity-dot--win {
  background: var(--amber);
}

.ffo-week__activity-day {
  flex: none;
  width: 42px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.ffo-week__activity-text {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--text-body);
}

/* The constraint card on a phone. It had no responsive rule at all, so the
 * desktop padding was eating a 390px screen from both sides; the intervals
 * inside come down with it so the card keeps its rhythm rather than becoming
 * a tall thin column of gaps. Matches the row grammar's own mobile step
 * (primitives.css: 26px 30px -> 20px 22px). */
@media (max-width: 840px) {
  .ffo-week__card {
    padding: 26px 22px 24px;
  }
  .ffo-week__why {
    margin-top: 14px;
    /* The screen is already the measure here — a ch cap on top of it would
     * only strand the last few words. */
    max-width: none;
  }
  .ffo-week__age {
    margin-top: 22px;
  }
}

/* --- Messaging card (clients without messaging yet) ----------------------
 * One quiet line under the other cards. Same card, same type tokens as the
 * "This week" card; the X is a plain text button, nothing new. */
.ffo-teaser {
  margin-top: 64px;
  padding: 22px 24px 22px 30px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ffo-teaser__title {
  font-size: 15px;
  color: var(--text-primary);
}

.ffo-teaser__line {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 62ch;
}

.ffo-teaser__close {
  flex: none;
  font-size: 20px;
  line-height: 1;
  /* The glyph stays 20px; the hit area is padded out to 32px, and the negative
   * margin keeps the X where it was visually. */
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  margin: -6px -8px -6px 0;
  color: var(--text-muted);
  transition: color var(--motion-hover) ease;
}
.ffo-teaser__close:hover {
  color: var(--text-primary);
}

@media (max-width: 840px) {
  .ffo-teaser {
    padding: 20px 18px 20px 22px;
  }
}
/* "A new version is ready · Refresh" (ffos 2.4.6). A small floating pill,
 * top-centre, in the same overlay surface as the mobile Ask pill — between
 * the menu and the ⌘K pill / avatar rather than over them, because it never
 * auto-dismisses and must not hide the way round the dashboard while it waits.
 * Tokens only — it follows light and dark. */

.ffo-update__bar {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 5px 5px 5px 16px;
  border-radius: var(--radius-pill);
  /* Light pill: data-surface="card" in UpdateBar.tsx. Opaque, no blur. */
  border: 1px solid var(--card-edge);
  background: var(--card-bg);
  box-shadow: var(--float-shadow);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--text-secondary);
  animation: ffo-update-in var(--motion-in) var(--ease-overlay);
}

.ffo-update__dot {
  color: var(--text-faint);
}

.ffo-update__btn {
  padding: 4px 12px;
  min-height: 28px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--button-primary-bg);
  color: var(--button-primary-fg);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--motion-hover) ease,
    scale var(--motion-hover) var(--ease-overlay);
}
.ffo-update__btn:hover {
  background: var(--button-primary-hover);
}
.ffo-update__btn:focus-visible {
  outline: 2px solid var(--amber-border-select);
  outline-offset: 2px;
}

/* Phones: the menu sits at left 20px and the avatar at right 20px, both 26px
 * wide at top 22px — the pill lives in the gap between them, on their line. */
@media (max-width: 840px) {
  .ffo-update__bar {
    top: calc(16px + env(safe-area-inset-top));
    max-width: calc(100vw - 112px);
    gap: 6px;
    padding: 4px 4px 4px 12px;
    font-size: 12.5px;
  }
  .ffo-update__dot {
    display: none;
  }
  .ffo-update__btn {
    padding: 3px 10px;
  }
}

/* A finger needs 44px; a mouse does not, so desktop keeps the compact pill. */
@media (pointer: coarse) {
  .ffo-update__btn {
    min-height: 44px;
    padding: 0 16px;
  }
}

@keyframes ffo-update-in {
  from {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ffo-update__bar {
    animation: none;
  }
}
/* Founder Freedom OS V2 — the token tables from the design handoff, verbatim.
 *
 * The rule this file exists to enforce: ONE component set, TWO themes. Layout
 * is byte-identical between light and dark; only the values below change.
 * Nothing in components/ or screens/ may hardcode a colour — if a component
 * needs a colour that isn't here, the token table is what's wrong.
 *
 * Theme is selected by [data-theme] on <html>, never by a media query alone,
 * so the switch is explicit and testable.
 *
 * EVENING DESK (Jay, 2026-11-28). The page is dark (light mode: sand) and every
 * container that holds content is an opaque light CARD. So there are two
 * colour families, --page-* and --card-*. Components keep reading the public
 * names (--text-primary, --hairline, --row-hover, --pill-* ...); those point at
 * the page family at :root and at the card family under the SURFACE SWITCH
 * (`.ffo-card, .ffo-panel, [data-surface='card']`, flipped back by
 * `[data-surface='page']`). Custom properties inherit, so everything inside a
 * light surface picks up card ink with no per-component edit. Flipping the
 * drawer or chat dock to the page is one attribute.
 *
 * AA (4.5:1) is enforced by styles/contrast.test.ts, which parses this file.
 */

:root {
  /* --- Shared: the accent, and the one red ------------------------------ */
  /* Amber is SIGNAL, never decoration. Pending dots, checks, the active nav
   * icon, hover emphasis. Never a button fill, never a gradient wash. */
  --amber: #c98a4f; /* light; dark override below. Evening Desk spec */
  --amber-chip: rgba(224, 168, 120, 0.22);
  --amber-avatar: rgba(224, 168, 120, 0.28);
  /* Amber hairlines — hover emphasis and selection. Always the accent itself
   * at an alpha (Claude Design board handoff, 2026-09-25), never the darker
   * text shade: on dark, a brown hairline reads as a second accent. */
  --amber-border-hover: rgba(224, 168, 120, 0.55);
  --amber-border-select: rgba(224, 168, 120, 0.6);
  /* Board (beta), Phase 2, Task 13 — the drop-target column's amber fill. */
  --amber-drop-fill: rgba(224, 168, 120, 0.05);
  /* The glow behind a number that just changed (LiveCount.css). The accent
   * itself at an alpha, never a second warm colour; its job is to be SIGNAL —
   * "this moved while you were looking" — and it is gone in `--motion-glow`. */
  --amber-glow: rgba(224, 168, 120, 0.4);

  /* --- Shared: radii, dots, motion, widths ------------------------------ */
  --radius-card: 14px;
  /* How far a card or a number rises on hover. A distance, not a duration, but
   * it lives with the motion tokens' sibling concerns so the lift is one dial. */
  --lift-y: -2px;
  --radius-palette: 20px;
  --radius-panel: 28px;
  --radius-message: 18px;
  --radius-phone: 30px;
  --radius-pill: 999px;

  --dot-status: 7px;
  --dot-inline: 6px;

  --width-content: 840px;
  --width-offer: 720px;
  --width-onboarding: 640px;
  --width-panel: 468px;
  --width-drawer: 312px;
  --width-name: 168px;
  --width-name-wide: 220px;
  /* The three-field title row (project · ref · company, Navdeep's quotation
   * board only) needs more than the wide slot: three legible fields plus two
   * gaps run ~300px at the base font. 340px leaves the company clause room
   * to breathe on desktop before it has to reach for its own ellipsis. */
  --width-name-title: 340px;

  /* --- Motion -----------------------------------------------------------
   *
   * THE WHOLE MOTION LANGUAGE IS THESE FOUR VALUES. Nothing in the product
   * animates on a number of its own; if a component needs a duration it reads
   * one of these, and if none of them fits, the right move is to argue for a
   * fifth token here rather than to invent a local one. A magic number in a
   * component is how a product ends up with eleven slightly different fades.
   *
   * ASYMMETRIC ON PURPOSE. Arriving and leaving are not the same event: a
   * surface coming in is information, and it earns time; a surface going away
   * is already decided, and time spent watching it leave is time the founder
   * is waiting. So out is faster than in. The interface feels quick without
   * feeling abrupt — the standard trick, written down.
   *
   * ONE EASING FAMILY, and one only — both halves of a gesture use
   * `--ease-overlay`, so open and close feel like the same hand. There is no
   * `--ease-exit`: adding one would let the two halves drift apart.
   *
   * Exits are authored as their OWN keyframes (`*-out`), mirroring the
   * entrance. They used to be the entrance played with `animation-direction:
   * reverse`, which is prettier and silently never plays — see the long note
   * above the `-out` block in styles/base.css.
   *
   * Anything animated with these must be TRANSFORM AND OPACITY ONLY. Both are
   * composited off the main thread; width/height/top/margin are not, and an
   * overlay that animates them janks on the first paint after a real fetch.
   */
  --motion-hover: 120ms;
  /* The fifth value, argued for: a card (or a number) rising 2px under the
   * cursor. It is not the row tier — a row only tints, and 120ms is right for a
   * tint — but a surface that physically moves needs a beat longer or it reads
   * as a twitch rather than a lift. Still well under `--motion-out` so it never
   * feels laggy. It rides `--ease-overlay`, the one easing family. */
  --motion-lift: 180ms;
  --motion-in: 260ms;
  --motion-out: 200ms;
  --ease-overlay: cubic-bezier(0.32, 0.72, 0, 1);

  /* --- The motion that says "something changed" (Jay, 2026-10-14) --------
   *
   * Four more durations, each argued for. They are one family because they
   * are one gesture: a number arrives, rolls into place, and tells you it did.
   *
   * `--motion-roll`  digits sliding to a new value after a LIVE change. Long
   *   enough to be read as "that moved" (a twitch is just a flicker), short
   *   enough that the number is never wrong for long. Mirrored in motion.ts:
   *   NumberFlow takes it in JS, so CSS alone cannot own it.
   * `--motion-count` the one-time count-up from 0 on the first load of a
   *   browser session. A beat longer than a roll, because it travels further.
   *   Also JS-driven, also mirrored.
   * `--motion-glow`  the amber glow behind a changed number fading out. The
   *   slowest thing in the product on purpose: it is a "look here", not a
   *   transition, and a glow that is gone before you glance up is no use.
   * `--motion-enter-step` the gap between one card's entrance and the next.
   *   Not a duration anything lasts for; a delay. 50ms is where a stagger
   *   reads as a ripple down the page rather than as everything at once.
   *
   * `--enter-rise` is how far a card travels while it fades in: a distance,
   * kept here for the same reason `--lift-y` is. */
  --motion-roll: 500ms;
  --motion-count: 600ms;
  --motion-glow: 1400ms;
  --motion-enter-step: 50ms;
  /* The stagger between one Sales bar drawing in and the next: half a card's,
   * because a screen of bars is ten or more rows and a card-sized step would
   * make the last one wait most of a second. Capped at the same 8 steps. */
  --motion-bar-step: 30ms;
  --enter-rise: 8px;
  /* A press: the thing under the finger gives, a touch. 0.98 is small enough
   * not to soften the type, large enough to be felt on a 21px number. */
  --press-scale: 0.98;

  /* The pre-2026-08-29 name for the entrance duration. Kept as an alias so no
   * stylesheet had to be touched purely to be renamed; new rules should say
   * `--motion-in` (or `--motion-out`) so the direction is legible at the
   * call site. */
  --motion-overlay: var(--motion-in);

  /* --- Shared: stage palette, follow-up chips, quiet washes -------------
   * Same in both modes: they paint on card surfaces and chips, which are
   * light in both. Hue is the stripe/fill colour (text on it is
   * --stage-pill-ink); bg/fg are the tinted pill. Assigned by
   * src/lib/stageColor.ts. */
  --stage-pill-ink: #1c1a18;
  --stage-open1-hue: #9a948b; --stage-open1-bg: #efece7; --stage-open1-fg: #4f4b45;
  --stage-open2-hue: #d9a066; --stage-open2-bg: #f7e7d2; --stage-open2-fg: #7a4a17;
  --stage-open3-hue: #c7774f; --stage-open3-bg: #f6dccf; --stage-open3-fg: #8a3b1c;
  --stage-open4-hue: #a8738f; --stage-open4-bg: #efdde7; --stage-open4-fg: #6b3a57;
  --stage-open5-hue: #5f9596; --stage-open5-bg: #d9eae9; --stage-open5-fg: #2c5859;
  --stage-won-hue: #76a06e; --stage-won-bg: #dfecdb; --stage-won-fg: #34592f;
  --stage-lost-hue: #8c877f; --stage-lost-bg: #ebe8e3; --stage-lost-fg: #5c5751;

  --fu-overdue-bg: #f5e0d8; --fu-overdue-fg: #96351f; --fu-overdue-edge: rgba(150, 53, 31, 0.28);
  --fu-today-bg: #f7e7d2; --fu-today-fg: #7a4a17; --fu-today-edge: rgba(122, 74, 23, 0.28);
  --fu-booked-bg: #dfecdb; --fu-booked-fg: #34592f; --fu-booked-edge: rgba(52, 89, 47, 0.28);
  --fu-none-bg: transparent; --fu-none-fg: #76502a; --fu-none-edge: #b07b45;
  --fu-note-bg: #ece8e1; --fu-note-fg: #4f4b45; --fu-note-edge: rgba(79, 75, 69, 0.2);

  --quiet-1-bg: #fbf1e3; --quiet-1-edge: rgba(201, 138, 79, 0.45); --quiet-1-fg: #7a4a17;
  --quiet-2-bg: #fae6df; --quiet-2-edge: rgba(150, 53, 31, 0.4); --quiet-2-fg: #96351f;

  --severe-bg: #963a24;
  --severe-fg: #ffffff;

  /* --- Shared: fonts ---------------------------------------------------- */
  --font-display: 'Jost', 'Instrument Sans', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, sans-serif;

  /* --- Light mode: the page and card families --------------------------- */
  --page-bg: #eeeae3;
  --page-text: #1c1b19;
  --page-text-muted: #5c5751;
  --page-line: rgba(28, 27, 25, 0.13);

  --card-bg: #ffffff;
  --card-edge: rgba(28, 27, 25, 0.09);
  --card-shadow: 0 1px 2px rgba(28, 27, 25, 0.06), 0 10px 26px rgba(28, 27, 25, 0.07);
  --card-ink: #1c1b19;
  --card-ink-2: #4f4b45;
  --card-ink-muted: #66615a;
  --card-line: rgba(28, 27, 25, 0.1);
  --card-amber-text: #7a4a17;
  --card-sage-text: #34592f;
  --card-severe-text: #96351f;
  --band: #f3efe8;
  --table-head: #ebe5dc;
  /* Row hover and selected are LIGHT warm tints, not amber darkening: the
   * sand band leaves muted ink (dark mode #6a655e on #ebe6dd = 4.65:1) almost
   * no headroom, and any darker fill dropped it under AA. These lighten the
   * band while warming it, so hover/selected stay visibly distinct and muted
   * ink keeps >= 4.5:1 on every ground (contrast.test.ts composites them).
   * Selected is the paler of the two and carries the inset amber hairline. */
  --card-row-hover: rgba(250, 228, 196, 0.6);
  --card-row-selected: rgba(201, 138, 79, 0.75); /* the amber hairline, not a fill */
  --card-row-selected-fill: rgba(255, 238, 212, 0.6);
  --card-pill-bg: rgba(28, 27, 25, 0.05);
  --card-pill-border: rgba(28, 27, 25, 0.12);
  /* Non-text graphics on a card (gated icons, neutral dots): >= 3:1 on every
   * card ground in both modes (WCAG 1.4.11). Cards are light in both modes. */
  --card-icon-gated: #85807a;
  --card-dot-neutral: #85807a;

  --card-bg-lift: #ffffff;
  --card-border-lift: rgba(28, 27, 25, 0.16);
  --card-shadow-lift: 0 2px 4px rgba(28, 27, 25, 0.08), 0 16px 34px rgba(28, 27, 25, 0.12);
  --header-shadow: 0 1px 2px rgba(28, 27, 25, 0.04), 0 22px 52px rgba(28, 27, 25, 0.07);
  /* The Sales pipeline bars. NEUTRAL: ink at three alphas. */
  --bar-track: rgba(28, 27, 25, 0.06);
  --bar-fill: rgba(28, 27, 25, 0.24);
  --bar-fill-closed: rgba(28, 27, 25, 0.62);

  --pill-border-page: rgba(0, 0, 0, 0.07);
  --topbar-pill-bg: rgba(255, 255, 255, 0.65);
  --topbar-pill-border: rgba(28, 27, 25, 0.13);

  --scrim: rgba(28, 27, 25, 0.14);
  --scrim-blur: 1.5px;
  --overlay-border: var(--card-edge);
  --drawer-shadow: 24px 0 60px rgba(28, 27, 25, 0.1);
  --panel-shadow: -28px 0 70px rgba(28, 27, 25, 0.12);
  /* The command palette floats over the page rather than off an edge. */
  --palette-shadow: 0 30px 70px rgba(28, 27, 25, 0.14);
  /* Mobile-only (<=840px): bottom sheets and the floating "Ask" pill. */
  --sheet-shadow: 0 -20px 60px rgba(28, 27, 25, 0.12);
  --float-shadow: 0 10px 30px rgba(28, 27, 25, 0.14);
  --signoff-border: rgba(224, 168, 120, 0.35);

  --scrollbar-track: transparent;
  --scrollbar-thumb-page: rgba(28, 27, 25, 0.16);
  --scrollbar-thumb-hover-page: rgba(28, 27, 25, 0.28);

  --page-icon-nav: #7a766f;
  --page-icon-gated: #a5a29b;
  --page-dot-neutral: #a5a29b;
  --page-sage-text: #4f6b4c;
  --page-amber-text: #7a4a17;
  --page-amber-text-strong: #7a4a17;
  --page-severe: #b4432f;
  --page-board-rail-border: rgba(28, 27, 25, 0.09);
  --page-button-bg: #33312d;
  --page-button-fg: #faf9f7;
  --page-button-hover: #1c1b19;

  /* --- PUBLIC NAMES, page family (the :root default) ---------------------
   * Components read these. Under the surface switch below they are remapped
   * to the card family. Declared here, after the families, only for
   * readability: var() resolves where it is declared, so order is free. */
  --canvas: var(--page-bg);
  --text-primary: var(--page-text);
  --text-secondary: var(--page-text);
  --text-body: var(--page-text);
  --text-muted: var(--page-text-muted);
  --text-faint: var(--page-text-muted);
  --text-faintest: var(--page-text-muted);
  --text-gated: var(--page-text-muted);
  --text-nav: var(--page-text-muted);
  --divider: var(--page-line);
  --hairline: var(--page-line);
  --row-hover: var(--page-line);
  --row-selected: var(--page-line);
  --pill-bg: var(--topbar-pill-bg);
  --pill-border: var(--pill-border-page);
  --pill-translucent: var(--topbar-pill-bg);
  --button-primary-bg: var(--page-button-bg);
  --button-primary-fg: var(--page-button-fg);
  --button-primary-hover: var(--page-button-hover);
  --card-border: var(--card-edge);
  --amber-text: var(--page-amber-text);
  --amber-text-strong: var(--page-amber-text-strong);
  --overlay-bg: var(--card-bg);
  --overlay-bg-panel: var(--card-bg);
  --message-bg: var(--page-line);
  --message-border: var(--page-line);
  --signoff-bg: var(--page-line);
  --scrollbar-thumb: var(--scrollbar-thumb-page);
  --scrollbar-thumb-hover: var(--scrollbar-thumb-hover-page);
  --dot-neutral: var(--page-dot-neutral);
  --icon-nav: var(--page-icon-nav);
  --icon-gated: var(--page-icon-gated);
  --sage-text: var(--page-sage-text);
  --severe: var(--page-severe);
  --board-rail-border: var(--page-board-rail-border);
  --board-text-sec: var(--page-text-muted);
  --board-card-hover-bg: var(--card-bg-lift);
  --board-seg-on-shadow: 0 1px 3px rgba(28, 27, 25, 0.08);
  --board-fade-to: var(--page-bg);
  --radius-deal: 14px; /* deal cards */
}

[data-theme='dark'] {
  --amber: #e0a878;

  --page-bg: #1c1a18;
  --page-text: #f4f3f1;
  --page-text-muted: #b3aea5;
  --page-line: rgba(244, 243, 241, 0.15);

  --card-bg: #f8f6f2;
  --card-edge: rgba(28, 27, 25, 0.08);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 26px rgba(0, 0, 0, 0.28);
  --card-ink: #1c1b19;
  --card-ink-2: #4f4b45;
  --card-ink-muted: #6a655e;
  --band: #ebe6dd;
  --table-head: #efebe4;

  --card-bg-lift: #fcfbf8;
  --card-border-lift: rgba(28, 27, 25, 0.16);
  --card-shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 34px rgba(0, 0, 0, 0.36);
  --header-shadow: 0 22px 52px rgba(0, 0, 0, 0.35);
  --bar-track: rgba(255, 255, 255, 0.07);
  --bar-fill: rgba(232, 228, 221, 0.3);
  --bar-fill-closed: rgba(232, 228, 221, 0.78);

  --pill-border-page: rgba(244, 243, 241, 0.15);
  --topbar-pill-bg: rgba(244, 243, 241, 0.05);
  --topbar-pill-border: rgba(244, 243, 241, 0.15);

  --scrim: rgba(10, 9, 8, 0.42);
  --scrim-blur: 2px;
  --drawer-shadow: 24px 0 60px rgba(0, 0, 0, 0.4);
  --panel-shadow: -28px 0 70px rgba(0, 0, 0, 0.42);
  --palette-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  --sheet-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  --float-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --signoff-border: rgba(224, 168, 120, 0.3);

  --scrollbar-thumb-page: rgba(255, 255, 255, 0.14);
  --scrollbar-thumb-hover-page: rgba(255, 255, 255, 0.24);

  --page-icon-nav: #b3aea5;
  --page-icon-gated: #6b6862;
  --page-dot-neutral: #6b6862;
  --page-sage-text: #93af8e;
  --page-severe: #e0735c;
  --page-board-rail-border: rgba(244, 243, 241, 0.15);
  --page-button-bg: #e8e4dd;
  --page-button-fg: #1c1b19;
  --page-button-hover: #ffffff;

  /* On dark the amber needs no darkening for contrast — it IS the accent. */
  --page-amber-text: #e0a878;
  --page-amber-text-strong: #e0a878;
  --amber-border-hover: rgba(224, 168, 120, 0.45);
  --amber-border-select: rgba(224, 168, 120, 0.5);
  --amber-drop-fill: rgba(224, 168, 120, 0.06);
  --amber-glow: rgba(224, 168, 120, 0.3);
}

/* --- THE SURFACE SWITCH ---------------------------------------------------
 * Everything inside a light surface reads card ink. The selector list is the
 * single definition of "light surface": cards, the side panel, and anything
 * carrying data-surface="card" (drawer, popovers, menus, login card, Today
 * header, Incoming panel). `[data-surface='page']` maps back, and comes last
 * so a page region nested inside a card wins. */
.ffo-card,
.ffo-panel,
[data-surface='card'] {
  --canvas: var(--card-bg);
  --text-primary: var(--card-ink);
  --text-secondary: var(--card-ink-2);
  --text-body: var(--card-ink-2);
  --text-muted: var(--card-ink-muted);
  --text-faint: var(--card-ink-muted);
  --text-faintest: var(--card-ink-muted);
  --text-gated: var(--card-ink-muted);
  --text-nav: var(--card-ink-muted);
  --divider: var(--card-line);
  --hairline: var(--card-line);
  --row-hover: var(--card-row-hover);
  --row-selected: var(--card-row-selected-fill);
  --pill-bg: var(--card-pill-bg);
  --pill-border: var(--card-pill-border);
  --pill-translucent: var(--card-pill-bg);
  --button-primary-bg: #33312d;
  --button-primary-fg: #faf9f7;
  --button-primary-hover: #1c1b19;
  --message-bg: var(--band);
  --message-border: var(--card-line);
  --signoff-bg: var(--band);
  --scrollbar-thumb: rgba(28, 27, 25, 0.2);
  --scrollbar-thumb-hover: rgba(28, 27, 25, 0.34);
  /* Pipeline bars (Reports) sit on a card, so they are ink on light in both
   * modes. The dark-mode values at :root assumed a dark ground and left the
   * bars invisible on the light card. */
  --bar-track: rgba(28, 27, 25, 0.06);
  --bar-fill: rgba(28, 27, 25, 0.24);
  --bar-fill-closed: rgba(28, 27, 25, 0.62);
  --dot-neutral: var(--card-dot-neutral);
  --icon-nav: var(--card-ink-muted);
  --icon-gated: var(--card-icon-gated);
  --amber-text: var(--card-amber-text);
  --amber-text-strong: var(--card-amber-text);
  --sage-text: var(--card-sage-text);
  --severe: var(--card-severe-text);
  --board-rail-border: var(--card-line);
  --board-text-sec: var(--card-ink-2);
}

[data-surface='page'] {
  --canvas: var(--page-bg);
  --text-primary: var(--page-text);
  --text-secondary: var(--page-text);
  --text-body: var(--page-text);
  --text-muted: var(--page-text-muted);
  --text-faint: var(--page-text-muted);
  --text-faintest: var(--page-text-muted);
  --text-gated: var(--page-text-muted);
  --text-nav: var(--page-text-muted);
  --divider: var(--page-line);
  --hairline: var(--page-line);
  --row-hover: var(--page-line);
  --row-selected: var(--page-line);
  --pill-bg: var(--topbar-pill-bg);
  --pill-border: var(--pill-border-page);
  --pill-translucent: var(--topbar-pill-bg);
  --button-primary-bg: var(--page-button-bg);
  --button-primary-fg: var(--page-button-fg);
  --button-primary-hover: var(--page-button-hover);
  --message-bg: var(--page-line);
  --message-border: var(--page-line);
  --signoff-bg: var(--page-line);
  --scrollbar-thumb: var(--scrollbar-thumb-page);
  --scrollbar-thumb-hover: var(--scrollbar-thumb-hover-page);
  --dot-neutral: var(--page-dot-neutral);
  --icon-nav: var(--page-icon-nav);
  --icon-gated: var(--page-icon-gated);
  --amber-text: var(--page-amber-text);
  --amber-text-strong: var(--page-amber-text-strong);
  --sage-text: var(--page-sage-text);
  --severe: var(--page-severe);
  --board-rail-border: var(--page-board-rail-border);
  --board-text-sec: var(--page-text-muted);
}

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

html,
body,
#root {
  height: 100%;
}

body {
  margin: 0;
  background-color: var(--page-bg);
  /* The site's film grain, tiled over the page. Its own opacity is baked into
   * the SVG (.07 x .6 dark, .07 x .3 light), so no pseudo-element or stacking
   * context is needed. Cards are opaque and sit above it. */
  background-image: var(--grain);
  color: var(--text-primary);
  font-family: var(--font-body);
  /* Type runs from 11.5px spaced labels to 36px Jost titles; 14px is the
   * "body" default everything inherits from. (The old "10.5-22px, hierarchy by
   * spacing never size" rule was retired by Jay on 28 Nov 2026.) */
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain tiles, one per mode. Kept here rather than in tokens.css so the
 * contrast test's token parser never has to read a data URI. */
:root {
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.021'/></svg>");
}
[data-theme='dark'] {
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.042'/></svg>");
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* --- Scrollbars: quiet, app-wide, never platform chrome ------------------
 * A default OS/browser scrollbar is the loudest thing on a frosted panel.
 * This is the ONE place the restyle lives — every scrollable surface
 * (side panel body, conversation thread, markdown code/table wrappers, the
 * drawer, screen-level scroll, the page itself) gets it for free.
 * `scrollbar-width`/`scrollbar-color` are spec'd as inherited, but Chromium
 * does not actually propagate them down through arbitrary descendants in
 * practice (verified live: `html` alone left every nested scroll container
 * back at the platform default) — so both are declared on `*` right
 * alongside the (never-inherited) `::-webkit-scrollbar*` pseudo-elements,
 * which reach every scroll container regardless of engine.
 * Thumb colour lives in tokens.css (light/dark), never hardcoded here, and
 * is never the amber accent — a scrollbar is not a signal. The affordance
 * is never hidden entirely (no `scrollbar-width: none`, no `overflow: overlay`):
 * there must still be a visible sign that more content sits below. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: var(--radius-pill);
  /* Transparent inset border + padding-box clip: the hit area stays 8px
   * (easy to grab) while the visible thumb reads as ~6px, held off the
   * panel edge rather than touching it. */
  border: 1px solid transparent;
  background-clip: padding-box;
  transition: background-color var(--motion-hover) ease;
}
*::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:active {
  background-color: var(--scrollbar-thumb-hover);
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

/* --- The two animations in the product ---------------------------------- */

/* The status pulse: a concentric ring, not a throb of the dot itself. */
@keyframes ffo-pulse {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  70% {
    transform: scale(2.6);
    opacity: 0;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

@keyframes ffo-slide-left {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes ffo-slide-right {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes ffo-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --- The exit halves -----------------------------------------------------
 *
 * EVERY EXIT NEEDS ITS OWN `animation-name`, and this is not stylistic.
 *
 * The exits used to be written as the entrance keyframes with
 * `animation-direction: reverse`. It reads beautifully and it does not work:
 * CSS decides WHICH animations exist from the `animation-name` list, so when
 * `[data-closing]` changed only the direction and duration, the browser
 * mutated the entrance animation that had ALREADY FINISHED instead of
 * starting a new one. Its currentTime was long past the new 200ms duration,
 * so it was instantly finished again, and `fill: forwards` snapped the
 * element to the reversed end state in a single frame. The panel jumped
 * off-screen, sat there invisibly for 200ms, and unmounted.
 *
 * Jay saw it as "panels vanish instantly on close" and he was right; the
 * element persisting in the DOM with `data-closing` on it — which is all a
 * structural check can see — was never evidence that a frame had played.
 * Proven 2026-08-29 by comparing `element.getAnimations()[0]` identity
 * across the attribute toggle: same object, therefore never restarted.
 *
 * A distinct name is what forces a fresh animation. The frames below are the
 * mirror of their entrances, written out rather than derived, and
 * `motion.test.ts` fails if an exit rule reuses an entrance name. */

@keyframes ffo-slide-left-out {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes ffo-slide-right-out {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes ffo-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes ffo-skeleton {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.85;
  }
}

/* --- The entrance: cards fade in and rise as a screen opens ---------------
 *
 * Who gets it, and in what order, is decided in src/entrance.tsx — a card
 * only carries `--ffo-enter-i` (its place in the queue) and one of the classes
 * below. This file is just what that looks like.
 *
 * `backwards` fill, never `forwards` or `both`: the animation holds the FROM
 * frame during its delay (so a card waiting its turn is invisible, not
 * flashing in and then vanishing) and lets go of the element the instant it
 * ends. A `forwards` fill would pin `transform` and `opacity` for the life of
 * the element, and the hover lift is a transform — it would be dead.
 *
 * The delay is `step * --motion-enter-step`; the duration and easing are the
 * entrance pair every overlay already uses, so a card arriving feels like the
 * same hand as a panel arriving.
 *
 * Plays on insertion, so it cannot replay when a re-render touches the card
 * — only a brand-new element runs it, and entrance.tsx decides which of those
 * are allowed to. The global reduced-motion rule below kills it outright. */

@keyframes ffo-rise {
  from {
    transform: translateY(var(--enter-rise));
  }
  to {
    transform: translateY(0);
  }
}

@keyframes ffo-enter {
  from {
    opacity: 0;
    transform: translateY(var(--enter-rise));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* For a surface that is its own card and carries no hover transform of its
 * own that matters during the first half-second: the Today header. A `Card`
 * does NOT use this — see `.ffo-enter-card` in components/primitives.css. */
.ffo-enter {
  animation: ffo-enter var(--motion-in) var(--ease-overlay) backwards;
  animation-delay: calc(var(--ffo-enter-i, 0) * var(--motion-enter-step));
}

/* Honoured everywhere: the pulse becomes a static dot, overlays just appear.
 * The design explicitly asks for this rather than a slower animation. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --- Shared type roles --------------------------------------------------
 * Named after their USE, not their size, so a spec change lands in one place.
 */

.ffo-page-title {
  /* Evening Desk: page titles are Jost 400 at about 36px, on every screen
   * that uses this shared role. */
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.ffo-subline {
  font-size: 13.5px;
  color: var(--text-muted);
}

.ffo-tabular {
  font-variant-numeric: tabular-nums;
}
