:root {
  --bg: #eef3f9;
  --panel: #ffffff;
  --panel-soft: #f6f8fb;
  --border: #dbe4ef;
  --text: #20304a;
  --muted: #70819b;
  --accent: #5c6cf2;
  --accent-2: #25bdb5;
  --danger: #ef476f;
  --warn: #f0b429;
  --shadow: 0 8px 24px rgba(39, 54, 82, 0.08);
}

@font-face {
  font-family: "LINE Seed Sans";
  src: url("https://cdn.jsdelivr.net/gh/woffz/b2@main/LineSeed/LineSeed.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LINE Seed Sans";
  src: url("https://cdn.jsdelivr.net/gh/woffz/b2@main/LineSeed/LineSeed-700.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "LINE Seed Sans", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 48px;
  display: grid;
  grid-template-columns: 230px minmax(260px, 420px) 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #17233a;
  font-size: 16px;
}

.search-wrap {
  position: relative;
  min-width: 0;
}

.search {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #edf3fb;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
}

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

.search-suggestions {
  position: absolute;
  top: 39px;
  right: 0;
  left: 0;
  z-index: 10;
  max-height: 320px;
  overflow: auto;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
  border: 0;
  border-radius: 6px;
  text-align: left;
}

.search-option:hover {
  background: #eef4fc;
}

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

.company-tabs,
.main-tabs,
.finance-subtabs,
.ir-section-tabs,
.range-tabs,
.file-links {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.company-tab,
.main-tabs button,
.finance-subtabs button,
.ir-section-tabs button,
.range-tabs button,
.ghost-button,
.file-links a,
.side-tabs button {
  min-height: 32px;
  border: 1px solid var(--border);
  color: #51637d;
  background: var(--panel-soft);
  border-radius: 6px;
  padding: 0 12px;
  text-decoration: none;
  white-space: nowrap;
}

.company-tab.active,
.main-tabs button.active,
.finance-subtabs button.active,
.ir-section-tabs button.active,
.range-tabs button.active,
.side-tabs button.active {
  color: var(--text);
  background: #fff;
  border-color: #b8c7dc;
  font-weight: 700;
}

.ghost-button {
  color: var(--accent-2);
  background: #f5fffe;
  border-color: #91dfda;
  font-weight: 700;
}

button:disabled,
.ghost-button:disabled,
.analysis-cancel-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.file-links {
  justify-content: flex-end;
}

.file-links a.excel-download {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #12382f;
  background: linear-gradient(180deg, #ffffff 0%, #f2fbf8 100%);
  border-color: #a9dccc;
  border-radius: 8px;
  box-shadow: 0 7px 18px rgba(24, 95, 73, 0.1);
  font-weight: 800;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.file-links a.excel-download:hover {
  border-color: #67c4a7;
  box-shadow: 0 10px 24px rgba(24, 95, 73, 0.16);
  transform: translateY(-1px);
}

.excel-label {
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.05;
}

.excel-label strong {
  font-size: 13px;
}

.excel-label small {
  color: #5f7c72;
  font-size: 11px;
  font-weight: 700;
}

.workspace {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  position: relative;
}

.sidebar {
  min-width: 0;
  height: 100%;
  position: sticky;
  top: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  overflow: auto;
}

.company-card {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.ticker-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ticker-line h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.ticker-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ticker-line span:empty {
  display: none;
}

.price-line {
  margin-top: 12px;
  color: var(--danger);
  font-size: 24px;
  font-weight: 800;
}

.price-delay {
  min-height: 16px;
  margin-top: 2px;
  color: #8ba0ba;
  font-size: 11px;
  font-weight: 700;
}

.price-delay:empty {
  display: none;
}

.price-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.change-chip {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  color: #51637d;
  background: #f6f8fb;
  border: 1px solid #e7eef7;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.change-chip b,
.change-chip em {
  font: inherit;
}

.change-chip em {
  font-style: normal;
}

.change-chip.up {
  color: #b8322a;
  background: #fff5f4;
  border-color: #ffd8d4;
}

.change-chip.down {
  color: #285fa7;
  background: #f1f6ff;
  border-color: #d5e4ff;
}

.change-chip.loading {
  color: var(--muted);
}

.mini-metrics {
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
}

.mini-metrics div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.mini-metrics dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini-metrics dd {
  margin: 0;
  font-weight: 800;
  font-size: 13px;
}

.feed {
  padding: 12px 16px 24px;
}

.news-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 12px;
}

.news-panel-head h2 {
  margin: 0;
  color: #17233a;
  font-size: 18px;
  line-height: 1.25;
}

.news-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.news-filter-tabs {
  display: grid;
  grid-template-columns: 0.75fr 0.95fr 1.25fr 0.95fr 0.85fr;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: visible;
}

.news-filter-tabs button {
  min-height: 30px;
  min-width: 0;
  padding: 0 7px;
  color: #51637d;
  background: #f6f8fb;
  border: 1px solid #e1e9f4;
  border-radius: 7px;
  font-size: clamp(10px, 3vw, 12px);
  font-weight: 900;
  white-space: nowrap;
}

.news-filter-tabs button.active {
  color: #0f766e;
  background: #ecfffb;
  border-color: #8ee1d6;
}

.news-list {
  display: grid;
  gap: 0;
}

.news-feed-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 10px;
  align-items: start;
}

.news-copy {
  min-width: 0;
}

.news-title {
  display: block;
  color: #17233a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  text-decoration: none;
}

.news-title:hover {
  color: var(--accent);
}

.news-meta {
  margin-top: 5px;
  color: #8090a8;
  font-size: 12px;
  font-weight: 800;
}

.news-summary-wrap {
  position: relative;
  align-self: start;
}

.news-summary-trigger {
  width: 74px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #31506f;
  background: linear-gradient(180deg, #f7fbff 0%, #eaf2fb 100%);
  border: 1px solid #dde7f3;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.news-summary-trigger:hover,
.news-summary-trigger:focus-visible {
  color: #075985;
  background: #eff9ff;
  border-color: #7dd3fc;
  outline: none;
}

.news-summary-preview {
  position: fixed;
  z-index: 1000;
  width: 280px;
  padding: 12px 14px;
  color: #24344d;
  background: #ffffff;
  border: 1px solid #cfe0f2;
  border-radius: 10px;
  box-shadow: 0 16px 38px rgba(28, 46, 74, 0.18);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  user-select: text;
}

.news-summary-preview.is-pinned {
  border-color: #69c7bd;
  box-shadow: 0 18px 42px rgba(15, 118, 110, 0.2);
}

.news-summary-preview strong {
  display: block;
  margin-bottom: 6px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.news-summary-preview span {
  display: block;
}

.news-summary-preview span + span {
  margin-top: 5px;
}

.news-summary-preview em {
  display: block;
  margin-top: 8px;
  color: #0f766e;
  font-style: normal;
  font-weight: 900;
}

.more-news-link {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: #0f766e;
  background: #f5fffe;
  border: 1px solid #a9e6dc;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.more-news-link:hover {
  border-color: #54cfc0;
}

.news-page {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding-top: 16px;
}

.news-page-head {
  position: relative;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.news-page-head p,
.news-page-head h1,
.news-page-head span {
  margin: 0;
}

.news-page-head p {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.news-page-head h1 {
  margin-top: 4px;
  color: #17233a;
  font-size: 26px;
  line-height: 1.2;
}

.news-page-head span {
  display: block;
  margin-top: 6px;
  color: #66758d;
  font-size: 13px;
  font-weight: 700;
}

.news-page-head-action {
  position: absolute;
  top: 16px;
  right: 16px;
}

.news-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-page-tabs button {
  min-height: 34px;
  padding: 0 14px;
  color: #51637d;
  background: #ffffff;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.news-page-tabs button.active {
  color: #0f766e;
  background: #ecfffb;
  border-color: #8ee1d6;
}

.news-page-list {
  display: grid;
  gap: 12px;
}

.news-page-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.news-page-item.has-thumbnail {
  grid-template-columns: 180px minmax(0, 1fr);
}

.news-page-thumb {
  width: 180px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #0f766e;
  background: #ecfffb;
  border: 1px solid #d6f3ef;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.news-page-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-page-thumb-fallback {
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  text-align: center;
}

.news-page-thumb-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #ffffff;
  background: #0f766e;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
}

.news-page-thumb-source {
  max-width: 140px;
  color: #0f766e;
  font-size: 12px;
  line-height: 1.25;
}

.news-page-item-main {
  min-width: 0;
}

.news-page-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  color: #0f766e;
  background: #ecfffb;
  border: 1px solid #b7eee6;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.news-page-item h2 {
  margin: 8px 0 5px;
  font-size: 20px;
  line-height: 1.35;
}

.news-page-item h2 a {
  display: -webkit-box;
  overflow: hidden;
  color: #17233a;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-page-item h2 a:hover {
  color: var(--accent);
}

.news-page-item ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #35445c;
  font-size: 14px;
  line-height: 1.65;
}

.news-page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.news-page-tags span {
  color: #5e728f;
  font-size: 12px;
  font-weight: 800;
}

.analysis-page {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  padding-top: 16px;
}

.analysis-note-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analysis-note-hero p,
.analysis-note-hero h1,
.analysis-note-hero span {
  margin: 0;
}

.analysis-note-hero p {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
}

.analysis-note-hero h1 {
  margin-top: 8px;
  color: #17233a;
  font-size: 34px;
  line-height: 1.15;
}

.analysis-note-hero span {
  display: block;
  margin-top: 8px;
  color: #60728c;
  font-size: 14px;
  font-weight: 800;
}

.analysis-note-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.analysis-note-meta {
  color: #72839b;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.analysis-edit-toggle.active {
  color: #ffffff;
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.analysis-history-toggle.active {
  color: #ffffff;
  background: #17233a;
  border-color: #17233a;
}

.analysis-history-panel {
  display: grid;
  gap: 14px;
  padding: 20px 24px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analysis-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.analysis-history-head span {
  display: block;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.analysis-history-head h2 {
  margin: 4px 0 0;
  color: #17233a;
  font-size: 22px;
  line-height: 1.25;
}

.analysis-history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.analysis-history-panel > p {
  margin: 0;
  color: #60728c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.analysis-current-version-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  color: #315c9b;
  background: #edf4ff;
  border: 1px solid #c9dcfb;
  border-radius: 8px;
}

.analysis-current-version-card span,
.analysis-current-version-card strong,
.analysis-current-version-card small {
  display: block;
}

.analysis-current-version-card span {
  font-size: 11px;
  font-weight: 900;
}

.analysis-current-version-card strong {
  color: #17233a;
  font-size: 18px;
  font-weight: 950;
}

.analysis-current-version-card small {
  color: #536782;
  font-size: 12px;
  font-weight: 700;
}

.analysis-version-form {
  display: grid;
  grid-template-columns: auto minmax(80px, 100px) minmax(80px, 100px) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #dce7f4;
  border-radius: 8px;
}

.analysis-version-form-head {
  display: grid;
  gap: 3px;
  min-width: 130px;
}

.analysis-version-form-head span,
.analysis-version-form label small {
  color: #72839b;
  font-size: 11px;
  font-weight: 900;
}

.analysis-version-form-head strong {
  color: #17233a;
  font-size: 14px;
  font-weight: 950;
}

.analysis-version-form label {
  display: grid;
  gap: 5px;
}

.analysis-version-form input {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  color: #17233a;
  background: #fbfdff;
  border: 1px solid #cbd8eb;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.analysis-version-form input:focus {
  outline: 2px solid rgba(37, 189, 181, 0.22);
  border-color: #78d6d0;
}

.analysis-version-number-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 34px;
  background: #fbfdff;
  border: 1px solid #cbd8eb;
  border-radius: 6px;
  overflow: hidden;
}

.analysis-version-number-field em {
  padding: 0 9px;
  color: #315c9b;
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
}

.analysis-version-number-field input {
  min-height: 32px;
  border: 0;
  border-left: 1px solid #dce7f4;
  border-radius: 0;
}

.analysis-version-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.analysis-danger-button {
  min-height: 32px;
  padding: 0 12px;
  color: #9f1d1d;
  background: #fff5f5;
  border: 1px solid #f0b8b8;
  border-radius: 6px;
  font-weight: 800;
}

.analysis-danger-button:hover {
  color: #7f1d1d;
  border-color: #e28484;
}

.analysis-history-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 14px;
}

.analysis-history-columns section,
.analysis-history-columns details {
  min-width: 0;
  padding: 14px;
  background: #f8fbff;
  border: 1px solid #e4ecf7;
  border-radius: 8px;
}

.analysis-history-columns h3,
.analysis-history-columns summary {
  margin: 0 0 10px;
  color: #17233a;
  font-size: 14px;
  font-weight: 900;
}

.analysis-history-columns summary {
  cursor: pointer;
}

.analysis-history-columns summary span {
  color: var(--accent-2);
}

.analysis-version-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #dce7f4;
  border-radius: 8px;
}

.analysis-version-item + .analysis-version-item {
  margin-top: 8px;
}

.analysis-version-item.active {
  border-color: #8fb5ee;
  box-shadow: inset 4px 0 0 #3b82f6;
}

.analysis-version-item strong,
.analysis-version-item span {
  display: block;
  min-width: 0;
}

.analysis-version-item strong {
  color: #17233a;
  font-size: 14px;
  font-weight: 900;
}

.analysis-version-item span {
  margin-top: 4px;
  color: #60728c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.analysis-history-empty {
  padding: 14px;
  color: #60728c;
  background: #ffffff;
  border: 1px dashed #cad7e9;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.analysis-history-empty.warn {
  color: #8a4b0f;
  background: #fff8ec;
  border-color: #f0d19a;
}

.analysis-document-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: 16px;
}

.analysis-document {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.analysis-toc {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 72px);
  overflow: auto;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analysis-toc strong {
  display: block;
  margin-bottom: 12px;
  color: #17233a;
  font-size: 14px;
  font-weight: 900;
}

.analysis-toc a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  color: #51637d;
  text-decoration: none;
  line-height: 1.35;
}

.analysis-toc a:hover {
  color: var(--accent);
}

.analysis-toc span {
  color: var(--accent-2);
  font-weight: 900;
}

.analysis-toc-chapter {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 900;
}

.analysis-toc-section {
  margin-top: 8px;
  padding-left: 8px;
  font-size: 12px;
  font-weight: 800;
}

.analysis-chapter {
  scroll-margin-top: 72px;
  padding: 24px 28px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analysis-chapter-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf2f8;
}

.analysis-chapter-head > span {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #17233a;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 900;
}

.analysis-chapter-head h2 {
  margin: 0;
  color: #17233a;
  font-size: 26px;
  line-height: 1.25;
}

.analysis-chapter-head-editor {
  align-items: end;
}

.analysis-title-editor,
.analysis-section-number-editor {
  display: grid;
  gap: 6px;
}

.analysis-title-editor small,
.analysis-section-number-editor small {
  color: #72839b;
  font-size: 12px;
  font-weight: 800;
}

.analysis-title-editor input,
.analysis-section-number-editor input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  color: #17233a;
  background: #fbfdff;
  border: 1px solid #cbd8eb;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 900;
}

.analysis-title-editor input:focus,
.analysis-section-number-editor input:focus {
  outline: 2px solid rgba(37, 189, 181, 0.22);
  border-color: #78d6d0;
}

.analysis-section-number-editor input {
  text-align: center;
}

.analysis-title-actions {
  display: flex;
  gap: 8px;
}

.analysis-chapter-head small,
.analysis-subsection-head small {
  display: inline-flex;
  margin-top: 7px;
  color: #72839b;
  font-size: 12px;
  font-weight: 800;
}

.analysis-subsection-stack {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.analysis-subsection {
  scroll-margin-top: 72px;
}

.analysis-subsection + .analysis-subsection {
  padding-top: 22px;
  border-top: 1px solid #edf2f8;
}

.analysis-subsection-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
  cursor: pointer;
  list-style: none;
}

.analysis-subsection-head::-webkit-details-marker {
  display: none;
}

.analysis-subsection-head > div {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding-left: 28px;
}

.analysis-subsection-head > div::before {
  content: "+";
  position: absolute;
  top: 2px;
  left: 0;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #0f766e;
  background: #ecfffb;
  border: 1px solid #b7eee6;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.analysis-subsection[open] > .analysis-subsection-head > div::before {
  content: "−";
}

.analysis-subsection-head span {
  color: var(--accent-2);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.35;
}

.analysis-subsection-head h3 {
  margin: 0;
  color: #17233a;
  font-size: 22px;
  line-height: 1.35;
}

.analysis-section-edit,
.analysis-cancel-button {
  min-height: 32px;
  padding: 0 12px;
  color: #51637d;
  background: #f7faff;
  border: 1px solid #dce7f4;
  border-radius: 6px;
  font-weight: 800;
}

.analysis-subsection-body {
  padding-top: 2px;
}

.analysis-section-edit:hover,
.analysis-cancel-button:hover {
  border-color: #9fb0ff;
  color: var(--accent);
}

.analysis-markdown {
  color: #2e4059;
  font-size: 20px;
  line-height: 1.85;
}

.analysis-markdown h2,
.analysis-markdown h3,
.analysis-markdown h4 {
  color: #17233a;
  line-height: 1.35;
}

.analysis-markdown h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.analysis-markdown h3 {
  margin: 24px 0 10px;
  font-size: 20px;
}

.analysis-markdown h4 {
  margin: 22px 0 8px;
  color: #0f766e;
  font-size: 17px;
}

.analysis-markdown p {
  margin: 0 0 16px;
}

.analysis-markdown strong {
  color: #17233a;
  font-weight: 900;
}

.analysis-editor ul,
.analysis-editor ol,
.analysis-markdown ul,
.analysis-markdown ol {
  margin: 10px 0 18px;
  padding-left: 22px;
}

.analysis-editor .analysis-checklist,
.analysis-markdown .analysis-checklist {
  padding-left: 4px;
  list-style: none;
}

.analysis-markdown li {
  margin: 6px 0;
}

.analysis-editor li {
  margin: 6px 0;
}

.analysis-editor blockquote,
.analysis-markdown blockquote {
  margin: 18px 0;
  padding: 16px 18px;
  color: #17233a;
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-left: 4px solid var(--accent-2);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
}

.analysis-editor blockquote.analysis-quote-box,
.analysis-markdown blockquote.analysis-quote-box {
  color: #21324c;
  background: #f8fbff;
  border: 1px solid #d6e2f1;
  border-left: 4px solid #6f8ff5;
  box-shadow: 0 10px 24px rgba(45, 69, 112, 0.08);
}

.analysis-editor blockquote.analysis-quote-pull,
.analysis-markdown blockquote.analysis-quote-pull {
  position: relative;
  padding: 24px 28px 20px 56px;
  color: #17233a;
  background: #ffffff;
  border: 0;
  border-top: 1px solid #d6e2f1;
  border-bottom: 1px solid #d6e2f1;
  border-radius: 0;
  font-size: 22px;
  font-weight: 900;
}

.analysis-editor blockquote.analysis-quote-pull::before,
.analysis-markdown blockquote.analysis-quote-pull::before {
  content: "“";
  position: absolute;
  top: 4px;
  left: 12px;
  color: #25bdb5;
  font-size: 56px;
  line-height: 1;
}

.analysis-editor blockquote.analysis-quote-note,
.analysis-markdown blockquote.analysis-quote-note {
  color: #1f3a5f;
  background: #eef6ff;
  border-color: #bfdbfe;
  border-left-color: #3b82f6;
  font-size: 15px;
  font-weight: 700;
}

.analysis-editor blockquote.analysis-quote-line,
.analysis-markdown blockquote.analysis-quote-line {
  padding: 12px 0 12px 18px;
  background: transparent;
  border: 0;
  border-left: 5px solid var(--accent-2);
  border-radius: 0;
  border-left-color: var(--accent-2);
  font-size: 17px;
  font-weight: 800;
}

.analysis-editor blockquote.analysis-quote-insight,
.analysis-markdown blockquote.analysis-quote-insight {
  color: #223053;
  background: #f4f2ff;
  border-color: #d8d2ff;
  border-left-color: #7c3aed;
  font-weight: 800;
}

.analysis-editor blockquote.analysis-quote-metric,
.analysis-markdown blockquote.analysis-quote-metric {
  color: #102a43;
  background: #f7fbff;
  border-color: #cfe3f7;
  border-left-color: #0e7490;
  font-size: 18px;
  font-weight: 900;
}

.analysis-editor blockquote.analysis-quote-risk,
.analysis-markdown blockquote.analysis-quote-risk {
  color: #5f2a12;
  background: #fff6ed;
  border-color: #fed7aa;
  border-left-color: #f97316;
}

.analysis-editor blockquote.analysis-quote-success,
.analysis-markdown blockquote.analysis-quote-success {
  color: #17432b;
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-left-color: #22c55e;
}

.analysis-editor blockquote.analysis-quote-note::before,
.analysis-markdown blockquote.analysis-quote-note::before,
.analysis-editor blockquote.analysis-quote-insight::before,
.analysis-markdown blockquote.analysis-quote-insight::before,
.analysis-editor blockquote.analysis-quote-metric::before,
.analysis-markdown blockquote.analysis-quote-metric::before,
.analysis-editor blockquote.analysis-quote-risk::before,
.analysis-markdown blockquote.analysis-quote-risk::before,
.analysis-editor blockquote.analysis-quote-success::before,
.analysis-markdown blockquote.analysis-quote-success::before {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.analysis-editor blockquote.analysis-quote-note::before,
.analysis-markdown blockquote.analysis-quote-note::before {
  content: "NOTE";
  color: #2563eb;
}

.analysis-editor blockquote.analysis-quote-insight::before,
.analysis-markdown blockquote.analysis-quote-insight::before {
  content: "INSIGHT";
  color: #6d28d9;
}

.analysis-editor blockquote.analysis-quote-metric::before,
.analysis-markdown blockquote.analysis-quote-metric::before {
  content: "METRIC";
  color: #0e7490;
}

.analysis-editor blockquote.analysis-quote-risk::before,
.analysis-markdown blockquote.analysis-quote-risk::before {
  content: "RISK";
  color: #c2410c;
}

.analysis-editor blockquote.analysis-quote-success::before,
.analysis-markdown blockquote.analysis-quote-success::before {
  content: "UPSIDE";
  color: #15803d;
}

.analysis-markdown a {
  color: #2563eb;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analysis-markdown img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px 0;
  border: 1px solid #dce7f4;
  border-radius: 8px;
}

.analysis-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 14px 0 20px;
  border: 1px solid #dce7f4;
  border-radius: 8px;
  background: #ffffff;
}

.analysis-table-wrap.analysis-table-width-narrow {
  width: max-content;
}

.analysis-table-wrap.analysis-table-width-normal,
.analysis-table-wrap:not(.analysis-table-width-narrow):not(.analysis-table-width-wide) {
  width: 100%;
}

.analysis-table-wrap.analysis-table-width-wide {
  width: 100%;
}

.analysis-markdown table,
.analysis-editor table,
.analysis-table-wrap table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  background: #ffffff;
  color: #3d4d64;
  font-size: 14px;
  line-height: 1.45;
}

.analysis-table-width-narrow table {
  width: auto;
  min-width: 0;
}

.analysis-table-width-wide table {
  min-width: 760px;
}

.analysis-markdown th,
.analysis-markdown td,
.analysis-editor th,
.analysis-editor td,
.analysis-table-wrap th,
.analysis-table-wrap td,
.analysis-table-wrap thead td {
  padding: 8px 10px;
  color: #3d4d64;
  background: #ffffff;
  border: 1px solid #edf2f8;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.analysis-markdown th,
.analysis-markdown thead td,
.analysis-editor th,
.analysis-editor thead td,
.analysis-table-wrap th {
  color: #17233a;
  background: #f7faff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.analysis-markdown table p,
.analysis-markdown table div,
.analysis-editor table p,
.analysis-editor table div,
.analysis-table-wrap p,
.analysis-table-wrap div {
  margin: 0;
}

.analysis-markdown table p + p,
.analysis-editor table p + p,
.analysis-table-wrap p + p {
  margin-top: 6px;
}

.analysis-markdown table strong,
.analysis-editor table strong,
.analysis-table-wrap strong {
  color: #17233a;
  font-weight: 900;
}

.analysis-todo {
  padding: 18px;
  background: #f8fbff;
  border: 1px dashed #cad7e9;
  border-radius: 8px;
}

.analysis-todo strong {
  color: #17233a;
  font-size: 15px;
  font-weight: 900;
}

.analysis-todo p {
  margin: 8px 0 0;
  color: #60728c;
  font-size: 14px;
  line-height: 1.6;
}

.analysis-editor-toolbar {
  position: sticky;
  top: 8px;
  z-index: 45;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #dce7f4;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(23, 35, 58, 0.08);
}

.analysis-toolbar-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-right: 10px;
  border-right: 1px solid #dbe6f4;
}

.analysis-toolbar-group:last-child {
  padding-right: 0;
  border-right: 0;
}

.analysis-toolbar-menu {
  position: relative;
}

.analysis-toolbar-menu[open] {
  z-index: 120;
}

.analysis-toolbar-menu > summary {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: #3d4d64;
  background: #ffffff;
  border: 1px solid #d6e2f1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.analysis-toolbar-menu > summary::-webkit-details-marker {
  display: none;
}

.analysis-toolbar-menu[open] > summary,
.analysis-toolbar-menu > summary:hover {
  color: var(--accent);
  border-color: #9fb0ff;
}

.analysis-menu-caret {
  color: #8292aa;
  font-size: 10px;
}

.analysis-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 130;
  min-width: 190px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #d6e2f1;
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(23, 35, 58, 0.16);
}

.analysis-quote-menu-panel {
  min-width: 380px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.analysis-menu-option {
  width: 100%;
  justify-content: flex-start;
  margin: 2px 0;
  border-color: transparent;
  background: transparent;
  text-align: left;
}

.analysis-quote-menu-panel .analysis-menu-option {
  margin: 0;
}

.analysis-menu-option:hover {
  color: #007c73;
  background: #effcfb;
  border-color: #b7efea;
}

.analysis-quote-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: auto;
  min-height: 54px;
  gap: 2px;
  white-space: normal;
}

.analysis-quote-option small {
  color: #708198;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.analysis-palette-group > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.analysis-color-grid {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 166px;
}

.analysis-menu-divider {
  height: 1px;
  margin: 8px 2px;
  background: #dce7f4;
}

.analysis-table-color-label {
  margin: 0 2px 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.analysis-editor-toolbar button,
.analysis-editor-toolbar select,
.analysis-color-control,
.analysis-image-control {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: #3d4d64;
  background: #ffffff;
  border: 1px solid #d6e2f1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.analysis-editor-toolbar button:hover,
.analysis-image-control:hover {
  color: var(--accent);
  border-color: #9fb0ff;
}

.analysis-toolbar-icon {
  min-width: 22px;
  color: #3d4d64;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.analysis-icon-text-color {
  border-bottom: 4px solid #17233a;
}

.analysis-icon-highlight {
  padding: 2px 4px;
  border: 1px solid #d6e2f1;
  box-shadow: inset 0 -8px 0 #fff2a8;
}

.analysis-icon-align {
  font-size: 17px;
}

.analysis-icon-list {
  font-size: 15px;
  letter-spacing: -1px;
}

.analysis-editor-toolbar .analysis-color-swatch {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  background: var(--swatch);
  border-color: #cbd8eb;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.analysis-editor-toolbar .analysis-color-swatch:hover {
  border-color: #17233a;
  transform: translateY(-1px);
}

.analysis-highlight-swatch {
  box-shadow: inset 0 0 0 1px rgba(23, 35, 58, 0.08);
}

.analysis-color-control input {
  width: 26px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}

.analysis-image-control input {
  display: none;
}

.analysis-editor {
  width: 100%;
  min-height: 360px;
  overflow: auto;
  padding: 14px;
  color: #17233a;
  background: #fbfdff;
  border: 1px solid #cbd8eb;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1.75;
}

.analysis-subsection-editor .analysis-subsection-head {
  cursor: default;
}

.analysis-subsection-editor .analysis-subsection-head-editor {
  display: grid;
  grid-template-columns: minmax(92px, 124px) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.analysis-subsection-editor .analysis-subsection-head > div {
  padding-left: 0;
}

.analysis-subsection-editor .analysis-subsection-head > div::before {
  display: none;
}

.analysis-editor:focus {
  outline: 2px solid rgba(37, 189, 181, 0.22);
  border-color: #78d6d0;
}

.analysis-editor table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  background: #ffffff;
  color: #3d4d64;
  font-size: 14px;
  line-height: 1.45;
}

.analysis-editor th,
.analysis-editor td {
  padding: 8px 10px;
  color: #3d4d64;
  background: #ffffff;
  border: 1px solid #edf2f8;
  font-size: 14px;
  line-height: 1.45;
  vertical-align: top;
}

.analysis-editor th,
.analysis-editor thead td {
  color: #17233a;
  background: #f7faff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.analysis-editor img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px 0;
  border-radius: 8px;
}

.analysis-editor hr,
.analysis-markdown hr {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid #dce7f4;
}

.analysis-editor pre,
.analysis-markdown pre {
  overflow: auto;
  padding: 14px;
  color: #e5edf9;
  background: #17233a;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.analysis-formula {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 1px 7px;
  color: #17233a;
  background: #f8fafc;
  border: 1px solid #cbd8eb;
  border-radius: 5px;
  font-family: Georgia, "Times New Roman", serif;
}

.analysis-editor .analysis-image-resizer,
.analysis-markdown .analysis-image-resizer {
  position: relative;
  display: block;
  max-width: 100%;
  margin: 14px 0;
  vertical-align: top;
}

.analysis-editor .analysis-image-row,
.analysis-markdown .analysis-image-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin: 14px 0;
}

.analysis-editor .analysis-image-row > .analysis-image-resizer,
.analysis-markdown .analysis-image-row > .analysis-image-resizer {
  flex: 0 1 auto;
  min-width: 120px;
  margin: 0;
}

.analysis-editor .analysis-image-resizer.analysis-align-left,
.analysis-markdown .analysis-image-resizer.analysis-align-left {
  margin-left: 0;
  margin-right: auto;
}

.analysis-editor .analysis-image-resizer.analysis-align-center,
.analysis-markdown .analysis-image-resizer.analysis-align-center {
  margin-left: auto;
  margin-right: auto;
}

.analysis-editor .analysis-image-resizer.analysis-align-right,
.analysis-markdown .analysis-image-resizer.analysis-align-right {
  margin-left: auto;
  margin-right: 0;
}

.analysis-editor .analysis-image-resizer {
  outline: 1px solid transparent;
  border-radius: 8px;
  cursor: grab;
}

.analysis-editor .analysis-image-resizer:hover,
.analysis-editor .analysis-image-resizer.resizing,
.analysis-editor .analysis-image-resizer.analysis-image-selected {
  outline-color: #25bdb5;
}

.analysis-editor .analysis-image-resizer.analysis-image-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.analysis-editor .analysis-image-resizer.analysis-image-drop-left::before,
.analysis-editor .analysis-image-resizer.analysis-image-drop-right::after {
  content: "";
  position: absolute;
  top: -4px;
  bottom: -4px;
  z-index: 3;
  width: 4px;
  background: #25bdb5;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(37, 189, 181, 0.18);
}

.analysis-editor .analysis-image-resizer.analysis-image-drop-left::before {
  left: -8px;
}

.analysis-editor .analysis-image-resizer.analysis-image-drop-right::after {
  right: -8px;
}

.analysis-editor .analysis-image-resizer img,
.analysis-markdown .analysis-image-resizer img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border-radius: 8px;
}

.analysis-image-caption {
  display: block;
  margin-top: 7px;
  color: #708198;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.analysis-editor .analysis-image-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  background: #25bdb5;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(23, 35, 58, 0.22);
  cursor: nwse-resize;
}

.analysis-markdown .analysis-image-handle {
  display: none;
}

.analysis-image-popover {
  position: fixed;
  z-index: 80;
  width: min(320px, calc(100vw - 20px));
  padding: 10px;
  color: #17233a;
  background: #ffffff;
  border: 1px solid #cbd8eb;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(23, 35, 58, 0.18);
}

.analysis-image-popover[hidden] {
  display: none;
}

.analysis-image-popover-row {
  display: flex;
  gap: 6px;
}

.analysis-image-popover button {
  min-height: 30px;
  flex: 1;
  padding: 0 9px;
  color: #51637d;
  background: #f7faff;
  border: 1px solid #dce7f4;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.analysis-image-popover button:hover,
.analysis-image-popover button.active {
  color: #0f766e;
  background: #ecfffb;
  border-color: #8fded5;
}

.analysis-image-caption-field {
  display: grid;
  gap: 5px;
  margin: 8px 0;
}

.analysis-image-caption-field span {
  color: #72839b;
  font-size: 11px;
  font-weight: 800;
}

.analysis-image-caption-field input {
  width: 100%;
  min-height: 32px;
  padding: 0 9px;
  color: #17233a;
  background: #fbfdff;
  border: 1px solid #cbd8eb;
  border-radius: 6px;
  font-size: 13px;
}

.analysis-image-caption-field input:focus {
  outline: 2px solid rgba(37, 189, 181, 0.22);
  border-color: #78d6d0;
}

.analysis-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.analysis-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analysis-hero p,
.analysis-hero h1,
.analysis-hero span,
.analysis-hero strong {
  margin: 0;
}

.analysis-hero p,
.analysis-eyebrow,
.analysis-card-head span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.analysis-hero h1 {
  margin-top: 6px;
  color: #17233a;
  font-size: 30px;
  line-height: 1.15;
}

.analysis-hero strong {
  display: block;
  margin-top: 10px;
  color: #17233a;
  font-size: 18px;
  line-height: 1.45;
}

.analysis-hero span {
  display: block;
  max-width: 980px;
  margin-top: 8px;
  color: #53647d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.analysis-hero small {
  flex: 0 0 auto;
  color: #72839b;
  font-size: 12px;
  font-weight: 800;
}

.analysis-signal-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.6fr);
  gap: 16px;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analysis-signal-card h2 {
  margin: 5px 0 0;
  color: #17233a;
  font-size: 18px;
  line-height: 1.35;
}

.analysis-signal-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.analysis-signal-card dl div {
  padding: 12px;
  background: #f7faff;
  border: 1px solid #dfe8f5;
  border-radius: 8px;
}

.analysis-signal-card dt {
  color: #6b7c94;
  font-size: 12px;
  font-weight: 800;
}

.analysis-signal-card dd {
  margin: 6px 0 0;
  color: #17233a;
  font-size: 18px;
  font-weight: 900;
}

.analysis-signal-card small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.analysis-section-stack {
  display: grid;
  gap: 14px;
}

.analysis-card {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analysis-card-head h2 {
  margin: 5px 0 0;
  color: #17233a;
  font-size: 22px;
  line-height: 1.3;
}

.analysis-card > p {
  margin: 14px 0 0;
  color: #3d4d64;
  font-size: 15px;
  line-height: 1.75;
}

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

.analysis-card-explainer .analysis-item-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-item,
.analysis-risk-list div {
  padding: 14px;
  background: #f8fbff;
  border: 1px solid #e1eaf6;
  border-radius: 8px;
}

.analysis-item strong,
.analysis-risk-list strong {
  display: inline-flex;
  margin-bottom: 8px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.analysis-item h3 {
  margin: 0 0 8px;
  color: #17233a;
  font-size: 16px;
  line-height: 1.35;
}

.analysis-item p,
.analysis-risk-list p {
  margin: 0;
  color: #42536b;
  font-size: 14px;
  line-height: 1.65;
}

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

.analysis-risk-list div {
  background: #fff8f7;
  border-color: #f5d7d2;
}

.analysis-risk-list strong {
  color: #c2410c;
}

.analysis-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.analysis-source-list a,
.analysis-source-list span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: #51637d;
  background: #f7faff;
  border: 1px solid #dce7f4;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.analysis-source-list a:hover {
  color: var(--accent);
  border-color: #9fb0ff;
}

.analysis-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.news-empty {
  margin: 6px 0;
}

.feed-item {
  margin-bottom: 12px;
  padding: 14px;
  background: #f7faff;
  border: 1px solid #e9eff7;
  border-radius: 8px;
}

.feed-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.feed-item a {
  color: var(--text);
  text-decoration: none;
}

.feed-item a:hover {
  color: var(--accent);
}

.feed-item p {
  margin: 4px 0;
  color: #53657f;
  font-size: 13px;
  line-height: 1.45;
}

.feed-item time {
  display: block;
  margin-top: 10px;
  color: #8ba0ba;
  font-size: 12px;
  font-weight: 700;
}

.filing-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-bottom: 8px;
  padding: 0 7px;
  color: #2f6fdb;
  background: #edf5ff;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.main-panel {
  min-width: 0;
  height: 100%;
  overflow: auto;
}

.main-tabs {
  height: 44px;
  padding: 0 16px;
  background: #e7eef7;
  border-bottom: 1px solid var(--border);
}

.toolbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
}

.finance-subtabs {
  flex-wrap: wrap;
}

.ir-section-tabs {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  padding: 0;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  align-items: start;
  gap: 16px;
  padding: 0 18px 28px;
}

.section-title {
  grid-column: 1 / -1;
  margin: 14px 0 -4px;
  font-size: 18px;
  font-weight: 800;
}

.call-summary-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-source-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #17233a;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(39, 54, 82, 0.06);
}

.summary-source-link:hover {
  border-color: #9fb0ff;
  color: #2f46d5;
}

.chart-card {
  min-height: 330px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.chart-card.wide {
  grid-column: span 2;
}

.chart-card.full {
  grid-column: 1 / -1;
}

.expert-panel-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(260px, 3fr);
  align-items: stretch;
  gap: 16px;
  min-width: 0;
}

.expert-panel-row > .chart-card {
  min-width: 0;
  min-height: 0;
}

.expert-focus-chart {
  display: flex;
  flex-direction: column;
}

.expert-focus-chart .chart {
  flex: 1;
  height: 316px;
  min-height: 316px;
}

.expert-side-card {
  display: flex;
  flex-direction: column;
}

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

.chart-head h2 {
  margin: 0;
  font-size: 15px;
}

.chart-head h3 {
  margin: 0;
  color: #17233a;
  font-size: 14px;
}

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

.expert-panel-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.expert-panel-title h2 {
  min-width: 0;
}

.chart {
  width: 100%;
  height: 272px;
}

.product-growth-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.product-growth-panel {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

.product-growth-chart .chart {
  height: 316px;
  min-height: 316px;
}

.expert-hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.7fr);
  gap: 14px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.expert-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #2f6fdb;
  font-size: 12px;
  font-weight: 900;
}

.expert-hero h1 {
  margin: 0 0 5px;
  color: #17233a;
  font-size: 20px;
}

.expert-hero p,
.expert-hero-note,
.expert-note {
  margin: 0;
  color: #596a84;
  font-size: 12.5px;
  line-height: 1.5;
}

.expert-hero-questions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.expert-hero-questions li {
  background: #f6f9fd;
  border: 1px solid #e4ecf7;
  border-radius: 8px;
}

.expert-hero-questions a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  color: #17233a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.15s;
}

