/* Phase 4.3: honest hosts. The Steward panel's Switches stage, waiting and refused states on cards (a clock, never a
   working dot), the header's mismatch chip, the Overview's Channels block, Hermes version chips, and the Fleet's upkeep
   line and steward-upgrade strip. Roles from design/tokens.css only; no raw colour. No inner scroll boxes. */

/* ---------------------------------------------------------------- waiting and refused */
.chip-waiting .icon { width: 12px; height: 12px; }
.chip-honest { font-weight: 600; }
a.chip-link:hover { text-decoration: none; filter: brightness(1.04); }
.work-note { display: flex; align-items: flex-start; gap: var(--sp-2); color: var(--ink-2); font: var(--text-body-sm); max-width: 80ch; }
.work-note > .icon, .work-note > .glyph { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.work-note.is-waiting > .icon { color: var(--warn); }
.work-note b { color: var(--ink-1); font-weight: 600; }
.work-note.is-compact { font: var(--text-caption); }
.work-note.is-compact > .icon { width: 14px; height: 14px; margin-top: 1px; }
.work-link { white-space: nowrap; font-weight: 500; }
.work-host-note { display: block; margin-top: 2px; color: var(--ink-3); }
.work-host-note q { font-style: italic; }
.work-note.is-busy > .icon { color: var(--ink-3); }
.work-banner { align-items: center; }
.work-banner { flex-wrap: wrap; }
.work-banner > span { flex: 1 1 260px; min-width: 0; }
@media (max-width: 559px) { .work-banner > .btn { margin-left: calc(16px + var(--sp-3)); } }
.action-card.is-waiting { box-shadow: inset 0 0 0 1px var(--warn); }
.action-card .work-note { min-height: 36px; align-items: center; }
.actions-table .action-result .work-note { max-width: 44ch; }
.issue-queued.is-waiting { display: flex; align-items: flex-start; gap: var(--sp-2); }
.issue-queued.is-waiting > .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--warn); }
.read-body > .work-note { padding: var(--sp-2) 0; }

/* the mode bar when the host disagrees: managed here, report there (the bar never claims Olympus applies anything) */
.mode-bar.is-held { background: var(--warn-wash); border-color: var(--warn); }
.mode-bar.is-held .mode-bar-icon { color: var(--warn-ink); }
.mode-bar.is-held .mode-bar-text b { color: var(--warn-ink); }
.mode-bar-text .chip { height: 24px; padding: 0 9px; font: var(--text-caption); font-weight: 600; vertical-align: 1px; margin-right: 4px; }
.mode-bar-text .chip .icon { width: 12px; height: 12px; }
.mode-bar.is-held .mode-bar-text .chip { background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--warn); }

/* ---------------------------------------------------------------- the Switches stage */
.steward-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } /* Enrol, Grant, Install, Reporting, Switches */
@media (max-width: 479px) { .steward-steps .step { padding-right: 2px; } .steward-steps .step-time { overflow-wrap: anywhere; } }
.switches { display: grid; gap: var(--sp-3); max-width: 80ch; scroll-margin-top: var(--sp-6); }
.switches:focus { outline: none; }
.switches:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--r-md); }
.switches-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); }
.switches-head .muted { font: var(--text-body-sm); }
.switch-list { display: grid; border: 1px solid var(--line); border-radius: var(--r-md); }
.switch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-2) var(--sp-4); padding: var(--sp-3) var(--sp-4); }
.switch-row + .switch-row { border-top: 1px solid var(--line); }
.switch-row.is-needed { background: var(--warn-wash); }
.switch-row.is-needed:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.switch-row.is-needed:last-child { border-radius: 0 0 var(--r-md) var(--r-md); }
.switch-text { display: grid; gap: 2px; min-width: 0; }
.switch-name b { color: var(--ink-1); font-weight: 600; }
.switch-name .mono { font: var(--text-mono); font-size: 12px; }
.switch-help { color: var(--ink-2); font: var(--text-body-sm); }
.switch-row.is-needed .switch-help { color: var(--warn-ink); }
.switch-value { justify-self: end; }
.byhand { display: grid; gap: var(--sp-3); }
@media (max-width: 559px) {
  .switch-row { grid-template-columns: minmax(0, 1fr) auto; }
  .switch-row .switch-value { grid-column: 1; grid-row: 2; justify-self: start; }
  .switch-row .switch { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------------------------------------------------------------- Channels on the Overview */
.channels-card { padding: var(--sp-4) var(--sp-5); scroll-margin-top: var(--sp-6); }
.channels-card:focus { outline: none; }
.channels-card:focus-visible { box-shadow: var(--focus-ring); }
.channels-card .section-head { margin-bottom: var(--sp-3); }
.channels-card .section-head .muted { font: var(--text-body-sm); }
.chh-list { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); }
.chh-item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-2); }
.chh-item.is-off .chh-name b { color: var(--ink-3); font-weight: 500; }
.chh-item.is-down { flex-basis: 100%; background: var(--crit-wash); }
.chh-name b { color: var(--ink-1); font-weight: 600; }
.chh-detail { flex: 1 1 100%; color: var(--ink-1); font: var(--text-body-sm); }
.chh-detail .mono { font: var(--text-mono); font-size: 13px; }
.chh-next { display: block; margin-top: 2px; }
.chh-next b { font-weight: 600; }

