/* src/styles/pages.css: the Case Leverage brand surfaces, the Overview funnel
 * panel, and the Calls, Pipeline and Leads pages. Owned by the ui stage. Built
 * only from tokens.css variables and the existing panel, toggle and KPI
 * classes, so nothing here changes another page.
 *
 * C37: these rules wear the reference dashboard's system, not a brand skin.
 * Panels keep .wow-panel's own padding, radius and hairline; tables use
 * .wow-table's type scale and cell padding; stat tiles use .cc-kpi's gradient,
 * radius and type; accents are --accent (periwinkle) and the chart marks use
 * the same accent to accent-2 gradient the reference bars use. The only Case
 * Leverage colour is --accent-fill on primary buttons, in the block below.
 *
 * PHONE WIDTH IS THE DESIGN TARGET (390px). The rules that keep it true:
 *   - every page is a column of panels and every panel is min-width: 0, so no
 *     child can push the page wider than the screen
 *   - every table lives inside .cl-scroll (or the By Firm table's own
 *     .wow-scroll), which scrolls sideways by itself; the first column is
 *     sticky so a row keeps its name while it scrolls
 *   - chips scroll sideways inside their own row
 *   - the date presets wrap instead of overflowing
 */

/* ------------------------------------------------- Case Leverage brand surfaces */

/* Primary buttons: Electric Blue fill, white text. The one place the brand colour appears. */
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--accent-fill), var(--accent-fill-2));
  box-shadow: 0 6px 18px -6px rgba(37, 99, 235, 0.55);
}

/* The Case Leverage wordmark on the sign-in and state cards (white and blue artwork, on the dark card). */
.auth-wordmark {
  display: block;
  height: 36px;
  width: auto;
  flex: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------- page */

.cl-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding-bottom: 24px;
}

.cl-page > * {
  min-width: 0;
}

.range-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* The preset toggle is an inline-flex row of six buttons; on a narrow screen
   it wraps rather than running off the edge (this also fixes the Ads page). */
.toggle {
  flex-wrap: wrap;
  max-width: 100%;
}

/* The KPI strip's row break: a full-width, zero-height flex item between two rows of cards. */
.cc-kpi-break {
  flex: 0 0 100%;
  height: 0;
  margin-top: -12px; /* the row gap above and below it would otherwise add up to 24px */
}

/* ------------------------------------------------------------- panels */

/* .wow-panel supplies the padding, radius, gradient and hairline; this only lets a panel shrink. */
.cl-panel {
  min-width: 0;
}

.cl-panel .panel-head {
  flex-wrap: wrap;
  gap: 8px 16px;
}

.cl-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -6px;
}

.cl-foot {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-faint);
  padding: 10px 2px 6px;
}

.cl-faint {
  color: var(--text-faint);
  font-weight: 400;
}

.cl-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 550;
}

.cl-link:hover {
  text-decoration: underline;
}

.cl-badge {
  align-self: flex-start;
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
}

/* ------------------------------------------------------------- tables */

/* The same table as .wow-table: 13px cells, 11.5px dim headers, 14px side padding, hairline rules. */
.cl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cl-table th {
  text-align: right;
  font-weight: 550;
  font-size: 11.5px;
  color: var(--text-dim);
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline-strong);
  white-space: nowrap;
}