.expert-hero-questions a:hover {
  color: var(--accent-2);
  background: #eef4fb;
}

.expert-hero-questions a span,
.expert-hero-questions a em {
  display: block;
}

.expert-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.expert-status.good {
  color: #137a61;
  background: #e8fbf5;
}

.expert-status.warn {
  color: #9a5d12;
  background: #fff4df;
}

.expert-status.neutral {
  color: #315c9b;
  background: #edf4ff;
}

.expert-hero-note {
  align-self: center;
  padding: 10px 0 10px 12px;
  border-left: 1px solid #dce7f4;
  font-size: 12px;
}

.expert-hero-note strong,
.expert-hero-note span {
  display: block;
}

.expert-hero-note strong {
  margin-bottom: 4px;
  color: #17233a;
  font-size: 12px;
}

.expert-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.expert-source-row em {
  padding: 3px 7px;
  color: #42526d;
  background: #f6f9fd;
  border: 1px solid #e4ecf7;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.expert-summary-card {
  grid-column: 1 / -1;
  min-height: auto;
  padding: 0;
  overflow: visible;
  background: #ffffff;
}

.expert-summary-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.9fr) minmax(0, 1.8fr);
  gap: 0;
}

.expert-summary-main {
  min-width: 0;
  display: grid;
  align-content: start;
}

