/* ============================================================================
   HpClaim — "Watch a claim file itself."  (flagship set-piece)
   LIGHT sand-blue revenue-cycle pipeline. All selectors namespaced `.claim-`.
   The software visibly runs the cycle hands-free: rows populate in sequence,
   a scan sweeps each stage, numbers count up, the 835 decodes line by line,
   the auto-fix diff types itself, the ledger tallies. Teal is reserved for
   tiny live/verified/done/paid status dots only.
   ========================================================================== */

.claim {
  /* sand-blue accent family (blue shades only; teal reserved for tiny dots) */
  --c-blue: #5a82c2;
  --c-sky: #6b8fd0;
  --c-steel: #4f74b8;
  --c-indigo: #3d63a4;
  --c-light: #8aa6dd;
  --c-teal: #2f9e8f;

  /* light surfaces + ink */
  --c-ink: #1e2636;
  --c-ink-2: #283142;
  --c-mut: #5a6479;
  --c-mut-2: #8a93a9;
  --c-line: #dce0ee;
  --c-line-2: #e7eaf5;
  --c-tint: color-mix(in srgb, var(--c-blue) 7%, #fff);
  --c-tint-2: color-mix(in srgb, var(--c-blue) 12%, #fff);
  --c-card: #ffffff;

  position: relative;
  isolation: isolate;
  color: var(--c-ink);
  background:
    radial-gradient(120% 70% at 82% -6%, color-mix(in srgb, var(--c-blue) 7%, transparent) 0%, transparent 55%),
    linear-gradient(180deg, #f5f7fc 0%, #eef1f7 100%);
  padding-block: clamp(64px, 9vw, 116px);
  overflow: hidden;
}

.claim-wrap { position: relative; }

/* ── header ─────────────────────────────────────────────────────────── */
.claim-head { max-width: 62ch; }
.claim .eyebrow { color: var(--c-indigo); }
.claim-h2 { color: var(--c-ink); }
.claim-lead { color: var(--c-mut); }
.claim-lead b { color: var(--c-ink); font-weight: 600; }

/* ── stepper rail ───────────────────────────────────────────────────── */
.claim-rail {
  position: relative;
  margin-top: clamp(36px, 5vw, 60px);
  outline: none;
  border-radius: 16px;
}
.claim-rail:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 10px;
}
.claim-track {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 24px;
  height: 3px;
  border-radius: 3px;
  background: var(--c-line);
}
.claim-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--claim-pct, 0%);
  border-radius: 3px;
  background: linear-gradient(90deg, var(--c-light), var(--c-blue) 55%, var(--c-indigo));
  box-shadow: 0 0 16px -2px rgba(90, 130, 194, 0.5);
  transition: width 0.7s cubic-bezier(0.65, 0, 0.35, 1);
  overflow: hidden;
}
/* travelling shimmer inside the fill — "current flowing" */
.claim-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: translateX(-100%);
  animation: claim-flow 2.4s ease-in-out infinite;
}
@keyframes claim-flow {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(320%); }
}
/* traveling packet — the claim itself gliding down the rail, glowing trail */
.claim-packet {
  position: absolute;
  top: 50%;
  left: var(--claim-pct, 0%);
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: var(--c-blue);
  box-shadow: 0 0 0 4px rgba(90, 130, 194, 0.18), 0 0 18px 2px rgba(90, 130, 194, 0.65);
  transition: left 0.7s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 3;
}
/* glowing comet trail behind the packet */
.claim-packet::before {
  content: "";
  position: absolute;
  right: 60%;
  top: 50%;
  width: 46px;
  height: 5px;
  transform: translateY(-50%);
  border-radius: 5px;
  background: linear-gradient(90deg, transparent, rgba(90, 130, 194, 0.55));
  filter: blur(1px);
}
.claim-packet::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(90, 130, 194, 0.55);
  animation: claim-ping 1.8s ease-out infinite;
}
@keyframes claim-ping {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.claim-nodes {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.claim-node {
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  width: 48px;
  flex: 0 0 auto;
  color: inherit;
  font: inherit;
  z-index: 2;
}
.claim-node-dot {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1.5px solid var(--c-line);
  color: var(--c-mut);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 2px rgba(30, 38, 54, 0.05);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease,
    background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
.claim-node-num { line-height: 1; }
.claim-node-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-mut);
  white-space: nowrap;
  transition: color 0.35s ease;
}
.claim-node-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-mut-2);
  font-variant-numeric: tabular-nums;
  transition: color 0.35s ease;
}
.claim-node:hover .claim-node-dot { border-color: var(--c-light); transform: translateY(-2px); }
.claim-node:hover .claim-node-label { color: var(--c-ink); }

