/* Shared mobile text roles. No downloaded fonts and no changes to application behavior. */
:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --font-caption: .75rem;
  --font-small: .8125rem;
  --font-body: .875rem;
  --font-section: 1rem;
  --font-heading: 1.125rem;
  --font-title: 1.25rem;
  --font-title-lg: 1.375rem;
  --font-display: 1.5rem;
  --font-display-lg: 1.625rem;
  --font-hero: 1.75rem;
  --font-score: 2rem;
  --header-h: 4rem;
  --nav-h: 4.5rem;
  font-family: var(--font-ui);
  font-size: 100%;
}
body { font-size: var(--font-section); line-height: 1.5; }
button, input, select, textarea { font-family: inherit; line-height: 1.5; }
/* 16px inputs prevent the browser from zooming the page on focus. */
input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: var(--font-section) !important; }
small { font-size: var(--font-caption); line-height: 1.5; }
code, kbd, pre, .mono { font-family: var(--font-mono); }
.page-header h1 { font-size: var(--font-title); line-height: 1.4; }
.panel > header strong, .panel > header .panel-heading strong,
.mobile-section > h3, #watch-content .mobile-section > h3,
.technical-mobile-v2 > header strong { font-size: var(--font-section); line-height: 1.5; }
.panel > header { flex-wrap: wrap; row-gap: 4px; padding-top: 8px; padding-bottom: 8px; }
.panel > header .panel-heading { flex-wrap: wrap; }
.panel > header .panel-heading span, .panel > header .panel-updated,
.technical-mobile-v2 > header small { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.technical-mobile-v2 > header { flex-wrap: wrap; }
.technical-mobile-v2 > header div { flex-wrap: wrap; }
.mobile-section > h3 { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.mobile-section > h3 > span { white-space: normal; }
.page-header p { white-space: normal; line-height: 1.5; }
.metric span, .metric small { line-height: 1.5; white-space: normal; }
.metric strong, .capital-metrics-mobile .metric strong,
.selection-overview-grid .metric > strong, .membership-metrics .metric strong { line-height: 1.3; }
.selection-overview-grid .metric { min-height: 70px; }
.report-hero p, .report-section p, .settings-card p,
.technical-conclusion-mobile p, .technical-analysis-hero-mobile p,
.fund-ai-copy-mobile p, .research-use-note, .research-mobile-stock p,
.event-v2-mobile-ai { font-size: var(--font-section); line-height: 1.7; }
.report-section > strong, .technical-conclusion-mobile article > strong { font-size: var(--font-heading); line-height: 1.5; }
.technical-analysis-hero-mobile > article > strong { font-size: var(--font-section); line-height: 1.5; }
.fund-ai-copy-mobile p b { font-size: inherit; }
.membership-comparison { font-size: var(--font-small); }
.membership-result-gate strong, .membership-result-gate.banner strong,
.membership-result-gate.card strong { font-size: var(--font-body); }
.membership-result-gate.card { grid-template-columns: 24px minmax(0, 1fr); }
.membership-result-gate.card > button { grid-column: 2; grid-row: 3; justify-self: end; }
.tabs button, .technical-mobile-v2 > nav button, .mini-button { height: auto; min-height: 36px; }
.notification-button b { height: auto; min-height: 20px; min-width: 20px; }
.chart-legend-mobile { flex-wrap: wrap; }
/* SVG's viewBox used to shrink 720-unit chart labels to half their declared size. */
.technical-chart-mobile, .research-timeline-mobile { overflow-x: auto; }
.technical-chart-mobile svg { min-width: 720px; min-height: 210px; }
.research-timeline-mobile svg { min-width: 360px; }
/* Narrow screens wrap text instead of shrinking it back to 7–9px. */
@media (max-width: 480px) {
  .research-regime-mobile-v3 > section, .research-score-mobile,
  .sentiment-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-regime-mobile-v3 > section span, .research-score-mobile span,
  .tail-stock-facts span, .tail-subscribe-guide span,
  .research-evidence-summary-v3 span { white-space: normal; line-height: 1.5; }
  .top-actions { gap: 4px; }
  :root { --header-h: 5rem; }
  .top-actions { display: grid; grid-template-columns: repeat(3, auto); }
  .sync-indicator { grid-column: 1 / -1; max-width: none; justify-content: flex-end; }
  .membership-entry { min-width: 0; flex-wrap: wrap; justify-content: center; height: auto; min-height: 40px; gap: 2px 4px; }
  .brand-lockup { gap: 6px; }
  .brand-lockup strong { font-size: var(--font-body); }
  .brand-lockup img { width: 28px; height: 28px; }
}

/* Stock technical overview is a scan summary, not long-form report prose. */
.technical-conclusion-mobile article > strong {
  font-size: var(--font-small);
  line-height: 1.4;
}
.technical-conclusion-mobile article p {
  font-size: var(--font-caption);
  line-height: 1.45;
}

/* AI stock reports are dense research views, not long-form reading pages. */
.ai-report-mobile .report-hero > p {
  font-size: var(--font-small);
  line-height: 1.55;
}
.ai-report-mobile .fund-summary-mobile {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
}
.ai-report-mobile .fund-summary-mobile article {
  min-height: 0;
  padding: 9px;
}
.ai-report-mobile .fund-summary-mobile p {
  margin-top: 6px;
  font-size: var(--font-caption);
  line-height: 1.5;
  -webkit-line-clamp: 3;
}
.ai-report-mobile .fund-summary-watch {
  grid-column: 1 / -1;
}
.ai-report-mobile .fund-summary-watch p {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}
.ai-report-mobile .fund-fact-grid-mobile {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ai-report-mobile .fund-fact-wide {
  grid-column: 1 / -1;
}
.ai-report-mobile .fund-fact-grid-mobile span {
  padding: 7px 8px;
}
.ai-report-mobile .fund-fact-grid-mobile b,
.ai-report-mobile .fund-ai-copy-mobile p,
.ai-report-mobile .fund-ai-copy-mobile p b {
  font-size: var(--font-caption);
  line-height: 1.5;
}
.ai-report-mobile .fund-ai-copy-mobile p {
  padding: 9px 10px;
}
.ai-report-mobile .factor-brief-mobile {
  margin: 0;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: var(--surface-2);
}
.ai-report-mobile .factor-brief-mobile b,
.ai-report-mobile .factor-brief-mobile p {
  font-size: var(--font-small);
}
.ai-report-mobile .factor-brief-mobile p {
  margin: 5px 0 0;
  line-height: 1.55;
}
.ai-technical-interpretation-mobile {
  overflow: hidden;
}
.ai-technical-interpretation-list .report-section {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-soft);
}
.ai-technical-interpretation-list .report-section:last-child {
  border-bottom: 0;
}
.ai-technical-interpretation-list .report-section > strong,
.analysis-conclusion-mobile .report-section > strong {
  font-size: var(--font-small);
  line-height: 1.4;
}
.ai-technical-interpretation-list .report-section p,
.analysis-conclusion-mobile .report-section p {
  margin-top: 5px;
  font-size: var(--font-small);
  line-height: 1.55;
}
.analysis-conclusion-mobile .report-section {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-soft);
}
.analysis-conclusion-mobile .report-section:last-child {
  border-bottom: 0;
}

/* Watchlist: quote, factors and commands form one dense, scannable record. */
.watchlist-stock-card {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.watchlist-stock-card:last-child {
  border-bottom: 0;
}
.watchlist-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 7px 7px 6px 10px;
}
.watchlist-stock-primary {
  min-width: 0;
  min-height: 43px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background: transparent;
  text-align: left;
}
.watchlist-stock-identity,
.watchlist-stock-quote {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.watchlist-stock-identity strong,
.watchlist-stock-identity code,
.watchlist-stock-quote strong,
.watchlist-stock-quote small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.watchlist-stock-identity strong,
.watchlist-stock-quote strong {
  font-size: var(--font-small);
  line-height: 1.35;
}
.watchlist-stock-identity code,
.watchlist-stock-quote small {
  color: var(--muted);
  font-size: var(--font-caption);
}
.watchlist-stock-quote {
  text-align: right;
}
.watchlist-card-head .stock-inline-actions {
  position: static;
  margin: 0;
  padding: 2px;
}
.watchlist-card-head .stock-tool {
  width: 27px;
  height: 29px;
}
.watchlist-card-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 9px 6px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
}
.watchlist-card-facts span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 4px 3px;
  border-left: 1px solid var(--line-soft);
  background: var(--surface-2);
}
.watchlist-card-facts span:first-child {
  border-left: 0;
}
.watchlist-card-facts small,
.watchlist-card-facts b {
  overflow: hidden;
  font-size: var(--font-caption);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.watchlist-card-facts small {
  color: var(--faint);
}
.watchlist-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 5px 7px 6px;
  border-top: 1px solid var(--line-soft);
}
.watchlist-card-footer .intelligence-entry-mobile,
.watchlist-card-footer .email-subscription-toggle {
  width: auto;
  min-width: 0;
  min-height: 30px;
  margin: 0;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  box-shadow: none;
  white-space: nowrap;
}
.watchlist-card-footer .intelligence-entry-mobile span {
  padding: 1px 4px;
}
.watchlist-card-footer .intelligence-entry-mobile strong,
.watchlist-card-footer .email-subscription-toggle strong {
  font-size: var(--font-caption);
}
.watchlist-card-footer .intelligence-entry-mobile i,
.watchlist-card-footer .email-subscription-toggle > i {
  color: var(--faint);
  font-size: var(--font-caption);
  font-style: normal;
}

