/* B's T231 hand-off: Block 0's three parts (hosting.js), structure only, for E's look (the centred column and pills).
   - .host-card: one server the panel manages, inside its .server-block on Servers › Health (roles as pills, whether
     its agent answers, what it manages, the files changed by hand);
   - .host-grid: Servers › Modules, modules down and roles across; under 700 px each module is a card of role lines,
     so many roles never need a sideways scroll;
   - .host-features-box: the Features part on an account's Summary (Inherit / On / Off, and what that comes to);
   - .host-notices: Servers › Notices, Audit's table with a result pill and an Undo link; the row a link opened from
     Needs you (?n=) is marked;
   - Needs you on Home: kind `server` (what a server needs of the SysAdmin) has the red dot. */
.host-card { display: grid; gap: 8px; padding: 14px 16px; border-radius: 10px; background: var(--surface); box-shadow: var(--panel-lift, var(--lift-1)); }
.host-roles { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.host-line { margin: 0; font-weight: 700; }
.host-line.host-warn { color: var(--danger); }
.host-line .hint, .host-manages .hint { font-weight: 400; }
.host-how, .host-manages { margin: 0; }
.host-byhand ul { margin: 4px 0 0; padding-left: 20px; font-weight: 400; }
.host-byhand p { margin: 0; }

.host-page { max-width: 960px; }
.host-grid { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; box-shadow: var(--panel-lift, var(--lift-1)); }
.host-grid th, .host-grid td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft, var(--surface-sunk)); }
.host-grid thead th { font-size: var(--t-small); }
.host-role-name { display: block; margin-bottom: 4px; }
.host-grid thead th .host-why { margin-top: 4px; font-weight: 400; }
.host-mod-label { display: block; font-weight: 700; }
.host-mod-note { display: block; }
.host-cell { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.host-grid td.locked .host-cell { cursor: default; }
.host-switch { width: 20px; height: 20px; margin: 0; }
.host-why { display: block; font-size: var(--t-tiny); max-width: 16ch; }
@media (max-width: 699px) {
  .host-grid, .host-grid tbody, .host-grid tr, .host-grid th, .host-grid td { display: block; }
  .host-grid thead { display: none; }
  .host-grid { background: none; box-shadow: none; }
  .host-grid tr { margin-bottom: 12px; border-radius: 10px; background: var(--surface); box-shadow: var(--panel-lift, var(--lift-1)); }
  .host-grid td { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
  .host-grid td::before { content: attr(data-role-label); font-weight: 700; }
  .host-why { max-width: none; flex-basis: 100%; }
}

.host-notices td:nth-child(-n+2) { white-space: nowrap; }
.host-notices th:nth-child(4) { width: 50%; }
/* app.css hides Audit's 4th column (Account) under 900 px; here the 4th is What, so Who goes instead */
@media (max-width: 899px) {
  .audit-table.host-notices:not(.helper-table):not(.helper-chat-people) th:nth-child(4),
  .audit-table.host-notices:not(.helper-table):not(.helper-chat-people) td:nth-child(4) { display: table-cell; }   /* as specific as app.css's rule, and later */
  .audit-table.host-notices th:nth-child(3), .audit-table.host-notices td:nth-child(3) { display: none; }
}
.host-notices tr.is-target td { background: var(--highlight-soft, var(--info-bg)); }
.host-notices tr.is-target:focus { outline: 3px solid var(--focus); outline-offset: -3px; }
.host-result-failed, .host-result-rolled-back, .host-result-refused { background: var(--danger-bg); }
.kind-server .home-dot { background: var(--danger); }

.host-features { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.host-features > li { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line-soft, var(--surface-sunk)); }
.host-features > li:first-child { border-top: 0; }
.host-feature-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.host-seg { margin: 0; padding: 0; min-width: 0; }
.host-seg label { min-height: 44px; }
.host-result { margin: 0; font-size: var(--t-small); }

/* T231 look (E; the orchestrator's walk on Servers > Modules at v79, Sun 12:08 PM):
   - one width for the intro and the table, Home's column rule: 760 px, 960 when the page's area is 1400 px or wider
     (Modules and Notices; the intro now sits inside .host-page);
   - the rows under quiet group headings (Foundation, Domains & DNS, Mail, Websites);
   - each cell the panel's pill switch (label.tick.switch), the switch first so a column's switches line up;
   - the SysAdmin's column says "Always" once, under its heading, and its cells are empty (no greyed ticks); on a phone
     that heading is the one card above the modules;
   - a SysAdmin-only row is one locked "SysAdmin only" across the other roles (no Off boxes that can't be ticked). */
.i-lock { --i: url(/icons/ui/lock.svg); }
.host-page { max-width: 760px; display: grid; gap: 14px; align-content: start; }
@container acct (min-width: 1400px) { .host-page { max-width: 960px; } }
.host-page > p:first-child { margin: 0 0 4px; color: var(--fg-soft); }
.host-grid tr.host-group th { padding: 16px 10px 6px; font: 600 var(--t-small)/1.3 var(--body); color: var(--ink-soft); }
.host-grid tbody:first-of-type tr.host-group th { padding-top: 10px; }
.host-cell.tick.switch { justify-content: flex-start; gap: 8px; min-height: 44px; font-size: var(--t-small); font-weight: 600; }
.host-cell.tick.switch > input { order: 0; }
.host-grid .is-always { width: 1%; white-space: nowrap; }
.host-always { display: inline-block; margin-top: 6px; padding: 0 9px; border-radius: var(--radius-pill, 999px); background: var(--ok-strong-bg); color: var(--ink); font-size: var(--t-tiny); font-weight: 700; line-height: 20px; }
.host-grid thead th.is-always .level { display: none; }   /* "SysAdmin" twice (its name and its level) said once */
.host-only { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--t-small); font-weight: 600; color: var(--ink-soft); }
.host-only .icon { width: 16px; height: 16px; }
@media (max-width: 699px) {
  .host-grid thead { display: block; }
  .host-grid thead th:not(.is-always) { display: none; }
  .host-grid thead tr { margin-bottom: 12px; }
  .host-grid thead th.is-always { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; width: auto; padding: 12px 14px; border: 0; }
  .host-grid thead th.is-always .host-role-name { margin: 0; font-size: var(--t-ui); }
  .host-grid thead th.is-always .host-always { margin: 0; }
  .host-grid td.is-always { display: none; }
  .host-grid tr.host-group { margin: 4px 0 6px; background: none; box-shadow: none; }
  .host-grid tr.host-group th { padding: 4px 2px; border: 0; }
  .host-grid td.host-only-cell { justify-content: flex-start; }
}
/* Notices and Features: a result and a state in the panel's own colours (On and Done green, Off quiet) */
.host-result-done { background: var(--ok-strong-bg); }
.host-features .state.host-is-on { background: var(--ok-strong-bg); }
.host-features .state.host-is-off { background: var(--surface-sunk); }
.host-grid tbody th, .host-grid tbody td { vertical-align: middle; }
.host-grid thead th.is-always .host-always { margin-top: 0; }

/* Servers › Health (E; the orchestrator's walk on review, Sun 3:10 PM): the servers the panel manages are their own
   full-width row above the health, one compact card each (its name on top), as many in a row as fit at 300 px; then
   "Health" and the health blocks as before. Both row titles are quiet labels above the content (the blocks keep their
   names as the titles). */
.host-managed { display: grid; gap: 10px; }
.host-managed > h2, .host-health-h { margin: 0; font: 600 var(--t-ui)/1.3 var(--body); color: var(--ink-soft); }
.host-health-h { margin-top: 10px; }
.host-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; align-items: start; }
.host-card-name { margin: 0; font: 700 16px/1.25 var(--display); color: var(--ink); overflow-wrap: anywhere; }
