/* ACO Explorer (/acos/). Existing HDF/CMS tokens; settlement evidence is the focal point. Earned is green with an
   "Earned" label, owed red and hatched with an "Owed" label, $0 neutral: every state reads without color. */
.ex-wrap { max-width: 84rem; padding-inline: clamp(1.25rem, 2vw, 1.5rem); }
.ex { --ex-earned: #20785c; --ex-earned-soft: #e5f3eb; --ex-owed: #b54149; --ex-owed-soft: #fbecef; --ex-zero: #5c6670; --ex-zero-soft: #eef0f2; --ex-gap: 1.25rem; }
.ex p, .ex li { max-width: none; }
.ex-h { font-size: 1.25rem; margin: 0 0 .75rem; }
.ex-icon { width: 1em; height: 1em; vertical-align: -.125em; margin-right: .3em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 1. Find an ACO */
.ex-masthead h1 { max-width: none; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); margin: 0 0 .25rem; }
.ex-source { color: var(--ink-soft); font-size: .9375rem; margin: 0 0 1rem; }
.ex-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem) auto; gap: .5rem var(--ex-gap); align-items: end; }
.ex-search .ds-c-field { width: 100%; max-width: none; margin-top: .25rem; }
.ex-search .ds-c-label { margin-top: 0; }
.ex-search button { white-space: nowrap; }
.ex-status { grid-column: 1 / -1; margin: 0; min-height: 1.25em; color: var(--ink-soft); font-size: .9375rem; }

