/* scene 4: coverage. The US in markers: one filled blue marker per authority in the dataset, sized by vouchers. */
.coverage .cov-head { margin-bottom: clamp(24px, 4vh, 40px); }
.coverage .cov-head h2 .n { color: var(--blue); }

/* search and filters */
.cov-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-bottom: clamp(14px, 2.4vh, 24px); }
.cov-bar[hidden] { display: none; }            /* /coverage/: the page's own list brings the search and the filter */
.cov-find { position: relative; flex: 0 1 22rem; min-width: 0; }
.cov-find input {
  display: block; width: 100%; height: 44px; padding: 0 44px 0 14px; margin: 0;
  background: var(--grey-1); color: var(--ink); border: 0; border-bottom: 1px solid var(--ink-3); border-radius: 0;
  font-size: 1rem; -webkit-appearance: none; appearance: none;
}
.cov-find input::placeholder { color: var(--ink-3); opacity: 1; }
.cov-find input:focus { outline: none; background: var(--blue-3); border-bottom-color: var(--blue); }
.cov-x { position: absolute; right: 0; top: 0; width: 44px; height: 44px; font-size: 1.35rem; line-height: 1; color: var(--ink-3); }
.cov-x:hover { color: var(--ink); }
.cov-x[hidden] { display: none; }
/* under the box: the matches, and the answer for an authority that is not in this release */
.cov-drop { position: absolute; z-index: 8; left: 0; right: 0; top: calc(100% + 6px); display: grid; gap: 6px; }
.cov-list, .cov-miss { margin: 0; background: var(--paper); box-shadow: 0 18px 50px rgba(12, 13, 18, .16); }
.cov-list { padding: 6px 0; list-style: none; max-height: 22rem; overflow-y: auto; }
.cov-list[hidden], .cov-miss[hidden] { display: none; }
.cov-miss { display: grid; gap: 0; padding: 4px 0; }
.cm-item { display: grid; gap: 4px; padding: 12px 14px 13px; font-size: var(--s-small); }
.cm-item + .cm-item { border-top: 1px solid var(--grey-2); }
.cm-item p { margin: 0; }
.cm-name { display: grid; gap: 2px; }
.cm-name b { font-size: 1rem; font-weight: 500; color: var(--ink); line-height: 1.3; }
.cm-name span { color: var(--ink-3); font-feature-settings: "tnum" 1; }
.cm-text { margin-top: 4px !important; color: var(--ink); }
.cm-item .link { justify-self: start; color: var(--blue); text-decoration-color: currentColor; }
.cov-list li { display: grid; gap: 2px; padding: 9px 14px; cursor: pointer; }
.cov-list li b { font-weight: 500; color: var(--ink); line-height: 1.3; }
.cov-list li span { font-size: var(--s-small); color: var(--ink-2); font-feature-settings: "tnum" 1; }
.cov-list li[aria-selected="true"], .cov-list li[data-i]:hover { background: var(--blue-3); }
.cov-list li.none { cursor: default; color: var(--ink-2); }

.cov-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cov-chip {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px;
  border: 1px solid var(--grey-2); background: var(--paper); color: var(--ink-2); font-size: var(--s-small); white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.cov-chip b { color: var(--ink); transition: color .18s var(--ease); }
.cov-chip:hover { border-color: var(--blue); color: var(--ink); }
.cov-chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.cov-chip[aria-pressed="true"] b { color: var(--on-blue); }

/* the map: full bleed, edge to edge across the section */
.cov-map { position: relative; margin: 0 calc(var(--gutter) * -1); }
.cov-canvas { width: 100%; aspect-ratio: 1.75; touch-action: pan-y; -webkit-tap-highlight-color: transparent; user-select: none; }
.cov-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px;
  padding: 10px var(--gutter) 0; font-size: var(--s-small); color: var(--ink-3);
}
.cov-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); }
.cov-legend li { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.cov-legend .sizes { gap: 6px 14px; }
.cov-legend .step { display: inline-flex; align-items: center; gap: 7px; font-feature-settings: "tnum" 1; }
.mk { flex: none; width: 8px; height: 8px; color: var(--blue); }
.mk circle { fill: currentColor; stroke: none; }
/* the three marker sizes, in step with the map (1, 2 and 3 grid cells) */
.mk-1 { width: 6px; height: 6px; }
.mk-2 { width: 14px; height: 14px; }
.mk-3 { width: 21px; height: 21px; }
.mk-ring { width: 16px; height: 16px; }
.mk-ring circle.o { fill: none; stroke: var(--ink-2); stroke-width: 1.1; }

/* zoomed into a state */
.cov-zoom { position: absolute; z-index: 5; left: var(--gutter); right: var(--gutter); top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; pointer-events: none; }
.cov-zoom > * { pointer-events: auto; }
.cov-zoom[hidden] { display: none; }
.cov-back svg { width: 1em; height: 1em; fill: currentColor; }
.cz-facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0; padding: 4px 8px; background: rgba(255, 255, 255, .9); font-size: var(--s-small); color: var(--ink-2); font-feature-settings: "tnum" 1; }
.cz-facts b { font-size: 1.05rem; font-weight: 600; color: var(--ink); }

