/* ==========================================================================
   AGENTS — the page (agents.html), agents-map-scorecard, 13 Nov 2026.

   Additions only, on the Office's own system: every colour, size and radius is office.css's token (--o-*), which
   the pro theme points at the light sheet, the dark switch at the posts' black, and the classic theme at the dark
   two-tone (P4). No hand-written colour, so all three read without a dark copy of this file. A lane's track is a
   mission-graph graph and takes mission-graph.css as it is (no lime, nothing travelling). Colour only for state,
   and never only colour: each state is a word too (P24). The one lime is the one action, Fix (P7, P26). No
   transition; the only motion is a step that moved settling once, inside prefers-reduced-motion: no-preference
   (mission-graph.css). The CSP refuses style="" attributes: everything is here, by class.
   ========================================================================== */

#office .ag-boot { margin: 0 0 1.25rem; color: var(--o-dim); font-size: var(--o-t-md); font-weight: 550; line-height: 1.5; }
#office .ag-boot .ofc-ghost { margin-left: 0.5rem; }
#office .ag-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
#office .ag-body[hidden] { display: none; }

/* ---------- the two cards: the week, the map ---------- */
#office .ag-card {
  min-width: 0;
  padding: 20px var(--o-pad-x, 24px) 24px;
  background: var(--o-plane, var(--tk-grey-14));
  border: 1px solid var(--o-plane-edge, var(--tk-grey-23));
  border-radius: var(--o-r-lg);
  box-shadow: var(--o-depth, none);
  --o-bg: var(--o-plane, var(--tk-grey-14));
}
#office .ag-card__bar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem 1rem; margin: 0 0 0.75rem; }
#office .ag-card__bar > div { min-width: 0; }
#office .ag-card h2 { margin: 0; font-family: var(--display); font-size: var(--o-t-lg); font-weight: 650; letter-spacing: -0.012em; line-height: 1.2; color: var(--o-text); }
#office .ag-sub { margin: 4px 0 0; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.45; }
#office .ag-state { margin: 0 0 0.75rem; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office .ag-state:empty { display: none; }
#office .ag-live { margin: 2px 0 0; color: var(--o-faint); font-size: var(--o-t-xs); line-height: 1.45; font-variant-numeric: tabular-nums; }
#office .ag-again { margin: 0.75rem 0 0; display: flex; gap: 0.5rem; }
#office .ag-again[hidden], #office .ag-again [hidden] { display: none; }
#office .ag-fix { min-height: 36px; display: inline-flex; align-items: center; padding: 0 1rem; border-radius: var(--o-r-sm, var(--tk-r-md)); text-decoration: none; }
#office .ag-fix[hidden] { display: none; }
#office .ag-fix:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 2px; }

/* ---------- a number: the agent's, the same in its tile and its lane ---------- */
#office .ag-num {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 4px;
  box-sizing: border-box;
  border: 1px solid var(--o-line-3);
  border-radius: var(--tk-r-sm);
  color: var(--o-dim);
  font-size: var(--o-t-xs);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ---------- the week's tiles ---------- */
#office .ag-overdue { margin: 0 0 0.75rem; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office .ag-overdue[hidden] { display: none; }
#office .ag-overdue[data-state="slipped"] { color: var(--o-bad); }
#office .ag-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
#office .ag-tile { min-width: 0; padding: 8px 12px; border: 1px solid var(--o-line-2); border-radius: var(--o-r-sm, var(--tk-r-md));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who fig" "m m" "was was"; gap: 4px 12px; align-content: start; }
#office .ag-tile[data-state="slipped"] { border-color: var(--o-bad-mark); }
#office .ag-tile__who { grid-area: who; margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
#office .ag-tile__name { min-width: 0; color: var(--o-text); font-size: var(--o-t-sm); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 24px; line-height: 24px; }
#office .ag-tile__name:hover { text-decoration: underline; text-underline-offset: 2px; }
#office .ag-tile__name:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 1px; border-radius: var(--tk-r-2xs); }
#office .ag-tile__fig { grid-area: fig; margin: 0; align-self: center; color: var(--o-text); font: 400 1.25rem/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#office .ag-tile[data-state="slipped"] .ag-tile__fig { color: var(--o-bad); }
#office .ag-tile[data-state="not_enough"] .ag-tile__fig { color: var(--o-faint); }
#office .ag-tile__m { grid-area: m; margin: 0; color: var(--o-dim); font-size: var(--o-t-xs); line-height: 1.45; }
#office .ag-tile__was { grid-area: was; margin: 0; color: var(--o-dim); font-size: var(--o-t-xs); line-height: 1.45; }
#office .ag-tile__st { font-weight: 650; color: var(--o-text); }
#office .ag-tile[data-state="slipped"] .ag-tile__st { color: var(--o-bad); }
#office .ag-tile[data-state="better"] .ag-tile__st { color: var(--o-ok); }
#office .ag-tile[data-state="not_enough"] .ag-tile__st { color: var(--o-dim); font-weight: 550; }

