/* ===========================================================================
   Control Chat — Direction B shell.
   Layout and surface-specific pieces only; every control comes from
   p7-components.css and every value from p7-tokens.css. No hex in this file.
   =========================================================================== */

.p7b{ position:fixed; inset:0; display:flex; flex-direction:column;
  background:var(--p7-canvas); color:var(--p7-ink);
  font:var(--p7-text-body); font-family:var(--p7-font-sans) }
.p7b[hidden]{ display:none }
.p7b svg{ fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round }
.p7b-i{ width:14px; height:14px; flex:0 0 auto }

/* -- Top bar --------------------------------------------------------------- */
/* Three-zone app bar: left (brand + context), a truly-centered command palette, right (actions).
   The 1fr / fixed-center / 1fr grid keeps the palette centered on the viewport regardless of how
   wide the side clusters are, and never wraps. */
.p7b-top{ display:grid; align-items:center;
  grid-template-columns:minmax(0,1fr) minmax(0,460px) minmax(0,1fr); gap:var(--p7-space-4);
  padding:var(--p7-space-2) var(--p7-space-4);
  background:var(--p7-surface); border-bottom:1px solid var(--p7-line) }
.p7b-top__left{ display:flex; align-items:center; gap:var(--p7-space-3); min-width:0 }
.p7b-top__brand{ display:flex; align-items:center; gap:var(--p7-space-2); flex:0 0 auto }
.p7b-logo{ width:26px; height:26px; border-radius:var(--p7-radius-button);
  background:var(--p7-ink); color:var(--p7-surface);
  font-size:11px; font-weight:700; display:grid; place-items:center }
.p7b-ws{ font-weight:600 }
.p7b-caret{ color:var(--p7-ink-subtle) }

.p7b-crumb{ display:flex; align-items:center; gap:var(--p7-space-2);
  font:var(--p7-text-ui); font-family:var(--p7-font-sans); color:var(--p7-ink-subtle);
  min-width:0; overflow:hidden }
.p7b-crumb button{ border:0; background:transparent; padding:0; cursor:pointer;
  font:inherit; color:var(--p7-accent) }
.p7b-crumb button:hover{ color:var(--p7-accent-hover); text-decoration:underline }
.p7b-crumb .here{ color:var(--p7-ink); font-weight:600;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap }

.p7b-cmdwrap{ grid-column:2; width:100% }
.p7b-cmd{ display:flex; align-items:center; gap:var(--p7-space-2); width:100%;
  padding:7px var(--p7-space-3); border-radius:var(--p7-radius-button);
  border:1px solid var(--p7-line-strong); background:var(--p7-surface-sunken);
  color:var(--p7-ink-subtle); font:var(--p7-text-ui); font-family:var(--p7-font-sans); cursor:pointer }