.expert-summary-lead {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #243b63, #2d6f86);
}

.expert-summary-lead span {
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.expert-summary-lead h2 {
  margin: 8px 0 10px;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.3;
}

.expert-summary-lead dl {
  margin: 0;
}

.expert-summary-lead div {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.expert-summary-lead div:first-child {
  margin-top: 8px;
}

.expert-summary-lead dt {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
}

.expert-summary-lead dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.55;
}

.expert-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 6px;
  padding: 8px 8px 0;
}

.expert-summary-grid > div {
  position: relative;
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 108px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e8eff8;
  border-radius: 8px;
  overflow: visible;
}

.expert-summary-label,
.expert-summary-grid small,
.expert-summary-grid p {
  display: block;
}

.expert-summary-kpi-head {
  min-width: 0;
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.expert-summary-label {
  flex: 1 1 auto;
  min-width: 0;
  color: #6f7f99;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expert-summary-kpi-head > .expert-badge {
  flex: 0 0 auto;
  margin-top: 0;
}

.expert-summary-kpi-head > .expert-info-tooltip {
  margin-left: auto;
}

.expert-summary-kpi-head > .expert-badge + .expert-summary-label {
  flex: 0 1 auto;
}

.expert-summary-kpi-head > .expert-summary-label + .expert-info-tooltip {
  margin-left: auto;
}

.expert-summary-grid > div > strong {
  display: block;
  margin-top: 8px;
  color: #17233a;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
}

.expert-summary-grid small {
  margin-top: 5px;
  color: #596a84;
  font-size: 11px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expert-summary-proof {
  min-width: 0;
  margin: 8px;
  padding-top: 8px;
  border-top: 1px solid #edf2f8;
}

.expert-summary-proof-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.expert-summary-proof-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.expert-summary-proof-title > strong {
  color: #17233a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.expert-summary-proof-title .expert-tooltip-content {
  min-width: 320px;
  max-width: min(420px, calc(100vw - 44px));
}

.expert-summary-proof-head > span {
  color: #6f7f99;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.expert-summary-proof-chart {
  min-width: 0;
  height: 150px;
}

.expert-summary-proof-chart .empty-state {
  height: 100%;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 12px;
}

.expert-info-tooltip {
  position: relative;
  z-index: 20;
  display: inline-flex;
  flex: 0 0 auto;
  vertical-align: middle;
}

.expert-badge-tooltip {
  position: relative;
  z-index: 20;
  display: inline-flex;
  flex: 0 0 auto;
}

.expert-info-tooltip:hover,
.expert-info-tooltip:focus-within,
.expert-badge-tooltip:hover,
.expert-badge-tooltip:focus-within {
  z-index: 160;
}

.expert-info-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  padding: 0;
  color: #4f6f96;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  border: 1px solid #bcd1eb;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(28, 52, 82, 0.08);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.expert-info-trigger:hover {
  color: #245a9c;
  background: #f7fbff;
  border-color: #82addd;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 4px 10px rgba(45, 91, 146, 0.16);
  transform: translateY(-1px);
}

.expert-info-trigger span {
  transform: translateY(-0.5px);
}

.expert-info-trigger:focus-visible {
  outline: 2px solid rgba(69, 130, 210, 0.36);
  outline-offset: 2px;
}

.expert-tooltip-content {
  position: absolute;
  display: none;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  width: max-content;
  min-width: 280px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 14px;
  color: #253248;
  background: #ffffff;
  border: 1px solid #d7e3f2;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(23, 35, 58, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  white-space: normal;
  overflow-wrap: anywhere;
}

.expert-tooltip-content::before {
  position: absolute;
  top: -6px;
  left: 12px;
  width: 10px;
  height: 10px;
  background: inherit;
  border-top: 1px solid #d7e3f2;
  border-left: 1px solid #d7e3f2;
  content: "";
  transform: rotate(45deg);
}

.expert-info-tooltip:hover .expert-tooltip-content,
.expert-info-tooltip:focus-within .expert-tooltip-content,
.expert-badge-tooltip:hover .expert-tooltip-content,
.expert-badge-tooltip:focus-within .expert-tooltip-content {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.expert-badge-tooltip .expert-tooltip-content {
  right: 0;
  left: auto;
  min-width: 250px;
  max-width: min(320px, calc(100vw - 44px));
}

.expert-badge-tooltip .expert-tooltip-content::before {
  right: 14px;
  left: auto;
}

.expert-summary-grid > div:nth-child(4) .expert-tooltip-content,
.expert-summary-grid > div:nth-child(5) .expert-tooltip-content {
  right: 0;
  left: auto;
}

.expert-summary-grid > div:nth-child(4) .expert-tooltip-content::before,
.expert-summary-grid > div:nth-child(5) .expert-tooltip-content::before {
  right: 14px;
  left: auto;
}

.expert-tooltip-section,
.expert-tooltip-title,
.expert-tooltip-text {
  display: block;
}

.expert-tooltip-title {
  color: #2f6fdb;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.expert-tooltip-text {
  margin-top: 5px;
  color: #42526d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.expert-tooltip-text strong {
  display: inline;
  clear: none;
  padding-top: 0;
  color: #17233a;
  font-size: inherit;
  font-weight: 950;
}

.expert-tooltip-content hr {
  height: 1px;
  margin: 10px 0;
  background: #e6eef8;
  border: 0;
}

.expert-summary-grid p {
  margin: 8px 0 0;
  color: #42526d;
  font-size: 12px;
  line-height: 1.45;
}

.expert-card-foot {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e8eff8;
}

.expert-card-foot em,
.expert-card-foot span {
  display: block;
}

.expert-card-foot em {
  width: fit-content;
  padding: 2px 6px;
  color: #315c9b;
  background: #edf4ff;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.expert-card-foot span {
  color: #6f7f99;
  font-size: 11px;
  line-height: 1.35;
}

.expert-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: 7px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.expert-badge.good {
  color: #137a61;
  background: #e8fbf5;
  border: 1px solid #b8eadc;
}

.expert-badge.warn {
  color: #9a5d12;
  background: #fff4df;
  border: 1px solid #f2d299;
}

.expert-badge.neutral {
  color: #315c9b;
  background: #edf4ff;
  border: 1px solid #c9dcfb;
}

.expert-badge.muted {
  color: #6f7f99;
  background: #f1f4f8;
  border: 1px solid #dce4ef;
}

.expert-guide {
  margin: 0 0 8px;
}

.expert-guide summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  color: #2f6fdb;
  background: #f6f9fd;
  border: 1px solid #e4ecf7;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

.expert-guide summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: #7b8ba3;
  background: #ffffff;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
}

.expert-guide[open] summary::before {
  content: "−";
}

.expert-guide ul {
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  padding: 10px 12px 10px 28px;
  background: #f8fbff;
  border: 1px solid #e4ecf7;
  border-radius: 8px;
}

.expert-guide li,
.expert-guide p {
  min-width: 0;
  color: #596a84;
  font-size: 12px;
  line-height: 1.45;
}

.expert-guide p {
  margin: 8px 0 0;
  margin-bottom: 0;
  padding: 10px 12px;
  background: #f8fbff;
  border: 1px solid #e4ecf7;
  border-radius: 8px;
}

.expert-guide .expert-alert-explainer {
  margin-top: 8px;
}

.expert-guide summary .expert-badge {
  min-height: 18px;
  margin-top: 0;
  padding: 0 6px;
  font-size: 10px;
}

.expert-question-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  scroll-margin-top: 82px;
  transition: background 0.3s;
  border-radius: 6px;
}