/* Strategy catalog: equal data columns and a single restrained command toolbar. */
.strategy-run-card {
  padding: 9px 10px;
}
.strategy-run-card .run-head {
  align-items: center;
}
.strategy-run-card .run-logo {
  width: 28px;
  height: 28px;
}
.strategy-run-card .run-name {
  align-items: center;
  gap: 7px;
}
.strategy-run-card .run-name strong {
  display: block;
  overflow: hidden;
  font-size: var(--font-small);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strategy-run-card .strategy-card-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0;
  font-size: var(--font-caption);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.strategy-run-card .run-metrics {
  grid-template-columns: minmax(76px, .65fr) minmax(0, 1.35fr);
  gap: 0;
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.strategy-run-card .run-metrics div {
  min-width: 0;
  padding: 6px 7px;
  border-left: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}
.strategy-run-card .run-metrics div:first-child {
  border-left: 0;
}
.strategy-run-card .strategy-last-run {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  border-left: 0;
}
.strategy-run-card .run-metrics span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  overflow: hidden;
  font-size: var(--font-caption);
  white-space: nowrap;
}
.strategy-run-card .run-metrics b {
  min-height: 0;
  margin-top: 3px;
  overflow: hidden;
  font-size: var(--font-caption);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strategy-run-card .strategy-last-run b {
  margin-top: 0;
  overflow: visible;
  text-align: right;
  text-overflow: clip;
  white-space: normal;
}
.strategy-run-status {
  flex: 0 0 auto;
  font-style: normal;
}
.strategy-run-status .tag {
  min-height: 17px;
  padding: 0 4px;
  font-size: var(--font-caption);
  line-height: 1;
}
.strategy-run-card .strategy-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}
.strategy-run-card .strategy-card-actions .mini-button {
  min-width: 0;
  min-height: 32px;
  flex: 1 1 0;
  padding: 0 7px;
  font-size: var(--font-caption);
  white-space: nowrap;
}
