/* =====================================================================
   Actions: Add analyst, Log event (/edit/roster, /edit/event).
   Every class here starts with .ac-
   ===================================================================== */

/* layout: main column + side column, or two equal columns on wide screens */
.ac-split { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.ac-split > .e-card + .e-card, .ac-col > .e-card + .e-card { margin-top: 0; }
.ac-col { display: grid; gap: 14px; min-width: 0; align-content: start; }
@media (min-width: 1100px) {
  .ac-split { grid-template-columns: minmax(0, 1fr) clamp(300px, 28vw, 420px); }
  .ac-split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ac-aside { position: sticky; top: calc(var(--bar-h) + 3px + 16px); }
}
@media (min-width: 1100px) and (max-width: 1299px) { .ac-split-r { grid-template-columns: minmax(0, 1fr) 300px; } }

/* step bar */
.ac-steps { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; counter-reset: none; }
.ac-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--muted); font-size: .875rem; }
.ac-steps li + li::before { content: ""; width: 26px; height: 1px; background: var(--rule-2); margin: 0 10px; }
.ac-steps .n { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1px solid var(--rule-2); border-radius: var(--r-sm);
  font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.ac-steps li.on { color: var(--ink); font-weight: 700; }
.ac-steps li.on .n { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 400; }
.ac-steps li.done { color: var(--sage-ink); }
.ac-steps li.done .n { background: var(--sage-wash); border-color: color-mix(in srgb, var(--sage) 55%, transparent); color: var(--sage-ink); }
/* the tick is drawn, not typed: the mono face has no check mark */
.ac-steps li.done .n { font-size: 0; }
.ac-steps li.done .n::after { content: ""; width: 9px; height: 5px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-1px) rotate(-45deg); }

.ac-count { color: var(--muted); font-weight: 500; font-size: .85rem; font-variant-numeric: tabular-nums; }
.ac-count.full { color: var(--warn); }
.ac-req { color: var(--sage-ink); font-size: .74rem; margin-left: 4px; }
.ac-under { margin-top: 8px; }
.ac-none { padding: 6px 2px; }
.ac-callout { margin-bottom: 14px; }
.ac-ul { margin: 6px 0 0; padding-left: 18px; }
.ac-av-xl { width: 72px; height: 72px; border-radius: var(--r); font-size: 1.3rem; background: var(--sage-wash); color: var(--sage-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sage) 55%, transparent); }
.ac-av-xl img { border-radius: var(--r); }

/* ---------- Roster new user ---------- */
.ac-preview { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; min-width: 0; }
.ac-pv-text { display: grid; gap: 2px; min-width: 0; }
.ac-pv-text b { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-pv-text span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-dnr { margin-top: 14px; }
.e-hint a { color: inherit; text-decoration: underline; font-weight: 600; }
.ac-ranks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
.ac-rank { position: relative; cursor: pointer; min-width: 0; }
.ac-rank input { position: absolute; opacity: 0; pointer-events: none; }
.ac-rank > span { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--rule-2);
  background: var(--field); transition: border-color .12s, background .12s; }
.ac-rank b { font-family: var(--mono); font-size: 1.05rem; color: var(--ink-2); }
.ac-rank small { color: var(--muted); font-size: .78rem; line-height: 1.3; overflow-wrap: anywhere; }
.ac-rank:hover > span { border-color: color-mix(in srgb, var(--sage) 55%, transparent); }
.ac-rank input:checked + span { border-color: var(--sage); background: var(--sage-wash); box-shadow: inset 0 0 0 1px var(--sage); }
.ac-rank input:checked + span b, .ac-rank input:checked + span small { color: var(--sage-ink); }
.ac-rank input:focus-visible + span { box-shadow: 0 0 0 3px var(--sage-wash), inset 0 0 0 1px var(--sage); }
.ac-toggle { margin-top: 16px; }
.ac-ref { margin-top: 12px; }
.ac-will { margin: 0; padding-left: 18px; list-style: square; display: grid; gap: 8px; color: var(--ink-2); font-size: .9rem; line-height: 1.45; }
.ac-will b { color: var(--ink); }
.ac-will li::marker { color: var(--sage); }

/* done (shared) */
.ac-done[hidden], .ac-col[hidden] { display: none; }
.ac-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 20px 30px; max-width: 640px; margin: 0 auto 14px; }
.ac-done h2 { font-family: var(--serif); font-weight: 700; font-size: 1.7rem; line-height: 1.1; outline: none; overflow-wrap: anywhere; }
.ac-done-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; color: var(--ink-2); }
.ac-done-warn { text-align: left; }
.ac-done-btns { justify-content: center; margin-top: 8px; }
.ac-tick { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: var(--r); font-size: 1.6rem; font-weight: 700;
  background: var(--sage-wash); color: var(--sage-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sage) 55%, transparent); }
.ac-done:not(.warn) .ac-tick { font-size: 0; }
.ac-done:not(.warn) .ac-tick::after { content: ""; width: 20px; height: 10px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: translateY(-3px) rotate(-45deg); }
.ac-done.warn .ac-tick { background: var(--warn-wash); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }

/* ---------- Log event ---------- */
.ac-chipbox { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 48px; padding: 6px; border-radius: var(--r); border: 1px solid var(--rule-2);
  background: var(--field); cursor: text; }
.ac-chipbox:focus-within { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-wash); }
.ac-chipbox .e-pick { flex: 1 1 150px; min-width: 0; }
.ac-chipbox input { width: 100%; height: 34px; padding: 0 6px; border: 0; background: none; color: var(--ink); font: inherit; outline: none; }
.ac-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 4px 3px 3px; border-radius: var(--r-sm); border: 1px solid var(--rule-2);
  background: var(--well); font-size: .88rem; }
.ac-chip .e-av.xs { width: 24px; height: 24px; font-size: .62rem; }
.ac-chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-chip.bad { border-color: var(--bad-line); background: var(--bad-wash); color: var(--bad); }
.ac-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: var(--r-sm); border: 0; background: none;
  color: var(--muted); font-size: 1.05rem; line-height: 1; cursor: pointer; }
.ac-chip-x:hover { background: var(--bad-wash); color: var(--bad); }
.ac-note { display: grid; gap: 4px; margin-top: 6px; }
.ac-lead { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.ac-tiles .ac-tile-name b { font-family: var(--body); font-size: 1.15rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.ac-tiles .e-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; }
.ac-leadline { color: var(--ink-2); margin: -4px 0 14px; }
.ac-pts { display: grid; }
.ac-pt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--rule); }
.ac-pt:first-child { border-top: 0; }
.ac-delta { display: inline-flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ac-delta .was { color: var(--muted); }
.ac-delta .arr, .ac-chg .arr { color: var(--muted); }
.ac-delta b { font-size: 1.05rem; }
.ac-delta .plus { color: var(--sage-ink); font-weight: 700; font-size: .82rem; padding: 1px 6px; border-radius: var(--r); background: var(--sage-wash); }
