#fedwatch-panel,
.home-fedwatch {
  --fw-up: #ba5c11;
  --fw-down: #376bb1;
  --fw-hold: #52667f;
}

#fedwatch-panel .panel-title > span { font-size: 24px; line-height: 1.35; }
#fedwatch-panel .fw-intro { margin: 14px 0 18px; font-size: 14px; line-height: 1.85; color: var(--text); }
#fedwatch-panel a,
.home-fedwatch a { color: var(--blue); }
#refresh-fedwatch { flex-shrink: 0; white-space: nowrap; }
.fw-context { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.fw-context b { margin-left: 6px; color: var(--text); font-weight: 600; }
.fw-context .fw-stale { color: var(--fw-up); }
.fw-summary { padding: 15px 18px; border-left: 4px solid var(--purple, #7565e9); border-radius: 6px; background: color-mix(in srgb, var(--purple, #7565e9) 5%, var(--surface)); }
.fw-summary p { margin: 0; font-size: 16px; line-height: 1.75; }
.fw-summary small { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.fw-summary strong { font-weight: 800; }
.fw-meetings { margin-top: 20px; }
.fw-table-header,
.fw-meeting { display: grid; grid-template-columns: 142px minmax(230px, 1fr) minmax(310px, 1.05fr); gap: 22px; align-items: center; }
.fw-table-header { align-items: end; padding: 10px 0 13px; border-bottom: 2px solid var(--line); font-size: 14px; font-weight: 700; }
.fw-table-header small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 400; }
.fw-meeting { min-height: 52px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fw-meeting-date { margin: 0; color: var(--text); font-size: 14px; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.fw-move { display: grid; grid-template-columns: minmax(50px, 1fr) 52px 66px; gap: 10px; align-items: center; min-width: 0; }
.fw-move-track { display: block; height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-muted); }
.fw-move-track i { display: block; height: 100%; border-radius: inherit; background: var(--fw-hold); }
.fw-move.fw-hike { color: var(--fw-up); }
.fw-move.fw-cut { color: var(--fw-down); }
.fw-move.fw-hike i { background: var(--fw-up); }
.fw-move.fw-cut i { background: var(--fw-down); }
.fw-move-probability { color: var(--text); font-weight: 750; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fw-move-bp { font-size: 13px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fw-level { display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: center; min-width: 0; }
.fw-level > strong { font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fw-level-badges { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.fw-badge { padding: 4px 6px; border-radius: 3px; background: color-mix(in srgb, var(--fw-hold) 8%, var(--surface)); color: var(--fw-hold); font-size: 12px; line-height: 1.35; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fw-badge.fw-hike { background: color-mix(in srgb, var(--fw-up) 9%, var(--surface)); color: var(--fw-up); }
.fw-badge.fw-cut { background: color-mix(in srgb, var(--fw-down) 10%, var(--surface)); color: var(--fw-down); }
.fw-mobile-label { display: none; }
#fedwatch-panel .fw-source { margin: 18px 0 0; font-size: 13px; line-height: 1.8; }
.home-fedwatch { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.home-fedwatch-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-fedwatch-heading small { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; }
.home-fedwatch-probabilities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.home-fedwatch-probabilities > div { display: flex; flex-direction: column; gap: 6px; }
.home-fedwatch-probabilities span { font-size: 12px; }
.home-fedwatch-probabilities b { font-size: 22px; font-variant-numeric: tabular-nums; }
#home-fomc-hike { color: var(--fw-up); }
#home-fomc-hold { color: var(--fw-hold); }
#home-fomc-cut { color: var(--fw-down); }
.home-fedwatch a { font-size: 12px; }

html[data-theme="dark"] #fedwatch-panel,
html[data-theme="dark"] .home-fedwatch {
  --fw-up: #ffb569;
  --fw-down: #8dbfff;
  --fw-hold: #b2c3dc;
}

/* Keep direction colors and secondary labels above the legacy dark .view text rule. */
html[data-theme="dark"] #fedwatch-panel .fw-move.fw-hike .fw-move-bp,
html[data-theme="dark"] #fedwatch-panel .fw-badge.fw-hike,
html[data-theme="dark"] #home-fomc-hike { color: var(--fw-up) !important; }
html[data-theme="dark"] #fedwatch-panel .fw-move.fw-cut .fw-move-bp,
html[data-theme="dark"] #fedwatch-panel .fw-badge.fw-cut,
html[data-theme="dark"] #home-fomc-cut { color: var(--fw-down) !important; }
html[data-theme="dark"] #fedwatch-panel .fw-badge.fw-hold,
html[data-theme="dark"] #home-fomc-hold { color: var(--fw-hold) !important; }
html[data-theme="dark"] #fedwatch-panel .fw-summary small,
html[data-theme="dark"] #fedwatch-panel .fw-context > span,
html[data-theme="dark"] #fedwatch-panel .fw-table-header small,
html[data-theme="dark"] #fedwatch-panel .fw-mobile-label,
html[data-theme="dark"] #fedwatch-panel .fw-source { color: var(--muted) !important; }
html[data-theme="dark"] #fedwatch-panel .fw-context > .fw-stale { color: var(--fw-up) !important; }

@media (max-width: 1100px) {
  .fw-table-header,
  .fw-meeting { grid-template-columns: 110px minmax(190px, 1fr) minmax(190px, 1fr); gap: 16px; }
  .fw-move { grid-template-columns: minmax(40px, 1fr) 48px 62px; gap: 7px; }
}

@media (max-width: 760px) {
  #fedwatch-panel .panel-title { align-items: flex-start; gap: 10px; }
  #fedwatch-panel .panel-title > span { font-size: 21px; }
  #fedwatch-panel .fw-intro { margin-top: 12px; }
  .fw-context { gap: 5px 18px; }
  .fw-summary { padding: 13px 14px; }
  .fw-summary p { font-size: 15px; }
  .fw-meetings { margin-top: 14px; }
  .fw-table-header { display: none; }
  .fw-meeting { grid-template-columns: minmax(0, 1fr); gap: 11px; padding: 17px 0; }
  .fw-meeting-date { font-size: 15px; }
  .fw-mobile-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
  .fw-move { grid-template-columns: minmax(50px, 1fr) 55px 70px; gap: 10px; }
  .fw-move-probability { font-size: 15px; }
  .fw-move-bp { font-size: 14px; }
  .fw-level { gap: 8px 12px; }
  .fw-level > strong { font-size: 17px; }
  .fw-badge { padding: 5px 7px; font-size: 12px; }
}
