/* Action plan, redesigned (flag new_ui): diseno/new-ui/handoff-actionplan.md.
   Grid, cards and controls come from layout.css and controls.css; the dialog
   reuses upgrade.css. Colors from css/ui-tokens.css. */
body.new-ui #viewActionplan.apui-on > h1, body.new-ui #viewActionplan.apui-on > p.sub { display: none; }
body.new-ui .apui { font: 14.5px/1.55 var(--ui-font); color: var(--ui-ink); }
body.new-ui .apui[hidden] { display: none; }
body.new-ui .apui :is(h1, h2, h3) { font-family: var(--ui-font); color: var(--ui-ink); }

body.new-ui .apui-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 22px; }
body.new-ui .apui-head h1 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.03em; font-weight: 600; }
body.new-ui .apui-head p { margin: 3px 0 0; color: var(--ui-ink-2); font-size: 14px; }

/* The lead card: one line of progress, the bar, who has what */
body.new-ui .apui-lead { margin-bottom: 20px; }
body.new-ui .apui-lead p { margin: 0; }
body.new-ui .apui-lead-top { font-size: 15px; color: var(--ui-ink-2); }
body.new-ui .apui-lead-top b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--ui-ink); margin-right: 4px; }
body.new-ui .apui-bar { height: 6px; border-radius: 3px; background: var(--ui-rival-soft); overflow: hidden; margin: 12px 0 10px; max-width: 520px; }
body.new-ui .apui-bar i { display: block; height: 100%; background: var(--ui-accent); border-radius: 3px; }
body.new-ui .apui-lead-own, body.new-ui .apui-lead-chk { font-size: 13.5px; color: var(--ui-ink-2); }
body.new-ui .apui-lead-chk { margin-top: 4px !important; }

/* To do */
body.new-ui .apui-tasks { list-style: none; margin: 0; padding: 0; }
body.new-ui .apui-task { position: relative; padding: 18px 20px 18px 20px; border-top: 1px solid var(--ui-line-2); }
body.new-ui .apui-task.first { background: var(--ui-paper-2); }   /* the first task is a paper row, not a colored edge */
body.new-ui .apui-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
body.new-ui .ui-tchip.accent { background: var(--ui-accent); border-color: var(--ui-accent); color: #fff; }
body.new-ui .apui-touch { font-size: 12.5px; color: var(--ui-ink-3); }
body.new-ui .apui-task h3 { margin: 10px 0 4px; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; font-weight: 600; }
body.new-ui .apui-line { margin: 0; color: var(--ui-ink-2); font-size: 14.5px; }
body.new-ui .apui-detail { margin: 10px 0 0; padding: 10px 14px; border-radius: 9px; background: var(--ui-paper-2); font-size: 13.5px; color: var(--ui-ink-2); }
body.new-ui .apui-detail p { margin: 0 0 6px; }
body.new-ui .apui-detail ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
body.new-ui .apui-detail pre { margin: 0; white-space: pre-wrap; font: 12.5px var(--ui-mono); color: var(--ui-ink); }
/* One action row: the link on the left, owner and "Mark as done" on the right */
body.new-ui .apui-acts { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; margin-top: 14px; min-width: 0; }
body.new-ui .apui-sp { flex: 1 1 auto; }
body.new-ui .apui-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
body.new-ui .apui-owner {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1px solid var(--ui-line); border-radius: 999px; background: var(--ui-card);
  font: 13px var(--ui-font); color: var(--ui-ink); min-width: 0; flex: 0 1 auto; cursor: pointer;
}
body.new-ui .apui-owner.ro { border-color: transparent; background: none; padding: 0; cursor: default; color: var(--ui-ink-2); }
body.new-ui .apui-owner:not(.ro):hover { border-color: var(--ui-ink-3); }
body.new-ui .apui-owner:focus-within { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
body.new-ui .apui-owner select {
  appearance: none; -webkit-appearance: none; border: 0; background: none; padding: 0; margin: 0; min-width: 0;
  font: inherit; color: inherit; cursor: inherit; outline: none; text-overflow: ellipsis; max-width: 160px;
}
body.new-ui .apui-owner svg, body.new-ui .apui-did svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; flex: none; }
body.new-ui .apui-owner svg:last-child { color: var(--ui-ink-3); margin-left: -2px; }
body.new-ui .apui-done { flex: none; }
body.new-ui .apui-sm, body.new-ui .apui-ini { display: none; }
body.new-ui .apui-more { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* What we did, notes */
body.new-ui .apui-did, body.new-ui .apui-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
body.new-ui .apui-did li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
body.new-ui .apui-did svg { color: var(--ui-accent); margin-top: 4px; }
body.new-ui .apui-did b { font-weight: 500; }
body.new-ui .apui-none { margin: 0; color: var(--ui-ink-2); font-size: 14px; }
body.new-ui .apui-notes { padding-left: 18px; list-style: disc; gap: 8px; font-size: 14px; color: var(--ui-ink-2); }

/* Dialog (shell from upgrade.css) */
body.new-ui form.apui-dlg { display: block; margin: 0; }
body.new-ui .apui-dlg h2 { margin-top: 0; }
body.new-ui .apui-f { display: grid; gap: 6px; margin-top: 16px; font-size: 13.5px; color: var(--ui-ink-2); }
body.new-ui .apui-f input {
  height: 42px; padding: 0 12px; border: 1px solid var(--ui-line); border-radius: 9px; background: var(--ui-card);
  color: var(--ui-ink); font: 14.5px var(--ui-font); box-sizing: border-box; width: 100%;
}
body.new-ui .apui-f input:focus { outline: 2px solid var(--ui-accent); outline-offset: -1px; border-color: transparent; }
body.new-ui .apui-err { margin: 10px 0 0 !important; color: var(--ui-neg) !important; font-size: 13.5px !important; }

body.new-ui .apui-skel .skel { background: var(--ui-paper-2); }

@media (max-width: 900px) {
  body.new-ui .apui-head h1 { font-size: 22px; }
  body.new-ui .apui-lead { margin-bottom: 14px; }
  body.new-ui .apui-lead-top b { font-size: 19px; }
  body.new-ui .apui-task { padding: 16px; }
  body.new-ui .apui-acts { gap: 8px; }
  body.new-ui .apui-acts .ui-link { min-height: 44px; font-size: 13px; }
  body.new-ui .apui-owner, body.new-ui .apui-acts .ui-btn { height: 44px; }
  body.new-ui .apui-task { padding: 16px 14px; }
  body.new-ui .apui-lg { display: none; }
  body.new-ui .apui-sm { display: inline; }
  body.new-ui .apui-acts .ui-link { white-space: nowrap; }
  body.new-ui .apui-owner { padding: 0 8px; gap: 4px; }
  /* On a phone the chip shows the owner's initials; the select stays on top, invisible, to pick. */
  body.new-ui .apui-owner:not(.noini) svg:first-child { display: none; }
  body.new-ui .apui-ini { display: inline; font-weight: 600; }
  body.new-ui .apui-owner select { position: absolute; inset: 0; opacity: 0; max-width: none; width: 100%; }
  body.new-ui .apui-more .ui-link { min-height: 44px; display: inline-flex; align-items: center; }
}