.cl-table td {
  text-align: right;
  padding: 13px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

.cl-table tbody tr {
  transition: background 0.15s;
}

.cl-table tbody tr:last-child td {
  border-bottom: 0;
}

.cl-table tbody tr:hover td {
  background: #ffffff06;
}

.cl-table th.sticky-col,
.cl-table td.sticky-col {
  position: sticky;
  left: 0;
  text-align: left;
  background: var(--table-frozen-bg);
  z-index: 1;
}

.cl-table th.sticky-col {
  z-index: 2;
}

.cl-table tbody tr:hover td.sticky-col {
  background: var(--table-frozen-bg-hover);
}

.cl-table.cl-left th,
.cl-table.cl-left td {
  text-align: left;
}

.cl-table td.pos,
.cl-table th.pos {
  color: var(--pos);
}

.cl-table td.neg,
.cl-table th.neg {
  color: var(--neg);
}

.cl-table td.strong {
  font-weight: 700;
}

.cl-table tr.grand td {
  border-top: 1px solid var(--hairline-strong);
  font-weight: 700;
}

/* The rep board: a label column, then the team, then a column per rep. */
.cl-board td.sticky-col {
  white-space: normal;
  min-width: 128px;
  max-width: 168px;
  line-height: 1.25;
}

.cl-board th:not(.sticky-col),
.cl-board td:not(.sticky-col) {
  min-width: 88px;
}

.cl-board th.team,
.cl-board td.team {
  background: rgba(109, 139, 255, 0.07);
}

.cl-board td.best {
  color: var(--pos);
  font-weight: 700;
}

/* ---------------------------------------------------------- KPI extras */

/* A stat tile is a .cc-kpi card: same gradient, hairline, radius, padding and type scale. */
.cl-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 12px;
  padding-bottom: 10px;
}

.cl-stat {
  background: linear-gradient(180deg, #ffffff08, #ffffff02);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: inset 0 1px #ffffff0a;
}

.cl-stat-label {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.cl-stat-val {
  font-size: 27px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* ------------------------------------------------------ dials by day */

.cl-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
}

.cl-bar {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
}

.cl-bar-dials,
.cl-bar-pickups {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 3px 3px 0 0;
}

.cl-bar-dials {
  background: rgba(109, 139, 255, 0.28);
}

.cl-bar-pickups {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  z-index: 1;
}

.cl-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 6px;
  padding-bottom: 6px;
}

/* ---------------------------------------------------------- pipeline */

.cl-stage-name {
  display: block;
  font-weight: 600;
}

.cl-meter {
  display: block;
  height: 4px;
  min-width: 96px;
  margin-top: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
}

.cl-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
}

.cl-meter.wide {
  height: 6px;
}

.cl-final td {
  color: var(--text-faint);
}

.cl-wk {
  width: 132px;
}

.cl-wk-bar {
  display: flex;
  height: 8px;
  width: 120px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.cl-wk-bar span {
  display: block;
  height: 100%;
}

.cl-wk-bar .won {
  background: var(--pos);
}

.cl-wk-bar .lost {
  background: var(--neg);
}

.cl-reasons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 10px;
}

.cl-reason-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 5px;
}

/* ------------------------------------------------------------- leads */

.ld-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* On a phone the chips are one row that scrolls sideways, without a scrollbar. */
@media (max-width: 640px) {
  .ld-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .ld-chips::-webkit-scrollbar {
    display: none;
  }
}

/* The day list scrolls inside itself so the lead list under it stays in reach. */
.cl-days-scroll {
  max-height: 420px;
  overflow: auto;
}

.cl-days-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--table-frozen-bg);
}

.cl-days-scroll thead th.sticky-col {
  z-index: 4;
}

.ld-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.ld-chip:hover {
  color: var(--text);
  border-color: var(--hairline-strong);
}

/* The selected chip is a selected .toggle button: the same periwinkle wash and glow. */
.ld-chip.active {
  color: #fff;
  background: linear-gradient(180deg, #6d8bff47, #6d8bff24);
  border-color: rgba(109, 139, 255, 0.45);
  box-shadow: inset 0 1px #ffffff24, 0 4px 14px -6px var(--accent-glow);
}

.ld-chip-n {
  color: var(--text-faint);
}

.ld-chip.active .ld-chip-n {
  color: var(--text-dim);
}

.cl-cell {
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: none;
  border: 0;
  border-bottom: 1px dotted var(--hairline-strong);
  border-radius: 0;
  padding: 2px 4px;
  cursor: pointer;
}

.cl-cell:hover {
  color: var(--accent);
}

.cl-cell.active {
  color: #fff;
  background: rgba(109, 139, 255, 0.25);
  border-bottom-color: transparent;
  border-radius: 5px;
}

.cl-zero {
  color: var(--text-faint);
}

.cl-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
}

.cl-pill.open {
  color: var(--accent);
  background: rgba(109, 139, 255, 0.14);
}

.cl-pill.won {
  color: var(--pos);
  background: rgba(55, 224, 166, 0.12);
}

