/* Shared geometry for all three workspaces; logical properties support RTL. */
:root {
  --surface-padding: 24px;
  --surface-title-size: 22px;
}
.content-dialog {
  width: min(640px, calc(100% - 32px));
  max-width: 640px;
  max-height: min(880px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 80px #202b3d26;
  overflow: hidden;
}
.content-dialog[open] {
  display: flex;
  flex-direction: column;
}
.content-dialog::backdrop {
  background: #1d1d1f4d;
  backdrop-filter: blur(2px);
}
.content-dialog .dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--surface-padding);
  margin: 0;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.content-dialog .dialog-head h2,
.detail-page .page-heading h1,
.engagement-heading h1 {
  margin: 0;
  font-size: var(--surface-title-size);
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: -0.3px;
}
.content-dialog .dialog-body {
  padding: var(--surface-padding);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.content-dialog .dialog-body:has(.dialog-form) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}
.content-dialog .dialog-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.content-dialog .form-fields {
  overflow-y: auto;
  min-height: 0;
  padding: 2px;
  overscroll-behavior: contain;
}
.content-dialog .dialog-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px calc(-1 * var(--surface-padding)) 0;
  padding: 16px var(--surface-padding);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.content-dialog .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 20px;
}
.content-dialog .field > span {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink);
}
.content-dialog .grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.content-dialog :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  width: 100%;
  min-height: 44px;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
}
.content-dialog textarea {
  min-height: 112px;
}
.content-dialog fieldset {
  margin: 0 0 20px;
  padding: 16px;
  border-radius: 8px;
}
.content-dialog .hint {
  margin: 0 0 20px;
  padding: 16px;
}
.content-dialog .error:empty {
  display: none;
}
.content-dialog .section,
.detail-page .section {
  margin-block: 24px;
}
.content-dialog .section-title {
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.content-dialog :is(.section-title h2, .dialog-body > h3),
.detail-page > h2 {
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.content-dialog .detail,
.detail-page .detail {
  padding-block: 16px;
}
.content-dialog .detail h3,
.detail-page .detail h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 8px;
}
.content-dialog .detail p,
.detail-page .detail p {
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.content-dialog .facts,
.detail-page .facts {
  margin-block: 0 24px;
  background: var(--surface-tint);
}
.content-dialog button,
.detail-page button {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 14px;
  line-height: 20px;
  border-radius: 8px;
}
.content-dialog .actions {
  gap: 12px;
}
.detail-page {
  padding: var(--surface-padding);
  border-radius: 16px;
}
.detail-page > .page-heading {
  margin-bottom: 24px;
}
@media (max-width: 600px) {
  :root {
    --surface-padding: 20px;
    --surface-title-size: 20px;
  }
  .content-dialog {
    max-height: calc(100dvh - 24px);
    width: calc(100% - 24px);
  }
  .content-dialog .dialog-head {
    padding-block: 16px;
  }
  .content-dialog .facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .content-dialog .dialog-actions button {
    flex: 1 1 auto;
  }
}

.workspace .engagement-layout .detail {
  padding-block: 16px;
}
.engagement-workspace button {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 14px;
  line-height: 20px;
  border-radius: 8px;
}

/* Shared review layouts across all workspaces. */
.application-steps {
  display: flex;
  gap: 12px;
  padding: 0;
  margin: 0 0 24px;
  list-style: none;
  flex-wrap: wrap;
}
.application-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.application-steps li span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.application-steps [aria-current="step"] {
  color: var(--blue);
  font-weight: 600;
}
.plan-summary details {
  margin: 12px 0;
}
.plan-summary ul {
  margin: 8px 0;
  padding-inline-start: 24px;
}
.plan-summary li {
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.policy-change {
  margin-block: 24px;
}
.policy-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.policy-comparison > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.policy-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}
.policy-values dd {
  margin: 0;
}
.policy-comparison ul {
  padding-inline-start: 20px;
}
.filter-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 760px) {
  .policy-comparison {
    grid-template-columns: 1fr;
  }
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-block: 24px;
}
.task-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface, #fff);
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.task-card:hover {
  border-color: var(--blue);
  text-decoration: none;
}
.task-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.task-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.task-card .task-count {
  font-size: 40px;
  line-height: 1.2;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.task-card p {
  margin: 0;
  color: var(--muted);
}
.task-card .task-link {
  margin-block-start: auto;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
}
@media (max-width: 1000px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

/* Shared localized skills control for profiles, companions and opportunities. */
.skill-picker {
  min-width: 0;
  padding: 16px;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.skill-picker legend {
  padding-inline: 6px;
  font-size: 14px;
  color: var(--muted);
}
.skill-picker .field {
  margin-bottom: 12px;
}
.skill-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 3px;
}
.skill-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  overflow-wrap: anywhere;
  background: var(--surface);
}
.skill-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--blue);
}
.skill-option:has(input:checked) {
  border-color: var(--blue);
  background: var(--surface-tint);
  color: var(--blue);
}
.skill-option:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.skill-picker [hidden] {
  display: none !important;
}
.skill-picker > p {
  margin: 12px 0 0;
}
.skill-picker > button {
  margin-top: 12px;
}

.evidence-choice {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface);
}
.evidence-choice > .row-card {
  margin: 12px 0 0;
}

/* Agent authorization and confirmation reuse the shared surface geometry. */
.agent-panel {
  padding: var(--surface-padding);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  min-width: 0;
  overflow-wrap: anywhere;
}
.agent-panel .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block-start: 24px;
}
.agent-panel .detail {
  overflow-wrap: anywhere;
}

