/* Sacred Command Center · Setup module styles. Owned by the setup module agent. Semantic tokens only (no hex, no rgba). */
/* The list of sections: a search box, then collapsible groups. Beside a section on a wide window; the whole page on a phone. */
.setup-cols { display: flex; align-items: flex-start; gap: var(--s-5); min-width: 0; }
.setup-nav {
  flex: none; width: 240px; position: sticky; top: calc(var(--head-h) + var(--top) + var(--s-3)); display: flex; flex-direction: column; gap: var(--s-2);
  max-height: calc(100dvh - var(--head-h) - var(--top) - var(--s-5)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.setup-search { max-width: 28rem; }
.setup-grp { display: flex; flex-direction: column; gap: 2px; }
.setup-gh { margin: 0; }
.setup-gh button {
  display: flex; align-items: center; gap: var(--s-1); width: 100%; min-height: 32px; padding: 0 var(--s-2); border-radius: var(--r-button); text-align: left;
  font-size: var(--eyebrow-size); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); white-space: nowrap;
}
@media (hover: hover) { .setup-gh button:hover { background: var(--hover); color: var(--text); } }
.setup-gh-i { flex: none; transition: transform var(--t-feedback) var(--ease-out); }
.setup-gh button[aria-expanded="false"] .setup-gh-i { transform: rotate(-90deg); }
.setup-nav ul { display: flex; flex-direction: column; gap: 1px; }
.setup-nav ul[hidden] { display: none; }
.setup-nav a { display: flex; align-items: center; gap: var(--s-2); min-height: 36px; padding: 0 var(--s-2); border-radius: var(--r-button); color: var(--text-2); text-decoration: none; font-size: var(--fs-cell); font-weight: 600; }
.setup-nav a .i { color: var(--text-3); flex: none; }
@media (hover: hover) { .setup-nav a:hover { background: var(--hover); color: var(--text); } }
.setup-nav a[aria-current="page"] { background: var(--raised); color: var(--text); }
.setup-nav a[aria-current="page"] .i { color: var(--accent-mark); }
.setup-nav-t { display: flex; flex-direction: column; min-width: 0; }
.setup-matches { display: flex; flex-direction: column; gap: 2px; }
.setup-none { padding: var(--s-2); }
.setup-back { display: inline-flex; align-items: center; gap: var(--s-1); align-self: flex-start; margin: 0 0 var(--s-3) calc(-1 * var(--s-1)); padding: 0 var(--s-2) 0 var(--s-1); min-height: var(--tap); color: var(--text-3); text-decoration: none; font-size: var(--fs-cell); font-weight: 600; border-radius: var(--r-button); }
.setup-back .i { flex: none; }
@media (hover: hover) { .setup-back:hover { color: var(--text); background: var(--hover); } }
/* On a phone, Setup is this list as a page: every group open, a description under each name, a chevron on the right. */
.setup-nav--page { position: static; width: auto; max-height: none; overflow: visible; gap: var(--s-4); }
.setup-nav--page .setup-search { max-width: none; }
.setup-nav--page .setup-gh-t { margin: 0 0 var(--s-1); padding: 0 var(--s-1); }
.setup-nav--page ul { gap: var(--s-2); }
.setup-nav--page a { min-height: 56px; padding: var(--s-2) var(--s-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.setup-nav--page a > .i:last-child { margin-left: auto; }
.setup-nav--page .setup-nav-t > span:first-child { color: var(--text); }
.setup-body { flex: 1; min-width: 0; max-width: 52rem; }
@media (max-width: 899px) { .setup-body { width: 100%; max-width: none; } }

/* ── Sections that hold tables: they use the room the page has ───────────────────────────────────────────────── */
.setup-body--wide { max-width: none; }
.set-block-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; }
.set-block-h .eyebrow { margin: 0; }
.set-pre { margin: 0; padding: var(--s-3); white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: var(--fs-cell); line-height: 1.55; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-button); }
.setup-body .tabs { margin-bottom: var(--s-1); }
.setup-body .lv { min-width: 0; }
/* Descriptive tables wrap their text instead of cutting it off. */
.set-block .table .td { height: auto; min-height: var(--row-h); padding-top: var(--s-2); padding-bottom: var(--s-2); white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; overflow-wrap: anywhere; }
.set-block .table .td .cell-link { white-space: normal; text-align: left; }

/* Personal: HQ's Notifications block (a carried-over component) takes the page's width and the same section heads as the rest of Setup. */
.setup-personal .hq > :not(.page-head) { max-width: none; }
.setup-personal .hq .sec { margin-top: var(--s-4); }
.setup-personal .hq .sec-h h2 { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-caption); font-weight: 600; line-height: 1.2; letter-spacing: var(--eyebrow-ls); text-transform: uppercase; color: var(--text-3); }
.setup-personal .hq .sec-h h2::before { content: ""; width: 16px; height: 2px; flex: none; background: var(--accent); }

/* Policies: a draft is marked in its State cell with a chip, and its words are written in full, a paragraph at a time. */
.pol-text { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.pol-p { display: block; }
.pol-state { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); }
.chip--draft { color: var(--text); background: transparent; border: 1px solid var(--line-strong); }

/* Critical alerts push setting: visible and off until Auri says yes. */
.crit-quiet { display: block; border: 0; margin: 0; min-width: 0; }
.crit-opt { display: flex; align-items: center; gap: var(--s-2); min-height: 32px; color: var(--text-2); font-size: var(--fs-cell); }
.crit-opt input { flex: none; margin: 0; }
.setup-personal .hq .sec .hint { margin-top: var(--s-2); }

/* Client sends (GL1): the plain line under a control that is off because the switch is off, and the Live check summary. */
.sends-off { margin: var(--s-1) 0 0; color: var(--text-2); }
.sends-off a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
@media (hover: hover) { .sends-off a:hover { color: var(--text); } }
.sends-off--inline { margin: 0; }
.lc-sum { margin: var(--s-2) 0 0; color: var(--text-3); }
