:root {
  /* ── Modern Clean White Tech Canvas ── */
  --bg: #F8FAFC;
  --bg-canvas: #F8FAFC;
  --panel: #FFFFFF;
  --panel-soft: #F8FAFC;
  --panel-elevated: #FFFFFF;
  --panel-hover: #F1F5F9;
  
  --ink: #0F172A;
  --ink-strong: #020617;
  --muted: #475569;
  --subtle: #94A3B8;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --line-soft: rgba(226, 232, 240, 0.75);
  
  /* ── Friendly & Vibrant High-Tech Accents ── */
  --primary: #0284C7;
  --primary-hover: #0369A1;
  --primary-light: #F0F9FF;
  --primary-glow: rgba(2, 132, 199, 0.18);
  --primary-grad: linear-gradient(135deg, #0284C7 0%, #059669 100%);
  
  --emerald: #10B981;
  --emerald-dark: #059669;
  --emerald-light: #ECFDF5;
  --emerald-border: #A7F3D0;
  
  --indigo: #6366F1;
  --indigo-dark: #4338CA;
  --indigo-light: #EEF2FF;
  --indigo-border: #C7D2FE;
  
  --amber: #F59E0B;
  --amber-dark: #D97706;
  --amber-light: #FFFBEB;
  --amber-border: #FDE68A;
  
  --rose: #F43F5E;
  --rose-dark: #E11D48;
  --rose-light: #FFF1F2;
  --rose-border: #FECDD3;

  --cyan: #06B6D4;
  --cyan-light: #ECFEFF;

  /* ── Multi-Layer Soft Ambient Shadows ── */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.02);
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 12px 30px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.09);
  --shadow-spotlight: 0 12px 36px -6px rgba(2, 132, 199, 0.10), 0 4px 12px -2px rgba(15, 23, 42, 0.03);

  /* ── Friendly Smooth Radii ── */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-main: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--ink);
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(at 0% 0%, rgba(2, 132, 199, 0.05) 0px, transparent 45%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 45%),
    radial-gradient(rgba(148, 163, 184, 0.15) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  cursor: pointer;
}

/* ── Shell & Modern Studio Sidebar ── */
.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 20px;
  border-right: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  z-index: 10;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.02);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--primary-grad);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.28);
  transition: transform 0.2s var(--ease-spring);
}

.brand-mark:hover {
  transform: rotate(5deg) scale(1.05);
}

.brand strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
}

.brand span {
  display: block;
  margin-top: 2px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  min-height: 44px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s var(--ease-spring);
}

.nav-item:hover {
  color: var(--ink);
  background: var(--panel-hover);
  transform: translateX(2px);
}

.nav-item.active {
  color: #0369A1;
  background: linear-gradient(135deg, #F0F9FF 0%, #ECFDF5 100%);
  border-color: rgba(2, 132, 199, 0.2);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.06);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: inherit;
}

.nav-item small {
  color: #475569;
  background: #E2E8F0;
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
}

.profile-box {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.profile-box:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.profile-box strong {
  display: block;
  margin: 6px 0 3px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-strong);
}

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

/* ── Workspace ── */
.workspace {
  min-width: 0;
  padding: 32px 40px 60px;
}

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

.eyebrow {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink-strong);
}

h2 {
  margin-bottom: 0;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--ink-strong);
}

h3 {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
}

.topbar p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-full);
  color: var(--muted);
  background: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.status-pill:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  display: inline-block;
  flex-shrink: 0;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.75; }
}

.ghost-btn, .primary-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s var(--ease-spring);
}

.ghost-btn {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #FFFFFF;
  box-shadow: var(--shadow-xs);
}

.ghost-btn:hover {
  background: var(--panel-hover);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.ghost-btn:active {
  transform: scale(0.98);
}

.primary-btn {
  border: none;
  color: #ffffff;
  background: var(--primary-grad);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.38);
}

.primary-btn:active {
  transform: scale(0.98);
}

/* ── Tab Panels ── */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