/* One workspace shell; groups express navigation hierarchy, not new permissions. */
.workspace #sidebar .sidebar-group {
  display: grid;
  gap: 4px;
}
.workspace #sidebar .sidebar-group + .sidebar-group {
  margin-block-start: 20px;
  padding-block-start: 20px;
  border-block-start: 1px solid var(--line);
}
.workspace #sidebar .sidebar-label {
  margin: 0 0 8px;
  padding-inline: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.workspace #sidebar .sidebar-group a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  padding-inline-start: 28px;
  color: var(--muted);
  border-radius: 9px;
  line-height: 1.5;
  transition: background 120ms ease, color 120ms ease;
}
.workspace #sidebar .sidebar-group a:hover:not(.active) {
  background: color-mix(in srgb, var(--surface-tint) 42%, white);
  color: var(--ink);
}
.workspace #sidebar .sidebar-group a.active {
  background: var(--surface-tint);
  color: var(--blue);
  font-weight: 650;
}
.workspace #sidebar .sidebar-group a.active::before {
  content: "";
  position: absolute;
  inset-inline-start: 10px;
  inset-block: 11px;
  width: 3px;
  border-radius: 3px;
  background: var(--blue);
}
#sidebar .org-select { width: 100%; margin-block: 8px 20px; }
.workspace-context { color: var(--muted); margin-block: -8px 20px; }
.overview-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-block: 20px 32px; }
.overview-grid .task-card { min-height: 108px; padding: 18px 20px; gap: 8px; }
.overview-grid .task-count { font-size: 30px; line-height: 1.2; }
.overview-grid .task-card h2 { font-size: 14px; margin: 0; }
.overview-section { margin-block: 28px; }
.overview-section > h2 { font-size: 18px; margin-block: 0 12px; }
.empty-state { border: 1px solid var(--line); border-radius: 16px; padding: var(--surface-padding); }
.agent-connect-guide { border: 1px solid var(--line); border-radius: 16px; padding: var(--surface-padding); margin-block: 20px; overflow-wrap: anywhere; }
.view-tabs a.is-selected, .help-topic-picker a.is-selected { background: var(--surface-tint); color: var(--blue); border-color: var(--blue-line); }
.help-topic-picker { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 24px; }
.help-topic-picker a { white-space: normal; }
.home-workflow ol { list-style-position: outside; padding-inline-start: 26px; margin-block: 24px; }
.home-workflow li { padding-inline-start: 10px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.home-workflow li:last-child { border: 0; }
.home-workflow li::marker { color: var(--blue); font-weight: 600; }
.home-workflow h3 { font-size: 17px; margin: 0 0 5px; }
.home-workflow li p { margin: 0; color: var(--muted); line-height: 1.6; }
@media (max-width: 600px) {
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid .task-card { padding: 16px; }

}

.workspace-navigation > summary { display: none; }
@media (max-width: 760px) {
  .workspace-navigation > summary { display: list-item; cursor: pointer; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--blue); }
  .workspace #sidebar .workspace-navigation nav { display: grid; overflow: visible; position: static; margin-top: 16px; }
  .workspace #sidebar a { white-space: normal; }
}

/* Navigation actions share the same geometry as form buttons. */
a.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 14px; font-size: 13px; font-weight: 500; line-height: 1.6; background: var(--surface); color: var(--blue); text-align: center; }
a.button:hover { background: var(--surface-tint); }
a.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
a.button.primary:hover { background: var(--blue-hover); }
.view-tabs a.button { background: transparent; border-color: transparent; color: var(--muted); }
.view-tabs a.button.is-selected { background: var(--surface-tint); color: var(--blue); font-weight: 600; }

/* Homepage: one reading sequence, with a single gap between sections. */
.landing { display: grid; gap: 64px; }
.landing .home-hero { padding: 48px 0 0; }
.landing .product-film { padding: 0; }
.landing .film-heading { margin-bottom: 20px; }
.landing .film-heading h2,
.home-cooperation > h2,
.home-sharing > h2 { font-size: 28px; line-height: 1.35; margin: 0 0 24px; }
.landing .film-heading h2 { margin: 0; }
.cooperation-grid { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cooperation-head,
.cooperation-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding: 24px; }
.cooperation-head { background: var(--surface-tint); padding-block: 14px; font-weight: 600; }
.cooperation-row + .cooperation-row { border-top: 1px solid var(--line); }
.cooperation-row h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; white-space: nowrap; }
.cooperation-row h3 span { flex-shrink: 0; font-size: 12px; color: var(--blue); }
.cooperation-row h4 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cooperation-row p { margin: 0; line-height: 1.8; color: var(--muted); overflow-wrap: anywhere; }
.cooperation-notes { border-top: 1px solid var(--line); padding: 18px 24px; display: grid; gap: 8px; }
.cooperation-notes p { margin: 0; display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.cooperation-notes p::before { content: ""; flex: 0 0 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--blue); opacity: .55; }
@media (max-width: 740px) { .cooperation-notes { padding: 16px 20px; } }
.sharing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.sharing-grid h3 { font-size: 17px; margin: 0 0 10px; }
.sharing-grid p { color: var(--muted); margin: 0; line-height: 1.8; }
.home-sharing { padding-bottom: 24px; }
.home-sharing > .actions { margin: 24px 0 0; }
@media (max-width: 740px) {
  .landing { gap: 36px; }
  .landing .home-hero { padding: 28px 0 0; gap: 28px; }
  .landing .film-heading h2,
  .home-cooperation > h2,
  .home-sharing > h2 { font-size: 23px; }
  .cooperation-head { display: none; }
  .cooperation-row { grid-template-columns: 1fr; padding: 20px; gap: 16px; }
  .cooperation-row h3 { display: flex; align-items: center; gap: 10px; }
  .cooperation-row h3 span { margin: 0; }
  .cooperation-row h4 { position: static; width: auto; height: auto; overflow: visible; clip-path: none; font-size: 14px; margin: 0 0 6px; }
  .sharing-grid { grid-template-columns: 1fr; gap: 24px; }
}