.expert-question-title:target {
  background: #eef4ff;
  box-shadow: inset 3px 0 0 var(--accent);
  padding-left: 10px;
}

.expert-question-title span,
.expert-question-title small {
  display: block;
}

.expert-question-title small {
  color: #6f7f99;
  font-size: 12px;
  font-weight: 900;
}

.expert-segment-card {
  min-height: auto;
}

.expert-segment-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
}

.expert-segment-copy {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.expert-segment-copy-item {
  padding-bottom: 16px;
  border-bottom: 1px solid #e8eff8;
}

.expert-segment-heading {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.expert-segment-marker {
  flex: 0 0 auto;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: var(--segment-color);
  box-shadow: 0 0 10px var(--segment-color);
}

.expert-segment-heading strong {
  min-width: 0;
  color: #17233a;
  font-size: 16px;
  font-weight: 900;
}

.expert-segment-heading small {
  color: var(--segment-color);
  font-size: 16px;
  font-weight: 900;
}

.expert-segment-copy p {
  margin: 8px 0 0;
  color: #596a84;
  font-size: 14px;
  line-height: 1.6;
}

.expert-segment-insight-band {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 0.9fr;
  gap: 12px;
  margin-top: 14px;
}

.expert-segment-insight-card {
  min-width: 0;
  padding: 13px 14px;
  color: #40536d;
  background: #ffffff;
  border: 1px solid #e0e9f5;
  border-left: 4px solid #8aa3c2;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.04);
}

.expert-segment-takeaway {
  background: rgba(41, 128, 185, 0.055);
  border: 1px solid rgba(41, 128, 185, 0.18);
  border-left: 4px solid #2f80ed;
}

.expert-segment-profitability {
  background: rgba(39, 174, 96, 0.04);
  border-color: rgba(39, 174, 96, 0.16);
  border-left-color: #2fb57d;
}

.expert-segment-watch {
  background: rgba(240, 180, 41, 0.075);
  border-color: rgba(219, 164, 55, 0.2);
  border-left-color: #f0b429;
}

.expert-segment-insight-card strong {
  display: block;
  color: #174f7c;
  font-size: 13px;
  font-weight: 900;
}

.expert-segment-profitability strong {
  color: #0f766e;
}

.expert-segment-watch strong {
  color: #7a4d00;
}

.expert-segment-insight-card p {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.55;
}

.expert-segment-insight-card ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 17px;
  color: #596a84;
  font-size: 12.5px;
  line-height: 1.45;
}

.expert-chart-pair {
  display: grid;
  grid-template-columns: minmax(390px, 440px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  min-width: 0;
}

.expert-chart-block {
  min-width: 0;
}

.expert-pie-block {
  max-width: 440px;
}

.expert-chart-block > span {
  display: block;
  margin-bottom: 4px;
  color: #6f7f99;
  font-size: 12px;
  font-weight: 900;
}

.expert-chart-small {
  height: 315px;
}

.expert-pie-block .expert-chart-small {
  height: 335px;
}

.expert-kpi-card {
  min-height: auto;
}

.expert-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0 16px;
}

.expert-kpi-grid div {
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid #e8eff8;
}

.expert-kpi-grid span,
.expert-kpi-grid small {
  display: block;
}

.expert-kpi-grid span {
  color: #6f7f99;
  font-size: 12px;
  font-weight: 900;
}

.expert-kpi-grid strong {
  display: block;
  margin-top: 4px;
  color: #17233a;
  font-size: 22px;
  font-weight: 900;
}

.expert-kpi-grid small {
  margin-top: 3px;
  color: #596a84;
  font-size: 12px;
  line-height: 1.35;
}

.expert-side-card .chart-head {
  align-items: flex-start;
}

.expert-side-card .expert-info-tooltip .expert-tooltip-content {
  right: 0;
  left: auto;
}

.expert-side-card .expert-info-tooltip .expert-tooltip-content::before {
  right: 14px;
  left: auto;
}

.expert-fcf-card .expert-badge {
  gap: 4px;
  min-height: 24px;
  margin-top: 0;
  padding: 0 9px;
  white-space: nowrap;
}

.expert-fcf-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

.expert-fcf-metric-grid div {
  padding: 11px 0 12px;
}

.expert-fcf-metric-grid strong,
.expert-margin-metric-grid strong {
  font-size: 21px;
}

.expert-margin-metric-grid {
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 12px;
}

.expert-insight-callout {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  color: #6b4d0d;
  background: rgba(242, 201, 76, 0.1);
  border: 1px solid rgba(242, 201, 76, 0.32);
  border-radius: 8px;
}

.expert-insight-callout > span {
  flex: 0 0 auto;
  line-height: 1.35;
}

.expert-insight-callout strong,
.expert-insight-callout p {
  color: inherit;
}

.expert-insight-callout strong {
  display: block;
  font-size: 12px;
  font-weight: 900;
}

.expert-insight-callout p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.cash-quality-takeaway {
  color: #174f7c;
  background: rgba(41, 128, 185, 0.06);
  border-color: rgba(41, 128, 185, 0.2);
}

.expert-trend-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.expert-kpi-grid .expert-trend-value,
.expert-kpi-grid .expert-trend-value span {
  display: inline-flex;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.expert-kpi-grid .expert-trend-value span {
  color: inherit;
}

.expert-trend-value.positive {
  color: #137a61;
}

.expert-trend-value.negative {
  color: #c73642;
}

.expert-trend-value.neutral {
  color: #6f7f99;
}

.product-growth-kpi .expert-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 20px;
  margin-top: 0;
  padding: 0 8px;
}

.product-growth-insight {
  display: flex;
  gap: 9px;
  margin-top: 10px;
  padding: 11px 12px;
  color: #6b4d0d;
  background: #fff8e6;
  border: 1px solid #f1dfaa;
  border-radius: 8px;
}

.product-growth-insight > span {
  flex: 0 0 auto;
  line-height: 1.35;
}

.product-growth-insight p {
  margin: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.product-growth-insight strong {
  display: block;
  margin-bottom: 4px;
  color: #5a3d06;
  font-size: 12px;
  font-weight: 900;
}

.product-growth-watch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.product-growth-watch span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  color: #6b4d0d;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(219, 164, 55, 0.26);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.product-growth-call-color {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 8px;
  margin-top: -4px;
  padding: 15px 16px;
  color: #174f7c;
  background: rgba(41, 128, 185, 0.06);
  border: 1px solid rgba(41, 128, 185, 0.2);
  border-left: 4px solid #2f80ed;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.04);
}

.product-growth-call-color strong {
  color: #174f7c;
  font-weight: 900;
}

.product-growth-call-color > div:first-child > strong {
  display: block;
  font-size: 13px;
}

.product-growth-call-color ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #40536d;
  font-size: 13px;
  line-height: 1.6;
}

