:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --ink: #17202a;
  --muted: #667085;
  --line: #d9dee7;
  --panel: #ffffff;
  --rail: #fafafa;
  --rail-muted: #5f6368;
  --rail-text: #2f343b;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --blue: #1d4ed8;
  --cyan: #0891b2;
  --gold: #c68216;
  --warn: #b45309;
  --bad: #b42318;
  --good: #067647;
  --shadow: 0 14px 40px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.secondary-btn,
.danger-btn,
.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.secondary-btn:hover,
.danger-btn:hover,
.icon-btn:hover {
  background: #eef4f3;
  color: var(--accent-strong);
}

.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.danger-btn {
  color: var(--bad);
}

.danger-btn:hover {
  border-color: rgba(220, 38, 38, 0.28);
  background: #fff5f5;
  color: var(--bad);
}

.model-chip {
  min-height: 40px;
  border: 1px solid #b9dcca;
  border-radius: 999px;
  background: #f7fffb;
  color: var(--good);
  font-weight: 800;
}

.model-chip:hover {
  background: #ecfdf3;
  color: var(--accent-strong);
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 312px;
  background: var(--rail);
  color: var(--rail-text);
  padding: 0;
  overflow-y: auto;
  border-right: 1px solid #dedede;
}

.rail::-webkit-scrollbar {
  width: 10px;
}

.rail::-webkit-scrollbar-thumb {
  background: #c7c7c7;
  border-radius: 999px;
  border: 3px solid #fafafa;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 88px;
  padding: 16px 14px;
  border-bottom: 1px solid #e5e5e5;
}

.brand-logo {
  display: block;
  width: min(218px, calc(100% - 28px));
  height: 58px;
  object-fit: contain;
  object-position: left center;
  flex: 0 1 auto;
}

.brand-caret {
  margin-left: auto;
  color: #5f6368;
  font-size: 18px;
}

.rail-tools {
  display: grid;
  gap: 12px;
  padding: 16px 14px 18px;
  border-bottom: 1px solid #e5e5e5;
}

.quick-search {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #dddddd;
  border-radius: 11px;
  background: #fff;
  color: #888;
  padding: 0 12px;
}

.quick-search input {
  border: 0;
  box-shadow: none;
  padding: 0;
  color: var(--rail-text);
}

.quick-search input:focus {
  box-shadow: none;
}

.quick-search kbd {
  color: #9aa0a6;
  font: 12px ui-sans-serif, system-ui, sans-serif;
}

.back-link {
  min-height: 40px;
  justify-content: start;
  border-radius: 10px;
  background: #f2f2f2;
  color: #333;
  text-align: left;
  padding: 0 14px;
}

.back-link:hover {
  background: #ebebeb;
  color: #111;
}

.rail-section {
  margin-top: 0;
  padding: 18px 14px 4px;
}

.rail-section + .rail-section {
  border-top: 1px solid #e5e5e5;
}

.rail-section > span {
  display: block;
  margin-bottom: 10px;
  color: #4f5054;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 4px;
  margin-top: 0;
}

.nav a {
  display: block;
  color: var(--rail-muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 650;
}

.nav a:hover,
.nav a.active {
  background: #f1f1f1;
  color: #1f2933;
}

.nav a.active-sub {
  background: #f1f1f1;
  color: #1f2933;
}

.nav-tree {
  margin: 4px 0;
  display: block;
}

.nav-tree summary {
  display: block;
  list-style: none;
  cursor: pointer;
  color: #4f5054;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}

.nav-tree summary::-webkit-details-marker {
  display: none;
}

.nav-tree summary:hover {
  background: #f1f1f1;
}

.nav-tree[open] > summary {
  background: #f1f1f1;
  color: #1f2933;
}

.nav-tree.nested {
  margin: 6px 0 6px 14px;
  border-left: 1px solid #e0e0e0;
  padding-left: 10px;
}

.nav-tree.nested summary {
  color: #5f6368;
  font-size: 13px;
  font-weight: 700;
}

.nav-tree.nested a {
  display: block;
  margin: 2px 0;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.25;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
  background: transparent;
  color: #5f6368;
}

.nav-tree.nested a:hover,
.nav-tree.nested a.active {
  background: #f1f1f1;
  color: #1f2933;
}

.nav-tree.nested a.active-sub {
  background: #f1f1f1;
  color: #1f2933;
}

.shell {
  margin-left: 312px;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  font-size: 17px;
  line-height: 1.25;
}

p {
  color: var(--muted);
  margin-top: 6px;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.view-btn {
  min-height: 30px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
}

.view-btn:hover,
.view-btn.active {
  background: var(--accent);
  color: #fff;
}

.status-dot {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot.ok {
  color: var(--good);
  border-color: rgba(6, 118, 71, 0.28);
}

.status-dot.bad {
  color: var(--bad);
  border-color: rgba(180, 35, 24, 0.28);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.36);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  padding: 22px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

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

.settings-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-form .wide,
.settings-divider,
.settings-message,
.modal-actions {
  grid-column: 1 / -1;
}

.settings-divider {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.settings-divider span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.settings-form input,
.settings-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.settings-form small {
  color: var(--muted);
  font-weight: 650;
}

.settings-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.settings-message.ok {
  color: var(--good);
}

.settings-message.bad {
  color: var(--bad);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics.executive {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.a-engine-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 0;
}

.a-engine-stats article {
  min-height: 74px;
  padding: 12px 14px;
}

.a-engine-stats strong {
  font-size: 24px;
}

.metrics.executive article {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  border-color: rgba(255, 255, 255, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 253, 245, 0.72)),
    #fff;
}

.metrics.executive article::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--blue), var(--gold));
}

.metrics small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.product-matrix {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(150px, 0.45fr));
  gap: 12px;
}

.product-card {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 16px;
}

.active-product {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(29, 78, 216, 0.08)),
    #fff;
}

.active-product h2 {
  margin-top: 6px;
  font-size: 24px;
}

.active-product p {
  max-width: 560px;
  font-size: 14px;
  line-height: 1.5;
}

.product-kicker {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-status {
  display: grid;
  align-content: center;
  justify-items: end;
  min-width: 120px;
}

.product-status strong {
  color: var(--accent-strong);
  font-size: 20px;
}

.product-status span {
  color: var(--muted);
  font-size: 12px;
}

.placeholder-product {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
}

.placeholder-product span {
  font-size: 13px;
}

.placeholder-product strong {
  font-size: 18px;
  color: #98a2b3;
}

.page-head {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.compact-head h2 {
  font-size: 20px;
}

.compact-head p {
  margin-top: 4px;
}

.agent-strip {
  margin-bottom: 16px;
}

.xhs-top-flow {
  display: none;
  margin-bottom: 16px;
}

body[data-current-page="xhs-chain-test"] .agent-strip {
  display: none;
}

body[data-current-page="xhs-chain-test"] .xhs-top-flow {
  display: block;
}

.agent-modules {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.agent-modules article {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: var(--shadow);
}

.agent-modules article.enabled {
  border-color: rgba(15, 118, 110, 0.28);
  background: #f3fbf8;
}

.agent-modules article.planned {
  border-style: dashed;
  color: var(--muted);
}

.agent-modules span,
.agent-modules em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.agent-modules strong {
  display: block;
  margin: 4px 0;
  font-size: 14px;
}

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

.fingerprint-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 14px;
}

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

.fingerprint-form.compact {
  grid-template-columns: 1fr 1fr;
}

.fingerprint-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fingerprint-form .wide {
  grid-column: 1 / -1;
}

.fingerprint-form input,
.fingerprint-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
}

.fingerprint-form textarea {
  min-height: 68px;
  resize: vertical;
  line-height: 1.55;
}

.fingerprint-form.compact textarea {
  min-height: 78px;
}

.compact-actions {
  margin-top: 12px;
}

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

.fingerprint-output-card {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  overflow: hidden;
}

.fingerprint-output-card h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

.fingerprint-output-card pre {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #0f172a;
  color: #dbeafe;
  font-size: 11px;
  line-height: 1.55;
}

/* 来源与版本卡片（Runbook §3 模块 12） */
.source-version-card { grid-column: 1 / -1; }
.source-version-card h3 small { font-weight: 400; color: var(--muted); margin-left: 8px; }
.src-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.src-grid section { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: #fafbfc; }
.src-grid h4 { font-size: 12px; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.src-list, .src-breakdown { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.src-list li { padding: 3px 0; border-bottom: 1px dashed #f0f1f3; }
.src-list li:last-child { border-bottom: none; }
.src-list li small { color: var(--muted); margin-left: 6px; font-size: 11px; }
.src-list li.empty { color: var(--muted); font-style: italic; }
.src-breakdown li { display: grid; grid-template-columns: 56px 24px 1fr 32px; gap: 6px; align-items: center; padding: 3px 0; }
.src-tag { font-size: 11px; }
.src-count { font-weight: 600; text-align: right; color: var(--text); }
.src-bar { background: #eef0f3; border-radius: 4px; height: 6px; overflow: hidden; }
.src-bar > span { display: block; height: 100%; background: var(--blue); }
.src-pct { font-size: 11px; color: var(--muted); text-align: right; }
.src-changes { grid-column: 1 / -1; }
.src-changes time { color: var(--muted); margin-right: 6px; }

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

.fingerprint-gap-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfe;
}

.profile-grid div,
.score-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 13px;
}

.profile-grid span,
.score-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.profile-grid strong,
.score-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
}

.product-focus-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.product-focus-list div {
  display: flex;
  justify-content: space-between;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 13px;
  color: var(--muted);
}

.product-focus-list .active-line {
  border-style: solid;
  border-color: rgba(15, 118, 110, 0.24);
  background: #f3fbf8;
  color: var(--ink);
}

.product-focus-list span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 750;
}

.filter-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.filter-row input {
  max-width: 360px;
}

.coming-soon {
  display: grid;
  place-items: center;
  min-height: 420px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 242, 247, 0.76)),
    #fff;
  text-align: center;
  padding: 28px;
  box-shadow: var(--shadow);
}

.coming-soon span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eef4f3;
  color: var(--accent-strong);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.coming-soon h2 {
  margin-top: 14px;
  font-size: 26px;
}

.coming-soon p {
  max-width: 620px;
}

.view,
.page {
  display: none;
}

.view.active,
.page.active {
  display: block;
}

.client-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 30px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(6, 78, 59, 0.96), rgba(30, 64, 175, 0.9)),
    #0f172a;
  color: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.client-hero h2 {
  max-width: 860px;
  margin-top: 9px;
  font-size: 32px;
  line-height: 1.12;
}

.client-hero p {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}

.eyebrow {
  color: #9cf6df;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.hero-score {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.hero-score span,
.hero-score em {
  color: rgba(255, 255, 255, 0.76);
  font-style: normal;
  font-size: 13px;
}

.hero-score strong {
  margin: 8px 0;
  color: #fff;
  font-size: 46px;
  line-height: 1;
}

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 16px;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.summary-card {
  min-height: 144px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 14px;
}

.summary-card.good {
  border-color: rgba(6, 118, 71, 0.22);
  background: #f4fbf7;
}

.summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.summary-card p {
  font-size: 13px;
  line-height: 1.5;
}

.funnel,
.tech-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.funnel div,
.tech-stack div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 0 13px;
}

.funnel span,
.tech-stack span {
  color: var(--muted);
  font-size: 13px;
}

.funnel strong,
.tech-stack strong {
  font-size: 18px;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.group-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.group-overview-card {
  display: grid;
  justify-items: start;
  align-content: start;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 13px 14px;
  text-align: left;
  white-space: normal;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.group-overview-card:hover {
  border-color: rgba(15, 118, 110, 0.36);
  background: #f3fbf8;
  color: var(--ink);
  transform: translateY(-1px);
}

.group-overview-card strong {
  font-size: 14px;
  line-height: 1.3;
}

.group-overview-card span,
.subtle-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.module-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff, #eef7f5);
}

.module-head h3 {
  margin: 0;
  font-size: 16px;
}

.module-head p {
  font-size: 13px;
  line-height: 1.45;
}

.module-head > span {
  align-self: flex-start;
  white-space: nowrap;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 750;
}

.module-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 360px;
}