.agent-setup h2 { font-size: 20px; margin: 0 0 16px; }
.agent-setup h3 { font-size: 16px; margin: 20px 0 10px; }
.agent-setup pre { max-width: 100%; overflow-x: auto; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-tint); font-size: 13px; text-align: start; white-space: pre; }
.agent-setup details { margin-block: 20px; }
.agent-setup summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.agent-setup .agent-example { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); min-width: 0; }
.agent-setup .agent-example h3 { margin-top: 0; }
.agent-setup .agent-source { margin-block: 12px; }
.agent-setup .agent-command { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }

/* Shared MCP documentation shell; business references are filtered by role. */
.mcp-docs { min-width: 0; }
.mcp-doc-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0 0 16px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.mcp-doc-nav a { color: var(--muted); padding: 8px 0; border-bottom: 2px solid transparent; }
.mcp-doc-nav a[aria-current="page"] { color: var(--blue); border-color: var(--blue); font-weight: 650; }
.mcp-doc-content { min-width: 0; width: 100%; }
.mcp-doc-content > section { width: 100%; min-width: 0; max-width: none; }
.mcp-doc-content h2 { margin: 0 0 14px; font-size: 22px; line-height: 1.4; }
.mcp-doc-content h3 { margin: 28px 0 12px; font-size: 16px; }
.mcp-doc-content p { line-height: 1.8; }
.mcp-prose { width: 100%; min-width: 0; }
.mcp-code { margin-block: 14px 22px; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mcp-code-toolbar { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--surface-tint); }
.mcp-code-toolbar button { padding: 4px 10px; font-size: 12px; }
.mcp-code pre { margin: 0; border: 0; border-radius: 0; padding: 16px; overflow: auto; max-height: 380px; font-size: 12px; line-height: 1.75; white-space: pre; text-align: start; }
.mcp-reference-heading { margin-bottom: 24px; }
.mcp-reference-heading p { color: var(--muted); }
.mcp-reference-layout { display: grid; grid-template-columns: 245px minmax(0,1fr); gap: 28px; align-items: start; }
.mcp-method-index { min-width: 0; position: sticky; top: 20px; }
.mcp-method-index label { display: block; font-size: 13px; margin-bottom: 8px; }
.mcp-method-index input { width: 100%; min-width: 0; margin-bottom: 12px; }
.mcp-method-index nav { display: grid; gap: 4px; max-height: 64vh; overflow: auto; padding-inline-end: 4px; }
.mcp-method-index nav a { display: grid; gap: 6px; padding: 12px; border-radius: 8px; color: var(--ink); }
.mcp-method-index nav a[hidden] { display: none; }
.mcp-method-index nav a:hover { background: var(--surface-tint); }
.mcp-method-index nav a[aria-current="page"] { background: var(--surface-tint); box-shadow: inset 3px 0 var(--blue); }
[dir="rtl"] .mcp-method-index nav a[aria-current="page"] { box-shadow: inset -3px 0 var(--blue); }
.mcp-method-index code { font-size: 12px; overflow-wrap: anywhere; }
.mcp-method-index span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.mcp-method { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.mcp-method-title h2 { overflow-wrap: anywhere; font-size: 20px; margin-block: 12px; }
.mcp-scopes { display: flex; flex-wrap: wrap; gap: 8px; }
.mcp-scopes code { border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 12px; overflow-wrap: anywhere; }
.mcp-param-wrap { overflow-x: auto; }
.mcp-param-wrap table { min-width: 480px; font-size: 12px; }
.mcp-param-wrap th { text-align: start; }
.mcp-param-wrap code { white-space: normal; overflow-wrap: anywhere; }
.mcp-method details summary, .mcp-prose details summary { cursor: pointer; color: var(--blue); padding-block: 8px; }
.mcp-method > p code { overflow-wrap: anywhere; }
.mcp-sdk .agent-source pre { max-height: 360px; }
@media (max-width: 1100px) {
 .mcp-reference-layout { grid-template-columns: 1fr; }
 .mcp-method-index { position: static; }
 .mcp-method-index nav { max-height: 230px; grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
 .mcp-doc-nav { gap: 8px 16px; }
 .mcp-method { padding: 18px; }
 .mcp-method-index nav { grid-template-columns: 1fr; }
}

/* Workspace context is metadata above the tabs, not a divided detail row. */
.agent-workspace-context > .detail {
  border-bottom: 0;
}

/* Shared enterprise context selector, including narrow and RTL layouts. */
#sidebar .organization-switcher { margin: 0 0 24px; padding-inline: 8px; }
#sidebar .organization-switcher > label { display: block; margin: 0 0 8px; font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--muted); }
.organization-select-control { position: relative; }
#sidebar .organization-select-control .org-select {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 11px 12px;
  padding-inline-end: 36px;
  border: 1px solid var(--blue-line);
  border-radius: 10px;
  background: var(--surface-tint);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  cursor: pointer;
}
.organization-select-control > svg { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
#sidebar .organization-select-control .org-select:hover { border-color: var(--blue); }
#sidebar .organization-select-control .org-select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Short role choices stay visible instead of opening a platform-native menu. */
.member-role-picker { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.member-role-picker legend { padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.member-role-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.member-role-options .member-role-option { display: flex; align-items: center; gap: 10px; margin: 0; min-height: 52px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.member-role-option input[type="radio"] { appearance: auto; flex: 0 0 16px; width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--blue); }
.member-role-option span { font-size: 14px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.member-role-options .member-role-option:has(input:checked) { background: var(--surface-tint); border-color: var(--blue); }
.member-role-option:has(input:checked) span { color: var(--blue); font-weight: 600; }
.member-role-options .member-role-option:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 600px) { .member-role-options { grid-template-columns: 1fr; } }

.billing-plan-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.billing-plan-grid .agent-panel { margin: 0; }
.billing-limits { margin: 18px 0; }
.billing-limits > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.billing-limits dt { font-size: 13px; color: var(--muted); }
.billing-limits dd { margin: 0; font-weight: 600; }
@media(max-width:760px) { .billing-plan-grid { grid-template-columns: 1fr; } }

.billing-page > .agent-panel + .agent-panel { margin-top: 24px; }
.billing-audience { margin-block: 28px 36px; }
.billing-audience > h2 { font-size: 20px; margin: 0 0 14px; }
.billing-audience > p { margin-bottom: 20px; }
.billing-audience .billing-plan-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.billing-plan-grid .agent-panel { display: flex; flex-direction: column; }
.billing-plan-grid .agent-panel h3 { margin: 0; font-size: 18px; }
.billing-plan-grid .actions { margin-top: auto; padding-top: 12px; }
.billing-plan-price { font-size: 22px; font-weight: 600; margin: 18px 0 0; }
.billing-plan-price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.billing-personal-card { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 24px; align-items: center; }
.billing-personal-card h3 { margin: 0 0 8px; font-size: 17px; }
.billing-personal-card p { margin: 0; }
.billing-personal-card .actions { margin: 0; }
.billing-personal-allowance { display: grid; gap: 6px; max-width: 230px; }
.billing-personal-allowance span { font-size: 12px; color: var(--muted); }
.billing-personal-allowance strong { font-size: 23px; }
@media(max-width:1100px) { .billing-audience .billing-plan-grid { grid-template-columns: 1fr; } }
@media(max-width:760px) { .billing-personal-card { grid-template-columns: 1fr; gap: 18px; } }

.billing-usage { margin-block:24px; padding:24px; border:1px solid var(--line); border-radius:12px; }
.billing-usage h3 { margin:0; }
.billing-usage > p { color:var(--muted); margin-block:8px 20px; }
.billing-usage-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.billing-usage-grid span { display:block; color:var(--muted); }
.billing-usage-grid strong { display:block; font-size:28px; margin-block:8px; }
.billing-usage progress { width:100%; height:8px; accent-color:var(--blue); margin-block-start:16px; }
@media(max-width:480px) { .billing-usage { padding:16px; } .billing-usage-grid { grid-template-columns:1fr; } }

/* Free benefits belong to the cooperation columns, not a separate card section. */
.cooperation-benefit { display:inline-block; margin-inline-start:12px; color:var(--blue); font-size:12px; font-weight:500; }

/* SDK: business categories first, individual methods on demand. */
.sdk-category { margin-block: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sdk-category > summary { padding: 18px 20px; color: var(--ink); font-size: 16px; cursor: pointer; }
.sdk-category > summary .badge { margin-inline-start: 12px; }
.sdk-category[open] > summary { background: var(--surface-tint); border-radius: 12px 12px 0 0; }
.sdk-category-content { padding: 8px 20px 20px; }
.sdk-category .sdk-method { margin: 0; padding-block: 12px; border-bottom: 1px solid var(--line); }
.sdk-category .sdk-method:last-child { border-bottom: 0; }
.sdk-method > summary { display: flex; align-items: start; justify-content: space-between; gap: 16px; color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; }
.sdk-method > summary > span:first-child { min-width: 0; }
.sdk-method > summary code { color: var(--blue); font-size: 13px; overflow-wrap: anywhere; }
.sdk-method-description { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.sdk-method > summary .badge { flex-shrink: 0; font-size: 11px; }
.sdk-method[open] > summary { margin-bottom: 20px; }
@media (max-width: 600px) { .sdk-category-content { padding-inline: 12px; } .sdk-method > summary { flex-wrap: wrap; gap: 8px; } }

.mcp-error-group { padding-block: 12px; border-bottom: 1px solid var(--line); }
.mcp-error-group li { margin-block: 8px; }
.mcp-error-list { margin: 0; }
.mcp-error-list > div { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.mcp-error-list > div:last-child { border-bottom: 0; }
.mcp-error-list dt { overflow-wrap: anywhere; font-size: 13px; }
.mcp-error-list dd { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .mcp-error-list > div { grid-template-columns: 1fr; gap: 6px; } }

.mcp-method-index [data-method-group] h3 { color: var(--muted); font-size: 12px; margin: 16px 12px 6px; }
.mcp-method-index [data-method-group][hidden] { display: none; }

/* Shared fields: suppress platform-native select chrome while retaining keyboard behavior. */
.field select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  padding-inline: 12px 40px;
  background-color: var(--surface-tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
[dir="rtl"] .field select:not([multiple]) { background-position: left 12px center; }
.facts > dt:nth-last-child(2), .facts > dd:last-child { border-bottom: 0; }
.organization-profile { display: grid; gap: 24px; margin-block: 24px; }
.organization-profile .facts { margin: 0; }
.organization-profile .detail { border: 0; padding: 0; }
.organization-profile h3 { margin: 0 0 12px; font-size: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 20px; }
.company-summary { display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.company-summary img { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; }
.company-summary h2 { font-size: 18px; margin: 0 0 6px; }
.company-summary p { margin: 0; color: var(--muted); }
@media(max-width:640px) { .form-grid { grid-template-columns: minmax(0,1fr); } }
.company-logo { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; vertical-align: middle; margin-inline-end: 10px; }
.record-meta .company-logo { width: 28px; height: 28px; border-radius: 6px; padding: 3px; margin: 0; }
.company-summary p { white-space: pre-line; }

/* Help reuses the site's typography, surfaces and action controls. */
.help-center { max-width: var(--public-content-width); margin-inline: auto; padding-block: 12px 32px; }
.public-page-header { text-align: center; margin-block-end: 28px; }
.public-page-header h1 { font-size: 28px; line-height: 1.3; margin-block: 0 12px; letter-spacing: -0.025em; }
.public-page-header p { color: var(--muted); margin: 0; }
.help-search { max-width: 640px; margin: 0 auto 32px; }
.help-search label { display: block; color: var(--muted); margin-block-end: 8px; }
.help-search-controls { display: flex; align-items: stretch; gap: 10px; }
.help-search-controls input { flex: 1; min-width: 0; }
.help-search-controls button { flex-shrink: 0; margin: 0; }
.help-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-block-end: 32px; }
.help-category { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.help-category strong { font-size: 16px; }
.help-category > span:not(.help-category-arrow) { grid-column: 1; color: var(--muted); font-size: 13px; }
.help-category-arrow { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--blue); }
.help-category:hover, .help-category.is-selected { background: var(--surface-tint); border-color: var(--blue-line); }
.help-category:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.help-results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.help-results-heading h2 { margin: 0; }
.help-results > .muted { margin-block: 8px 16px; color: var(--muted); }
.help-answer { border: 0; border-block-start: 1px solid var(--line); border-radius: 0; padding: 0; background: transparent; }
.help-answer:last-child { border-block-end: 1px solid var(--line); }
.help-answer > summary { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; list-style: none; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; }
.help-answer > summary::-webkit-details-marker { display: none; }
.help-answer > summary::after { content: '+'; color: var(--blue); font-size: 20px; line-height: 1.2; }
.help-answer[open] > summary::after { content: '−'; }
.help-answer-body { padding: 0 0 18px; max-width: none; width: 100%; color: var(--muted); }
.help-answer-body p { margin-block: 0 14px; overflow-wrap: anywhere; }
.help-answer-body p:last-child { margin-block-end: 0; }
.help-support { border: 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-block-start: 32px; padding-block: 24px; }
.help-support h2 { margin: 0 0 8px; font-size: 18px; }
.help-support p { margin: 0; color: var(--muted); }
@media (max-width: 760px) {
  .help-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-search-controls { flex-wrap: wrap; }
  .help-search-controls input { flex-basis: 100%; }
  .help-support { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 420px) { .help-category-grid { grid-template-columns: 1fr; } }

.help-browse { display: flex; justify-content: center; margin-block-start: 24px; }
.help-browse:has(button[hidden]) { display: none; }

/* Highlight on-platform discovery without confusing emphasis with selection. */
.list-category-tabs .button.is-featured { color: var(--blue); font-weight: 700; display: inline-flex; align-items: center; gap: .45rem; }
.discovery-tab-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.65rem; height: 1.65rem; border-radius: .5rem; background: var(--blue-soft); flex: 0 0 1.65rem; }
.discovery-tab-icon svg { width: 1.15rem; height: 1.15rem; }
.list-category-tabs .is-selected .discovery-tab-icon { background: #fff; }

/* Task-sized payment dialogs. */
.checkout-summary { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid #e0e6ef; align-items: center; }
.checkout-summary strong { font-size: 28px; color: #202c40; }
.checkout-summary small { text-align: end; color: #65728a; }
.content-dialog .checkout-methods { border: 0; padding: 0; margin: 24px 0; min-width: 0; }
.checkout-methods legend { margin-bottom: 12px; font-weight: 600; }
.checkout-method { display: flex; align-items: center; gap: 12px; border: 1px solid #dfe6f0; border-radius: 12px; padding: 14px 16px; margin-top: 10px; cursor: pointer; }
.checkout-method:has(input:checked) { border-color: #0878ee; background: #f2f7ff; box-shadow: 0 0 0 1px #0878ee; }
.content-dialog .checkout-method input[type=radio] { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: #0878ee; }
.checkout-method-icon { display: grid; place-items: center; width: 34px; height: 34px; background: white; border: 1px solid #e0e6ef; border-radius: 8px; color: #0878ee; font-size: 22px; }
.checkout-note,.payment-confirm-copy,.checkout-order { color: #65728a; font-size: 14px; line-height: 1.65; margin: 0 0 20px; }
.checkout-order { margin-top: 12px; font-size: 12px; overflow-wrap: anywhere; }
.checkout-qr { text-align: center; margin: 20px 0; }
.checkout-qr .payment-image { width: 184px; height: 184px; object-fit: contain; margin: 12px auto; display: block; }
.checkout-qr h3 { font-size: 16px; }
.checkout-qr p { font-size: 14px; overflow-wrap: anywhere; }
.content-dialog.checkout-dialog .hint { font-size: 13px; padding: 12px; margin-block: 16px; }


/* One shared dialog contract, including narrow screens and RTL. */
.content-dialog .dialog-body { overflow-wrap: anywhere; }
.content-dialog .dialog-body:has(.dialog-form) { padding: 0; }
.content-dialog .form-fields { padding: 24px; }
.content-dialog .dialog-actions { margin: 0; padding: 16px 24px; background: var(--surface-tint); }
.content-dialog button { min-height: 44px; }
.content-dialog .dialog-head h2 { min-width: 0; overflow-wrap: anywhere; }
.content-dialog .dialog-head > button { flex-shrink: 0; }
.content-dialog :is(input,select,textarea) { max-width: 100%; box-sizing: border-box; }
.content-dialog img { max-width: 100%; }
.content-dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media(max-width:600px) {
 .content-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
 .content-dialog .form-fields { padding: 16px; }
 .content-dialog .dialog-head { padding: 16px; }
 .content-dialog .dialog-actions { padding: 12px 16px max(12px,env(safe-area-inset-bottom)); }
 .content-dialog :is(input:not([type=radio]):not([type=checkbox]),select,textarea) { font-size: 16px; min-width: 0; }
 .content-dialog .dialog-actions button { flex: 1 1 120px; white-space: normal; }
 .checkout-summary strong { font-size: 24px; }
 .checkout-method { min-width: 0; }
}

.upgrade-steps {display:grid;grid-template-columns:1fr 1fr;gap:16px;list-style:none;margin:0 0 24px;padding:0;}
.upgrade-steps li {display:flex;align-items:center;gap:10px;color:var(--muted);font-size:14px;padding-block:12px;border-bottom:2px solid var(--line);}
.upgrade-steps li[aria-current=step] {color:var(--blue,#0878ee);border-color:currentColor;font-weight:600;}
.upgrade-step-number {display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:50%;background:var(--surface-tint);}
.upgrade-steps [aria-current=step] .upgrade-step-number {background:#0878ee;color:#fff;}
.upgrade-now {font-weight:600;margin:0 0 8px;}
.upgrade-next {font-size:14px;line-height:1.7;color:var(--muted);margin:0 0 24px;}
@media(max-width:420px){.upgrade-steps{gap:12px}.upgrade-steps li{align-items:flex-start;font-size:13px;gap:8px}}

/* Shared progress language across applications, verification and payment. */
.workflow-steps { display:flex; gap:16px; list-style:none; margin:0 0 24px; padding:0; }
.workflow-steps li { flex:1; min-width:0; display:flex; align-items:center; gap:10px; padding:12px 0; border-bottom:2px solid var(--line); color:var(--muted); font-size:14px; }
.workflow-steps li > span { display:grid; place-items:center; flex:0 0 28px; width:28px; min-width:28px; height:28px; border-radius:50%; background:var(--surface-tint); }
.workflow-steps strong { font-weight:500; overflow-wrap:anywhere; }
.workflow-steps [aria-current=step] { color:var(--blue,#0878ee); border-color:currentColor; }
.workflow-steps [aria-current=step] > span { background:#0878ee; color:white; }
.workflow-steps [aria-current=step] strong { font-weight:650; }
.workflow-note { color:var(--muted); font-size:14px; line-height:1.75; margin:0 0 24px; }
.collection-targets { max-height:200px; overflow:auto; padding-inline-start:20px; }
@media(max-width:600px){.workflow-steps{gap:10px}.workflow-steps li{flex-direction:column;align-items:flex-start;gap:8px;font-size:13px}.workflow-note{margin-bottom:20px}}

.workflow-steps [data-step-state=complete] { color:var(--blue,#0878ee); }
.workflow-steps [data-step-state=blocked] { color:#9a6413; border-color:currentColor; }
.workflow-steps [data-step-state=blocked] > span { background:#fff3d9; color:#9a6413; }
.workflow-status { padding:16px; border:1px solid var(--line); border-radius:12px; margin-bottom:24px; }
.workflow-status p { margin:8px 0 0; overflow-wrap:anywhere; }

/* Contain shared dialog content, including custom forms and RTL steps. */
.content-dialog :is(.dialog-body,.dialog-form,.form-fields) { min-width:0; box-sizing:border-box; }
.content-dialog .workflow-steps { width:100%; box-sizing:border-box; }
.workflow-steps strong { min-width:0; }

.member-role-option > label { display:flex; align-items:center; flex:1; min-width:0; gap:10px; margin:0; cursor:pointer; }
.member-role-options .member-role-option { gap:4px; padding:8px 10px; }
.content-dialog .member-role-info { flex:0 0 44px; width:44px; height:44px; min-height:44px; padding:0; border:0; background:transparent; color:var(--blue); font-size:16px; border-radius:50%; }
.member-role-info[aria-expanded=true] { background:var(--surface-tint); }
.member-role-help { margin-top:12px; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--surface-tint); }
.member-role-help h3 { margin:0 0 8px; font-size:15px; }
.member-role-help p { margin:0; line-height:1.7; overflow-wrap:anywhere; }

/* Shared role permission details: one capability per row. */
.member-role-help { background:var(--surface); }
.member-role-help h4 { margin:16px 0 8px; font-size:13px; color:var(--muted); }
.permission-list { list-style:none; padding:0; margin:0; }
.permission-row { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:9px 0; border-bottom:1px solid var(--line); font-size:14px; }
.permission-row > span:first-child { min-width:0; overflow-wrap:anywhere; }
.permission-status { flex-shrink:0; font-size:12px; font-weight:600; }
.is-allowed .permission-status { color:#19724b; }
.is-restricted .permission-status { color:var(--muted); }
.permission-extra { margin:16px 0; padding:1px 12px 8px; border:1px solid var(--line); border-radius:8px; }
.permission-extra.is-granted { background:var(--surface-tint); border-color:var(--blue); }
.permission-extra.is-granted h4, .permission-extra.is-granted .permission-status { color:var(--blue); }
.member-role-help .permission-note { font-size:12px; color:var(--muted); line-height:1.6; }
.assignment-choice { display:flex; align-items:flex-start; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.assignment-choice input { flex:0 0 auto; width:18px; height:18px; }
.assignment-choice span { min-width:0; overflow-wrap:anywhere; }

.member-role-options > label.member-role-option { display:flex; align-items:center; cursor:pointer; gap:10px; padding:16px; min-height:64px; }
.member-role-option:focus-within { outline:2px solid var(--blue); outline-offset:3px; }

/* Shared role workbench */
.workbench{display:grid;gap:24px;margin-block:24px}
.workbench-focus{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px;border:1px solid var(--line);border-inline-start:4px solid var(--blue);border-radius:16px;background:var(--surface,#fff)}
.workbench-focus h2{margin:6px 0;font-size:24px}.workbench-focus p{margin:6px 0}.workbench-focus>div{min-width:0;overflow-wrap:anywhere}.workbench-focus>.button{flex-shrink:0}
.workbench-columns{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:24px;align-items:start}.workbench-side{display:grid;gap:24px;min-width:0}
.workbench-panel{border:1px solid var(--line);border-radius:16px;overflow:hidden;min-width:0;background:var(--surface,#fff)}
.workbench-panel-heading{padding:20px 24px;border-bottom:1px solid var(--line)}.workbench-panel-heading h2{font-size:18px;margin:0 0 6px}
.workbench-task{display:flex;gap:20px;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--line)}.workbench-task:last-child{border-bottom:0}.workbench-task h3{font-size:16px;margin:6px 0;overflow-wrap:anywhere}.workbench-task p{margin:4px 0}.workbench-task>.button{flex-shrink:0}.workbench-task .record-main{min-width:0}
.workbench-shortcut{display:flex;justify-content:space-between;gap:16px;padding:18px 24px;color:var(--ink);border-bottom:1px solid var(--line);text-decoration:none}.workbench-shortcut:last-child{border-bottom:0}.workbench-shortcut strong{color:var(--blue);font-variant-numeric:tabular-nums}.workbench-shortcut:hover{background:#f5f8ff}
@media(max-width:1000px){.workbench-columns{grid-template-columns:1fr}.workbench-side{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.workbench-focus{align-items:stretch;flex-direction:column;padding:20px}.workbench-side{grid-template-columns:1fr}.workbench-task{align-items:flex-start;flex-direction:column;padding:18px}.workbench-panel-heading{padding:18px}.workbench-focus h2{font-size:21px}}

.workbench-empty{padding:24px;min-width:0}.workbench-empty p{margin:0 0 16px}.workbench-panel-heading p{margin:0}.workbench-panel-heading h2{margin:0 0 6px}

/* Role workbench keeps actionable records together, independent of activity height. */
.workbench-main-stack{display:grid;gap:20px;min-width:0}
.workbench-queue-grid{display:grid;grid-template-columns:repeat(var(--queue-count,4),minmax(0,1fr));gap:12px}
.workbench-queue-grid .workbench-shortcut{border:1px solid var(--line);border-radius:12px;padding:18px 20px;align-items:center;background:var(--surface,#fff)}
.workbench-queue-grid strong{font-size:26px;line-height:1.2}
.workbench-queue-grid span{min-width:0;overflow-wrap:anywhere;font-size:14px}
.role-workbench .workbench-focus{background:var(--surface-tint);border:1px solid var(--blue-line,var(--line));padding:24px}
.role-workbench .workbench-columns:not(:has(aside)){grid-template-columns:minmax(0,1fr)}
.role-workbench .workbench-side{gap:12px}
.workbench-activity{display:flex;align-items:flex-start;gap:10px;padding:18px 20px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}
.workbench-activity:last-child{border-bottom:0}
.workbench-activity:hover{background:var(--surface-tint)}
.workbench-activity>div{min-width:0}
.workbench-activity h3{font-size:14px;font-weight:600;line-height:1.6;margin:0 0 6px;overflow-wrap:anywhere}
.workbench-activity p{margin:0;font-size:12px;overflow-wrap:anywhere}
.workbench-activity-dot{width:6px;height:6px;border-radius:50%;background:var(--blue);flex:0 0 6px;margin-top:8px}
.workbench-all-activity{font-size:13px;text-align:end;padding:4px 2px}
@media(max-width:1000px){.role-workbench .workbench-side{grid-template-columns:1fr}.workbench-queue-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.workbench-queue-grid .workbench-shortcut{padding:14px;gap:8px}.workbench-queue-grid strong{font-size:24px}.role-workbench{gap:16px}.workbench-main-stack{gap:16px}.role-workbench .workbench-focus{padding:20px}}

@media(min-width:1001px){.workbench-queue-grid[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}.workbench-queue-grid[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Shared guide export entry, used in both workspaces and all guide tabs. */
.mcp-guide-download { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px; margin-bottom:24px; border:1px solid var(--line); border-radius:12px; }
.mcp-guide-download p { margin:6px 0 0; }
.mcp-guide-download .button { flex-shrink:0; }
@media (max-width:600px) { .mcp-guide-download { align-items:stretch; flex-direction:column; } .mcp-guide-download .button { text-align:center; white-space:normal; } }

/* Structured basics shared by personal and company integration guides. */
.mcp-guide-intro { padding:16px 20px; border-inline-start:3px solid var(--blue); background:var(--surface-tint); border-radius:0 8px 8px 0; line-height:1.8; }
.mcp-guide-steps { list-style:none; padding:0; margin:24px 0 16px; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.mcp-guide-steps li { display:flex; align-items:flex-start; gap:10px; padding:14px 12px; background:var(--surface-tint); border-radius:10px; line-height:1.6; min-width:0; overflow-wrap:anywhere; }
.mcp-guide-step-number { display:grid; place-items:center; flex:0 0 26px; height:26px; border-radius:50%; color:#fff; background:var(--blue); font-weight:650; }
.mcp-guide-network { color:var(--muted); font-size:13px; margin-bottom:28px; }
.mcp-guide-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.mcp-guide-card { padding:22px 24px; border:1px solid var(--line); border-radius:12px; min-width:0; }
.mcp-doc-content .mcp-guide-card h3 { margin:0 0 16px; font-size:17px; }
.mcp-guide-points { padding-inline-start:20px; margin:0; display:grid; gap:12px; line-height:1.85; }
.mcp-guide-points li { padding-inline-start:4px; }
.mcp-guide-points li::marker { color:var(--blue); }
.mcp-guide-points code,.mcp-guide-intro code { padding:2px 5px; border-radius:4px; background:var(--surface-tint); color:var(--blue); font-size:.92em; overflow-wrap:anywhere; }
.mcp-guide-capabilities { margin-top:20px; }
.mcp-guide-boundaries { padding:12px 20px; margin-top:20px; border:1px solid var(--line); border-radius:10px; }
.mcp-guide-boundaries[open] .mcp-guide-points { margin:12px 0; }
@media(max-width:1100px) { .mcp-guide-steps { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .mcp-guide-steps,.mcp-guide-cards { grid-template-columns:minmax(0,1fr); } .mcp-guide-card { padding:18px; } }

/* One detail system for candidate, employer and administrator dialogs.
   facts accepts trusted markup; detailRows escapes plain text then delegates. */
.content-dialog .facts {
  grid-template-columns: minmax(110px, 28%) minmax(0, 1fr);
  margin: 16px 0 24px;
  background: transparent;
  border: 0;
}
.content-dialog .facts dt, .content-dialog .facts dd {
  min-width: 0;
  padding: 13px 0;
  line-height: 1.6;
  border-bottom: 1px solid var(--line);
}
.content-dialog .facts dt { padding-inline-end: 16px; color: var(--muted); }
.content-dialog .facts dd { padding-inline-start: 0; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.content-dialog .facts > dt:nth-last-child(2), .content-dialog .facts > dd:last-child { border-bottom: 0; }
.content-dialog .detail { margin: 12px 0; padding: 16px 18px; border: 0; border-radius: 10px; background: var(--surface-tint); }
.content-dialog .detail h3 { margin: 0 0 10px; color: var(--ink); font-size: 14px; font-weight: 650; }
.content-dialog .detail p { line-height: 1.8; }
.content-dialog .organization-profile .detail { padding: 16px 18px; }
.content-dialog .section-title { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.content-dialog .section-title h2 { margin-bottom: 0; }
.content-dialog .row-card { min-width: 0; overflow-wrap: anywhere; }
.record-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.checkout-summary > * { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .content-dialog .facts { grid-template-columns: minmax(0, 1fr); }
  .content-dialog .facts dt { padding: 12px 0 4px; border-bottom: 0; }
  .content-dialog .facts dd { padding: 0 0 12px; }
  .content-dialog .detail, .content-dialog .organization-profile .detail { padding: 14px; }
}

/* Companion identity is optional and separate from capability evidence. */
.identity-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;margin-inline:4px;border-radius:6px;font-size:12px;color:var(--muted);background:var(--surface-tint);vertical-align:middle;white-space:normal}
.identity-badge svg{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.identity-badge.is-verified{color:#16714e;background:#e6f4ed}
.identity-intro h3{margin:16px 0 8px}.identity-intro p,.identity-steps p{color:var(--muted);line-height:1.7}
.identity-steps{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:0;list-style:none;counter-reset:identity}
.identity-steps li{min-width:0;border:1px solid var(--line);border-radius:12px;padding:18px;counter-increment:identity}
.identity-steps li:before{content:counter(identity);display:block;color:var(--brand);font-weight:700;margin-bottom:10px}
.identity-command{white-space:pre-wrap;overflow-wrap:anywhere;padding:16px;background:var(--surface-tint);border-radius:10px;font-size:12px}
@media(max-width:600px){.identity-steps{grid-template-columns:1fr}.identity-badge{margin-top:4px}}

/* Compact repeatable records in dialogs; keep toolbar and records separate. */
.content-dialog .dialog-list-record { margin-block:16px; padding:16px; border:1px solid var(--line); border-radius:10px; min-width:0; }
.content-dialog .dialog-list-record > .badge { margin-bottom:10px; }
.content-dialog .dialog-list-record > .actions { margin-top:14px; }
.content-dialog .dialog-list-record details { margin-block:0; }
.content-dialog .compact-history { padding:14px 0; margin:0; min-height:0; }
.content-dialog .compact-history .record-summary { margin:0 0 8px; }
.content-dialog .compact-history .facts { margin:0; padding:0; }
.content-dialog .compact-history .facts dt,
.content-dialog .compact-history .facts dd { padding-block:7px; }
@media(max-width:600px) {
 .content-dialog .dialog-list-record { padding:12px; }
 .content-dialog .compact-history .facts dt { padding-bottom:2px; }
 .content-dialog .compact-history .facts dd { padding-top:0; }
}