/* ── Studio Command Omnibar (Centerpiece Card) ── */
.tool-panel {
  padding: 26px 28px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
}

.tool-panel:hover {
  box-shadow: var(--shadow-spotlight);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  color: #0369A1;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Spotlight Search Box */
.omnibar-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: #F8FAFC;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: all 0.25s var(--ease-spring);
}

.omnibar-search-box:focus-within {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow), var(--shadow-sm);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  padding-left: 8px;
}

.search-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.search-input-wrapper input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 15.5px;
  font-weight: 550;
  color: var(--ink-strong);
  outline: none;
}

.search-input-wrapper input::placeholder {
  color: var(--subtle);
  font-weight: 450;
}

.omnibar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.compact-select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.compact-select:hover {
  border-color: var(--line-strong);
  background: var(--panel-hover);
}

.compact-select.highlight-select {
  background: #F0FDF4;
  border-color: #A7F3D0;
  color: #047857;
}

.omnibar-btn {
  height: 42px;
  padding: 0 20px;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

/* Suggestion Chips & Meta Row */
.omnibar-meta-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-right: 4px;
}

.quick-chip {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: #F8FAFC;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
  transition: all 0.2s var(--ease-spring);
}

.quick-chip:hover {
  border-color: #38BDF8;
  color: #0284C7;
  background: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

/* Action Subbuttons Row */
.action-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.action-subbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--muted);
  transition: all 0.2s var(--ease-spring);
  box-shadow: var(--shadow-xs);
}

.action-subbtn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.action-subbtn.purple {
  background: #EEF2FF;
  border-color: #C7D2FE;
  color: #4338CA;
}

.action-subbtn.purple:hover {
  background: #E0E7FF;
  color: #3730A3;
}

.action-subbtn.teal {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #047857;
}

.action-subbtn.teal:hover {
  background: #D1FAE5;
  color: #065F46;
}

.action-subbtn.amber {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #B45309;
}

.action-subbtn.amber:hover {
  background: #FEF3C7;
  color: #92400E;
}

/* Foldable Secondary Parameters */
.secondary-params-toggle {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.secondary-params-toggle summary {
  cursor: pointer;
  font-weight: 600;
  user-select: none;
  color: #0284C7;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.secondary-params-toggle summary:hover {
  color: #0369A1;
}

.compact-params-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  background: #F8FAFC;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.compact-params-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.compact-params-grid input, .compact-params-grid select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: #FFFFFF;
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
}

.compact-params-grid input:focus, .compact-params-grid select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* ── Signal Panel (Nguồn dữ liệu thị trường) ── */
.signal-panel {
  display: grid;
  gap: 16px;
}

.signal-card {
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card-head-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.engine-mode-label {
  display: block;
  font-size: 11px;
  color: var(--subtle);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

.engine-status-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 12.5px;
}

.source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  border: 1px solid var(--line-soft);
  transition: all 0.2s var(--ease-spring);
}

.source-row:hover {
  background: #FFFFFF;
  border-color: var(--line-strong);
  transform: translateX(2px);
  box-shadow: var(--shadow-xs);
}

.source-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.source-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-strong);
}