.module-stats span,
.module-stats button {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.module-stats button {
  cursor: pointer;
  color: var(--muted);
}

.module-stats button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.module-stats button:hover,
.module-stats button.active-filter {
  border-color: rgba(15, 118, 110, 0.42);
  background: #e7f4f2;
  color: var(--accent-strong);
}

.module-stats button:disabled:hover {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.empty-filter {
  padding: 18px;
  color: var(--muted);
}

.empty-filter strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.empty-filter p {
  margin: 0;
  font-size: 13px;
}

.xhs-chain-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.xhs-chain-head > div:first-child {
  min-width: 0;
  flex: 1;
}

.run-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.danger-btn {
  color: #9a3412;
  border-color: rgba(234, 88, 12, 0.28);
  background: #fff7ed;
}

.danger-btn:hover:not(:disabled) {
  color: #7c2d12;
  border-color: rgba(234, 88, 12, 0.46);
  background: #ffedd5;
}

.current-node-detail {
  margin-top: 8px;
  max-width: none;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.86), rgba(255, 255, 255, 0.92));
  padding: 10px 12px;
}

.current-node-detail:empty {
  display: none;
}

.current-node-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.current-node-kicker em {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: #e7f4f2;
  font-style: normal;
}

.current-node-detail strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.current-node-detail p {
  margin: 4px 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.current-node-detail code {
  color: #475569;
  font-size: 12px;
}

.b-chain-tool-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 8px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.7);
  padding: 12px;
}

.b-chain-flow-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid rgba(20, 184, 166, 0.36);
  border-radius: 999px;
  background: #effdfa;
  color: #0f766e;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.b-chain-flow-pill strong,
.b-chain-flow-pill span {
  display: inline;
  font-size: inherit;
  color: inherit;
}

.b-chain-flow-pill.s2 {
  border-color: rgba(14, 165, 233, 0.34);
  background: #ecfeff;
  color: #0369a1;
}

.b-chain-flow-pill.s3,
.b-chain-flow-pill.planned {
  border-color: rgba(148, 163, 184, 0.45);
  background: #f8fafc;
  color: #64748b;
}

.b-chain-flow-pill.out-of-range {
  opacity: 0.42;
  filter: grayscale(0.2);
}

.b-chain-flow-pill.in-range {
  opacity: 1;
}

.b-chain-flow-pill.active {
  border-color: rgba(20, 184, 166, 0.72);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.12);
}

.b-chain-flow-pill.running {
  animation: xhs-node-pulse 1.15s ease-in-out infinite;
}

.b-chain-flow-arrow {
  color: #98a2b3;
  font-weight: 850;
}

.b-chain-flow-arrow.active-arrow {
  color: var(--accent-strong);
  animation: xhs-arrow-nudge 1.15s ease-in-out infinite;
}

.b-chain-selected-node {
  margin-top: 12px;
  border-top: 1px dashed rgba(15, 118, 110, 0.2);
  padding-top: 10px;
}

.xhs-workflow-band .panel {
  overflow: visible;
}

.workflow-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.xhs-top-flow .workflow-flow {
  margin-top: 0;
  min-height: 98px;
  align-content: center;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.74);
}

.workflow-flow .flow-node {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 750;
}

.workflow-flow .flow-node:hover,
.workflow-flow .flow-node.selected {
  border-color: rgba(15, 118, 110, 0.42);
  background: #e7f4f2;
  color: var(--accent-strong);
}

.workflow-flow .flow-node.done {
  border-color: rgba(22, 163, 74, 0.28);
  background: #dcfce7;
  color: #15803d;
}

.workflow-flow .flow-node.waiting {
  border-color: rgba(245, 158, 11, 0.38);
  background: #fef3c7;
  color: #92400e;
}

.workflow-flow .flow-node.active {
  position: relative;
  border-color: rgba(20, 184, 166, 0.72);
  background: #ccfbf1;
  color: #0f766e;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12), 0 10px 22px rgba(15, 118, 110, 0.16);
  transform: translateY(-1px);
}

.workflow-flow .flow-node.running {
  animation: xhs-node-pulse 1.15s ease-in-out infinite;
}

.workflow-flow b.active-arrow {
  color: var(--accent-strong);
  animation: xhs-arrow-nudge 1.15s ease-in-out infinite;
}

.workflow-flow .flow-node:not(.selected) {
  opacity: 0.58;
}

.workflow-flow .flow-node.active:not(.selected),
.workflow-flow .flow-node.done:not(.selected),
.workflow-flow .flow-node.waiting:not(.selected) {
  opacity: 1;
}

@keyframes xhs-node-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12), 0 10px 22px rgba(15, 118, 110, 0.16);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(20, 184, 166, 0.22), 0 14px 28px rgba(15, 118, 110, 0.22);
  }
}

@keyframes xhs-arrow-nudge {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.55;
  }
  50% {
    transform: translateX(3px);
    opacity: 1;
  }
}

.xhs-controls {
  background: #fff;
}

body[data-current-page="b-lead-engine"],
body[data-current-page="b-lead-workbench"],
body[data-current-page="b-chain-test"],
body[data-current-page="b-tier-config"] {
  background: #eef2f7;
}

body[data-current-page="b-lead-engine"] .agent-strip,
body[data-current-page="b-lead-workbench"] .agent-strip,
body[data-current-page="b-chain-test"] .agent-strip,
body[data-current-page="b-tier-config"] .agent-strip {
  display: none;
}

body[data-current-page="b-lead-engine"] .content,
body[data-current-page="b-lead-workbench"] .content,
body[data-current-page="b-chain-test"] .content,
body[data-current-page="b-tier-config"] .content {
  gap: 14px;
}

.b-top-flow {
  margin-bottom: 16px;
}

.b-integrated-chain {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.b-integrated-chain > .page-head {
  margin-bottom: 0;
}

body[data-current-page="b-lead-workbench"] .b-top-flow,
body[data-current-page="b-lead-workbench"] .b-workbench-current,
body[data-current-page="b-lead-workbench"] .b-workbench-scope {
  display: none;
}

.b-workflow-flow {
  margin-top: 0;
  min-height: 86px;
  align-content: center;
  border-radius: 10px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.b-workflow-flow .flow-node {
  min-height: 32px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 800;
}

.b-detail-json {
  max-height: 220px;
  overflow: auto;
  margin-top: 12px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
}

.b-tier-table {
  display: grid;
  gap: 8px;
}

.b-tier-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(120px, 0.7fr) 64px 64px minmax(110px, 0.7fr) minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.b-tier-head {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.b-tier-row input,
.b-tier-row select {
  width: 100%;
  min-height: 36px;
}

.b-table-drop-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.15fr) minmax(360px, 0.85fr);
  gap: 14px;
  align-items: stretch;
}

.b-table-drop-layout label,
.b-table-drop-layout textarea {
  width: 100%;
}

.b-table-paste-label {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.b-table-drop-layout textarea {
  min-height: 118px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.b-table-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1.5px dashed rgba(20, 184, 166, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 254, 255, 0.64), rgba(255, 255, 255, 0.98)),
    #fff;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.b-table-dropzone:hover,
.b-table-dropzone.dragging {
  border-color: rgba(20, 184, 166, 0.95);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12), 0 14px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.b-table-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.b-table-dropzone strong {
  color: var(--ink);
  font-size: 18px;
}

.b-table-dropzone span {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.b-table-dropzone em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  padding: 0 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.b-table-check-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.b-header-check,
.b-header-details div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.b-header-check {
  color: var(--muted);
  font-weight: 850;
}

.b-header-check.ok {
  border-color: rgba(22, 163, 74, 0.24);
  background: #f0fdf4;
  color: var(--good);
}

.b-header-check.bad {
  border-color: rgba(220, 38, 38, 0.24);
  background: #fff7f5;
  color: var(--bad);
}

.b-header-details {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.b-header-details strong,
.b-header-details span {
  display: block;
}

.b-header-details strong {
  color: var(--ink);
  font-size: 12px;
}

.b-header-details span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.b-table-preview {
  margin-top: 12px;
  overflow: auto;
  max-height: 440px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  resize: vertical;
}

.b-table-preview.empty {
  padding: 14px;
  color: var(--muted);
}

.b-table-preview-toolbar {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.b-table-preview-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.b-table-preview-toolbar select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 28px 0 9px;
  font-size: 12px;
  font-weight: 750;
}

.b-table-preview table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.b-table-preview th,
.b-table-preview td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}

.b-table-preview th {
  position: sticky;
  top: 39px;
  z-index: 2;
  color: var(--muted);
  background: #f8fafc;
  font-weight: 850;
}

.b-table-preview th:first-child,
.b-table-preview td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
}

.b-table-preview th:first-child {
  z-index: 4;
  background: #f8fafc;
}

.b-table-preview tr.selected td {
  background: #ecfeff;
}

.b-saas-leads-window {
  height: 360px;
  max-height: 62vh;
  min-height: 220px;
  resize: both;
  overflow: auto;
}

.b-saas-leads-window table {
  min-width: 1860px;
}

.b-saas-leads-window th:nth-child(2),
.b-saas-leads-window td:nth-child(2) {
  min-width: 360px;
}

.b-saas-leads-window th:nth-child(4),
.b-saas-leads-window td:nth-child(4),
.b-saas-leads-window th:nth-child(5),
.b-saas-leads-window td:nth-child(5),
.b-saas-leads-window th:nth-child(11),
.b-saas-leads-window td:nth-child(11) {
  min-width: 220px;
}

.b-saas-leads-window td:nth-child(11) {
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.b-loaded-run-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.b-loaded-run-panel.empty {
  color: var(--muted);
  font-weight: 750;
}

.b-loaded-run-head,
.b-loaded-run-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
}

.b-loaded-run-head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.b-loaded-run-head span,
.b-loaded-run-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.b-loaded-run-head strong {
  color: var(--ink);
  font-size: 15px;
}

.b-loaded-run-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
  resize: vertical;
}

.b-loaded-run-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.b-loaded-run-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.b-loaded-run-card-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.b-loaded-run-card-head strong {
  color: var(--ink);
  font-size: 15px;
}

.b-loaded-run-metrics {
  flex-wrap: wrap;
}

.b-loaded-run-metrics div {
  min-width: 140px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 9px 10px;
}

.b-loaded-run-metrics strong {
  color: var(--ink);
  font-size: 14px;
}

.b-loaded-run-summary {
  margin-top: 10px;
}

.b-loaded-run-summary strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.b-loaded-run-summary p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.b-loaded-run-json {
  margin-top: 10px;
}

.b-loaded-run-json summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 850;
}

.b-loaded-run-json pre {
  min-height: 160px;
  max-height: 320px;
  margin-top: 8px;
  white-space: pre;
}

.b-row-run-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 9px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.b-row-run-status.running {
  background: #e0f2fe;
  color: #0369a1;
}

.b-row-run-status.done {
  background: #dcfce7;
  color: #15803d;
}

.b-row-run-status.failed {
  background: #fee2e2;
  color: #b91c1c;
}

.b-table-run-result {
  display: block;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.b-table-run-result.empty {
  color: var(--muted);
}

.b-saas-distribution-grid {
  margin-bottom: 12px;
}

.b-saas-output {
  max-height: 260px;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  border-radius: 8px;
  font-size: 12px;
  margin-top: 12px;
}

.b-sheet-editor-controls {
  margin-bottom: 12px;
}

.b-sheet-editor-grid {
  max-height: 460px;
  margin-top: 12px;
  overflow: auto;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.b-sheet-editor-grid.empty {
  padding: 14px;
  color: var(--muted);
}

.b-sheet-editor-grid table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.b-sheet-editor-grid td {
  min-width: 140px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0;
}

.b-sheet-editor-grid textarea {
  min-height: 34px;
  height: 34px;
  border: 0;
  border-radius: 0;
  padding: 8px 10px;
  resize: both;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: none;
}

.b-run-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  color: var(--muted);
}

.b-run-summary-card strong {
  color: var(--ink);
}

.b-run-summary-card.running {
  border-color: rgba(14, 116, 144, 0.22);
  background: #ecfeff;
}

.b-run-summary-card.failed {
  border-color: rgba(220, 38, 38, 0.24);
  background: #fff7f5;
  color: #b91c1c;
}

.b-run-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.b-run-result-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.b-run-result-card .wide {
  grid-column: 1 / -1;
}

.b-run-result-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.b-run-result-card strong {
  display: block;
  min-width: 0;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.b-run-json {
  margin-top: 10px;
}

.b-run-json summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.b-run-json pre {
  max-height: 260px;
  overflow: auto;
  margin: 8px 0 0;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  font-size: 12px;
}

.b-current-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 24px 28px;
  border-radius: 10px;
}

.b-current-panel h2 {
  margin: 0 0 8px;
}

.b-current-node {
  width: min(100%, 820px);
  max-width: none;
  padding: 14px 16px;
  border-color: rgba(15, 118, 110, 0.2);
  border-radius: 9px;
}

.b-workbench-scope .panel {
  padding: 22px 24px;
}

.b-workbench-scope .panel-head {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.preset-row button.active {
  border-color: rgba(20, 118, 110, 0.4);
  background: #e7f4f2;
  color: var(--accent-strong);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.1);
}

.xhs-project-runs {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.xhs-project-runs label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.xhs-project-runs select {
  min-height: 36px;
  font-family: var(--mono);
  font-size: 12px;
}

.xhs-project-runs button,
.project-run-status {
  min-height: 36px;
  white-space: nowrap;
}

.project-run-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 850;
}

.xhs-option-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 10px;
  margin-top: 12px;
}

