/* The Federal actions and Settlements pages (src/pages/federal.js and deals.js), on the site's tokens (tokens.css) and
 * classes (site.css). No inline styles anywhere: every look is a class here. */

/* ---- /federal: the filters, the counts and the list ---- */
/* A section's title can run to a hundred characters, and a <select> is as wide as its widest option: let it shrink to the
 * page instead of widening the page. */
.filters .field { min-width: 0; max-width: 100%; }
.filters select, .filters input[type="search"] { max-width: 100%; text-overflow: ellipsis; }
@media (max-width: 560px) {
  .filters .field { flex: 1 1 100%; }
  .filters select, .filters input[type="search"] { width: 100%; }
}

.fed-overview { margin: 8px 0 16px; padding: 8px 16px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); }
.fed-overview > summary { cursor: pointer; padding: 4px 0; font-weight: 600; }
.fed-facets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 32px; margin-top: 6px; }
h2.fed-facet-h { margin: 14px 0 6px; font-family: var(--font-sans); font-size: 13px; text-transform: uppercase;
  letter-spacing: .6px; color: var(--muted); }
.fed-counts { list-style: none; margin: 0; padding: 0; }
.fed-counts li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px;
  border-bottom: 1px solid var(--border); }
.fed-counts li:last-child { border-bottom: 0; }
.fed-n { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.fed-list { list-style: none; margin: 8px 0; padding: 0; }
.fed-list > li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 2px 16px; padding: 12px 0;
  border-bottom: 1px solid var(--border); }
.fed-list > li:last-child { border-bottom: 0; }
.fed-date { color: var(--muted); font-size: 14px; white-space: nowrap; }
.fed-main { min-width: 0; }
.fed-title { font-weight: 600; overflow-wrap: anywhere; }
.fed-meta { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted);
  font-size: 14px; }
.fed-agency { font-size: 13px; letter-spacing: .3px; }
.fed-data { font-size: 14px; margin-top: 24px; }

/* ---- one action or one deal ---- */
.fed-action h1 { overflow-wrap: anywhere; }
a.badge { text-decoration: none; }
a.badge:hover { color: var(--text); border-color: var(--gold); }
.fed-text p, .fed-status p, .deal-terms { max-width: 72ch; }
.fed-status { border-left: 3px solid var(--gold); background: var(--panel); padding: 10px 16px 2px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.fed-status .muted { font-size: 14px; }

.fed-docs, .fed-cases, .fed-sources { list-style: none; margin: 8px 0 16px; padding: 0; }
.fed-docs > li, .fed-cases > li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.fed-docs > li:last-child, .fed-cases > li:last-child { border-bottom: 0; }
.fed-docs p, .fed-cases p { margin: 0 0 4px; }
.fed-doc-title, .fed-case-name { font-weight: 600; overflow-wrap: anywhere; }
.fed-doc-meta, .fed-case-meta, .fed-case-links { color: var(--muted); font-size: 14px; }
.fed-doc-meta .badge { white-space: normal; }
.fed-doc-cite { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.fed-role { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--blue); }
.fed-sources li { padding: 4px 0; overflow-wrap: anywhere; }

.fed-cite { padding: 12px 16px 4px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow-wrap: anywhere; }
.fed-cite-short { font-size: 14px; }

@media (max-width: 560px) {
  .fed-list > li { grid-template-columns: 1fr; }
}

/* a settlement agreement's text (/deals/<id>/text/<document>): the pages as the document gives them, in a monospaced block that wraps */
.fed-doc-links { margin: 2px 0 0; }
.deal-pages { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 12px 0 16px; }
.deal-pg { margin: 0 0 20px; }
.deal-pg h2 { font-size: 15px; margin: 0 0 6px; }
.deal-pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: 13px;
  line-height: 1.55; margin: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface, transparent); }
.deal-agreement { max-width: 72ch; }

/* the Settlements list: a deal's hosted agreements, each opening in the litigation reader */
.deal-agr { list-style: none; margin: 0; padding: 0; }
.deal-agr li + li { margin-top: .35rem; }
