/* ---------------------------------------------------------------------------
   Chart kit. The pieces app.js draws figures with: a sparkline, a ring, a
   change arrow, a funnel, and the icon that names a figure in place of a
   caption. Colours come from the tokens, so a brand's accent lands here too.
   --------------------------------------------------------------------------- */

/* A figure's caption: a word or two, quieter than the figure and never on two
   lines. The icon or chart leads; this confirms it. */
.figcap {
  min-width: 0; font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fighead { display: inline-flex; align-items: center; gap: 10px; min-width: 0 }

/* Pipeline by stage: a column per stage, in pipeline order, the count on top
   of its column and the stage and its value under it. No track behind the
   bars, as on every other chart here. The columns share the width, so the
   whole pipeline is always in view rather than scrolling into the panel's
   edge; a long stage name wraps to two lines. */
.stagecols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px }
.stagecol { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center }
.stagecol__n { font-size: 20px; font-weight: var(--weight-strong); letter-spacing: -.02em; line-height: 20px }
.stagecol__track {
  width: 100%; max-width: 56px; height: 208px;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 8px;
}
/* `--frac` is the stage's share of the busiest one; the count above takes 28px. */
.stagecol__bar {
  flex: 0 0 auto; height: calc((100% - 28px) * var(--frac)); border-radius: 10px 10px 3px 3px;
  transform-origin: bottom; animation: stagecol-grow .6s cubic-bezier(.16, 1, .3, 1) both;
}
.stagecol:nth-child(2) .stagecol__bar { animation-delay: .04s }
.stagecol:nth-child(3) .stagecol__bar { animation-delay: .08s }
.stagecol:nth-child(4) .stagecol__bar { animation-delay: .12s }
.stagecol:nth-child(5) .stagecol__bar { animation-delay: .16s }
.stagecol:nth-child(n+6) .stagecol__bar { animation-delay: .2s }
@keyframes stagecol-grow { from { transform: scaleY(0) } to { transform: scaleY(1) } }
@media (prefers-reduced-motion: reduce) { .stagecol__bar { animation: none } }
.stagecol__name {
  width: 100%; font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
  min-height: calc(12.5px * 1.3 * 2);
}
.stagecol__value { font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; margin-top: -4px }
/* Beside a taller panel (Company fit) the columns grow to the panel's full
   height, so the bars stand on its floor rather than leaving space under. */
@media (min-width: 641px) {
  .panel:has(> .stagecols) { display: flex; flex-direction: column }
  .panel > .stagecols { flex: 1 1 auto }
  .stagecol__track { flex: 1 1 auto; height: auto; min-height: 208px }
}
/* On a phone seven columns are too narrow for their names, so each stage
   becomes a row like Pain points': name, a bar with its count, the value. */
@media (max-width: 640px) {
  .stagecols { grid-auto-flow: row; grid-auto-columns: auto; gap: 0 }
  .stagecol {
    display: grid; grid-template-columns: 92px minmax(0, 1fr) 52px; align-items: center; column-gap: 12px;
    padding: 9px 0; border-top: 1px solid var(--hair); text-align: left;
  }
  .stagecol:first-child { border-top: 0; padding-top: 0 }
  .stagecol__track { grid-column: 2; grid-row: 1; max-width: none; height: 20px; flex-direction: row; align-items: center; justify-content: flex-start }
  .stagecol__n { order: 2; font-size: 14px; line-height: 1 }
  .stagecol__bar {
    height: 12px; width: calc((100% - 36px) * var(--frac)); border-radius: var(--r-pill);
    transform-origin: left; animation-name: stagecol-grow-x;
  }
  .stagecol__name { grid-column: 1; grid-row: 1; min-height: 0; font-size: 13px; -webkit-line-clamp: 2 }
  .stagecol__value { grid-column: 3; grid-row: 1; margin: 0; text-align: right }
}
@keyframes stagecol-grow-x { from { transform: scaleX(0) } to { transform: scaleX(1) } }

/* Pain points: a row per pain point split by hairlines, its name, one bar cut
   into Company fit's bands, and how many companies are strong on it. The key
   sits in the heading. No track behind the bars; the bars are the chart. */
