/* Company · Calendar (#/company/calendar), the department Tasks and Agents
   cards, and the findings panel the Office borrows — see company-calendar.js.
   All of it wears the Company's night look (styles.css --night-*, the same
   tokens the Office reads): a night-blue ground, each agent its own colour on
   the left edge of its blocks, status always in words and an icon, never by
   colour alone. Green, amber and red are status colours and nothing else,
   and they are the admin's own (--up, --wait, --crit). */

.cc, .cc-agents, .cc-fp {
  --cc-ink: var(--night-ink);
  --cc-soft: var(--night-soft);
  --cc-dim: var(--night-dim);
  --cc-line: var(--night-line-2);
  --cc-line-2: var(--night-line-3);
  --cc-ice: var(--night-ice);
  --cc-ice-hi: var(--night-ice-hi);
  --cc-amber: var(--wait);
  --cc-red: var(--crit);
  --cc-ok: var(--up);
  --cc-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --cc-r: var(--r-sm);   /* every button's corners */
  --cc-bg: var(--night-bg);
  --cc-bar: var(--night-bar);
  --cc-card: var(--night-card);
  --cc-well: var(--night-well);
  --cc-field: var(--night-well);
}
.cc {
  container: cc / inline-size;
  display: flex; flex-direction: column;
  border: 1px solid var(--night-line); border-radius: var(--r-md); overflow: hidden;
  background: var(--cc-bg); color: var(--cc-ink); font-family: var(--font-sans); font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.cc *, .cc *::before, .cc *::after, .cc-agents *, .cc-agents *::before, .cc-agents *::after, .cc-fp *, .cc-fp *::before, .cc-fp *::after { box-sizing: border-box; }
/* The department cards (Tasks, Agents) are night cards too, like the Office and the Calendar. */
.card.cc-agents { background: var(--cc-card); border: 1px solid var(--night-line); border-radius: var(--r-md); color: var(--cc-ink); }
.cc-fp { color: var(--cc-ink); font-variant-numeric: tabular-nums; }
.cc-ic { flex: none; display: block; }
.cc-mono { font-family: var(--cc-mono); }
.cc-muted { color: var(--cc-dim); }
.cc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cc-kick { margin: 0; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--night-mute); }   /* small caps labels: one colour on every tab */
.cc-a { color: var(--cc-ice-hi); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.cc-a:hover { color: var(--cc-ink); }

/* ---- buttons ---- */
.cc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px;
  font: inherit; font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; color: var(--cc-ink); text-decoration: none; white-space: nowrap;
  background: var(--night-raise); border: 1px solid var(--cc-line-2); border-radius: var(--cc-r); padding: 6px 12px; cursor: pointer;
}
.cc-btn:hover:not(:disabled) { border-color: var(--cc-ice); }
.cc-btn:focus-visible, .cc-blk:focus-visible, .cc-li:focus-visible, .cc-a:focus-visible, .cc-note:focus-visible, .cc-p-h:focus-visible,
.cc-ferr:focus-visible, .cc-in:focus-visible, .cc input:focus-visible, .cc-agents input:focus-visible, .cc-menu-i:focus-visible { outline: 2px solid var(--cc-ice-hi); outline-offset: 2px; }
.cc-btn:disabled { opacity: 0.6; cursor: default; }
.cc-btn.is-primary { color: var(--night-on-ice); background: var(--cc-ice); border-color: var(--cc-ice); }
.cc-btn.is-primary:hover:not(:disabled) { background: var(--cc-ice-hi); }
.cc-btn.is-danger { border-color: color-mix(in srgb, var(--cc-red) 60%, transparent); }
.cc-btn.is-ghost { background: transparent; }
.cc-btn.is-sm { min-height: 28px; padding: 4px 10px; font-size: var(--fs-xs); }
.cc-btn.is-icon { width: 32px; padding: 0; }
.cc-do { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.cc-do-q { margin: 0; font-size: var(--fs-sm); line-height: 1.4; overflow-wrap: anywhere; }
.cc-do-b { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-werr { margin: 0; padding: 8px 10px; border-left: 3px solid var(--cc-red); background: color-mix(in srgb, var(--cc-red) 8%, transparent); border-radius: 0 6px 6px 0; font-size: var(--fs-sm); color: var(--cc-ink); }
/* a question a menu item asks: its own full-width line under the card's buttons */
.cc-ask { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--cc-r); background: var(--cc-well); border: 1px solid var(--cc-line-2); }
.cc-werr p, .cc-werr ul { margin: 0 0 4px; }
.cc-werr ul { padding-left: 18px; }
.cc-ok { margin: 0; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--cc-ok); }
.cc-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; background: var(--night-raise); border: 1px solid var(--cc-line-2); color: var(--cc-soft); }
.cc-tag.is-on { color: var(--cc-ok); border-color: color-mix(in srgb, var(--cc-ok) 45%, transparent); }
.cc-tag.is-off { color: var(--cc-dim); border-style: dashed; }
.cc-sw { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--night-mute)); }
.cc-sw.is-lg { width: 12px; height: 12px; }
.cc-sw.is-edge { width: 4px; height: 14px; border-radius: 2px; }   /* the agent's edge on a calendar block */