.source-status-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.source-status-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.source-status-tag.ok {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.source-status-tag.config, .source-status-tag.warn {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.source-status-tag.off {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #CBD5E1;
}

.source-latency {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #0284C7;
  background: #F0F9FF;
  padding: 2px 6px;
  border-radius: 4px;
}

.engine-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}

.engine-dot.config {
  background: var(--amber);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.engine-dot.unavailable, .engine-dot.off {
  background: var(--subtle);
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.metric-strip > div:nth-child(1) {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-sm);
  padding: 8px 4px;
}
.metric-strip > div:nth-child(1) strong { color: #047857; }

.metric-strip > div:nth-child(2) {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 8px 4px;
}
.metric-strip > div:nth-child(2) strong { color: #B45309; }

.metric-strip > div:nth-child(3) {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 8px 4px;
}
.metric-strip > div:nth-child(3) strong { color: #475569; }

.metric-strip strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
}

.metric-strip span {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 600;
}

/* ── Snapshot History Shelf (Gallery View) ── */
.snapshot-shelf-wrapper {
  margin-top: 28px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  padding: 22px 26px;
  box-shadow: var(--shadow);
}

.shelf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.shelf-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shelf-title-group svg {
  color: var(--primary);
}

.shelf-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
}

.snapshot-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  padding-bottom: 4px;
}

.snapshot-card {
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-xs);
  position: relative;
}

.snapshot-card:hover {
  border-color: #38BDF8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.snapshot-card.active {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow);
}

.snapshot-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.snapshot-card strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.snapshot-conf-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.snapshot-conf-badge.tag-emerald {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.snapshot-conf-badge.tag-sky {
  background: #F0F9FF;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}

.snapshot-conf-badge.tag-amber {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.snapshot-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--subtle);
}

.snapshot-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.snapshot-evidence-badge {
  font-family: var(--font-mono);
  background: #F1F5F9;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 10.5px;
}

/* Env Badge */
.env-badge {
  background: #F8FAFC;
  border-color: var(--line);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.env-badge.production {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #047857;
}

.env-badge.demo {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

.env-badge.local {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #475569;
}

/* Low Confidence Prominent Banner */
.low-confidence-banner {
  padding: 16px 20px;
  border-radius: var(--radius);
  background: #FEF2F2;
  border: 1px solid #FECDD3;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  color: #991B1B;
  font-size: 13px;
  line-height: 1.5;
}

.low-confidence-banner.hidden {
  display: none;
}

.warnings-strip {
  padding: 14px 18px;
  border-radius: var(--radius);
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  font-size: 12.5px;
  line-height: 1.45;
}

/* ── Top Executive Metric Ribbon (Floating KPI Cards) ── */
.kpi-metric-ribbon {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.kpi-ribbon-item {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.2s var(--ease-spring);
}

.kpi-ribbon-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.kpi-ribbon-item:nth-child(1)::before { background: #10B981; }
.kpi-ribbon-item:nth-child(2)::before { background: #0284C7; }
.kpi-ribbon-item:nth-child(3)::before { background: #6366F1; }
.kpi-ribbon-item:nth-child(4)::before { background: #F59E0B; }
.kpi-ribbon-item:nth-child(5)::before { background: #F43F5E; }

.kpi-ribbon-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--subtle);
  letter-spacing: 0.06em;
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--ink-strong);
}

.kpi-sub {
  font-size: 11px;
  color: var(--subtle);
  font-weight: 500;
}

.kpi-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: #F0FDF4;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.text-teal { color: #0284C7; }
.text-slate { color: var(--ink-strong); }
.text-emerald { color: #059669; }
.text-indigo { color: #4F46E5; }
.text-amber { color: #D97706; }

/* ── Modern Tabs Navigation (Segmented Control) ── */
.tabs-line {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px;
  background: #F1F5F9;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.subtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.2s var(--ease-spring);
}

.subtab svg {
  color: inherit;
  flex-shrink: 0;
}

.subtab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.subtab.active {
  color: var(--ink-strong);
  background: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.result-tab {
  display: none;
}

.result-tab.active {
  display: block;
}

/* ── All-in-One Overview Layout ── */
.all-in-one-container {
  display: grid;
  gap: 20px;
}

.overview-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.overview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.overview-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.tag-accent {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(15, 118, 110, 0.2);
}

/* ── Strategic Decision Pipeline ── */
.decision-pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.pipeline-step {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
  transition: all 0.15s ease-in-out;
}

.pipeline-step:hover {
  background: #ffffff;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.step-fact { border-top: 3px solid var(--primary); }
.step-signal { border-top: 3px solid var(--indigo); }
.step-inference { border-top: 3px solid var(--amber); }
.step-action { border-top: 3px solid var(--emerald); }

.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--subtle);
}

.step-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.badge-teal { color: var(--primary); }
.badge-indigo { color: var(--indigo); }
.badge-amber { color: var(--amber); }
.badge-emerald { color: var(--emerald); }

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

.pipeline-arrow {
  color: var(--subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bento Grid */
.all-in-one-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* ── Keyword & Question Styling ── */
.keyword-list-clean {
  display: flex;
  flex-direction: column;
}

.keyword-item-clean {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.keyword-item-clean:last-child {
  border-bottom: none;
}

.keyword-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.intent-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.intent-transactional {
  background: var(--emerald-light);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.intent-commercial {
  background: var(--cyan-light);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.intent-informational {
  background: var(--indigo-light);
  color: #3730a3;
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.intent-navigational {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--line);
}

.question-list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.question-item-clean {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}

.question-item-clean:last-child {
  border-bottom: none;
}

.changes-list-clean {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.change-item-clean {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.change-tag {
  align-self: flex-start;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: #e2e8f0;
  color: var(--muted);
}

.change-tag.new_offer {
  background: var(--emerald-light);
  color: #065f46;
}

.change-tag.price_change {
  background: var(--amber-light);
  color: #92400e;
}

/* ── Tables & Common Cards ── */
.table-responsive {
  overflow-x: auto;
}

.intent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.intent-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  background: var(--panel-soft);
}

.intent-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.intent-table tr:hover td {
  background: var(--panel-soft);
}

.why-cell {
  font-size: 12px;
  color: var(--muted);
}

/* Decision Grid (Tab 2) */
.decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.decision-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.decision-card strong {
  font-size: 14px;
  font-weight: 700;
}

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

/* Keyword & Questions Grid */
.keyword-grid, .question-grid {
  display: grid;
  gap: 16px;
}

.cluster-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.cluster-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.cluster-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.source-results, .video-grid, .facebook-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.source-card, .video-card, .facebook-card {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease-in-out;
}

.source-card:hover, .video-card:hover, .facebook-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.source-card a, .video-card a, .facebook-card a {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.source-card a:hover {
  color: var(--primary);
}

.source-card p, .video-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--panel-soft);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease-in-out;
  pointer-events: none;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Inline Forms (Search, Reader, YouTube, Facebook tabs) ── */
.inline-form {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.inline-form input {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.inline-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.inline-form select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

/* ── Helper text ── */
.helper-text {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
}

.empty-cell {
  padding: 22px !important;
  color: var(--muted) !important;
  text-align: center;
}

/* ── Channels List ── */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.channel-card {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.channel-card.ok { border-left: 4px solid var(--emerald); }
.channel-card.warn { border-left: 4px solid var(--amber); }
.channel-card.off { border-left: 4px solid #94a3b8; }

.channel-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
}

.channel-card p {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}

/* Segmented Buttons */
.segmented {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  border: 1px solid var(--line);
}

.filter {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

.filter.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: static;
  }
  .brief-grid {
    grid-template-columns: 1fr;
  }
  .kpi-metric-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
  .decision-pipeline {
    grid-template-columns: 1fr;
  }
  .pipeline-arrow {
    transform: rotate(90deg);
  }
  .all-in-one-grid {
    grid-template-columns: 1fr;
  }
}

/* ── High-End Markdown Report Styling ── */
.markdown-body {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.7;
  font-size: 14.5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.markdown-body h1 {
  font-size: 23px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-top: 0;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-soft);
}

.markdown-body h2 {
  font-size: 17.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-top: 32px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.markdown-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 22px;
  margin-bottom: 10px;
}

.markdown-body p {
  margin: 10px 0;
  color: var(--ink);
}

.markdown-body blockquote {
  margin: 16px 0;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.05), rgba(2, 132, 199, 0.03));
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
  font-size: 14px;
}

.markdown-body blockquote p {
  margin: 4px 0;
}

.markdown-body table {
  width: 100%;
  margin: 20px 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}

.markdown-body table th {
  background: #f8fafc;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.markdown-body table td {
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
  vertical-align: top;
}

.markdown-body table tr:last-child td {
  border-bottom: none;
}

.markdown-body table tr:nth-child(even) td {
  background: #fafbfc;
}

.markdown-body table tr:hover td {
  background: rgba(15, 118, 110, 0.03);
}

.markdown-body table strong {
  color: var(--ink);
  font-weight: 700;
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 2px 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #0f766e;
}

.markdown-body pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 16px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 16px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.markdown-body pre code {
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
}

.markdown-body ul, .markdown-body ol {
  padding-left: 22px;
  margin: 12px 0;
}

.markdown-body li {
  margin-bottom: 6px;
  color: var(--ink);
}

.markdown-body hr {
  border: none;
  border-top: 1px dashed var(--line);
  margin: 28px 0;
}

.markdown-body a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.markdown-body a:hover {
  color: var(--primary-strong);
}

/* ── Question Clusters & Pills ── */
.question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.question-cluster-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s var(--ease-spring);
}

.question-cluster-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}

.question-cluster-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}

.question-cluster-head h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 750;
  color: var(--ink-strong);
}

.question-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-pill {
  padding: 8px 12px;
  background: #F8FAFC;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
}

.question-pill:hover {
  background: #FFFFFF;
  border-color: #38BDF8;
  transform: translateX(2px);
  box-shadow: var(--shadow-xs);
}

.q-mark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #E0F2FE;
  color: #0284C7;
  font-size: 11.5px;
  font-weight: 800;
}

/* ── Competitor Changes & Evidence ── */
.competitor-changes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.competitor-change-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--emerald);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s var(--ease-spring);
}

.competitor-change-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.competitor-change-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.competitor-change-card h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 750;
  color: var(--ink-strong);
}

.change-type-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.change-diff {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.change-before {
  color: var(--subtle);
  text-decoration: line-through;
}

/* ── All-in-One Bento Cards ── */
.aio-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--ease-spring);
}

.aio-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}

.aio-card h3 {
  margin: 0 0 12px;
  font-size: 14.5px;
  font-weight: 750;
  color: var(--ink-strong);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}

.aio-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

.aio-list li.muted-text {
  list-style: none;
  margin-left: -20px;
  color: var(--subtle);
}

.aio-actions li::marker {
  color: var(--primary);
}

/* ── Keywords: Google Trends & Search Intent ── */
.keyword-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.trends-related-card,
.keyword-intent-card {
  grid-column: 1 / -1;
}

.trends-related-card,
.keyword-card {
  padding: 22px 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--ease-spring);
}

.trends-related-card:hover,
.keyword-card:hover {
  box-shadow: var(--shadow-hover);
}

.trends-related-card.trends-empty {
  background: #F8FAFC;
  border-style: dashed;
}

.trends-card-head,
.keyword-intent-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}

.trends-card-head h3,
.keyword-intent-head h3,
.keyword-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  color: var(--ink-strong);
}

.trends-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

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

.trend-table-title {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}

.trend-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 90px 60px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
}

.trend-row > span {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 12px;
}

.trend-row strong {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.trend-row i {
  position: relative;
  height: 6px;
  border-radius: var(--radius-full);
  background: #E2E8F0;
  overflow: hidden;
}

.trend-row i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar, 0%);
  border-radius: inherit;
  background: var(--primary-grad);
}

.trend-row em {
  font-style: normal;
  text-align: right;
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
}

.keyword-card .keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.keyword-card .keyword-list span:not(.muted-text) {
  padding: 5px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-full);
  background: #F8FAFC;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink);
  transition: all 0.15s ease;
}

.keyword-card .keyword-list span:not(.muted-text):hover {
  background: #FFFFFF;
  border-color: #38BDF8;
  color: #0284C7;
  transform: translateY(-1px);
}

.intent-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intent-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: #F8FAFC;
  font-size: 12.5px;
}

.intent-chip strong {
  font-weight: 600;
  color: var(--ink-strong);
}

.intent-chip small {
  font-size: 10.5px;
  opacity: 0.8;
}

.intent-question {
  background: #F0F9FF;
  border-color: #BAE6FD;
  color: #0369A1;
}

.intent-local {
  background: #FFF7ED;
  border-color: #FED7AA;
  color: #C2410C;
}