.p7b-cmd:hover{ border-color:var(--p7-accent-line); background:var(--p7-surface) }
.p7b-cmd svg{ width:15px; height:15px; flex:0 0 auto }
.p7b-cmd span:first-of-type{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.p7b-cmd .p7-kbd{ margin-left:auto }

.p7b-top__right{ grid-column:3; display:flex; align-items:center; gap:var(--p7-space-2); justify-self:end }
.p7b-appr{ display:inline-flex; align-items:center; gap:6px; cursor:pointer;
  padding:6px 10px; border-radius:var(--p7-radius-button);
  border:1px solid var(--p7-hold-line); background:var(--p7-hold-bg-soft); color:var(--p7-hold-ink);
  font-size:12px; font-weight:600; font-family:var(--p7-font-sans) }
.p7b-appr:hover{ background:var(--p7-hold-bg) }
.p7b-me{ border:0; background:transparent; padding:0; cursor:pointer; display:flex }
/* A long tenant name can't push the brand cluster into the command palette. */
.p7b-ws{ font-weight:600; min-width:0 }
.p7b-ws #wsName{ display:inline-block; max-width:150px; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; vertical-align:bottom }

/* Responsive — the bar stays usable down to a phone. Non-essential context sheds first
   (breadcrumb, then the brand subtitle), then the command palette folds to its icon, so an
   executive approving on mobile still has search, approvals and their avatar in reach. */
@media (max-width:1024px){
  .p7b-top{ grid-template-columns:minmax(0,1fr) minmax(0,380px) minmax(0,1fr) }
}
@media (max-width:860px){
  .p7b-top{ grid-template-columns:auto 1fr auto; gap:var(--p7-space-3) }
  .p7b-cmdwrap{ grid-column:2; justify-self:end; max-width:300px }
  .p7b-crumb{ display:none }
  .p7b-sub{ display:none }
}
@media (max-width:620px){
  .p7b-cmd span:first-of-type,.p7b-cmd .p7-kbd{ display:none }
  .p7b-cmd{ width:auto; padding:7px; justify-self:end }
  .p7b-cmdwrap{ justify-self:end; max-width:none; width:auto }
  .p7b-ws #wsName{ max-width:96px }
}

/* -- Body grid -------------------------------------------------------------- */
.p7b-body{ flex:1; min-height:0; display:flex; align-items:stretch }

/* -- Navigation ------------------------------------------------------------- */
.p7b-nav{ flex:0 0 216px; min-width:0; display:flex; flex-direction:column;
  gap:var(--p7-space-4); padding:var(--p7-space-3) 10px;
  background:var(--p7-surface); border-right:1px solid var(--p7-line) }
.p7b-kbdq{ font-family:var(--p7-font-mono); font-size:11px; opacity:.75 }

.p7b-sections{ display:flex; flex-direction:column; gap:2px }
.p7b-navitem{ display:flex; align-items:center; gap:var(--p7-space-2); width:100%;
  padding:var(--p7-space-2); border:0; border-radius:var(--p7-radius-button);
  background:transparent; color:var(--p7-ink); cursor:pointer;
  font:var(--p7-text-ui); font-family:var(--p7-font-sans); text-align:left }
.p7b-navitem:hover{ background:var(--p7-surface-sunken) }
.p7b-navitem.is-on{ background:var(--p7-accent-bg); color:var(--p7-accent-ink); font-weight:600 }
.p7b-navitem.is-on svg{ stroke:var(--p7-accent) }
.p7b-navitem svg{ stroke:var(--p7-ink-subtle) }
.p7b-n{ margin-left:auto; font-size:11px; color:var(--p7-ink-subtle) }
.p7b-pip{ margin-left:auto; font-size:11px; border-radius:var(--p7-radius-pill);
  padding:1px 7px; background:var(--p7-hold-bg); color:var(--p7-hold-ink) }

.p7b-navscroll{ flex:1; min-height:0; overflow:auto }
.p7b-grouphd{ display:flex; align-items:center; gap:var(--p7-space-2); padding:0 var(--p7-space-2) 6px }
.p7b-seclink{ margin-left:auto; border:0; background:transparent; cursor:pointer;
  font-size:var(--p7-eyebrow-size); font-weight:var(--p7-eyebrow-weight);
  letter-spacing:var(--p7-eyebrow-tracking); text-transform:uppercase;
  color:var(--p7-ink-faint); padding:2px 5px; border-radius:var(--p7-radius-control) }
.p7b-seclink:hover{ color:var(--p7-ink); background:var(--p7-surface-sunken) }
.p7b-seclink[aria-pressed="true"]{ color:var(--p7-accent); background:var(--p7-accent-bg) }
.p7b-list{ display:flex; flex-direction:column; margin-bottom:var(--p7-space-4) }

/* A chat or task row in the rail. */
.p7b-item{ position:relative; display:flex; align-items:center; gap:var(--p7-space-2);
  padding:7px var(--p7-space-2); border-radius:var(--p7-radius-button); cursor:pointer;
  font:var(--p7-text-ui); font-family:var(--p7-font-sans); color:var(--p7-ink-strong) }
.p7b-item:hover{ background:var(--p7-surface-sunken) }
.p7b-item.is-on{ background:var(--p7-surface-sunken); color:var(--p7-ink); font-weight:600 }
.p7b-item__t{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.p7b-item__more{ opacity:0; border:0; background:transparent; cursor:pointer;
  color:var(--p7-ink-subtle); border-radius:var(--p7-radius-control); padding:0 4px; line-height:1 }
.p7b-item:hover .p7b-item__more,
.p7b-item__more:focus-visible{ opacity:1 }
.p7b-item.is-arch{ opacity:.72 } .p7b-item.is-arch:hover{ opacity:1 }
.p7b-item.is-gated{ background:var(--p7-hold-bg-soft); border:1px solid var(--p7-hold-line) }
.p7b-rename{ flex:1; min-width:0; font:var(--p7-text-ui); font-family:var(--p7-font-sans);
  color:var(--p7-ink); background:var(--p7-surface);
  border:1px solid var(--p7-accent); border-radius:var(--p7-radius-control); padding:2px 6px; outline:none }
.p7b-empty{ padding:6px var(--p7-space-2); font:var(--p7-text-caption);
  font-family:var(--p7-font-sans); color:var(--p7-ink-subtle) }
.p7b-partial{ margin:2px 2px var(--p7-space-2); padding:6px 9px; font-size:11px;
  border-radius:var(--p7-radius-button);
  background:var(--p7-hold-bg-soft); border:1px solid var(--p7-hold-line); color:var(--p7-hold-ink) }

.p7b-menu{ position:absolute; right:4px; top:26px; z-index:30; min-width:154px;
  display:flex; flex-direction:column; padding:4px;
  background:var(--p7-surface); border:1px solid var(--p7-line-strong);
  border-radius:10px; box-shadow:var(--p7-elev-overlay) }
.p7b-menu button{ border:0; background:transparent; text-align:left; cursor:pointer;
  padding:7px 9px; border-radius:var(--p7-radius-control);
  font:var(--p7-text-ui); font-family:var(--p7-font-sans); color:var(--p7-ink) }
.p7b-menu button:hover{ background:var(--p7-surface-sunken) }

/* -- Tab strip -------------------------------------------------------------- */
.p7b-main{ flex:999 1 560px; min-width:0; display:flex; flex-direction:column }
.p7b-tabs{ display:flex; align-items:center; padding:0 10px; background:var(--p7-surface);
  border-bottom:1px solid var(--p7-line); overflow-x:auto }
.p7b-tab{ display:flex; align-items:center; gap:var(--p7-space-2); flex:0 0 auto;
  padding:10px var(--p7-space-3); border:0; background:transparent; cursor:pointer;
  border-bottom:2px solid transparent; color:var(--p7-ink-subtle);
  font:var(--p7-text-ui); font-family:var(--p7-font-sans) }
.p7b-tab.is-on{ border-bottom-color:var(--p7-accent); color:var(--p7-ink); font-weight:600 }
.p7b-tab__x{ border:0; background:transparent; cursor:pointer; color:var(--p7-ink-faint);
  padding:0 2px; line-height:1; border-radius:4px }
.p7b-tab__x:hover{ color:var(--p7-ink); background:var(--p7-line-soft) }
.p7b-tabadd{ padding:8px 10px; border:0; background:transparent; cursor:pointer;
  color:var(--p7-ink-subtle); font-size:15px; line-height:1 }

/* -- Stream ----------------------------------------------------------------- */
.p7b-stream{ flex:1; min-height:0; overflow:auto;
  padding:var(--p7-space-5) var(--p7-space-6);
  display:flex; flex-direction:column; gap:var(--p7-space-4) }
.p7b-daysep{ display:flex; align-items:center; gap:10px;
  color:var(--p7-ink-faint); font:var(--p7-text-caption); font-family:var(--p7-font-sans) }
.p7b-daysep::before,.p7b-daysep::after{ content:""; flex:1; height:1px; background:var(--p7-line) }

/* A person's turn: avatar + prose, no card. */
.p7b-user{ display:flex; gap:var(--p7-space-3) }
.p7b-user__b{ min-width:0; padding-top:3px }
.p7b-mention{ background:var(--p7-accent-bg); color:var(--p7-accent-ink);
  border-radius:5px; padding:1px 6px; font-weight:600 }

/* An agent's turn: a card, because it carries a decision. */
.p7b-turn{ border:1px solid var(--p7-line); border-radius:var(--p7-radius-card);
  background:var(--p7-surface); overflow:hidden; box-shadow:var(--p7-elev-rest) }
.p7b-turn.is-live{ border-color:var(--p7-accent-line) }
.p7b-turn.is-sel{ border-color:var(--p7-accent) }
.p7b-turn__hd{ display:flex; align-items:center; gap:9px; padding:9px var(--p7-space-4);
  border-bottom:1px solid var(--p7-line-soft); background:var(--p7-surface-raised) }
.p7b-turn.is-live .p7b-turn__hd{ background:var(--p7-accent-raised) }
.p7b-turn__mark{ width:22px; height:22px; border-radius:var(--p7-radius-control);
  background:var(--p7-accent-bg); display:grid; place-items:center; flex:0 0 auto }
.p7b-turn__mark svg{ width:13px; height:13px; stroke:var(--p7-accent) }
.p7b-turn__who{ font-size:13px; font-weight:700 }
.p7b-turn__meta{ font:var(--p7-text-mono); color:var(--p7-ink-subtle) }
.p7b-turn__flag{ margin-left:auto; font-size:11px; font-weight:600; padding:2px var(--p7-space-2);
  border-radius:var(--p7-radius-control) }
.p7b-turn__flag.deny{ color:var(--p7-deny); background:var(--p7-deny-bg); border:1px solid var(--p7-deny-line) }
.p7b-turn__flag.hold{ color:var(--p7-hold-ink); background:var(--p7-hold-bg); border:1px solid var(--p7-hold-line) }
.p7b-turn__tools{ display:flex; align-items:center; gap:2px; padding:2px;
  border:1px solid var(--p7-line); border-radius:var(--p7-radius-button);
  background:var(--p7-surface); box-shadow:var(--p7-elev-rest); opacity:0 }
.p7b-turn:hover .p7b-turn__tools,
.p7b-turn:focus-within .p7b-turn__tools{ opacity:1 }
.p7b-turn__tools .p7-iconbtn{ width:26px; height:26px }
.p7b-turn__b{ padding:var(--p7-space-4) var(--p7-space-4) }
.p7b-live{ display:inline-flex; align-items:center; gap:6px; font-size:12px;
  font-weight:600; color:var(--p7-accent) }

/* Tool trace. */
.p7b-trace{ border:1px solid var(--p7-line); border-radius:9px;
  background:var(--p7-surface-raised); margin-bottom:var(--p7-space-3) }
.p7b-trace>summary{ display:flex; align-items:center; gap:9px; cursor:pointer;
  padding:var(--p7-space-2) var(--p7-space-3); font:var(--p7-text-ui); font-family:var(--p7-font-sans) }
.p7b-trace>summary::-webkit-details-marker{ display:none }
.p7b-trace>summary svg{ width:14px; height:14px; stroke:var(--p7-ink-muted) }
.p7b-trace__sub{ color:var(--p7-ink-subtle) }
.p7b-trace__tog{ margin-left:auto; font-size:12px; color:var(--p7-accent) }
.p7b-trace ol{ list-style:none; margin:0; padding:4px var(--p7-space-3) var(--p7-space-3);
  display:flex; flex-direction:column; gap:7px; font:var(--p7-text-ui); font-family:var(--p7-font-sans) }
.p7b-step{ display:flex; align-items:center; gap:9px }
.p7b-step .p7-mark{ width:17px; height:17px; font-size:10px }
.p7b-step__n{ font:var(--p7-text-mono); color:var(--p7-ink) }
.p7b-step__r{ color:var(--p7-ink-subtle); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.p7b-step__r.deny{ color:var(--p7-deny) }
.p7b-step__ms{ margin-left:auto; font:var(--p7-text-mono); font-size:11px; color:var(--p7-ink-faint) }

/* Attachment card on a person's turn. */
.p7b-file{ margin-top:var(--p7-space-2); display:inline-flex; align-items:center; gap:9px;
  border:1px solid var(--p7-line); border-radius:9px; background:var(--p7-surface); padding:var(--p7-space-2) 11px }
.p7b-file__k{ width:28px; height:28px; border-radius:7px; display:grid; place-items:center;
  background:var(--p7-allow-bg); color:var(--p7-allow-ink); font-size:10px; font-weight:700 }
.p7b-file__n{ font-size:13px; font-weight:600 }
.p7b-file__s{ display:block; font:var(--p7-text-caption); font-family:var(--p7-font-sans); color:var(--p7-ink-subtle) }

/* What a person can do about a turn. */
.p7b-acts{ display:flex; gap:var(--p7-space-2); flex-wrap:wrap; margin-bottom:11px }
.p7b-react{ display:flex; gap:6px; align-items:center; flex-wrap:wrap }
.p7b-react button{ padding:3px 9px; border-radius:7px; cursor:pointer;
  border:1px solid var(--p7-line); background:var(--p7-surface);
  font-size:12px; font-family:var(--p7-font-sans); color:var(--p7-ink) }
.p7b-react button.is-mine{ border-color:var(--p7-accent-line); background:var(--p7-accent-bg-soft) }
.p7b-react .add{ border-style:dashed; display:flex; align-items:center }
.p7b-react .add svg{ width:13px; height:13px; stroke:var(--p7-ink-subtle) }
.p7b-thread{ display:flex; align-items:center; gap:7px; margin-left:var(--p7-space-1);
  border:0; background:transparent; cursor:pointer;
  font-size:12px; font-weight:600; font-family:var(--p7-font-sans); color:var(--p7-accent) }

/* Streaming placeholder. */
.p7b-skel{ display:flex; flex-direction:column; gap:var(--p7-space-2) }
.p7b-skel span{ height:10px; border-radius:5px; background:var(--p7-line-soft) }

/* -- Composer ---------------------------------------------------------------- */
.p7b-composerwrap{ padding:0 var(--p7-space-6) 18px }
.p7b-composer{ position:relative; border:1px solid var(--p7-line-strong);
  border-radius:var(--p7-radius-card); background:var(--p7-surface);
  padding:10px var(--p7-space-3); box-shadow:var(--p7-elev-rest) }
.p7b-composer:focus-within{ border-color:var(--p7-accent-line) }
.p7b-chips{ display:flex; gap:6px; flex-wrap:wrap }
.p7b-chips:not(:empty){ margin-bottom:var(--p7-space-2) }
.p7b-chip{ font-size:12px; border-radius:var(--p7-radius-control); padding:2px var(--p7-space-2);
  background:var(--p7-line-soft); color:var(--p7-ink-muted) }
.p7b-chip--skill{ font-family:var(--p7-font-mono); background:var(--p7-accent-bg); color:var(--p7-accent-ink) }
.p7b-composer>input{ width:100%; box-sizing:border-box; border:0; outline:none;
  background:transparent; color:var(--p7-ink);
  font-size:14px; font-family:var(--p7-font-sans); padding:3px 0 9px }
.p7b-comprow{ display:flex; align-items:center; gap:var(--p7-space-1) }
.p7b-comphint{ font:var(--p7-text-caption); font-family:var(--p7-font-sans);
  color:var(--p7-ink-subtle); margin-left:var(--p7-space-1) }
.p7b-model{ width:auto; margin-left:auto; padding:5px 9px; font-size:12px }
.p7b-comprow .p7-btn{ margin-left:var(--p7-space-2) }

/* -- Inspector ---------------------------------------------------------------- */
.p7b-insp{ position:relative; flex:0 0 var(--p7b-insp-w, 320px); min-width:288px;
  display:flex; flex-direction:column; gap:var(--p7-space-3); padding:var(--p7-space-3);
  background:var(--p7-surface); border-left:1px solid var(--p7-line); overflow:auto }
.p7b.insp-hidden .p7b-insp{ display:none }
.p7b-grip{ position:absolute; left:-4px; top:50%; transform:translateY(-50%);
  width:8px; height:46px; padding:0; border:0; border-radius:5px;
  background:var(--p7-line-strong); cursor:col-resize }
.p7b-insp__hd{ display:flex; align-items:center; gap:var(--p7-space-2) }
.p7b-insp__x{ margin-left:auto }
.p7b-insp__body{ display:flex; flex-direction:column; gap:var(--p7-space-3) }

.p7b-verdict{ border-radius:10px; padding:var(--p7-space-3); border:1px solid var(--p7-line) }
.p7b-verdict--deny{ border-color:var(--p7-deny-line); background:var(--p7-deny-bg-soft) }
.p7b-verdict--hold{ border-color:var(--p7-hold-line); background:var(--p7-hold-bg-soft) }
.p7b-verdict--allow{ border-color:var(--p7-line); background:var(--p7-allow-bg) }
.p7b-verdict__t{ font-weight:600; margin-bottom:var(--p7-space-1) }
.p7b-verdict--deny .p7b-verdict__t{ color:var(--p7-deny) }
.p7b-verdict--hold .p7b-verdict__t{ color:var(--p7-hold-ink) }
.p7b-verdict--allow .p7b-verdict__t{ color:var(--p7-allow-ink) }
.p7b-verdict__id{ font:var(--p7-text-mono); color:var(--p7-ink-muted); margin-bottom:var(--p7-space-2) }
.p7b-verdict p{ margin:0 0 10px; font:var(--p7-text-ui);
  font-family:var(--p7-font-sans); color:var(--p7-ink-muted) }
.p7b-verdict__routed{ color:var(--p7-hold-ink) !important }
.p7b-verdict__unrouted{ color:var(--p7-deny) !important }
.p7b-verdict__unrouted strong{ color:var(--p7-deny) }
.p7b-verdict .p7-btn{ width:100% }
.p7b-verdict--deny .p7-btn{ background:var(--p7-deny); border-color:transparent;
  color:var(--p7-ink-on-accent); font-weight:600 }

.p7b-fold{ border:1px solid var(--p7-line); border-radius:10px; padding:10px var(--p7-space-3) }
.p7b-fold>summary{ font-size:13px; font-weight:600; cursor:pointer; list-style:none }
.p7b-fold>summary::-webkit-details-marker{ display:none }
.p7b-fold>summary::before{ content:"\25B8"; display:inline-block; width:12px;
  color:var(--p7-ink-subtle); transition:transform var(--p7-fast) var(--p7-ease) }
.p7b-fold[open]>summary::before{ transform:rotate(90deg) }
/* Section heading INSIDE a fold — separates the two governed boundaries of one turn
   (the model call and its tool calls) without nesting a second disclosure. */
.p7b-fold__h{ margin:10px 0 4px; font-size:11px; font-weight:600; letter-spacing:.04em;
  text-transform:uppercase; color:var(--p7-ink-muted) }
.p7b-fold__h:first-child{ margin-top:4px }
/* One tool in the Inspector: its name row, then its own description when it has one. */
.p7b-tool{ display:flex; flex-direction:column; gap:2px }
.p7b-tool__d{ margin-left:18px; font-size:12px; line-height:1.45; color:var(--p7-ink-muted) }
.p7b-phases{ list-style:none; margin:9px 0 0; padding:0;
  display:flex; flex-direction:column; gap:7px; font:var(--p7-text-ui); font-family:var(--p7-font-sans) }
.p7b-phase{ display:flex; gap:var(--p7-space-2); align-items:flex-start }
.p7b-phase.is-skipped{ color:var(--p7-ink-faint) }
.p7b-phase a{ color:var(--p7-accent); text-decoration:none }
.p7b-phase a:hover{ text-decoration:underline }
.p7b-insp__empty{ font:var(--p7-text-ui); font-family:var(--p7-font-sans); color:var(--p7-ink-subtle) }

.p7b-keys{ margin-top:auto; padding-top:10px; border-top:1px solid var(--p7-line);
  display:flex; flex-wrap:wrap; gap:9px;
  font:var(--p7-text-caption); font-family:var(--p7-font-sans); color:var(--p7-ink-subtle) }

/* -- Toast ------------------------------------------------------------------- */
.p7b-toast{ position:fixed; left:50%; bottom:26px; transform:translateX(-50%); z-index:300;
  max-width:min(520px,92vw); display:flex; align-items:center; gap:14px;
  padding:11px var(--p7-space-4); border-radius:10px;
  background:var(--p7-ink); color:var(--p7-canvas);
  font:var(--p7-text-ui); font-family:var(--p7-font-sans); box-shadow:var(--p7-elev-overlay) }
.p7b-toast button{ border:0; background:transparent; cursor:pointer; white-space:nowrap;
  font:inherit; font-weight:700; color:var(--p7-accent-hover);
  padding:2px 4px; border-radius:var(--p7-radius-control) }
html[data-theme="dark"] .p7b-toast button{ color:var(--p7-accent) }
html[data-theme="dark"] .p7b-toast{ background:var(--p7-surface-raised); color:var(--p7-ink);
  border:1px solid var(--p7-line) }

/* -- Narrow ------------------------------------------------------------------- */
@media (max-width: 1100px){ .p7b-insp{ display:none } }
@media (max-width: 860px){
  .p7b-nav{ flex-basis:64px; align-items:center }
  .p7b-nav .p7b-navscroll, .p7b-navitem span{ display:none }
  .p7b-cmdwrap{ order:9; flex-basis:100% ; max-width:none; margin:var(--p7-space-2) 0 0 }
}

/* -- Command palette (⌘K) ------------------------------------------------------ */
.p7b-cmdpal{ position:fixed; inset:0; z-index:400; background:rgba(16,24,40,.34);
  display:flex; align-items:flex-start; justify-content:center; padding:12vh 16px 16px }
.p7b-cmdpal__box{ width:min(560px,100%); background:var(--p7-surface);
  border:1px solid var(--p7-line-strong); border-radius:var(--p7-radius-card);
  box-shadow:var(--p7-elev-overlay); overflow:hidden }
.p7b-cmdpal__in{ width:100%; box-sizing:border-box; border:0; outline:none;
  padding:var(--p7-space-4); font-size:15px; font-family:var(--p7-font-sans);
  background:transparent; color:var(--p7-ink); border-bottom:1px solid var(--p7-line) }
.p7b-cmdpal__list{ max-height:46vh; overflow:auto; padding:var(--p7-space-1) }
.p7b-cmdpal__row{ display:flex; align-items:center; gap:10px; width:100%;
  border:0; background:transparent; cursor:pointer; text-align:left;
  padding:var(--p7-space-2) var(--p7-space-3); border-radius:var(--p7-radius-button);
  font:var(--p7-text-ui); font-family:var(--p7-font-sans); color:var(--p7-ink) }
.p7b-cmdpal__row:hover,.p7b-cmdpal__row:focus-visible{ background:var(--p7-accent-bg) }
.p7b-cmdpal__row .p7-eyebrow{ flex:0 0 62px }
.p7b-pin{ color:var(--p7-accent); font-size:9px; line-height:1 }

/* The markdown body inside a turn inherits the B type scale. */
.p7b-md{ font:var(--p7-text-body); font-family:var(--p7-font-sans); color:var(--p7-ink-strong) }
.p7b-md > :first-child{ margin-top:0 }
.p7b-md > :last-child{ margin-bottom:0 }

/* -- Brand lockup -------------------------------------------------------------
   Two pairs ship and CSS picks: the mark needs a plate that matches the surface
   behind it, and the wordmark needs ink that reads against it. Swapping in CSS
   rather than JS means the right one is painted on the first frame. */
.p7b-lockup{ display:flex; align-items:center; gap:7px; text-decoration:none; color:inherit }
.p7b-mark{ height:22px; width:auto; display:block }
.p7b-word{ height:16px; width:auto; display:block }
.p7b-sub{ font-size:11px; font-weight:600; letter-spacing:.01em; color:var(--p7-ink-subtle);
  padding-left:7px; margin-left:1px; border-left:1px solid var(--p7-line);
  white-space:nowrap; align-self:center }

html[data-theme="light"] .p7b-mark.on-dark,
html[data-theme="light"] .p7b-word.on-dark,
html[data-theme="dark"]  .p7b-mark.on-light,
html[data-theme="dark"]  .p7b-word.on-light{ display:none }

/* Before the theme attribute lands, follow the OS so the first paint is never wrong. */
html:not([data-theme]) .p7b-mark.on-dark,
html:not([data-theme]) .p7b-word.on-dark{ display:none }
@media (prefers-color-scheme: dark){
  html:not([data-theme]) .p7b-mark.on-light,
  html:not([data-theme]) .p7b-word.on-light{ display:none }
  html:not([data-theme]) .p7b-mark.on-dark,
  html:not([data-theme]) .p7b-word.on-dark{ display:block }
}

@media (max-width: 1180px){ .p7b-sub{ display:none } }

/* A rail row that has to be told apart from seven others like it: the work on the first
   line, what kind it is and when it is due on the second. Compact density drops the second
   line and nothing else — the dot, the approval pill and the hit target all stay. */
.p7b-item--two{ align-items:flex-start; padding-top:var(--p7-row-y); padding-bottom:var(--p7-row-y) }
.p7b-item--two .p7-dot{ margin-top:6px }
.p7b-item__main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px }
.p7b-item__sub{ font:var(--p7-text-caption); font-family:var(--p7-font-sans);
  color:var(--p7-ink-subtle); overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.p7b-item__sub.is-late{ color:var(--p7-deny) }
[data-density="compact"] .p7b-item__sub{ display:none }
.p7b-item--two .p7-status{ margin-top:1px; flex:0 0 auto }

/* A menu anchored to a top-bar button. Positioned from script, so it only needs to escape
   the flow here. The modifier is namespaced on purpose: a bare marker like `.top` collides
   with a global rule elsewhere in the cascade, which is exactly how this menu once inherited
   a 60px height and 16px gaps from the old header. */
.p7b-menu--float{ position:fixed }

/* A turn is a flex child of the column that holds the stream, and flex children shrink by
   default. With `overflow:hidden` on the card, that silently CLIPPED the answer: a table's
   last rows simply vanished. Content sets the height here; the stream scrolls instead. */
.p7b-stream > *{ flex:0 0 auto }

/* What a phase claim rests on. The label and its evidence STACK rather than competing for one
   narrow line: side by side, a three-word label wrapped to three lines while its evidence
   truncated to "token exchan…", which is worth nothing to a reader. The claim reads first,
   what backs it reads underneath, and the full value is on the title attribute. */
.p7b-phase .p7-mark{ margin-top:1px }
.p7b-phase__body{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px }
.p7b-phase__ev{ display:block; font:var(--p7-text-mono); font-size:10.5px; line-height:1.45;
  color:var(--p7-ink-faint); overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.p7b-phase.is-skipped .p7b-phase__ev{ display:none }

/* -- Composer pickers ---------------------------------------------------------
   Both sit inside the composer card and above it, so the list never covers the text
   being typed. */
.p7b-pick, .p7b-emoji{
  position:absolute; left:0; bottom:calc(100% + 6px); z-index:200;
  background:var(--p7-surface); border:1px solid var(--p7-line-strong);
  border-radius:var(--p7-radius-card); box-shadow:var(--p7-elev-overlay); padding:4px }
.p7b-pick{ min-width:280px; max-width:min(440px,100%); max-height:46vh; overflow:auto;
  display:flex; flex-direction:column }
.p7b-pick__row{ display:flex; align-items:baseline; gap:10px; width:100%; text-align:left;
  border:0; background:transparent; cursor:pointer; padding:7px 9px;
  border-radius:var(--p7-radius-control);
  font:var(--p7-text-ui); font-family:var(--p7-font-sans); color:var(--p7-ink) }
.p7b-pick__row.is-on, .p7b-pick__row:hover{ background:var(--p7-accent-bg) }
.p7b-pick__n{ font-family:var(--p7-font-mono); font-size:12.5px; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.p7b-pick__h{ margin-left:auto; font:var(--p7-text-caption); font-family:var(--p7-font-sans);
  color:var(--p7-ink-subtle); flex:0 0 auto }

.p7b-emoji{ display:grid; grid-template-columns:repeat(9, 1fr); gap:2px; width:max-content }
.p7b-emoji button{ width:30px; height:30px; border:0; background:transparent; cursor:pointer;
  border-radius:var(--p7-radius-control); font-size:16px; line-height:1 }
.p7b-emoji button:hover{ background:var(--p7-accent-bg) }

/* A control that is off says why on hover, and does not pretend to be available. */
.p7-iconbtn:disabled{ opacity:.4; cursor:not-allowed }
.p7-iconbtn:disabled:hover{ background:transparent; color:var(--p7-ink-muted) }

/* -- Stop ---------------------------------------------------------------------
   Only while a turn is running. It abandons the stream, not the governed run. */
.p7b-stop{ margin-left:var(--p7-space-2); flex:0 0 auto }

/* -- Inspector width ----------------------------------------------------------
   Driven by a variable so the drag handle, the keyboard arrows and the remembered
   value all set the same thing. */
.p7b-grip:hover, .p7b-grip:focus-visible{ background:var(--p7-accent) }

/* ── brand profile (CHAT_BRAND_PROFILE) ── */
.p7b-brandword{ font-weight:700; font-size:15px; letter-spacing:-.01em; color:var(--p7-ink); white-space:nowrap }
.p7b-brandword--big{ font-size:24px; color:#fff }
.p7b-chip--prompt{ cursor:pointer; background:var(--p7-surface); border:1px solid var(--p7-line); color:var(--p7-ink) }
.p7b-chip--prompt:hover{ border-color:var(--p7-accent); color:var(--p7-accent-ink) }

/* ── Agents panel (Actions → Agents) ───────────────────────────────────────── */
.p7b-agents{ display:flex; flex-direction:column; gap:6px; margin-top:10px }
.p7b-agent{ display:flex; align-items:center; gap:8px; padding:8px 10px;
  border:1px solid var(--p7-border-2); border-radius:var(--p7-radius-control); cursor:pointer }
.p7b-agent:hover{ background:var(--p7-btn-bg-hover) }
.p7b-agent input{ accent-color:var(--p7-accent); width:15px; height:15px; cursor:pointer }
.p7b-agent__name{ font-size:13px; color:var(--p7-ink) }
.p7b-agent__meta{ margin-left:auto; font-size:11px; color:var(--p7-ink-faint) }
.p7b-agent__badge{ font-size:9.5px; font-weight:700; letter-spacing:.04em;
  color:var(--p7-allow-ink); background:var(--p7-allow-bg);
  border-radius:var(--p7-radius-pill); padding:1px 6px }
.p7b-agent--new{ border-color:var(--p7-accent) }

/* ── Full Tasks page (nav → Tasks) ──────────────────────────────────────────── */
.p7b-tv{ overflow:hidden; background:var(--p7-canvas) }
/* Hide the Inspector while the Tasks page is open — it has nothing to show here and eats width. */
.p7b.view-tasks .p7b-insp{ display:none }
.p7b-tv__hd{ display:flex; align-items:center; gap:14px 16px; flex-wrap:wrap;
  padding:20px 24px 14px; border-bottom:1px solid var(--p7-line) }
.p7b-tv__titles{ display:flex; flex-direction:column; gap:2px; margin-right:auto }
.p7b-tv__title{ margin:0; font-size:19px; font-weight:600; color:var(--p7-ink-strong, var(--p7-ink)) }
.p7b-tv__sub{ font-size:12.5px; color:var(--p7-ink-muted) }
.p7b-tv__filters{ display:inline-flex; gap:2px; padding:3px; background:var(--p7-surface-sunken);
  border-radius:var(--p7-radius-pill, 999px) }
.p7b-tv__tab{ font:inherit; font-size:12.5px; padding:5px 13px; border-radius:var(--p7-radius-pill, 999px);
  border:0; background:none; color:var(--p7-ink-muted); cursor:pointer; transition:all var(--p7-fast, .12s) }
.p7b-tv__tab:hover{ color:var(--p7-ink) }
.p7b-tv__tab.is-on{ background:var(--p7-surface); color:var(--p7-ink-strong, var(--p7-ink)); font-weight:500; box-shadow:var(--p7-shadow-card, 0 1px 2px rgba(0,0,0,.06)) }
.p7b-tv__body{ flex:1 1 auto; overflow:auto; padding:18px 24px 28px }
.p7b-tv__wrap{ max-width:720px; margin:0 auto; display:flex; flex-direction:column; gap:22px }
.p7b-tv__group{ display:flex; flex-direction:column; gap:8px }
.p7b-tv__grouphd{ display:flex; align-items:center; gap:8px; font-size:11px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase; color:var(--p7-ink-muted); padding:0 2px }
.p7b-tv__grouphd .n{ color:var(--p7-ink-faint) }

/* Task card */
.p7tk{ display:flex; align-items:center; gap:13px; padding:13px 15px; background:var(--p7-surface);
  border:1px solid var(--p7-line); border-radius:var(--p7-radius-card, 12px); cursor:pointer;
  transition:border-color var(--p7-fast,.12s), box-shadow var(--p7-fast,.12s) }
.p7tk:hover{ border-color:var(--p7-accent-line, var(--p7-accent)); box-shadow:var(--p7-shadow-card, 0 1px 3px rgba(0,0,0,.08)) }
.p7tk__icon{ flex:0 0 auto; width:36px; height:36px; border-radius:10px; display:grid; place-items:center;
  background:var(--p7-surface-sunken); color:var(--p7-ink-muted); font-size:18px }
.p7tk.is-gated .p7tk__icon{ background:var(--p7-hold-bg-soft); color:var(--p7-hold-ink, var(--p7-hold)) }
.p7tk.is-late .p7tk__icon{ background:var(--p7-deny-bg-soft); color:var(--p7-deny) }
.p7tk__main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px }
.p7tk__title{ font-size:14px; font-weight:500; color:var(--p7-ink-strong, var(--p7-ink));
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.p7tk__meta{ font-size:12px; color:var(--p7-ink-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.p7tk__right{ flex:0 0 auto; display:flex; align-items:center; gap:10px }
.p7tk__due{ font-size:12px; color:var(--p7-ink-muted); white-space:nowrap }
.p7tk__due.is-late{ color:var(--p7-deny); font-weight:500 }
.p7tk__badge{ font-size:11px; font-weight:500; padding:2px 9px; border-radius:var(--p7-radius-pill,999px);
  background:var(--p7-hold-bg); color:var(--p7-hold-ink, var(--p7-hold)) }
.p7tk__chev{ color:var(--p7-ink-faint); font-size:16px }

.p7b-tv__state{ padding:64px 24px; text-align:center; color:var(--p7-ink-muted);
  display:flex; flex-direction:column; align-items:center; gap:12px }
.p7b-tv__state .ic{ font-size:30px; color:var(--p7-ink-faint) }
.p7b-tv__foot{ display:flex; align-items:center; justify-content:center; gap:14px; padding:18px 12px 4px }
.p7b-tv__count{ color:var(--p7-ink-subtle, var(--p7-ink-muted)); font-size:12px }

/* Agent trust section in the Inspector */
.p7b-agents__hd{ margin:16px 2px 6px; font-size:11px; font-weight:600; letter-spacing:.08em;
  text-transform:uppercase; color:var(--p7-ink-muted) }
.p7b-agent--trust{ cursor:pointer }
.p7b-agent__score{ margin-left:auto; font-size:12.5px; font-weight:600; color:var(--p7-ink-muted);
  font-variant-numeric:tabular-nums }
.p7b-agent__score.is-hi{ color:var(--p7-allow) } .p7b-agent__score.is-mid{ color:var(--p7-hold) }
.p7b-agent__score.is-lo{ color:var(--p7-deny) } .p7b-agent__score.is-none{ color:var(--p7-ink-faint) }
/* Expandable agent Trust Score in the Inspector */
.p7b-agentrow{ display:flex; flex-direction:column }
.p7b-agent__exp{ margin-left:8px; border:0; background:none; cursor:pointer; color:var(--p7-ink-faint);
  padding:2px; display:grid; place-items:center; transition:transform var(--p7-fast,.12s), color var(--p7-fast,.12s) }
.p7b-agent__exp:hover{ color:var(--p7-ink) }
.p7b-agent__exp.is-open{ transform:rotate(90deg) }
.p7b-agent__exp svg{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round }
.p7b-agenttrust{ padding:2px 4px 10px 30px }

/* ── Governed modal (centered) — task + approval review ─────────────────────── */
.p7mdl-back{ position:fixed; inset:0; z-index:60; background:rgba(16,22,38,.46);
  display:flex; align-items:center; justify-content:center; padding:20px; animation:p7mdlfade .12s ease }
@keyframes p7mdlfade{ from{ opacity:0 } to{ opacity:1 } }
.p7mdl{ width:400px; max-width:100%; max-height:88vh; overflow:auto; background:var(--p7-surface);
  border-radius:18px; box-shadow:0 24px 60px rgba(16,22,38,.3); display:flex; flex-direction:column }
.p7mdl__hd{ display:flex; align-items:center; gap:9px; padding:18px 20px 0 }
.p7mdl__risk{ font-size:11px; font-weight:500; padding:2px 9px; border-radius:var(--p7-radius-pill,999px);
  background:var(--p7-deny-bg); color:var(--p7-deny) }
.p7mdl__risk--low{ background:var(--p7-allow-bg); color:var(--p7-allow-ink, var(--p7-allow)) }
.p7mdl__kind{ font-size:12px; color:var(--p7-ink-muted) }
.p7mdl__x{ margin-left:auto; border:0; background:none; cursor:pointer; color:var(--p7-ink-muted);
  font-size:18px; padding:2px; line-height:1 }
.p7mdl__x:hover{ color:var(--p7-ink) }
.p7mdl__title{ padding:8px 20px 0; font-size:17px; font-weight:600; color:var(--p7-ink-strong, var(--p7-ink)) }
.p7mdl__prov{ padding:4px 20px 0; font-size:12px; color:var(--p7-ink-muted) }
.p7mdl__body{ padding:14px 20px; display:flex; flex-direction:column; gap:14px }

/* Trust panel */
.p7trust{ display:flex; align-items:center; gap:11px; padding:11px 13px; border-radius:12px;
  border:1px solid var(--p7-line); background:var(--p7-surface-sunken) }
.p7trust__av{ width:38px; height:38px; border-radius:50%; display:grid; place-items:center;
  background:var(--p7-accent-bg); color:var(--p7-accent-ink, var(--p7-accent)); font-weight:600; font-size:12px }
.p7trust__id{ flex:1; min-width:0 }
.p7trust__name{ font-size:13.5px; font-weight:500; color:var(--p7-ink-strong, var(--p7-ink));
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.p7trust__sub{ font-size:11.5px; color:var(--p7-ink-muted) }
.p7trust__score{ text-align:right; line-height:1.1 }
.p7trust__num{ font-size:20px; font-weight:600 }
.p7trust__num.is-hi{ color:var(--p7-allow) } .p7trust__num.is-mid{ color:var(--p7-hold) } .p7trust__num.is-lo{ color:var(--p7-deny) }
.p7trust__band{ font-size:11px; color:var(--p7-ink-muted) }
.p7trust__none{ font-size:12px; color:var(--p7-ink-muted) }
/* B2 trust gauge */
.p7gauge{ position:relative; width:56px; height:56px; flex:0 0 auto }
.p7gauge svg{ width:56px; height:56px; transform:rotate(-90deg) }
.p7gauge__bg{ fill:none; stroke:var(--p7-line); stroke-width:3.4 }
.p7gauge__fg{ fill:none; stroke-width:3.4; stroke-linecap:round; transition:stroke-dashoffset .5s ease }
.p7gauge__n{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:600 }

/* Inline-SVG stroke styling (no icon font loaded) */
.p7tk__icon svg{ width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round }
.p7tk__chev svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round }
.p7b-tv__state .ic svg{ width:30px; height:30px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round }

/* Key/value change rows */
.p7mdl__rows{ display:flex; flex-direction:column }
.p7mdl__rowh{ font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--p7-ink-faint); margin-bottom:4px }
.p7mdl__row{ display:flex; justify-content:space-between; gap:12px; font-size:13px;
  padding:6px 0; border-bottom:1px solid var(--p7-line) }
.p7mdl__row:last-child{ border-bottom:0 }
.p7mdl__row .k{ color:var(--p7-ink-muted) }
.p7mdl__row .v{ color:var(--p7-ink-strong, var(--p7-ink)); text-align:right; min-width:0; word-break:break-word }
.p7mdl__note{ background:var(--p7-hold-bg-soft); color:var(--p7-hold-ink, var(--p7-hold));
  font-size:12.5px; padding:9px 11px; border-radius:10px }
.p7mdl__foot{ padding:4px 20px 20px; display:flex; gap:10px }
.p7mdl__foot .p7-btn{ flex:1 }
.p7mdl textarea{ width:100%; font:inherit; font-size:13px; padding:8px 10px; border-radius:10px;
  border:1px solid var(--p7-line); background:var(--p7-surface); color:var(--p7-ink); resize:vertical }

@media (max-width:640px){
  .p7b-tv__hd{ padding:16px 16px 12px } .p7b-tv__body{ padding:14px 14px 24px }
  .p7mdl{ width:100%; border-radius:16px 16px 0 0; align-self:flex-end; max-height:92vh }
  .p7mdl-back{ padding:0; align-items:flex-end }
}

/* ── Agent trust page (nav → Agent trust) — list + detail (T2) ───────────────── */
.p7b-trust{ overflow:hidden; background:var(--p7-canvas) }
.p7b-trust .p7b-tv__hd{ max-width:960px; margin:0 auto; width:100% }
/* Centered content column so the page reads as a calm island, not a stretched split. */
.p7b-trust__body{ flex:1 1 auto; overflow:auto; display:grid; grid-template-columns:minmax(0,1fr) 316px;
  gap:30px; align-content:start; max-width:960px; margin:0 auto; width:100%; padding:20px 24px 48px; box-sizing:border-box }
/* The ontology is a single full-width canvas — let it breathe wider than the Scores list, with
   generous top padding so the agent picker, run control and context line clear the card edge. */
.p7b-trust__body:has(.p7onto){ max-width:1120px }
.p7b-trust__detail--full > .p7onto{ padding:28px 30px 24px }
.p7b-trust__list{ min-width:0; display:flex; flex-direction:column; gap:20px }
.p7b-trust__detail{ min-width:0; position:sticky; top:20px; align-self:start }
.p7b-trust__detail--full{ grid-column:1 / -1 }

/* Grouped list by standing */
.p7tr__group{ display:flex; flex-direction:column }
.p7tr__ghd{ display:flex; align-items:baseline; gap:8px; padding:0 4px 6px; font-size:11px; font-weight:600;
  letter-spacing:.09em; text-transform:uppercase; color:var(--p7-ink-muted) }
.p7tr__ghd .n{ color:var(--p7-ink-faint); font-weight:500 }

.p7tr__row{ display:flex; align-items:center; gap:14px; padding:11px 12px; border-radius:11px; cursor:pointer;
  border:1px solid transparent; transition:background var(--p7-fast,.12s), border-color var(--p7-fast,.12s) }
.p7tr__row:hover{ background:var(--p7-surface) }
.p7tr__row.is-sel{ background:var(--p7-surface); border-color:var(--p7-accent-line, var(--p7-accent));
  box-shadow:var(--p7-shadow-card, 0 1px 3px rgba(0,0,0,.06)) }
.p7tr__name{ flex:1; min-width:0; font-size:14px; color:var(--p7-ink-strong, var(--p7-ink));
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.p7tr__bar{ flex:0 0 108px; height:7px; border-radius:999px; background:var(--p7-line); overflow:hidden }
.p7tr__fill{ display:block; height:100%; border-radius:999px; background:var(--p7-ink-faint) }
.p7tr__fill.is-hi{ background:var(--p7-allow) } .p7tr__fill.is-mid{ background:var(--p7-hold) } .p7tr__fill.is-lo{ background:var(--p7-deny) }
.p7tr__score{ flex:0 0 54px; text-align:right; font-size:13.5px; font-weight:600; font-variant-numeric:tabular-nums; color:var(--p7-ink-faint) }
.p7tr__score.is-hi{ color:var(--p7-allow) } .p7tr__score.is-mid{ color:var(--p7-hold) } .p7tr__score.is-lo{ color:var(--p7-deny) } .p7tr__score.is-none{ color:var(--p7-ink-faint) }

/* Detail is a single elevated card; the gauge is the focal point, standing sits compactly below. */
.p7b-trust__detail > *{ background:var(--p7-surface); border:1px solid var(--p7-line); border-radius:16px;
  box-shadow:var(--p7-shadow-card, 0 1px 3px rgba(0,0,0,.06)); padding:18px 18px 8px }
.p7tr__dcard{ padding:18px 18px 10px }
.p7tr__dgauge{ margin-bottom:14px }
.p7tr__dgauge .p7trust{ border:0; background:none; padding:0; gap:14px }
.p7tr__dgauge .p7gauge, .p7tr__dgauge .p7gauge svg{ width:64px; height:64px }
.p7tr__dgauge .p7gauge__n{ font-size:19px }
.p7tr__dhd{ display:flex; align-items:center; gap:11px; margin-bottom:12px }
.p7tr__dname{ font-size:15px; font-weight:600; color:var(--p7-ink-strong, var(--p7-ink)) }
.p7tr__dsub{ font-size:12px; color:var(--p7-ink-muted) }
.p7tr__dnote{ font-size:12.5px; color:var(--p7-ink-muted); background:var(--p7-surface-sunken);
  border-radius:10px; padding:9px 11px; margin-bottom:12px }
.p7tr__dnote.is-warn{ background:var(--p7-deny-bg-soft); color:var(--p7-deny) }
.p7b-trust__detail .p7mdl__rowh{ margin-top:2px }
.p7b-trust__detail .p7mdl__row{ padding:7px 0 }

/* Collapse control on the Today chat group */
.p7b-collapse{ border:0; background:none; cursor:pointer; color:var(--p7-ink-faint); padding:2px; margin-right:2px;
  display:grid; place-items:center; transition:transform var(--p7-fast,.12s), color var(--p7-fast,.12s) }
.p7b-collapse:hover{ color:var(--p7-ink) }
.p7b-collapse.is-collapsed{ transform:rotate(-90deg) }
.p7b-collapse svg{ width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round }

@media (max-width:760px){
  .p7b-trust__body{ grid-template-columns:1fr } .p7b-trust__detail{ position:static }
}

/* Score-history sparkline in the trust detail card */
.p7tr__spark{ margin:2px 0 14px }
.p7tr__sparkhd{ display:flex; justify-content:space-between; font-size:11px; font-weight:600; letter-spacing:.06em;
  text-transform:uppercase; color:var(--p7-ink-faint); margin-bottom:6px }
.p7tr__sparkhd span{ font-weight:500; letter-spacing:0; text-transform:none }
.p7spark{ width:100%; height:44px; display:block }

/* ── Approvals: Inbox / History sub-toggle (Direction A) ───────────────────── */
.p7b-seg{ display:inline-flex; margin:2px 0 14px; border:1px solid var(--p7-line-strong);
  border-radius:var(--p7-radius-button); overflow:hidden; background:var(--p7-surface) }
.p7b-seg__b{ border:0; background:none; cursor:pointer; font:inherit; font-size:12px;
  color:var(--p7-ink-muted); padding:5px 14px }
.p7b-seg__b+.p7b-seg__b{ border-left:1px solid var(--p7-line) }
.p7b-seg__b:hover{ background:var(--p7-surface-sunken); color:var(--p7-ink) }
.p7b-seg__b.is-on{ background:var(--p7-surface-sunken); color:var(--p7-ink); font-weight:500 }

/* ── Approval history rows (decided) ───────────────────────────────────────── */
.p7hist{ display:flex; align-items:center; gap:11px; padding:11px 12px; cursor:pointer;
  border:1px solid var(--p7-line); border-radius:9px; background:var(--p7-surface); margin-bottom:7px }
.p7hist:hover{ border-color:var(--p7-line-strong); background:var(--p7-surface-raised) }
.p7hist__ic{ flex:none; width:26px; height:26px; display:flex; align-items:center; justify-content:center;
  border-radius:50%; background:var(--p7-surface-sunken) }
.p7hist__ic svg{ width:15px; height:15px; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round }
.p7hist.is-appr .p7hist__ic{ background:var(--p7-allow-bg); color:var(--p7-allow) }
.p7hist.is-rej .p7hist__ic{ background:var(--p7-deny-bg); color:var(--p7-deny) }
.p7hist.is-exp .p7hist__ic{ color:var(--p7-ink-muted) }
.p7hist__ic svg{ stroke:currentColor }
.p7hist__main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:3px }
.p7hist__title{ font-size:13px; color:var(--p7-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.p7hist__meta{ display:flex; align-items:center; gap:6px; flex-wrap:wrap }
.p7hist__agent{ font-size:11px; padding:1px 7px; border-radius:999px;
  background:var(--p7-accent-bg,var(--p7-surface-sunken)); color:var(--p7-accent,var(--p7-ink-muted)) }
.p7hist__trust{ font-size:11px; padding:1px 6px; border-radius:999px; border:1px solid var(--p7-line);
  color:var(--p7-ink-muted) }
.p7hist__trust.is-hi{ color:var(--p7-allow); border-color:var(--p7-allow-line) }
.p7hist__trust.is-mid{ color:var(--p7-hold-ink); border-color:var(--p7-hold-line) }
.p7hist__trust.is-lo{ color:var(--p7-deny); border-color:var(--p7-deny-line) }
.p7hist__badge{ flex:none; font-size:11px; font-weight:500; padding:2px 9px; border-radius:999px;
  background:var(--p7-surface-sunken); color:var(--p7-ink-muted) }
.p7hist.is-appr .p7hist__badge{ background:var(--p7-allow-bg); color:var(--p7-allow-ink) }
.p7hist.is-rej .p7hist__badge{ background:var(--p7-deny-bg); color:var(--p7-deny-ink,var(--p7-deny)) }
.p7hist__when{ flex:none; font-size:11px; color:var(--p7-ink-faint); min-width:58px; text-align:right }

/* ── Decided-approval outcome panel (read-only sheet) ──────────────────────── */
.p7mdl__outcome{ display:flex; align-items:flex-start; gap:10px; padding:10px 12px;
  border:1px solid var(--p7-line); border-radius:9px; background:var(--p7-surface-sunken) }
.p7mdl__outcome.is-appr{ border-color:var(--p7-allow-line); background:var(--p7-allow-bg) }
.p7mdl__outcome.is-rej{ border-color:var(--p7-deny-line); background:var(--p7-deny-bg) }
.p7mdl__outcome i{ flex:none }
.p7mdl__outcome i svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round }
.p7mdl__outcome.is-appr i{ color:var(--p7-allow) } .p7mdl__outcome.is-rej i{ color:var(--p7-deny) }
.p7mdl__outcome-l{ font-size:13px; font-weight:500; color:var(--p7-ink) }
.p7mdl__outcome-n{ font-size:12px; color:var(--p7-ink-muted); margin-top:3px }

/* ── Trust Ontology tab — human-accountability loop, replay, cast + evidence ── */
.p7onto{ max-width:1040px; margin:0 auto; padding:4px 0 8px }
.p7onto__top{ display:flex; align-items:center; gap:12px; margin-bottom:10px }
.p7onto__pick{ font-size:12px; color:var(--p7-ink-muted); display:inline-flex; align-items:center; gap:7px }
.p7onto__pick select{ font:inherit; font-size:12.5px; color:var(--p7-ink); background:var(--p7-surface);
  border:1px solid var(--p7-line-strong); border-radius:var(--p7-radius-button); padding:5px 9px; cursor:pointer }
.p7onto__controls{ margin-left:auto; display:flex; align-items:center; gap:8px; position:relative }
.p7onto__runwrap{ position:relative }
.p7onto__runbtn,.p7onto__replay{ font:inherit; font-size:12px; cursor:pointer;
  border:1px solid var(--p7-line-strong); border-radius:var(--p7-radius-button); background:var(--p7-surface);
  color:var(--p7-ink); padding:5px 11px }
.p7onto__runbtn:hover,.p7onto__replay:hover{ background:var(--p7-surface-sunken) }
.p7onto__replay .tri{ color:var(--p7-allow); font-size:10px; margin-right:3px }
.p7onto__runmenu{ position:absolute; top:112%; right:0; z-index:30; width:260px; max-width:80vw;
  background:var(--p7-surface); border:1px solid var(--p7-line-strong); border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.12); padding:6px }
.p7onto__runhd{ font-size:10.5px; color:var(--p7-ink-faint); padding:4px 8px; text-transform:uppercase; letter-spacing:.05em }
.p7onto__runitem{ display:block; width:100%; text-align:left; font:inherit; font-size:12px; cursor:pointer;
  border:0; background:transparent; color:var(--p7-ink); padding:6px 8px; border-radius:6px }
.p7onto__runitem:hover{ background:var(--p7-surface-sunken) }
.p7onto__runitem.is-on{ background:var(--p7-allow-bg); color:var(--p7-allow-ink) }
.p7onto__runitem .mono{ font-family:var(--p7-font-mono,monospace) }
.p7onto__ctx{ font-size:11.5px; color:var(--p7-ink-faint); font-family:var(--p7-font-mono,monospace); margin-bottom:6px }
.p7onto__status{ font-size:12px; color:var(--p7-ink-muted); min-height:17px; margin-bottom:8px }
.p7onto__grid{ display:grid; grid-template-columns:372px minmax(0,1fr); gap:36px; align-items:start }
.p7onto__ringwrap{ display:flex; justify-content:center; padding-top:4px }
.p7onto__svg{ width:344px; height:372px; display:block }
/* the global ".p7b svg{ stroke:currentColor; stroke-width:2 }" must NOT touch our text/dots/hit-targets */
.p7onto__svg text{ stroke:none; font-family:var(--p7-font-sans) }
.p7onto__hit{ fill:transparent; stroke:none }
.p7onto__orbit{ fill:none; stroke:var(--p7-line); stroke-dasharray:4 6; opacity:.6 }
.p7onto__edge{ stroke:var(--p7-line); stroke-width:1 }
.p7onto__edge.is-lit{ stroke:var(--p7-allow); stroke-width:1.3; opacity:.5 }
.p7onto__ndot{ fill:var(--p7-surface); stroke:var(--p7-line-strong); stroke-width:1.5 }
.p7onto__ndot.is-lit{ fill:var(--p7-allow); stroke:var(--p7-allow) }
.p7onto__nlabel{ font-size:11px; fill:var(--p7-ink-muted) }
.p7onto__nlabel.is-lit{ fill:var(--p7-ink); font-weight:500 }
[data-node].is-active .p7onto__ndot{ stroke:var(--p7-accent); stroke-width:2; r:7 }
[data-node].is-active .p7onto__nlabel,.p7onto__nlabel.is-active{ fill:var(--p7-accent); font-weight:500 }
.p7onto__hub{ fill:var(--p7-surface); stroke:var(--p7-line-strong); stroke-width:1.5 }
.p7onto__hubn{ font-size:22px; font-weight:600 }
.p7onto__hubl{ font-size:9px; fill:var(--p7-ink-faint); text-transform:uppercase; letter-spacing:.07em }
.p7onto__flow{ stroke:var(--p7-accent); stroke-width:1.4; stroke-dasharray:3 4; opacity:.85 }
.p7onto__flowtip{ fill:var(--p7-accent) }
.p7onto__flowlabel{ font-size:9.5px; fill:var(--p7-accent); font-family:var(--p7-font-mono,monospace) }
/* Return arc — always visible as a faint part of the loop; brightens + flows after a sealed replay. */
@keyframes p7ontoflow{ to{ stroke-dashoffset:-240 } }
.p7onto__return{ stroke:var(--p7-allow); stroke-width:1.5; stroke-dasharray:2 6; stroke-linecap:round;
  opacity:.32; transition:opacity .35s }
.p7onto__returntip{ fill:var(--p7-allow); opacity:.32; transition:opacity .35s }
.p7onto__returnlabel{ font-size:9px; fill:var(--p7-allow); font-family:var(--p7-font-mono,monospace); opacity:.5 }
.p7onto__svg:has(.p7onto__human.is-return) .p7onto__return{ opacity:.85; animation:p7ontoflow 5s linear infinite }
.p7onto__svg:has(.p7onto__human.is-return) .p7onto__returntip{ opacity:.9 }
.p7onto__human circle{ fill:var(--p7-surface); stroke:var(--p7-line-strong); stroke-width:1.4 }
.p7onto__human .p7onto__humanhead{ fill:var(--p7-ink-muted); stroke:none }
.p7onto__human .p7onto__humanbody{ fill:none; stroke:var(--p7-ink-muted); stroke-width:1.6 }
.p7onto__human.is-active circle{ stroke:var(--p7-accent) }
.p7onto__human.is-return .p7onto__humanhead,.p7onto__human.is-return .p7onto__humanbody{ stroke:var(--p7-allow); fill:var(--p7-allow) }
.p7onto__human.is-return circle{ stroke:var(--p7-allow) }
/* side panel */
.p7onto__side{ min-width:0 }
.p7onto__cast,.p7onto__ev{ border:1px solid var(--p7-line); border-radius:12px; background:var(--p7-surface); padding:14px 16px }
.p7onto__casthd,.p7onto__evhd{ font-size:13px; font-weight:500; color:var(--p7-ink); display:flex; align-items:center; gap:7px; margin-bottom:10px }
.p7onto__castent{ font-size:11.5px; color:var(--p7-ink-faint); font-family:var(--p7-font-mono,monospace); margin:-6px 0 12px }
.p7onto__castrow{ display:flex; gap:10px; padding:6px 0; border-top:1px solid var(--p7-line-soft); font-size:12.5px }
.p7onto__castrow:first-of-type{ border-top:0 }
.p7onto__castrow .r{ flex:none; width:122px; color:var(--p7-ink-faint) }
.p7onto__castrow .n{ color:var(--p7-ink); min-width:0 }
.p7onto__castrow .n em{ color:var(--p7-ink-faint); font-style:normal; font-size:11px }
.p7onto__castnote{ font-size:11px; color:var(--p7-ink-faint); margin-top:12px; padding-top:10px; border-top:1px solid var(--p7-line-soft); line-height:1.5 }
.p7onto__castempty{ font-size:12.5px; color:var(--p7-ink-muted) }
.p7onto__evdot{ width:9px; height:9px; border-radius:50%; background:var(--p7-line-strong) }
.p7onto__evdot.is-sealed{ background:var(--p7-allow) }
.p7onto__evsub{ font-size:11px; color:var(--p7-ink-faint); font-weight:400; margin-left:auto }
.p7onto__er{ display:flex; justify-content:space-between; gap:12px; padding:5px 0; border-top:1px solid var(--p7-line-soft); font-size:12.5px }
.p7onto__er .k{ color:var(--p7-ink-faint) }
.p7onto__er .v{ color:var(--p7-ink); text-align:right; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.p7onto__chain{ margin-top:12px; padding-top:10px; border-top:1px solid var(--p7-line-soft) }
.p7onto__chd{ font-size:10.5px; color:var(--p7-ink-faint); text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px }
.p7onto__hash{ font-size:11px; color:var(--p7-ink-muted); font-family:var(--p7-font-mono,monospace); padding:2px 0 }
.p7onto__hash span{ color:var(--p7-ink) }
.p7onto__cap{ text-align:center; font-size:11px; color:var(--p7-ink-faint); font-family:var(--p7-font-mono,monospace); margin-top:12px }
.p7onto__empty{ text-align:center; max-width:460px; margin:28px auto; color:var(--p7-ink-muted) }
.p7onto__empty .ic{ width:34px; height:34px; margin:0 auto 10px; color:var(--p7-ink-faint) }
.p7onto__empty .ic svg{ width:34px; height:34px; fill:none; stroke:currentColor; stroke-width:1.6 }
.p7onto__empty .t{ font-size:14px; color:var(--p7-ink); margin-bottom:6px }
.p7onto__empty .s{ font-size:12.5px; line-height:1.5 }
@media (max-width:760px){ .p7onto__grid{ grid-template-columns:1fr } .p7onto__ringwrap{ margin-bottom:12px } }

/* ── Skills view (nav → Skills) — two-pane catalogue ───────────────────────── */
.p7b-sk{ display:flex; flex-direction:column; min-height:0 }
.p7b-sk__actions{ display:flex; gap:8px }
.p7-btn--accent{ border-color:var(--p7-accent-line,var(--p7-accent)); color:var(--p7-accent); background:var(--p7-accent-bg,var(--p7-surface)) }
.p7-btn--accent:hover{ background:var(--p7-accent-bg,var(--p7-surface-sunken)); border-color:var(--p7-accent) }
.p7b-sk__body{ flex:1 1 auto; overflow:auto; max-width:1120px; width:100%; margin:0 auto; padding:16px 24px 48px; box-sizing:border-box }
.p7sk__grid{ display:grid; grid-template-columns:186px minmax(0,1fr); gap:28px; align-items:start }
.p7sk__railwrap{ display:flex; flex-direction:column; gap:2px; position:sticky; top:4px }
.p7sk__rail{ display:flex; align-items:center; gap:8px; width:100%; text-align:left; border:0; background:none; cursor:pointer;
  font:inherit; font-size:13px; color:var(--p7-ink-muted); padding:7px 10px; border-radius:8px }
.p7sk__rail:hover{ background:var(--p7-surface-sunken); color:var(--p7-ink) }
.p7sk__rail.is-on{ background:var(--p7-surface-sunken); color:var(--p7-ink); font-weight:500 }
.p7sk__rail .n{ margin-left:auto; color:var(--p7-ink-faint); font-variant-numeric:tabular-nums }
.p7sk__main{ min-width:0 }
.p7sk__search{ display:flex; align-items:center; gap:8px; border:1px solid var(--p7-line-strong); border-radius:var(--p7-radius-button);
  padding:0 11px; margin-bottom:12px; background:var(--p7-surface) }
.p7sk__search:focus-within{ border-color:var(--p7-accent-line,var(--p7-accent)) }
.p7sk__search svg{ width:15px; height:15px; flex:none; fill:none; stroke:var(--p7-ink-faint); stroke-width:2; stroke-linecap:round }
.p7sk__search input{ flex:1; border:0; outline:0; background:none; font:inherit; font-size:13px; color:var(--p7-ink); padding:9px 0 }
.p7sk__list{ display:flex; flex-direction:column }
.p7sk__row{ display:flex; align-items:center; gap:12px; padding:11px 8px; border-bottom:1px solid var(--p7-line-soft) }
.p7sk__row:hover{ background:var(--p7-surface) }
.p7sk__info{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px }
.p7sk__name{ font-size:13px; color:var(--p7-ink); font-family:var(--p7-font-mono,monospace) }
.p7sk__prov{ color:var(--p7-ink-faint); font-family:var(--p7-font-sans) }
.p7sk__desc{ font-size:12px; color:var(--p7-ink-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.p7sk__tag{ flex:none; font-size:11px; padding:1px 8px; border-radius:999px }
.p7sk__tag--on{ color:var(--p7-allow-ink); background:var(--p7-allow-bg) }
.p7sk__tag--off{ color:var(--p7-ink-faint); background:var(--p7-surface-sunken) }
.p7sk__tag--w{ color:var(--p7-deny); background:var(--p7-deny-bg) }
.p7sk__run{ flex:none; font:inherit; font-size:12px; cursor:pointer; color:var(--p7-accent);
  border:1px solid var(--p7-line-strong); border-radius:var(--p7-radius-button); background:var(--p7-surface); padding:4px 13px }
.p7sk__run:hover{ background:var(--p7-surface-sunken); border-color:var(--p7-accent-line,var(--p7-accent)) }
@media (max-width:720px){ .p7sk__grid{ grid-template-columns:1fr } .p7sk__railwrap{ position:static; flex-direction:row; flex-wrap:wrap; margin-bottom:8px } }

/* ── Add-skill slideout (registry browse + install) ────────────────────────── */
.p7sl-back{ position:fixed; inset:0; z-index:60; background:rgba(16,18,27,.34); display:flex; justify-content:flex-end }
.p7sl{ width:440px; max-width:94vw; height:100%; background:var(--p7-surface); border-left:1px solid var(--p7-line);
  display:flex; flex-direction:column; box-shadow:-8px 0 28px rgba(0,0,0,.14) }
.p7sl__hd{ display:flex; align-items:center; padding:16px 18px 12px; border-bottom:1px solid var(--p7-line) }
.p7sl__title{ font-size:15px; font-weight:600; color:var(--p7-ink) }
.p7sl__x{ margin-left:auto; border:0; background:none; cursor:pointer; color:var(--p7-ink-faint); font-size:15px; padding:2px 6px }
.p7sl__x:hover{ color:var(--p7-ink) }
.p7sl__search{ display:flex; align-items:center; gap:8px; margin:12px 18px; padding:0 11px;
  border:1px solid var(--p7-line-strong); border-radius:var(--p7-radius-button); background:var(--p7-surface) }
.p7sl__search:focus-within{ border-color:var(--p7-accent-line,var(--p7-accent)) }
.p7sl__search svg{ width:15px; height:15px; flex:none; fill:none; stroke:var(--p7-ink-faint); stroke-width:2; stroke-linecap:round }
.p7sl__search input{ flex:1; border:0; outline:0; background:none; font:inherit; font-size:13px; color:var(--p7-ink); padding:9px 0 }
.p7sl__body{ flex:1 1 auto; overflow:auto; padding:0 10px }
.p7sl__row{ display:flex; align-items:flex-start; gap:11px; padding:12px 8px; border-bottom:1px solid var(--p7-line-soft) }
.p7sl__ic{ flex:none; width:30px; height:30px; display:flex; align-items:center; justify-content:center; border-radius:8px;
  background:var(--p7-surface-sunken); color:var(--p7-ink-muted) }
.p7sl__ic svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round }
.p7sl__info{ flex:1; min-width:0; display:flex; flex-direction:column; gap:3px }
.p7sl__name{ font-size:13px; color:var(--p7-ink); font-family:var(--p7-font-mono,monospace);
  display:flex; flex-wrap:wrap; align-items:baseline; gap:6px }
.p7sl__risk{ font-size:10.5px; color:var(--p7-hold-ink); background:var(--p7-hold-bg); padding:0 6px; border-radius:999px;
  font-family:var(--p7-font-sans); white-space:nowrap }
.p7sl__desc{ font-size:12px; color:var(--p7-ink-muted); line-height:1.45 }
.p7sl__meta{ font-size:11px; color:var(--p7-ink-faint); font-family:var(--p7-font-mono,monospace) }
.p7sl__install{ flex:none; align-self:center; font:inherit; font-size:12px; cursor:pointer; color:var(--p7-accent);
  border:1px solid var(--p7-accent-line,var(--p7-accent)); border-radius:var(--p7-radius-button); background:var(--p7-accent-bg,var(--p7-surface)); padding:5px 13px }
.p7sl__install:hover{ background:var(--p7-surface-sunken) }
.p7sl__install:disabled{ opacity:.6; cursor:default }
.p7sl__done{ flex:none; align-self:center; display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--p7-allow) }
.p7sl__done svg{ width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round }
.p7sl__foot{ padding:12px 18px; border-top:1px solid var(--p7-line); font-size:11px; color:var(--p7-ink-faint); line-height:1.5 }

/* ── Create-skill wizard (slideout) ────────────────────────────────────────── */
.p7skc__steps{ display:flex; align-items:center; gap:6px; padding:10px 18px; font-size:11px; color:var(--p7-ink-faint);
  border-bottom:1px solid var(--p7-line); flex-wrap:wrap }
.p7skc__step.is-on{ color:var(--p7-accent); font-weight:500 }
.p7skc__step.is-done{ color:var(--p7-allow) }
.p7skc__sep{ color:var(--p7-ink-faint) }
.p7skc .p7sl__body{ padding:16px 18px }
.p7skc__lbl{ font-size:12px; color:var(--p7-ink-muted); margin:14px 0 6px }
.p7skc__lbl:first-child{ margin-top:0 }
.p7skc__types{ display:grid; grid-template-columns:1fr 1fr; gap:10px }
.p7skc__type{ text-align:left; border:1px solid var(--p7-line-strong); border-radius:12px; background:var(--p7-surface);
  padding:12px; cursor:pointer; display:flex; flex-direction:column; gap:3px; font:inherit }
.p7skc__type:hover{ background:var(--p7-surface-sunken) }
.p7skc__type.is-on{ border-color:var(--p7-accent); border-width:2px; padding:11px }
.p7skc__type svg{ width:19px; height:19px; fill:none; stroke:var(--p7-ink-muted); stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; margin-bottom:3px }
.p7skc__type.is-on svg{ stroke:var(--p7-accent) }
.p7skc__type .t{ font-size:13px; font-weight:500; color:var(--p7-ink) }
.p7skc__type .s{ font-size:11.5px; color:var(--p7-ink-muted) }
.p7skc__in{ width:100%; box-sizing:border-box; font:inherit; font-size:13px; color:var(--p7-ink); background:var(--p7-surface);
  border:1px solid var(--p7-line-strong); border-radius:var(--p7-radius-button); padding:8px 10px; outline:none }
.p7skc__in:focus{ border-color:var(--p7-accent-line,var(--p7-accent)) }
textarea.p7skc__in{ resize:vertical; line-height:1.5 }
.p7skc__row2{ display:grid; grid-template-columns:1fr 1fr; gap:12px }
.p7skc__hint{ font-size:12px; color:var(--p7-ink-faint); padding:4px 0 }
.p7skc__chk{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--p7-ink); padding:5px 0; cursor:pointer }
.p7skc__chk--top{ margin-top:8px; border-top:1px solid var(--p7-line-soft); padding-top:10px }
.p7skc__pills{ display:flex; gap:8px; flex-wrap:wrap }
.p7skc__pill{ font:inherit; font-size:12px; cursor:pointer; border:1px solid var(--p7-line-strong); border-radius:999px;
  background:var(--p7-surface); color:var(--p7-ink-muted); padding:5px 13px }
.p7skc__pill:hover{ background:var(--p7-surface-sunken) }
.p7skc__pill.is-on{ background:var(--p7-accent-bg); color:var(--p7-accent); border-color:var(--p7-accent-line,var(--p7-accent)) }
.p7skc__guards{ display:grid; grid-template-columns:1fr 1fr; gap:2px 16px }
.p7skc__err{ margin-top:12px; font-size:12.5px; color:var(--p7-deny); background:var(--p7-deny-bg); border-radius:8px; padding:8px 11px }
.p7skc__foot{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px 18px; border-top:1px solid var(--p7-line) }

.p7skc__mono{ font-family:var(--p7-font-mono,monospace); font-size:12px; line-height:1.55 }
.p7sl__bind{ display:flex; align-items:center; gap:10px; padding:12px 18px 0; font-size:12px; color:var(--p7-ink-muted) }
.p7sl__bind label{ flex:none }
.p7sl__bind select{ flex:1; font:inherit; font-size:12.5px; color:var(--p7-ink); background:var(--p7-surface);
  border:1px solid var(--p7-line-strong); border-radius:var(--p7-radius-button); padding:6px 9px; cursor:pointer }

/* ── Skills: Build lens (status + promote) ─────────────────────────────────── */
.p7sk__seg{ margin:0 0 14px }
.p7sk__buildhd{ font-size:12px; color:var(--p7-ink-faint); margin-bottom:12px }
.p7sk__buildgrp{ margin-bottom:18px }
.p7sk__buildagent{ display:flex; align-items:baseline; gap:8px; font-size:11px; font-weight:600; letter-spacing:.07em;
  text-transform:uppercase; color:var(--p7-ink-muted); padding:0 4px 6px }
.p7sk__buildagent .n{ color:var(--p7-ink-faint); font-weight:500 }
.p7sk__pmsg{ font-size:11.5px; color:var(--p7-ink-muted) }
.p7sk__phase{ flex:none; font-size:11px; padding:1px 9px; border-radius:999px; font-weight:500 }
.p7sk__phase--build{ color:var(--p7-ink-muted); background:var(--p7-surface-sunken) }
.p7sk__phase--decide{ color:var(--p7-hold-ink); background:var(--p7-hold-bg) }
.p7sk__phase--act{ color:var(--p7-allow-ink); background:var(--p7-allow-bg) }
