/* ============================================================
   congress-search.css — the one Congress search (/search)

   On the site's tokens (legilist.css). No icons and no ornament
   for its own sake (owner, 2026-11-04): the decoration is the
   record, drawn the way the site's other pages draw it. A bill's
   progress as a track, a roll call's split as a bar, a member's
   portrait and years, a date in figures; and under the box, the
   size of what it searches, counted live.
   ============================================================ */

.cs-page .ll-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- the box ------------------------------------------------------- */
.cs-head {
  padding: 34px 0 26px;
}

.cs-h1 {
  margin: 6px 0 22px;
  max-width: 18ch;
}

.cs-box {
  display: flex;
  align-items: stretch;
  max-width: 820px;
  border: 1px solid var(--ll-line-strong);
  border-radius: 14px;
  background: var(--ll-surface);
  box-shadow: 0 1px 2px rgba(15, 27, 42, 0.04), 0 16px 40px -26px rgba(15, 27, 42, 0.35);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cs-box:focus-within {
  border-color: var(--ll-accent);
  box-shadow: 0 0 0 4px var(--ll-accent-soft), 0 16px 40px -26px rgba(15, 27, 42, 0.4);
}

.cs-input {
  flex: 1;
  min-width: 0;
  padding: 19px 22px;
  border: 0;
  border-radius: 14px 0 0 14px;
  background: transparent;
  color: var(--ll-ink);
  font: inherit;
  font-size: 1.2rem;
  outline: none;
}

.cs-input::placeholder {
  color: var(--ll-ink-4);
}

.cs-go {
  margin: 7px;
  padding: 0 26px;
  border: 0;
  border-radius: 9px;
  background: var(--ll-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.cs-go:hover {
  filter: brightness(1.12);
}

.cs-try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--ll-ink-4);
  font-size: 0.88rem;
}

.cs-try span {
  margin-right: 2px;
}

.cs-try a {
  padding: 5px 12px;
  border: 1px solid var(--ll-line);
  border-radius: 999px;
  background: var(--ll-surface);
  color: var(--ll-ink-2);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.cs-try a:hover {
  border-color: var(--ll-accent);
  color: var(--ll-accent);
}

/* --- the record, counted: what the box reaches ------------------------ */
.cs-ledger {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0;
  margin: 44px 0 0;
  padding: 22px 0 0;
  border-top: 2px solid var(--ll-ink);
}

.cs-ledger div {
  padding: 0 18px 0 0;
  animation: cs-rise 0.5s ease both;
}

.cs-ledger div:nth-child(2) { animation-delay: 0.05s; }
.cs-ledger div:nth-child(3) { animation-delay: 0.1s; }
.cs-ledger div:nth-child(4) { animation-delay: 0.15s; }
.cs-ledger div:nth-child(5) { animation-delay: 0.2s; }
.cs-ledger div:nth-child(6) { animation-delay: 0.25s; }
.cs-ledger div:nth-child(7) { animation-delay: 0.3s; }
.cs-ledger div:nth-child(8) { animation-delay: 0.35s; }
.cs-ledger div:nth-child(9) { animation-delay: 0.4s; }

.cs-ledger dt {
  color: var(--ll-ink);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.cs-ledger dd {
  margin: 6px 0 0;
  color: var(--ll-ink-3);
  font-size: 0.86rem;
  line-height: 1.35;
}

.cs-ledger dd a {
  color: var(--ll-accent);
  font-weight: 600;
  text-decoration: none;
}

.cs-ledger dd a:hover {
  text-decoration: underline;
}

.cs-ledger-note {
  margin: 18px 0 0;
  color: var(--ll-ink-4);
  font-size: 0.86rem;
}

/* --- the tabs: ll-switch, with a count after each label --------------- */
.cs-tabs {
  margin-bottom: 26px;
}

.cs-tab-count {
  margin-left: 6px;
  color: var(--ll-ink-4);
  font-size: 0.8rem;
  font-weight: 600;
}

.cs-tab-count:empty {
  display: none;
}

.cs-tabs a[aria-current="page"] .cs-tab-count {
  color: var(--ll-accent);
}

/* --- best match ------------------------------------------------------- */
.cs-best {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  margin: 0 0 38px;
  padding: 28px 30px;
  border: 1px solid var(--ll-line);
  border-radius: 14px;
  background: var(--ll-surface);
  box-shadow: 0 22px 48px -34px rgba(15, 27, 42, 0.45);
  animation: cs-rise 0.3s ease both;
}

.cs-best-face {
  flex: none;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  background: var(--ll-accent-soft);
}

.cs-best-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cs-best-kicker {
  color: var(--ll-accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cs-best-title {
  color: var(--ll-ink);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.18;
  text-decoration: none;
}

.cs-best-title:hover {
  color: var(--ll-accent);
}

.cs-best-meta {
  color: var(--ll-ink-3);
  font-size: 0.95rem;
}

.cs-best-figure {
  margin-top: 14px;
}

.cs-best-stage {
  margin: 10px 0 0;
  color: var(--ll-ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.cs-best-years {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ll-ink);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cs-best-years span {
  color: var(--ll-ink-4);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cs-best-others {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 16px 0 0;
  font-size: 0.84rem;
}

.cs-best-others span {
  margin-right: 4px;
  color: var(--ll-ink-4);
}

.cs-best-others a {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ll-accent-soft);
  color: var(--ll-accent);
  font-weight: 600;
  text-decoration: none;
}

.cs-best-others a:hover {
  background: var(--ll-accent-wash);
}

/* --- a bill's road: five steps, the bill page's track in miniature -------- */
.cs-track {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 14px;
  gap: 3px;
}

.cs-step {
  height: 5px;
  border-radius: 3px;
  background: var(--ll-line);
}

.cs-step.is-on {
  background: var(--ll-accent);
}

.cs-track.is-halted .cs-step.is-on:last-of-type {
  background: var(--ll-ink-3);
}

.cs-track-lg {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
  max-width: 620px;
}

.cs-track-lg .cs-step {
  height: auto;
  padding-top: 12px;
  border-radius: 0;
  border-top: 4px solid var(--ll-line);
  background: none;
}

.cs-track-lg .cs-step.is-on {
  border-top-color: var(--ll-accent);
  background: none;
}

.cs-track-lg .cs-step i {
  display: block;
  color: var(--ll-ink-4);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 600;
}

.cs-track-lg .cs-step.is-on i {
  color: var(--ll-ink);
}

/* --- a roll call's split ----------------------------------------------- */
.cs-tally {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.cs-tally-bar {
  display: block;
  width: 92px;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--ll-line-strong);
}

.cs-tally-bar span {
  display: block;
  height: 100%;
  background: var(--ll-accent);
}

.cs-tally-lg {
  align-items: flex-start;
}

.cs-tally-lg .cs-tally-bar {
  width: min(520px, 100%);
  height: 12px;
  border-radius: 6px;
}

.cs-tally-lg .cs-aside-label {
  color: var(--ll-ink);
  font-size: 1.5rem;
  font-weight: 700;
}

/* --- groups: two columns on a wide screen ------------------------------- */
.cs-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 56px;
}

.cs-group {
  min-width: 0;
  animation: cs-rise 0.3s ease both;
}

.cs-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ll-ink);
}

.cs-group-head h2 {
  margin: 0;
  color: var(--ll-ink);
  font-size: 1.12rem;
  font-weight: 700;
}

.cs-count {
  color: var(--ll-ink-4);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cs-all {
  display: inline-block;
  margin-top: 12px;
  color: var(--ll-accent);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.cs-all:hover {
  text-decoration: underline;
}

/* --- one result --------------------------------------------------------- */
.cs-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--ll-line);
}

.cs-face {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  background: var(--ll-accent-soft);
}

.cs-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cs-title {
  color: var(--ll-ink);
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.cs-title:hover {
  color: var(--ll-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cs-ext {
  margin-left: 3px;
  color: var(--ll-ink-4);
  font-weight: 400;
}

.cs-meta {
  color: var(--ll-ink-3);
  font-size: 0.85rem;
  line-height: 1.45;
}

.cs-type {
  color: var(--ll-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* the record's own figure, at the right of a result */
.cs-aside {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  min-width: 92px;
  padding-top: 4px;
  text-align: right;
}

.cs-aside-label {
  color: var(--ll-ink-4);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.cs-date {
  display: flex;
  flex-direction: column;
  color: var(--ll-ink-4);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
}

.cs-date b {
  color: var(--ll-ink-2);
  font-size: 0.95rem;
  font-weight: 700;
}

.cs-best .cs-date {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  font-size: 1rem;
}

.cs-best .cs-date b {
  color: var(--ll-ink);
  font-size: 1.5rem;
}

.cs-years {
  color: var(--ll-ink-3);
  font-size: 0.86rem;
  font-weight: 700;
}

/* --- placeholders for the sections still on their way -------------------- */
.cs-bar {
  display: block;
  width: 88%;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--ll-line) 0%, #f1f3f6 50%, var(--ll-line) 100%);
  background-size: 200% 100%;
  animation: cs-shimmer 1.2s linear infinite;
}

.cs-bar-short {
  width: 52%;
  height: 10px;
}

@keyframes cs-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

@keyframes cs-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-best, .cs-group, .cs-bar, .cs-ledger div { animation: none; }
}

/* --- a single type: filters, list, pages ------------------------------- */
.cs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.cs-select select {
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--ll-line-strong);
  border-radius: 8px;
  background: var(--ll-surface);
  color: var(--ll-ink-2);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.cs-select select:focus-visible {
  outline: 2px solid var(--ll-accent);
  outline-offset: 2px;
}

.cs-summary {
  margin: 0 0 6px;
  color: var(--ll-ink-3);
  font-size: 0.9rem;
}

.cs-list-full .cs-row {
  padding: 15px 0;
}

.cs-pager {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.cs-note {
  margin: 0 0 26px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--ll-accent-soft);
  color: var(--ll-ink-2);
}

.cs-note p {
  margin: 0;
  line-height: 1.55;
}

.cs-empty {
  margin-top: 10px;
}

.cs-noscript {
  margin: 24px 0 0;
}

/* --- smaller screens ----------------------------------------------------- */
@media (max-width: 1180px) {
  .cs-ledger {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    row-gap: 22px;
  }
}

@media (max-width: 900px) {
  .cs-groups {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

@media (max-width: 640px) {
  .cs-head {
    padding-top: 22px;
  }

  .cs-input {
    padding: 15px 14px;
    font-size: 1.02rem;
  }

  .cs-go {
    padding: 0 16px;
  }

  .cs-ledger {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 32px;
  }

  .cs-ledger dt {
    font-size: 1.25rem;
  }

  .cs-ledger div {
    padding-right: 10px;
  }

  .cs-best {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .cs-best-face {
    width: 84px;
    height: 84px;
  }

  .cs-track-lg .cs-step i {
    font-size: 0.66rem;
  }

  /* the figure drops under the title rather than squeezing it */
  .cs-row {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .cs-row .cs-aside {
    flex-basis: 100%;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding-top: 0;
    text-align: left;
  }

  .cs-row-legislator .cs-aside,
  .cs-row-hearing .cs-aside,
  .cs-row-crs .cs-aside,
  .cs-row-nomination .cs-aside {
    display: none;   /* the meta line already carries the date or status at this width */
  }

  .cs-date {
    flex-direction: row;
    gap: 5px;
  }
}