.product-growth-call-color li.mb-1 {
  margin-bottom: 4px;
}

.product-growth-call-tags {
  display: flex;
  flex-wrap: wrap;
  align-self: start;
  justify-content: flex-start;
  gap: 6px;
  margin-left: 18px;
}

.product-growth-call-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  color: #174f7c;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(47, 128, 237, 0.2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.expert-note {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #e8eff8;
}

.expert-note.compact {
  color: #6f7f99;
  font-size: 11.5px;
}

.expert-more {
  margin-top: 6px;
}

.expert-more summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2f6fdb;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.expert-more summary::-webkit-details-marker {
  display: none;
}

.expert-more summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: #7b8ba3;
  background: #f1f5fa;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
}

.expert-more[open] summary::before {
  content: "−";
}

.expert-more p,
.expert-more ul {
  margin: 5px 0 0;
  color: #596a84;
  font-size: 11px;
  line-height: 1.45;
}

.expert-more ul {
  padding-left: 16px;
}

.expert-more li {
  margin: 3px 0;
}

.expert-more .expert-alert-explainer {
  margin-top: 8px;
}

.expert-empty-card {
  min-height: 180px;
}

.expert-alert-card {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 14px;
  padding: 14px 44px 14px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid #45c4bd;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.expert-alert-card > .expert-info-tooltip {
  position: absolute;
  top: 14px;
  right: 16px;
}