/* ---------------------------------------------------------------- Hermes version */
.chip.is-behind { box-shadow: inset 0 0 0 1px var(--warn); }
.chip-behind { color: var(--warn-ink); font-weight: 600; }
.chips-row .hermes-up-btn { height: 26px; padding: 0 10px; font: var(--text-caption); font-weight: 500; }
.chips-row .hermes-up-btn .icon { width: 13px; height: 13px; }
.chip-ver { font-size: 11px; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--warn); }

/* ---------------------------------------------------------------- Fleet upkeep */
.upkeep-slot:empty, .upkeep[hidden] { display: none; }
.upkeep { display: grid; gap: var(--sp-3); margin: calc(-1 * var(--sp-2)) 0 var(--sp-5); }
.upkeep-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.upkeep-chip { height: 30px; padding: 0 12px; cursor: pointer; font: var(--text-body-sm); color: var(--ink-2); background: transparent; border: 0; }
.upkeep-chip b { color: var(--ink-1); font-weight: 600; }
.upkeep-chip .glyph { width: 10px; height: 10px; }
.upkeep-pop { padding: var(--sp-3) var(--sp-4); display: grid; gap: var(--sp-2); }
.upkeep-pop-head { font: var(--text-body-sm); color: var(--ink-2); }
.upkeep-pop-list { display: grid; gap: var(--sp-1); }
.upkeep-pop-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 var(--sp-2); font: var(--text-body-sm); }
.upkeep-pop-list li > :last-child { grid-column: 1 / -1; font: var(--text-caption); }
.upkeep-confirm { display: grid; gap: var(--sp-1); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); font: var(--text-body-sm); }
.upkeep-confirm li { display: flex; flex-wrap: wrap; gap: 0 var(--sp-3); }
.upkeep-confirm .mono { font: var(--text-mono); font-size: 12px; }
.upkeep-strip { display: grid; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); }
.upkeep-strip.is-crit { box-shadow: inset 3px 0 0 var(--crit), var(--shadow-1); }
.upkeep-strip-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); }
.upkeep-strip-head .muted { font: var(--text-body-sm); flex: 1; }
.upkeep-meter { height: 6px; border-radius: var(--r-pill); background: var(--meter-track); overflow: hidden; }
.upkeep-meter-fill { display: block; height: 100%; width: var(--fill, 0%); background: var(--accent-fill); transition: width var(--dur-3) var(--ease-out); }
.upkeep-strip.is-crit .upkeep-meter-fill { background: var(--crit); }
.upkeep-runs { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.upkeep-run { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); font: var(--text-body-sm); }
.upkeep-run a { font-weight: 600; }
.upkeep-run.is-current a { color: var(--ink-1); }
.upkeep-err { flex-basis: 100%; color: var(--crit-ink); }
.upkeep-skip { font: var(--text-body-sm); }
.upkeep-skip .icon { width: 14px; height: 14px; vertical-align: -2px; }
/* Phase 4.3 follow-up: skipped and cancelled runs, each with its reason and next step; the halt said once on top. */
.upkeep-skip-title { font: var(--text-body-sm); font-weight: 600; color: var(--ink-1); margin: 0 0 var(--sp-1); }
.upkeep-skip-list { display: grid; gap: var(--sp-1); }
.upkeep-skip-row { display: flex; flex-wrap: wrap; gap: 0 var(--sp-2); }
.upkeep-skip-row a { font-weight: 600; }
.upkeep-skip-next { flex-basis: 100%; color: var(--ink-2); }
.upkeep-halt { margin: 0; }
.steward-deferred { margin: 0; }
.switches-default code { font: var(--text-mono); font-size: 12px; padding: 0 3px; border-radius: var(--r-sm); background: var(--surface-2); }
#upkeep-t:focus { outline: none; }
#upkeep-t:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--r-sm); }
.read-wait-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--ink-3); }
.read-wait-mark .icon { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .upkeep-meter-fill { transition: none; } }
@media (forced-colors: active) { .upkeep-meter { border: 1px solid CanvasText; } .upkeep-meter-fill { background: Highlight; } .switch-row.is-needed { outline: 2px solid CanvasText; } }