/* the card: beside its stitch or state on desktop, docked under the map on phones */
.cov-card {
  position: absolute; left: 0; top: 0; z-index: 6; width: 312px; padding: 16px 18px 18px;
  background: var(--paper); box-shadow: 0 16px 44px rgba(12, 13, 18, .16); pointer-events: none;
}
.cov-card.pinned { pointer-events: auto; }
.cov-card[hidden] { display: none; }
.cov-card p { margin: 0; }
.cc-name { font-weight: 600; font-size: 1.05rem; line-height: 1.3; color: var(--ink); }
/* HUD's name as given, under the place; its HUD code beside it */
.cc-hud { margin-top: 3px !important; font-size: var(--s-small); line-height: 1.4; color: var(--ink-2); }
.cc-hud span { margin-left: .7em; color: var(--ink-3); white-space: nowrap; font-feature-settings: "tnum" 1; }
.cc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px !important; }
.cc-tag { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; background: var(--blue-3); color: var(--ink); font-size: var(--s-micro); letter-spacing: .02em; line-height: 1.3; }
.cc-tag .mk { width: 7px; height: 7px; }
.cc-ask { background: var(--blue); color: var(--on-blue); cursor: pointer; }
.cc-ask:hover { background: #0039d6; }
.cc-lines { display: grid; gap: 3px; margin: 10px 0 0; font-size: var(--s-small); font-feature-settings: "tnum" 1; }
.cc-lines div { display: flex; gap: 10px; }
.cc-lines dt { min-width: 7.6em; color: var(--ink-3); }
.cc-lines dd { margin: 0; color: var(--ink); }
.cc-stats { display: flex; gap: 24px; margin: 14px 0 0; padding-top: 13px; border-top: 1px solid var(--grey-2); }
.cc-stats div { display: flex; flex-direction: column-reverse; gap: 4px; }
.cc-stats dt { font-size: var(--s-micro); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.cc-stats dd { margin: 0; font-size: 1.3rem; line-height: 1.15; color: var(--ink); white-space: nowrap; }
.cc-stats dd small { margin-left: .3em; font-size: .62em; font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.cc-sample { margin-top: 9px !important; font-size: var(--s-small); line-height: 1.45; color: var(--ink); }
.cc-place { margin-top: 12px !important; font-size: var(--s-small); }
.cc-place .link { color: var(--blue); text-decoration-color: currentColor; }
.cc-note { margin-top: 12px !important; font-size: var(--s-small); color: var(--ink-3); }
.cc-hint { margin-top: 10px !important; font-size: var(--s-small); color: var(--ink-3); }
.cc-hint:first-child { margin-top: 0 !important; }

@media (max-width: 720px) {
  .cov-find { flex-basis: 100%; }
  .cov-filters { gap: 6px; }
  .cov-chip { height: 34px; padding: 0 10px; gap: 8px; font-size: .8rem; }
  .cov-map { display: flex; flex-direction: column; }
  .cov-canvas { order: 0; }
  .cov-foot { order: 1; }
  .cov-card { order: 2; }
  .cov-hint { display: none; }
  .cov-zoom { left: 12px; right: 12px; top: 8px; gap: 8px; }
  .cov-zoom .btn.small { height: 34px; padding: 0 12px; }
  .cz-facts span { display: none; }
  .cov-card {
    position: relative; z-index: auto; width: auto; min-height: 182px; margin: 14px var(--gutter) 0; padding: 16px 0 0;
    transform: none !important; box-shadow: none; border-top: 1px solid var(--grey-2); pointer-events: auto;
  }
}