/* Short of room, the key drops under the heading rather than squeezing it. */
.panel__head:has(> .painkey) { flex-wrap: wrap; row-gap: 10px }
.panel__head > h3:has(~ .painkey) { white-space: nowrap }
.painkey { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px }
.painkey__item { display: inline-flex; align-items: center; gap: 7px }
.painkey__item i { width: 10px; height: 10px; border-radius: 3px }
.painkey__item .figcap { font-size: 13px; font-weight: var(--weight-strong); color: var(--text) }
.painkey__range { font-size: 12.5px; font-weight: 500; color: var(--muted) }
.painrows { display: flex; flex-direction: column }
.painrow {
  display: grid; grid-template-columns: minmax(140px, 240px) minmax(0, 1fr) 92px;
  align-items: center; column-gap: 20px; padding: 14px 0; border-top: 1px solid var(--hair);
}
.painrow:first-child { border-top: 0; padding-top: 0 }
.painrow__name { font-size: 15px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere }
.painrow__track { display: flex; min-width: 0 }
.painrow__bar { display: flex; gap: 2px; height: 14px; transition: width .6s cubic-bezier(.4, 0, .2, 1) }
.painrow__bar i { flex: 1 1 0; min-width: 4px; border-radius: 3px }
.painrow__bar i:first-child { border-top-left-radius: var(--r-pill); border-bottom-left-radius: var(--r-pill) }
.painrow__bar i:last-child { border-top-right-radius: var(--r-pill); border-bottom-right-radius: var(--r-pill) }
.painrow__n { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap }
.painrow__n b { font-size: 15px; font-weight: var(--weight-strong); color: #23794C; font-variant-numeric: tabular-nums }
@media (max-width: 640px) {
  .painrow { grid-template-columns: minmax(0, 1fr) 76px; row-gap: 8px }
  .painrow__name { grid-column: 1 / -1 }
}

.ring { position: relative; flex: 0 0 auto; display: inline-grid; place-items: center }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg) }
.ring circle { transition: stroke-dasharray .6s cubic-bezier(.4, 0, .2, 1) }
.ring__track { stroke: #EAEAEA }
.ring__mid { position: relative; font-size: 13px; font-weight: var(--weight-strong); letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.ring--onink .ring__track { stroke: color-mix(in srgb, var(--on-ink) 22%, transparent) }

/* Up is good on most figures, so green up and red down. Bounces turn that
   round, and out of office is neither; the arrow is what says which way. */
.delta {
  display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.delta .ms { font-size: 15px }
.delta__vs { margin-left: 2px; color: var(--muted); font-weight: 500 }
.delta--up { color: #23794C }
.delta--down { color: var(--bad) }
.delta--flat, .delta--plain { color: var(--muted) }
.delta--inverse.delta--up { color: var(--bad) }
.delta--inverse.delta--down { color: #23794C }


/* Performance: one panel laid out like This week. Six figures across the top
   that are also the chart's tabs, the picked one underlined in its line's
   colour, then that one figure as a line over the period. */
.perf__body { min-width: 0 }
.pmetrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--hair) }
.pmetric {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  min-width: 0; min-height: 44px; padding: 4px 16px 18px 0;
  border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.pmetric::after {
  content: ""; position: absolute; left: 0; right: 16px; bottom: -1px; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--tone); opacity: 0; transition: opacity .16s ease;
}
.pmetric[aria-pressed="true"]::after { opacity: 1 }
.pmetric:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 8px }
.pmetric__name { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; font-size: 12.5px; font-weight: 500; color: var(--muted) }
.pmetric__name .ms { font-size: 17px; color: var(--tone); flex: 0 0 auto }
.pmetric__name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.pmetric:hover .pmetric__name, .pmetric[aria-pressed="true"] .pmetric__name { color: var(--text) }
/* The change sits under the figure on every tab, so a long one like £3.56m
   never leaves one tab a line taller than the rest. */
.pmetric__fig { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0 }
/* The size of This week's figures, so a key's numbers read alike in both. */
.pmetric__n {
  font-size: 24px; font-weight: var(--weight-strong); letter-spacing: -.02em; line-height: 1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* The chart reuses This week's plot, gridlines and line; what is its own is
   the wash under the line and the readout that follows the pointer. */
.pchart { min-width: 0 }
.pchart [hidden] { display: none }
.pchart__plot { margin: 40px 0 0 52px; cursor: crosshair; touch-action: pan-y }
.pchart__area { opacity: .1 }
.pchart__bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 3px }
.pchart__bars i {
  flex: 1 1 0; min-width: 0; max-width: 48px; margin: 0 auto; border-radius: 5px 5px 1px 1px;
  background: var(--tone); opacity: .8; transform-origin: bottom;
  transition: opacity .12s ease; animation: pchart-grow .45s cubic-bezier(.16, 1, .3, 1) both;
}
.pchart__bars i.is-on { opacity: 1 }
.pchart__plot--bars:hover .pchart__bars i:not(.is-on) { opacity: .45 }
@keyframes pchart-grow { from { transform: scaleY(0) } }
@media (prefers-reduced-motion: reduce) { .pchart__bars i { animation: none } }
.pchart__guide { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text); opacity: .3; pointer-events: none }
.pchart__dot { width: 10px; height: 10px; margin: -5px 0 0 -5px }
.pchart__tip {
  position: absolute; z-index: 1; transform: translate(-50%, calc(-100% - 14px)); pointer-events: none;
  display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px;
  background: var(--ink); color: var(--on-ink); white-space: nowrap; box-shadow: var(--shadow-top);
}
.pchart__tip[data-edge="start"] { transform: translate(-12px, calc(-100% - 14px)) }
.pchart__tip[data-edge="end"] { transform: translate(calc(-100% + 12px), calc(-100% - 14px)) }
.pchart__tip span { font-size: 11.5px; color: color-mix(in srgb, var(--on-ink) 72%, transparent) }
.pchart__tip b { font-size: 15px; font-weight: var(--weight-strong); font-variant-numeric: tabular-nums }
.pchart__axis { position: relative; height: 16px; margin: 14px 0 0 52px; font-size: 12.5px; font-weight: 500; color: var(--muted) }
.pchart__axis span { position: absolute; transform: translateX(-50%); white-space: nowrap }
/* Under a line the end dates align to its ends; under bars each is centred
   on its bar. */
.pchart__axis:not(.pchart__axis--bars) span:first-child { transform: none }
.pchart__axis:not(.pchart__axis--bars) span:last-child { transform: translateX(-100%) }
.pchart__axis span:last-child { font-size: 13px; color: var(--text); font-weight: var(--weight-strong) }
/* Too narrow for six across: three by two, each pick underlined on its own. */
@media (max-width: 1180px) {
  .pmetrics { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; border-bottom: 0 }
  .pmetric::after { bottom: 4px }
}
/* On a phone, two across, so every name fits whole beside its icon. */
@media (max-width: 640px) {
  .pmetrics { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .pmetric { gap: 8px; padding: 4px 8px 16px 0 }
  .pmetric::after { right: 8px }
  .pmetric__name { gap: 5px }
  .pmetric__name .ms { font-size: 15px }
  .pmetric__n { font-size: 20px }
  .pmetric__fig .delta { font-size: 11.5px }
  .pchart__plot { height: 180px; margin: 32px 0 0 44px }
  .pchart__axis { margin-left: 44px }
}

/* By fit score: a large thin ring, centred in whatever height the row gives
   the panel, with the bands as rows under it split by hairlines. */
.panel:has(> .fitring) { display: flex; flex-direction: column }
.fitring { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px }
.fitring__mid { display: flex; flex-direction: column; align-items: center; gap: 4px }
.fitring__mid b { font-size: 30px; font-weight: var(--weight-strong); letter-spacing: -.03em; line-height: 1 }
.fitring__mid .figcap { font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: var(--muted) }
/* One grid for the key, its rows on it as subgrids, so the columns' names
   over the rows line up with every row's figures. */
.fitkey { align-self: stretch; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto minmax(84px, auto); column-gap: 12px }
.fitkey__row, .fitkey__head {
  grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--hair); font-variant-numeric: tabular-nums;
}
.fitkey__row:first-child { border-top: 0 }
.fitkey__head { padding: 0 0 8px; border-top: 0 }
.fitkey__head .figcap { font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: var(--muted); text-align: right }
.fitkey__swatch { width: 10px; height: 10px; border-radius: 3px }
.fitkey__name { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0 }
.fitkey__name .figcap { font-size: 15px; font-weight: 500; color: var(--text) }
.fitkey__range { font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap }
.fitkey__row b { font-size: 15px; font-weight: var(--weight-strong); text-align: right }
.fitkey__value { font-size: 12.5px; font-weight: 500; color: var(--muted); text-align: right; white-space: nowrap }
/* Nobody in the band: kept for its place in the order, but quiet. */
.fitkey__row--none .fitkey__swatch { opacity: .35 }
.fitkey__row--none .fitkey__name .figcap, .fitkey__row--none b { color: var(--muted) }
.fitkey__row--none b { font-weight: 500 }



.stat { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); padding: 22px }
.stat__label { font-size: 12px; color: var(--muted) }
.stat__value { font-size: 30px; font-weight: var(--weight-strong); letter-spacing: -.03em; margin-top: 8px; line-height: 1 }
.stat__foot  { font-size: 12px; color: var(--muted); margin-top: 10px }

