
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}
/* Hide icon text until the Material Symbols font loads, then reveal */
html:not(.icons-loaded) .material-symbols-outlined { visibility: hidden; }
.glass-nav {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: rgba(247, 249, 251, 0.85);
}
.issue-card { transition: all 0.2s ease-in-out; cursor: pointer; }
.issue-card.selected { border-bottom: 4px solid #00346f; background-color: #ffffff; }
.issue-card.maxed { opacity: 0.45; pointer-events: none; }
.issue-card.selected.maxed { opacity: 1; pointer-events: auto; }
.hidden-issue { display: none !important; }
#issue-scroll::-webkit-scrollbar { height: 6px; }
#issue-scroll::-webkit-scrollbar-track { background: #eceef0; }
#issue-scroll::-webkit-scrollbar-thumb { background: #c2c6d3; border-radius: 3px; }
#issue-scroll::-webkit-scrollbar-thumb:hover { background: #00346f; }
.editorial-asymmetry {
  clip-path: polygon(0 0, 100% 0, 100% 95%, 0% 100%);
}
body { font-family: 'Public Sans', sans-serif; }
h1, h2, h3 { font-family: 'Newsreader', serif; }
/* Block, not inline-block. Every use of this writes `mx-auto mb-4` and puts
   the spinner on the line before its label, meaning it to sit centred above
   the text — and `margin: auto` does not centre an inline-block, which left
   the spinner sitting on the text's own line, nudged to the left of it. */
.loading-spinner {
  display: block;
  width: 20px; height: 20px;
  border: 2px solid #c2c6d3;
  border-top-color: #00346f;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes card-pop {
  0% { transform: scale(1); }
  40% { transform: scale(0.9); }
  70% { transform: scale(1.03); }
  100% { transform: scale(0.95); }
}
.card-select-anim {
  animation: card-pop 0.3s ease-out;
}

/* ── Search Overlay ── */
@keyframes search-slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes search-slide-up {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-100%); opacity: 0; }
}
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 0;
  animation: search-slide-down 0.25s ease-out forwards;
}
.search-overlay.closing {
  animation: search-slide-up 0.2s ease-in forwards;
}
.search-overlay-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 20px;
}
.search-overlay-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #c2c6d3;
  border-radius: 999px;
  padding: 10px 20px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-overlay-bar:focus-within {
  border-color: #00346f;
  box-shadow: 0 0 0 3px rgba(0,52,111,0.08);
}
.search-overlay-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Public Sans', sans-serif;
  font-size: 15px;
  color: #191c1e;
}
.search-overlay-bar input::placeholder {
  color: #737783;
}
.search-overlay-bar .search-icon {
  color: #00346f;
  font-size: 22px;
}
.search-overlay-bar .close-btn {
  color: #737783;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  border: none;
  background: none;
  transition: background 0.15s, color 0.15s;
}
.search-overlay-bar .close-btn:hover {
  background: #f2f4f6;
  color: #191c1e;
}
.search-results-dropdown {
  max-height: 360px;
  overflow-y: auto;
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid #e0e3e5;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.search-results-dropdown:empty { display: none; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: #191c1e;
  border-bottom: 1px solid #f2f4f6;
  transition: background 0.15s;
  cursor: pointer;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f7f9fb; }