.xhs-option-grid label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.xhs-option-grid .wide {
  min-width: 0;
}

.xhs-option-grid .inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--ink);
}

.xhs-run-tuning {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) 1fr;
  gap: 8px;
  align-items: end;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.xhs-run-tuning label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.xhs-run-tuning select {
  min-height: 36px;
}

.tuning-hint {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  color: #0f766e;
  background: #f0fdfa;
  font-size: 12px;
  font-weight: 800;
}

.inline-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.xhs-option-grid textarea,
.xhs-option-grid select {
  margin-top: 6px;
  min-height: 52px;
  padding: 8px 10px;
  font-size: 13px;
}

#xhsManualSellingPoints {
  min-height: 112px;
  line-height: 1.6;
  resize: vertical;
}

.xhs-copy-inspiration-input {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(234, 88, 12, 0.24);
  border-radius: 8px;
  background: #fff7ed;
  padding: 12px;
}

.xhs-copy-inspiration-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.xhs-copy-inspiration-head strong,
.xhs-copy-inspiration-dropzone span {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.xhs-copy-inspiration-head span {
  display: block;
  margin-top: 4px;
  color: #7c2d12;
  font-size: 12px;
  line-height: 1.45;
}

.xhs-copy-inspiration-head em {
  border: 1px solid rgba(234, 88, 12, 0.24);
  border-radius: 999px;
  background: #fed7aa;
  color: #9a3412;
  padding: 5px 9px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

#xhsCopyInspirationText {
  min-height: 110px;
  resize: vertical;
}

#xhsCopyInspirationInstruction {
  min-height: 72px;
  resize: vertical;
}

.xhs-copy-inspiration-dropzone {
  display: grid;
  gap: 8px;
  border: 1px dashed rgba(234, 88, 12, 0.38);
  border-radius: 8px;
  background: #fffbf5;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.xhs-copy-inspiration-dropzone:focus-visible,
.xhs-copy-inspiration-dropzone.dragging {
  outline: none;
  border-color: #ea580c;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.14);
}

.xhs-copy-inspiration-dropzone small {
  color: #7c2d12;
  font-size: 12px;
  font-weight: 650;
}

.xhs-copy-inspiration-dropzone input {
  width: 100%;
}

.xhs-copy-inspiration-file-list {
  display: grid;
  gap: 8px;
  max-height: 138px;
  overflow: auto;
}

.xhs-copy-inspiration-file-list.empty {
  border: 1px dashed rgba(234, 88, 12, 0.28);
  border-radius: 8px;
  color: #9a3412;
  padding: 10px;
  font-size: 12px;
}

.xhs-copy-inspiration-file-list div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(234, 88, 12, 0.18);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.xhs-copy-inspiration-file-list span {
  border-radius: 999px;
  background: #fed7aa;
  color: #9a3412;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.xhs-copy-inspiration-file-list strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhs-copy-inspiration-file-list em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.xhs-visual-input {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.xhs-visual-input.visual-8000-disabled {
  background: #f8fafc;
}

.xhs-visual-input.visual-8000-disabled .xhs-visual-head,
.xhs-visual-input.visual-8000-disabled .xhs-visual-jobs,
.xhs-visual-input.visual-8000-disabled #xhsVisualDesignBrief {
  opacity: 0.36;
  filter: grayscale(1);
}

.xhs-visual-input.visual-8000-disabled .xhs-visual-dropzone {
  border-color: rgba(15, 118, 110, 0.42);
  background: #f0fdfa;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}

.xhs-visual-input.visual-8000-disabled .xhs-visual-dropzone::before {
  content: "8000 节点已关闭：本次只保留素材输入，不创建生图任务";
  display: inline-flex;
  width: fit-content;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #ccfbf1;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 850;
}

.xhs-visual-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 12px;
  align-items: end;
}

.xhs-visual-head strong,
.xhs-visual-dropzone span {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.xhs-visual-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.xhs-visual-jobs {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  gap: 8px;
  align-items: end;
}

.xhs-visual-jobs label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.xhs-visual-jobs select {
  min-height: 36px;
  font-family: var(--mono);
  font-size: 12px;
}

.xhs-visual-jobs button {
  min-height: 36px;
  white-space: nowrap;
}

#xhsVisualDesignBrief {
  min-height: 76px;
  resize: vertical;
}

.xhs-visual-dropzone {
  display: grid;
  gap: 8px;
  border: 1px dashed rgba(15, 118, 110, 0.32);
  border-radius: 8px;
  background: #f8fffd;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.xhs-visual-dropzone:focus-visible,
.xhs-visual-dropzone.dragging {
  outline: none;
  border-color: var(--teal);
  background: #effffb;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.xhs-visual-dropzone small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.xhs-visual-dropzone input {
  width: 100%;
}

.xhs-visual-file-list {
  display: grid;
  gap: 8px;
  max-height: 150px;
  overflow: auto;
}

.xhs-visual-file-list.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 10px;
  font-size: 12px;
}

.xhs-visual-file-list div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.xhs-visual-file-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.xhs-visual-file-list strong {
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.xhs-visual-file-list em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.xhs-visual-file-list button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.brand-voice-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

.brand-voice-source span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.brand-voice-source strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
}

.brand-voice-source p,
.brand-voice-source small {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.brand-voice-source button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.brand-voice-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.brand-voice-card > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  min-height: 0;
}

.brand-voice-combined-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.brand-voice-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.brand-voice-summary-grid > div,
.brand-voice-combined-card .voice-fit-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  min-height: 0;
}

.brand-voice-card span,
.voice-issues strong,
.brand-fit-inline span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.brand-voice-card strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.voice-profile-summary,
.voice-fit-detail {
  grid-column: span 3;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(255, 255, 255, 0.98)),
    #fff;
}

.brand-voice-combined-card .voice-profile-summary,
.brand-voice-combined-card .voice-fit-detail {
  grid-column: 1 / -1;
}

.brand-voice-detail-cards {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.brand-voice-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.brand-voice-detail-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.brand-voice-detail-card header strong {
  margin: 0;
  color: var(--accent-strong);
  font-size: 12px;
}

.brand-voice-detail-card header em {
  border: 1px solid #dbe7ef;
  border-radius: 999px;
  background: #fff;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.brand-voice-detail-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 15px;
}

.brand-voice-detail-card code {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.brand-voice-detail-card ul {
  margin: 10px 0 12px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.brand-voice-detail-card li {
  margin: 3px 0;
}

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

.brand-voice-borrow-grid dl {
  margin: 0;
  border: 1px solid #e7edf5;
  border-radius: 7px;
  background: #fff;
  padding: 8px;
}

.brand-voice-borrow-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.brand-voice-borrow-grid dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.voice-fit-detail p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.score-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
}

.score-chip.good {
  border-color: rgba(22, 163, 74, 0.26);
  background: #dcfae6;
  color: var(--good);
}

.score-chip.warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fef3c7;
  color: var(--warn);
}

.score-chip.bad {
  border-color: rgba(220, 38, 38, 0.28);
  background: #fee2e2;
  color: var(--bad);
}

body[data-current-page="xhs-chain-test"] main,
body[data-current-page="b-chain-test"] main {
  font-size: 13px;
}

body[data-current-page="xhs-chain-test"] main h1,
body[data-current-page="b-chain-test"] main h1 {
  font-size: 30px;
}

body[data-current-page="xhs-chain-test"] main h2,
body[data-current-page="b-chain-test"] main h2 {
  font-size: 20px;
}

body[data-current-page="xhs-chain-test"] main p,
body[data-current-page="b-chain-test"] main p {
  font-size: 13px;
  line-height: 1.42;
}

body[data-current-page="xhs-chain-test"] .band,
body[data-current-page="b-chain-test"] .band {
  margin-top: 12px;
}

body[data-current-page="xhs-chain-test"] .panel,
body[data-current-page="b-chain-test"] .panel {
  padding: 14px;
}

body[data-current-page="xhs-chain-test"] .panel-head,
body[data-current-page="b-chain-test"] .panel-head {
  margin-bottom: 10px;
}

body[data-current-page="xhs-chain-test"] button,
body[data-current-page="b-chain-test"] button {
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
}

body[data-current-page="xhs-chain-test"] .score-chip,
body[data-current-page="b-chain-test"] .score-chip {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

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

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

.brand-archive-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.brand-archive-fields input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.asset-dropzone {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  border: 1px dashed rgba(15, 118, 110, 0.35);
  border-radius: 8px;
  background: #f8fffd;
  padding: 12px;
}

.asset-dropzone.dragging {
  border-color: var(--accent-strong);
  background: #ecfdf5;
}

.asset-dropzone strong {
  color: var(--ink);
}

.asset-dropzone span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.asset-dropzone input {
  margin-top: 8px;
}

.asset-file-list,
.brand-asset-result {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.brand-asset-result {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.asset-file-list {
  max-height: 330px;
  overflow: auto;
  padding-right: 4px;
}

.asset-file-list.empty,
.brand-asset-result.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 12px;
}

.asset-file-list div,
.brand-asset-result > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.brand-asset-result > div:not(.asset-evidence-wide):not(.voice-profile-summary) {
  max-height: 170px;
  overflow: auto;
}

.brand-asset-result .voice-profile-summary {
  max-height: 118px;
  overflow: auto;
}

.asset-file-list div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.asset-file-list span,
.brand-asset-result span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.asset-file-list strong,
.brand-asset-result strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.asset-evidence-wide {
  grid-column: 1 / -1;
}

.asset-observation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  max-height: 290px;
  overflow: auto;
  padding-right: 4px;
}

.asset-observation-grid article {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px;
  font-size: 12px;
}

.asset-observation-grid header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.asset-observation-grid em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.asset-observation-grid ul {
  max-height: 120px;
  overflow: auto;
  margin: 4px 0 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.38;
}

.asset-category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 210px;
  overflow: auto;
  margin-top: 8px;
  padding-right: 4px;
}

.asset-category-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px;
}

.asset-category-list strong {
  font-size: 12px;
}

