/* HAL GUI Milestone 1 — Build Focus Mode.
   Visual-only state driven by data-hal-work-focus. No execution authority. */

.hx-work-focus {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text, #f0f5ff);
}
.hx-work-focus[hidden] { display: none !important; }
.hx-work-focus-kicker {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--hx-blue, #70cfff) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--hx-blue, #70cfff) 10%, transparent);
  color: var(--hx-link, #84d3ff);
  font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .13em;
}
.hx-work-focus > strong {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
#hx-work-focus-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted, #a6b6cf);
  font-size: 11px;
}
.hx-work-focus-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--divider-strong, #3a5174);
  border-radius: 9px;
  color: var(--hx-link, #84d3ff);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
}
.hx-work-focus-link:hover { background: var(--panel-3, #1b2942); }
.hx-work-focus-link:focus-visible {
  outline: 2px solid var(--hx-blue, #70cfff);
  outline-offset: 2px;
}

html[data-hal-work-focus="true"] #app .header {
  min-height: 56px;
  padding-block: 6px;
}
html[data-hal-work-focus="true"] .hx-headernav { display: none !important; }
html[data-hal-work-focus="true"] #app .product-ribbon {
  min-height: 44px;
  padding: 5px 18px;
  gap: 12px;
}
html[data-hal-work-focus="true"] #app .product-ribbon-copy { display: none !important; }
html[data-hal-work-focus="true"] #app .product-ribbon-actions {
  flex: 0 0 auto;
  gap: 6px;
}
html[data-hal-work-focus="true"] #app .product-ribbon-actions > :is(.avatar-main-launch, .radio-live-link) {
  display: none !important;
}
html[data-hal-work-focus="true"] #app .product-ribbon-actions :is(.hal-connect-trigger, .workspace-launch) {
  min-height: 34px;
  height: 34px;
  padding-block: 4px;
}
html[data-hal-work-focus="true"] #app .messages-wrap {
  padding-top: 14px;
  padding-bottom: 12px;
}
html[data-hal-work-focus="true"] #app .messages {
  --msg-col: min(1240px, 100%);
}
html[data-hal-work-focus="true"] #app .composer {
  padding-top: 7px;
}
html[data-hal-work-focus="true"] #app .composer-row {
  border-color: color-mix(in srgb, var(--hx-blue, #70cfff) 40%, var(--divider-strong, #3a5174));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hx-blue, #70cfff) 7%, transparent);
}
html[data-hal-work-focus="true"] #app .composer-row:focus-within {
  border-color: var(--hx-blue, #70cfff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hx-blue, #70cfff) 13%, transparent);
}
html[data-hal-work-focus="true"] #app .footer.footer-compact {
  min-height: 24px !important;
  padding-bottom: 2px !important;
}
html[data-hal-work-focus="true"] #app .footer-brand { opacity: .7; }

/* Belt-and-suspenders visual safety. JS also suspends the animation runtime. */
html[data-hal-work-focus="true"] :is(.hb-layer, .hb-key, .hb-menu, .hb-card, .hf-panel) {
  display: none !important;
}

