@font-face {
  font-family: "IBM Plex Sans";
  src: url("./assets/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/fonts/ibm-plex-mono-600-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f5f5f5;
  --surface: #fff;
  --surface-2: #f4f4f0;
  --surface-strong: #fff;
  --ink: #0a0a0a;
  --muted: #565654;
  --soft-muted: #6f6f69;
  --line: #dcdbd4;
  --line-2: #eae9e3;
  --strong-line: #0a0a0a;
  --line-strong: #0a0a0a;
  --input-bg: #fff;
  --code-bg: #f4f4f0;
  --message-list-bg: #f5f5f5;
  --shadow-color: rgba(20, 20, 15, 0.16);
  --shadow-soft: 0 6px 16px -12px rgba(20, 20, 15, 0.3);
  --shadow-lg: 0 18px 40px -18px rgba(20, 20, 15, 0.35);
  --nav: #0a0a0a;
  --nav-2: #1a1a1a;
  --accent: #ceff00;
  --accent-soft: #f8fed7;
  --accent-ink: #0a0a0a;
  --accent-2: #00779f;
  --warn: #9a6800;
  --bad: #b42318;
  --good: #166534;
  --radius: 6px;
  --radius-2: 8px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080d13;
  --surface: #101720;
  --surface-2: #172231;
  --ink: #f7fafc;
  --muted: #b2becd;
  --soft-muted: #8190a4;
  --line: #2c3949;
  --line-2: #202c3a;
  --strong-line: #d7e2ee;
  --line-strong: #d7e2ee;
  --input-bg: #0c141f;
  --code-bg: #0c141f;
  --message-list-bg: #0b1119;
  --shadow-color: rgba(0, 0, 0, 0.42);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, #101720);
  --warn: #f2b84b;
  --bad: #f87171;
  --good: #34d399;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.svg-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.aro-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  gap: 18px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.deployment-login-label {
  justify-self: start;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid rgba(180, 83, 9, 0.42);
  border-radius: 6px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 12px;
  font-weight: 900;
}

.login-form-stack {
  display: grid;
  gap: 14px;
}

.login-form-stack h2 {
  margin: 0;
  font-size: 20px;
}

.login-help {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.google-login-section {
  display: grid;
  gap: 12px;
}

.google-auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.google-auth-divider::before,
.google-auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.google-auth-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.google-auth-button:hover,
.google-auth-button:focus-visible {
  border-color: var(--accent-2);
  background: var(--surface-strong);
}

.google-auth-mark {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: #1a73e8;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.text-action {
  justify-self: start;
  border: 0;
  background: transparent;
  padding: 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-action:hover,
.text-action:focus-visible {
  color: var(--ink);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

.brand-mark.has-logo {
  background: transparent;
}

.brand-logo {
  display: block;
  width: 38px;
  height: 38px;
  max-width: 38px;
  max-height: 38px;
  object-fit: contain;
}

.brand-logo[hidden],
.brand-initial[hidden] {
  display: none;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 8.5px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 500;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  background: var(--input-bg);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.visually-hidden > * {
  display: inline-block;
  width: 1px;
  max-width: 1px;
  overflow: hidden;
  font-size: 0 !important;
  line-height: 0 !important;
  white-space: normal !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: var(--accent-2);
}

.primary-action,
.secondary-action,
.icon-button,
.tab {
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 36px;
}

.primary-action {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 14px;
  font-weight: 900;
}

.secondary-action {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 700;
}

.icon-button {
  width: 32px;
  height: 32px;
  background: transparent;
  color: inherit;
  border-color: var(--line);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.form-error,
.message-error {
  color: var(--bad);
  font-size: 13px;
  margin: 0;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  overflow: hidden;
}

.dimension-rail {
  display: none;
}

@media (min-width: 1440px) {
  .app-shell {
    grid-template-columns: 56px 264px minmax(0, 1fr);
  }

  .dimension-rail {
    width: 56px;
    min-width: 56px;
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    overflow: hidden;
    background: #0a0a0a;
    color: #fff;
  }

  .app-shell .detail-panel {
    left: 320px;
  }
}

@media (min-width: 1680px) {
  .app-shell[data-context-docked="true"] {
    grid-template-columns: 56px 264px minmax(0, 1fr) 344px;
  }
}

.dimension-rail-logo {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 950;
}

.dimension-rail-options {
  display: grid;
  gap: 5px;
}

.dimension-rail-option,
.dimension-rail-account {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #a3a8b1;
  padding: 0;
}

.dimension-rail-option:hover,
.dimension-rail-option:focus-visible {
  background: #1a1a1a;
  color: #fff;
}

.dimension-rail-option.active {
  border-color: #2e2e2e;
  outline: 0;
  background: #1c1c1c;
  color: #fff;
}

.dimension-rail-option.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.dimension-rail-option .dimension-option-mark {
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 6px;
  background: #242424;
  color: #d7d7d7;
  font-size: 11px;
  font-weight: 600;
  box-shadow: none;
}

.dimension-rail-option .dimension-option-mark img {
  width: 18px;
  height: 18px;
  filter: grayscale(1) contrast(0.9);
  opacity: 0.72;
  box-shadow: none;
}

.dimension-rail-option.active .dimension-option-mark {
  background: #2a2a2a;
  color: #fff;
}

.dimension-rail-option.active .dimension-option-mark img {
  filter: grayscale(1) brightness(3);
  opacity: 1;
}

.dimension-rail-spacer {
  flex: 1 1 auto;
}

.dimension-rail-account {
  width: 34px;
  height: 34px;
  border-color: #3b3b3b;
  border-radius: 9px;
  background: #242424;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.dimension-rail-account:hover,
.dimension-rail-account:focus-visible {
  border-color: var(--accent);
  outline-color: var(--accent);
}

.sidebar {
  background: var(--surface);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
}

html[data-theme="dark"] .sidebar {
  background: var(--nav);
  color: #f8fafc;
  border-right-color: #2c3949;
}

.sidebar .eyebrow,
.sidebar .empty-line {
  color: #a8b3c4;
}

.sidebar-brand .eyebrow {
  text-transform: none;
}

#active-brand {
  text-transform: none;
}

.sidebar-brand-shell {
  position: relative;
  border-bottom: 1px solid var(--line-2);
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 56px;
  padding: 12px 13px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.sidebar-brand:hover,
.sidebar-brand[aria-expanded="true"] {
  background: var(--surface-2);
}

.sidebar-brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.sidebar-brand:disabled {
  cursor: default;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-title {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.1;
  font-weight: 600;
}

.sidebar-brand .brand-mark,
.sidebar-brand .brand-logo {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
}

.sidebar-brand .brand-mark {
  border-radius: 7px;
  background: var(--nav);
  color: var(--accent);
}

.sidebar-brand .brand-mark.has-logo {
  background: var(--nav);
}

.dimension-switcher-menu {
  position: absolute;
  top: calc(100% - 8px);
  left: 18px;
  right: 18px;
  z-index: 45;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.dimension-switcher-menu[hidden] {
  display: none;
}

.dimension-switcher-label {
  padding: 2px 4px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dimension-switcher-options {
  display: grid;
  gap: 4px;
}

.dimension-switcher-option {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 900;
}

.dimension-switcher-option:hover,
.dimension-switcher-option.active {
  background: var(--surface-2);
}

.dimension-option-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 950;
}

.dimension-option-mark.logo-mark {
  background: transparent;
}

.dimension-option-mark img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.side-section {
  padding: 12px 8px 2px;
}

.direct-section {
  flex: 0 0 auto;
  padding-top: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-2);
}

.campaign-workstream-section {
  flex: 0 0 auto;
  max-height: min(30vh, 260px);
  padding-top: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-2);
  overflow-x: hidden;
  overflow-y: auto;
}

.campaign-workstream-list {
  display: grid;
  gap: 3px;
  max-height: 168px;
  overflow-y: auto;
  padding-right: 2px;
}

.campaign-archive-toggle {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  color: #94a3b8;
  padding: 6px 7px 2px;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.campaign-archive-toggle::before {
  content: "▸";
  width: 10px;
}

.campaign-archive-toggle[aria-expanded="true"]::before {
  content: "▾";
}

.campaign-archive-toggle span:first-of-type {
  flex: 1 1 auto;
}

.campaign-archive-toggle:hover {
  color: #fff;
}

.campaign-archive-list {
  max-height: 122px;
  margin-top: 3px;
}

.side-count {
  color: #8a8a8a;
  font-size: 10px;
}

.channel-section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 10px;
  overflow: hidden;
}

.channel-filter {
  display: grid;
  gap: 5px;
  padding: 0 6px 8px;
  color: #8a8a8a;
  font-size: 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.channel-filter input {
  min-height: 34px;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.channel-filter input::placeholder {
  color: #7d7d7d;
}

.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 6px;
  color: #cbd5e1;
  font-size: 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
}

.channel-list {
  display: grid;
  gap: 2px;
}

.channel-section .channel-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  padding-bottom: 14px;
}

.channel-group {
  display: grid;
  gap: 2px;
}

.channel-group + .channel-group {
  margin-top: 5px;
}

.channel-group-heading {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 5px 7px 3px;
  color: #8a8a8a;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: left;
  cursor: pointer;
}

.channel-group-heading:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.channel-group-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-group-stats {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 12px;
}

.group-mention-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 950;
}

.group-unread-dot,
.group-running-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5a5a5a;
}

.group-running-dot {
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(0, 175, 234, 0.16);
}

.channel-group-heading::before {
  content: "▾";
  color: #94a3b8;
}

.channel-group.collapsed .channel-group-heading::before {
  content: "▸";
}

.channel-group[draggable="true"] .channel-group-heading {
  cursor: grab;
}

.channel-group.dragging {
  opacity: 0.45;
}

.channel-group.drop-before {
  box-shadow: inset 0 2px 0 var(--accent);
}

.channel-group.drop-after {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.group-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
}

.channel-group-items {
  display: grid;
  gap: 2px;
}

.channel-group.collapsed .channel-group-items {
  display: none;
}

.channel-button {
  width: 100%;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #d7dee9;
  padding: 5px 9px;
  text-align: left;
  font-size: 13px;
}

.channel-label {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.channel-label span,
.channel-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-label small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
}

.channel-button:hover,
.channel-button.active {
  background: var(--nav-2);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.channel-button.active {
  border-left-color: var(--accent);
}

.campaign-workstream-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: stretch;
  min-width: 0;
}

.campaign-workstream-row:not(.manageable) {
  grid-template-columns: minmax(0, 1fr);
}

.campaign-workstream-button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #d7dee9;
  padding: 5px 7px;
  text-align: left;
}

.campaign-workstream-row-action {
  width: 30px;
  min-width: 30px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #94a3b8;
  padding: 0;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.campaign-workstream-row-action:hover,
.campaign-workstream-row-action[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--nav-2);
  color: #fff;
}

.campaign-workstream-action-menu {
  grid-column: 1 / -1;
  z-index: 12;
  min-width: 0;
  margin: 0 2px 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #111827;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}

.campaign-workstream-action-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.campaign-workstream-action-menu button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.campaign-workstream-action-menu button:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.campaign-workstream-row.archived .campaign-workstream-button {
  color: #aab4c2;
}

.campaign-workstream-row.archived .campaign-workstream-phase {
  color: #7f8a99;
}

.campaign-workstream-button:hover,
.campaign-workstream-button.active {
  border-color: rgba(255, 255, 255, 0.08);
  border-left-color: var(--accent);
  background: var(--nav-2);
  color: #fff;
}

.campaign-workstream-button.unread {
  color: #fff;
  font-weight: 900;
}

.campaign-workstream-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.campaign-workstream-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.campaign-workstream-phase {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.channel-button.unread {
  color: #fff;
  font-weight: 900;
}

.channel-button.mentioned {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--nav-2));
}

.channel-button.active.mentioned {
  background: color-mix(in srgb, var(--accent) 14%, var(--nav-2));
}

.channel-button.agent-replied {
  border-left-color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 10%, var(--nav-2));
}

.channel-button.active.agent-replied {
  background: color-mix(in srgb, var(--accent-2) 14%, var(--nav-2));
}

.channel-button.agent-failed {
  border-left-color: #ef4444;
  background: color-mix(in srgb, #ef4444 10%, var(--nav-2));
}

.channel-button.active.agent-failed {
  background: color-mix(in srgb, #ef4444 14%, var(--nav-2));
}

.channel-icon {
  color: #94a3b8;
  font-weight: 800;
}

.channel-badges {
  display: flex;
  align-items: center;
  gap: 5px;
}

.unread-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid #5a5a5a;
  border-radius: 0;
  background: transparent;
  color: #e0e0e0;
  font-size: 11px;
  font-weight: 900;
}

.mention-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 900;
  box-shadow: none;
}

.channel-agent-reply-badge {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 70%, #fff);
  border-radius: 999px;
  background: var(--accent-2);
  color: #00131a;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.channel-agent-failed-badge {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.channel-running {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(0, 175, 234, 0.16);
  animation: aro-pulse 2s infinite;
}

.channel-waiting {
  width: 7px;
  height: 7px;
  border: 2px solid var(--warning, #d97706);
  border-radius: 50%;
  background: transparent;
}

@keyframes aro-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 175, 234, 0.45);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(0, 175, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 175, 234, 0);
  }
}

.status-block {
  margin-top: auto;
  padding: 16px 18px 18px;
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d7dee9;
  font-size: 13px;
}

.sidebar-action-row {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 8px;
}

.sidebar-small-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.dimension-notification-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 950;
}

