html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

main,
.peer-preview,
.onboarding,
.result,
.conversation,
.exchange,
.agent-card {
  max-width: 100%;
  min-width: 0;
}

p,
h1,
h2,
h3,
.sd,
.agent-card {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.top i {
  margin-left: 0;
  width: auto;
  height: auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #164f37;
  background: #dfeee5;
  box-shadow: none;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.top {
  height: 76px;
  gap: 10px;
}

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

.brand-lockup > b {
  flex: 0 0 64px;
  width: 64px;
  height: 42px;
  border-radius: 22px 12px 22px 12px;
  font-size: 15px;
  letter-spacing: -.04em;
}

.brand-lockup > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.05;
}

.brand-lockup strong {
  overflow: hidden;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-lockup small {
  margin-top: 5px;
  overflow: hidden;
  color: #657069;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-dashboard,
.top-agent,
.top-settings {
  margin-left: auto;
  border: 0;
  padding: 8px 10px;
  color: #284ed8;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.top-agent,
.top-settings {
  margin-left: 0;
  color: #182458;
}

.top-dashboard:focus-visible,
.top-agent:focus-visible,
.top-settings:focus-visible,
.quiet-action:focus-visible,
.connection-row:focus-visible,
.detail-close:focus-visible {
  outline: 3px solid #f2aa6b;
  outline-offset: 3px;
}

.hero.dashboard-mode {
  display: none;
}

/* A short first-day introduction, not another onboarding step. */
.buddy-intro {
  margin: 0 0 28px;
  padding: 21px 23px;
  border-left: 5px solid var(--blue);
  background: #fff;
}
.buddy-intro-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}
.buddy-intro-avatar {
  display: grid;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 13px 7px 13px 7px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}
.buddy-intro-head b,
.buddy-intro-head small { display: block; }
.buddy-intro-head b { font-size: 17px; }
.buddy-intro-head small { margin-top: 2px; color: #52605a; font-size: 12px; }
.buddy-intro p { margin: 11px 0 0; line-height: 1.65; }
.buddy-intro p:last-child { color: #42534b; font-size: 14px; }
@media(max-width:620px) { .buddy-intro { padding: 18px 17px; } }

/* The email link should lead to one visible action, not back into recovery. */
.password-setup {
  max-width: 560px;
  margin: 32px auto;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--line);
  border-top: 6px solid var(--blue);
  background: #fff;
}
.password-setup h2 { margin: 18px 0 10px; font-size: clamp(28px, 7vw, 40px); line-height: 1.14; }
.password-setup p { color: #52605a; line-height: 1.6; }
.password-setup form { margin: 22px 0 14px; }
.password-setup form > label:first-child { font-weight: 800; }
.password-setup .primary { margin-top: 19px; }
.password-setup > small { display: block; color: #52605a; line-height: 1.5; }
.signup-password { margin-top: 12px; }
.show-password { display: flex!important; align-items: center; gap: 9px; margin: 10px 0 0!important; color: #42534b; font-size: 13px; font-weight: 650!important; cursor: pointer; }
.show-password input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.password-callout { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0; padding: 18px 20px; border-left: 5px solid var(--blue); background: #eef2ff; }
.password-callout b, .password-callout span { display: block; }
.password-callout span { margin-top: 5px; color: #42516a; font-size: 13px; line-height: 1.5; }
.password-callout button { flex: 0 0 auto; border: 0; padding: 12px 17px; border-radius: 8px; background: var(--blue); color: #fff; font: inherit; font-weight: 800; }
.settings-password-link { border: 1px solid var(--blue); margin-top: 13px; padding: 9px 13px; border-radius: 7px; background: #fff; color: var(--blue); font: inherit; font-weight: 800; }
.settings-password-link:focus-visible, .password-callout button:focus-visible, .password-setup button:focus-visible { outline: 3px solid #f2aa6b; outline-offset: 3px; }
@media(max-width:620px) { .password-callout { align-items: stretch; flex-direction: column; } .password-callout button { width: 100%; } }

@media (max-width: 520px) {
  .brand-lockup {
    gap: 8px;
  }

  .brand-lockup > b {
    flex-basis: 54px;
    width: 54px;
    height: 38px;
    font-size: 13px;
  }

  .brand-lockup strong {
    font-size: 17px;
  }

  .brand-lockup small {
    font-size: 9px;
  }

  .exchange {
    grid-template-columns: minmax(0, 1fr);
  }

  .mfp {
    min-width: 0;
  }
}

@media (max-width: 390px) {
  .top:has(.top-dashboard:not(.hidden)) .brand-lockup small {
    display: none;
  }
}

.departure-card {
  margin: 0 0 34px;
  padding: 24px;
  color: #fff;
  background: #182458;
  border-radius: 4px 28px 4px 28px;
  box-shadow: 8px 8px 0 #9bd8cd;
}

.departure-signal {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #e3f17b;
  font-size: 12px;
  font-weight: 850;
}

.departure-signal i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e3f17b;
  box-shadow: 0 0 0 6px rgba(227, 241, 123, .14);
}

.departure-card h2 {
  margin: 22px 0 14px;
  font-size: clamp(30px, 9vw, 48px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.departure-card > p {
  margin: 0;
  color: #cbd3e9;
  line-height: 1.7;
}

.departure-route {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid #485382;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.departure-route b {
  color: #e3f17b;
}

.nickname-setup {
  margin: -10px 0 28px;
  padding: 16px 18px;
  border: 1px solid #aeb5ad;
  background: #fff;
}

.nickname-setup summary {
  cursor: pointer;
  color: #284ed8;
  font-weight: 850;
}

.nickname-setup summary small {
  color: #657069;
  font-weight: 600;
}

.nickname-setup p {
  margin: 13px 0;
  color: #657069;
  font-size: 13px;
  line-height: 1.55;
}

.nickname-setup > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.nickname-setup .secondary {
  width: auto;
  white-space: nowrap;
}

.owner-more {
  margin: 28px 0 22px;
  padding: 20px;
  border: 1px solid #111713;
  background: #fff;
}

.owner-more h3,
.audit-invite h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.owner-more > p,
.audit-invite > p {
  margin: 0 0 18px;
  color: #657069;
  line-height: 1.65;
}

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

.owner-grid .wide {
  grid-column: 1 / -1;
}

.owner-summary {
  margin-top: 36px;
}

.dashboard-hero {
  padding: 24px;
  color: #fff;
  background: #182458;
  border-radius: 4px 28px 4px 28px;
  box-shadow: 8px 8px 0 #9bd8cd;
}

.dashboard-hero h2 {
  margin: 20px 0 8px;
  font-size: clamp(32px, 8vw, 48px);
  line-height: 1.08;
}

.dashboard-hero > p {
  margin: 0;
  color: #cbd3e9;
  line-height: 1.65;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.quiet-action {
  border: 1px solid #6976ac;
  border-radius: 999px;
  padding: 9px 12px;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.quiet-action:disabled {
  opacity: .5;
}

.quiet-action.invite-action {
  border-color: #d9fa5a;
  color: #d9fa5a;
}

.entry-error {
  max-width: 560px;
  margin: 32px auto;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid #cbd0c7;
  border-top: 6px solid #284ed8;
  background: #fff;
  box-shadow: 0 16px 48px rgba(24,36,88,.08);
}

.entry-error > small {
  color: #284ed8;
  font-weight: 850;
}

.entry-error h2 {
  margin: 12px 0 8px;
  font-size: clamp(29px, 7vw, 42px);
  line-height: 1.15;
}

.entry-error > p {
  margin: 0;
  color: #657069;
  line-height: 1.65;
}

.entry-error-help {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px 13px;
  margin: 20px 0;
  padding: 16px;
  background: #f6f6ef;
}

.entry-error-help b {
  color: #284ed8;
}

.entry-error-help span {
  color: #4f5b54;
}

.recovery-form {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #cbd0c7;
  background: #f6f6ef;
}

.recovery-form > label {
  margin: 0 0 10px;
  font-weight: 850;
}

.recovery-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.recovery-form input {
  min-width: 0;
}

.recovery-form .secondary {
  margin: 0;
}

.recovery-form small,
.field-help {
  display: block;
  margin-top: 9px;
  color: #657069;
  font-size: 11px;
  line-height: 1.5;
}

.owner-stats {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: baseline;
  gap: 5px 9px;
  margin: 24px 0 14px;
  padding: 18px;
  border: 1px solid #111713;
  background: #fff;
}

.dashboard-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  padding: 0;
}

.dashboard-stats > div {
  min-width: 0;
  padding: 17px;
  border-right: 1px solid #aeb5ad;
}

.dashboard-stats > div:last-child {
  border-right: 0;
}

.dashboard-stats b,
.dashboard-stats span {
  display: block;
}

.dashboard-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin: 14px 0 32px;
  padding: 13px 15px;
  border-left: 5px solid #284ed8;
  color: #465149;
  background: #edf1ff;
  font-size: 12px;
  line-height: 1.55;
}

.dashboard-note b {
  color: #284ed8;
}

.notification-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: -14px 0 26px;
  padding: 16px 18px;
  border: 1px solid #111713;
  background: #e3f17b;
}

.notification-callout b,
.notification-callout span {
  display: block;
}

.notification-callout b {
  margin-bottom: 3px;
  font-size: 15px;
}

.notification-callout span {
  color: #3e493f;
  font-size: 12px;
  line-height: 1.5;
}

.notification-callout button {
  border: 0;
  padding: 11px 14px;
  color: #fff;
  background: #111713;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.work-settings {
  margin: -14px 0 32px;
  border: 1px solid #111713;
  background: #fff;
}

.work-settings > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 850;
}

.work-settings > summary::-webkit-details-marker {
  display: none;
}

.work-settings > summary::after {
  content: "+";
  color: #284ed8;
  font-size: 24px;
  line-height: 1;
}

.work-settings[open] > summary::after {
  content: "−";
}

.work-settings > summary b {
  margin-left: auto;
  color: #657069;
  font-size: 11px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #cbd0c7;
}

.settings-grid article {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid #cbd0c7;
}

.settings-grid article:last-child {
  border-right: 0;
}

.settings-grid .account-settings {
  grid-column: 1 / -1;
  border-top: 1px solid #cbd0c7;
  border-right: 0;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-actions .secondary {
  width: auto;
}

.danger-action {
  color: #a4362d;
}

.settings-grid small {
  color: #284ed8;
  font-weight: 850;
}

.settings-grid h3 {
  margin: 9px 0 7px;
  font-size: 18px;
  line-height: 1.25;
}

.settings-grid p {
  margin: 0 0 14px;
  color: #657069;
  font-size: 12px;
  line-height: 1.55;
}

.settings-grid .secondary {
  margin: 0;
  width: 100%;
}

.text-action {
  border: 0;
  padding: 8px 0;
  color: #284ed8;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.switch-line {
  display: flex;
  align-items: start;
  gap: 9px;
  margin: 0;
  color: #465149;
  font-size: 12px;
}

.switch-line input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.ios-note {
  margin-top: 12px !important;
  padding: 10px;
  border-left: 4px solid #f2aa6b;
  color: #6c3517 !important;
  background: #fff3e8;
}

.device-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.device-link input {
  min-width: 0;
  font-size: 11px;
}

.connection-board {
  margin-top: 36px;
  border-top: 1px solid #111713;
  padding-top: 22px;
}

.inbox-unread { display:inline-block; vertical-align:middle; padding:5px 9px; border-radius:999px; color:#fff; background:#284ed8; font-size:13px; letter-spacing:0; }
.inbox-unread[hidden] { display:none; }

.board-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.board-heading small {
  color: #284ed8;
  font-weight: 850;
}

.board-heading h3 {
  margin: 5px 0 0;
  font-size: 26px;
}

.board-heading > span {
  color: #657069;
  font-size: 11px;
}

.board-help {
  margin: -4px 0 13px;
  color: #657069;
  font-size: 12px;
  line-height: 1.5;
}

.connection-list {
  border: 1px solid #111713;
  background: #fff;
}

.connection-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #cbd0c7;
  padding: 14px 16px;
  color: #111713;
  background: #fff;
  text-align: left;
  font: inherit;
}

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

.connection-row:hover {
  background: #f4f6ff;
}
.connection-row.unread { background:#f2f6ff; border-left:5px solid #284ed8; padding-left:12px; }
.connection-row.unread .connection-title strong { color:#172e9e; }
.connection-row:active { background:#e7edff; }

.connection-avatar {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #284ed8;
  font-weight: 850;
}

.connection-avatar::after,
.detail-avatar::after {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #182458;
  content: "A";
  font: 850 8px/1 "Avenir Next", "PingFang SC", sans-serif;
}

.avatar-tone-0 { color:#fff; background:#284ed8; }
.avatar-tone-1 { color:#fff; background:#166b55; }
.avatar-tone-2 { color:#202b20; background:#e3f17b; }
.avatar-tone-3 { color:#fff; background:#182458; }

.connection-main,
.connection-title,
.connection-tags,
.connection-meta {
  display: flex;
}

.connection-main {
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.connection-title {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.connection-title strong {
  font-size: 17px;
}

.connection-signal {
  border-radius: 999px;
  padding: 4px 7px;
  color: #365d4d;
  background: #dfeee5;
  font-size: 10px;
}

.connection-signal.attention {
  min-width: 26px;
  padding: 5px 8px;
  color: #fff;
  background: #284ed8;
  text-align: center;
  font-size: 12px;
}

.connection-preview {
  display: -webkit-box;
  overflow: hidden;
  color: #4f5b54;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.connection-preview b { color:#253550; font-weight:800; }

.connection-open {
  color: #284ed8;
  font-size: 12px;
  font-weight: 850;
}

.connection-tags {
  flex-wrap: wrap;
  gap: 5px;
}

.connection-tags i {
  border: 1px solid #cbd0c7;
  border-radius: 999px;
  padding: 3px 6px;
  color: #657069;
  font-size: 10px;
  font-style: normal;
}

.connection-meta {
  flex-direction: column;
  align-items: end;
  gap: 7px;
  color: #657069;
  font-size: 12px;
}

.connection-meta em {
  margin: 0;
  color: #657069;
  background: transparent;
}

.dashboard-empty {
  padding: 24px;
  color: #657069;
  background: #fff;
}

.dashboard-empty b {
  color: #111713;
}

.dashboard-empty p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.connection-detail {
  margin-top: 12px;
  border: 1px solid #111713;
  background: #fff;
}

.conversation-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:17px 22px; border-bottom:1px solid #d9e0dc; background:#fff; }
.conversation-heading b { font-size:17px; }
.conversation-heading span { color:#52605a; font-size:12px; }
/* At either history boundary, let the browser continue scrolling the page. */
.connection-detail > .message-ledger { display:flex; flex-direction:column; max-height:min(62vh,620px); min-height:180px; overflow-y:auto; padding:18px 22px 8px; background:#f5f7f4; overscroll-behavior:auto; }
.conversation-continuation { margin:0; padding:12px 22px; border-top:1px solid #d9e0dc; background:#f5f7f4; color:#52605a; font-size:13px; line-height:1.6; }
.connection-detail > .message-ledger .ledger-entry { width:fit-content; max-width:min(82%,640px); margin:0 0 11px; padding:11px 14px; border:1px solid #d3dbd7; border-radius:5px 18px 18px 18px; background:#fff; box-shadow:0 2px 0 rgba(17,23,19,.04); }
.connection-detail > .message-ledger .ledger-entry.mine { align-self:flex-end; border:1px solid #bac7fb; border-radius:18px 5px 18px 18px; background:#e8eeff; }
.connection-detail > .message-ledger .ledger-entry.peer { align-self:flex-start; }
.connection-detail > .message-ledger .ledger-entry header { flex-wrap:wrap; }
.connection-detail > .message-ledger .ledger-entry header b { color:#263cbb; }
.connection-detail > .message-ledger .ledger-entry.peer header b { color:#14644c; }
.connection-detail > .message-ledger .ledger-entry p { overflow-wrap:anywhere; }
.conversation-context { margin:0; border-top:1px solid #cbd0c7; background:#fff; }
.conversation-context > summary { display:flex; justify-content:space-between; gap:10px; padding:15px 22px; cursor:pointer; list-style:none; color:#284ed8; }
.conversation-context > summary::-webkit-details-marker { display:none; }
.conversation-context > summary span { color:#52605a; font-size:11px; }
.conversation-context[open] > summary { border-bottom:1px solid #cbd0c7; }
.owner-action-dock { padding:20px 22px 0; border-top:1px solid #cbd0c7; background:#fffdf5; }
.owner-action-dock h4 { display:flex; align-items:center; gap:9px; margin:0 0 14px; font-size:20px; }
.owner-action-dock h4 span { padding:4px 7px; border-radius:999px; color:#633b08; background:#e3f17b; font-size:12px; }
.owner-all-clear { margin:0 0 18px; color:#52605a; line-height:1.6; }
.owner-optional { margin:0 0 16px; border-top:1px solid #d8ddc7; }
.owner-optional > summary { padding:13px 0; color:#284ed8; font-weight:800; cursor:pointer; }
.owner-question,.owner-task { margin:0 0 13px; padding:17px; border:1px solid #cfdaae; background:#fff; }
.owner-question small,.owner-task small { color:#284ed8; font-weight:850; }
.owner-question p,.owner-task p { margin:8px 0 12px; line-height:1.6; }
.owner-task-answer .owner-task-ask { padding:10px 12px; border-left:3px solid var(--blue); background:#f2f5ff; color:#253b70; }
.owner-question textarea { width:100%; box-sizing:border-box; margin-top:8px; }
.owner-suggestions { display:flex; flex-wrap:wrap; gap:7px; }
.owner-suggestions button,.owner-task button { padding:8px 11px; border:1px solid #284ed8; color:#284ed8; background:#fff; font:inherit; cursor:pointer; }
.owner-suggestions button.selected { color:#fff; background:#284ed8; }
.owner-question-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:9px; }
.owner-task span { display:block; margin-top:8px; color:#52605a; font-size:12px; }
.owner-task-answer-label { display:block; margin:12px 0 0; font-weight:750; }
.owner-task-answer textarea { display:block; box-sizing:border-box; width:100%; margin:8px 0 0; }
.owner-task-answer-actions { display:flex; justify-content:space-between; flex-wrap:wrap; gap:9px; margin:10px 0 13px; }
.owner-task-remember { display:flex; align-items:flex-start; gap:9px; padding:11px 12px; background:#f2f9dd; line-height:1.5; cursor:pointer; }
.owner-task-remember input { flex:none; width:18px; height:18px; margin:2px 0 0; }
.owner-task .owner-task-remember span { display:block; margin:0; color:#17231f; font-size:14px; }
.owner-task-answer .owner-task-boundary { display:block; margin-top:10px; color:#52605a; font-size:12px; line-height:1.6; font-weight:500; }
.salutation-settings { margin:18px 0; padding:17px; border:1px solid #cbd0c7; background:#f8fbf3; }
.salutation-settings > b { font-size:17px; }
.salutation-settings > p { margin:6px 0 13px; color:#52605a; line-height:1.5; }
.salutation-choices { display:flex; flex-wrap:wrap; gap:8px; }
.salutation-choices button { padding:8px 13px; border:1px solid #284ed8; border-radius:999px; color:#284ed8; background:#fff; font:inherit; cursor:pointer; }
.salutation-choices button.active { color:#fff; background:#284ed8; }
#salutation-custom-form { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; }
#salutation-custom-form input { flex:1 1 130px; min-width:0; }
.owner-action-dock .dashboard-compose { margin:16px -22px 0; }
@media(max-width:620px) {
  .conversation-heading { flex-direction:column; gap:3px; padding:13px; }
  .connection-detail > .message-ledger { padding:15px 11px 4px; max-height:55vh; }
  .conversation-continuation { padding:10px 13px; }
  .connection-detail > .message-ledger .ledger-entry { max-width:88%; padding:10px; }
  .connection-detail > .message-ledger .ledger-entry header time { margin-left:0; }
  .conversation-context > summary { flex-direction:column; padding:13px; }
  .owner-action-dock { padding:16px 13px 0; }
  .owner-action-dock .dashboard-compose { margin-inline:-13px; }
}

/* A private owner briefing must read differently from a peer-bound message. */
[data-settings-panel][hidden], .nav-unread[hidden] { display:none !important; }
.top-dashboard,.top-agent,.top-settings {
  position:relative; min-height:44px; padding:9px 15px; border:1px solid #b7c8e7;
  border-radius:11px; background:#fff; color:#182458; font-size:14px;
  box-shadow:0 2px 0 rgba(24,36,88,.12); cursor:pointer;
}
.top-agent { background:#edf7f2; border-color:#95c8b8; }
.top-dashboard { color:#284ed8; }
.top:has(.top-operator:not(.hidden)) { flex-wrap:wrap; height:auto; min-height:76px; padding-block:12px; }
.top:has(.top-operator:not(.hidden)) > i { display:none; }
.top .top-operator { background:#182458; color:#fff; border-color:#182458; }
.operator-view-note { margin:8px 0 0; font-size:14px; color:#41544b; }
.operator-error-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:16px; }
.operator-error-actions a { display:inline-flex; align-items:center; min-height:44px; padding:9px 15px; border:1px solid #182458; border-radius:11px; background:#182458; color:#fff; font-weight:800; text-decoration:none; }
.operator-error-actions a:focus-visible { outline:3px solid #f2aa6b; outline-offset:3px; }
.nav-unread,.connection-signal.attention,.inbox-unread {
  display:inline-grid; place-items:center; min-width:22px; height:22px; box-sizing:border-box;
  padding:0 5px; margin-left:6px; border-radius:999px; background:#d6333f;
  color:#fff; font-size:12px; font-weight:850; line-height:1;
}
.connection-signal.attention { margin-left:0; }
.private-note-help { margin:6px 0 10px; color:#41544b; font-size:14px; line-height:1.55; }
.compose-actions { display:flex; gap:9px; flex-wrap:wrap; margin-top:10px; }
.peer-send { border:1px solid #c7654c; border-radius:9px; background:#fff7f0; color:#80371d; font:inherit; font-weight:800; padding:10px 14px; cursor:pointer; }
.peer-send-warning { margin:12px 0; padding:12px 14px; border:2px solid #cf7d52; background:#fff4e6; color:#5b321e; line-height:1.55; }
.owner-private-notes { margin-top:12px; }
.owner-private-notes details { border-left:4px solid #506597; background:#f3f5fb; padding:10px 13px; }
.owner-private-notes summary { cursor:pointer; font-weight:800; }
.owner-private-notes p { white-space:pre-wrap; overflow-wrap:anywhere; margin:10px 0; }
.peer-send-preview { width:min(540px,calc(100vw - 34px)); max-height:80vh; border:2px solid #182458; border-radius:18px; padding:22px; color:#17221b; box-shadow:0 24px 80px #14255166; }
.peer-send-preview::backdrop { background:#101b30aa; }
.peer-send-preview h2 { margin:8px 0; font-size:22px; line-height:1.35; }
.peer-send-preview pre { max-height:38vh; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; padding:15px; background:#fff5e9; border:1px solid #d0a77e; font:inherit; line-height:1.55; }
.preview-actions { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.preview-actions button { min-height:44px; padding:9px 14px; border-radius:8px; font:inherit; font-weight:800; cursor:pointer; }
.peer-send-confirm { background:#a3312c; color:#fff; border:0; }
@media(max-width:620px) {
  .top-dashboard,.top-agent,.top-settings { min-height:42px; padding:7px 9px; font-size:12px; }
  .top .brand-lockup > span { display:none; }
  .top .brand-lockup { flex:0 0 auto; }
  .top-dashboard { margin-left:auto; }
}

.connection-detail > header {
  position: relative;
  padding: 22px;
  color: #fff;
  background: #182458;
}

.detail-person { display:flex; align-items:center; gap:13px; padding-right:36px; }
.detail-avatar { position:relative; display:grid; width:46px; height:46px; flex:none; place-items:center; border-radius:50%; font-size:19px; font-weight:850; }
.detail-person h3 { margin:3px 0 0 !important; }

.connection-detail > header small {
  color: #e3f17b;
  font-weight: 850;
}

.connection-detail > header h3 {
  margin: 8px 0 6px;
  font-size: 28px;
}

.connection-detail > header p {
  margin: 0;
  color: #cbd3e9;
  line-height: 1.55;
}

.opportunity-desk {
  margin: 18px;
  border: 1px solid #111713;
  background: #f8f8f2;
  box-shadow: 7px 7px 0 #dce3ff;
}

.opportunity-desk > header {
  padding: 20px;
  border-bottom: 1px solid #111713;
  background: #fff;
}

.opportunity-desk > header small,
.case-analysis small,
.next-step small {
  color: #284ed8;
  font-weight: 900;
}

.opportunity-desk > header h3 {
  margin: 7px 0 5px;
  font-size: clamp(22px, 4vw, 31px);
  letter-spacing: -.035em;
}

.opportunity-desk > header p {
  margin: 0;
  color: #657069;
  line-height: 1.55;
}

.case-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #111713;
}

.case-tabs button {
  min-height: 92px;
  padding: 13px;
  border: 0;
  border-right: 1px solid #cbd0c7;
  color: #111713;
  background: #f6f6ef;
  text-align: left;
  font: inherit;
}

.case-tabs button:last-child { border-right: 0; }
.case-tabs button.active { color: #fff; background: #182458; }
.case-tabs i { display:block; color:#284ed8; font-style:normal; font-size:11px; font-weight:900; }
.case-tabs button.active i { color:#e3f17b; }
.case-tabs span { display:block; margin:7px 0; font-size:13px; font-weight:850; line-height:1.35; }
.case-tabs b { display:block; color:#657069; font-size:9px; }
.case-tabs button.active b { color:#cbd3e9; }

.case-brief { padding: 18px; }
.verdict-banner { padding:20px; border:1px solid #111713; background:#e3f17b; }
.verdict-banner.NEEDS_EVIDENCE { background:#ffe0c4; }
.verdict-banner.NO_CURRENT_FIT { background:#eceee9; }
.verdict-banner small { color:#1838a9; font-weight:900; }
.verdict-banner h4 { margin:7px 0; font-size:clamp(24px, 5vw, 37px); line-height:1.12; letter-spacing:-.04em; }
.verdict-banner p { margin:0; line-height:1.55; }

.case-flow { display:grid; grid-template-columns:1fr 1fr; gap:1px; margin-top:12px; border:1px solid #aeb5ad; background:#aeb5ad; }
.case-flow article { min-height:150px; padding:16px; background:#fff; }
.case-flow article:last-child { background:#eef7f2; }
.case-flow small { color:#284ed8; font-weight:900; }
.case-flow h5 { margin:8px 0 5px; font-size:16px; }
.case-flow p { margin:0; line-height:1.6; }

.case-analysis { display:grid; grid-template-columns:1fr 1fr; gap:1px; margin-top:12px; border:1px solid #cbd0c7; background:#cbd0c7; }
.case-analysis section { min-height:155px; padding:16px; background:#fff; }
.case-analysis .unknowns { background:#fff6ea; }
.case-analysis ul { margin:10px 0 0; padding-left:18px; line-height:1.55; }
.case-analysis li { margin-bottom:7px; }
.case-analysis p { line-height:1.55; }
.case-analysis em { display:block; margin:10px 0 0; padding:0; color:#657069; background:transparent; font-size:10px; line-height:1.5; }
.case-analysis footer { display:flex; flex-direction:column; gap:5px; }
.case-analysis footer a { color:#284ed8; font-size:11px; }
.evidence-list b { display:block; font-size:12px; }
.evidence-list span { display:block; margin-top:2px; color:#657069; font-size:9px; }

.next-step { margin-top:12px; padding:16px; border-left:5px solid #284ed8; background:#edf1ff; }
.next-step p { margin:7px 0; font-size:16px; font-weight:800; line-height:1.55; }
.next-step em { margin:0; padding:0; color:#657069; background:transparent; font-size:10px; line-height:1.5; }

.model-review { margin-top:12px; padding:16px; border:1px solid #111713; background:#182458; color:#fff; }
.model-review small { color:#e3f17b; font-weight:900; }
.model-review p { margin:7px 0; font-size:14px; font-weight:750; line-height:1.55; }
.model-review b { display:block; color:#cbd3e9; font-size:10px; }
.model-review em { display:block; margin-top:7px; color:#cbd3e9; font-size:9px; font-style:normal; line-height:1.45; }

.case-method { display:flex; align-items:center; flex-wrap:wrap; gap:7px 12px; margin-top:12px; padding:10px 13px; border:1px solid #cbd0c7; background:#fff; }
.case-method b { color:#284ed8; font-size:11px; }
.case-method span { font-size:11px; font-weight:800; }
.case-method em { flex-basis:100%; margin:0; color:#657069; background:transparent; font-size:9px; line-height:1.45; }

.human-decision { display:grid; grid-template-columns:1fr repeat(3, auto); align-items:center; gap:7px; margin-top:12px; }
.human-decision span { font-weight:900; }
.human-decision button { border:1px solid #111713; padding:9px 11px; color:#111713; background:#fff; font:inherit; font-size:11px; font-weight:800; }
.human-decision button.selected { color:#fff; background:#284ed8; border-color:#284ed8; }
.human-decision b { grid-column:1/-1; color:#284ed8; font-size:11px; }

.opportunity-next-task { margin-top:12px; padding:16px; border:1px solid #111713; background:#eef7f2; }
.opportunity-next-task.WAITING { background:#edf1ff; }
.opportunity-next-task.CANCELED { background:#eceee9; }
.opportunity-next-task small { color:#284ed8; font-size:10px; font-weight:900; }
.opportunity-next-task h5 { margin:6px 0; font-size:18px; }
.opportunity-next-task p { margin:0 0 7px; line-height:1.55; }
.opportunity-next-task ul { margin:7px 0; padding-left:18px; line-height:1.55; }
.opportunity-next-task b { display:block; margin-top:8px; color:#1838a9; font-size:11px; }
.opportunity-next-task em { display:block; margin-top:6px; color:#657069; font-size:9px; font-style:normal; line-height:1.45; }

.evidence-history { margin-top:12px; padding:16px; border:1px solid #cbd0c7; background:#fff; }
.evidence-history > small { color:#284ed8; font-size:10px; font-weight:900; }
.evidence-history article { margin-top:10px; padding:13px; border:1px solid #cbd0c7; background:#f6f6ef; }
.evidence-history header { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.evidence-history header b { font-size:12px; }
.evidence-history header span { color:#657069; font-size:9px; text-align:right; }
.evidence-history p { margin:8px 0; color:#39433d; line-height:1.55; }
.evidence-history a { color:#284ed8; font-size:10px; font-weight:800; }
.evidence-history footer { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:10px; padding-top:9px; border-top:1px solid #d8ddd6; font-size:9px; }
.evidence-history footer b { color:#284ed8; }
.evidence-history footer time { margin-left:auto; color:#657069; }

.evidence-completion { margin-top:16px; padding:16px; border:2px solid #284ed8; background:#fff; }
.evidence-completion > header small { color:#284ed8; font-size:10px; font-weight:900; }
.evidence-completion > header h5 { margin:6px 0; font-size:20px; }
.evidence-completion > header p { color:#52605a; }
.evidence-mode-switch { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin:14px 0; }
.evidence-mode-switch button { min-height:43px; border:1px solid #111713; color:#111713; background:#fff; font:inherit; font-size:10px; font-weight:850; }
.evidence-mode-switch button.active { color:#fff; border-color:#284ed8; background:#284ed8; }
.evidence-submit-form,.local-audit-panel { padding:14px; border:1px solid #cbd0c7; background:#f6f6ef; }
.evidence-submit-form label,.local-audit-panel label { display:block; margin-bottom:12px; font-size:10px; font-weight:850; }
.evidence-submit-form input[type=text],.evidence-submit-form input[type=url],.evidence-submit-form input:not([type]),.evidence-submit-form textarea,.local-audit-panel textarea { box-sizing:border-box; width:100%; margin-top:6px; padding:11px; border:1px solid #98a29b; border-radius:0; color:#111713; background:#fff; font:inherit; font-size:12px; line-height:1.5; }
.truth-declaration { display:grid !important; grid-template-columns:auto 1fr; gap:9px; align-items:start; color:#39433d; font-weight:650 !important; line-height:1.5; }
.truth-declaration input { margin-top:3px; }
.confidence-note { margin:0 0 12px; padding:11px 12px; border-left:3px solid #b8c8ff; color:#39433d; background:#eef2ff; }
.confidence-note b { color:#284ed8; font-size:10px; }
.confidence-note p { margin:4px 0 0; font-size:10px; line-height:1.55; }
.local-audit-panel > p { margin:0 0 12px; line-height:1.6; }
.local-audit-panel > em { display:block; margin-top:11px; color:#657069; font-size:9px; font-style:normal; line-height:1.5; }
.audit-task-ready > small { color:#284ed8; font-weight:900; }
.audit-task-ready pre { max-height:240px; margin:10px 0; padding:12px; overflow:auto; white-space:pre-wrap; word-break:break-word; border:1px solid #111713; color:#eff4ff; background:#182458; font:10px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace; }
.audit-return-steps { margin:14px 0; padding:14px 14px 14px 34px; border:1px solid #9eb2fb; background:#fff; }
.audit-return-steps li { margin:0 0 8px; color:#253129; font-size:11px; line-height:1.55; }
.audit-return-steps li:last-child { margin-bottom:0; }
.audit-return-steps b { color:#284ed8; }
.manual-audit-return { margin-top:14px; padding:12px; border:1px dashed #98a29b; background:#fff; }
.manual-audit-return summary { cursor:pointer; color:#53605a; font-size:10px; font-weight:850; }
.manual-audit-return[open] summary { margin-bottom:12px; }
.evidence-completion > aside { margin-top:13px; padding:13px; border-left:4px solid #e3f17b; background:#111713; color:#fff; }
.evidence-completion > aside b { color:#e3f17b; font-size:11px; }
.evidence-completion > aside p { margin:5px 0 0; color:#e3e8e4; font-size:10px; line-height:1.55; }

/* The onboarding hand-off: context goes to the Agent before it becomes a card. */
.context-intake { position:relative; margin:22px 0; padding:20px; overflow:hidden; border:2px solid #284ed8; background:#eef2ff; }
.context-intake::after { position:absolute; right:-34px; top:-42px; width:118px; height:118px; border:18px solid rgba(40,78,216,.08); border-radius:50%; content:""; pointer-events:none; }
.context-intake > header { position:relative; z-index:1; max-width:760px; }
.context-intake > header > span { display:inline-flex; padding:3px 8px; color:#fff; background:#284ed8; font-size:9px; font-weight:900; }
.context-intake > header h3 { margin:10px 0 6px; max-width:650px; color:#111713; font-size:clamp(19px,3.8vw,29px); line-height:1.18; }
.context-intake > header p { margin:0; max-width:720px; color:#45544d; line-height:1.65; }
.context-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:17px; }
.context-file-action,.context-link-action { box-sizing:border-box; display:flex !important; min-height:72px; margin:0 !important; padding:13px 14px; flex-direction:column; justify-content:center; align-items:flex-start; border:1px solid #111713; border-radius:0; color:#111713; background:#fff; cursor:pointer; font:inherit; text-align:left; }
.context-file-action input { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; }
.context-file-action b,.context-link-action b { font-size:12px; }
.context-file-action small,.context-link-action small { margin-top:4px; color:#657069; font-size:9px; font-weight:600; }
.context-file-action:focus-within,.context-link-action:focus-visible { outline:3px solid #e3f17b; outline-offset:2px; }
.context-file-list { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.context-file-list > span { display:grid; grid-template-columns:1fr auto; gap:1px 9px; min-width:180px; padding:9px 10px; border:1px solid #9fb0ec; background:#fff; }
.context-file-list b { overflow:hidden; text-overflow:ellipsis; font-size:10px; white-space:nowrap; }
.context-file-list small { color:#657069; font-size:8px; }
.context-file-list button { grid-column:2; grid-row:1 / span 2; padding:0 4px; border:0; color:#657069; background:transparent; font-size:17px; }
.context-link-list { display:grid; gap:8px; margin-top:10px; }
.context-link-row { display:grid; grid-template-columns:120px 1fr 1.5fr 34px; gap:6px; }
.context-link-row select,.context-link-row input { box-sizing:border-box; min-width:0; padding:10px; border:1px solid #9fb0ec; border-radius:0; color:#111713; background:#fff; font:inherit; font-size:10px; }
.context-link-row button { border:1px solid #9fb0ec; color:#657069; background:#fff; font-size:17px; }
.context-analyze { width:100%; min-height:46px; margin-top:11px; border:0; color:#fff; background:#284ed8; font:inherit; font-weight:900; }
.context-analysis { margin-top:12px; border:1px solid #9fb0ec; background:#fff; }
.context-analysis > header { display:flex; justify-content:space-between; gap:10px; padding:11px 12px; border-bottom:1px solid #d9e0f8; }
.context-analysis > header b { color:#284ed8; font-size:11px; }
.context-analysis > header span { color:#657069; font-size:9px; }
.context-analysis article { display:grid; grid-template-columns:52px 1fr; gap:10px; padding:11px 12px; border-bottom:1px solid #e1e5df; }
.context-analysis article:last-child { border-bottom:0; }
.context-analysis article i { align-self:start; padding:3px 5px; color:#15513d; background:#dff1e9; font-size:8px; font-style:normal; font-weight:900; text-align:center; }
.context-analysis article.needs-help i { color:#774216; background:#ffead7; }
.context-analysis article b { display:block; font-size:9px; }
.context-analysis article span { display:block; margin-top:2px; font-size:11px; font-weight:800; }
.context-analysis article p { margin:5px 0 0; color:#52605a; font-size:9px; line-height:1.5; }
.context-boundary { display:block; margin-top:11px; color:#657069; font-size:9px; line-height:1.55; }
.card-context-links { display:flex; flex-wrap:wrap; gap:6px; margin-top:7px; }
.card-context-links a,.card-context-links span { padding:5px 7px; border:1px solid #9fb0ec; color:#284ed8; background:#f7f9ff; font-size:9px; font-weight:800; text-decoration:none; }

@media (max-width:640px) {
  .context-intake { margin-inline:-4px; padding:16px; }
  .context-actions { grid-template-columns:1fr; }
  .context-link-row { grid-template-columns:1fr 34px; }
  .context-link-row select,.context-link-row .context-link-name { grid-column:1; }
  .context-link-row .context-link-url { grid-column:1; }
  .context-link-row button { grid-column:2; grid-row:1 / span 3; }
  .context-analysis > header { flex-direction:column; }
}

.transcript-drawer { margin:18px; border:1px solid #cbd0c7; background:#fff; }
.transcript-drawer > summary { display:flex; justify-content:space-between; gap:12px; padding:14px 16px; cursor:pointer; list-style:none; }
.transcript-drawer > summary::-webkit-details-marker { display:none; }
.transcript-drawer > summary b { font-size:13px; }
.transcript-drawer > summary span { color:#657069; font-size:10px; }
.transcript-drawer[open] > summary { border-bottom:1px solid #cbd0c7; }
.transcript-drawer .message-ledger { padding-top:15px; }

.detail-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 34px;
  height: 34px;
  border: 1px solid #6976ac;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  font: 24px/1 sans-serif;
}

.protocol-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #cbd0c7;
}

.protocol-progress > div {
  position: relative;
  padding: 17px 10px;
  color: #89928d;
  text-align: center;
  font-size: 11px;
}

.protocol-progress > div:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 27px;
  right: -10%;
  width: 20%;
  height: 1px;
  background: #cbd0c7;
}

.protocol-progress i {
  display: grid;
  width: 23px;
  height: 23px;
  margin: 0 auto 8px;
  place-items: center;
  border: 1px solid #aeb5ad;
  border-radius: 50%;
  font-style: normal;
  font-weight: 850;
}

.protocol-progress .done,
.protocol-progress .active {
  color: #111713;
  font-weight: 750;
}

.protocol-progress .done i {
  border-color: #284ed8;
  color: #fff;
  background: #284ed8;
}

.protocol-progress .active i {
  border-color: #f2aa6b;
  background: #ffe0c4;
}

.detail-report {
  margin: 18px;
  padding: 16px;
  border-left: 5px solid #284ed8;
  background: #edf1ff;
}

.detail-report small {
  color: #284ed8;
  font-weight: 850;
}

.detail-report p {
  line-height: 1.55;
}

.detail-report div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.detail-report div span {
  border: 1px solid #a7b3df;
  border-radius: 999px;
  padding: 4px 7px;
  background: #fff;
  font-size: 10px;
}

.message-ledger {
  padding: 0 18px;
}

.ledger-entry {
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid #cbd0c7;
}

.ledger-entry.mine {
  border-left: 5px solid #284ed8;
}

.ledger-entry.peer {
  border-left: 5px solid #9bd8cd;
}

.ledger-entry header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}

.ledger-entry header time {
  margin-left: auto;
  color: #657069;
}

.ledger-entry p {
  margin: 9px 0 0;
  line-height: 1.55;
}

.protocol-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px dashed #cbd0c7;
  color: #657069;
  font-size: 9px;
}

.protocol-meta span {
  padding: 3px 6px;
  background: #edf1ff;
  border-radius: 999px;
}

.protocol-meta code {
  margin-left: auto;
  font: inherit;
  color: #7b847f;
}

.dialogue-summary {
  margin-top: 16px;
  padding: 17px;
  border: 1px solid #111713;
  background: #e3f17b;
}

.dialogue-summary > small {
  color: #1838a9;
  font-weight: 850;
}

.dialogue-summary h4 {
  margin: 8px 0 14px;
  font-size: 19px;
  line-height: 1.4;
}

.dialogue-summary p {
  margin: 9px 0;
  font-size: 12px;
  line-height: 1.6;
}

.dialogue-summary p b {
  display: block;
  margin-bottom: 3px;
}

.dialogue-summary footer {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.dialogue-summary footer span {
  border: 1px solid #111713;
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(255,255,255,.55);
  font-size: 9px;
}

.origin {
  border-radius: 999px;
  padding: 3px 6px;
  font-size: 9px;
  font-weight: 850;
}

.origin.agent {
  color: #365d4d;
  background: #dfeee5;
}

.origin.principal {
  color: #1838a9;
  background: #edf1ff;
}

.receipt {
  color: #657069;
  font-size: 9px;
}

.dashboard-compose {
  padding: 18px;
  border-top: 1px solid #cbd0c7;
  background: #f6f6ef;
}

@media(max-width:620px) {
  .opportunity-desk { margin:12px; box-shadow:4px 4px 0 #dce3ff; }
  .case-tabs { grid-template-columns:1fr; }
  .case-tabs button { min-height:0; border-right:0; border-bottom:1px solid #cbd0c7; }
  .case-flow,.case-analysis { grid-template-columns:1fr; }
  .case-flow article,.case-analysis section { min-height:0; }
  .human-decision { grid-template-columns:1fr; }
  .human-decision button { width:100%; }
  .evidence-mode-switch { grid-template-columns:1fr; }
  .evidence-history header,.evidence-history footer { align-items:flex-start; flex-direction:column; }
  .evidence-history footer time { margin-left:0; }
}

.dashboard-compose label {
  margin: 0 0 8px;
  font-weight: 850;
}

.dashboard-compose .secondary {
  margin-top: 9px;
}

.result-dashboard {
  margin-top: 14px;
}

.owner-stats b {
  color: #284ed8;
  font-size: 28px;
}

.owner-stats span {
  color: #657069;
  font-size: 12px;
}

.round-progress {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 10px;
  color: #657069;
  font-size: 12px;
}

.round-progress span {
  color: #284ed8;
  font-weight: 850;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 13px 0 4px;
}

.suggestion {
  border: 1px solid #aeb5ad;
  border-radius: 999px;
  padding: 8px 11px;
  color: #111713;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.suggestion.selected {
  border-color: #284ed8;
  color: #fff;
  background: #284ed8;
}

.save-answer {
  margin-top: 10px !important;
}

.conversation-feedback {
  margin: 15px 0;
  padding: 15px 17px;
  border-left: 5px solid #284ed8;
  color: #1838a9;
  background: #edf1ff;
  font-weight: 750;
  line-height: 1.55;
}

.round-complete,
.audit-invite {
  margin-top: 16px;
  padding: 19px;
  border: 1px solid #111713;
  background: #fff;
}

.round-complete b,
.audit-invite small {
  color: #284ed8;
  font-weight: 850;
}

.round-complete p {
  margin: 8px 0 0;
  color: #657069;
  line-height: 1.6;
}

.audit-invite {
  border-left: 7px solid #e3f17b;
}

.audit-invite small {
  display: block;
  margin-bottom: 9px;
}

.operator-shell {
  max-width: 1120px;
}

.operator-hero {
  margin: 34px 0;
  padding: 26px;
  color: #fff;
  background: #182458;
  border-radius: 4px 28px 4px 28px;
  box-shadow: 8px 8px 0 #9bd8cd;
}

.operator-hero small {
  color: #e3f17b;
  font-weight: 850;
}

.operator-hero h1 {
  margin: 14px 0 8px;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.05;
}

.operator-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd3e9;
  line-height: 1.6;
}

.operator-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #111713;
  background: #fff;
}

.operator-stats > div {
  padding: 20px;
  border-right: 1px solid #cbd0c7;
}

.operator-stats > div:last-child {
  border-right: 0;
}

.operator-stats b,
.operator-stats span {
  display: block;
}

.operator-stats b {
  color: #284ed8;
  font-size: 34px;
}

.operator-stats span {
  color: #657069;
  font-size: 12px;
}

.operator-quality {
  margin-top: 34px;
  padding: 24px;
  border: 1px solid #111713;
  background: #edf7f3;
}

.operator-quality > header {
  max-width: 820px;
}

.operator-quality > header small {
  color: #16664f;
  font-weight: 850;
}

.operator-quality > header h2 {
  margin: 7px 0 8px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

.operator-quality > header p {
  margin: 0;
  color: #53665e;
  line-height: 1.6;
}

.quality-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  border: 1px solid #111713;
  background: #fff;
}

.quality-flow article {
  min-height: 150px;
  padding: 18px;
  border-right: 1px solid #cbd0c7;
}

.quality-flow article:last-child {
  border-right: 0;
}

.quality-flow b {
  color: #284ed8;
  font-size: 30px;
}

.quality-flow h3 {
  margin: 16px 0 6px;
  font-size: 17px;
}

.quality-flow p {
  margin: 0;
  color: #657069;
  font-size: 12px;
  line-height: 1.55;
}

.quality-feedback {
  display: grid;
  grid-template-columns: 1.1fr 2fr 1.2fr;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 16px 18px;
  color: #fff;
  background: #182458;
}

.quality-feedback small,
.quality-feedback b {
  display: block;
}

.quality-feedback small {
  color: #cbd3e9;
}

.quality-feedback b {
  margin-top: 4px;
  color: #e3f17b;
  font-size: 24px;
}

.quality-feedback p {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.quality-feedback em {
  color: #cbd3e9;
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.operator-panel {
  margin-top: 34px;
  border-top: 1px solid #111713;
  padding-top: 20px;
}

.operator-panel > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.operator-panel > header small {
  color: #284ed8;
  font-weight: 850;
}

.operator-panel > header h2 {
  margin: 5px 0 0;
  font-size: 28px;
}

.operator-explain {
  max-width: 800px;
  color: #657069;
  line-height: 1.6;
}

.operator-list {
  border: 1px solid #111713;
  background: #fff;
}

.operator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid #cbd0c7;
}

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

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

.operator-identity i {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #284ed8;
  font-style: normal;
  font-weight: 850;
}

.operator-identity b,
.operator-identity small {
  display: block;
}

.operator-identity small {
  overflow: hidden;
  margin-top: 4px;
  color: #657069;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-metrics {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #657069;
  font-size: 11px;
}

.operator-metrics strong {
  color: #16664f;
}

.dialogue-quality-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 23, 19, .16);
  color: #53665e;
  font-size: 12px;
}

.dialogue-quality-line b {
  color: #284ed8;
}

.dialogue-helpfulness {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid #111713;
  background: #fff;
}

.dialogue-helpfulness small {
  color: #284ed8;
  font-weight: 850;
}

.dialogue-helpfulness h4 {
  margin: 6px 0 14px;
  font-size: 19px;
}

.helpfulness-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 13px;
}

.helpfulness-actions button {
  padding: 9px 14px;
  border: 1px solid #111713;
  border-radius: 999px;
  color: #111713;
  background: transparent;
  font: inherit;
  font-weight: 750;
}

.helpfulness-actions button.selected {
  color: #fff;
  background: #284ed8;
}

.dialogue-helpfulness > label {
  display: block;
  color: #657069;
  font-size: 12px;
  line-height: 1.5;
}

.connection-only > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.a2a-link {
  color: #284ed8;
  font-size: 11px;
  font-weight: 850;
}

.delivery-only strong {
  color: #284ed8;
  font-size: 24px;
}

@media (max-width: 520px) {
  .top {
    box-sizing: border-box;
    width: 100%;
    padding-inline: 12px;
    gap: 4px;
  }

  .top .brand-lockup {
    flex: 1 1 auto;
    min-width: 0;
  }

  .top > i {
    display: none;
  }

  .top-dashboard,
  .top-agent,
  .top-settings {
    flex: 0 0 auto;
    padding-inline: 4px;
    font-size: 10px;
    white-space: nowrap;
  }

  main,
  .owner-summary,
  .dashboard-hero,
  .dashboard-stats,
  .notification-callout,
  .dashboard-note {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .account-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
  }
  .quality-flow {
    grid-template-columns: 1fr 1fr;
  }
  .quality-flow article:nth-child(2) {
    border-right: 0;
  }
  .quality-flow article:nth-child(-n + 2) {
    border-bottom: 1px solid #cbd0c7;
  }
  .quality-feedback {
    grid-template-columns: 1fr;
  }
  .helpfulness-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-actions .secondary {
    width: 100%;
  }
  .notification-callout {
    grid-template-columns: minmax(0, 1fr);
  }

  .notification-callout button {
    width: 100%;
  }

  .owner-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .owner-grid .wide {
    grid-column: auto;
  }

  .owner-stats {
    grid-template-columns: auto 1fr;
  }

  .dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }

  .dashboard-actions .quiet-action {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    padding-inline: 7px;
    line-height: 1.3;
    white-space: normal;
  }

  .dashboard-stats > div {
    padding: 13px 10px;
  }

  .dashboard-stats b {
    font-size: 23px;
  }

  .dashboard-stats span {
    font-size: 10px;
  }

  .connection-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .connection-avatar {
    width: 40px;
    height: 40px;
  }

  .connection-meta {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
  }

  .protocol-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .protocol-progress > div:nth-child(2)::after {
    display: none;
  }

  .nickname-setup > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .nickname-setup .secondary {
    width: 100%;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-grid article {
    border-right: 0;
    border-bottom: 1px solid #cbd0c7;
  }

  .settings-grid article:last-child {
    border-bottom: 0;
  }

  .work-settings > summary {
    align-items: start;
    flex-wrap: wrap;
  }

  .work-settings > summary b {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .recovery-form > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .operator-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operator-stats > div:nth-child(2) {
    border-right: 0;
  }

  .operator-stats > div:nth-child(-n + 2) {
    border-bottom: 1px solid #cbd0c7;
  }

  .operator-row,
  .operator-metrics {
    align-items: start;
    flex-direction: column;
  }

  .operator-metrics {
    gap: 5px;
  }
}

/* The conversation is the primary reading surface; summaries follow the transcript. */
.connection-title small { color:#52605a; font-size:12px; font-weight:650; }
.conversation-heading b { overflow-wrap:anywhere; }
.connection-detail > .message-ledger .ledger-entry { max-width:min(82%,660px); }
.connection-detail > .message-ledger .ledger-entry header { gap:6px 9px; }
.connection-detail > .message-ledger .ledger-entry .sender-role { color:#52605a; font-size:12px; }
.connection-detail > .message-ledger .ledger-entry .origin { font-size:11px; }
.connection-detail > .message-ledger .ledger-entry .message-body { max-width:61ch; font-size:15px; line-height:1.72; }
.connection-detail > .message-ledger .ledger-entry .message-body p { margin:8px 0 0; }
.connection-detail > .message-ledger .ledger-entry .message-intro { font-weight:650; }
.message-points { margin:12px 0 2px; padding:0; list-style:none; counter-reset:message-point; }
.message-points li { margin:0; padding:11px 0; border-top:1px solid #dce3df; counter-increment:message-point; }
.message-points li::before { display:inline-grid; width:22px; height:22px; margin-right:7px; place-items:center; border-radius:50%; color:#fff; background:#284ed8; content:counter(message-point); font-size:11px; font-weight:800; }
.message-points li b,.message-line-point b { color:#182458; font-size:14px; }
.message-points li p { margin:5px 0 0 29px !important; }
.message-line-point { margin-top:10px; padding-top:9px; border-top:1px solid #dce3df; }
.message-line-point p { margin-top:3px !important; }
.closing-message { border-color:#9eb4d9 !important; }

.dialogue-summary { margin:0; padding:20px 22px; border:0; border-top:1px solid #111713; border-bottom:1px solid #111713; background:#e3f17b; }
.summary-topline { display:flex; justify-content:space-between; flex-wrap:wrap; gap:5px 12px; }
.summary-topline span { color:#365044; font-size:12px; font-weight:650; }
.dialogue-summary h4 { margin:9px 0 16px; font-size:clamp(19px,3vw,25px); line-height:1.3; }
.dialogue-summary .summary-follow-up { margin:0 0 14px; padding:10px 12px; border-left:3px solid #284ed8; background:#fffbd9; color:#24362e; font-size:14px; line-height:1.55; }
.summary-point { display:grid; grid-template-columns:27px minmax(0,1fr); gap:10px; padding:12px 0; border-top:1px solid rgba(17,23,19,.24); }
.summary-point i { display:grid; width:25px; height:25px; place-items:center; border-radius:50%; color:#fff; background:#182458; font-size:12px; font-style:normal; font-weight:850; }
.summary-point b { display:block; color:#172b22; font-size:15px; }
.summary-point p { margin:5px 0 0; max-width:65ch; font-size:15px; line-height:1.62; }
.summary-owner-actions { margin:7px 0 0; padding:0; list-style:none; }
.summary-owner-actions li { display:flex; gap:8px; margin:7px 0; font-size:14px; line-height:1.55; }
.summary-owner-actions li b { flex:none; min-width:4em; font-size:14px; }
.summary-unknown { color:#435044; font-size:13px !important; }
.dialogue-summary footer { display:block; margin-top:11px; padding-top:10px; border-top:1px solid rgba(17,23,19,.24); color:#435044; font-size:12px; line-height:1.55; }

@media(max-width:620px) {
  .connection-detail > .message-ledger .ledger-entry { max-width:88%; }
  .connection-detail > .message-ledger .ledger-entry .message-body { font-size:14px; }
  .message-points li p { margin-left:0 !important; }
  .dialogue-summary { padding:17px 13px; }
  .summary-owner-actions li { display:block; }
  .summary-owner-actions li b { margin-bottom:2px; }
}

/* Final navigation overrides after the legacy compact-header rules. */
.top .top-dashboard,.top .top-agent,.top .top-settings {
  min-height:44px; padding:8px 12px; border:1px solid #b7c8e7; border-radius:11px;
  background:#fff; color:#182458; font-size:14px; box-shadow:0 2px 0 #18245822;
}
.top .top-agent { background:#edf7f2; border-color:#95c8b8; }
.top .top-dashboard { color:#284ed8; }
@media(max-width:620px) {
  .top .top-dashboard,.top .top-agent,.top .top-settings { min-height:42px; padding:7px 9px; font-size:12px; }
  .top .brand-lockup > span { display:none; }
  .top .brand-lockup { flex:0 0 auto; }
  .top .top-dashboard { margin-left:auto; }
}

/* One owner inbox: conversations and recruitment progress share the same list,
   but exchange rows never masquerade as unread Agent messages. */
.board-side { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
.board-side a { color:#284ed8; font-size:12px; font-weight:850; text-underline-offset:3px; }
.board-side span { color:#657069; font-size:11px; }
.inbox-filters { display:flex; gap:7px; flex-wrap:wrap; margin:0 0 11px; }
.inbox-filters button { border:1px solid #bdc6b9; border-radius:999px; padding:7px 12px; background:#fff; color:#182458; font:inherit; font-size:12px; font-weight:800; cursor:pointer; }
.inbox-filters button[aria-pressed="true"] { border-color:#182458; background:#182458; color:#fff; }
.inbox-filters span { font-variant-numeric:tabular-nums; }
.recruitment-row { text-decoration:none; cursor:pointer; }
.recruitment-row .connection-avatar { background:#166b55; }
.recruitment-row .connection-avatar::after { content:"资"; background:#e3f17b; color:#182458; }
.recruitment-row .connection-open { color:#176652; }
@media(max-width:620px) {
  .board-heading { align-items:flex-start; }
  .board-side { align-items:flex-end; flex-direction:column; gap:3px; }
  .inbox-filters button { min-height:36px; padding:6px 10px; }
}