/* accent per stage — blue shades only */
.claim-node[data-accent="blue"]   { --na: var(--c-blue); }
.claim-node[data-accent="sky"]    { --na: var(--c-sky); }
.claim-node[data-accent="steel"]  { --na: var(--c-steel); }
.claim-node[data-accent="indigo"] { --na: var(--c-indigo); }

.claim-node[data-state="done"] .claim-node-dot {
  background: color-mix(in srgb, var(--na) 14%, #fff);
  border-color: color-mix(in srgb, var(--na) 55%, transparent);
  color: var(--na);
}
.claim-node[data-state="on"] .claim-node-dot {
  background: var(--na);
  border-color: color-mix(in srgb, var(--na) 72%, #17203c);
  color: #fff;
  transform: scale(1.14);
  box-shadow: 0 14px 26px -12px var(--na);
}
/* the active node breathes — self-driving pulse */
.claim-node[data-state="on"] .claim-node-dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--na);
  opacity: 0;
  animation: claim-node-pulse 1.9s ease-out infinite;
}
@keyframes claim-node-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.6); opacity: 0; }
}
.claim-node[data-state="on"] .claim-node-label { color: var(--c-ink); }
.claim-node[data-state="on"] .claim-node-tag { color: var(--na); }
.claim-node[data-state="done"] .claim-node-label { color: var(--c-ink-2); }

/* ── stage detail ───────────────────────────────────────────────────── */
.claim-stage {
  --sa: var(--c-blue);
  margin-top: clamp(30px, 4vw, 48px);
  border: 1px solid var(--c-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 50px -38px rgba(40, 60, 110, 0.3);
  padding: clamp(24px, 3.2vw, 38px);
  position: relative;
  overflow: hidden;
}
.claim-stage[data-accent="blue"]   { --sa: var(--c-blue); }
.claim-stage[data-accent="sky"]    { --sa: var(--c-sky); }
.claim-stage[data-accent="steel"]  { --sa: var(--c-steel); }
.claim-stage[data-accent="indigo"] { --sa: var(--c-indigo); }
.claim-stage::before {
  content: "";
  position: absolute;
  left: 0;
  top: 26px;
  bottom: 26px;
  width: 2px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--sa) 70%, transparent);
}

.claim-stage-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
  animation: claim-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.claim-stage-no {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.4px color-mix(in srgb, var(--sa) 60%, #fff);
  font-variant-numeric: tabular-nums;
}
.claim-stage-title {
  margin: 0;
  font-size: clamp(19px, 2.2vw, 27px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--c-ink);
}
/* "running…" processing indicator on the stage header */
.claim-stage-run {
  margin-left: auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--sa);
  background: color-mix(in srgb, var(--sa) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--sa) 30%, transparent);
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  white-space: nowrap;
}
.claim-run-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sa);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--sa) 55%, transparent);
  animation: claim-beacon 1.5s ease-out infinite;
}
@keyframes claim-beacon {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sa, #5a82c2) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px transparent; }
}
.claim-stage-run[data-reduced] .claim-run-dot { animation: none; }
@media (max-width: 700px) { .claim-stage-run { display: none; } }

