/* ==========================================================================
   SITE WATCH — the page (watch.html), 2026-10-23.

   Additions only, on the Office's own system: every colour, size and radius
   is office.css's token (--o-*), every button the Office's (.ofc-primary,
   .ofc-ghost, .ofc-quiet), the table the Office's .ofc-lines (cards on a
   phone). Colour only for state: green up, amber a warning, red down or
   urgent, a ring for not checked. Each section is a plane on the stage, as
   Social's are. No :root, no focus ring of its own: focus is the Office's lit
   edge. The CSP refuses style="" attributes: everything is here, by class.
   ========================================================================== */

#office .sw-boot, #office .sw-error { margin: 0 0 1.25rem; color: var(--o-dim); font-size: var(--o-t-md); font-weight: 550; line-height: 1.5; }
#office .sw-error { grid-column: 1 / -1; color: var(--o-bad); }
#office .sw-boot .ofc-ghost { margin-left: 0.5rem; }
#office .sw-grid { gap: 1rem; }
#office .sw-grid > .sw-card {
  grid-column: 1 / -1;
  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));
  --o-panel: var(--o-plane, var(--tk-grey-14));
}
#office .sw-card > h2 + .ofc-sub { margin-top: 0.25rem; }
#office .sw-k { color: var(--o-faint); font-weight: 550; }

/* A STATE IS A DOT AND A WORD (Social's .so-st, the Office's tables). */
#office .sw-st { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--o-dim); font: 600 var(--o-t-sm)/1.3 var(--body); white-space: nowrap; }
#office .sw-st::before { content: ''; flex: none; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--o-neutral); }
#office .sw-st[data-tone="ok"] { color: var(--o-ok); }
#office .sw-st[data-tone="ok"]::before { background: var(--o-ok-mark); }
#office .sw-st[data-tone="attn"] { color: var(--o-warn-ink); }
#office .sw-st[data-tone="attn"]::before { background: var(--o-warn); }
#office .sw-st[data-tone="bad"] { color: var(--o-bad); }
#office .sw-st[data-tone="bad"]::before { background: var(--o-bad-mark); }
#office .sw-st[data-tone="wait"]::before { box-sizing: border-box; background: transparent; border: 1.5px solid var(--o-faint); }

/* ---------- right now ---------------------------------------------------------- */
#office .sw-summary { margin: 0.5rem 0 0.25rem; color: var(--tk-white); font: 650 var(--o-t-lg)/1.35 var(--body); }
#office .sw-checked { margin: 0 0 1rem; }
#office .sw-setup { display: grid; gap: 0.5rem; margin: 0; padding: 0.75rem 0 0; list-style: none; border-top: 1px solid var(--o-line-2); }
#office .sw-setup__l { position: relative; padding-left: 1.25rem; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 500; line-height: 1.5; }
#office .sw-setup__l::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--o-neutral); }
#office .sw-setup__l[data-tone="ok"]::before { background: var(--o-ok-mark); }
#office .sw-setup__l[data-tone="attn"]::before { background: var(--o-warn); }
#office .sw-setup__l[data-tone="bad"] { color: var(--o-bad); }
#office .sw-setup__l[data-tone="bad"]::before { background: var(--o-bad-mark); }

/* ---------- incidents ---------------------------------------------------------- */
#office .sw-incs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--o-line-2); }
#office .sw-incs:empty { display: none; }
#office .sw-inc { display: grid; gap: 0.25rem; padding: 1rem 0; border-bottom: 1px solid var(--o-line-2); min-width: 0; }
#office .sw-inc:last-child { border-bottom: 0; padding-bottom: 0; }
#office .sw-inc__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
#office .sw-inc__host { color: var(--tk-white); font: 650 var(--o-t-md)/1.3 var(--body); overflow-wrap: break-word; }
#office .sw-inc__client { color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 550; }
#office .sw-inc__what { margin: 0.25rem 0 0; color: var(--o-text); font-size: var(--o-t-md); font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }
#office :is(.sw-inc__when, .sw-inc__note, .sw-inc__contact, .sw-inc__said) { margin: 0; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
#office .sw-inc__note { color: var(--o-warn-ink); }
#office .sw-inc__said q { color: var(--o-text); }