.expert-alert-card > .expert-info-tooltip .expert-tooltip-content {
  right: 0;
  left: auto;
}

.expert-alert-card > .expert-info-tooltip .expert-tooltip-content::before {
  right: 14px;
  left: auto;
}

.expert-alert-card .expert-alert-explainer {
  grid-column: 1 / -1;
}

.expert-alert-card.warning {
  border-left-color: #f0a040;
  background: #fffaf2;
}

.expert-alert-card h2 {
  margin: 0 0 4px;
  color: #17233a;
  font-size: 16px;
}

.expert-alert-card p {
  margin: 0;
  color: #596a84;
  font-size: 12.5px;
  line-height: 1.45;
}

.expert-alert-points {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 17px;
  color: #596a84;
  font-size: 12.5px;
  line-height: 1.45;
}

.expert-alert-points li {
  padding-left: 1px;
}

.expert-alert-points strong {
  color: #253248;
  font-weight: 900;
}

.expert-alert-link {
  display: inline-block;
  margin-top: 8px;
  color: #2f6fdb;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.expert-alert-link:hover {
  text-decoration: underline;
}

.expert-alert-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.expert-alert-metrics div {
  min-width: 0;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #e8eff8;
  border-radius: 8px;
}

.expert-alert-metrics span,
.expert-alert-metrics small {
  display: block;
}

.expert-alert-metrics span {
  color: #6f7f99;
  font-size: 11px;
  font-weight: 900;
}

.expert-alert-metrics strong {
  display: block;
  margin-top: 3px;
  color: #17233a;
  font-size: 18px;
  font-weight: 900;
}

.expert-alert-metrics small {
  margin-top: 2px;
  color: #596a84;
  font-size: 11px;
  line-height: 1.3;
}

.expert-alert-metrics em {
  font-style: normal;
}

.expert-alert-change {
  color: #c2410c;
  font-weight: 900;
}

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

.expert-alert-explainer div {
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid #f0dfc2;
  border-radius: 8px;
}

.expert-alert-explainer strong {
  display: block;
  color: #17233a;
  font-size: 12px;
  font-weight: 900;
}

.expert-alert-explainer p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.inventory-scenario-panel,
.working-capital-panel {
  min-height: auto;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.05);
}

.inventory-scenario-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
  align-items: stretch;
  gap: 16px;
}

.inventory-ratio-chart {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e8eff8;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.05);
}

.inventory-ratio-chart .chart {
  height: 330px;
}

.inventory-signal-stack {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inventory-ratio-note,
.inventory-current-insight {
  min-width: 0;
  padding: 12px 14px;
  color: #4f6178;
  background: #ffffff;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.05);
}

.inventory-ratio-note {
  flex: 0 0 auto;
  border-color: #d8e2ef;
  background: #fbfcfe;
}

.inventory-current-insight {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(41, 128, 185, 0.09) 0%, rgba(41, 128, 185, 0.035) 100%);
  border-color: rgba(41, 128, 185, 0.22);
  border-left: 4px solid #2f80ed;
}

.inventory-ratio-note strong,
.inventory-current-insight > strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #17233a;
  font-size: 13.5px;
  font-weight: 900;
}

.inventory-ratio-note strong span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  color: #315c9b;
  background: #edf4ff;
  border: 1px solid #c9dcfb;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.inventory-current-insight > strong span {
  font-size: 13px;
}

.inventory-ratio-note p,
.inventory-current-insight p {
  margin: 6px 0 0;
  color: #5d6d82;
  font-size: 12.5px;
  line-height: 1.5;
}

.inventory-current-insight p + p {
  margin-top: 8px;
}

.inventory-current-insight p strong {
  color: #17233a;
  font-weight: 900;
}

.inventory-insight-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.inventory-insight-highlights span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: #174f7c;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(47, 128, 237, 0.22);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 900;
}

.inventory-signal-row {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.inventory-signal-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 15px;
  border: 1px solid #dfe9f5;
  border-left: 4px solid #45c4bd;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.05);
  word-break: keep-all;
}

.inventory-signal-card.positive {
  background: rgba(39, 174, 96, 0.04);
  border-color: rgba(39, 174, 96, 0.18);
  border-left-color: #2fb57d;
}

.inventory-signal-card.warning {
  background: rgba(235, 87, 87, 0.04);
  border-color: rgba(235, 87, 87, 0.18);
  border-left-color: #eb5757;
}

.inventory-signal-card strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #17233a;
  font-size: 14.5px;
  font-weight: 900;
}

.inventory-signal-card strong span {
  font-size: 12px;
}

.inventory-signal-card ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: #5d6d82;
  font-size: 12.5px;
  line-height: 1.45;
}

.working-capital-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.working-capital-kpi-banner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.working-capital-kpi-banner div {
  min-width: 0;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #e0e9f5;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.05);
}

.working-capital-kpi-banner span,
.working-capital-kpi-banner strong,
.working-capital-kpi-banner small {
  display: block;
}

.working-capital-kpi-banner span {
  color: #6f7f99;
  font-size: 11px;
  font-weight: 900;
}

.working-capital-kpi-banner strong {
  margin-top: 3px;
  color: #17233a;
  font-size: 23px;
  font-weight: 900;
}

.working-capital-kpi-banner small {
  margin-top: 3px;
  color: #596a84;
  font-size: 12px;
  line-height: 1.35;
}

.working-capital-paired-rows {
  display: grid;
  gap: 16px;
}

.working-capital-paired-row {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(280px, 1fr);
  align-items: start;
  gap: 16px;
}

.working-capital-chart-panel,
.working-capital-info-card {
  min-width: 0;
  padding: 10px 12px 8px;
  border: 1px solid #e8eff8;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.05);
}

.working-capital-chart-panel {
  background: #ffffff;
}

.working-capital-chart-panel .chart {
  height: 246px;
}

.working-capital-info-card {
  padding: 22px 20px;
  border-color: #dfe9f5;
}

.working-capital-info-card.days-info {
  background: rgba(99, 130, 242, 0.05);
  border-color: rgba(99, 130, 242, 0.22);
}

.working-capital-info-card.flow-info {
  background: rgba(39, 174, 96, 0.05);
  border-color: rgba(39, 174, 96, 0.22);
}

.working-capital-info-card > strong {
  display: block;
  color: #17233a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.working-capital-chip {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  padding: 5px 12px;
  color: #315c9b;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(99, 130, 242, 0.2);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.2;
}

.working-capital-info-card.flow-info .working-capital-chip {
  color: #137a61;
  border-color: rgba(39, 174, 96, 0.24);
}

.working-capital-info-card dl {
  display: grid;
  gap: 18px;
  margin: 18px 0 0;
}

.working-capital-info-card dt {
  color: #17233a;
  font-size: 15px;
  font-weight: 900;
}

.working-capital-info-card dd {
  margin: 7px 0 0;
  color: #526279;
  font-size: 15.5px;
  line-height: 1.68;
}

.working-capital-info-card dd strong {
  display: inline;
  color: #17233a;
  font-size: inherit;
  font-weight: 900;
}

.working-capital-info-card dd em {
  color: #c73642;
  font-style: normal;
  font-weight: 900;
}

.expert-pattern-card {
  min-height: auto;
}

.expert-compact-details {
  min-height: auto;
  padding: 10px 12px;
}

.expert-pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.expert-pattern-grid div {
  min-width: 0;
  padding: 11px;
  background: #f8fbff;
  border: 1px solid #e4ecf7;
  border-radius: 8px;
}

.expert-pattern-grid strong {
  display: block;
  color: #17233a;
  font-size: 12px;
  font-weight: 900;
}

.expert-pattern-grid p {
  margin: 6px 0 0;
  color: #596a84;
  font-size: 12px;
  line-height: 1.45;
}

.expert-future-card {
  min-height: auto;
  padding: 10px 12px;
}

.expert-liquidity-card {
  min-height: auto;
}

.expert-liquidity-title {
  gap: 8px;
  flex-wrap: wrap;
}

.expert-liquidity-title .expert-badge {
  margin-top: 0;
}

.expert-liquidity-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.expert-liquidity-strip div {
  min-width: 0;
  padding: 10px;
  background: #f8fbff;
  border: 1px solid #e4ecf7;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.05);
}

.expert-liquidity-strip span,
.expert-liquidity-strip strong,
.expert-liquidity-strip small,
.expert-liquidity-implication {
  display: block;
}

.expert-liquidity-strip span {
  color: #6f7f99;
  font-size: 11px;
  font-weight: 900;
}

.expert-liquidity-strip strong {
  margin-top: 4px;
  color: #17233a;
  font-size: 20px;
  font-weight: 900;
}

.expert-liquidity-strip small {
  margin-top: 3px;
  color: #596a84;
  font-size: 11px;
  line-height: 1.35;
}

.expert-liquidity-implication {
  margin-top: 9px;
  color: #7b889b;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.45;
}

.expert-liquidity-insight {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 13px 14px;
  color: #40536d;
  background: rgba(41, 128, 185, 0.05);
  border: 1px solid rgba(41, 128, 185, 0.16);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.04);
}

.expert-liquidity-insight > span {
  flex: 0 0 auto;
  line-height: 1.35;
}

.expert-liquidity-insight p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.expert-liquidity-insight strong {
  color: #1b5f99;
  font-weight: 900;
}

.expert-watchlist-card {
  min-height: auto;
}

.expert-watchlist-priority {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
  color: #40536d;
  background: rgba(41, 128, 185, 0.055);
  border: 1px solid rgba(41, 128, 185, 0.18);
  border-left: 4px solid #2f80ed;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.04);
}

.expert-watchlist-priority strong {
  flex: 0 0 auto;
  color: #174f7c;
  font-size: 13px;
  font-weight: 900;
}

.expert-watchlist-priority p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
}

.expert-watchlist {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.expert-watchlist-item {
  position: relative;
  min-width: 0;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #e4ecf7;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(23, 35, 58, 0.05);
}

.expert-watchlist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.expert-watchlist-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.expert-watchlist-head .expert-badge {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 0 6px;
  min-height: 20px;
  font-size: 10px;
}

.expert-watchlist-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
}

.expert-watchlist-title {
  display: block;
  margin-top: 0;
  color: #17233a;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.35;
}

.expert-watchlist dl {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 11px 9px;
  margin: 14px 0 0;
}

.expert-watchlist dt,
.expert-watchlist dd {
  min-width: 0;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.3;
}

.expert-watchlist dt {
  color: #6f7f99;
  font-weight: 900;
}

.expert-watchlist dd {
  color: #596a84;
  word-break: break-word;
}

