/* static/companions.css  (Work Order K3)
 * Drop-in. Uses the parts.html tokens: --red, --red-bg, --red-faint, --muted.
 * Tap targets 44 px min (mobile pass P2-2). No dashes in content strings. */

/* Spacing ladder (spacing audit, 2026-09-12, same scale as the cards it
 * sits in): 16 from the border to the title and to the checkbox column,
 * 16 of visible air between rows and under the last one, 4 title to
 * subtitle, 4 inside a row. Rows keep 8 of their own padding for the
 * hover wash and hang 6 past the text column so the title, subtitle,
 * boxes and total all share one left edge. Phone: 12 / 12 / 4.
 * The card that holds this block owns the margin around it
 * (.rc-body > .cp on /parts, .pn-side .cp on the homepage). */
.cp {
  margin: 14px 0 6px;
  padding: 16px 16px 8px;
  border: 1px solid #f1d4d4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, var(--red-faint, #FFF8F8) 100%);
}
.cp-title {
  margin: 0 0 4px;
  font-size: 15px; font-weight: 800; letter-spacing: .01em;
}
.cp-sub {
  margin: 0 0 8px;   /* 8 + the first row's 8 = 16 to its text */
  font-size: 12.5px; color: var(--muted, #5a6470);
}

.cp-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  margin: 0 -6px;
  padding: 8px 6px;
  min-height: 44px;
  border-top: 1px solid #f3e3e3;
  cursor: pointer;
  border-radius: 8px;
}
.cp-row:first-of-type { border-top: 0; }
.cp-row:hover { background: rgba(204, 0, 0, .04); }

.cp-check { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cp-box {
  width: 22px; height: 22px; margin-top: 1px;
  border: 2px solid #c9ced4; border-radius: 6px; background: #fff;
  position: relative; transition: border-color .12s, background .12s;
}
.cp-check:focus-visible + .cp-box { outline: 2px solid var(--red, #CC0000); outline-offset: 2px; }
.cp-check:checked + .cp-box { background: var(--red, #CC0000); border-color: var(--red, #CC0000); }
.cp-check:checked + .cp-box::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.cp-check:checked ~ .cp-body .cp-name { color: var(--red-dk, #990000); }

.cp-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.cp-name { font-weight: 700; font-size: 14.5px; }
.cp-num  { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--muted, #5a6470); }
.cp-why  { font-size: 13px; line-height: 1.4; color: #2b3138; }
.cp-why-link {
  color: var(--red, #CC0000); font-weight: 600; text-decoration: underline;
  text-underline-offset: 2px; white-space: nowrap;
  display: inline-block; padding: 6px 0; margin: -6px 0;  /* 44 px hit box without moving the line */
}
.cp-meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; }
.cp-price { font-weight: 800; font-size: 14px; }
.cp-price--quote { font-weight: 600; color: var(--muted, #5a6470); }
.cp-shelf {
  padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: #e8f6ec; color: #1f7a3a;
}
.cp-shelf--order { background: #fff3e0; color: #8a5300; }

.cp-total {
  margin: 8px 0 0;
  font-size: 13px; font-weight: 700; color: var(--red-dk, #990000);
}

@media (max-width: 420px) {
  .cp { padding: 12px 12px 4px; }
  .cp-head { flex-direction: column; gap: 1px; }
}
