/* Home page Credentialing Path demo (templates/_cred_path_demo.html).
   Default (no JS, or prefers-reduced-motion): all four scenes in their finished state, as a static frame.
   .cpd-live (added by the demo's script, motion allowed): one scene at a time, its pieces filling in. */
.cpd { margin: 0 0 8px; max-width: 880px; }
.cpd-stage { position: relative; background: var(--ground); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.cpd-scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cpd-scenes > * { min-width: 0; }
.cpd-s { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 0; }
.cpd-step { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 800; font-size: 15px; color: var(--ink); }
.cpd-step b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 13px; flex: none; }
.cpd-lbl { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.cpd-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cpd-row .cpd-lbl { margin: 0; }
.cpd-chip { display: inline-block; border: 1px solid var(--accent); border-radius: 999px; padding: 5px 12px; font: 700 13px/1.3 var(--font); background: var(--accent); color: var(--accent-ink); }
.cpd-picks, .cpd-checks, .cpd-track { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.cpd-picks { grid-template-columns: 1fr 1fr; }
.cpd-picks li, .cpd-checks li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; }
.cpd-picks li { border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; background: var(--surface); }
.cpd-picks li.cpd-skip { color: var(--muted); }
.cpd-box { position: relative; flex: none; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--accent); background: var(--accent); }
.cpd-box::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cpd-skip .cpd-box { background: transparent; border-color: var(--line); }
.cpd-skip .cpd-box::after { display: none; }
.cpd-note { margin: 10px 0 0; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.cpd-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; align-items: start; }
.cpd-cols > * { min-width: 0; }
.cpd-field { border-bottom: 1px solid var(--line); padding: 4px 0 6px; margin-bottom: 4px; }
.cpd-field .cpd-lbl { margin: 0 0 2px; font-size: 10px; }
.cpd-val { display: block; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpd-checks { background: var(--soft); border-radius: 12px; padding: 10px; }
.cpd-mail { border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.cpd-mhead { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.cpd-mhead .cpd-lbl { display: inline; margin-right: 4px; font-size: 10px; }
.cpd-line { display: block; height: 7px; border-radius: 4px; background: var(--line); margin: 7px 0; transform-origin: left center; }
.cpd-line.short { width: 60%; }
.cpd-track li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; min-width: 0; }
.cpd-st { display: grid; flex: none; justify-items: end; }
.cpd-st em { grid-area: 1 / 1; font: 700 11.5px/1.2 var(--font); font-style: normal; border-radius: 999px; padding: 4px 9px; white-space: nowrap; }
.st-ap { background: var(--ground); color: var(--muted); border: 1px solid var(--line); }
.st-rv { background: var(--soft); color: var(--accent); border: 1px solid var(--soft); }
.st-ok { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.cpd-cal { border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.cpd-mon { margin: 0 0 6px; font-weight: 800; font-size: 13px; color: var(--ink); }
.cpd-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 11px; }
.cpd-grid b { color: var(--muted); font-size: 10px; }
.cpd-grid span { display: grid; place-items: center; height: 20px; border-radius: 6px; color: var(--ink); }
.cpd-grid span.due { background: var(--accent); color: var(--accent-ink); font-weight: 800; box-shadow: 0 0 0 3px var(--soft); }
.cpd-rems { display: grid; gap: 8px; }
.cpd-rem { margin: 0; border-radius: 12px; padding: 9px 11px; background: var(--accent); color: var(--accent-ink); font-size: 12px; }
.cpd-rem b { display: block; font-size: 13px; }
.cpd-rem.soft { background: var(--soft); color: var(--ink); }
.cpd-dots { display: none; }
.cpd-cap { margin: 12px 4px 0; font-size: 14px; color: var(--muted); }

@media (max-width: 720px) {
  .cpd-scenes { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .cpd-stage { padding: 12px; border-radius: 16px; }
  .cpd-s { padding: 12px; }
  .cpd-cols { grid-template-columns: 1fr; }
}

/* The animation: only when motion is allowed and the script is running. */
@media (prefers-reduced-motion: no-preference) {
  .cpd-live .cpd-scenes { grid-template-columns: 1fr; }
  .cpd-live .cpd-s { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s; }
  .cpd-live .cpd-s.on { opacity: 1; visibility: visible; transition: opacity .45s ease .1s, visibility 0s; }
  .cpd-live .cpd-dots { display: flex; justify-content: center; gap: 6px; margin: 0 0 12px; }
  .cpd-live .cpd-dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: width .3s, background .3s; }
  .cpd-live .cpd-dots i.on { width: 22px; background: var(--accent); }

  /* each piece's timing: fills in after its --d once its scene is on; snaps back once the scene has faded */
  .cpd-live .cpd-a, .cpd-live .cpd-a .cpd-box, .cpd-live .cpd-a .cpd-box::after {
    transition-property: opacity, transform, clip-path, background-color, color, border-color, box-shadow;
    transition-duration: .45s; transition-timing-function: ease-out; }
  .cpd-live .cpd-s.on .cpd-a, .cpd-live .cpd-s.on .cpd-a .cpd-box, .cpd-live .cpd-s.on .cpd-a .cpd-box::after { transition-delay: var(--d, 0s); }
  .cpd-live .cpd-s:not(.on) .cpd-a, .cpd-live .cpd-s:not(.on) .cpd-a .cpd-box, .cpd-live .cpd-s:not(.on) .cpd-a .cpd-box::after {
    transition-duration: 0s; transition-delay: .6s; }

  /* the starting look of each piece while its scene isn't on */
  .cpd-live .cpd-s:not(.on) .cpd-chip.cpd-a { background: var(--surface); color: var(--ink); border-color: var(--line); }
  .cpd-live .cpd-s:not(.on) li.cpd-a { color: var(--muted); }
  .cpd-live .cpd-s:not(.on) li.cpd-a .cpd-box { background: transparent; border-color: var(--line); }
  .cpd-live .cpd-s:not(.on) li.cpd-a .cpd-box::after { opacity: 0; transform: rotate(45deg) scale(.4); }
  .cpd-live .cpd-s:not(.on) .cpd-val.cpd-a { clip-path: inset(0 100% 0 0); }
  .cpd-live .cpd-val.cpd-a { transition-duration: .7s; }
  .cpd-live .cpd-s:not(.on) .cpd-line.cpd-a { transform: scaleX(0); }
  .cpd-live .cpd-s:not(.on) .cpd-note.cpd-a, .cpd-live .cpd-s:not(.on) .cpd-rem.cpd-a { opacity: 0; transform: translateY(6px); }
  .cpd-live .cpd-s:not(.on) .cpd-st em.cpd-a { opacity: 0; transform: scale(.8); }
  .cpd-live .cpd-s:not(.on) .cpd-grid span.due.cpd-a { background: transparent; color: var(--ink); box-shadow: 0 0 0 0 var(--soft); }
}