#office .sw-ev { margin: 0.5rem 0 0; }
#office .sw-ev__s { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 600; cursor: pointer; list-style: none; }
#office .sw-ev__s::-webkit-details-marker { display: none; }
/* A small chevron that turns when the list is open. */
#office .sw-ev__s::before { content: ''; flex: none; width: 0.4rem; height: 0.4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.15s var(--o-ease, ease); }
#office .sw-ev[open] > .sw-ev__s::before { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { #office .sw-ev__s::before { transition: none; } }
#office .sw-ev__s:hover { color: var(--o-text); }
#office .sw-ev__list { display: grid; gap: 0.25rem; margin: 0.25rem 0 0; padding: 0.5rem 0.75rem; list-style: none; border-radius: var(--o-r-sm); background: var(--o-inset); }
#office .sw-ev__r { display: grid; grid-template-columns: minmax(9rem, auto) minmax(0, 1fr); gap: 0 0.75rem; font-size: var(--o-t-sm); line-height: 1.5; }
#office .sw-ev__when { color: var(--o-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
#office .sw-ev__sum { color: var(--o-text); overflow-wrap: anywhere; }
#office .sw-ev__d { grid-column: 2; color: var(--o-faint); overflow-wrap: anywhere; }

#office .sw-fix:empty { display: none; }
#office .sw-fix { margin-top: 0.5rem; }
#office .sw-fix__sent { margin: 0; color: var(--o-ok); font-size: var(--o-t-sm); font-weight: 550; }
#office .sw-fix__sent a { color: var(--o-text); }
#office .sw-fix__card { display: grid; gap: 0.5rem; padding: 0.75rem; border: 1px solid var(--o-line-3, var(--o-line-2)); border-radius: var(--o-r-sm); background: var(--o-inset); }
#office .sw-fix__t { margin: 0; color: var(--tk-white); font-size: var(--o-t-md); font-weight: 650; overflow-wrap: anywhere; }
#office .sw-fix__m { margin: 0; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office .sw-fix__brief { max-height: 16rem; margin: 0; padding: 0.75rem; overflow: auto; border-radius: var(--o-r-sm); background: var(--o-plane, var(--tk-grey-14));
  color: var(--o-text); font: 500 var(--o-t-xs)/1.55 var(--mono, ui-monospace, monospace); white-space: pre-wrap; overflow-wrap: anywhere; }
#office .sw-fix__acts, #office .sw-form__acts { display: flex; flex-wrap: wrap; gap: 0.5rem; }

#office .sw-said { margin: 0.5rem 0 0; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 550; line-height: 1.5; }
#office .sw-said:empty { display: none; }
#office .sw-said[data-tone="ok"] { color: var(--o-ok); }
#office .sw-said[data-tone="bad"] { color: var(--o-bad); }
#office .sw-said[data-tone="attn"] { color: var(--o-warn-ink); }

/* ---------- the sites ------------------------------------------------------------ */
#office .sw-sites td { vertical-align: top; }
#office .sw-site__host { display: block; color: var(--tk-white); font-weight: 650; overflow-wrap: break-word; }
#office .sw-c__m { display: block; color: var(--o-text); font-weight: 600; font-variant-numeric: tabular-nums; }
#office .sw-c__m[data-tone="ok"] { color: var(--o-text); }
#office .sw-c__m[data-tone="attn"] { color: var(--o-warn-ink); }
#office .sw-c__m[data-tone="bad"] { color: var(--o-bad); }
#office .sw-c__m[data-tone="quiet"] { color: var(--o-faint); font-weight: 550; }
#office .sw-c__s { display: block; margin-top: 2px; color: var(--o-faint); font-size: var(--o-t-label); font-weight: 500; line-height: 1.4; }
/* No pull to the left: a table that scrolls cuts off an edge drawn outside it (focus-check, 23 Oct). */
#office .sw-site__set { margin: 0.25rem 0 0; }
#office .sw-checks { display: grid; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
#office .sw-checks__c { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.25rem; font-size: var(--o-t-sm); }
#office .sw-edit td, #office .sw-saidrow td { padding-top: 0; }
#office .sw-saidrow .sw-said { margin: 0 0 0.5rem; }

#office .sw-form { display: grid; gap: 0.75rem; max-width: 40rem; padding: 0.75rem; border-radius: var(--o-r-sm); background: var(--o-inset); }
#office .sw-form__f { display: grid; gap: 0.25rem; }
#office .sw-form__f > label { color: var(--o-text); font-size: var(--o-t-sm); font-weight: 600; }
#office .sw-form__i { min-height: 44px; padding: 0 0.75rem; border: 1px solid var(--o-line-2); border-radius: var(--o-r-sm); background: var(--o-plane, var(--tk-grey-14)); color: var(--o-text); font: 500 var(--o-t-md) var(--body); }
#office .sw-form__h { color: var(--o-faint); font-size: var(--o-t-xs); line-height: 1.45; }
#office .sw-form__c { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; color: var(--o-text); font-size: var(--o-t-sm); font-weight: 550; cursor: pointer; }
#office .sw-form__c input { width: 18px; height: 18px; accent-color: var(--tk-white); }

@media (max-width: 760px) {
  #office .sw-ev__r { grid-template-columns: minmax(0, 1fr); }
  #office .sw-ev__d { grid-column: 1; }
}