/* ── stage body / panel ─────────────────────────────────────────────── */
.claim-panels { position: relative; min-height: 350px; }
.claim-panel {
  position: relative;
  animation: claim-panel-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes claim-panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
/* one-shot scan beam that sweeps the stage as it "processes" */
.claim-scan {
  position: absolute;
  top: -14px;
  bottom: -14px;
  left: -30px;
  width: 120px;
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--sa) 22%, transparent) 45%, color-mix(in srgb, var(--sa) 40%, #fff) 50%, color-mix(in srgb, var(--sa) 22%, transparent) 55%, transparent);
  filter: blur(0.5px);
  transform: translateX(0);
  animation: claim-sweep 1.15s cubic-bezier(0.5, 0, 0.2, 1) 1 forwards;
  opacity: 0;
}
@keyframes claim-sweep {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(min(1100px, 96vw)); opacity: 0; }
}

/* sequenced-reveal children: populate in order (not all at once) */
.claim-seq {
  opacity: 0;
  transform: translateY(9px);
  animation: claim-seq-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.claim-seq:nth-child(1) { animation-delay: 0.05s; }
.claim-seq:nth-child(2) { animation-delay: 0.16s; }
.claim-seq:nth-child(3) { animation-delay: 0.27s; }
.claim-seq:nth-child(4) { animation-delay: 0.38s; }
/* card/tier siblings share a row — stagger by their own order too */
.claim-cols .claim-seq:nth-child(1) { animation-delay: 0.18s; }
.claim-cols .claim-seq:nth-child(2) { animation-delay: 0.30s; }
.claim-tiers .claim-seq:nth-child(1) { animation-delay: 0.16s; }
.claim-tiers .claim-seq:nth-child(2) { animation-delay: 0.28s; }
.claim-tiers .claim-seq:nth-child(3) { animation-delay: 0.40s; }
@keyframes claim-seq-in {
  to { opacity: 1; transform: none; }
}

.claim-panel-lede {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-mut);
  max-width: 78ch;
}
.claim-panel-lede b { color: var(--c-ink); font-weight: 600; }
.claim-panel-lede em { color: var(--sa); font-style: normal; font-weight: 600; }

.claim-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(22px, 3vw, 40px);
}
/* two open columns split by a hairline — not two floating cards */
@media (min-width: 861px) {
  .claim-cols > * + * {
    border-left: 1px solid var(--c-line-2);
    padding-left: clamp(22px, 3vw, 40px);
  }
}
@media (max-width: 860px) {
  .claim-cols { gap: 22px; }
  .claim-cols > * + * { border-top: 1px solid var(--c-line-2); padding-top: 20px; }
}

/* sub-content is open, not boxed — the stage panel is the only elevated surface.
   Emphasis comes from a soft tint fill (no border, no shadow) used sparingly. */
.claim-card,
.claim-claimcard,
.claim-attach,
.claim-ledger,
.claim-recon,
.claim-tier {
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

/* typing caret shared by TypeText */
.claim-caret {
  display: inline-block;
  width: 0.5em;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: currentColor;
  opacity: 0.75;
  animation: claim-blink 0.9s steps(1) infinite;
}
@keyframes claim-blink { 0%, 50% { opacity: 0.75; } 51%, 100% { opacity: 0; } }

/* tiny reserved-teal status dot (live / verified / done / paid) */
.claim-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-teal);
  flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(47, 158, 143, 0.5);
  animation: claim-live 1.8s ease-out infinite;
}
@keyframes claim-live {
  0% { box-shadow: 0 0 0 0 rgba(47, 158, 143, 0.45); }
  70%, 100% { box-shadow: 0 0 0 6px transparent; }
}