/* ---- header ---- */
.cc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 12px 20px; background: var(--cc-bar); border-bottom: 1px solid var(--night-line); }
.cc-head p { margin: 0; }
.cc-runs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.cc-runs b { font-size: var(--fs-base); font-weight: 600; }
.cc-runs span, .cc-tz { font-size: var(--fs-sm); color: var(--cc-dim); }
.cc-tz span { color: var(--cc-soft); }
.cc-runner { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-sm); color: var(--cc-soft); }
.cc-runner.is-warn { color: var(--wait); }   /* a Mac that can't run them: "waits on you", as on every tab */
/* what a runner says about itself (an older build, why it rests, its last error): one quiet line each */
.cc-runner-n { flex-basis: 100%; font-size: var(--fs-sm); color: var(--cc-soft); overflow-wrap: anywhere; }
.cc-pip { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--night-mute); }
.cc-pip.is-on { background: var(--cc-ice); box-shadow: 0 0 8px var(--cc-ice); }
.cc-paused { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--cc-ink); padding: 4px 10px; border: 1px solid rgba(230, 238, 248, 0.45); border-radius: 999px; }
/* the status line is company.js's (AdminCompany.statusLine): the same look on every tab, so nothing here restyles it */
.cc-head-st { flex-basis: 100%; min-width: 0; }
.cc-pause { margin-left: auto; }
.cc .co-pause { margin-left: 0; gap: 8px; }

/* ---- notices ---- */
.cc-notes { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px 0; }
.cc-note { margin: 0; padding: 8px 12px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--cc-ok) 8%, transparent); border: 1px solid color-mix(in srgb, var(--cc-ok) 35%, transparent); font-size: var(--fs-sm); color: var(--cc-ink); }
.cc-note.is-warn { background: color-mix(in srgb, var(--cc-amber) 8%, transparent); border-color: var(--wait-line); }
.cc-empty { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-md); background: var(--cc-card); border: 1px dashed var(--cc-line-2); }
.cc-empty.is-warn { border: 1px solid var(--wait-line); }
.cc-empty h2 { margin: 0; font-size: var(--fs-md); font-weight: 600; }
.cc-empty p { margin: 0; max-width: 70ch; line-height: 1.5; color: var(--cc-soft); }
.cc-warn { padding: 10px 14px; border-left: 3px solid var(--cc-amber); background: color-mix(in srgb, var(--cc-amber) 7%, transparent); border-radius: 0 10px 10px 0; font-size: var(--fs-sm); }
.cc-warn p, .cc-warn ul { margin: 0 0 4px; }
.cc-warn ul { padding-left: 18px; }
.cc-ro { margin: 0; font-size: var(--fs-sm); }

/* ---- the week navigation ---- */
.cc-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px 10px; }
.cc-week-t { margin: 0 0 0 6px; font-size: var(--fs-md); font-weight: 600; }
.cc-nav > .cc-btn.is-primary { margin-left: auto; }