.asset-category-list ul {
  margin: 5px 0 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.asset-category-list small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.asset-file-list em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.asset-file-list button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.brand-archive-list {
  display: grid;
  gap: 12px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.brand-archive-list.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 14px;
}

.brand-archive-group {
  display: grid;
  gap: 8px;
}

.brand-archive-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.brand-archive-group > header strong {
  color: var(--ink);
  font-size: 14px;
}

.brand-archive-group > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.brand-archive-group article.active {
  border-color: rgba(15, 118, 110, 0.34);
  background: #f3fbf8;
}

.brand-archive-group article span {
  display: inline-flex;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.brand-archive-group article.active span {
  color: var(--accent-strong);
}

.brand-archive-group article strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.brand-archive-group article p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
  max-height: 52px;
  overflow: auto;
}

.brand-archive-group article small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.brand-archive-group footer {
  display: flex;
  gap: 6px;
  align-items: center;
}

.brand-archive-group footer button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

body[data-current-page="brand-voice-assets"] main {
  font-size: 13px;
}

body[data-current-page="brand-voice-assets"] main h1 {
  font-size: 30px;
}

body[data-current-page="brand-voice-assets"] main h2 {
  font-size: 18px;
}

body[data-current-page="brand-voice-assets"] main p {
  font-size: 13px;
  line-height: 1.42;
}

body[data-current-page="brand-voice-assets"] .band {
  margin-top: 12px;
}

body[data-current-page="brand-voice-assets"] .panel {
  padding: 14px;
}

body[data-current-page="brand-voice-assets"] .panel-head {
  margin-bottom: 10px;
}

body[data-current-page="brand-voice-assets"] textarea {
  min-height: 62px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
}

body[data-current-page="brand-voice-assets"] button {
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
}

body[data-current-page="brand-voice-assets"] .score-chip {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.workflow-flow b {
  color: #98a2b3;
  font-weight: 750;
}

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

.workflow-unit {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  cursor: pointer;
}

.workflow-unit > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workflow-unit strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.workflow-unit p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.workflow-unit code {
  display: block;
  margin-top: 8px;
  color: #475467;
  white-space: normal;
  overflow-wrap: anywhere;
}

.workflow-unit em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--warn);
  padding: 0 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.workflow-unit.success {
  border-color: rgba(6, 118, 71, 0.28);
  background: #f4fbf7;
}

.workflow-unit.success > span,
.workflow-unit.success em {
  background: #dcfae6;
  color: var(--good);
}

.workflow-unit.error {
  border-color: rgba(180, 35, 24, 0.28);
  background: #fff7f5;
}

.workflow-unit.error > span,
.workflow-unit.error em {
  background: #fee4e2;
  color: var(--bad);
}

.workflow-unit.waiting {
  border-color: rgba(220, 104, 3, 0.28);
  background: #fffaf0;
}

.workflow-unit.waiting > span,
.workflow-unit.waiting em {
  background: #fef3c7;
  color: var(--warn);
}

.workflow-unit.skipped {
  opacity: 0.58;
  background: #f8fafc;
}

.workflow-unit.skipped em {
  background: #f1f5f9;
  color: var(--muted);
}

.decision-workflow-strip {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px 12px 18px;
}

.decision-gate-strip {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px 12px;
}

.strip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.strip-head strong {
  color: var(--ink);
  font-size: 14px;
}

.strip-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workflow-unit-rail {
  display: flex;
  grid-template-columns: none;
  gap: 8px;
  align-items: stretch;
  min-height: 118px;
  margin-top: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 10px 4px 18px;
  scrollbar-gutter: stable;
  scroll-snap-type: x proximity;
}

.workflow-unit-rail .workflow-unit {
  flex: 0 0 176px;
  scroll-snap-align: start;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  min-height: 92px;
  padding: 12px 10px 10px;
  color: var(--ink);
}

.workflow-unit-rail .workflow-unit > span {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.workflow-unit-rail .workflow-unit strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.workflow-unit-rail .workflow-unit p,
.workflow-unit-rail .workflow-unit code {
  display: none;
}

.workflow-unit-rail .workflow-unit em {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 20px;
  padding: 0 7px;
  font-size: 11px;
}

.workflow-unit-rail .workflow-unit.out-of-range {
  opacity: 0.64;
}

.workflow-unit-rail .workflow-unit.in-range {
  opacity: 1;
}

.workflow-unit-rail .workflow-unit.running {
  animation: xhs-node-pulse 1.15s ease-in-out infinite;
}

.workflow-unit-rail .workflow-unit.current {
  border-color: rgba(20, 184, 166, 0.62);
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.98), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.12), 0 12px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.workflow-unit-rail .workflow-unit.current > span {
  background: #ccfbf1;
  color: var(--accent-strong);
}

.gate-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-gutter: stable;
  scroll-snap-type: x proximity;
}

.gate-chip {
  flex: 0 0 156px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 84px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  text-align: left;
  scroll-snap-align: start;
}

.gate-chip span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.gate-chip strong {
  overflow: visible;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
}

.gate-chip em {
  grid-column: 1 / -1;
  justify-self: start;
  border-radius: 999px;
  background: #fff7ed;
  color: #b45309;
  padding: 3px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.gate-chip.passed,
.gate-chip.skipped {
  border-color: rgba(20, 184, 166, 0.28);
  background: #f4fbf7;
}

.gate-chip.passed em,
.gate-chip.skipped em {
  background: #dcfae6;
  color: var(--good);
}

.gate-chip.warning,
.gate-chip.waiting_human_review,
.gate-chip.blocking {
  border-color: rgba(202, 138, 4, 0.32);
  background: #fffbeb;
}

.gate-chip.blocked,
.gate-chip.failed {
  border-color: rgba(220, 38, 38, 0.26);
  background: #fff7f5;
}

.gate-chip.active {
  border-color: rgba(20, 184, 166, 0.7);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.12);
}

.gate-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98)),
    #fff;
  padding: 12px;
}

.gate-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.gate-detail-head span,
.gate-detail dt {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.gate-detail-head strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
}

.gate-detail-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.gate-detail-head em.passed,
.gate-detail-head em.skipped {
  background: #dcfae6;
  color: var(--good);
}

.gate-detail-head em.blocked,
.gate-detail-head em.failed {
  background: #fee4e2;
  color: var(--bad);
}

.gate-detail-head em.warning,
.gate-detail-head em.waiting_human_review {
  background: #fef3c7;
  color: var(--warn);
}

.gate-detail p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.gate-detail dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

.gate-detail dl div,
.gate-warning,
.gate-lists > div {
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.gate-detail dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.gate-warning {
  margin-top: 10px;
  border-color: rgba(202, 138, 4, 0.28);
  background: #fffbeb;
}

.gate-warning strong,
.gate-warning span,
.gate-lists strong,
.gate-lists span {
  display: block;
  font-size: 12px;
}

.gate-warning span,
.gate-lists span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.gate-evidence-health,
.gate-review-policy {
  margin-top: 10px;
  border: 1px solid rgba(202, 138, 4, 0.28);
  border-radius: 8px;
  background: #fff7ed;
  padding: 10px;
}

.gate-evidence-health.sufficient {
  border-color: rgba(22, 163, 74, 0.24);
  background: #f0fdf4;
}

.gate-evidence-health strong,
.gate-review-policy strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.gate-evidence-health span,
.gate-review-policy span,
.gate-review-policy p,
.gate-a14-summary {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.gate-evidence-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.gate-evidence-metrics em {
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  padding: 6px 8px;
  font-style: normal;
}

.gate-evidence-metrics em span {
  margin: 0;
  font-size: 10px;
}

.gate-evidence-metrics em b {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
}

.gate-evidence-gaps {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.gate-evidence-gaps span {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  padding: 5px 7px;
}

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

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.review-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.review-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.review-mode-row.disabled {
  opacity: 0.48;
  background: #f8fafc;
}

.review-mode-row strong,
.review-mode-row span {
  display: block;
}

.review-mode-rule {
  margin: 5px 0 0;
  color: #0f766e;
  font-size: 11px;
  line-height: 1.35;
}

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

.review-mode-row span {
  margin-top: 3px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.segmented-control {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 2px;
}

.segmented-control button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.segmented-control button.active {
  background: #0f766e;
  color: #fff;
}

.decision-layout {
  display: grid;
  grid-template-columns: minmax(520px, 0.78fr) minmax(520px, 1fr);
  gap: 16px;
  margin-top: 14px;
  align-items: start;
}

.decision-layout h3 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
}

.decision-main,
.decision-rail {
  display: grid;
  gap: 14px;
}

.decision-rail {
  align-content: start;
}

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

.decision-status,
.final-decision,
.decision-step-detail,
.policy-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
}

.goal-summary-main,
.goal-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
}

.goal-summary-main {
  grid-column: 1 / -1;
  min-height: 76px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(255, 255, 255, 0.98)),
    #fff;
}

.goal-chip {
  display: grid;
  align-content: center;
  min-height: 76px;
}

.goal-summary-main p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.goal-grid span,
.decision-status span,
.final-decision span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.goal-grid strong,
.decision-status strong,
.final-decision strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  line-height: 1.25;
}

.goal-grid strong {
  font-size: 14px;
}

.decision-status {
  border-color: rgba(14, 165, 233, 0.18);
  background:
    linear-gradient(135deg, rgba(236, 254, 255, 0.72), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
}

.decision-status-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.decision-status-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: #ecfeff;
  color: var(--cyan);
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

.decision-status.medium {
  border-color: rgba(202, 138, 4, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.78), rgba(255, 255, 255, 0.98)),
    #fff;
}

.decision-status.low {
  border-color: rgba(6, 118, 71, 0.22);
  background: #f4fbf7;
}

.decision-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.decision-metric-card {
  min-height: 72px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 254, 255, 0.46), rgba(255, 255, 255, 0.96)),
    #fff;
  padding: 12px 14px;
}

.decision-metric-card span,
.decision-metric-card strong {
  display: block;
}

.decision-metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.decision-metric-card strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.decision-metric-card.medium {
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.75), rgba(255, 255, 255, 0.98)),
    #fff;
  border-color: rgba(202, 138, 4, 0.24);
}

.decision-metric-card.high {
  background:
    linear-gradient(135deg, rgba(254, 226, 226, 0.6), rgba(255, 255, 255, 0.98)),
    #fff;
  border-color: rgba(220, 38, 38, 0.2);
}

.decision-metric-card.low {
  background:
    linear-gradient(135deg, rgba(220, 250, 230, 0.58), rgba(255, 255, 255, 0.98)),
    #fff;
  border-color: rgba(22, 163, 74, 0.22);
}

.decision-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 12px;
}

.decision-metrics div {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(203, 213, 225, 0.62);
  padding: 10px;
}

.decision-metrics em,
.decision-metrics small {
  display: block;
  font-style: normal;
}

.decision-metrics em {
  font-weight: 850;
  color: var(--ink);
  font-size: 18px;
}

.decision-metrics small {
  color: var(--muted);
  font-size: 11px;
}

.decision-next {
  margin-top: 10px;
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 11px 12px;
}

.decision-next p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.decision-timeline {
  display: grid;
  gap: 8px;
  position: relative;
}

.timeline-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
}

.timeline-index {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.timeline-title {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.timeline-title strong {
  color: var(--ink);
  font-size: 14px;
}

.timeline-title em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.timeline-row.passed .timeline-index,
.timeline-row.draft_ready .timeline-index,
.timeline-row.passed .timeline-title em,
.timeline-row.draft_ready .timeline-title em {
  background: #dcfae6;
  color: var(--good);
}

.timeline-row.warning .timeline-index,
.timeline-row.waiting_human_review .timeline-index,
.timeline-row.waiting_reference_research .timeline-index,
.timeline-row.waiting_visual_result .timeline-index,
.timeline-row.warning .timeline-title em,
.timeline-row.waiting_human_review .timeline-title em,
.timeline-row.waiting_reference_research .timeline-title em,
.timeline-row.waiting_visual_result .timeline-title em {
  background: #fef3c7;
  color: var(--warn);
}

.timeline-row.visual_failed .timeline-index,
.timeline-row.human_review_rejected .timeline-index,
.timeline-row.visual_failed .timeline-title em,
.timeline-row.human_review_rejected .timeline-title em {
  background: #fee2e2;
  color: var(--bad);
}

.timeline-row p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.final-decision {
  align-self: start;
}

.decision-step-detail {
  min-height: 280px;
}

.decision-step-head {
  margin-bottom: 12px;
}

.decision-step-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  text-transform: none;
}

.decision-step-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.final-decision p {
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.final-checks {
  display: grid;
  gap: 8px;
}

.final-checks div {
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
}

.final-checks strong {
  margin-top: 2px;
  font-size: 13px;
}

.approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.step-detail dl {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 14px 0;
}

.step-detail dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.step-detail dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.human-approval-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #f6d58a;
  border-radius: 8px;
  background: #fffbeb;
  padding: 12px;
  margin-bottom: 12px;
}

.step-rerun-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  margin: 12px 0;
}

.step-rerun-panel strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.step-rerun-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.step-rerun-panel button {
  flex: 0 0 auto;
}

