/* Action center (#actions, actions.js): the app's own tokens (app.css), so light and dark follow the theme. Each
   owner role has a color on the card's edge and a written label, so none is told by color alone. */
:root { --ac-eng: #1f4f8f; --ac-owner: #8a5300; --ac-code: #6a3fa0; --ac-time: #5a667b; --ac-blocked: #a5182f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ac-eng: #7fb0ec; --ac-owner: #ffc56e; --ac-code: #c6a6f2; --ac-time: #9aa6ba; --ac-blocked: #ff95a5; } }
:root[data-theme="dark"] { --ac-eng: #7fb0ec; --ac-owner: #ffc56e; --ac-code: #c6a6f2; --ac-time: #9aa6ba; --ac-blocked: #ff95a5; }
.r-engineering { --ac: var(--ac-eng); } .r-owner { --ac: var(--ac-owner); } .r-code_owner { --ac: var(--ac-code); }
.r-time { --ac: var(--ac-time); } .r-blocked { --ac: var(--ac-blocked); }

.acsrc { margin: 0 0 14px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.acsrc .kok { color: var(--k-pass-ink); font-weight: 600; }
.acstats { display: flex; flex-wrap: wrap; gap: 12px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.acstats div { min-width: 0; flex: 1 1 140px; }
.acstats b { display: block; font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.acstats span { font-size: 12.5px; color: var(--muted); }

.acbar { align-items: flex-start; position: static; } /* tall with the role choices: it does not stick */
.acroles { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 13px; min-width: 0; }
.acroles legend { float: left; margin-right: 10px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.acroles label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.toolbar .acroles input { flex: none; min-width: 0; padding: 0; margin: 0; }

.acgroup { margin-top: 26px; }
.acgroup > header h2 { font-size: 20px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.acgroup > header h2::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--ac); align-self: center; }
.acgroup > header p { margin: 4px 0 10px; font-size: 13.5px; }
.aclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.acitem { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ac); border-radius: 10px; padding: 14px 16px; min-width: 0; overflow-wrap: anywhere; scroll-margin-top: 80px; }
.acitem.isdone { opacity: .82; }
.achead { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.achead h3 { font-size: 16px; font-weight: 700; }
.acimpact { flex: none; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--ac); color: var(--ink); background: var(--bg); white-space: nowrap; }
.acimpact b { font-variant-numeric: tabular-nums; }
.acmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; font-size: 13px; }
.acgreen { color: var(--k-pass-ink); font-weight: 600; }
.acnext { color: var(--muted); }
.acdep { color: var(--muted); }
.achow { margin: 8px 0; font-size: 14px; }
.acsteps { margin: 0 0 8px; padding-left: 20px; font-size: 13.5px; }
.aclinks { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 8px 0; }
.aclink { font-size: 13px; font-weight: 600; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; background: var(--bg); }
.aclink:hover { border-color: var(--accent); }
.acksis { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.acksi { font-family: var(--f-mono); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--bg); }
.acksi.green { border-color: var(--k-pass); box-shadow: inset 0 0 0 1px var(--k-pass); }
.acksi.green::before { content: "✓ "; color: var(--k-pass-ink); }
.acwhy { font-size: 13px; margin: 6px 0; }
.acwhy summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.acwhy ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.acdetail { display: block; color: var(--muted); }
.acwhy code { display: block; font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }

.acnote { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.acnstate { margin: 0 0 8px; font-size: 13px; padding: 6px 10px; border-radius: 6px; background: var(--accent-soft); }
.acnstate.done { background: var(--ok-soft); }
.acnstate.again { background: var(--warn-soft); }
.acntext { display: block; margin-top: 2px; font-style: italic; }
.acnform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acnform input { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); flex: 1 1 200px; min-width: 0; }
.btn.sm { font-size: 13px; padding: 5px 12px; }

/* The KSIs page: how many action items each failing KSI has, linking here. */
.kacts { display: inline-block; margin-top: 4px; font-weight: 600; }
.kacbanner { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--k-failing); border-radius: 8px; padding: 10px 16px; margin: 0 0 16px; font-size: 13.5px; }

@media (max-width: 600px) {
  .achead { flex-direction: column; }
  .acitem { padding: 12px; }
  .acstats b { font-size: 24px; }
  .acroles { flex-direction: column; align-items: flex-start; }
  .acroles legend { float: none; margin-bottom: 4px; }
}
