/* Report-only layout. Existing source adapters, calculations and form stay intact. */
.keyword-report-v2 .keyword-section-insight { flex: 1 0 100%; width: 100%; min-width: 0; box-sizing: border-box; padding: 24px; border: 0; border-top: 1px solid #e8e2f0; border-radius: 0; background: #f7f5fb; color: #3e3b4e; }
.keyword-insight-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 16px; }
.keyword-insight-heading h4 { font-size: 15px; color: #58358b; margin: 0; }
.keyword-insight-heading span { font-size: 12px; color: #655b72; }
.keyword-report-v2 .keyword-insight-toggle { margin-left: auto; padding: 6px 8px; min-height: 36px; background: transparent; border: 0; border-radius: 6px; font-size: 12px; color: #58358b; cursor: pointer; }
.keyword-insight-body { display: flex; flex-direction: column; gap: 12px; }
.keyword-insight-body[hidden] { display: none; }
.keyword-insight-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.keyword-insight-row h5 { font-size: 13px; line-height: 1.8; color: #665579; margin: 0; font-weight: 600; }
.keyword-report-v2 .keyword-insight-row p { max-width: 75ch; margin: 0; font-size: 14px; line-height: 1.9; color: #3e3b4e; overflow-wrap: anywhere; }
.keyword-report-v2 .keyword-insight-caveat, .keyword-report-v2 .keyword-insight-source, .keyword-report-v2 .keyword-insight-status { font-size: 12px; line-height: 1.8; color: #645b75; margin: 0; max-width: 85ch; overflow-wrap: anywhere; }
.keyword-report-v2 .research-product-summary:has(.keyword-section-insight) { padding-bottom: 0; }
.keyword-report-v2 .research-product-summary > .keyword-section-insight, .keyword-report-v2 .keyword-codex-conclusion > .keyword-section-insight { flex-basis: calc(100% + 48px); width: calc(100% + 48px); margin: 0 -24px; }
@media (max-width: 1100px) {
  .keyword-report-v2 { grid-template-columns: minmax(0, 1fr) !important; }
  .keyword-report-v2 .research-view-tabs { position: relative !important; top: auto !important; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; max-height: none; }
  .keyword-report-v2 .research-view-tabs button { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 600px) {
  .keyword-report-v2 .keyword-section-insight { padding: 16px; }
  .keyword-insight-row { display: block; }
  .keyword-insight-row h5 { margin-bottom: 4px; }
  .keyword-report-v2 .keyword-insight-row p { font-size: 13px; }
}
.keyword-report-v2 {
  --report-ink: #202334;
  --report-muted: #555b70;
  --report-line: #e2e3eb;
  --report-purple: #6941c6;
  --report-surface: #f5f4fa;
  width: 100%; max-width: 1560px; margin: 24px auto; left: auto; transform: none;
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; color: var(--report-ink);
  container-type: inline-size;
}
.keyword-report-v2[hidden], .report-assistant[hidden], .report-assistant [hidden] { display: none; }
.keyword-report-body { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.keyword-report-body > * { min-width: 0; scroll-margin-top: 100px; }
.keyword-report-v2 > *, .keyword-report-v2 .research-dashboard-split > * { min-width: 0; scroll-margin-top: 144px; }
.keyword-report-v2 .research-view-tabs {
  position: sticky; top: 92px; z-index: 10; display: flex; flex-direction: column; align-self: start;
  gap: 4px; padding: 0; background: transparent; border: 0; border-radius: 0; max-height: calc(100vh - 112px); overflow: auto;
}
.keyword-report-v2 .research-view-tabs button { min-height: 44px; padding: 8px 12px; font-size: 14px; border-radius: 8px; text-align: left; }
.keyword-report-v2 .research-view-tabs .is-active { background: #eee9fa; color: #5733a3; box-shadow: none; }
.keyword-report-v2 .research-task-status { border-radius: 12px; }
.keyword-report-v2 .keyword-data-notice { margin: 0; font-size: 13px; color: var(--report-muted); }
.keyword-report-v2 .research-product-summary, .keyword-report-v2 .research-product-summary.has-no-image { display: flex; flex-direction: row; flex-wrap: wrap; padding: 24px; gap: 16px; border-radius: 12px; }
.keyword-report-v2 .research-product-summary > :not(.keyword-question-entry) { min-width: 0; }
.keyword-report-v2 .keyword-product-overview { flex: 1 1 400px; }
.keyword-report-v2 .research-product-summary-body { flex: 1 1 320px; }
.keyword-report-v2 .keyword-product-category { flex: 0 1 200px; }
.keyword-report-v2 .keyword-product-metrics { flex: 1 1 420px; }
.keyword-report-v2 .keyword-codex-conclusion {
  display: flex; flex-direction: row; flex-wrap: wrap; gap: 24px; padding: 24px 24px 0;
  background: #f3effb; color: var(--report-ink); border: 1px solid #e3daf4; border-radius: 12px;
}
.keyword-report-v2 .keyword-codex-conclusion-copy { flex: 1 1 420px; }
.keyword-report-v2 .keyword-codex-conclusion-copy > span { color: #604587; font-size: 13px; margin-bottom: 12px; }
.keyword-report-v2 .keyword-codex-conclusion h2 { color: #302148; font-size: 24px; max-width: 40ch; line-height: 1.5; }
.keyword-report-v2 .keyword-codex-conclusion p { max-width: 72ch; color: #544866; font-size: 15px; line-height: 1.8; margin-top: 12px; }
.keyword-report-v2 .keyword-codex-score { flex: 0 0 auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 0; border: 0; background: transparent; width: auto; }
.keyword-report-v2 .keyword-codex-score strong { color: #5832a7; font-size: 24px; }
.keyword-report-v2 .keyword-codex-score span, .keyword-report-v2 .keyword-codex-score small { color: #604587; font-size: 13px; margin: 0; }
.keyword-report-v2 .keyword-codex-score small { display: none; }
.keyword-report-v2 .keyword-section-heading, .keyword-report-v2 .chart-header { padding: 24px 24px 16px; gap: 16px; flex-wrap: wrap; }
.keyword-report-v2 h3 { font-size: 18px; line-height: 1.5; color: var(--report-ink); text-wrap: balance; }
.keyword-report-v2 .keyword-section-heading p, .keyword-report-v2 .chart-header p { font-size: 13px; color: var(--report-muted); line-height: 1.7; }
.keyword-report-v2 .keyword-traffic-section, .keyword-report-v2 .keyword-ai-interpretation,
.keyword-report-v2 .table-card, .keyword-report-v2 .keyword-priority-section,
.keyword-report-v2 .keyword-narrative-section, .keyword-report-v2 .keyword-quality-section { border: 1px solid var(--report-line); border-radius: 12px; background: #fff; box-shadow: none; overflow: visible; }
.keyword-report-v2 .research-summary-grid { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--report-line); border-radius: 12px; background: white; }
.keyword-report-v2 .research-summary-grid > :not(.keyword-question-entry):not(.keyword-section-insight) { flex: 1 1 160px; min-height: auto; padding: 16px 24px; border: 0; box-shadow: none; border-radius: 0; }
.keyword-report-v2 .research-summary-grid small { color: var(--report-muted); font-size: 12px; }
.keyword-report-v2 .research-dashboard-split { display: flex; flex-direction: column; gap: 24px; }
.keyword-report-v2 .keyword-traffic-layout { padding: 0 24px 24px; gap: 24px; }
.keyword-report-v2 .keyword-traffic-layout > * { min-height: auto; }
.keyword-report-v2 .research-chart-stage { padding: 0 16px; }
.keyword-report-v2 .research-chart-empty { margin: 0 24px 16px; padding: 12px 16px; line-height: 1.7; font-size: 13px; }
.keyword-report-v2 .research-insight-list { min-height: 0; padding: 0 24px 16px; }
.keyword-report-v2 .research-insight-list strong { font-size: 14px; }
.keyword-report-v2 .research-insight-list small { font-size: 12px; color: var(--report-muted); }
.keyword-report-v2 .keyword-ai-body { padding: 0 24px 24px; }
.keyword-report-v2 .keyword-ai-conclusion { display: block; }
.keyword-report-v2 .keyword-ai-conclusion p { font-size: 14px; max-width: 72ch; line-height: 1.8; }
.keyword-report-v2 .keyword-ai-score { display: none; }
.keyword-report-v2 .keyword-ai-dimensions { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.keyword-report-v2 .keyword-ai-dimension { flex: 1 1 180px; border: 0; padding: 0; }
.keyword-report-v2 .keyword-ai-dimension p { white-space: normal; overflow: visible; color: var(--report-muted); font-size: 13px; line-height: 1.7; }
.keyword-report-v2 .keyword-ai-method { margin-top: 24px; }
.keyword-report-v2 .keyword-ai-method summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.keyword-report-v2 .keyword-ai-method p { max-width: 72ch; font-size: 13px; color: var(--report-muted); }
.keyword-narrative-body { padding: 0 24px 24px; color: #34374a; font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; }
.keyword-narrative-body > p, .keyword-narrative-body > ul, .keyword-narrative-body > ol, .keyword-narrative-body > blockquote { max-width: 72ch; }
.keyword-narrative-body h1, .keyword-narrative-body h2 { font-size: 20px; margin: 32px 0 16px; line-height: 1.5; }
.keyword-narrative-body h3, .keyword-narrative-body h4 { font-size: 17px; margin: 24px 0 12px; }
.keyword-narrative-body > :first-child { margin-top: 0; }
.keyword-narrative-body li + li { margin-top: 8px; }
.keyword-narrative-body a { color: #603bb6; text-decoration: underline; text-underline-offset: 3px; }
.keyword-narrative-body code { white-space: normal; overflow-wrap: anywhere; background: #f2f1f7; color: #443463; padding: 2px 4px; border-radius: 4px; }
.keyword-narrative-body pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.keyword-narrative-body .analysis-markdown-table-wrap { max-width: 100%; overflow-x: auto; }
.keyword-narrative-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.keyword-narrative-body th, .keyword-narrative-body td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--report-line); }
.keyword-narrative-body th { background: var(--report-surface); }
.keyword-report-v2 .keyword-priority-grid { display: block; padding: 0 24px 16px; }
.keyword-report-v2 .keyword-priority-card { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(280px, 2fr); gap: 12px 24px; padding: 16px 0; border: 0; border-bottom: 1px solid var(--report-line); border-radius: 0; background: transparent; }
.keyword-report-v2 .keyword-priority-heading { align-items: center; }
.keyword-report-v2 .keyword-priority-heading strong { font-size: 14px; }
.keyword-report-v2 .keyword-priority-metrics { margin: 0; gap: 12px; }
.keyword-report-v2 .keyword-priority-metrics small, .keyword-report-v2 .keyword-priority-metrics strong { font-size: 12px; color: #4e5669; }
.keyword-report-v2 .keyword-priority-card .research-tags { margin: 0; }
.keyword-report-v2 .keyword-priority-card > p { margin: 0; font-size: 13px; color: var(--report-muted); }
.keyword-report-v2 .research-toolbar { padding: 24px; gap: 16px; flex-wrap: wrap; }
.keyword-report-v2 .research-toolbar-controls { gap: 8px; flex-wrap: wrap; }
.keyword-report-v2 .research-toolbar-controls .form-input, .keyword-report-v2 .research-toolbar-controls .form-select { min-height: 44px; font-size: 13px; }
.keyword-column-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; color: #51566a; }
.keyword-report-v2:not(.keyword-show-all-columns) .keyword-wide-data-table :is(th, td):is(:nth-child(3),:nth-child(4),:nth-child(6),:nth-child(9),:nth-child(10),:nth-child(12),:nth-child(14),:nth-child(15),:nth-child(16),:nth-child(17),:nth-child(19),:nth-child(20),:nth-child(21),:nth-child(22),:nth-child(23),:nth-child(24),:nth-child(26)) { display: none; }
.keyword-report-v2:not(.keyword-show-all-columns) .keyword-wide-data-table { min-width: 1080px; }
.keyword-report-v2 .keyword-root-wide .research-list { padding: 0 24px 24px; }
.keyword-report-v2 #keyword-report-evidence { padding: 24px; }
.keyword-report-v2 #keyword-report-evidence p { font-size: 14px; line-height: 1.8; color: var(--report-muted); max-width: 72ch; }
.keyword-report-v2 #keywordCompleteness { display: block; margin: 0; padding: 24px 24px 0; border: 0; background: transparent; }
.keyword-report-v2 #keywordCompleteness span { display: block; margin-top: 8px; font-size: 13px; }
.keyword-question-entry { flex: 1 0 100%; grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; border-top: 1px solid var(--report-line, #e2e3eb); padding: 12px 24px; margin: 0; }
.keyword-report-v2 .keyword-codex-conclusion > .keyword-question-entry { margin: 0 -24px; }
.keyword-report-v2 .research-product-summary > .keyword-question-entry { margin: 0; padding: 12px 0 0; }
.keyword-question-entry button { border: 0; background: transparent; border-radius: 8px; min-height: 44px; cursor: pointer; line-height: 1.5; text-align: left; }
.keyword-question-open { color: #6034b2; font-size: 14px; font-weight: 650; padding: 8px 12px; }
.keyword-question-open::before { content: '✦'; margin-right: 8px; }
.keyword-question-suggestion { color: #555b70; font-size: 13px; padding: 8px 0; }
.keyword-question-entry button:hover { background: #f1edf9; }
.keyword-report-v2 :focus-visible, .report-assistant :focus-visible { outline: 2px solid #7445c6; outline-offset: 3px; }

.report-assistant { --assistant-line: #e4e2ed; position: fixed; top: 80px; right: 16px; bottom: 16px; z-index: 40; width: 408px; display: flex; flex-direction: column; border: 1px solid var(--assistant-line); border-radius: 16px; background: #fff; color: #282539; font: 14px/1.7 system-ui, sans-serif; }
.report-assistant-header { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; }
.report-assistant-header h2 { font-size: 18px; margin: 0; }
.report-assistant-header p { margin: 4px 0 0; font-size: 12px; color: #625c71; }
.report-assistant-header button { align-self: flex-start; width: 44px; height: 44px; border: 0; background: #f4f2f8; border-radius: 8px; color: #49415b; font-size: 24px; cursor: pointer; }
.report-assistant-scope { padding: 0 24px 16px; border-bottom: 1px solid var(--assistant-line); }
.report-assistant-scope > p { font-size: 12px; color: #625c71; margin: 4px 0 8px; overflow-wrap: anywhere; }
.report-assistant-scope label { display: block; font-size: 12px; margin-bottom: 4px; color: #625c71; }
.report-assistant select { max-width: 100%; border: 1px solid #cdc8dc; border-radius: 8px; background: #fff; color: #363044; min-height: 44px; padding: 8px 12px; font-size: 13px; }
.report-assistant-scope select { width: 100%; }
.report-assistant-thread { flex: 1; overflow-y: auto; min-height: 80px; padding: 16px 24px; overscroll-behavior: contain; }
.report-assistant-empty { padding: 16px 0; }
.report-assistant-empty h3 { font-size: 16px; margin: 0 0 8px; }
.report-assistant-empty p { font-size: 13px; color: #625c71; }
.report-message { margin-bottom: 24px; overflow-wrap: anywhere; }
.report-message > strong { font-size: 12px; color: #65577b; }
.report-message.is-user > p { background: #f3f0f9; border-radius: 12px; padding: 12px 16px; margin: 8px 0; }
.report-message .analysis-markdown-body { padding: 8px 0; line-height: 1.85; }
.report-message h1, .report-message h2, .report-message h3 { font-size: 15px; line-height: 1.5; }
.report-message p { margin: 0 0 12px; }
.report-message small { color: #665f75; font-size: 11px; }
.report-message .analysis-markdown-table-wrap { overflow-x: auto; }
.report-message table { border-collapse: collapse; font-size: 12px; }
.report-message td, .report-message th { padding: 8px; border: 1px solid #dedbe5; }
.report-message pre { white-space: pre-wrap; }
.report-assistant-compose { padding: 16px 24px; border-top: 1px solid var(--assistant-line); }
.report-assistant-compose > label { display: block; font-size: 12px; margin-bottom: 8px; }
.report-assistant textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #cdc8dc; border-radius: 12px; resize: vertical; max-height: 160px; font: inherit; line-height: 1.6; }
.report-assistant textarea::placeholder { color: #696174; }
.report-assistant-controls { display: flex; gap: 8px; margin-top: 8px; }
.report-assistant-controls select { flex: 1; min-width: 0; }
.report-assistant-controls button { min-height: 44px; border-radius: 8px; padding: 8px 16px; }
.report-assistant button:disabled { opacity: .6; cursor: not-allowed; }
.report-assistant #reportAssistantPrice { color: #594173; font-size: 12px; margin: 8px 0 0; }
.report-assistant-compose small { display: block; font-size: 11px; color: #665f75; line-height: 1.6; margin-top: 8px; }
.report-assistant [data-assistant-status] { font-size: 12px; color: #605473; }
.report-assistant .is-error { color: #a73326; }
.report-assistant-older { display: block; margin: 0 auto 16px; min-height: 44px; color: #6740a7; background: transparent; border: 0; cursor: pointer; }
@media (min-width: 1280px) { .report-assistant-open main.research-dashboard-page { margin-right: 440px; width: auto; } }
@container (max-width: 960px) { .keyword-report-v2 .research-dashboard-split { grid-template-columns: 1fr; } .keyword-report-v2 .keyword-priority-card { grid-template-columns: 1fr; } }
@media (max-width: 1279px) { .report-assistant { top: 80px; right: 16px; width: min(440px, calc(100vw - 32px)); box-shadow: -8px 0 0 #ede9f3; } }
@media (max-width: 600px) {
  .keyword-report-v2 { gap: 16px; margin-top: 16px; }
  .keyword-report-v2 .research-view-tabs { top: 64px; gap: 0; }
  .keyword-report-v2 .research-view-tabs button { padding: 8px 12px; font-size: 13px; }
  .keyword-report-v2 .research-product-summary, .keyword-report-v2 .keyword-section-heading, .keyword-report-v2 .chart-header, .keyword-report-v2 .research-toolbar { padding: 16px; }
  .keyword-report-v2 .keyword-codex-conclusion { padding: 16px 16px 0; gap: 16px; }
  .keyword-report-v2 .keyword-codex-conclusion h2 { font-size: 20px; }
  .keyword-report-v2 .keyword-codex-conclusion > .keyword-question-entry { margin: 0 -16px; }
  .keyword-report-v2 .research-summary-grid > :not(.keyword-question-entry):not(.keyword-section-insight) { flex: 1 1 45%; padding: 16px; }
  .keyword-report-v2 .research-product-summary > .keyword-section-insight, .keyword-report-v2 .keyword-codex-conclusion > .keyword-section-insight { flex-basis: calc(100% + 32px); width: calc(100% + 32px); margin: 0 -16px; }
  .keyword-report-v2 .keyword-traffic-layout { display: block; padding: 0 16px 16px; }
  .keyword-report-v2 .keyword-ai-body, .keyword-narrative-body { padding: 0 16px 16px; }
  .keyword-report-v2 .research-dashboard-split { grid-template-columns: 1fr; }
  .keyword-report-v2 .keyword-priority-grid { padding: 0 16px; }
  .keyword-report-v2 .keyword-priority-card { grid-template-columns: 1fr; }
  .keyword-question-entry { padding: 8px 16px; gap: 0 8px; }
  .keyword-question-suggestion { max-width: 100%; }
  .report-assistant { inset: 0; width: auto; border: 0; border-radius: 0; z-index: 60; box-shadow: none; }
  .report-assistant-header { padding: 16px 16px 8px; }
  .report-assistant-scope { padding: 0 16px 8px; }
  .report-assistant-thread, .report-assistant-compose { padding: 16px; }
  .report-assistant-compose { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}
.report-assistant { z-index: 1100; }
@media (prefers-reduced-motion: reduce) { .keyword-report-v2 *, .report-assistant * { scroll-behavior: auto; transition: none; animation: none; } }
