:root {
    --bg: var(--h4-bg); --card: var(--h4-surface); --ink: var(--h4-text); --dim: var(--h4-text-muted); --line: var(--h4-border);
    --accent: var(--h4-primary); --ok: var(--h4-success-fg); --bad: var(--h4-danger-fg); --warn: var(--h4-warning-fg);
    font: 15px/1.5 var(--h4-font-sans);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--accent); }
.top { display: flex; gap: 24px; align-items: center; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--card); flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); }
.mark { color: var(--accent); }
.top nav { display: flex; gap: 16px; flex: 1; flex-wrap: wrap; }
.top nav a { color: var(--dim); text-decoration: none; }
.top nav a.on { color: var(--ink); font-weight: 600; }
body:not(.shell) > main { max-width: 1000px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 17px; margin: 0 0 8px; }
h3 { font-size: 14px; margin: 16px 0 6px; color: var(--dim); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--h4-radius-card); padding: 20px; margin: 0 0 16px; overflow-x: auto; }
.card.narrow { max-width: 480px; margin: 40px auto; }
.card.secret { border-color: var(--warn); }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
label { display: grid; gap: 4px; font-weight: 600; font-size: 13px; }
label.check { display: flex; gap: 6px; font-weight: 400; }
fieldset { border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
input, select, textarea { font: inherit; min-height: 40px; padding: 8px 10px; border: 1px solid var(--h4-border-control); border-radius: var(--h4-radius-control); background: var(--bg); color: var(--ink); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
select::-ms-expand { display: none; }
form.stack > label { display: grid; gap: 4px; }
form.stack > label .hint { font-size: var(--h4-text-xs); font-weight: var(--h4-weight-regular); color: var(--h4-text-muted); }
.machine code { overflow-wrap: anywhere; }
.act-link { color: inherit; text-decoration: none; }
.act-link:hover { text-decoration: underline; }
.btn { font: inherit; min-height: 40px; padding: 8px 14px; border-radius: var(--h4-radius-control); border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--h4-primary-fg); }
.btn.danger, .link.danger { color: var(--bad); }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.note { padding: 10px 14px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.note.ok { border-color: var(--ok); }
.note.bad, .err { color: var(--bad); }
.dim { color: var(--dim); font-weight: 400; }
code { font: 13px ui-monospace, Menlo, monospace; background: var(--bg); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 600; font-size: 12px; }
table.log td { font-size: 13px; }
.pill { font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid currentColor; font-weight: 600; }
.pill.active { color: var(--h4-status-active-fg); background: var(--h4-status-active-bg); border-color: transparent; }
.pill.expired { color: var(--h4-status-expired-fg); background: var(--h4-status-expired-bg); border-color: transparent; }
.pill.revoked { color: var(--h4-status-revoked-fg); background: var(--h4-status-revoked-bg); border-color: transparent; }
.pill.pending { color: var(--h4-status-pending-fg); background: var(--h4-status-pending-bg); border-color: transparent; }
.pill.offline { color: var(--h4-status-offline-fg); background: var(--h4-status-offline-bg); border-color: transparent; }
.pill.here { color: var(--h4-kind-space-fg); background: var(--h4-kind-space-bg); border-color: transparent; letter-spacing: .03em; }
.list { list-style: none; padding: 0; margin: 0 0 12px; }
.list li { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
form { margin: 0; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 14px; }
.steps > li { padding-left: 4px; }
.steps ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.steps form { margin-top: 10px; max-width: 520px; }
a.btn { text-decoration: none; }
.steps form.client { border-top: 1px solid var(--line); padding-top: 12px; }
/* narrow screens: the log scrolls inside itself, actions stay on one line, and the nav gets its own row */
.scroll-x { overflow-x: auto; }
table.log code { word-break: normal; white-space: nowrap; }
@media (max-width: 600px) { .top { gap: 8px 16px; padding: 10px 16px; } .top nav { order: 3; flex-basis: 100%; } .top form { margin-left: auto; } }
/* TinkerTool */
label.grow { flex: 1; min-width: 220px; }
[data-console] pre { margin: 8px 0 0; padding: 12px; max-height: 480px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font: 12px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
/* Inherited settings: greyed, with where they come from. */
.inherited { color: var(--dim); } .inherited .from { font-size: 12px; }
.tree, .tree ul.tree { list-style: none; padding-left: 0; margin: 0; }
.tree > li { padding: 8px 0 8px 14px; border-left: 2px solid var(--line); margin: 6px 0; }
.tree .list { margin: 6px 0 0 14px; }
.layout-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .layout-2 { grid-template-columns: 1fr; } }
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 16px; }
.tile { display: grid; gap: 2px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.tile .n { font-size: 22px; font-weight: 700; } .tile .l { font-size: 12px; color: var(--dim); }
.tile.warn { border-color: var(--warn); }
/* ===== The shell: icon rail · header · Cascade SideMenu · content. Breakpoints 640 / 1024 (handoff). ===== */
body.shell { display: grid; grid-template-columns: var(--h4-rail-width) minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--h4-rail-bg); color: var(--h4-rail-fg); display: flex; flex-direction: column; align-items: center; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: var(--h4-z-rail); }
.rail-brand { width: 36px; height: 36px; border-radius: 9px; background: var(--h4-primary); color: var(--h4-primary-fg); display: grid; place-items: center; font-weight: 800; font-size: 14px; text-decoration: none; margin: 0 0 12px; }
.rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rail-foot { margin-top: auto; }
.rail-item { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--h4-rail-fg); background: none; border: 0; cursor: pointer; position: relative; }
.rail-item:hover { background: var(--h4-rail-hover); color: #fff; }
.rail-item.on { background: var(--h4-rail-active-bg); color: var(--h4-rail-active-fg); }
.rail-item.on::before { content: ""; position: absolute; left: -10px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--h4-rail-focus); }
.rail-item:focus-visible { outline: 2px solid var(--h4-rail-focus); outline-offset: 2px; }
.rail-item[data-tip]:hover::after, .rail-item[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: var(--h4-surface-raised); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 13px; white-space: nowrap; box-shadow: var(--h4-shadow-menu); z-index: var(--h4-z-popover); }
.stage { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.hdr { position: sticky; top: 0; z-index: var(--h4-z-header); background: var(--card); border-bottom: 1px solid var(--line); }
.hdr-row { display: flex; align-items: center; gap: 12px; min-height: var(--h4-header-height); padding: 0 16px; flex-wrap: wrap; }
.hdr-brand { font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.hdr-context { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: nowrap; overflow: hidden; font-size: 14px; min-width: 0; white-space: nowrap; }
.hdr-context .crumb { flex: 0 1 auto; min-width: 0; }
.hdr-context a.crumb, .hdr-context .crumb summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1180px) { .hdr-folders { display: none; } .hdr-fold { display: inline-flex; } }
.hdr-context .sep { color: var(--dim); }
.hdr-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hdr-name { font-size: 14px; }
.icon-btn.hdr-menu { display: none; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--ink); border-radius: 10px; cursor: pointer; list-style: none; }
.icon-btn:hover { background: var(--h4-surface-muted); }
.icon-btn::-webkit-details-marker { display: none; }
.crumb { color: var(--ink); text-decoration: none; position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 6px; border-radius: 8px; }
a.crumb:hover, .crumb summary:hover { background: var(--h4-surface-muted); }
.crumb summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.crumb summary::-webkit-details-marker { display: none; }
.crumb summary::after { content: "▾"; color: var(--dim); font-size: 11px; }
.kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; }
.kind-realm .kind { color: var(--h4-kind-realm-fg); background: var(--h4-kind-realm-bg); } .kind-org .kind { color: var(--h4-kind-org-fg); background: var(--h4-kind-org-bg); }
.kind-folder .kind { color: var(--h4-kind-folder-fg); background: var(--h4-kind-folder-bg); } .kind-space .kind { color: var(--h4-kind-space-fg); background: var(--h4-kind-space-bg); }
.kind:not([class*=kind-] .kind) { color: var(--h4-kind-space-fg); background: var(--h4-kind-space-bg); }
.switcher-host { position: relative; }
.switcher { position: absolute; z-index: var(--h4-z-popover); top: 100%; left: 0; margin: 6px 0 0; padding: 6px; list-style: none; min-width: 240px; background: var(--h4-surface-raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--h4-shadow-menu); }
.switcher.right { left: auto; right: 0; }
.switcher [role=menuitem] { display: flex; justify-content: space-between; gap: 12px; width: 100%; min-height: 40px; align-items: center; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; text-align: left; }
.switcher [role=menuitem]:hover, .switcher [role=menuitem].on { background: var(--h4-selected-bg); color: var(--h4-selected-fg); }
.stage-body { display: grid; grid-template-columns: 0 minmax(0, 1fr); flex: 1; min-width: 0; transition: grid-template-columns var(--h4-motion-normal) var(--h4-ease); }
.stage-body.menu-push { grid-template-columns: var(--h4-sidemenu-width) minmax(0, 1fr); }
.sidemenu { width: var(--h4-sidemenu-width); max-width: 100%; background: var(--card); border-right: 1px solid var(--line); position: sticky; top: var(--h4-header-height); height: calc(100vh - var(--h4-header-height)); overflow-y: auto; display: none; flex-direction: column; }
.menu-push .sidemenu, .menu-overlay .sidemenu { display: flex; }
.menu-overlay .sidemenu { position: fixed; left: var(--h4-rail-width); top: var(--h4-header-height); z-index: var(--h4-z-menu); box-shadow: var(--h4-shadow-menu); width: min(var(--h4-sidemenu-width), calc(100vw - var(--h4-rail-width))); }
.sm-head { padding: 12px 14px 8px; border-bottom: 1px solid var(--line); }
.sm-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); text-decoration: none; min-height: 32px; }
.sm-back:hover { color: var(--ink); }
.sm-title-row { display: flex; align-items: center; justify-content: space-between; }
.sm-title { font-size: 18px; margin: 0; }
.sm-close { display: none; }
.menu-overlay .sm-close { display: inline-flex; }
.sm-path { margin: 2px 0 0; font-size: 12px; color: var(--dim); }
.sm-list { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; }
.sm-item { display: grid; gap: 1px; min-height: 40px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.sm-item:hover { background: var(--h4-surface-muted); }
.sm-item.on { background: var(--h4-selected-bg); color: var(--h4-selected-fg); font-weight: 600; }
.sm-hint { font-size: 12px; color: var(--dim); font-weight: 400; }
.stage-body > .sidemenu { grid-column: 1; }
.stage-body > .content { grid-column: 2; }
.content { padding: 24px 32px 64px; min-width: 0; max-width: var(--h4-content-max); width: 100%; }
.content > h1:first-child { margin-top: 0; }
@media (max-width: 1023px) {
    .content { padding: 20px 24px 56px; }
    .hdr-name { display: none; }
}
@media (max-width: 639px) {
    body.shell { grid-template-columns: var(--h4-rail-width-phone) minmax(0, 1fr); }
    .rail { padding-top: 8px; }
    .rail-item::before { left: -6px; }
    .menu-overlay .sidemenu { left: var(--h4-rail-width-phone); width: min(var(--h4-sidemenu-width), calc(100vw - var(--h4-rail-width-phone))); top: 104px; height: calc(100vh - 104px); }
    .hdr-row { padding: 0 12px; }
    .icon-btn.hdr-menu { display: inline-flex; }
    .hdr-context { flex-basis: 100%; order: 3; min-height: var(--h4-context-row-height); border-top: 1px solid var(--line); }
    .content { padding: 16px 16px 48px; }
    .card { padding: 14px; }
    .layout-2 { grid-template-columns: 1fr; }
    input, select, textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .stage-body { transition: none; } }

/* Page titles inside the shell: the node name is the title; the ancestry is a quiet line under it. */
.content h1 .dim { display: block; font-size: 13px; font-weight: 400; margin-top: 2px; }

/* Wide tables outside a card scroll inside their own region; the page never widens. */
.content > table, .content > form + table, .content > .scroll-x { display: block; max-width: 100%; overflow-x: auto; }
.content .card table { min-width: 480px; }
.content .card.narrow table, .strip, .tree { min-width: 0; }

/* ===== Orgestrate Cascade (geometry and look ported from listiq-explorer host app.css + polish.css; tokens mapped to h4) ===== */
.cascade { --cascade-w: calc(var(--h4-sidemenu-width) + var(--strips, 0) * var(--h4-parent-strip-width)); position: fixed; top: var(--h4-header-height); bottom: 0; left: var(--h4-rail-width); width: var(--cascade-w); z-index: var(--h4-z-menu); background: var(--h4-surface); border-right: 1px solid var(--h4-border); box-shadow: var(--h4-shadow-menu); }
.cascade.pinned { box-shadow: none; position: sticky; top: var(--h4-header-height); height: calc(100vh - var(--h4-header-height)); left: auto; grid-column: 1; }
.stage-body:has(.cascade.pinned:not([style*="display: none"])) { grid-template-columns: calc(var(--h4-sidemenu-width) + var(--strips, 0) * var(--h4-parent-strip-width)) minmax(0, 1fr); }
.cascade-frame { display: flex; height: 100%; }
.cascade-level { flex: 1; min-width: 0; width: var(--h4-sidemenu-width); padding: 8px 12px 16px; overflow: auto; }
.cascade-top { display: flex; justify-content: flex-end; align-items: center; gap: 2px; }
.cmode { display: inline-flex; border: 1px solid var(--h4-border); border-radius: 8px; overflow: hidden; }
.cmode button { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 8px; border: 0; background: transparent; color: var(--h4-text-muted); font: 500 12px var(--h4-font-sans); cursor: pointer; }
.cmode button.on { color: var(--h4-primary); background: var(--h4-selected-bg); }
.cmode button:disabled { opacity: .45; cursor: default; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 30px; padding: 0 8px; }
.btn.icon-only { display: inline-grid; place-items: center; width: 32px; }
.cascade-back { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px; border: 0; border-radius: var(--h4-radius-sm); background: transparent; color: var(--h4-text); font: 500 14px var(--h4-font-sans); cursor: pointer; }
.cascade-back:hover { background: var(--h4-surface-muted); }
.cascade-heading { padding: 6px 12px 14px; }
.cascade-heading .eyebrow { font-size: 12px; color: var(--h4-text-muted); display: block; }
.cascade-heading h2 { margin: 2px 0 0; font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; color: var(--h4-text); }
.cascade-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cascade-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px 0 14px; border: 0; border-radius: var(--h4-radius-sm); background: transparent; color: var(--h4-text); font: 500 13px var(--h4-font-sans); text-align: left; cursor: pointer; }
.cascade-item > span:first-child { color: var(--h4-text-secondary); flex: none; display: inline-flex; }
.cascade-item .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cascade-item .hint { font-size: 12px; color: var(--h4-text-muted); font-variant-numeric: tabular-nums; }
.cascade-item:hover { background: var(--h4-surface-muted); }
.cascade-item.active { background: var(--h4-selected-bg); color: var(--h4-selected-fg); font-weight: 500; }
.cascade-item.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--h4-primary); }
.cascade-item:focus-visible, .tree-caret:focus-visible { outline: 2px solid var(--h4-focus); outline-offset: 2px; }
.cascade-strips { display: flex; flex-direction: row-reverse; }
.cascade-strip { display: flex; flex-direction: column; align-items: center; gap: 14px; width: var(--h4-parent-strip-width); padding: 16px 0; border: 0; border-left: 1px solid var(--h4-border); background: var(--h4-surface-muted); color: var(--h4-text-secondary); font: 500 14px var(--h4-font-sans); cursor: pointer; }
.cascade-strip:first-child { background: var(--h4-selected-bg); color: var(--h4-selected-fg); }
.cascade-strip .v { writing-mode: vertical-rl; white-space: nowrap; }
.cascade-strip:hover { background: var(--h4-selected-bg); color: var(--h4-primary); }
.cascade-tree .tree-row { display: flex; align-items: center; gap: 2px; }
.tree-caret { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 0; background: transparent; color: var(--h4-text-muted); cursor: pointer; border-radius: 6px; transition: transform var(--h4-motion-fast) var(--h4-ease); }
.tree-caret.open { transform: rotate(90deg); }
.cascade-tree .tree-row > .cascade-item { font-size: 13px; }
.cascade .small.muted { font-size: 12px; color: var(--h4-text-muted); }
@media (max-width: 1023px) { .cascade { left: var(--h4-rail-width); width: min(var(--cascade-w), calc(100vw - var(--h4-rail-width))); } }
@media (max-width: 639px) { .cascade { left: var(--h4-rail-width-phone); top: 104px; width: min(var(--cascade-w), calc(100vw - var(--h4-rail-width-phone))); } }
.cascade-strip.folded .v { font-size: 12px; } .cascade-strip .v .sep { color: var(--h4-text-muted); }