.expert-watchlist dd.expert-watchlist-current {
  color: #17233a;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

.expert-watchlist-condition-label.good,
.expert-watchlist-condition.good {
  color: #137a61;
}

.expert-watchlist-condition-label.caution,
.expert-watchlist-condition.caution {
  color: #c2410c;
}

.expert-watchlist dd.expert-watchlist-condition {
  font-weight: 800;
}

.expert-dashboard-footnote {
  grid-column: 1 / -1;
  margin: -2px 4px 0;
  color: #8a97aa;
  font-size: 12px;
  line-height: 1.55;
}

.summary-top {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 16px;
}

.price-trend-card {
  min-height: 430px;
}

.price-trend-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.price-trend-header h2 {
  margin: 0;
  color: #17233a;
  font-size: 20px;
}

.price-trend-value {
  text-align: right;
}

.call-summary-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.call-summary-card {
  position: relative;
  min-height: 360px;
  padding: 16px 18px 18px 22px;
  overflow: hidden;
}

.call-summary-card::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 4px;
  background: #5c6cf2;
  border-radius: 0 4px 4px 0;
}

.key-summary::before {
  background: #25bdb5;
}

.call-summary-card .chart-head {
  align-items: baseline;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1f7;
}

.call-summary-card .chart-head h2 {
  color: #17233a;
  font-size: 19px;
  line-height: 1.3;
}

.call-summary-card .chart-head span {
  color: #7b8ba3;
  font-size: 13px;
  font-weight: 800;
}

.call-summary-body {
  color: #263246;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.75;
  overflow: visible;
}

.markdown-body.call-summary-body h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.markdown-body.call-summary-body h3 {
  margin: 26px 0 10px;
  color: #17233a;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
}

.markdown-body.call-summary-body h3::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: #5c6cf2;
  border-radius: 999px;
  vertical-align: 0.08em;
}

.key-summary .markdown-body.call-summary-body h3::before {
  background: #25bdb5;
}

.markdown-body.call-summary-body p,
.markdown-body.call-summary-body li {
  color: #263246;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.75;
}

.markdown-body.call-summary-body p {
  margin-bottom: 16px;
}

.markdown-body.call-summary-body ul {
  margin: 0 0 18px 20px;
}

.markdown-body.call-summary-body li {
  margin: 9px 0;
  padding-left: 2px;
}

.markdown-body.call-summary-body strong {
  color: #17233a;
  font-weight: 700;
}

.summary-keyword {
  color: #17233a;
  font-weight: 800;
}

.summary-keyword::after {
  content: ": ";
}

.summary-text {
  color: #263246;
  font-weight: 400;
}

.business-call-summary-card {
  min-height: 0;
  padding: 16px 18px;
}

.business-call-summary-card .chart-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1f7;
}

.business-call-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.business-call-summary-column {
  min-width: 0;
}

.business-call-summary-column + .business-call-summary-column {
  padding-left: 16px;
  border-left: 1px solid #edf1f7;
}

.business-call-summary-column h3 {
  margin: 0 0 10px;
  color: #17233a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.business-call-summary-column ul {
  margin: 0;
  padding-left: 18px;
}

.business-call-summary-column li {
  margin: 9px 0;
  color: #263246;
  font-size: 13.5px;
  line-height: 1.6;
}

.business-call-period {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-right: 7px;
  padding: 0 7px;
  color: #2f46d5;
  background: #eef1ff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  vertical-align: 0.08em;
}

.business-call-empty {
  margin: 0;
  color: #6f7f99;
  font-size: 13px;
  line-height: 1.6;
}

.markdown-body.call-summary-body mark {
  padding: 1px 4px;
  color: #17233a;
  background: #fff1bf;
  border-radius: 4px;
  font-weight: 800;
}

.price-trend-value strong {
  display: block;
  color: #17233a;
  font-size: 30px;
  line-height: 1;
}

.price-trend-value span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.price-trend-value.up span {
  color: #ef4438;
}

.price-trend-value.down span {
  color: #2f6fdb;
}

.price-range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
  border-bottom: 1px solid var(--border);
}

.price-range-tabs button {
  min-height: 32px;
  padding: 0 4px 8px;
  color: #51637d;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 800;
}

.price-range-tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.price-chart {
  height: 230px;
}

.price-stats {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}

.price-stats div {
  min-width: 0;
  padding: 10px 12px;
  background: #f7faff;
  border: 1px solid #e8eff8;
  border-radius: 8px;
}

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

.price-stats dd {
  margin: 5px 0 0;
  color: #17233a;
  font-size: 14px;
  font-weight: 900;
}

.summary-table-stack {
  display: grid;
  gap: 16px;
}

.summary-table-card {
  min-width: 0;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-table-card h2 {
  margin: 0 0 10px;
  color: #17233a;
  font-size: 15px;
}

.summary-table-wrap {
  overflow-x: auto;
}

.summary-table-card table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 12px;
}

.summary-table-card th,
.summary-table-card td {
  padding: 8px 9px;
  border-bottom: 1px solid #e8eff8;
  text-align: right;
  white-space: nowrap;
}

.summary-table-card thead th {
  color: #6f7f99;
  background: #f7faff;
  font-weight: 900;
}

.summary-table-card th:first-child {
  text-align: left;
}

.summary-table-card tbody th {
  color: #17233a;
  font-weight: 900;
}

.summary-table-card td {
  color: #21304a;
  font-weight: 800;
}

.summary-table-card .up {
  color: #ef4438;
}

.summary-table-card .down {
  color: #2f6fdb;
}

.ir-layout {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 320px;
  gap: 16px;
  min-height: 650px;
  font-family: "LINE Seed Sans", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
}

.ir-layout button,
.ir-layout input,
.ir-layout a,
.ir-layout p,
.ir-layout li,
.ir-layout h1,
.ir-layout h2,
.ir-layout h3,
.ir-layout dt,
.ir-layout dd,
.ir-layout span,
.ir-layout strong,
.ir-layout small {
  font-family: inherit;
}

.ir-events,
.ir-document,
.ir-notes {
  min-width: 0;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.ir-panel-head {
  margin-bottom: 12px;
}

.ir-panel-head h2,
.ir-document-head h2 {
  margin: 0;
  color: #17233a;
  font-size: 18px;
}

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

.ir-event {
  width: 100%;
  padding: 12px;
  color: var(--text);
  background: #f7faff;
  border: 1px solid #e7eef7;
  border-radius: 8px;
  text-align: left;
}

.ir-event.active {
  background: #eef4ff;
  border-color: #9fb0ff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.ir-event strong,
.ir-event span,
.ir-event small {
  display: block;
}

.ir-event strong {
  font-size: 14px;
}

.ir-event span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ir-event small {
  margin-top: 8px;
  color: #8a6680;
  font-size: 11px;
  font-weight: 800;
}

.ir-document {
  display: flex;
  flex-direction: column;
  min-height: 650px;
}

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

.ir-document-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ir-doc-actions {
  display: flex;
  gap: 8px;
}

.ir-download {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #12382f;
  background: #f5fffe;
  border: 1px solid #91dfda;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.ir-doc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.ir-doc-tabs button {
  min-height: 34px;
  padding: 0 12px;
  color: #51637d;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 800;
}

.ir-doc-tabs button.active {
  color: #17233a;
  background: #fff;
  border-color: #9fb0ff;
  box-shadow: inset 0 -3px 0 var(--accent);
}

.ir-doc-text {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: #25344d;
  background: #fbfdff;
  border: 1px solid #e7eef7;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.75;
}

.ir-doc-text.ir-summary-doc {
  padding: 0;
  background: transparent;
  border: 0;
}

.ir-doc-text.ir-slide-doc {
  padding: 0;
  overflow: hidden;
  background: #303241;
  border-color: #303241;
}

.ir-slide-viewer {
  height: min(78vh, 860px);
  min-height: 620px;
  background: #303241;
}

.ir-slide-viewer iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #303241;
}

.ir-summary-doc .call-summary-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}

.ir-summary-doc .call-summary-card {
  min-height: auto;
  box-shadow: none;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin: 0 0 14px;
  color: #0f1d35;
  line-height: 1.35;
}

.markdown-body h1 {
  font-size: 22px;
}

.markdown-body h2 {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #e7eef7;
  font-size: 17px;
}

.markdown-body h3 {
  margin-top: 20px;
  font-size: 15px;
}

.markdown-body p {
  margin: 0 0 16px;
  color: #10233f;
  font-weight: 600;
}

.markdown-body strong {
  color: #071a34;
  font-weight: 900;
}

.markdown-body em {
  color: #31435f;
}

.markdown-body code {
  padding: 2px 5px;
  color: #1c4a66;
  background: #edf7fb;
  border: 1px solid #d6edf5;
  border-radius: 5px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.markdown-body mark {
  padding: 2px 5px;
  color: #13223a;
  background: linear-gradient(180deg, rgba(255, 235, 135, 0.35) 0%, rgba(255, 214, 92, 0.65) 100%);
  border-radius: 5px;
  box-decoration-break: clone;
}

.translation-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.translation-section {
  margin: 0 0 22px;
  padding: 18px;
  background: #f8fbff;
  border: 1px solid #dce7f5;
  border-radius: 12px;
}

.translation-section > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  color: #13233d;
}

.translation-pair > section {
  min-width: 0;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.75;
}

.translation-pair > section > h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  color: var(--accent-2);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.translation-pair h2 {
  font-size: 16px;
  line-height: 1.45;
}

.translation-pair h3 {
  font-size: 15px;
  line-height: 1.45;
}

.translation-pair p,
.translation-pair li {
  font-size: 14px;
  line-height: 1.75;
}

.markdown-body ul {
  margin: 0 0 16px 18px;
  padding: 0;
}

.markdown-body li {
  margin: 6px 0;
  color: #10233f;
  font-weight: 600;
}

.ir-notes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ir-snapshot-section {
  padding: 12px;
  background: #fbfdff;
  border: 1px solid #e4ebf5;
  border-radius: 8px;
}

.ir-snapshot-section h3 {
  margin: 0;
  color: #17233a;
  font-size: 13px;
}

.ir-snapshot-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ir-snapshot-head span {
  color: #7b8ba3;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.takeaway-section {
  background: #f2fbff;
  border-color: #d7edf6;
}

.takeaway-list {
  display: grid;
  gap: 9px;
}

.takeaway-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.sentiment-icon {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #11a36a;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(17, 163, 106, 0.14);
}

.takeaway-item.positive .sentiment-icon {
  background: #11a36a;
  box-shadow: 0 0 0 4px rgba(17, 163, 106, 0.14);
}

.takeaway-item.negative .sentiment-icon {
  background: #e91f4f;
  box-shadow: 0 0 0 4px rgba(233, 31, 79, 0.14);
}

.takeaway-item.neutral .sentiment-icon {
  background: #f2b705;
  box-shadow: 0 0 0 4px rgba(242, 183, 5, 0.18);
}

.takeaway-item p {
  margin: 0;
  color: #4f5d70;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.55;
}

.takeaway-item p strong,
.takeaway-item p mark {
  color: #263449;
  font-weight: 900;
}

.takeaway-more {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #d7edf6;
}

.takeaway-more summary,
.source-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #2f6fdb;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.takeaway-more summary::-webkit-details-marker,
.source-section summary::-webkit-details-marker {
  display: none;
}

.takeaway-more summary::after,
.source-section summary::after {
  content: "+";
  color: #7b8ba3;
  font-size: 16px;
  line-height: 1;
}

.takeaway-more[open] summary::after,
.source-section[open] summary::after {
  content: "−";
}

.takeaway-more .takeaway-list {
  margin-top: 10px;
}

.metric-section {
  background: #fff;
}

.compact-section {
  padding: 10px 12px;
}

.ir-metric-list {
  margin: 0;
}

