/* Chat cards (chat-cards.js): typed, data-backed cards inside an answer bubble. Mobile first; brand tokens only. */
.cc-stack { display: grid; gap: 8px; margin-top: 10px; min-width: 0; }
.cc-card { margin: 0; min-width: 0; display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 30, 25, .04); }
.cc-card.loading { min-height: 88px; }
.cc-skel { display: grid; gap: 8px; }
.cc-skel i { display: block; height: 10px; border-radius: 5px; background: var(--surface-2); animation: cc-shimmer 1.2s ease-in-out infinite alternate; }
.cc-skel i:nth-child(1) { width: 40%; } .cc-skel i:nth-child(2) { width: 70%; height: 18px; } .cc-skel i:nth-child(3) { width: 55%; }
@keyframes cc-shimmer { from { opacity: .55; } to { opacity: 1; } }

.cc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.cc-kind { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.cc-head .conf, .cc-day, .cc-demo { margin-left: auto; white-space: nowrap; }
.cc-day { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cc-demo { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.cc-title { margin: 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }

.cc-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-width: 0; }
.cc-val { min-width: 0; line-height: 1.2; }
.cc-val b { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.cc-unit, .cc-date { font-size: 12px; color: var(--ink-3); }
.cc-spark, .cc-bars { flex: none; width: 120px; height: 36px; color: var(--accent); }
.cc-spark circle { fill: currentColor; }
.cc-spark.above { color: var(--high); } .cc-spark.below { color: var(--low); }
.cc-bars rect { fill: var(--warn); } .cc-bars rect.none { fill: var(--line); }

.cc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--ink-3); }
.cc-st { display: inline-flex; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); }
.cc-st.above { background: var(--high-soft); color: var(--high); }
.cc-st.below { background: var(--low-soft); color: var(--low); }
.cc-st.within, .cc-st.not_detected { background: var(--ok-soft); color: var(--ok); }
.cc-review { font-weight: 600; color: var(--ink-2); }
.cc-review.ok { color: var(--accent); }
.cc-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }
.cc-empty .cc-note { color: var(--ink-3); }
.cc-sum { font-size: 13px; }
.cc-sum p { margin: 0 0 4px; }

.cc-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-btn { min-height: 32px; padding: 4px 12px; border: 1px solid var(--rapha-accent-line, var(--line)); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cc-btn:hover { background: var(--surface); }
.cc-btn:focus-visible, .cc-mk:focus-visible, .cc-tap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* before / after */
.cc-compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.cc-side { display: grid; gap: 2px; justify-items: start; min-width: 0; padding: 8px; border-radius: 10px; background: var(--surface-2); }
.cc-side b { font-size: 18px; font-weight: 650; }
.cc-arrow { color: var(--ink-3); font-size: 16px; }

/* flagged markers */
.cc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cc-mk { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 6px 8px;
  border: 0; border-radius: 8px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.cc-mk:hover { background: var(--accent-soft); }
.cc-mk-n { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.cc-mk-n small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-3); }
.cc-mk-v { flex: none; white-space: nowrap; font-size: 12px; color: var(--ink-2); }
.cc-group { margin: 10px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-3); }
.cc-group:first-child { margin-top: 2px; }
.cc-ask { background: var(--accent); color: #fff; border-color: var(--accent); }
.cc-mk-v.H span { color: var(--high); font-weight: 700; } .cc-mk-v.L span { color: var(--low); font-weight: 700; }

/* protocol checklist */
.cc-count { margin: 0; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cc-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cc-checks li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 6px 8px;
  border-radius: 8px; background: var(--surface-2); }
.cc-checks li.done { background: var(--ok-soft); }
.cc-ck-n { min-width: 0; flex: 1 1 140px; overflow-wrap: anywhere; font-size: 13px; }
.cc-ck-n small { display: block; font-size: 11px; color: var(--ink-3); }
.cc-taps { display: inline-flex; gap: 4px; flex: none; }
.cc-tap { min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cc-tap.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cc-tap:disabled { opacity: .55; cursor: wait; }

@media (max-width: 640px) {
  .cc-btn, .cc-tap { min-height: 40px; }
  .cc-mk { min-height: 44px; }
  .cc-spark, .cc-bars { width: 96px; }
}
@media (prefers-reduced-motion: reduce) { .cc-skel i { animation: none; } }