#office .ag-tiles[hidden], #office .ag-more[hidden] { display: none; }
#office .ag-tiles + .ag-more { margin-top: 0.75rem; }
#office .ag-more__s { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 600; cursor: pointer; list-style: none; }
#office .ag-more__s::-webkit-details-marker { display: none; }
#office .ag-more__s::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); margin-right: 2px; }
#office .ag-more[open] > .ag-more__s::before { transform: rotate(45deg); }
#office .ag-more__s:hover { color: var(--o-text); }
#office .ag-more__s:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 2px; border-radius: var(--tk-r-2xs); }
#office .ag-more[open] > .ag-tiles { margin-top: 0.5rem; }

/* ---------- the map: groups, then lanes ---------- */
#office .ag-groups { display: grid; gap: 1.5rem; }
#office .ag-group__h { margin: 0; display: flex; align-items: baseline; gap: 0.5rem; color: var(--o-text); font-size: var(--o-t-md); font-weight: 650; }
#office .ag-group__n { color: var(--o-faint); font-size: var(--o-t-xs); font-weight: 500; font-variant-numeric: tabular-nums; }
#office .ag-group__line { margin: 2px 0 0.5rem; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.45; }
#office .ag-group__not { margin: 0 0 0.5rem; color: var(--o-warn-ink); font-size: var(--o-t-sm); line-height: 1.45; }
#office .ag-lanes { margin: 0; padding: 0; list-style: none; }
#office .ag-lane { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0 16px; border-top: 1px solid var(--o-line); min-width: 0; }
#office .ag-lane:first-child { border-top: 0; }
#office .ag-lane:focus { outline: none; }
#office .ag-lane:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 2px; }
#office .ag-lane__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 4px 12px; }
#office .ag-lane__head .ag-num { margin-top: 1px; }
#office .ag-lane__who { min-width: 0; }
#office .ag-lane__name { margin: 0; color: var(--o-text); font-size: var(--o-t-sm); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
#office .ag-lane__when { margin: 1px 0 0; color: var(--o-faint); font-size: var(--o-t-xs); line-height: 1.45; }
#office .ag-lane__st { margin: 1px 0 0; display: inline-flex; align-items: center; gap: 8px; color: var(--o-dim); font-size: var(--o-t-xs); font-weight: 600; line-height: 1.45; text-align: right; }
#office .ag-dot { width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; box-sizing: border-box; flex: none; }
#office .ag-lane__st[data-tone="live"] { color: var(--o-text); }
#office .ag-lane__st[data-tone="live"] .ag-dot, #office .ag-lane__st[data-tone="attn"] .ag-dot, #office .ag-lane__st[data-tone="bad"] .ag-dot, #office .ag-lane__st[data-tone="ok"] .ag-dot { background: currentColor; }
#office .ag-lane__st[data-tone="attn"] { color: var(--o-warn-ink); }
#office .ag-lane__st[data-tone="bad"] { color: var(--o-bad); }
#office .ag-lane__st[data-tone="ok"] { color: var(--o-ok); }
#office .ag-lane__st[data-tone="quiet"], #office .ag-lane__st[data-tone="wait"] { color: var(--o-dim); }
#office .ag-lane__more { margin: 0; color: var(--o-faint); font-size: var(--o-t-xs); line-height: 1.45; }
/* A lane's track sits under its name, from the number's edge: the same column at every width. */
#office .ag-track { margin: 2px 0 0 36px; }
#office .ag-track__none { margin: 0 0 0 36px; color: var(--o-faint); font-size: var(--o-t-sm); line-height: 1.45; }
#office .ag-track__cap { color: var(--o-dim); }
#office .ag-needs { margin: 0 0 0 36px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; }
#office .ag-need { color: var(--o-dim); font-size: var(--o-t-xs); line-height: 1.45; }
#office .ag-need[data-state="not_connected"] { color: var(--o-warn-ink); }
#office .ag-need::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; border: 1px solid currentColor; box-sizing: border-box; vertical-align: 1px; }
#office .ag-need[data-state="connected"]::before { background: currentColor; }