.cl-pill.lost {
  color: var(--neg);
  background: rgba(255, 107, 125, 0.12);
}

.cl-pill.abandoned {
  color: var(--text-faint);
}

/* --------------------------------------------------- funnel panel (Overview) */

.fr-panel {
  min-width: 0;
}

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

.fr-side-list {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.fr-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.fr-label {
  font-size: 13px;
  font-weight: 600;
}

.fr-val {
  font-size: 16px;
  font-weight: 700;
}

.fr-bar {
  height: 8px;
  margin-top: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

.fr-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
}

.fr-bar-fill.side {
  background: linear-gradient(90deg, rgba(255, 107, 125, 0.6), rgba(255, 107, 125, 0.3));
}

.fr-bar-fill.muted {
  background: rgba(154, 163, 178, 0.5);
}

.fr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-faint);
}

.fr-foot {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-faint);
  padding: 14px 2px 4px;
}

/* --------------------------------------------------------- narrow screens */

@media (max-width: 440px) {
  .cl-panel,
  .fr-panel {
    padding: 18px 14px 10px;
  }

  .cl-table th {
    padding: 8px 7px;
  }

  .cl-table td {
    padding: 9px 7px;
  }

  .toggle button {
    padding: 6px 10px;
  }

  .cl-stat {
    padding: 11px 13px;
    border-radius: 14px;
  }

  .cl-stat-val {
    font-size: 22px;
    margin-top: 4px;
  }

  /* Tighter KPI tiles, so the Ads page's fifteen do not fill two screens. */
  .cc-kpis {
    gap: 8px;
  }

  .cc-kpi {
    padding: 11px 13px;
    border-radius: 14px;
  }

  .cc-kpi-val {
    font-size: 22px;
    margin-top: 4px;
  }

  .cc-kpi-break {
    margin-top: -8px;
  }

  /* The Ads table's frozen name column keeps to a third of the screen, so the numbers beside it stay in view. */
  .ads-table td.ads-sticky {
    max-width: 150px;
  }

  .ads-table td.ads-name > span:last-child {
    display: inline-block;
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cl-board td.sticky-col {
    min-width: 112px;
    max-width: 132px;
  }

  .cl-board th:not(.sticky-col),
  .cl-board td:not(.sticky-col) {
    min-width: 76px;
  }
}

/* ------------------------------------------------- pipeline stage figures */

.cl-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.cl-input-block {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--card);
  min-width: 0;
}

.cl-input-stage {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.cl-input-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cl-input-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12.5px;
}

.cl-input-row dt {
  color: var(--text-dim);
  min-width: 0;
}

.cl-input-row dd {
  text-align: right;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------ call rows */

.cl-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.cl-select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  max-width: 100%;
}

.cl-rec {
  white-space: nowrap;
}

/* The Play button and the inline audio player of a call row (migration 012). The audio element is the browser's own
 * control, drawn dark so it does not flash a light bar on the dark table. */
.cl-play {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  padding: 3px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
}

.cl-play:hover {
  border-color: var(--accent);
}

.cl-audio {
  display: block;
  width: 260px;
  max-width: 100%;
  height: 32px;
  vertical-align: middle;
  color-scheme: dark;
}

.cl-rec-error {
  white-space: normal;
  color: var(--neg);
  font-size: 12.5px;
}

.cl-lead-calls td {
  background: var(--card);
}

.cl-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
}

.cl-score {
  white-space: nowrap;
}