.search-result-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.search-result-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e3e5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #737783;
}
.search-result-name {
  font-size: 14px;
  font-weight: 700;
}
.search-result-detail {
  font-size: 12px;
  color: #737783;
}
.search-result-party {
  font-size: 12px;
  font-weight: 700;
  margin-left: auto;
  flex-shrink: 0;
}
.search-result-party.dem { color: #1d4ed8; }
.search-result-party.rep { color: #b91c1c; }
.search-result-party.ind { color: #7e22ce; }
.search-no-results {
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: #737783;
  font-style: italic;
}
.search-more {
  padding: 8px 16px;
  text-align: center;
  font-size: 12px;
  color: #737783;
  background: #f7f9fb;
  border-top: 1px solid #f2f4f6;
}
.search-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.15);
  z-index: 199;
  animation: fade-in 0.2s ease-out;
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Printing a letter ──────────────────────────────────────────────
   The letter lives in a textarea for editing, and textareas clip their
   content when printed. #print-area is filled from the textarea just
   before window.print() and is the only thing that reaches the page. */
#print-area {
  display: none;
  white-space: pre-wrap;
}

/* Used to measure the letter before printing: laid out at the exact width a
   printed page gives it, but off-screen. Measuring it hidden would report a
   height of zero, and measuring it at screen width would report the wrong
   number of lines. */
#print-area.measuring {
  display: block;
  position: absolute;
  left: -9999px;
  top: 0;
  width: 7in;               /* letter width less #print-area's own padding */
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--print-font, 12pt);
  line-height: var(--print-leading, 1.5);
  padding: 0;
}

/* The posting address above a printed letter. Sits in #print-area, which is
   the only thing @media print leaves visible. */
.print-address {
  margin-bottom: 2rem;
  white-space: normal;
  line-height: 1.45;
}

@media print {
  .no-print,
  #site-header,
  #site-step-bar,
  #site-footer,
  #cv-dialog {
    display: none !important;
  }

  main {
    max-width: none !important;
    padding: 0 !important;
  }

  /* The letter is moved to be a child of body before printing, and
     everything else in body is hidden. Hiding siblings inside main was not
     enough: main itself, and the wrappers around it, kept contributing
     padding and margins that pushed the letter down the sheet. Nothing above
     #print-area remains in the tree to contribute anything. */
  body.printing > *:not(#print-area) {
    display: none !important;
  }

  main > *:not(#print-area) {
    display: none !important;
  }

  /* Zero margin on purpose. Browsers draw their own header and footer — URL,
     date, page number — inside the page margin, and reserve that band whether
     or not anything prints in it, which is the empty strip that pushed the
     address down. With no margin there is nowhere to draw them, so they are
     suppressed and the full sheet is ours.

     The real margin then goes on #print-area as padding, where it is a known
     quantity the measurement can account for. */
  @page {
    size: letter;
    margin: 0;
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
  }

  #print-area {
    display: block;
    /* Nothing inherited: this element is the page. */
    position: static !important;
    margin: 0 !important;
    max-width: none !important;
    width: auto;
    font-family: Georgia, "Times New Roman", serif;
    /* Set by fitToPage() before printing, which steps it down until the
       letter fits on one sheet. */
    font-size: var(--print-font, 12pt);
    line-height: var(--print-leading, 1.5);
    color: #000;
    /* The page margin, now that @page has none. */
    padding: 0.6in 0.75in;
    /* Backstop for a letter too long to fix by type size alone. 1 for
       everything normal, so nothing is shrunk that did not need to be. */
    transform: scale(var(--print-scale, 1));
    transform-origin: top left;
    width: calc(100% / var(--print-scale, 1));
  }
}

/* ---------------------------------------------------------------------------
   Mobile overflow backstop.

   The individual causes of horizontal scroll are fixed where they occur
   (absolutely-positioned buttons, flex children that would not shrink, long
   source URLs). These rules are the net underneath that: one new wide element
   on one page should not give the whole site a sideways scrollbar.

   `clip` rather than `hidden` because `hidden` would turn <body> into a scroll
   container and silently break `position: sticky` in the header. Screen only:
   the print stylesheet deliberately makes #print-area wider than 100% when it
   scales a long letter down, and clipping <body> would cut that off.
   --------------------------------------------------------------------------- */
@media screen {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }
}

/* Media is the other classic culprit: an intrinsic width wider than the phone.
   Nothing here is ever meant to be displayed larger than its column. */
img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* A URL or a bill title has no spaces to break at, so it would otherwise set
   the minimum width of its column. Applies to the places we print raw-ish
   strings; ordinary prose is unaffected because it already has break points. */
.break-anywhere {
  overflow-wrap: anywhere;
}
