.stock-navigation { display: flex; gap: 18px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.stock-navigation a { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 9px; border-bottom: 2px solid transparent; color: var(--muted); white-space: nowrap; font-size: 14px; }
.stock-navigation a.active { color: var(--blue); border-color: var(--blue); font-weight: 650; }
#stocks-content { min-width: 0; }
.stock-status { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 20px 0 12px; }
.stock-date-label { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stock-note { color: var(--muted); font-size: 13px; line-height: 1.8; padding: 10px 0; overflow-wrap: anywhere; }
.stock-note.warning { color: var(--red); padding-left: 12px; border-left: 3px solid var(--red); margin: 8px 0; }
.stock-section { padding: 24px 0; border-top: 1px solid var(--line); min-width: 0; }
.stock-section-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 18px; }
.stock-section-heading h2 { font-size: 16px; line-height: 1.6; color: var(--ink); }
.stock-section-heading .muted { line-height: 1.8; }
.stock-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; padding: 24px 0; border-top: 1px solid var(--line); }
.stock-metric { display: flex; flex-direction: column; gap: 9px; min-width: 0; border-left: 2px solid var(--line); padding-left: 16px; }
.stock-metric > span { color: var(--muted); font-size: 13px; }
.stock-metric > strong { font-size: 23px; line-height: 1.5; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stock-metric > small { font-size: 12px; line-height: 1.6; }
.stock-chart { position: relative; height: 330px; width: 100%; min-width: 0; overflow: hidden; }
.stock-chart canvas { display: block; max-width: 100%; }
.stock-chart-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 30px; }
.stock-table-controls { display: flex; gap: 15px; align-items: center; margin-bottom: 6px; }
.stock-table-controls input { max-width: 260px; flex: 1; min-height: 37px; }
.stock-sort { background: transparent; border: 0; padding: 0; min-height: 24px; white-space: nowrap; font-size: 12px; color: var(--muted); font-weight: 600; }
.stock-sort:hover { background: transparent; color: var(--blue); }
.stock-table td { font-variant-numeric: tabular-nums; font-size: 13px; }
.stock-table td a { color: var(--blue); }
.stock-table td a:hover { text-decoration: underline; }
.stock-section .table-wrapper { max-width: 100%; }
.stock-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 14px; min-height: 42px; }
.stock-pagination .icon-button { border: 1px solid var(--line); }
.stock-segments { display: flex; border-bottom: 1px solid var(--line); gap: 18px; }
.stock-segments button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; min-width: 70px; color: var(--muted); }
.stock-segments button[aria-selected=true] { color: var(--blue); border-color: var(--blue); font-weight: 650; }
.stock-briefing { padding: 22px 0 4px; max-width: 1100px; }
.stock-report-meta { color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.stock-prose { font-size: 16px; color: var(--ink); line-height: 1.95; margin: 12px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
h3.stock-prose { font-size: 17px; font-weight: 650; padding-top: 12px; }
.stock-prose a { color: var(--blue); }
.stock-briefing-details { padding-top: 14px; margin-top: 16px; border-top: 1px solid var(--line); }
.stock-briefing-details > summary { cursor: pointer; font-size: 13px; color: var(--blue); line-height: 1.9; }
.stock-settings { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.stock-settings legend { font-size: 14px; margin-bottom: 18px; }
.stock-settings label { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
@media(max-width:740px) {
  .stock-navigation { gap: 7px; }
  .stock-navigation a { gap: 6px; font-size: 13px; padding: 0 9px; }
  .stock-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 23px 12px; }
  .stock-metric { padding-left: 10px; }
  .stock-metric > strong { font-size: 20px; }
  .stock-chart-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
  .stock-chart { height: 315px; }
  .stock-segments { gap: 3px; }
  .stock-segments button { min-width: 63px; }
  .stock-section { padding: 21px 0; }
  .stock-section-heading { gap: 7px; }
  .stock-section-heading .muted { width: 100%; }
  .stock-settings { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Stock extensions share the existing unframed sections and chart lifecycle. */
.stock-ext-block { min-width: 0; }
.stock-ext-review-tabs { margin-top: 18px; }
.stock-ext-rotation-tabs { overflow-x: auto; }
.stock-ext-rotation-tabs button { flex-shrink: 0; }
.stock-ext-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 2px 0 16px; }
.stock-ext-select-label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; min-width: 0; }
.stock-ext-select-label select { min-width: 130px; max-width: 300px; min-height: 38px; }
.stock-ext-controls .icon-button { flex: 0 0 38px; width: 38px; height: 38px; border: 1px solid var(--line); }
.stock-ext-request-status { font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.stock-ext-members-body { min-width: 0; min-height: 42px; }
.stock-ext-text-cell { display: inline-block; white-space: normal; overflow-wrap: anywhere; min-width: 160px; max-width: 360px; line-height: 1.8; }
.stock-ext-theme-detail .stock-metric > strong { font-size: 21px; }
.stock-heatmap-chart { position: relative; width: 100%; height: 600px; min-width: 0; margin: 14px 0 24px; overflow: hidden; background: var(--surface-2); }
.stock-heatmap-chart canvas { display: block; max-width: 100%; }
.stock-heatmap-caption { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 12px 0 0; overflow-wrap: anywhere; }
.stock-ext-heatmap > .stock-section { padding-bottom: 0; }
.stock-heatmap-legend { display: flex; flex-wrap: wrap; gap: 9px 16px; padding: 8px 0 3px; }
.stock-heatmap-key { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.stock-heatmap-key i { display: inline-block; width: 13px; height: 13px; border-radius: 2px; background: #b7bec8; }
.stock-heatmap-key.down-strong i { background: #1c704c; }
.stock-heatmap-key.down i { background: #3c8c64; }
.stock-heatmap-key.down-light i { background: #8bb79b; }
.stock-heatmap-key.flat i { background: #e2e8ed; border: 1px solid #c6cdd6; }
.stock-heatmap-key.up-light i { background: #edaaaa; }
.stock-heatmap-key.up i { background: #d45b64; }
.stock-heatmap-key.up-strong i { background: #bf2f41; }
@media(max-width:740px) {
  .stock-ext-select-label { flex: 1 1 180px; }
  .stock-ext-select-label select { flex: 1; width: 100%; min-width: 0; max-width: 100%; }
  .stock-ext-request-status { flex-basis: 100%; }
  .stock-ext-text-cell { min-width: 150px; max-width: 260px; }
  .stock-heatmap-chart { height: 640px; }
  .stock-heatmap-legend { gap: 8px 14px; }
}
