/* FULFILLMENT DASHBOARD PREVIEW · the shell's own rules (job 49). Loaded after CM's tokens.css + components.css, so
   every page uses Client Management's tokens, type, spacing, cards, tables and dock. Only what CM does not already
   have lives here, every rule scoped under body.preview. Light and dark come from CM's own [data-theme] tokens. */

/* header: the Finscale F mark (Reeze's answer 2: a rounded black tile in both modes) + "Fulfillment Dashboard" */
body.preview .pv-logo {
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.4px;
  font-size: 18px;
  font-weight: 600;
}
body.preview .pv-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
  background: #000;
  object-fit: cover;
  flex-shrink: 0;
}
body.preview .pv-bell {
  position: relative;
}
body.preview .pv-bell-count {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #c5221f;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}

/* dock: the six pages are links (a full page load each); they look exactly like CM's dock buttons */
body.preview .dock a,
body.preview .dock button {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
}
body.preview .dock a:hover {
  background: var(--fill, var(--detail-495645));
  color: var(--text);
}
body.preview .dock a.active {
  background: var(--fill-strong, var(--green));
  color: var(--text);
}
body.preview .dock button[disabled] {
  opacity: .35;
  cursor: not-allowed;
}
@media (max-width: 700px) {
  body.preview .dock a,
  body.preview .dock button {
    width: 36px;
    height: 39px;
  }
  body.preview .pv-brand {
    display: none;
  }
}

/* page body: room under the fixed dock so the last row is never hidden */
body.preview .pv-main {
  padding-bottom: 110px;
}

/* the one empty state every page uses (docs/fos-design-system.md "Empty state rule"); its colours are the FOS
   aliases, so it reads the same inside an os2 screen, where --muted means os2's own fill */
body.preview .pv-empty {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius-lg, 12px);
  background: var(--fos-fill);
  color: var(--fos-muted);
}
body.preview .pv-empty .icon {
  flex-shrink: 0;
  margin-top: 2px;
}
body.preview .pv-empty-title {
  color: var(--fos-text);
  font-weight: 600;
  margin-bottom: 3px;
}
body.preview .pv-empty-why {
  font-size: 13px;
  color: var(--fos-muted);
}

/* what the view-only adapter leaves where a write control was */
body.preview .pv-viewonly {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--fill, var(--raised));
}
body.preview [aria-disabled="true"] {
  cursor: not-allowed;
}
/* real mode (job 68): the same place, as a link to this screen on the classic page, where the write works */
body.preview .pv-viewonly.pv-hop,
body.preview .pv-os2 .pv-viewonly.pv-hop {
  color: var(--text, inherit);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
body.preview .pv-classic {
  margin-right: 6px;
  font-size: 13px;
}
body.preview .pv-off {
  color: inherit;
  cursor: default;
}

/* the bell's list */
body.preview .pv-notices {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 55vh;
  overflow: auto;
}
body.preview .pv-notices li {
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline, var(--line));
}
body.preview .pv-notices .pv-n-title {
  font-weight: 500;
  color: var(--text);
}
body.preview .pv-notices .pv-n-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Home: the KPI cards are links to the page each number comes from; they look exactly like CM's KPI buttons */
body.preview a.kpi {
  display: block;
  color: inherit;
  text-decoration: none;
}
body.preview .pv-kpi.off .kpi-value {
  color: var(--muted);
}
body.preview .pv-approvals {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 6px 0 10px;
}
body.preview .pv-map-title {
  margin: 10px 0 6px;
}
body.preview .pv-tabs {
  margin-bottom: 16px;
}

/* ══ FOS DESIGN SYSTEM (job 84). The rules are docs/fos-design-system.md; these are its tokens and utilities. ══
   Built on CM's own tokens (--sp-*, --card, --muted, --radius-panel-lg), every rule under body.preview, so the live
   classic pages (which share tokens.css, components.css and os2.css) never change. */
body.preview {
  --fos-gutter: 16px;
  --fos-section-gap: 24px;
  --fos-card-radius: var(--radius-panel-lg, 18px);
  --fos-card-pad-y: 18px;
  --fos-card-pad-x: 20px;
  --fos-card-min: 116px;
  --fos-type-title: 22px;
  --fos-type-section: 16px;
  --fos-type-body: 14px;
  --fos-type-label: 13px;
  --fos-type-value: 30px;
  --fos-type-word: 16px;
  --fos-type-context: 12px;
  --fos-cols: 4;
  /* controls (Reeze 22 Oct): every toggle and tab is one segmented control, the Pipeline switch's look with 3 px more
     on each side; the buttons beside them share its height (see FOS SEGMENTED CONTROL at the end of this file) */
  --fos-ctl-h: 34px;
  --fos-seg-inset: 2px;
  --fos-seg-item-h: calc(var(--fos-ctl-h) - 2 * var(--fos-seg-inset));
  --fos-seg-pad-x: 15px;
  --fos-seg-radius: 8px;
  --fos-seg-item-radius: 6px;
  --fos-seg-type: 13px;
  --fos-seg-weight: 500;
  /* Client Management's page gutter (Reeze 22 Oct: every tab matches the Pipeline board's sides), and the client
     panel's one inner padding for every section card */
  --fos-page-gutter: 16px;
  --fos-panel-pad: 20px;
  --fos-seg-on: var(--fill-strong);   /* the chosen choice: a lighter fill in dark (the card is the track's tone there) */
  --fos-seg-on-shadow: var(--shadow-1);
  /* CM's colours under FOS names, pinned here: inside an os2 screen --muted and --card mean os2's own */
  --fos-text: var(--text);
  --fos-muted: var(--muted);
  --fos-card: var(--card);
  --fos-fill: var(--fill);
  --fos-hair: var(--hairline);
  --fos-accent: var(--good-text);
}
[data-theme="light"] body.preview {
  --fos-seg-on: var(--card);           /* light: the raised white card */
}
@media (max-width: 1100px) {
  body.preview {
    --fos-gutter: 12px;
    --fos-cols: 2;
  }
}
@media (max-width: 700px) {
  body.preview {
    --fos-panel-pad: 16px;
    --fos-section-gap: 16px;
    --fos-card-pad-y: 14px;
    --fos-card-pad-x: 16px;
    --fos-card-min: 104px;
    --fos-type-title: 20px;
    --fos-type-value: 24px;
  }
}

/* ══ FOS TYPE (job 97 polish, Reeze 21 Oct: the fonts of Cole's call doc). Inter Tight for headings and titles
   (500/600/700), Inter for everything else (400/500/600). Self-hosted latin subsets (fonts-OFL.txt), so the page asks
   nothing of Google; a character outside latin falls back to the system font. The faces are only declared here: the
   classic pages never load this file, and CM's tokens.css keeps "Avenir Next" for them. ══ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("inter.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("inter-tight.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
body.preview {
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fos-font-head: var(--font-display);
  font-family: var(--font-body);
}
/* the titles: page, section and panel titles, lane names, the client's name, the big numbers */
body.preview :is(h1, h2, h3, h4, .pv-logo, .section-title, .fos-h2, .kpi-value, .column-head .grow, .cm-card .name) {
  font-family: var(--fos-font-head);
  letter-spacing: -.01em;
}
/* BRIEF-82F: a no_contact_reveal page (preview_pages.FLAGGED_ROOT) is drawn in the system font stack. No element there
   names Inter, so the faces above stay declared but unused and the browser never asks for their woff2 files. */
html.pv-flagged, html.pv-flagged *, html.pv-flagged *::before, html.pv-flagged *::after,
html.pv-flagged *::placeholder, html.pv-flagged *::marker {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* a section: an optional bar (title or scope line on the left, one quiet action on the right), then its content */
body.preview .fos-section {
  margin: 0 0 var(--fos-section-gap);
}
body.preview .fos-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 12px;
  min-height: 22px;
}
body.preview .fos-h2 {
  margin: 0;
  font-size: var(--fos-type-section);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--fos-text);
}
body.preview .fos-scope {
  font-size: var(--fos-type-label);
  color: var(--fos-muted);
}
/* TC-01 (BRIEF FOSB23): a number block's "Source: X. Read <time>." line, right under the block */
body.preview .fos-source,
body.preview .fos-result-foot {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--fos-muted);          /* the os2 scope's own --muted is near-transparent; the FOS token is not */
}
body.preview .fos-result-foot {
  flex-basis: 100%;
  margin-top: 0;
}
body.preview .fos-scope b {
  color: var(--fos-text);
  font-weight: 500;
}
/* the one toggle: a text button under or beside a row, never a card */
body.preview .fos-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fos-type-label);
  font-weight: 500;
  color: var(--fos-accent);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
body.preview .fos-toggle:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* the KPI row: full rows of equal cards, equal heights (the grid stretches them) */
body.preview .fos-row {
  display: grid;
  grid-template-columns: repeat(var(--fos-cols), minmax(0, 1fr));
  gap: var(--fos-gutter);
}
body.preview .fos-row + .fos-row {
  margin-top: var(--fos-gutter);
}
@media (max-width: 1100px) {
  /* an odd card out at two-up takes the whole row, so a row is never half empty */
  body.preview .fos-row > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* Card notes stay with their card. The quiet icon has a full touch target. */
body.preview .kpi:has(.fos-card-note) {
  position: relative;
  overflow: visible;
}
body.preview .kpi:has(.fos-card-note):is(:hover, :focus-within) {
  z-index: 5;
}
body.preview .kpi:has(.fos-card-note) :is(.kpi-label, .kl) {
  padding-right: 26px;
}
body.preview .fos-card-note {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
}
/* an Ads card with both a sparkline and a note: the line sits left of the icon, not under it */
:root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-row > .kpi:has(.fos-card-note) .spark {
  right: 48px;
}
:root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-row > .kpi:has(.spark):has(.fos-card-note) .kl {
  padding-right: 120px;
}
:root body.preview .fos-info {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fos-muted);
  cursor: pointer;
  box-shadow: none;
}
:root body.preview .fos-info:hover {
  color: var(--fos-text);
}
body.preview .fos-info:focus-visible,
body.preview .pv-kpi-open:focus-visible {
  outline: 2px solid var(--fos-muted);
  outline-offset: 2px;
}
:root body.preview .fos-card-tip {
  position: absolute;
  top: 44px;
  right: 0;
  width: min(260px, calc(100vw - 48px));
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid var(--fos-hair);
  border-radius: var(--radius-sm);
  background: var(--fos-card);
  color: var(--fos-text);
  box-shadow: var(--shadow-2);
  font: var(--fos-type-context)/1.5 var(--font-body);
  white-space: normal;
  text-align: left;
  visibility: hidden;
  transform: translateX(var(--note-shift, 0px));
}
body.preview .kpi:hover .fos-card-note:not(.is-dismissed) .fos-card-tip,
body.preview .fos-card-note:has(.fos-info:focus-visible):not(.is-dismissed) .fos-card-tip,
body.preview .fos-card-note.is-open .fos-card-tip {
  visibility: visible;
}