/* ---------- a step, opened in place under its lane ---------- */
#office .ag-step { margin: 8px 0 0 36px; padding: 8px 16px 12px; border: 1px solid var(--o-line-2); border-radius: var(--o-r-sm, var(--tk-r-md)); font-size: var(--o-t-sm); line-height: 1.5; }
#office .ag-step__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
#office .ag-step__h { margin: 0; color: var(--o-text); font-size: var(--o-t-sm); font-weight: 650; }
#office .ag-step__x { min-height: 28px; }
#office .ag-step__now { margin: 2px 0 0; color: var(--o-text); }
#office .ag-step__facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0; }
#office .ag-step__facts > dt { margin: 0; color: var(--o-faint); }
#office .ag-step__facts > dd { margin: 0; color: var(--o-text); overflow-wrap: anywhere; }
#office .ag-step__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
#office .ag-step__go { color: var(--o-text); text-underline-offset: 2px; }
#office .ag-step__go:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 1px; border-radius: var(--tk-r-2xs); }
#office .ag-step__meta { color: var(--o-faint); }

/* ON A DESK, A LANE IS ONE ROW: its number and name, its track, its word; what it needs and a step opened beneath
   the track. Every track starts at the same edge, so the lanes read as one map. */
@media (min-width: 1100px) {
  #office .ag-lane { grid-template-columns: 26px minmax(11rem, 15rem) minmax(0, 1fr) minmax(7rem, max-content); column-gap: 12px; row-gap: 2px; align-items: start; }
  #office .ag-lane__head { display: contents; }
  #office .ag-lane__head .ag-num { grid-column: 1; grid-row: 1; }
  #office .ag-lane__who { grid-column: 2; grid-row: 1 / span 2; }
  #office .ag-lane__st { grid-column: 4; grid-row: 1; justify-self: end; }
  #office :is(.ag-track, .ag-track__none) { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
  #office :is(.ag-needs, .ag-lane__more) { grid-column: 3 / span 2; margin: 0; }
  #office .ag-step { grid-column: 2 / -1; margin: 8px 0 0; }
}
@media (max-width: 560px) {
  #office .ag-card { padding: 16px 16px 20px; }
  #office .ag-tiles { grid-template-columns: minmax(0, 1fr); }
  #office .ag-lane__head { grid-template-columns: auto minmax(0, 1fr); }
  #office .ag-lane__st { grid-column: 2; text-align: left; }
  #office :is(.ag-track, .ag-track__none, .ag-needs, .ag-step) { margin-left: 0; }
  #office .ag-step__facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #office .ag-step__facts > dt:not(:first-child) { margin-top: 8px; }
}
/* ---------- ready automations (recipes-q74, 18 Nov 2026) ---------- */
#office .ag-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#office .ag-own { margin: 0 0 1.25rem; padding: 12px 16px 16px; border: 1px solid var(--o-line-2); border-radius: var(--o-r-sm, var(--tk-r-md)); }
#office .ag-own[hidden] { display: none; }
#office .ag-own__l { display: block; margin: 0 0 8px; color: var(--o-text); font-size: var(--o-t-sm); font-weight: 650; }
#office .ag-own__row { display: flex; gap: 8px; }
#office .ag-own__q { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px; box-sizing: border-box; border: 1px solid var(--o-line-3); border-radius: var(--o-r-sm, var(--tk-r-md));
  background: transparent; color: var(--o-text); font: inherit; font-size: var(--o-t-md); }
#office .ag-own__q::placeholder { color: var(--o-faint); }
#office .ag-own__q:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 1px; }
#office .ag-own__row .ofc-ghost { min-height: 44px; flex: none; }
#office .ag-own__out { margin: 12px 0 0; }
#office .ag-own__out[hidden] { display: none; }
#office .ag-own__on { margin: 8px 0 0; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office .ag-rcp-groups { display: grid; gap: 1.5rem; }
#office .ag-rcps { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 0.5rem; margin: 0.5rem 0 0; padding: 0; list-style: none; }
#office .ag-rcp { min-width: 0; padding: 12px 16px 16px; border: 1px solid var(--o-line-2); border-radius: var(--o-r-sm, var(--tk-r-md)); display: grid; gap: 8px; align-content: start; }
#office .ag-rcp[data-state="on"] { border-color: var(--o-line-3); }
#office .ag-rcp__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#office .ag-rcp__t { margin: 0; color: var(--o-text); font-size: var(--o-t-sm); font-weight: 650; line-height: 1.35; }
#office .ag-rcp__st { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--o-dim); font-size: var(--o-t-xs); font-weight: 600; }
#office .ag-rcp__st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; box-sizing: border-box; }
#office .ag-rcp[data-state="on"] .ag-rcp__st { color: var(--o-ok); }
#office .ag-rcp[data-state="on"] .ag-rcp__st::before { background: currentColor; }
#office .ag-rcp[data-state="paused"] .ag-rcp__st { color: var(--o-warn-ink); }
#office .ag-rcp__line { margin: 0; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.45; }
#office .ag-rcp__parts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; margin: 0; font-size: var(--o-t-xs); line-height: 1.45; }
#office .ag-rcp__parts > dt { margin: 0; color: var(--o-faint); }
#office .ag-rcp__parts > dd { margin: 0; color: var(--o-text); overflow-wrap: anywhere; }
/* The map's lane places its needs in a column of its own on a desk; a recipe keeps them in its one column. */
#office .ag-rcp .ag-rcp__needs { grid-column: auto; margin: 0; }
#office .ag-rcp__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
#office .ag-rcp__acts .ofc-ghost, #office .ag-rcp__on { min-height: 36px; }
#office .ag-rcp__on { padding: 0 14px; border: 1px solid var(--o-line-3); border-radius: var(--o-r-sm, var(--tk-r-md)); background: transparent; color: var(--o-text);
  font: inherit; font-size: var(--o-t-sm); font-weight: 650; cursor: pointer; }
