:root {
  --ink: #17201f;
  --ink-2: #25302e;
  --paper: #f4f5f1;
  --white: #ffffff;
  --line: #d9ddd7;
  --muted: #6f7976;
  --green: #187a5b;
  --green-soft: #dcece4;
  --coral: #dd684c;
  --coral-soft: #f5dfd7;
  --blue: #28658d;
  --blue-soft: #dce8ef;
  --amber: #b47a19;
  --amber-soft: #f4ead5;
  --danger: #b24b42;
  --shadow: 0 18px 46px rgba(23, 32, 31, .1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible { outline: 3px solid rgba(40, 101, 141, .28); outline-offset: 2px; }
svg { stroke-width: 1.8; }

.app-locked { overflow: hidden; background: #111a19; }
.app-locked > .topbar, .app-locked > .workspace, .app-locked > .mobile-footer, .app-locked > .toast, .app-locked > .account-modal { display: none; }
.app-locked > .route-view { display: none; }
.workspace[hidden] { display: none !important; }
.route-mode .mobile-footer { display: none !important; }
.access-gate { position: fixed; z-index: 100; inset: 0; display: flex; flex-direction: column; min-height: 100dvh; overflow-y: auto; color: #fff; background: #111a19; }
.access-gate[hidden] { display: none; }
.access-brand { display: flex; align-items: center; gap: 11px; min-height: 78px; padding: 0 clamp(22px, 5vw, 72px); border-bottom: 1px solid rgba(255,255,255,.11); }
.access-brand-mark { display: grid; place-items: center; width: 38px; height: 38px; flex: none; color: #fff; background: var(--coral); border-radius: 6px; font-weight: 700; }
.access-brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.access-brand strong, .access-brand span { display: block; }
.access-brand strong { font-size: 16px; }
.access-brand div > span { margin-top: 3px; color: #95a39f; font-size: 12px; }
.access-layout { width: min(1180px, calc(100% - 44px)); margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: clamp(64px, 10vw, 150px); padding: 48px 0; }
.access-intro { max-width: 610px; }
.access-eyebrow { display: block; margin-bottom: 20px; color: #72cda4; font: 600 10px "DM Mono", monospace; }
.access-intro h1 { max-width: 600px; margin: 0; font-size: clamp(36px, 4.5vw, 62px); line-height: 1.18; font-weight: 650; letter-spacing: 0; }
.access-intro > p { max-width: 570px; margin: 24px 0 0; color: #b2bfbb; font-size: 15px; line-height: 1.85; }
.access-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 42px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); }
.access-proof > div { display: flex; align-items: flex-start; gap: 10px; min-height: 92px; padding: 16px 13px; background: #16211f; }
.access-proof svg { width: 18px; flex: none; color: #72cda4; }
.access-proof span, .access-proof b, .access-proof small { display: block; }
.access-proof b { font-size: 13px; }
.access-proof small { margin-top: 6px; color: #889793; font-size: 11px; line-height: 1.5; }
.access-card { position: relative; min-height: 470px; padding: 34px; color: var(--ink); background: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; box-shadow: 0 28px 70px rgba(0,0,0,.28); }
.access-card-head { display: flex; align-items: center; gap: 13px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.access-card-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; color: var(--green); background: var(--green-soft); border-radius: 6px; }
.access-card-icon svg { width: 19px; }
.access-card-head span, .access-card-head h2 { display: block; }
.access-card-head div > span { color: var(--muted); font-size: 11px; }
.access-card-head h2 { margin: 3px 0 0; font-size: 21px; }
.access-card-copy { margin: 21px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.access-form { display: flex; flex-direction: column; gap: 15px; }
.access-form[hidden] { display: none; }
.access-form label > span:first-child { display: block; margin-bottom: 7px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.access-form input { width: 100%; height: 43px; padding: 0 12px; color: var(--ink); background: #f8f9f7; border: 1px solid #ccd2ce; border-radius: 5px; outline: 0; font-size: 14px; }
.access-form input:focus { background: #fff; border-color: var(--green); box-shadow: 0 0 0 3px rgba(24,122,91,.1); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 43px; }
.password-toggle { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 35px; height: 35px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 4px; }
.password-toggle:hover { color: var(--ink); background: #eef1ed; }
.password-toggle svg { width: 15px; }
.access-error { display: none; min-height: 34px; padding: 8px 10px; color: #913c35; background: #fae9e6; border-left: 3px solid var(--danger); font-size: 12px; line-height: 1.5; }
.access-error.visible { display: block; }
.access-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 45px; margin-top: 3px; padding: 0 15px; color: #fff; background: var(--green); border: 1px solid var(--green); border-radius: 5px; font-size: 14px; font-weight: 600; }
.access-submit:hover { background: #12694d; border-color: #12694d; }
.access-submit:disabled { cursor: wait; opacity: .62; }
.access-submit svg { width: 16px; }
.setup-notice { display: flex; gap: 9px; padding: 10px; color: #315c46; background: #eef6f1; border: 1px solid #cfe2d5; font-size: 12px; line-height: 1.5; }
.setup-notice svg { width: 16px; flex: none; }
.setup-notice b { display: block; margin-bottom: 2px; }
.access-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 13px; background: #fff; border-radius: 8px; }
.access-loading[hidden] { display: none; }
.access-loading span { width: 30px; height: 30px; border: 2px solid #dfe5e1; border-top-color: var(--green); border-radius: 50%; animation: access-spin .8s linear infinite; }
.access-loading b { color: var(--muted); font-size: 12px; font-weight: 500; }
.access-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; padding-top: 17px; color: #8c9692; border-top: 1px solid var(--line); font-size: 11px; }
.access-foot svg { width: 12px; }
.access-copyright { min-height: 54px; display: grid; place-items: center; padding: 0 22px; color: #6f7e79; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; }
@keyframes access-spin { to { transform: rotate(360deg); } }

.account-modal { position: fixed; z-index: 90; inset: 0; display: none; }
.account-modal.open { display: block; }
.account-backdrop { position: absolute; inset: 0; background: rgba(12,19,18,.64); }
.account-dialog { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); overflow-y: auto; padding: 27px 30px 24px; color: var(--ink); background: #f7f8f5; border-left: 1px solid var(--line); box-shadow: -24px 0 64px rgba(12,19,18,.24); }
.account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.account-head h2 { margin: 5px 0 0; font-size: 22px; }
.account-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.account-profile { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; min-height: 76px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.account-profile-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.account-profile-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: none; color: #fff; background: var(--ink); border-radius: 6px; font-weight: 700; }
.account-profile-main b, .account-profile-main span { display: block; }
.account-profile-main b { font-size: 14px; }
.account-profile-main span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.account-profile-status { padding: 5px 8px; color: var(--green); background: var(--green-soft); border-radius: 4px; font-size: 11px; font-weight: 600; }
.account-create-form { margin-top: 20px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.account-section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.account-section-title span, .account-section-title small { display: block; }
.account-section-title span { font-size: 14px; font-weight: 700; }
.account-section-title small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.account-section-title > svg { width: 18px; color: var(--green); }
.account-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 16px; }
.account-form-grid label > span:first-child { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.account-form-grid input, .account-form-grid select { width: 100%; height: 38px; padding: 0 10px; color: var(--ink); background: #f8f9f7; border: 1px solid #ccd2ce; border-radius: 5px; outline: 0; font-size: 12px; }
.account-form-grid input:focus, .account-form-grid select:focus { background: #fff; border-color: var(--green); }
.account-notes { grid-column: 1 / -1; }
.generated-password { display: grid; grid-template-columns: 1fr 38px; }
.generated-password input { border-radius: 5px 0 0 5px; }
.generated-password button { display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border: 1px solid #b9cfdd; border-left: 0; border-radius: 0 5px 5px 0; }
.generated-password svg { width: 14px; }
.account-form-error { display: none; margin-top: 11px; padding: 8px 10px; color: #913c35; background: #fae9e6; border-left: 3px solid var(--danger); font-size: 11px; }
.account-form-error.visible { display: block; }
.account-primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 37px; margin-top: 14px; padding: 7px 13px; color: #fff; background: var(--green); border: 1px solid var(--green); border-radius: 5px; font-size: 12px; font-weight: 600; }
.account-primary svg { width: 13px; }
.credential-result { margin-top: 12px; padding: 16px 18px; color: #315c46; background: #eef6f1; border: 1px solid #bdd9c8; border-radius: 7px; }
.credential-result[hidden] { display: none; }
.credential-result > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 600; }
.credential-result button { display: inline-flex; align-items: center; gap: 5px; min-height: 31px; padding: 5px 9px; color: var(--green); background: #fff; border: 1px solid #bdd9c8; border-radius: 4px; font-size: 11px; }
.credential-result button svg { width: 12px; }
.credential-result dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 13px 0 0; overflow: hidden; background: #cfe2d5; border: 1px solid #cfe2d5; }
.credential-result dl div { padding: 9px 10px; background: #fff; }
.credential-result dt { color: var(--muted); font-size: 10px; }
.credential-result dd { margin: 4px 0 0; color: var(--ink); font: 600 10px "DM Mono", monospace; overflow-wrap: anywhere; }
.account-list-section { margin-top: 24px; }
.account-refresh { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.account-refresh svg { width: 13px; }
.account-list { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.account-list-empty { padding: 34px 20px; color: var(--muted); background: #fff; border: 1px solid var(--line); text-align: center; font-size: 12px; }
.account-row { display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(110px, .8fr) minmax(120px, .9fr) auto; align-items: center; gap: 12px; min-height: 67px; padding: 11px 13px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.account-row-main b, .account-row-main span, .account-row-meta b, .account-row-meta span { display: block; }
.account-row-main b { font-size: 13px; }
.account-row-main span, .account-row-meta span { margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.account-row-meta b { color: var(--ink-2); font-size: 11px; font-weight: 600; }
.account-state { justify-self: start; padding: 4px 7px; color: var(--green); background: var(--green-soft); border-radius: 3px; font-size: 10px; font-weight: 700; }
.account-state.expired, .account-state.disabled { color: var(--danger); background: #f3dfdd; }
.account-row-actions { display: flex; gap: 5px; }
.account-row-actions button { min-height: 30px; padding: 4px 8px; color: var(--blue); background: #fff; border: 1px solid #c9d7df; border-radius: 4px; font-size: 10.5px; }
.account-row-actions button.danger { color: var(--danger); border-color: #e0c0bc; }
.account-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 25px; padding-top: 17px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10.5px; }
.account-logout { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 10px; color: var(--danger); background: #fff; border: 1px solid #e0c0bc; border-radius: 5px; font-size: 11px; }
.account-logout svg { width: 13px; }
.account-button.auth-client { color: #9bd6bc; border-color: rgba(114,205,164,.42); }

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 68px;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  color: #fff;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: none; background: var(--coral); color: #fff; font-weight: 700; border-radius: 6px; }
.brand-copy strong, .brand-copy small { display: block; white-space: nowrap; }
.brand-copy strong { font-size: 16px; }
.brand-copy small { margin-top: 2px; color: #aeb8b5; font-size: 12px; }
.top-status { justify-self: center; display: flex; align-items: center; gap: 8px; color: #c2ccc9; font-size: 14px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #55c894; box-shadow: 0 0 0 4px rgba(85,200,148,.12); }
.top-actions { display: flex; gap: 6px; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; color: #d6ddda; background: transparent; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; }
.icon-button:hover { color: #fff; border-color: rgba(255,255,255,.42); }
.icon-button svg { width: 16px; height: 16px; }

.workspace {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 280px minmax(620px, 1fr) 350px;
  align-items: stretch;
}
.role-sidebar, .inspector { position: sticky; top: 68px; align-self: start; height: calc(100vh - 68px); overflow-y: auto; background: var(--white); }
.role-sidebar { padding: 22px 16px 18px; border-right: 1px solid var(--line); }
.inspector { padding: 0 18px 20px; border-left: 1px solid var(--line); }
.stage { min-width: 0; padding: 24px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 0 4px 17px; }
.panel-heading h1 { margin: 4px 0 0; font-size: 20px; line-height: 1.3; }
.overline { color: var(--muted); font: 500 9px "DM Mono", monospace; text-transform: uppercase; }

.library-switcher { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 0 12px; padding: 4px; background: #eef0ec; border-radius: 6px; }
.library-filter { min-width: 0; min-height: 32px; padding: 5px 4px; color: var(--muted); background: transparent; border: 0; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.library-filter.active { color: var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(23,32,31,.1); font-weight: 600; }

.role-list { display: flex; flex-direction: column; gap: 7px; }
.role-button { width: 100%; min-height: 76px; display: grid; grid-template-columns: 43px 1fr 18px; align-items: center; gap: 10px; padding: 10px; text-align: left; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; transition: border-color .18s, background .18s, transform .18s; }
.role-button:hover { border-color: #a9b2ae; transform: translateY(-1px); }
.role-button.active { background: #eef4ef; border-color: var(--green); box-shadow: inset 3px 0 0 var(--green); }
.role-avatar { position: relative; width: 43px; height: 52px; overflow: hidden; background: var(--ink-2); border-radius: 5px; }
.role-avatar img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.78) contrast(.96); }
.role-avatar span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(23,32,31,.22); font-weight: 700; }
.role-copy { min-width: 0; }
.role-copy b, .role-copy small { display: block; }
.role-copy b { font-size: 15px; }
.role-copy small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.role-tags { display: flex; align-items: center; gap: 4px; min-width: 0; margin-top: 7px; }
.role-copy em { min-width: 0; overflow: hidden; padding: 2px 6px; color: var(--green); background: var(--green-soft); border-radius: 3px; font-size: 11px; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.role-source { flex: none; padding: 2px 5px; color: #98503d; background: var(--coral-soft); border-radius: 3px; font-size: 10px; white-space: nowrap; }
.role-source.general { color: var(--blue); background: var(--blue-soft); }
.role-button[data-maturity="conditional"] .role-copy em { color: var(--amber); background: var(--amber-soft); }
.role-button[data-maturity="review"] .role-copy em { color: var(--blue); background: var(--blue-soft); }
.role-button > svg { width: 15px; color: #9da6a3; }
.stage-header { min-height: 78px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.stage-title-wrap { display: flex; align-items: center; gap: 13px; min-width: 0; }
.role-photo-wrap { position: relative; width: 54px; height: 58px; flex: none; overflow: hidden; background: var(--ink); border-radius: 7px; }
.role-photo-wrap img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.role-photo-wrap span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 700; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.stage-header h2 { margin: 0; font-size: 24px; line-height: 1.25; }
.stage-header p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.maturity-pill { padding: 4px 7px; color: var(--green); background: var(--green-soft); border-radius: 4px; font-size: 12px; font-weight: 600; }
.maturity-pill.conditional { color: var(--amber); background: var(--amber-soft); }
.maturity-pill.review { color: var(--blue); background: var(--blue-soft); }
.engagement-pill { padding: 4px 7px; color: var(--green); background: var(--green-soft); border-radius: 4px; font-size: 12px; font-weight: 600; }
.engagement-pill.review { color: var(--amber); background: var(--amber-soft); }
.source-pill { padding: 4px 7px; color: #98503d; background: var(--coral-soft); border-radius: 4px; font-size: 12px; font-weight: 600; }
.source-pill.general { color: var(--blue); background: var(--blue-soft); }
.source-pill.curated, .role-source.curated { color: #725d37; background: var(--amber-soft); }
.run-summary { min-width: 100px; text-align: right; }
.run-summary span, .run-summary b, .run-summary small { display: block; }
.run-summary span { color: var(--muted); font-size: 11px; }
.run-summary b { margin-top: 3px; font: 500 12px "DM Mono", monospace; }
.run-summary small { margin-top: 4px; color: var(--coral); font-size: 12px; }

.role-focus-panel { margin-top: 12px; padding: 10px 11px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.role-focus-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.role-focus-head h3 { margin: 2px 0 0; font-size: 14px; }
.role-focus-head p { margin: 0; color: var(--muted); font-size: 11px; }
.role-focus-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px; margin-top: 8px; }
.role-focus-item { min-width: 0; padding: 8px 9px; background: #f5f7f4; border-left: 2px solid #aab4af; }
.role-focus-item > div:first-child { display: flex; align-items: center; gap: 6px; }
.role-focus-item > div:first-child svg { width: 13px; height: 13px; color: var(--green); }
.role-focus-item h4 { margin: 0; font-size: 14px; }
.role-focus-item > p { min-height: 32px; margin: 5px 0 7px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.role-focus-scenes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.role-focus-scenes > span { color: #8b9490; font-size: 11px; }
.role-focus-scene { min-height: 24px; padding: 3px 7px; color: var(--blue); background: var(--blue-soft); border: 0; border-radius: 3px; font-size: 11px; }
.role-focus-scene:hover, .role-focus-scene.active { color: #fff; background: var(--blue); }

.scope-banner { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; color: #315c46; background: #eef6f1; border: 1px solid #cfe2d5; border-radius: 7px; }
.scope-banner-icon { display: grid; place-items: center; width: 31px; height: 31px; flex: none; color: var(--green); background: #fff; border-radius: 6px; }
.scope-banner-icon svg { width: 17px; }
.scope-banner-copy { min-width: 0; }
.scope-banner-copy strong, .scope-banner-copy p { display: block; }
.scope-banner-copy strong { font-size: 13px; }
.scope-banner-copy p { margin: 3px 0 0; color: #587365; font-size: 11px; line-height: 1.45; }
.scope-banner-tag { flex: none; padding: 4px 7px; color: var(--green); background: #dcece4; border-radius: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; }

.scenario-switcher { display: flex; gap: 13px; min-height: 42px; margin-top: 9px; overflow-x: auto; scrollbar-width: thin; }
.scenario-group { display: flex; align-items: center; gap: 6px; flex: none; }
.scenario-group + .scenario-group { padding-left: 12px; border-left: 1px solid var(--line); }
.scenario-group-label { flex: none; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.scenario-group-tabs { display: flex; gap: 7px; }
.scenario-tab { display: flex; align-items: center; gap: 7px; min-width: max-content; min-height: 36px; padding: 7px 11px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.scenario-tab.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.scenario-tab svg { width: 14px; }
.scenario-priority { display: grid; place-items: center; min-width: 26px; height: 20px; padding: 0 5px; color: var(--blue); background: var(--blue-soft); border-radius: 3px; font: 700 9px "DM Mono", monospace; }
.scenario-tab[data-priority="P0"] .scenario-priority { color: #fff; background: var(--danger); }
.scenario-tab[data-priority="P1"] .scenario-priority { color: var(--green); background: var(--green-soft); }
.scenario-tab[data-priority="P2"] .scenario-priority { color: var(--blue); background: var(--blue-soft); }
.scenario-tab[data-priority^="V"] .scenario-priority { color: var(--amber); background: var(--amber-soft); }
.scenario-tab.active .scenario-priority { color: var(--ink); background: #fff; }
.scenario-kind { display: grid; place-items: center; min-width: 28px; height: 20px; padding: 0 5px; color: #725d37; background: var(--amber-soft); border-radius: 3px; font-size: 10px; font-weight: 700; }
.scenario-tab.is-capability { border-style: dashed; }
.scenario-tab.active .scenario-kind { color: var(--ink); background: #fff; }

.capability-strip { display: flex; align-items: center; gap: 9px; min-height: 34px; margin-top: 7px; overflow-x: auto; color: var(--muted); scrollbar-width: thin; }
.capability-strip > span { flex: none; font-size: 11px; font-weight: 600; }
.capability-strip > div { display: flex; gap: 5px; min-width: max-content; }
.capability-chip { padding: 4px 7px; color: var(--ink-2); background: #eef1ed; border: 1px solid #dfe4de; border-radius: 4px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.capability-strip.is-featured .capability-chip { color: #725d37; background: var(--amber-soft); border-color: #ead9b5; }

.stage-meta { display: grid; grid-template-columns: auto auto minmax(130px, 1fr) minmax(150px, .8fr); gap: 10px; align-items: center; min-height: 61px; margin-top: 10px; padding: 10px 13px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.meta-pair span, .meta-pair b { display: block; }
.meta-pair span { margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.meta-pair b { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.meta-pair svg { width: 13px; color: var(--coral); }
.landing-meta { padding-left: 12px; border-left: 1px solid var(--line); }
.stage-progress { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.stage-progress > span { color: var(--muted); font: 500 10px "DM Mono", monospace; }
.progress-track { height: 5px; overflow: hidden; background: #e8ebe7; border-radius: 4px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--coral); transition: width .28s ease; }

.process-area { min-height: 400px; margin-top: 12px; padding: 19px 20px 16px; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.process-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.process-toolbar h3 { margin: 4px 0 0; font-size: 18px; }
.process-actions { display: flex; align-items: center; gap: 7px; }
.detail-button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 5px 9px; color: var(--blue); background: var(--blue-soft); border: 1px solid #c5d8e4; border-radius: 5px; font-size: 12px; }
.detail-button:hover { color: #fff; background: var(--blue); border-color: var(--blue); }
.detail-button svg { width: 13px; }
.speed-control { display: inline-flex; padding: 2px; background: #edf0ec; border-radius: 5px; }
.speed-button { width: 36px; height: 28px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 4px; font: 500 10px "DM Mono", monospace; }
.speed-button.active { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgba(23,32,31,.12); }

.workflow { position: relative; display: grid; grid-template-columns: repeat(5, minmax(90px, 1fr)); align-items: start; gap: 18px; min-height: 266px; padding: 46px 4px 20px; }
.workflow::before { content: ""; position: absolute; top: 82px; left: 9%; right: 9%; height: 2px; background: #dfe3de; }
.workflow::after { content: ""; position: absolute; top: 82px; left: 9%; width: var(--flow-progress, 0%); max-width: 82%; height: 2px; background: var(--green); transition: width .35s ease; }
.flow-node { position: relative; z-index: 1; min-width: 0; text-align: center; }
.node-icon { position: relative; display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto; color: var(--muted); background: #f0f2ef; border: 2px solid #dfe3de; border-radius: 50%; transition: .25s ease; }
.node-icon svg { width: 24px; height: 24px; }
.node-step { position: absolute; top: -8px; right: -4px; display: grid; place-items: center; width: 22px; height: 22px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 50%; font: 500 9px "DM Mono", monospace; }
.flow-node h4 { margin: 13px 0 5px; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; }
.flow-node p { min-height: 47px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.node-kind { display: table; margin: 0 auto 4px; padding: 2px 5px; color: var(--blue); background: var(--blue-soft); border-radius: 3px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.node-state { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 3px 6px; color: #8c9692; background: #f0f2ef; border-radius: 3px; font-size: 10px; }
.node-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.flow-node.running .node-icon { color: var(--blue); background: var(--blue-soft); border-color: var(--blue); box-shadow: 0 0 0 7px rgba(40,101,141,.08); }
.flow-node.running .node-state { color: var(--blue); background: var(--blue-soft); }
.flow-node.done .node-icon { color: var(--green); background: var(--green-soft); border-color: var(--green); }
.flow-node.done .node-state { color: var(--green); background: var(--green-soft); }
.flow-node.approval .node-icon { color: var(--amber); background: var(--amber-soft); border-color: var(--amber); box-shadow: 0 0 0 7px rgba(180,122,25,.08); }
.flow-node.approval .node-state { color: var(--amber); background: var(--amber-soft); }
.flow-node.rejected .node-icon { color: var(--danger); background: #f3dfdd; border-color: var(--danger); }
.blueprint { position: fixed; z-index: 50; top: 68px; right: 350px; bottom: 0; display: none; width: min(720px, calc(100vw - 630px)); min-width: 520px; overflow-y: auto; padding: 24px; background: #fff; border-left: 1px solid var(--line); box-shadow: -18px 0 44px rgba(23,32,31,.14); }
.blueprint.open { display: block; }
.blueprint-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.blueprint-head h4 { margin: 6px 0 0; font-size: 19px; }
.blueprint-actions { display: flex; align-items: center; gap: 7px; }
.blueprint-mode { padding: 4px 7px; color: var(--blue); background: var(--blue-soft); border-radius: 4px; font-size: 11px; white-space: nowrap; }
.blueprint-badge { padding: 4px 7px; color: var(--amber); background: var(--amber-soft); border-radius: 4px; font-size: 11px; white-space: nowrap; }
.panel-close { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: var(--muted); background: #f2f4f1; border: 1px solid var(--line); border-radius: 5px; }
.panel-close svg { width: 15px; }
.blueprint-badge.ready { color: var(--green); background: var(--green-soft); }
.blueprint-badge.review { color: var(--blue); background: var(--blue-soft); }
.current-sop { margin-top: 12px; padding: 10px 0 11px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.current-sop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 7px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.current-sop-head > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.current-sop-head strong { padding-right: 8px; color: var(--ink); border-right: 1px solid #ccd2ce; font-size: 13px; }
.current-sop-head span { color: var(--muted); }
.current-sop-head em { padding: 3px 6px; color: var(--blue); background: var(--blue-soft); border-radius: 3px; font-size: 10px; font-style: normal; font-weight: 600; }
.current-sop-head > b { flex: none; color: var(--muted); font: 500 9px "DM Mono", monospace; }
.current-sop-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 14px; }
.current-sop-step { position: relative; min-height: 31px; padding: 6px 8px 6px 29px; color: #596360; background: #f5f6f3; border-left: 2px solid #a9b1ad; font-size: 11px; line-height: 1.45; }
.current-sop-step b { position: absolute; top: 6px; left: 8px; color: #7b8581; font: 600 8px "DM Mono", monospace; }
.agent-architecture { margin-top: 13px; padding: 12px; background: #f8faf8; border: 1px solid #dfe6df; border-radius: 6px; }
.agent-architecture-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.agent-architecture-head h4 { margin: 4px 0 0; font-size: 15px; }
.agent-architecture-head p { max-width: 280px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: right; }
.architecture-flow { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 24px 22px; margin-top: 10px; padding: 2px 8px 0; }
.architecture-lane { position: relative; min-width: 0; min-height: 119px; padding: 9px; background: #fff; border: 1px solid #dde4de; border-top: 3px solid #aeb9b3; border-radius: 5px; }
.architecture-lane[data-architecture-step="1"] { grid-column: 1; grid-row: 1; }
.architecture-lane[data-architecture-step="2"] { grid-column: 2; grid-row: 1; }
.architecture-lane[data-architecture-step="3"] { grid-column: 3; grid-row: 1; }
.architecture-lane[data-architecture-step="4"] { grid-column: 3; grid-row: 2; }
.architecture-lane[data-architecture-step="5"] { grid-column: 2; grid-row: 2; }
.architecture-lane[data-architecture-step="6"] { grid-column: 1; grid-row: 2; }
.architecture-lane.source { border-color: #9fc0d4; border-top-color: var(--blue); background: #f4f8fb; }
.architecture-lane.rules { border-color: #dfc99f; border-top-color: var(--amber); background: #fcf8ee; }
.architecture-lane.agent { border-color: #e2b3a7; border-top-color: var(--coral); background: #fdf6f3; }
.architecture-lane.human { border-color: #dfb3ae; border-top-color: var(--danger); background: #fdf5f4; }
.architecture-lane.writeback { border-color: #9fc9b8; border-top-color: var(--green); background: #f3f8f5; }
.architecture-lane.feedback { border-color: #bbb4db; border-top-color: #6a5bb1; background: #f6f4fb; }
.architecture-lane-head { display: flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.architecture-lane-head > b { display: grid; place-items: center; width: 21px; height: 21px; flex: none; color: #fff; background: #8c9792; border-radius: 50%; font: 600 8px "DM Mono", monospace; }
.architecture-lane.source .architecture-lane-head > b, .architecture-lane.source .architecture-lane-head svg { color: #fff; background: var(--blue); }
.architecture-lane.rules .architecture-lane-head > b, .architecture-lane.rules .architecture-lane-head svg { color: #fff; background: var(--amber); }
.architecture-lane.agent .architecture-lane-head > b, .architecture-lane.agent .architecture-lane-head svg { color: #fff; background: var(--coral); }
.architecture-lane.human .architecture-lane-head > b, .architecture-lane.human .architecture-lane-head svg { color: #fff; background: var(--danger); }
.architecture-lane.writeback .architecture-lane-head > b, .architecture-lane.writeback .architecture-lane-head svg { color: #fff; background: var(--green); }
.architecture-lane.feedback .architecture-lane-head > b, .architecture-lane.feedback .architecture-lane-head svg { color: #fff; background: #6a5bb1; }
.architecture-lane-head > svg { width: 21px; height: 21px; padding: 4px; border-radius: 5px; }
.architecture-lane-items { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.architecture-item { display: grid; grid-template-columns: 20px 1fr; gap: 5px; align-items: start; padding: 6px; background: rgba(255,255,255,.72); border-radius: 4px; }
.architecture-item b { color: #8d9893; font: 600 8px "DM Mono", monospace; }
.architecture-item span { color: var(--ink-2); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.architecture-next { position: absolute; z-index: 2; display: grid; place-items: center; width: 20px; height: 20px; color: #85928c; }
.architecture-next.right { top: 50%; right: -22px; transform: translateY(-50%); }
.architecture-next.left { top: 50%; left: -22px; transform: translateY(-50%); }
.architecture-next.down { bottom: -23px; left: 50%; transform: translateX(-50%); }
.architecture-next svg { width: 16px; height: 16px; }
.architecture-return { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 28px; margin-top: -9px; padding: 5px 9px; color: #5d5299; background: #f7f5fc; border-top: 1px dashed #8174bd; border-bottom: 1px dashed #8174bd; font-size: 10.5px; line-height: 1.4; text-align: center; }
.architecture-return svg { width: 13px; flex: none; }
.blueprint-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "pain focus" "systems value" "condition condition"; gap: 7px; margin-top: 12px; }
.blueprint-grid article { min-height: 58px; padding: 9px 10px; background: #f5f7f4; border: 1px solid #e3e7e2; border-radius: 5px; }
.blueprint-grid article span { display: block; color: var(--muted); font-size: 10px; }
.blueprint-grid article p { margin: 5px 0 0; color: var(--ink-2); font-size: 11px; line-height: 1.5; }
.blueprint-grid .blueprint-pain { grid-area: pain; background: #fbf0eb; border-color: #ecd2c7; }
.blueprint-grid .blueprint-pain p { color: #754b40; }
.blueprint-focus { grid-area: focus; background: #eef5f0 !important; border-color: #d4e3d7 !important; }
.blueprint-focus p { color: #315c46 !important; font-weight: 600; }
.blueprint-systems { grid-area: systems; }
.blueprint-value { grid-area: value; }
.blueprint-condition { grid-area: condition; }
.detail-flow-head { display: flex; justify-content: space-between; align-items: center; margin: 15px 0 7px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.detail-flow-head b { color: var(--muted); font: 500 9px "DM Mono", monospace; }
.detail-flow { --detail-flow-gap: 16px; display: flex; flex-direction: column; gap: 20px; padding: 11px; background: #f7f9fa; border: 1px solid #e0e6e8; border-radius: 6px; }
.detail-flow-row { position: relative; display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: stretch; gap: 10px; }
.detail-flow-stage { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 84px; padding: 8px; color: var(--blue); background: #eaf2f7; border-left: 4px solid var(--blue); border-radius: 4px; }
.detail-flow-stage b { font: 600 8px "DM Mono", monospace; opacity: .72; }
.detail-flow-stage strong { font-size: 11px; line-height: 1.4; }
.phase-2 .detail-flow-stage { color: #986213; background: #f8f0df; border-left-color: var(--amber); }
.phase-3 .detail-flow-stage { color: #a34d3a; background: #faeae5; border-left-color: var(--coral); }
.phase-4 .detail-flow-stage { color: #5d5299; background: #efedf8; border-left-color: #6a5bb1; }
.detail-flow-track { position: relative; display: flex; align-items: stretch; gap: var(--detail-flow-gap); min-width: 0; }
.detail-flow-track.is-reverse { flex-direction: row-reverse; }
.detail-step { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 7px; flex: 0 0 calc((100% - 3 * var(--detail-flow-gap)) / 4); min-width: 0; min-height: 84px; padding: 9px; background: #fff; border: 1px solid #bdc8c3; border-radius: 6px; }
.detail-step > b { display: grid; place-items: center; width: 24px; height: 24px; color: #fff; background: #7b8983; border-radius: 50%; font: 600 8px "DM Mono", monospace; }
.detail-step > div { min-width: 0; }
.detail-step strong, .detail-step span { display: block; overflow-wrap: anywhere; }
.detail-step strong { color: var(--ink-2); font-size: 11px; line-height: 1.35; }
.detail-step span { margin-top: 4px; color: #5e6a66; font-size: 10.5px; line-height: 1.45; }
.detail-step.source { border-color: #8cb7cf; background: #f0f6fa; }
.detail-step.source > b { background: var(--blue); }
.detail-step.rules { border-color: #d6bb83; background: #fbf6ea; }
.detail-step.rules > b { background: var(--amber); }
.detail-step.agent { border-color: #dfa493; background: #fcf2ef; }
.detail-step.agent > b { background: var(--coral); }
.detail-step.human { border-color: #d79a94; background: #fcf0ef; }
.detail-step.human > b { background: var(--danger); }
.detail-step.writeback { border-color: #83bba4; background: #eef7f2; }
.detail-step.writeback > b { background: var(--green); }
.detail-step.feedback { border-color: #a99fd3; background: #f1eff9; }
.detail-step.feedback > b { background: #6a5bb1; }
.detail-flow-track:not(.is-reverse) .detail-step:not(:last-child)::after { content: "→"; position: absolute; z-index: 2; top: 50%; right: -15px; width: 14px; color: #6f7e78; font-size: 16px; line-height: 1; text-align: center; transform: translateY(-50%); }
.detail-flow-track.is-reverse .detail-step:not(:last-child)::after { content: "←"; position: absolute; z-index: 2; top: 50%; left: -15px; width: 14px; color: #6f7e78; font-size: 16px; line-height: 1; text-align: center; transform: translateY(-50%); }
.detail-flow-row:not(:nth-last-child(2)) .detail-flow-track::after { content: "↓"; position: absolute; z-index: 2; right: calc((100% - 3 * var(--detail-flow-gap)) / 8); bottom: -20px; color: #6f7e78; font-size: 16px; line-height: 1; transform: translateX(50%); }
.detail-flow-row:not(:nth-last-child(2)) .detail-flow-track.is-reverse::after { right: auto; left: calc((100% - 3 * var(--detail-flow-gap)) / 8); transform: translateX(-50%); }
.detail-flow-feedback { position: relative; display: flex; align-items: center; gap: 8px; min-height: 38px; margin-left: 84px; padding: 7px 10px; color: #5d5299; background: #f5f3fb; border: 1px dashed #8174bd; border-radius: 5px; }
.detail-flow-feedback::before { content: ""; position: absolute; top: -21px; right: 16px; height: 20px; border-right: 1px dashed #8174bd; }
.detail-flow-feedback svg { width: 14px; flex: none; }
.detail-flow-feedback b, .detail-flow-feedback span { display: block; }
.detail-flow-feedback b { font-size: 11px; }
.detail-flow-feedback span { margin-top: 2px; font-size: 10.5px; line-height: 1.45; }
.process-foot { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 52px; padding-top: 14px; border-top: 1px solid var(--line); }
.source-line { display: flex; align-items: center; min-width: 0; gap: 7px; color: var(--muted); font-size: 12px; }
.source-line svg { width: 14px; flex: none; color: var(--blue); }
.run-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 132px; min-height: 40px; padding: 8px 16px; color: #fff; background: var(--coral); border: 1px solid var(--coral); border-radius: 6px; font-weight: 600; font-size: 14px; }
.run-button:hover { background: #c9563e; border-color: #c9563e; }
.run-button:disabled { cursor: wait; opacity: .7; }
.run-button svg { width: 15px; }

.impact-strip { display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)) minmax(180px, 1.25fr); gap: 1px; margin-top: 12px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 7px; }
.impact-strip > div { min-height: 85px; padding: 13px 15px; background: #fff; }
.impact-strip span, .impact-strip strong, .impact-strip small { display: block; }
.impact-strip span { color: var(--muted); font-size: 11px; }
.impact-strip strong { margin: 6px 0 3px; font-size: 16px; }
.impact-strip small { color: #929b98; font-size: 11px; }
.impact-strip .impact-note { display: flex; align-items: center; gap: 10px; color: #fff; background: var(--ink-2); }
.impact-note svg { width: 20px; flex: none; color: #69d1a1; }
.impact-note span { color: #d6dfdc; line-height: 1.55; }

.inspector-tabs { display: grid; grid-template-columns: 1fr 1fr; height: 57px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.inspector-tab { position: relative; color: var(--muted); background: transparent; border: 0; font-size: 14px; }
.inspector-tab.active { color: var(--ink); font-weight: 600; }
.inspector-tab.active::after { content: ""; position: absolute; right: 15%; bottom: -1px; left: 15%; height: 2px; background: var(--coral); }
.inspector-view { display: none; }
.inspector-view.active { display: block; }
.live-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; color: var(--muted); font-size: 12px; }
.live-head span { display: flex; align-items: center; gap: 6px; }
.live-head svg { width: 13px; color: var(--green); }
.live-head b { color: var(--ink); font: 500 11px "DM Mono", monospace; }
.event-feed { height: 248px; overflow: auto; padding: 6px 0 13px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.feed-empty { display: grid; place-items: center; height: 100%; color: #9aa39f; text-align: center; font-size: 13px; }
.feed-empty svg { width: 27px; height: 27px; margin-bottom: 9px; color: #bdc4c1; }
.feed-entry { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 9px; padding: 9px 3px 9px 0; }
.feed-entry::before { content: ""; position: absolute; top: 28px; bottom: -6px; left: 17px; width: 1px; background: #e0e4df; }
.feed-entry:last-child::before { display: none; }
.feed-time { color: #939c98; font: 9px "DM Mono", monospace; }
.feed-entry b, .feed-entry p { display: block; margin: 0; }
.feed-entry b { font-size: 12px; }
.feed-entry p { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.feed-entry.active b { color: var(--blue); }
.feed-entry.success b { color: var(--green); }
.feed-entry.approval b { color: var(--amber); }
.approval-box { display: none; margin-top: 14px; padding: 14px; background: var(--amber-soft); border: 1px solid #e4c98f; border-radius: 7px; }
.approval-box.visible { display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
.approval-icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--amber); background: #fff; border-radius: 6px; }
.approval-icon svg { width: 17px; }
.approval-box h3 { margin: 4px 0 3px; font-size: 15px; }
.approval-box p { margin: 0; color: #78633c; font-size: 12px; line-height: 1.5; }
.approval-actions { grid-column: 1 / -1; display: grid; grid-template-columns: .8fr 1.2fr; gap: 7px; margin-top: 4px; }
.secondary-button, .approve-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; border-radius: 5px; font-size: 12px; }
.secondary-button { color: var(--ink); background: #fff; border: 1px solid #d3bb87; }
.approve-button { color: #fff; background: var(--amber); border: 1px solid var(--amber); }
.secondary-button svg, .approve-button svg { width: 13px; }
.result-box { margin-top: 14px; padding: 14px; background: #f5f7f4; border: 1px solid var(--line); border-radius: 7px; }
.result-box.completed { background: #eef6f1; border-color: #afcfbd; }
.result-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; }
.result-head span { display: flex; align-items: center; gap: 5px; }
.result-head svg { width: 13px; }
.result-head b { padding: 2px 5px; color: var(--muted); background: #e6e9e5; border-radius: 3px; font-size: 10px; }
.result-box.completed .result-head b { color: var(--green); background: var(--green-soft); }
.result-box h3 { margin: 11px 0 5px; font-size: 15px; }
.result-box p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.result-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 12px; }
.result-metrics div { padding: 8px; background: #fff; border: 1px solid #e1e5e0; }
.result-metrics span, .result-metrics b { display: block; }
.result-metrics span { color: var(--muted); font-size: 10px; }
.result-metrics b { margin-top: 3px; font-size: 14px; }
.action-card { display: none; margin-top: 12px; padding: 12px; background: #fff; border: 1px solid #c8ddd0; border-radius: 6px; }
.action-card.visible { display: block; }
.action-head, .action-foot, .checklist-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.action-head { color: var(--muted); font-size: 11px; }
.action-head span, .wecom-status { display: inline-flex; align-items: center; gap: 5px; }
.action-head svg, .wecom-status svg { width: 13px; color: var(--green); }
.action-head b { padding: 3px 6px; color: var(--green); background: var(--green-soft); border-radius: 3px; font-size: 10px; }
.action-card h4 { margin: 10px 0 4px; font-size: 15px; }
.action-card > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.action-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 11px; }
.action-fields div { padding: 7px; background: #f4f7f4; border-radius: 4px; }
.action-fields span, .action-fields b { display: block; }
.action-fields span { color: var(--muted); font-size: 10px; }
.action-fields b { margin-top: 3px; color: var(--ink-2); font-size: 11px; line-height: 1.35; }
.action-fields div:last-child { grid-column: 1 / -1; }
.checklist-head { margin-top: 12px; color: var(--ink-2); font-size: 11px; font-weight: 600; }
.checklist-head b { color: var(--muted); font: 500 9px "DM Mono", monospace; }
.action-checklist { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.task-check { display: flex; align-items: flex-start; gap: 6px; padding: 5px 6px; color: var(--muted); background: #fafbfa; border: 1px solid #e9ece8; border-radius: 4px; font-size: 11px; line-height: 1.4; }
.task-check input { width: 12px; height: 12px; margin: 0; accent-color: var(--green); }
.task-check input:checked + span { color: var(--green); text-decoration: line-through; }
.action-foot { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); }
.wecom-status { color: var(--green); font-size: 11px; }
.action-link { display: inline-flex; align-items: center; gap: 4px; padding: 0; color: var(--blue); background: transparent; border: 0; font-size: 11px; }
.action-link svg { width: 12px; }

.logic-section { padding: 15px 0 18px; border-bottom: 1px solid var(--line); }
.logic-section:first-child { padding-top: 2px; }
.logic-section h3 { margin: 5px 0 11px; font-size: 15px; }
.logic-code { padding: 12px; color: #dbe4e0; background: var(--ink-2); border-radius: 6px; font: 10px/1.7 "DM Mono", monospace; white-space: pre-wrap; }
.logic-code .key { color: #78c7a3; }
.logic-code .value { color: #efb095; }
.rule-list { display: flex; flex-direction: column; gap: 7px; }
.rule-item { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 9px; background: #f3f5f2; border-radius: 5px; }
.rule-item span { display: grid; place-items: center; width: 22px; height: 22px; color: var(--blue); background: var(--blue-soft); border-radius: 4px; font: 500 9px "DM Mono", monospace; }
.rule-item p { margin: 1px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.boundary-section { border-bottom: 0; }
.boundary-section p { margin: 0; padding: 12px; color: #725d37; background: var(--amber-soft); border-left: 3px solid var(--amber); font-size: 12px; line-height: 1.6; }

.mobile-footer { display: none; }
.toast { position: fixed; z-index: 60; right: 18px; bottom: 18px; max-width: min(320px, calc(100vw - 36px)); padding: 10px 13px; color: #fff; background: var(--ink); border-radius: 6px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; font-size: 13px; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 230px minmax(560px, 1fr) 310px; }
  .topbar { grid-template-columns: 230px 1fr auto; }
  .stage { padding: 18px; }
  .workflow { gap: 10px; }
  .node-icon { width: 64px; height: 64px; }
  .workflow::before, .workflow::after { top: 78px; }
  .impact-strip { grid-template-columns: repeat(3, 1fr); }
  .impact-strip .impact-note { grid-column: 1 / -1; min-height: 54px; }
  .blueprint { right: 310px; width: min(650px, calc(100vw - 540px)); min-width: 480px; }
}

@media (max-width: 980px) {
  .access-layout { grid-template-columns: 1fr; width: min(580px, calc(100% - 36px)); gap: 34px; padding: 38px 0; }
  .access-intro { max-width: none; }
  .access-intro h1 { font-size: 40px; }
  .access-card { min-height: 0; }
  .topbar { grid-template-columns: 1fr auto; }
  .top-status { display: none; }
  .workspace { display: block; padding-bottom: 68px; }
  .role-sidebar { position: static; width: auto; height: auto; overflow: visible; padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .panel-heading { display: none; }
  .library-switcher { max-width: 390px; margin-bottom: 10px; }
  .role-list { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(160px, 1fr); overflow-x: auto; padding-bottom: 4px; }
  .role-button { min-width: 160px; min-height: 66px; grid-template-columns: 38px 1fr; }
  .role-avatar { width: 38px; height: 44px; }
  .role-button > svg, .role-copy small { display: none; }
  .stage { padding: 16px; }
  .inspector { position: static; width: auto; height: auto; overflow: visible; padding: 0 16px 18px; border-left: 0; border-top: 1px solid var(--line); }
  .event-feed { height: 210px; }
  .mobile-footer { position: fixed; z-index: 25; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-between; align-items: center; min-height: 58px; padding: 8px 14px max(8px, env(safe-area-inset-bottom)); color: #cfd7d4; background: var(--ink); }
  .blueprint-open .mobile-footer { display: none; }
  .mobile-footer span { font-size: 12px; }
  .mobile-footer button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 8px 17px; color: #fff; background: var(--coral); border: 0; border-radius: 6px; font-size: 13px; font-weight: 600; }
  .mobile-footer svg { width: 14px; }
  .blueprint { top: 60px; right: 0; bottom: 58px; width: 100%; min-width: 0; padding: 20px 16px; }
  .blueprint-open .blueprint { bottom: 0; }
}

@media (max-width: 680px) {
  .access-brand { min-height: 66px; padding: 0 18px; }
  .access-layout { width: calc(100% - 24px); gap: 25px; padding: 28px 0 22px; }
  .access-eyebrow { margin-bottom: 13px; font-size: 11px; }
  .access-intro h1 { font-size: 30px; line-height: 1.25; }
  .access-intro > p { margin-top: 16px; font-size: 13px; line-height: 1.75; }
  .access-proof { margin-top: 23px; }
  .access-proof > div { min-height: 78px; padding: 12px 8px; gap: 6px; }
  .access-proof svg { width: 15px; }
  .access-proof b { font-size: 11px; }
  .access-proof small { font-size: 10px; }
  .access-card { padding: 24px 18px; border-radius: 7px; }
  .access-card-head h2 { font-size: 19px; }
  .access-copyright { min-height: 46px; }
  .account-dialog { padding: 20px 14px; }
  .account-head h2 { font-size: 19px; }
  .account-form-grid { grid-template-columns: 1fr; }
  .account-notes { grid-column: auto; }
  .credential-result > div { align-items: flex-start; flex-direction: column; }
  .credential-result dl { grid-template-columns: 1fr; }
  .account-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .account-row-main { grid-column: 1 / -1; }
  .account-row-actions { grid-column: 1 / -1; }
  .account-row-actions button { flex: 1; }
  .account-foot { align-items: flex-start; flex-direction: column; }
  .topbar { height: 60px; padding: 0 12px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { font-size: 11px; }
  .top-actions .icon-button:first-child { display: none; }
  .icon-button { width: 34px; height: 34px; }
  .role-sidebar { padding: 10px 12px; }
  .role-list { grid-template-columns: none; grid-auto-columns: 152px; }
  .role-button { min-width: 152px; padding: 8px; }
  .stage { padding: 13px 12px; }
  .stage-header { min-height: 70px; }
  .role-photo-wrap { width: 46px; height: 52px; }
  .stage-header h2 { font-size: 20px; }
  .stage-header p { max-width: 260px; font-size: 12px; line-height: 1.5; }
  .run-summary { display: none; }
  .scope-banner { align-items: flex-start; }
  .scope-banner-tag { display: none; }
  .role-focus-panel { padding: 9px; }
  .role-focus-head { align-items: flex-start; }
  .role-focus-head p { max-width: 150px; text-align: right; line-height: 1.4; }
  .role-focus-list { display: flex; overflow-x: auto; padding-bottom: 3px; scroll-snap-type: x proximity; }
  .role-focus-item { flex: 0 0 238px; scroll-snap-align: start; }
  .scenario-switcher { margin-top: 8px; }
  .capability-strip { min-height: 30px; margin-top: 5px; }
  .stage-meta { grid-template-columns: 1fr 1fr; padding: 10px; }
  .landing-meta { padding-left: 0; border-left: 0; }
  .stage-progress { grid-column: 1 / -1; }
  .process-area { min-height: 0; padding: 15px 13px 12px; }
  .workflow { grid-template-columns: 1fr; gap: 0; min-height: 0; padding: 20px 0 12px; }
  .workflow::before, .workflow::after { top: 39px; bottom: 49px; left: 28px; right: auto; width: 2px; height: auto; }
  .workflow::after { height: var(--flow-progress-mobile, 0%); max-height: calc(100% - 88px); transition: height .35s ease; }
  .flow-node { display: grid; grid-template-columns: 58px 1fr auto; grid-template-rows: auto auto; min-height: 78px; text-align: left; }
  .node-icon { grid-row: 1 / 3; width: 56px; height: 56px; margin: 0; }
  .node-icon svg { width: 20px; }
  .node-step { top: -4px; right: -2px; width: 19px; height: 19px; }
  .flow-node h4 { align-self: end; margin: 4px 8px 2px 12px; font-size: 14px; }
  .flow-node p { min-height: 0; margin: 0 8px 0 12px; font-size: 11px; }
  .node-kind { display: inline-flex; margin: 0 5px 0 0; vertical-align: middle; }
  .node-state { grid-row: 1 / 3; align-self: center; margin: 0; }
  .process-actions { gap: 5px; }
  .detail-button { min-height: 30px; padding: 4px 7px; }
  .blueprint-head h4 { font-size: 17px; }
  .blueprint-actions { align-items: flex-end; flex-direction: column-reverse; }
  .agent-architecture-head { align-items: flex-start; flex-direction: column; }
  .agent-architecture-head p { max-width: none; text-align: left; }
  .architecture-flow { grid-template-columns: 1fr; gap: 20px; padding: 2px 0 0; }
  .architecture-lane[data-architecture-step] { grid-column: 1; grid-row: auto; }
  .architecture-lane { min-height: 0; }
  .architecture-next.right, .architecture-next.left, .architecture-next.down { top: auto; right: auto; bottom: -20px; left: 50%; transform: translateX(-50%); }
  .architecture-next svg { display: none; }
  .architecture-next::after { content: "↓"; font-size: 16px; }
  .architecture-return { grid-column: 1; grid-row: auto; margin-top: -5px; }
  .current-sop-head > div { align-items: flex-start; }
  .current-sop-head strong { flex-basis: 100%; padding-right: 0; border-right: 0; }
  .current-sop-flow { grid-template-columns: 1fr; }
  .blueprint-grid { grid-template-columns: 1fr; grid-template-areas: none; }
  .blueprint-grid article { grid-area: auto !important; }
  .detail-flow { gap: 28px; padding: 9px; }
  .detail-flow-row { grid-template-columns: 1fr; gap: 7px; }
  .detail-flow-stage { flex-direction: row; justify-content: flex-start; align-items: center; min-height: 34px; }
  .detail-flow-track, .detail-flow-track.is-reverse { flex-direction: column; gap: 17px; }
  .detail-step { flex-basis: auto; width: 100%; min-height: 0; }
  .detail-flow-track:not(.is-reverse) .detail-step:not(:last-child)::after, .detail-flow-track.is-reverse .detail-step:not(:last-child)::after { content: "↓"; top: auto; right: auto; bottom: -17px; left: 50%; transform: translateX(-50%); }
  .detail-flow-row:not(:nth-last-child(2)) .detail-flow-track::after, .detail-flow-row:not(:nth-last-child(2)) .detail-flow-track.is-reverse::after { display: none; }
  .detail-flow-row:not(:nth-last-child(2))::after { content: "↓"; position: absolute; bottom: -24px; left: 50%; color: #6f7e78; font-size: 16px; line-height: 1; transform: translateX(-50%); }
  .detail-flow-feedback { margin-left: 0; }
  .detail-flow-feedback::before { display: none; }
  .process-foot { align-items: flex-end; }
  .source-line { max-width: 54%; line-height: 1.45; }
  .run-button { min-width: 118px; }
  .impact-strip { grid-template-columns: 1fr 1fr; }
  .impact-strip > div { min-height: 76px; padding: 11px; }
  .impact-strip > div:nth-child(3) { grid-column: 1 / -1; }
  .impact-strip .impact-note { grid-column: 1 / -1; }
  .inspector { padding: 0 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Product shell refresh: a focused first-level navigation around the existing workflow demo. */
:root {
  --ink: #142238;
  --ink-2: #243650;
  --paper: #f5f7fb;
  --line: #e2e7ef;
  --muted: #748198;
  --green: #1f9d68;
  --green-soft: #e2f6ec;
  --coral: #3f73f2;
  --coral-soft: #e8efff;
  --blue: #3574f3;
  --blue-soft: #e9f0ff;
  --amber: #c47c17;
  --amber-soft: #fff3d9;
  --shadow: 0 16px 40px rgba(24, 47, 82, .08);
}

body { background: var(--paper); }
.primary-nav {
  position: fixed;
  z-index: 60;
  inset: 0 auto 0 0;
  width: 230px;
  display: flex;
  flex-direction: column;
  padding: 18px 13px 16px;
  color: #d6e3f4;
  background: #071a2e;
  border-right: 1px solid rgba(255,255,255,.08);
}
.primary-nav-brand { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 10px 18px; border-bottom: 1px solid rgba(214,227,244,.12); }
.primary-nav-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: none; color: #fff; background: #3274f5; border: 1px solid #66d8ef; border-radius: 10px; font-size: 19px; font-weight: 800; box-shadow: 0 0 0 4px rgba(50,116,245,.14); }
.primary-nav-brand strong, .primary-nav-brand span { display: block; white-space: nowrap; }
.primary-nav-brand strong { color: #f4f8ff; font-size: 17px; }
.primary-nav-brand div span { margin-top: 3px; color: #75a5cf; font: 500 9px "DM Mono", monospace; }
.primary-nav-section { margin-top: 24px; }
.primary-nav-label { display: block; padding: 0 12px 9px; color: #6f8aa8; font-size: 11px; font-weight: 700; }
.primary-nav-list { display: flex; flex-direction: column; gap: 4px; }
.primary-nav-item { width: 100%; min-height: 43px; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; color: #afc0d5; background: transparent; border: 0; border-radius: 8px; text-align: left; font-size: 14px; transition: background .18s ease, color .18s ease, transform .18s ease; }
.primary-nav-item:hover { color: #fff; background: rgba(255,255,255,.08); transform: translateX(2px); }
.primary-nav-item.active { color: #fff; background: #3974f4; box-shadow: 0 8px 18px rgba(27,85,196,.24); }
.primary-nav-item svg { width: 16px; height: 16px; }
.primary-nav-caret { width: 0; height: 0; border-top: 5px solid #8ca3ba; border-right: 4px solid transparent; border-left: 4px solid transparent; transition: transform .18s ease, border-color .18s ease; }
.primary-nav-item.active .primary-nav-caret { border-top-color: #07121e; }
.primary-nav-item[aria-expanded="true"] .primary-nav-caret { transform: rotate(180deg); }
.primary-nav-secondary { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(214,227,244,.11); }
.primary-subnav { margin: 2px 0 5px 28px; padding: 2px 0 3px 10px; background: transparent; border: 0; border-left: 1px solid rgba(160,185,211,.28); border-radius: 0; }
.primary-subnav nav { display: grid; gap: 3px; }
.primary-subnav button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 6px 8px; color: #9fb4c9; background: transparent; border: 0; border-radius: 5px; text-align: left; font-size: 13px; }
.primary-subnav button:hover { color: #fff; background: rgba(255,255,255,.08); }
.primary-subnav button.active { color: #fff; background: rgba(63,145,104,.34); font-weight: 700; }
.primary-subnav button svg { width: 14px; height: 14px; flex: none; }
.primary-subnav button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.primary-nav-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 12px 11px 0; border-top: 1px solid rgba(214,227,244,.12); }
.primary-nav-foot-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #43cd88; box-shadow: 0 0 0 4px rgba(67,205,136,.12); }
.primary-nav-foot b, .primary-nav-foot small { display: block; }
.primary-nav-foot b { color: #dce8f6; font-size: 12px; }
.primary-nav-foot small { margin-top: 3px; color: #7188a2; font-size: 11px; }
.nav-backdrop, .nav-toggle { display: none; }

.topbar { position: sticky; top: 0; z-index: 40; height: 80px; grid-template-columns: minmax(250px, 1fr) auto auto; margin-left: 230px; padding: 0 30px; color: var(--ink); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); box-shadow: 0 4px 18px rgba(24,47,82,.04); }
.topbar-context { min-width: 0; }
.topbar-kicker { display: block; color: #8a98ac; font: 500 9px "DM Mono", monospace; }
.topbar-context strong { display: block; margin-top: 5px; font-size: 17px; }
.top-status { justify-self: center; min-height: 32px; padding: 7px 12px; color: #56708e; background: #f4f7fb; border: 1px solid #e3e9f1; border-radius: 17px; font-size: 12px; }
.status-dot { background: #35bb7b; box-shadow: 0 0 0 4px rgba(53,187,123,.12); }
.top-actions { gap: 6px; }
.icon-button { width: 34px; height: 34px; color: #6d7d94; background: #fff; border: 1px solid #e2e7ef; border-radius: 9px; }
.icon-button:hover { color: var(--blue); border-color: #a9c0f4; background: #f5f8ff; }
.workspace { margin-left: 230px; min-height: calc(100vh - 80px); grid-template-columns: 260px minmax(0, 1fr) 350px; }
.role-sidebar, .inspector { top: 80px; height: calc(100vh - 80px); background: #fff; }
.role-sidebar { padding: 22px 14px 18px; border-right: 1px solid var(--line); }
.inspector { padding: 0 18px 20px; border-left: 1px solid var(--line); }
.stage { padding: 26px 28px 30px; }
.panel-heading h1 { font-size: 19px; }
.library-switcher { background: #f1f4f8; }

.primary-nav-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; background: #0d1110; }
.topbar-context { display: grid; grid-template-columns: 28px auto; grid-template-rows: auto auto; column-gap: 9px; align-items: center; min-width: 0; }
.topbar-logo { grid-row: 1 / -1; width: 28px; height: 28px; object-fit: contain; border-radius: 6px; background: #0d1110; }
.topbar-context .topbar-kicker, .topbar-context strong { grid-column: 2; }

/* First-level workspaces are separate working surfaces, not scroll targets. */
.route-view { min-height: calc(100vh - 80px); margin-left: 230px; padding: 31px 36px 54px; background: #eef2f6; }
.route-view[hidden] { display: none; }
.route-inner { width: min(1420px, 100%); margin: 0 auto; }
.route-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 26px; margin-bottom: 24px; }
.route-head h1 { margin: 6px 0 0; color: #182a37; font-size: 28px; line-height: 1.2; letter-spacing: 0; }
.route-head p { max-width: 680px; margin: 9px 0 0; color: #697986; font-size: 14px; line-height: 1.65; }
.route-head-meta { display: flex; align-items: center; gap: 8px; color: #587080; font-size: 13px; }
.route-stat { min-width: 92px; padding: 10px 12px; background: #fff; border: 1px solid #dbe3e9; border-radius: 7px; }
.route-stat span, .route-stat b { display: block; }
.route-stat span { color: #71818b; font-size: 11px; }
.route-stat b { margin-top: 5px; color: #1e3948; font-size: 19px; }
.route-grid { display: grid; gap: 14px; }
.route-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.route-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.route-panel { background: #fff; border: 1px solid #dbe3e9; border-radius: 8px; box-shadow: 0 8px 22px rgba(31,55,72,.05); }
.route-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 17px 18px 13px; border-bottom: 1px solid #edf1f3; }
.route-panel-head h2 { margin: 0; color: #203542; font-size: 15px; }
.route-panel-head p { margin: 4px 0 0; color: #81909a; font-size: 12px; }
.route-panel-body { padding: 15px 18px 18px; }
.route-kpi { min-height: 112px; padding: 16px; background: #fff; border: 1px solid #dbe3e9; border-radius: 8px; }
.route-kpi span, .route-kpi small { display: block; color: #72818b; font-size: 12px; }
.route-kpi b { display: block; margin-top: 10px; color: #193c4b; font-size: 27px; line-height: 1; }
.route-kpi small { margin-top: 9px; color: #39826b; }
.route-kpi.warn b, .route-kpi.warn small { color: #b16825; }
.route-kpi.alert b, .route-kpi.alert small { color: #b35048; }
.route-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.route-table th { color: #7b8991; font-weight: 600; text-align: left; }
.route-table th, .route-table td { padding: 11px 9px; border-bottom: 1px solid #edf1f3; vertical-align: top; }
.route-table tr:last-child td { border-bottom: 0; }
.route-table td strong { color: #203844; font-size: 12px; }
.route-table td small { display: block; margin-top: 4px; color: #85939b; font-size: 11px; line-height: 1.45; }
.status-tag { display: inline-flex; align-items: center; min-height: 20px; padding: 3px 7px; color: #2f7d62; background: #e4f1ea; border-radius: 3px; font-size: 11px; white-space: nowrap; }
.status-tag.warn { color: #a76724; background: #fbedd8; }
.status-tag.danger { color: #a94a43; background: #f8e4e1; }
.status-tag.neutral { color: #60717d; background: #edf1f4; }
.route-filter { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.route-filter button { min-height: 31px; padding: 5px 10px; color: #6b7b85; background: #fff; border: 1px solid #d5e0e7; border-radius: 5px; font-size: 12px; }
.route-filter button.active, .route-filter button:hover { color: #fff; background: #28658d; border-color: #28658d; }
.route-search { width: 220px; height: 31px; padding: 0 10px; color: #233b47; background: #fff; border: 1px solid #d5e0e7; border-radius: 5px; font-size: 12px; }
.route-filter-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; }
.route-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.route-card { display: flex; flex-direction: column; min-height: 182px; padding: 16px; background: #fff; border: 1px solid #dbe3e9; border-radius: 8px; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.route-card:hover { transform: translateY(-2px); border-color: #90b4c7; box-shadow: 0 12px 26px rgba(31,55,72,.1); }
.route-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.route-card h3 { margin: 0; color: #203844; font-size: 15px; line-height: 1.35; }
.route-card p { margin: 10px 0 0; color: #71818a; font-size: 12px; line-height: 1.6; }
.route-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.route-card-meta span { padding: 3px 6px; color: #557384; background: #edf4f7; border-radius: 3px; font-size: 10px; }
.route-card-actions { display: flex; gap: 7px; margin-top: auto; padding-top: 15px; }
.route-card-actions button, .route-action { min-height: 30px; padding: 5px 9px; color: #28658d; background: #fff; border: 1px solid #bdd0da; border-radius: 4px; font-size: 11px; }
.route-card-actions button.primary, .route-action.primary { color: #fff; background: #28658d; border-color: #28658d; }
.route-card-actions button:hover, .route-action:hover { border-color: #28658d; }
.route-callout { display: flex; gap: 11px; align-items: flex-start; padding: 14px 16px; color: #355b68; background: #e9f2f5; border: 1px solid #c8dce5; border-radius: 7px; }
.route-callout svg { width: 17px; flex: none; color: #28658d; }
.route-callout b, .route-callout span { display: block; }
.route-callout b { font-size: 13px; }
.route-callout span { margin-top: 4px; color: #67818c; font-size: 12px; line-height: 1.5; }
.route-section-gap { margin-top: 16px; }
.platform-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.platform-card { min-height: 158px; padding: 15px; background: #fff; border: 1px solid #dbe3e9; border-radius: 8px; }
.platform-head { display: flex; align-items: center; gap: 9px; }
.platform-logo { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: #2c5367; border-radius: 7px; font-weight: 800; font-size: 15px; }
.platform-head h3 { margin: 0; color: #203844; font-size: 14px; }
.platform-head small { display: block; margin-top: 3px; color: #82919a; font-size: 10px; }
.platform-status { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 17px; }
.platform-actions { display: flex; gap: 6px; margin-top: 13px; }
.platform-actions button { min-height: 27px; padding: 4px 7px; color: #28658d; background: #f7fafb; border: 1px solid #cbdbe3; border-radius: 4px; font-size: 10px; }
.platform-actions button:last-child { color: #a44f49; }
.approval-list { display: flex; flex-direction: column; gap: 9px; }
.approval-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; align-items: center; gap: 13px; min-height: 68px; padding: 12px 14px; background: #fff; border: 1px solid #dbe3e9; border-radius: 7px; }
.approval-row > i { width: 8px; height: 8px; border-radius: 50%; background: #db8a35; }
.approval-row.danger > i { background: #c55b51; }
.approval-row-main b, .approval-row-main small { display: block; }
.approval-row-main b { color: #203844; font-size: 13px; }
.approval-row-main small { margin-top: 4px; color: #7b8991; font-size: 11px; }
.route-empty { padding: 50px 20px; color: #798890; background: #fff; border: 1px dashed #cbd8df; border-radius: 7px; text-align: center; font-size: 13px; }
@media (max-width: 1000px) {
  .route-view { margin-left: 0; padding: 25px 20px 48px; }
  .route-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .route-view { padding: 21px 14px 42px; }
  .route-head { display: block; }
  .route-head h1 { font-size: 23px; }
  .route-head-meta { margin-top: 15px; }
  .route-grid.four, .route-grid.three, .route-card-grid, .platform-grid { grid-template-columns: 1fr; }
  .route-filter-row { align-items: stretch; flex-direction: column; }
  .route-search { width: 100%; }
  .approval-row { grid-template-columns: 8px minmax(0,1fr); }
  .approval-row > .status-tag, .approval-row > .route-action { grid-column: 2; justify-self: start; }
  .topbar-context { grid-template-columns: 24px auto; }
  .topbar-logo { width: 24px; height: 24px; }
}
.library-filter.active { color: var(--blue); }
.role-search { display: flex; align-items: center; gap: 7px; min-height: 36px; margin: 0 0 12px; padding: 0 9px; color: #8a98ac; background: #f7f9fc; border: 1px solid #e3e8f0; border-radius: 8px; }
.role-search:focus-within { color: var(--blue); background: #fff; border-color: #9db9f7; box-shadow: 0 0 0 3px rgba(53,116,243,.08); }
.role-search svg { width: 14px; height: 14px; flex: none; }
.role-search input { width: 100%; min-width: 0; padding: 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 12px; }
.role-search input::placeholder { color: #a1adbd; }
.role-search kbd { flex: none; padding: 2px 5px; color: #8a98ac; background: #edf1f6; border: 1px solid #dde4ed; border-radius: 4px; font: 500 9px "DM Mono", monospace; }
.role-button { border-color: #e4e9f0; border-radius: 9px; }
.role-button:hover { border-color: #a9c0e4; background: #f8faff; }
.role-button.active { background: #eff5ff; border-color: #6d99f6; box-shadow: inset 3px 0 0 var(--blue), 0 6px 16px rgba(43,99,210,.08); }
.role-avatar { border-radius: 8px; }
.stage-header { min-height: 102px; padding: 20px 22px; color: #fff; background: #10344e; border-radius: 13px; box-shadow: 0 14px 28px rgba(16,52,78,.14); }
.stage-header p { color: #b7cad9; }
.stage-header h2 { font-size: 23px; }
.role-photo-wrap { border: 2px solid rgba(255,255,255,.34); }
.run-summary span { color: #9eb7c9; }
.run-summary b { color: #fff; }
.run-summary small { color: #69d5a2; }
.source-pill, .maturity-pill, .engagement-pill { border-radius: 999px; }
.source-pill { color: #3766bd; background: #e9f0ff; }
.source-pill.general { color: #3766bd; background: #e9f0ff; }
.source-pill.curated, .role-source.curated { color: #8e651b; background: #fff1c9; }
.maturity-pill { color: #237d5b; background: #dff5e9; }
.engagement-pill { color: #3b67b7; background: #e6eeff; }
.role-focus-panel, .process-area, .stage-meta, .impact-strip { border-radius: 11px; box-shadow: 0 8px 24px rgba(23,42,70,.04); }
.role-focus-panel { padding: 13px; }
.role-focus-item { background: #f7f9fc; border-left-color: #76a1f6; }
.role-focus-scene { color: #3868c5; background: #e9f0ff; border-radius: 999px; }
.role-focus-scene:hover, .role-focus-scene.active { background: var(--blue); }
.scope-banner { color: #315b73; background: #edf8fa; border-color: #c9e8ed; border-radius: 10px; }
.scope-banner-icon { color: var(--blue); }
.scope-banner-tag { color: #2e6fa1; background: #dceff7; border-radius: 999px; }
.scenario-tab { border-radius: 999px; }
.scenario-tab.active { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 6px 14px rgba(53,116,243,.2); }
.capability-chip { border-radius: 999px; }
.stage-meta { border-color: #e0e7f0; }
.progress-track span { background: var(--blue); }
.process-area { padding: 20px 21px 16px; box-shadow: var(--shadow); }
.process-toolbar h3 { font-size: 19px; }
.detail-button { color: var(--blue); background: #edf3ff; border-color: #c8d8fb; border-radius: 8px; }
.detail-button:hover { background: var(--blue); border-color: var(--blue); }
.run-button { background: var(--blue); border-color: var(--blue); border-radius: 8px; box-shadow: 0 8px 16px rgba(53,116,243,.18); }
.run-button:hover { background: #2861d9; border-color: #2861d9; }
.impact-strip { overflow: hidden; }
.impact-strip .impact-note { background: #10344e; }
.inspector-tabs { height: 65px; }
.inspector-tab.active::after { background: var(--blue); }
.approval-box { border-radius: 10px; }
.result-box { border-radius: 10px; }
.blueprint { top: 80px; right: 350px; }

@media (max-width: 1399px) and (min-width: 981px) {
  .workspace { grid-template-columns: 230px minmax(0, 1fr) 300px; }
  .blueprint { right: 300px; width: min(650px, calc(100vw - 530px)); }
}

/* Group Agent management console */
.access-brand { gap: 20px; }
.access-brand-logo { display: block; width: 148px; height: 60px; object-fit: contain; object-position: left center; }
.access-brand > span { padding-left: 20px; color: #aebbb7; border-left: 1px solid rgba(255,255,255,.16); font-size: 13px; }
.access-intro h1 { font-size: 49px; }
.primary-nav { background: #15221f; }
.primary-nav-brand { min-height: 72px; padding: 0 10px 20px; }
.primary-nav-logo { display: block; width: 152px; height: 54px; object-fit: contain; object-position: left center; }
.primary-nav-item.active { background: #247153; box-shadow: 0 8px 18px rgba(12,77,54,.24); }
.primary-nav-item:hover { transform: none; }
.topbar-context { grid-template-columns: auto 1fr; }
.topbar-logo { grid-row: 1 / -1; width: 104px; height: 42px; object-fit: contain; object-position: left center; border-radius: 0; background: transparent; }
.topbar-kicker { color: #74847f; }
.route-view { background: #f1f3f0; }
.route-inner { max-width: 1680px; }
.route-head { align-items: flex-end; }
.route-head h1 { font-size: 26px; }
.route-head p { max-width: 860px; }
.route-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.route-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.route-grid .span-2 { grid-column: span 2; }
.route-kpi { min-width: 0; }
.route-kpi b { overflow-wrap: anywhere; }
.route-panel { overflow: hidden; }
.route-panel-head { align-items: center; }
.route-panel-head > svg { color: var(--green); }
.route-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.route-action svg { width: 14px; height: 14px; }
.route-action.primary { background: var(--green); border-color: var(--green); }
.route-action.primary:hover { background: #12694d; border-color: #12694d; }
.route-callout.success { color: #315c46; background: #edf6f0; border-color: #cae0d1; }
.route-callout.alert { color: #79453e; background: #fbf0ed; border-color: #edcdc7; }
.route-callout.compact { margin: 14px 16px 16px; }
.management-toolbar, .registry-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.segmented { display: inline-flex; padding: 3px; background: #e4e9e5; border-radius: 6px; }
.segmented button { min-height: 31px; padding: 5px 10px; color: #66736f; background: transparent; border: 0; border-radius: 4px; font-size: 11px; }
.segmented button.active { color: #fff; background: #20322d; }
.segmented.small button { min-height: 26px; padding: 4px 8px; }
.toolbar-fields, .registry-actions { display: flex; align-items: center; gap: 8px; }
.toolbar-fields label { display: flex; align-items: center; gap: 7px; padding: 0 8px; background: #fff; border: 1px solid #d7dfda; border-radius: 5px; }
.toolbar-fields label span { color: var(--muted); font-size: 10px; }
.toolbar-fields select { height: 33px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 11px; }
.management-main-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, .9fr); gap: 13px; }
.decision-list { display: flex; flex-direction: column; }
.decision-list button { display: grid; grid-template-columns: 8px 1fr 16px; align-items: center; gap: 9px; width: 100%; padding: 15px 16px; color: var(--ink); background: transparent; border: 0; border-top: 1px solid var(--line); text-align: left; }
.decision-list button:hover { background: #f5f8f5; }
.decision-list span b, .decision-list span small { display: block; }
.decision-list span b { font-size: 12px; }
.decision-list span small { margin-top: 5px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.decision-list svg { width: 14px; color: var(--muted); }
.risk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.risk-dot.danger { background: var(--danger); }
.metric-stack { padding: 15px 16px 18px; }
.metric-stack > div { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; align-items: center; margin-top: 13px; }
.metric-stack > div:first-child { margin-top: 0; }
.metric-stack span { color: var(--muted); font-size: 11px; }
.metric-stack b { font-size: 12px; }
.metric-stack i { grid-column: 1 / -1; width: 100%; height: 5px; overflow: hidden; background: #e7ece8; border-radius: 3px; }
.metric-stack i::after { display: block; width: var(--value); height: 100%; content: ""; background: var(--green); }
.summary-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--line); }
.summary-pairs > div { min-height: 70px; padding: 14px; background: #fff; }
.summary-pairs span, .summary-pairs b { display: block; }
.summary-pairs span { color: var(--muted); font-size: 10.5px; }
.summary-pairs b { margin-top: 7px; font-size: 18px; }
.route-filter.compact { flex: 1; flex-wrap: nowrap; max-width: 720px; overflow-x: auto; scrollbar-width: thin; }
.route-filter.compact button { flex: none; }
.route-search-wrap { position: relative; display: block; }
.route-search-wrap svg { position: absolute; top: 9px; left: 10px; z-index: 1; width: 13px; color: var(--muted); }
.route-search-wrap .route-search { padding-left: 31px; }
.registry-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; color: var(--muted); font-size: 10.5px; }
.agent-registry, .tool-registry { display: flex; flex-direction: column; gap: 8px; }
.agent-registry-row, .tool-registry-row { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(390px, .8fr) auto; align-items: center; gap: 18px; min-height: 98px; padding: 14px 16px; background: #fff; border: 1px solid #d9e1dc; border-radius: 7px; }
.agent-registry-row:hover, .tool-registry-row:hover { border-color: #9fb9ac; box-shadow: 0 8px 20px rgba(29,59,49,.07); }
.agent-registry-main, .tool-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.agent-icon, .tool-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; color: var(--green); background: var(--green-soft); border-radius: 6px; }
.agent-registry-main h3, .tool-main h3 { margin: 1px 0 0; color: #20302c; font-size: 15px; }
.agent-registry-main p, .tool-main p { display: -webkit-box; margin: 6px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.agent-registry-state, .tool-stats { display: grid; grid-template-columns: repeat(4, minmax(78px, 1fr)); gap: 9px; }
.tool-stats { grid-template-columns: repeat(3, minmax(82px, 1fr)); }
.agent-registry-state > span, .tool-stats > span { min-width: 0; }
.agent-registry-state small, .agent-registry-state b, .tool-stats small, .tool-stats b { display: block; }
.agent-registry-state small, .tool-stats small { color: var(--muted); font-size: 10px; }
.agent-registry-state b, .tool-stats b { margin-top: 6px; color: #31413c; font-size: 11px; }
.agent-registry-actions { display: flex; align-items: center; gap: 6px; }
.icon-route-button { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; color: #54716a; background: #fff; border: 1px solid #cddad4; border-radius: 4px; }
.icon-route-button svg { width: 14px; }
.detail-mode .route-head { display: none; }
.detail-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; color: var(--muted); font-size: 11px; }
.detail-breadcrumb button { display: inline-flex; align-items: center; gap: 6px; padding: 0; color: var(--green); background: transparent; border: 0; font-size: 11px; }
.detail-breadcrumb button svg { width: 14px; }
.detail-breadcrumb b { color: var(--ink); }
.detail-breadcrumb .detail-brand { margin-left: auto; color: #527166; font-size: 11px; font-style: normal; font-weight: 800; }
.agent-detail-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; background: #fff; border: 1px solid #d8e0db; border-radius: 7px; }
.agent-detail-title { display: flex; align-items: flex-start; gap: 15px; min-width: 0; }
.agent-hero-icon { display: grid; place-items: center; width: 50px; height: 50px; flex: none; color: #fff; background: #247153; border-radius: 7px; }
.agent-detail-title h2 { margin: 8px 0 0; font-size: 24px; }
.agent-detail-title p { max-width: 860px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.title-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.agent-hero-actions { display: flex; flex: none; gap: 7px; }
.agent-value-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.agent-value-grid article { min-height: 118px; padding: 15px; background: #fff; border-top: 3px solid #8cae9e; border-right: 1px solid #dbe2de; border-bottom: 1px solid #dbe2de; border-left: 1px solid #dbe2de; }
.agent-value-grid article:nth-child(2) { border-top-color: var(--coral); }
.agent-value-grid article:nth-child(3) { border-top-color: var(--amber); }
.agent-value-grid article:nth-child(4) { border-top-color: var(--blue); }
.agent-value-grid span { color: var(--muted); font-size: 10px; font-weight: 700; }
.agent-value-grid p { margin: 9px 0 0; color: #33443f; font-size: 11.5px; line-height: 1.65; }
.flow-legend { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 10px; }
.flow-legend span { display: inline-flex; align-items: center; gap: 4px; }
.flow-legend i { width: 7px; height: 7px; border-radius: 50%; background: #7a98a6; }
.flow-legend i.agent { background: var(--green); }
.flow-legend i.human { background: var(--amber); }
.flow-legend i.result { background: var(--coral); }
.agent-process { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; padding: 18px; }
.agent-process article { position: relative; min-height: 115px; padding: 13px 13px 11px; background: #f5f7f5; border: 1px solid #dce3df; }
.agent-process article + article { border-left: 0; }
.agent-process article::after { position: absolute; z-index: 2; top: 45px; right: -7px; width: 12px; height: 12px; content: ""; background: #f5f7f5; border-top: 1px solid #dce3df; border-right: 1px solid #dce3df; transform: rotate(45deg); }
.agent-process article:last-child::after { display: none; }
.agent-process article.agent { background: #edf6f0; }
.agent-process article.human { background: #fbf5e9; }
.agent-process article.result { background: #fbefeb; }
.agent-process article b, .agent-process article span, .agent-process article em { display: block; }
.agent-process article b { color: #7a8984; font-size: 11px; }
.agent-process article span { margin-top: 13px; color: #2f403b; font-size: 11.5px; line-height: 1.5; }
.agent-process article em { margin-top: 12px; color: #81908b; font-size: 10px; font-style: normal; }
.agent-process article.running { outline: 2px solid var(--amber); outline-offset: -2px; }
.agent-process article.done { color: #fff; background: #247153; border-color: #247153; }
.agent-process article.done::after { background: #247153; border-color: #247153; }
.agent-process article.done b, .agent-process article.done span, .agent-process article.done em { color: #fff; }
.detail-facts { padding: 3px 16px 16px; }
.detail-facts > div { padding: 12px 0; border-top: 1px solid var(--line); }
.detail-facts span, .detail-facts b { display: block; }
.detail-facts span { color: var(--muted); font-size: 10px; }
.detail-facts b { margin-top: 6px; color: #35453f; font-size: 11px; font-weight: 600; line-height: 1.55; }
.agent-detail-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid #cfd9d3; }
.agent-detail-tabs button { flex: none; min-height: 39px; padding: 7px 13px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 11px; }
.agent-detail-tabs button.active { color: var(--green); border-bottom-color: var(--green); font-weight: 700; }
#agentExtendedContent { margin-top: 13px; }
.governance-list { display: flex; flex-direction: column; padding: 0 16px 15px; }
.governance-list > div { display: grid; grid-template-columns: minmax(120px, .35fr) 1fr auto; align-items: start; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.governance-list b { color: #33443f; font-size: 11px; }
.governance-list span { color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.boundary-callout { display: flex; gap: 11px; margin: 0 16px 14px; padding: 13px; color: #315c46; background: #edf6f0; border-left: 3px solid var(--green); }
.boundary-callout.compact { margin-top: 0; }
.boundary-callout svg { width: 17px; flex: none; }
.boundary-callout b, .boundary-callout p { margin: 0; font-size: 11px; line-height: 1.6; }
.boundary-callout p { margin-top: 5px; color: #58746a; }
.permission-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 16px; }
.permission-chips span { padding: 5px 7px; color: #315c46; background: #edf6f0; font-size: 10px; }
.permission-chips span.danger { color: #8b4740; background: #faeae7; }
.version-timeline { padding: 0 17px 17px; }
.version-timeline > div { position: relative; display: grid; grid-template-columns: minmax(160px, .45fr) 1fr auto; gap: 12px; padding: 15px 12px; border-top: 1px solid var(--line); }
.version-timeline > div.current { background: #edf6f0; }
.version-timeline b { font-size: 11px; }
.version-timeline span { color: var(--muted); font-size: 10.5px; }
.version-timeline em { color: var(--green); font-size: 10px; font-style: normal; font-weight: 700; }
.version-timeline button { color: var(--green); background: transparent; border: 0; font-size: 10px; }
.eval-bars { padding: 0 17px 17px; }
.eval-bars > div { display: grid; grid-template-columns: 140px 1fr 80px; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.eval-bars span, .eval-bars b { font-size: 10.5px; }
.eval-bars i { height: 6px; background: #e3e9e5; }
.eval-bars i::after { display: block; width: var(--value); height: 100%; content: ""; background: var(--green); }
.audit-list { padding: 0 17px 17px; }
.audit-list > div { display: grid; grid-template-columns: 58px 8px 1fr; gap: 11px; padding: 13px 0; border-top: 1px solid var(--line); }
.audit-list time { color: var(--muted); font-size: 10px; }
.audit-list i { width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: var(--amber); }
.audit-list i.success { background: var(--green); }
.audit-list b, .audit-list span { display: block; }
.audit-list b { font-size: 11px; }
.audit-list span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.audit-list.compact { padding-top: 1px; }
.tool-runner { display: grid; grid-template-columns: minmax(220px, .55fr) minmax(320px, 1fr) auto; align-items: end; gap: 18px; padding: 20px; background: #20322d; color: #fff; border-radius: 7px; }
.tool-runner h2 { margin: 5px 0 0; font-size: 19px; }
.tool-runner p { margin: 7px 0 0; color: #afbeb8; font-size: 10.5px; line-height: 1.5; }
.tool-runner label span { display: block; margin-bottom: 6px; color: #afbeb8; font-size: 10px; }
.tool-runner textarea { width: 100%; min-height: 76px; resize: vertical; padding: 10px; color: var(--ink); background: #fff; border: 0; border-radius: 5px; font-size: 11px; }
.tool-run-actions { display: flex; flex-direction: column; gap: 7px; }
.tool-run-result { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 12px; color: #315c46; background: #e8f3ec; border-radius: 5px; }
.tool-run-result[hidden] { display: none; }
.tool-run-result span { display: grid; place-items: center; }
.tool-run-result b, .tool-run-result p { margin: 0; color: #315c46; }
.tool-run-result b { font-size: 11px; }
.tool-run-result p { margin-top: 3px; font-size: 10px; }
.review-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .55fr); gap: 13px; }
.approval-row { grid-template-columns: 8px 1fr auto auto; }
.ticket-list { display: flex; flex-direction: column; padding: 0 15px 15px; }
.ticket-list > div { padding: 13px 0; border-top: 1px solid var(--line); }
.ticket-list span, .ticket-list b, .ticket-list small { display: block; }
.ticket-list > div > span:first-child { color: var(--green); font-size: 10px; font-weight: 700; }
.ticket-list b { margin-top: 5px; font-size: 11px; }
.ticket-list small { margin: 4px 0 7px; color: var(--muted); font-size: 10px; }
.review-modal { position: fixed; z-index: 120; inset: 0; display: none; }
.review-modal.open { display: block; }
.review-modal-backdrop { position: absolute; inset: 0; background: rgba(14,25,22,.62); }
.review-dialog { position: absolute; top: 28px; right: 28px; bottom: 28px; width: min(640px, calc(100vw - 56px)); overflow-y: auto; padding: 23px; background: #f6f8f5; border-radius: 7px; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.review-dialog header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.review-dialog h2 { margin: 5px 0 0; font-size: 20px; }
.review-context { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.review-context span { padding: 5px 7px; color: #50655e; background: #e7ede9; font-size: 10px; }
.review-context span.warn { color: #80601f; background: var(--amber-soft); }
.review-context span.danger { color: #8a4741; background: #f7e3df; }
.review-dialog section { margin-top: 17px; }
.review-dialog section h3, .review-dialog fieldset legend, .review-comment > span, .ticket-options > label > span:first-child { margin: 0 0 8px; color: #65736e; font-size: 10px; font-weight: 700; }
.review-dialog section p { margin: 0; color: #32423d; font-size: 11.5px; line-height: 1.6; }
.evidence-list { display: flex; flex-direction: column; gap: 6px; }
.evidence-list > div { display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: #fff; border: 1px solid #dde4df; }
.evidence-list b { color: var(--green); font-size: 10px; }
.evidence-list span { font-size: 11px; }
.review-dialog .agent-suggestion { padding: 13px; background: #edf6f0; border-left: 3px solid var(--green); }
.review-dialog fieldset { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 18px 0 0; padding: 0; border: 0; }
.review-dialog fieldset legend { grid-column: 1 / -1; }
.review-dialog fieldset label { position: relative; }
.review-dialog fieldset input { position: absolute; opacity: 0; }
.review-dialog fieldset span { display: grid; place-items: center; min-height: 36px; color: #596862; background: #fff; border: 1px solid #d2dbd6; border-radius: 4px; font-size: 10.5px; }
.review-dialog fieldset input:checked + span { color: #fff; background: var(--green); border-color: var(--green); }
.review-comment { display: block; margin-top: 17px; }
.review-comment > span { display: block; }
.review-comment textarea { width: 100%; min-height: 84px; resize: vertical; padding: 10px; border: 1px solid #d0d9d4; border-radius: 4px; font-size: 11px; }
.ticket-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 14px; padding: 13px; background: #fff; border: 1px solid #dde4df; }
.ticket-check { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 9px; }
.ticket-check input { margin-top: 3px; accent-color: var(--green); }
.ticket-check b, .ticket-check small { display: block; }
.ticket-check b { font-size: 11px; }
.ticket-check small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.ticket-options select { width: 100%; height: 34px; padding: 0 7px; background: #f7f9f7; border: 1px solid #d0d9d4; font-size: 10px; }
.review-dialog footer { display: flex; justify-content: flex-end; gap: 7px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.modal-open { overflow: hidden; }
.org-import-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; padding: 18px 20px; color: #fff; background: #20322d; border-radius: 7px; }
.org-import-icon { display: grid; place-items: center; width: 44px; height: 44px; background: rgba(255,255,255,.1); border-radius: 6px; }
.org-import-bar h2 { margin: 0; font-size: 16px; }
.org-import-bar p { margin: 6px 0 0; color: #b9c7c2; font-size: 11px; }
.org-import-bar small { display: block; margin-top: 8px; color: #75c5a4; font-size: 10px; }
.org-import-actions { display: flex; gap: 7px; }
.org-import-actions .route-action:not(.primary) { color: #dce7e3; background: transparent; border-color: #60736c; }
.org-layout { display: grid; grid-template-columns: minmax(260px, .42fr) minmax(0, 1fr); gap: 13px; }
.org-tree { padding: 4px 13px 15px; }
.org-tree > div { display: grid; grid-template-columns: 18px 1fr; gap: 7px; align-items: center; min-height: 46px; padding: 7px 8px; border-top: 1px solid var(--line); }
.org-tree > div.active { background: #edf6f0; border-left: 3px solid var(--green); }
.org-tree .level-1 { padding-left: 17px; }
.org-tree .level-2 { padding-left: 35px; }
.org-tree .level-3 { padding-left: 53px; }
.org-tree svg { width: 14px; color: var(--muted); }
.org-tree b, .org-tree small { display: block; }
.org-tree b { font-size: 11px; }
.org-tree small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.compact-kpis { gap: 7px; padding: 0 15px 15px; }
.compact-kpis .route-kpi { min-height: 72px; padding: 11px; }
.compact-kpis .route-kpi b { font-size: 17px; }
.permission-matrix { overflow-x: auto; }
.account-registry-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.account-registry-body { margin-top: 4px; overflow-x: auto; border-top: 1px solid var(--line); }
.account-registry-table { min-width: 1080px; }
.account-registry-head, .account-registry-row { display: grid; grid-template-columns: minmax(170px, 1.25fr) minmax(145px, 1fr) minmax(155px, 1fr) minmax(145px, .9fr) minmax(120px, .8fr) 95px 90px; gap: 12px; align-items: center; padding: 11px 17px; }
.account-registry-head { color: var(--muted); background: #f7f9f7; font-size: 11px; font-weight: 700; }
.account-registry-row { min-height: 66px; border-top: 1px solid #edf1ee; font-size: 12px; }
.account-registry-row > span { min-width: 0; }
.account-registry-row b, .account-registry-row small { display: block; }
.account-registry-row b { overflow: hidden; color: var(--ink-2); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.account-registry-row small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.account-registry-row .status-tag + small { margin-top: 6px; }
.account-registry-empty { padding: 30px 18px; color: var(--muted); text-align: center; font-size: 13px; }
.account-registry-empty.danger { color: var(--danger); }
.account-registry-self { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; }
.account-registry-self > div { display: flex; align-items: center; gap: 10px; }
.account-registry-self b, .account-registry-self small { display: block; }
.account-registry-self small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.account-registry-avatar { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--ink); border-radius: 6px; font-weight: 700; }
body.auth-subuser [data-org-archive], body.auth-subuser [data-agent-action="delete"] { display: none !important; }
.identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--line); }
.identity-grid > div { min-height: 86px; padding: 14px; background: #fff; }
.identity-grid svg { width: 17px; color: var(--green); }
.identity-grid b, .identity-grid span { display: block; }
.identity-grid b { margin-top: 7px; font-size: 11px; }
.identity-grid span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.sync-history { padding: 0 15px 15px; }
.sync-history > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 13px 0; border-top: 1px solid var(--line); }
.sync-history b, .sync-history span { display: block; }
.sync-history b { font-size: 11px; }
.sync-history > div > span:nth-child(2) { color: var(--muted); font-size: 10px; }
.sync-history .status-tag { grid-row: 1 / 3; grid-column: 2; align-self: center; }
.asset-catalog { display: flex; flex-direction: column; gap: 13px; }
.asset-role-section { overflow: hidden; background: #fff; border: 1px solid #d9e1dc; border-radius: 7px; }
.asset-role-section > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; background: #f7f9f7; border-bottom: 1px solid var(--line); }
.asset-role-section > header > div { display: flex; align-items: center; gap: 10px; }
.asset-role-section h2 { margin: 0; font-size: 16px; }
.asset-role-section p { max-width: 780px; margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.role-avatar.compact { position: relative; width: 34px; height: 34px; overflow: hidden; border-radius: 5px; }
.role-avatar.compact img { width: 100%; height: 100%; object-fit: cover; }
.role-avatar.compact b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(20,40,34,.28); font-size: 12px; }
.asset-table { min-width: 800px; }
.asset-table-head, .asset-table-row { display: grid; grid-template-columns: minmax(210px, 1.5fr) 105px 110px 125px 90px 38px; gap: 11px; align-items: center; padding: 10px 15px; }
.asset-table-head { color: var(--muted); background: #fbfcfb; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.asset-table-row { min-height: 64px; border-bottom: 1px solid #edf0ed; font-size: 13px; }
.asset-table-row:last-child { border-bottom: 0; }
.asset-table-row > span:first-child b, .asset-table-row > span:first-child small { display: block; }
.asset-table-row > span:first-child b { font-size: 14px; }
.asset-table-row > span:first-child small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.asset-table .status-tag, .asset-role-section > header .status-tag { font-size: 12px; }
.connector-group > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.connector-group > header h2 { margin: 0; font-size: 15px; }
.connector-group > header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.connector-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.connector-card { display: flex; flex-direction: column; min-height: 210px; padding: 14px; background: #fff; border: 1px solid #d9e1dc; border-radius: 7px; }
.connector-head { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 9px; }
.connector-head > span:first-child, .connector-large-logo { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: #315f50; border-radius: 5px; font-size: 12px; font-weight: 800; }
.connector-head h3 { margin: 0; font-size: 13px; }
.connector-head small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.connector-scope { margin-top: 13px; }
.connector-scope p { margin: 7px 0 0; color: #566660; font-size: 10px; line-height: 1.45; }
.connector-scope p span { display: inline-block; min-width: 38px; margin-right: 5px; color: var(--muted); font-size: 10px; }
.connector-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.connector-card footer > span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.connector-card footer button { padding: 0; color: var(--green); background: transparent; border: 0; font-size: 10px; }
.health-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.health-dot.neutral { background: #9da7a3; }
.connector-detail-panel { margin-top: 18px; padding: 20px; background: #fff; border: 1px solid #cddbd3; border-top: 4px solid var(--green); box-shadow: var(--shadow); }
.connector-detail-panel[hidden] { display: none; }
.connector-detail-panel > header { display: flex; align-items: flex-start; justify-content: space-between; }
.connector-detail-panel > header > div { display: flex; align-items: center; gap: 12px; }
.connector-detail-panel h2 { margin: 4px 0 0; font-size: 20px; }
.connector-detail-panel p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.connector-detail-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.governance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }

@media (max-width: 1320px) {
  .route-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route-grid.five > :nth-child(n+4) { grid-column: auto; }
  .agent-registry-row, .tool-registry-row { grid-template-columns: minmax(280px, 1fr) minmax(330px, .75fr) auto; gap: 12px; }
  .agent-value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-process { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .agent-process article + article { border-left: 1px solid #dce3df; }
  .agent-process article::after { display: none; }
  .connector-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .access-intro h1 { font-size: 39px; }
  .management-toolbar, .registry-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-fields, .registry-actions { flex-wrap: wrap; }
  .management-main-grid, .review-layout, .org-layout { grid-template-columns: 1fr; }
  .management-main-grid .span-2, .review-layout .span-2 { grid-column: auto; }
  .agent-registry-row, .tool-registry-row { grid-template-columns: 1fr auto; }
  .agent-registry-state, .tool-stats { grid-column: 1 / -1; grid-row: 2; }
  .agent-registry-actions, .tool-registry-row > .route-action { grid-column: 2; grid-row: 1; }
  .agent-detail-hero { align-items: flex-start; flex-direction: column; }
  .agent-hero-actions { flex-wrap: wrap; }
  .tool-runner { grid-template-columns: 1fr; }
  .tool-run-result { grid-column: auto; }
  .connector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .access-brand { justify-content: space-between; gap: 10px; }
  .access-brand-logo { width: 112px; height: 46px; }
  .access-brand > span { max-width: 150px; padding-left: 10px; font-size: 10px; line-height: 1.4; }
  .access-intro h1 { font-size: 31px; }
  .topbar-context { grid-template-columns: auto 1fr; }
  .topbar-logo { width: 76px; height: 34px; }
  .topbar-kicker { display: none; }
  .route-head { align-items: flex-start; }
  .route-head-meta { width: 100%; overflow-x: auto; }
  .route-grid.five, .route-grid.two, .governance-grid { grid-template-columns: 1fr; }
  .management-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-kpis > :last-child { grid-column: 1 / -1; }
  .route-filter.compact { max-width: 100%; }
  .registry-actions { display: grid; grid-template-columns: 1fr auto auto; }
  .route-search-wrap { grid-column: 1 / -1; }
  .route-search { width: 100%; }
  .agent-registry-row, .tool-registry-row { grid-template-columns: 1fr; padding: 13px; }
  .agent-registry-actions, .tool-registry-row > .route-action { grid-column: 1; grid-row: auto; }
  .agent-registry-actions .route-action, .tool-registry-row > .route-action { flex: 1; }
  .agent-registry-state, .tool-stats { grid-column: 1; grid-row: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 11px; border-top: 1px solid var(--line); }
  .agent-detail-hero { padding: 16px; }
  .agent-detail-title { flex-direction: column; }
  .agent-detail-title h2 { font-size: 20px; }
  .agent-hero-actions { width: 100%; }
  .agent-hero-actions .route-action { flex: 1; }
  .agent-value-grid { grid-template-columns: 1fr; }
  .agent-value-grid article { min-height: 0; }
  .agent-process { grid-template-columns: 1fr; padding: 12px; }
  .agent-process article { min-height: 86px; }
  .flow-legend { display: none; }
  .governance-list > div { grid-template-columns: 1fr; gap: 6px; }
  .eval-bars > div { grid-template-columns: 1fr auto; }
  .eval-bars i { grid-column: 1 / -1; }
  .review-dialog { top: 0; right: 0; bottom: 0; width: 100vw; padding: 17px 14px; border-radius: 0; }
  .review-dialog fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ticket-options { grid-template-columns: 1fr; }
  .org-import-bar { grid-template-columns: auto 1fr; }
  .org-import-actions { grid-column: 1 / -1; }
  .org-import-actions .route-action { flex: 1; }
  .permission-matrix, .asset-role-section { overflow-x: auto; }
  .asset-role-section > header { align-items: flex-start; flex-direction: column; }
  .asset-role-section > header > div:last-child { flex-wrap: wrap; }
  .connector-grid { grid-template-columns: 1fr; }
  .connector-detail-panel { padding: 14px; }
  .connector-detail-actions { flex-wrap: wrap; }
  .connector-detail-actions .route-action { flex: 1; }
}

@media (max-width: 980px) {
  .primary-nav { z-index: 80; width: 242px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 14px 0 36px rgba(4,18,34,.22); }
  body.nav-open .primary-nav { transform: translateX(0); }
  .nav-backdrop { position: fixed; z-index: 70; inset: 0; display: none; padding: 0; background: rgba(4,18,34,.46); border: 0; }
  body.nav-open .nav-backdrop { display: block; }
  .topbar { height: 68px; grid-template-columns: 34px minmax(0,1fr) auto; margin-left: 0; padding: 0 14px; }
  .nav-toggle { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: var(--ink); background: #f3f6fb; border: 1px solid #e2e8f1; border-radius: 9px; }
  .nav-toggle svg { width: 17px; }
  .topbar-kicker { font-size: 10px; }
  .topbar-context strong { font-size: 15px; }
  .top-status { display: none; }
  .workspace { margin-left: 0; min-height: calc(100vh - 68px); }
  .role-sidebar, .inspector { position: static; top: auto; height: auto; overflow: visible; }
  .role-sidebar { padding: 14px; }
  .stage { padding: 18px 16px 24px; }
  .stage-header { padding: 16px 17px; }
  .blueprint { top: 68px; }
  .primary-nav-item b { display: none; }
}

@media (max-width: 680px) {
  .topbar { padding: 0 12px; }
  .topbar-context strong { font-size: 15px; }
  .top-actions .icon-button:not(.account-button) { display: none; }
  .stage { padding: 13px 12px 22px; }
  .stage-header { min-height: 90px; padding: 14px; border-radius: 11px; }
  .stage-header h2 { font-size: 19px; }
  .stage-header p { max-width: 235px; }
}
/* Production workbench interaction layer */
.management-toolbar .segmented button[data-scope] { min-width: 88px; }
.management-toolbar > .segmented { min-width: 0; max-width: 100%; overflow-x: auto; }
.management-toolbar > .segmented button { flex: 0 0 auto; }
.route-action[data-active="true"], .segmented button.active[data-scope] { color: #fff; background: var(--ink); border-color: var(--ink); }
.registry-search-actions { display: flex; align-items: stretch; gap: 8px; min-width: min(100%, 540px); }
.registry-search-actions .route-search-wrap { flex: 1; }
.route-search-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 84px; }
.agent-more-menu { position: absolute; z-index: 40; right: 0; top: calc(100% + 6px); min-width: 178px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 12px 30px rgba(23,32,31,.16); }
.agent-more-menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 9px 10px; color: var(--ink-2); background: transparent; border: 0; border-radius: 4px; text-align: left; font-size: 14px; }
.agent-more-menu button:hover { background: #f0f3f0; }
.agent-registry-actions { position: relative; }
.filter-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.route-filter-tree { display: flex; flex-wrap: wrap; gap: 6px; max-height: 104px; overflow: auto; padding: 4px; }
.route-filter-tree button { padding: 6px 9px; color: var(--muted); background: #f6f8f5; border: 1px solid transparent; border-radius: 4px; font-size: 14px; }
.route-filter-tree button.active { color: var(--ink); background: #fff; border-color: #a7c2b1; box-shadow: 0 1px 4px rgba(23,32,31,.08); font-weight: 700; }
.workflow-graph { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; padding: 14px 18px 18px; }
.workflow-graph .flow-node { position: relative; flex: 1 1 166px; min-width: 150px; padding: 14px; background: #fbfcfa; border: 1px solid var(--line); border-radius: 6px; }
.workflow-graph .flow-node::after { content: "→"; position: absolute; right: -13px; top: 50%; color: #9cac9f; transform: translateY(-50%); }
.workflow-graph .flow-node:last-child::after { display: none; }
.workflow-graph .flow-node b, .workflow-graph .flow-node span, .workflow-graph .flow-node small { display: block; }
.workflow-graph .flow-node b { color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.workflow-graph .flow-node span { margin-top: 7px; color: var(--ink); font-size: 15px; font-weight: 700; }
.workflow-graph .flow-node small { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.workflow-graph .flow-node.system { border-top: 3px solid #6e9bb1; }
.workflow-graph .flow-node.agent { border-top: 3px solid var(--green); }
.workflow-graph .flow-node.human { border-top: 3px solid #c18b53; }
.workflow-graph .flow-node.result { border-top: 3px solid #8d75b5; }
.org-tree-live { display: grid; gap: 4px; }
.org-node { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 38px; padding: 5px 8px; border-radius: 4px; cursor: pointer; }
.org-node:hover, .org-node.active { background: #f1f5f1; }
.org-node .org-toggle { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; color: var(--muted); background: transparent; border: 0; }
.org-node .org-title b, .org-node .org-title small { display: block; }
.org-node .org-title b { font-size: 15px; }
.org-node .org-title small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.org-node .org-actions { display: flex; gap: 4px; opacity: 0; }
.org-node:hover .org-actions, .org-node.active .org-actions { opacity: 1; }
.org-node .org-actions button { width: 27px; height: 27px; padding: 0; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.org-children { margin-left: 16px; }
.governance-subnav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.governance-subnav button { padding: 7px 10px; color: var(--muted); background: #f5f7f4; border: 1px solid transparent; border-radius: 4px; font-size: 14px; }
.governance-subnav button.active { color: var(--ink); background: #fff; border-color: #aec4b4; font-weight: 700; }
.detail-drilldown { cursor: pointer; }
.detail-drilldown:hover { border-color: #a7c2b1; box-shadow: 0 4px 12px rgba(23,32,31,.08); }
.ticket-detail-panel { margin-top: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.ticket-detail-panel[hidden] { display: none; }
.ticket-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ticket-detail-head h3 { margin: 3px 0 0; font-size: 19px; }
.ticket-timeline { display: grid; gap: 11px; margin-top: 14px; }
.ticket-timeline > div { display: grid; grid-template-columns: 74px 10px minmax(0, 1fr); gap: 10px; align-items: start; }
.ticket-timeline time { color: var(--muted); font-size: 14px; }
.ticket-timeline i { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--green); }
.ticket-timeline p { margin: 0; font-size: 15px; line-height: 1.5; }
.ticket-timeline p span { display: block; color: var(--muted); font-size: 14px; }
.wb-modal { position: fixed; z-index: 110; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(13,22,20,.54); }
.wb-modal[hidden] { display: none; }
.wb-dialog { width: min(680px, 100%); max-height: min(88vh, 820px); overflow: auto; padding: 22px; background: #f9fbf8; border: 1px solid #d4ddd5; border-radius: 8px; box-shadow: 0 22px 72px rgba(0,0,0,.24); }
.wb-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.wb-dialog > header h2 { margin: 4px 0 0; font-size: 21px; }
.wb-dialog > header p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.wb-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.wb-form-grid label { display: block; }
.wb-form-grid label.full { grid-column: 1 / -1; }
.wb-form-grid label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.wb-form-grid input, .wb-form-grid select, .wb-form-grid textarea { width: 100%; min-height: 38px; padding: 8px 10px; color: var(--ink); background: #fff; border: 1px solid #c9d3cb; border-radius: 5px; font: inherit; font-size: 15px; }
.wb-form-grid textarea { min-height: 84px; resize: vertical; }
.wb-dialog > footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.wb-form-note { margin: 14px 0 0; padding: 10px 12px; color: var(--muted); background: #eef4ee; border-left: 3px solid var(--green); font-size: 14px; line-height: 1.5; }
.risk-filter-active { outline: 2px solid rgba(193,139,83,.28); outline-offset: 2px; }
.route-view, .route-view button, .route-view input, .route-view select, .route-view textarea { font-size: 15px; }
.route-view p, .route-view small, .route-view label, .route-view th, .route-view td { line-height: 1.5; }
.route-view .route-panel p, .route-view .route-callout span, .route-view .governance-list span { font-size: 15px; }
.route-view .route-kpi small, .route-view .route-card-meta span, .route-view .route-table small { font-size: 14px; }
@media (max-width: 720px) {
  .registry-search-actions { width: 100%; min-width: 0; }
  .workflow-graph { display: grid; padding: 12px 14px 16px; }
  .workflow-graph .flow-node::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -17px; transform: translateX(-50%); }
  .workflow-graph .flow-node:last-child::after { display: none; }
  .wb-form-grid { grid-template-columns: 1fr; }
  .wb-form-grid label.full { grid-column: auto; }
  .wb-dialog { padding: 16px; }
  .org-node .org-actions { opacity: 1; }
  .ticket-timeline > div { grid-template-columns: 62px 9px minmax(0, 1fr); }
}

.genai-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.genai-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; color: var(--muted); background: #f5f7f4; border: 1px solid transparent; border-radius: 4px; font-size: 15px; }
.genai-tabs button.active { color: var(--ink); background: #fff; border-color: #aec4b4; box-shadow: 0 1px 4px rgba(23,32,31,.08); font-weight: 700; }
.genai-model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.genai-model-card { padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.genai-model-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.genai-model-card h3 { margin: 0; font-size: 16px; }
.genai-model-card p { min-height: 42px; margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.genai-model-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.genai-provider-mark { display: grid; place-items: center; width: 32px; height: 32px; color: #fff; background: var(--ink); border-radius: 6px; font-weight: 800; }
.genai-workspace { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 14px; }
.genai-composer { display: grid; gap: 12px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.genai-composer textarea { width: 100%; min-height: 160px; padding: 12px; color: var(--ink); background: #fbfcfa; border: 1px solid #ccd6ce; border-radius: 5px; font: inherit; font-size: 15px; line-height: 1.6; resize: vertical; }
.genai-composer-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.genai-composer-controls select, .genai-composer-controls input { min-height: 36px; padding: 7px 9px; color: var(--ink); background: #fff; border: 1px solid #ccd6ce; border-radius: 5px; font-size: 15px; }
.genai-chat-log { display: grid; gap: 9px; max-height: 360px; overflow: auto; padding: 12px; background: #f6f8f5; border: 1px solid var(--line); border-radius: 6px; }
.genai-message { max-width: 88%; padding: 10px 12px; border-radius: 6px; font-size: 15px; line-height: 1.55; }
.genai-message.user { justify-self: end; color: #fff; background: var(--ink); }
.genai-message.assistant { justify-self: start; background: #fff; border: 1px solid var(--line); }
.genai-job-form { display: grid; gap: 12px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.genai-job-form textarea { min-height: 125px; }
.genai-upload { display: grid; place-items: center; min-height: 110px; color: var(--muted); background: #f6f8f5; border: 1px dashed #aebdb2; border-radius: 6px; text-align: center; font-size: 15px; }
.genai-upload input { display: none; }
.genai-task-list { display: grid; gap: 8px; }
.genai-task-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 11px 12px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.genai-task-row b, .genai-task-row span, .genai-task-row small { display: block; }
.genai-task-row b { font-size: 15px; }
.genai-task-row span { margin-top: 3px; color: var(--muted); font-size: 14px; }
.genai-task-row small { color: var(--muted); font-size: 13px; }
.genai-capability-list { display: grid; gap: 9px; }
.genai-capability-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.genai-capability-list b { font-size: 15px; }
.genai-capability-list span { color: var(--muted); font-size: 14px; }
@media (max-width: 980px) { .genai-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .genai-workspace { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .genai-model-grid { grid-template-columns: 1fr; } .genai-task-row { grid-template-columns: 1fr; gap: 6px; } .genai-composer-controls select, .genai-composer-controls input, .genai-composer-controls button { width: 100%; } }

/* Production workbench refinements: persistent sub-navigation and actionable states. */
.primary-nav { overflow-y: auto; }
.primary-nav-section { margin-top: 18px; }
.primary-nav-secondary { margin-top: 20px; }
.secondary-workspace { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 18px; align-items: start; }
.secondary-nav { position: sticky; top: 92px; min-width: 0; max-width: 100%; overflow: hidden; padding: 14px; background: #e7ebe7; border: 1px solid #d2dad3; border-radius: 7px; }
.secondary-nav > .overline { display: block; margin: 2px 4px 12px; }
.secondary-nav .governance-subnav, .secondary-nav .genai-tabs { display: grid; gap: 5px; margin: 0; padding: 0; border: 0; }
.secondary-nav .governance-subnav button, .secondary-nav .genai-tabs button { justify-content: flex-start; width: 100%; min-height: 38px; margin: 0; text-align: left; }
.secondary-content { min-width: 0; }
.route-content-only { min-width: 0; }
.genai-creation-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 3px; }
.genai-creation-header h2 { margin: 0; font-size: 21px; }
.genai-creation-header p { max-width: 620px; margin: 6px 0 0; color: var(--muted); line-height: 1.6; }
.genai-mode-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.genai-mode-pills span { display: inline-flex; align-items: center; min-height: 26px; padding: 5px 9px; color: #496276; background: #eef5ff; border: 1px solid #d5e2f5; border-radius: 999px; font-size: 13px; }
.genai-reference-upload { min-height: 92px; }
.genai-reference-upload span { display: inline-flex; align-items: center; gap: 6px; }
.genai-asset-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.genai-asset-rail article { min-height: 76px; padding: 11px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 6px; }
.genai-asset-rail b, .genai-asset-rail span { display: block; }
.genai-asset-rail b { font-size: 14px; }
.genai-asset-rail span { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.analysis-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.analysis-toolbar .filter-summary { flex: 1; margin: 0; }
.analysis-bars, .analysis-trend { display: grid; gap: 12px; padding: 16px; }
.analysis-bars > div, .analysis-trend > div { display: grid; grid-template-columns: minmax(120px, .28fr) 1fr; gap: 12px; align-items: center; }
.analysis-bars span, .analysis-trend span { color: var(--ink-2); font-size: 15px; }
.analysis-bars i, .analysis-trend i { position: relative; display: block; height: 26px; overflow: hidden; background: #edf1ed; border-radius: 4px; font-style: normal; }
.analysis-bars i::before, .analysis-trend i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--value); background: #3a8065; }
.analysis-bars b, .analysis-trend b { position: relative; z-index: 1; display: block; padding: 5px 8px; color: #fff; font-size: 14px; }
.analysis-funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; padding: 18px; }
.analysis-funnel > div { min-height: 82px; display: grid; place-items: center; align-content: center; color: #fff; background: #356f5b; clip-path: polygon(0 0, 94% 0, 100% 50%, 94% 100%, 0 100%, 6% 50%); }
.analysis-funnel > div:nth-child(2) { background: #417d68; }
.analysis-funnel > div:nth-child(3) { background: #528b76; }
.analysis-funnel > div:nth-child(4) { background: #669985; }
.analysis-funnel > div:nth-child(5) { background: #79a694; }
.analysis-funnel b { font-size: 19px; }
.analysis-funnel span { font-size: 13px; }
.analysis-org-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 15px; }
.analysis-org-grid button { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; min-height: 82px; padding: 12px; color: var(--ink); background: #f8faf7; border: 1px solid var(--line); border-radius: 6px; text-align: left; }
.analysis-org-grid button:hover { border-color: #91af9c; background: #fff; }
.analysis-org-grid span { color: var(--muted); font-size: 14px; }
.analysis-org-grid svg { grid-row: 1 / 3; grid-column: 2; }
.agent-more-menu button.danger { color: #a33a35; }
.agent-more-menu button.danger:hover { background: #fff1f0; }
.route-action.danger { color: #fff; background: #b73d37; border-color: #b73d37; }
.danger-confirm { padding: 14px; background: #fff5f4; border: 1px solid #df8e89; border-left: 5px solid #b73d37; border-radius: 6px; }
.danger-confirm > div { display: flex; gap: 10px; align-items: flex-start; color: #8b2f2a; }
.danger-confirm b, .danger-confirm small { display: block; }
.danger-confirm small { margin-top: 4px; color: #8d5b58; font-size: 14px; }
.danger-confirm ul { margin: 14px 0; padding-left: 22px; color: #714744; font-size: 14px; line-height: 1.8; }
.danger-confirm label > span { display: block; margin-bottom: 6px; color: #743b37; font-size: 14px; }
.danger-confirm input, .danger-confirm select, .danger-confirm textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #d69a96; border-radius: 5px; background: #fff; font: inherit; }
.danger-confirm textarea { min-height: 84px; resize: vertical; }
.ticket-close label { display: block; margin-top: 12px; }
.modal-summary { display: flex; align-items: center; gap: 10px; margin: 15px 0; padding: 11px 12px; background: #eef3ee; border-radius: 5px; }
.modal-summary span:last-child { color: var(--muted); font-size: 14px; }
.modal-table { max-height: 420px; overflow: auto; border: 1px solid var(--line); background: #fff; }
.version-list { display: grid; gap: 10px; margin-top: 15px; }
.version-list article { padding: 13px; background: #fff; border: 1px solid var(--line); border-left: 4px solid #aab7ae; border-radius: 5px; }
.version-list article.active { border-left-color: var(--green); }
.version-list header { display: flex; justify-content: space-between; align-items: center; }
.version-list p { margin: 8px 0; font-size: 15px; }
.version-list small { color: var(--muted); font-size: 13px; }
.permission-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 12px; border: 1px solid #cbd5cd; border-radius: 6px; }
.permission-checks legend { padding: 0 6px; color: var(--muted); font-size: 14px; }
.permission-checks label { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 7px 9px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.permission-checks input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--green); }
.permission-checks label > span { margin: 0; color: var(--ink); }
.action-checks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-files { display: grid; gap: 7px; margin-top: 10px; }
.tool-files > div { display: flex; align-items: center; gap: 9px; padding: 9px 10px; background: #f5f8f5; border: 1px solid var(--line); border-radius: 5px; }
.tool-files span { flex: 1; }
.tool-files b, .tool-files small { display: block; }
.tool-files small { margin-top: 3px; color: var(--muted); }
.connection-test-state { margin-top: 14px; padding: 10px 12px; color: var(--muted); background: #f1f3f1; border-left: 3px solid #9ca8a0; font-size: 14px; }
.connection-test-state.testing { color: #8c602e; border-left-color: #c18b53; background: #fff8ef; }
.connection-test-state.success { color: #28684f; border-left-color: #3f8d6d; background: #eff8f3; }
.build-steps { display: grid; gap: 8px; padding: 14px; }
.build-steps button { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; padding: 10px; color: var(--ink); background: #f8faf7; border: 1px solid var(--line); border-radius: 5px; text-align: left; }
.build-steps button:hover { background: #fff; border-color: #91af9c; }
.build-steps button > b { display: grid; place-items: center; width: 32px; height: 32px; color: #fff; background: var(--green); border-radius: 4px; font-size: 13px; }
.build-steps span, .build-steps small { display: block; }
.build-steps small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.ontology-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 20px; }
.ontology-map > div { display: grid; place-items: center; min-height: 68px; background: #f0f5f1; border: 1px solid #b9cbbf; border-radius: 6px; font-weight: 700; }
.ontology-map > div.core { color: #fff; background: var(--green); }
.ontology-map > span { grid-column: 1 / -1; color: var(--muted); font-size: 14px; text-align: center; }
.genai-usage-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.genai-usage-strip > div { padding: 11px 12px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.genai-usage-strip span, .genai-usage-strip b { display: block; }
.genai-usage-strip span { color: var(--muted); font-size: 13px; }
.genai-usage-strip b { margin-top: 5px; font-size: 15px; }
.workflow-graph .flow-node.system { border-top: 5px solid #2879a8; background: #f1f8fc; }
.workflow-graph .flow-node.agent { border-top: 5px solid #4d6fd1; background: #f2f4fc; }
.workflow-graph .flow-node.human { border-top: 5px solid #c07b32; background: #fff7ee; }
.workflow-graph .flow-node.result { border-top: 5px solid #319264; background: #eef9f3; }
.flow-legend i { width: 11px; height: 11px; border-radius: 2px; }
.flow-legend i.system { background: #2879a8; }
.flow-legend i.agent { background: #4d6fd1; }
.flow-legend i.human { background: #c07b32; }
.flow-legend i.result { background: #319264; }
.asset-catalog { margin-top: 20px; }
.registry-toolbar + .asset-catalog { margin-top: 22px; }
.ticket-evidence { margin-top: 14px; padding: 11px 12px; background: #f1f5f1; border-left: 3px solid var(--green); }
.ticket-evidence b, .ticket-evidence span { display: block; }
.ticket-evidence span { margin-top: 4px; color: var(--muted); font-size: 14px; }
@media (max-width: 1000px) {
  .secondary-workspace { grid-template-columns: 1fr; }
  .secondary-nav { position: static; }
  .secondary-nav .governance-subnav, .secondary-nav .genai-tabs { display: flex; width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; }
  .secondary-nav .governance-subnav button, .secondary-nav .genai-tabs button { width: auto; flex: none; }
}
@media (max-width: 700px) {
  .analysis-toolbar { align-items: stretch; flex-direction: column; }
  .analysis-bars > div, .analysis-trend > div { grid-template-columns: 1fr; gap: 5px; }
  .analysis-funnel, .analysis-org-grid, .genai-usage-strip { grid-template-columns: 1fr; }
  .analysis-funnel > div { clip-path: none; min-height: 64px; border-radius: 5px; }
  .permission-checks, .action-checks { grid-template-columns: 1fr 1fr; }
  .wb-dialog > footer { flex-wrap: wrap; }
  .genai-asset-rail { grid-template-columns: 1fr; }
}

/* Generative workspaces: conversation, visual creation and video creation. */
.chat-studio {
  display: grid;
  grid-template-columns: 218px minmax(470px, 1fr) 258px;
  min-height: 680px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce3df;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(24, 47, 40, .07);
}
.chat-thread-rail {
  min-width: 0;
  padding: 14px 11px;
  background: #f3f5f3;
  border-right: 1px solid #dfe5e1;
}
.chat-thread-rail > button { width: 100%; }
.chat-new-thread {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-weight: 700;
}
.chat-new-thread:hover { background: #263e48; }
.chat-thread-search {
  display: grid;
  grid-template-columns: 17px 1fr;
  align-items: center;
  gap: 5px;
  height: 36px;
  margin: 10px 0 14px;
  padding: 0 9px;
  color: var(--muted);
  background: #fff;
  border: 1px solid #d8dfda;
  border-radius: 6px;
}
.chat-thread-search input {
  min-width: 0;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
}
.chat-rail-label {
  display: block;
  margin: 13px 8px 5px;
  color: #8a958f;
  font-size: 13px;
  font-weight: 700;
}
.chat-thread-rail > button:not(.chat-new-thread) {
  display: block;
  min-height: 58px;
  margin-bottom: 3px;
  padding: 10px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: left;
}
.chat-thread-rail > button[hidden] { display: none; }
.chat-thread-rail > button:not(.chat-new-thread):hover { background: rgba(255,255,255,.75); }
.chat-thread-rail > button.active { background: #fff; border-color: #cfdbd3; box-shadow: 0 3px 10px rgba(23,32,31,.05); }
.chat-thread-rail b, .chat-thread-rail small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-rail b { font-size: 15px; }
.chat-thread-rail small { margin-top: 6px; color: var(--muted); font-size: 13px; }
.chat-conversation {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.chat-conversation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 67px;
  padding: 12px 20px;
  border-bottom: 1px solid #e7ebe8;
}
.chat-conversation-head h2 { margin: 0; font-size: 17px; }
.chat-conversation-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.chat-conversation-head > div:last-child { display: flex; align-items: center; gap: 8px; }
.chat-conversation-head .icon-button { width: 31px; height: 31px; }
.chat-conversation-body {
  flex: 1;
  min-height: 270px;
  max-height: 410px;
  overflow-y: auto;
  padding: 25px clamp(18px, 4vw, 48px) 18px;
}
.studio-message { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 11px; max-width: 820px; margin: 0 auto 22px; }
.studio-message-avatar { display: grid; place-items: center; width: 31px; height: 31px; color: #fff; background: var(--green); border-radius: 6px; }
.studio-message.user .studio-message-avatar { color: var(--ink); background: #e9eeea; }
.studio-message > div > b { display: block; margin-top: 4px; font-size: 14px; }
.studio-message p { margin: 8px 0 0; color: #31433b; font-size: 15px; line-height: 1.75; white-space: pre-wrap; }
.studio-message.user p { display: inline-block; padding: 10px 13px; background: #f0f3f1; border-radius: 6px; }
.studio-message footer { display: flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.studio-message footer button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 4px; }
.studio-message footer button:hover { color: var(--green); background: #eef5f0; }
.chat-prompt-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 clamp(18px, 4vw, 48px) 10px; }
.chat-prompt-suggestions button { min-height: 30px; padding: 5px 9px; color: #4e6258; background: #f7f9f7; border: 1px solid #d9e2dc; border-radius: 5px; font-size: 13px; }
.chat-prompt-suggestions button:hover { color: var(--green); border-color: #91b7a0; }
.chat-composer-pro {
  margin: 0 clamp(18px, 4vw, 48px) 8px;
  background: #fff;
  border: 1px solid #aebdb4;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(30,56,44,.08);
}
.chat-composer-pro:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,157,104,.1), 0 8px 24px rgba(30,56,44,.08); }
.chat-composer-pro textarea { width: 100%; min-height: 84px; padding: 15px 15px 8px; color: var(--ink); background: transparent; border: 0; outline: 0; resize: none; font: inherit; font-size: 15px; line-height: 1.6; }
.chat-composer-pro footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 10px; }
.chat-composer-pro footer > div { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chat-composer-pro select, .composer-context { min-height: 31px; padding: 5px 8px; color: #53675d; background: #f4f7f4; border: 1px solid #e0e6e1; border-radius: 5px; font-size: 13px; }
.composer-context { display: inline-flex; align-items: center; gap: 5px; }
.composer-icon, .composer-send { display: grid; place-items: center; width: 31px; height: 31px; flex: none; padding: 0; border-radius: 6px; }
.composer-icon { color: #56685e; background: #f2f5f3; border: 1px solid #dce3de; }
.composer-icon input { display: none; }
.composer-send { color: #fff; background: var(--green); border: 1px solid var(--green); }
.composer-cost { flex: none; color: var(--muted); font-size: 12px; }
.chat-ai-note { padding: 0 18px 11px; color: #87948d; text-align: center; font-size: 12px; }
.chat-context-rail { min-width: 0; padding: 16px 13px; background: #fafbfa; border-left: 1px solid #e0e5e2; }
.chat-context-rail > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.chat-context-rail h3 { margin: 0; font-size: 14px; }
.chat-context-rail > header button { display: grid; place-items: center; width: 29px; height: 29px; padding: 0; color: var(--muted); background: #fff; border: 1px solid #dfe5e1; border-radius: 5px; }
.chat-context-card {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #e0e6e2;
  border-radius: 6px;
  text-align: left;
}
.chat-context-card:hover { border-color: #a9c2b2; }
.chat-context-card.is-muted { opacity: .45; }
.chat-context-card > span { display: grid; place-items: center; width: 30px; height: 30px; color: var(--green); background: var(--green-soft); border-radius: 5px; }
.chat-context-card b, .chat-context-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-context-card b { font-size: 13px; }
.chat-context-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.chat-context-card > svg { width: 13px; color: #9aa6a0; }
.chat-context-rail > section { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e1e6e3; }
.chat-context-rail > section p { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.chat-usage-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; font-size: 12px; }
.chat-usage-row span { color: var(--muted); }

.creative-studio { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: stretch; }
.creative-stage, .creative-controls, .creative-history { background: #fff; border: 1px solid #dce3df; border-radius: 8px; box-shadow: 0 12px 28px rgba(24,47,40,.05); }
.creative-stage { min-width: 0; padding: 18px; }
.creative-stage-head, .creative-controls > header, .creative-history > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.creative-stage-head h2, .creative-history h2 { margin: 5px 0 0; font-size: 19px; }
.creative-stage-head p, .creative-history p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.creative-preview-board { display: grid; grid-template-columns: minmax(0, 1fr) 126px; gap: 9px; height: 364px; margin-top: 16px; padding: 9px; background: #151c1a; border-radius: 7px; }
.creative-preview-main { position: relative; min-width: 0; overflow: hidden; background: #242c29; border-radius: 5px; }
.creative-preview-main img, .creative-preview-stack img, .creative-history-grid img, .video-keyframe > img, .video-timeline-track img { width: 100%; height: 100%; object-fit: cover; }
.creative-preview-overlay { position: absolute; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 28px 12px 10px; color: #fff; background: linear-gradient(transparent, rgba(8,14,12,.74)); font-size: 12px; }
.creative-preview-overlay button { display: grid; place-items: center; width: 29px; height: 29px; padding: 0; color: #fff; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.25); border-radius: 5px; }
.creative-preview-stack { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; }
.creative-preview-stack button { position: relative; min-height: 0; overflow: hidden; padding: 0; background: #25302c; border: 1px solid transparent; border-radius: 5px; }
.creative-preview-stack button:hover { border-color: #7bd2a9; }
.creative-preview-stack span { position: absolute; right: 6px; bottom: 6px; left: 6px; padding: 4px 5px; color: #fff; background: rgba(11,18,15,.64); border-radius: 3px; font-size: 11px; }
.creative-prompt-area { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 9px; margin-top: 12px; }
.creative-reference { display: grid; place-items: center; min-height: 118px; padding: 8px; color: #53665c; background: #f5f7f5; border: 1px dashed #aab9b0; border-radius: 7px; text-align: center; }
.creative-reference input, .video-keyframe input { display: none; }
.creative-reference span { display: grid; justify-items: center; gap: 4px; }
.creative-reference b, .creative-reference small { display: block; }
.creative-reference small { color: var(--muted); font-size: 12px; }
.creative-prompt { position: relative; display: block; min-width: 0; }
.creative-prompt textarea { width: 100%; min-height: 118px; padding: 13px 14px 34px; color: var(--ink); background: #fbfcfb; border: 1px solid #cdd7d0; border-radius: 7px; outline: 0; resize: vertical; font: inherit; font-size: 15px; line-height: 1.65; }
.creative-prompt textarea:focus { background: #fff; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,157,104,.09); }
.creative-prompt-meta { position: absolute; right: 12px; bottom: 10px; left: 14px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.creative-inspiration { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.creative-inspiration button { min-height: 28px; padding: 4px 8px; color: #53675d; background: #f5f7f5; border: 1px solid #dce3de; border-radius: 5px; font-size: 12px; }
.creative-inspiration button:hover { color: var(--green); border-color: #9eb9a7; }
.creative-controls { min-width: 0; padding: 18px; }
.creative-controls > header { padding-bottom: 14px; border-bottom: 1px solid #e4e9e5; }
.creative-controls h3 { margin: 5px 0 0; font-size: 17px; }
.credit-badge { padding: 5px 8px; color: #765321; background: #fff4d8; border: 1px solid #efd69e; border-radius: 4px; font-size: 12px; font-weight: 700; }
.creative-controls > label, .creative-control-group, .creative-advanced { display: block; margin-top: 15px; }
.creative-controls label > span, .creative-control-group > span { display: block; margin-bottom: 6px; color: #55675d; font-size: 13px; font-weight: 700; }
.creative-controls select, .creative-controls input:not([type="range"]) { width: 100%; min-height: 38px; padding: 7px 9px; color: var(--ink); background: #fff; border: 1px solid #cbd5ce; border-radius: 5px; }
.creative-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 15px; }
.creative-control-grid label { min-width: 0; }
.creative-segments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; background: #eef2ef; border-radius: 6px; }
.creative-segments.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.creative-segments button { min-width: 0; min-height: 31px; padding: 4px; color: var(--muted); background: transparent; border: 0; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.creative-segments button.active { color: var(--ink); background: #fff; box-shadow: 0 1px 5px rgba(25,45,36,.09); font-weight: 700; }
.creative-range { position: relative; }
.creative-range input, .creative-advanced input[type="range"] { width: calc(100% - 44px); accent-color: var(--green); }
.creative-range output, .creative-advanced output { position: absolute; right: 0; color: var(--green); font-size: 13px; font-weight: 700; }
.creative-advanced { padding: 10px 0 0; border-top: 1px solid #e5e9e6; }
.creative-advanced summary { display: flex; align-items: center; justify-content: space-between; color: #55675d; font-size: 13px; font-weight: 700; cursor: pointer; }
.creative-advanced label { display: block; margin-top: 11px; }
.creative-cost { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 18px; padding: 10px 11px; color: var(--muted); background: #f4f7f4; border-radius: 5px; font-size: 12px; }
.creative-cost b { color: var(--ink); }
.creative-submit { width: 100%; min-height: 43px; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 10px; color: #fff; background: var(--green); border: 1px solid var(--green); border-radius: 6px; font-weight: 700; }
.creative-submit:hover { background: #197e55; }
.creative-history { margin-top: 14px; padding: 18px; }
.creative-history > header { align-items: center; }
.creative-history-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.creative-history-grid article { position: relative; min-width: 0; overflow: hidden; background: #fff; border: 1px solid #dfe5e1; border-radius: 7px; }
.creative-history-grid article > img { display: block; height: 146px; }
.creative-history-grid article > div { padding: 10px; }
.creative-history-grid b, .creative-history-grid span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creative-history-grid b { font-size: 14px; }
.creative-history-grid span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.creative-history-grid.video article > i { position: absolute; top: 54px; left: calc(50% - 17px); display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: rgba(9,16,13,.64); border: 1px solid rgba(255,255,255,.4); border-radius: 50%; }
.video-keyframe { position: relative; display: block; height: 376px; margin-top: 16px; overflow: hidden; background: #121916; border-radius: 7px; }
.video-keyframe-action { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; color: #fff; background: rgba(10,17,14,.68); border: 1px solid rgba(255,255,255,.28); border-radius: 5px; font-size: 12px; }
.video-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 52px; height: 52px; color: #fff; background: rgba(12,21,17,.62); border: 1px solid rgba(255,255,255,.48); border-radius: 50%; transform: translate(-50%, -50%); }
.video-timeline { margin-top: 10px; padding: 8px 9px 10px; background: #eff2f0; border-radius: 6px; }
.video-timeline-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.video-timeline-track span { position: relative; height: 48px; overflow: hidden; border-radius: 4px; }
.video-timeline-track b { position: absolute; right: 4px; bottom: 3px; padding: 2px 4px; color: #fff; background: rgba(8,14,11,.65); border-radius: 2px; font-size: 10px; }
.video-timeline-progress { height: 3px; margin-top: 7px; background: #d0d8d3; }
.video-timeline-progress i { display: block; width: 54%; height: 100%; background: var(--green); }
.video-prompt { margin-top: 11px; }

@media (max-width: 1260px) {
  .chat-studio { grid-template-columns: 205px minmax(430px, 1fr); }
  .chat-context-rail { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid #e0e5e2; border-left: 0; }
  .chat-context-rail > header { grid-column: 1 / -1; margin: 0; }
  .chat-context-rail > section { margin: 5px 0 0; padding: 11px; background: #fff; border: 1px solid #e0e6e2; border-radius: 6px; }
}
@media (max-width: 980px) {
  .creative-studio { grid-template-columns: 1fr; }
  .creative-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
  .creative-controls > header, .creative-cost, .creative-submit, .creative-advanced { grid-column: 1 / -1; }
  .chat-studio { grid-template-columns: 1fr; }
  .chat-thread-rail { display: grid; grid-template-columns: 150px minmax(180px, 1fr); gap: 7px; max-height: 194px; overflow-y: auto; border-right: 0; border-bottom: 1px solid #dfe5e1; }
  .chat-thread-search { margin: 0; }
  .chat-rail-label { grid-column: 1 / -1; margin: 5px 4px 0; }
  .chat-thread-rail > button:not(.chat-new-thread) { min-height: 48px; margin: 0; }
  .chat-context-rail { grid-column: auto; }
}
@media (max-width: 700px) {
  .chat-studio { min-height: 0; overflow: visible; }
  .chat-thread-rail { grid-template-columns: 1fr; max-height: 230px; }
  .chat-rail-label { grid-column: auto; }
  .chat-conversation-head { align-items: flex-start; padding: 12px; }
  .chat-conversation-body { min-height: 240px; max-height: 360px; padding: 18px 12px 12px; }
  .studio-message { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; margin-bottom: 17px; }
  .studio-message-avatar { width: 28px; height: 28px; }
  .studio-message p { font-size: 15px; }
  .chat-prompt-suggestions { padding: 0 12px 9px; overflow-x: auto; flex-wrap: nowrap; }
  .chat-prompt-suggestions button { flex: none; }
  .chat-composer-pro { margin: 0 12px 8px; }
  .chat-composer-pro footer { align-items: stretch; flex-direction: column; }
  .chat-composer-pro footer > div { justify-content: space-between; }
  .chat-composer-pro select { min-width: 0; max-width: 132px; }
  .composer-context { padding: 5px 6px; }
  .chat-context-rail { grid-template-columns: 1fr; }
  .chat-context-rail > header { grid-column: auto; }
  .creative-stage, .creative-controls, .creative-history { padding: 13px; }
  .creative-stage-head { align-items: flex-start; }
  .creative-preview-board { grid-template-columns: 1fr; height: auto; }
  .creative-preview-main { height: 270px; }
  .creative-preview-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 90px; }
  .creative-prompt-area { grid-template-columns: 1fr; }
  .creative-reference { min-height: 78px; }
  .creative-controls { display: block; }
  .creative-control-grid { grid-template-columns: 1fr; }
  .creative-history > header { align-items: flex-start; }
  .creative-history-grid { grid-template-columns: 1fr; }
  .creative-history-grid article > img { height: 190px; }
  .video-keyframe { height: 240px; }
  .creative-segments { overflow-x: auto; }
  .creative-segments button { min-width: 62px; }
}

/* Final interaction and spacing refinements. */
.agent-registry-row[data-open-agent] { cursor: pointer; }
.agent-registry-row[data-open-agent]:focus-visible { outline: 3px solid rgba(31, 157, 104, .22); outline-offset: 2px; border-color: var(--green); }
.agent-row-open { display: inline-flex; align-items: center; gap: 3px; color: var(--green); font-size: 14px; font-weight: 700; white-space: nowrap; }
.agent-row-open svg { width: 14px; }

.asset-registry-toolbar { display: grid; gap: 12px; margin: 22px 0 0; padding: 14px 15px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.asset-toolbar-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.asset-toolbar-head > div b, .asset-toolbar-head > div span { display: block; }
.asset-toolbar-head > div b { font-size: 15px; }
.asset-toolbar-head > div span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.asset-toolbar-head .route-search-wrap { width: min(360px, 42%); flex: none; }
.asset-toolbar-head .route-search { width: 100%; height: 38px; font-size: 15px; }
.asset-toolbar-head .route-search-wrap svg { top: 12px; }
.asset-role-filter.route-filter.compact { width: 100%; max-width: none; margin: 0; padding: 2px 0 5px; }
.asset-registry-toolbar + .asset-catalog { margin-top: 24px; }

@media (max-width: 700px) {
  .asset-registry-toolbar { padding: 12px; }
  .asset-toolbar-head { align-items: stretch; flex-direction: column; }
  .asset-toolbar-head .route-search-wrap { width: 100%; }
  .agent-registry-actions { justify-content: space-between; }
}

/* Featured production Agent entry and embedded selection workspace. */
.featured-agent-showcase { display: grid; grid-template-columns: minmax(360px, 1.4fr) minmax(300px, 1fr) auto; align-items: center; gap: 20px; margin-bottom: 16px; padding: 18px 20px; background: #eef7f3; border: 1px solid #c9ded5; border-left: 4px solid var(--green); border-radius: 6px; }
.featured-agent-copy { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 13px; }
.featured-agent-icon { display: grid; place-items: center; width: 48px; height: 48px; color: #fff; background: #176e55; border-radius: 6px; }
.featured-agent-icon svg { width: 24px; height: 24px; }
.featured-agent-eyebrow { color: #4e7667; font-size: 11px; font-weight: 800; }
.featured-agent-title { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 5px; }
.featured-agent-title h2 { margin: 0 4px 0 0; color: #183f33; font-size: 19px; }
.featured-agent-copy p { max-width: 660px; margin: 7px 0 0; color: #547068; font-size: 14px; line-height: 1.55; }
.featured-agent-flow { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; }
.featured-agent-flow span { flex: 0 1 auto; padding: 6px 8px; color: #2e5c4f; background: rgba(255,255,255,.82); border: 1px solid #d2e3dc; border-radius: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.featured-agent-flow > svg { flex: none; width: 13px; color: #7d9c91; }
.featured-agent-result { display: grid; grid-template-columns: repeat(3, 64px); align-items: center; justify-content: end; gap: 10px; }
.featured-agent-result > span { text-align: center; }
.featured-agent-result small, .featured-agent-result b { display: block; }
.featured-agent-result small { color: #668177; font-size: 11px; white-space: nowrap; }
.featured-agent-result b { margin-top: 3px; color: #173f32; font-size: 19px; }
.featured-agent-result .route-action { grid-column: 1 / -1; min-height: 36px; }
.selection-agent-frame-shell { overflow: hidden; background: #fff; border: 1px solid #ccd9d3; border-radius: 6px; }
.selection-agent-frame-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 12px 16px; background: #f6faf8; border-bottom: 1px solid #dbe5e0; }
.selection-agent-frame-head b, .selection-agent-frame-head small { display: block; }
.selection-agent-frame-head b { margin-top: 3px; color: #21463b; font-size: 16px; }
.selection-agent-frame-head small { margin-top: 2px; color: var(--muted); font-size: 13px; }
#selectionAgentFrame { display: block; width: 100%; height: calc(100vh - 278px); min-height: 720px; background: #f4f7f6; border: 0; }
.customer-sop-meta { display: flex; align-items: center; gap: 8px; }
.customer-sop-meta > span:last-child { color: var(--muted); font-size: 13px; font-weight: 700; }
.sop-baseline-strip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; margin: 2px 18px 0; padding: 12px 14px; background: #f3f7f5; border-left: 3px solid #4b7d6a; }
.sop-baseline-strip > span { padding-top: 1px; }
.sop-baseline-strip b, .sop-baseline-strip p { display: block; }
.sop-baseline-strip b { color: #244b3e; font-size: 14px; }
.sop-baseline-strip p { margin: 3px 0 0; color: #53635d; font-size: 14px; line-height: 1.55; }
.customer-sop-flow { display: flex; align-items: stretch; gap: 10px; padding: 16px 18px 12px; }
.customer-sop-flow article { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 9px; flex: 1 1 0; min-width: 0; padding: 13px 14px; background: #f7f6f2; border: 1px solid #e2ded2; border-top: 3px solid #a99673; border-radius: 5px; }
.customer-sop-flow article > b { display: grid; place-items: center; width: 30px; height: 30px; color: #745f3e; background: #ece6da; border-radius: 4px; font-size: 12px; }
.customer-sop-flow article > span { color: #4d4a43; font-size: 14px; line-height: 1.55; }
.customer-sop-flow article > svg { position: absolute; z-index: 2; top: 50%; right: -14px; width: 16px; color: #a89d88; transform: translateY(-50%); }
.customer-sop-gap { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; align-items: start; margin: 0 18px 18px; padding: 11px 13px; color: #76521f; background: #fff7e8; border-left: 3px solid #c38a35; }
.customer-sop-gap > svg { width: 18px; margin-top: 1px; }
.customer-sop-gap b, .customer-sop-gap span { display: block; }
.customer-sop-gap b { font-size: 13px; }
.customer-sop-gap span { margin-top: 3px; color: #715f43; font-size: 14px; line-height: 1.5; }

@media (max-width: 1180px) {
  .featured-agent-showcase { grid-template-columns: 1fr; gap: 14px; }
  .featured-agent-flow { justify-content: flex-start; overflow-x: auto; padding-bottom: 3px; }
  .featured-agent-result { grid-template-columns: repeat(3, minmax(70px, 1fr)) auto; justify-content: stretch; }
  .featured-agent-result .route-action { grid-column: auto; }
  .customer-sop-flow { flex-wrap: wrap; }
  .customer-sop-flow article { flex: 1 1 calc(50% - 10px); }
  .customer-sop-flow article > svg { display: none; }
}

@media (max-width: 700px) {
  .featured-agent-showcase { padding: 15px 14px; }
  .featured-agent-copy { grid-template-columns: 42px minmax(0, 1fr); }
  .featured-agent-icon { width: 42px; height: 42px; }
  .featured-agent-title h2 { font-size: 17px; }
  .featured-agent-copy p { font-size: 13px; }
  .featured-agent-result { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .featured-agent-result .route-action { grid-column: 1 / -1; }
  .selection-agent-frame-head { align-items: flex-start; flex-direction: column; }
  .selection-agent-frame-head .route-action { width: 100%; }
  #selectionAgentFrame { height: calc(100vh - 240px); min-height: 640px; }
  .customer-sop-meta { align-items: flex-end; flex-direction: column; gap: 4px; }
  .sop-baseline-strip { grid-template-columns: 1fr; gap: 7px; margin: 2px 14px 0; }
  .customer-sop-flow { display: grid; padding: 12px 14px 10px; }
  .customer-sop-flow article { grid-template-columns: 28px minmax(0, 1fr); padding: 11px 12px; }
  .customer-sop-flow article > b { width: 28px; height: 28px; }
  .customer-sop-gap { margin: 0 14px 14px; }
}