/* a table in a section: CM's table look, numbers right-aligned in tabular figures */
body.preview .fos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fos-type-body);
}
body.preview .fos-table th {
  text-align: left;
  font-size: var(--fos-type-label);
  font-weight: 500;
  color: var(--fos-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--fos-hair);
  white-space: nowrap;
}
body.preview .fos-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--fos-hair);
  vertical-align: top;
  color: var(--fos-text);
}
body.preview .fos-table tr:last-child td {
  border-bottom: 0;
}
body.preview .fos-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Dated ledger comparisons keep their qualifier, source and time beside the number. */
body.preview [data-role="ledger-check"] td[data-label="Ledger comparison"] {
  white-space: normal;
}
body.preview [data-role="ledger-check"] td[data-label="Ledger comparison"] small,
body.preview [data-role="ledger-check"] td[data-label="Ledger comparison"] small span {
  display: block;
}
body.preview .fos-table .fos-note-cell {
  color: var(--fos-muted);
  font-size: var(--fos-type-label);
  min-width: 220px;
}
body.preview .fos-nil {
  color: var(--fos-muted);
}
body.preview .fos-table-wrap {
  overflow-x: auto;
}
/* a phone stacks a section table: one block per row, the first cell as its title, each number with its header */
@media (max-width: 700px) {
  body.preview .fos-table thead {
    display: none;
  }
  body.preview .fos-table,
  body.preview .fos-table tbody,
  body.preview .fos-table tr,
  body.preview .fos-table td {
    display: block;
    width: auto;
  }
  body.preview .fos-table tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--fos-hair);
  }
  body.preview .fos-table tr:last-child {
    border-bottom: 0;
  }
  body.preview .fos-table td {
    padding: 2px 0;
    border: 0;
  }
  body.preview .fos-table .fos-cell-head {
    font-weight: 600;
    padding-bottom: 4px;
  }
  body.preview .fos-table td.num {
    display: flex;
    justify-content: space-between;
    text-align: right;
  }
  body.preview .fos-table td.num::before {
    content: attr(data-label);
    color: var(--fos-muted);
    font-size: var(--fos-type-label);
  }
  body.preview [data-role="ledger-check"] td[data-label="Ledger comparison"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
  }
  body.preview [data-role="ledger-check"] td[data-label="Ledger comparison"]::before {
    text-align: left;
  }
  body.preview [data-role="ledger-check"] td[data-label="Ledger comparison"] small {
    grid-column: 1 / -1;
    text-align: left;
    margin-top: 4px;
    overflow-wrap: anywhere;
  }
  body.preview .fos-table .fos-note-cell {
    min-width: 0;
    padding-top: 6px;
  }
  /* a row with nothing read shows its title and why, not three empty lines */
  body.preview .fos-table tr.fos-off td.num {
    display: none;
  }
}

/* the os2 screens' phone and tablet rules for the design system (kept here: preview-os2-adapter.css holds no
   @media, so its scope check reads every rule) */