.product-updates-button.has-unread {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, #fff);
  color: #111827;
  animation: aro-update-pulse 2s ease-in-out infinite;
}

.product-updates-badge {
  position: static;
  flex: 0 0 auto;
  min-width: 24px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--accent-ink) 22%, transparent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.02em;
  line-height: 1;
}

@keyframes aro-update-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
  }
  50% {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 0%, transparent);
  }
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  background: var(--muted);
}

.status-dot.good {
  background: var(--good);
}

.status-dot.bad {
  background: var(--bad);
}

.status-dot.muted {
  background: #94a3b8;
}

.chat-workspace {
  min-width: 0;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.topbar {
  flex: 0 0 auto;
  min-height: 56px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.room-title {
  min-width: 0;
}

.room-title h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

@media (min-width: 901px) {
  .topbar.thread-workspace-active .room-title {
    display: none;
  }

  .topbar.thread-workspace-active .topbar-actions {
    margin-left: auto;
  }
}

.topbar-icon-action {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.topbar-icon-action:hover,
.topbar-icon-action:focus-visible,
.topbar-icon-action.active,
.topbar-icon-action[aria-expanded="true"] {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.topbar-action-icon {
  display: inline-grid;
  width: 17px;
  min-width: 17px;
  height: 17px;
  min-height: 17px;
  place-items: center;
  line-height: 1;
}

.topbar-action-icon svg {
  display: block;
  width: 17px;
  height: 17px;
}

.mobile-header-only {
  display: none;
}

.notification-trigger {
  position: relative;
}

.pinned-messages-trigger {
  position: relative;
}

.pinned-messages-trigger.has-pins {
  padding-right: 18px;
}

.pinned-messages-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #111827;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.notification-trigger.has-notifications {
  border-color: color-mix(in srgb, var(--accent) 80%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}

.notification-trigger.has-team-notification {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, #fff);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 34%, transparent),
    0 8px 24px color-mix(in srgb, var(--accent) 18%, transparent);
}

.notification-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.team-notification-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 22px 12px;
  padding: 12px 14px 12px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--line));
  border-left: 5px solid var(--accent);
  border-radius: 7px;
  background: color-mix(in srgb, #fff 82%, var(--accent));
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.team-notification-banner[hidden] {
  display: none;
}

.team-notification-banner strong {
  display: block;
  font-size: 13px;
  font-weight: 950;
}

.team-notification-banner span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.team-notification-banner p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.team-notification-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.notification-drawer {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: min(460px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 120px));
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--strong-line);
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.notification-drawer[hidden] {
  display: none;
}

.notification-drawer-header,
.notification-drawer-actions,
.notification-row-top,
.notification-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-filters,
.notification-scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.notification-filters button,
.notification-scopes button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.notification-filters button.active,
.notification-scopes button.active {
  border-color: var(--strong-line);
  background: var(--ink);
  color: #fff;
}

.notification-settings {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 10px;
}

.notification-settings summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}

.notification-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.notification-settings-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.notification-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.notification-settings-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.notification-drawer-header strong {
  display: block;
  font-size: 15px;
  font-weight: 950;
}

.notification-drawer-header span,
.notification-row-top span,
.notification-row-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.notification-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.notification-group {
  display: grid;
  gap: 7px;
}

.notification-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.notification-group > header span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 950;
}

.notification-group-list {
  display: grid;
  gap: 7px;
}

.notification-row {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  font: inherit;
}

.notification-row:hover {
  border-color: var(--strong-line);
  background: var(--surface-2);
}

.notification-row-main {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.notification-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.notification-row.mention,
.notification-row.allhumans,
.notification-row.admin_mention,
.notification-row.channel_mention {
  border-left: 4px solid var(--accent);
}

.notification-row.dm {
  border-left: 4px solid var(--accent-2);
}

.notification-row.agent_reply {
  border-left: 4px solid var(--accent-2);
}

.notification-row.agent_run_done {
  border-left: 4px solid #22c55e;
}

.notification-row.agent_run_failed,
.notification-row.approval_required {
  border-left: 4px solid #ef4444;
}

.notification-row.product_update,
.notification-row.feedback {
  border-left: 4px solid #0ea5e9;
}

.notification-row.priority-high {
  background: color-mix(in srgb, #fff 86%, var(--accent));
}

.notification-row.priority-medium {
  background: color-mix(in srgb, #fff 92%, #0ea5e9);
}

.notification-row strong {
  font-size: 13px;
}

.notification-row p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.notification-toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 28px));
  pointer-events: none;
}

.notification-toast {
  pointer-events: auto;
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--strong-line);
  border-left: 5px solid var(--accent-2);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  text-align: left;
  font: inherit;
  cursor: pointer;
  animation: toast-in 140ms ease-out;
}

.notification-toast.priority-high {
  border-left-color: var(--accent);
  background: color-mix(in srgb, #fff 88%, var(--accent));
}

.notification-toast.closing {
  animation: toast-out 180ms ease-in forwards;
}

.notification-toast strong {
  font-size: 13px;
  font-weight: 950;
}

.notification-toast span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.notification-toast p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

.notification-center-shell {
  display: grid;
  gap: 14px;
}

.notification-center-header,
.notification-center-actions,
.notification-center-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-center-header {
  justify-content: space-between;
}

.notification-center-header h3 {
  margin: 0;
  font-size: 16px;
}

.notification-center-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.notification-center-actions,
.notification-center-stats {
  flex-wrap: wrap;
}

.notification-center-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.notification-center-stats strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.notification-historical-failures-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid #ef4444;
  background: var(--surface-2);
}

.notification-historical-failures-strip[hidden] {
  display: none;
}

.notification-historical-failures-strip p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.notification-historical-failures-strip button {
  justify-self: end;
  white-space: nowrap;
}

.notification-archive-action {
  color: #9f1239;
}

.notification-center-list {
  max-height: calc(100vh - 260px);
}

.notification-debug-panel {
  border: 1px solid var(--line);
  background: #f7f7f7;
  padding: 10px;
  font-size: 12px;
}

.notification-debug-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.notification-debug-summary span {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 4px 7px;
  font-weight: 850;
}

.notification-debug-list {
  display: grid;
  gap: 6px;
}

.notification-debug-rules {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  margin: 8px 0;
}

.notification-debug-rules summary {
  cursor: pointer;
  font-weight: 950;
}

.notification-debug-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.notification-debug-rule {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px;
}

.notification-debug-rule strong,
.notification-debug-rule span {
  display: block;
}

.notification-debug-rule span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  margin-top: 2px;
}

.notification-debug-rule p {
  margin: 5px 0 0;
  color: var(--ink);
}

.notification-debug-row {
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.notification-debug-row span,
.notification-debug-row small {
  margin-left: 8px;
  color: var(--muted);
  font-weight: 800;
}

.notification-debug-row p {
  margin: 4px 0 0;
  color: var(--ink);
}

.mention-trigger {
  position: relative;
  font-weight: 950;
}

.mention-trigger.has-mentions,
.tab.has-mentions,
.app-menu button.has-mentions {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  color: var(--ink);
}

.top-mention-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.maintenance-banner {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  margin: 0 22px 12px;
  padding: 12px 14px 12px 16px;
  border: 1px solid rgba(180, 83, 9, 0.42);
  border-left: 5px solid #f97316;
  border-radius: 7px;
  background: #fff7ed;
  color: #7c2d12;
  box-shadow: 0 1px 0 rgba(124, 45, 18, 0.08);
  font-size: 14px;
  line-height: 1.4;
}

.deployment-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 22px 12px;
  padding: 10px 14px;
  border: 1px solid rgba(180, 83, 9, 0.42);
  border-left: 5px solid #f59e0b;
  border-radius: 7px;
  background: #fffbeb;
  color: #78350f;
  font-size: 13px;
  line-height: 1.4;
}

.deployment-banner strong {
  flex: 0 0 auto;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 950;
}

.maintenance-banner strong {
  color: #7c2d12;
  font-size: 14px;
  font-weight: 900;
}

.app-version-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 22px 12px;
  padding: 12px 14px 12px 16px;
  border: 1px solid rgba(2, 132, 199, 0.42);
  border-left: 5px solid #0ea5e9;
  border-radius: 7px;
  background: #f0f9ff;
  color: #0c4a6e;
  box-shadow: 0 1px 0 rgba(12, 74, 110, 0.08);
}

.app-version-banner[hidden] {
  display: none;
}

.app-version-banner strong {
  display: block;
  color: #075985;
  font-size: 14px;
  font-weight: 950;
}

