/* =====================================================================
   Lumora - submission journey timeline (public article page + author
   tracking page). Rendered by lumoraEmail TrackPage::card().
   Logical properties only (RTL-safe). Status = icon + text, never colour
   alone. Text colours meet WCAG 2.2 AA. The same file is served by the
   bridge as track.css; a contract test keeps the two byte-identical.
   ===================================================================== */
.lj {
  --lj-ink: #0F172A; --lj-muted: #475569; --lj-line: #E2E8F0; --lj-soft: #F8FAFC; --lj-bg: #FFFFFF;
  --lj-ok: #15803D;   --lj-ok-ink: #166534;   --lj-ok-bg: #DCFCE7;
  --lj-now: #2C5FA0;  --lj-now-ink: #1E4378;  --lj-now-bg: #E9F1FA;
  --lj-back: #B45309; --lj-back-ink: #92400E; --lj-back-bg: #FEF3C7;
  --lj-no: #B91C1C;   --lj-no-ink: #991B1B;   --lj-no-bg: #FEE2E2;
  --lj-wait: #64748B; --lj-wait-ink: #475569; --lj-wait-bg: #F1F5F9;
  box-sizing: border-box; margin: 0 0 24px; padding: 20px 22px;
  color: var(--lj-ink); background: var(--lj-bg);
  border: 1px solid var(--lj-line); border-radius: 12px;
  font-family: inherit; font-size: 1rem; line-height: 1.55;
}
.lj *, .lj *::before, .lj *::after { box-sizing: border-box; }
.lj p, .lj h2, .lj h3, .lj ol { margin: 0; padding: 0; }