.search-query-editor {
  border: 1px solid #f6d58a;
  border-radius: 8px;
  background: #fffbeb;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: grid;
  gap: 10px;
}
.search-query-editor .sq-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.search-query-editor .sq-head strong { color: var(--ink); }
.search-query-editor .sq-head span { color: var(--muted); font-size: 12px; }
.search-query-editor .sq-tip { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.search-query-editor .sq-plan {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.search-query-editor .sq-plan article {
  background: #ffffff;
  border: 1px solid #f5e0ac;
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}
.search-query-editor .sq-plan strong { color: var(--ink); font-size: 13px; }
.search-query-editor .sq-plan span,
.search-query-editor .sq-plan small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.search-query-editor .sq-plan p { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.45; }
.search-query-editor .sq-list { display: grid; gap: 6px; }
.search-query-editor .sq-row { display: flex; align-items: center; gap: 8px; }
.search-query-editor .sq-idx {
  min-width: 28px;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
}
.search-query-editor .sq-input {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  background: #ffffff;
}
.search-query-editor .sq-input:focus { outline: none; border-color: var(--accent); }
.search-query-editor .sq-del {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.search-query-editor .sq-del:hover { color: #ef4444; }
.search-query-editor .sq-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.search-query-editor .sq-groups {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.search-query-editor .sq-grp {
  background: #ffffff;
  border: 1px solid #f6d58a;
  border-radius: 999px;
  padding: 1px 8px;
  font-style: normal;
  font-size: 11px;
}
.search-query-editor .sq-empty { color: var(--muted); font-size: 13px; margin: 0; }

.visual-understanding-panel {
  border: 1px solid #d6e6f7;
  border-radius: 8px;
  background: #f6fbff;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: grid;
  gap: 8px;
}
.visual-understanding-panel .vu-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.visual-understanding-panel .vu-head strong { color: var(--ink); }
.visual-understanding-panel .vu-head span { color: var(--muted); font-size: 12px; }
.visual-understanding-panel .vu-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}
.visual-understanding-panel .vu-seeds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.visual-understanding-panel .vu-seeds strong {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}
.visual-understanding-panel .vu-seeds em {
  background: #ffffff;
  border: 1px solid #d6e6f7;
  border-radius: 999px;
  padding: 3px 10px;
  font-style: normal;
  font-size: 12px;
  color: var(--ink);
}
.visual-understanding-panel .vu-observations summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}
.visual-understanding-panel .vu-obs {
  margin-top: 6px;
  padding: 8px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #eef2f7;
  display: grid;
  gap: 4px;
}
.visual-understanding-panel .vu-obs strong { font-size: 13px; color: var(--ink); }
.visual-understanding-panel .vu-obs span {
  font-size: 12px;
  color: var(--ink);
  display: flex;
  gap: 6px;
}
.visual-understanding-panel .vu-obs em {
  font-style: normal;
  color: var(--muted);
  min-width: 110px;
}

.human-approval-panel.rejected {
  border-color: #fecaca;
  background: #fff7f7;
}

.human-approval-panel span,
.human-approval-panel p {
  color: var(--muted);
}

.human-approval-panel strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
}

.human-approval-panel p {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.45;
}

.human-approval-panel .approval-actions {
  flex: 0 0 auto;
  margin-top: 0;
}

.human-approval-panel button {
  min-height: 36px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: var(--teal);
  color: white;
  padding: 0 12px;
  font-weight: 850;
}

.human-approval-panel button:disabled {
  border-color: var(--line);
  background: #eef2f7;
  color: var(--muted);
  cursor: not-allowed;
}

.visual-review-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  padding: 12px;
}

.visual-review-panel span,
.visual-review-panel p {
  color: var(--muted);
}

.visual-review-panel strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
}

.visual-review-panel p {
  margin-top: 5px;
  font-size: 13px;
}

.visual-review-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