.app-version-banner p {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.app-version-banner small {
  display: block;
  margin-top: 4px;
  color: #0369a1;
  font-size: 11px;
  font-weight: 800;
}

.app-version-banner button {
  flex: 0 0 auto;
}

.operating-context-strip,
.campaign-workspace-strip,
.campaign-asset-board,
.chat-run-status {
  flex: 0 0 auto;
  margin: 0 22px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.operating-context-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.campaign-workspace-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
}

.campaign-workspace-copy {
  min-width: 0;
}

.campaign-workspace-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.campaign-workspace-copy p {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.campaign-workspace-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.campaign-workspace-phase-status {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.campaign-workspace-phase-status strong {
  display: flex;
  align-items: center;
  min-width: 132px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  text-transform: none;
}

.campaign-workspace-phase-status strong[data-phase="production"] {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
}

.campaign-workspace-phase-status strong[data-phase="qualified"] {
  border-color: color-mix(in srgb, var(--good) 46%, var(--line));
}

.campaign-workspace-phase-status strong[data-phase="archived"] {
  border-color: color-mix(in srgb, var(--muted) 56%, var(--line));
  background: var(--surface-2);
}

.campaign-asset-board {
  display: block;
  padding: 9px 12px;
  border-left: 4px solid var(--accent-2);
}

.campaign-asset-summary-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
}

.campaign-asset-summary-copy,
.campaign-asset-detail-header > div {
  min-width: 0;
}

.campaign-asset-summary-copy > strong {
  display: block;
  font-size: 14px;
}

.campaign-asset-summary-copy > p,
.campaign-asset-detail-header p {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.3;
}

.campaign-asset-next-gate {
  min-width: 170px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.campaign-asset-next-gate > span,
.campaign-asset-next-gate > strong {
  display: block;
}

.campaign-asset-next-gate > span {
  color: var(--soft-muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.campaign-asset-next-gate > strong {
  margin-top: 2px;
  color: var(--warn);
  font-size: 11px;
}

.campaign-asset-next-gate > strong.ready {
  color: var(--good);
}

.campaign-asset-next-gate > button {
  min-height: 28px;
  margin-top: 6px;
  padding: 4px 8px;
  font-size: 11px;
}

.campaign-asset-detail {
  display: grid;
  gap: 12px;
  width: min(1180px, 100%);
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
}

.campaign-assets-tab,
.campaign-asset-detail-header,
.campaign-asset-gates,
.campaign-asset-plan,
.campaign-asset-row,
.campaign-asset-blockers {
  min-width: 0;
  max-width: 100%;
}

.campaign-asset-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.campaign-asset-detail-header h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 18px;
}

.campaign-asset-gates {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.campaign-asset-gate {
  min-width: 0;
  min-height: 42px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
}

.campaign-asset-gate strong,
.campaign-asset-gate span {
  display: block;
  overflow-wrap: anywhere;
}

.campaign-asset-gate strong {
  color: var(--ink);
  font-size: 10px;
}

.campaign-asset-gate span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.campaign-asset-gate.ready {
  border-color: color-mix(in srgb, var(--good) 55%, var(--line));
  background: color-mix(in srgb, var(--good) 8%, var(--surface));
}

.campaign-asset-gate.blocked {
  border-color: color-mix(in srgb, var(--warn) 55%, var(--line));
  background: color-mix(in srgb, var(--warn) 7%, var(--surface));
}

.campaign-asset-columns,
.campaign-asset-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(130px, 0.8fr) minmax(120px, 0.7fr) minmax(220px, 1.3fr);
  gap: 10px;
}

.campaign-asset-columns {
  padding: 0 7px;
  color: var(--soft-muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.campaign-asset-plan {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.campaign-asset-row {
  min-height: 48px;
  align-items: center;
  padding: 6px 7px;
  border-bottom: 1px solid var(--line);
}

.campaign-asset-row:last-child {
  border-bottom: 0;
}

.campaign-asset-cell {
  min-width: 0;
}

.campaign-asset-cell > strong,
.campaign-asset-cell > span,
.campaign-asset-cell > small {
  display: block;
  overflow-wrap: anywhere;
}

.campaign-asset-cell > strong,
.campaign-asset-cell > span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.campaign-asset-cell > small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.campaign-asset-artifact-action {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  margin-top: 4px;
  padding: 0 6px;
  font-size: 10px;
}

.campaign-asset-plan-status {
  width: fit-content;
  max-width: 100%;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
}

.campaign-asset-plan-status.ready,
.campaign-asset-plan-status.approved {
  border-color: color-mix(in srgb, var(--good) 55%, var(--line));
  color: var(--good);
}

.campaign-asset-plan-status.blocked,
.campaign-asset-plan-status.rejected {
  border-color: color-mix(in srgb, var(--bad) 55%, var(--line));
  color: var(--bad);
}

.campaign-asset-blockers {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.campaign-asset-blockers > strong {
  color: var(--ink);
  white-space: nowrap;
}

.campaign-asset-blockers > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.campaign-asset-blockers span {
  overflow-wrap: anywhere;
}

.campaign-asset-status {
  min-height: 15px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.campaign-asset-status.error {
  color: var(--bad);
}

.operating-context-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.operating-context-strip:not(.campaign-planning-context) {
  min-height: 34px;
  margin: 0;
  padding: 7px 16px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
}

.operating-context-strip:not(.campaign-planning-context) .context-kicker {
  display: none;
}

.operating-context-strip:not(.campaign-planning-context) .operating-context-actions {
  display: none;
}

.operating-context-strip:not(.campaign-planning-context) strong {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
}

.context-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.operating-context-strip strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.operating-context-strip p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-run-status {
  display: grid;
  gap: 7px;
  padding: 0 14px 8px;
  background: var(--surface);
}

.chat-run-status-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.chat-run-status-row.failed {
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  border-color: color-mix(in srgb, var(--bad) 28%, var(--line));
  background: color-mix(in srgb, var(--bad) 7%, var(--surface));
}

.run-activity-icon {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid color-mix(in srgb, var(--bad) 78%, var(--line));
  border-radius: 50%;
}

.run-activity-icon::after {
  position: absolute;
  inset: 4px;
  border: 2px dotted var(--bad);
  border-radius: 50%;
  content: "";
}

.run-activity-icon.running::after,
.run-activity-icon.working::after,
.run-activity-icon.queued::after,
.run-activity-icon.cancelling::after {
  animation: aro-spin 1.1s linear infinite;
}

.run-failure-label {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bad) 14%, var(--surface));
  color: var(--bad);
  font-size: 11px;
  font-weight: 900;
}

.run-notice-dismiss {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}

.run-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.run-status-dot.running {
  background: var(--accent-2);
  animation: aro-pulse 2s infinite;
}

.run-status-dot.succeeded {
  background: var(--good);
}

.run-status-dot.failed {
  background: var(--bad);
}

.run-status-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.run-status-copy strong {
  color: var(--ink);
  font-size: 13px;
}

.run-status-copy small {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-inline-actions {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.run-inline-status {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.run-inline-status.running {
  border-color: color-mix(in srgb, var(--accent-2) 38%, var(--line));
  color: var(--ink);
}

.run-inline-status.failed {
  border-color: rgba(220, 38, 38, 0.4);
  color: var(--bad);
}

.run-recovery-hint {
  min-width: min(100%, 280px);
  max-width: 680px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.danger-action {
  border-color: rgba(220, 38, 38, 0.28);
  color: #991b1b;
}

.menu-trigger {
  min-width: 36px;
}

.menu-trigger.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.help-trigger {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
}

.app-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 220px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.app-menu[hidden] {
  display: none;
}

.app-menu button {
  width: 100%;
  min-height: 36px;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}

.app-menu button:hover {
  background: var(--surface-2);
}

.app-menu #pinned-messages-button {
  position: relative;
}

.app-menu #pinned-messages-button.has-pins {
  padding-right: 38px;
}

.app-menu #pinned-messages-button .pinned-messages-badge {
  top: 9px;
  right: 9px;
}

.help-flyout {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 35;
  width: min(360px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 98px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.flyout-topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 8px 16px;
  border-bottom: 1px solid var(--line);
}

.flyout-topbar strong {
  color: var(--ink);
}

.help-panel.compact {
  padding: 12px;
}

.message-list {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
  padding: 10px min(18px, 2vw) 14px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--message-list-bg);
}

.message-list.drag-active {
  outline: 2px dashed color-mix(in srgb, var(--accent) 70%, #fff);
  outline-offset: -10px;
  background: color-mix(in srgb, var(--accent) 5%, var(--message-list-bg));
}

.message {
  --message-bg: var(--surface);
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  max-width: none;
  width: min(1080px, 100%);
  min-width: min(320px, 100%);
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: var(--radius);
  padding: 15px 16px;
  background: var(--message-bg);
}

.message.user {
  --message-bg: #f0fdfa;
  align-self: flex-end;
  width: fit-content;
  min-width: 0;
  max-width: min(70ch, 78%);
  background: var(--message-bg);
  border-color: #99d5cb;
}

.message.assistant {
  align-self: flex-start;
}

.message.system,
.message.failed {
  --message-bg: #fff7ed;
  align-self: center;
  width: min(980px, 100%);
  background: var(--message-bg);
  border-color: #f2c38b;
}

.message.has-html-preview {
  align-self: stretch;
  width: 100%;
  max-width: 1280px;
}

.message.assistant:not(.failed):not(.special-surface),
.message.agent:not(.failed):not(.special-surface) {
  --message-bg: transparent;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  border-width: 0;
  padding: 6px 10px;
  background: transparent;
  box-shadow: none;
}

.message.assistant:not(.failed):not(.special-surface) .message-body,
.message.agent:not(.failed):not(.special-surface) .message-body {
  width: 100%;
  max-width: 70ch;
}

.message.assistant:not(.failed):not(.special-surface):hover,
.message.agent:not(.failed):not(.special-surface):hover,
.message.assistant:not(.failed):not(.special-surface):focus,
.message.agent:not(.failed):not(.special-surface):focus {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.message.assistant:not(.failed):not(.special-surface):focus,
.message.agent:not(.failed):not(.special-surface):focus {
  outline: 2px solid color-mix(in srgb, var(--accent-2) 52%, transparent);
  outline-offset: -2px;
}

.message.message-group-continuation {
  padding-top: 1px;
}

.message.message-group-continuation .message-avatar,
.message.message-group-continuation .message-meta {
  visibility: hidden;
}

.message.message-group-continuation .message-meta {
  height: 0;
  margin: 0;
}

.routine-system-line {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 12px;
}

.routine-system-line:focus {
  outline: 2px solid color-mix(in srgb, var(--accent-2) 52%, transparent);
  outline-offset: -2px;
}

.routine-system-line.highlight,
.routine-system-line.highlighted {
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 26%, transparent);
}

.routine-system-line:hover .reaction-toolbar,
.routine-system-line:focus .reaction-toolbar,
.routine-system-line:focus-within .reaction-toolbar {
  opacity: 1;
  pointer-events: auto;
}

.routine-system-line .message-reactions {
  flex-basis: 100%;
  margin-top: 0;
  margin-left: 40px;
}

.routine-system-line time,
.system-event-digest time {
  color: var(--soft-muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.system-event-digest {
  margin: 3px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-2);
  background: var(--surface);
}

.system-event-digest summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 11px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.system-event-digest summary small {
  margin-left: auto;
  color: var(--soft-muted);
  font-size: 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.system-event-digest ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 2px 12px 10px 34px;
}

.system-event-digest li {
  padding-left: 3px;
  color: var(--muted);
  font-size: 12px;
}

.system-event-digest li time {
  margin-right: 8px;
}

.message-avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e5e7eb;
  color: #111827;
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
}

.message-avatar.user {
  background: #ccfbf1;
  color: #0f766e;
}

.message-avatar.assistant {
  background: var(--accent);
  color: var(--accent-ink);
}

.message-avatar.system {
  background: #fef3c7;
  color: #92400e;
}

.message-avatar.has-image {
  background: #111827;
  color: transparent;
}

.message-avatar.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-avatar.has-image > span {
  display: none;
}

.message-body {
  min-width: 0;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  font-size: 11px;
  color: var(--muted);
}

.message-meta strong {
  color: var(--ink);
}

.message-content {
  white-space: normal;
  line-height: 1.5;
  font-size: 13.5px;
}

.message-content p {
  margin: 0 0 12px;
}

.message-content p:last-child,
.message-content ul:last-child,
.message-content ol:last-child {
  margin-bottom: 0;
}

.message-content h4 {
  margin: 14px 0 7px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--ink);
}

.message-content h4:first-child {
  margin-top: 0;
}

.message-content ul,
.message-content ol {
  margin: 7px 0 12px;
  padding-left: 21px;
}

.message-content li {
  margin: 3px 0;
  padding-left: 2px;
}

.message-content strong {
  font-weight: 900;
}

.message-content em {
  font-style: italic;
}

.message-render-warning {
  margin: 0 0 8px;
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--warning, #d97706) 45%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--warning, #d97706) 10%, var(--surface));
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.message-content code {
  display: inline-block;
  max-width: 100%;
  padding: 1px 5px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, #fff);
  border-radius: 5px;
  background: var(--code-bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.message-content code.slash-command {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  font-weight: 800;
}

.message-content.compact {
  font-size: 12px;
  line-height: 1.42;
}

.message-content.compact p,
.message-content.compact ul,
.message-content.compact ol {
  margin-bottom: 6px;
}

.message-content blockquote {
  margin: 10px 0 12px;
  padding: 8px 10px;
  border-left: 3px solid color-mix(in srgb, var(--accent-2) 62%, var(--line));
  background: color-mix(in srgb, var(--accent-2) 7%, #fff);
  color: var(--muted);
}

.message-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 12px 0;
}

.message-code-block {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #e5e7eb;
  overflow-x: auto;
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.message-code-block code {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.message-table-wrap {
  max-width: 100%;
  margin: 10px 0 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.message-content table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.35;
}

.message-content th,
.message-content td {
  padding: 8px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, #fff);
  text-align: left;
  vertical-align: top;
}

.message-content th {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 900;
}

.message-content tr:last-child td {
  border-bottom: 0;
}

.message-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 12px;
  margin: 10px 0 12px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, #fff);
  border-radius: 8px;
  background: #f8fafc;
}

.message-facts div {
  min-width: 0;
}

.message-facts dt {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.message-facts dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.message-run-reference {
  display: grid;
  gap: 4px;
  margin: 8px 0 4px;
  padding: 7px 9px;
  border-left: 3px solid color-mix(in srgb, var(--accent-2) 64%, var(--line));
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.message-run-reference strong {
  color: var(--ink);
  font-size: 12px;
}

.message-run-reference small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.compact-run-reference {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
  padding: 5px 7px;
  border-left-width: 2px;
  background: color-mix(in srgb, var(--surface-2) 64%, transparent);
  font-size: 11px;
}

.compact-run-reference strong {
  flex: 0 0 auto;
  font-size: 11px;
}

.compact-run-reference small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-continuation {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 5px;
  padding: 7px 9px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 64%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.message-continuation > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.message-continuation strong {
  color: var(--ink);
  font-size: 12px;
}

.message-continuation small {
  overflow-wrap: anywhere;
}

.message.highlight .message-body {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
  background: color-mix(in srgb, var(--accent) 7%, #fff);
}

.message.highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 26%, transparent);
}

.message-link {
  display: inline;
  color: color-mix(in srgb, var(--accent) 65%, #0f766e);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.message-link:hover,
.message-link:focus {
  color: #0f766e;
}

.inline-drive-link-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
  vertical-align: baseline;
}

.inline-drive-open-button,
.inline-drive-preview-button {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 0;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, #fff);
  color: color-mix(in srgb, var(--accent) 74%, #0f172a);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  vertical-align: baseline;
}

.inline-drive-open-button:hover,
.inline-drive-open-button:focus,
.inline-drive-preview-button:hover,
.inline-drive-preview-button:focus {
  background: color-mix(in srgb, var(--accent) 17%, #fff);
}

.inline-drive-preview-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.inline-drive-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 10%, #fff);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.inline-drive-status.warning {
  background: color-mix(in srgb, var(--warning, #d97706) 14%, #fff);
  color: color-mix(in srgb, var(--warning, #d97706) 78%, #111827);
}

.link-preview-list {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.link-preview-card {
  display: grid;
  gap: 3px;
  width: min(620px, 100%);
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
}

.link-preview {
  display: grid;
  gap: 3px;
  color: var(--ink);
  text-decoration: none;
}

.link-preview-card.drive-folder,
.link-preview-card.drive-file,
.link-preview-card.drive-link,
.link-preview-card.google-doc,
.link-preview-card.google-sheet,
.link-preview-card.google-slides,
.link-preview-card.google-form {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, #fff);
}

.link-preview span {
  color: color-mix(in srgb, var(--accent) 72%, #0f766e);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.link-preview strong {
  font-size: 13px;
  line-height: 1.25;
}

.link-preview small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.link-preview-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.link-preview-meta {
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
}

.link-preview-children {
  display: grid;
  gap: 5px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
}

.link-preview-children a {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.25;
}

.link-preview-children a span {
  color: var(--muted);
  font-weight: 850;
  white-space: nowrap;
}

.link-preview-children a strong {
  overflow-wrap: anywhere;
}

.link-preview-children small {
  color: var(--muted);
  font-size: 12px;
}

.link-category-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.link-category-chip {
  min-height: 25px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
}

.link-category-chip.active,
.link-category-chip:hover {
  border-color: var(--strong-line);
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 12%, #fff);
}

.attachment-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.attachment-card {
  display: grid;
  gap: 8px;
  max-width: min(460px, 100%);
  color: var(--ink);
  text-decoration: none;
}

.attachment-card.image {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.attachment-card.image img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #f8fafc;
}

.attachment-card.image span,
.attachment-card.file {
  padding: 9px 11px;
}

.attachment-card.file {
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.attachment-card.html-artifact {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.artifact-card-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.html-artifact .attachment-file-icon {
  width: 42px;
  font-size: 11px;
}

.html-artifact-status {
  border-color: #d4d4d4;
  background: #fafafa;
}

.attachment-status.artifact-bundle_ready,
.attachment-status.artifact-preview_ready,
.attachment-status.artifact-ready {
  background: #ecfdf3;
  border-color: #7fcf9d;
  color: #11623b;
}

.attachment-status.artifact-missing_entry,
.attachment-status.artifact-extract_failed,
.attachment-status.artifact-not_renderable {
  background: #fff4ed;
  border-color: #f4a36f;
  color: #8a3b12;
}

.artifact-error {
  display: block;
  max-width: 520px;
  color: #8a3b12;
}

.artifact-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.artifact-card-actions .secondary-action,
.artifact-preview-toolbar .secondary-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  text-decoration: none;
}

.artifact-inline-preview {
  height: clamp(460px, 62vh, 720px);
  background: #f8fafc;
}

.artifact-inline-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.attachment-card:hover,
.attachment-card:focus {
  border-color: var(--strong-line);
}

.attachment-card strong,
.attachment-card small {
  display: block;
  overflow-wrap: anywhere;
}

.attachment-card strong {
  font-size: 13px;
}

.attachment-card small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.attachment-status,
.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.attachment-card .attachment-status {
  margin-top: 6px;
}

.attachment-status.agent_queued,
.attachment-status.processing,
.status-pill.running {
  border-color: var(--accent);
  color: var(--accent);
}

.attachment-status.processed,
.status-pill.succeeded {
  border-color: var(--good);
  color: var(--good);
}

.attachment-status.failed,
.attachment-status.aborted,
.attachment-status.interrupted,
.status-pill.failed {
  border-color: var(--bad);
  color: var(--bad);
}

.attachment-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.attachment-status-list.detail {
  margin-top: 0;
}

.attachment-file-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 900;
}

.openclaw-summary {
  display: grid;
  gap: 10px;
}

.openclaw-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.openclaw-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
}

.openclaw-meter .pct-0 {
  width: 0;
}

.openclaw-meter .pct-10 {
  width: 10%;
}

.openclaw-meter .pct-20 {
  width: 20%;
}

.openclaw-meter .pct-30 {
  width: 30%;
}

.openclaw-meter .pct-40 {
  width: 40%;
}

.openclaw-meter .pct-50 {
  width: 50%;
}

.openclaw-meter .pct-60 {
  width: 60%;
}

.openclaw-meter .pct-70 {
  width: 70%;
}

.openclaw-meter .pct-80 {
  width: 80%;
}

.openclaw-meter .pct-90 {
  width: 90%;
}

.openclaw-meter .pct-100 {
  width: 100%;
}

.meta-list.compact {
  gap: 7px;
}

.artifact-list {
  display: grid;
  gap: 9px;
}

.artifact-state-banner {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: 7px;
  background: var(--surface-2);
}

.artifact-state-banner strong {
  color: var(--ink);
  font-size: 12px;
}

.artifact-state-banner span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.artifact-state-banner.artifact-state-loading {
  border-left-color: var(--accent-2);
}

.artifact-state-banner.artifact-state-ready {
  border-left-color: var(--good);
}

.artifact-state-banner.artifact-state-stale {
  border-left-color: var(--warn);
}

.artifact-state-banner.artifact-state-forbidden,
.artifact-state-banner.artifact-state-missing {
  border-left-color: var(--bad);
}

.artifact-row {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: #fff;
}

.artifact-row.artifact-state-stale {
  border-color: color-mix(in srgb, var(--warn) 52%, var(--line));
}

.artifact-row.artifact-state-forbidden,
.artifact-row.artifact-state-missing {
  border-color: color-mix(in srgb, var(--bad) 42%, var(--line));
}

.artifact-row.artifact-state-loading {
  opacity: 0.72;
}

.artifact-row strong,
.artifact-row small,
.artifact-row p,
.artifact-row a {
  overflow-wrap: anywhere;
}

.artifact-row strong {
  color: var(--ink);
  font-size: 13px;
}

.artifact-row small,
.artifact-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.artifact-row a {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.artifact-state-label {
  width: fit-content;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.artifact-row-actions,
.artifact-state-banner > button {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.artifact-row-actions:empty {
  display: none;
}

.artifact-refine-action {
  min-height: 30px;
  padding-inline: 4px;
  font-size: 11px;
}

.reaction-toolbar {
  position: absolute;
  top: -20px;
  right: 16px;
  z-index: 24;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
}

.message:hover .reaction-toolbar,
.message:focus .reaction-toolbar,
.message:focus-within .reaction-toolbar,
.reaction-toolbar:hover,
.reaction-toolbar:focus-within {
  opacity: 1;
  pointer-events: auto;
}

.reaction-add-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  height: 30px;
  min-width: 32px;
  padding: 0;
  list-style: none;
}

.reaction-add-button::-webkit-details-marker {
  display: none;
}

.reaction-add-button:hover,
.reaction-toolbar:focus-within .reaction-add-button {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.reaction-quickbar {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px;
  background: color-mix(in srgb, var(--surface) 96%, #fff);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.reaction-picker-details {
  position: relative;
}

@media (hover: none) {
  .reaction-toolbar {
    top: -18px;
  }
}

.reaction-quickbar-button,
.reaction-action-button,
.message-reaction-pill {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.reaction-quickbar-button,
.reaction-action-button {
  position: relative;
  height: 30px;
  min-width: 32px;
  padding: 0 7px;
}

.reaction-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 16px;
}

.reaction-action-button.active {
  color: var(--ink);
}

.reaction-action-button[data-tooltip]::after,
.reaction-add-button[data-tooltip]::after,
.reaction-quickbar-button[data-tooltip]::after {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  display: none;
  width: max-content;
  max-width: 220px;
  border-radius: 8px;
  padding: 6px 8px;
  background: #111827;
  color: #fff;
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.reaction-action-button[data-tooltip]:hover::after,
.reaction-action-button[data-tooltip]:focus::after,
.reaction-add-button[data-tooltip]:hover::after,
.reaction-add-button[data-tooltip]:focus::after,
.reaction-quickbar-button[data-tooltip]:hover::after,
.reaction-quickbar-button[data-tooltip]:focus::after {
  display: block;
}

.reaction-toolbar-separator {
  width: 1px;
  height: 22px;
  margin: 0 3px;
  background: var(--line);
}

.reaction-picker-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(360px, calc(100vw - 48px));
  max-height: 420px;
  overflow: auto;
  display: grid;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.reaction-custom-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.reaction-custom-input span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reaction-custom-input input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.reaction-custom-input button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.reaction-picker-panel section {
  display: grid;
  gap: 8px;
}

.reaction-picker-panel strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reaction-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(34px, 1fr));
  gap: 5px;
}

.reaction-picker-button {
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  min-height: 34px;
  font-size: 18px;
  line-height: 1;
}

.reaction-picker-button:hover,
.reaction-picker-button:focus {
  border-color: var(--line);
  background: var(--surface-2);
}

.reaction-quickbar-button:hover,
.reaction-action-button:hover,
.reaction-action-button.active,
.message-reaction-pill:hover,
.message-reaction-pill.active {
  background: var(--accent-soft);
  border-color: transparent;
}

.message-reactions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0 0;
}

.message-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-color: var(--line);
  background: var(--surface);
  min-height: 24px;
  padding: 3px 8px;
}

.message-reaction-pill span {
  color: var(--muted);
  font-size: 11px;
}

.message-decision-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.message-decision-button:hover {
  border-color: var(--strong-line);
  color: var(--ink);
}

.empty-chat {
  margin: auto;
  color: var(--muted);
  font-weight: 700;
}

.composer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  padding: 10px 14px 12px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 0;
  background: var(--surface);
}

.composer-primary-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  padding: 4px 4px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  background: var(--surface);
}

.composer-primary-row:focus-within {
  border-color: var(--ink);
}

.composer.drag-active {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 78%, #fff);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.composer-input {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.composer textarea {
  width: 100%;
  min-height: 38px;
  max-height: 120px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  resize: none;
  line-height: 1.45;
  outline: 0;
}

.composer-primary-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

#send-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
}

#send-button:hover:not(:disabled) {
  background: #222;
}

#send-button:disabled {
  background: var(--line);
  color: var(--soft-muted);
}

#send-button svg {
  display: block;
  width: 17px;
  height: 17px;
}

#send-button.is-stop {
  background: color-mix(in srgb, var(--bad) 12%, var(--surface));
  color: var(--bad);
}

#send-button.is-stop:hover:not(:disabled) {
  background: color-mix(in srgb, var(--bad) 18%, var(--surface));
}

.composer-stop-glyph {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: currentColor;
}

.pending-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.pending-attachment {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  max-width: min(360px, 100%);
  min-height: 34px;
  padding: 5px 6px 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

.pending-attachment-icon {
  min-width: 34px;
  padding: 3px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.pending-attachment-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.feedback-attachment-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.feedback-pending-attachments {
  margin-top: 2px;
}

.pending-attachment small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pending-attachment-remove {
  width: 26px;
  height: 26px;
  min-width: 26px;
}

.continuation-context-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.continuation-context-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.continuation-context-copy strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.continuation-context-copy span,
.continuation-context-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.continuation-context-copy span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.continuation-context-copy small {
  color: var(--muted);
  font-size: 12px;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 39px;
  padding: 4px 6px 5px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.composer-buttons {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 100%;
  justify-content: flex-end;
}

.runtime-composer,
.context-composer {
  position: relative;
  width: 1px;
  height: 30px;
  flex: 0 0 1px;
}

.runtime-action {
  max-width: none;
  min-height: 30px;
  justify-content: flex-start;
  overflow: hidden;
}

.runtime-action,
.context-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.runtime-action {
  max-width: min(440px, calc(100vw - 210px));
  flex-wrap: nowrap;
  white-space: nowrap;
}

.runtime-action:hover,
.context-action:hover,
.runtime-action[aria-expanded="true"],
.context-action[aria-expanded="true"] {
  border-color: var(--line);
  background: var(--surface-2);
}

.context-action {
  min-width: 62px;
  justify-content: center;
}

.context-action-ring {
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--context-percent, 0%), var(--line) 0);
  flex: 0 0 15px;
}

.context-action-ring::after {
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: var(--surface);
  content: "";
}

.runtime-action #runtime-button-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-action-caret {
  flex: 0 0 auto;
}

.runtime-popover,
.context-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 20;
  width: min(360px, calc(100vw - 48px));
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border-radius: 12px;
}

.context-popover {
  right: 0;
  width: min(360px, calc(100vw - 48px));
}

@keyframes aro-spin {
  to { transform: rotate(360deg); }
}

.runtime-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.runtime-popover-head strong {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.runtime-popover label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.runtime-popover select {
  min-height: 38px;
  font-weight: 800;
}

.runtime-popover small {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.attachment-action {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.attachment-action:hover,
.attachment-action:focus-visible {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.attachment-action svg {
  display: block;
  width: 17px;
  height: 17px;
}

.composer-state {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reply-target {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.reply-target.specialist {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 950;
}

.run-status {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-menu {
  position: absolute;
  left: 8px;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: min(640px, calc(100vw - 180px));
  max-width: calc(100vw - 32px);
  max-height: min(420px, 58vh);
  overflow-y: auto;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.mention-option {
  width: 100%;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 220px);
  align-items: center;
  gap: 16px;
  padding: 7px 10px;
  text-align: left;
  font-size: 13px;
  line-height: 1.2;
}

.mention-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.mention-option small {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.mention-option:hover,
.mention-option.active {
  background: var(--surface-2);
  border-color: var(--line);
}

@media (max-width: 720px) {
  .mention-menu {
    width: calc(100vw - 32px);
  }

  .mention-option {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .mention-option small {
    text-align: left;
  }
}

.global-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding: min(10vh, 92px) 24px 24px;
  background: rgba(15, 23, 42, 0.18);
}

.global-search-panel {
  width: min(920px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 96px));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.global-search-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.global-search-header h3 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.1;
}

.global-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.global-search-form input {
  min-height: 42px;
  font-size: 15px;
  font-weight: 750;
}

.global-search-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.global-search-results {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}

.global-search-empty {
  padding: 20px 4px;
  color: var(--muted);
  font-weight: 750;
}

.global-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.global-search-result-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.global-search-result-title strong,
.global-search-result-title span,
.global-search-result-meta,
.global-search-result-snippet {
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-result-title strong {
  min-width: 0;
  font-size: 15px;
  white-space: nowrap;
}

.global-search-result-title span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.global-search-result-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.global-search-result-snippet {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.global-search-result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-reference-chip {
  display: inline-flex;
  align-items: center;
  max-width: min(360px, 100%);
  min-height: 24px;
  margin: 0 2px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  line-height: 1.4;
  vertical-align: baseline;
  cursor: pointer;
}

.channel-reference-chip:hover,
.channel-reference-chip:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
}

.detail-panel {
  position: fixed;
  top: 72px;
  right: 0;
  left: 264px;
  z-index: 25;
  width: auto;
  height: calc(100vh - 72px);
  min-height: 0;
  overflow: hidden;
  border-left: 0;
  border-top: 1px solid var(--line);
  background: #f9fafc;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  box-shadow: 0 -8px 45px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 160ms ease;
}

.detail-panel.open {
  transform: translateX(0);
}

.channel-context-panel {
  position: fixed;
  inset: 0 0 0 auto;
  right: 0;
  z-index: 34;
  width: 344px;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -16px 0 42px rgba(15, 23, 42, 0.14);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.channel-context-dock {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.channel-context-dock[hidden] {
  display: none;
}

.channel-context-panel-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

#channel-context-dock-toggle {
  display: none;
}

@media (min-width: 1680px) {
  #channel-context-dock-toggle {
    display: grid;
  }
}

.channel-context-panel[hidden],
.operational-surface[hidden] {
  display: none;
}

.channel-context-content,
.operational-surface-content {
  min-height: 0;
  overflow: auto;
}

.channel-context-content-body {
  display: block;
  padding: 0;
}

.channel-context-content-body > .context-box {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 13px 15px;
}

.channel-context-content-body > .context-box h3 {
  margin: 0 0 9px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.channel-context-content-body > .technical-details {
  margin: 14px 15px;
}

.operational-surface {
  position: fixed;
  inset: 0;
  z-index: 46;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 56px 20px 20px;
  background: rgba(15, 23, 42, 0.32);
}

.operational-surface-shell {
  width: min(640px, 100%);
  max-height: 86vh;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fafc;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.operational-surface-content-body {
  display: block;
  padding: 14px 16px 18px;
}

.panel-topbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 8px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  padding: 10px;
  gap: 6px;
  border-bottom: 1px solid var(--line);
}

.tab {
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  min-width: 0;
  padding-inline: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab.active {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.tab-panel {
  display: none;
  overflow: auto;
  padding: 16px;
}

.tab-panel.active {
  display: block;
}

.meta-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.technical-details {
  margin: 12px 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.technical-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.technical-details summary::after {
  content: "+";
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.technical-details[open] summary::after {
  content: "-";
}

.technical-details .meta-list {
  margin: 0;
  padding: 0 12px 12px;
}

.context-technical-body {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.context-technical-body .meta-list,
.context-technical-body .session-control {
  margin: 0;
}

.operator-role-label {
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--soft-muted);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.context-health-list {
  display: grid;
  gap: 7px;
  margin: 0;
}

.context-health-list div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.context-health-list dt {
  color: var(--soft-muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
}

.context-health-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.meta-list div {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.meta-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-list dd {
  margin: 4px 0 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.context-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.context-box p {
  color: #344054;
  line-height: 1.45;
  font-size: 13px;
  margin: 0;
}

.context-box-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.context-box-heading h3 {
  margin: 0;
}

.context-box-heading small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.hubspot-jl-review-box {
  display: grid;
  gap: 10px;
}

.hubspot-jl-meta {
  margin-bottom: 2px;
}

.hubspot-c3-panel {
  border-block: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-block: 12px;
}

.hubspot-c3-panel h4 {
  font-size: 14px;
  margin: 0;
}

.hubspot-c3-query {
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: block;
  font-size: 11px;
  line-height: 1.45;
  max-height: 84px;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 8px;
  white-space: pre-wrap;
}

.hubspot-jl-candidates {
  display: grid;
  gap: 10px;
}

.hubspot-jl-candidate {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
  padding: 10px;
}

.hubspot-jl-candidate.eligible {
  border-color: color-mix(in srgb, var(--good) 45%, var(--line));
}

.hubspot-jl-candidate-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.hubspot-jl-candidate-head strong,
.hubspot-jl-candidate-head small {
  display: block;
}

.hubspot-jl-candidate-head small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.hubspot-jl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-members-box {
  margin-top: 12px;
}

.room-members-box h3 {
  margin: 0 0 8px;
}

.room-member-list {
  display: grid;
  gap: 7px;
}

.room-member {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.room-member > span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #111827;
  font-size: 11px;
  font-weight: 900;
}

.room-member strong,
.room-member small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-member strong {
  color: var(--ink);
  font-size: 13px;
}

.room-member small {
  color: var(--muted);
  font-size: 12px;
}

.room-member.inactive {
  opacity: 0.6;
}

.pinned-box {
  margin-top: 12px;
}

.pinned-box h3 {
  margin: 0 0 8px;
}

.pinned-list {
  display: grid;
  gap: 8px;
}

.global-pinned-list {
  display: grid;
  gap: 10px;
  max-height: min(68vh, 720px);
  overflow: auto;
}

.global-pin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.global-pin-open {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.global-pin-open span,
.global-pin-open strong,
.global-pin-open small {
  display: block;
}

.global-pin-open span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.global-pin-open strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
}

.global-pin-open small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.global-pin-open p {
  max-height: 104px;
  overflow: auto;
  margin: 7px 0 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.global-pin-open:hover strong {
  text-decoration: underline;
}

.pin-row {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.pin-row strong,
.pin-row small {
  display: block;
}

.pin-row strong {
  color: var(--ink);
  font-size: 13px;
}

.pin-row small {
  color: var(--muted);
  font-size: 12px;
}

.pin-row p {
  max-height: 92px;
  overflow: auto;
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.compact-action {
  min-height: 30px;
  padding: 0 9px;
}

.file-list,
.audit-list,
.decision-list,
.group-list,
.user-list,
.system-status-panel,
.system-failure-list {
  display: grid;
  gap: 8px;
}

.file-toolbar {
  display: grid;
  gap: 10px;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.file-toolbar span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.file-toolbar strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.file-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.audit-explainer {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.audit-explainer strong {
  color: var(--ink);
  font-size: 13px;
}

.audit-explainer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.audit-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.audit-toolbar select,
.audit-toolbar input {
  min-height: 34px;
  font-size: 12px;
}

.audit-reset-button {
  align-self: end;
  min-height: 34px;
}

.run-center-shell {
  display: grid;
  gap: 12px;
}

.run-center-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.run-center-header h3,
.run-center-header p {
  margin: 0;
}

.run-center-header p {
  color: var(--muted);
  font-size: 12px;
}

.run-center-header > div {
  min-width: 0;
}

#agent-run-center-refresh {
  flex: 0 0 auto;
  white-space: nowrap;
}

.run-center-stats,
.product-feedback-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.run-center-stats span,
.product-feedback-summary span {
  display: inline-grid;
  gap: 2px;
  min-width: 82px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.run-center-stats strong,
.product-feedback-summary strong {
  color: var(--ink);
  font-size: 16px;
}

.run-center-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.run-center-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.run-center-toolbar select {
  min-height: 34px;
  font-size: 12px;
}

.checkbox-field {
  display: inline-flex !important;
  grid-template-columns: none;
  align-items: center;
  min-height: 34px;
}

.run-center-list {
  display: grid;
  gap: 8px;
  max-height: min(420px, calc(100vh - 360px));
  overflow: auto;
}

.run-center-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.run-center-row.running {
  border-left-color: var(--accent);
}

.run-center-row.waiting {
  border-left-color: var(--warning, #c98b16);
}

.run-center-row.action_required {
  border-left-color: var(--warning, #c98b16);
  background: color-mix(in srgb, var(--warning, #c98b16) 5%, var(--surface));
}

.run-center-row.failed {
  border-left-color: var(--bad);
}

.run-center-row.cancelled {
  border-left-color: var(--muted);
  background: color-mix(in srgb, var(--muted) 4%, var(--surface));
}

.run-center-row.succeeded {
  border-left-color: var(--good);
}

.run-center-row.active {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.run-center-main {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.run-center-main div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.run-center-main strong {
  font-size: 13px;
}

.run-attempt-count {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.run-center-main span,
.run-center-main small,
.run-center-main p {
  color: var(--muted);
  font-size: 12px;
}

.run-center-main p {
  margin: 0;
  color: #344054;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.run-center-actions {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 6px;
}

.run-center-detail {
  display: grid;
  gap: 10px;
}

.run-center-detail-card .run-block.waiting {
  border-color: color-mix(in srgb, var(--warning, #c98b16) 45%, var(--line));
  background: color-mix(in srgb, var(--warning, #c98b16) 6%, var(--surface));
}

.run-center-detail-card {
  margin-top: 0;
}

.file-row,
.audit-row,
.decision-row,
.group-row,
.user-row,
.system-status-card,
.system-failure-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.system-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.system-status-card {
  display: grid;
  gap: 4px;
}

.system-status-card strong,
.system-failure-row strong {
  color: var(--ink);
  font-size: 13px;
}

.system-status-card small,
.system-failure-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.system-failure-list {
  margin-top: 8px;
}

.system-failure-row {
  display: grid;
  gap: 4px;
}

.group-row {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

button.audit-row {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.audit-row:hover,
button.audit-row.active {
  border-color: var(--strong-line);
  background: #fff;
}

.file-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
}

.file-row strong,
.audit-row strong,
.decision-row strong {
  display: block;
  font-size: 13px;
}

.file-row small,
.audit-row small,
.audit-row span,
.decision-row small,
.user-row small {
  color: var(--muted);
  font-size: 12px;
}

.panel-form,
.admin-users-panel {
  display: grid;
  gap: 12px;
}

.panel-form {
  margin-bottom: 20px;
}

.panel-form.compact {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.decision-form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gateway-health-card,
.recovery-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.gateway-health-meta dd {
  word-break: break-word;
}

.recovery-card h3 {
  margin-bottom: 8px;
}

.recovery-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.panel-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.panel-heading h3,
.panel-form h3 {
  margin-bottom: 0;
}

.usage-analytics-panel {
  display: grid;
  gap: 12px;
}

.usage-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.usage-metric-card,
.usage-section,
.usage-alert {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.usage-metric-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
}

.usage-metric-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.usage-metric-card strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.usage-metric-card small,
.usage-section-header small,
.usage-alert small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.usage-section {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.usage-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.usage-section-header h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.usage-daily-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(78px, 1fr));
  gap: 8px;
}

.usage-day {
  display: grid;
  gap: 3px;
  align-content: end;
  min-height: 130px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.usage-bar-track {
  display: flex;
  align-items: end;
  height: 58px;
  border-left: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.usage-bar {
  display: block;
  width: 100%;
  min-height: 8px;
  background: var(--accent-2);
}

.usage-day strong,
.usage-day small {
  font-size: 11px;
}

.usage-day small {
  color: var(--muted);
}

.usage-user-list,
.usage-channel-list {
  display: grid;
  gap: 8px;
}

.usage-user-row,
.usage-channel-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.usage-user-row.inactive {
  opacity: 0.7;
}

.usage-user-main,
.usage-channel-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.usage-user-main {
  display: grid;
  gap: 10px;
}

.usage-user-main strong,
.usage-channel-row strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.usage-user-main small,
.usage-channel-row small {
  color: var(--muted);
  font-size: 12px;
}

.usage-score {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.usage-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.usage-metrics div {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
}

.usage-metrics dt,
.usage-metrics dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.usage-metrics dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.usage-metrics dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.usage-channel-chips,
.usage-channel-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.usage-channel-chip,
.usage-channel-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.usage-channel-chip.muted {
  color: var(--soft-muted);
}

.usage-alert {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-color: color-mix(in srgb, var(--bad) 40%, var(--line));
}

.usage-alert strong {
  color: var(--bad);
  font-size: 13px;
}

.session-control {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.session-control small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.session-history-list {
  display: grid;
  gap: 8px;
}

.session-row {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.session-row.current {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.session-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.session-row strong,
.session-row p {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.session-row p {
  margin: 0;
  word-break: break-word;
}

.session-row small {
  color: var(--muted);
  font-size: 11px;
}

.channel-settings-panel {
  margin-top: 16px;
}

.member-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}

.member-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.member-row input {
  grid-row: span 2;
  width: auto;
}

.member-row span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.member-row small {
  color: var(--muted);
  font-size: 12px;
}

.form-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.form-status.error {
  color: var(--bad);
}

.form-status.success {
  color: var(--good);
}

.readonly-field {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.readonly-field span,
.field-note {
  color: var(--muted);
  font-size: 12px;
}

.readonly-field strong {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.field-note {
  margin: -4px 0 0;
  line-height: 1.35;
}

.account-auth-actions {
  align-items: stretch;
}

.account-auth-actions .google-auth-button,
.account-auth-actions .secondary-action {
  flex: 1 1 190px;
}

.password-required-notice {
  padding: 10px 12px;
  border: 1px solid rgba(180, 83, 9, 0.35);
  border-radius: 6px;
  background: #fff7ed;
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.user-row {
  display: grid;
  gap: 9px;
}

.launch-readiness-list {
  display: grid;
  gap: 8px;
}

.launch-user-row {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.launch-user-row.ready {
  border-left: 4px solid var(--good);
}

.launch-user-row.attention {
  border-left: 4px solid var(--warn);
}

.launch-user-row.blocked {
  border-left: 4px solid var(--bad);
  opacity: 0.75;
}

.launch-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.launch-user-header strong {
  display: block;
  font-size: 13px;
}

.launch-user-header small {
  color: var(--muted);
  font-size: 12px;
}

.readiness-score {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.readiness-score.ready {
  color: var(--good);
}

.readiness-score.attention {
  color: #92400e;
}

.readiness-score.blocked {
  color: var(--bad);
}

.readiness-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.readiness-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}

.readiness-check span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
}

.readiness-check.ok span {
  background: color-mix(in srgb, var(--good) 14%, #fff);
  color: var(--good);
}

.readiness-check.missing span {
  background: #fff7ed;
  color: #92400e;
}

.user-row.inactive {
  opacity: 0.68;
}

.user-row-header,
.user-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-row-header strong {
  display: block;
  font-size: 13px;
}

.user-row-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.inline-control {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inline-control input {
  width: auto;
}

.inline-select-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.user-email-control {
  min-width: 0;
}

.user-identity-control {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(140px, 1fr) minmax(220px, 1.5fr) auto;
  align-items: end;
  gap: 8px;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle, var(--panel));
}

.user-identity-control .inline-select-label {
  display: grid;
  align-items: start;
  gap: 4px;
}

.user-identity-control input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
}

.user-identity-save {
  min-height: 34px;
  white-space: nowrap;
}

.inline-input-action {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inline-input-action input {
  min-width: 190px;
  flex: 1 1 220px;
}

@media (max-width: 980px) {
  .user-identity-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-email-control,
  .user-identity-save {
    grid-column: 1 / -1;
  }
}

.inline-select-label select {
  width: 150px;
  min-height: 34px;
  padding: 6px 8px;
}

.generated-password {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--strong-line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: 12px;
}

.generated-password span {
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.35;
}

.generated-password code {
  display: block;
  padding: 8px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.audit-row.succeeded {
  border-left: 4px solid var(--good);
}

.audit-row.failed {
  border-left: 4px solid var(--bad);
}

.audit-row.running {
  border-left: 4px solid var(--warn);
}

.decision-row {
  display: grid;
  gap: 9px;
  border-left: 4px solid var(--strong-line);
}

.decision-row.open {
  border-left-color: var(--warn);
}

.decision-row.approved {
  border-left-color: var(--good);
}

.decision-row.rejected {
  border-left-color: var(--bad);
}

.decision-row.needs_changes {
  border-left-color: var(--accent-2);
}

.decision-row-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.decision-row p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.decision-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.decision-meta div {
  min-width: 0;
}

.decision-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.decision-meta dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.decision-status-control {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.decision-status-control select {
  min-height: 34px;
  font-size: 12px;
}

.audit-run-detail {
  margin-top: 12px;
}

.mention-inbox-list {
  display: grid;
  gap: 8px;
}

.mention-inbox-row {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mention-inbox-row:hover {
  border-color: var(--strong-line);
}

.mention-inbox-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mention-inbox-row strong {
  font-size: 13px;
}

.mention-inbox-row small {
  color: var(--muted);
  font-size: 12px;
}

.mention-row-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.mention-inbox-row p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.help-panel {
  display: grid;
  gap: 14px;
}

.help-panel h3 {
  margin: 0;
}

.help-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.help-section h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
}

.command-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.command-list div {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.command-list dt {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.command-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.run-detail {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.run-detail-header h3,
.run-block h3 {
  margin: 0;
}

.run-detail-header small {
  color: var(--muted);
  font-size: 12px;
}

.compact-meta {
  gap: 8px;
}

.run-block {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.run-block p {
  max-height: 180px;
  overflow: auto;
  margin: 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.run-block.error {
  border-color: #fecaca;
  background: #fff7ed;
}

.run-block small {
  color: #92400e;
  font-size: 12px;
  line-height: 1.4;
}

.run-actions {
  display: flex;
  justify-content: flex-start;
}

.status-pill {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.succeeded {
  background: #dcfce7;
  color: #166534;
}

.status-pill.failed {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.running {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.pending {
  background: #e0f2fe;
  color: #075985;
}

.status-pill.open {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.approved {
  background: #dcfce7;
  color: #166534;
}

.status-pill.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.needs_changes {
  background: #dbeafe;
  color: #1d4ed8;
}

.empty-line {
  color: var(--muted);
  font-size: 13px;
  margin: 8px;
}

.dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  width: min(560px, calc(100vw - 32px));
}

.campaign-plan-dialog {
  width: min(1080px, calc(100vw - 32px));
  max-width: 1080px;
}

.campaign-archive-dialog {
  width: min(520px, calc(100vw - 32px));
}

.campaign-archive-dialog-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  color: var(--ink);
}

.campaign-archive-dialog-shell h3,
.campaign-archive-dialog-shell p {
  margin: 0;
}

.campaign-archive-dialog-shell > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.campaign-archive-dialog-shell > p strong {
  color: var(--ink);
}

.campaign-plan-shell {
  display: grid;
  gap: 18px;
  max-height: min(92vh, 940px);
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--surface);
}

.campaign-plan-shell h3,
.campaign-plan-shell h4,
.campaign-plan-shell h5,
.campaign-plan-shell p {
  margin: 0;
}

.campaign-plan-shell .dialog-header {
  align-items: flex-start;
}

.campaign-plan-shell .dialog-header > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.campaign-plan-shell .dialog-header h3 {
  color: var(--ink);
  font-size: 20px;
}

.campaign-plan-shell .dialog-header p:last-child {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.campaign-plan-state {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--warn);
  background: var(--surface-2);
}

.campaign-plan-state strong {
  color: var(--ink);
  font-size: 13px;
}

.campaign-plan-state span {
  color: var(--muted);
  font-size: 11px;
}

.campaign-plan-section {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.campaign-plan-section + .campaign-plan-section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.campaign-plan-section-heading {
  display: grid;
  gap: 3px;
}

.campaign-plan-section-heading h4,
.campaign-plan-rework h4 {
  color: var(--ink);
  font-size: 14px;
}

.campaign-plan-section-heading p,
.campaign-plan-rework p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.campaign-plan-field-grid,
.campaign-plan-deliverable-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.campaign-plan-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.campaign-plan-field > span,
.campaign-plan-deliverable header label > span {
  color: var(--soft-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.campaign-plan-field-wide {
  grid-column: 1 / -1;
}

.campaign-plan-field input,
.campaign-plan-field select,
.campaign-plan-field textarea,
.campaign-plan-deliverable header select,
.campaign-plan-rework textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
}

.campaign-plan-field textarea,
.campaign-plan-rework textarea {
  resize: vertical;
}

.campaign-plan-field.missing input,
.campaign-plan-field.missing select,
.campaign-plan-field.missing textarea {
  border-color: var(--warn);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 18%, transparent);
}

.campaign-plan-deliverables {
  display: grid;
  gap: 10px;
}

.campaign-plan-deliverable {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.campaign-plan-deliverable.excluded {
  border-style: dashed;
  background: var(--surface);
}

.campaign-plan-deliverable > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: end;
  gap: 16px;
}

.campaign-plan-deliverable > header > div {
  min-width: 0;
}

.campaign-plan-deliverable > header > div > span {
  color: var(--soft-muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.campaign-plan-deliverable h5 {
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.campaign-plan-deliverable header label {
  display: grid;
  gap: 5px;
}

.campaign-plan-rework {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.campaign-plan-warning {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line));
  border-left-width: 4px;
}

.campaign-plan-warning strong {
  color: var(--warn);
  font-size: 12px;
}

.campaign-plan-warning p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.campaign-plan-confirmation {
  align-items: flex-start;
  gap: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.campaign-plan-confirmation input {
  flex: 0 0 auto;
  width: auto;
  margin-top: 2px;
}

.campaign-plan-actions {
  position: sticky;
  bottom: -18px;
  z-index: 3;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.campaign-plan-actions button {
  min-height: 44px;
}

#campaign-plan-cancel {
  margin-right: auto;
}

.campaign-handoff-dialog {
  width: min(900px, calc(100vw - 32px));
}

.artifact-preview-dialog {
  width: min(1320px, calc(100vw - 32px));
}

.artifact-preview-shell {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.artifact-preview-shell h3 {
  margin: 0;
}

.artifact-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.artifact-preview-dialog iframe {
  width: 100%;
  height: min(78vh, 860px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.campaign-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
  padding: 0;
  list-style: none;
}

.campaign-flow-steps li {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.campaign-flow-steps li[data-state="active"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  color: var(--ink);
}

.campaign-flow-steps li[data-state="done"] {
  border-color: color-mix(in srgb, var(--good) 40%, var(--line));
  background: color-mix(in srgb, var(--good) 8%, #fff);
}

.campaign-flow-steps strong {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  color: var(--ink);
}

.campaign-flow-steps span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.25;
}

.campaign-extraction-review {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 12px;
}

.campaign-extraction-review[hidden] {
  display: none;
}

.campaign-extraction-confirm {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #f7fee7;
  padding: 12px;
}

.campaign-extraction-confirm[hidden] {
  display: none;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 700;
}

.checkbox-line input {
  width: auto;
  margin-top: 3px;
}

.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.review-header h4,
.review-columns h5 {
  margin: 0;
}

.review-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.review-badge.ready {
  border-color: var(--good);
  color: var(--good);
}

.review-badge.needs-review {
  border-color: var(--warn);
  color: var(--warn);
}

.review-badge.blocked {
  border-color: var(--bad);
  color: var(--bad);
}

.review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
}

.review-field-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.review-field {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  min-width: 0;
}

.review-field strong,
.review-field span {
  display: block;
}

.review-field strong {
  font-size: 12px;
}

.review-field span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.review-field[data-status="manual_override"] {
  border-color: var(--good);
}

.review-field[data-status="source_signal"] {
  border-color: var(--accent);
}

.review-field[data-status="needs_aro_inference"] {
  border-style: dashed;
}

.review-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.review-columns ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
}

.product-updates-dialog {
  width: min(980px, calc(100vw - 32px));
}

.pinned-messages-dialog {
  width: min(760px, calc(100vw - 32px));
}

.user-access-dialog {
  width: min(780px, calc(100vw - 32px));
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.dialog form {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.product-updates-list {
  max-height: min(560px, calc(100vh - 300px));
  overflow: auto;
  display: grid;
  gap: 14px;
  padding-right: 4px;
}

.product-updates-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.product-updates-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.product-updates-tabs button.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.product-update-item {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.product-update-item.unread {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.product-update-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.product-update-item h4 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.product-update-item time,
.product-update-item small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.product-update-version {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-update-body {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.product-update-body p,
.product-update-body ul {
  margin: 0;
}

.product-update-body p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.product-update-body ul {
  padding-left: 20px;
}

.product-update-body li + li {
  margin-top: 5px;
}

.product-updates-panel[hidden] {
  display: none;
}

.product-feedback-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-heading-row h4 {
  margin: 0;
}

.product-feedback-list {
  display: grid;
  gap: 10px;
  max-height: min(420px, calc(100vh - 360px));
  overflow: auto;
}

.product-feedback-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.product-feedback-filters button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.product-feedback-filters button.active {
  border-color: #000;
  background: #000;
  color: #fff;
}

.product-feedback-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.product-feedback-item header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-feedback-item h4 {
  margin: 0;
  font-size: 14px;
}

.product-feedback-item p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.product-feedback-attachments .attachment-list {
  margin-top: 0;
}

.product-feedback-attachments .attachment-card {
  max-width: 100%;
}

.product-feedback-attachments .attachment-card.image img {
  max-height: 180px;
}

.feedback-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.feedback-status.status-in_progress,
.feedback-status.status-planned {
  border-color: var(--accent);
  color: var(--accent);
}

.feedback-status.status-done {
  border-color: var(--good);
  color: var(--good);
}

.feedback-status.status-declined {
  border-color: var(--bad);
  color: var(--bad);
}

.feedback-response {
  display: grid;
  gap: 4px;
  padding: 8px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.feedback-admin-controls {
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.feedback-action-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.product-update-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-update-ack-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.product-update-ack-button.acknowledged {
  border-color: color-mix(in srgb, var(--good) 45%, var(--line));
  background: color-mix(in srgb, var(--good) 10%, var(--surface));
  color: #14532d;
}

.product-update-author-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, #fff);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.product-update-acks {
  display: grid;
  gap: 5px;
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  color: var(--muted);
  font-size: 12px;
}

.product-update-acks > span {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}

.product-update-acks > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.product-update-acks strong {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 11px;
}

.product-update-acks.empty {
  color: var(--muted);
  font-style: italic;
}

.user-access-channel-list {
  max-height: min(520px, calc(100vh - 300px));
  overflow: auto;
  display: grid;
  gap: 10px;
}

.user-access-group {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.user-access-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.user-access-channel {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 5px 0;
  color: var(--ink);
  font-size: 13px;
}

.user-access-channel input {
  margin-top: 2px;
}

.user-access-channel span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.user-access-channel small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.dialog-grid {
  display: grid;
  gap: 12px;
}

.dialog-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dialog-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.dialog-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 10px 12px;
}

.dialog-details summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.dialog-details .dialog-grid {
  margin-top: 12px;
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-actions {
  padding: 0;
  margin: 4px 0 0;
}

.campaign-handoff-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.campaign-handoff-actions button {
  min-width: 150px;
}

.campaign-handoff-actions #campaign-handoff-close {
  order: 1;
}

.campaign-handoff-actions #campaign-handoff-review-submit {
  order: 2;
  margin-left: auto;
}

.campaign-handoff-actions #campaign-handoff-submit {
  order: 3;
}

.campaign-handoff-actions[data-stage="plan-requested"] #campaign-handoff-review-submit {
  order: 1;
  margin-left: 0;
}

.campaign-handoff-actions[data-stage="plan-requested"] #campaign-handoff-submit {
  order: 2;
}

.campaign-handoff-actions[data-stage="plan-requested"] #campaign-handoff-close {
  order: 3;
  margin-left: auto;
}

html[data-message-density="compact"] .message-list {
  padding: 18px 20px;
  gap: 10px;
}

html[data-message-density="compact"] .message {
  width: min(980px, 100%);
  padding: 10px 12px;
  gap: 9px;
}

html[data-message-density="compact"] .message.user {
  width: min(840px, 72%);
}

html[data-message-density="compact"] .message-content {
  line-height: 1.42;
  font-size: 13px;
}

html[data-message-density="compact"] .artifact-inline-preview {
  height: clamp(320px, 44vh, 520px);
}

html[data-message-density="focus"] .message-list {
  padding: 28px min(42px, 3.5vw);
  gap: 22px;
}

html[data-message-density="focus"] .message,
html[data-message-density="focus"] .message.user,
html[data-message-density="focus"] .message.system,
html[data-message-density="focus"] .message.failed {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
}

html[data-message-density="focus"] .artifact-inline-preview {
  height: clamp(560px, 70vh, 820px);
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .chat-workspace,
html[data-theme="dark"] .notification-drawer,
html[data-theme="dark"] .app-menu,
html[data-theme="dark"] .help-flyout,
html[data-theme="dark"] .dialog,
html[data-theme="dark"] .dialog form,
html[data-theme="dark"] .panel-topbar,
html[data-theme="dark"] .detail-panel,
html[data-theme="dark"] .channel-context-panel,
html[data-theme="dark"] .channel-context-dock,
html[data-theme="dark"] .operational-surface-shell,
html[data-theme="dark"] .runtime-popover,
html[data-theme="dark"] .artifact-preview-shell,
html[data-theme="dark"] .campaign-plan-shell,
html[data-theme="dark"] .operating-context-strip,
html[data-theme="dark"] .campaign-workspace-strip,
html[data-theme="dark"] .campaign-asset-board,
html[data-theme="dark"] .chat-run-status,
html[data-theme="dark"] .notification-settings,
html[data-theme="dark"] .product-update-item,
html[data-theme="dark"] .product-feedback-item,
html[data-theme="dark"] .pending-attachment,
html[data-theme="dark"] .attachment-card,
html[data-theme="dark"] .link-preview-card,
html[data-theme="dark"] .team-notification-banner,
html[data-theme="dark"] .deployment-banner,
html[data-theme="dark"] .global-search-result,
html[data-theme="dark"] .usage-card,
html[data-theme="dark"] .usage-day,
html[data-theme="dark"] .run-center-item,
html[data-theme="dark"] .audit-row,
html[data-theme="dark"] .decision-item,
html[data-theme="dark"] .campaign-flow-steps li {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.context-usage-overview {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.context-usage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.context-usage-head span,
.context-usage-overview small,
.context-usage-overview p {
  color: var(--muted);
}

.context-usage-overview p {
  margin: 0;
}

.context-usage-overview progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}

.context-usage-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.runtime-admin-controls {
  display: grid;
  gap: 10px;
  padding-top: 14px;
}

.runtime-admin-controls[hidden] {
  display: none;
}

html[data-theme="dark"] .deployment-login-label,
html[data-theme="dark"] .deployment-banner strong {
  color: #fbbf24;
}

html[data-theme="dark"] .deployment-login-label {
  background: #241a0d;
  border-color: #854d0e;
}

html[data-theme="dark"] .message {
  --message-bg: #111a24;
  background: var(--message-bg);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .message.assistant {
  --message-bg: #101821;
  background: var(--message-bg);
}

html[data-theme="dark"] .message.user {
  --message-bg: #0f2832;
  background: var(--message-bg);
  border-color: color-mix(in srgb, var(--accent-2) 46%, var(--line));
}

html[data-theme="dark"] .message.system,
html[data-theme="dark"] .message.failed {
  --message-bg: #251b12;
  background: var(--message-bg);
  border-color: color-mix(in srgb, var(--warn) 46%, var(--line));
}

html[data-theme="dark"] .message.user:not(.failed):not(.special-surface),
html[data-theme="dark"] .message.assistant:not(.failed):not(.special-surface),
html[data-theme="dark"] .message.agent:not(.failed):not(.special-surface) {
  --message-bg: transparent;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .message.user:not(.failed):not(.special-surface):hover,
html[data-theme="dark"] .message.assistant:not(.failed):not(.special-surface):hover,
html[data-theme="dark"] .message.agent:not(.failed):not(.special-surface):hover,
html[data-theme="dark"] .message.user:not(.failed):not(.special-surface):focus,
html[data-theme="dark"] .message.assistant:not(.failed):not(.special-surface):focus,
html[data-theme="dark"] .message.agent:not(.failed):not(.special-surface):focus {
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

html[data-theme="dark"] .message-meta,
html[data-theme="dark"] .message-content,
html[data-theme="dark"] .message-content p,
html[data-theme="dark"] .message-content li {
  color: var(--muted);
}

html[data-theme="dark"] .message-meta strong,
html[data-theme="dark"] .message-content h4,
html[data-theme="dark"] .message-content strong,
html[data-theme="dark"] .message-facts dd,
html[data-theme="dark"] .message-run-reference strong,
html[data-theme="dark"] .message-continuation strong,
html[data-theme="dark"] .link-preview,
html[data-theme="dark"] .link-preview strong,
html[data-theme="dark"] .attachment-card strong {
  color: var(--ink);
}

html[data-theme="dark"] .message-link,
html[data-theme="dark"] .message-link:hover,
html[data-theme="dark"] .message-link:focus {
  color: color-mix(in srgb, var(--accent) 78%, #dff7a6);
}

html[data-theme="dark"] .message-content code {
  background: #08111b;
  border-color: color-mix(in srgb, var(--line) 88%, #5b6f86);
  color: #ecf4fb;
}

html[data-theme="dark"] .message-content code.slash-command {
  background: color-mix(in srgb, var(--accent) 16%, #08111b);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  color: var(--ink);
}

html[data-theme="dark"] .message-code-block {
  background: #050b12;
  border-color: #263648;
  color: #e7edf5;
}

html[data-theme="dark"] .message-content blockquote {
  background: color-mix(in srgb, var(--accent-2) 9%, var(--surface-2));
  border-left-color: color-mix(in srgb, var(--accent-2) 70%, var(--line));
  color: var(--muted);
}

html[data-theme="dark"] .message-table-wrap,
html[data-theme="dark"] .message-facts,
html[data-theme="dark"] .message-run-reference,
html[data-theme="dark"] .message-continuation {
  background: #0c1420;
  border-color: var(--line);
  color: var(--muted);
}

html[data-theme="dark"] .message-content th,
html[data-theme="dark"] .message-content td {
  border-bottom-color: var(--line);
}

html[data-theme="dark"] .message-content th {
  background: #152233;
  color: var(--muted);
}

html[data-theme="dark"] .message.highlight .message-body {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

html[data-theme="dark"] .message-render-warning {
  background: color-mix(in srgb, var(--warn) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--warn) 44%, var(--line));
  color: var(--ink);
}

html[data-theme="dark"] .inline-drive-open-button,
html[data-theme="dark"] .inline-drive-preview-button {
  background: color-mix(in srgb, var(--accent) 15%, var(--surface));
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
}

html[data-theme="dark"] .inline-drive-open-button:hover,
html[data-theme="dark"] .inline-drive-open-button:focus,
html[data-theme="dark"] .inline-drive-preview-button:hover,
html[data-theme="dark"] .inline-drive-preview-button:focus {
  background: color-mix(in srgb, var(--accent) 24%, var(--surface));
}

html[data-theme="dark"] .inline-drive-status {
  background: var(--surface-2);
  color: var(--muted);
}

html[data-theme="dark"] .link-preview-card,
html[data-theme="dark"] .link-preview-card.drive-folder,
html[data-theme="dark"] .link-preview-card.drive-file,
html[data-theme="dark"] .link-preview-card.drive-link,
html[data-theme="dark"] .link-preview-card.google-doc,
html[data-theme="dark"] .link-preview-card.google-sheet,
html[data-theme="dark"] .link-preview-card.google-slides,
html[data-theme="dark"] .link-preview-card.google-form {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

html[data-theme="dark"] .link-preview span {
  color: color-mix(in srgb, var(--accent) 72%, #eaffb9);
}

html[data-theme="dark"] .link-preview small,
html[data-theme="dark"] .link-preview-meta,
html[data-theme="dark"] .link-preview-children a span,
html[data-theme="dark"] .link-preview-children small,
html[data-theme="dark"] .attachment-card small {
  color: var(--muted);
}

html[data-theme="dark"] .link-category-chip {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}

html[data-theme="dark"] .link-category-chip.active,
html[data-theme="dark"] .link-category-chip:hover {
  background: color-mix(in srgb, var(--accent) 15%, var(--surface));
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

html[data-theme="dark"] .attachment-card.image,
html[data-theme="dark"] .attachment-card.file,
html[data-theme="dark"] .attachment-card.html-artifact {
  background: var(--surface);
  border-color: var(--line);
}

html[data-theme="dark"] .attachment-card.image img,
html[data-theme="dark"] .artifact-inline-preview {
  background: #0c1420;
}

html[data-theme="dark"] .artifact-card-header {
  border-bottom-color: var(--line);
}

html[data-theme="dark"] .html-artifact-status {
  background: var(--surface-2);
  border-color: var(--line);
}

html[data-theme="dark"] .reaction-add-button:hover,
html[data-theme="dark"] .reaction-toolbar:focus-within .reaction-add-button,
html[data-theme="dark"] .message-reaction-pill,
html[data-theme="dark"] .reaction-picker-panel {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}

html[data-theme="dark"] .reaction-quickbar {
  background: color-mix(in srgb, var(--surface-2) 88%, #000);
  border-color: color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .reaction-quickbar-button,
html[data-theme="dark"] .reaction-action-button,
html[data-theme="dark"] .reaction-add-button {
  background: transparent;
  color: var(--muted);
}

html[data-theme="dark"] .reaction-custom-input {
  border-bottom-color: var(--line);
}

html[data-theme="dark"] .reaction-custom-input input,
html[data-theme="dark"] .reaction-custom-input button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

html[data-theme="dark"] .reaction-quickbar-button:hover,
html[data-theme="dark"] .reaction-action-button:hover,
html[data-theme="dark"] .reaction-action-button.active,
html[data-theme="dark"] .reaction-add-button:hover,
html[data-theme="dark"] .message-reaction-pill:hover,
html[data-theme="dark"] .message-reaction-pill.active,
html[data-theme="dark"] .reaction-picker-button:hover,
html[data-theme="dark"] .reaction-picker-button:focus {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

html[data-theme="dark"] .message-avatar {
  background: var(--surface-2);
  color: var(--ink);
}

html[data-theme="dark"] .message-avatar.user {
  background: color-mix(in srgb, var(--accent-2) 24%, var(--surface));
  color: var(--ink);
}

html[data-theme="dark"] .message-avatar.system {
  background: color-mix(in srgb, var(--warn) 24%, var(--surface));
  color: var(--ink);
}

html[data-theme="dark"] .notification-filters button,
html[data-theme="dark"] .notification-scopes button,
html[data-theme="dark"] .secondary-action,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .product-feedback-filters button,
html[data-theme="dark"] .message-decision-button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

html[data-theme="dark"] .topbar-icon-action {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

html[data-theme="dark"] .topbar-icon-action:hover,
html[data-theme="dark"] .topbar-icon-action:focus-visible,
html[data-theme="dark"] .topbar-icon-action.active,
html[data-theme="dark"] .topbar-icon-action[aria-expanded="true"] {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

html[data-theme="dark"] .notification-filters button.active,
html[data-theme="dark"] .notification-scopes button.active,
html[data-theme="dark"] .product-feedback-filters button.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

html[data-theme="dark"] .product-update-item p,
html[data-theme="dark"] .product-feedback-item p,
html[data-theme="dark"] .dialog-note,
html[data-theme="dark"] .run-center-item p,
html[data-theme="dark"] .usage-card small,
html[data-theme="dark"] .usage-day small {
  color: var(--muted);
}

html[data-theme="dark"] .product-update-ack-button.acknowledged {
  color: var(--good);
}

html[data-theme="dark"] .product-update-acks strong {
  background: var(--surface-2);
  color: var(--ink);
}

html[data-theme="dark"] .artifact-preview-dialog iframe {
  background: #fff;
}

html:not([data-theme="dark"]) .sidebar .eyebrow,
html:not([data-theme="dark"]) .sidebar .empty-line,
html:not([data-theme="dark"]) .sidebar .channel-label small,
html:not([data-theme="dark"]) .sidebar .campaign-workstream-phase,
html:not([data-theme="dark"]) .sidebar .campaign-workstream-row.archived .campaign-workstream-phase {
  color: var(--soft-muted);
}

html:not([data-theme="dark"]) .sidebar .brand-title,
html:not([data-theme="dark"]) .sidebar .workspace-mobile-heading {
  color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .sidebar-brand-shell,
html:not([data-theme="dark"]) .sidebar .direct-section,
html:not([data-theme="dark"]) .sidebar .campaign-workstream-section,
html:not([data-theme="dark"]) .sidebar .status-block {
  border-color: var(--line-2);
}

html:not([data-theme="dark"]) .sidebar .sidebar-brand:hover,
html:not([data-theme="dark"]) .sidebar .sidebar-brand[aria-expanded="true"],
html:not([data-theme="dark"]) .sidebar .channel-group-heading:hover {
  background: var(--surface-2);
  color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .dimension-switcher-menu {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .campaign-archive-toggle {
  border-color: var(--line);
  color: var(--muted);
}

html:not([data-theme="dark"]) .sidebar .campaign-archive-toggle:hover {
  color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .channel-filter,
html:not([data-theme="dark"]) .sidebar .side-heading,
html:not([data-theme="dark"]) .sidebar .channel-group-heading,
html:not([data-theme="dark"]) .sidebar .channel-group-heading::before,
html:not([data-theme="dark"]) .sidebar .group-drag-handle,
html:not([data-theme="dark"]) .sidebar .channel-icon {
  color: var(--muted);
}

html:not([data-theme="dark"]) .sidebar .channel-filter input {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .channel-filter input::placeholder {
  color: var(--soft-muted);
}

html:not([data-theme="dark"]) .sidebar .channel-button,
html:not([data-theme="dark"]) .sidebar .campaign-workstream-button,
html:not([data-theme="dark"]) .sidebar .campaign-workstream-row.archived .campaign-workstream-button {
  color: var(--muted);
}

html:not([data-theme="dark"]) .sidebar .channel-button:hover,
html:not([data-theme="dark"]) .sidebar .channel-button.active,
html:not([data-theme="dark"]) .sidebar .campaign-workstream-button:hover,
html:not([data-theme="dark"]) .sidebar .campaign-workstream-button.active {
  border-color: var(--line);
  border-left-color: var(--accent);
  background: var(--surface-2);
  color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .channel-button.unread,
html:not([data-theme="dark"]) .sidebar .campaign-workstream-button.unread {
  color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .channel-button.mentioned,
html:not([data-theme="dark"]) .sidebar .channel-button.active.mentioned {
  background: color-mix(in srgb, var(--accent) 16%, #fff);
}

html:not([data-theme="dark"]) .sidebar .channel-button.agent-replied,
html:not([data-theme="dark"]) .sidebar .channel-button.active.agent-replied {
  background: color-mix(in srgb, var(--accent-2) 14%, #fff);
}

html:not([data-theme="dark"]) .sidebar .channel-button.agent-failed,
html:not([data-theme="dark"]) .sidebar .channel-button.active.agent-failed {
  background: color-mix(in srgb, #ef4444 12%, #fff);
}

html:not([data-theme="dark"]) .sidebar .campaign-workstream-row-action {
  color: var(--muted);
}

html:not([data-theme="dark"]) .sidebar .campaign-workstream-row-action:hover,
html:not([data-theme="dark"]) .sidebar .campaign-workstream-row-action[aria-expanded="true"] {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .campaign-workstream-action-menu {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

html:not([data-theme="dark"]) .sidebar .campaign-workstream-action-menu button {
  color: var(--ink);
}

html:not([data-theme="dark"]) .sidebar .campaign-workstream-action-menu button:hover:not(:disabled) {
  background: var(--surface-2);
}

html:not([data-theme="dark"]) .sidebar .campaign-workstream-action-menu button:disabled {
  color: var(--soft-muted);
}

html:not([data-theme="dark"]) .sidebar .unread-badge {
  border-color: var(--line);
  color: var(--muted);
}

html:not([data-theme="dark"]) .sidebar .status-line {
  color: var(--muted);
}

html:not([data-theme="dark"]) .sidebar .secondary-action,
html:not([data-theme="dark"]) .sidebar .icon-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
}

html:not([data-theme="dark"]) .sidebar .secondary-action:hover,
html:not([data-theme="dark"]) .sidebar .icon-button:hover {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

@media (min-width: 768px) {
  .topbar {
    height: 56px;
  }

  .notification-historical-failures-strip {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 264px minmax(0, 1fr);
  }

  .detail-panel {
    left: 264px;
  }

  .usage-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .usage-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .campaign-asset-gates {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .sidebar {
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .chat-workspace {
    height: 70vh;
    min-height: 70vh;
  }

  .topbar,
  .composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-workspace-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .campaign-workspace-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .notification-historical-failures-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .notification-historical-failures-strip button,
  .notification-center-list [data-notification-archive-id] {
    width: 100%;
    min-height: 44px;
  }

  .campaign-workspace-phase-status,
  .campaign-workspace-phase-status strong {
    min-width: 0;
    flex: 1 1 150px;
  }

  .campaign-asset-detail-header {
    align-items: flex-start;
  }

  .campaign-asset-gates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .campaign-asset-columns {
    display: none;
  }

  .campaign-asset-summary-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .campaign-asset-next-gate {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    min-width: 0;
    padding: 5px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .campaign-asset-next-gate > span,
  .campaign-asset-next-gate > strong {
    grid-column: 1;
  }

  .campaign-asset-next-gate > button {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }

  .campaign-plan-dialog {
    width: calc(100vw - 12px);
    max-width: none;
  }

  .campaign-plan-shell {
    gap: 14px;
    max-height: calc(100dvh - 12px);
    padding: 14px;
  }

  .campaign-plan-state {
    align-items: flex-start;
    flex-direction: column;
  }

  .campaign-plan-field-grid,
  .campaign-plan-deliverable-grid,
  .campaign-plan-rework {
    grid-template-columns: minmax(0, 1fr);
  }

  .campaign-plan-field-wide {
    grid-column: 1;
  }

  .campaign-plan-deliverable {
    padding: 12px;
  }

  .campaign-plan-deliverable > header {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .campaign-plan-field input,
  .campaign-plan-field select,
  .campaign-plan-field textarea,
  .campaign-plan-deliverable header select,
  .campaign-plan-rework textarea,
  .campaign-plan-actions button {
    min-height: 44px;
  }

  .campaign-plan-actions {
    position: static;
    bottom: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 14px;
  }

  .campaign-plan-actions button,
  #campaign-plan-cancel {
    width: 100%;
    margin-right: 0;
  }

  #campaign-plan-approve {
    grid-column: 1 / -1;
  }

  #campaign-asset-open {
    grid-column: 2;
    grid-row: 1;
  }

  .campaign-asset-detail-header {
    flex-wrap: wrap;
  }

  .campaign-asset-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 7px 12px;
    min-height: 0;
    padding: 9px 7px;
  }

  .campaign-asset-cell::before {
    display: block;
    margin-bottom: 2px;
    color: var(--soft-muted);
    content: attr(data-label);
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .campaign-asset-blockers {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .composer-buttons {
    width: 100%;
    flex-wrap: wrap;
  }

  .runtime-composer {
    flex: 1 1 100%;
  }

  .runtime-action {
    width: 100%;
    max-width: none;
  }

  .runtime-popover {
    left: 0;
    right: auto;
    width: 100%;
  }

  .topbar-actions {
    align-items: stretch;
    width: 100%;
  }

  .app-menu {
    left: 0;
    right: auto;
    width: 100%;
  }

  .detail-panel {
    left: 0;
    width: 100vw;
    top: 0;
    height: 100vh;
  }

  .detail-panel .tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .message {
    width: 100%;
    min-width: 0;
  }

  .message.user,
  .message.system,
  .message.failed {
    width: 100%;
  }

  .dialog-grid.two-col {
    grid-template-columns: 1fr;
  }

  .review-field-list,
  .review-columns {
    grid-template-columns: 1fr;
  }

  .feedback-admin-controls {
    grid-template-columns: 1fr;
  }

  .usage-summary-grid,
  .usage-daily-grid,
  .usage-metrics {
    grid-template-columns: 1fr;
  }

  .usage-day {
    min-height: 0;
  }
}

@media (min-width: 1081px) {
  .sidebar .channel-button {
    gap: 8px;
    min-height: 34px;
    padding: 7px 9px;
    border: 0;
  }

  .sidebar .channel-label {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 6px;
  }

  .sidebar .channel-label small {
    max-width: 92px;
  }

  .sidebar .channel-button.active {
    font-weight: 600;
  }

  html:not([data-theme="dark"]) .sidebar .channel-button.active,
  html:not([data-theme="dark"]) .sidebar .channel-button.active:is(.mentioned, .agent-replied, .agent-failed, .running) {
    background: var(--surface-2);
    color: var(--ink);
    box-shadow: inset 2px 0 0 var(--accent);
  }

  html[data-theme="dark"] .sidebar {
    background: #101720;
    color: #f2f6fa;
    border-right-color: #25313f;
  }

  html[data-theme="dark"] .sidebar .channel-button.active,
  html[data-theme="dark"] .sidebar .channel-button.active:is(.mentioned, .agent-replied, .agent-failed, .running) {
    background: #0c141f;
    color: #f2f6fa;
    box-shadow: inset 2px 0 0 var(--accent);
  }
}

/* Channel Threads · Claude UX Rebaseline */
.thread-breadcrumb {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.thread-subnav {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  margin: 2px 8px 5px 12px;
  padding: 3px 0 4px 6px;
  border-left: 2px solid var(--line-2);
  background: transparent;
}

.thread-subnav[hidden],
.thread-header[hidden],
.thread-readonly-banner[hidden],
.thread-overview[hidden] {
  display: none;
}

.thread-subnav-list {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.thread-closed-group[hidden],
.thread-subnav-list[hidden] {
  display: none;
}

.thread-closed-group {
  display: grid;
  gap: 1px;
}

.thread-closed-toggle {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  border: 0;
  background: transparent;
  color: var(--soft-muted);
  font: 800 9px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.thread-closed-toggle::before { content: "›"; margin-right: 5px; }
.thread-closed-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }

.thread-navigation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 7px 9px 4px;
  color: var(--soft-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.thread-target {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.thread-target:hover,
.thread-target.active {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.thread-target.active {
  box-shadow: inset 2px 0 0 var(--accent);
  font-weight: 700;
}

.thread-target b {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 99px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  text-align: center;
}

.thread-state-icon,
.thread-state-dot {
  display: grid;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--soft-muted);
  font-size: 11px;
}

.thread-state-dot:empty {
  width: 7px;
  height: 7px;
  margin: 0 3px;
  border-radius: 50%;
  background: var(--good);
}

.thread-state-dot[data-state="running"]:empty { background: var(--accent-2); }
.thread-state-dot[data-state="failed"]:empty { background: var(--bad); }
.thread-state-dot[data-state="overflow"]:empty { background: var(--warn); }

.thread-row-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.thread-row-title,
.thread-row-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-row-prefix {
  color: var(--soft-muted);
  font-weight: 700;
}

.thread-row-status {
  color: var(--soft-muted);
  font-size: 9px;
  font-weight: 700;
}

.thread-create-button {
  width: calc(100% - 18px);
  min-height: 34px;
  justify-content: center;
  margin: 5px 9px 2px;
  border: 1px dashed var(--line);
  font-weight: 700;
}

.thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.thread-header-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.thread-header-breadcrumb {
  overflow: hidden;
  color: var(--soft-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-header-title-row,
.thread-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.thread-header-title-row {
  min-width: 0;
}

#thread-header-title {
  display: flex;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-header-prefix {
  flex: 0 0 auto;
  margin-right: 4px;
  color: var(--soft-muted);
}

#thread-header-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#thread-follow-button {
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12px;
}

.thread-actions-shell {
  position: relative;
}

.thread-actions-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  width: 210px;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 40px -18px rgb(0 0 0 / 35%);
}

.thread-actions-menu[hidden] {
  display: none;
}

.thread-actions-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
}

.thread-actions-menu button:hover {
  background: var(--surface-2);
}

.thread-actions-separator {
  height: 1px;
  margin: 4px;
  background: var(--line-2);
}

.thread-state-pill {
  padding: 3px 7px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.thread-state-pill[data-state="closed"] { color: var(--muted); background: var(--surface-2); }
.thread-state-pill[data-state="archived"] { color: var(--muted); background: var(--surface-2); }
.thread-state-pill[data-state="general"] { color: var(--muted); background: var(--surface-2); }
.thread-state-pill[data-state="running"] { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.thread-state-pill[data-state="failed"] { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.thread-state-pill[data-state="overflow"] { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }

.thread-readonly-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, #f59e0b 10%, var(--surface));
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.thread-writeback-status {
  margin-left: auto;
  color: var(--muted);
}

.thread-writeback-status.attention {
  color: var(--bad);
}

.thread-context-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 10px 34px 0;
  padding: 8px 13px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.thread-overview {
  min-height: 0;
  flex: 1;
  padding: 24px;
  overflow: auto;
}

.thread-overview-header,
.thread-overview-toolbar,
.thread-overview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.thread-overview-header h3,
.thread-overview-header p { margin: 2px 0; }

.thread-overview-toolbar {
  margin: 20px 0 12px;
  align-items: end;
}

.thread-overview-toolbar label {
  display: grid;
  gap: 5px;
  min-width: min(340px, 100%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.thread-overview-filters { display: flex; gap: 5px; flex-wrap: wrap; }
.thread-overview-filters button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
}
.thread-overview-filters button.active { background: var(--ink); color: var(--surface); }

.thread-overview-list { display: grid; gap: 8px; }
.thread-overview-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.thread-overview-main {
  display: grid;
  flex: 1;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.thread-overview-main span { color: var(--muted); font-size: 12px; }
.thread-attention { display: flex; gap: 5px; flex-wrap: wrap; }
.thread-attention span { padding: 3px 6px; border-radius: 6px; background: var(--surface-2); font-size: 11px; }
.thread-attention .failed { color: var(--danger); }
.composer-target { color: var(--ink); font-weight: 750; }
.thread-dialog { width: min(600px, calc(100vw - 28px)); }
.thread-close-run-actions { display: flex; gap: 8px; }

.thread-context-scope-box {
  display: grid;
  gap: 10px;
}

.thread-context-scope-box[hidden] { display: none; }

.segmented-control {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.segmented-control button {
  min-height: 32px;
  padding: 4px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.segmented-control button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(16 24 40 / 12%);
}
