:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #66706d;
  --line: #dbe1df;
  --line-strong: #bdc9c5;
  --surface: #ffffff;
  --surface-soft: #f5f7f6;
  --green: #1f6b57;
  --green-soft: #e5f1ed;
  --coral: #d95f45;
  --coral-soft: #fae9e4;
  --blue: #3f6f8f;
  --blue-soft: #e8f0f5;
  --amber: #9a6a13;
  --amber-soft: #fbf1d9;
  --shadow: 0 12px 32px rgba(24, 33, 31, 0.14);
  --report-paper: #ffffff;
  --report-rule: #dfe5e2;
  --report-serif: "Songti SC", STSong, "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif;
  --report-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface-soft);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(63, 111, 143, 0.28);
  outline-offset: 2px;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
}

.topbar {
  min-height: 72px;
  padding: 12px clamp(16px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 6px;
  font-size: 18px;
  font-weight: 750;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 720;
}

h2 {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
}

.brand-block p,
.section-heading p,
.table-heading p,
.dialog-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-control {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.date-control label {
  white-space: nowrap;
}

.date-control select,
.select-box select {
  height: 30px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 650;
}

.primary-button,
.secondary-button,
.icon-button {
  border: 0;
  border-radius: 6px;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.primary-button {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  color: #fff;
  background: var(--green);
  font-weight: 680;
}

.primary-button:hover {
  background: #185a49;
}

.primary-button:active,
.secondary-button:active,
.icon-button:active {
  transform: translateY(1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.button-symbol {
  font-size: 18px;
  line-height: 1;
}

.secondary-button {
  min-height: 36px;
  padding: 0 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-weight: 650;
}

.secondary-button:hover {
  background: var(--surface-soft);
}

.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 22px;
  line-height: 1;
}

.icon-button:hover {
  background: var(--surface-soft);
}

.view-tabs {
  padding: 0 clamp(16px, 3vw, 40px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.view-tabs-row {
  min-width: 0;
  display: flex;
  align-items: end;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.primary-view-row {
  height: 43px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.category-tabs {
  min-height: 43px;
  border-bottom: 1px solid var(--line);
}

.utility-tabs {
  min-height: 49px;
  align-items: center;
}

.tab-button {
  position: relative;
  height: 45px;
  flex: 0 0 auto;
  padding: 0 16px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-weight: 650;
}

.tab-button::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 3px;
  background: transparent;
}

.tab-button:hover {
  color: var(--ink);
}

.tab-button.active {
  color: var(--green);
}

.tab-button.active::after {
  background: var(--green);
}

.chat-launch {
  height: 34px;
  margin: 0 0 6px 8px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 680;
}

.chat-launch:hover {
  background: #185a49;
}

.chat-launch:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.field-guide-launch {
  height: 34px;
  margin: 0 0 6px 4px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  color: var(--green);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.field-guide-launch:hover {
  background: var(--green-soft);
}

.field-guide-launch span {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
}

.field-help {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #67736f;
  background: transparent;
  border: 1px solid #aeb9b5;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
  vertical-align: middle;
}

.field-help:hover,
.field-help:focus-visible,
.field-help[aria-expanded="true"] {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.field-help-popover {
  position: fixed;
  z-index: 10000;
  max-width: calc(100vw - 20px);
  padding: 10px 12px;
  color: #fff;
  background: #26332f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  box-shadow: 0 9px 24px rgba(24, 33, 31, 0.24);
  font-size: 12px;
  line-height: 1.55;
  pointer-events: none;
}

.system-status {
  min-height: 48px;
  padding: 8px clamp(16px, 3vw, 40px);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #42504c;
  background: #f3f7f5;
  border-bottom: 1px solid var(--line);
}

.system-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: var(--green);
  border-radius: 50%;
}

.system-status-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.system-status-copy strong {
  flex: 0 0 auto;
  font-size: 12px;
}

.system-status-copy span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.system-status > .field-help {
  flex: 0 0 17px;
}

.system-status[data-state="stale"],
.system-status[data-state="failed"],
.system-status[data-state="empty"] {
  background: #fff8e8;
}

.system-status[data-state="stale"] .system-status-dot,
.system-status[data-state="empty"] .system-status-dot {
  background: var(--amber);
}

.system-status[data-state="failed"] .system-status-dot {
  background: var(--coral);
}

.system-status[data-state="running"] .system-status-dot {
  background: var(--blue);
}

.status-action {
  min-height: 30px;
  flex: 0 0 auto;
  padding: 0 10px;
  color: var(--green);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

main {
  width: min(100%, 1720px);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px) 40px;
}

.kpi-band {
  min-height: 124px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.kpi-item {
  min-width: 0;
  padding: 22px clamp(14px, 2vw, 26px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
}

.kpi-item:last-child {
  border-right: 0;
}

.kpi-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.kpi-item strong {
  min-height: 34px;
  margin-top: 7px;
  overflow: hidden;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.15;
  font-weight: 760;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.kpi-primary strong {
  color: var(--coral);
}

.kpi-item small {
  min-height: 17px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.analysis-band {
  min-height: 340px;
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.75fr);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.trend-panel,
.brand-panel {
  min-width: 0;
  padding: 22px 24px;
}

.trend-panel {
  border-right: 1px solid var(--line);
}

.section-heading,
.table-heading,
.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading.compact {
  align-items: center;
}

.ranking-tabs {
  flex: 0 0 auto;
  padding: 2px;
  display: inline-flex;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.ranking-tabs button {
  height: 28px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 650;
}

.ranking-tabs button.active {
  color: var(--green);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(24, 33, 31, 0.12);
}

.legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 11px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.legend-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
}

.legend-dot.total {
  background: var(--coral);
}

.legend-dot.cleanser {
  background: var(--green);
}

.legend-dot.oil {
  background: var(--blue);
}

.legend-dot.newmaterial {
  background: var(--amber);
}

.chart-wrap {
  width: 100%;
  height: 252px;
  margin-top: 15px;
  overflow: hidden;
}

.trend-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: #e6ebe9;
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--muted);
  font-size: 10px;
}

.chart-line-total,
.chart-line-cleanser,
.chart-line-oil,
.chart-line-new {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.chart-line-total {
  stroke: var(--coral);
}

.chart-line-cleanser {
  stroke: var(--green);
}

.chart-line-oil {
  stroke: var(--blue);
}

.chart-line-new {
  stroke: var(--amber);
}

.chart-point-total,
.chart-point-cleanser,
.chart-point-oil,
.chart-point-new {
  stroke: #fff;
  stroke-width: 2;
}

.chart-point-total {
  fill: var(--coral);
}

.chart-point-cleanser {
  fill: var(--green);
}

.chart-point-oil {
  fill: var(--blue);
}

.chart-point-new {
  fill: var(--amber);
}

.single-point-label {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.brand-list {
  margin-top: 18px;
  display: grid;
  gap: 13px;
}

.brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  align-items: center;
}

button.brand-row {
  width: 100%;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
}

button.brand-row:hover .brand-name {
  color: var(--green);
}

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

.brand-value {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.brand-track {
  height: 5px;
  grid-column: 1 / -1;
  overflow: hidden;
  background: #edf0ef;
  border-radius: 3px;
}

.brand-bar {
  height: 100%;
  min-width: 2px;
  background: var(--green);
  border-radius: 3px;
}

.materials-section {
  background: var(--surface);
}

.framework-section {
  padding: 20px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.framework-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2,
.framework-heading h2,
.table-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.analysis-mode-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.framework-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.framework-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.framework-row {
  min-width: 0;
  padding: 13px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.framework-row strong,
.framework-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.framework-account-split {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.framework-account-split span {
  width: fit-content;
  margin: 0;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}

.framework-account-split .self {
  color: #7c5410;
  background: var(--amber-soft);
}

.framework-account-split .influencer {
  color: #604e8c;
  background: #eee9fa;
}

.framework-row strong {
  font-size: 12px;
}

.framework-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.framework-metrics {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.framework-metrics b {
  color: var(--coral);
  font-size: 18px;
}

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

.table-heading {
  min-height: 80px;
  padding: 18px 24px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.table-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.search-box,
.select-box {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.search-box {
  width: min(300px, 34vw);
}

.search-box span {
  font-size: 18px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search-box input::placeholder {
  color: #8a9491;
}

.select-box select {
  height: 28px;
}

.table-scroll {
  position: relative;
  width: 100%;
  min-height: 220px;
  overflow-x: auto;
}

.metric-guide {
  margin: 10px 18px 12px;
  color: var(--muted);
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.metric-guide summary {
  min-height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  color: var(--green);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
  list-style: none;
}

.metric-guide summary::-webkit-details-marker {
  display: none;
}

.metric-guide summary::after {
  content: "+";
  margin-left: auto;
  font-size: 16px;
}

.metric-guide[open] summary::after {
  content: "−";
}

.metric-guide-grid {
  padding: 0 12px 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.metric-guide-scope {
  margin: 0 12px 10px;
  padding: 9px 10px;
  color: #40504b;
  background: var(--green-soft);
  border-left: 3px solid var(--green);
  font-size: 11px;
  line-height: 1.5;
}

.metric-guide-grid p {
  margin: 0;
  padding: 9px 10px;
  display: grid;
  gap: 4px;
  background: var(--surface);
  border: 1px solid #e8ecea;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.45;
}

.metric-guide-grid strong {
  color: var(--ink);
  font-size: 11px;
}

table {
  width: 100%;
  min-width: 1580px;
  border-collapse: collapse;
  table-layout: fixed;
}

thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

th {
  height: 42px;
  padding: 0 10px;
  color: #3c4744;
  background: #eef2f0;
  border-bottom: 1px solid var(--line-strong);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.table-header-label {
  vertical-align: middle;
}

th .field-help {
  width: 15px;
  height: 15px;
  margin-left: 5px;
  font-size: 9px;
}

td {
  height: 88px;
  padding: 9px 10px;
  border-bottom: 1px solid #e8ecea;
  vertical-align: middle;
  font-size: 12px;
}

tbody tr:hover {
  background: #fafcfb;
}

.rank-cell {
  width: 50px;
  color: var(--muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.category-cell {
  width: 70px;
}

.promotion-cell {
  width: 86px;
}

.material-cell {
  width: 300px;
}

.material-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  line-height: 1.45;
  font-weight: 650;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.material-meta {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.video-framework-cell {
  width: 260px;
}

.framework-publisher {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.framework-publisher-label,
.framework-subject-prefix {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.framework-publisher-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.3;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.framework-publisher-name:hover {
  color: var(--green);
  text-decoration: underline;
}

.framework-account-type {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}

.framework-account-type.brand {
  color: var(--blue);
  background: var(--blue-soft);
}

.framework-account-type.creator {
  color: #5c4a86;
  background: #eeeafb;
}

.framework-subject {
  margin-top: 5px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.framework-subject-type {
  flex: 0 0 auto;
  min-height: 20px;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.framework-subject-type.celebrity {
  color: var(--coral);
  background: var(--coral-soft);
}

.framework-subject-type.creator {
  color: #5c4a86;
  background: #eeeafb;
}

.framework-subject-type.brand {
  color: var(--blue);
  background: var(--blue-soft);
}

.framework-subject-type.unknown {
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.framework-subject-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .metric-guide-grid {
    grid-template-columns: 1fr;
  }
}

.framework-form-label {
  margin-top: 3px;
  overflow: hidden;
  color: #34413e;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.framework-evidence-label {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.framework-hook-label {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.number-cell {
  width: 100px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.number-cell strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.number-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--coral);
}

.neutral {
  color: var(--muted);
}

.signal-cell {
  width: 90px;
}

.score-cell {
  width: 90px;
  text-align: center;
}

.score-value {
  display: inline-grid;
  width: 38px;
  height: 30px;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 760;
}

.score-value.high {
  background: var(--coral);
}

.score-value.medium {
  color: #72500f;
  background: var(--amber-soft);
}

.score-reason {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-tag,
.category-tag,
.status-tag,
.promotion-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.2;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.category-tag.cleanser {
  color: var(--green);
  background: var(--green-soft);
}

.category-tag.oil {
  color: var(--blue);
  background: var(--blue-soft);
}

.promotion-tag.self {
  color: #7c5410;
  background: var(--amber-soft);
}

.promotion-tag.influencer {
  color: #5c4a86;
  background: #eeeafb;
}

.signal-tag.breakout {
  color: var(--coral);
  background: var(--coral-soft);
}

.signal-tag.fast,
.status-tag.growing {
  color: var(--green);
  background: var(--green-soft);
}

.signal-tag.new,
.status-tag.new {
  color: var(--blue);
  background: var(--blue-soft);
}

.signal-tag.watch,
.status-tag.base {
  color: var(--amber);
  background: var(--amber-soft);
}

.date-cell {
  width: 126px;
  color: var(--muted);
  line-height: 1.35;
}

.action-cell {
  width: 100px;
  text-align: center;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.analyze-button {
  height: 32px;
  padding: 0 10px;
  color: var(--green);
  background: var(--green-soft);
  border: 0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.analyze-button:hover {
  color: #fff;
  background: var(--green);
}

.video-link {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 5px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 750;
}

.video-link:hover {
  color: #fff;
  background: var(--blue);
}

.table-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.pagination {
  min-height: 56px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-actions .icon-button {
  width: 32px;
  height: 32px;
}

.captcha-dialog {
  width: min(440px, calc(100vw - 28px));
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analysis-dialog {
  width: min(940px, calc(100vw - 28px));
  max-height: min(900px, calc(100vh - 28px));
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analysis-dialog::backdrop {
  background: rgba(22, 29, 27, 0.56);
}

.analysis-shell {
  display: flex;
  max-height: min(900px, calc(100vh - 28px));
  flex-direction: column;
}

.analysis-dialog-header {
  flex: 0 0 auto;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.analysis-loading {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
}

.analysis-content {
  padding: 0 20px 24px;
  overflow-y: auto;
}

.analysis-hero {
  min-height: 180px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.analysis-cover {
  width: 132px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--surface-soft);
  border-radius: 6px;
}

.analysis-hero-copy {
  min-width: 0;
}

.analysis-badges,
.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.promotion-correction {
  min-height: 32px;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 11px;
}

.promotion-correction select {
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 700;
}

.analysis-mode,
.keyword-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  color: #7c5410;
  background: var(--amber-soft);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.analysis-mode.fine {
  color: #fff;
  background: var(--green);
}

.fine-analysis-result {
  margin: 0 -20px;
  padding: 22px 20px 26px;
  background: #fbfdfc;
  border-bottom: 1px solid var(--line-strong);
}

.product-verification {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--line);
}

.product-verification-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
}

.product-verification-heading span {
  color: var(--amber);
  font-size: 10px;
}

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

.product-field {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.product-field span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.product-field input {
  min-width: 0;
  height: 36px;
  flex: 1 1 auto;
  border: 0;
  outline: 0;
}

.product-save {
  margin-top: 10px;
}

.fine-analysis-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.fine-analysis-heading h3 {
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.4;
}

.fine-analysis-heading p {
  max-width: 720px;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.fine-confidence {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 12px;
}

.fine-hook {
  background: var(--green-soft);
}

.evidence-list {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.evidence-item {
  display: grid;
  grid-template-columns: 130px 190px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.evidence-item strong,
.evidence-item p {
  font-size: 12px;
  line-height: 1.5;
}

.evidence-item p {
  color: var(--muted);
}

.analysis-material-title {
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.45;
}

.analysis-material-meta,
.analysis-limitation {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.55;
}

.analysis-limitation {
  color: #7c5410;
}

.analysis-hook,
.analysis-reuse {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--green-soft);
  border-left: 4px solid var(--green);
}

.analysis-hook strong,
.analysis-reuse strong {
  display: block;
  margin-top: 5px;
  line-height: 1.45;
}

.analysis-hook p {
  margin-top: 5px;
  color: #42504c;
  line-height: 1.5;
}

.analysis-eyebrow {
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
}

.analysis-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.analysis-fact {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.analysis-fact:last-child {
  border-right: 0;
}

.analysis-fact span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.analysis-fact strong {
  display: block;
  margin-top: 6px;
  line-height: 1.45;
}

.analysis-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 22px;
}

.analysis-section {
  margin-top: 22px;
}

.analysis-section h3 {
  font-size: 13px;
}

.analysis-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #42504c;
  line-height: 1.65;
}

.analysis-timeline {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.analysis-timeline li {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.analysis-stage {
  color: var(--coral);
  font-size: 11px;
  font-weight: 750;
}

.analysis-timeline strong {
  display: block;
  font-size: 12px;
}

.analysis-timeline p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.keyword-chip {
  margin-top: 10px;
  color: var(--blue);
  background: var(--blue-soft);
}

.analysis-reuse {
  background: var(--coral-soft);
  border-left-color: var(--coral);
}

.analysis-reuse .analysis-eyebrow {
  color: var(--coral);
}

.contact-sheet {
  width: 100%;
  height: auto;
  margin-top: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.analysis-actions {
  flex: 0 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.analysis-video-link {
  text-decoration: none;
}

.video-open-dialog,
.visitor-dialog,
.dashboard-chat-dialog {
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.video-open-dialog {
  width: min(520px, calc(100vw - 28px));
}

.visitor-dialog {
  width: min(1080px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
}

.dashboard-chat-dialog {
  width: calc(100vw - 20px);
  height: calc(100vh - 20px);
  max-width: none;
  max-height: none;
}

.video-open-dialog::backdrop,
.visitor-dialog::backdrop,
.dashboard-chat-dialog::backdrop {
  background: rgba(22, 29, 27, 0.5);
}

.chat-shell {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(170px, 184px) clamp(320px, 20vw, 350px) minmax(760px, 1fr);
  overflow: hidden;
}

.dashboard-chat-dialog.report-focus .chat-shell {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-chat-dialog.report-focus .chat-sidebar,
.dashboard-chat-dialog.report-focus .chat-main {
  display: none;
}

.dashboard-chat-dialog.report-focus .chat-report {
  grid-column: 1;
  border-left: 0;
}

.chat-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-soft);
  border-right: 1px solid var(--line);
}

.chat-sidebar-heading,
.chat-header {
  min-height: 64px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-sidebar-heading > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.chat-pane-switch {
  display: none;
}

.chat-sidebar-heading strong {
  font-size: 14px;
}

.chat-sidebar-heading span,
.chat-header p {
  color: var(--muted);
  font-size: 11px;
}

.chat-new-button {
  flex: 0 0 34px;
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  font-size: 20px;
}

.chat-new-button:hover {
  background: #185a49;
}

.chat-sidebar-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-history-toggle {
  display: none;
  font-size: 17px;
}

.chat-conversation-list {
  min-height: 0;
  padding: 8px;
  overflow-y: auto;
}

.chat-conversation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  border-radius: 6px;
}

.chat-conversation-row:hover,
.chat-conversation-row.active {
  background: var(--surface);
}

.chat-conversation-row.active {
  box-shadow: inset 3px 0 var(--green);
}

.chat-conversation-select,
.chat-conversation-delete {
  border: 0;
  background: transparent;
}

.chat-conversation-select {
  min-width: 0;
  padding: 10px 9px 10px 12px;
  display: grid;
  gap: 4px;
  text-align: left;
}

.chat-conversation-select strong,
.chat-conversation-select span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-conversation-select strong {
  color: var(--ink);
  font-size: 12px;
}

.chat-conversation-select span {
  color: var(--muted);
  font-size: 10px;
}

.chat-conversation-delete {
  width: 28px;
  height: 28px;
  color: var(--muted);
  border-radius: 4px;
  font-size: 17px;
}

.chat-conversation-delete:hover {
  color: var(--coral);
  background: var(--coral-soft);
}

.chat-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--surface);
}

.chat-report {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #eef2f0;
  border-left: 1px solid var(--line);
}

.chat-report-toolbar {
  min-height: 64px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.chat-report-toolbar > div:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.chat-report-toolbar strong,
.chat-report-toolbar span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-report-toolbar strong {
  font-size: 13px;
}

.chat-report-toolbar span {
  color: var(--muted);
  font-size: 10px;
}

.chat-report-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-report-actions .secondary-button {
  min-height: 34px;
  font-size: 11px;
}

.chat-report-focus {
  min-height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #365048;
  background: #f6f8f7;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 15px;
}

.chat-report-focus b {
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0;
}

.chat-report-focus[aria-pressed="true"] {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.chat-report-scroll {
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.chat-report-empty {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
}

.chat-report-empty > span {
  font-size: 32px;
}

.chat-report-empty strong {
  font-size: 14px;
}

.chat-report-document {
  width: min(1180px, 100%);
  min-height: 100%;
  margin: 0 auto;
  background: var(--report-paper);
  color: #202a27;
  font-family: var(--report-sans);
  font-variant-numeric: tabular-nums;
}

.chat-report-hero {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  color: #fff;
  background: #18312c;
}

.chat-report-hero > img,
.chat-report-hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.chat-report-hero > img {
  object-fit: cover;
}

.chat-report-hero-overlay {
  background: linear-gradient(90deg, rgba(13, 25, 22, 0.92) 0%, rgba(13, 25, 22, 0.72) 54%, rgba(13, 25, 22, 0.34) 100%);
}

.chat-report-hero-content {
  position: relative;
  z-index: 1;
  min-height: 210px;
  padding: clamp(24px, 3vw, 38px);
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.chat-report-hero-content > span {
  width: fit-content;
  padding: 6px 9px;
  color: #d9eee7;
  border: 1px solid rgba(217, 238, 231, 0.45);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.chat-report-hero-content h2 {
  max-width: 820px;
  margin-top: 13px;
  color: #fff;
  font-size: 27px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.chat-report-hero-content p {
  max-width: 820px;
  margin-top: 11px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.6;
}

.chat-report-document[data-report-type="product-commerce-diagnosis"] .chat-report-hero,
.chat-report-document[data-report-type="product-commerce-diagnosis"] .chat-report-hero-content {
  min-height: 178px;
}

.chat-report-document[data-report-type="product-commerce-diagnosis"] .chat-report-hero-content {
  padding-top: 26px;
  padding-bottom: 25px;
}

.chat-report-document[data-report-type="product-commerce-diagnosis"] .chat-report-hero-content h2 {
  font-size: 25px;
}

.chat-report-document[data-report-type="product-commerce-diagnosis"] .chat-report-hero-content p {
  max-width: 760px;
  font-size: 12px;
  line-height: 1.55;
}

.chat-report-tags {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-report-tags span {
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  font-size: 10px;
}

.chat-report-formula {
  padding: 20px clamp(24px, 4vw, 48px);
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 6px 24px;
  background: #f3f7f5;
  border-bottom: 1px solid #dbe4e0;
}

.chat-report-formula > span {
  grid-row: 1 / span 2;
  align-self: stretch;
  padding-right: 20px;
  display: flex;
  align-items: center;
  color: #175f4d;
  border-right: 2px solid #77a99a;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.chat-report-formula > strong {
  color: #17241f;
  font-size: 18px;
  line-height: 1.45;
}

.chat-report-formula > p {
  margin: 0;
  color: #69756f;
  font-size: 10px;
  line-height: 1.55;
}

.chat-report-scope {
  padding: 18px clamp(24px, 4vw, 48px) 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.chat-report-scope-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.chat-report-scope-heading strong {
  color: #1b2924;
  font-size: 13px;
}

.chat-report-scope-heading span {
  color: var(--muted);
  font-size: 10px;
}

.chat-report-scope-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #dde5e1;
  border-radius: 5px;
}

.chat-report-scope-item {
  min-width: 0;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.chat-report-scope-item + .chat-report-scope-item {
  border-left: 1px solid #dde5e1;
}

.chat-report-scope-item span,
.chat-report-scope-item small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-report-scope-item strong {
  color: #21302b;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-report-sources {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.chat-report-sources-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.chat-report-source-item {
  padding: 4px 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #51615b;
  background: #f4f7f5;
  border-radius: 3px;
  font-size: 9px;
}

.chat-report-source-item b {
  color: #176a55;
}

.chat-report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.chat-report-metric {
  min-width: 0;
  padding: 14px 16px;
  display: grid;
  gap: 5px;
  border-right: 1px solid var(--line);
}

.chat-report-metric:last-child {
  border-right: 0;
}

.chat-report-metric span,
.chat-report-metric small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-report-metric strong {
  color: var(--green);
  font-size: 21px;
}

.chat-report-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0 clamp(20px, 4vw, 52px);
  display: flex;
  gap: 4px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.chat-report-nav::-webkit-scrollbar {
  display: none;
}

.chat-report-nav button {
  height: 44px;
  flex: 0 0 auto;
  padding: 0 11px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 650;
}

.chat-report-nav button:hover {
  color: var(--green);
}

.chat-report-nav button.active,
.chat-report-nav button[aria-current="true"] {
  color: var(--green);
  box-shadow: inset 0 -2px 0 var(--green);
}

.chat-report-body {
  padding: 12px clamp(30px, 4vw, 58px) 76px;
}

.chat-report-section {
  width: min(1060px, 100%);
  margin-right: auto;
  margin-left: auto;
  padding-top: 32px;
  scroll-margin-top: 52px;
}

.chat-report-analyst-note {
  margin: 18px 0 4px;
  background: #f7f9f8;
  border-top: 1px solid #d9e2de;
  border-bottom: 1px solid #d9e2de;
}

.chat-report-analyst-note-heading {
  position: relative;
  padding: 14px 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.chat-report-analyst-note-heading::-webkit-details-marker {
  display: none;
}

.chat-report-analyst-note-heading::after {
  margin-left: auto;
  color: #668178;
  content: "+";
  font-size: 17px;
  line-height: 1;
}

.chat-report-analyst-note[open] .chat-report-analyst-note-heading::after {
  content: "−";
}

.chat-report-analyst-note-heading span {
  color: #1d6f5b;
  font-family: var(--report-sans);
  font-size: 9px;
  font-weight: 750;
}

.chat-report-analyst-note-heading h4 {
  margin: 0;
  color: #1a2521;
  font-family: var(--report-serif);
  font-size: 17px;
  line-height: 1.45;
}

.chat-report-analyst-note-heading small {
  color: #74817c;
  font-size: 9px;
  font-weight: 500;
}

.chat-report-analyst-body {
  padding: 2px 20px 20px;
  border-top: 1px solid #e1e7e4;
}

.chat-report-analyst-body > p,
.chat-report-analyst-body > ul,
.chat-report-analyst-body > ol {
  max-width: 880px;
  margin: 10px 0 0;
  color: #35413d;
  font-family: var(--report-serif);
  font-size: 13px;
  line-height: 1.85;
}

.chat-report-analyst-note-intro {
  color: #71807a !important;
  font-family: var(--report-sans) !important;
  font-size: 10px !important;
}

.chat-report-primary-narrative {
  max-width: 860px;
  margin-top: 2px;
  counter-reset: report-analysis-item;
}

.chat-report-primary-narrative.lead {
  max-width: 900px;
  padding: 22px 26px;
  color: #2a312e;
  background: #fff9f1;
  border: 1px solid #ecd2ad;
  border-radius: 6px;
}

.chat-report-primary-narrative > p,
.chat-report-primary-narrative > ul,
.chat-report-primary-narrative > ol {
  max-width: 840px;
  margin: 14px 0 0;
  color: #27322f;
  font-family: var(--report-serif);
  font-size: 15px;
  line-height: 1.92;
}

.chat-report-primary-narrative > .markdown-subheading {
  max-width: 840px;
  margin-top: 30px;
  color: #15201c;
  font-size: 17px;
  line-height: 1.55;
}

.chat-report-primary-narrative > ol {
  padding-left: 0;
  list-style: none;
}

.chat-report-primary-narrative > ol > li {
  position: relative;
  padding-left: 1.8em;
  counter-increment: report-analysis-item;
}

.chat-report-primary-narrative > ol > li::before {
  position: absolute;
  left: 0;
  color: #1e6e59;
  content: counter(report-analysis-item) ".";
  font-family: var(--report-sans);
  font-weight: 700;
}

.chat-report-primary-narrative.lead > .markdown-subheading:first-child {
  display: none;
}

.chat-report-primary-intro {
  margin: 0 0 12px !important;
  color: #6d7974 !important;
  font-family: var(--report-sans) !important;
  font-size: 11px !important;
  line-height: 1.65 !important;
}

.chat-report-data-appendix {
  margin-top: 24px;
  border-top: 1px solid #dce4e0;
  border-bottom: 1px solid #dce4e0;
}

.chat-report-data-appendix-heading {
  position: relative;
  padding: 14px 38px 14px 2px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: #245f50;
  cursor: pointer;
  list-style: none;
  font-family: var(--report-sans);
  font-size: 12px;
  font-weight: 700;
}

.chat-report-data-appendix-heading::-webkit-details-marker {
  display: none;
}

.chat-report-data-appendix-heading::after {
  position: absolute;
  top: 50%;
  right: 6px;
  content: "+";
  color: #608176;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
}

.chat-report-data-appendix[open] .chat-report-data-appendix-heading::after {
  content: "−";
}

.chat-report-data-appendix-heading small {
  color: #84908b;
  font-size: 10px;
  font-weight: 500;
}

.chat-report-structured-evidence {
  padding: 2px 0 24px;
  border-top: 1px solid #edf0ef;
}

.chat-report-section + .chat-report-section {
  margin-top: 8px;
  border-top: 1px solid #e7ebe9;
}

.chat-report-section h3 {
  margin: 0 0 20px;
  padding-left: 13px;
  color: #17211e;
  border-left: 3px solid var(--coral);
  font-family: var(--report-sans);
  font-size: 18px;
  font-weight: 720;
  line-height: 1.4;
}

.chat-report-section p,
.chat-report-list {
  max-width: 780px;
  margin: 13px 0 0;
  color: #2d3935;
  font-family: var(--report-serif);
  font-size: 14.5px;
  line-height: 1.86;
  overflow-wrap: break-word;
}

.chat-report-section .markdown-paragraph:first-of-type {
  margin-top: 0;
}

.markdown-subheading {
  max-width: 780px;
  margin: 28px 0 9px;
  padding-top: 2px;
  color: #1f2a26;
  font-family: var(--report-sans);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.55;
}

.chat-report-section h3 + .markdown-subheading {
  margin-top: 0;
}

.markdown-paragraph strong,
.markdown-list strong,
.markdown-table strong {
  color: #17211e;
  font-weight: 700;
}

.markdown-paragraph code,
.markdown-list code,
.markdown-table code {
  padding: 1px 4px;
  color: #244d42;
  background: #eef3f1;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
}

.markdown-list {
  padding-left: 1.45em;
}

.markdown-list li {
  padding-left: 0.15em;
}

.markdown-list li + li {
  margin-top: 7px;
}

.markdown-quote {
  max-width: 780px;
  margin: 18px 0 0;
  padding: 12px 16px;
  color: #44504c;
  background: #f5f7f6;
  border-left: 3px solid #8eaaa1;
  font-family: var(--report-serif);
  font-size: 14px;
  line-height: 1.8;
}

.markdown-table-wrap {
  width: 100%;
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--report-rule);
  border-radius: 6px;
  background: #fff;
}

.markdown-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: auto;
  color: #26312e;
  background: #fff;
  font-family: var(--report-sans);
  font-size: 13px;
  line-height: 1.55;
}

.markdown-table thead {
  position: static;
}

.markdown-table-2-columns {
  min-width: 0;
  table-layout: fixed;
}

.markdown-table-2-columns th:first-child,
.markdown-table-2-columns td:first-child {
  width: 38%;
}

.markdown-table th,
.markdown-table td {
  height: auto;
  padding: 11px 13px;
  border-right: 1px solid #e2e7e5;
  border-bottom: 1px solid #e2e7e5;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: break-word;
}

.markdown-table th:last-child,
.markdown-table td:last-child {
  border-right: 0;
}

.markdown-table tbody tr:last-child td {
  border-bottom: 0;
}

.markdown-table th {
  color: #26322e;
  background: #f1f4f2;
  font-weight: 700;
  white-space: nowrap;
}

.markdown-table tbody tr:nth-child(even) {
  background: #fafcfb;
}

.markdown-table tbody tr:hover {
  background: #f4f8f6;
}

.markdown-table td.label-cell {
  color: #28332f;
  text-align: left;
  font-weight: 620;
}

.markdown-table td.numeric {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.markdown-table td.report-video-cell {
  min-width: 310px;
  padding: 10px;
}

.markdown-table-data-rich {
  min-width: 820px;
}

.markdown-table-material-comparison {
  min-width: 900px;
}

.markdown-table-material-comparison:not(.markdown-table-material-comparison-has-rank) th:first-child,
.markdown-table-material-comparison:not(.markdown-table-material-comparison-has-rank) td:first-child {
  width: 310px;
  min-width: 310px;
}

.markdown-table-material-comparison:not(.markdown-table-material-comparison-has-rank) th:nth-child(n + 2),
.markdown-table-material-comparison:not(.markdown-table-material-comparison-has-rank) td:nth-child(n + 2) {
  min-width: 94px;
}

.markdown-table-material-comparison-has-rank th:first-child,
.markdown-table-material-comparison-has-rank td:first-child {
  width: 56px;
  min-width: 56px;
  text-align: center;
}

.markdown-table-material-comparison-has-rank th:nth-child(2),
.markdown-table-material-comparison-has-rank td:nth-child(2) {
  width: 310px;
  min-width: 310px;
}

.markdown-table-material-comparison-has-rank th:nth-child(n + 3),
.markdown-table-material-comparison-has-rank td:nth-child(n + 3) {
  min-width: 94px;
}

.markdown-table-material-comparison th:last-child,
.markdown-table-material-comparison td:last-child {
  min-width: 120px;
}

.report-table-video {
  min-width: 0;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.report-table-video-media {
  position: relative;
  width: 128px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8eeeb;
  border-radius: 4px;
}

.report-table-video-media::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #72807b;
  content: "视频";
  font-size: 10px;
}

.report-table-video-media img,
.report-table-video-media video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: #111;
  object-fit: cover;
}

.report-table-video-media video {
  object-fit: contain;
}

.report-table-video-play {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  min-width: 48px;
  height: 28px;
  padding: 0 8px;
  color: #fff;
  background: rgba(18, 48, 39, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  font-size: 10px;
  transform: translate(-50%, -50%);
}

.report-table-video-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.report-table-video-copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12.5px;
  line-height: 1.5;
}

.report-table-video-copy > span {
  color: #73807b;
  font-size: 10px;
}

.report-table-video-actions {
  display: flex;
  gap: 6px;
}

.report-table-video-actions button {
  width: 38px;
  height: 28px;
  padding: 0;
  color: #176c57;
  background: #eef6f3;
  border: 1px solid #d6e5df;
  border-radius: 4px;
  font-size: 11px;
}

.chat-report-table-chart {
  position: relative;
  margin: 20px 0 16px;
  padding: 18px 20px 10px;
  background: #fff;
  border: 1px solid #dce4e1;
  border-radius: 6px;
}

.chat-report-table-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.chat-report-table-chart-heading strong {
  color: #1c2925;
  font-size: 15px;
}

.chat-report-table-chart-heading p {
  max-width: 620px;
  margin: 5px 0 0;
  color: #6c7873;
  font-family: var(--report-sans);
  font-size: 11px;
  line-height: 1.55;
}

.chat-report-table-chart-legend {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 14px;
  color: #4f5d58;
  font-size: 10px;
}

.chat-report-table-chart-legend span::before {
  width: 8px;
  height: 8px;
  margin-right: 5px;
  display: inline-block;
  background: var(--series-color);
  border-radius: 2px;
  content: "";
}

.chat-report-table-chart-svg {
  width: 100%;
  height: 330px;
  margin-top: 12px;
  display: block;
}

.chat-report-table-chart-category {
  fill: #5f6b67;
  font-family: var(--report-sans);
  font-size: 10px;
  pointer-events: none;
}

.chat-report-table-chart-value {
  fill: #3d4b46;
  font-family: var(--report-sans);
  font-size: 9px;
  font-weight: 650;
  pointer-events: none;
}

.chat-report-table-chart-mark {
  cursor: crosshair;
  transition: filter 120ms ease, opacity 120ms ease, stroke-width 120ms ease;
}

.chat-report-table-chart-mark:hover,
.chat-report-table-chart-mark:focus {
  filter: brightness(0.86);
  opacity: 0.92;
  stroke: #173c33;
  stroke-width: 2px;
  outline: none;
}

.chat-report-table-tooltip {
  position: absolute;
  z-index: 4;
  max-width: min(320px, calc(100% - 20px));
  padding: 9px 11px;
  color: #fff;
  background: rgba(22, 37, 33, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  box-shadow: 0 8px 22px rgba(18, 31, 27, 0.18);
  font-family: var(--report-sans);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 100ms ease, transform 100ms ease;
}

.chat-report-table-chart.is-tooltip-visible .chat-report-table-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.chat-report-intro {
  max-width: 780px;
  padding: 12px 15px;
  background: #f4f7f5;
  border-left: 2px solid #97b7ac;
  font-size: 14px;
  line-height: 1.75;
}

.chat-report-findings {
  margin-top: 22px;
  border-top: 1px solid #dfe5e2;
}

.chat-report-finding {
  min-width: 0;
  padding: 22px 0;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 24px;
  border-bottom: 1px solid #e4e9e7;
}

.chat-report-finding-marker {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 9px;
}

.chat-report-finding-marker > span {
  color: #bfd0ca;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
}

.chat-report-finding-marker > b {
  padding: 5px 7px;
  color: #326252;
  background: #edf4f1;
  border-radius: 3px;
  font-size: 9px;
  line-height: 1.3;
}

.chat-report-finding-copy h4 {
  margin: 0;
  color: #17211e;
  font-size: 16px;
  line-height: 1.5;
}

.chat-report-finding-copy .chat-report-finding-conclusion {
  max-width: 820px;
  margin-top: 8px;
  color: #26322e;
  font-family: var(--report-serif);
  font-size: 14px;
  line-height: 1.8;
}

.chat-report-finding-evidence {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 7px 12px;
}

.chat-report-finding-evidence > span {
  padding-top: 2px;
  color: #78837f;
  font-size: 9px;
  font-weight: 700;
}

.chat-report-finding-evidence > p {
  max-width: none;
  margin: 0;
  color: #56625e;
  font-family: var(--report-sans);
  font-size: 11px;
  line-height: 1.65;
}

.chat-report-playbook-flow {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #dce3e0;
  border-radius: 5px;
}

.chat-report-playbook-step {
  position: relative;
  min-width: 0;
  padding: 18px 17px 16px;
  background: #fff;
}

.chat-report-playbook-step + .chat-report-playbook-step {
  border-left: 1px solid #dce3e0;
}

.chat-report-playbook-step + .chat-report-playbook-step::before {
  position: absolute;
  z-index: 1;
  top: 30px;
  left: -9px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: #68857c;
  background: #fff;
  content: "›";
  font-size: 18px;
}

.chat-report-playbook-step header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-report-playbook-step header span {
  color: #9aa9a4;
  font-size: 9px;
}

.chat-report-playbook-step header b {
  color: #1c6d59;
  font-size: 10px;
}

.chat-report-playbook-step h4 {
  margin-top: 13px;
  color: #1a2521;
  font-size: 14px;
  line-height: 1.5;
}

.chat-report-playbook-step p {
  max-width: none;
  margin-top: 8px;
  color: #45514d;
  font-family: var(--report-sans);
  font-size: 10.5px;
  line-height: 1.65;
}

.chat-report-playbook-step small {
  margin-top: 13px;
  display: block;
  color: #7a8581;
  font-size: 9px;
  line-height: 1.5;
}

.chat-report-list {
  padding-left: 20px;
}

.chat-report-list li + li {
  margin-top: 8px;
}

.chat-report-comparisons {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chat-report-comparison {
  min-width: 0;
  padding: 16px;
  background: #f7f9f8;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.chat-report-comparison-header,
.chat-report-comparison-identity {
  display: flex;
  align-items: center;
}

.chat-report-comparison-header {
  justify-content: space-between;
  gap: 12px;
}

.chat-report-comparison-identity {
  min-width: 0;
  gap: 9px;
}

.chat-report-comparison-identity span {
  font-size: 14px;
  font-weight: 700;
}

.chat-report-comparison-identity strong {
  color: var(--green);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.chat-report-momentum {
  flex: 0 0 auto;
  padding: 5px 7px;
  color: var(--muted);
  background: #e7ece9;
  border-radius: 4px;
  font-size: 10px;
}

.chat-report-momentum.positive {
  color: #176c57;
  background: #dff0e9;
}

.chat-report-momentum.negative {
  color: #a34535;
  background: #f6e4df;
}

.chat-report-comparison-stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.chat-report-comparison-stat {
  min-width: 0;
  padding: 9px;
  display: grid;
  gap: 3px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chat-report-comparison-stat span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-report-comparison-stat strong {
  overflow-wrap: anywhere;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chat-report-comparison-summary {
  margin-top: 12px !important;
  font-size: 11px !important;
  line-height: 1.65 !important;
}

.chat-report-comparison-details {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-report-comparison-details span {
  padding: 4px 6px;
  color: var(--muted);
  background: #edf1ef;
  border-radius: 3px;
  font-size: 9px;
}

.chat-report-document[data-report-type="brand-ranking-analysis"] .chat-report-comparisons {
  grid-template-columns: 1fr;
  gap: 10px;
}

.chat-report-document[data-report-type="brand-ranking-analysis"] .chat-report-comparison {
  padding: 15px 17px;
}

.chat-report-document[data-report-type="brand-ranking-analysis"] .chat-report-comparison-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.chat-report-document[data-report-type="brand-ranking-analysis"] .chat-report-comparison-identity span {
  min-width: 150px;
}

.chat-report-document[data-report-type="brand-ranking-analysis"] .chat-report-comparison-summary {
  font-family: var(--report-serif);
  font-size: 13px !important;
}

.chat-report-video-breakdowns {
  margin-top: 20px;
  display: grid;
  gap: 18px;
}

.chat-report-video-chapter-intro {
  margin: -3px 0 18px !important;
  padding: 11px 14px;
  color: #40504a !important;
  background: #f2f6f4;
  border-left: 2px solid #84aa9e;
  font-family: var(--report-sans) !important;
  font-size: 12px !important;
  line-height: 1.65 !important;
}

.chat-report-video-chapter-intro + .chat-report-video-breakdowns {
  margin-top: 0;
}

.chat-report-trend-card {
  margin: 18px 0 26px;
  padding: 18px 20px 12px;
  background: #fbfcfc;
  border: 1px solid #dce4e1;
  border-radius: 6px;
}

.chat-report-trend-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.chat-report-trend-heading strong {
  color: #1c2a25;
  font-size: 14px;
}

.chat-report-trend-heading p {
  max-width: 660px;
  margin: 5px 0 0;
  color: #6b7772;
  font-family: var(--report-sans);
  font-size: 10px;
  line-height: 1.55;
}

.chat-report-trend-legend {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: #56635e;
  font-size: 9px;
}

.chat-report-trend-legend span::before {
  width: 7px;
  height: 7px;
  margin-right: 5px;
  display: inline-block;
  background: var(--series-color);
  border-radius: 50%;
  content: "";
}

.chat-report-trend-svg {
  width: 100%;
  height: 250px;
  margin-top: 12px;
  display: block;
}

.chat-report-trend-grid {
  stroke: #e4eae7;
  stroke-width: 1;
}

.chat-report-trend-axis {
  fill: #78827e;
  font-family: var(--report-sans);
  font-size: 9px;
}

.chat-report-trend-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.chat-report-video-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce3e0;
  border-radius: 6px;
}

.chat-report-video-card.brand-reference {
  border-color: #c9d8d3;
  box-shadow: inset 3px 0 0 #6f9f90;
}

.chat-report-video-media {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background: #e9eeec;
}

.chat-report-video-media::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 25, 22, 0.08), transparent 45%, rgba(13, 25, 22, 0.42));
}

.chat-report-video-media.no-image::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #69736f;
  content: "暂无封面";
  font-size: 12px;
}

.chat-report-video-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.chat-report-video-media video {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0e1613;
  object-fit: contain;
}

.chat-report-video-play {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  padding: 0 0 0 3px;
  color: #fff;
  background: rgba(11, 24, 20, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  font-size: 17px;
  transform: translate(-50%, -50%);
}

.chat-report-video-play.ready {
  background: #1f705d;
  box-shadow: 0 7px 22px rgba(19, 71, 58, 0.28);
}

.chat-report-video-rank,
.chat-report-video-mode {
  position: absolute;
  z-index: 1;
  left: 14px;
  padding: 5px 7px;
  color: #fff;
  background: rgba(14, 31, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}

.chat-report-video-rank {
  top: 14px;
}

.chat-report-video-mode {
  bottom: 14px;
  right: 14px;
  width: fit-content;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-report-video-card.brand-reference .chat-report-video-mode {
  color: #143e32;
  background: rgba(231, 244, 239, 0.94);
  border-color: rgba(255, 255, 255, 0.75);
}

.chat-report-video-body {
  min-width: 0;
  padding: 20px 22px 16px;
}

.chat-report-video-header {
  min-width: 0;
}

.chat-report-video-heading-copy {
  min-width: 0;
}

.chat-report-video-heading-copy h4 {
  margin: 0;
  color: #18221f;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.chat-report-video-heading-copy p {
  max-width: none;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--report-sans);
  font-size: 10px;
  line-height: 1.55;
}

.chat-report-video-verdict {
  margin-top: 15px;
  padding: 13px 15px;
  background: #f1f6f4;
  border-left: 3px solid #4f8d7b;
}

.chat-report-video-verdict > span {
  display: block;
  color: #5f716b;
  font-size: 9px;
  font-weight: 700;
}

.chat-report-video-verdict > strong {
  margin-top: 5px;
  display: block;
  color: #1d2b26;
  font-family: var(--report-serif);
  font-size: 13px;
  line-height: 1.65;
}

.chat-report-video-verdict > p {
  max-width: none;
  margin-top: 6px;
  color: #53605c;
  font-family: var(--report-sans);
  font-size: 10px;
  line-height: 1.6;
}

.chat-report-video-metrics {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #e5eae8;
  border-bottom: 1px solid #e5eae8;
}

.chat-report-video-trend {
  margin-top: 12px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 190px;
  align-items: center;
  gap: 14px;
  background: #f8faf9;
  border: 1px solid #e3e9e6;
}

.chat-report-video-trend span,
.chat-report-video-trend strong {
  display: block;
}

.chat-report-video-trend span {
  color: #71807a;
  font-size: 9px;
}

.chat-report-video-trend strong {
  margin-top: 4px;
  color: #29453c;
  font-size: 10px;
}

.chat-report-video-sparkline {
  width: 190px;
  height: 48px;
  overflow: visible;
}

.chat-report-video-sparkline-path {
  fill: none;
  stroke: #1f705d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.chat-report-video-metric {
  min-width: 0;
  padding: 11px 10px 11px 0;
  display: grid;
  gap: 4px;
}

.chat-report-video-metric + .chat-report-video-metric {
  padding-left: 10px;
  border-left: 1px solid #e5eae8;
}

.chat-report-video-metric span {
  color: var(--muted);
  font-size: 9px;
}

.chat-report-video-metric strong {
  overflow: hidden;
  color: #1f5f4f;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.chat-report-video-insight {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.chat-report-video-insight-item {
  min-width: 0;
  padding-left: 10px;
  border-left: 2px solid #94b8ad;
}

.chat-report-video-insight-item > span {
  color: #52605b;
  font-size: 9px;
  font-weight: 700;
}

.chat-report-video-insight-item > p {
  max-width: none;
  margin-top: 4px;
  color: #24302c;
  font-family: var(--report-sans);
  font-size: 11px;
  line-height: 1.55;
}

.chat-report-video-chips {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-report-video-chips span {
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 9px;
}

.chat-report-video-chips .selling-point {
  color: #1e5c4c;
  background: #e8f2ef;
}

.chat-report-video-chips .keyword {
  color: #5a6460;
  background: #f0f3f2;
}

.chat-report-video-structure-heading {
  margin-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-report-video-structure-heading b {
  color: #26332e;
  font-size: 11px;
}

.chat-report-video-structure-heading span {
  color: #7a8581;
  font-size: 9px;
}

.chat-report-video-structure {
  margin: 16px 0 0;
  padding: 0 0 5px;
  display: grid;
  grid-auto-columns: minmax(132px, 1fr);
  grid-auto-flow: column;
  gap: 0;
  overflow-x: auto;
  list-style: none;
}

.chat-report-video-structure li {
  min-width: 0;
  padding: 10px 12px;
  border-top: 1px solid #dfe5e2;
  border-bottom: 1px solid #dfe5e2;
}

.chat-report-video-structure li + li {
  border-left: 1px solid #dfe5e2;
}

.chat-report-video-structure b,
.chat-report-video-structure span {
  display: block;
}

.chat-report-video-structure b {
  color: #1b5f4e;
  font-size: 10px;
}

.chat-report-video-structure span {
  margin-top: 2px;
  color: #6a7571;
  font-size: 9px;
}

.chat-report-video-structure p {
  max-width: none;
  margin-top: 6px;
  color: #34413c;
  font-family: var(--report-sans);
  font-size: 9.5px;
  line-height: 1.55;
}

.chat-report-video-footer {
  margin-top: 14px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid #e5eae8;
}

.chat-report-frame-evidence {
  margin-top: 16px;
  padding: 14px;
  background: #f7faf8;
  border: 1px solid #dce6e2;
}

.chat-report-frame-evidence.loading,
.chat-report-frame-evidence.pending {
  color: #65736d;
  background: #f5f7f6;
  border-style: dashed;
}

.chat-report-frame-evidence > strong,
.chat-report-frame-heading strong {
  color: #234b3f;
  font-size: 11px;
}

.chat-report-frame-evidence > p {
  max-width: none;
  margin: 5px 0 0;
  color: #69756f;
  font-family: var(--report-sans);
  font-size: 10px;
  line-height: 1.6;
}

.chat-report-frame-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.chat-report-frame-heading span {
  color: #6a7872;
  font-size: 9px;
}

.chat-report-frame-evidence > img {
  width: 100%;
  max-height: 460px;
  margin-top: 12px;
  display: block;
  border: 1px solid #d7dfdc;
  object-fit: contain;
}

.chat-report-fine-summary {
  margin-top: 12px;
  padding: 11px 13px;
  color: #26342f;
  background: #fff;
  border-left: 3px solid #d9684f;
  font-family: var(--report-serif);
  font-size: 11px;
  line-height: 1.65;
}

.chat-report-fine-timeline {
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #dfe6e3;
  list-style: none;
}

.chat-report-fine-timeline li {
  min-width: 0;
  padding: 10px;
}

.chat-report-fine-timeline li + li {
  border-left: 1px solid #dfe6e3;
}

.chat-report-fine-timeline span,
.chat-report-fine-timeline strong {
  display: block;
}

.chat-report-fine-timeline span {
  color: #1f705d;
  font-size: 9px;
}

.chat-report-fine-timeline strong {
  margin-top: 4px;
  color: #26342f;
  font-size: 10px;
}

.chat-report-fine-timeline p {
  max-width: none;
  margin: 5px 0 0;
  color: #65716d;
  font-family: var(--report-sans);
  font-size: 9px;
  line-height: 1.5;
}

.chat-report-video-footer > p {
  max-width: 520px;
  margin: 0;
  color: #6a7571;
  font-family: var(--report-sans);
  font-size: 9px;
  line-height: 1.55;
}

.chat-report-video-evidence {
  max-width: 540px;
  min-width: 0;
}

.chat-report-video-evidence b {
  color: #365f53;
  font-size: 11px;
}

.chat-report-video-evidence p {
  max-width: none;
  margin: 4px 0 0;
  color: #6a7571;
  font-family: var(--report-sans);
  font-size: 11px;
  line-height: 1.55;
}

.chat-report-video-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 7px;
}

.chat-report-video-actions button {
  height: 30px;
  padding: 0 10px;
  color: #315349;
  background: #fff;
  border: 1px solid #b9c9c4;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.chat-report-video-actions button.primary {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.chat-report-materials {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.chat-report-material {
  min-width: 0;
  padding: 13px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 32px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-report-material-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.chat-report-material-copy strong,
.chat-report-material-copy span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-report-material-copy strong {
  font-size: 12px;
}

.chat-report-material-copy span {
  color: var(--muted);
  font-size: 10px;
}

.chat-report-material-metrics {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 3px;
}

.chat-report-material-metrics b {
  color: var(--coral);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.chat-report-material-metrics span {
  overflow: hidden;
  max-width: 92px;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-report-material-metrics span.positive {
  color: #176c57;
}

.chat-report-material-metrics span.negative {
  color: #b4513e;
}

.chat-report-material-open {
  width: 32px;
  height: 32px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 0;
  border-radius: 5px;
  font-size: 18px;
}

.chat-close-conversation {
  display: none;
}

.chat-header {
  padding-right: 18px;
  padding-left: 20px;
}

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

.chat-header h2,
.chat-header p {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-messages {
  min-height: 0;
  padding: 14px 12px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.chat-empty {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  color: var(--ink);
  text-align: center;
}

.chat-empty > strong {
  font-size: 20px;
}

.chat-suggestions {
  width: min(620px, 100%);
  display: grid;
  gap: 8px;
}

.chat-suggestions button {
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: left;
  font-size: 12px;
}

.chat-suggestions button:hover {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-soft);
}

.chat-message {
  width: min(760px, 100%);
  margin: 0 auto 12px;
  display: grid;
  gap: 7px;
}

.chat-message.user {
  justify-items: end;
}

.chat-message-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.chat-message-body {
  max-width: min(680px, 92%);
  padding: 10px 11px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-message.user .chat-message-body {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.chat-message.pending .chat-message-body {
  color: var(--muted);
}

.chat-message.pending .chat-message-body:has(.chat-progress-list) {
  width: min(680px, 92%);
  max-width: min(680px, 92%);
  padding: 14px 15px;
  white-space: normal;
}

.chat-progress-heading {
  display: block;
  color: #22312c;
  font-size: 12px;
}

.chat-progress-scope {
  margin: 5px 0 0;
  color: #77827e;
  font-size: 10px;
  line-height: 1.45;
}

.chat-progress-list {
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.chat-progress-list li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #7d8884;
  font-size: 10px;
}

.chat-progress-list li > span:first-child {
  width: 9px;
  height: 9px;
  border: 1px solid #b7c2be;
  border-radius: 50%;
}

.chat-progress-list li[data-status="done"] {
  color: #315f52;
}

.chat-progress-list li[data-status="done"] > span:first-child {
  background: #25715d;
  border-color: #25715d;
  box-shadow: inset 0 0 0 2px #eef5f2;
}

.chat-progress-list li[data-status="active"] {
  color: #21322c;
  font-weight: 650;
}

.chat-progress-list li[data-status="active"] > span:first-child {
  border: 2px solid #80a89c;
  border-top-color: #176a55;
  animation: chat-progress-spin 0.9s linear infinite;
}

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

.chat-message .markdown-paragraph,
.chat-message .markdown-list {
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.chat-message .markdown-paragraph + .markdown-paragraph,
.chat-message .markdown-list + .markdown-paragraph,
.chat-message .markdown-paragraph + .markdown-list {
  margin-top: 9px;
}

.chat-message .markdown-subheading {
  margin: 12px 0 6px;
  font-size: 12px;
}

.chat-message .markdown-subheading:first-child {
  margin-top: 0;
}

.chat-message .markdown-list {
  padding-left: 18px;
}

.chat-message .markdown-table-wrap {
  margin-top: 10px;
}

.chat-message .markdown-table {
  min-width: 520px;
  font-size: 10px;
}

.chat-composer {
  margin: 0 16px 18px;
  padding: 8px 8px 8px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: end;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(24, 33, 31, 0.08);
}

.chat-composer:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 107, 87, 0.12);
}

.chat-composer textarea {
  width: 100%;
  max-height: 132px;
  padding: 5px 0;
  resize: vertical;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  line-height: 1.5;
}

.chat-send {
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 700;
}

.chat-send:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.chat-discovery {
  display: none;
}

.dashboard-chat-dialog.chat-landing .chat-shell {
  grid-template-columns: 72px minmax(0, 1fr);
  background: #f4f8f6;
}

.dashboard-chat-dialog.chat-landing.show-chat-history .chat-shell {
  grid-template-columns: 260px minmax(0, 1fr);
}

.dashboard-chat-dialog.chat-landing .chat-sidebar {
  grid-column: 1;
  background: #edf3f0;
}

.dashboard-chat-dialog.chat-landing .chat-main {
  grid-row: 1;
  grid-column: 2;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow-y: auto;
  background: #f4f8f6;
}

.dashboard-chat-dialog.chat-landing .chat-report {
  display: none;
}

.dashboard-chat-dialog.chat-landing:not(.show-chat-history) .chat-sidebar-heading {
  height: 100%;
  min-height: 0;
  padding: 18px 10px;
  flex-direction: column;
  justify-content: flex-start;
  border-bottom: 0;
}

.dashboard-chat-dialog.chat-landing:not(.show-chat-history) .chat-sidebar-heading > div:first-child {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 7px;
}

.dashboard-chat-dialog.chat-landing:not(.show-chat-history) .chat-sidebar-heading > div:first-child strong {
  font-size: 0;
}

.dashboard-chat-dialog.chat-landing:not(.show-chat-history) .chat-sidebar-heading > div:first-child strong::after {
  content: "增";
  font-size: 18px;
}

.dashboard-chat-dialog.chat-landing:not(.show-chat-history) .chat-sidebar-heading > div:first-child span,
.dashboard-chat-dialog.chat-landing:not(.show-chat-history) .chat-pane-switch,
.dashboard-chat-dialog.chat-landing:not(.show-chat-history) .chat-conversation-list {
  display: none;
}

.dashboard-chat-dialog.chat-landing:not(.show-chat-history) .chat-sidebar-tools {
  margin-top: 22px;
  flex-direction: column-reverse;
}

.dashboard-chat-dialog.chat-landing.show-chat-history .chat-sidebar-heading {
  min-height: 64px;
}

.dashboard-chat-dialog.chat-landing .chat-history-toggle {
  display: grid;
}

.dashboard-chat-dialog.chat-landing .chat-header {
  min-height: 64px;
  padding: 12px 20px;
  border-bottom: 0;
  background: transparent;
}

.dashboard-chat-dialog.chat-landing .chat-header > div {
  visibility: hidden;
}

.dashboard-chat-dialog.chat-landing .chat-close-conversation {
  display: grid;
}

.dashboard-chat-dialog.chat-landing .chat-messages {
  min-height: 0;
  padding: clamp(24px, 5vh, 60px) 24px 0;
  overflow: visible;
}

.dashboard-chat-dialog.chat-landing .chat-empty {
  min-height: 0;
  gap: 12px;
}

.chat-empty-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border: 1px solid #185c4b;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(24, 93, 75, 0.16);
  font-size: 24px;
  font-weight: 760;
}

.chat-empty h2 {
  margin: 10px 0 0;
  color: #182521;
  font-size: 32px;
  font-weight: 650;
  letter-spacing: 0;
}

.chat-empty > p {
  width: min(620px, 100%);
  margin: 0;
  color: #66746f;
  font-size: 13px;
  line-height: 1.7;
}

.chat-mode-tabs {
  margin-top: 16px;
  padding: 4px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  background: #e7eeeb;
  border: 1px solid #d3dfda;
  border-radius: 7px;
}

.chat-mode-tabs button {
  min-height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #64716d;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
}

.chat-mode-tabs button:hover,
.chat-mode-tabs button.active {
  color: var(--green);
  background: #fff;
  box-shadow: 0 1px 3px rgba(24, 42, 36, 0.1);
}

.dashboard-chat-dialog.chat-landing .chat-composer {
  width: min(780px, calc(100% - 48px));
  min-height: 128px;
  margin: 20px auto 0;
  padding: 16px 14px 12px 18px;
  border-color: #bfd2ca;
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(35, 64, 55, 0.09);
}

.dashboard-chat-dialog.chat-landing .chat-composer textarea {
  min-height: 88px;
  max-height: 180px;
  padding: 0;
  resize: none;
  font-size: 14px;
  line-height: 1.7;
}

.dashboard-chat-dialog.chat-landing .chat-send {
  border-radius: 50%;
}

.dashboard-chat-dialog.chat-landing .chat-discovery {
  width: min(780px, calc(100% - 48px));
  margin: 18px auto 48px;
  display: grid;
  align-content: start;
  gap: 28px;
}

.chat-discovery-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.chat-discovery-heading strong {
  color: #21312c;
  font-size: 13px;
}

.chat-discovery-heading span {
  color: #7b8883;
  font-size: 11px;
}

.chat-direct-prompts,
.chat-inspiration {
  display: grid;
  gap: 10px;
}

.dashboard-chat-dialog.chat-landing .chat-suggestions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-chat-dialog.chat-landing .chat-suggestions button {
  min-height: 34px;
  padding: 7px 11px;
  color: #41504b;
  background: rgba(255, 255, 255, 0.8);
  border-color: #d7e1dd;
  font-size: 11px;
}

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

.chat-inspiration-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d6e0dc;
  border-radius: 7px;
  text-align: left;
}

.chat-inspiration-card:hover {
  border-color: #7fae9f;
  box-shadow: 0 8px 20px rgba(33, 73, 61, 0.1);
}

.chat-inspiration-media {
  height: 104px;
  position: relative;
  display: block;
  overflow: hidden;
  background: #dfe9e5;
}

.chat-inspiration-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.chat-inspiration-media small {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  color: #fff;
  background: rgba(18, 42, 35, 0.72);
  border-radius: 4px;
  font-size: 9px;
  font-style: normal;
}

.chat-inspiration-copy {
  min-width: 0;
  padding: 10px 11px 12px;
  display: grid;
  gap: 6px;
}

.chat-inspiration-copy strong {
  overflow: hidden;
  color: #22302c;
  font-size: 11px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chat-inspiration-copy span {
  overflow: hidden;
  color: #74817d;
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.video-open-shell,
.visitor-shell {
  padding: 20px;
}

.video-id-row {
  margin-top: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.video-id-row span {
  color: var(--muted);
  font-size: 11px;
}

.video-id-row code {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 700;
}

.video-open-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.video-open-shell .dialog-actions {
  padding: 16px 0 0;
}

.video-web-link {
  text-decoration: none;
}

.visitor-table-wrap {
  max-height: calc(100vh - 150px);
  margin-top: 18px;
  overflow: auto;
  border: 1px solid var(--line);
}

.visitor-table {
  width: 100%;
  border-collapse: collapse;
}

.visitor-table th,
.visitor-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 11px;
}

.visitor-table th {
  position: sticky;
  top: 0;
  background: var(--surface-soft);
}

.visitor-table td {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.captcha-dialog::backdrop {
  background: rgba(22, 29, 27, 0.46);
}

.field-guide-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.field-guide-dialog::backdrop {
  background: rgba(22, 29, 27, 0.46);
}

.field-guide-shell {
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.field-guide-shell > .dialog-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.field-guide-content {
  min-height: 0;
  padding: 0 20px 24px;
  overflow-y: auto;
}

.field-guide-section {
  padding-top: 20px;
}

.field-guide-section + .field-guide-section {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.field-guide-section h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
}

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

.field-guide-grid article {
  min-width: 0;
  padding: 11px 12px;
  background: #f8faf9;
  border: 1px solid #e5eae8;
  border-radius: 6px;
}

.field-guide-grid strong {
  display: block;
  color: var(--green);
  font-size: 11px;
}

.field-guide-grid p {
  margin-top: 5px;
  color: #4e5b57;
  font-size: 11px;
  line-height: 1.55;
}

.dialog-shell {
  padding: 22px;
}

.dialog-header {
  align-items: flex-start;
}

.captcha-row {
  min-height: 104px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.captcha-row img {
  width: 160px;
  height: 76px;
  object-fit: contain;
  image-rendering: auto;
  background: #fff;
  border: 1px solid var(--line);
}

.captcha-input-label {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

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

.collection-mode-grid .collection-field {
  min-width: 0;
}

.collection-mode-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.collection-mode-grid .dialog-field-label,
.captcha-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dialog-field-label label {
  cursor: pointer;
}

.collection-mode-grid select {
  width: 100%;
  height: 38px;
  margin-top: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.collection-mode-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.captcha-field-label {
  margin-top: 18px;
}

.captcha-field-label .captcha-input-label {
  margin-top: 0;
}

.captcha-input {
  width: 100%;
  height: 46px;
  margin-top: 7px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 20px;
  font-weight: 720;
  letter-spacing: 0;
}

.dialog-error {
  margin-top: 10px;
  color: var(--coral);
  font-size: 12px;
}

.collection-progress {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.dialog-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.spinner {
  width: 17px;
  height: 17px;
  display: inline-block;
  flex: 0 0 17px;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.spinner.dark {
  border-color: rgba(31, 107, 87, 0.2);
  border-top-color: var(--green);
}

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

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 15px;
  color: #fff;
  background: #27312f;
  border-radius: 6px;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.toast.error {
  background: #9d3f2d;
}

.page-loading {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  background: rgba(245, 247, 246, 0.92);
  font-size: 13px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1400px) and (min-width: 1121px) {
  .chat-shell {
    grid-template-columns: 150px minmax(286px, 310px) minmax(700px, 1fr);
  }

  .chat-conversation-list {
    padding-right: 5px;
    padding-left: 5px;
  }

  .chat-report-body {
    padding-right: 28px;
    padding-left: 28px;
  }
}

@media (max-width: 1120px) {
  .chat-shell {
    grid-template-columns: 144px minmax(270px, 300px) minmax(520px, 1fr);
  }

  .chat-report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-report-scope-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-report-scope-item:nth-child(3) {
    border-left: 0;
  }

  .chat-report-scope-item:nth-child(n + 3) {
    border-top: 1px solid #dde5e1;
  }

  .chat-report-document[data-report-type="brand-ranking-analysis"] .chat-report-comparison-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chat-report-metric:nth-child(2) {
    border-right: 0;
  }

  .chat-report-metric:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .kpi-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-item:nth-child(3) {
    border-right: 0;
  }

  .kpi-item:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .analysis-band {
    grid-template-columns: 1fr;
  }

  .trend-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }

  .framework-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .chat-shell {
    grid-template-columns: 132px minmax(250px, 285px) minmax(500px, 1fr);
  }

  .chat-sidebar-heading {
    padding-right: 8px;
    padding-left: 10px;
  }

  .chat-sidebar-heading > div:first-child span {
    display: none;
  }

  .chat-report-hero-content {
    padding: 28px;
  }

  .chat-report-hero-content h2 {
    font-size: 25px;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .date-control {
    min-width: 0;
    flex: 1 1 auto;
  }

  .date-control > span {
    display: none;
  }

  .date-control select {
    min-width: 0;
    width: 100%;
  }

  .primary-button {
    flex: 0 0 auto;
  }

  .view-tabs {
    padding: 0 8px;
  }

  .primary-view-row {
    height: 40px;
  }

  .category-tabs {
    min-height: 40px;
  }

  .utility-tabs {
    min-height: 45px;
  }

  .chat-launch {
    margin-left: 4px;
  }

  .dashboard-chat-dialog {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .chat-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 132px minmax(0, 1fr);
  }

  .dashboard-chat-dialog.report-focus .chat-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 132px minmax(0, 1fr);
  }

  .dashboard-chat-dialog.report-focus .chat-sidebar {
    display: flex;
  }

  .dashboard-chat-dialog.report-focus .chat-main {
    display: grid;
  }

  .dashboard-chat-dialog.report-focus .chat-report {
    display: none;
  }

  .chat-main,
  .chat-report {
    grid-row: 2;
    grid-column: 1;
  }

  .chat-report {
    display: none;
    border-left: 0;
  }

  .dashboard-chat-dialog.show-report-mobile .chat-main {
    display: none;
  }

  .dashboard-chat-dialog.show-report-mobile .chat-report {
    display: grid;
  }

  .dashboard-chat-dialog.report-focus.show-report-mobile .chat-main {
    display: none;
  }

  .dashboard-chat-dialog.report-focus.show-report-mobile .chat-report {
    display: grid;
  }

  .chat-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat-sidebar-heading {
    min-height: 54px;
    padding: 8px 12px;
  }

  .chat-sidebar-heading > div:first-child {
    flex: 0 0 auto;
  }

  .chat-pane-switch {
    padding: 2px;
    display: inline-flex;
    background: #e8ecea;
    border: 1px solid var(--line);
    border-radius: 5px;
  }

  .chat-pane-switch button {
    height: 28px;
    padding: 0 10px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 650;
  }

  .chat-pane-switch button.active {
    color: var(--green);
    background: var(--surface);
  }

  .chat-sidebar-heading span {
    display: none;
  }

  .chat-conversation-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .chat-conversation-row {
    min-width: 190px;
    flex: 0 0 190px;
  }

  .chat-header {
    min-height: 60px;
    padding: 8px 12px;
  }

  .chat-close-conversation {
    display: inline-grid;
  }

  .chat-messages {
    padding: 18px 14px;
  }

  .chat-empty > strong {
    font-size: 17px;
  }

  .chat-composer {
    margin: 0 12px 12px;
  }

  .chat-report-toolbar {
    min-height: 60px;
    padding: 8px 12px;
  }

  .chat-report-actions .secondary-button {
    display: none;
  }

  .chat-report-focus {
    display: none;
  }

  .chat-report-hero,
  .chat-report-hero-content {
    min-height: 220px;
  }

  .chat-report-hero-content {
    padding: 24px 18px;
  }

  .chat-report-hero-content h2 {
    margin-top: 14px;
    font-size: 23px;
  }

  .chat-report-document[data-report-type="product-commerce-diagnosis"] .chat-report-hero,
  .chat-report-document[data-report-type="product-commerce-diagnosis"] .chat-report-hero-content {
    min-height: 210px;
  }

  .chat-report-hero-content p {
    margin-top: 12px;
    font-size: 12px;
  }

  .chat-report-tags {
    margin-top: 16px;
  }

  .chat-report-metric {
    padding: 13px;
  }

  .chat-report-metric strong {
    font-size: 18px;
  }

  .chat-report-formula {
    padding: 16px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .chat-report-formula > span {
    grid-row: auto;
    padding: 0 0 7px;
    border-right: 0;
    border-bottom: 2px solid #77a99a;
  }

  .chat-report-formula > strong {
    font-size: 16px;
  }

  .chat-report-scope {
    padding: 15px 16px;
  }

  .chat-report-scope-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .chat-report-scope-grid {
    grid-template-columns: 1fr;
  }

  .chat-report-scope-item + .chat-report-scope-item {
    border-top: 1px solid #dde5e1;
    border-left: 0;
  }

  .chat-report-metric small {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
  }

  .chat-report-nav {
    padding: 0 10px;
  }

  .chat-report-body {
    padding: 4px 16px 44px;
  }

  .chat-report-section h3 {
    margin-bottom: 14px;
    font-size: 17px;
  }

  .chat-report-section p,
  .chat-report-list {
    font-size: 14px;
    line-height: 1.78;
  }

  .chat-report-analyst-note {
    margin-top: 14px;
  }

  .chat-report-analyst-note-heading {
    padding: 13px 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .chat-report-analyst-note-heading::after {
    position: absolute;
    right: 16px;
  }

  .chat-report-analyst-note-heading h4 {
    font-size: 16px;
  }

  .chat-report-analyst-body {
    padding: 0 14px 16px;
  }

  .chat-report-analyst-body > p,
  .chat-report-analyst-body > ul,
  .chat-report-analyst-body > ol {
    font-size: 13px;
    line-height: 1.75;
  }

  .chat-report-primary-narrative.lead {
    padding: 17px 16px;
  }

  .chat-report-primary-narrative > p,
  .chat-report-primary-narrative > ul,
  .chat-report-primary-narrative > ol {
    font-size: 14px;
    line-height: 1.82;
  }

  .chat-report-primary-narrative > .markdown-subheading {
    margin-top: 24px;
    font-size: 16px;
  }

  .chat-report-data-appendix-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .chat-report-finding {
    padding: 18px 0;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .chat-report-finding-marker {
    align-items: center;
    flex-direction: row;
  }

  .chat-report-finding-marker > span {
    font-size: 26px;
  }

  .chat-report-finding-evidence {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .chat-report-playbook-flow {
    grid-template-columns: 1fr;
  }

  .chat-report-playbook-step + .chat-report-playbook-step {
    border-top: 1px solid #dce3e0;
    border-left: 0;
  }

  .chat-report-playbook-step + .chat-report-playbook-step::before {
    top: -9px;
    left: 24px;
    content: "⌄";
  }

  .chat-report-video-structure {
    grid-auto-columns: auto;
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .chat-report-video-structure li {
    padding: 12px 10px;
    border-top: 0;
  }

  .chat-report-video-structure li:first-child {
    border-top: 1px solid #dfe5e2;
  }

  .chat-report-video-structure li + li {
    border-left: 0;
  }

  .markdown-table-wrap {
    width: calc(100% + 8px);
    margin-right: -4px;
    margin-left: -4px;
  }

  .markdown-table {
    font-size: 12px;
  }

  .markdown-table th,
  .markdown-table td {
    padding: 8px 9px;
  }

  .chat-report-comparisons {
    grid-template-columns: 1fr;
  }

  .chat-report-document[data-report-type="brand-ranking-analysis"] .chat-report-comparison-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-report-document[data-report-type="brand-ranking-analysis"] .chat-report-comparison-header {
    align-items: flex-start;
  }

  .chat-report-document[data-report-type="brand-ranking-analysis"] .chat-report-comparison-identity {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .chat-report-document[data-report-type="brand-ranking-analysis"] .chat-report-comparison-identity span {
    min-width: 0;
  }

  .chat-report-material {
    grid-template-columns: minmax(0, 1fr) 82px 32px;
    gap: 8px;
  }

  .system-status {
    align-items: flex-start;
    padding: 10px 16px;
  }

  .system-status-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .system-status-copy span {
    overflow: visible;
    white-space: normal;
  }

  main {
    padding-right: 0;
    padding-left: 0;
  }

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

  .kpi-item {
    padding: 18px 16px;
    border-top: 1px solid var(--line);
  }

  .kpi-item:first-child,
  .kpi-item:nth-child(2) {
    border-top: 0;
  }

  .kpi-item:nth-child(even) {
    border-right: 0;
  }

  .kpi-item:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .kpi-item:last-child {
    grid-column: 1 / -1;
  }

  .kpi-item strong {
    font-size: 23px;
  }

  .trend-panel,
  .brand-panel {
    padding: 18px 16px;
  }

  .section-heading {
    flex-direction: column;
  }

  .chart-wrap {
    height: 220px;
  }

  .brand-list {
    grid-template-columns: 1fr;
  }

  .table-heading {
    padding: 16px;
    align-items: stretch;
    flex-direction: column;
  }

  .framework-section {
    padding: 18px 16px;
  }

  .framework-list {
    grid-template-columns: 1fr;
  }

  .table-controls {
    justify-content: flex-start;
  }

  .search-box {
    width: 100%;
  }

  .select-box {
    flex: 1 1 140px;
  }

  .pagination {
    padding: 10px 16px;
  }

  .captcha-row {
    padding: 12px;
    align-items: stretch;
    flex-direction: column;
  }

  .captcha-row img {
    align-self: center;
  }

  .collection-mode-grid {
    grid-template-columns: 1fr;
  }

  .analysis-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .analysis-shell {
    max-height: calc(100vh - 16px);
  }

  .analysis-content {
    padding: 0 16px 20px;
  }

  .fine-analysis-result {
    margin: 0 -16px;
    padding: 18px 16px 22px;
  }

  .product-fields {
    grid-template-columns: 1fr;
  }

  .fine-analysis-heading {
    flex-direction: column;
    gap: 8px;
  }

  .evidence-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .analysis-hero {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
  }

  .analysis-cover {
    width: 92px;
  }

  .analysis-material-title {
    font-size: 15px;
  }

  .analysis-facts,
  .analysis-split {
    grid-template-columns: 1fr;
  }

  .analysis-fact {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .analysis-fact:last-child {
    border-bottom: 0;
  }

  .analysis-split {
    gap: 0;
  }

  .analysis-timeline li {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
  }

  .analysis-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .analysis-actions .primary-button,
  .analysis-actions .secondary-button {
    width: 100%;
  }

  .chat-report-video-card {
    grid-template-columns: 1fr;
  }

  .chat-report-video-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .chat-report-video-body {
    padding: 17px 15px 14px;
  }

  .chat-report-video-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-report-video-metric:nth-child(3) {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid #e5eae8;
  }

  .chat-report-video-metric:nth-child(4) {
    border-top: 1px solid #e5eae8;
  }

  .chat-report-video-insight {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .chat-report-video-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-report-video-actions button {
    flex: 1 1 0;
  }

  .dashboard-chat-dialog.chat-landing .chat-shell,
  .dashboard-chat-dialog.chat-landing.show-chat-history .chat-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 54px minmax(0, 1fr);
  }

  .dashboard-chat-dialog.chat-landing.show-chat-history .chat-shell {
    grid-template-rows: 132px minmax(0, 1fr);
  }

  .dashboard-chat-dialog.chat-landing .chat-sidebar {
    grid-row: 1;
    grid-column: 1;
    min-height: 54px;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-chat-dialog.chat-landing .chat-main {
    grid-row: 2;
    grid-column: 1;
  }

  .dashboard-chat-dialog.chat-landing:not(.show-chat-history) .chat-sidebar-heading {
    height: 54px;
    padding: 7px 10px;
    flex-direction: row;
    justify-content: space-between;
  }

  .dashboard-chat-dialog.chat-landing:not(.show-chat-history) .chat-sidebar-heading > div:first-child {
    width: 36px;
    height: 36px;
  }

  .dashboard-chat-dialog.chat-landing:not(.show-chat-history) .chat-sidebar-tools {
    margin-top: 0;
    flex-direction: row;
  }

  .dashboard-chat-dialog.chat-landing.show-chat-history .chat-sidebar-heading {
    min-height: 54px;
  }

  .dashboard-chat-dialog.chat-landing .chat-header {
    min-height: 48px;
    padding: 7px 12px 0;
  }

  .dashboard-chat-dialog.chat-landing .chat-messages {
    padding: 8px 16px 0;
  }

  .chat-empty-mark {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .chat-empty h2 {
    margin-top: 6px;
    font-size: 25px;
  }

  .chat-empty > p {
    font-size: 12px;
  }

  .chat-mode-tabs {
    width: 100%;
    margin-top: 10px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .chat-mode-tabs button {
    flex: 0 0 auto;
  }

  .dashboard-chat-dialog.chat-landing .chat-composer {
    width: calc(100% - 24px);
    min-height: 112px;
    margin-top: 14px;
    padding: 13px 11px 10px 14px;
  }

  .dashboard-chat-dialog.chat-landing .chat-composer textarea {
    min-height: 78px;
    font-size: 13px;
  }

  .dashboard-chat-dialog.chat-landing .chat-discovery {
    width: calc(100% - 24px);
    margin: 16px auto 30px;
    gap: 22px;
  }

  .chat-discovery-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .dashboard-chat-dialog.chat-landing .chat-suggestions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chat-inspiration-list {
    grid-template-columns: 1fr;
  }

  .chat-inspiration-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .chat-inspiration-media {
    height: 90px;
  }

  .chat-report-trend-card {
    padding: 14px 10px 8px;
  }

  .chat-report-table-chart {
    padding: 14px 10px 8px;
  }

  .chat-report-table-chart-heading {
    flex-direction: column;
    gap: 8px;
  }

  .chat-report-table-chart-legend {
    justify-content: flex-start;
  }

  .chat-report-table-chart-svg {
    height: 260px;
  }

  .chat-report-trend-heading {
    flex-direction: column;
    gap: 8px;
  }

  .chat-report-trend-legend {
    justify-content: flex-start;
  }

  .chat-report-trend-svg {
    height: 210px;
  }

  .chat-report-video-trend {
    grid-template-columns: 1fr;
  }

  .chat-report-video-sparkline {
    width: 100%;
  }

  .chat-report-fine-timeline {
    grid-template-columns: 1fr;
  }

  .chat-report-fine-timeline li + li {
    border-top: 1px solid #dfe6e3;
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .field-guide-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .field-guide-shell {
    max-height: calc(100vh - 16px);
  }

  .field-guide-shell > .dialog-header,
  .field-guide-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .field-guide-grid {
    grid-template-columns: 1fr;
  }

  .field-help-popover {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