#office .ag-rcp__on:hover:not(:disabled) { border-color: var(--o-text); }
#office .ag-rcp__on:disabled { color: var(--o-dim); cursor: default; }
#office .ag-rcp__on:focus-visible, #office .ag-rcp__try:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 2px; }
#office .ag-try { padding: 8px 12px; border-left: 2px solid var(--o-line-3); font-size: var(--o-t-xs); line-height: 1.5; }
#office .ag-try[hidden] { display: none; }
#office .ag-try[data-passed="yes"] { border-left-color: var(--o-ok); }
#office .ag-try[data-passed="no"] { border-left-color: var(--o-warn-ink); }
#office .ag-try__w { margin: 0; color: var(--o-text); }
#office .ag-try__drafts { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
#office .ag-try__d { display: grid; gap: 1px; }
#office .ag-try__a { color: var(--o-dim); overflow-wrap: anywhere; }
#office .ag-try__b { color: var(--o-text); overflow-wrap: anywhere; }

/* ---------- what each outcome cost ---------- */
#office .ag-segs { display: inline-flex; border: 1px solid var(--o-line-3); border-radius: var(--o-r-sm, var(--tk-r-md)); overflow: hidden; }
#office .ag-seg { min-height: 36px; padding: 0 12px; border: 0; background: transparent; color: var(--o-dim); font: inherit; font-size: var(--o-t-sm); font-weight: 600; cursor: pointer; }
#office .ag-seg + .ag-seg { border-left: 1px solid var(--o-line-3); }
#office .ag-seg[aria-pressed="true"] { color: var(--o-text); background: var(--o-line); }
#office .ag-seg:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: -2px; }
#office .ag-cost__wrap[hidden] { display: none; }
#office .ag-cost__t { width: 100%; border-collapse: collapse; font-size: var(--o-t-sm); font-variant-numeric: tabular-nums; }
#office .ag-cost__t th, #office .ag-cost__t td { padding: 8px 10px; text-align: right; border-top: 1px solid var(--o-line); vertical-align: top; }
#office .ag-cost__t thead th { border-top: 0; color: var(--o-faint); font-size: var(--o-t-xs); font-weight: 600; }
#office .ag-cost__t th:first-child { text-align: left; padding-left: 0; }
#office .ag-cost__name { color: var(--o-text); font-weight: 600; overflow-wrap: anywhere; }
#office .ag-cost__flag { color: var(--o-warn-ink); font-weight: 500; }
#office .ag-cost__t td { color: var(--o-text); }
#office .ag-cost__total th, #office .ag-cost__total td { border-top: 1px solid var(--o-line-3); font-weight: 650; }
#office .ag-cost__note { margin: 0.75rem 0 0; color: var(--o-dim); font-size: var(--o-t-xs); line-height: 1.5; }
#office .ag-cost__note:empty { display: none; }
@media (max-width: 560px) {
  #office .ag-rcps { grid-template-columns: minmax(0, 1fr); }
  #office .ag-own__row { flex-direction: column; }
  #office .ag-cost__t thead { display: none; }
  #office .ag-cost__t, #office .ag-cost__t tbody, #office .ag-cost__t tfoot, #office .ag-cost__t tr { display: block; }
  #office .ag-cost__t tr { padding: 8px 0; border-top: 1px solid var(--o-line); }
  #office .ag-cost__t th, #office .ag-cost__t td { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; border: 0; text-align: right; }
  #office .ag-cost__t th { text-align: left; }
  #office .ag-cost__t td::before { content: attr(data-label); color: var(--o-faint); text-align: left; }
  #office .ag-cost__total { border-top-color: var(--o-line-3); }
}

@media (forced-colors: active) {
  #office .ag-tile[data-state="slipped"] { border-color: Highlight; }
  #office .ag-num, #office .ag-step, #office .ag-tile { border-color: CanvasText; }
}