/* ---- the body: the week, and the panel beside it (or above it, narrower) ---- */
.cc-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 0 20px 16px; align-items: start; }
.cc-main { min-width: 0; }
.cc-body.has-panel .cc-panel { order: -1; max-width: 760px; }
@container cc (min-width: 1100px) {
  .cc-body.has-panel { grid-template-columns: minmax(0, 1fr) 380px; }
  .cc-body.has-panel .cc-panel { order: 0; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
}

/* ---- the grid ---- */
.cc-grid { container: ccgrid / inline-size; border: 1px solid var(--cc-line); border-radius: var(--r-sm); overflow: hidden; background: var(--night-floor); }
/* narrow columns: a little less padding, so the title keeps its room */
@container ccgrid (max-width: 1040px) { .cc-blk { padding-left: 6px; } }
.cc-gh, .cc-gb { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.cc-gh { border-bottom: 1px solid var(--cc-line); background: var(--cc-bar); }
.cc-gh-d { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; padding: 8px 8px 7px; border-left: 1px solid var(--night-grid); min-width: 0; }
.cc-gh-w { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cc-dim); }
.cc-gh-n { font-size: 16px; font-weight: 600; }
.cc-gh-t { font-size: var(--fs-xs); font-weight: 600; color: var(--night-on-ice); background: var(--cc-ice); padding: 0 6px; border-radius: 999px; }
.cc-gh-d.is-today .cc-gh-w { color: var(--cc-ice-hi); }
.cc-gb { position: relative; height: calc(var(--hours) * var(--hour) + 20px); padding-top: 12px; }   /* room for 06:00 under the header line */
.cc-times { position: relative; }
.cc-hr { position: absolute; right: 6px; transform: translateY(-50%); font-family: var(--cc-mono); font-size: var(--fs-xs); color: var(--cc-dim); }
.cc-col {
  position: relative; border-left: 1px solid var(--night-grid); min-width: 0; cursor: cell;
  background-image: repeating-linear-gradient(to bottom, var(--night-grid) 0, var(--night-grid) 1px, transparent 1px, transparent var(--hour));
  background-size: 100% calc(var(--hours) * var(--hour)); background-repeat: no-repeat; height: calc(var(--hours) * var(--hour));
}
.cc-col:hover { background-color: rgba(90, 200, 250, 0.03); }
.cc-col.is-today { background-color: rgba(90, 200, 250, 0.045); }
.cc-col-in { position: absolute; inset: 0; }
.cc-now { position: absolute; left: -1px; right: 0; height: 0; border-top: 2px solid var(--cc-red); z-index: 3; pointer-events: none; }
.cc-now::before { content: ''; position: absolute; left: -4px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--cc-red); }
.cc-now-t { position: absolute; left: 8px; top: -19px; font-size: var(--fs-xs); font-weight: 700; color: var(--cc-red); background: var(--night-floor); padding: 0 4px; border-radius: 4px; }

/* A block: a neutral night fill, the agent as the 4px left edge (its colour
   is who, never how it went), the status as the icon and its colour. */