.ir-metric-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid #e4ebf5;
}

.ir-metric-list div:first-child {
  border-top: 0;
}

.ir-metric-list dt {
  color: #4f5d70;
  font-size: 12px;
  font-weight: 700;
}

.ir-metric-list dd {
  margin: 0;
  color: #3f4b5d;
  font-size: 12.5px;
  font-weight: 900;
  text-align: right;
}

.ir-metric-list dd.positive {
  color: #0b8d57;
}

.ir-metric-list dd.negative {
  color: #d6284f;
}

.ir-source-links {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.ir-source-links a,
.ir-source-links span {
  color: #2f6fdb;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  word-break: break-word;
}

.source-section {
  padding: 10px 12px;
}

.source-section summary span {
  color: #17233a;
  font-size: 13px;
}

.source-section summary small {
  color: #7b8ba3;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.empty-state,
.status {
  margin: 0 18px 18px;
  padding: 18px;
  color: #586b84;
  background: #fff;
  border: 1px dashed #c7d4e6;
  border-radius: 8px;
}

.hidden {
  display: none !important;
}

.report-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 28px rgba(31, 45, 69, 0.12);
  z-index: 5;
  overflow: auto;
}

.drawer-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.icon-button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  border-radius: 6px;
  color: var(--text);
}

.report-list {
  padding: 12px;
}

.report-row {
  width: 100%;
  margin-bottom: 8px;
  padding: 12px;
  text-align: left;
  color: var(--text);
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.report-row strong {
  display: block;
}

.report-row span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1400px) {
  .expert-segment-layout {
    grid-template-columns: 1fr;
  }

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

  .expert-summary-grid > div:nth-child(3n) .expert-tooltip-content {
    right: 0;
    left: auto;
  }

  .expert-summary-grid > div:nth-child(3n) .expert-tooltip-content::before {
    right: 14px;
    left: auto;
  }

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

@media (max-width: 1320px) {
  .inventory-scenario-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 280px 1fr;
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .analysis-signal-card,
  .analysis-item-grid,
  .analysis-card-explainer .analysis-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-signal-card > div:first-child {
    grid-column: 1 / -1;
  }

  .analysis-signal-card dl {
    grid-column: 1 / -1;
  }

  .analysis-document-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .analysis-toc {
    position: static;
    max-height: none;
    order: -1;
  }

  .expert-summary-layout,
  .expert-segment-layout {
    grid-template-columns: 1fr;
  }

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

  .expert-alert-explainer,
  .expert-pattern-grid,
  .expert-watchlist,
  .expert-liquidity-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expert-alert-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .expert-panel-row {
    grid-template-columns: 1fr;
  }

  .expert-focus-chart .chart {
    height: 280px;
    min-height: 280px;
  }

  .expert-guide ul {
    grid-template-columns: 1fr;
  }

  .expert-summary-grid,
  .expert-watchlist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-growth-call-color {
    grid-template-columns: 1fr;
  }

  .product-growth-call-tags {
    justify-content: flex-start;
  }

  .expert-summary-grid > div:nth-child(2n) .expert-tooltip-content {
    right: 0;
    left: auto;
  }

  .expert-summary-grid > div:nth-child(2n) .expert-tooltip-content::before {
    right: 14px;
    left: auto;
  }

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

  .expert-chart-pair {
    grid-template-columns: 1fr;
  }

  .inventory-scenario-layout {
    grid-template-columns: 1fr;
  }

  .working-capital-paired-row {
    grid-template-columns: 1fr;
  }

  .expert-segment-layout {
    grid-template-columns: 1fr;
  }

  .expert-segment-insight-band {
    grid-template-columns: 1fr;
  }

  .expert-hero {
    grid-template-columns: 1fr;
  }

  .expert-hero-note {
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid #dce7f4;
  }
}

@media (max-width: 820px) {
  .app-shell {
    height: auto;
    overflow: visible;
  }

  .topbar {
    height: auto;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .workspace {
    display: block;
    height: auto;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .main-panel {
    height: auto;
    overflow: visible;
  }

  .content-grid {
    grid-template-columns: 1fr;
    padding: 0 12px 20px;
  }

  .summary-top {
    grid-template-columns: 1fr;
  }

  .call-summary-grid {
    grid-template-columns: 1fr;
  }

  .business-call-summary-grid {
    grid-template-columns: 1fr;
  }

  .business-call-summary-column + .business-call-summary-column {
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid #edf1f7;
    border-left: 0;
  }

  .chart-card.wide {
    grid-column: auto;
  }

  .expert-hero,
  .expert-summary-layout,
  .expert-segment-layout,
  .expert-chart-pair,
  .expert-kpi-grid,
  .expert-summary-grid,
  .expert-alert-explainer,
  .expert-pattern-grid,
  .expert-watchlist,
  .working-capital-kpi-banner,
  .expert-liquidity-strip {
    grid-template-columns: 1fr;
  }

  .expert-alert-card {
    grid-template-columns: 1fr;
  }

  .expert-hero-questions {
    grid-template-columns: 1fr;
  }

  .expert-question-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .expert-alert-metrics {
    grid-template-columns: 1fr;
  }

  .expert-hero-note {
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid #dce7f4;
  }

  .expert-chart-small {
    height: 280px;
  }

  .price-trend-header {
    display: block;
  }

  .price-trend-value {
    margin-top: 12px;
    text-align: left;
  }

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

  .ir-layout {
    grid-template-columns: 1fr;
  }

  .news-page-item {
    grid-template-columns: 1fr;
  }

  .news-page-thumb {
    width: 100%;
    max-width: 360px;
  }

  .analysis-hero,
  .analysis-signal-card {
    display: block;
  }

  .analysis-hero small {
    display: block;
    margin-top: 12px;
  }

  .analysis-note-hero,
  .analysis-note-actions,
  .analysis-subsection-head {
    display: block;
  }

  .analysis-note-actions {
    margin-top: 12px;
  }

  .analysis-history-head,
  .analysis-version-item {
    grid-template-columns: 1fr;
  }

  .analysis-history-head,
  .analysis-history-actions {
    display: grid;
    justify-content: stretch;
  }

  .analysis-version-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .analysis-version-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

  .analysis-note-actions .ghost-button,
  .analysis-section-edit {
    margin-top: 10px;
  }

  .analysis-chapter {
    padding: 18px;
  }

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

  .analysis-signal-card dl,
  .analysis-item-grid,
  .analysis-card-explainer .analysis-item-grid,
  .analysis-risk-list {
    grid-template-columns: 1fr;
    margin-top: 14px;
  }

  .translation-pair {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-drawer {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .expert-watchlist-priority {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .expert-summary-grid,
  .expert-alert-metrics,
  .expert-alert-explainer,
  .expert-pattern-grid,
  .expert-watchlist,
  .expert-kpi-grid,
  .expert-hero-questions,
  .inventory-signal-row {
    grid-template-columns: 1fr;
  }

  .expert-summary-grid > div > strong {
    font-size: 18px;
  }

  .expert-info-tooltip,
  .expert-badge-tooltip {
    position: static;
  }

  .expert-tooltip-content,
  .expert-badge-tooltip .expert-tooltip-content,
  .expert-summary-grid > div:nth-child(4) .expert-tooltip-content,
  .expert-summary-grid > div:nth-child(5) .expert-tooltip-content {
    right: auto;
    left: 0;
    width: min(300px, calc(100vw - 48px));
    min-width: 0;
    max-width: none;
  }

  .expert-tooltip-content::before,
  .expert-badge-tooltip .expert-tooltip-content::before,
  .expert-summary-grid > div:nth-child(4) .expert-tooltip-content::before,
  .expert-summary-grid > div:nth-child(5) .expert-tooltip-content::before {
    right: auto;
    left: 14px;
  }

  .expert-alert-card {
    grid-template-columns: 1fr;
  }

  .expert-hero {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .expert-chart-small {
    height: 250px;
  }

  .analysis-editor .analysis-image-row,
  .analysis-markdown .analysis-image-row {
    flex-direction: column;
  }

  .analysis-editor .analysis-image-row > .analysis-image-resizer,
  .analysis-markdown .analysis-image-row > .analysis-image-resizer {
    width: 100% !important;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  html,
  body {
    width: auto;
    height: auto;
    overflow: visible;
    color: #111827;
    background: #ffffff;
  }

  .topbar,
  .sidebar,
  .toolbar,
  .analysis-note-actions,
  .analysis-history-panel,
  .analysis-toc,
  .analysis-section-edit,
  .analysis-editor-toolbar,
  .analysis-editor-actions,
  .analysis-cancel-button {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .main-panel,
  .content-grid,
  .analysis-page,
  .analysis-document-layout,
  .analysis-document {
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  .analysis-page {
    gap: 0;
  }

  .analysis-note-hero,
  .analysis-chapter {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
  }

  .analysis-note-hero {
    display: block;
    padding: 0 0 10mm;
    border-bottom: 1px solid #d1d5db;
  }

  .analysis-note-hero p {
    color: #374151;
    font-size: 10pt;
  }

  .analysis-note-hero h1 {
    color: #111827;
    font-size: 24pt;
  }

  .analysis-note-hero span {
    color: #4b5563;
    font-size: 10pt;
  }

  .analysis-chapter {
    break-before: page;
    page-break-before: always;
    padding: 0;
  }

  .analysis-chapter:first-child {
    break-before: auto;
    page-break-before: auto;
  }

  .analysis-chapter-head {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 0 0 6mm;
    border-bottom: 1px solid #d1d5db;
  }

  .analysis-chapter-head > span {
    min-width: 34px;
    min-height: 34px;
    color: #ffffff;
    background: #111827;
    font-size: 14pt;
  }

  .analysis-chapter-head h2 {
    color: #111827;
    font-size: 18pt;
  }

  .analysis-subsection-stack {
    gap: 8mm;
    margin-top: 7mm;
  }

  .analysis-subsection {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .analysis-subsection + .analysis-subsection {
    padding-top: 6mm;
    border-top: 1px solid #e5e7eb;
  }

  .analysis-subsection-head {
    cursor: default;
  }

  .analysis-subsection-head > div {
    padding-left: 0;
  }

  .analysis-subsection-head > div::before {
    display: none;
  }

  .analysis-subsection-head span,
  .analysis-subsection-head h3 {
    color: #111827;
    font-size: 14pt;
  }

  .analysis-markdown {
    color: #111827;
    font-size: 10.5pt;
    line-height: 1.55;
  }

  .analysis-markdown h2 {
    font-size: 13pt;
  }

  .analysis-markdown h3,
  .analysis-markdown h4 {
    font-size: 11.5pt;
  }

  .analysis-markdown blockquote {
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-left: 3px solid #6b7280;
    font-size: 10.5pt;
  }

  .analysis-markdown a {
    color: #111827;
    text-decoration: none;
  }

  .analysis-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible;
    border: 0;
  }

  .analysis-table-wrap table,
  .analysis-markdown table {
    width: 100%;
    min-width: 0;
    font-size: 8.5pt;
  }

  .analysis-table-wrap th,
  .analysis-table-wrap td,
  .analysis-markdown th,
  .analysis-markdown td {
    padding: 5px 6px;
    border-color: #d1d5db;
  }

  .analysis-markdown img {
    max-height: 170mm;
    border: 1px solid #d1d5db;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