button.cl-bar {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.cl-bar.active {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

/* The My Accident Plan badge in the Leads list: about 20 px on a light chip, so the dark badge ring reads on the dark table. */
.cl-src {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 999px;
  background: #f4f6fb;
  vertical-align: middle;
  flex: none;
}

.cl-src img {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
}

/* ------------------------------------------------------ call intelligence (P7) */

/* A rep's dispositions collapsed to Reached / Not reached / Lost: one bar, the breakdown on hover. */
.cl-mix-cell {
  display: inline-block;
  min-width: 120px;
  vertical-align: middle;
}

.cl-mix {
  display: flex;
  height: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

.cl-mix-seg {
  display: block;
  height: 100%;
}

.cl-mix-seg.reached {
  background: var(--accent);
}

.cl-mix-seg.notReached {
  background: rgba(255, 255, 255, 0.22);
}

.cl-mix-seg.lost {
  background: var(--neg);
}

.cl-mix-seg.other {
  background: var(--text-faint);
}

.cl-mix-n {
  display: block;
  margin-top: 5px;
  font-size: 11px;
}

/* A call's disposition: the pill, how sure call intelligence was, and the override badge. */
.cl-disp {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.cl-disp-cell {
  white-space: normal;
  min-width: 200px;
}

.cl-conf {
  font-size: 11.5px;
}

.cl-ai-over {
  font-size: 11px;
  padding: 2px 9px;
  white-space: nowrap;
}

/* The line under a lead's call: the two-line summary, the next step, the sheet. It stays in view while the table scrolls sideways. */
.cl-intel-row td {
  padding-top: 0;
  white-space: normal;
}

.cl-intel-detail {
  position: sticky;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(100%, 520px);
  max-width: calc(100vw - 96px);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
  white-space: normal;
}

.cl-intel-lines {
  color: var(--text);
}

.cl-intel-note strong {
  color: var(--text-dim);
  font-weight: 600;
}

/* ------------------------------------------------------- Case Check (P18) */

/* Two columns on a desktop (questions left, result right and sticky), one column on a phone. */
.cck-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.cck-left,
.cck-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.cck-right .cck-result {
  position: sticky;
  top: 16px;
}

.cck-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.cck-topline-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cck-intro,
.cck-count {
  font-size: 12.5px;
  color: var(--text-dim);
}

.cck-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}

.cck-q:first-of-type {
  border-top: 0;
}

.cck-q-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text);
}

.cck-q-hint {
  font-size: 11.5px;
  color: var(--text-faint);
}

.cck-tri {
  flex: none;
  flex-wrap: nowrap;
}

.cck-tri button {
  min-width: 46px;
  min-height: 36px;
}

.cck-tri button.cck-yes.active {
  color: var(--pos);
}

.cck-tri button.cck-no.active {
  color: var(--neg);
}

.cck-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0;
}

.cck-note-label {
  font-size: 12px;
  color: var(--text-dim);
}

.cck-note-input {
  width: 100%;
  resize: vertical;
  min-height: 52px;
}

.cck-level {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 4px 0 12px;
}

