/* UX-D: the 90-second weekly close-off (pm-week.js). One sheet; progress dots, Skip and ✕ on
   top; one short step at a time; positive only. Quiet Glass: ink accent, 52 px primary buttons, status hues
   only for health. Scoped to .pm-week-pop.uxd so it wins over final.css / mobile-sheets.css. */

@media (min-width: 761px) { .panel.pm-week-pop.uxd { width: min(520px, calc(100vw - 32px)); } }
.pm-week-pop.uxd .uxd-head { display: flex; align-items: center; gap: 8px; margin-right: -8px; }
.uxd-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; }
.uxd-dots li { width: 8px; height: 8px; border-radius: 999px; background: var(--line); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent); transition: width 200ms var(--ease-calm), background-color 200ms; }
.uxd-dots li.past { background: color-mix(in srgb, var(--primary) 45%, transparent); box-shadow: none; }
.uxd-dots li.now { width: 22px; background: var(--primary); box-shadow: none; }
.uxd-skip { padding: 0 10px; border: 0; background: none; font: inherit; font-size: 15px; cursor: pointer; }

.uxd-step { display: flex; flex-direction: column; min-width: 0; }
.uxd-step.slide { animation: uxd-in 260ms var(--ease-calm) both; }
@keyframes uxd-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
.uxd-step > .pm-week-eyebrow { margin-top: 14px; }
.pm-week-pop.uxd h2 { margin: 6px 0 0; font-family: inherit; font-size: 1.8125rem; line-height: 1.17; font-weight: 500; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.pm-week-pop.uxd .pm-week-big { align-items: center; }
.pm-week-pop.uxd .pm-week-big b { color: var(--text); }
.pm-week-pop.uxd .pm-week-btns .btn, .uxd-answers .btn { height: var(--btn-h-lg); }
.pm-week-pop.uxd .pm-week-btns .btn.primary { min-width: 160px; }

/* the finish moment: a tick that draws itself once (reduced motion: drawn already) */
.uxd-tick { flex: none; width: 48px; height: 48px; color: var(--ok); }
.uxd-tick circle { fill: var(--ok-soft); stroke: none; }
.uxd-tick path { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 32; stroke-dashoffset: 0; animation: uxd-draw 520ms 120ms var(--ease-calm) both; }
@keyframes uxd-draw { from { stroke-dashoffset: 32; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .uxd-step.slide, .uxd-tick path { animation: none; }
  .uxd-dots li { transition: none; }
}

/* Projects: one card, the name first */
.uxd-card { position: relative; margin-top: 12px; padding: 18px 18px 16px 20px; border-radius: var(--r-lg); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.uxd-card::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 0; width: 4px; border-radius: 0 4px 4px 0; background: var(--pc, var(--primary)); }
.pm-week-pop.uxd .uxd-card h2 { margin: 0; }
.uxd-div { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-meta); }
.uxd-health { display: flex; align-items: center; margin: 12px 0 0; font-size: 15px; font-weight: 600; }
.uxd-health .pm-hdot { margin-bottom: 0; }
.uxd-moved { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-meta); }
.uxd-next { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 0; font-size: var(--fs-body); }
.uxd-next small { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.uxd-next .uxd-none { color: var(--muted); }

.uxd-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.uxd-answers .btn { width: 100%; }
.uxd-push { display: flex; flex-direction: column; margin-top: 16px; }
.uxd-push-label { font-size: var(--label-fs); font-weight: 500; }
.uxd-push-row { display: flex; gap: 8px; margin-top: 6px; }
.uxd-push-row input { flex: 1; min-width: 0; padding: 0 14px; }
.uxd-mic { flex: none; width: 52px; height: 52px; border-radius: 999px; }
.uxd-mic.on { background: var(--primary); color: var(--on-primary); }

/* Slipping: a short list, why each one is here */
.uxd-slip-list, .uxd-proposal-list { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.uxd-slip-list li, .uxd-proposal-list li { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 10px 14px; border-radius: var(--r-row); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.uxd-slip-list b, .uxd-proposal-list b { overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.uxd-slip-list small, .uxd-proposal-list small { color: var(--muted); font-size: 13px; }
.pm-week-pop.uxd .uxd-light-btns { flex-wrap: wrap; gap: 8px; }
.pm-week-pop.uxd .uxd-light-btns .btn { flex: 1 1 200px; }

/* the good-news line under the count */
.uxd-highlights { margin: 10px 0 0; color: var(--ok); font-size: 15px; font-weight: 600; }
.uxd-health .pm-hdot.grey { background: var(--muted); box-shadow: none; }

/* Done */
.uxd-done-mark { display: flex; margin-top: 18px; }
.uxd-done-mark .uxd-tick { width: 64px; height: 64px; }
.uxd-done-line { margin: 6px 0 0; color: var(--text); font-size: var(--fs-body); font-weight: 600; }
.uxd-cheer { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-body); }

/* the stand-in change summary (until workstream A's pmProposal is merged) */
.panel.uxd-proposal { width: min(460px, calc(100vw - 32px)); padding: 22px 24px 24px; }
.uxd-proposal h2 { margin: 0; font-size: 1.375rem; font-weight: 500; letter-spacing: -0.02em; }
.uxd-proposal-sum { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-meta); }
.uxd-proposal-list { max-height: 40vh; overflow-y: auto; }

/* phone: a bottom sheet; the step fills it and its answers sit in thumb reach */
@media (max-width: 760px) {
  dialog.panel.pm-week-pop.uxd { margin: auto 0 0; }                /* a bottom sheet: sits on the bottom edge */
  dialog.panel.pm-week-pop.uxd[open] .uxd-step { flex: 1 0 auto; }
  .pm-week-pop.uxd .uxd-head { margin-right: 0; }
  .pm-week-pop.uxd .uxd-step > .uxd-answers, .pm-week-pop.uxd .uxd-push { margin-top: auto; padding-top: 16px; }
  .pm-week-pop.uxd .uxd-step > .uxd-answers, .pm-week-pop.uxd .uxd-push .uxd-answers {
    position: sticky; bottom: 0; z-index: 4; margin-left: -16px; margin-right: -16px; margin-bottom: calc(-24px - env(safe-area-inset-bottom, 0px));
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface);
  }
  .pm-week-pop.uxd .pm-week-btns .btn { height: var(--btn-h-lg); }
  .pm-week-pop.uxd h2 { font-size: 1.625rem; }
  .panel.uxd-proposal { padding: 22px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
}
