/* Market history around events (src/dashboard/event-history.js, docs/event-history.md). Colours come from app.css's variables, so dark mode follows. Up and down are the app's usual --pos and --neg for a change
   that was positive or negative; nothing else is coloured good or bad. Phone first: every list wraps by the width it has, a table scrolls inside its own box, nothing is wider than the screen, and logical
   properties keep it right to left in Hebrew. */
.eh-slot { display: grid; gap: 12px; }
.eh-slot:empty { display: none; }
.eh-page { min-width: 0; }
.eh-card, .eh-intro, .eh-library, .eh-body { min-width: 0; }
.eh-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.eh-section { margin: 0; font-size: 18px; }
.eh-title { margin: 4px 0 6px; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.eh-lead { margin: 0 0 6px; overflow-wrap: anywhere; }
.eh-card p, .eh-intro p, .eh-body p { overflow-wrap: anywhere; }
.eh-when { white-space: normal; }
.eh-controls { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; margin: 8px 0; }
.eh-pick { display: grid; gap: 4px; min-width: 0; }
.eh-pick select { max-width: 100%; }
.eh-pct { font-variant-numeric: tabular-nums; white-space: nowrap; unicode-bidi: isolate; }
.eh-pct.pos { color: var(--pos); }
.eh-pct.neg { color: var(--neg); }
.eh-table { width: 100%; border-collapse: collapse; }
.eh-table th, .eh-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.eh-table th.num, .eh-table td.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eh-table thead th { font-size: 12px; font-weight: 600; color: var(--muted); }
.eh-table tbody th { font-weight: 500; overflow-wrap: anywhere; min-width: 7em; }
.eh-case-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.eh-studies { list-style: none; margin: 8px 0 0; padding: 0; display: grid; }
.eh-study { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; min-width: 0; }
.eh-study:hover .eh-study-title { text-decoration: underline; }
.eh-study-title { font-weight: 600; overflow-wrap: anywhere; }
.eh-study span { overflow-wrap: anywhere; }
.eh-tabs { max-width: 100%; flex-wrap: wrap; }
.eh-tabs button { white-space: normal; min-height: 32px; }
.eh-colhead { margin: 0 0 6px; font-size: 17px; overflow-wrap: anywhere; }
.eh-facts dd, .eh-facts dt { overflow-wrap: anywhere; }
.eh-pending { margin: 6px 0; padding-inline-start: 18px; }
.eh-cases h3 { margin: 12px 0 6px; font-size: 15px; }
.eh-cases .btn { margin-top: 8px; }
.eh-foot { padding: 4px 2px 12px; }
.eh-foot p { margin: 2px 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  dl.rows.eh-facts > div { display: block; }
  dl.rows.eh-facts dt { margin-bottom: 2px; font-weight: 600; }
  dl.rows.eh-facts dd { margin: 0; }
  .eh-title { font-size: 16px; }
  /* Six columns in 358 px: smaller figures, less padding, the label wraps under itself. */
  .eh-table { font-size: 13px; }
  .eh-table th, .eh-table td { padding: 6px 3px; }
  .eh-table thead th { font-size: 11px; }
  .eh-table tbody th { min-width: 0; }
}