@media (max-width: 700px) {
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-row > .kpi .spark {
    display: none;
  }
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-row > .kpi:has(.spark) .kl {
    padding-right: 0;
  }
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-row > .kpi:has(.spark):has(.fos-card-note) .kl {
    padding-right: 26px;
  }
}
/* an odd card out at two-up spans the row (beats CM's own phone rule for a last .kpi) */
@media (max-width: 1100px) {
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-row > .kpi:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
/* a phone wraps a chip strip instead of cutting its last chip off at the edge */
@media (max-width: 700px) {
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .rangebar .stabs,
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .page > .stabs,
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .card > .stabs {
    flex-wrap: wrap;
    overflow: visible;
    max-width: 100%;
  }
}
/* job 84 round 1: a dark card needs a lighter purple for the booked-calls line (3:1 or better) */
:root[data-theme="dark"] body.preview .pv-os2 .chart .s-booked {
  stroke: #b39dfb;
}
:root[data-theme="dark"] body.preview .pv-os2 .legend i.s-booked {
  background: #b39dfb;
}
@media (max-width: 700px) {
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .card > .ch {
    padding-left: 16px;
    padding-right: 16px;
  }
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .card > :is(.stabs, .foot, .pv-viewonly, .empty, .views) {
    margin-left: 16px;
    margin-right: 16px;
  }
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .card > .stabs {
    max-width: calc(100% - 32px);
  }
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .chart .ax text {
    font-size: 30px;
  }
  body.preview .fos-table td.fos-nil {
    text-align: left !important;
    padding-top: 2px;
  }
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .adstabs .stabs {
    flex-wrap: wrap;
    overflow: visible;
  }
}

/* ══ FOS DESIGN SYSTEM, CM-look pages (Home, Client Management, Mapping's records): the same card anatomy and
   type scale as the os2 screens, on CM's own .kpi / .panel markup ══ */
body.preview .kpis .kpi {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-height: var(--fos-card-min);
  padding: var(--fos-card-pad-y) var(--fos-card-pad-x);
  text-align: left;
}
body.preview .kpis .kpi .kpi-label {
  font-size: var(--fos-type-label);
  color: var(--fos-muted);
  white-space: normal;
  line-height: 1.35;
}
body.preview .kpis .kpi .kpi-value {
  margin: 0;
  font-size: var(--fos-type-value);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
body.preview .kpis .kpi.is-word .kpi-value {
  font-size: var(--fos-type-word);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--fos-muted);
}
body.preview .kpis .kpi .kpi-foot {
  margin-top: auto;
  font-size: var(--fos-type-context);
  line-height: 1.45;
  color: var(--fos-muted);
}
/* B1-B: a Home card line's tone (preview_home.TONES): red when booked calls fell, green when they rose, amber when the
   bookings feed trails spend (FDR-007) */
body.preview .kpis .kpi .kpi-foot.is-bad {
  color: var(--late-text);
}
body.preview .kpis .kpi .kpi-foot.is-good {
  color: var(--good-text);
}
body.preview .kpis .kpi .kpi-foot.is-warn {
  color: var(--warn-text);
  font-weight: 600;
}
/* one panel/section title size on every page */
body.preview .section-title,
body.preview .fos-h2 {
  font-size: var(--fos-type-section);
  font-weight: 600;
  letter-spacing: -.01em;
}
body.preview .panel > .fos-bar {
  margin-bottom: 14px;
}
body.preview .fos-link {
  font-size: var(--fos-type-label);
  font-weight: 500;
  color: var(--fos-accent);
  text-decoration: none;
  white-space: nowrap;
}
body.preview .fos-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.preview .fos-quiet {
  margin: 12px 0 0;
  font-size: var(--fos-type-label);
  color: var(--fos-muted);
}
/* equal rows inside a KPI row: label, number and context share three grid tracks across the row (subgrid), so a
   label that wraps to two lines moves every number in that row down together, and they stay level */
body.preview .kpis.pv-home-kpis,
body.preview .kpis.ov-tiles,
body.preview .fos-row {
  grid-auto-rows: auto;
}
body.preview .kpis.ov-tiles > .kpi,
body.preview .kpis.pv-home-kpis > .kpi,
:root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-row > .kpi {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 6px;
  align-content: start;
}
body.preview .kpis.ov-tiles > .kpi .kpi-foot,
body.preview .kpis.pv-home-kpis > .kpi .kpi-foot,
:root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-row > .kpi .kc {
  align-self: end;
  margin-top: 0;
}
/* a phone stacks a CM table marked fos-stack the same way as a section table: a block per row */
@media (max-width: 700px) {
  body.preview .fos-stack thead {
    display: none;
  }
  body.preview .fos-stack,
  body.preview .fos-stack tbody,
  body.preview .fos-stack tr,
  body.preview .fos-stack td {
    display: block;
    width: auto;
    min-width: 0 !important;
  }
  body.preview .fos-stack tr {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid var(--fos-hair);
  }
  body.preview .fos-stack tr:last-child {
    border-bottom: 0;
  }
  body.preview .fos-stack td {
    padding: 2px 0 !important;
    border: 0 !important;
  }
  body.preview .fos-stack .fos-cell-head {
    order: -1;
    padding-bottom: 4px !important;
    font-weight: 600;
    color: var(--fos-text);
  }
  /* label column, then one value column every row shares */
  body.preview .fos-stack td[data-label] {
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 0 12px;
    align-items: baseline;
    font-size: var(--fos-type-label);
  }
  body.preview .fos-stack td[data-label]::before {
    content: attr(data-label);
    color: var(--fos-muted);
  }
  body.preview .fos-stack td[data-label] > .fos-cell-v {
    min-width: 0;
  }
}
/* CM's phone rule lays its last .kpi out as a side-by-side strip; a FOS KPI row keeps every card in the anatomy */
body.preview .kpis.ov-tiles > .kpi,
body.preview .kpis.pv-home-kpis > .kpi {
  grid-template-columns: minmax(0, 1fr);
  grid-column: auto;
}
body.preview .kpis.ov-tiles > .kpi > *,
body.preview .kpis.pv-home-kpis > .kpi > * {
  grid-column: 1;
  grid-row: auto;
}

/* the FOS spacing and type tokens on the CM-look pages (Home, Client Management, Mapping's records) */
body.preview .cm-title h1 {
  font-size: var(--fos-type-title);
  line-height: 1.27;
}
body.preview .kpis,
body.preview .kpis.kpis-4,
body.preview .kpis.kpis-6 {
  gap: var(--fos-gutter);
}
body.preview .ov-tiles {
  margin-bottom: var(--fos-section-gap);
}
body.preview .pv-home-headline .ov-tiles {
  margin-bottom: 0;
}
body.preview .ov-grid {
  gap: var(--fos-gutter);
  margin-bottom: var(--fos-section-gap);
}
body.preview .panel {
  padding: 20px;
}
body.preview .ov-attention {
  margin-bottom: var(--fos-section-gap);
}
/* CM's phone rule drops the last card's number 8 px; every number in a FOS row sits on the same track */
body.preview .kpis.ov-tiles.kpis-4 > .kpi:last-child .kpi-value,
body.preview .kpis.pv-home-kpis.kpis-6 > .kpi:last-child .kpi-value,
body.preview .kpis.ov-tiles > .kpi .kpi-value {
  margin: 0;
}
/* Home's activity table: 14 px cells, 12 px caps headers (CM's idiom, one step larger). CM's own tables keep their
   sizes: their column widths are set for them */
body.preview .pv-recent td {
  font-size: var(--fos-type-body);
}
body.preview .pv-recent th {
  font-size: 12px;
}
@media (max-width: 700px) {
  body.preview .panel {
    padding: 16px;
  }
  body.preview .fos-stack td[data-label] {
    font-size: var(--fos-type-body);
  }
}
/* CM's phone board: the column head's step name and count repeat the step picker above it, and its 63 px leave a
   gap; they go, while its Note hint and its add-to-this-step button stay. The cards line up with the page gutter */
@media (max-width: 700px) {
  body.preview .board.phone-board {
    padding-left: 0;
    padding-right: 0;
  }
  body.preview .board.phone-board .column {
    padding-left: 0;
    padding-right: 0;
  }
  body.preview .board.phone-board .column-head {
    min-height: 0;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 0;
    padding-bottom: 6px;
  }
  body.preview .board.phone-board .column-head > :is(.phase-dot, .grow, .count) {
    display: none;
  }
  /* components.css hides a phone column head's small hint; here it is the one thing the head still says */
  body.preview .board.phone-board .column-head > .small {
    display: inline;
  }
}
/* os2 tile rows at two-up: an odd tile out spans the row */
@media (max-width: 1100px) {
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .bento:has(> .tile):not(.offers) {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .bento > .tile:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
/* an os2 table sits inside its own bordered box: a stacked row keeps the box's inset */
@media (max-width: 700px) {
  body.preview .pv-os2 table.fos-stack tr {
    padding-left: 14px;
    padding-right: 14px;
  }
}
body.preview .fos-nowrap {
  white-space: nowrap;
}
@media (max-width: 700px) {
  :root body.preview .pv-os2 #s-log .card > :is(.tokens, .logcount, .audit) {
    padding-left: 16px;
    padding-right: 16px;
  }
}
/* a selected os2 tab in dark mode: the card colour is darker than the strip's fill, so it read as no pill at all;
   it takes the strong fill, as CM's selected tab does (Ads' level tabs are underlined instead, and keep that) */
:root[data-theme="dark"] body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .stabs a.on:not(.adstabs a) {
  background: var(--fos-seg-on);       /* the shared chosen look (FOS SEGMENTED CONTROL) */
  color: var(--fos-text);
  box-shadow: var(--fos-seg-on-shadow);
}
@media (max-width: 700px) {
  /* a phone puts an os2 card's description under its title */
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .card > .ch {
    grid-template-columns: minmax(0, 1fr);
  }
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .card > .ch .d {
    text-align: left;
  }
}

/* ══ FOS BOARD (job 97, Cole's redesign: the board looks and scrolls like the team's old Finscale Onboarding Pipeline).
   Client Management's board in the new frame only; the classic page never loads this file. Grey rounded lanes of one
   width on the light page, white cards, the count beside the stage name, two dot colours, "+ Add client" at each lane's
   foot. preview/fos-board.js switches board mode on (Pipeline, Board view, 1101 px and wider): then the page stops
   scrolling, the board fills the window down to the dock and scrolls sideways, and each lane scrolls its own cards.
   docs/fos-design-system.md "Workspace pages" is the one exception to the grid this makes. ══ */
body.preview {
  --fos-lane-w: 200px;
  --fos-lane-bg: #e9e9ed;
  --fos-lane-over: #dedfe5;
  --fos-lane-card: #ffffff;
  --fos-card-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  --fos-card-shadow-hover: 0 2px 8px rgba(0, 0, 0, .09);
  --fos-dot-early: #2f6fde;
  --fos-dot-go: #2e9d55;
  --fos-link: #1a5fd0;
}
html[data-theme="dark"] body.preview {
  --fos-lane-bg: #171a18;
  --fos-lane-over: #1f2420;
  --fos-lane-card: #232724;
  --fos-card-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --fos-card-shadow-hover: 0 2px 10px rgba(0, 0, 0, .5);
  --fos-dot-early: #6ea1ff;
  --fos-dot-go: #5cc584;
  --fos-link: #8ab4ff;
}
@media (min-width: 1440px) {
  body.preview { --fos-lane-w: 220px; }
}
body.preview .cm-board {
  gap: 10px;
  padding: 0 0 6px;
  align-items: flex-start;
  scroll-behavior: auto;
  overscroll-behavior-x: contain;
}
body.preview .cm-board > .cm-column,
body.preview .cm-board > .cm-column.empty {
  flex: 0 0 var(--fos-lane-w);
  width: var(--fos-lane-w);
  min-width: 0;
  max-height: 100%;
  padding: 0 8px 4px;
  border-radius: 10px;
  background: var(--fos-lane-bg);
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
body.preview .cm-board > .cm-column.drag-over {
  background: var(--fos-lane-over);
  border-radius: 10px;
}
body.preview .cm-board > .cm-column > .column-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 0;
  padding: 10px 2px 4px;
  background: var(--fos-lane-bg);
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  gap: 6px;
}
body.preview .cm-board > .cm-column.drag-over > .column-head {
  background: var(--fos-lane-over);
}
body.preview .cm-board > .cm-column > .column-head .grow {
  flex: 0 1 auto;
}
body.preview .cm-board > .cm-column > .column-head .count {
  order: 1;
  font-weight: 400;
  color: var(--muted);
  background: transparent;
  padding: 0;
}
body.preview .cm-board:not(.happy-board) > .cm-column > .column-head .col-add {
  display: none;
}
body.preview .cm-board > .cm-column > .column-head .small {
  order: 2;
  margin-left: auto;
}
body.preview .cm-board > .cm-column > .column-head .col-add {
  order: 3;
}
body.preview .cm-board .phase-dot {
  margin-top: 6.5px;
  background: var(--fos-dot-early);
}
body.preview .cm-board .cm-column.fos-go .phase-dot {
  background: var(--fos-dot-go);
}
body.preview .cm-board .cm-column.phase-none .phase-dot {
  background: var(--muted);
}
body.preview .cm-board .cm-card {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--fos-lane-card);
  box-shadow: var(--fos-card-shadow);
}
body.preview .cm-board .cm-card:hover {
  transform: none;
  box-shadow: var(--fos-card-shadow-hover);
}
/* a pipeline card names the client only (Reeze, 21 Oct); the company shows in the panel, under the name. The element
   stays (hidden), so CM's own code and checks that read it hold */
body.preview .cm-card .company {
  display: none;
}
body.preview .cm-board .cm-card .card-bottom {
  margin-top: 6px;
  gap: 8px;
}
body.preview .cm-board .cm-card .clock {
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--muted);
}
body.preview .cm-board .cm-card .clock-late {
  color: var(--late-text);
}
body.preview .cm-board .cm-card .clock-good {
  color: var(--good-text);
}
body.preview .cm-board .empty-note {
  padding: 6px 4px 2px;
  font-size: 12px;
}
body.preview .fos-lane-add {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: var(--fos-link);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
body.preview .fos-lane-add:hover {
  text-decoration: underline;
}
/* BRIEF-82 R1-02: every Add client control on Client Management (the header button, every column head's "+" on both
   pipelines, Live to Happy's step ticks and its TeamOS-only steps included, and every lane's foot link) is not drawn
   until shell.js says this member may save there (body.cm-add-on: CM_WRITES, the live "clients" key and the saving
   switch). Not drawn, so never hovered or focused, not even while a flagged read is still loading. */
body.preview[data-page="client-management"]:not(.cm-add-on) :is(#cm-more, #add-client-btn, .col-add, .fos-lane-add,
    [onclick^="cmAddClient"], [onclick^="cmHappyAdd"]) {
  display: none;
}
body.preview #fos-board-info {
  display: none;
}
/* board mode */
body.preview.fos-board-mode {
  overflow: hidden;
}
body.preview.fos-board-mode .main {
  max-width: none;
  padding-left: var(--fos-page-gutter);
  padding-right: var(--fos-page-gutter);
  padding-bottom: 0;
}
body.preview.fos-board-mode .cm-board {
  height: var(--fos-board-h, auto);
  min-height: 0;
  max-height: none;
}
body.preview.fos-board-mode #view-content .design-note {
  display: none;
}
body.preview.fos-board-mode #fos-board-info {
  display: inline-flex;
}

/* ══ FOS PAGE BAR (job 97 PR 2, Cole's ask 5: a slimmer Client Management header, the pipeline higher on the page).
   New frame only. A smaller title and tighter rows; on the Pipeline tab preview/fos-board.js folds the filters into
   one Filters button and, from 1101 px, moves that row up into the tab row. ══ */
/* every FOS page's head (job 97 PR 5: one slim head on all six pages; the title size is --fos-type-title) */
body.preview .main {
  padding-top: 14px;
}
body.preview .cm-head {
  margin-bottom: 10px;
  align-items: center;
}
body.preview .cm-title .cm-subtitle {
  margin-top: 2px;
  font-size: 12px;
}
body.preview[data-page="client-management"] .workspace-tabs {
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}
body.preview #filters.fos-in-bar {
  margin-left: auto;
  padding: 0;
  flex-wrap: nowrap;
}
body.preview .fos-filters {
  position: relative;
}
body.preview .fos-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
body.preview .fos-filters-n {
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-text);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}
body.preview :is(.fos-filters-pop, .cm-more-menu) {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 240px;
  max-width: calc(100vw - 16px);
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-2);
}
body.preview .fos-filters-pop[hidden] {
  display: none;
}
body.preview .fos-filters-pop .mute-btn,
body.preview .fos-filters-pop .fos-filters-clear {
  align-self: flex-start;
}

/* ══ FOS PANEL (job 97 PR 2b: the client panel works like the old Kanban's side panel). New frame only. A floating panel
   8 px from the window's edges with 12 px corners over the dimmed board; under the name, the step as a grey pill with
   its next action on one quiet line, the contact actions, Needed from client and from us (each with a grey line saying
   what it is for) and Notes with its count. Everything else stays below, unfolded. ══ */
