/* Page styles for downloads.md (.dl-*) — extracted verbatim from the page's
   <style> block (REFACTOR_PLAN §4). Loaded globally via the head in
   observablehq.config.js; class names are page-prefixed so they can't leak. */

.dl-page { width: 100%; }

/* ── Type accordions ─────────────────────────────────────────────────── */
.dl-accordion {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.dl-accordion-summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: var(--theme-background-alt, #f8f9fb);
}
.dl-accordion-summary::-webkit-details-marker { display: none; }
.dl-accordion-summary:hover { background: rgba(0,0,0,0.03); }

.dl-accordion-chevron {
  font-size: 0.68rem;
  color: var(--muted);
  transition: transform 0.15s;
  flex-shrink: 0;
}
details[open] .dl-accordion-chevron { transform: rotate(90deg); }

.dl-accordion-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--theme-foreground);
  flex: 1;
}
.dl-accordion-count {
  font-size: 0.68rem;
  color: var(--muted);
  background: var(--border);
  border-radius: 10px;
  padding: 1px 7px;
  flex-shrink: 0;
}

/* ── Election cards grid ─────────────────────────────────────────────── */
.dl-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface, var(--theme-background));
  min-width: 180px;
  max-width: 280px;
  flex: 1 1 180px;
}

.dl-card-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dl-card-year {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.dl-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--theme-foreground);
  line-height: 1.3;
}

/* ── Download pills ──────────────────────────────────────────────────── */
.dl-card-pills {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.dl-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  border: 1px solid var(--theme-foreground-focus, #3b82f6);
  color: var(--theme-foreground-focus, #3b82f6);
  text-decoration: none;
  font-size: 0.74rem;
  transition: background 0.12s, color 0.12s;
}
.dl-pill:hover { background: var(--theme-foreground-focus, #3b82f6); color: #fff; }
.dl-pill-label { flex: 1; }
.dl-pill-size {
  font-size: 0.66rem;
  opacity: 0.7;
  white-space: nowrap;
}

/* ── Meta / footer ───────────────────────────────────────────────────── */
.dl-meta-row {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}
.dl-format-note {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