/* Inline 8000 review (Step A): vertical stack of project cards. */
.visual-review-panel[data-xhs-visual-review-wrap] {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  background: #fffbeb;
}
.visual-review-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 6px 0;
}
.visual-review-card {
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.visual-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.visual-review-head strong { color: var(--ink); margin-right: 8px; }
.visual-review-head em { color: var(--muted); font-style: normal; margin-left: 6px; font-size: 12px; }
.visual-review-head .pill { margin-left: 6px; }
.visual-review-head-actions { display: flex; gap: 6px; }
.visual-review-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.visual-review-body.loading,
.visual-review-body.error { display: block; color: var(--muted); font-size: 13px; }
.visual-attempt {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fafafa;
}
.visual-attempt.approved { border-color: #34d399; background: #ecfdf5; }
.visual-attempt.rejected { border-color: #f87171; background: #fef2f2; }
.visual-attempt-thumb img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  background: #f3f4f6;
}
.visual-attempt-thumb .thumb-empty {
  width: 100%; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center;
  color: var(--muted); background: #f3f4f6; border-radius: 4px; font-size: 12px;
}
.visual-attempt-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; }
.visual-attempt-meta small { color: var(--muted); }
.visual-attempt-actions { display: flex; gap: 6px; }
.visual-attempt-actions button { flex: 1; padding: 4px 6px; font-size: 12px; }

.visual-review-skipped {
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  padding: 8px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.visual-review-skipped strong { font-size: 13px; }
.visual-review-skipped small { color: var(--muted); font-size: 12px; }

/* 0A fingerprint page (evidence-driven workflow). */
.fingerprint-bar .panel { padding: 12px 16px; }
.fp-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.fp-bar-row label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.fp-bar-row select { min-width: 240px; padding: 4px 8px; }
.fp-upload { cursor: pointer; padding: 6px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.fp-upload:hover { background: #eef4f3; color: var(--accent-strong); }
.fp-upload-hint { color: var(--muted); font-size: 12px; flex-basis: 100%; margin-top: 4px; }
/* Per-field source visualisation: thick colored left border on the
   input + faint background tint, so the operator can scan the whole
   form vertically and instantly see which cell came from where (no
   risk of badge-row-vs-cell-row misalignment). */
.fingerprint-form label { position: relative; }
.fingerprint-form input,
.fingerprint-form textarea {
  border-left: 4px solid var(--line);
  transition: border-color .15s ease, background-color .15s ease;
}
.fingerprint-form input[data-fp-source="voice"],
.fingerprint-form textarea[data-fp-source="voice"] {
  border-left-color: var(--good);
  background: #ecfdf5;
}
.fingerprint-form input[data-fp-source="web_research"],
.fingerprint-form textarea[data-fp-source="web_research"] {
  border-left-color: var(--blue);
  background: #eff6ff;
}
.fingerprint-form input[data-fp-source="manual"],
.fingerprint-form textarea[data-fp-source="manual"] {
  border-left-color: #9ca3af;
  background: #f3f4f6;
}
.fingerprint-form input[data-fp-source="upload"],
.fingerprint-form textarea[data-fp-source="upload"] {
  border-left-color: var(--warn);
  background: #fef3c7;
}

/* Badge sits as a tiny pill at the input's bottom-right corner, slightly
   overlapping the bottom border so it visually anchors INSIDE the cell. */
.fp-badge {
  position: absolute; right: 6px; bottom: 4px;
  font-size: 10px; padding: 1px 6px; line-height: 1.4;
  border-radius: 999px; background: #f3f4f6; color: var(--muted);
  cursor: help; white-space: nowrap;
  border: 1px solid #e5e7eb;
  pointer-events: auto;
  z-index: 2;
}
.fp-badge:empty { display: none; }
.fp-badge-voice { background: #ecfdf5; color: var(--good); border-color: #a7f3d0; }
.fp-badge-web_research { background: #eff6ff; color: var(--blue); border-color: #bfdbfe; }
.fp-badge-manual { background: #f3f4f6; color: var(--muted); border-color: #e5e7eb; }
.fp-badge-upload { background: #fef3c7; color: var(--warn); border-color: #fde68a; }
.fp-badge.bad { background: #fef2f2; color: var(--bad); border-color: #fecaca; }
.fp-badge.warn { background: #fffbeb; color: var(--warn); border-color: #fde68a; }
.fingerprint-audit { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .fingerprint-audit { grid-template-columns: 1fr; } }
.fp-gap-result { padding: 4px 0; }
.fp-gap-head { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.fp-gap-head p { flex-basis: 100%; color: var(--muted); margin: 6px 0 0; font-size: 12px; }
.fp-gap-group { margin-top: 10px; padding: 8px 10px; background: #f9fafb; border-radius: 6px; border: 1px solid var(--line); }
.fp-gap-group.warn { background: #fffbeb; border-color: #fde68a; }
.fp-gap-group-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.fp-gap-group ul { margin: 0; padding-left: 0; list-style: none; }
.fp-gap-group li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; border-top: 1px dashed #e5e7eb; }
.fp-gap-group li:first-child { border-top: 0; }
.fp-gap-group li small { color: var(--muted); flex: 1 1 200px; }
.fp-gap-group li button { padding: 2px 8px; font-size: 12px; min-height: 28px; }
.fp-gap-group li em { font-style: normal; color: var(--warn); font-size: 12px; }
/* Phase 2.1: 12-module overview chips */
.fp-module-overview {
  margin: 8px 0 12px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.fp-module-overview-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.fp-module-overview-head small { color: var(--muted); font-size: 12px; }
.fp-module-chips {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
}
.fp-module-chip {
  display: flex; flex-direction: column; gap: 1px;
  padding: 5px 8px; border-radius: 6px;
  border: 1px solid var(--line); background: #f9fafb;
  font-size: 12px; line-height: 1.3;
}
.fp-module-chip strong { font-size: 12px; color: var(--ink); font-weight: 600; }
.fp-module-chip small { color: var(--muted); font-size: 11px; }
.fp-module-chip em { font-style: normal; font-size: 11px; }
.fp-module-complete { background: #ecfdf5; border-color: #a7f3d0; }
.fp-module-warn { background: #fffbeb; border-color: #fde68a; }
.fp-module-blocked { background: #fef2f2; border-color: #fecaca; }
.fp-module-empty { background: #f3f4f6; border-color: #e5e7eb; opacity: 0.7; }
.fp-module-score { color: var(--blue); font-size: 11px; font-weight: 600; }

/* Phase 2.2: Runbook §8.4 评分（base_score / grade / release_decision） */
.pill.warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.pill.blocked { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.fp-score-block {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px; background: #fff; border: 1px solid var(--line);
  border-radius: 6px;
}
.fp-score-main { display: flex; align-items: baseline; gap: 4px; }
.fp-score-main strong { font-size: 22px; color: var(--ink); font-weight: 700; }
.fp-score-main small { color: var(--muted); font-size: 12px; }
.fp-score-grade {
  display: inline-block; min-width: 22px; text-align: center;
  padding: 2px 6px; border-radius: 4px; font-weight: 700;
  font-size: 13px; margin-left: 4px;
}
.fp-grade-A { background: #d1fae5; color: #065f46; }
.fp-grade-B { background: #dbeafe; color: #1e40af; }
.fp-grade-C { background: #fef3c7; color: #92400e; }
.fp-grade-D { background: #fed7aa; color: #9a3412; }
.fp-grade-E { background: #fecaca; color: #991b1b; }
.fp-score-sub { display: flex; gap: 8px; font-size: 12px; color: var(--muted); }
.fp-score-sub b { color: var(--ink); margin-left: 2px; }

/* Phase 2.3: 0A-Global 海外审核 / 买家画像 / SEO */
.global-audit-result, .global-buyer-result, .global-seo-result, .cn-audit-result { margin-top: 10px; }
.global-audit-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fafbfc; }
.ga-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ga-head small { color: var(--muted); font-size: 12px; }
.ga-list { list-style: none; margin: 0; padding: 0; }
.ga-row { display: grid; grid-template-columns: 24px 1fr 2fr; gap: 8px; padding: 6px 0; border-top: 1px dashed #eef0f3; align-items: baseline; font-size: 13px; }
.ga-row:first-child { border-top: 0; }
.ga-row em { font-style: normal; }
.ga-row strong { font-weight: 600; }
.ga-row small { color: var(--muted); }
.ga-pass { color: #065f46; }
.ga-warn { background: #fffbeb; }
.ga-fail { background: #fef2f2; }
.ga-p0 { margin-top: 8px; font-size: 12px; }
.ga-p0 code { background: #fee2e2; color: #991b1b; padding: 1px 6px; border-radius: 4px; margin-right: 4px; font-size: 11px; }
.ga-notes { color: var(--muted); font-size: 12px; margin: 8px 0 0; }

.global-buyer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.bp-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
.bp-card header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.bp-card header small { color: var(--muted); font-size: 11px; }
.bp-high_potential { border-color: #a7f3d0; background: #ecfdf5; }
.bp-mid_potential { border-color: #bfdbfe; background: #eff6ff; }
.bp-low_potential { border-color: #e5e7eb; background: #f9fafb; }
.bp-row { font-size: 12px; margin: 4px 0; line-height: 1.6; }
.bp-row b { color: var(--ink); }
.bp-tag { display: inline-block; padding: 1px 6px; margin: 0 2px 2px 0; border-radius: 4px; background: #fff; border: 1px solid var(--line); font-size: 11px; }
.bp-tag-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.bp-actions { font-size: 12px; padding-left: 18px; margin: 6px 0 0; color: var(--muted); }

.global-seo-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fafbfc; font-size: 12px; }
.seo-row { margin: 4px 0; line-height: 1.7; }
.seo-row b { color: var(--ink); margin-right: 4px; }
.seo-tag { display: inline-block; padding: 1px 6px; margin: 0 2px 2px 0; border-radius: 4px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; font-size: 11px; }
.seo-market { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #eef0f3; }

/* Phase 1.2: priority tags + release blocker */
.fp-release-blocker {
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px;
  padding: 10px 12px; margin: 8px 0; color: #7f1d1d;
}
.fp-release-blocker strong { display: block; margin-bottom: 6px; color: #991b1b; }
.fp-release-blocker ul { margin: 0; padding-left: 0; list-style: none; }
.fp-release-blocker li {
  display: flex; gap: 8px; align-items: center;
  padding: 3px 0; font-size: 13px;
}
.fp-release-blocker code {
  background: #fff; padding: 1px 6px; border-radius: 4px;
  font-size: 11px; color: #b91c1c; border: 1px solid #fecaca;
}
.fp-release-blocker em { font-style: normal; color: var(--warn); font-size: 12px; margin-left: auto; }
.fp-pri-tag {
  display: inline-block; padding: 1px 6px; border-radius: 999px;
  font-size: 10px; font-weight: 700; line-height: 1.4;
}
.fp-pri-p0 { background: #fef2f2; color: #b91c1c; }
.fp-pri-p1 { background: #fffbeb; color: #b45309; }
.fp-pri-p2 { background: #f3f4f6; color: var(--muted); }
.fp-gap-p0 { border-color: #fca5a5; background: #fff5f5; }
.fp-gap-p1 { border-color: #fde68a; background: #fffbeb; }
.fp-gap-p2 { /* default look */ }
.fp-gap-subgroup { margin-top: 6px; padding-left: 4px; }
.fp-gap-subgroup em {
  display: block; font-style: normal; color: var(--muted);
  font-size: 12px; margin-bottom: 2px;
}
/* Form labels: red star for P0 fields, amber for P1; P2 stays clean */
.fingerprint-form label[data-fp-priority="P0"]::before {
  content: "★"; color: #b91c1c; font-size: 11px;
  margin-right: 4px; vertical-align: top;
}
.fingerprint-form label[data-fp-priority="P1"]::before {
  content: "·"; color: var(--warn); font-size: 14px; font-weight: 700;
  margin-right: 4px;
}
.fp-research-queue { display: grid; gap: 10px; padding-top: 4px; }
.fp-task { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: #fff; }
.fp-task.applied { border-color: #34d399; background: #ecfdf5; }
.fp-task header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.fp-task header small { color: var(--muted); font-family: monospace; }
.fp-task-candidate { font-size: 13px; }
.fp-task-candidate small { display: block; color: var(--muted); margin: 4px 0; }
.fp-task-candidate a { color: var(--blue); word-break: break-all; }
.fp-task-candidate em { font-style: normal; color: var(--warn); margin-left: 6px; }
.fp-task-pending { color: var(--muted); font-size: 13px; }
.fp-task-actions { display: flex; gap: 8px; margin-top: 8px; }
.fp-task-actions button { padding: 4px 10px; font-size: 12px; }

/* image_plan editor (Step B): per-slot asset source picker. */
.image-plan-editor {
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  padding: 12px;
  margin-top: 10px;
}
.image-plan-head { margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.image-plan-head p { color: var(--muted); font-size: 12px; flex-basis: 100%; margin: 4px 0 0; }
.image-plan-head p b { color: var(--ink); }
.image-plan-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.image-plan-table th, .image-plan-table td {
  border-bottom: 1px solid #fde68a;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.image-plan-table th { color: var(--muted); font-weight: 600; }
.image-plan-table tr:last-child td { border-bottom: 0; }
.image-plan-table input,
.image-plan-table textarea,
.image-plan-table select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--ink);
  background: #fff;
}
.image-plan-table textarea {
  min-height: 58px;
  resize: vertical;
  line-height: 1.45;
}
.image-plan-table small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.image-plan-table th:nth-child(1),
.image-plan-table td:nth-child(1) {
  width: 72px;
}
.image-plan-table th:nth-child(2),
.image-plan-table td:nth-child(2) {
  width: 180px;
}
.image-plan-table th:nth-child(4),
.image-plan-table td:nth-child(4) {
  width: 180px;
}

.technical-json {
  margin-top: 12px;
}

.technical-json summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.step-detail pre {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #d1e7ff;
  padding: 12px;
  font-size: 12px;
}

.policy-list {
  display: grid;
  gap: 10px;
}

.policy-list strong,
.policy-list span {
  display: block;
}

.policy-list span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.xhs-chain-panel {
  border-color: rgba(202, 138, 4, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.72), rgba(255, 255, 255, 0.98)),
    #fff;
}

.xhs-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.xhs-draft,
.xhs-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.xhs-draft span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.xhs-draft h3 {
  margin: 8px 0 0;
  font-size: 20px;
}

.xhs-draft p {
  white-space: pre-wrap;
  line-height: 1.6;
}

.draft-controls {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.draft-mode-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.draft-mode-row strong,
.draft-version-row > span {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.draft-mode-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.draft-mode-buttons,
.draft-version-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.draft-mode-buttons button,
.draft-version-row button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.draft-mode-buttons button.active,
.draft-version-row button.active {
  border-color: rgba(20, 184, 166, 0.45);
  background: #ecfeff;
  color: var(--accent-strong);
}

.draft-version-row {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.draft-version-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.draft-voice-note {
  margin: 10px 0;
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 8px;
  background: #f0fdfa;
  padding: 9px 11px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.writing-trace-panel {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.controlled-rewrite-studio {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.controlled-rewrite-studio.embedded {
  margin-top: 12px;
  border: 0;
  background: transparent;
  padding: 0;
}

.draft-side-merged {
  margin-top: 12px;
}

.rewrite-studio-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.rewrite-studio-head strong {
  color: var(--ink);
  font-size: 16px;
}

.rewrite-studio-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.rewrite-studio-head > span {
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 999px;
  background: #f0fdfa;
  padding: 5px 9px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
}

.rewrite-weight-row,
.rewrite-block-grid {
  display: grid;
  gap: 8px;
}

.rewrite-weight-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

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

.rewrite-weight-row article,
.rewrite-block-grid article,
.rewrite-risk-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 9px;
}

.rewrite-weight-row article.priority,
.rewrite-note-box.priority {
  border-color: rgba(234, 88, 12, 0.28);
  background: #fff7ed;
}

.rewrite-weight-row article.priority span,
.rewrite-note-box.priority {
  color: #9a3412;
}

.rewrite-weight-row span,
.rewrite-block-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.rewrite-weight-row strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}

.rewrite-block-grid p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.rewrite-risk-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f8fafc;
}

.rewrite-risk-row.warn {
  border-color: #fed7aa;
  background: #fff7ed;
}

.rewrite-risk-row strong {
  color: var(--ink);
  font-size: 12px;
}

.rewrite-risk-row span {
  color: var(--muted);
  font-size: 12px;
}

.rewrite-section-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.rewrite-block-grid.public-copy article:first-child {
  grid-column: 1 / -1;
}

.rewrite-note-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

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

.component-usage-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 5px;
}

.component-usage-grid strong {
  color: var(--ink);
  font-size: 13px;
}

.component-usage-grid span,
.component-usage-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.source-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-tag-row span {
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
}

.trace-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.trace-head strong {
  color: var(--ink);
  font-size: 16px;
}

.trace-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.trace-head > span {
  flex: 0 0 auto;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 999px;
  background: #f0fdfa;
  padding: 6px 10px;
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 12px;
}

.trace-viral-summary {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  padding: 9px 10px;
  margin-bottom: 12px;
}

.trace-viral-summary.shallow {
  border-color: #fed7aa;
  background: #fff7ed;
}

.trace-viral-summary strong {
  color: #075985;
  font-size: 12px;
}

.trace-viral-summary.shallow strong {
  color: #9a3412;
}

.trace-viral-summary span {
  border-radius: 999px;
  background: #fff;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.trace-viral-summary p {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.a14-search-attempt-panel {
  border: 1px solid #dbe7ef;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
  margin-bottom: 12px;
}

.a14-search-attempt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.a14-search-attempt-head strong {
  color: var(--ink);
  font-size: 13px;
}

.a14-search-attempt-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.a14-search-attempt-note {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}

.a14-search-plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.a14-search-plan-meta span,
.a14-query-role-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #ccfbf1;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
}

.a14-query-role-meta {
  display: grid;
  gap: 4px;
  margin-top: 5px;
}

.a14-query-role-meta span {
  justify-content: flex-start;
  border-color: #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  line-height: 1.35;
}

.a14-search-attempt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.a14-search-attempt-grid article {
  position: relative;
  border: 1px solid #e7edf5;
  border-radius: 7px;
  background: #fff;
  padding: 8px;
  min-height: 120px;
}

.a14-search-attempt-grid em {
  display: inline-flex;
  border-radius: 999px;
  background: #ecfeff;
  padding: 2px 6px;
  color: #0e7490;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.a14-search-attempt-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.a14-search-attempt-grid span,
.a14-search-attempt-grid small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.a14-search-attempt-grid p {
  margin: 5px 0 0;
  color: #9a3412;
  font-size: 11px;
  line-height: 1.35;
}

.a14-attempt-references {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.a14-attempt-references > b {
  color: #0f766e;
  font-size: 11px;
}

.a14-attempt-references.empty {
  color: #94a3b8;
  font-size: 11px;
}

.a14-attempt-reference {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 6px;
  align-items: start;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  padding: 6px;
}

.a14-reference-main {
  min-width: 0;
}

.a14-reference-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 6px;
  align-items: start;
}

.a14-reference-remove {
  width: 18px;
  height: 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.a14-reference-remove:hover {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff1f2;
}

.a14-attempt-reference strong {
  margin: 0;
  font-size: 11px;
  padding-right: 0;
}

.a14-attempt-reference span {
  margin-top: 2px;
  font-size: 10px;
}

.a14-reference-metrics {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.a14-reference-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 1px 5px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.a14-attempt-reference img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
}

.a14-attempt-reference p {
  grid-column: 1 / -1;
  margin: 0;
  color: #64748b;
}

.a14-attempt-reference a {
  grid-column: 1 / -1;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.a14-hotspot-cause-panel {
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  padding: 12px;
  margin: 0 0 12px;
}

.a14-hotspot-cause-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.a14-hotspot-cause-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.a14-hotspot-cause-head p {
  margin: 4px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}

.a14-hotspot-cause-head > span {
  max-width: 360px;
  color: #0369a1;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  text-align: right;
}

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

.a14-hotspot-cause-grid article {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.a14-hotspot-cause-grid em {
  display: inline-flex;
  border-radius: 999px;
  background: #ecfeff;
  padding: 2px 6px;
  color: #0e7490;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.a14-hotspot-cause-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 13px;
}

.a14-hotspot-cause-grid dl {
  margin: 8px 0 0;
}

.a14-hotspot-cause-grid dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.a14-hotspot-cause-grid dd {
  margin: 3px 0 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.global-writing-basis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.global-writing-basis article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
  min-height: 86px;
}

.global-writing-basis span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.global-writing-basis strong {
  color: var(--ink);
  font-size: 14px;
}

.global-writing-basis p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.trace-grid h4,
.paragraph-trace h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.trace-grid h4 em {
  margin-left: 6px;
  color: var(--accent-strong);
  font-style: normal;
  font-weight: 900;
  text-transform: none;
}

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

.trace-source-card,
.paragraph-trace article,
.trace-patch {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.trace-source-top {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.trace-source-card span,
.trace-source-top span {
  display: inline-flex;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.trace-source-top em {
  display: inline-flex;
  border-radius: 999px;
  background: #ecfeff;
  padding: 3px 7px;
  color: #0e7490;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.trace-source-top em.muted {
  background: #fff7ed;
  color: #c2410c;
}

.reference-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.reference-score-row em {
  display: inline-flex;
  border: 1px solid #dbe7ef;
  border-radius: 999px;
  background: #fff;
  padding: 3px 7px;
  color: var(--ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.trace-source-card strong,
.paragraph-trace strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.trace-source-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.trace-shot {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid #dbe7ef;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--muted);
  text-decoration: none;
}

.trace-shot img {
  width: 132px;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: #f8fafc;
}

.trace-shot span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.trace-detail-link {
  display: inline-flex;
  margin-top: 6px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.trace-source-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.trace-source-card li {
  margin: 3px 0;
}

.reference-borrowing-boundary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.reference-borrowing-boundary dl {
  margin: 0;
  border: 1px solid #e7edf5;
  border-radius: 7px;
  background: #fff;
  padding: 7px;
}

.reference-borrowing-boundary dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.reference-borrowing-boundary dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

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

.trace-breakdown dl {
  margin: 0;
  border: 1px solid #e7edf5;
  border-radius: 7px;
  background: #fff;
  padding: 7px;
}

.trace-breakdown dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.trace-breakdown dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

.reference-deconstruction {
  margin-top: 10px;
  border-top: 1px dashed #dbe7ef;
  padding-top: 10px;
}

.reference-decon-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.reference-decon-head strong {
  color: var(--accent-strong);
  font-size: 12px;
}

.reference-decon-head span {
  border-radius: 999px;
  background: #ecfeff;
  padding: 3px 7px;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 850;
}

.reference-evidence-readiness {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  border: 1px solid #e7edf5;
  border-radius: 7px;
  background: #fff;
  padding: 7px;
}

.reference-evidence-readiness.blocked {
  border-color: #fed7aa;
  background: #fff7ed;
}

.reference-evidence-readiness em {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.reference-evidence-readiness em.ok {
  background: #dcfce7;
  color: #15803d;
}

.reference-evidence-readiness em.no {
  background: #ffedd5;
  color: #c2410c;
}

.reference-evidence-readiness p {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: #9a3412;
  font-size: 11px;
  line-height: 1.35;
}

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

.reference-decon-grid dl {
  margin: 0;
  border: 1px solid #e7edf5;
  border-radius: 7px;
  background: #fff;
  padding: 7px;
}

.reference-decon-grid dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.reference-decon-grid dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.42;
}

.reference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.reference-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
}

.paragraph-trace {
  margin-top: 12px;
}

.paragraph-trace article {
  margin-top: 8px;
}

.paragraph-trace span {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.paragraph-trace p {
  margin: 6px 0;
  color: var(--muted);
}

.paragraph-trace em,
.trace-patch em {
  display: inline-flex;
  margin: 4px 5px 0 0;
  border-radius: 999px;
  background: #eef2f7;
  padding: 4px 8px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.trace-patch {
  margin-top: 12px;
  background: #f0fdfa;
}

.trace-patch p {
  margin: 5px 0 3px;
  color: var(--muted);
}

.trace-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
}

.archive-guard {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 8px;
  background: #f0fdfa;
  padding: 10px 12px;
  color: var(--muted);
}

.archive-guard strong {
  color: var(--accent-strong);
}

.brand-fit-inline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  margin: 12px 0;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 8px;
  background: #f0fdfa;
  padding: 10px 12px;
}

.brand-fit-inline strong {
  grid-row: span 2;
  color: var(--accent-strong);
  font-size: 28px;
  line-height: 1;
}

.brand-fit-inline em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.voice-issues {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  border-radius: 8px;
  background: #fff7ed;
  padding: 10px 12px;
}

.voice-issues span {
  color: #9a3412;
  font-size: 12px;
  font-weight: 750;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row em {
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  padding: 5px 8px;
  font-size: 12px;
  font-style: normal;
}

.xhs-side {
  display: grid;
  gap: 7px;
  align-content: start;
}

.xhs-side strong {
  margin-top: 6px;
  color: var(--ink);
  font-size: 12px;
}

.xhs-side span,
.xhs-side small {
  color: var(--muted);
  line-height: 1.45;
}

.xhs-visual-assets {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.visual-assets-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.visual-assets-head strong {
  color: var(--ink);
  font-size: 14px;
}

.visual-asset-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-height: 132px;
}

.visual-asset-thumb {
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f8fafc;
  aspect-ratio: 4 / 5;
  color: var(--muted);
}

.visual-asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-asset-card.pending .visual-asset-thumb {
  border: 1px dashed var(--line);
}

.visual-asset-meta {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.visual-asset-meta strong {
  color: var(--ink);
  font-weight: 750;
}

.visual-asset-meta small,
.visual-asset-meta em {
  overflow: auto;
  max-height: 54px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.visual-asset-meta a {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.xhs-visual-assets.empty {
  display: block;
  color: var(--muted);
}

.visual-handoff {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.visual-handoff strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.visual-handoff p {
  margin: 0 0 10px;
  color: var(--muted);
}

.visual-handoff pre {
  max-height: 260px;
  overflow: auto;
  border-radius: 8px;
  padding: 12px;
  background: #111827;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.55;
}

.monthly-setup-grid,
.monthly-pipeline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 14px;
}

.monthly-pipeline-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.monthly-form .wide {
  grid-column: 1 / -1;
}

.monthly-form label,
.monthly-content-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.monthly-form input,
.monthly-form textarea,
.monthly-form select,
.monthly-content-card input,
.monthly-content-card textarea,
.monthly-content-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  color: var(--ink);
  font-size: 13px;
}

.monthly-form textarea,
.monthly-content-card textarea {
  min-height: 74px;
  resize: vertical;
}

.monthly-asset-grid,
.monthly-content-board,
.monthly-kanban {
  display: grid;
  gap: 10px;
}

.monthly-asset-grid article,
.monthly-kanban div,
.monthly-content-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.monthly-asset-grid strong,
.monthly-kanban strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.monthly-asset-grid span,
.monthly-asset-grid small,
.monthly-kanban span,
.monthly-kanban p {
  color: var(--muted);
  font-size: 12px;
}

.monthly-asset-grid p {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}

.monthly-asset-grid em {
  border-radius: 999px;
  background: #eef4ff;
  padding: 3px 7px;
  color: #344054;
  font-style: normal;
  font-size: 11px;
}

.monthly-content-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.monthly-content-card {
  display: grid;
  gap: 9px;
}

.monthly-content-card.selected {
  border-color: rgba(15, 118, 110, 0.35);
  background: #f8fffc;
}

.monthly-card-head,
.monthly-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.monthly-card-head label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.tool-list {
  display: grid;
}

.tool-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 78px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.tool-unit:hover {
  background: #fbfcfe;
}

.tool-unit:last-child {
  border-bottom: 0;
}

.tool-unit strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--ink);
}

.tool-unit code {
  display: inline-block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
}

.tool-meta span:not(.pill) {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  background: #f5f7fa;
  padding: 0 8px;
  font-weight: 700;
}

.tool-card-list {
  display: grid;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 0 8px;
  background: #eef2f7;
  color: var(--muted);
  font-weight: 700;
}

.pill.enabled,
.pill.run-success {
  background: #dcfce7;
  color: #166534;
}

.pill.disabled,
.pill.run-error {
  background: #fee2e2;
  color: #991b1b;
}

.pill.run-idle {
  background: #fef3c7;
  color: #92400e;
}

.next-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.next-list div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.next-list strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #e7f4f2;
  color: var(--accent-strong);
}

.next-list span {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.first-band {
  margin-top: 0;
}

.metrics article,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metrics article {
  min-height: 86px;
  padding: 16px;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.band {
  margin-top: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 16px;
}

.panel {
  padding: 18px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head.compact {
  align-items: center;
}

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

.id-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
}

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

label.b-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 28px;
  color: var(--ink);
  font-size: 14px;
}

label.b-inline-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}

.b-saas-leads-toggle {
  display: flex;
  justify-content: flex-start;
  margin: -2px 0 12px;
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.output-panel {
  min-height: 100%;
}

pre,
.json-editor {
  width: 100%;
  min-height: 320px;
  margin: 0;
  overflow: auto;
  border: 1px solid #26303d;
  border-radius: 8px;
  background: #111827;
  color: #d1fae5;
  padding: 14px;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.json-editor {
  min-height: 260px;
  resize: vertical;
  margin-bottom: 12px;
}

.list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.list.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
}

.douyin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(135deg, #151827, #203238 58%, #38253a),
    #151827;
  color: #f8fafc;
  border: 0;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.douyin-head h2,
.douyin-head p {
  color: inherit;
}

.douyin-head .eyebrow {
  color: #7dd3fc;
}

.douyin-head .run-actions button {
  border-color: rgba(255, 255, 255, 0.22);
}

.douyin-head .run-actions .secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

body[data-current-page="douyin-live-copilot"] main {
  background:
    linear-gradient(180deg, #f8fafc 0, #eef6f4 34%, #fff7ed 100%);
}

body[data-current-page="douyin-live-copilot"] .panel {
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

body[data-current-page="douyin-live-copilot"] .panel-head h2 {
  color: #111827;
}

.dy-room-bar .panel {
  border-top: 4px solid #14b8a6;
}

.dy-room-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(140px, 0.7fr)) auto;
  gap: 12px;
  align-items: end;
}

.dy-status-grid,
.dy-config-form,
.dy-config-grid,
.dy-ops-grid {
  display: grid;
  gap: 12px;
}

.dy-status-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 14px;
}

.dy-status-grid div {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 10px;
}

.dy-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.dy-status-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #0f766e;
}

.dy-config-grid {
  grid-template-columns: minmax(420px, 1.15fr) minmax(320px, 0.85fr);
}

.dy-config-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.dy-module-list div {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.dy-module-list span {
  color: var(--muted);
  font-size: 12px;
}

.dy-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dy-metrics article {
  min-height: 98px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.92)),
    #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.dy-metrics article:nth-child(2) {
  border-top: 4px solid #06b6d4;
}

.dy-metrics article:nth-child(3) {
  border-top: 4px solid #f59e0b;
}

.dy-metrics article:nth-child(4) {
  border-top: 4px solid #ec4899;
}

.dy-metrics article:nth-child(5) {
  border-top: 4px solid #14b8a6;
}

.dy-metrics article:nth-child(5) strong {
  font-size: 22px;
}

.dy-console-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(300px, 1fr) minmax(360px, 1.15fr);
  gap: 16px;
}

.dy-bottom-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.85fr) minmax(280px, 0.85fr);
  gap: 16px;
}

.dy-live-preview {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(160px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.dy-phone-frame {
  width: min(220px, 100%);
  aspect-ratio: 9 / 16;
  border: 10px solid #111827;
  border-radius: 28px;
  background: #111827;
  padding: 8px;
  margin: 0 auto;
  box-shadow: 0 22px 40px rgba(17, 24, 39, 0.24);
}

.dy-video-surface {
  display: grid;
  align-content: end;
  gap: 10px;
  height: 100%;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.02), rgba(17, 24, 39, 0.72)),
    linear-gradient(135deg, #ccfbf1, #fde68a 45%, #fbcfe8);
  padding: 16px;
  color: #111827;
}

.dy-video-surface span,
.dy-video-surface strong {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.86);
  padding: 7px 9px;
  line-height: 1.25;
}

.dy-video-surface strong {
  color: #0f172a;
}

.dy-visual-checks {
  display: grid;
  gap: 10px;
}

.dy-vision-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.dy-vision-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 0 10px;
  color: var(--ink);
}

.dy-vision-controls input {
  width: auto;
}

.dy-upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto minmax(0, 1.2fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.dy-upload-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dy-upload-grid input {
  width: 100%;
  min-height: 38px;
}

.dy-upload-hint {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dy-visual-checks div,
.dy-insight-list div,
.dy-report div {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.dy-visual-checks span,
.dy-insight-list span,
.dy-report span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.dy-visual-checks strong,
.dy-insight-list strong,
.dy-report strong {
  display: block;
  margin-top: 5px;
}

.dy-event-composer {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
}

.dy-feed,
.dy-prompt-list,
.dy-insight-list,
.dy-report,
.dy-transcript-list,
.dy-timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.dy-feed.empty,
.dy-prompt-list.empty,
.dy-insight-list.empty,
.dy-report.empty,
.dy-transcript-list.empty,
.dy-timeline.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
}

.dy-event {
  display: grid;
  grid-template-columns: 72px 64px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.dy-event span,
.dy-event strong {
  color: var(--muted);
  font-size: 12px;
}

.dy-event p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.dy-event.comment {
  border-color: rgba(20, 184, 166, 0.28);
  background: #f0fdfa;
}

.dy-event.gift {
  border-color: rgba(245, 158, 11, 0.32);
  background: #fffbeb;
}

.dy-event.like,
.dy-event.follow {
  border-color: rgba(236, 72, 153, 0.26);
  background: #fdf2f8;
}

.dy-prompt-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-left: 5px solid #14b8a6;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 14px;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.07);
}

.dy-prompt-card.high {
  border-left-color: #ec4899;
}

.dy-prompt-card.medium {
  border-left-color: #f59e0b;
}

.dy-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.dy-card-top span {
  font-weight: 800;
  text-transform: uppercase;
}

.dy-card-top em {
  font-style: normal;
}

.dy-prompt-card h3 {
  margin: 0;
  font-size: 18px;
}

.dy-prompt-card p,
.dy-report p {
  margin: 5px 0 0;
  color: var(--ink);
  line-height: 1.45;
}

.dy-prompt-card small {
  color: var(--muted);
  line-height: 1.45;
}

.dy-insight-list.risk div {
  border-color: rgba(180, 35, 24, 0.22);
  background: #fff7f5;
}

.dy-transcript-list div,
.dy-timeline div,
.dy-checklist div {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.dy-transcript-list strong,
.dy-timeline strong,
.dy-checklist strong {
  display: block;
  font-size: 13px;
}

.dy-transcript-list span,
.dy-timeline span,
.dy-checklist span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dy-timeline div {
  display: grid;
  grid-template-columns: 72px 78px minmax(0, 1fr);
  gap: 8px;
}

.dy-timeline p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.dy-ops-grid {
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1fr) minmax(280px, 0.8fr);
}

#dyJsonPreview {
  min-height: 360px;
}

.dy-checklist {
  display: grid;
  gap: 9px;
}

.dy-checklist div.done {
  border-color: rgba(6, 118, 71, 0.24);
  background: #f0fdf4;
}

.dy-checklist div.done span {
  color: var(--good);
  font-weight: 800;
}

.dy-checklist small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.item strong {
  display: block;
  margin-bottom: 5px;
}

.item span {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #eef4f3;
  color: var(--accent-strong);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 650;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-weight: 650;
  background: #f9fafb;
}

td.success {
  color: var(--good);
  font-weight: 650;
}

td.error {
  color: var(--bad);
  font-weight: 650;
}

@media (max-width: 1100px) {
  .rail {
    position: static;
    width: auto;
    max-height: none;
    display: block;
  }

  .nav {
    display: grid;
    margin-top: 0;
  }

  .shell {
    margin-left: 0;
  }

  .two-col,
  .metrics,
  .a-engine-stats,
  .monthly-setup-grid,
  .monthly-pipeline-grid,
  .group-overview-grid,
  .product-matrix,
  .id-grid,
  .board-grid,
  .summary-cards,
  .client-hero,
  .fingerprint-layout,
  .fingerprint-output-grid,
  .module-grid {
    grid-template-columns: 1fr 1fr;
  }

  .xhs-result,
  .xhs-visual-assets,
  .xhs-option-grid,
  .xhs-project-runs,
  .xhs-run-tuning,
  .xhs-visual-head,
  .xhs-visual-jobs,
  .monthly-form,
  .monthly-content-board,
  .brand-voice-card,
  .brand-voice-summary-grid,
  .decision-layout,
  .workflow-unit-grid,
  .decision-metrics-bar,
  .review-mode-grid {
    grid-template-columns: 1fr 1fr;
  }

  .b-tier-row {
    grid-template-columns: 1fr 1fr;
  }

  .b-table-drop-layout {
    grid-template-columns: 1fr;
  }

  .dy-room-form,
  .dy-metrics,
  .dy-console-grid,
  .dy-bottom-grid,
  .dy-status-grid,
  .dy-config-grid,
  .dy-ops-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dy-prompt-panel {
    grid-column: 1 / -1;
  }

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

  .goal-summary-main {
    grid-column: 1 / -1;
  }

  .voice-profile-summary,
  .voice-fit-detail,
  .brand-voice-detail-cards {
    grid-column: 1 / -1;
  }

  .a14-search-attempt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .a14-hotspot-cause-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .rail,
  .topbar {
    display: block;
  }

  .nav {
    margin-top: 16px;
    overflow-x: auto;
  }

  .shell {
    padding: 18px;
  }

  .status-strip {
    margin-top: 14px;
  }

  .two-col,
  .metrics,
  .a-engine-stats,
  .monthly-setup-grid,
  .monthly-pipeline-grid,
  .group-overview-grid,
  .form-grid,
  .product-matrix,
  .id-grid,
  .board-grid,
  .summary-cards,
  .client-hero,
  .fingerprint-layout,
  .fingerprint-form,
  .fingerprint-output-grid,
  .module-grid,
  .xhs-result,
  .xhs-visual-assets,
  .xhs-option-grid,
  .xhs-project-runs,
  .xhs-run-tuning,
  .b-current-panel,
  .xhs-visual-head,
  .xhs-visual-jobs,
  .monthly-form,
  .monthly-content-board,
  .brand-voice-card,
  .brand-voice-summary-grid,
  .decision-layout,
  .goal-grid,
  .decision-metrics,
  .timeline-row,
  .workflow-unit-grid,
  .decision-metrics-bar,
  .review-mode-grid,
  .tool-unit,
  .b-tier-row,
  .b-table-drop-layout {
    grid-template-columns: 1fr;
  }

  .a14-hotspot-cause-head {
    display: grid;
  }

  .a14-hotspot-cause-head > span {
    max-width: none;
    text-align: left;
  }

  .douyin-head,
  .dy-live-preview {
    display: grid;
  }

  .dy-room-form,
  .dy-metrics,
  .dy-console-grid,
  .dy-bottom-grid,
  .dy-status-grid,
  .dy-config-grid,
  .dy-config-form,
  .dy-module-list div,
  .dy-vision-controls,
  .dy-upload-grid,
  .dy-ops-grid,
  .dy-event-composer {
    grid-template-columns: 1fr;
  }

  .dy-prompt-panel {
    grid-column: auto;
  }

  .dy-event {
    grid-template-columns: 1fr;
  }

  .dy-timeline div {
    grid-template-columns: 1fr;
  }

  .xhs-chain-head,
  .workflow-unit {
    display: grid;
  }

  h1 {
    font-size: 24px;
  }

  .client-hero h2 {
    font-size: 24px;
  }

  .status-strip {
    justify-content: flex-start;
  }

  .tool-meta {
    justify-content: flex-start;
    max-width: none;
  }

  #xhsDecisionStatus,
  #xhsFinalDecision,
  .decision-layout > div:first-child,
  .decision-layout > div:nth-child(3) {
    grid-column: auto;
    grid-row: auto;
  }

  .active-product {
    display: grid;
  }

  .visual-asset-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .product-status {
    justify-items: start;
  }
}

@media (max-width: 720px) {
  .brand-voice-borrow-grid,
  .a14-search-attempt-grid {
    grid-template-columns: 1fr;
  }
}

/* B 线索接入评分端 ------------------------------------------------------ */
.b-overview-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  margin-bottom: 14px;
  border: 1px solid #d5deea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.b-overview-hero h2 {
  margin: 0 0 8px;
}
.b-overview-hero p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}
.b-engine-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 接入源 tab 切换 */
.b-intake-tabs {
  display: inline-flex; gap: 0; padding: 4px; border-radius: 8px;
  background: #f1f5f9; border: 1px solid #e2e8f0;
}
.b-intake-tab {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 6px;
  font-size: 13px; cursor: pointer; color: #475569; transition: all 0.15s;
  font-family: inherit;
}
.b-intake-tab:hover { background: #fff; color: #0f172a; }
.b-intake-tab.active { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(0,0,0,0.08); font-weight: 600; }
.b-intake-pane { margin-top: 12px; }
.b-form-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.b-form-head > div:first-child { flex: 1; min-width: 280px; }
.b-form-head p { margin: 0; color: #64748b; font-size: 13px; }
.b-local-form-fields {
  display: flex; flex-direction: column; gap: 16px;
}
.b-form-module {
  border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 12px 14px; background: #fafbfc;
}
.b-form-module h4 {
  margin: 0 0 10px; font-size: 13px; color: #1e293b;
  font-weight: 600; letter-spacing: 0.5px;
  border-bottom: 1px dashed #e2e8f0; padding-bottom: 6px;
}
.b-form-module-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px 14px;
}
.b-form-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.b-form-field.wide { grid-column: 1 / -1; }
.b-form-field > span {
  color: #475569; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.b-form-field em.b-required { color: #dc2626; font-style: normal; font-weight: 700; }
.b-form-field em.b-recommended { color: #0ea5e9; font-style: normal; font-weight: 700; }
.b-form-field input, .b-form-field select, .b-form-field textarea {
  border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 8px;
  font-size: 13px; background: #fff; color: #0f172a; font-family: inherit;
}
.b-form-field input:focus, .b-form-field select:focus, .b-form-field textarea:focus {
  outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}

/* checkbox 多选组 */
.b-checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, max-content));
  gap: 8px 18px;
  align-items: center;
  padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px;
  background: #fff;
}
.b-checkbox-group label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: #0f172a; cursor: pointer;
  margin: 0; line-height: 1.35; white-space: nowrap;
  min-height: 24px;
}
.b-checkbox-group[data-field-name="当前更需要什么支持"] {
  grid-template-columns: repeat(auto-fit, minmax(142px, max-content));
}
.b-checkbox-group input[type="checkbox"] {
  margin: 0; cursor: pointer; accent-color: #0ea5e9;
}

#bToolGrid .tool-card.is-dimmed { opacity: 0.45; }
#bToolGrid .tool-card { transition: opacity 0.2s ease; }
.b-result-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.b-result-subhead:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.b-result-subhead strong {
  color: var(--ink);
  font-size: 13px;
}

.b-result-subhead span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

#bRecentLeads.list,
#bRecentPipelineRuns.list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

#bRecentLeads .list-row,
#bRecentPipelineRuns .list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  padding: 6px 10px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

#bRecentPipelineRuns .list-row {
  width: 100%;
  border-color: rgba(20, 118, 110, 0.34);
  background: #f7fbfa;
  text-align: left;
  cursor: pointer;
}

#bRecentPipelineRuns .list-row:hover {
  background: #effdfa;
}

#bRecentLeads .list-row strong,
#bRecentPipelineRuns .list-row strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#bRecentLeads .b-list-meta,
#bRecentPipelineRuns .b-list-meta {
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
}

#bRecentLeads .badge,
#bRecentPipelineRuns .badge {
  min-height: 19px;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 800;
}

#bRecentLeads .badge.grade-A,
#bRecentPipelineRuns .badge.ok {
  background: #d1fae5;
  color: #065f46;
}

#bRecentLeads .badge.grade-B { background: #dbeafe; color: #1e40af; }
#bRecentLeads .badge.grade-C,
#bRecentLeads .badge.warn,
#bRecentPipelineRuns .badge.warn { background: #fef3c7; color: #92400e; }
#bRecentLeads .badge.grade-D { background: #fee2e2; color: #991b1b; }
#bRecentLeads .badge.ok { background: #d1fae5; color: #065f46; }

#bRecentLeads.b-lead-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#bRecentLeads .b-lead-row {
  gap: 9px;
  min-height: 42px;
  padding: 7px 10px;
  border-color: #dbe4ef;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#bRecentLeads .b-lead-row:hover {
  border-color: #b9cbe0;
  background: #ffffff;
}

#bRecentLeads .b-lead-name {
  flex: 1 1 210px;
  font-size: 13px;
}

#bRecentLeads .b-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 26px;
  max-width: 180px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

#bRecentLeads .b-chip em {
  color: currentColor;
  font-style: normal;
  font-size: 10px;
  font-weight: 850;
  opacity: 0.72;
  text-transform: uppercase;
}

#bRecentLeads .b-chip.info {
  justify-content: flex-start;
  max-width: 150px;
  overflow: hidden;
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
  text-overflow: ellipsis;
}

#bRecentLeads .b-chip.score.grade-A { border-color: #bbf7d0; background: #dcfce7; color: #166534; }
#bRecentLeads .b-chip.score.grade-B { border-color: #bfdbfe; background: #dbeafe; color: #1d4ed8; }
#bRecentLeads .b-chip.score.grade-C { border-color: #fde68a; background: #fef3c7; color: #92400e; }
#bRecentLeads .b-chip.score.grade-D,
#bRecentLeads .b-chip.score.grade-x { border-color: #fecaca; background: #fee2e2; color: #991b1b; }

#bRecentLeads .b-chip.tier.basic { border-color: #e2e8f0; background: #f1f5f9; color: #475569; }
#bRecentLeads .b-chip.tier.pro { border-color: #a7f3d0; background: #d1fae5; color: #047857; }

#bRecentLeads .b-chip.s2.skipped { border-color: #e5e7eb; background: #f8fafc; color: #64748b; }
#bRecentLeads .b-chip.s2.done { border-color: #bae6fd; background: #e0f2fe; color: #0369a1; }
#bRecentLeads .b-chip.s2.neutral { border-color: #e5e7eb; background: #f8fafc; color: #64748b; }

#bRecentLeads .b-chip.final {
  border-color: #ddd6fe;
  background: #ede9fe;
  color: #5b21b6;
}

#bRecentLeads .b-chip.stage.verified { border-color: #bbf7d0; background: #ecfdf5; color: #047857; }
#bRecentLeads .b-chip.stage.rejected { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
#bRecentLeads .b-chip.stage.basic { border-color: #cbd5e1; background: #f1f5f9; color: #334155; }
#bRecentLeads .b-chip.stage.review { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
#bRecentLeads .b-chip.stage.neutral { border-color: #e2e8f0; background: #f8fafc; color: #475569; }

#bRecentLeads .b-chip.s3 {
  border-color: #fdba74;
  background: #fff7ed;
  color: #c2410c;
}

#bRecentLeads .b-chip.review {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #b45309;
}

#bRecentLeads .b-chip.priority {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #b91c1c;
}

@media (max-width: 900px) {
  #bRecentLeads .b-lead-row {
    flex-wrap: wrap;
  }

  #bRecentLeads .b-lead-name {
    flex-basis: 100%;
  }
}
#bApiStatus { font-size: 14px; }