/* A status inside a card or row. No tag shape: no fill, no padding, no rounded
   box. A toned status is a dot in its colour and the words in a darker shade
   of it; a neutral one is muted words alone. Where the status carries its own
   icon, the icon takes the colour and the dot is dropped. */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: var(--weight-strong); white-space: nowrap;
  color: var(--muted); --dot: var(--muted);
}
.pill::before {
  content: ""; display: none; flex: 0 0 auto;
  width: 7px; height: 7px; border-radius: 50%; background: var(--dot);
}
:is(.pill--teal, .pill--amber, .pill--coral, .pill--ink, .pill--good, .pill--bad,
    .pill--goodink, .pill--warn, .pill--suggest):not(:has(> .ms))::before { display: block }
.pill .ms { font-size: 15px }
.pill--teal    { color: #04635C; --dot: var(--teal) }
.pill--amber   { color: #6B4A00; --dot: var(--amber) }
.pill--coral   { color: #8A2F1A; --dot: var(--coral) }
.pill--ink     { color: var(--text); --dot: var(--ink) }
/* Going well and over: the two states worth reading from across a room, so
   their words take the full colour rather than a shade of it. */
.pill--good    { color: #1E7A4A; --dot: var(--good) }
.pill--bad     { color: var(--bad); --dot: var(--bad) }
.pill--goodink { color: #1E7A4A; --dot: var(--good) }
.pill--warn    { color: #6B4A00; --dot: var(--amber) }
/* The stage column runs a size up: it is the column the table is scanned by. */
.pill--stage { font-size: 13px }
.pill--sm    { font-size: 11.5px }
/* Candid thinks this company should move and is waiting for a person: the
   dot gets a ring in the "over" red, since the only move it suggests is Lost. */
.pill--suggest::before { margin: 0 2px; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--bad) }

/* ---- Stage pick: a deal's stage, and the menu that moves it --------------
   A compact pill tinted in the stage's colour (--stage-hue, the Pipeline
   board's hue for it), holding a dot of that colour, the stage's name in a
   darker shade of it and a chevron. Its menu (.stagemenu) hangs from the
   pill: each stage a row with its own dot, the current one ticked, then
   Lost's reasons under a Lost heading. */
.stagepick { --stage-hue: var(--ink); display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto }
.stagepick__btn {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; height: 34px;
  padding: 0 10px 0 12px; border: 1px solid color-mix(in srgb, var(--stage-hue) 22%, transparent);
  border-radius: var(--r-btn); background: color-mix(in srgb, var(--stage-hue) 14%, var(--card));
  color: color-mix(in srgb, var(--stage-hue) 70%, var(--ink)); font: inherit; font-size: 13px; font-weight: 600;
  white-space: nowrap; cursor: pointer; transition: background .16s ease, border-color .16s ease;
}
.stagepick__btn > span { overflow: hidden; text-overflow: ellipsis }
.stagepick__btn:hover:not(:disabled), .stagepick__btn[aria-expanded="true"] {
  background: color-mix(in srgb, var(--stage-hue) 22%, var(--card)); border-color: color-mix(in srgb, var(--stage-hue) 38%, transparent);
}
.stagepick__btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px }
.stagepick__btn:disabled { cursor: default; padding-right: 12px }
.stagepick__dot.ms { font-size: 10px; color: var(--stage-hue); font-variation-settings: 'FILL' 1; flex: 0 0 auto }
.stagepick.is-none .stagepick__dot.ms { font-variation-settings: 'FILL' 0; color: var(--muted) }
.stagepick__chev.ms { font-size: 18px; margin-left: -1px; opacity: .75; transition: transform .16s ease }
.stagepick__btn[aria-expanded="true"] .stagepick__chev { transform: rotate(180deg) }
/* The pill stays compact to the eye; a finger still gets 44px. */
@media (pointer: coarse) { .stagepick__btn { height: 44px; padding-inline: 14px 12px } }

/* The menu hangs from the pill: under it, right edges together (the pill sits
   at the row's right end), or over it with .is-up. The card holding it sits
   over the cards after it, which would otherwise paint across the menu. */
.stagepick__anchor { position: relative; display: inline-flex; min-width: 0; max-width: 100% }
.card:has(.stagemenu) { position: relative; z-index: 7 }
.stagemenu {
  position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; min-width: 220px; overflow-y: auto;
  padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-top); animation: whyOpen .14s ease-out both;
}
.stagemenu.is-up { top: auto; bottom: calc(100% + 6px) }
/* On a phone the stage starts its line, so the menu opens from its left. */
@media (max-width: 479px) { .stagemenu { right: auto; left: 0 } }
.stagemenu__item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 9px;
  background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; text-align: left;
}
.stagemenu__item .stagepick__dot.ms { font-size: 11px }
.stagemenu__item:hover, .stagemenu__item:focus-visible { background: color-mix(in srgb, var(--stage-hue) 11%, var(--card)); outline: none }
.stagemenu__item[aria-checked="true"] { color: color-mix(in srgb, var(--stage-hue) 70%, var(--ink)) }
.stagemenu__tick.ms { margin-left: auto; font-size: 18px }
.stagemenu__rule { height: 1px; margin: 5px 4px; background: var(--hair) }
.stagemenu__head { padding: 6px 10px 4px; font-size: 12.5px; font-weight: 500; color: var(--muted) }
@media (pointer: coarse) { .stagemenu__item { height: 44px } }
@media (prefers-reduced-motion: reduce) { .stagemenu { animation: none } .stagepick__chev.ms { transition: none } }

/* A phone has no room for it all on one line: the name and value keep
   theirs, and the stage and owner take the line under them, stage at the
   start and owner at the end (the ::after is the line break). */
@media (max-width: 479px) {
  :is(.dealrow__top, .dealitem__top):has(> .stagepick) { flex-wrap: wrap; row-gap: 12px }
  :is(.dealrow__top, .dealitem__top):has(> .stagepick)::after { content: ""; order: 2; flex-basis: 100% }
  :is(.dealrow__value, .dealitem__value) { order: 1 }
  :is(.dealrow__top, .dealitem__top) > .stagepick { order: 3 }
  .dealrow__owner { order: 4; margin-left: auto }
  .dealrow__value { padding-left: 0; border-left: 0 }
}

/* Overview's deals: the client row, then a deal per row, each its name and
   value over its own track. Rows split by a hairline, as the Deals tab's. */
.dealboard { display: flex; flex-direction: column; gap: 18px }
.dealboard__head { display: flex; align-items: center; gap: 8px; margin-bottom: -4px }
.dealboard .cust { border-top: 0; padding-top: 0 }
.dealboard .cust + .dealrow, .dealrow + .dealrow { border-top: 1px solid var(--hair); padding-top: 16px }
.dealrow { display: flex; flex-direction: column; gap: 10px; min-width: 0 }
.dealrow__top { display: flex; align-items: center; gap: 14px; min-width: 0 }
/* Its padding gives the name a tap target the height of a control, taken
   back by the margin so the row keeps its line. */
.dealrow__name {
  flex: 1 1 auto; min-width: 0; padding: 8px 0; margin: -8px 0; border: 0; background: none; font: inherit; font-size: 15px;
  font-weight: var(--weight-strong); color: var(--text); cursor: pointer; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dealrow__name:hover { color: var(--coral) }
.dealrow__name:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px }
.dealrow__value {
  flex: 0 0 auto; min-width: 64px; padding-left: 14px; border-left: 1px solid var(--hair);
  font-size: 17px; font-weight: var(--weight-strong); line-height: 28px; text-align: right;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.dealrow__value.is-none { color: var(--muted) }
/* Who owns the deal: a pill the stage pill's twin in size, shape and type,
   in neutral grey rather than a stage's colour, holding their face and first
   name. It is read, not pressed, so it has no chevron. With nobody on it, a
   dashed empty face and the words, faded. */
.dealrow__owner {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 5px;
  border: 1px solid var(--hair); border-radius: var(--r-pill); background: var(--page);
  font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.dealrow__face.avatar { width: 24px; height: 24px; flex: 0 0 24px; font-size: 10px; cursor: default }
.dealrow__owner.is-none { color: var(--muted) }
.dealrow__owner.is-none .dealrow__face {
  width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; font-size: 14px;
  border-radius: var(--r-pill); border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent);
}
@media (pointer: coarse) { .dealrow__owner { height: 44px; padding-left: 10px } }
.cust__fig--client b { display: inline-flex; align-items: center; gap: 6px }
.cust__fig--client .ms { font-size: 20px; color: var(--good); font-variation-settings: 'FILL' 1 }

.dealnote__go:disabled, .thread__dealbtn:disabled { cursor: default; color: inherit }
/* The reasons a deal is lost to, as the pipeline board asks for them. */
@keyframes whyOpen { from { opacity: 0; transform: translateY(-4px) } }
.stagetrack__reason {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  border: 0; border-radius: 10px; background: none; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
}
.stagetrack__reason:is(:hover, :focus-visible, .is-on) { outline: none; background: color-mix(in srgb, var(--bad) 10%, var(--card)); color: var(--bad) }
.stagetrack__tick { margin-left: auto; font-size: 18px }
/* Edit info: one card, two headed sections split by a hairline. The deal's
   two short fields share a row; a mark inside the field's edge says what it
   holds. */
.editinfo__head { font-size: 14px; font-weight: var(--weight-strong); color: var(--text); margin: 0 0 14px }
.editinfo__head:not(:first-child) { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--hair) }
.editinfo__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.editinfo__pair > .field + .field { margin-top: 0 }
.editinfo__pair + .field { margin-top: 16px }
.editinfo__affix { position: relative }
.editinfo__affix .input { padding-left: 38px }
.editinfo__mark {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  display: inline-flex; color: var(--muted); font-size: 13.5px; pointer-events: none;
}
.editinfo__mark svg { width: 16px; height: 16px }
/* The browser's own date field, brought into line with the other inputs: an
   empty one reads as a placeholder, and its calendar mark is muted. */
.editinfo__pair input[type="date"].is-empty { color: var(--muted) }
.editinfo__pair input[type="date"]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer }
@media (max-width: 479px) { .editinfo__pair { grid-template-columns: 1fr } .editinfo__pair > .field + .field { margin-top: 16px } }

.tablewrap { overflow-x: auto }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px }
table.tbl th {
  text-align: left; font-size: 11.5px; font-weight: var(--weight-strong); color: var(--muted);
  padding: 14px 24px; border-bottom: 1px solid var(--hair); white-space: nowrap;
}
table.tbl td { padding: 15px 24px; border-bottom: 1px solid var(--hair); vertical-align: middle }
table.tbl tbody tr:last-child td { border-bottom: none }
table.tbl tbody tr { cursor: pointer; transition: background .14s ease }
table.tbl tbody tr:hover { background: var(--page) }