/* the drawer stays wide enough to read in one scroll (the 19 Oct polish rule: 640 px or more at 1440) */
body.preview {
  --fos-panel-w: 560px;
}
@media (min-width: 1440px) {
  body.preview { --fos-panel-w: 640px; }
}
@media (min-width: 701px) {
  body.preview #profile-overlay.drawer-overlay {
    padding: 8px;
  }
  body.preview .profile.drawer.fos-panel {
    width: var(--fos-panel-w);
    max-width: 100%;
    height: auto;
    border-width: 0;
    border-radius: 12px;
  }
}
body.preview .fos-panel .profile-head h2 {
  font-size: 18px;
  font-weight: 600;
}
body.preview .fos-panel .next-step {
  padding: 0;
  background: transparent;
  box-shadow: none;
}
body.preview .fos-panel .next-step > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
body.preview .fos-panel #drawer-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background-color: var(--fill-strong);
  font-size: 13px;
  font-weight: 500;
}
body.preview .fos-panel .next-step .next-label {
  display: none;
}
body.preview .fos-panel .next-step h3 {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
}
body.preview .fos-panel .next-step h3 + .small {
  margin-top: 2px;
  color: var(--muted);
}
body.preview .fos-panel .profile-summary {
  margin: 0;
}
body.preview .fos-panel .needed-panel {
  display: block;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
body.preview .fos-panel .needed-list {
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
}
body.preview .fos-panel .needed-list > h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
body.preview .fos-panel .fos-sub {
  margin: 2px 0 8px;
  font-size: 12px;
  color: var(--muted);
}
body.preview .fos-panel .notes-section {
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}
body.preview .fos-count {
  display: inline-block;
  min-width: 20px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
  vertical-align: 2px;
}

/* ══ FOS POLISH (job 97, Reeze 21 Oct: spacing, padding and alignment on every new page, laptop and phone) ══ */
/* the header's edge is the page's edge: the F mark sits over the title on every page (36 / 22 / 14 px; 16 px on the
   board, which is a workspace) */
body.preview .topbar {
  padding-left: 36px;
  padding-right: 36px;
}
@media (max-width: 1100px) {
  body.preview .topbar {
    padding-left: 22px;
    padding-right: 22px;
  }
}
@media (max-width: 700px) {
  body.preview .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }
}
body.preview.fos-board-mode .topbar {
  padding-left: var(--fos-page-gutter);
  padding-right: var(--fos-page-gutter);
}
/* one page gutter from 1101 px: every Client Management tab has the Pipeline board's sides (Reeze 22 Oct), and so does
   every other FOS page, so the title stays in the same place on every page (Reeze 21 Oct). No centred 1680 px column:
   the header, the tab row and the content start and end at the same place everywhere; below 1101 px every page
   already shares the page grid's gutter */
@media (min-width: 1101px) {
  body.preview .main {
    max-width: none;
    padding-left: var(--fos-page-gutter);
    padding-right: var(--fos-page-gutter);
  }
  body.preview .topbar {
    padding-left: var(--fos-page-gutter);
    padding-right: var(--fos-page-gutter);
  }
}
/* with the full-width page a wide screen gives AICSM's open draft a very long line: its words keep a readable measure
   inside the full-width card (Astra PD-1) */
:root body.preview .pv-os2 #s-aicsm .rd :is(.mb, .list) {
  max-width: 72ch;
}
/* the client panel: every section's card has one inner padding, the note box's included (the Needed lists' and the
   next step's .panel wrappers are open containers, not cards: they keep no padding of their own) */
body.preview .profile .panel:not(.needed-panel, .next-step) {
  padding: var(--fos-panel-pad);
}
body.preview .profile .composer {
  padding: 12px var(--fos-panel-pad);
}
body.preview .profile .composer textarea {
  padding-left: 0;
  padding-right: 0;
}
/* the tab row: tabs, the pipeline switch and Filters are one height and one text size (FOS SEGMENTED CONTROL) */
body.preview .fos-filters-btn {
  min-height: var(--fos-ctl-h);
  height: var(--fos-ctl-h);
  padding: 0 14px;
  font-size: var(--fos-seg-type);
  font-weight: 500;
}
body.preview #filters:not(.fos-in-bar):has(.fos-filters) {
  padding: 0;
  margin-bottom: 12px;
  align-items: center;
}
@media (max-width: 700px) {
  /* the phone board: the step picker, then the cards; the lane's head row held only its "+" (the foot link does that
     now, as on the board) and stays only for its "Note" hint */
  body.preview .board.phone-board {
    padding-top: 0;
  }
  body.preview .board.phone-board .column-head:not(:has(> .small)) {
    display: none;
  }
  body.preview .board.phone-board .column-head .col-add {
    display: none;
  }
  body.preview .board.phone-board .cm-card:first-of-type {
    margin-top: 0;
  }
  body.preview .board.phone-board .fos-lane-add {
    margin-top: 8px;
    padding: 10px 0;
  }
  body.preview #view-content > .phone-col {
    margin-bottom: 12px;
  }
  /* an Ads number keeps its line; its badge goes under it, so every number in a two-up row sits level */
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-valrow {
    align-items: flex-start;
  }
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-valrow > .kv {
    flex: 0 0 100%;
  }
}
/* round 2 (Astra R1) */
/* titles in the heading face, Inter at 600 for a primary button (CM's 650 is off the scale) */
body.preview :is(.pv-empty-title) {
  font-family: var(--fos-font-head);
  font-weight: 600;
}
body.preview .primary {
  font-weight: 600;
}
/* the last section's own margin would add to the page's 110 px room for the dock */
body.preview .pv-main > :last-child,
body.preview .pv-main > :last-child > :last-child {
  margin-bottom: 0;
}
/* the client panel: 20 px insets (16 px on a phone), one 16 px rhythm inside the summary, 24 px between sections,
   every section title 16 px / 600, the next action in the body face */
