/* ==========================================================================
   admin/css/core-state.css — the core's ten states (G4 B040, 3 Nov 2026;
   admin/js/core-state.mjs, docs/design/B040-core-states.md).

   The canonical ō beside its words. The script draws the pose (a transform,
   a dash, a radius) and each part's ink as a solid colour mixed from these
   tokens, read through the probes below: no opacity, no glow, no style
   attribute (the Office's OF-02, and the drawer's "no inline style").

   The inks, by surface (the Office's --o- tokens, the account's --ac- and --u- ones;
   the canonical --tk- tokens of g4-tokens take their place when they land):
     --core-ink    the mark
     --core-quiet  the bar while the line is out with someone else
     --core-off    the whole mark with no connection
     --core-track  preparing's drained ring under the share done
     --core-attn   the one attention dot (a state's mark: amber)
     --core-words  its words
   ========================================================================== */

.tk-core {
  --core-size: 28px;
  --core-ink: CanvasText;
  --core-quiet: GrayText;
  --core-off: GrayText;
  --core-track: GrayText;
  --core-attn: Highlight;
  --core-words: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--core-size);
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
  color: var(--core-words);
}
.tk-core[data-size="24"] { --core-size: 24px; }
.tk-core[data-size="20"] { --core-size: 20px; }
.tk-core[data-size="64"] { --core-size: 64px; }
.tk-core[data-size="160"] { --core-size: 160px; }
/* The drawing takes no pointer and no focus: nothing it does can stand in the way of a click or a key. */
.tk-core__mark {
  flex: none;
  display: block;
  height: var(--core-size);
  width: calc(var(--core-size) * 176 / 204);
  overflow: visible;
  pointer-events: none;
  color: var(--core-ink);
}
.tk-core__w { min-width: 0; overflow-wrap: anywhere; }
.tk-core__w[hidden] { display: none; }
.tk-core__probes { display: none; }
.tk-core__p--ink { color: var(--core-ink); }
.tk-core__p--quiet { color: var(--core-quiet); }
.tk-core__p--off { color: var(--core-off); }
.tk-core__p--track { color: var(--core-track); }
.tk-core__p--attn { color: var(--core-attn); }

/* ---- the Office: its stage's tokens, light and dark (mode-switch.css flips them) ---- */
#office .tk-core {
  --core-ink: var(--o-text);
  --core-quiet: var(--o-faint);
  --core-off: var(--o-faint);
  --core-track: var(--o-line-3);
  /* the attention ink, not the pill's lighter mark: the dot is the cue, so it keeps 3:1 on the light sheet too */
  --core-attn: var(--o-warn-ink);
  --core-words: var(--o-dim);
  font: 500 var(--o-t-sm)/1.4 var(--body);
}
/* A mission's status line (missions.html, spec §4.3), under its heading: the core and what it is doing, in one line's
   height. It says what the heading's pill said, more exactly ("Drafting a reply · 1 of 5 steps done" for "Running"),
   so while it is there the pill steps aside (it stays in the page, and on every row). Its words keep the pill's tone. */
#office .ms-core { display: flex; align-items: center; min-height: 28px; margin: 0 0 12px; }
#office .ms-d__head:has(+ .ms-core .tk-core:not([data-refused])) > .ms-st { display: none; }
#office .tk-core[data-tone="attn"] .tk-core__w { color: var(--o-warn-ink); }
#office .tk-core[data-tone="ok"] .tk-core__w { color: var(--o-ok); }
#office .tk-core[data-tone="bad"] .tk-core__w { color: var(--o-bad); }
/* The brief's (brief.html), at the top of Today. */
#office .bf-core { display: flex; align-items: center; min-height: 28px; margin: 0 0 8px; }

/* ---- the client's account: Ask tkati's drawer ---- */
.ac-at .tk-core {
  --core-ink: var(--ac-text-hi);
  --core-quiet: var(--ac-muted-2);
  --core-off: var(--ac-muted-2);
  --core-track: var(--u-line-2, var(--ac-muted-2));
  --core-attn: var(--ac-attn);
  --core-words: var(--ac-muted);
  font: 500 12.5px/1.4 var(--ac-body);
}
.ac-at__core { display: flex; align-items: center; min-height: 24px; margin: 8px 0 0; }

/* Forced colours: the system's own inks, whatever the script mixed. */
@media (forced-colors: active) {
  .tk-core__ring, .tk-core__bar { stroke: CanvasText !important; }
  .tk-core__track { stroke: GrayText !important; }
  .tk-core__dot { fill: Highlight !important; }
}
