.fred-layout{display:grid;grid-template-columns:minmax(13rem,19rem) minmax(0,1fr);gap:1.2rem;align-items:start}
.fred-catalog,.fred-detail{min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--panel);padding:1rem}
#fred-search{display:block;width:100%;margin-top:.45rem}
#fred-count{color:var(--muted);font-size:.85rem;margin:.65rem 0}
#fred-series{list-style:none;margin:0;padding:0;max-height:68vh;overflow:auto}
#fred-series button{display:flex;justify-content:space-between;align-items:center;gap:.5rem;width:100%;text-align:left;background:transparent;border:1px solid transparent;overflow-wrap:anywhere}
#fred-series button:hover,#fred-series button[aria-current=true]{background:#203247;border-color:var(--line)}
#fred-series small{color:var(--muted)}
.fred-heading,.fred-ranges{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}
.fred-heading{justify-content:space-between;align-items:flex-start}
.fred-heading h2{margin:0 0 .3rem;font-size:1.25rem}
.fred-ranges button[aria-pressed=true]{border-color:var(--blue);color:var(--blue)}
.fred-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:.65rem;margin:1rem 0}
.fred-stats div{border:1px solid var(--line);padding:.65rem;border-radius:5px}
.fred-stats dt{color:var(--muted);font-size:.85rem}
.fred-stats dd{margin:0;font-variant-numeric:tabular-nums}
#fred-chart{height:clamp(320px,55vh,650px);width:100%}
#fred-status:empty{display:none}
@media(max-width:760px){.fred-layout{grid-template-columns:1fr}#fred-series{max-height:16rem}}
#fred-series span::first-letter,.fred-heading h2::first-letter{text-transform:uppercase}
.fred-links{display:flex;flex-wrap:wrap;gap:.4rem 1rem}
#fred-history{box-sizing:border-box;width:min(36rem,calc(100vw - 2rem));max-height:90vh;color:var(--text);background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:1rem}
#fred-history::backdrop{background:#0009}
#fred-history .fred-heading{margin-bottom:.75rem}
#fred-history-range{font-variant-numeric:tabular-nums}
.fred-history-scroll{max-height:60vh;overflow:auto;margin-top:.75rem}
.fred-history-scroll table{width:100%;font-variant-numeric:tabular-nums}
.fred-history-scroll th,.fred-history-scroll td{padding:.45rem .65rem;border-bottom:1px solid var(--line);text-align:left}
.fred-history-scroll th{position:sticky;top:0}
.fred-history-scroll th:last-child,.fred-history-scroll td:last-child{text-align:right}