.cck-level.lvl-0 { color: var(--neg); }
.cck-level.lvl-1 { color: #ff9a6b; }
.cck-level.lvl-2 { color: #f3cf5d; }
.cck-level.lvl-3 { color: var(--accent); }
.cck-level.lvl-4 { color: var(--pos); }

.cck-meter {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.cck-seg {
  height: 8px;
  border-radius: 4px;
  background: var(--hairline-strong);
}

.cck-meter.lvl-0 .cck-seg.on { background: var(--neg); }
.cck-meter.lvl-1 .cck-seg.on { background: #ff9a6b; }
.cck-meter.lvl-2 .cck-seg.on { background: #f3cf5d; }
.cck-meter.lvl-3 .cck-seg.on { background: var(--accent); }
.cck-meter.lvl-4 .cck-seg.on { background: var(--pos); }

.cck-points {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

.cck-block {
  margin-top: 16px;
}

.cck-block-title {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}

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

.cck-reasons,
.cck-flags,
.cck-next,
.cck-ai-lines {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.cck-reasons li {
  display: flex;
  gap: 10px;
}

.cck-effect {
  flex: none;
  min-width: 44px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cck-reasons li.pos .cck-effect { color: var(--pos); }
.cck-reasons li.neg .cck-effect { color: var(--neg); }
.cck-flags li { color: var(--neg); }

.cck-next {
  counter-reset: cckn;
}

.cck-next li {
  counter-increment: cckn;
}

.cck-next li::before {
  content: counter(cckn) ". ";
  color: var(--text-faint);
}

.cck-ai {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.cck-ai-note,
.cck-ai-cost {
  font-size: 11.5px;
  color: var(--text-faint);
}

.cck-ai-error {
  font-size: 12.5px;
  color: var(--neg);
}

.cck-ai-box {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  background: var(--card);
}

.cck-ai-lines li::before {
  content: "- ";
  color: var(--text-faint);
}

@media (max-width: 860px) {
  .cck-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* On a phone the result comes first, so the level is on screen while the answers are tapped. */
  .cck-right {
    order: -1;
  }

  .cck-right .cck-result {
    position: static;
  }
}

@media (max-width: 440px) {
  .cck-q {
    flex-direction: column;
    align-items: flex-start;
  }

  .cck-tri {
    width: 100%;
  }

  .cck-tri button {
    flex: 1;
  }

  .cck-level {
    font-size: 28px;
  }
}

/* p19.css: Initiatives (cards, measure block, form, banner) and the MIND month pacing table. P19, C57. */

/* ---- Initiatives ------------------------------------------------------------------------------ */
.ini-panel { padding-bottom: 16px }
.ini-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end }
.ini-chips { display: flex; gap: 6px; flex-wrap: wrap }
.ini-chip {
    font: inherit; font-size: 12px; font-weight: 550; color: var(--text-dim); background: transparent;
    border: 1px solid var(--hairline); border-radius: 999px; padding: 5px 12px; cursor: pointer
}
.ini-chip:hover { color: var(--text) }
.ini-chip.on { color: var(--c, var(--text)); border-color: var(--c, var(--hairline-strong)); background: var(--card-hover) }
.ini-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 0 }
.ini-card {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 18px; padding: 16px 18px;
    border: 1px solid var(--hairline); border-radius: 14px; background: var(--card)
}
.ini-card.ini-success { border-color: #37e0a666; background: #37e0a60d }
.ini-card.ini-failure { border-color: #ff6b7d66; background: #ff6b7d0d }
.ini-card.ini-unclear { border-color: #ffb45466; background: #ffb4540d }
.ini-card.ini-killed { border-color: var(--hairline-strong); background: #8b93a710; opacity: .85 }
.ini-label, .ini-field-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 4px }
.ini-desc { font-size: 14px; line-height: 1.5; color: var(--text) }
.ini-link { font-size: 12px; color: var(--accent); margin-left: 6px }
.ini-meta { font-size: 12px; color: var(--text-faint); margin-top: 6px }
.ini-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; line-height: 1.45 }
.ini-sub b { color: var(--text) }
.ini-cd { color: var(--text-dim) }
.ini-due { color: #ffb454; font-weight: 600 }
.ini-kill b { color: #ff6b7d }
.ini-signoff { font-size: 11.5px; color: var(--text-faint); margin-top: 6px }
.ini-side-col { display: flex; flex-direction: column; align-items: flex-end; gap: 10px }
.ini-badge { font-size: 12px; font-weight: 650; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--hairline-strong) }
.ini-badge-success { color: #37e0a6; border-color: #37e0a666 }
.ini-badge-failure { color: #ff6b7d; border-color: #ff6b7d66 }
.ini-badge-unclear { color: #ffb454; border-color: #ffb45466 }
.ini-badge-killed { color: #8b93a7 }
.ini-badge-in_progress { color: #6d8bff; border-color: #6d8bff66 }
.ini-lock { display: flex; flex-direction: column; align-items: flex-end; gap: 2px }
.ini-cdchip { font-size: 12.5px; font-weight: 650; color: var(--text); padding: 4px 12px; border: 1px dashed var(--hairline-strong); border-radius: 999px }
.ini-locknote { font-size: 11px; color: var(--text-faint) }
.ini-pick { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end }
.ini-pill {
    font: inherit; font-size: 12px; font-weight: 600; color: var(--c, var(--text-dim)); background: transparent;
    border: 1px solid var(--c, var(--hairline-strong)); border-radius: 999px; padding: 5px 12px; cursor: pointer
}
.ini-pill:hover:not(:disabled) { background: var(--card-hover) }
.ini-pill:disabled { opacity: .5; cursor: default }
.ini-manage-panel { grid-column: 1 / -1; border-top: 1px solid var(--hairline); padding-top: 12px; display: flex; flex-direction: column; gap: 10px }
.ini-revise { display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.ini-actions { display: flex; gap: 8px; flex-wrap: wrap }
.ini-danger { font: inherit; font-size: 12.5px; color: #ff6b7d; background: transparent; border: 1px solid #ff6b7d66; border-radius: 9px; padding: 6px 12px; cursor: pointer }
.ini-danger:disabled { opacity: .5 }
.ini-textarea { width: 100%; resize: vertical }
.ini-more { padding: 12px 16px 0 }

/* the measure block */
.ini-measure { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 12px; background: #0000002e }
.ini-measure-title { font-size: 12px; color: var(--text-dim); margin-bottom: 10px }
.ini-measure-title b { color: var(--text) }
.ini-sides { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center }
.ini-side-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint) }
.ini-side-rate { font-size: 22px; font-weight: 650; letter-spacing: -.02em }
.ini-side-counts { font-size: 12px; color: var(--text-dim) }
.ini-side-days { font-size: 11px; color: var(--text-faint); margin-top: 2px }
.ini-arrow { font-size: 11px; color: var(--text-faint) }
.ini-change { font-size: 12.5px; color: var(--text-dim); margin-top: 10px }
.ini-verdict { font-size: 13px; font-weight: 600; margin-top: 8px; color: var(--text-dim) }
.ini-verdict-pos { color: var(--pos) }
.ini-verdict-neg { color: var(--neg) }
.ini-measure-none .ini-verdict { margin-top: 0; font-weight: 500 }

/* the form */
.ini-formwrap { padding: 0 16px 12px }
.ini-formcard { padding: 18px; border: 1px solid var(--hairline-strong); border-radius: 14px; background: var(--bg-elev) }
.ini-form-title { font-size: 16px; font-weight: 650; letter-spacing: -.02em; margin-bottom: 14px }
.ini-form-actions { justify-content: flex-end; margin-top: 14px }
.ini-form { display: flex; flex-direction: column; gap: 14px }
.ini-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px }
.ini-field { display: flex; flex-direction: column }
.ini-hint { font-size: 11px; color: var(--text-faint); margin-top: 4px }
.ini-form-error { margin-top: 12px }

/* the review banner */
.ini-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
    padding: 10px 14px; border: 1px solid #ffb45466; border-radius: 12px; background: #ffb4540f; font-size: 13px; color: #ffb454
}

/* ---- MIND ------------------------------------------------------------------------------------- */
.mind-panel { padding-bottom: 18px }
.mind-intro { padding: 0 18px; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; display: flex; flex-direction: column; gap: 10px }
.mind-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px }
.mind-count { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim) }
.mind-count strong { color: var(--text) }
.mind-dot { width: 9px; height: 9px; border-radius: 50% }
.mind-dot.mind-pos { background: var(--pos) }
.mind-dot.mind-warn { background: #ffb454 }
.mind-dot.mind-neg { background: var(--neg) }
.mind-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px 8px }
.mind-select { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-dim) }
.mind-bar-right { display: flex; align-items: center; gap: 12px }
.mind-daynote { font-size: 12.5px; color: var(--text-dim) }
.mind-hint { padding: 0 18px 8px; font-size: 12px; color: var(--text-faint) }
.mind-scroll { padding: 0 18px }
.mind-table { width: 100%; border-collapse: collapse }
.mind-table th, .mind-table td { padding: 9px 12px; border-bottom: 1px solid var(--hairline); text-align: left; font-size: 13px }
.mind-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 600 }
.mind-num { text-align: right !important; white-space: nowrap }
.mind-corner { min-width: 220px }
.mind-band th { background: #ffffff08; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); font-weight: 650 }
.mind-label { font-weight: 550; color: var(--text) }
.mind-tag { margin-left: 8px; font-size: 10.5px; font-weight: 500; color: var(--text-faint); border: 1px solid var(--hairline); border-radius: 999px; padding: 1px 7px }
.mind-dim { color: var(--text-dim) }
.mind-actual { font-weight: 650 }
.mind-actual.mind-pos { background: #37e0a622; color: var(--pos) }
.mind-actual.mind-warn { background: #ffb45422; color: #ffb454 }
.mind-actual.mind-neg { background: #ff6b7d22; color: var(--neg) }
.mind-input { width: 110px; text-align: right }
.mind-msg { font-size: 10.5px; color: var(--text-faint); margin-top: 2px }
.mind-edit { vertical-align: top }

@media (max-width: 700px) {
    .ini-card { grid-template-columns: 1fr }
    .ini-side-col { align-items: flex-start }
    .ini-sides { grid-template-columns: 1fr }
    .ini-arrow { display: none }
    .ini-form-row { grid-template-columns: 1fr }
    .mind-corner { min-width: 150px }
}

/* P22: the Ads outcome tracker. The link-check mark on an ad name, the footnote under the table, the Sent to Meta strip. */
.ads-link-missing {
    margin-left: 8px;
    font-size: 11px;
    color: #ffb454;
    background: #ffb45412;
    border: 1px solid #ffb45447;
    border-radius: 6px;
    padding: 1px 6px;
    white-space: nowrap;
    cursor: help
}

.ads-outcomes-footnote {
    font-size: 11.5px;
    color: var(--text-faint);
    padding: 8px 12px
}

.ads-model-footnote {
    font-size: 11.5px;
    color: var(--text-faint);
    padding: 0 12px 8px
}

.ads-meta-strip {
    font-size: 12.5px;
    color: var(--text-dim);
    background: #37e0a60d;
    border: 1px solid #37e0a638;
    border-radius: 8px;
    padding: 8px 12px
}

.ads-meta-strip.warn {
    color: #ffb454;
    background: #ffb45412;
    border-color: #ffb45447
}

/* ------------------------------------------------------------- dark scrollbars */

/* The reference stylesheet (app.css) styles no scrollbar, so on a dark page the browser draws its light native
 * track: most visible as a white strip under the Pipeline table at 390 px and down the right edge. Standard
 * properties first (Firefox, Chrome 121 and later, current Safari), then the WebKit pseudo-elements for older
 * Chrome and Safari. Both use the hairline token and a transparent track, so no new colour exists. scrollbar-color
 * and scrollbar-width are inherited, so html covers every box; the scroll containers the pages use are named too so
 * nothing can drift back to the light default. .ld-chips is left out on purpose: it hides its scrollbar on a phone. */
html,
.wow-scroll,
.ads-scroll,
.ads-expand-table-wrap,
.ads-expand-creative-text,
.cl-scroll,
.cl-days-scroll {
  scrollbar-color: var(--hairline-strong) transparent;
  scrollbar-width: thin;
}

html::-webkit-scrollbar,
.wow-scroll::-webkit-scrollbar,
.ads-scroll::-webkit-scrollbar,
.ads-expand-table-wrap::-webkit-scrollbar,
.ads-expand-creative-text::-webkit-scrollbar,
.cl-scroll::-webkit-scrollbar,
.cl-days-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}

html::-webkit-scrollbar-track,
.wow-scroll::-webkit-scrollbar-track,
.ads-scroll::-webkit-scrollbar-track,
.ads-expand-table-wrap::-webkit-scrollbar-track,
.ads-expand-creative-text::-webkit-scrollbar-track,
.cl-scroll::-webkit-scrollbar-track,
.cl-days-scroll::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb,
.wow-scroll::-webkit-scrollbar-thumb,
.ads-scroll::-webkit-scrollbar-thumb,
.ads-expand-table-wrap::-webkit-scrollbar-thumb,
.ads-expand-creative-text::-webkit-scrollbar-thumb,
.cl-scroll::-webkit-scrollbar-thumb,
.cl-days-scroll::-webkit-scrollbar-thumb {
  background: var(--hairline-strong);
  border-radius: 8px;
}

html::-webkit-scrollbar-corner,
.wow-scroll::-webkit-scrollbar-corner,
.ads-scroll::-webkit-scrollbar-corner,
.ads-expand-table-wrap::-webkit-scrollbar-corner,
.ads-expand-creative-text::-webkit-scrollbar-corner,
.cl-scroll::-webkit-scrollbar-corner,
.cl-days-scroll::-webkit-scrollbar-corner {
  background: transparent;
}
