/* Maintenance & Support (/maintenance-support). Loaded after svc.css and uipath.css.
   Why automations stop working: six causes as a ruled list. The example: one week of payment posting. On Wednesday
   the portal signs the automation out mid-run; the steps on the right appear one by one, and the Wednesday row
   gets its re-run line. Driven by /scripts/v2/svc-flows.mjs; the markup holds the finished week, which is what
   shows without JavaScript and with reduced motion. Inside the paper it uses the paper colors from .up-board. */

/* ---- Causes ---- */
.ms-causes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 4vw, 64px); margin: 28px 0 0; border-top: 2px solid var(--ink); }
.ms-causes > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ms-causes dt { padding-top: 3px; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.ms-causes dd { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--ink-2); }
.ms-note { margin-top: 28px; max-width: 70ch; padding-left: 16px; border-left: 3px solid var(--c-yellow); font-size: 17px; line-height: 1.55; color: var(--ink); }
@media (max-width: 900px) { .ms-causes { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .ms-causes > div { grid-template-columns: minmax(0, 1fr); } }

/* ---- Takeover: support alone or as part of a team ---- */
.ms-team { margin-top: 28px; max-width: 70ch; font-size: 17px; line-height: 1.55; color: var(--ink-2); }

/* ---- The example week ---- */
.ms-board { transform: none; padding: 20px 24px 22px; }
.ms-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); margin-top: 4px; border-top: 1px dashed var(--rule-type); }
.ms-col { min-width: 0; padding: 14px 22px 2px 0; }
.ms-col + .ms-col { padding: 14px 0 2px 22px; border-left: 1px dashed var(--rule-type); }
.ms-h { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint-type); }
.ms-log, .ms-steps { list-style: none; padding: 0; margin: 10px 0 0; }

.ms-log { display: grid; gap: 8px; }
.ms-run { display: grid; grid-template-columns: 74px 96px minmax(0, 1fr) 18px; grid-template-areas: "day n res st" "fix fix fix fix"; gap: 4px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--rule-type); opacity: 0; transform: translateY(4px); transition: opacity 260ms ease, transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease; }
.ms-run.on { opacity: 1; transform: none; }
.ms-day { grid-area: day; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--type); }
.ms-n { grid-area: n; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; color: var(--faint-type); }
.ms-res { grid-area: res; font-size: 13.5px; line-height: 1.3; color: var(--type); }
.ms-st { grid-area: st; width: 14px; height: 14px; justify-self: end; background: #1E9E57; }
.ms-run.bad { border-color: #D1342B; box-shadow: 3px 3px 0 #D1342B; }
.ms-run.bad .ms-st { background: #D1342B; }
.ms-run.bad .ms-stop { color: #B22A22; font-weight: 600; }
.ms-run.bad.fixed { border-color: var(--type); box-shadow: none; }
.ms-run.bad.fixed .ms-st { background: #1E9E57; }
.ms-run.bad.fixed .ms-stop { color: var(--faint-type); font-weight: 400; text-decoration: line-through; }
.ms-fix { grid-area: fix; display: none; padding-top: 6px; margin-top: 2px; border-top: 1px dashed var(--rule-type); font-size: 13px; line-height: 1.35; font-weight: 600; color: var(--type); }
.ms-wed .ms-fix { display: block; visibility: hidden; }
.ms-wed.fixed .ms-fix { visibility: visible; }

.ms-steps { display: grid; gap: 4px; counter-reset: ms; }
.ms-steps li { counter-increment: ms; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 2px 8px; padding: 8px 10px 9px 8px; border-left: 3px solid transparent; opacity: 0; transition: opacity 260ms ease, background 260ms ease, border-color 260ms ease; }
.ms-steps li::before { content: counter(ms, decimal-leading-zero); grid-row: span 2; padding-top: 2px; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; font-weight: 600; color: var(--faint-type); }
.ms-steps li.on { opacity: 1; }
.ms-steps li.act { background: rgba(242, 194, 48, .28); border-left-color: #F2C230; }
.ms-steps b { font-size: 13.5px; font-weight: 700; color: var(--type); }
.ms-steps span { font-size: 13px; line-height: 1.4; color: #3A3D3A; }

@media (max-width: 900px) {
  .ms-grid { grid-template-columns: minmax(0, 1fr); }
  .ms-col, .ms-col + .ms-col { padding: 14px 0 2px; border-left: 0; }
  .ms-col + .ms-col { margin-top: 10px; border-top: 1px dashed var(--rule-type); }
}
@media (max-width: 480px) {
  .ms-board { padding: 16px 14px 16px; }
  .ms-run { grid-template-columns: 62px minmax(0, 1fr) 14px; grid-template-areas: "day n st" "res res res" "fix fix fix"; padding: 9px 10px; }
  .ms-board .up-top span + span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ms-run, .ms-steps li { transition: none; } }