/* ===== Board 01 / 08: page head, tiles with icons, attention banners, connected hubs, activity rows, notifications, offline ===== */
.hdr-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--h4-primary); color: var(--h4-primary-fg); font-size: 11px; font-weight: 800; margin-right: 4px; }
.hdr-fold { display: none; }
.hdr .caret { color: var(--dim); font-size: 11px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 16px; }
.page-head h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.page-head .lead { margin: 4px 0 0; color: var(--dim); font-size: 15px; }
.btn.big { min-height: 44px; padding: 0 18px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.strip { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile .l { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); order: -1; }
.tile .n { font-size: 26px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); margin: 0 0 12px; }
.banner.warn { background: var(--h4-warning-bg); border-color: var(--h4-warning-border); color: var(--h4-warning-fg); }
.banner.info { background: var(--h4-selected-bg); border-color: var(--h4-primary); color: var(--h4-selected-fg); }
.banner-icon { display: inline-flex; } .banner-body { flex: 1; display: grid; } .banner-body span { font-size: 13px; }
.overview-grid { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 16px; }
.overview-grid .card { margin: 0; }
.hub-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hub-row > div { flex: 1; display: grid; } .hub-row .dim { font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--h4-status-offline-fg); }
.dot.ok { background: var(--h4-success-border); } .dot.warn { background: var(--h4-warning-border); } .dot.bad { background: var(--h4-danger-border); }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li, .notif-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.act-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--h4-surface-muted); color: var(--h4-primary); flex: none; }
.act-body { flex: 1; min-width: 0; display: grid; } .act-body span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity time { font-size: 12px; white-space: nowrap; }
.notif-host summary { position: relative; }
.notif-count { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--h4-danger-action); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.notif-panel { width: min(380px, calc(100vw - 24px)); padding: 10px 12px; max-height: calc(100vh - var(--h4-header-height) - 24px); overflow-y: auto; }
.switcher { max-height: calc(100vh - var(--h4-header-height) - 24px); overflow-y: auto; }
.notif-head { padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
.notif-group { margin: 10px 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); }
.notif-group.warn { color: var(--h4-warning-fg); }
.notif-item { padding: 8px 0; } .notif-item:last-child { border-bottom: 0; }
.notif-item .btn { flex: none; white-space: nowrap; text-decoration: none; }
.notif-item .act-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-empty { margin: 10px 0 4px; }
.offline-bar { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 16px; font-size: 13px; background: var(--h4-warning-bg); color: var(--h4-warning-fg); border-top: 1px solid var(--h4-warning-border); }
body.offline form button[type=submit], body.offline .btn.primary { opacity: .5; pointer-events: none; }
@media (max-width: 1023px) { .overview-grid { grid-template-columns: 1fr; } }
@media (max-width: 639px) {
    .hdr-folders { display: none; }
    .hdr-fold { display: inline-flex; }
    .hdr-realm { display: none; }
    .hdr-context { gap: 4px; }
    .page-head h1 { font-size: 24px; }
    .activity li { align-items: flex-start; } .activity time { order: 3; }
}
.offline-bar[hidden] { display: none; }
/* Phone header: a 56px identity row (menu · brand · bell/account) and a 48px context row beneath. */
@media (max-width: 639px) {
    .hdr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: var(--h4-header-height) var(--h4-context-row-height); grid-template-areas: "menu brand end" "ctx ctx ctx"; align-items: center; gap: 0 8px; padding: 0 12px; }
    .hdr-row > .hdr-menu { grid-area: menu; }
    .hdr-row > .hdr-brand { grid-area: brand; }
    .hdr-row > .hdr-end { grid-area: end; margin-left: 0; }
    .hdr-row > .hdr-context { grid-area: ctx; order: initial; flex-basis: auto; min-height: 0; padding: 0; flex-wrap: nowrap; overflow: hidden; }
    .hdr-context .crumb { flex: 0 1 auto; min-width: 0; }
    /* Long slugs trim with an ellipsis instead of pushing the row wider. */
    .hdr-context .crumb summary, .hdr-context a.crumb { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 32px; }
    .hdr-context .crumb .kind { display: inline-block; vertical-align: middle; line-height: 1.4; }
    /* Switchers drop below the context row, within the screen, instead of hanging off the right edge. */
    .hdr-context .switcher-host { position: static; }
    .hdr-context .switcher { position: absolute; left: 12px; right: 12px; top: calc(var(--h4-header-height) + var(--h4-context-row-height)); min-width: 0; max-height: calc(100vh - 140px); overflow-y: auto; }
    .hdr-end .switcher-host { position: static; }
    .hdr-end .switcher { left: auto; right: 12px; top: var(--h4-header-height); max-width: calc(100vw - var(--h4-rail-width-phone) - 24px); max-height: calc(100vh - var(--h4-header-height) - 24px); }
    .notif-panel { width: calc(100vw - var(--h4-rail-width-phone) - 24px); }
    .strip { grid-template-columns: 1fr 1fr; gap: 8px; }
    .tile { padding: 10px 12px; } .tile .n { font-size: 22px; }
    .banner { flex-wrap: wrap; } .banner .btn { margin-left: 42px; }
}
@media (max-width: 639px) {
    .hdr-context .pill.here { display: none; }   /* the current node crumb already names it; one row, one badge */
    .banner-body { flex: 1 1 170px; min-width: 0; }
    .banner .btn { flex: 0 0 auto; }
}
@media (max-width: 639px) {
    .hdr-context .sep { display: none; }
    .hdr-context .crumb.kind-org .kind { display: none; }   /* the dropdown slug is enough on a phone */
    .hdr-context .crumb { padding: 0 4px; }
}
/* PWA: install card and update toast (board 08 / 11). */
.pwa-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin: 0 0 16px; border: 1px solid var(--h4-primary); border-radius: 12px; background: var(--h4-selected-bg); color: var(--h4-selected-fg); }
.pwa-card[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: var(--h4-z-toast); max-width: min(560px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 12px; background: var(--h4-surface-raised); color: var(--ink); border: 1px solid var(--h4-primary); box-shadow: var(--h4-shadow-dialog); font-size: 14px; }
.toast[hidden] { display: none; }

/* ===== Slide-ins: a right-side sheet beside the directory (phones: full width) ===== */
/* Slide-ins: Orgestrate surfaces (css/vendor/orgestrate/surfaces.css) + css/orgestrate-glue.css. */

/* ===== Slug availability (js/slug.js): one line under the field, green when free, amber when taken ===== */
.slug-hint { margin: -6px 0 0; font-size: 12px; font-weight: 400; color: var(--dim); }
.slug-hint:empty { display: none; }
.slug-hint.ok { color: var(--ok); }
.slug-hint.warn { color: var(--warn); }
.slug-hint .link { font-size: inherit; font-weight: 600; font-family: var(--h4-font-mono, monospace); }

/* ===== Destination picker (js/destination.js): the "Inside" field as a disclosure tree ===== */
.dest-picker { margin: 0; }
.dest-field { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--h4-border-control, var(--line)); border-radius: var(--h4-radius-control, 8px); background: var(--h4-surface, var(--card)); cursor: pointer; list-style: none; }
.dest-field::-webkit-details-marker { display: none; }
.dest-field:hover { background: var(--h4-surface-muted); }
.dest-field:focus-visible { outline: 2px solid var(--h4-focus); outline-offset: 2px; }
.dest-label { font-weight: 600; font-size: 13px; flex: none; }
.dest-current { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.dest-field > svg { flex: none; color: var(--dim); transition: transform var(--h4-motion-fast, .15s) var(--h4-ease, ease); }
.dest-picker[open] > .dest-field > svg { transform: rotate(90deg); }
.dest-tree { margin: 6px 0 0; padding: 6px; border: 1px solid var(--line); border-radius: var(--h4-radius-card, 10px); background: var(--h4-surface, var(--card)); max-height: 50vh; overflow: auto; }
.dest-tree ul.tree { margin: 0 0 0 10px; }
.dest-tree li { padding: 1px 0 1px 8px; border-left: 2px solid var(--line); margin: 2px 0; }
.dest-tree > li { border-left: 0; padding-left: 0; }
.dest-node { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.dest-node:hover { background: var(--h4-surface-muted); }
.dest-node:focus-visible { outline: 2px solid var(--h4-focus); outline-offset: -2px; }
.dest-node[aria-selected="true"] { background: var(--h4-selected-bg); color: var(--h4-selected-fg); }
.dest-node .kind { flex: none; }

.notif-count { color: var(--h4-danger-action-fg); }
body:has(.panel-root:not([hidden])) .toast { display: none; }