.empty { text-align: center; padding: 64px 24px; color: var(--muted) }
.empty > .ms { font-size: 34px; color: #C4C4C4; display: block; margin-bottom: 14px }
.empty h3 { margin: 0 0 6px; font-size: 16px; font-weight: var(--weight-strong); color: var(--text) }
.empty p { margin: 0 auto; font-size: 13.5px; max-width: 420px; line-height: 1.6 }

.banner {
  display: flex; align-items: flex-start; gap: 14px;
  border-radius: var(--r-card); padding: 20px;
  font-size: 13.5px; line-height: 1.6;
}
.banner--amber { background: rgba(255, 179, 0, .14); color: #4A3600 }
.banner--teal  { background: color-mix(in srgb, var(--teal) 14%, transparent); color: #04524C }
.banner--coral { background: rgba(255, 145, 121, .16); color: #7A2A17 }
.banner .ms { font-size: 20px; flex: 0 0 auto; margin-top: 1px }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--on-ink);
  /* Half a one-line toast's height: a pill on one line, a soft corner rather
     than a bubble when a long message wraps to two. */
  padding: 7px 7px 7px 8px; border-radius: 21px;
  font-size: 13.5px; font-weight: 500; line-height: 1.4;
  z-index: 90; animation: cdToastRise .3s cubic-bezier(.22, 1, .36, 1) both;
  max-width: min(520px, calc(var(--vw) - 32px));
}
/* The kind, in a disc of its own colour: the accent for done, red for a
   problem. Both carry their own fill, so they read on any brand's main colour. */
.toast__mark {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--teal); color: var(--on-teal);
}
.toast__mark .ms { font-size: 18px; font-weight: 700 }
.toast--bad .toast__mark { background: var(--bad); color: #FFF }
.toast__msg { flex: 1 1 auto; min-width: 0; padding: 4px 0 }
/* 32px to look at, 44px to hit: the pseudo-element widens the target without
   widening the toast. */
.toast__x {
  position: relative; flex: 0 0 auto; display: grid; place-items: center;
  width: 32px; height: 32px; border: 0; border-radius: 50%; padding: 0;
  background: transparent; color: inherit; opacity: .62; cursor: pointer;
  transition: opacity .15s ease, background-color .15s ease;
}
.toast__x::before { content: ""; position: absolute; inset: -6px }
.toast__x:hover { opacity: 1; background: color-mix(in srgb, var(--on-ink) 12%, transparent) }
.toast__x:focus-visible { opacity: 1; outline: 2px solid var(--teal); outline-offset: 1px }
.toast__x .ms { font-size: 18px }
/* Its one action (Undo): a quiet button in the toast's own colours, an
   icon before its word, on the rounded-rectangle control corner. */
.toast__act {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 10px;
  border: 0; border-radius: var(--r-btn-sm); background: color-mix(in srgb, var(--on-ink) 12%, transparent);
  color: inherit; font: inherit; font-weight: var(--weight-strong); cursor: pointer;
  transition: background-color .15s ease;
}
.toast__act:hover { background: color-mix(in srgb, var(--on-ink) 22%, transparent) }
.toast__act:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px }
.toast__act .ms { font-size: 16px }
/* Leaving is quicker than arriving: it is out of the way, not a second event. */
.toast--out { animation: cdToastFall .16s ease-in both }
/* The same trap the modal hits below, and this one was live: cdRise ends on
   `transform: none`, and `both` holds that for the four seconds the toast is
   up — so the translate that centres it was thrown away the moment the
   animation finished, and every toast sat with its left edge on the middle of
   the screen, running off the right. Each frame carries the centring itself.
   The declaration above still matters: reduced motion drops the animation,
   and then it is the only thing centring this. */
@keyframes cdToastRise {
  from { opacity: 0; transform: translate(-50%, 8px) }
  to   { opacity: 1; transform: translate(-50%, 0) }
}
@keyframes cdToastFall {
  from { opacity: 1; transform: translate(-50%, 0) }
  to   { opacity: 0; transform: translate(-50%, 6px) }
}
