/* Cost to run: the cost-to-serve total, three columns of composition, and a
   user-count slider that drives all of it.
   Scoped per CLAUDE.md. Square corners, per --radius: 0. */

/* Each column's own total, on its own line between the heading and the rows: it
   is the denominator for every percentage under it, and in the first column it
   is the one figure on the slide the slider moves. */
[data-slide="cost-to-serve"] .cc-total {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.6rem; margin-bottom: 0.7rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
[data-slide="cost-to-serve"] .cc-total span {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-muted);
}
[data-slide="cost-to-serve"] .cc-total b {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 500;
  line-height: 1.1; color: var(--accent);
}

/* Three kinds of cost, three columns. One-time is a different unit from the
   other two, which is why the slide carries no totals: shares are the one thing
   all three can be compared on. */
[data-slide="cost-to-serve"] .cost-columns {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem;
  align-items: stretch;
}
/* Equal widths and a shared accent rule: three kinds of cost carrying equal
   weight, rather than one styled as primary and two as footnotes. */
/* Column, as a flex column so the slider can be pinned to the bottom of the
   first one and the other two still stretch to the same height beside it. */
[data-slide="cost-to-serve"] .cc-col {
  background: var(--surface); padding: 1.1rem 1.2rem; border-radius: var(--radius);
  border-top: 3px solid var(--accent);
  display: flex; flex-direction: column;
}
/* Pushed to the bottom, so the control reads as belonging to this column's
   figures rather than floating between the rows and the next column. */
[data-slide="cost-to-serve"] .cc-slot {
  margin-top: auto; padding-top: 1rem;
}
[data-slide="cost-to-serve"] .cc-slot .controls { margin-top: 0; }

[data-slide="cost-to-serve"] .cc-head {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--fg);
}
[data-slide="cost-to-serve"] .cc-head small {
  display: block; margin-top: 0.15rem; text-transform: none; letter-spacing: 0;
  font-size: 0.72rem; font-weight: 400; color: var(--fg-muted);
}
[data-slide="cost-to-serve"] .cc-head { margin-bottom: 0.7rem; }

/* label · bar · share. The share is a share of the total directly above, which
   is the denominator review asked for: "% of what" was the whole complaint, and
   the answer belongs on the slide rather than in an amount per row. */
[data-slide="cost-to-serve"] .cc-row {
  display: grid; grid-template-columns: minmax(88px, auto) 1fr 2.6rem;
  align-items: center; gap: 0 0.6rem; padding: 0.3rem 0;
}
/* One line, no track and no share. Both would read 100%, which is a chart of
   nothing and is exactly how this column read before. */
[data-slide="cost-to-serve"] .cc-row.solo { grid-template-columns: 1fr; }
[data-slide="cost-to-serve"] .cc-label { font-size: 0.82rem; color: var(--fg); }
[data-slide="cost-to-serve"] .cc-track {
  height: 11px; background: var(--surface-2); border-radius: var(--radius);
}
[data-slide="cost-to-serve"] .cc-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  border-radius: var(--radius);
}
[data-slide="cost-to-serve"] .cc-amt {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 0.82rem; color: var(--fg); text-align: right; white-space: nowrap;
}

/* The slider sits under the columns, so the eye lands on the costs first and
   finds the control that moves them second. */

@media (max-width: 1000px) {
  [data-slide="cost-to-serve"] .cost-columns { grid-template-columns: 1fr; }
}