/* 2. National settlement */
.ex-national { margin-top: 1.25rem; }
.ex-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ex-gap); margin: 0 0 1rem; }
.ex-figures div { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: .75rem 1rem; }
.ex-figures dt { color: var(--ink-soft); font-size: .875rem; line-height: 1.3; }
.ex-figures dd { margin: .25rem 0 0; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.ex-split { margin: 0 0 .5rem; }
.ex-split-cap { font-weight: 600; font-size: .9375rem; margin: 0 0 .375rem; }
.ex-split-bar { display: flex; height: 1.5rem; border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; background: var(--surface); }
.ex-seg { display: block; min-width: 3px; }
.ex-seg + .ex-seg { border-left: 2px solid var(--surface); }
.ex-seg-earned { background: var(--ex-earned); }
.ex-seg-zero { background: repeating-linear-gradient(90deg, var(--ex-zero-soft) 0 6px, #c9cfd4 6px 7px); }
.ex-seg-owed { background: repeating-linear-gradient(45deg, var(--ex-owed) 0 3px, #fff 3px 5px); }
.ex-split-labels { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding: 0; margin: .375rem 0 0; font-size: .9375rem; }
.ex-split-labels a { color: var(--ink); text-decoration: none; }
.ex-split-labels a:hover strong, .ex-split-labels a:focus strong { text-decoration: underline; }
.ex-split-labels i { display: inline-block; width: .875rem; height: .875rem; border: 1px solid var(--ink); vertical-align: -.1em; margin-right: .35rem; }
.ex-lab-earned i { background: var(--ex-earned); }
.ex-lab-zero i { background: repeating-linear-gradient(90deg, var(--ex-zero-soft) 0 3px, #c9cfd4 3px 4px); }
.ex-lab-owed i { background: repeating-linear-gradient(45deg, var(--ex-owed) 0 2px, #fff 2px 4px); }
.ex-lab-owed { margin-left: auto; }
.ex-note { color: var(--ink-soft); font-size: .9375rem; margin: .5rem 0 0; }

/* 3. Stories and cards */
.ex-stories, .ex-directory { margin-top: 2rem; }
.ex-stories-head, .ex-dir-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem var(--ex-gap); margin-bottom: .75rem; }
.ex-stories-head .ex-h, .ex-dir-head .ex-h { margin: 0; }
.ex-stories-head .ds-c-field { margin-top: .25rem; max-width: 22rem; }
.ex-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ex-gap); }
.ex-card { display: flex; flex-direction: column; gap: .375rem; background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--rule); border-radius: 0 0 6px 6px; padding: 1rem 1.125rem; min-width: 0; }
.ex-card.ex-earned { border-top-color: var(--ex-earned); }
.ex-card.ex-owed { border-top-color: var(--ex-owed); }
.ex-card.ex-zero { border-top-color: var(--ex-zero); }
.ex-kicker { margin: 0; color: var(--ink-soft); font-size: .8125rem; font-weight: 600; letter-spacing: .02em; }
.ex-name { font-size: 1.0625rem; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.ex-meta { margin: 0; color: var(--ink-soft); font-size: .875rem; }
.ex-dated, .ex-nowrap { white-space: nowrap; }
.ex-outcome { margin: .25rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.ex-outcome strong { font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.ex-tag { display: inline-block; font-size: .8125rem; font-weight: 700; padding: .0625rem .5rem; border-radius: 3px; border: 1px solid; }
.ex-earned .ex-tag { color: var(--ex-earned); background: var(--ex-earned-soft); }
.ex-owed .ex-tag { color: var(--ex-owed); background: var(--ex-owed-soft); }
.ex-zero .ex-tag { color: var(--ex-zero); background: var(--ex-zero-soft); }
.ex-measures { margin: .25rem 0 0; display: grid; gap: .25rem; font-size: .875rem; }
.ex-measures div { display: flex; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--rule); padding-top: .25rem; }
.ex-measures dt { color: var(--ink-soft); }
.ex-measures dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ex-insight { margin: .25rem 0 0; font-size: .9375rem; line-height: 1.45; }
.ex-insight small { display: block; color: var(--ink-soft); font-size: .8125rem; margin-top: .125rem; }
.ex-access { margin: .125rem 0 0; font-size: .875rem; color: var(--ink-soft); }
.ex-actions { margin-top: auto; padding-top: .5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.ex-go { font-weight: 600; }
.ex-compare { font: inherit; font-size: .875rem; background: none; border: 1px solid var(--rule); border-radius: 4px; padding: .25rem .625rem; color: var(--link); cursor: pointer; }
.ex-compare[aria-pressed="true"] { border-color: var(--link); background: #eaf3fb; }
.ex-compare:focus-visible, .ex-toggle:focus-visible, .ex-pager button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ex-reason { margin: 0; font-size: .875rem; }

/* Visuals */
.ex-visual { margin: .5rem 0 0; }
.ex-visual figcaption { font-weight: 400; font-size: .875rem; margin: .375rem 0 0; }
.ex-hbars { display: grid; gap: .25rem; }
.ex-hbar { display: grid; grid-template-columns: 3.75rem minmax(0, 1fr) auto; align-items: center; gap: .5rem; font-size: .8125rem; }
.ex-hbar-track, .ex-rate-track { position: relative; height: .875rem; background: var(--page); border-radius: 2px; }
.ex-hbar-track i, .ex-rate-track i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; }
.ex-hbar-v, .ex-rate-v { font-variant-numeric: tabular-nums; text-align: right; }
.ex-fill-earned { background: var(--ex-earned); fill: var(--ex-earned); }
.ex-fill-prior { opacity: .55; }
.ex-fill-owed { fill: var(--ex-owed); background: var(--ex-owed); }
.ex-fill-zero { background: var(--ex-zero); fill: var(--ex-zero); }
.ex-owed-bg { fill: var(--ex-owed); }
.ex-hatch-line { stroke: #fff; stroke-width: 2.5; }
.ex-zero-line { stroke: var(--ink); stroke-width: 1.25; }
.ex-v-reversal svg, .ex-history { width: 100%; height: auto; display: block; }
.ex-v-reversal svg { max-width: 20rem; }
.ex-v-reversal text, .ex-history text { font: 600 11px/1 var(--sans); fill: var(--ink); }
.ex-history { margin-top: .375rem; max-width: 18rem; }
.ex-history .ex-yr, .ex-v-reversal .ex-yr { font-weight: 400; fill: var(--ink-soft); }
.ex-history .ex-gap { fill: var(--ink-soft); }
/* one grid for both rows, so the label column fits the longer label and the two tracks share one scale */
.ex-rates { display: grid; grid-template-columns: max-content minmax(3rem, 1fr) 3.5rem; align-items: center; gap: .375rem .5rem;
            font-size: .8125rem; }
.ex-rate-row { display: contents; }
.ex-min { position: absolute; top: -.25rem; bottom: -.25rem; width: 0; border-left: 2px dashed var(--ink); }
.ex-min-solo { border-left-style: solid; border-left-width: 3px; }
.ex-rate-label { white-space: nowrap; }

/* 4. Directory */
.ex-views { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.ex-toggle { font: inherit; font-size: .9375rem; background: var(--surface); border: 0; padding: .4rem .875rem; cursor: pointer; color: var(--ink); }
.ex-toggle + .ex-toggle { border-left: 1px solid var(--rule); }
.ex-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; }
.ex-access-note { color: var(--ink-soft); font-size: .9375rem; margin: 0 0 .75rem; }
.ex-filters { border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); padding: .5rem .875rem; margin-bottom: .75rem; }
.ex-filters summary { cursor: pointer; font-weight: 600; }
.ex-filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .5rem var(--ex-gap); margin: .5rem 0; }
.ex-filter-grid .ds-c-field { width: 100%; max-width: none; margin-top: .25rem; }
.ex-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem var(--ex-gap); margin-bottom: .75rem; }
.ex-count { margin: 0; font-weight: 600; }
.ex-layout { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.ex-pager { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; margin: 1rem 0; }
.ex-pager button { font: inherit; min-width: 2.5rem; min-height: 2.5rem; border: 1px solid var(--rule); background: var(--surface); border-radius: 4px; cursor: pointer; color: var(--link); }
.ex-pager button[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.ex-pager button:disabled { color: var(--ink-soft); cursor: default; }
.ex-pager .ex-pager-gap { padding: 0 .25rem; color: var(--ink-soft); }
.ex-empty { grid-column: 1 / -1; background: var(--surface); border: 1px dashed var(--rule); border-radius: 6px; padding: 1.25rem; }
.ex-table-wrap { margin-top: .5rem; }
.ex-table td, .ex-table th { font-variant-numeric: tabular-nums; }
.ex-tray { position: sticky; bottom: 0; z-index: 5; background: var(--surface); border: 1px solid var(--ink); border-radius: 6px 6px 0 0; padding: .75rem 1rem; margin-top: 1rem; box-shadow: 0 -4px 12px rgba(0, 0, 0, .08); }
.ex-tray p { margin: 0 0 .375rem; }
.ex-tray ul { list-style: none; display: flex; flex-wrap: wrap; gap: .375rem; padding: 0; margin: 0 0 .5rem; }
.ex-tray li { border: 1px solid var(--rule); border-radius: 4px; padding: .125rem .5rem; font-size: .875rem; }
.ex-tray li button { font: inherit; border: 0; background: none; color: var(--link); cursor: pointer; padding: 0 0 0 .25rem; }
/* PY2025 Compare on: the tray has a Clear button, two routes and, on a phone, a closed name list. */
.ex-tray--paid .ex-tray-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ex-tray--paid .ex-tray-clear { font: inherit; font-size: .875rem; border: 0; background: none; color: var(--link); cursor: pointer; padding: 0; }
.ex-tray--paid .ex-tray-list > summary { display: none; }
.ex-tray--paid .ex-tray-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 600px) {
  .ex-tray--paid { padding: .5rem .75rem; }
  .ex-tray--paid p { margin-bottom: .25rem; }
  .ex-tray--paid .ex-tray-list > summary { display: list-item; font-size: .875rem; cursor: pointer; margin-bottom: .25rem; }
  .ex-tray--paid .ex-tray-list ul { max-height: 30vh; overflow-y: auto; }
}
.ex-more { margin-top: 1.25rem; font-size: .9375rem; }
.ex-story-aggregate { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.125rem; max-width: 46rem; }
.ex-story-aggregate p { margin: 0 0 .5rem; }
.ex-viewall { margin: .75rem 0 0; }

@media (max-width: 1023px) {
  .ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .ex-grid, .ex-grid-featured { grid-template-columns: minmax(0, 1fr); }
  .ex-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .ex-figures div { padding: .5rem .75rem; }
  .ex-search { grid-template-columns: minmax(0, 1fr) auto; }
  .ex-field-q { grid-column: 1 / -1; }
  /* the open suggestion list pushes the service area and Find down instead of covering Find */
  .ex-search .aco-search-list { position: static; max-height: 15rem; }
  .ex-stories-head .ds-c-field { max-width: none; }
  .ex-stories-head .ex-field { width: 100%; }
  .ex-national { margin-top: .75rem; }
  .ex-masthead h1 { font-size: 1.5rem; }
}
@media (max-width: 359px) {
  .ex-search { grid-template-columns: minmax(0, 1fr); }
  .ex-rates { display: block; }
  .ex-rate-row { display: grid; grid-template-columns: minmax(0, 1fr) 3.25rem; gap: .25rem .5rem; margin-bottom: .375rem; }
  .ex-rate-row .ex-rate-track { grid-column: 1 / -1; grid-row: 2; }
  .ex-hbar { grid-template-columns: 3.25rem minmax(0, 1fr); }
  .ex-hbar-v { grid-column: 2; text-align: left; }
}