.cc-blk {
  position: absolute; z-index: 1; display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; overflow: hidden;
  padding: 4px 6px 3px 8px; text-align: left; font: inherit; font-size: var(--fs-xs); line-height: 1.3; color: var(--cc-ink); cursor: pointer;
  border-radius: 6px; border: 1px solid #263a5a;
  border-left: 4px solid var(--c);
  background: #101b2e;
}
.cc-blk > * { flex: none; }   /* clip from the bottom: the title never shrinks away */
.cc-blk:hover { border-color: #3c5580; border-left-color: var(--c); background: #13203a; z-index: 2; }
.cc-blk.is-sel { outline: 2px solid var(--cc-ink); outline-offset: 1px; z-index: 2; }
.cc-blk-t { display: flex; align-items: flex-start; gap: 4px; min-width: 0; }
.cc-blk-t > .cc-ic { margin-top: 1px; }
.cc-blk-tm { font-size: var(--fs-xs); color: var(--cc-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-blk-n { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 45 minutes and up: the title gets a second line */
.cc-blk:not(.is-short) .cc-blk-n { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
/* a narrow block (side by side with another): the title gets the room, the status and meeting icons go (the status is in its label and its panel) */
.cc-blk { container: ccblk / inline-size; }
@container ccblk (max-width: 64px) { .cc-blk-t > .cc-ic { display: none; } }
.cc-blk-s { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; color: var(--cc-soft); }
.cc-blk-w { font-weight: 600; }
.cc-blk-a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-st, .cc-kind { color: var(--cc-soft); }
.cc-blk.is-meeting { background: repeating-linear-gradient(135deg, #121e33 0 8px, #0e1829 8px 16px); }
.cc-blk.is-run { border-radius: 10px; }
.cc-blk.is-missed { border-style: dashed; border-left-style: solid; background: #0b1424; }
.cc-blk.is-failed .cc-st, .cc-blk.is-failed .cc-blk-w { color: var(--cc-red); }
.cc-blk.is-missed .cc-st, .cc-blk.is-missed .cc-blk-w { color: var(--cc-amber); }   /* missed is amber, as in Activity and on the task cards */
.cc-blk.is-done .cc-st, .cc-blk.is-ran .cc-st, .cc-blk.is-done .cc-blk-w, .cc-blk.is-ran .cc-blk-w { color: var(--cc-ok); }
.cc-blk.is-running .cc-st, .cc-blk.is-due .cc-st { color: var(--cc-ice-hi); }
.cc-blk.is-running { box-shadow: 0 0 0 1px var(--cc-ice), 0 0 12px rgba(90, 200, 250, 0.5); }
.cc-blk.is-off { border-style: dotted; border-left-style: solid; background: #0b1424; color: var(--cc-dim); }
.cc-blk.is-off .cc-blk-n { font-weight: 500; text-decoration: line-through; text-decoration-color: rgba(169, 187, 208, 0.6); }
.cc-blk.is-unknown { background: #0b1424; }
.cc-blk.is-skipped { background: #0b1424; }
.cc-blk.is-skipped .cc-st, .cc-blk.is-skipped .cc-blk-w { color: var(--cc-amber); }
.cc-ini { display: inline-flex; gap: 2px; }
.cc-ini-x { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 3px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; line-height: 1; color: var(--night-on-ice); background: var(--c); }

/* ---- the day list (phones) ---- */
.cc-days { display: none; flex-direction: column; gap: 14px; }
.cc-day-h { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-size: var(--fs-base); font-weight: 600; }
.cc-day-t { font-size: var(--fs-xs); font-weight: 600; color: var(--night-on-ice); background: var(--cc-ice); padding: 1px 7px; border-radius: 999px; }
.cc-day .cc-muted { margin: 0; font-size: var(--fs-sm); }
.cc-dl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cc-li {
  width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "time body" "st body"; gap: 2px 10px; align-items: start;
  padding: 8px 10px 8px 12px; text-align: left; font: inherit; font-size: 14px; color: var(--cc-ink); cursor: pointer;
  border-radius: var(--r-sm); border: 1px solid #263a5a; border-left: 4px solid var(--c);
  background: #101b2e;
}
.cc-li.is-sel { outline: 2px solid var(--cc-ink); outline-offset: 1px; }
.cc-li.is-missed { border-style: dashed; border-left-style: solid; }
.cc-li.is-off { border-style: dotted; border-left-style: solid; color: var(--cc-dim); }
.cc-li-time { grid-area: time; font-size: var(--fs-xs); color: var(--cc-soft); white-space: nowrap; padding-top: 2px; }
.cc-li-b { grid-area: body; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-li-n { display: flex; align-items: center; gap: 5px; font-weight: 600; overflow-wrap: anywhere; }
.cc-li-w { font-size: var(--fs-xs); color: var(--cc-soft); overflow-wrap: anywhere; }
.cc-li-s { grid-area: st; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--cc-soft); }
.cc-li.is-failed .cc-li-s { color: var(--cc-red); }
.cc-li.is-missed .cc-li-s { color: var(--cc-amber); }
.cc-li.is-done .cc-li-s, .cc-li.is-ran .cc-li-s { color: var(--cc-ok); }
.cc-li.is-skipped .cc-li-s { color: var(--cc-amber); }
.cc-li.is-running .cc-li-s, .cc-li.is-due .cc-li-s { color: var(--cc-ice-hi); }
@media (max-width: 640px) {
  .cc-grid { display: none; }
  .cc-days { display: flex; }
  .cc-head, .cc-nav { padding-left: 14px; padding-right: 14px; }
  .cc-notes { padding: 12px 14px 0; }
  .cc-body { padding: 0 14px 14px; }
  .cc-pause { margin-left: 0; }
  .cc-nav > .cc-btn.is-primary { margin-left: 0; }
  .cc-week-t { flex-basis: 100%; margin: 4px 0 0; order: 5; }
}

/* ---- the side panel ---- */
.cc-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 14px 16px 16px; border-radius: var(--r-md); background: var(--cc-card); border: 1px solid var(--cc-line-2); }
.cc-p-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cc-p-top > .cc-p-menu { margin-left: auto; }   /* the event's ⋯, beside the close button */
.cc-p-h { margin: -6px 0 0; font-size: var(--fs-md); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.cc-facts { margin: 0; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 7px 12px; font-size: var(--fs-sm); }
.cc-facts dt { color: var(--cc-dim); }
.cc-facts dd { margin: 0; overflow-wrap: anywhere; }
.cc-wholist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cc-who { display: flex; align-items: baseline; gap: 7px; }
.cc-who .cc-sw { transform: translateY(1px); }
.cc-who b { font-weight: 600; }
.cc-p-block { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cc-p-block > p { margin: 0; }
.cc-pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; color: var(--cc-soft); max-height: 220px; overflow-y: auto; }
.cc-result { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cc-result .cc-muted { margin: 0; font-size: var(--fs-xs); }
.cc-headline { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.cc-why { margin: 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--cc-ink); overflow-wrap: anywhere; }
.cc-props { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cc-prop { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--cc-well); border: 1px solid var(--cc-line); }
.cc-prop-h { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cc-prop-h b { font-weight: 600; overflow-wrap: anywhere; }
.cc-prop-w { margin: 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--cc-soft); overflow-wrap: anywhere; }
.cc-prop .cc-muted { margin: 0; font-size: var(--fs-sm); }

/* ---- forms ---- */
.cc-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cc-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; position: relative; }
.cc-f-l { font-size: var(--fs-sm); font-weight: 600; color: var(--cc-ink); padding: 0; }
.cc-f-h { margin: 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--cc-dim); }
.cc-f-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.cc-in {
  width: 100%; min-width: 0; min-height: 36px; padding: 7px 10px; border-radius: var(--r-sm);
  font: inherit; font-size: 14px; color: var(--cc-ink); background: var(--cc-field); border: 1px solid var(--cc-line-2); color-scheme: dark;
}
.cc-in:disabled { opacity: 0.7; }
.cc-ta { resize: vertical; line-height: 1.45; min-height: 96px; }
.cc-in::placeholder { color: var(--night-mute); }
.cc-count { align-self: flex-end; font-size: var(--fs-xs); color: var(--cc-dim); }
.cc-fs { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cc-fs legend { margin-bottom: 6px; }
.cc-seg { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cc-radio, .cc-check { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-sm); cursor: pointer; min-height: 28px; }
.cc-radio.is-block { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--cc-line); }
.cc-radio.is-block input { margin-top: 3px; }
.cc-radio.is-block > span { display: flex; flex-direction: column; gap: 2px; }
.cc-radio b { font-weight: 600; }
.cc-radio input, .cc-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--cc-ice); flex: none; }
.cc-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cc-wd { gap: 6px; }
.cc-chip { padding: 2px 10px 2px 8px; border-radius: 999px; border: 1px solid var(--cc-line-2); }
.cc-chip:has(input:checked) { border-color: var(--cc-ice); background: rgba(90, 200, 250, 0.1); }
.cc-ferr { padding: 8px 10px; border-left: 3px solid var(--cc-red); background: color-mix(in srgb, var(--cc-red) 8%, transparent); border-radius: 0 6px 6px 0; font-size: var(--fs-sm); }
.cc-ferr p, .cc-ferr ul { margin: 0 0 4px; }
.cc-ferr ul { padding-left: 18px; }
.cc-f-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- legend ---- */
.cc-legend { display: flex; flex-wrap: wrap; gap: 14px 32px; padding: 12px 20px 14px; border-top: 1px solid var(--night-line); background: var(--cc-bar); }
.cc-lg { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cc-lg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-sm); }
.cc-lg-list li { display: inline-flex; align-items: center; gap: 6px; }
.cc-lg-list b { font-weight: 600; }
.cc-lg-mk { display: inline-grid; place-items: center; width: 18px; height: 16px; border-radius: 4px; border: 1px solid #5b7193; background: #0b1424; color: var(--cc-ink); }
.cc-lg-st.is-done .cc-lg-mk { color: var(--cc-ok); }
.cc-lg-st.is-skipped .cc-lg-mk, .cc-lg-st.is-missed .cc-lg-mk { color: var(--cc-amber); }
.cc-lg-st.is-failed .cc-lg-mk { color: var(--cc-red); }
.cc-lg-st.is-missed .cc-lg-mk { border-style: dashed; }
.cc-lg-st.is-off .cc-lg-mk { border-style: dotted; }
.cc-lg-st.is-running .cc-lg-mk { border-color: var(--cc-ice); box-shadow: 0 0 6px rgba(90, 200, 250, 0.6); }
.cc-lg-mk.is-plain { border: 0; background: none; }
.cc-lg-h { margin: 0; max-width: 70ch; font-size: var(--fs-xs); line-height: 1.45; color: var(--cc-dim); }
@media (max-width: 640px) { .cc-legend { padding: 12px 14px; } }

/* ---- the Agents card (department tabs, the CEO desk): night cards, one inside the other ---- */
.cc-agents .co-meta, .cc-agents .co-empty { color: var(--cc-dim); }
.cc-agents .co-empty a { color: var(--cc-ice-hi); }
.cc-ag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cc-ag { border-radius: var(--r-md); background: var(--cc-well); border: 1px solid var(--cc-line); padding: 12px 14px; min-width: 0; }
.cc-ag.is-off { border-style: dashed; }
.cc-ag-in { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* the name and its chips on the left, the ⋯ menu in the top right corner */
.cc-ag-h { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.cc-ag-hl { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cc-ag-n { margin: 0; font-size: var(--fs-base); font-weight: 600; overflow-wrap: anywhere; }
.cc-ag-nr { display: flex; align-items: center; gap: 8px; min-width: 0; }   /* the colour square and the name wrap as one */
.cc-ag-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cc-ag-role { margin: 0; font-size: 14px; line-height: 1.45; color: var(--cc-soft); max-width: 72ch; overflow-wrap: anywhere; }
.cc-ag-sched { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-sm); }
.cc-ag-sched li::before { content: '◷'; margin-right: 6px; color: var(--cc-dim); }
.cc-ag-last { margin: 0; font-size: var(--fs-sm); color: var(--cc-dim); overflow-wrap: anywhere; }
.cc-ag-acts { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.cc-ag-new { display: flex; }
.cc-agents .cc-a:focus-visible, .cc-agents .cc-btn:focus-visible, .cc-agents .cc-in:focus-visible, .cc-agents .cc-note:focus-visible, .cc-agents .cc-ferr:focus-visible,
.cc-fp .cc-a:focus-visible, .cc-fp .cc-btn:focus-visible { outline: 2px solid var(--cc-ice-hi); outline-offset: 2px; }
.cc-ag-form { padding: 2px 0; }
.cc-agents .cc-in { background: var(--cc-field); border-color: var(--cc-line-2); }
.cc-agents .cc-radio.is-block { border-color: var(--cc-line); }

/* ---- the ⋯ menu on a card ---- */
.cc-menu { position: relative; flex: none; }
.cc-menu-b { font-size: var(--fs-md); line-height: 1; color: var(--cc-soft); border-color: transparent; }
.cc-menu-b[aria-expanded="true"] { color: var(--cc-ink); background: var(--night-raise); border-color: var(--cc-line-2); }
.cc-menu-list {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 176px; padding: 4px;
  display: flex; flex-direction: column; background: var(--cc-card); border: 1px solid var(--cc-line-2); border-radius: var(--cc-r);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}
.cc-menu-i {
  display: block; width: 100%; min-height: 36px; padding: 8px 12px; text-align: left; font: inherit; font-size: 14px; font-weight: 500;
  color: var(--cc-ink); background: transparent; border: 0; border-radius: var(--cc-r); cursor: pointer;
}
.cc-menu-i:hover, .cc-menu-i:focus-visible { background: var(--night-raise); }
.cc-menu-i.is-danger { color: var(--cc-red); }

/* ---- the Tasks card (department tabs): ready-made tasks, hiring with a task ---- */
.cc-starters { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-starters .cc-btn { white-space: normal; text-align: left; }
.cc-starters .cc-btn.is-picked { border-color: var(--cc-ice); background: rgba(90, 200, 250, 0.12); }
.cc-tk-hire { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px dashed var(--cc-line-2); }
.cc-tk-time { max-width: 160px; }

/* a task's status line: what happened at its last time, in words (the colour only repeats it) */
.cc-tk-st { margin: 0; padding: 7px 10px; border-radius: var(--r-sm); font-size: var(--fs-sm); line-height: 1.4; border-left: 3px solid var(--cc-line-2); background: rgba(255, 255, 255, 0.03); color: var(--cc-ink); overflow-wrap: anywhere; }
.cc-tk-st.is-run { border-left-color: var(--cc-ice); }
.cc-tk-st.is-warn { border-left-color: var(--cc-amber); background: color-mix(in srgb, var(--cc-amber) 7%, transparent); }
.cc-tk-st.is-bad { border-left-color: var(--cc-red); background: color-mix(in srgb, var(--cc-red) 7%, transparent); }
/* why Run now can't be pressed, under it, for everyone (a tooltip never shows on a phone) */
.cc-tk-why { margin: -2px 0 0; font-size: var(--fs-sm); color: var(--cc-dim); }
.cc-tk-why.is-all { margin: 0; padding: 8px 12px; border-radius: var(--r-sm); border-left: 3px solid var(--cc-amber); background: color-mix(in srgb, var(--cc-amber) 6%, transparent); color: var(--cc-ink); }
.cc-tk-foot { margin: 0; font-size: var(--fs-sm); color: var(--cc-dim); }
.cc-tk-cost { margin: 0; font-size: var(--fs-xs); color: var(--cc-dim); }
.cc-tag.is-amber { color: var(--cc-amber); border-color: color-mix(in srgb, var(--cc-amber) 50%, transparent); }
.cc-tk-ins > summary, .cc-rep-old > summary, .cc-rep-more > summary, .cc-fd-done > summary { cursor: pointer; font-size: var(--fs-sm); color: var(--cc-dim); padding: 2px 0; }
.cc-tk-ins > summary:focus-visible, .cc-rep-old > summary:focus-visible, .cc-rep-more > summary:focus-visible, .cc-fd-done > summary:focus-visible { outline: 2px solid var(--cc-ice-hi); outline-offset: 2px; }
.cc-tk-ins .cc-ag-role { margin-top: 6px; white-space: pre-wrap; }
.cc-rep-old { display: flex; flex-direction: column; gap: 8px; }
.cc-rep-old[open] > .cc-rep { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--cc-line); }

/* what a run found */
.cc-rep { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cc-rep-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cc-rep-h h4 { margin: 0; font-size: 14px; font-weight: 600; }
.cc-rep-h .co-meta { color: var(--cc-dim); white-space: normal; }
.cc-rep-more > summary b { font-weight: 600; color: var(--cc-ink); }
.cc-md { margin-top: 6px; font-size: 14px; line-height: 1.5; max-width: 72ch; overflow-wrap: anywhere; }
.cc-md a { color: var(--cc-ice-hi); }
.cc-fd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cc-fd-done .cc-fd-list { margin-top: 8px; }
.cc-fd { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--cc-line); background: rgba(255, 255, 255, 0.02); min-width: 0; }
.cc-fd-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.cc-fd-t { font-size: 14px; font-weight: 600; color: var(--cc-ink); overflow-wrap: anywhere; }
a.cc-fd-t { color: var(--cc-ice-hi); text-decoration: underline; text-underline-offset: 2px; }
a.cc-fd-t:focus-visible { outline: 2px solid var(--cc-ice-hi); outline-offset: 2px; }
.cc-fd-site { font-size: var(--fs-xs); color: var(--cc-dim); }
.cc-fd-ask { margin: 0; font-size: var(--fs-sm); color: var(--cc-soft); overflow-wrap: anywhere; }
.cc-fd-reply { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--cc-field); border: 1px solid var(--cc-line); }
.cc-fd-rt { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 72ch; }
.cc-fd-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cc-fd-fb { margin: 0; font-size: var(--fs-sm); color: var(--cc-soft); }
/* the hidden field Copy and open copies from (it lives on <body> for a moment) */
.cc-copy { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }
/* a marked one, on one line: "✓ Posted · its title · Undo" */
.cc-fd.is-marked { padding: 6px 8px 6px 12px; background: transparent; }
.cc-fd-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cc-fd-ok { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); font-weight: 600; color: var(--cc-ok); }
.cc-fd-ok.is-skip { color: var(--cc-dim); }
.cc-fd-t.cc-fd-mt { flex: 1 1 auto; min-width: 0; font-size: var(--fs-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
span.cc-fd-mt { color: var(--cc-dim); }
.cc-fd-line .cc-btn { flex: none; margin-left: auto; }

/* ---- the findings panel (the Office's to-do borrows it) ---- */
.cc-fp-in { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cc-fp-g { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cc-fp-g .co-meta { font-size: var(--fs-sm); color: var(--cc-dim); }
.cc-fp-more, .cc-fp-empty, .cc-fp-pos, .cc-fp-done { margin: 0; font-size: var(--fs-sm); color: var(--cc-soft); }
.cc-fp-pos b { color: var(--cc-ink); font-weight: 600; }
.cc-fp-done { color: var(--cc-ok); font-weight: 600; }
.cc-fp-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cc-fp-all { margin-left: auto; font-size: var(--fs-sm); }

/* ---- phones: every button a thumb can hit (44px) ---- */
@media (max-width: 640px) {
  .cc-btn, .cc-btn.is-sm { min-height: 44px; padding: 10px 14px; font-size: var(--fs-sm); }
  .cc-btn.is-sm { padding: 10px 12px; }   /* a finding's three buttons on one row */
  .cc-btn.is-icon { width: 44px; padding: 0; }
  .cc-menu-i { min-height: 44px; }
  .cc-radio, .cc-check { min-height: 44px; }
  .cc-do-b, .cc-ag-acts, .cc-fd-acts, .cc-fp-nav { gap: 8px; }
  .cc-tk-ins > summary, .cc-rep-old > summary, .cc-rep-more > summary, .cc-fd-done > summary { margin: 0; padding: 13px 0; line-height: 18px; }   /* 44px, without styles.css's summary margins */
  .cc-rep-old:not([open]) { gap: 0; }
  /* collapsed ones in a row: 44px each, without the card's gap between them on top */
  .cc-ag-in > details + details, .cc-rep > details + details, .cc-ag-in > .cc-rep:has(> details:last-child) + details { margin-top: -8px; }
  /* a link in a card's line of text (an agent's last run): a 44px tap */
  .cc-agents .cc-ag-last .cc-a { padding: 14px 0; }
  .cc-fd-line { flex-wrap: wrap; }
  .cc-fp-all { margin-left: 0; flex-basis: 100%; padding: 10px 0; }
}