@media (min-width: 701px) {
  body.preview .fos-panel .profile-head {
    padding: 16px 20px 12px;
  }
  body.preview .fos-panel .profile-body {
    padding: 16px 20px 120px;
  }
}
@media (max-width: 700px) {
  body.preview .fos-panel .profile-body {
    padding-top: 16px;
  }
}
body.preview .fos-panel #prof-overview .stack {
  gap: 16px;
}
body.preview .fos-panel .profile-summary {
  padding: 0;
}
body.preview .fos-panel .needed-list {
  padding: 16px 0 0;
}
body.preview .fos-panel .needed-list + .needed-list {
  margin-top: 16px;
}
body.preview .fos-panel .profile-section {
  margin-top: 24px;
}
body.preview .fos-panel .notes-section {
  padding-top: 16px;
}
body.preview .fos-panel :is(.section-title, .needed-list > h4) {
  margin: 0 0 12px;
  font-family: var(--fos-font-head);
  font-size: var(--fos-type-section);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
}
body.preview .fos-panel .needed-list > h4 {
  margin-bottom: 0;
}
body.preview .fos-panel .section-head {
  margin-bottom: 12px;
  align-items: center;
}
body.preview .fos-panel .section-head > .section-title {
  margin: 0;
}
body.preview .fos-panel #timeline {
  padding-top: 0;
}
body.preview .fos-panel .next-step h3 {
  font-family: var(--font-body);
  font-size: var(--fos-type-body);
  font-weight: 400;
  letter-spacing: 0;
}
/* Filters: one text size, the sound switch on the selects' text inset */
body.preview .fos-filters-pop select {
  font-size: 13px;
}
body.preview .fos-filters-pop .mute-btn {
  margin: 0;
  padding-left: 15px;
  padding-right: 12px;
  font-size: 13px;
}
@media (max-width: 700px) {
  /* CM's phone rule makes a row's last card a side-by-side strip; an os2 KPI card keeps the card anatomy, no rule line */
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-row > .kpi {
    grid-template-columns: minmax(0, 1fr);
    min-height: var(--fos-card-min);
    border: 0 !important;
  }
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-row > .kpi > * {
    grid-column: 1;
  }
  /* a screen's own tab strip wraps whole tabs instead of cutting the last one off */
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .stabs[data-role] {
    flex-wrap: wrap;
    overflow: visible;
    max-width: 100%;
  }
  /* AICSM's open draft on the phone's 16 px card inset */
  :root body.preview .pv-os2 #s-aicsm .inbox .rd {
    padding-left: 16px;
    padding-right: 16px;
  }
}
/* round 3 (Astra R2) */
@media (max-width: 700px) {
  /* a tab strip inside a card keeps the card's 16 px inset on both sides */
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .card > .stabs[data-role] {
    max-width: calc(100% - 32px);
  }
  :root body.preview .pv-os2 #s-aicsm .card > .fchips {
    padding-left: 16px;
    padding-right: 16px;
  }
  /* a KPI card's context line on a phone: the change badge on its own line at the top of the shared track, its
     comparison under it, so the badges in a row sit level however the comparison wraps */
  :root body.preview .pv-os2 :is(#s-ads,#s-aicsm,#s-log,#s-adclaim) .fos-row > .kpi .kc {
    align-self: start;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ── Needed from client / Needed from us (job 106; BUILD-STANDARD review with Astra). One row per item: the box, the
   words (body size) over one grey line (the Suggested tag, how it gets done or who did it, a short date), and a quiet
   remove button. Under each list: the add row, then a "Removed (n)" fold with Put back. ── */
/* each list is a card with the panel's one inner padding (--fos-panel-pad, the FOS polish PR's token; 20 px without it),
   like Notes, Facts and the rest (Reeze 22 Oct) */
body.preview .fos-panel .fos-need-card {
  margin-top: 12px;
  padding: 4px var(--fos-panel-pad, 20px) var(--fos-panel-pad, 20px);
  border-radius: var(--fos-card-radius, 18px);
  background: var(--card);
  box-shadow: var(--shadow-1);
}
body.preview .fos-panel .fos-need-card > .fos-need-empty:only-child {
  margin: 16px 0 0;
}
body.preview .fos-panel .fos-need-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
}
body.preview .fos-panel .fos-need-item > input {
  margin: 2px 0 0;
  width: 18px;
  height: 18px;
}
body.preview .fos-panel .fos-need-body {
  min-width: 0;
}
body.preview .fos-panel .fos-need-body label.needed-text {
  cursor: pointer;
}
body.preview .fos-panel .fos-need-item input:disabled + .fos-need-body label.needed-text {
  cursor: default;
}
body.preview .fos-panel .fos-need-body .needed-text {
  display: block;
  font-size: var(--fos-type-body, 14px);
  line-height: 1.4;
  color: var(--text);
  overflow-wrap: anywhere;
}
body.preview .fos-panel .fos-need-item.done .needed-text {
  color: var(--muted);
}
body.preview .fos-panel .fos-need-list .needed-meta {
  display: block;
  margin-top: 4px;
  font-size: var(--fos-type-context, 12px);
  line-height: 1.4;
  color: var(--muted);
  overflow-wrap: anywhere;
}
body.preview .fos-panel .fos-need-tag {
  font-weight: 600;
  color: var(--muted);
}
body.preview .fos-panel .fos-need-remove {
  width: 32px;
  height: 32px;
  min-height: 32px;
  margin: -6px -6px 0 0;
  color: var(--muted);
}
body.preview .fos-panel .fos-need-remove:hover,
body.preview .fos-panel .fos-need-remove:focus-visible {
  color: var(--text);
}
body.preview .fos-panel .fos-need-remove .icon {
  width: 14px;
  height: 14px;
}
body.preview .fos-panel .fos-need-empty {
  margin-top: 12px;
  padding: 12px 16px;
}
body.preview .fos-panel .fos-need-note {
  margin-top: 12px;
  font-size: var(--fos-type-context, 12px);
  color: var(--muted);
}
body.preview .fos-panel .fos-need-retry {
  margin-top: 8px;
}
body.preview .fos-panel .fos-need-removed {
  margin-top: 8px;
}
/* FOS-PROFILE-HEAD-NEEDS-TOP3: the first 3 items show, the rest wait behind the list's own "N more" button */
body.preview .fos-need-item[hidden] {
  display: none;
}
body.preview .fos-panel .fos-need-fold, body.preview .fos-need-more {
  padding: 4px 0;
  min-height: 32px;
  font-size: var(--fos-type-context, 12px);
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.preview .fos-panel .fos-need-gone {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
body.preview .fos-panel .fos-need-gone > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--hairline);
}
body.preview .fos-panel .fos-need-gone-text {
  font-size: var(--fos-type-label, 13px);
  color: var(--muted);
  overflow-wrap: anywhere;
}
body.preview .fos-panel .fos-need-gone .needed-meta {
  grid-column: 1;
  margin: 0;
}
body.preview .fos-panel .fos-need-back {
  grid-column: 2;
  grid-row: 1 / span 2;
}
body.preview .fos-panel .fos-need-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ══ FOS SEGMENTED CONTROL (Reeze 22 Oct: "make it more consistent ... I like the Pipeline one, add a tiny bit more").
   Every toggle and tab in the new UI is one control: a --fos-ctl-h track with a --fos-seg-inset inset on --fos-fill,
   choices --fos-seg-item-h tall with --fos-seg-pad-x a side, 13 px / 500, and the chosen one raised (--fos-seg-on). The
   keyboard focus ring sits inside the choice, so the tab row can never clip it into two green brackets.
   Covers: Client Management's page tabs, Need Mapping, List / Board, the pipeline switch and the Clients lifecycle
   filters (their own .fos-life track, drawn by fos-board.js; the selects beside them keep CM's group); the Mapping page tabs; the os2 screens' tab strips (.stabs: Activity, AICSM, the Ads table tabs and range
   bar) and AICSM's chip sets (.fchipset: Whose, Goes to, Order). Buttons in the same rows share --fos-ctl-h.
   Each part is one rule per surface, every choice at one specificity (the os2 copy carries the screen ids its own
   sheet uses, so base, hover, chosen and focus all win the same way). ══ */
body.preview :is(.segmented, .cm-tabs, .fos-life),
:root body.preview .pv-os2 :is(#s-ads, #s-aicsm, #s-log, #s-adclaim) :is(.stabs, .fchipset),
:root body.preview .pv-os2 :is(.stabs, .fchipset) {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: var(--fos-ctl-h);
  min-height: var(--fos-ctl-h);
  padding: var(--fos-seg-inset);
  border: 0;
  border-radius: var(--fos-seg-radius);
  background: var(--fos-fill);
  box-shadow: none;
  /* never wraps to a second line: a row too long for its space scrolls sideways inside the track, which may shrink */
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
body.preview :is(.segmented > button, .cm-tabs > .tab, .fos-life > button.filter),
:root body.preview .pv-os2 :is(#s-ads, #s-aicsm, #s-log, #s-adclaim) :is(.stabs > :is(a, button, label), .fchipset > a.fchip),
:root body.preview .pv-os2 :is(.stabs > :is(a, button, label), .fchipset > a.fchip) {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  height: var(--fos-seg-item-h);
  min-height: var(--fos-seg-item-h);
  margin: 0;
  padding: 0 var(--fos-seg-pad-x);
  border: 0;
  border-radius: var(--fos-seg-item-radius);
  background: transparent;
  box-shadow: none;
  color: var(--fos-muted);
  font-family: inherit;
  font-size: var(--fos-seg-type);
  font-weight: var(--fos-seg-weight);
  line-height: var(--fos-seg-item-h);
  white-space: nowrap;
}
body.preview :is(.segmented > button, .cm-tabs > .tab, .fos-life > button.filter):hover,
:root body.preview .pv-os2 :is(#s-ads, #s-aicsm, #s-log, #s-adclaim) :is(.stabs > :is(a, button, label), .fchipset > a.fchip):hover,
:root body.preview .pv-os2 :is(.stabs > :is(a, button, label), .fchipset > a.fchip):hover {
  color: var(--fos-text);
}
body.preview :is(.segmented > button.active, .cm-tabs > .tab.active, .fos-life > button.filter.active),
:root body.preview .pv-os2 :is(#s-ads, #s-aicsm, #s-log, #s-adclaim) :is(.stabs > :is(a, button, label):is(.on, :has(> input:checked)), .fchipset > a.fchip.on),
:root body.preview .pv-os2 :is(.stabs > :is(a, button, label):is(.on, :has(> input:checked)), .fchipset > a.fchip.on) {
  background: var(--fos-seg-on);
  color: var(--fos-text);
  box-shadow: var(--fos-seg-on-shadow);
}
/* a count inside a choice (AICSM's chips, the lifecycle filters) is quiet text, chosen or not */
:root body.preview .pv-os2 :is(#s-ads, #s-aicsm, #s-log, #s-adclaim) .fchipset > a.fchip b,
body.preview .fos-life > button.filter .filter-count {
  color: var(--fos-muted);
  opacity: 1;
  font-size: var(--fos-seg-type);
  font-weight: var(--fos-seg-weight);
}
/* a chip set's name ("Whose", "Goes to", "Order") leads its track, before the choices */
:root body.preview .pv-os2 :is(#s-ads, #s-aicsm, #s-log, #s-adclaim) .fchipset > .foot {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 6px 0 10px;
  color: var(--fos-muted);
  font-size: var(--fos-seg-type);
}
/* Need Mapping sits outside the tablist (it opens a section, not a tab): it is its own one-choice track, the chosen
   look drawn inset like the others */
body.preview .workspace-tabs .tab.map-tab,
body.preview .tab.map-tab {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  height: var(--fos-ctl-h);
  min-height: var(--fos-ctl-h);
  padding: 0 calc(var(--fos-seg-pad-x) + var(--fos-seg-inset));
  border: 0;
  border-radius: var(--fos-seg-radius);
  background: var(--fos-fill);
  box-shadow: none;
  color: var(--fos-muted);
  font-family: inherit;
  font-size: var(--fos-seg-type);
  font-weight: var(--fos-seg-weight);
  line-height: var(--fos-seg-item-h);
  white-space: nowrap;
}
body.preview .workspace-tabs .tab.map-tab:hover,
body.preview .workspace-tabs .tab.map-tab.active {
  color: var(--fos-text);
  background: var(--fos-fill);
}
body.preview .workspace-tabs .tab.map-tab.active::before {
  content: "";
  position: absolute;
  inset: var(--fos-seg-inset);
  z-index: -1;
  border-radius: var(--fos-seg-item-radius);
  background: var(--fos-seg-on);
  box-shadow: var(--fos-seg-on-shadow);
}
/* the focus ring: inside the choice, so no track or scrolling row can clip it */
body.preview :is(.segmented > button, .cm-tabs > .tab, .fos-life > button.filter, .tab.map-tab):focus-visible,
:root body.preview .pv-os2 :is(#s-ads, #s-aicsm, #s-log, #s-adclaim) :is(.stabs > :is(a, button), .fchipset > a.fchip):focus-visible,
:root body.preview .pv-os2 :is(#s-ads, #s-aicsm, #s-log, #s-adclaim) .stabs > label:has(> input:focus-visible),
:root body.preview .pv-os2 :is(.stabs > :is(a, button), .fchipset > a.fchip):focus-visible,
:root body.preview .pv-os2 .stabs > label:has(> input:focus-visible) {
  outline: 2px solid var(--green, currentColor);
  outline-offset: -2px;
}
:root body.preview .pv-os2 .stabs > label > input:focus-visible + span {
  outline: 0;
}
/* the Ads table tabs were underlined tabs: now the same control, with the bar's hairline kept under it */
:root body.preview .pv-os2 #s-ads .adstabs {
  padding: 12px 14px;
}
/* buttons in a row with a toggle are the toggle's height (the Client Management head) */
body.preview .cm-head-actions > :is(button, .search-wrap),
body.preview .cm-head-actions > .cm-more > button {
  height: var(--fos-ctl-h);
  min-height: var(--fos-ctl-h);
}
body.preview .cm-head-actions > button:not(.icon-btn),
body.preview .cm-head-actions > .cm-more > button {
  padding: 0 14px;
  font-size: var(--fos-seg-type);
}
body.preview .cm-head-actions > .icon-btn {
  width: var(--fos-ctl-h);
}
/* phone: 2 px more a side than the old 12 (the switch and Filters still share a row at 390 px); the tab row scrolls
   sideways as a whole, as before, so the tabs keep one unbroken track and Need Mapping follows it */
@media (max-width: 700px) {
  body.preview {
    --fos-seg-pad-x: 14px;
  }
  body.preview .workspace-tabs .cm-tabs {
    flex: 0 0 auto;
    max-width: none;
    overflow: visible;
  }
  body.preview[data-page="client-management"] .workspace-tabs {
    scrollbar-width: none;
  }
  body.preview[data-page="client-management"] .workspace-tabs::-webkit-scrollbar {
    display: none;
  }
  /* an os2 screen's tab strip wraps whole tabs on a phone (job 97 polish), so its track grows to two rows */
  :root body.preview .pv-os2 :is(#s-ads, #s-aicsm, #s-log, #s-adclaim) .stabs[data-role] {
    height: auto;
    row-gap: 2px;
  }
}

/* ══ TEAM TO-DOS, @-TAGS AND THE BELL'S INBOX (job 109; preview/fos-tasks.js). A to-do is a Needed from us item with an
   owner and a due date. The To-dos tab is one panel of rows grouped by due (Overdue, Today, Upcoming, No due date) under
   the same bar as every tab (the FOS segmented control, --fos-ctl-h controls). Red only for overdue. ══ */
body.preview .cm-tabs > .tab .fos-tab-count:not(:empty) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--fos-fill);
  color: var(--fos-text);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}
body.preview .cm-tabs > .tab.active .fos-tab-count:not(:empty) {
  background: var(--fos-fill);
}
body.preview .cm-tabs > .tab .fos-tab-count.late:not(:empty) {
  background: var(--late-bg);
  color: var(--late-text);
}
/* the bar: Owner, Open / Done, Add to-do; one height, the Pipeline bar's padding */
body.preview .fos-todo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
}
body.preview .fos-todo-bar .fos-todo-label {
  margin: 0;
  color: var(--fos-muted);
  font-size: var(--fos-seg-type);
  font-weight: var(--fos-seg-weight);
}
body.preview .fos-todo-bar :is(select, .primary) {
  height: var(--fos-ctl-h);
  min-height: var(--fos-ctl-h);
}
body.preview .fos-todo-bar .segmented .filter-count {
  margin-left: 2px;
  color: var(--fos-muted);
}
/* the list: one panel, a column head, then each group's head and rows */
body.preview .fos-todo-panel {
  padding: 6px var(--fos-card-pad-x) 12px;
}
body.preview .fos-todo-cols,
body.preview .fos-todo-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px) 130px 150px;
  gap: 16px;
  align-items: center;
}
body.preview .fos-todo-cols {
  grid-template-columns: 30px minmax(0, 1fr) minmax(140px, 220px) 130px 150px;
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--fos-hair);
  color: var(--fos-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body.preview .fos-todo-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 4px;
  font-size: var(--fos-type-label);
  font-weight: 600;
  color: var(--fos-text);
}
body.preview .fos-todo-group.overdue {
  color: var(--late-text);
}
body.preview .fos-todo-group .fos-count {
  color: var(--fos-muted);
  font-weight: 500;
}
body.preview .fos-todo-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
body.preview .fos-todo-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--fos-hair);
}
body.preview .fos-todo-row:last-child {
  border-bottom: 0;
}
body.preview .fos-todo-row > input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}
body.preview .fos-todo-open {
  width: 100%;
  min-height: 52px;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--fos-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
body.preview .fos-todo-open:hover .fos-todo-text {
  text-decoration: underline;
  text-decoration-color: var(--fos-muted);
  text-underline-offset: 3px;
}
body.preview .fos-todo-open:focus-visible {
  outline: 2px solid var(--fos-accent);
  outline-offset: -2px;
  border-radius: 6px;
}
body.preview .fos-todo-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--fos-type-body);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
body.preview .fos-todo-row.done .fos-todo-text {
  color: var(--fos-muted);
  text-decoration: line-through;
  text-decoration-color: var(--fos-muted);
}
body.preview :is(.fos-todo-client, .fos-todo-owner, .fos-todo-due) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fos-type-label);
  color: var(--fos-muted);
}
body.preview .fos-todo-client {
  color: var(--fos-text);
}
body.preview .fos-todo-owner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
body.preview .fos-av {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fos-fill);
  color: var(--fos-text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
}
body.preview .fos-todo-due.late,
body.preview .fos-need-list .fos-todo-due.late {
  color: var(--late-text);
  font-weight: 600;
}
body.preview .fos-todo-due.today {
  color: var(--fos-text);
  font-weight: 600;
}
body.preview .fos-todo-empty {
  margin-top: 0;
}
/* @-tags in words: a soft chip */
body.preview .fos-tag {
  padding: 0 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--fos-accent) 14%, transparent);
  color: var(--fos-accent);
  font-weight: 600;
  white-space: nowrap;
}
/* the panel's Needed from us: who and when lead the grey line; the edit pencil sits beside the remove button */
body.preview .fos-panel .fos-todo-who {
  color: var(--fos-text);
  font-weight: 600;
}
body.preview .fos-panel .fos-need-item {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}
body.preview .fos-panel .fos-need-edit {
  width: 32px;
  height: 32px;
  min-height: 32px;
  margin: -6px 0 0;
  color: var(--muted);
}
body.preview .fos-panel .fos-need-edit:hover,
body.preview .fos-panel .fos-need-edit:focus-visible {
  color: var(--text);
}
body.preview .fos-panel .fos-need-edit .icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
/* the words take the whole line; owner, due and Add sit under them */
body.preview .fos-panel .needed-add.fos-todo-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
}
body.preview .fos-panel .needed-add.fos-todo-add > * {
  min-width: 0;
  height: 36px;
  min-height: 36px;
}
body.preview .fos-panel .needed-add.fos-todo-add > input:first-child {
  grid-column: 1 / -1;
}
body.preview .fos-panel .needed-add.fos-todo-add > select {
  padding-top: 0;
  padding-bottom: 0;
  line-height: normal;
}
body.preview .fos-flash {
  animation: fos-flash 2.4s ease-out;
  border-radius: 8px;
}
@keyframes fos-flash {
  0%, 40% { background: color-mix(in srgb, var(--fos-accent) 18%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--fos-accent) 18%, transparent); }
  100% { background: transparent; box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  body.preview .fos-flash { animation: none; outline: 2px solid var(--fos-accent); outline-offset: 4px; }
}
/* dialogs: Owner and Due side by side */
body.preview .fos-dialog-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
body.preview .fos-dialog-row :is(select, input) {
  width: 100%;
}
/* the @ list, under the box */
body.preview .fos-tag-pop {
  position: fixed;
  z-index: 90;
  min-width: 200px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--fos-hair);
  border-radius: 10px;
  background: var(--fos-card);
  box-shadow: var(--shadow-2);
}
body.preview .fos-tag-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--fos-text);
  font-size: var(--fos-type-body);
  cursor: pointer;
}
body.preview .fos-tag-opt.on,
body.preview .fos-tag-opt:hover {
  background: var(--fos-fill);
}
/* the bell's panel, under the bell (a sheet on a phone) */
body.preview .fos-bell-pop {
  position: fixed;
  z-index: 70;
  width: min(420px, calc(100vw - 16px));
  max-height: min(640px, calc(100vh - 90px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--fos-hair);
  border-radius: 14px;
  background: var(--fos-card);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
body.preview .fos-bell-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 10px 18px;
  border-bottom: 1px solid var(--fos-hair);
}
body.preview .fos-bell-head h2 {
  flex: 1;
  margin: 0;
  font-size: var(--fos-type-section);
}
body.preview .fos-bell-body {
  overflow-y: auto;
  padding: 4px 0 8px;
}
body.preview .fos-bell-empty,
body.preview .fos-bell-foot {
  margin: 12px 18px;
}
body.preview .fos-bell-sub {
  margin: 14px 18px 4px;
  color: var(--fos-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body.preview .fos-inbox {
  margin: 0;
  padding: 0;
  list-style: none;
}
body.preview .fos-inbox-row {
  position: relative;
  display: flex;
  align-items: flex-start;
}
body.preview .fos-notices .fos-inbox-row {
  padding: 10px 18px;
}
body.preview .fos-inbox-open {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 12px 40px 12px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--fos-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
body.preview .fos-inbox-open:hover {
  background: var(--fos-fill);
}
body.preview .fos-inbox-open:focus-visible {
  outline: 2px solid var(--fos-accent);
  outline-offset: -2px;
}
body.preview .fos-inbox-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
body.preview .fos-inbox-what {
  font-size: var(--fos-type-body);
  line-height: 1.35;
  color: var(--fos-muted);
}
body.preview .fos-inbox-row.unread .fos-inbox-what {
  color: var(--fos-text);
}
body.preview .fos-inbox-what strong {
  color: var(--fos-text);
}
body.preview .fos-inbox-client {
  font-size: var(--fos-type-label);
  color: var(--fos-text);
  font-weight: 500;
}
body.preview .fos-inbox-words {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--fos-type-label);
  color: var(--fos-muted);
  overflow-wrap: anywhere;
}
body.preview .fos-inbox-words.fos-inbox-words-full {
  display: block;
  -webkit-line-clamp: none;
}
body.preview .fos-inbox-when {
  font-size: var(--fos-type-context);
  color: var(--fos-muted);
}
body.preview .fos-inbox-dot {
  position: absolute;
  top: 14px;
  right: 10px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
body.preview .fos-inbox-dot::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--fos-accent);
}
body.preview .fos-inbox-dot:hover::after,
body.preview .fos-inbox-dot:focus-visible::after {
  inset: 5px;
}
body.preview .toast .fos-undo {
  margin-left: 8px;
  padding: 0;
  min-height: 0;
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}
body.preview .mock-bar #mock-as {
  height: 28px;
  min-height: 28px;
}
@media (max-width: 1100px) {
  body.preview .fos-todo-cols { display: none; }
  body.preview .fos-todo-open { display: flex; flex-wrap: wrap; column-gap: 10px; row-gap: 4px; }
  body.preview .fos-todo-text { flex: 1 0 100%; }
  body.preview :is(.fos-todo-client, .fos-todo-owner, .fos-todo-due) { font-size: var(--fos-type-context); }
  body.preview .fos-todo-client::after { content: "·"; margin-left: 10px; color: var(--fos-muted); }
  body.preview .fos-todo-owner::after { content: "·"; margin-left: 2px; color: var(--fos-muted); }
  body.preview .fos-todo-owner .fos-av { display: none; }
}
@media (max-width: 700px) {
  body.preview .fos-todo-panel { padding: 4px 14px 10px; }
  body.preview .fos-todo-bar { gap: 8px; }
  body.preview .fos-todo-bar .grow { display: none; }
  body.preview .fos-todo-bar #fos-todo-owner { flex: 1 1 140px; }
  body.preview .fos-todo-bar #fos-todo-new { flex: 1 1 100%; }
  body.preview .fos-panel .needed-add.fos-todo-add { grid-template-columns: 1fr 1fr; }
  body.preview .fos-panel .needed-add.fos-todo-add > button { grid-column: 1 / -1; }
  body.preview .fos-bell-pop { left: 8px; right: 8px !important; width: auto; }
}
/* job 109 review round 1: words a person may not change are shown, not boxed (J109-R1-04); the notices' bell mark;
   "Show older" under the notifications (J109-R1-05) */
body.preview .fos-edit-words {
  margin: 0 0 12px;
}
body.preview .fos-edit-words .fos-edit-label {
  margin-bottom: 4px;
  color: var(--fos-muted);
  font-size: var(--fos-type-label);
  font-weight: 600;
}
body.preview .fos-edit-words p {
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--fos-fill);
  color: var(--fos-text);
  font-size: var(--fos-type-body);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
body.preview .fos-av.fos-av-sys .icon {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
body.preview .fos-bell-older {
  display: block;
  margin: 8px 18px 4px;
  padding: 0;
  min-height: 32px;
}
/* job 109: the profile's Delivery section: True delivered is the headline line; when the numbers were read, and a
   plain note when replacement requests have not synced lately */
body.preview .delivery-box .delivery-true {
  border-top: 1px solid var(--fos-hair);
  margin-top: 4px;
  padding-top: 8px;
}
body.preview .delivery-box .delivery-true strong {
  font-size: var(--fos-type-section);
}
body.preview .delivery-box .delivery-when {
  margin-top: 10px;
}
body.preview .delivery-box .delivery-stale {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--warn-text) 12%, transparent);
  color: var(--warn-text);
}