/* ---------- Header: the "parcel status" ---------- */
.lj .lj-title { font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lj-muted); }
.lj[dir="rtl"] .lj-title { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.lj .lj-headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-block-start: 6px; }
.lj .lj-headline-state { font-size: 1.5rem; line-height: 1.25; font-weight: 800; }
.lj .lj-headline-date { font-size: 1rem; font-weight: 600; color: var(--lj-muted); font-variant-numeric: tabular-nums; }
.lj .lj-intro { margin-block-start: 6px; color: var(--lj-muted); font-size: .93rem; }
.lj .lj-bar { display: flex; gap: 4px; margin-block-start: 16px; }
.lj .lj-seg { flex: 1 1 0; height: 8px; border-radius: 4px; background: var(--lj-line); }
.lj .lj-seg.lj-done { background: var(--lj-ok); }
.lj .lj-seg.lj-current { background: var(--lj-now); }
.lj .lj-seg.lj-returned { background: var(--lj-back); }
.lj .lj-seg.lj-rejected { background: var(--lj-no); }
.lj .lj-seg.lj-not_recorded { background: repeating-linear-gradient(135deg, #CBD5E1 0 3px, #F1F5F9 3px 6px); }
.lj .lj-seg.lj-not_applicable { background: #EDF2F7; }
.lj .lj-count { margin-block-start: 8px; font-size: .85rem; color: var(--lj-muted); font-variant-numeric: tabular-nums; }

.lj .lj-action {
  margin-block-start: 16px; padding: 10px 14px; border-radius: 8px; font-size: .92rem;
  background: var(--lj-back-bg); color: var(--lj-back-ink); border-inline-start: 4px solid var(--lj-back);
}
.lj .lj-action-plain { background: var(--lj-wait-bg); color: var(--lj-wait-ink); border-inline-start-color: var(--lj-wait); }

/* ---------- Steps (vertical timeline; the rail runs behind the dots) ---------- */
.lj .lj-steps { list-style: none; margin-block-start: 20px; }
.lj .lj-step { position: relative; display: flex; gap: 14px; padding-block-end: 20px; }
.lj .lj-step:last-child { padding-block-end: 0; }
.lj .lj-step:not(:last-child)::before {
  content: ''; position: absolute; inset-block-start: 30px; inset-block-end: 2px; inset-inline-start: 13px;
  width: 2px; background: var(--lj-line);
}
.lj .lj-step.lj-done:not(:last-child)::before { background: var(--lj-ok); }
.lj .lj-dot {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--lj-wait); background: var(--lj-bg); color: var(--lj-wait); position: relative; z-index: 1;
}
.lj .lj-done .lj-dot { border-color: var(--lj-ok); background: var(--lj-ok); color: #FFFFFF; }
.lj .lj-current .lj-dot { border-color: var(--lj-now); color: var(--lj-now); background: var(--lj-now-bg); }
.lj .lj-returned .lj-dot { border-color: var(--lj-back); color: var(--lj-back-ink); background: var(--lj-back-bg); }
.lj .lj-rejected .lj-dot { border-color: var(--lj-no); background: var(--lj-no); color: #FFFFFF; }
.lj .lj-not_recorded .lj-dot { border-style: dashed; color: var(--lj-wait-ink); }
.lj .lj-not_applicable .lj-dot { border-color: #CBD5E1; color: #94A3B8; }
.lj .lj-core { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.lj .lj-now .lj-dot::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--lj-now); opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .lj .lj-now .lj-dot::after { animation: lj-ring 2s ease-out infinite; }
}
@keyframes lj-ring { 0% { transform: scale(.6); opacity: .55; } 100% { transform: scale(1.15); opacity: 0; } }

.lj .lj-body { min-width: 0; padding-block-start: 2px; }
.lj .lj-name { font-size: 1.02rem; line-height: 1.35; font-weight: 750; }
.lj .lj-upcoming .lj-name, .lj .lj-not_applicable .lj-name { color: var(--lj-muted); font-weight: 650; }
.lj .lj-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-block-start: 3px; }
.lj .lj-badge {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; line-height: 1.6;
  background: var(--lj-wait-bg); color: var(--lj-wait-ink); border: 1px solid #CBD5E1;
}
.lj .lj-done .lj-badge { background: var(--lj-ok-bg); color: var(--lj-ok-ink); border-color: #86EFAC; }
.lj .lj-current .lj-badge { background: var(--lj-now-bg); color: var(--lj-now-ink); border-color: #BFD3EA; }
.lj .lj-returned .lj-badge { background: var(--lj-back-bg); color: var(--lj-back-ink); border-color: #FCD34D; }
.lj .lj-rejected .lj-badge { background: var(--lj-no-bg); color: var(--lj-no-ink); border-color: #FCA5A5; }
.lj .lj-not_recorded .lj-badge { border-style: dashed; }
.lj .lj-date { font-size: .88rem; color: var(--lj-muted); font-variant-numeric: tabular-nums; }
.lj .lj-note { margin-block-start: 4px; font-size: .9rem; color: var(--lj-muted); }
.lj .lj-fact { margin-block-start: 3px; font-size: .88rem; font-weight: 600; color: var(--lj-ink); }
.lj .lj-hint { margin-block-start: 3px; font-size: .85rem; color: var(--lj-muted); }

/* ---------- Footer ---------- */
.lj .lj-foot { margin-block-start: 20px; padding-block-start: 14px; border-block-start: 1px solid var(--lj-line); font-size: .82rem; color: var(--lj-muted); }
.lj .lj-foot p + p { margin-block-start: 6px; }
.lj .lj-private { color: var(--lj-back-ink); font-weight: 600; }

/* ---------- Live shell (author page only) ---------- */
.lj-live .lj-livebar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .85rem; color: var(--lj-muted, #475569); }
.lj-live .lj-livebar[hidden] { display: none; }
.lj-live .lj-pulse { width: 9px; height: 9px; border-radius: 50%; background: #15803D; }
.lj-live.is-stale .lj-pulse { background: #B45309; }
@media (prefers-reduced-motion: no-preference) {
  .lj-live .lj-pulse { animation: lj-blink 2s ease-in-out infinite; }
}
@keyframes lj-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.lj-live .lj-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lj-live .lj-noscript { font-size: .85rem; color: #475569; }

/* ---------- Disclosure (article page): the title opens the timeline in a panel right beneath it ----------
   Built by the article template's script; without JavaScript none of this applies and the timeline stays expanded. */
.lz-journey-wrap.is-collapsible .lj { padding: 0; }
.lz-journey-wrap.is-collapsible .lj .lj-head { margin: 0; }
.lz-journey-wrap .lj .lj-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap;
  width: 100%; margin: 0; padding: 16px 22px; border: 0; border-radius: 12px; background: transparent;
  color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.lz-journey-wrap .lj .lj-toggle:hover { background: var(--lj-soft); }
.lz-journey-wrap .lj .lj-toggle:focus-visible { outline: 3px solid var(--lj-now); outline-offset: -3px; }
.lz-journey-wrap .lj .lj-toggle-text { flex: 1 1 auto; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--lj-muted); }
.lz-journey-wrap .lj[dir="rtl"] .lj-toggle-text { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.lz-journey-wrap .lj .lj-toggle-state { font-size: .92rem; font-weight: 700; color: var(--lj-ink); font-variant-numeric: tabular-nums; }
.lz-journey-wrap .lj .lj-chev { flex: none; color: var(--lj-muted); transition: transform .18s ease; }
.lz-journey-wrap .lj .lj-toggle[aria-expanded="true"] .lj-chev { transform: rotate(180deg); }
.lz-journey-wrap .lj .lj-panel { padding: 16px 22px 20px; border-block-start: 1px solid var(--lj-line); animation: lj-panel-in .16s ease-out; }
.lz-journey-wrap .lj .lj-panel[hidden] { display: none; }
.lz-journey-wrap .lj .lj-panel > .lj-steps:first-child { margin-block-start: 0; }
@keyframes lj-panel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .lz-journey-wrap .lj .lj-chev { transition: none; }
  .lz-journey-wrap .lj .lj-panel { animation: none; }
}
@media (max-width: 560px) {
  .lz-journey-wrap .lj .lj-toggle { padding: 14px; }
  .lz-journey-wrap .lj .lj-panel { padding: 14px 14px 16px; }
}

@media (max-width: 560px) {
  .lj { padding: 16px 14px; border-radius: 10px; }
  .lj .lj-headline-state { font-size: 1.3rem; }
}
@media print {
  .lj { border-color: #94A3B8; break-inside: avoid; }
  .lz-journey-wrap .lj .lj-panel, .lz-journey-wrap .lj .lj-panel[hidden] { display: block; border-block-start: 0; animation: none; }
  .lz-journey-wrap .lj .lj-chev { display: none; }
  .lj .lj-now .lj-dot::after { display: none; }
  .lj-live .lj-livebar { display: none; }
}