/* ── ELIGIBILITY ────────────────────────────────────────────────────── */
.claim-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.claim-payer { font-size: 15px; font-weight: 700; color: var(--c-ink); }
.claim-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.claim-badge-ok { color: #1c7f70; background: rgba(47, 158, 143, 0.12); border: 1px solid rgba(47, 158, 143, 0.34); }
.claim-badge-warn { color: var(--c-indigo); background: color-mix(in srgb, var(--c-blue) 10%, #fff); border: 1px solid color-mix(in srgb, var(--c-blue) 28%, transparent); }
.claim-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.claim-facts li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--c-mut);
  padding-bottom: 7px;
  border-bottom: 1px solid var(--c-line-2);
}
.claim-facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.claim-facts li b { color: var(--c-ink); font-weight: 600; }
.claim-portion {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px dashed var(--c-line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.claim-portion > span { font-size: 12.5px; color: var(--c-mut); }
.claim-dollar {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-indigo);
  font-variant-numeric: tabular-nums;
}
.claim-range { font-size: 22px; color: var(--c-mut); }
.claim-cta {
  margin-top: 13px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--c-blue) 40%, transparent);
  background: color-mix(in srgb, var(--c-blue) 8%, #fff);
  color: var(--c-indigo);
  font-size: 13px;
  font-weight: 600;
  cursor: default;
}
.claim-cta-ic { font-size: 14px; }

/* ── DRAFT ──────────────────────────────────────────────────────────── */
.claim-claimcard-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.claim-fmt {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--c-blue);
  padding: 4px 9px;
  border-radius: 7px;
}
.claim-claimno { font-size: 12.5px; color: var(--c-mut); font-variant-numeric: tabular-nums; }
.claim-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c-blue) 5%, #fff);
  border: 0;
}
.claim-line-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.claim-cdt {
  font-size: 13px;
  font-weight: 800;
  color: var(--c-indigo);
  background: color-mix(in srgb, var(--c-blue) 14%, #fff);
  border: 1px solid color-mix(in srgb, var(--c-blue) 30%, transparent);
  padding: 3px 8px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.claim-desc { font-size: 13px; color: var(--c-ink-2); }
.claim-amt { font-size: 17px; font-weight: 700; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.claim-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--c-mut-2);
}
.claim-attach-h {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-mut);
  margin-bottom: 12px;
}
.claim-pwk { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.claim-pwk li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--c-ink-2);
  opacity: 0;
  transform: translateX(-6px);
  animation: claim-pwk-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.claim-pwk li:nth-child(1) { animation-delay: 0.30s; }
.claim-pwk li:nth-child(2) { animation-delay: 0.46s; }
.claim-pwk li:nth-child(3) { animation-delay: 0.62s; }
.claim-pwk li:nth-child(4) { animation-delay: 0.78s; }
@keyframes claim-pwk-in { to { opacity: 1; transform: none; } }
.claim-pwk-code {
  flex: 0 0 auto;
  width: 30px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--c-indigo);
  background: color-mix(in srgb, var(--c-blue) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--c-blue) 28%, transparent);
  border-radius: 6px;
  padding: 3px 0;
}
.claim-pwk li b { font-weight: 600; flex: 1; }
.claim-pwk li i {
  font-style: normal;
  font-size: 11px;
  color: #1c7f70;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.claim-pwk li i::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-teal);
}