/* Reeze override 7 (1 Nov): units by package type. Booked and Shown sit side by side in one row; spacing only */
body.preview .delivery-box .delivery-units {
  margin: var(--sp-1) 0 var(--sp-2);
}
body.preview .delivery-box .delivery-units .detail-value {
  flex-wrap: wrap;
  justify-content: flex-end;
  column-gap: var(--sp-4);
}

/* ══ LINKS (job 109, Reeze 22 and 24 Oct; preview/fos-links.js). The bar is the To-dos bar: a search box, the
   category segmented control, Add; then cards of rows: an icon, the title (opens the link), what it is, a grey line of
   category, who and when; Copy link, Pin (a lead), Edit and Remove (who added it, or a lead). ══ */
body.preview .fos-links-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--fos-section-gap);
}
body.preview .fos-links-search input {
  width: 260px;
  height: var(--fos-ctl-h);
  min-height: var(--fos-ctl-h);
}
body.preview .fos-links-bar .primary {
  height: var(--fos-ctl-h);
  min-height: var(--fos-ctl-h);
}
body.preview .fos-links-bar .segmented .filter-count {
  margin-left: 2px;
  color: var(--fos-muted);
}
body.preview .fos-links-panel {
  padding: 6px var(--fos-card-pad-x) 10px;
  margin-bottom: var(--fos-section-gap);
}
body.preview .fos-links-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 4px;
  font-size: var(--fos-type-label);
  font-weight: 600;
}
body.preview .fos-links-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
body.preview .fos-link {
  white-space: normal;                 /* a shared list rule sets nowrap; these lines wrap */
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--fos-hair);
}
body.preview .fos-link:last-child {
  border-bottom: 0;
}
body.preview .fos-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--fos-fill);
  color: var(--fos-text);
}
body.preview .fos-link-icon .icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
body.preview .fos-link-title {
  color: var(--fos-text);
  font-size: var(--fos-type-body);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
body.preview .fos-link-title:hover,
body.preview .fos-link-title:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.preview .fos-link-note {
  margin-top: 2px;
  color: var(--fos-text);
  font-size: var(--fos-type-label);
  overflow-wrap: anywhere;
}
body.preview .fos-link-meta {
  margin-top: 4px;
  color: var(--fos-muted);
  font-size: var(--fos-type-context);
}
body.preview .fos-link-pin {
  color: var(--fos-accent);
  font-weight: 600;
}
body.preview .fos-link-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
body.preview .fos-link-actions .icon-btn .icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
body.preview .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (max-width: 700px) {
  body.preview .fos-links-search, body.preview .fos-links-search input { width: 100%; }
  body.preview .fos-links-bar .grow { display: none; }
  body.preview .fos-links-bar .primary { flex: 1 1 100%; }
  /* the category track is one row that scrolls sideways inside itself, never the page */
  body.preview .fos-links-bar .fos-links-cats { flex: 1 1 100%; width: 100%; max-width: 100%; overflow-x: auto; }
  body.preview .fos-links, body.preview .fos-links-bar { min-width: 0; max-width: 100%; }
  body.preview .fos-link { grid-template-columns: 36px minmax(0, 1fr); }
  body.preview .fos-link-actions { grid-column: 2; flex-wrap: wrap; }
  body.preview .fos-links-panel { padding: 4px 14px 8px; }
}

/* Home: keep the card link and its note button as separate keyboard stops. */
body.preview .pv-home-kpis > .kpi > :is(.pv-kpi-open, .pv-kpi-body) {
  display: grid;
  grid-row: 1 / -1;
  grid-template-rows: subgrid;
  row-gap: 6px;
  color: inherit;
  text-decoration: none;
}
body.preview .pv-home-huddle {
  margin-bottom: var(--fos-section-gap);
}
body.preview .pv-home-panel .fos-bar {
  flex-wrap: nowrap;
}
body.preview .pv-see-all {
  margin-left: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: var(--fos-type-label);
  font-weight: 400;
  color: var(--fos-muted);
}

body.preview .pv-home-kpis > .kpi > :is(.pv-kpi-open, .pv-kpi-body) > * {
  grid-column: 1;
  grid-row: auto;
}

body.preview .pv-home-kpis > .kpi {
  position: relative;
}
body.preview .pv-kpi-open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
/* FOS-UI-CLARITY-FOLLOWUP-R3: the cards' open links listed in the How fold are plain links, not card overlays */
body.preview .pv-home-opens .pv-kpi-open::after { content: none; }
body.preview .pv-home-opens { margin-top: 8px; }

/* Client history and the team huddle use the page's existing color tokens. */
body.preview .history-filters { display:flex; gap:12px; flex-wrap:wrap; align-items:end; margin-bottom:16px; }
body.preview .history-filters label { display:flex; flex-direction:column; gap:6px; font-size:13px; }
body.preview .history-filters input, body.preview .history-filters select { min-height:44px; max-width:100%; }
body.preview .history-row { padding:18px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
body.preview .history-row-head { display:grid; grid-template-columns:160px 1fr 2fr 1fr; gap:12px; align-items:baseline; }
body.preview .history-row time, body.preview .history-row-head > span:last-child { font-size:13px; color:var(--muted); }
body.preview .history-row details { margin-top:10px; }
body.preview .history-row summary { cursor:pointer; min-height:44px; display:list-item; padding:10px 0; }
body.preview .history-evidence { padding-left:22px; }
body.preview .history-evidence li { margin:12px 0; }
body.preview .history-paging { display:flex; gap:20px; margin:20px 0; }
body.preview .history-paging a { min-height:44px; padding:10px 0; }
body.preview .history-outcome { margin:4px 0 0; font-size:13px; overflow-wrap:anywhere; }
body.preview .huddle-lists { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
body.preview .huddle-lists h3 { font-size:15px; margin:12px 0; }
body.preview .huddle-lists ul { list-style:none; padding:0; margin:0; }
body.preview .huddle-lists li { padding:12px 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
body.preview .huddle-open { display:flex; flex-direction:column; gap:5px; min-height:44px; }
body.preview .huddle-lists p { margin:6px 0; }
body.preview .huddle-more summary { cursor:pointer; min-height:44px; padding:12px 0; }
@media(max-width:700px){
  body.preview .huddle-lists { grid-template-columns:1fr; gap:12px; }
  body.preview .history-row-head { grid-template-columns:1fr; gap:5px; }
  body.preview .history-filters label { flex:1 1 140px; min-width:0; }
  body.preview .history-filters input { width:100%; min-width:0; }
}
/* R7 task drawer uses the CM drawer, FOS tokens and existing tag picker. */
body.preview .fos-task-overlay { position:fixed; inset:0; display:flex; background:rgba(0,0,0,.28); z-index:1400; }
body.preview .fos-task-overlay[hidden] { display:none; }
body.preview .fos-task-panel { display:flex; flex-direction:column; background:var(--surface); box-shadow:var(--shadow); overflow:hidden; }
body.preview .fos-task-panel .profile-head { flex-shrink:0; border-bottom:1px solid var(--line); }
body.preview .fos-task-panel .profile-body { overflow-y:auto; padding:24px 28px 48px; }
body.preview .fos-task-panel label { display:block; font-size:13px; font-weight:600; margin:16px 0 8px; }
body.preview .fos-task-panel textarea { box-sizing:border-box; width:100%; resize:vertical; margin-bottom:10px; }
body.preview .fos-task-panel .fos-dialog-row { margin-bottom:20px; }
body.preview .fos-task-panel .profile-section { margin-top:28px; padding-top:20px; border-top:1px solid var(--line); }
body.preview .fos-task-comment { padding:14px 0; border-bottom:1px solid var(--line); }
body.preview .fos-task-comment p, body.preview .fos-task-words { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
body.preview .fos-task-panel time { color:var(--muted); font-size:12px; }
body.preview .fos-task-panel ol { padding-left:18px; font-size:13px; line-height:1.8; }
body.preview .fos-tag-pop { z-index:1500; }
@media (max-width:700px) { body.preview .profile.drawer.fos-task-panel { width:100%; height:100dvh; } body.preview .fos-task-panel .profile-body { padding:16px 20px 40px; } }


/* R2: shared reminders, using the dashboard's panels, buttons, badges and segmented control. */
.fos-reminders { max-width: 960px; margin: 0 auto; }
.fos-reminders-bar, .fos-reminder-heading { justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fos-reminder { margin: 14px 0; overflow-wrap: anywhere; }
.fos-reminder h2 { font-size: 17px; margin: 8px 0; }
.fos-reminder .row { gap: 10px; }
.fos-reminder-target { outline: 2px solid var(--green); outline-offset: 3px; }
.fos-reminders-pages { justify-content: flex-end; gap: 10px; margin: 16px 0; }
#reminder-done-dialog { color: var(--text); background: var(--surface); border: 1px solid var(--line); width: min(480px, calc(100vw - 32px)); max-height: 85vh; }
#reminder-done-dialog::backdrop { background: #0006; }
#reminder-done-dialog textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 8px; font: inherit; }
@media (max-width: 600px) {
  .fos-reminders-bar { align-items: flex-start; }
  .fos-reminders .segmented { display: flex; width: 100%; }
  .fos-reminders .segmented button { flex: 1; min-width: 0; }
  .fos-reminder .row { flex-wrap: wrap; }
}
/* W8 clarity (Team clarity check, at most 5 buttons on the first screen): Overdue, Done and Mine sit under the bar's
   More (fos-reminders.js); each reminder shows Done, and its Acknowledge shows on hover, keyboard focus or a tap on the
   reminder (the reminder takes focus on a tap: tabindex -1), as the Team links row actions do. */
.fos-reminders-more { position: relative; display: inline-block; }
.fos-reminders-more > summary { list-style: none; cursor: pointer; }
.fos-reminders-more > summary::-webkit-details-marker { display: none; }
.fos-reminders-more[open] > .fos-reminders-more-list { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; display: flex; flex-direction: column;
  gap: 4px; min-width: 140px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px #0002; }
.fos-reminders-more-list > button { justify-content: flex-start; }
.fos-reminder [data-reminder-ack] { opacity: 0; }
.fos-reminder:hover [data-reminder-ack], .fos-reminder:focus-within [data-reminder-ack] { opacity: 1; }

/* R3 notification controls use the shared shell buttons and segmented tokens. */
.fos-bell-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 16px 12px}
.fos-bell-controls .segmented{margin-right:auto}
.fos-notification-done{flex-shrink:0;align-self:flex-start;margin:10px 8px 0 0}

/* BRIEF FOSROW39 (FOS_MULTI_ACCOUNT): "Spend by client" on Ads and Home, and the role row on a Mapping account.
   Spacing, no divider lines; existing tokens only. */
body.preview .fos-ma-list { list-style: none; margin: 8px 0 0; padding: 0; }
body.preview .fos-ma-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 6px 0; }
body.preview .fos-ma-name { font-weight: 600; min-width: 12em; }
body.preview .fos-ma-unread, body.preview .fos-ma-from { color: var(--fos-muted); }
body.preview .fos-ma-from { font-size: var(--fos-type-label); }
body.preview .fos-ma-more summary { cursor: pointer; margin-top: 4px; color: var(--fos-muted); }
body.preview .fos-ma-role { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
body.preview .fos-ma-role select, body.preview .fos-ma-role input, body.preview .fos-ma-role button { min-height: var(--fos-ctl-h); }
body.preview .fos-ma-why input { width: 12em; max-width: 100%; }
/* ══ ONEVER CM (preview/fos-cm-onever.js): Most urgent day pills, weekly Health rows, Need mapping, Place a client.
   Existing tokens only. ══ */
body.preview .ov-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: var(--fos-type-label, 13px); font-weight: 600; white-space: nowrap; background: var(--fos-fill); color: var(--fos-text); }
body.preview .ov-pill.late { background: var(--red-bg); color: var(--late-text); }
body.preview .ov-pill.warn { color: var(--amber-ink, var(--fos-text)); background: var(--amber-bg, var(--fos-fill)); }
body.preview .ov-pill.ok { color: var(--green-ink, var(--fos-text)); background: var(--green-bg, var(--fos-fill)); }
body.preview .ov-pill.muted { color: var(--fos-muted); }
body.preview .ov-urgent-table td.num, body.preview .ov-weekly td.num, body.preview .ov-map-acts { text-align: right; white-space: nowrap; }
body.preview .ov-weekly { margin-bottom: var(--fos-section-gap, 16px); }
body.preview .ov-map-acts .button { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 8px; text-decoration: none; }
body.preview .ov-place-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
body.preview .fos-todo-from { color: var(--fos-muted); font-size: var(--fos-type-label, 13px); }
/* the To-dos From column (fos-tasks.js): one more track, wide screens only (at 1100px and under the rows wrap as before) */
@media (min-width: 1101px) {
  body.preview .fos-todo-open { grid-template-columns: minmax(0, 1fr) minmax(140px, 220px) 90px 130px 150px; }
  body.preview .fos-todo-cols { grid-template-columns: 30px minmax(0, 1fr) minmax(140px, 220px) 90px 130px 150px; }
}

/* FOS-ONEVER-AICSM (FDR-041, FDR-083): the engine card in the AICSM head and the open draft's action row; tokens only */
body.preview .fos-aicsm-engine {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 18px; border-radius: 999px; background: var(--fos-card); box-shadow: var(--shadow-1);
  color: var(--fos-text); font-size: 14px;
}
body.preview .fos-aicsm-engine .fos-aicsm-run { color: var(--fos-muted); font-size: 13px; }
body.preview .fos-aicsm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fos-muted); }
body.preview .fos-aicsm-engine[data-on="1"] .fos-aicsm-dot { background: var(--good-text); }
body.preview .fos-aicsm-engine[data-stale="1"] .fos-aicsm-dot { background: var(--warn-text); }   /* FOS-W5-AICSM */
body.preview .fos-aicsm-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
body.preview .fos-aicsm-actions p { flex-basis: 100%; margin: 0; }
body.preview .fos-aicsm-btn {
  height: var(--fos-ctl-h); padding: 0 16px; border-radius: var(--fos-seg-radius); font: inherit; font-size: 14px;
  background: var(--fos-card); color: var(--fos-text); border: 1px solid var(--fos-hair);
}
body.preview .fos-aicsm-btn.fos-aicsm-primary { background: var(--fos-text); color: var(--fos-card); border-color: transparent; }
body.preview .fos-aicsm-btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ══ W2 CM2 (preview/fos-cm2.js): the yellow notes, Health chips, Need mapping Missing words, Open Mapping. Tokens only. ══ */
body.preview .cm2-note { margin: 16px 0; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--amber) 10%, var(--fos-card)); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); color: var(--fos-text); font-size: var(--fos-type-body, 14px); }
body.preview .cm2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
body.preview .cm2-chip { min-height: 36px; padding: 6px 14px; border-radius: 999px; background: var(--fos-fill); color: var(--fos-text); font-weight: 600; }
body.preview .cm2-chip.on { background: var(--fos-text); color: var(--fos-bg, #fff); }
body.preview .cm2-chip .cm2-n { font-variant-numeric: tabular-nums; margin-left: 4px; }
body.preview .cm2-h { font-weight: 600; }
body.preview .cm2-h-happy { color: var(--good-text, var(--fos-text)); }
body.preview .cm2-h-neutral { color: var(--amber, var(--fos-text)); }
body.preview .cm2-h-needs-attention { color: var(--late-text, var(--fos-text)); }
body.preview .cm2-missing { color: var(--amber, var(--fos-text)); font-weight: 600; }
body.preview .cm2-open { display: inline-block; margin-top: 16px; }
/* --green-ink is ink ON a green fill (near white in light mode), so ONEVER CM's ok/warn pills read as blank; W2 CM2 gives
   them the text tokens that exist in both themes */
body.preview .ov-pill.ok { color: var(--good-text, var(--fos-text)); background: color-mix(in srgb, var(--good-text) 12%, transparent); }
body.preview .ov-pill.warn { color: var(--amber, var(--fos-text)); background: color-mix(in srgb, var(--amber) 12%, transparent); }
body.preview #ov-weekly:has(.cm2-chips) #ov-not-rated { display: none; }   /* the chip row carries the same count */

/* FOS-W2-AICSM2: list rows readable at a glance; a status in plain coloured words, no pills */
body.preview .fos-aicsm2-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
body.preview .fos-aicsm2-row > div:first-child { min-width: 0; }
body.preview .fos-aicsm2-row .r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
body.preview .fos-aicsm2-good { color: var(--good-text); font-weight: 600; }
body.preview .fos-aicsm2-warn { color: var(--warn-text); font-weight: 600; }
body.preview .fos-aicsm2-bad { color: var(--destructive); font-weight: 600; }
body.preview .fos-aicsm2-muted { color: var(--fos-muted); }
body.preview .fos-aicsm2-counts { margin: 0 22px 12px; color: var(--fos-text); font-size: 14px; }   /* FOS-W5-AICSM scene 62 */
@media (max-width: 600px) { body.preview .fos-aicsm2-row { flex-direction: column; align-items: flex-start; }
  body.preview .fos-aicsm2-row .r { justify-content: flex-start; } }

/* FOS-W7-DR2-AICSM (FDR-042, FDR-053, FDR-082; preview_aicsm_drafts.py): each draft row reads the message's first line
   with its play muted under it; the team's note sits apart from the client message, muted, with no box of its own; a
   draft without an owner is one plain line under the KPI row. Existing tokens only. checks_w7_aicsm.py pins it. */
:root body.preview[data-page="aicsm"] .pv-os2 #s-aicsm .inbox .lst .it .fos-aicsm-first {
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:root body.preview[data-page="aicsm"] .pv-os2 #s-aicsm .inbox .lst .it .fos-aicsm-play {
  color: var(--muted-fg);
  font-size: 12px;
}
:root body.preview[data-page="aicsm"] .pv-os2 #s-aicsm .fos-aicsm-note {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--muted);
  color: var(--muted-fg);
  font-size: 13px;
  line-height: 1.5;
}
:root body.preview[data-page="aicsm"] .pv-os2 #s-aicsm .fos-aicsm-note p {
  margin: 4px 0 0;
}
:root body.preview[data-page="aicsm"] .pv-os2 #s-aicsm .fos-aicsm-copyrow {
  padding: 0 16px 14px;
}
:root body.preview[data-page="aicsm"] .pv-os2 #s-aicsm .fos-aicsm-noowner {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted-fg);
}
:root body.preview[data-page="aicsm"] .pv-os2 #s-aicsm .fos-aicsm-noowner b {
  color: var(--fg);
}
:root body.preview[data-page="aicsm"] .pv-os2 #s-aicsm .rd ul.rules {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--muted-fg);
  font-size: 12px;
}

/* FOS-W8-CLARITY-AICSM (preview_aicsm.py): the action row under the client's name, Skip and Snooze in its More fold;
   the draft filters, the note's tail and the rules behind plain folds. Existing tokens only. */
body.preview .fos-aicsm-actions { margin: 10px 0 14px; }
body.preview .fos-aicsm-more summary,
body.preview .fos-aicsm-filters summary,
body.preview .fos-aicsm-fold summary { cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; color: var(--fos-muted); }
body.preview .fos-aicsm-more[open] > div { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
body.preview .fos-aicsm-more p { color: var(--fos-muted); opacity: 1; }
body.preview .pv-os2 #s-aicsm .card > .fos-aicsm-filters { padding: 0 16px; }   /* the filter strip's own inset */
body.preview .pv-os2 #s-aicsm .card > .fos-aicsm-filters > .fchips { padding: 8px 0 0; border-bottom: 0; }
@media (max-width: 700px) { body.preview .pv-os2 #s-aicsm .card > .fos-aicsm-filters { padding: 0 14px; } }