@media (max-width: 900px) {
  html[data-hal-work-focus="true"] #app .header {
    min-height: 54px;
    padding-block: 5px;
  }
  html[data-hal-work-focus="true"] #app .product-ribbon {
    padding-inline: 12px;
  }
  html[data-hal-work-focus="true"] #hx-work-focus-meta { display: none; }
}
@media (max-width: 640px) {
  .hx-work-focus { gap: 6px; }
  .hx-work-focus-kicker { display: none; }
  .hx-work-focus > strong { font-size: 11px; }
  .hx-work-focus-link {
    width: 34px;
    min-width: 34px;
    padding: 0;
    justify-content: center;
    overflow: hidden;
    color: transparent;
  }
  .hx-work-focus-link::after {
    content: "↗";
    color: var(--hx-link, #84d3ff);
    font-size: 14px;
  }
  html[data-hal-work-focus="true"] #app .product-ribbon-actions .hal-connect-trigger #hal-connect-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
@media (forced-colors: active) {
  .hx-work-focus-link, .hx-work-focus-kicker { border-color: CanvasText; }
  html[data-hal-work-focus="true"] #app .composer-row { border-color: Highlight; }
}


/* Milestone 2 — Smart Work Inspector affordance. Visual only. */
#workspace-open[data-work-inspector="active"] {
  border-color: color-mix(in srgb, var(--hx-blue, #70cfff) 58%, var(--divider-strong, #3a5174));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hx-blue, #70cfff) 12%, transparent), var(--e1);
}
#workspace-open[data-work-inspector="active"]::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--hx-blue, #70cfff);
  box-shadow: 0 0 10px color-mix(in srgb, var(--hx-blue, #70cfff) 65%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  #workspace-open[data-work-inspector="active"]::before { box-shadow: none; }
}


/* Milestone 3 — Codex-style lifecycle rail + completion handoff. */
.hx-work-lifecycle {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 4px 0 2px;
}
.hx-work-lifecycle-stage {
  position: relative;
  min-width: 0;
  padding: 7px 8px 7px 24px;
  border: 1px solid var(--divider, #263956);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel-2, #13223a) 82%, transparent);
  color: var(--muted, #a6b6cf);
  font: 800 10px/1.1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hx-work-lifecycle-stage::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 999px;
  background: var(--muted, #8393aa);
}
.hx-work-lifecycle-stage[data-state="done"] {
  border-color: color-mix(in srgb, var(--ok, #42d392) 44%, var(--divider, #263956));
  color: var(--text, #eef5ff);
}
.hx-work-lifecycle-stage[data-state="done"]::before { background: var(--ok, #42d392); }
.hx-work-lifecycle-stage[data-state="active"]::before {
  background: var(--hx-blue, #70cfff);
  box-shadow: 0 0 10px color-mix(in srgb, var(--hx-blue, #70cfff) 62%, transparent);
}
.hx-work-lifecycle-stage[data-state="warn"] {
  border-color: color-mix(in srgb, var(--warn, #ffb454) 50%, var(--divider, #263956));
  color: var(--text, #eef5ff);
}
.hx-work-lifecycle-stage[data-state="warn"]::before { background: var(--warn, #ffb454); }

.hx-live-work-report {
  flex: 1 0 100%;
  width: 100%;
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--hx-blue, #70cfff) 32%, var(--divider, #263956));
  border-radius: 14px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--panel-2, #13223a) 94%, transparent),
      color-mix(in srgb, var(--panel, #0e182b) 98%, transparent));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .04);
}
.hx-live-work-report > strong {
  font-size: 14px;
  letter-spacing: .01em;
}
.hx-live-work-report > p { margin: 0; }
.hx-live-work-report > b {
  margin-top: 2px;
  color: var(--muted, #a6b6cf);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hx-live-work-report ul {
  margin: -2px 0 2px 18px;
  padding: 0;
  color: var(--text, #eef5ff);
}
.hx-live-work-report li { margin: 3px 0; }
.hx-work-continue {
  justify-self: start;
  margin-top: 2px;
  border-color: color-mix(in srgb, var(--hx-blue, #70cfff) 50%, var(--divider-strong, #3a5174));
}

@media (max-width: 640px) {
  .hx-work-lifecycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-live-work-report { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-work-lifecycle-stage[data-state="active"]::before { box-shadow: none; }
}


/* Milestone 4 — explicit fresh-objective state after a terminal session. */
.hx-work-focus[data-new-task="true"] .hx-work-focus-kicker {
  border-color: color-mix(in srgb, var(--warn, #ffb454) 62%, transparent);
  background: color-mix(in srgb, var(--warn, #ffb454) 11%, transparent);
  color: var(--warn, #ffb454);
}
.hx-work-focus[data-new-task="true"] > strong {
  color: var(--text, #f0f5ff);
}
.hx-work-focus[data-new-task="true"] #hx-work-focus-meta {
  color: color-mix(in srgb, var(--warn, #ffb454) 78%, var(--muted, #a6b6cf));
}

/* Milestone 8 — compact evidence-only Work Cockpit states. */
.hx-work-focus[data-cockpit-state="working"] .hx-work-focus-kicker {
  border-color: color-mix(in srgb, var(--hx-blue, #70cfff) 62%, transparent);
  color: var(--hx-link, #84d3ff);
}
.hx-work-focus[data-cockpit-state="verify"] .hx-work-focus-kicker {
  border-color: #d8b24a;
  background: color-mix(in srgb, #d8b24a 12%, transparent);
  color: #f4d879;
}
.hx-work-focus[data-cockpit-state="blocked"] .hx-work-focus-kicker,
.hx-work-focus[data-cockpit-state="incomplete"] .hx-work-focus-kicker {
  border-color: color-mix(in srgb, var(--ui-danger, #ff6b76) 70%, transparent);
  background: color-mix(in srgb, var(--ui-danger, #ff6b76) 12%, transparent);
  color: #ff9aa3;
}
.hx-work-focus[data-cockpit-state="complete"] .hx-work-focus-kicker {
  border-color: color-mix(in srgb, var(--ui-ok, #4fe18d) 70%, transparent);
  background: color-mix(in srgb, var(--ui-ok, #4fe18d) 10%, transparent);
  color: #82efb2;
}
.hx-work-focus[data-cockpit-state="blocked"],
.hx-work-focus[data-cockpit-state="incomplete"] {
  --hx-link: #ff9aa3;
}
.hx-work-focus[data-cockpit-state="complete"] {
  --hx-link: #82efb2;
}
@media (max-width: 900px) {
  .hx-work-focus[data-cockpit-state] > strong {
    max-width: min(46vw, 330px);
  }
}

/* Milestone 9 — Evidence Navigator inside the read-only Code workspace. */
.hs-code-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: thin;
}
.hs-code-tab {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--divider-strong, #3a5174);
  border-radius: 9px;
  background: var(--panel-2, #111d31);
  color: var(--muted, #a6b6cf);
  font: 700 11px/1.2 system-ui, sans-serif;
  cursor: pointer;
}
.hs-code-tab[aria-selected="true"] {
  color: var(--text, #f0f5ff);
  border-color: var(--hx-blue, #70cfff);
  background: color-mix(in srgb, var(--hx-blue, #70cfff) 11%, var(--panel-2, #111d31));
}
.hs-code-tab:focus-visible {
  outline: 2px solid var(--hx-blue, #70cfff);
  outline-offset: 2px;
}
.hs-code-tab-count {
  min-width: 19px;
  padding: 2px 5px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  text-align: center;
  font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.hs-code-tab-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
}
.hs-code-tab-panel[hidden] { display: none !important; }
@media (max-width: 640px) {
  .hs-code-tabs { margin-inline: -2px; padding-bottom: 8px; }
  .hs-code-tab { min-height: 44px; padding-inline: 9px; }
}
@media (forced-colors: active) {
  .hs-code-tab[aria-selected="true"] { border-color: Highlight; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-code-tabs { scroll-behavior: auto; }
}


/* Milestone 10 — deterministic Next Action Deck. No execution authority. */
.hs-next-action-deck {
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--hx-blue, #70cfff) 34%, var(--divider-strong, #3a5174));
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--hx-blue, #70cfff) 8%, transparent), transparent 70%),
    var(--panel-2, #111b2e);
}
.hs-next-action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.hs-next-action-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.hs-next-action-copy > b {
  font-size: 15px;
  line-height: 1.25;
}
.hs-next-action-deck[data-tone="danger"] {
  border-color: color-mix(in srgb, #ff6b6b 60%, var(--divider-strong, #3a5174));
}
.hs-next-action-deck[data-tone="warning"] {
  border-color: color-mix(in srgb, #ffd166 55%, var(--divider-strong, #3a5174));
}
.hs-next-action-deck[data-tone="success"] {
  border-color: color-mix(in srgb, #52d273 50%, var(--divider-strong, #3a5174));
}
.hs-next-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.hs-next-action-buttons .workspace-button {
  min-height: 44px;
}
.hs-next-action-primary {
  font-weight: 800;
}
.hs-next-action-draft {
  border-color: color-mix(in srgb, var(--hx-blue, #70cfff) 52%, var(--divider-strong, #3a5174));
}
@media (max-width: 700px) {
  .hs-next-action-deck {
    margin-inline: -2px;
    padding: 10px;
  }
  .hs-next-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hs-next-action-buttons .workspace-button {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hs-next-action-deck, .hs-next-action-buttons .workspace-button { transition: none !important; }
}
@media (forced-colors: active) {
  .hs-next-action-deck,
  .hs-next-action-buttons .workspace-button {
    border-color: CanvasText;
  }
  .hs-next-action-primary {
    outline: 1px solid Highlight;
    outline-offset: 2px;
  }
}


/* Milestone 11 — Review Navigator. Read-only Code workspace navigation. */
.hs-code-review-search,
.hs-code-review-filter {
  min-height: 36px;
  border: 1px solid var(--divider-strong, #3a5174);
  border-radius: 9px;
  background: var(--panel-2, #101a2a);
  color: var(--text, #f0f5ff);
  font: 600 11px/1.2 var(--font-ui, system-ui, sans-serif);
}
.hs-code-review-search {
  flex: 1 1 220px;
  min-width: min(220px, 100%);
  padding: 0 10px;
}
.hs-code-review-filter {
  flex: 0 0 auto;
  padding: 0 30px 0 10px;
}
.hs-code-review-search::placeholder { color: var(--muted, #a6b6cf); }
.hs-code-review-search:focus-visible,
.hs-code-review-filter:focus-visible {
  outline: 2px solid var(--hx-blue, #70cfff);
  outline-offset: 2px;
}
.hs-auto-list [data-code-session][data-review-pinned="true"] {
  border-color: color-mix(in srgb, var(--hx-blue, #70cfff) 45%, var(--divider-strong, #3a5174));
  box-shadow: inset 3px 0 0 var(--hx-blue, #70cfff);
}
.hs-code-review-jumps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 10px;
}
.hs-code-review-jump {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--divider-strong, #3a5174);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-3, #1b2942) 88%, transparent);
  color: var(--text, #f0f5ff);
  font-size: 11px;
  font-weight: 700;
}
.hs-code-review-jump[data-tone="danger"] {
  border-color: color-mix(in srgb, var(--danger, #ff6b7c) 60%, var(--divider-strong, #3a5174));
}
.hs-code-review-jump[data-tone="warning"] {
  border-color: color-mix(in srgb, #ffbf69 60%, var(--divider-strong, #3a5174));
}
.hs-code-review-jump[data-tone="info"] {
  border-color: color-mix(in srgb, var(--hx-blue, #70cfff) 55%, var(--divider-strong, #3a5174));
}
.hs-code-review-jump:focus-visible {
  outline: 2px solid var(--hx-blue, #70cfff);
  outline-offset: 2px;
}
@media (max-width: 700px) {
  .hs-code-review-search { flex-basis: 100%; }
  .hs-code-review-filter { flex: 1 1 140px; }
  .hs-code-review-jumps { gap: 5px; }
}


/* Milestone 12 — Session Lineage & Continuity. Read-only continuity context. */
.hs-session-lineage {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--hx-blue, #70cfff) 24%, var(--divider, #26364f));
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-2, #101a2b) 92%, transparent);
}
.hs-session-lineage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.hs-session-lineage-current {
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--hx-blue, #70cfff) 42%, var(--divider, #26364f));
  border-radius: 11px;
  background: color-mix(in srgb, var(--hx-blue, #70cfff) 7%, var(--panel, #0e1727));
}
.hs-session-lineage-group,
.hs-session-lineage-separate {
  display: grid;
  gap: 8px;
}
.hs-session-lineage-separate > summary {
  cursor: pointer;
  color: var(--muted, #a6b6cf);
  font-size: 12px;
  font-weight: 700;
}
.hs-session-lineage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 8px;
}
.hs-session-lineage-card {
  width: 100%;
  min-width: 0;
  text-align: left;
}
.hs-session-lineage-card[data-lineage-relation="predecessor"],
.hs-session-lineage-card[data-lineage-relation="successor"] {
  border-color: color-mix(in srgb, var(--hx-blue, #70cfff) 40%, var(--divider-strong, #3a5174));
}
.hs-session-lineage-card[data-lineage-relation="separate"] {
  opacity: .92;
}
@media (max-width: 720px) {
  .hs-session-lineage { padding: 10px; }
  .hs-session-lineage-grid { grid-template-columns: 1fr; }
  .hs-session-lineage-current .hs-auto-row,
  .hs-session-lineage-card .hs-auto-row { align-items: flex-start; }
}


/* Milestone 11 — Unified Work Command Bar.
   Presentation only: controls prepare drafts or open evidence; they never send work. */
.hx-work-focus {
  overflow: hidden;
}
.hx-work-command-next {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(34vw, 340px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted, #a6b6cf);
  font-size: 11px;
}
.hx-work-command-next[data-tone="danger"] { color: #ff9aa3; }
.hx-work-command-next[data-tone="warning"] { color: #f4d879; }
.hx-work-command-next[data-tone="success"] { color: #82efb2; }
.hx-work-command-next[data-tone="info"] { color: var(--hx-link, #84d3ff); }

.hx-work-command-action {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, var(--hx-blue, #70cfff) 48%, var(--divider-strong, #3a5174));
  border-radius: 9px;
  background: color-mix(in srgb, var(--hx-blue, #70cfff) 8%, transparent);
  color: var(--text, #f0f5ff);
  font: 700 11px/1 system-ui, sans-serif;
  cursor: pointer;
}
.hx-work-command-action:hover {
  background: color-mix(in srgb, var(--hx-blue, #70cfff) 15%, transparent);
}
.hx-work-command-action:focus-visible {
  outline: 2px solid var(--hx-blue, #70cfff);
  outline-offset: 2px;
}

/* The command bar owns current-session navigation. Keep message utilities,
   but visually subordinate duplicate session status/watch controls. */
.msg.hx-command-owned-session .hx-session-status-chip,
.msg.hx-command-owned-session .hx-live-work-link {
  opacity: .58;
}
.msg.hx-command-owned-session .hx-live-work-link {
  border-style: dashed;
}

/* A completed/incomplete handoff stays visible without keeping the whole
   application in compressed Build Focus mode. */
.hx-work-focus[data-cockpit-state="complete"],
.hx-work-focus[data-cockpit-state="incomplete"] {
  min-height: 40px;
}

@media (max-width: 900px) {
  .hx-work-focus {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .hx-work-focus::-webkit-scrollbar { display: none; }
  .hx-work-command-next {
    max-width: 42vw;
    flex: 0 0 auto;
  }
  .hx-work-command-action,
  .hx-work-focus-link {
    min-height: 44px;
    min-width: 44px;
  }
}
@media (max-width: 640px) {
  .hx-work-command-next {
    max-width: 48vw;
    font-size: 10px;
  }
  .hx-work-command-action {
    padding-inline: 10px;
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hx-work-command-action,
  .hx-work-command-next {
    transition: none !important;
  }
}
@media (forced-colors: active) {
  .hx-work-command-action,
  .hx-work-focus-link {
    border-color: ButtonText;
  }
  .hx-work-command-next {
    color: CanvasText;
  }
  .msg.hx-command-owned-session .hx-session-status-chip,
  .msg.hx-command-owned-session .hx-live-work-link {
    opacity: 1;
  }
}


/* GUI M13 — owner approval attention. Uses the existing local approval queue. */
.hx-approval-attention[hidden]{display:none!important}
.hx-approval-attention{
  position:fixed;inset:0;z-index:10050;display:grid;place-items:center;
  padding:clamp(14px,3vw,32px);background:rgb(0 0 0/.68);
}
.hx-approval-attention-card{
  width:min(620px,100%);max-height:min(82vh,760px);overflow:auto;
  padding:clamp(18px,3vw,28px);border:1px solid rgb(var(--c-accent)/.7);
  border-radius:var(--ui-r3,14px);background:var(--ui-card-surface);
  box-shadow:var(--ui-z3),0 0 0 1px rgb(0 0 0/.55);
}
.hx-approval-attention-eyebrow{
  display:block;margin-bottom:8px;color:var(--ui-brand-hi,#ff9b5a);
  font:800 11px/1.2 ui-monospace,monospace;letter-spacing:.13em;
}
.hx-approval-attention-card h2{margin:0 0 8px;font-size:clamp(22px,4vw,34px)}
.hx-approval-attention-note{margin:0 0 16px;color:rgb(var(--g8))}
.hx-approval-attention-meta{
  display:grid;grid-template-columns:minmax(80px,max-content) 1fr;gap:6px 12px;
  margin:0 0 14px;padding:12px;border-radius:var(--ui-r2,9px);background:rgb(0 0 0/.18);
}
.hx-approval-attention-meta dt{font-weight:800;color:rgb(var(--g8))}
.hx-approval-attention-meta dd{margin:0;min-width:0;overflow-wrap:anywhere;font-family:ui-monospace,monospace}
.hx-approval-attention-command{
  white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto;
  margin:0 0 16px;padding:14px;border-radius:var(--ui-r2,9px);
  color:rgb(var(--g9));background:rgb(0 0 0/.42);border:1px solid rgb(var(--g11)/.12);
  font:600 13px/1.55 ui-monospace,monospace;
}
.hx-approval-attention-actions{display:flex;flex-wrap:wrap;gap:10px}
.hx-approval-attention-actions .button{min-height:44px;min-width:108px}
.hx-approval-attention-status{min-height:1.5em;margin:12px 0 0;color:rgb(var(--g8))}
@media(max-width:620px){
  .hx-approval-attention{align-items:end;padding:10px}
  .hx-approval-attention-card{width:100%;max-height:88vh;border-radius:14px 14px 8px 8px}
  .hx-approval-attention-actions .button{flex:1 1 30%;min-width:88px}
}
@media(prefers-reduced-motion:reduce){
  .hx-approval-attention,.hx-approval-attention-card{scroll-behavior:auto!important;animation:none!important;transition:none!important}
}
@media(forced-colors:active){
  .hx-approval-attention{background:Canvas}
  .hx-approval-attention-card,.hx-approval-attention-command{border:1px solid CanvasText;background:Canvas;color:CanvasText}
}

/* Milestone 14 — Global Work Tray. Read-only cross-chat work navigation. */
.hx-work-tray-toggle {
  position: relative;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line, rgba(255,255,255,.14));
  border-radius: 9px;
  background: var(--panel-2, rgba(10,16,28,.78));
  color: var(--text, #eef4ff);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.hx-work-tray-toggle:hover,
.hx-work-tray-toggle[aria-expanded="true"] {
  background: var(--panel-3, rgba(20,31,50,.94));
}
.hx-work-tray-toggle:focus-visible,
.hx-work-tray-icon:focus-visible,
.hx-work-tray-select:focus-visible,
.hx-work-tray-evidence:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.hx-work-tray-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent, #7cf7cf);
  color: var(--accent-ink, #06150f);
  font-size: 10px;
  line-height: 1;
}
.hx-work-tray {
  position: fixed;
  top: 58px;
  right: 12px;
  z-index: 82;
  width: min(430px, calc(100vw - 24px));
  max-height: min(78vh, 780px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border: 1px solid var(--line, rgba(255,255,255,.14));
  border-radius: 16px;
  background: var(--panel, #0c1320);
  color: var(--text, #eef4ff);
  box-shadow: 0 24px 70px rgba(0,0,0,.32);
  overflow: hidden;
}
.hx-work-tray[hidden] { display: none !important; }
.hx-work-tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 10px;
  border-bottom: 1px solid var(--line, rgba(255,255,255,.1));
}
.hx-work-tray-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.hx-work-tray-head small {
  font-size: 9px;
  letter-spacing: .13em;
  opacity: .68;
}
.hx-work-tray-head strong { font-size: 15px; }
.hx-work-tray-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.hx-work-tray-icon,
.hx-work-tray-evidence {
  border: 1px solid var(--line, rgba(255,255,255,.14));
  border-radius: 8px;
  background: var(--panel-2, rgba(255,255,255,.04));
  color: inherit;
  padding: 6px 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.hx-work-tray-status {
  margin: 0;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line, rgba(255,255,255,.08));
  font-size: 11px;
  color: var(--muted, #aebdd0);
}
.hx-work-tray-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px;
  display: grid;
  gap: 12px;
}
.hx-work-tray-section {
  display: grid;
  gap: 7px;
}
.hx-work-tray-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 3px;
  font-size: 11px;
  letter-spacing: .03em;
}
.hx-work-tray-section-head > span {
  min-width: 22px;
  text-align: center;
  border-radius: 999px;
  padding: 2px 6px;
  background: var(--panel-3, rgba(255,255,255,.06));
  color: var(--muted, #aebdd0);
}
.hx-work-tray-empty {
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed var(--line, rgba(255,255,255,.1));
  border-radius: 10px;
  color: var(--muted, #aebdd0);
  font-size: 11px;
}
.hx-work-tray-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 7px;
}
.hx-work-tray-select {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 10px;
  text-align: left;
  border: 1px solid var(--line, rgba(255,255,255,.12));
  border-radius: 11px;
  background: var(--panel-2, rgba(255,255,255,.035));
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.hx-work-tray-row[data-unread="true"] .hx-work-tray-select {
  border-color: var(--accent, #7cf7cf);
}
.hx-work-tray-row[data-work-tray-category="attention"] .hx-work-tray-select {
  box-shadow: inset 3px 0 0 var(--warning, #e7b45b);
}
.hx-work-tray-row[data-work-tray-category="completed"] .hx-work-tray-select {
  opacity: .92;
}
.hx-work-tray-row-top {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.hx-work-tray-row-top b {
  min-width: 0;
  flex: 1 1 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.hx-work-tray-state,
.hx-work-tray-unread {
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.hx-work-tray-state {
  background: var(--panel-3, rgba(255,255,255,.07));
  color: var(--muted, #aebdd0);
}
.hx-work-tray-unread {
  background: var(--accent, #7cf7cf);
  color: var(--accent-ink, #06150f);
}
.hx-work-tray-meta,
.hx-work-tray-summary,
.hx-work-tray-next {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.hx-work-tray-meta {
  font-size: 10px;
  color: var(--muted, #aebdd0);
}
.hx-work-tray-summary {
  font-size: 11px;
  line-height: 1.35;
}
.hx-work-tray-next {
  font-size: 10px;
  line-height: 1.35;
  color: var(--accent, #7cf7cf);
}
.hx-work-tray-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-3, rgba(255,255,255,.08));
}
.hx-work-tray-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}
.hx-work-tray-evidence {
  align-self: center;
  white-space: nowrap;
}
.hx-work-tray-note {
  margin: 0;
  padding: 9px 14px 11px;
  border-top: 1px solid var(--line, rgba(255,255,255,.08));
  color: var(--muted, #aebdd0);
  font-size: 10px;
  line-height: 1.4;
}

@media (max-width: 700px) {
  .hx-work-tray-toggle {
    min-width: 38px;
    justify-content: center;
    padding-inline: 8px;
  }
  .hx-work-tray {
    top: 54px;
    right: 6px;
    width: calc(100vw - 12px);
    max-height: min(72vh, 680px);
    border-radius: 13px;
  }
  .hx-work-tray-head { align-items: flex-start; }
  .hx-work-tray-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .hx-work-tray-evidence {
    justify-self: start;
    margin-left: 4px;
  }
}
@media (max-width: 460px) {
  .hx-work-tray-toggle > span:first-child { display: none; }
  .hx-work-tray-head-actions { gap: 4px; }
  .hx-work-tray-icon { padding-inline: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-work-tray,
  .hx-work-tray-select,
  .hx-work-tray-toggle { scroll-behavior: auto; transition: none; }
}
@media (forced-colors: active) {
  .hx-work-tray,
  .hx-work-tray-toggle,
  .hx-work-tray-select,
  .hx-work-tray-icon,
  .hx-work-tray-evidence {
    border-color: CanvasText;
  }
  .hx-work-tray-row[data-unread="true"] .hx-work-tray-select {
    outline: 2px solid Highlight;
  }
}

