/* Market/reports pilot. Semantic zinc palette and Card/Table/Input composition
   ported to the existing server-rendered views; scope isolates legacy pages. */
body.sp-ui-pilot[data-ui="components"] {
  --background:#fafafa; --foreground:#09090b; --card:#fff; --card-foreground:#09090b;
  --muted:#f4f4f5; --muted-foreground:#52525b; --border:#e4e4e7;
  --primary:#18181b; --primary-foreground:#fafafa; --ring:#a1a1aa; --radius:.625rem;
  --sp-bg:#fafafa; --sp-surface:#fff; --sp-surface-dark:#f4f4f5;
  --sp-text:#09090b; --sp-text-sub:#52525b; --sp-text-muted:#52525b;
  --sp-primary:#18181b; --sp-accent:#18181b; --sp-border:#e4e4e7;
  --sp-up:#dc2626; --sp-down:#2563eb; --sp-navbar-h:56px;
  --sp-component-bg:#fff; --sp-component-fg:#09090b; --sp-component-line:#e4e4e7;
  background:var(--background); color:var(--foreground); font-size:15px; line-height:1.6;
}
body.sp-ui-pilot .sp-navbar { height:56px; box-shadow:none!important; }
body.sp-ui-pilot .sp-navbar > .container-fluid { max-width:1440px; margin:auto; padding-inline:32px!important; }
body.sp-ui-pilot .sp-logo { font-size:20px; letter-spacing:-1px; }
body.sp-ui-pilot .sp-nav-primary .nav-link { font-size:14px; min-height:36px; padding:8px 12px!important; }
body.sp-ui-pilot .sp-navbar form { background:#fff!important; padding:0!important; border:0!important; gap:8px!important; }
body.sp-ui-pilot .sp-navbar form input#global-search {
  border:1px solid var(--border)!important; border-radius:6px!important;
  min-height:36px; width:176px!important; padding:8px 12px!important; font-size:14px!important;
}
body.sp-ui-pilot .sp-navbar form button[type="submit"] { height:36px; padding:8px 16px!important; font-size:14px!important; }
body.sp-ui-pilot .sp-submenu-bar { background:#fff; border-bottom:1px solid var(--border); top:56px; }
body.sp-ui-pilot .sp-submenu-bar > .container-fluid { max-width:1440px; margin:auto; padding-inline:32px!important; }
body.sp-ui-pilot .submenu { display:flex; gap:24px; padding:0!important; overflow-x:auto; white-space:nowrap; }
body.sp-ui-pilot .submenu-item { padding:14px 0!important; font-size:14px; color:#52525b!important; background:transparent!important; border:0!important; border-bottom:2px solid transparent!important; }
body.sp-ui-pilot .submenu-item.active { color:#09090b!important; border-bottom-color:#18181b!important; font-weight:600; }
body.sp-ui-pilot .market-overview-page.market-overview-page,
body.sp-ui-pilot .reports-workspace {
  max-width:1440px; padding:32px 32px 56px!important; margin:0 auto; background:var(--background);
  --sp-primary:#18181b; --sp-up:#dc2626; --sp-down:#2563eb;
}
body.sp-ui-pilot:has(.market-overview-page) { background:linear-gradient(145deg,#fafafa 0%,#f0f1f3 55%,#f7f7f8 100%); background-attachment:fixed; }
body.sp-ui-pilot .market-overview-page.market-overview-page { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); column-gap:24px; row-gap:40px; padding-top:64px!important; padding-bottom:80px!important; background:transparent; }
body.sp-ui-pilot .market-overview-page > .sp-page-header { margin-bottom:16px; padding-bottom:8px; }
body.sp-ui-pilot .sp-page-header { display:flex; justify-content:space-between; align-items:center; gap:24px; margin:0 0 8px; grid-row:auto; }
body.sp-ui-pilot .sp-page-header h1 { font-size:28px!important; font-weight:650!important; letter-spacing:-.04em; margin:0 0 6px!important; line-height:1.25; }
body.sp-ui-pilot .sp-page-header p { font-size:15px; color:#52525b; margin:0; }
body.sp-ui-pilot .sp-page-header > div:last-child { font-size:14px!important; }
body.sp-ui-pilot .sp-page-header > div:last-child > div { font-size:14px!important; }
body.sp-ui-pilot h2.sp-section-title, body.sp-ui-pilot .ui-results-heading h2 { font-size:18px!important; font-weight:600!important; margin:0 0 16px!important; letter-spacing:-.025em; }
body.sp-ui-pilot .mo-summary { grid-row:auto!important; }
body.sp-ui-pilot .market-overview-page .mo-index-grid { gap:24px!important; align-items:stretch!important; }
body.sp-ui-pilot .market-overview-page .mo-index-grid > .sp-card { margin:0; padding:24px!important; border-radius:12px!important; }
body.sp-ui-pilot .market-overview-page .sp-card-header { margin:0!important; padding:0!important; border:0!important; background:transparent!important; }
body.sp-ui-pilot .market-overview-page .sp-card-title { display:flex; justify-content:space-between; align-items:baseline; gap:12px; font-size:16px!important; margin:0!important; }
body.sp-ui-pilot .market-overview-page .sp-card-title a { color:#09090b!important; }
body.sp-ui-pilot .market-overview-page .sp-card-title span { font-size:13px; font-weight:400; color:#52525b; }
body.sp-ui-pilot .market-overview-page .mw-index-value { font-size:32px; font-weight:650; line-height:1.2; margin:20px 0 8px; letter-spacing:-.045em; font-variant-numeric:tabular-nums; }
body.sp-ui-pilot .market-overview-page .mw-index-state { font-size:16px; }
body.sp-ui-pilot .market-overview-page .mw-index-meta { font-size:13px; margin:4px 0 0; }
body.sp-ui-pilot .market-overview-page .mw-details--always { margin-top:16px; padding-top:16px; font-size:14px; line-height:1.7; }
body.sp-ui-pilot .market-overview-page .mw-details--always > div:last-child { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
body.sp-ui-pilot .market-overview-page .sp-badge { font-size:12px; font-weight:500; gap:4px; background:#f4f4f5!important; color:#18181b!important; padding:3px 8px!important; }
body.sp-ui-pilot .market-overview-page .mw-universe { margin-top:16px; font-size:14px; }
body.sp-ui-pilot .market-overview-page .mw-universe > div { font-size:14px!important; padding-top:8px; }
body.sp-ui-pilot .market-overview-page .mo-core-chart { grid-row:4!important; grid-column:1 / 3!important; }
body.sp-ui-pilot .market-overview-page .mo-stage { grid-row:4!important; grid-column:3!important; }
body.sp-ui-pilot .market-overview-page > .sp-page-header { grid-row:1; }
body.sp-ui-pilot .market-overview-page > .sp-sp-alert { grid-row:2; margin:0!important; padding:12px 16px; border:1px solid #e4e4e7; border-radius:8px!important; font-size:14px; background:#fff; }
body.sp-ui-pilot .market-overview-page .mo-summary { grid-row:3!important; }
body.sp-ui-pilot .market-overview-page > .mo-section:not(.mo-summary):not(.mo-sector),
body.sp-ui-pilot .market-overview-page .mo-sector > .sp-sp-card,
body.sp-ui-pilot .ui-report-panel { background:#fff!important; border:1px solid #e4e4e7!important; border-radius:12px!important; padding:24px!important; box-shadow:0 1px 2px #00000005!important; }
body.sp-ui-pilot .market-overview-page .mo-core-chart h2 span { display:inline; font-size:13px; margin-left:8px; font-weight:400; }
body.sp-ui-pilot .market-overview-page .mo-core-chart > div:last-child { font-size:13px!important; }
body.sp-ui-pilot .market-overview-page .mo-stage > div:first-of-type { font-size:13px!important; }
body.sp-ui-pilot .market-overview-page .mw-stage-list { gap:0; margin-top:16px; }
body.sp-ui-pilot .market-overview-page .mw-stage-list .sp-card { padding:12px 0!important; border:0!important; border-top:1px solid #e4e4e7!important; border-radius:0!important; box-shadow:none!important; }
body.sp-ui-pilot .mw-stage-list .sp-card > div:first-child { font-size:13px!important; }
body.sp-ui-pilot .mw-stage-count { font-size:16px; }
body.sp-ui-pilot .mw-bar, body.sp-ui-pilot .mw-bar span { border-radius:999px!important; }
body.sp-ui-pilot .market-overview-page .mo-sector { display:grid; gap:24px; padding:0!important; border:0!important; box-shadow:none!important; background:transparent!important; }
body.sp-ui-pilot .market-overview-page .mo-sector > .sp-sp-card { margin:0!important; min-width:0; }
body.sp-ui-pilot .ui-input, body.sp-ui-pilot #mw-sector-search { border:1px solid #e4e4e7!important; border-radius:6px!important; background:#fff!important; color:#09090b; height:38px; min-height:38px; padding:8px 12px!important; font-size:14px; width:100%; }
body.sp-ui-pilot #mw-sector-search { width:320px; max-width:100%; margin-bottom:16px; }
body.sp-ui-pilot .ui-button, body.sp-ui-pilot .btn, body.sp-ui-pilot .sp-dl-btn,
body.sp-ui-pilot .watch-btn, body.sp-ui-pilot .sp-pagination a, body.sp-ui-pilot .sp-pagination .current {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:36px;
  border:1px solid #e4e4e7!important; border-radius:6px!important; padding:8px 14px!important;
  background:#fff!important; color:#18181b!important; font-size:14px!important; font-weight:500; line-height:1.2; text-decoration:none; cursor:pointer;
}
body.sp-ui-pilot .ui-button-primary, body.sp-ui-pilot .watch-btn.watching { background:#18181b!important; color:#fafafa!important; border-color:#18181b!important; }
body.sp-ui-pilot a:hover { color:#09090b; }
body.sp-ui-pilot .ui-button:hover,body.sp-ui-pilot .btn:hover,body.sp-ui-pilot .sp-dl-btn:hover { background:#f4f4f5!important; }
body.sp-ui-pilot .ui-button-primary:hover { background:#27272a!important; }
body.sp-ui-pilot :is(a,button,input,select,summary):focus-visible { outline:2px solid #71717a!important; outline-offset:3px!important; }
body.sp-ui-pilot .ui-meta { color:#52525b; font-size:13px; }
body.sp-ui-pilot .reports-workspace > .sp-page-header { margin-bottom:24px; }
body.sp-ui-pilot .ui-report-filters { display:flex; align-items:end; gap:12px; flex-wrap:wrap; padding-bottom:24px; border-bottom:1px solid #e4e4e7; }
body.sp-ui-pilot .ui-report-filters label { display:grid; gap:8px; font-size:14px; font-weight:500; flex:1; min-width:180px; }
body.sp-ui-pilot .ui-report-filters label:nth-of-type(3) { flex:0 1 160px; min-width:140px; }
body.sp-ui-pilot .ui-report-filters .ui-button { height:38px; }
body.sp-ui-pilot .ui-results-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:24px 0 16px; }
body.sp-ui-pilot .ui-results-heading h2 { margin:0!important; }
body.sp-ui-pilot .ui-count { display:inline-block; font-size:13px; padding:3px 8px; margin-left:8px; border-radius:6px!important; background:#f4f4f5; font-weight:500; }
body.sp-ui-pilot .ui-downloads { margin-bottom:16px; font-size:14px; }
body.sp-ui-pilot .ui-downloads summary { cursor:pointer; width:fit-content; }
body.sp-ui-pilot .ui-downloads summary .ui-meta { margin-left:8px; }
body.sp-ui-pilot .ui-download-links { display:flex; flex-wrap:wrap; gap:8px; padding-top:12px; }
body.sp-ui-pilot .ui-table-scroll, body.sp-ui-pilot .mw-table-scroll { overflow:auto; border:1px solid #e4e4e7; border-radius:8px!important; }
body.sp-ui-pilot table.is-table { border:0!important; border-collapse:collapse!important; font-size:14px; margin:0; width:100%; }
body.sp-ui-pilot table.is-table th, body.sp-ui-pilot #mw-sector-table th { height:44px; padding:12px 16px!important; font-weight:500; font-size:14px!important; background:#fafafa!important; color:#52525b!important; border-bottom:1px solid #e4e4e7; }
body.sp-ui-pilot table.is-table td, body.sp-ui-pilot #mw-sector-table td { padding:12px 16px!important; font-size:14px!important; line-height:1.65; border-bottom:1px solid #e4e4e7; }
body.sp-ui-pilot table.is-table td a { color:#18181b!important; }
body.sp-ui-pilot table.is-table td a:hover { color:#09090b!important; text-decoration:underline; }
body.sp-ui-pilot table.is-table td a,body.sp-ui-pilot table.is-table td span { font-size:inherit!important; }
body.sp-ui-pilot table.is-table .num { font-variant-numeric:tabular-nums; }
body.sp-ui-pilot .rpt-tbl { min-width:1080px; }
body.sp-ui-pilot .rpt-tbl col:nth-child(1) { width:144px!important; }
body.sp-ui-pilot .rpt-tbl col:nth-child(2) { width:84px!important; }
body.sp-ui-pilot .rpt-tbl col:nth-child(3) { width:88px!important; }
body.sp-ui-pilot .rpt-tbl col:nth-child(5),body.sp-ui-pilot .rpt-tbl col:nth-child(6) { width:100px!important; }
body.sp-ui-pilot .rpt-tbl col:nth-child(7) { width:80px!important; }
body.sp-ui-pilot .rpt-tbl td:nth-child(4),body.sp-ui-pilot .rpt-tbl td[colspan="4"] { white-space:normal!important; overflow-wrap:anywhere; text-overflow:clip!important; }
body.sp-ui-pilot .rpt-expand-btn { font-size:13px; padding:4px 8px; border-radius:6px!important; background:#f4f4f5; margin-left:8px; }
body.sp-ui-pilot .watch-btn { padding:5px 9px!important; min-height:30px; font-size:13px!important; }
body.sp-ui-pilot .sp-pagination { display:flex; justify-content:flex-end; align-items:center; gap:8px; }
body.sp-ui-pilot .sp-pagination .current { background:#f4f4f5!important; }
body.sp-ui-pilot .sp-footer { position:static; background:transparent; border-top:1px solid #e4e4e7; padding:20px; }
@media(max-width:1100px) {
  body.sp-ui-pilot .sp-nav-primary { gap:0!important; margin-left:16px!important; }
  body.sp-ui-pilot .sp-nav-primary .nav-link { padding:8px!important; font-size:13px; }
  body.sp-ui-pilot .sp-navbar form input#global-search { width:132px!important; }
}
@media(max-width:900px) {
  body.sp-ui-pilot .market-overview-page.market-overview-page { display:flex; flex-direction:column; }
  body.sp-ui-pilot .market-overview-page .mo-index-grid { grid-template-columns:1fr!important; }
  body.sp-ui-pilot .market-overview-page .mw-stage-list { grid-template-columns:1fr; }
}
@media(max-width:600px) {
  body.sp-ui-pilot .sp-navbar > .container-fluid,body.sp-ui-pilot .sp-submenu-bar > .container-fluid { padding-inline:16px!important; }
  body.sp-ui-pilot .market-overview-page.market-overview-page,body.sp-ui-pilot .reports-workspace { padding:24px 16px 88px!important; }
  body.sp-ui-pilot .market-overview-page.market-overview-page { padding-top:40px!important; row-gap:28px; }
  body.sp-ui-pilot .sp-page-header { align-items:flex-start; flex-direction:column; gap:12px; }
  body.sp-ui-pilot .sp-page-header h1 { font-size:26px!important; }
  body.sp-ui-pilot .ui-report-panel,body.sp-ui-pilot .market-overview-page > .mo-section:not(.mo-summary):not(.mo-sector),body.sp-ui-pilot .market-overview-page .mo-sector > .sp-sp-card { padding:16px!important; }
  body.sp-ui-pilot .ui-report-filters label { min-width:100%; }
  body.sp-ui-pilot .ui-results-heading { align-items:flex-start; flex-direction:column; gap:8px; }
}

/* Market risk/economy: same Card, Badge, Input and Table primitives as the
   market overview and report pages.  It deliberately scopes presentation only
   so the FRED data pipeline and its chart payload remain unchanged. */
body.sp-ui-pilot .fred-workspace {
  max-width:1440px;
  margin:0 auto;
  padding:32px 32px 56px!important;
  background:var(--background);
}
body.sp-ui-pilot .fred-page-header { margin:0 0 24px; }
body.sp-ui-pilot .fred-page-header h1 { font-size:28px!important; font-weight:650!important; letter-spacing:-.04em; margin:0 0 6px!important; }
body.sp-ui-pilot .fred-page-header p { margin:0; font-size:15px; color:var(--muted-foreground); }
body.sp-ui-pilot .fred-card {
  margin:0!important;
  padding:20px!important;
  background:var(--card)!important;
  border:1px solid var(--border)!important;
  border-radius:var(--radius)!important;
  box-shadow:0 1px 2px rgba(15,23,42,.05)!important;
}
body.sp-ui-pilot .fred-risk-summary { padding:20px 22px!important; }
body.sp-ui-pilot .fred-group-legend { display:flex; flex-wrap:wrap; gap:12px; margin:0 0 28px; }
body.sp-ui-pilot .fred-legend-card {
  flex:1 1 220px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius)!important;
  background:var(--card);
}
body.sp-ui-pilot .fred-group { margin:0 0 32px; }
body.sp-ui-pilot .fred-group-title {
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 12px!important;
  font-size:16px!important;
  font-weight:600!important;
}
body.sp-ui-pilot .fred-card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px; }
body.sp-ui-pilot .fred-indicator-card { min-height:210px; }
body.sp-ui-pilot .fred-indicator-card [style*="border-top"] { border-color:var(--border)!important; }
body.sp-ui-pilot .fred-summary-table > div:first-child { font-size:16px!important; font-weight:600!important; margin-bottom:14px!important; }
body.sp-ui-pilot .fred-summary-table table { border:1px solid var(--border)!important; border-radius:var(--radius)!important; overflow:hidden; }
@media(max-width:600px) {
  body.sp-ui-pilot .fred-workspace { padding:24px 16px 88px!important; }
  body.sp-ui-pilot .fred-card { padding:16px!important; }
  body.sp-ui-pilot .fred-card-grid { grid-template-columns:1fr; }
}