/* ── SUBMIT ─────────────────────────────────────────────────────────── */
.claim-edi { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 0; }
.claim-edi li {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-radius: 10px;
  border: 0;
  border-top: 1px solid var(--c-line-2);
  background: transparent;
  opacity: 0;
  transform: translateY(8px);
  animation: claim-edi-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.claim-edi li:first-child { border-top: 0; }
.claim-edi li:nth-child(1) { animation-delay: 0.20s; }
.claim-edi li:nth-child(2) { animation-delay: 0.42s; }
.claim-edi li:nth-child(3) { animation-delay: 0.64s; }
.claim-edi li:nth-child(4) { animation-delay: 0.90s; }
@keyframes claim-edi-in { to { opacity: 1; transform: none; } }
.claim-edi-code {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--c-indigo);
  font-variant-numeric: tabular-nums;
}
.claim-edi-name { font-size: 13.5px; color: var(--c-ink); font-weight: 600; }
.claim-edi-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-mut); }
.claim-edi li[data-live] {
  border-top-color: transparent;
  background: color-mix(in srgb, var(--c-blue) 7%, transparent);
}
.claim-edi li[data-live] + li { border-top-color: transparent; }
.claim-edi li[data-live] .claim-edi-note { color: var(--c-indigo); font-weight: 600; }
.claim-parsing::after {
  content: "";
  display: inline-block;
  width: 26px;
  height: 6px;
  margin-left: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c-blue) 30%, #fff), var(--c-blue), color-mix(in srgb, var(--c-blue) 30%, #fff));
  background-size: 200% 100%;
  animation: claim-parse 1.1s linear infinite;
}
@keyframes claim-parse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.claim-stored {
  display: inline-block;
  font-size: 12.5px;
  color: var(--c-mut);
  background: color-mix(in srgb, var(--c-blue) 6%, transparent);
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
}

/* ── DENIAL ─────────────────────────────────────────────────────────── */
/* raw 835 decode stream — engine reading the remittance line by line */
.claim-decode {
  margin-bottom: 16px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c-blue) 4%, #fff);
  padding: 13px 15px;
  overflow: hidden;
}
.claim-decode-h {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-mut);
  margin-bottom: 9px;
}
.claim-decode-body {
  display: grid;
  gap: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.claim-seg { color: var(--c-ink-2); min-height: 1.4em; }
.claim-seg-hit { color: var(--c-indigo); font-weight: 600; }

.claim-carc { display: grid; gap: 0; margin-bottom: 16px; }
.claim-carc-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 12px;
  border-radius: 10px;
  border: 0;
  border-top: 1px solid var(--c-line-2);
  background: transparent;
  opacity: 0;
  transform: translateY(8px);
  animation: claim-carc-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.claim-carc-row:first-child { border-top: 0; }
.claim-carc-row:nth-child(1) { animation-delay: 1.0s; }
.claim-carc-row:nth-child(2) { animation-delay: 1.6s; }
@keyframes claim-carc-in { to { opacity: 1; transform: none; } }
/* the real denial gets a soft tint + left accent — no heavy card */
.claim-carc-row[data-kind="hit"] {
  border-top-color: transparent;
  background: color-mix(in srgb, var(--c-indigo) 6%, transparent);
  padding-left: 15px;
}
.claim-carc-row[data-kind="hit"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--c-indigo);
}
.claim-carc-codes { display: flex; gap: 6px; }
.claim-carc-codes span {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--c-ink-2);
  background: #eef1f8;
  border: 1px solid var(--c-line);
  font-variant-numeric: tabular-nums;
}
.claim-carc-row[data-kind="hit"] .claim-carc-codes span {
  color: #fff;
  background: var(--c-indigo);
  border-color: var(--c-indigo);
}
.claim-carc-body b { display: block; font-size: 14px; font-weight: 600; color: var(--c-ink); }
.claim-carc-body span { font-size: 12.5px; color: var(--c-mut); }
.claim-carc-class {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.claim-class-ok { color: var(--c-mut); background: #eef1f8; border: 1px solid var(--c-line); }
.claim-class-fix { color: #fff; background: var(--c-indigo); border: 1px solid var(--c-indigo); }
.claim-triage {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.claim-triage span {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  color: var(--c-mut-2);
  background: #fff;
}
.claim-triage span[data-t="fix"] {
  color: var(--c-indigo);
  border-color: color-mix(in srgb, var(--c-blue) 45%, transparent);
  background: color-mix(in srgb, var(--c-blue) 10%, #fff);
  font-weight: 600;
}
.claim-triage em { font-style: normal; color: var(--c-indigo); font-weight: 600; }

/* ── RECOVER ────────────────────────────────────────────────────────── */
.claim-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: stretch;
}
.claim-tier { display: flex; flex-direction: column; gap: 11px; height: 100%; }
/* three open columns split by hairlines — the numbered badges carry the emphasis */
@media (min-width: 861px) {
  .claim-tier + .claim-tier {
    border-left: 1px solid var(--c-line-2);
    padding-left: clamp(18px, 2.4vw, 32px);
  }
}
@media (max-width: 860px) {
  .claim-tier + .claim-tier { border-top: 1px solid var(--c-line-2); padding-top: 18px; }
}
.claim-tier-h {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-ink);
}
.claim-tier-h i {
  font-style: normal;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--c-blue);
}
.claim-tier[data-tier="2"] .claim-tier-h i { background: var(--c-steel); }
.claim-tier[data-tier="3"] .claim-tier-h i { background: var(--c-indigo); }
.claim-tier-p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--c-mut); }
.claim-diff {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--c-blue) 4%, #fff);
  border: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.45;
  min-height: 78px;
}
.claim-diff-add { color: var(--c-indigo); min-height: 1.4em; font-weight: 600; }
.claim-diff-why { color: var(--c-mut); margin-top: 3px; min-height: 1.4em; }
.claim-approve {
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 9px;
  border: 0;
  background: var(--c-blue);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: default;
  box-shadow: 0 10px 22px -12px var(--c-blue);
}
.claim-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--c-blue) 40%, transparent);
  background: color-mix(in srgb, var(--c-blue) 7%, #fff);
  color: var(--c-indigo);
  font-size: 12.5px;
  font-weight: 600;
  cursor: default;
}
.claim-tokens { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: auto; }
.claim-token {
  appearance: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: relative;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid var(--c-line);
  background: #fff;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.claim-token:hover { border-color: var(--c-light); background: var(--c-tint); box-shadow: 0 6px 16px -12px var(--c-blue); }
.claim-token-k {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-mut-2);
}
.claim-token-v {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.claim-token-c {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--c-mut-2);
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.claim-token:hover .claim-token-c { opacity: 1; }
.claim-token[data-copied] .claim-token-c { opacity: 1; color: #1c7f70; }
.claim-token[data-copied] { border-color: rgba(47, 158, 143, 0.5); background: rgba(47, 158, 143, 0.06); }

/* ── POSTED ─────────────────────────────────────────────────────────── */
.claim-ledger-h {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-mut);
  margin-bottom: 12px;
}
.claim-ledger ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.claim-ledger li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--c-mut);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-line-2);
  opacity: 0;
  animation: claim-ledger-in 0.4s ease forwards;
}
.claim-ledger li:nth-child(1) { animation-delay: 0.30s; }
.claim-ledger li:nth-child(2) { animation-delay: 0.58s; }
.claim-ledger li:nth-child(3) { animation-delay: 0.86s; }
.claim-ledger li:nth-child(4) { animation-delay: 1.14s; }
.claim-ledger li:nth-child(5) { animation-delay: 1.42s; }
@keyframes claim-ledger-in { from { opacity: 0; transform: translateX(-5px); } to { opacity: 1; transform: none; } }
.claim-ledger li:last-child { border-bottom: 0; padding-bottom: 0; }
.claim-ledger li b { color: var(--c-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.claim-ledger li[data-adj] b { color: var(--c-mut); }
.claim-ledger li[data-paid] b { color: var(--c-indigo); }
.claim-recon {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 20px 22px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--c-blue) 7%, #fff);
}
/* the tint fill provides the separation — no divider line beside it */
@media (min-width: 861px) {
  .claim-cols > .claim-recon + *,
  .claim-cols > * + .claim-recon {
    border-left: 0;
    padding-left: 0;
  }
}
@media (max-width: 860px) {
  .claim-cols > * + .claim-recon { border-top: 0; padding-top: 0; }
}
.claim-recon-tick {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #fff;
  background: var(--c-blue);
  margin-bottom: 4px;
  box-shadow: 0 8px 20px -8px var(--c-blue);
  transform: scale(0.2);
  opacity: 0;
  animation: claim-tick-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 1.35s forwards;
}
@keyframes claim-tick-in { to { transform: scale(1); opacity: 1; } }
.claim-recon b { font-size: 18px; color: var(--c-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.claim-recon span { font-size: 12.5px; color: var(--c-mut); }
.claim-recon-time { display: inline-flex; align-items: center; gap: 6px; color: var(--c-mut-2); font-size: 11.5px; }

/* ── summary stat strip ─────────────────────────────────────────────── */
.claim-stats {
  margin-top: clamp(30px, 4vw, 48px);
  padding-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--c-line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.claim-stat {
  padding: 2px clamp(18px, 2.4vw, 30px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.claim-stat + .claim-stat { border-left: 1px solid var(--c-line-2); }
.claim-stat:first-child { padding-left: 0; }
.claim-stat:last-child { padding-right: 0; }
.claim-stat b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  margin-bottom: 6px;
}
.claim-stat span { font-size: 12.5px; line-height: 1.5; color: var(--c-mut); }

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .claim-cols { grid-template-columns: 1fr; }
  .claim-tiers { grid-template-columns: 1fr; }
  .claim-stats {
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(20px, 4vw, 30px);
    row-gap: 22px;
  }
  /* wrapped grid: hairlines become per-cell top rules, not stray left borders */
  .claim-stat { padding: 0; }
  .claim-stat + .claim-stat { border-left: 0; }
  .claim-stat:nth-child(n + 3) { border-top: 1px solid var(--c-line-2); padding-top: 20px; }
  .claim-panels { min-height: 0; }
}

/* vertical rail on small screens */
@media (max-width: 700px) {
  .claim-rail { padding-left: 4px; }
  .claim-nodes { flex-direction: column; align-items: stretch; gap: 4px; }
  .claim-node {
    flex-direction: row;
    width: 100%;
    gap: 12px;
    padding: 4px 0;
  }
  .claim-node-dot { width: 40px; height: 40px; }
  .claim-node[data-state="on"] .claim-node-dot { transform: scale(1.06); }
  .claim-track {
    left: 20px;
    right: auto;
    top: 24px;
    bottom: 24px;
    width: 3px;
    height: auto;
  }
  .claim-fill { width: 100% !important; height: var(--claim-pct, 0%); }
  .claim-packet {
    left: 20px !important;
    top: var(--claim-pct, 0%);
    transition: top 0.7s cubic-bezier(0.65, 0, 0.35, 1);
  }
  .claim-tokens { grid-template-columns: 1fr 1fr; }
  .claim-stats { grid-template-columns: 1fr; row-gap: 0; }
  .claim-stat:nth-child(n + 3) { border-top: 0; padding-top: 0; }
  .claim-stat + .claim-stat { border-top: 1px solid var(--c-line-2); padding-top: 18px; margin-top: 18px; }
}

@keyframes claim-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ── reduced motion: no autoplay (JS), no packet, no scan/count/type ─── */
@media (prefers-reduced-motion: reduce), (max-width: 700px) {
  .claim-packet,
  .claim-scan,
  .claim-caret { display: none; }
  .claim-fill::after,
  .claim-parsing::after,
  .claim-run-dot,
  .claim-live-dot,
  .claim-node[data-state="on"] .claim-node-dot::after { animation: none !important; }
  .claim-panel,
  .claim-seq,
  .claim-pwk li,
  .claim-edi li,
  .claim-carc-row,
  .claim-ledger li,
  .claim-recon-tick,
  .claim-stage-head {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
